fact
stringlengths
6
3.84k
type
stringclasses
11 values
library
stringclasses
32 values
imports
listlengths
1
14
filename
stringlengths
20
95
symbolic_name
stringlengths
1
90
docstring
stringlengths
7
20k
mk_univ_quaternion : #(Set.univ : Set ℍ[R]) = #R ^ 4 := mk_univ_quaternionAlgebra _ _ _
theorem
Algebra
[ "Mathlib.Algebra.Star.SelfAdjoint", "Mathlib.LinearAlgebra.Dimension.StrongRankCondition", "Mathlib.LinearAlgebra.FreeModule.Finite.Basic" ]
Mathlib/Algebra/Quaternion.lean
mk_univ_quaternion
The cardinality of the quaternions, as a set.
mk_univ_quaternion_of_infinite [Infinite R] : #(Set.univ : Set ℍ[R]) = #R := mk_univ_quaternionAlgebra_of_infinite _ _ _
theorem
Algebra
[ "Mathlib.Algebra.Star.SelfAdjoint", "Mathlib.LinearAlgebra.Dimension.StrongRankCondition", "Mathlib.LinearAlgebra.FreeModule.Finite.Basic" ]
Mathlib/Algebra/Quaternion.lean
mk_univ_quaternion_of_infinite
null
Basis {R : Type*} (A : Type*) [CommRing R] [Ring A] [Algebra R A] (c₁ c₂ c₃ : R) where /-- The first imaginary unit -/ i : A /-- The second imaginary unit -/ j : A /-- The third imaginary unit -/ k : A i_mul_i : i * i = c₁ • (1 : A) + c₂ • i j_mul_j : j * j = c₃ • (1 : A) i_mul_j : i * j = k j_mul_i : j * i = c₂ • j - k initialize_simps_projections Basis (as_prefix i, as_prefix j, as_prefix k) variable {R : Type*} {A B : Type*} [CommRing R] [Ring A] [Ring B] [Algebra R A] [Algebra R B] variable {c₁ c₂ c₃ : R}
structure
Algebra
[ "Mathlib.Algebra.Algebra.Subalgebra.Lattice", "Mathlib.Algebra.Quaternion", "Mathlib.Tactic.Ring" ]
Mathlib/Algebra/QuaternionBasis.lean
Basis
A quaternion basis contains the information both sufficient and necessary to construct an `R`-algebra homomorphism from `ℍ[R,c₁,c₂,c₃]` to `A`; or equivalently, a surjective `R`-algebra homomorphism from `ℍ[R,c₁,c₂,c₃]` to an `R`-subalgebra of `A`. Note that for definitional convenience, `k` is provided as a field even though `i_mul_j` fully determines it.
@[ext] protected ext ⦃q₁ q₂ : Basis A c₁ c₂ c₃⦄ (hi : q₁.i = q₂.i) (hj : q₁.j = q₂.j) : q₁ = q₂ := by cases q₁; cases q₂; grind variable (R) in
theorem
Algebra
[ "Mathlib.Algebra.Algebra.Subalgebra.Lattice", "Mathlib.Algebra.Quaternion", "Mathlib.Tactic.Ring" ]
Mathlib/Algebra/QuaternionBasis.lean
ext
Since `k` is redundant, it is not necessary to show `q₁.k = q₂.k` when showing `q₁ = q₂`.
@[simps i j k] protected self : Basis ℍ[R,c₁,c₂,c₃] c₁ c₂ c₃ where i := ⟨0, 1, 0, 0⟩ i_mul_i := by ext <;> simp j := ⟨0, 0, 1, 0⟩ j_mul_j := by ext <;> simp k := ⟨0, 0, 0, 1⟩ i_mul_j := by ext <;> simp j_mul_i := by ext <;> simp
def
Algebra
[ "Mathlib.Algebra.Algebra.Subalgebra.Lattice", "Mathlib.Algebra.Quaternion", "Mathlib.Tactic.Ring" ]
Mathlib/Algebra/QuaternionBasis.lean
self
There is a natural quaternionic basis for the `QuaternionAlgebra`.
@[simp] i_mul_k : q.i * q.k = c₁ • q.j + c₂ • q.k := by rw [← i_mul_j, ← mul_assoc, i_mul_i, add_mul, smul_mul_assoc, one_mul, smul_mul_assoc] @[simp]
theorem
Algebra
[ "Mathlib.Algebra.Algebra.Subalgebra.Lattice", "Mathlib.Algebra.Quaternion", "Mathlib.Tactic.Ring" ]
Mathlib/Algebra/QuaternionBasis.lean
i_mul_k
null
k_mul_i : q.k * q.i = -c₁ • q.j := by rw [← i_mul_j, mul_assoc, j_mul_i, mul_sub, i_mul_k, neg_smul, mul_smul_comm, i_mul_j] linear_combination (norm := module) @[simp]
theorem
Algebra
[ "Mathlib.Algebra.Algebra.Subalgebra.Lattice", "Mathlib.Algebra.Quaternion", "Mathlib.Tactic.Ring" ]
Mathlib/Algebra/QuaternionBasis.lean
k_mul_i
null
k_mul_j : q.k * q.j = c₃ • q.i := by rw [← i_mul_j, mul_assoc, j_mul_j, mul_smul_comm, mul_one] @[simp]
theorem
Algebra
[ "Mathlib.Algebra.Algebra.Subalgebra.Lattice", "Mathlib.Algebra.Quaternion", "Mathlib.Tactic.Ring" ]
Mathlib/Algebra/QuaternionBasis.lean
k_mul_j
null
j_mul_k : q.j * q.k = (c₂ * c₃) • 1 - c₃ • q.i := by rw [← i_mul_j, ← mul_assoc, j_mul_i, sub_mul, smul_mul_assoc, j_mul_j, ← smul_assoc, k_mul_j] rfl @[simp]
theorem
Algebra
[ "Mathlib.Algebra.Algebra.Subalgebra.Lattice", "Mathlib.Algebra.Quaternion", "Mathlib.Tactic.Ring" ]
Mathlib/Algebra/QuaternionBasis.lean
j_mul_k
null
k_mul_k : q.k * q.k = -((c₁ * c₃) • (1 : A)) := by rw [← i_mul_j, mul_assoc, ← mul_assoc q.j _ _, j_mul_i, ← i_mul_j, ← mul_assoc, mul_sub, ← mul_assoc, i_mul_i, add_mul, smul_mul_assoc, one_mul, sub_mul, smul_mul_assoc, mul_smul_comm, smul_mul_assoc, mul_assoc, j_mul_j, add_mul, smul_mul_assoc, j_mul_j, smul_smul, smul_mul_assoc, mul_assoc, j_mul_j] linear_combination (norm := module)
theorem
Algebra
[ "Mathlib.Algebra.Algebra.Subalgebra.Lattice", "Mathlib.Algebra.Quaternion", "Mathlib.Tactic.Ring" ]
Mathlib/Algebra/QuaternionBasis.lean
k_mul_k
null
lift (x : ℍ[R,c₁,c₂,c₃]) : A := algebraMap R _ x.re + x.imI • q.i + x.imJ • q.j + x.imK • q.k
def
Algebra
[ "Mathlib.Algebra.Algebra.Subalgebra.Lattice", "Mathlib.Algebra.Quaternion", "Mathlib.Tactic.Ring" ]
Mathlib/Algebra/QuaternionBasis.lean
lift
Intermediate result used to define `QuaternionAlgebra.Basis.liftHom`.
lift_zero : q.lift (0 : ℍ[R,c₁,c₂,c₃]) = 0 := by simp [lift]
theorem
Algebra
[ "Mathlib.Algebra.Algebra.Subalgebra.Lattice", "Mathlib.Algebra.Quaternion", "Mathlib.Tactic.Ring" ]
Mathlib/Algebra/QuaternionBasis.lean
lift_zero
null
lift_one : q.lift (1 : ℍ[R,c₁,c₂,c₃]) = 1 := by simp [lift]
theorem
Algebra
[ "Mathlib.Algebra.Algebra.Subalgebra.Lattice", "Mathlib.Algebra.Quaternion", "Mathlib.Tactic.Ring" ]
Mathlib/Algebra/QuaternionBasis.lean
lift_one
null
lift_add (x y : ℍ[R,c₁,c₂,c₃]) : q.lift (x + y) = q.lift x + q.lift y := by simp only [lift, re_add, map_add, imI_add, add_smul, imJ_add, imK_add] abel
theorem
Algebra
[ "Mathlib.Algebra.Algebra.Subalgebra.Lattice", "Mathlib.Algebra.Quaternion", "Mathlib.Tactic.Ring" ]
Mathlib/Algebra/QuaternionBasis.lean
lift_add
null
lift_mul (x y : ℍ[R,c₁,c₂,c₃]) : q.lift (x * y) = q.lift x * q.lift y := by simp only [lift, Algebra.algebraMap_eq_smul_one] simp_rw [add_mul, mul_add, smul_mul_assoc, mul_smul_comm, one_mul, mul_one, smul_smul] simp only [i_mul_i, j_mul_j, i_mul_j, j_mul_i, i_mul_k, k_mul_i, k_mul_j, j_mul_k, k_mul_k] simp only [smul_smul, smul_neg, sub_eq_add_neg, ← add_assoc, neg_smul] simp only [mul_right_comm _ _ (c₁ * c₃), mul_comm _ (c₁ * c₃)] simp only [mul_comm _ c₁] simp only [mul_right_comm _ _ c₃] simp only [← mul_assoc] simp only [re_mul, sub_eq_add_neg, add_smul, neg_smul, imI_mul, ← add_assoc, imJ_mul, imK_mul] linear_combination (norm := module)
theorem
Algebra
[ "Mathlib.Algebra.Algebra.Subalgebra.Lattice", "Mathlib.Algebra.Quaternion", "Mathlib.Tactic.Ring" ]
Mathlib/Algebra/QuaternionBasis.lean
lift_mul
null
lift_smul (r : R) (x : ℍ[R,c₁,c₂,c₃]) : q.lift (r • x) = r • q.lift x := by simp [lift, mul_smul, ← Algebra.smul_def]
theorem
Algebra
[ "Mathlib.Algebra.Algebra.Subalgebra.Lattice", "Mathlib.Algebra.Quaternion", "Mathlib.Tactic.Ring" ]
Mathlib/Algebra/QuaternionBasis.lean
lift_smul
null
@[simps!] liftHom : ℍ[R,c₁,c₂,c₃] →ₐ[R] A := AlgHom.mk' { toFun := q.lift map_zero' := q.lift_zero map_one' := q.lift_one map_add' := q.lift_add map_mul' := q.lift_mul } q.lift_smul @[simp]
def
Algebra
[ "Mathlib.Algebra.Algebra.Subalgebra.Lattice", "Mathlib.Algebra.Quaternion", "Mathlib.Tactic.Ring" ]
Mathlib/Algebra/QuaternionBasis.lean
liftHom
A `QuaternionAlgebra.Basis` implies an `AlgHom` from the quaternions.
range_liftHom (B : Basis A c₁ c₂ c₃) : (liftHom B).range = Algebra.adjoin R {B.i, B.j, B.k} := by apply le_antisymm · rintro x ⟨y, rfl⟩ refine add_mem (add_mem (add_mem ?_ ?_) ?_) ?_ · exact algebraMap_mem _ _ all_goals exact Subalgebra.smul_mem _ (Algebra.subset_adjoin <| by simp) _ · rw [Algebra.adjoin_le_iff] rintro x (rfl | rfl | rfl) <;> [use (Basis.self R).i; use (Basis.self R).j; use (Basis.self R).k] all_goals simp [lift]
theorem
Algebra
[ "Mathlib.Algebra.Algebra.Subalgebra.Lattice", "Mathlib.Algebra.Quaternion", "Mathlib.Tactic.Ring" ]
Mathlib/Algebra/QuaternionBasis.lean
range_liftHom
null
@[simps i j k] compHom (F : A →ₐ[R] B) : Basis B c₁ c₂ c₃ where i := F q.i i_mul_i := by rw [← map_mul, q.i_mul_i, map_add, map_smul, map_smul, map_one] j := F q.j j_mul_j := by rw [← map_mul, q.j_mul_j, map_smul, map_one] k := F q.k i_mul_j := by rw [← map_mul, q.i_mul_j] j_mul_i := by rw [← map_mul, q.j_mul_i, map_sub, map_smul]
def
Algebra
[ "Mathlib.Algebra.Algebra.Subalgebra.Lattice", "Mathlib.Algebra.Quaternion", "Mathlib.Tactic.Ring" ]
Mathlib/Algebra/QuaternionBasis.lean
compHom
Transform a `QuaternionAlgebra.Basis` through an `AlgHom`.
@[simps] lift : Basis A c₁ c₂ c₃ ≃ (ℍ[R,c₁,c₂,c₃] →ₐ[R] A) where toFun := Basis.liftHom invFun := (Basis.self R).compHom left_inv q := by ext <;> simp [Basis.lift] right_inv F := by ext dsimp [Basis.lift] rw [← F.commutes] simp only [← map_smul, ← map_add, mk_add_mk, smul_mk, smul_zero, algebraMap_eq] congr <;> simp
def
Algebra
[ "Mathlib.Algebra.Algebra.Subalgebra.Lattice", "Mathlib.Algebra.Quaternion", "Mathlib.Tactic.Ring" ]
Mathlib/Algebra/QuaternionBasis.lean
lift
A quaternionic basis on `A` is equivalent to a map from the quaternion algebra to `A`.
@[ext] hom_ext ⦃f g : ℍ[R,c₁,c₂,c₃] →ₐ[R] A⦄ (hi : f (Basis.self R).i = g (Basis.self R).i) (hj : f (Basis.self R).j = g (Basis.self R).j) : f = g := lift.symm.injective <| Basis.ext hi hj
theorem
Algebra
[ "Mathlib.Algebra.Algebra.Subalgebra.Lattice", "Mathlib.Algebra.Quaternion", "Mathlib.Tactic.Ring" ]
Mathlib/Algebra/QuaternionBasis.lean
hom_ext
Two `R`-algebra morphisms from a quaternion algebra are equal if they agree on `i` and `j`.
@[ext] hom_ext ⦃f g : ℍ[R] →ₐ[R] A⦄ (hi : f (Basis.self R).i = g (Basis.self R).i) (hj : f (Basis.self R).j = g (Basis.self R).j) : f = g := QuaternionAlgebra.hom_ext hi hj
theorem
Algebra
[ "Mathlib.Algebra.Algebra.Subalgebra.Lattice", "Mathlib.Algebra.Quaternion", "Mathlib.Tactic.Ring" ]
Mathlib/Algebra/QuaternionBasis.lean
hom_ext
Two `R`-algebra morphisms from the quaternions are equal if they agree on `i` and `j`.
HasQuotient (A : outParam <| Type u) (B : Type v) where /-- auxiliary quotient function, the one used will have `A` explicit -/ quotient' : B → Type max u v
class
Algebra
[ "Mathlib.Tactic.Common" ]
Mathlib/Algebra/Quotient.lean
HasQuotient
`HasQuotient A B` is a notation typeclass that allows us to write `A ⧸ b` for `b : B`. This allows the usual notation for quotients of algebraic structures, such as groups, modules and rings. `A` is a parameter, despite being unused in the definition below, so it appears in the notation.
HasQuotient.Quotient (A : outParam <| Type u) {B : Type v} [HasQuotient A B] (b : B) : Type max u v := HasQuotient.quotient' b
abbrev
Algebra
[ "Mathlib.Tactic.Common" ]
Mathlib/Algebra/Quotient.lean
HasQuotient.Quotient
`HasQuotient.Quotient A b` (denoted as `A ⧸ b`) is the quotient of the type `A` by `b`. This differs from `HasQuotient.quotient'` in that the `A` argument is explicit, which is necessary to make Lean show the notation in the goal state.
@[simp, norm_cast] coe_algebraMap (c : RingCon A) (s : S) : (algebraMap S A s : c.Quotient) = algebraMap S _ s := rfl
theorem
Algebra
[ "Mathlib.Algebra.Algebra.Hom", "Mathlib.RingTheory.Congruence.Basic", "Mathlib.RingTheory.Ideal.Quotient.Defs", "Mathlib.RingTheory.Ideal.Span" ]
Mathlib/Algebra/RingQuot.lean
coe_algebraMap
null
Rel (r : R → R → Prop) : R → R → Prop | of ⦃x y : R⦄ (h : r x y) : Rel r x y | add_left ⦃a b c⦄ : Rel r a b → Rel r (a + c) (b + c) | mul_left ⦃a b c⦄ : Rel r a b → Rel r (a * c) (b * c) | mul_right ⦃a b c⦄ : Rel r b c → Rel r (a * b) (a * c)
inductive
Algebra
[ "Mathlib.Algebra.Algebra.Hom", "Mathlib.RingTheory.Congruence.Basic", "Mathlib.RingTheory.Ideal.Quotient.Defs", "Mathlib.RingTheory.Ideal.Span" ]
Mathlib/Algebra/RingQuot.lean
Rel
Given an arbitrary relation `r` on a ring, we strengthen it to a relation `Rel r`, such that the equivalence relation generated by `Rel r` has `x ~ y` if and only if `x - y` is in the ideal generated by elements `a - b` such that `r a b`.
Rel.add_right {r : R → R → Prop} ⦃a b c : R⦄ (h : Rel r b c) : Rel r (a + b) (a + c) := by rw [add_comm a b, add_comm a c] exact Rel.add_left h
theorem
Algebra
[ "Mathlib.Algebra.Algebra.Hom", "Mathlib.RingTheory.Congruence.Basic", "Mathlib.RingTheory.Ideal.Quotient.Defs", "Mathlib.RingTheory.Ideal.Span" ]
Mathlib/Algebra/RingQuot.lean
Rel.add_right
null
Rel.neg {R : Type uR} [Ring R] {r : R → R → Prop} ⦃a b : R⦄ (h : Rel r a b) : Rel r (-a) (-b) := by simp only [neg_eq_neg_one_mul a, neg_eq_neg_one_mul b, Rel.mul_right h]
theorem
Algebra
[ "Mathlib.Algebra.Algebra.Hom", "Mathlib.RingTheory.Congruence.Basic", "Mathlib.RingTheory.Ideal.Quotient.Defs", "Mathlib.RingTheory.Ideal.Span" ]
Mathlib/Algebra/RingQuot.lean
Rel.neg
null
Rel.sub_left {R : Type uR} [Ring R] {r : R → R → Prop} ⦃a b c : R⦄ (h : Rel r a b) : Rel r (a - c) (b - c) := by simp only [sub_eq_add_neg, h.add_left]
theorem
Algebra
[ "Mathlib.Algebra.Algebra.Hom", "Mathlib.RingTheory.Congruence.Basic", "Mathlib.RingTheory.Ideal.Quotient.Defs", "Mathlib.RingTheory.Ideal.Span" ]
Mathlib/Algebra/RingQuot.lean
Rel.sub_left
null
Rel.sub_right {R : Type uR} [Ring R] {r : R → R → Prop} ⦃a b c : R⦄ (h : Rel r b c) : Rel r (a - b) (a - c) := by simp only [sub_eq_add_neg, h.neg.add_right]
theorem
Algebra
[ "Mathlib.Algebra.Algebra.Hom", "Mathlib.RingTheory.Congruence.Basic", "Mathlib.RingTheory.Ideal.Quotient.Defs", "Mathlib.RingTheory.Ideal.Span" ]
Mathlib/Algebra/RingQuot.lean
Rel.sub_right
null
Rel.smul {r : A → A → Prop} (k : S) ⦃a b : A⦄ (h : Rel r a b) : Rel r (k • a) (k • b) := by simp only [Algebra.smul_def, Rel.mul_right h]
theorem
Algebra
[ "Mathlib.Algebra.Algebra.Hom", "Mathlib.RingTheory.Congruence.Basic", "Mathlib.RingTheory.Ideal.Quotient.Defs", "Mathlib.RingTheory.Ideal.Span" ]
Mathlib/Algebra/RingQuot.lean
Rel.smul
null
ringCon (r : R → R → Prop) : RingCon R where r := Relation.EqvGen (Rel r) iseqv := Relation.EqvGen.is_equivalence _ add' {a b c d} hab hcd := by induction hab generalizing c d with | rel _ _ hab => refine (Relation.EqvGen.rel _ _ hab.add_left).trans _ _ _ ?_ induction hcd with | rel _ _ hcd => exact Relation.EqvGen.rel _ _ hcd.add_right | refl => exact Relation.EqvGen.refl _ | symm _ _ _ h => exact h.symm _ _ | trans _ _ _ _ _ h h' => exact h.trans _ _ _ h' | refl => induction hcd with | rel _ _ hcd => exact Relation.EqvGen.rel _ _ hcd.add_right | refl => exact Relation.EqvGen.refl _ | symm _ _ _ h => exact h.symm _ _ | trans _ _ _ _ _ h h' => exact h.trans _ _ _ h' | symm x y _ hxy => exact (hxy hcd.symm).symm | trans x y z _ _ h h' => exact (h hcd).trans _ _ _ (h' <| Relation.EqvGen.refl _) mul' {a b c d} hab hcd := by induction hab generalizing c d with | rel _ _ hab => refine (Relation.EqvGen.rel _ _ hab.mul_left).trans _ _ _ ?_ induction hcd with | rel _ _ hcd => exact Relation.EqvGen.rel _ _ hcd.mul_right | refl => exact Relation.EqvGen.refl _ | symm _ _ _ h => exact h.symm _ _ | trans _ _ _ _ _ h h' => exact h.trans _ _ _ h' | refl => induction hcd with | rel _ _ hcd => exact Relation.EqvGen.rel _ _ hcd.mul_right | refl => exact Relation.EqvGen.refl _ | symm _ _ _ h => exact h.symm _ _ | trans _ _ _ _ _ h h' => exact h.trans _ _ _ h' | symm x y _ hxy => exact (hxy hcd.symm).symm | trans x y z _ _ h h' => exact (h hcd).trans _ _ _ (h' <| Relation.EqvGen.refl _)
def
Algebra
[ "Mathlib.Algebra.Algebra.Hom", "Mathlib.RingTheory.Congruence.Basic", "Mathlib.RingTheory.Ideal.Quotient.Defs", "Mathlib.RingTheory.Ideal.Span" ]
Mathlib/Algebra/RingQuot.lean
ringCon
`EqvGen (RingQuot.Rel r)` is a ring congruence.
eqvGen_rel_eq (r : R → R → Prop) : Relation.EqvGen (Rel r) = RingConGen.Rel r := by ext x₁ x₂ constructor · intro h induction h with | rel _ _ h => induction h with | of => exact RingConGen.Rel.of _ _ ‹_› | add_left _ h => exact h.add (RingConGen.Rel.refl _) | mul_left _ h => exact h.mul (RingConGen.Rel.refl _) | mul_right _ h => exact (RingConGen.Rel.refl _).mul h | refl => exact RingConGen.Rel.refl _ | symm => exact RingConGen.Rel.symm ‹_› | trans => exact RingConGen.Rel.trans ‹_› ‹_› · intro h induction h with | of => exact Relation.EqvGen.rel _ _ (Rel.of ‹_›) | refl => exact (RingQuot.ringCon r).refl _ | symm => exact (RingQuot.ringCon r).symm ‹_› | trans => exact (RingQuot.ringCon r).trans ‹_› ‹_› | add => exact (RingQuot.ringCon r).add ‹_› ‹_› | mul => exact (RingQuot.ringCon r).mul ‹_› ‹_›
theorem
Algebra
[ "Mathlib.Algebra.Algebra.Hom", "Mathlib.RingTheory.Congruence.Basic", "Mathlib.RingTheory.Ideal.Quotient.Defs", "Mathlib.RingTheory.Ideal.Span" ]
Mathlib/Algebra/RingQuot.lean
eqvGen_rel_eq
null
RingQuot (r : R → R → Prop) where toQuot : Quot (RingQuot.Rel r)
structure
Algebra
[ "Mathlib.Algebra.Algebra.Hom", "Mathlib.RingTheory.Congruence.Basic", "Mathlib.RingTheory.Ideal.Quotient.Defs", "Mathlib.RingTheory.Ideal.Span" ]
Mathlib/Algebra/RingQuot.lean
RingQuot
The quotient of a ring by an arbitrary relation.
private natCast (n : ℕ) : RingQuot r := ⟨Quot.mk _ n⟩ private irreducible_def zero : RingQuot r := ⟨Quot.mk _ 0⟩ private irreducible_def one : RingQuot r := ⟨Quot.mk _ 1⟩ private irreducible_def add : RingQuot r → RingQuot r → RingQuot r | ⟨a⟩, ⟨b⟩ => ⟨Quot.map₂ (· + ·) Rel.add_right Rel.add_left a b⟩ private irreducible_def mul : RingQuot r → RingQuot r → RingQuot r | ⟨a⟩, ⟨b⟩ => ⟨Quot.map₂ (· * ·) Rel.mul_right Rel.mul_left a b⟩ private irreducible_def neg {R : Type uR} [Ring R] (r : R → R → Prop) : RingQuot r → RingQuot r | ⟨a⟩ => ⟨Quot.map (fun a ↦ -a) Rel.neg a⟩ private irreducible_def sub {R : Type uR} [Ring R] (r : R → R → Prop) : RingQuot r → RingQuot r → RingQuot r | ⟨a⟩, ⟨b⟩ => ⟨Quot.map₂ Sub.sub Rel.sub_right Rel.sub_left a b⟩ private irreducible_def npow (n : ℕ) : RingQuot r → RingQuot r | ⟨a⟩ => ⟨Quot.lift (fun a ↦ Quot.mk (RingQuot.Rel r) (a ^ n)) (fun a b (h : Rel r a b) ↦ by dsimp only induction n with | zero => rw [pow_zero, pow_zero] | succ n ih => simpa only [pow_succ, mul_def, Quot.map₂_mk, mk.injEq] using congr_arg₂ (fun x y ↦ mul r ⟨x⟩ ⟨y⟩) ih (Quot.sound h)) a⟩
def
Algebra
[ "Mathlib.Algebra.Algebra.Hom", "Mathlib.RingTheory.Congruence.Basic", "Mathlib.RingTheory.Ideal.Quotient.Defs", "Mathlib.RingTheory.Ideal.Span" ]
Mathlib/Algebra/RingQuot.lean
natCast
null
private smul [Algebra S R] (n : S) : RingQuot r → RingQuot r | ⟨a⟩ => ⟨Quot.map (fun a ↦ n • a) (Rel.smul n) a⟩
def
Algebra
[ "Mathlib.Algebra.Algebra.Hom", "Mathlib.RingTheory.Congruence.Basic", "Mathlib.RingTheory.Ideal.Quotient.Defs", "Mathlib.RingTheory.Ideal.Span" ]
Mathlib/Algebra/RingQuot.lean
smul
null
zero_quot : (⟨Quot.mk _ 0⟩ : RingQuot r) = 0 := show _ = zero r by rw [zero_def]
theorem
Algebra
[ "Mathlib.Algebra.Algebra.Hom", "Mathlib.RingTheory.Congruence.Basic", "Mathlib.RingTheory.Ideal.Quotient.Defs", "Mathlib.RingTheory.Ideal.Span" ]
Mathlib/Algebra/RingQuot.lean
zero_quot
null
one_quot : (⟨Quot.mk _ 1⟩ : RingQuot r) = 1 := show _ = one r by rw [one_def]
theorem
Algebra
[ "Mathlib.Algebra.Algebra.Hom", "Mathlib.RingTheory.Congruence.Basic", "Mathlib.RingTheory.Ideal.Quotient.Defs", "Mathlib.RingTheory.Ideal.Span" ]
Mathlib/Algebra/RingQuot.lean
one_quot
null
add_quot {a b} : (⟨Quot.mk _ a⟩ + ⟨Quot.mk _ b⟩ : RingQuot r) = ⟨Quot.mk _ (a + b)⟩ := by change add r _ _ = _ rw [add_def] rfl
theorem
Algebra
[ "Mathlib.Algebra.Algebra.Hom", "Mathlib.RingTheory.Congruence.Basic", "Mathlib.RingTheory.Ideal.Quotient.Defs", "Mathlib.RingTheory.Ideal.Span" ]
Mathlib/Algebra/RingQuot.lean
add_quot
null
mul_quot {a b} : (⟨Quot.mk _ a⟩ * ⟨Quot.mk _ b⟩ : RingQuot r) = ⟨Quot.mk _ (a * b)⟩ := by change mul r _ _ = _ rw [mul_def] rfl
theorem
Algebra
[ "Mathlib.Algebra.Algebra.Hom", "Mathlib.RingTheory.Congruence.Basic", "Mathlib.RingTheory.Ideal.Quotient.Defs", "Mathlib.RingTheory.Ideal.Span" ]
Mathlib/Algebra/RingQuot.lean
mul_quot
null
pow_quot {a} {n : ℕ} : (⟨Quot.mk _ a⟩ ^ n : RingQuot r) = ⟨Quot.mk _ (a ^ n)⟩ := by change npow r _ _ = _ rw [npow_def]
theorem
Algebra
[ "Mathlib.Algebra.Algebra.Hom", "Mathlib.RingTheory.Congruence.Basic", "Mathlib.RingTheory.Ideal.Quotient.Defs", "Mathlib.RingTheory.Ideal.Span" ]
Mathlib/Algebra/RingQuot.lean
pow_quot
null
neg_quot {R : Type uR} [Ring R] (r : R → R → Prop) {a} : (-⟨Quot.mk _ a⟩ : RingQuot r) = ⟨Quot.mk _ (-a)⟩ := by change neg r _ = _ rw [neg_def] rfl
theorem
Algebra
[ "Mathlib.Algebra.Algebra.Hom", "Mathlib.RingTheory.Congruence.Basic", "Mathlib.RingTheory.Ideal.Quotient.Defs", "Mathlib.RingTheory.Ideal.Span" ]
Mathlib/Algebra/RingQuot.lean
neg_quot
null
sub_quot {R : Type uR} [Ring R] (r : R → R → Prop) {a b} : (⟨Quot.mk _ a⟩ - ⟨Quot.mk _ b⟩ : RingQuot r) = ⟨Quot.mk _ (a - b)⟩ := by change sub r _ _ = _ rw [sub_def] rfl
theorem
Algebra
[ "Mathlib.Algebra.Algebra.Hom", "Mathlib.RingTheory.Congruence.Basic", "Mathlib.RingTheory.Ideal.Quotient.Defs", "Mathlib.RingTheory.Ideal.Span" ]
Mathlib/Algebra/RingQuot.lean
sub_quot
null
smul_quot [Algebra S R] {n : S} {a : R} : (n • ⟨Quot.mk _ a⟩ : RingQuot r) = ⟨Quot.mk _ (n • a)⟩ := by rfl
theorem
Algebra
[ "Mathlib.Algebra.Algebra.Hom", "Mathlib.RingTheory.Congruence.Basic", "Mathlib.RingTheory.Ideal.Quotient.Defs", "Mathlib.RingTheory.Ideal.Span" ]
Mathlib/Algebra/RingQuot.lean
smul_quot
null
instIsScalarTower [CommSemiring T] [SMul S T] [Algebra S R] [Algebra T R] [IsScalarTower S T R] : IsScalarTower S T (RingQuot r) := ⟨fun s t ⟨a⟩ => Quot.inductionOn a fun a' => by simp only [RingQuot.smul_quot, smul_assoc]⟩
instance
Algebra
[ "Mathlib.Algebra.Algebra.Hom", "Mathlib.RingTheory.Congruence.Basic", "Mathlib.RingTheory.Ideal.Quotient.Defs", "Mathlib.RingTheory.Ideal.Span" ]
Mathlib/Algebra/RingQuot.lean
instIsScalarTower
null
instSMulCommClass [CommSemiring T] [Algebra S R] [Algebra T R] [SMulCommClass S T R] : SMulCommClass S T (RingQuot r) := ⟨fun s t ⟨a⟩ => Quot.inductionOn a fun a' => by simp only [RingQuot.smul_quot, smul_comm]⟩
instance
Algebra
[ "Mathlib.Algebra.Algebra.Hom", "Mathlib.RingTheory.Congruence.Basic", "Mathlib.RingTheory.Ideal.Quotient.Defs", "Mathlib.RingTheory.Ideal.Span" ]
Mathlib/Algebra/RingQuot.lean
instSMulCommClass
null
instAddCommMonoid (r : R → R → Prop) : AddCommMonoid (RingQuot r) where add := (· + ·) zero := 0 add_assoc := by rintro ⟨⟨⟩⟩ ⟨⟨⟩⟩ ⟨⟨⟩⟩ simp only [add_quot, add_assoc] zero_add := by rintro ⟨⟨⟩⟩ simp [add_quot, ← zero_quot, zero_add] add_zero := by rintro ⟨⟨⟩⟩ simp only [add_quot, ← zero_quot, add_zero] add_comm := by rintro ⟨⟨⟩⟩ ⟨⟨⟩⟩ simp only [add_quot, add_comm] nsmul := (· • ·) nsmul_zero := by rintro ⟨⟨⟩⟩ simp only [smul_quot, zero_smul, zero_quot] nsmul_succ := by rintro n ⟨⟨⟩⟩ simp only [smul_quot, nsmul_eq_mul, Nat.cast_add, Nat.cast_one, add_mul, one_mul, add_comm, add_quot]
instance
Algebra
[ "Mathlib.Algebra.Algebra.Hom", "Mathlib.RingTheory.Congruence.Basic", "Mathlib.RingTheory.Ideal.Quotient.Defs", "Mathlib.RingTheory.Ideal.Span" ]
Mathlib/Algebra/RingQuot.lean
instAddCommMonoid
null
instMonoidWithZero (r : R → R → Prop) : MonoidWithZero (RingQuot r) where mul_assoc := by rintro ⟨⟨⟩⟩ ⟨⟨⟩⟩ ⟨⟨⟩⟩ simp only [mul_quot, mul_assoc] one_mul := by rintro ⟨⟨⟩⟩ simp only [mul_quot, ← one_quot, one_mul] mul_one := by rintro ⟨⟨⟩⟩ simp only [mul_quot, ← one_quot, mul_one] zero_mul := by rintro ⟨⟨⟩⟩ simp only [mul_quot, ← zero_quot, zero_mul] mul_zero := by rintro ⟨⟨⟩⟩ simp only [mul_quot, ← zero_quot, mul_zero] npow n x := x ^ n npow_zero := by rintro ⟨⟨⟩⟩ simp only [pow_quot, ← one_quot, pow_zero] npow_succ := by rintro n ⟨⟨⟩⟩ simp only [pow_quot, mul_quot, pow_succ]
instance
Algebra
[ "Mathlib.Algebra.Algebra.Hom", "Mathlib.RingTheory.Congruence.Basic", "Mathlib.RingTheory.Ideal.Quotient.Defs", "Mathlib.RingTheory.Ideal.Span" ]
Mathlib/Algebra/RingQuot.lean
instMonoidWithZero
null
instSemiring (r : R → R → Prop) : Semiring (RingQuot r) where natCast := natCast r natCast_zero := by simp [Nat.cast, natCast, ← zero_quot] natCast_succ := by simp [Nat.cast, natCast, ← one_quot, add_quot] left_distrib := by rintro ⟨⟨⟩⟩ ⟨⟨⟩⟩ ⟨⟨⟩⟩ simp only [mul_quot, add_quot, left_distrib] right_distrib := by rintro ⟨⟨⟩⟩ ⟨⟨⟩⟩ ⟨⟨⟩⟩ simp only [mul_quot, add_quot, right_distrib] nsmul := (· • ·) nsmul_zero := by rintro ⟨⟨⟩⟩ simp only [zero_smul] nsmul_succ := by rintro n ⟨⟨⟩⟩ simp only [smul_quot, nsmul_eq_mul, Nat.cast_add, Nat.cast_one, add_mul, one_mul, add_comm, add_quot] __ := instAddCommMonoid r __ := instMonoidWithZero r
instance
Algebra
[ "Mathlib.Algebra.Algebra.Hom", "Mathlib.RingTheory.Congruence.Basic", "Mathlib.RingTheory.Ideal.Quotient.Defs", "Mathlib.RingTheory.Ideal.Span" ]
Mathlib/Algebra/RingQuot.lean
instSemiring
null
private intCast {R : Type uR} [Ring R] (r : R → R → Prop) (z : ℤ) : RingQuot r := ⟨Quot.mk _ z⟩
def
Algebra
[ "Mathlib.Algebra.Algebra.Hom", "Mathlib.RingTheory.Congruence.Basic", "Mathlib.RingTheory.Ideal.Quotient.Defs", "Mathlib.RingTheory.Ideal.Span" ]
Mathlib/Algebra/RingQuot.lean
intCast
null
instRing {R : Type uR} [Ring R] (r : R → R → Prop) : Ring (RingQuot r) := { RingQuot.instSemiring r with neg := Neg.neg neg_add_cancel := by rintro ⟨⟨⟩⟩ simp [neg_quot, add_quot, ← zero_quot] sub := Sub.sub sub_eq_add_neg := by rintro ⟨⟨⟩⟩ ⟨⟨⟩⟩ simp [neg_quot, sub_quot, add_quot, sub_eq_add_neg] zsmul := (· • ·) zsmul_zero' := by rintro ⟨⟨⟩⟩ simp [smul_quot, ← zero_quot] zsmul_succ' := by rintro n ⟨⟨⟩⟩ simp [smul_quot, add_quot, add_mul, add_comm] zsmul_neg' := by rintro n ⟨⟨⟩⟩ simp [smul_quot, neg_quot, add_mul] intCast := intCast r intCast_ofNat := fun n => congrArg RingQuot.mk <| by exact congrArg (Quot.mk _) (Int.cast_natCast _) intCast_negSucc := fun n => congrArg RingQuot.mk <| by simp_rw [neg_def] exact congrArg (Quot.mk _) (Int.cast_negSucc n) }
instance
Algebra
[ "Mathlib.Algebra.Algebra.Hom", "Mathlib.RingTheory.Congruence.Basic", "Mathlib.RingTheory.Ideal.Quotient.Defs", "Mathlib.RingTheory.Ideal.Span" ]
Mathlib/Algebra/RingQuot.lean
instRing
null
instCommSemiring {R : Type uR} [CommSemiring R] (r : R → R → Prop) : CommSemiring (RingQuot r) := { RingQuot.instSemiring r with mul_comm := by rintro ⟨⟨⟩⟩ ⟨⟨⟩⟩ simp [mul_quot, mul_comm] }
instance
Algebra
[ "Mathlib.Algebra.Algebra.Hom", "Mathlib.RingTheory.Congruence.Basic", "Mathlib.RingTheory.Ideal.Quotient.Defs", "Mathlib.RingTheory.Ideal.Span" ]
Mathlib/Algebra/RingQuot.lean
instCommSemiring
null
instInhabited (r : R → R → Prop) : Inhabited (RingQuot r) := ⟨0⟩
instance
Algebra
[ "Mathlib.Algebra.Algebra.Hom", "Mathlib.RingTheory.Congruence.Basic", "Mathlib.RingTheory.Ideal.Quotient.Defs", "Mathlib.RingTheory.Ideal.Span" ]
Mathlib/Algebra/RingQuot.lean
instInhabited
null
instAlgebra [Algebra S R] (r : R → R → Prop) : Algebra S (RingQuot r) where smul := (· • ·) algebraMap := { toFun r := ⟨Quot.mk _ (algebraMap S R r)⟩ map_one' := by simp [← one_quot] map_mul' := by simp [mul_quot] map_zero' := by simp [← zero_quot] map_add' := by simp [add_quot] } commutes' r := by rintro ⟨⟨a⟩⟩ simp [Algebra.commutes, mul_quot] smul_def' r := by rintro ⟨⟨a⟩⟩ simp [smul_quot, Algebra.smul_def, mul_quot]
instance
Algebra
[ "Mathlib.Algebra.Algebra.Hom", "Mathlib.RingTheory.Congruence.Basic", "Mathlib.RingTheory.Ideal.Quotient.Defs", "Mathlib.RingTheory.Ideal.Span" ]
Mathlib/Algebra/RingQuot.lean
instAlgebra
null
ringQuotToIdealQuotient (r : B → B → Prop) : RingQuot r →+* B ⧸ Ideal.ofRel r := lift ⟨Ideal.Quotient.mk (Ideal.ofRel r), fun x y h ↦ Ideal.Quotient.eq.2 <| Submodule.mem_sInf.mpr fun _ w ↦ w ⟨x, y, h, sub_add_cancel x y⟩⟩ @[simp]
def
Algebra
[ "Mathlib.Algebra.Algebra.Hom", "Mathlib.RingTheory.Congruence.Basic", "Mathlib.RingTheory.Ideal.Quotient.Defs", "Mathlib.RingTheory.Ideal.Span" ]
Mathlib/Algebra/RingQuot.lean
ringQuotToIdealQuotient
The quotient map from a ring to its quotient, as a homomorphism of rings. -/ irreducible_def mkRingHom (r : R → R → Prop) : R →+* RingQuot r := { toFun := fun x ↦ ⟨Quot.mk _ x⟩ map_one' := by simp [← one_quot] map_mul' := by simp [mul_quot] map_zero' := by simp [← zero_quot] map_add' := by simp [add_quot] } theorem mkRingHom_rel {r : R → R → Prop} {x y : R} (w : r x y) : mkRingHom r x = mkRingHom r y := by simp [mkRingHom_def, Quot.sound (Rel.of w)] theorem mkRingHom_surjective (r : R → R → Prop) : Function.Surjective (mkRingHom r) := by simp only [mkRingHom_def, RingHom.coe_mk, MonoidHom.coe_mk, OneHom.coe_mk] rintro ⟨⟨⟩⟩ simp @[ext 1100] theorem ringQuot_ext [NonAssocSemiring T] {r : R → R → Prop} (f g : RingQuot r →+* T) (w : f.comp (mkRingHom r) = g.comp (mkRingHom r)) : f = g := by ext x rcases mkRingHom_surjective r x with ⟨x, rfl⟩ exact (RingHom.congr_fun w x :) variable [Semiring T] irreducible_def preLift {r : R → R → Prop} {f : R →+* T} (h : ∀ ⦃x y⦄, r x y → f x = f y) : RingQuot r →+* T := { toFun := fun x ↦ Quot.lift f (by rintro _ _ r induction r with | of r => exact h r | add_left _ r' => rw [map_add, map_add, r'] | mul_left _ r' => rw [map_mul, map_mul, r'] | mul_right _ r' => rw [map_mul, map_mul, r']) x.toQuot map_zero' := by simp only [← zero_quot, f.map_zero] map_add' := by rintro ⟨⟨x⟩⟩ ⟨⟨y⟩⟩ simp only [add_quot, f.map_add x y] map_one' := by simp only [← one_quot, f.map_one] map_mul' := by rintro ⟨⟨x⟩⟩ ⟨⟨y⟩⟩ simp only [mul_quot, f.map_mul x y] } /-- Any ring homomorphism `f : R →+* T` which respects a relation `r : R → R → Prop` factors uniquely through a morphism `RingQuot r →+* T`. -/ irreducible_def lift {r : R → R → Prop} : { f : R →+* T // ∀ ⦃x y⦄, r x y → f x = f y } ≃ (RingQuot r →+* T) := { toFun := fun f ↦ preLift f.prop invFun := fun F ↦ ⟨F.comp (mkRingHom r), fun _ _ h ↦ congr_arg F (mkRingHom_rel h)⟩ left_inv := fun f ↦ by ext simp only [preLift_def, mkRingHom_def, RingHom.coe_comp, RingHom.coe_mk, MonoidHom.coe_mk, OneHom.coe_mk, Function.comp_apply] right_inv := fun F ↦ by simp only [preLift_def] ext simp only [mkRingHom_def, RingHom.coe_comp, RingHom.coe_mk, MonoidHom.coe_mk, OneHom.coe_mk, Function.comp_apply] } @[simp] theorem lift_mkRingHom_apply (f : R →+* T) {r : R → R → Prop} (w : ∀ ⦃x y⦄, r x y → f x = f y) (x) : lift ⟨f, w⟩ (mkRingHom r x) = f x := by simp_rw [lift_def, preLift_def, mkRingHom_def] rfl -- note this is essentially `lift.symm_apply_eq.mp h` theorem lift_unique (f : R →+* T) {r : R → R → Prop} (w : ∀ ⦃x y⦄, r x y → f x = f y) (g : RingQuot r →+* T) (h : g.comp (mkRingHom r) = f) : g = lift ⟨f, w⟩ := by ext simp [h] theorem eq_lift_comp_mkRingHom {r : R → R → Prop} (f : RingQuot r →+* T) : f = lift ⟨f.comp (mkRingHom r), fun _ _ h ↦ congr_arg f (mkRingHom_rel h)⟩ := lift_unique (f.comp (mkRingHom r)) (fun _ _ h ↦ congr_arg (⇑f) (mkRingHom_rel h)) f rfl section CommRing /-! We now verify that in the case of a commutative ring, the `RingQuot` construction agrees with the quotient by the appropriate ideal. -/ variable {B : Type uR} [CommRing B] /-- The universal ring homomorphism from `RingQuot r` to `B ⧸ Ideal.ofRel r`.
ringQuotToIdealQuotient_apply (r : B → B → Prop) (x : B) : ringQuotToIdealQuotient r (mkRingHom r x) = Ideal.Quotient.mk (Ideal.ofRel r) x := by simp_rw [ringQuotToIdealQuotient, lift_def, preLift_def, mkRingHom_def] rfl
theorem
Algebra
[ "Mathlib.Algebra.Algebra.Hom", "Mathlib.RingTheory.Congruence.Basic", "Mathlib.RingTheory.Ideal.Quotient.Defs", "Mathlib.RingTheory.Ideal.Span" ]
Mathlib/Algebra/RingQuot.lean
ringQuotToIdealQuotient_apply
null
idealQuotientToRingQuot (r : B → B → Prop) : B ⧸ Ideal.ofRel r →+* RingQuot r := Ideal.Quotient.lift (Ideal.ofRel r) (mkRingHom r) (by refine fun x h ↦ Submodule.span_induction ?_ ?_ ?_ ?_ h · rintro y ⟨a, b, h, su⟩ symm at su rw [← sub_eq_iff_eq_add] at su rw [← su, RingHom.map_sub, mkRingHom_rel h, sub_self] · simp · intro a b _ _ ha hb simp [ha, hb] · intro a x _ hx simp [hx]) @[simp]
def
Algebra
[ "Mathlib.Algebra.Algebra.Hom", "Mathlib.RingTheory.Congruence.Basic", "Mathlib.RingTheory.Ideal.Quotient.Defs", "Mathlib.RingTheory.Ideal.Span" ]
Mathlib/Algebra/RingQuot.lean
idealQuotientToRingQuot
The universal ring homomorphism from `B ⧸ Ideal.ofRel r` to `RingQuot r`.
idealQuotientToRingQuot_apply (r : B → B → Prop) (x : B) : idealQuotientToRingQuot r (Ideal.Quotient.mk _ x) = mkRingHom r x := rfl
theorem
Algebra
[ "Mathlib.Algebra.Algebra.Hom", "Mathlib.RingTheory.Congruence.Basic", "Mathlib.RingTheory.Ideal.Quotient.Defs", "Mathlib.RingTheory.Ideal.Span" ]
Mathlib/Algebra/RingQuot.lean
idealQuotientToRingQuot_apply
null
ringQuotEquivIdealQuotient (r : B → B → Prop) : RingQuot r ≃+* B ⧸ Ideal.ofRel r := RingEquiv.ofHomInv (ringQuotToIdealQuotient r) (idealQuotientToRingQuot r) (by ext x simp) (by ext x simp)
def
Algebra
[ "Mathlib.Algebra.Algebra.Hom", "Mathlib.RingTheory.Congruence.Basic", "Mathlib.RingTheory.Ideal.Quotient.Defs", "Mathlib.RingTheory.Ideal.Span" ]
Mathlib/Algebra/RingQuot.lean
ringQuotEquivIdealQuotient
The ring equivalence between `RingQuot r` and `(Ideal.ofRel r).quotient`
@[simp] mkAlgHom_coe (s : A → A → Prop) : (mkAlgHom S s : A →+* RingQuot s) = mkRingHom s := by simp_rw [mkAlgHom_def, mkRingHom_def] rfl
theorem
Algebra
[ "Mathlib.Algebra.Algebra.Hom", "Mathlib.RingTheory.Congruence.Basic", "Mathlib.RingTheory.Ideal.Quotient.Defs", "Mathlib.RingTheory.Ideal.Span" ]
Mathlib/Algebra/RingQuot.lean
mkAlgHom_coe
null
mkAlgHom_rel {s : A → A → Prop} {x y : A} (w : s x y) : mkAlgHom S s x = mkAlgHom S s y := by simp [mkAlgHom_def, mkRingHom_def, Quot.sound (Rel.of w)]
theorem
Algebra
[ "Mathlib.Algebra.Algebra.Hom", "Mathlib.RingTheory.Congruence.Basic", "Mathlib.RingTheory.Ideal.Quotient.Defs", "Mathlib.RingTheory.Ideal.Span" ]
Mathlib/Algebra/RingQuot.lean
mkAlgHom_rel
null
mkAlgHom_surjective (s : A → A → Prop) : Function.Surjective (mkAlgHom S s) := by suffices Function.Surjective fun x ↦ (⟨.mk (Rel s) x⟩ : RingQuot s) by simpa [mkAlgHom_def, mkRingHom_def] rintro ⟨⟨a⟩⟩ use a variable {B : Type u₄} [Semiring B] [Algebra S B] @[ext 1100]
theorem
Algebra
[ "Mathlib.Algebra.Algebra.Hom", "Mathlib.RingTheory.Congruence.Basic", "Mathlib.RingTheory.Ideal.Quotient.Defs", "Mathlib.RingTheory.Ideal.Span" ]
Mathlib/Algebra/RingQuot.lean
mkAlgHom_surjective
null
ringQuot_ext' {s : A → A → Prop} (f g : RingQuot s →ₐ[S] B) (w : f.comp (mkAlgHom S s) = g.comp (mkAlgHom S s)) : f = g := by ext x rcases mkAlgHom_surjective S s x with ⟨x, rfl⟩ exact AlgHom.congr_fun w x irreducible_def preLiftAlgHom {s : A → A → Prop} {f : A →ₐ[S] B} (h : ∀ ⦃x y⦄, s x y → f x = f y) : RingQuot s →ₐ[S] B := { toFun := fun x ↦ Quot.lift f (by rintro _ _ r induction r with | of r => exact h r | add_left _ r' => simp only [map_add, r'] | mul_left _ r' => simp only [map_mul, r'] | mul_right _ r' => simp only [map_mul, r']) x.toQuot map_zero' := by simp only [← zero_quot, map_zero] map_add' := by rintro ⟨⟨x⟩⟩ ⟨⟨y⟩⟩ simp only [add_quot, map_add _ x y] map_one' := by simp only [← one_quot, map_one] map_mul' := by rintro ⟨⟨x⟩⟩ ⟨⟨y⟩⟩ simp only [mul_quot, map_mul _ x y] commutes' := by rintro x simp [← one_quot, smul_quot, Algebra.algebraMap_eq_smul_one] }
theorem
Algebra
[ "Mathlib.Algebra.Algebra.Hom", "Mathlib.RingTheory.Congruence.Basic", "Mathlib.RingTheory.Ideal.Quotient.Defs", "Mathlib.RingTheory.Ideal.Span" ]
Mathlib/Algebra/RingQuot.lean
ringQuot_ext'
null
@[simp] liftAlgHom_mkAlgHom_apply (f : A →ₐ[S] B) {s : A → A → Prop} (w : ∀ ⦃x y⦄, s x y → f x = f y) (x) : (liftAlgHom S ⟨f, w⟩) ((mkAlgHom S s) x) = f x := by simp_rw [liftAlgHom_def, preLiftAlgHom_def, mkAlgHom_def, mkRingHom_def] rfl
theorem
Algebra
[ "Mathlib.Algebra.Algebra.Hom", "Mathlib.RingTheory.Congruence.Basic", "Mathlib.RingTheory.Ideal.Quotient.Defs", "Mathlib.RingTheory.Ideal.Span" ]
Mathlib/Algebra/RingQuot.lean
liftAlgHom_mkAlgHom_apply
null
liftAlgHom_unique (f : A →ₐ[S] B) {s : A → A → Prop} (w : ∀ ⦃x y⦄, s x y → f x = f y) (g : RingQuot s →ₐ[S] B) (h : g.comp (mkAlgHom S s) = f) : g = liftAlgHom S ⟨f, w⟩ := by ext simp [h]
theorem
Algebra
[ "Mathlib.Algebra.Algebra.Hom", "Mathlib.RingTheory.Congruence.Basic", "Mathlib.RingTheory.Ideal.Quotient.Defs", "Mathlib.RingTheory.Ideal.Span" ]
Mathlib/Algebra/RingQuot.lean
liftAlgHom_unique
null
eq_liftAlgHom_comp_mkAlgHom {s : A → A → Prop} (f : RingQuot s →ₐ[S] B) : f = liftAlgHom S ⟨f.comp (mkAlgHom S s), fun _ _ h ↦ congr_arg f (mkAlgHom_rel S h)⟩ := liftAlgHom_unique S (f.comp (mkAlgHom S s)) (fun _ _ h ↦ congr_arg (⇑f) (mkAlgHom_rel S h)) f rfl
theorem
Algebra
[ "Mathlib.Algebra.Algebra.Hom", "Mathlib.RingTheory.Congruence.Basic", "Mathlib.RingTheory.Ideal.Quotient.Defs", "Mathlib.RingTheory.Ideal.Span" ]
Mathlib/Algebra/RingQuot.lean
eq_liftAlgHom_comp_mkAlgHom
null
SymAlg (α : Type*) : Type _ := α @[inherit_doc] postfix:max "ˢʸᵐ" => SymAlg
def
Algebra
[ "Mathlib.Algebra.Jordan.Basic", "Mathlib.Algebra.Module.Defs" ]
Mathlib/Algebra/Symmetrized.lean
SymAlg
The symmetrized algebra (denoted as `αˢʸᵐ`) has the same underlying space as the original algebra `α`.
@[match_pattern] sym : α ≃ αˢʸᵐ := Equiv.refl _
def
Algebra
[ "Mathlib.Algebra.Jordan.Basic", "Mathlib.Algebra.Module.Defs" ]
Mathlib/Algebra/Symmetrized.lean
sym
The element of `SymAlg α` that represents `a : α`.
unsym_mul_self [Semiring α] [Invertible (2 : α)] (a : αˢʸᵐ) : unsym (a * a) = unsym a * unsym a := by rw [mul_def, unsym_sym, ← two_mul, invOf_mul_cancel_left]
theorem
Algebra
[ "Mathlib.Algebra.Jordan.Basic", "Mathlib.Algebra.Module.Defs" ]
Mathlib/Algebra/Symmetrized.lean
unsym_mul_self
The element of `α` represented by `x : αˢʸᵐ`. -/ -- We add `@[pp_nodot]` in case RFC https://github.com/leanprover/lean4/issues/6178 happens. @[pp_nodot] def unsym : αˢʸᵐ ≃ α := Equiv.refl _ @[simp] theorem unsym_sym (a : α) : unsym (sym a) = a := rfl @[simp] theorem sym_unsym (a : α) : sym (unsym a) = a := rfl @[simp] theorem sym_comp_unsym : (sym : α → αˢʸᵐ) ∘ unsym = id := rfl @[simp] theorem unsym_comp_sym : (unsym : αˢʸᵐ → α) ∘ sym = id := rfl @[simp] theorem sym_symm : (@sym α).symm = unsym := rfl @[simp] theorem unsym_symm : (@unsym α).symm = sym := rfl theorem sym_bijective : Bijective (sym : α → αˢʸᵐ) := sym.bijective theorem unsym_bijective : Bijective (unsym : αˢʸᵐ → α) := unsym.symm.bijective theorem sym_injective : Injective (sym : α → αˢʸᵐ) := sym.injective theorem sym_surjective : Surjective (sym : α → αˢʸᵐ) := sym.surjective theorem unsym_injective : Injective (unsym : αˢʸᵐ → α) := unsym.injective theorem unsym_surjective : Surjective (unsym : αˢʸᵐ → α) := unsym.surjective theorem sym_inj {a b : α} : sym a = sym b ↔ a = b := sym_injective.eq_iff theorem unsym_inj {a b : αˢʸᵐ} : unsym a = unsym b ↔ a = b := unsym_injective.eq_iff instance [Nontrivial α] : Nontrivial αˢʸᵐ := sym_injective.nontrivial instance [Inhabited α] : Inhabited αˢʸᵐ := ⟨sym default⟩ instance [Subsingleton α] : Subsingleton αˢʸᵐ := unsym_injective.subsingleton instance [Unique α] : Unique αˢʸᵐ := Unique.mk' _ instance [IsEmpty α] : IsEmpty αˢʸᵐ := Function.isEmpty unsym @[to_additive] instance [One α] : One αˢʸᵐ where one := sym 1 instance [Add α] : Add αˢʸᵐ where add a b := sym (unsym a + unsym b) instance [Sub α] : Sub αˢʸᵐ where sub a b := sym (unsym a - unsym b) instance [Neg α] : Neg αˢʸᵐ where neg a := sym (-unsym a) -- Introduce the symmetrized multiplication instance [Add α] [Mul α] [One α] [OfNat α 2] [Invertible (2 : α)] : Mul αˢʸᵐ where mul a b := sym (⅟2 * (unsym a * unsym b + unsym b * unsym a)) @[to_additive existing] instance [Inv α] : Inv αˢʸᵐ where inv a := sym <| (unsym a)⁻¹ instance (R : Type*) [SMul R α] : SMul R αˢʸᵐ where smul r a := sym (r • unsym a) @[to_additive (attr := simp)] theorem sym_one [One α] : sym (1 : α) = 1 := rfl @[to_additive (attr := simp)] theorem unsym_one [One α] : unsym (1 : αˢʸᵐ) = 1 := rfl @[simp] theorem sym_add [Add α] (a b : α) : sym (a + b) = sym a + sym b := rfl @[simp] theorem unsym_add [Add α] (a b : αˢʸᵐ) : unsym (a + b) = unsym a + unsym b := rfl @[simp] theorem sym_sub [Sub α] (a b : α) : sym (a - b) = sym a - sym b := rfl @[simp] theorem unsym_sub [Sub α] (a b : αˢʸᵐ) : unsym (a - b) = unsym a - unsym b := rfl @[simp] theorem sym_neg [Neg α] (a : α) : sym (-a) = -sym a := rfl @[simp] theorem unsym_neg [Neg α] (a : αˢʸᵐ) : unsym (-a) = -unsym a := rfl theorem mul_def [Add α] [Mul α] [One α] [OfNat α 2] [Invertible (2 : α)] (a b : αˢʸᵐ) : a * b = sym (⅟2 * (unsym a * unsym b + unsym b * unsym a)) := rfl theorem unsym_mul [Mul α] [Add α] [One α] [OfNat α 2] [Invertible (2 : α)] (a b : αˢʸᵐ) : unsym (a * b) = ⅟2 * (unsym a * unsym b + unsym b * unsym a) := rfl theorem sym_mul_sym [Mul α] [Add α] [One α] [OfNat α 2] [Invertible (2 : α)] (a b : α) : sym a * sym b = sym (⅟2 * (a * b + b * a)) := rfl set_option linter.existingAttributeWarning false in @[simp, to_additive existing] theorem sym_inv [Inv α] (a : α) : sym a⁻¹ = (sym a)⁻¹ := rfl set_option linter.existingAttributeWarning false in @[simp, to_additive existing] theorem unsym_inv [Inv α] (a : αˢʸᵐ) : unsym a⁻¹ = (unsym a)⁻¹ := rfl @[simp] theorem sym_smul {R : Type*} [SMul R α] (c : R) (a : α) : sym (c • a) = c • sym a := rfl @[simp] theorem unsym_smul {R : Type*} [SMul R α] (c : R) (a : αˢʸᵐ) : unsym (c • a) = c • unsym a := rfl @[to_additive (attr := simp)] theorem unsym_eq_one_iff [One α] (a : αˢʸᵐ) : unsym a = 1 ↔ a = 1 := unsym_injective.eq_iff' rfl @[to_additive (attr := simp)] theorem sym_eq_one_iff [One α] (a : α) : sym a = 1 ↔ a = 1 := sym_injective.eq_iff' rfl @[to_additive] theorem unsym_ne_one_iff [One α] (a : αˢʸᵐ) : unsym a ≠ (1 : α) ↔ a ≠ (1 : αˢʸᵐ) := not_congr <| unsym_eq_one_iff a @[to_additive] theorem sym_ne_one_iff [One α] (a : α) : sym a ≠ (1 : αˢʸᵐ) ↔ a ≠ (1 : α) := not_congr <| sym_eq_one_iff a instance addCommSemigroup [AddCommSemigroup α] : AddCommSemigroup αˢʸᵐ := unsym_injective.addCommSemigroup _ unsym_add instance addMonoid [AddMonoid α] : AddMonoid αˢʸᵐ := unsym_injective.addMonoid _ unsym_zero unsym_add fun _ _ => rfl instance addGroup [AddGroup α] : AddGroup αˢʸᵐ := unsym_injective.addGroup _ unsym_zero unsym_add unsym_neg unsym_sub (fun _ _ => rfl) fun _ _ => rfl instance addCommMonoid [AddCommMonoid α] : AddCommMonoid αˢʸᵐ := { SymAlg.addCommSemigroup, SymAlg.addMonoid with } instance addCommGroup [AddCommGroup α] : AddCommGroup αˢʸᵐ := { SymAlg.addCommMonoid, SymAlg.addGroup with } instance {R : Type*} [Semiring R] [AddCommMonoid α] [Module R α] : Module R αˢʸᵐ := Function.Injective.module R ⟨⟨unsym, unsym_zero⟩, unsym_add⟩ unsym_injective unsym_smul instance [Mul α] [AddMonoidWithOne α] [Invertible (2 : α)] (a : α) [Invertible a] : Invertible (sym a) where invOf := sym (⅟a) invOf_mul_self := by rw [sym_mul_sym, mul_invOf_self, invOf_mul_self, one_add_one_eq_two, invOf_mul_self, sym_one] mul_invOf_self := by rw [sym_mul_sym, mul_invOf_self, invOf_mul_self, one_add_one_eq_two, invOf_mul_self, sym_one] @[simp] theorem invOf_sym [Mul α] [AddMonoidWithOne α] [Invertible (2 : α)] (a : α) [Invertible a] : ⅟(sym a) = sym (⅟a) := rfl instance nonAssocSemiring [Semiring α] [Invertible (2 : α)] : NonAssocSemiring αˢʸᵐ := { SymAlg.addCommMonoid with one := 1 mul := (· * ·) zero_mul := fun _ => by rw [mul_def, unsym_zero, zero_mul, mul_zero, add_zero, mul_zero, sym_zero] mul_zero := fun _ => by rw [mul_def, unsym_zero, zero_mul, mul_zero, add_zero, mul_zero, sym_zero] mul_one := fun _ => by rw [mul_def, unsym_one, mul_one, one_mul, ← two_mul, invOf_mul_cancel_left, sym_unsym] one_mul := fun _ => by rw [mul_def, unsym_one, mul_one, one_mul, ← two_mul, invOf_mul_cancel_left, sym_unsym] left_distrib := fun a b c => by rw [mul_def, mul_def, mul_def, ← sym_add, ← mul_add, unsym_add, add_mul] congr 2 rw [mul_add] abel right_distrib := fun a b c => by rw [mul_def, mul_def, mul_def, ← sym_add, ← mul_add, unsym_add, add_mul] congr 2 rw [mul_add] abel } /-- The symmetrization of a real (unital, associative) algebra is a non-associative ring. -/ instance [Ring α] [Invertible (2 : α)] : NonAssocRing αˢʸᵐ := { SymAlg.nonAssocSemiring, SymAlg.addCommGroup with } /-! The squaring operation coincides for both multiplications
sym_mul_self [Semiring α] [Invertible (2 : α)] (a : α) : sym (a * a) = sym a * sym a := by rw [sym_mul_sym, ← two_mul, invOf_mul_cancel_left]
theorem
Algebra
[ "Mathlib.Algebra.Jordan.Basic", "Mathlib.Algebra.Module.Defs" ]
Mathlib/Algebra/Symmetrized.lean
sym_mul_self
null
mul_comm [Mul α] [AddCommSemigroup α] [One α] [OfNat α 2] [Invertible (2 : α)] (a b : αˢʸᵐ) : a * b = b * a := by rw [mul_def, mul_def, add_comm]
theorem
Algebra
[ "Mathlib.Algebra.Jordan.Basic", "Mathlib.Algebra.Module.Defs" ]
Mathlib/Algebra/Symmetrized.lean
mul_comm
null
TrivSqZeroExt (R : Type u) (M : Type v) := R × M local notation "tsze" => TrivSqZeroExt open scoped RightActions
def
Algebra
[ "Mathlib.Algebra.BigOperators.GroupWithZero.Action", "Mathlib.Algebra.GroupWithZero.Invertible", "Mathlib.LinearAlgebra.Prod", "Mathlib.Algebra.Algebra.Subalgebra.Lattice" ]
Mathlib/Algebra/TrivSqZeroExt.lean
TrivSqZeroExt
"Trivial Square-Zero Extension". Given a module `M` over a ring `R`, the trivial square-zero extension of `M` over `R` is defined to be the `R`-algebra `R × M` with multiplication given by `(r₁ + m₁) * (r₂ + m₂) = r₁ r₂ + r₁ m₂ + r₂ m₁`. It is a square-zero extension because `M^2 = 0`.
inl [Zero M] (r : R) : tsze R M := (r, 0)
def
Algebra
[ "Mathlib.Algebra.BigOperators.GroupWithZero.Action", "Mathlib.Algebra.GroupWithZero.Invertible", "Mathlib.LinearAlgebra.Prod", "Mathlib.Algebra.Algebra.Subalgebra.Lattice" ]
Mathlib/Algebra/TrivSqZeroExt.lean
inl
The canonical inclusion `R → TrivSqZeroExt R M`.
inr [Zero R] (m : M) : tsze R M := (0, m)
def
Algebra
[ "Mathlib.Algebra.BigOperators.GroupWithZero.Action", "Mathlib.Algebra.GroupWithZero.Invertible", "Mathlib.LinearAlgebra.Prod", "Mathlib.Algebra.Algebra.Subalgebra.Lattice" ]
Mathlib/Algebra/TrivSqZeroExt.lean
inr
The canonical inclusion `M → TrivSqZeroExt R M`.
fst (x : tsze R M) : R := x.1
def
Algebra
[ "Mathlib.Algebra.BigOperators.GroupWithZero.Action", "Mathlib.Algebra.GroupWithZero.Invertible", "Mathlib.LinearAlgebra.Prod", "Mathlib.Algebra.Algebra.Subalgebra.Lattice" ]
Mathlib/Algebra/TrivSqZeroExt.lean
fst
The canonical projection `TrivSqZeroExt R M → R`.
snd (x : tsze R M) : M := x.2 @[simp]
def
Algebra
[ "Mathlib.Algebra.BigOperators.GroupWithZero.Action", "Mathlib.Algebra.GroupWithZero.Invertible", "Mathlib.LinearAlgebra.Prod", "Mathlib.Algebra.Algebra.Subalgebra.Lattice" ]
Mathlib/Algebra/TrivSqZeroExt.lean
snd
The canonical projection `TrivSqZeroExt R M → M`.
fst_mk (r : R) (m : M) : fst (r, m) = r := rfl @[simp]
theorem
Algebra
[ "Mathlib.Algebra.BigOperators.GroupWithZero.Action", "Mathlib.Algebra.GroupWithZero.Invertible", "Mathlib.LinearAlgebra.Prod", "Mathlib.Algebra.Algebra.Subalgebra.Lattice" ]
Mathlib/Algebra/TrivSqZeroExt.lean
fst_mk
null
snd_mk (r : R) (m : M) : snd (r, m) = m := rfl @[ext]
theorem
Algebra
[ "Mathlib.Algebra.BigOperators.GroupWithZero.Action", "Mathlib.Algebra.GroupWithZero.Invertible", "Mathlib.LinearAlgebra.Prod", "Mathlib.Algebra.Algebra.Subalgebra.Lattice" ]
Mathlib/Algebra/TrivSqZeroExt.lean
snd_mk
null
ext {x y : tsze R M} (h1 : x.fst = y.fst) (h2 : x.snd = y.snd) : x = y := Prod.ext h1 h2
theorem
Algebra
[ "Mathlib.Algebra.BigOperators.GroupWithZero.Action", "Mathlib.Algebra.GroupWithZero.Invertible", "Mathlib.LinearAlgebra.Prod", "Mathlib.Algebra.Algebra.Subalgebra.Lattice" ]
Mathlib/Algebra/TrivSqZeroExt.lean
ext
null
@[simp] fst_inl [Zero M] (r : R) : (inl r : tsze R M).fst = r := rfl @[simp]
theorem
Algebra
[ "Mathlib.Algebra.BigOperators.GroupWithZero.Action", "Mathlib.Algebra.GroupWithZero.Invertible", "Mathlib.LinearAlgebra.Prod", "Mathlib.Algebra.Algebra.Subalgebra.Lattice" ]
Mathlib/Algebra/TrivSqZeroExt.lean
fst_inl
null
snd_inl [Zero M] (r : R) : (inl r : tsze R M).snd = 0 := rfl @[simp]
theorem
Algebra
[ "Mathlib.Algebra.BigOperators.GroupWithZero.Action", "Mathlib.Algebra.GroupWithZero.Invertible", "Mathlib.LinearAlgebra.Prod", "Mathlib.Algebra.Algebra.Subalgebra.Lattice" ]
Mathlib/Algebra/TrivSqZeroExt.lean
snd_inl
null
fst_comp_inl [Zero M] : fst ∘ (inl : R → tsze R M) = id := rfl @[simp]
theorem
Algebra
[ "Mathlib.Algebra.BigOperators.GroupWithZero.Action", "Mathlib.Algebra.GroupWithZero.Invertible", "Mathlib.LinearAlgebra.Prod", "Mathlib.Algebra.Algebra.Subalgebra.Lattice" ]
Mathlib/Algebra/TrivSqZeroExt.lean
fst_comp_inl
null
snd_comp_inl [Zero M] : snd ∘ (inl : R → tsze R M) = 0 := rfl
theorem
Algebra
[ "Mathlib.Algebra.BigOperators.GroupWithZero.Action", "Mathlib.Algebra.GroupWithZero.Invertible", "Mathlib.LinearAlgebra.Prod", "Mathlib.Algebra.Algebra.Subalgebra.Lattice" ]
Mathlib/Algebra/TrivSqZeroExt.lean
snd_comp_inl
null
@[simp] fst_inr [Zero R] (m : M) : (inr m : tsze R M).fst = 0 := rfl @[simp]
theorem
Algebra
[ "Mathlib.Algebra.BigOperators.GroupWithZero.Action", "Mathlib.Algebra.GroupWithZero.Invertible", "Mathlib.LinearAlgebra.Prod", "Mathlib.Algebra.Algebra.Subalgebra.Lattice" ]
Mathlib/Algebra/TrivSqZeroExt.lean
fst_inr
null
snd_inr [Zero R] (m : M) : (inr m : tsze R M).snd = m := rfl @[simp]
theorem
Algebra
[ "Mathlib.Algebra.BigOperators.GroupWithZero.Action", "Mathlib.Algebra.GroupWithZero.Invertible", "Mathlib.LinearAlgebra.Prod", "Mathlib.Algebra.Algebra.Subalgebra.Lattice" ]
Mathlib/Algebra/TrivSqZeroExt.lean
snd_inr
null
fst_comp_inr [Zero R] : fst ∘ (inr : M → tsze R M) = 0 := rfl @[simp]
theorem
Algebra
[ "Mathlib.Algebra.BigOperators.GroupWithZero.Action", "Mathlib.Algebra.GroupWithZero.Invertible", "Mathlib.LinearAlgebra.Prod", "Mathlib.Algebra.Algebra.Subalgebra.Lattice" ]
Mathlib/Algebra/TrivSqZeroExt.lean
fst_comp_inr
null
snd_comp_inr [Zero R] : snd ∘ (inr : M → tsze R M) = id := rfl
theorem
Algebra
[ "Mathlib.Algebra.BigOperators.GroupWithZero.Action", "Mathlib.Algebra.GroupWithZero.Invertible", "Mathlib.LinearAlgebra.Prod", "Mathlib.Algebra.Algebra.Subalgebra.Lattice" ]
Mathlib/Algebra/TrivSqZeroExt.lean
snd_comp_inr
null
fst_surjective [Nonempty M] : Function.Surjective (fst : tsze R M → R) := Prod.fst_surjective
theorem
Algebra
[ "Mathlib.Algebra.BigOperators.GroupWithZero.Action", "Mathlib.Algebra.GroupWithZero.Invertible", "Mathlib.LinearAlgebra.Prod", "Mathlib.Algebra.Algebra.Subalgebra.Lattice" ]
Mathlib/Algebra/TrivSqZeroExt.lean
fst_surjective
null
snd_surjective [Nonempty R] : Function.Surjective (snd : tsze R M → M) := Prod.snd_surjective
theorem
Algebra
[ "Mathlib.Algebra.BigOperators.GroupWithZero.Action", "Mathlib.Algebra.GroupWithZero.Invertible", "Mathlib.LinearAlgebra.Prod", "Mathlib.Algebra.Algebra.Subalgebra.Lattice" ]
Mathlib/Algebra/TrivSqZeroExt.lean
snd_surjective
null
inl_injective [Zero M] : Function.Injective (inl : R → tsze R M) := Function.LeftInverse.injective <| fst_inl _
theorem
Algebra
[ "Mathlib.Algebra.BigOperators.GroupWithZero.Action", "Mathlib.Algebra.GroupWithZero.Invertible", "Mathlib.LinearAlgebra.Prod", "Mathlib.Algebra.Algebra.Subalgebra.Lattice" ]
Mathlib/Algebra/TrivSqZeroExt.lean
inl_injective
null
inr_injective [Zero R] : Function.Injective (inr : M → tsze R M) := Function.LeftInverse.injective <| snd_inr _
theorem
Algebra
[ "Mathlib.Algebra.BigOperators.GroupWithZero.Action", "Mathlib.Algebra.GroupWithZero.Invertible", "Mathlib.LinearAlgebra.Prod", "Mathlib.Algebra.Algebra.Subalgebra.Lattice" ]
Mathlib/Algebra/TrivSqZeroExt.lean
inr_injective
null
inhabited [Inhabited R] [Inhabited M] : Inhabited (tsze R M) := instInhabitedProd
instance
Algebra
[ "Mathlib.Algebra.BigOperators.GroupWithZero.Action", "Mathlib.Algebra.GroupWithZero.Invertible", "Mathlib.LinearAlgebra.Prod", "Mathlib.Algebra.Algebra.Subalgebra.Lattice" ]
Mathlib/Algebra/TrivSqZeroExt.lean
inhabited
null
zero [Zero R] [Zero M] : Zero (tsze R M) := Prod.instZero
instance
Algebra
[ "Mathlib.Algebra.BigOperators.GroupWithZero.Action", "Mathlib.Algebra.GroupWithZero.Invertible", "Mathlib.LinearAlgebra.Prod", "Mathlib.Algebra.Algebra.Subalgebra.Lattice" ]
Mathlib/Algebra/TrivSqZeroExt.lean
zero
null
add [Add R] [Add M] : Add (tsze R M) := Prod.instAdd
instance
Algebra
[ "Mathlib.Algebra.BigOperators.GroupWithZero.Action", "Mathlib.Algebra.GroupWithZero.Invertible", "Mathlib.LinearAlgebra.Prod", "Mathlib.Algebra.Algebra.Subalgebra.Lattice" ]
Mathlib/Algebra/TrivSqZeroExt.lean
add
null
sub [Sub R] [Sub M] : Sub (tsze R M) := Prod.instSub
instance
Algebra
[ "Mathlib.Algebra.BigOperators.GroupWithZero.Action", "Mathlib.Algebra.GroupWithZero.Invertible", "Mathlib.LinearAlgebra.Prod", "Mathlib.Algebra.Algebra.Subalgebra.Lattice" ]
Mathlib/Algebra/TrivSqZeroExt.lean
sub
null
neg [Neg R] [Neg M] : Neg (tsze R M) := Prod.instNeg
instance
Algebra
[ "Mathlib.Algebra.BigOperators.GroupWithZero.Action", "Mathlib.Algebra.GroupWithZero.Invertible", "Mathlib.LinearAlgebra.Prod", "Mathlib.Algebra.Algebra.Subalgebra.Lattice" ]
Mathlib/Algebra/TrivSqZeroExt.lean
neg
null
addSemigroup [AddSemigroup R] [AddSemigroup M] : AddSemigroup (tsze R M) := Prod.instAddSemigroup
instance
Algebra
[ "Mathlib.Algebra.BigOperators.GroupWithZero.Action", "Mathlib.Algebra.GroupWithZero.Invertible", "Mathlib.LinearAlgebra.Prod", "Mathlib.Algebra.Algebra.Subalgebra.Lattice" ]
Mathlib/Algebra/TrivSqZeroExt.lean
addSemigroup
null
addZeroClass [AddZeroClass R] [AddZeroClass M] : AddZeroClass (tsze R M) := Prod.instAddZeroClass
instance
Algebra
[ "Mathlib.Algebra.BigOperators.GroupWithZero.Action", "Mathlib.Algebra.GroupWithZero.Invertible", "Mathlib.LinearAlgebra.Prod", "Mathlib.Algebra.Algebra.Subalgebra.Lattice" ]
Mathlib/Algebra/TrivSqZeroExt.lean
addZeroClass
null
addMonoid [AddMonoid R] [AddMonoid M] : AddMonoid (tsze R M) := Prod.instAddMonoid
instance
Algebra
[ "Mathlib.Algebra.BigOperators.GroupWithZero.Action", "Mathlib.Algebra.GroupWithZero.Invertible", "Mathlib.LinearAlgebra.Prod", "Mathlib.Algebra.Algebra.Subalgebra.Lattice" ]
Mathlib/Algebra/TrivSqZeroExt.lean
addMonoid
null
addGroup [AddGroup R] [AddGroup M] : AddGroup (tsze R M) := Prod.instAddGroup
instance
Algebra
[ "Mathlib.Algebra.BigOperators.GroupWithZero.Action", "Mathlib.Algebra.GroupWithZero.Invertible", "Mathlib.LinearAlgebra.Prod", "Mathlib.Algebra.Algebra.Subalgebra.Lattice" ]
Mathlib/Algebra/TrivSqZeroExt.lean
addGroup
null