Mathlib.Algebra.Opposites
130 declarations. Mathlib docs · Source
Multiplicative opposite and algebraic operations on it
In this file we define MulOpposite α = αᵐᵒᵖ to be the multiplicative opposite of α. It inherits
all additive algebraic structures on α (in other files), and reverses the order of multipliers in
multiplicative structures, i.e., op (x * y) = op y * op x, where MulOpposite.op is the
canonical map from α to αᵐᵒᵖ.
We also define AddOpposite α = αᵃᵒᵖ to be the additive opposite of α. It inherits all
multiplicative algebraic structures on α (in other files), and reverses the order of summands in
additive structures, i.e. op (x + y) = op y + op x, where AddOpposite.op is the canonical map
from α to αᵃᵒᵖ.
Notation
αᵐᵒᵖ = MulOpposite ααᵃᵒᵖ = AddOpposite α
Implementation notes
In mathlib3 αᵐᵒᵖ was just a type synonym for α, marked irreducible after the API
was developed. In mathlib4 we use a structure with one field, because it is not possible
to change the reducibility of a declaration after its definition, and because Lean 4 has
definitional eta reduction for structures (Lean 3 does not).
Tags
multiplicative opposite, additive opposite
theorem PreOpposite.op'.inj E1 #
∀ {α : Type u_3} {unop' unop'_1 : α}, { unop' := unop' } = { unop' := unop'_1 } → unop' = unop'_1
theorem PreOpposite.op'.injEq E0 #
∀ {α : Type u_3} (unop' unop'_1 : α), ({ unop' := unop' } = { unop' := unop'_1 }) = (unop' = unop'_1)
def PreOpposite.ctorIdx E1 #
{α : Type u_3} → PreOpposite α → ℕ
structure PreOpposite E1 #
Type u_3 → Type u_3
Auxiliary type to implement MulOpposite and AddOpposite.
It turns out to be convenient to have MulOpposite α = AddOpposite α true by definition, in the
same way that it is convenient to have Additive α = α; this means that we also get the defeq
AddOpposite (Additive α) = MulOpposite α, which is convenient when working with quotients.
This is a compromise between making MulOpposite α = AddOpposite α = α (what we had in Lean 3) and
having no defeqs within those three types (which we had as of https://github.com/leanprover-community/mathlib4/pull/1036).
ctor PreOpposite.op' E0 #
{α : Type u_3} → α → PreOpposite α
The element of PreOpposite α that represents x : α.
abbrev PreOpposite.unop' E1 #
{α : Type u_3} → PreOpposite α → α
The element of α represented by x : PreOpposite α.
def MulOpposite E1 #
Type u_3 → Type u_3
Multiplicative opposite of a type. This type inherits all additive structures on α and
reverses left and right in multiplication.
def AddOpposite E1 #
Type u_3 → Type u_3
Additive opposite of a type. This type inherits all multiplicative structures on α and
reverses left and right in addition.
def «term_ᵐᵒᵖ» E1 #
Lean.TrailingParserDescr
Multiplicative opposite of a type.
def «term_ᵃᵒᵖ» E1 #
Lean.TrailingParserDescr
Additive opposite of a type.
def MulOpposite.op E1 #
{α : Type u_1} → α → αᵐᵒᵖ
The element of MulOpposite α that represents x : α.
def AddOpposite.op E1 #
{α : Type u_1} → α → αᵃᵒᵖ
The element of αᵃᵒᵖ that represents x : α.
def MulOpposite.unop E1 #
{α : Type u_1} → αᵐᵒᵖ → α
The element of α represented by x : αᵐᵒᵖ.
def AddOpposite.unop E1 #
{α : Type u_1} → αᵃᵒᵖ → α
The element of α represented by x : αᵃᵒᵖ.
theorem MulOpposite.unop_op E0 #
∀ {α : Type u_1} (x : α), MulOpposite.unop (MulOpposite.op x) = x
theorem AddOpposite.unop_op E0 #
∀ {α : Type u_1} (x : α), AddOpposite.unop (AddOpposite.op x) = x
theorem MulOpposite.op_unop E0 #
∀ {α : Type u_1} (x : αᵐᵒᵖ), MulOpposite.op (MulOpposite.unop x) = x
theorem AddOpposite.op_unop E0 #
∀ {α : Type u_1} (x : αᵃᵒᵖ), AddOpposite.op (AddOpposite.unop x) = x
theorem AddOpposite.op_comp_unop E0 #
∀ {α : Type u_1}, AddOpposite.op ∘ AddOpposite.unop = id
theorem MulOpposite.op_comp_unop E0 #
∀ {α : Type u_1}, MulOpposite.op ∘ MulOpposite.unop = id
theorem AddOpposite.unop_comp_op E0 #
∀ {α : Type u_1}, AddOpposite.unop ∘ AddOpposite.op = id
theorem MulOpposite.unop_comp_op E0 #
∀ {α : Type u_1}, MulOpposite.unop ∘ MulOpposite.op = id
def MulOpposite.rec' E1 #
{α : Type u_1} → {F : αᵐᵒᵖ → Sort u_3} → ((X : α) → F (MulOpposite.op X)) → (X : αᵐᵒᵖ) → F X
A recursor for MulOpposite. Use as induction x.
def AddOpposite.rec' E1 #
{α : Type u_1} → {F : αᵃᵒᵖ → Sort u_3} → ((X : α) → F (AddOpposite.op X)) → (X : αᵃᵒᵖ) → F X
A recursor for AddOpposite. Use as induction x.
def MulOpposite.opEquiv E1 #
{α : Type u_1} → α ≃ αᵐᵒᵖ
The canonical bijection between α and αᵐᵒᵖ.
def AddOpposite.opEquiv E1 #
{α : Type u_1} → α ≃ αᵃᵒᵖ
The canonical bijection between α and αᵃᵒᵖ.
theorem AddOpposite.opEquiv_apply E0 #
∀ {α : Type u_1}, ⇑AddOpposite.opEquiv = AddOpposite.op
theorem MulOpposite.opEquiv_apply E0 #
∀ {α : Type u_1}, ⇑MulOpposite.opEquiv = MulOpposite.op
theorem MulOpposite.opEquiv_symm_apply E0 #
∀ {α : Type u_1}, ⇑MulOpposite.opEquiv.symm = MulOpposite.unop
theorem AddOpposite.opEquiv_symm_apply E0 #
∀ {α : Type u_1}, ⇑AddOpposite.opEquiv.symm = AddOpposite.unop
theorem AddOpposite.op_bijective E1 #
∀ {α : Type u_1}, Function.Bijective AddOpposite.op
theorem MulOpposite.op_bijective E1 #
∀ {α : Type u_1}, Function.Bijective MulOpposite.op
theorem MulOpposite.unop_bijective E1 #
∀ {α : Type u_1}, Function.Bijective MulOpposite.unop
theorem AddOpposite.unop_bijective E1 #
∀ {α : Type u_1}, Function.Bijective AddOpposite.unop
theorem MulOpposite.op_injective E1 #
∀ {α : Type u_1}, Function.Injective MulOpposite.op
theorem AddOpposite.op_injective E1 #
∀ {α : Type u_1}, Function.Injective AddOpposite.op
theorem AddOpposite.op_surjective E1 #
∀ {α : Type u_1}, Function.Surjective AddOpposite.op
theorem MulOpposite.op_surjective E1 #
∀ {α : Type u_1}, Function.Surjective MulOpposite.op
theorem MulOpposite.unop_injective E2 #
∀ {α : Type u_1}, Function.Injective MulOpposite.unop
theorem AddOpposite.unop_injective E2 #
∀ {α : Type u_1}, Function.Injective AddOpposite.unop
theorem MulOpposite.unop_surjective E1 #
∀ {α : Type u_1}, Function.Surjective MulOpposite.unop
theorem AddOpposite.unop_surjective E1 #
∀ {α : Type u_1}, Function.Surjective AddOpposite.unop
theorem MulOpposite.op_inj E0 #
∀ {α : Type u_1} {x y : α}, MulOpposite.op x = MulOpposite.op y ↔ x = y
theorem AddOpposite.op_inj E0 #
∀ {α : Type u_1} {x y : α}, AddOpposite.op x = AddOpposite.op y ↔ x = y
theorem MulOpposite.unop_inj E0 #
∀ {α : Type u_1} {x y : αᵐᵒᵖ}, MulOpposite.unop x = MulOpposite.unop y ↔ x = y
theorem AddOpposite.unop_inj E0 #
∀ {α : Type u_1} {x y : αᵃᵒᵖ}, AddOpposite.unop x = AddOpposite.unop y ↔ x = y
theorem MulOpposite.forall E0 #
∀ {α : Type u_1} {p : αᵐᵒᵖ → Prop}, (∀ (a : αᵐᵒᵖ), p a) ↔ ∀ (a : α), p (MulOpposite.op a)
theorem AddOpposite.forall E0 #
∀ {α : Type u_1} {p : αᵃᵒᵖ → Prop}, (∀ (a : αᵃᵒᵖ), p a) ↔ ∀ (a : α), p (AddOpposite.op a)
theorem AddOpposite.exists E0 #
∀ {α : Type u_1} {p : αᵃᵒᵖ → Prop}, (∃ a, p a) ↔ ∃ a, p (AddOpposite.op a)
theorem MulOpposite.exists E0 #
∀ {α : Type u_1} {p : αᵐᵒᵖ → Prop}, (∃ a, p a) ↔ ∃ a, p (MulOpposite.op a)
instance MulOpposite.instNontrivial E0 #
∀ {α : Type u_1} [Nontrivial α], Nontrivial αᵐᵒᵖ
instance AddOpposite.instNontrivial E0 #
∀ {α : Type u_1} [Nontrivial α], Nontrivial αᵃᵒᵖ
instance MulOpposite.instInhabited E0 #
{α : Type u_1} → [Inhabited α] → Inhabited αᵐᵒᵖ
instance AddOpposite.instInhabited E0 #
{α : Type u_1} → [Inhabited α] → Inhabited αᵃᵒᵖ
instance AddOpposite.instSubsingleton E0 #
∀ {α : Type u_1} [Subsingleton α], Subsingleton αᵃᵒᵖ
instance MulOpposite.instSubsingleton E0 #
∀ {α : Type u_1} [Subsingleton α], Subsingleton αᵐᵒᵖ
instance AddOpposite.instUnique E0 #
{α : Type u_1} → [Unique α] → Unique αᵃᵒᵖ
instance MulOpposite.instUnique E0 #
{α : Type u_1} → [Unique α] → Unique αᵐᵒᵖ
instance AddOpposite.instIsEmpty E0 #
∀ {α : Type u_1} [IsEmpty α], IsEmpty αᵃᵒᵖ
instance MulOpposite.instIsEmpty E0 #
∀ {α : Type u_1} [IsEmpty α], IsEmpty αᵐᵒᵖ
instance MulOpposite.instDecidableEq E0 #
{α : Type u_1} → [DecidableEq α] → DecidableEq αᵐᵒᵖ
instance AddOpposite.instDecidableEq E0 #
{α : Type u_1} → [DecidableEq α] → DecidableEq αᵃᵒᵖ
instance MulOpposite.instZero E0 #
{α : Type u_1} → [Zero α] → Zero αᵐᵒᵖ
instance AddOpposite.instZero E0 #
{α : Type u_1} → [Zero α] → Zero αᵃᵒᵖ
instance MulOpposite.instOne E0 #
{α : Type u_1} → [One α] → One αᵐᵒᵖ
instance MulOpposite.instAdd E0 #
{α : Type u_1} → [Add α] → Add αᵐᵒᵖ
instance MulOpposite.instSub E0 #
{α : Type u_1} → [Sub α] → Sub αᵐᵒᵖ
instance MulOpposite.instNeg E0 #
{α : Type u_1} → [Neg α] → Neg αᵐᵒᵖ
instance MulOpposite.instInvolutiveNeg E0 #
{α : Type u_1} → [InvolutiveNeg α] → InvolutiveNeg αᵐᵒᵖ
instance AddOpposite.instAdd E0 #
{α : Type u_1} → [Add α] → Add αᵃᵒᵖ
instance MulOpposite.instMul E0 #
{α : Type u_1} → [Mul α] → Mul αᵐᵒᵖ
instance MulOpposite.instInv E0 #
{α : Type u_1} → [Inv α] → Inv αᵐᵒᵖ
instance AddOpposite.instNeg E0 #
{α : Type u_1} → [Neg α] → Neg αᵃᵒᵖ
instance MulOpposite.instInvolutiveInv E0 #
{α : Type u_1} → [InvolutiveInv α] → InvolutiveInv αᵐᵒᵖ
instance AddOpposite.instInvolutiveNeg E0 #
{α : Type u_1} → [InvolutiveNeg α] → InvolutiveNeg αᵃᵒᵖ
instance MulOpposite.instIsLeftCancelAdd E0 #
∀ {α : Type u_1} [inst : Add α] [IsLeftCancelAdd α], IsLeftCancelAdd αᵐᵒᵖ
instance MulOpposite.instIsRightCancelAdd E0 #
∀ {α : Type u_1} [inst : Add α] [IsRightCancelAdd α], IsRightCancelAdd αᵐᵒᵖ
instance MulOpposite.instIsCancelAdd E0 #
∀ {α : Type u_1} [inst : Add α] [IsCancelAdd α], IsCancelAdd αᵐᵒᵖ
theorem MulOpposite.isLeftCancelAdd_iff E0 #
∀ {α : Type u_1} [inst : Add α], IsLeftCancelAdd αᵐᵒᵖ ↔ IsLeftCancelAdd α
theorem MulOpposite.isRightCancelAdd_iff E0 #
∀ {α : Type u_1} [inst : Add α], IsRightCancelAdd αᵐᵒᵖ ↔ IsRightCancelAdd α
theorem MulOpposite.isCancelAdd_iff E0 #
∀ {α : Type u_1} [inst : Add α], IsCancelAdd αᵐᵒᵖ ↔ IsCancelAdd α
instance MulOpposite.instSMul E0 #
{α : Type u_1} → {β : Type u_2} → [SMul α β] → SMul α βᵐᵒᵖ
instance AddOpposite.instVAdd E0 #
{α : Type u_1} → {β : Type u_2} → [VAdd α β] → VAdd α βᵃᵒᵖ
theorem MulOpposite.op_zero E0 #
∀ {α : Type u_1} [inst : Zero α], MulOpposite.op 0 = 0
theorem MulOpposite.unop_zero E0 #
∀ {α : Type u_1} [inst : Zero α], MulOpposite.unop 0 = 0
theorem MulOpposite.op_one E0 #
∀ {α : Type u_1} [inst : One α], MulOpposite.op 1 = 1
theorem AddOpposite.op_zero E0 #
∀ {α : Type u_1} [inst : Zero α], AddOpposite.op 0 = 0
theorem MulOpposite.unop_one E0 #
∀ {α : Type u_1} [inst : One α], MulOpposite.unop 1 = 1
theorem AddOpposite.unop_zero E0 #
∀ {α : Type u_1} [inst : Zero α], AddOpposite.unop 0 = 0
theorem MulOpposite.op_add E0 #
∀ {α : Type u_1} [inst : Add α] (x y : α), MulOpposite.op (x + y) = MulOpposite.op x + MulOpposite.op y
theorem MulOpposite.unop_add E0 #
∀ {α : Type u_1} [inst : Add α] (x y : αᵐᵒᵖ), MulOpposite.unop (x + y) = MulOpposite.unop x + MulOpposite.unop y
theorem MulOpposite.op_neg E0 #
∀ {α : Type u_1} [inst : Neg α] (x : α), MulOpposite.op (-x) = -MulOpposite.op x
theorem MulOpposite.unop_neg E0 #
∀ {α : Type u_1} [inst : Neg α] (x : αᵐᵒᵖ), MulOpposite.unop (-x) = -MulOpposite.unop x
theorem AddOpposite.op_add E0 #
∀ {α : Type u_1} [inst : Add α] (x y : α), AddOpposite.op (x + y) = AddOpposite.op y + AddOpposite.op x
theorem MulOpposite.op_mul E0 #
∀ {α : Type u_1} [inst : Mul α] (x y : α), MulOpposite.op (x * y) = MulOpposite.op y * MulOpposite.op x
theorem MulOpposite.unop_mul E0 #
∀ {α : Type u_1} [inst : Mul α] (x y : αᵐᵒᵖ), MulOpposite.unop (x * y) = MulOpposite.unop y * MulOpposite.unop x
theorem AddOpposite.unop_add E0 #
∀ {α : Type u_1} [inst : Add α] (x y : αᵃᵒᵖ), AddOpposite.unop (x + y) = AddOpposite.unop y + AddOpposite.unop x
theorem AddOpposite.op_neg E0 #
∀ {α : Type u_1} [inst : Neg α] (x : α), AddOpposite.op (-x) = -AddOpposite.op x
theorem MulOpposite.op_inv E0 #
∀ {α : Type u_1} [inst : Inv α] (x : α), MulOpposite.op x⁻¹ = (MulOpposite.op x)⁻¹
theorem MulOpposite.unop_inv E0 #
∀ {α : Type u_1} [inst : Inv α] (x : αᵐᵒᵖ), MulOpposite.unop x⁻¹ = (MulOpposite.unop x)⁻¹
theorem AddOpposite.unop_neg E0 #
∀ {α : Type u_1} [inst : Neg α] (x : αᵃᵒᵖ), AddOpposite.unop (-x) = -AddOpposite.unop x
theorem MulOpposite.op_sub E0 #
∀ {α : Type u_1} [inst : Sub α] (x y : α), MulOpposite.op (x - y) = MulOpposite.op x - MulOpposite.op y
theorem MulOpposite.unop_sub E0 #
∀ {α : Type u_1} [inst : Sub α] (x y : αᵐᵒᵖ), MulOpposite.unop (x - y) = MulOpposite.unop x - MulOpposite.unop y
theorem AddOpposite.op_vadd E0 #
∀ {α : Type u_1} {β : Type u_2} [inst : VAdd α β] (a : α) (b : β), AddOpposite.op (a +ᵥ b) = a +ᵥ AddOpposite.op b
theorem MulOpposite.op_smul E0 #
∀ {α : Type u_1} {β : Type u_2} [inst : SMul α β] (a : α) (b : β), MulOpposite.op (a • b) = a • MulOpposite.op b
theorem MulOpposite.unop_smul E0 #
∀ {α : Type u_1} {β : Type u_2} [inst : SMul α β] (a : α) (b : βᵐᵒᵖ), MulOpposite.unop (a • b) = a • MulOpposite.unop b
theorem AddOpposite.unop_vadd E0 #
∀ {α : Type u_1} {β : Type u_2} [inst : VAdd α β] (a : α) (b : βᵃᵒᵖ),
AddOpposite.unop (a +ᵥ b) = a +ᵥ AddOpposite.unop b
theorem MulOpposite.unop_eq_zero_iff E0 #
∀ {α : Type u_1} [inst : Zero α] (a : αᵐᵒᵖ), MulOpposite.unop a = 0 ↔ a = 0
theorem MulOpposite.op_eq_zero_iff E0 #
∀ {α : Type u_1} [inst : Zero α] (a : α), MulOpposite.op a = 0 ↔ a = 0
theorem MulOpposite.unop_ne_zero_iff E0 #
∀ {α : Type u_1} [inst : Zero α] (a : αᵐᵒᵖ), MulOpposite.unop a ≠ 0 ↔ a ≠ 0
theorem MulOpposite.op_ne_zero_iff E0 #
∀ {α : Type u_1} [inst : Zero α] (a : α), MulOpposite.op a ≠ 0 ↔ a ≠ 0
theorem AddOpposite.unop_eq_zero_iff E0 #
∀ {α : Type u_1} [inst : Zero α] (a : αᵃᵒᵖ), AddOpposite.unop a = 0 ↔ a = 0
theorem MulOpposite.unop_eq_one_iff E0 #
∀ {α : Type u_1} [inst : One α] (a : αᵐᵒᵖ), MulOpposite.unop a = 1 ↔ a = 1
theorem MulOpposite.op_eq_one_iff E0 #
∀ {α : Type u_1} [inst : One α] (a : α), MulOpposite.op a = 1 ↔ a = 1
theorem AddOpposite.op_eq_zero_iff E0 #
∀ {α : Type u_1} [inst : Zero α] (a : α), AddOpposite.op a = 0 ↔ a = 0
instance AddOpposite.instOne E0 #
{α : Type u_1} → [One α] → One αᵃᵒᵖ
theorem AddOpposite.op_one E0 #
∀ {α : Type u_1} [inst : One α], AddOpposite.op 1 = 1
theorem AddOpposite.unop_one E0 #
∀ {α : Type u_1} [inst : One α], AddOpposite.unop 1 = 1
theorem AddOpposite.op_eq_one_iff E0 #
∀ {α : Type u_1} [inst : One α] {a : α}, AddOpposite.op a = 1 ↔ a = 1
theorem AddOpposite.unop_eq_one_iff E0 #
∀ {α : Type u_1} [inst : One α] {a : αᵃᵒᵖ}, AddOpposite.unop a = 1 ↔ a = 1
instance AddOpposite.instMul E0 #
{α : Type u_1} → [Mul α] → Mul αᵃᵒᵖ
theorem AddOpposite.op_mul E0 #
∀ {α : Type u_1} [inst : Mul α] (a b : α), AddOpposite.op (a * b) = AddOpposite.op a * AddOpposite.op b
theorem AddOpposite.unop_mul E0 #
∀ {α : Type u_1} [inst : Mul α] (a b : αᵃᵒᵖ), AddOpposite.unop (a * b) = AddOpposite.unop a * AddOpposite.unop b
instance AddOpposite.instInv E0 #
{α : Type u_1} → [Inv α] → Inv αᵃᵒᵖ
instance AddOpposite.instInvolutiveInv E0 #
{α : Type u_1} → [InvolutiveInv α] → InvolutiveInv αᵃᵒᵖ
theorem AddOpposite.op_inv E0 #
∀ {α : Type u_1} [inst : Inv α] (a : α), AddOpposite.op a⁻¹ = (AddOpposite.op a)⁻¹
theorem AddOpposite.unop_inv E0 #
∀ {α : Type u_1} [inst : Inv α] (a : αᵃᵒᵖ), AddOpposite.unop a⁻¹ = (AddOpposite.unop a)⁻¹
instance AddOpposite.instDiv E0 #
{α : Type u_1} → [Div α] → Div αᵃᵒᵖ
theorem AddOpposite.op_div E0 #
∀ {α : Type u_1} [inst : Div α] (a b : α), AddOpposite.op (a / b) = AddOpposite.op a / AddOpposite.op b
theorem AddOpposite.unop_div E0 #
∀ {α : Type u_1} [inst : Div α] (a b : αᵃᵒᵖ), AddOpposite.unop (a / b) = AddOpposite.unop a / AddOpposite.unop b