Mathlib.Algebra.Notation.Defs
59 declarations. Mathlib docs · Source
Typeclasses for algebraic operations
Notation typeclass for Inv, the multiplicative analogue of Neg.
We also introduce notation classes SMul and VAdd for multiplicative and additive
actions.
We introduce the notation typeclass Star for algebraic structures with a star operation. Note: to
accommodate diverse notational preferences, no default notation is provided for Star.star.
SMul is typically, but not exclusively, used for scalar multiplication-like operators.
See the module Algebra.Torsor.Defs for a motivating example for the name VAdd (vector addition).
Note Zero has already been defined in core Lean.
Notation
a • bis used as notation forHSMul.hSMul a b.a +ᵥ bis used as notation forHVAdd.hVAdd a b.
def SDiv.ctorIdx E1 #
{G : outParam (Type u_1)} → {P : Type u_2} → SDiv G P → ℕ
def VAdd.ctorIdx E1 #
{G : Type u} → {P : Type v} → VAdd G P → ℕ
def HVAdd.ctorIdx E1 #
{α : Type u} → {β : Type v} → {γ : outParam (Type w)} → HVAdd α β γ → ℕ
def VSub.ctorIdx E1 #
{G : outParam (Type u_1)} → {P : Type u_2} → VSub G P → ℕ
def Star.ctorIdx E1 #
{R : Type u} → Star R → ℕ
class HVAdd E1 #
Type u → Type v → outParam (Type w) → Type (max (max u v) w)
The notation typeclass for heterogeneous additive actions.
This enables the notation a +ᵥ b : γ where a : α, b : β.
ctor HVAdd.mk E0 #
{α : Type u} → {β : Type v} → {γ : outParam (Type w)} → (α → β → γ) → HVAdd α β γ
abbrev HVAdd.hVAdd E1 #
{α : Type u} → {β : Type v} → {γ : outParam (Type w)} → [self : HVAdd α β γ] → α → β → γ
a +ᵥ b computes the sum of a and b.
The meaning of this notation is type-dependent.
Conventions for notations in identifiers:
- The recommended spelling of
+ᵥin identifiers isvadd.
class VAdd E1 #
Type u → Type v → Type (max u v)
Type class for the +ᵥ notation.
ctor VAdd.mk E0 #
{G : Type u} → {P : Type v} → (G → P → P) → VAdd G P
abbrev VAdd.vadd E1 #
{G : Type u} → {P : Type v} → [self : VAdd G P] → G → P → P
a +ᵥ b computes the sum of a and b. The meaning of this notation is type-dependent,
but it is intended to be used for left actions.
class VSub E1 #
outParam (Type u_1) → Type u_2 → Type (max u_1 u_2)
Type class for the -ᵥ notation.
ctor VSub.mk E0 #
{G : outParam (Type u_1)} → {P : Type u_2} → (P → P → G) → VSub G P
abbrev VSub.vsub E1 #
{G : outParam (Type u_1)} → {P : Type u_2} → [self : VSub G P] → P → P → G
a -ᵥ b computes the difference of a and b. The meaning of this notation is
type-dependent, but it is intended to be used for additive torsors.
Conventions for notations in identifiers:
- The recommended spelling of
-ᵥin identifiers isvsub.
class SDiv E1 #
outParam (Type u_1) → Type u_2 → Type (max u_1 u_2)
Type class for the /ₛ notation.
theorem VSub.ext E1 #
∀ {G : outParam (Type u_1)} {P : Type u_2} {x y : VSub G P}, VSub.vsub = VSub.vsub → x = y
theorem SDiv.ext_iff E0 #
∀ {G : outParam (Type u_1)} {P : Type u_2} {x y : SDiv G P}, x = y ↔ SDiv.sdiv = SDiv.sdiv
theorem VSub.ext_iff E0 #
∀ {G : outParam (Type u_1)} {P : Type u_2} {x y : VSub G P}, x = y ↔ VSub.vsub = VSub.vsub
theorem SDiv.ext E1 #
∀ {G : outParam (Type u_1)} {P : Type u_2} {x y : SDiv G P}, SDiv.sdiv = SDiv.sdiv → x = y
ctor SDiv.mk E0 #
{G : outParam (Type u_1)} → {P : Type u_2} → (P → P → G) → SDiv G P
abbrev SDiv.sdiv E1 #
{G : outParam (Type u_1)} → {P : Type u_2} → [self : SDiv G P] → P → P → G
a /ₛ b computes the quotient of a and b. The meaning of this notation is
type-dependent, but it is intended to be used for multiplicative torsors.
Conventions for notations in identifiers:
- The recommended spelling of
/ₛin identifiers issdiv.
instance instHVAdd E0 #
{α : Type u_1} → {β : Type u_2} → [VAdd α β] → HVAdd α β β
theorem SMul.ext E1 #
∀ {M : Type u} {α : Type v} {x y : SMul M α}, SMul.smul = SMul.smul → x = y
theorem VAdd.ext_iff E0 #
∀ {G : Type u} {P : Type v} {x y : VAdd G P}, x = y ↔ VAdd.vadd = VAdd.vadd
theorem SMul.ext_iff E0 #
∀ {M : Type u} {α : Type v} {x y : SMul M α}, x = y ↔ SMul.smul = SMul.smul
theorem VAdd.ext E1 #
∀ {G : Type u} {P : Type v} {x y : VAdd G P}, VAdd.vadd = VAdd.vadd → x = y
def «term_+ᵥ_» E1 #
Lean.TrailingParserDescr
a +ᵥ b computes the sum of a and b.
The meaning of this notation is type-dependent.
Conventions for notations in identifiers:
- The recommended spelling of
+ᵥin identifiers isvadd.
def «term_-ᵥ_» E1 #
Lean.TrailingParserDescr
a -ᵥ b computes the difference of a and b. The meaning of this notation is
type-dependent, but it is intended to be used for additive torsors.
Conventions for notations in identifiers:
- The recommended spelling of
-ᵥin identifiers isvsub.
def «term_/ₛ_» E1 #
Lean.TrailingParserDescr
a /ₛ b computes the quotient of a and b. The meaning of this notation is
type-dependent, but it is intended to be used for multiplicative torsors.
Conventions for notations in identifiers:
- The recommended spelling of
/ₛin identifiers issdiv.
class Star E3 #
Type u → Type u
Notation typeclass (with no default notation!) for an algebraic structure with a star operation.
ctor Star.mk E0 #
{R : Type u} → (R → R) → Star R
abbrev Star.star E1 #
{R : Type u} → [self : Star R] → R → R
A star operation (e.g. complex conjugate).
theorem add_dite E1 #
∀ {α : Type u_1} (P : Prop) [inst : Decidable P] [inst_1 : Add α] (a : α) (b : P → α) (c : ¬P → α),
(a + if h : P then b h else c h) = if h : P then a + b h else a + c h
theorem mul_dite E0 #
∀ {α : Type u_1} (P : Prop) [inst : Decidable P] [inst_1 : Mul α] (a : α) (b : P → α) (c : ¬P → α),
(a * if h : P then b h else c h) = if h : P then a * b h else a * c h
theorem mul_ite E0 #
∀ {α : Type u_1} (P : Prop) [inst : Decidable P] [inst_1 : Mul α] (a b c : α),
(a * if P then b else c) = if P then a * b else a * c
theorem add_ite E1 #
∀ {α : Type u_1} (P : Prop) [inst : Decidable P] [inst_1 : Add α] (a b c : α),
(a + if P then b else c) = if P then a + b else a + c
theorem dite_add E1 #
∀ {α : Type u_1} (P : Prop) [inst : Decidable P] [inst_1 : Add α] (a : P → α) (b : ¬P → α) (c : α),
(if h : P then a h else b h) + c = if h : P then a h + c else b h + c
theorem dite_mul E0 #
∀ {α : Type u_1} (P : Prop) [inst : Decidable P] [inst_1 : Mul α] (a : P → α) (b : ¬P → α) (c : α),
(if h : P then a h else b h) * c = if h : P then a h * c else b h * c
theorem ite_add E1 #
∀ {α : Type u_1} (P : Prop) [inst : Decidable P] [inst_1 : Add α] (a b c : α),
(if P then a else b) + c = if P then a + c else b + c
theorem ite_mul E0 #
∀ {α : Type u_1} (P : Prop) [inst : Decidable P] [inst_1 : Mul α] (a b c : α),
(if P then a else b) * c = if P then a * c else b * c
theorem dite_mul_dite E1 #
∀ {α : Type u_1} (P : Prop) [inst : Decidable P] [inst_1 : Mul α] (a : P → α) (b : ¬P → α) (c : P → α) (d : ¬P → α),
((if h : P then a h else b h) * if h : P then c h else d h) = if h : P then a h * c h else b h * d h
theorem dite_add_dite E1 #
∀ {α : Type u_1} (P : Prop) [inst : Decidable P] [inst_1 : Add α] (a : P → α) (b : ¬P → α) (c : P → α) (d : ¬P → α),
((if h : P then a h else b h) + if h : P then c h else d h) = if h : P then a h + c h else b h + d h
theorem ite_mul_ite E1 #
∀ {α : Type u_1} (P : Prop) [inst : Decidable P] [inst_1 : Mul α] (a b c d : α),
((if P then a else b) * if P then c else d) = if P then a * c else b * d
theorem ite_add_ite E1 #
∀ {α : Type u_1} (P : Prop) [inst : Decidable P] [inst_1 : Add α] (a b c d : α),
((if P then a else b) + if P then c else d) = if P then a + c else b + d
theorem neg_ite E1 #
∀ {α : Type u_2} (P : Prop) [inst : Decidable P] [inst_1 : Neg α] (b c : α),
(-if P then b else c) = if P then -b else -c
theorem sub_dite E1 #
∀ {α : Type u_1} (P : Prop) [inst : Decidable P] [inst_1 : Sub α] (a : α) (b : P → α) (c : ¬P → α),
(a - if h : P then b h else c h) = if h : P then a - b h else a - c h
theorem div_dite E1 #
∀ {α : Type u_1} (P : Prop) [inst : Decidable P] [inst_1 : Div α] (a : α) (b : P → α) (c : ¬P → α),
(a / if h : P then b h else c h) = if h : P then a / b h else a / c h
theorem div_ite E1 #
∀ {α : Type u_1} (P : Prop) [inst : Decidable P] [inst_1 : Div α] (a b c : α),
(a / if P then b else c) = if P then a / b else a / c
theorem sub_ite E1 #
∀ {α : Type u_1} (P : Prop) [inst : Decidable P] [inst_1 : Sub α] (a b c : α),
(a - if P then b else c) = if P then a - b else a - c
theorem dite_sub E1 #
∀ {α : Type u_1} (P : Prop) [inst : Decidable P] [inst_1 : Sub α] (a : P → α) (b : ¬P → α) (c : α),
(if h : P then a h else b h) - c = if h : P then a h - c else b h - c
theorem dite_div E1 #
∀ {α : Type u_1} (P : Prop) [inst : Decidable P] [inst_1 : Div α] (a : P → α) (b : ¬P → α) (c : α),
(if h : P then a h else b h) / c = if h : P then a h / c else b h / c
theorem ite_div E1 #
∀ {α : Type u_1} (P : Prop) [inst : Decidable P] [inst_1 : Div α] (a b c : α),
(if P then a else b) / c = if P then a / c else b / c
theorem ite_sub E1 #
∀ {α : Type u_1} (P : Prop) [inst : Decidable P] [inst_1 : Sub α] (a b c : α),
(if P then a else b) - c = if P then a - c else b - c
theorem dite_sub_dite E1 #
∀ {α : Type u_1} (P : Prop) [inst : Decidable P] [inst_1 : Sub α] (a : P → α) (b : ¬P → α) (c : P → α) (d : ¬P → α),
((if h : P then a h else b h) - if h : P then c h else d h) = if h : P then a h - c h else b h - d h
theorem dite_div_dite E1 #
∀ {α : Type u_1} (P : Prop) [inst : Decidable P] [inst_1 : Div α] (a : P → α) (b : ¬P → α) (c : P → α) (d : ¬P → α),
((if h : P then a h else b h) / if h : P then c h else d h) = if h : P then a h / c h else b h / d h
theorem ite_sub_ite E1 #
∀ {α : Type u_1} (P : Prop) [inst : Decidable P] [inst_1 : Sub α] (a b c d : α),
((if P then a else b) - if P then c else d) = if P then a - c else b - d
theorem ite_div_ite E1 #
∀ {α : Type u_1} (P : Prop) [inst : Decidable P] [inst_1 : Div α] (a b c d : α),
((if P then a else b) / if P then c else d) = if P then a / c else b / d
instance Zero.instNonempty E0 #
∀ {α : Type u} [Zero α], Nonempty α
instance One.instNonempty E0 #
∀ {α : Type u} [One α], Nonempty α