Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/Lean/Mathlib/Mathlib/Algebra/Notation/Pi/     Datei vom 15.10.2026 mit Größe 4 kB image not shown  

Quelle  Defs.lean   Sprache: Lean

 

/-
Copyright (c) 2020 Eric Wieser. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Simon Hudon, Patrick Massot, Eric Wieser
-/

module

public import Mathlib.Algebra.Notation.Defs
public import Mathlib.Logic.Function.Defs
public import Mathlib.Tactic.Push.Attr

set_option doc.verso true
set_option doc.verso.suggestions false

/-!
# Notation for algebraic operators on pi types

This file provides only the notation for (pointwise) `0`, `1`, `+`, `*`, `•`, `^`, `⁻¹` on pi types.
See `Mathlib/Algebra/Group/Pi/Basic.lean` for the `Monoid` and `Group` instances. There is also
an instance of the `Star` notation typeclass, but no default notation is included.
-/


@[expose] public section

assert_not_exists Set.range Monoid Preorder

open Function

variable {ι α β : Type*} {G M R : ι → Type*}

namespace Pi

/-! `1`, `0`, `+`, `*`, `+ᵥ`, `•`, `^`, `-`, `⁻¹`, and `/` are defined pointwise. -/

section One
variable [∀ i, One (M i)]

@[to_additive]
instance instOne : One (∀ i, M i) where one _ := 1

@[to_additive (attr := simp high)]
protected lemma one_apply (i : ι) : (1 : ∀ i, M i) i = 1 := rfl

@[to_additive (attr := push ← high)]
lemma one_def : (1 : ∀ i, M i) = fun _ ↦ 1 := rfl

variable {M : Type*} [One M]

@[to_additive (attr := simp)] lemma _root_.Function.const_one : const α (1 : M) = 1 := rfl

@[to_additive (attr := simp)] lemma one_comp (f : α → β) : (1 : β → M) ∘ f = 1 := rfl
@[to_additive (attr := simp)] lemma comp_one (f : M → β) : f ∘ (1 : α → M) = const α (f 1) := rfl

end One

section Mul
variable [∀ i, Mul (M i)]

@[to_additive]
instance instMul : Mul (∀ i, M i) where mul f g i := f i * g i

@[to_additive (attr := simp)]
protected lemma mul_apply (f g : ∀ i, M i) (i : ι) : (f * g) i = f i * g i := rfl

@[to_additive (attr := push ←)]
lemma mul_def (f g : ∀ i, M i) : f * g = fun i ↦ f i * g i := rfl

variable {M : Type*} [Mul M]

@[to_additive (attr := simp)]
lemma _root_.Function.const_mul (a b : M) : const ι a * const ι b = const ι (a * b) := rfl

@[to_additive]
lemma mul_comp (f g : β → M) (z : α → β) : (f * g) ∘ z = f ∘ z * g ∘ z := rfl

end Mul

section Inv
variable [∀ i, Inv (G i)]

@[to_additive]
instance instInv : Inv (∀ i, G i) where inv f i := (f i)⁻¹

@[to_additive (attr := simp)]
protected lemma inv_apply (f : ∀ i, G i) (i : ι) : f⁻¹ i = (f i)⁻¹ := rfl

@[to_additive (attr := push ←)]
lemma inv_def (f : ∀ i, G i) : f⁻¹ = fun i ↦ (f i)⁻¹ := rfl

variable {G : Type*} [Inv G]

@[to_additive]
lemma _root_.Function.const_inv (a : G) : (const ι a)⁻¹ = const ι a⁻¹ := rfl

@[to_additive]
lemma inv_comp (f : β → G) (g : α → β) : f⁻¹ ∘ g = (f ∘ g)⁻¹ := rfl
end Inv

section Div
variable [∀ i, Div (G i)]

@[to_additive]
instance instDiv : Div (∀ i, G i) where div f g i := f i / g i

@[to_additive (attr := simp)]
protected lemma div_apply (f g : ∀ i, G i) (i : ι) : (f / g) i = f i / g i := rfl

@[to_additive (attr := push ←)]
lemma div_def (f g : ∀ i, G i) : f / g = fun i ↦ f i / g i := rfl

variable {G : Type*} [Div G]

@[to_additive]
lemma div_comp (f g : β → G) (z : α → β) : (f / g) ∘ z = f ∘ z / g ∘ z := rfl

@[to_additive (attr := simp)]
lemma _root_.Function.const_div (a b : G) : const ι a / const ι b = const ι (a / b) := rfl

end Div

section Pow

variable [∀ i, Pow (M i) α]

@[to_additive (attr := to_additive) instSMul]
instance instPow : Pow (∀ i, M i) α where pow f a i := f i ^ a

@[to_additive (attr := simp, to_additive) (reorder := 5 6) smul_apply]
protected lemma pow_apply (f : ∀ i, M i) (a : α) (i : ι) : (f ^ a) i = f i ^ a := rfl

@[to_additive (attr := push ←, to_additive) (reorder := 5 6) smul_def]
lemma pow_def (f : ∀ i, M i) (a : α) : f ^ a = fun i ↦ f i ^ a := rfl

variable {M : Type*} [Pow M α]

@[to_additive (attr := simp, to_additive) (reorder := 2 3, 5 6) smul_const]
lemma _root_.Function.const_pow (a : M) (b : α) : const ι a ^ b = const ι (a ^ b) := rfl

@[to_additive (attr := to_additive) (reorder := 6 7) smul_comp]
lemma pow_comp (f : β → M) (a : α) (g : ι → β) : (f ^ a) ∘ g = f ∘ g ^ a := rfl

end Pow

section Star

variable [∀ i, Star (R i)]

instance : Star (∀ i, R i) where star x i := star (x i)

@[simp]
theorem star_apply (x : ∀ i, R i) (i : ι) : star x i = star (x i) := rfl

@[push ←]
theorem star_def (x : ∀ i, R i) : star x = fun i => star (x i) := rfl

end Star

end Pi

Messung
CHZG
8610010095

¤ Dauer der Verarbeitung: 0.1 Sekunden  (vorverarbeitet am  2026-11-24) ¤

*© Formatika GbR, Deutschland