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
⌀ |
|---|---|---|---|---|---|---|
disc {R : Type*} [Ring R] (P : Cubic R) : R :=
P.b ^ 2 * P.c ^ 2 - 4 * P.a * P.c ^ 3 - 4 * P.b ^ 3 * P.d - 27 * P.a ^ 2 * P.d ^ 2 +
18 * P.a * P.b * P.c * P.d
|
def
|
Algebra
|
[
"Mathlib.Algebra.Polynomial.Splits",
"Mathlib.Tactic.IntervalCases"
] |
Mathlib/Algebra/CubicDiscriminant.lean
|
disc
|
The discriminant of a cubic polynomial.
|
disc_eq_prod_three_roots (ha : P.a ≠ 0) (h3 : (map φ P).roots = {x, y, z}) :
φ P.disc = (φ P.a * φ P.a * (x - y) * (x - z) * (y - z)) ^ 2 := by
simp only [disc, RingHom.map_add, RingHom.map_sub, RingHom.map_mul, map_pow, map_ofNat]
rw [b_eq_three_roots ha h3, c_eq_three_roots ha h3, d_eq_three_roots ha h3]
ring1
|
theorem
|
Algebra
|
[
"Mathlib.Algebra.Polynomial.Splits",
"Mathlib.Tactic.IntervalCases"
] |
Mathlib/Algebra/CubicDiscriminant.lean
|
disc_eq_prod_three_roots
| null |
disc_ne_zero_iff_roots_ne (ha : P.a ≠ 0) (h3 : (map φ P).roots = {x, y, z}) :
P.disc ≠ 0 ↔ x ≠ y ∧ x ≠ z ∧ y ≠ z := by
rw [← _root_.map_ne_zero φ, disc_eq_prod_three_roots ha h3, pow_two]
simp_rw [mul_ne_zero_iff, sub_ne_zero, _root_.map_ne_zero, and_self_iff, and_iff_right ha,
and_assoc]
|
theorem
|
Algebra
|
[
"Mathlib.Algebra.Polynomial.Splits",
"Mathlib.Tactic.IntervalCases"
] |
Mathlib/Algebra/CubicDiscriminant.lean
|
disc_ne_zero_iff_roots_ne
| null |
disc_ne_zero_iff_roots_nodup (ha : P.a ≠ 0) (h3 : (map φ P).roots = {x, y, z}) :
P.disc ≠ 0 ↔ (map φ P).roots.Nodup := by
rw [disc_ne_zero_iff_roots_ne ha h3, h3]
change _ ↔ (x ::ₘ y ::ₘ {z}).Nodup
rw [nodup_cons, nodup_cons, mem_cons, mem_singleton, mem_singleton]
simp only [nodup_singleton]
tauto
|
theorem
|
Algebra
|
[
"Mathlib.Algebra.Polynomial.Splits",
"Mathlib.Tactic.IntervalCases"
] |
Mathlib/Algebra/CubicDiscriminant.lean
|
disc_ne_zero_iff_roots_nodup
| null |
card_roots_of_disc_ne_zero [DecidableEq K] (ha : P.a ≠ 0) (h3 : (map φ P).roots = {x, y, z})
(hd : P.disc ≠ 0) : (map φ P).roots.toFinset.card = 3 := by
rw [toFinset_card_of_nodup <| (disc_ne_zero_iff_roots_nodup ha h3).mp hd,
← splits_iff_card_roots ha, splits_iff_roots_eq_three ha]
exact ⟨x, ⟨y, ⟨z, h3⟩⟩⟩
|
theorem
|
Algebra
|
[
"Mathlib.Algebra.Polynomial.Splits",
"Mathlib.Tactic.IntervalCases"
] |
Mathlib/Algebra/CubicDiscriminant.lean
|
card_roots_of_disc_ne_zero
| null |
DualNumber (R : Type*) : Type _ :=
TrivSqZeroExt R R
|
abbrev
|
Algebra
|
[
"Mathlib.Algebra.TrivSqZeroExt"
] |
Mathlib/Algebra/DualNumber.lean
|
DualNumber
|
The type of dual numbers, numbers of the form $a + bε$ where $ε^2 = 0$.
`R[ε]` is notation for `DualNumber R`.
|
DualNumber.eps [Zero R] [One R] : DualNumber R :=
TrivSqZeroExt.inr 1
@[inherit_doc]
scoped[DualNumber] notation "ε" => DualNumber.eps
@[inherit_doc]
scoped[DualNumber] postfix:1024 "[ε]" => DualNumber
open DualNumber
|
def
|
Algebra
|
[
"Mathlib.Algebra.TrivSqZeroExt"
] |
Mathlib/Algebra/DualNumber.lean
|
DualNumber.eps
|
The unit element $ε$ that squares to zero, with notation `ε`.
|
@[simp]
fst_eps [Zero R] [One R] : fst ε = (0 : R) :=
rfl
@[simp]
|
theorem
|
Algebra
|
[
"Mathlib.Algebra.TrivSqZeroExt"
] |
Mathlib/Algebra/DualNumber.lean
|
fst_eps
| null |
snd_eps [Zero R] [One R] : snd ε = (1 : R) :=
rfl
|
theorem
|
Algebra
|
[
"Mathlib.Algebra.TrivSqZeroExt"
] |
Mathlib/Algebra/DualNumber.lean
|
snd_eps
| null |
@[simp]
snd_mul [Semiring R] (x y : R[ε]) : snd (x * y) = fst x * snd y + snd x * fst y :=
rfl
@[simp]
|
theorem
|
Algebra
|
[
"Mathlib.Algebra.TrivSqZeroExt"
] |
Mathlib/Algebra/DualNumber.lean
|
snd_mul
|
A version of `TrivSqZeroExt.snd_mul` with `*` instead of `•`.
|
eps_mul_eps [Semiring R] : (ε * ε : R[ε]) = 0 :=
inr_mul_inr _ _ _
@[simp]
|
theorem
|
Algebra
|
[
"Mathlib.Algebra.TrivSqZeroExt"
] |
Mathlib/Algebra/DualNumber.lean
|
eps_mul_eps
| null |
inv_eps [DivisionRing R] : (ε : R[ε])⁻¹ = 0 :=
TrivSqZeroExt.inv_inr 1
@[simp]
|
theorem
|
Algebra
|
[
"Mathlib.Algebra.TrivSqZeroExt"
] |
Mathlib/Algebra/DualNumber.lean
|
inv_eps
| null |
inr_eq_smul_eps [MulZeroOneClass R] (r : R) : inr r = (r • ε : R[ε]) :=
ext (mul_zero r).symm (mul_one r).symm
|
theorem
|
Algebra
|
[
"Mathlib.Algebra.TrivSqZeroExt"
] |
Mathlib/Algebra/DualNumber.lean
|
inr_eq_smul_eps
| null |
commute_eps_left [Semiring R] (x : DualNumber R) : Commute ε x := by
ext <;> simp
|
theorem
|
Algebra
|
[
"Mathlib.Algebra.TrivSqZeroExt"
] |
Mathlib/Algebra/DualNumber.lean
|
commute_eps_left
|
`ε` commutes with every element of the algebra.
|
commute_eps_right [Semiring R] (x : DualNumber R) : Commute x ε := (commute_eps_left x).symm
variable {A : Type*} [CommSemiring R] [Semiring A] [Semiring B] [Algebra R A] [Algebra R B]
|
theorem
|
Algebra
|
[
"Mathlib.Algebra.TrivSqZeroExt"
] |
Mathlib/Algebra/DualNumber.lean
|
commute_eps_right
|
`ε` commutes with every element of the algebra.
|
@[ext 1200]
algHom_ext ⦃f g : R[ε] →ₐ[R] A⦄ (hε : f ε = g ε) : f = g := by
ext
dsimp
simp only [one_smul, hε]
|
theorem
|
Algebra
|
[
"Mathlib.Algebra.TrivSqZeroExt"
] |
Mathlib/Algebra/DualNumber.lean
|
algHom_ext
|
For two `R`-algebra morphisms out of `A[ε]` to agree, it suffices for them to agree on the
elements of `A` and the `A`-multiples of `ε`. -/
@[ext 1100]
nonrec theorem algHom_ext' ⦃f g : A[ε] →ₐ[R] B⦄
(hinl : f.comp (inlAlgHom _ _ _) = g.comp (inlAlgHom _ _ _))
(hinr : f.toLinearMap ∘ₗ (LinearMap.toSpanSingleton A A[ε] ε).restrictScalars R =
g.toLinearMap ∘ₗ (LinearMap.toSpanSingleton A A[ε] ε).restrictScalars R) :
f = g :=
algHom_ext' hinl (by
ext a
change f (inr a) = g (inr a)
simpa only [inr_eq_smul_eps] using DFunLike.congr_fun hinr a)
/-- For two `R`-algebra morphisms out of `R[ε]` to agree, it suffices for them to agree on `ε`.
|
lift :
{fe : (A →ₐ[R] B) × B // fe.2 * fe.2 = 0 ∧ ∀ a, Commute fe.2 (fe.1 a)} ≃ (A[ε] →ₐ[R] B) := by
refine Equiv.trans ?_ TrivSqZeroExt.liftEquiv
exact {
toFun := fun fe => ⟨
(fe.val.1, MulOpposite.op fe.val.2 • fe.val.1.toLinearMap),
fun x y => show (fe.val.1 x * fe.val.2) * (fe.val.1 y * fe.val.2) = 0 by
rw [(fe.prop.2 _).mul_mul_mul_comm, fe.prop.1, mul_zero],
fun r x => show fe.val.1 (r * x) * fe.val.2 = fe.val.1 r * (fe.val.1 x * fe.val.2) by
rw [map_mul, mul_assoc],
fun r x => show fe.val.1 (x * r) * fe.val.2 = (fe.val.1 x * fe.val.2) * fe.val.1 r by
rw [map_mul, (fe.prop.2 _).right_comm]⟩
invFun := fun fg => ⟨
(fg.val.1, fg.val.2 1),
fg.prop.1 _ _,
fun a => show fg.val.2 1 * fg.val.1 a = fg.val.1 a * fg.val.2 1 by
rw [← fg.prop.2.1, ← fg.prop.2.2, smul_eq_mul, op_smul_eq_mul, mul_one, one_mul]⟩
left_inv := fun fe => Subtype.ext <| Prod.ext rfl <|
show fe.val.1 1 * fe.val.2 = fe.val.2 by
rw [map_one, one_mul]
right_inv := fun fg => Subtype.ext <| Prod.ext rfl <| LinearMap.ext fun x =>
show fg.val.1 x * fg.val.2 1 = fg.val.2 x by
rw [← fg.prop.2.1, smul_eq_mul, mul_one] }
|
def
|
Algebra
|
[
"Mathlib.Algebra.TrivSqZeroExt"
] |
Mathlib/Algebra/DualNumber.lean
|
lift
|
A universal property of the dual numbers, providing a unique `A[ε] →ₐ[R] B` for every map
`f : A →ₐ[R] B` and a choice of element `e : B` which squares to `0` and commutes with the range of
`f`.
This isomorphism is named to match the similar `Complex.lift`.
Note that when `f : R →ₐ[R] B := Algebra.ofId R B`, the commutativity assumption is automatic, and
we are free to choose any element `e : B`.
|
lift_apply_apply (fe : {_fe : (A →ₐ[R] B) × B // _}) (a : A[ε]) :
lift fe a = fe.val.1 a.fst + fe.val.1 a.snd * fe.val.2 := rfl
@[simp] theorem coe_lift_symm_apply (F : A[ε] →ₐ[R] B) :
(lift.symm F).val = (F.comp (inlAlgHom _ _ _), F ε) := rfl
|
theorem
|
Algebra
|
[
"Mathlib.Algebra.TrivSqZeroExt"
] |
Mathlib/Algebra/DualNumber.lean
|
lift_apply_apply
| null |
@[simp] lift_apply_inl (fe : {_fe : (A →ₐ[R] B) × B // _}) (a : A) :
lift fe (inl a : A[ε]) = fe.val.1 a := by
rw [lift_apply_apply, fst_inl, snd_inl, map_zero, zero_mul, add_zero]
@[simp] theorem lift_comp_inlHom (fe : {_fe : (A →ₐ[R] B) × B // _}) :
(lift fe).comp (inlAlgHom R A A) = fe.val.1 :=
AlgHom.ext <| lift_apply_inl fe
|
theorem
|
Algebra
|
[
"Mathlib.Algebra.TrivSqZeroExt"
] |
Mathlib/Algebra/DualNumber.lean
|
lift_apply_inl
|
When applied to `inl`, `DualNumber.lift` applies the map `f : A →ₐ[R] B`.
|
@[simp] lift_smul (fe : {_fe : (A →ₐ[R] B) × B // _}) (a : A) (ad : A[ε]) :
lift fe (a • ad) = fe.val.1 a * lift fe ad := by
rw [← inl_mul_eq_smul, map_mul, lift_apply_inl]
|
theorem
|
Algebra
|
[
"Mathlib.Algebra.TrivSqZeroExt"
] |
Mathlib/Algebra/DualNumber.lean
|
lift_smul
|
Scaling on the left is sent by `DualNumber.lift` to multiplication on the left
|
@[simp] lift_op_smul (fe : {_fe : (A →ₐ[R] B) × B // _}) (a : A) (ad : A[ε]) :
lift fe (MulOpposite.op a • ad) = lift fe ad * fe.val.1 a := by
rw [← mul_inl_eq_op_smul, map_mul, lift_apply_inl]
|
theorem
|
Algebra
|
[
"Mathlib.Algebra.TrivSqZeroExt"
] |
Mathlib/Algebra/DualNumber.lean
|
lift_op_smul
|
Scaling on the right is sent by `DualNumber.lift` to multiplication on the right
|
@[simp] lift_apply_eps
(fe : {fe : (A →ₐ[R] B) × B // fe.2 * fe.2 = 0 ∧ ∀ a, Commute fe.2 (fe.1 a)}) :
lift fe (ε : A[ε]) = fe.val.2 := by
simp only [lift_apply_apply, fst_eps, map_zero, snd_eps, map_one, one_mul, zero_add]
|
theorem
|
Algebra
|
[
"Mathlib.Algebra.TrivSqZeroExt"
] |
Mathlib/Algebra/DualNumber.lean
|
lift_apply_eps
|
When applied to `ε`, `DualNumber.lift` produces the element of `B` that squares to 0.
|
@[simp]
lift_inlAlgHom_eps :
lift ⟨(inlAlgHom _ _ _, ε), eps_mul_eps, fun _ => commute_eps_left _⟩ = AlgHom.id R A[ε] :=
lift.apply_symm_apply <| AlgHom.id R A[ε]
@[simp]
|
theorem
|
Algebra
|
[
"Mathlib.Algebra.TrivSqZeroExt"
] |
Mathlib/Algebra/DualNumber.lean
|
lift_inlAlgHom_eps
|
Lifting `DualNumber.eps` itself gives the identity.
|
range_inlAlgHom_sup_adjoin_eps :
(inlAlgHom R A A).range ⊔ Algebra.adjoin R {ε} = ⊤ := by
refine top_unique fun x hx => ?_; clear hx
rw [← x.inl_fst_add_inr_snd_eq, inr_eq_smul_eps, ← inl_mul_eq_smul]
refine add_mem ?_ (mul_mem ?_ ?_)
· exact le_sup_left (α := Subalgebra R _) <| Set.mem_range_self x.fst
· exact le_sup_left (α := Subalgebra R _) <| Set.mem_range_self x.snd
· refine le_sup_right (α := Subalgebra R _) <| Algebra.subset_adjoin <| Set.mem_singleton ε
@[simp]
|
theorem
|
Algebra
|
[
"Mathlib.Algebra.TrivSqZeroExt"
] |
Mathlib/Algebra/DualNumber.lean
|
range_inlAlgHom_sup_adjoin_eps
| null |
range_lift
(fe : {fe : (A →ₐ[R] B) × B // fe.2 * fe.2 = 0 ∧ ∀ a, Commute fe.2 (fe.1 a)}) :
(lift fe).range = fe.1.1.range ⊔ Algebra.adjoin R {fe.1.2} := by
simp_rw [← Algebra.map_top, ← range_inlAlgHom_sup_adjoin_eps, Algebra.map_sup,
AlgHom.map_adjoin, ← AlgHom.range_comp, Set.image_singleton, lift_apply_eps, lift_comp_inlHom,
Algebra.map_top]
|
theorem
|
Algebra
|
[
"Mathlib.Algebra.TrivSqZeroExt"
] |
Mathlib/Algebra/DualNumber.lean
|
range_lift
| null |
instRepr [Repr R] : Repr (DualNumber R) where
reprPrec f p :=
(if p > 65 then (Std.Format.bracket "(" · ")") else (·)) <|
reprPrec f.fst 65 ++ " + " ++ reprPrec f.snd 70 ++ "*ε"
|
instance
|
Algebra
|
[
"Mathlib.Algebra.TrivSqZeroExt"
] |
Mathlib/Algebra/DualNumber.lean
|
instRepr
|
Show DualNumber with values x and y as an "x + y*ε" string
|
dualNumberEquiv : Quaternion (DualNumber R) ≃ₐ[R] DualNumber (Quaternion R) where
toFun q :=
(⟨q.re.fst, q.imI.fst, q.imJ.fst, q.imK.fst⟩, ⟨q.re.snd, q.imI.snd, q.imJ.snd, q.imK.snd⟩)
invFun d :=
⟨(d.fst.re, d.snd.re), (d.fst.imI, d.snd.imI), (d.fst.imJ, d.snd.imJ), (d.fst.imK, d.snd.imK)⟩
map_mul' := by
intros
ext : 1
· rfl
· dsimp
congr 1 <;> simp <;> ring
map_add' := by
intros
rfl
commutes' _ := rfl
/-! Lemmas characterizing `Quaternion.dualNumberEquiv`. -/
@[simp]
|
def
|
Algebra
|
[
"Mathlib.Algebra.DualNumber",
"Mathlib.Algebra.Quaternion"
] |
Mathlib/Algebra/DualQuaternion.lean
|
dualNumberEquiv
|
The dual quaternions can be equivalently represented as a quaternion with dual coefficients,
or as a dual number with quaternion coefficients.
See also `Matrix.dualNumberEquiv` for a similar result.
|
re_fst_dualNumberEquiv (q : Quaternion (DualNumber R)) :
(dualNumberEquiv q).fst.re = q.re.fst :=
rfl
@[simp]
|
theorem
|
Algebra
|
[
"Mathlib.Algebra.DualNumber",
"Mathlib.Algebra.Quaternion"
] |
Mathlib/Algebra/DualQuaternion.lean
|
re_fst_dualNumberEquiv
| null |
imI_fst_dualNumberEquiv (q : Quaternion (DualNumber R)) :
(dualNumberEquiv q).fst.imI = q.imI.fst :=
rfl
@[simp]
|
theorem
|
Algebra
|
[
"Mathlib.Algebra.DualNumber",
"Mathlib.Algebra.Quaternion"
] |
Mathlib/Algebra/DualQuaternion.lean
|
imI_fst_dualNumberEquiv
| null |
imJ_fst_dualNumberEquiv (q : Quaternion (DualNumber R)) :
(dualNumberEquiv q).fst.imJ = q.imJ.fst :=
rfl
@[simp]
|
theorem
|
Algebra
|
[
"Mathlib.Algebra.DualNumber",
"Mathlib.Algebra.Quaternion"
] |
Mathlib/Algebra/DualQuaternion.lean
|
imJ_fst_dualNumberEquiv
| null |
imK_fst_dualNumberEquiv (q : Quaternion (DualNumber R)) :
(dualNumberEquiv q).fst.imK = q.imK.fst :=
rfl
@[simp]
|
theorem
|
Algebra
|
[
"Mathlib.Algebra.DualNumber",
"Mathlib.Algebra.Quaternion"
] |
Mathlib/Algebra/DualQuaternion.lean
|
imK_fst_dualNumberEquiv
| null |
re_snd_dualNumberEquiv (q : Quaternion (DualNumber R)) :
(dualNumberEquiv q).snd.re = q.re.snd :=
rfl
@[simp]
|
theorem
|
Algebra
|
[
"Mathlib.Algebra.DualNumber",
"Mathlib.Algebra.Quaternion"
] |
Mathlib/Algebra/DualQuaternion.lean
|
re_snd_dualNumberEquiv
| null |
imI_snd_dualNumberEquiv (q : Quaternion (DualNumber R)) :
(dualNumberEquiv q).snd.imI = q.imI.snd :=
rfl
@[simp]
|
theorem
|
Algebra
|
[
"Mathlib.Algebra.DualNumber",
"Mathlib.Algebra.Quaternion"
] |
Mathlib/Algebra/DualQuaternion.lean
|
imI_snd_dualNumberEquiv
| null |
imJ_snd_dualNumberEquiv (q : Quaternion (DualNumber R)) :
(dualNumberEquiv q).snd.imJ = q.imJ.snd :=
rfl
@[simp]
|
theorem
|
Algebra
|
[
"Mathlib.Algebra.DualNumber",
"Mathlib.Algebra.Quaternion"
] |
Mathlib/Algebra/DualQuaternion.lean
|
imJ_snd_dualNumberEquiv
| null |
imK_snd_dualNumberEquiv (q : Quaternion (DualNumber R)) :
(dualNumberEquiv q).snd.imK = q.imK.snd :=
rfl
@[simp]
|
theorem
|
Algebra
|
[
"Mathlib.Algebra.DualNumber",
"Mathlib.Algebra.Quaternion"
] |
Mathlib/Algebra/DualQuaternion.lean
|
imK_snd_dualNumberEquiv
| null |
fst_re_dualNumberEquiv_symm (d : DualNumber (Quaternion R)) :
(dualNumberEquiv.symm d).re.fst = d.fst.re :=
rfl
@[simp]
|
theorem
|
Algebra
|
[
"Mathlib.Algebra.DualNumber",
"Mathlib.Algebra.Quaternion"
] |
Mathlib/Algebra/DualQuaternion.lean
|
fst_re_dualNumberEquiv_symm
| null |
fst_imI_dualNumberEquiv_symm (d : DualNumber (Quaternion R)) :
(dualNumberEquiv.symm d).imI.fst = d.fst.imI :=
rfl
@[simp]
|
theorem
|
Algebra
|
[
"Mathlib.Algebra.DualNumber",
"Mathlib.Algebra.Quaternion"
] |
Mathlib/Algebra/DualQuaternion.lean
|
fst_imI_dualNumberEquiv_symm
| null |
fst_imJ_dualNumberEquiv_symm (d : DualNumber (Quaternion R)) :
(dualNumberEquiv.symm d).imJ.fst = d.fst.imJ :=
rfl
@[simp]
|
theorem
|
Algebra
|
[
"Mathlib.Algebra.DualNumber",
"Mathlib.Algebra.Quaternion"
] |
Mathlib/Algebra/DualQuaternion.lean
|
fst_imJ_dualNumberEquiv_symm
| null |
fst_imK_dualNumberEquiv_symm (d : DualNumber (Quaternion R)) :
(dualNumberEquiv.symm d).imK.fst = d.fst.imK :=
rfl
@[simp]
|
theorem
|
Algebra
|
[
"Mathlib.Algebra.DualNumber",
"Mathlib.Algebra.Quaternion"
] |
Mathlib/Algebra/DualQuaternion.lean
|
fst_imK_dualNumberEquiv_symm
| null |
snd_re_dualNumberEquiv_symm (d : DualNumber (Quaternion R)) :
(dualNumberEquiv.symm d).re.snd = d.snd.re :=
rfl
@[simp]
|
theorem
|
Algebra
|
[
"Mathlib.Algebra.DualNumber",
"Mathlib.Algebra.Quaternion"
] |
Mathlib/Algebra/DualQuaternion.lean
|
snd_re_dualNumberEquiv_symm
| null |
snd_imI_dualNumberEquiv_symm (d : DualNumber (Quaternion R)) :
(dualNumberEquiv.symm d).imI.snd = d.snd.imI :=
rfl
@[simp]
|
theorem
|
Algebra
|
[
"Mathlib.Algebra.DualNumber",
"Mathlib.Algebra.Quaternion"
] |
Mathlib/Algebra/DualQuaternion.lean
|
snd_imI_dualNumberEquiv_symm
| null |
snd_imJ_dualNumberEquiv_symm (d : DualNumber (Quaternion R)) :
(dualNumberEquiv.symm d).imJ.snd = d.snd.imJ :=
rfl
@[simp]
|
theorem
|
Algebra
|
[
"Mathlib.Algebra.DualNumber",
"Mathlib.Algebra.Quaternion"
] |
Mathlib/Algebra/DualQuaternion.lean
|
snd_imJ_dualNumberEquiv_symm
| null |
snd_imK_dualNumberEquiv_symm (d : DualNumber (Quaternion R)) :
(dualNumberEquiv.symm d).imK.snd = d.snd.imK :=
rfl
|
theorem
|
Algebra
|
[
"Mathlib.Algebra.DualNumber",
"Mathlib.Algebra.Quaternion"
] |
Mathlib/Algebra/DualQuaternion.lean
|
snd_imK_dualNumberEquiv_symm
| null |
Exact [Zero P] : Prop := ∀ y, g y = 0 ↔ y ∈ Set.range f
variable {f g}
|
def
|
Algebra
|
[
"Mathlib.Algebra.Module.Submodule.Range",
"Mathlib.LinearAlgebra.Prod",
"Mathlib.LinearAlgebra.Quotient.Basic"
] |
Mathlib/Algebra/Exact.lean
|
Exact
|
The maps `f` and `g` form an exact pair :
`g y = 0` iff `y` belongs to the image of `f`
|
apply_apply_eq_zero [Zero P] (h : Exact f g) (x : M) :
g (f x) = 0 := (h _).mpr <| Set.mem_range_self _
|
lemma
|
Algebra
|
[
"Mathlib.Algebra.Module.Submodule.Range",
"Mathlib.LinearAlgebra.Prod",
"Mathlib.LinearAlgebra.Quotient.Basic"
] |
Mathlib/Algebra/Exact.lean
|
apply_apply_eq_zero
| null |
comp_eq_zero [Zero P] (h : Exact f g) : g.comp f = 0 :=
funext h.apply_apply_eq_zero
|
lemma
|
Algebra
|
[
"Mathlib.Algebra.Module.Submodule.Range",
"Mathlib.LinearAlgebra.Prod",
"Mathlib.LinearAlgebra.Quotient.Basic"
] |
Mathlib/Algebra/Exact.lean
|
comp_eq_zero
| null |
of_comp_of_mem_range [Zero P] (h1 : g ∘ f = 0)
(h2 : ∀ x, g x = 0 → x ∈ Set.range f) : Exact f g :=
fun y => Iff.intro (h2 y) <|
Exists.rec ((forall_apply_eq_imp_iff (p := (g · = 0))).mpr (congrFun h1) y)
|
lemma
|
Algebra
|
[
"Mathlib.Algebra.Module.Submodule.Range",
"Mathlib.LinearAlgebra.Prod",
"Mathlib.LinearAlgebra.Quotient.Basic"
] |
Mathlib/Algebra/Exact.lean
|
of_comp_of_mem_range
| null |
comp_injective [Zero P] [Zero P'] (exact : Exact f g)
(inj : Function.Injective g') (h0 : g' 0 = 0) :
Exact f (g' ∘ g) := by
intro x
refine ⟨fun H => exact x |>.mp <| inj <| h0 ▸ H, ?_⟩
intro H
rw [Function.comp_apply, exact x |>.mpr H, h0]
|
lemma
|
Algebra
|
[
"Mathlib.Algebra.Module.Submodule.Range",
"Mathlib.LinearAlgebra.Prod",
"Mathlib.LinearAlgebra.Quotient.Basic"
] |
Mathlib/Algebra/Exact.lean
|
comp_injective
| null |
of_comp_eq_zero_of_ker_in_range [Zero P] (hc : g.comp f = 0)
(hr : ∀ y, g y = 0 → y ∈ Set.range f) :
Exact f g :=
fun y ↦ ⟨hr y, fun ⟨x, hx⟩ ↦ hx ▸ congrFun hc x⟩
|
lemma
|
Algebra
|
[
"Mathlib.Algebra.Module.Submodule.Range",
"Mathlib.LinearAlgebra.Prod",
"Mathlib.LinearAlgebra.Quotient.Basic"
] |
Mathlib/Algebra/Exact.lean
|
of_comp_eq_zero_of_ker_in_range
| null |
iff_rangeFactorization [Zero P] (hg : 0 ∈ Set.range g) :
letI : Zero (Set.range g) := ⟨⟨0, hg⟩⟩
Exact f g ↔ Exact ((↑) : Set.range f → N) (Set.rangeFactorization g) := by
letI : Zero (Set.range g) := ⟨⟨0, hg⟩⟩
have : ((0 : Set.range g) : P) = 0 := rfl
simp [Exact, Set.rangeFactorization, Subtype.ext_iff, this]
|
lemma
|
Algebra
|
[
"Mathlib.Algebra.Module.Submodule.Range",
"Mathlib.LinearAlgebra.Prod",
"Mathlib.LinearAlgebra.Quotient.Basic"
] |
Mathlib/Algebra/Exact.lean
|
iff_rangeFactorization
|
Two maps `f : M → N` and `g : N → P` are exact if and only if the induced maps
`Set.range f → N → Set.range g` are exact.
Note that if you already have an instance `[Zero (Set.range g)]` (which is unlikely) this lemma
may not apply if the zero of `Set.range g` is not definitionally equal to `⟨0, hg⟩`.
|
rangeFactorization [Zero P] (h : Exact f g) (hg : 0 ∈ Set.range g) :
letI : Zero (Set.range g) := ⟨⟨0, hg⟩⟩
Exact ((↑) : Set.range f → N) (Set.rangeFactorization g) :=
(iff_rangeFactorization hg).1 h
|
lemma
|
Algebra
|
[
"Mathlib.Algebra.Module.Submodule.Range",
"Mathlib.LinearAlgebra.Prod",
"Mathlib.LinearAlgebra.Quotient.Basic"
] |
Mathlib/Algebra/Exact.lean
|
rangeFactorization
|
If two maps `f : M → N` and `g : N → P` are exact, then the induced maps
`Set.range f → N → Set.range g` are exact.
Note that if you already have an instance `[Zero (Set.range g)]` (which is unlikely) this lemma
may not apply if the zero of `Set.range g` is not definitionally equal to `⟨0, hg⟩`.
|
exact_iff :
Exact f g ↔ ker g = range f :=
Iff.symm SetLike.ext_iff
|
lemma
|
Algebra
|
[
"Mathlib.Algebra.Module.Submodule.Range",
"Mathlib.LinearAlgebra.Prod",
"Mathlib.LinearAlgebra.Quotient.Basic"
] |
Mathlib/Algebra/Exact.lean
|
exact_iff
| null |
exact_of_comp_eq_zero_of_ker_le_range
(h1 : g.comp f = 0) (h2 : ker g ≤ range f) : Exact f g :=
Exact.of_comp_of_mem_range (congrArg DFunLike.coe h1) h2
|
lemma
|
Algebra
|
[
"Mathlib.Algebra.Module.Submodule.Range",
"Mathlib.LinearAlgebra.Prod",
"Mathlib.LinearAlgebra.Quotient.Basic"
] |
Mathlib/Algebra/Exact.lean
|
exact_of_comp_eq_zero_of_ker_le_range
| null |
exact_of_comp_of_mem_range
(h1 : g.comp f = 0) (h2 : ∀ x, g x = 0 → x ∈ range f) : Exact f g :=
exact_of_comp_eq_zero_of_ker_le_range h1 h2
|
lemma
|
Algebra
|
[
"Mathlib.Algebra.Module.Submodule.Range",
"Mathlib.LinearAlgebra.Prod",
"Mathlib.LinearAlgebra.Quotient.Basic"
] |
Mathlib/Algebra/Exact.lean
|
exact_of_comp_of_mem_range
| null |
exact_iff_of_surjective_of_bijective_of_injective
{M₁ M₂ M₃ N₁ N₂ N₃ : Type*} [AddCommMonoid M₁] [AddCommMonoid M₂] [AddCommMonoid M₃]
[AddCommMonoid N₁] [AddCommMonoid N₂] [AddCommMonoid N₃]
(f : M₁ →+ M₂) (g : M₂ →+ M₃) (f' : N₁ →+ N₂) (g' : N₂ →+ N₃)
(τ₁ : M₁ →+ N₁) (τ₂ : M₂ →+ N₂) (τ₃ : M₃ →+ N₃)
(comm₁₂ : f'.comp τ₁ = τ₂.comp f)
(comm₂₃ : g'.comp τ₂ = τ₃.comp g)
(h₁ : Function.Surjective τ₁) (h₂ : Function.Bijective τ₂) (h₃ : Function.Injective τ₃) :
Exact f g ↔ Exact f' g' := by
replace comm₁₂ := DFunLike.congr_fun comm₁₂
replace comm₂₃ := DFunLike.congr_fun comm₂₃
dsimp at comm₁₂ comm₂₃
constructor
· intro h y₂
obtain ⟨x₂, rfl⟩ := h₂.2 y₂
constructor
· intro hx₂
obtain ⟨x₁, rfl⟩ := (h x₂).1 (h₃ (by simpa only [map_zero, comm₂₃] using hx₂))
exact ⟨τ₁ x₁, by simp only [comm₁₂]⟩
· rintro ⟨y₁, hy₁⟩
obtain ⟨x₁, rfl⟩ := h₁ y₁
rw [comm₂₃, (h x₂).2 _, map_zero]
exact ⟨x₁, h₂.1 (by simpa only [comm₁₂] using hy₁)⟩
· intro h x₂
constructor
· intro hx₂
obtain ⟨y₁, hy₁⟩ := (h (τ₂ x₂)).1 (by simp only [comm₂₃, hx₂, map_zero])
obtain ⟨x₁, rfl⟩ := h₁ y₁
exact ⟨x₁, h₂.1 (by simpa only [comm₁₂] using hy₁)⟩
· rintro ⟨x₁, rfl⟩
apply h₃
simp only [← comm₁₂, ← comm₂₃, h.apply_apply_eq_zero (τ₁ x₁), map_zero]
|
lemma
|
Algebra
|
[
"Mathlib.Algebra.Module.Submodule.Range",
"Mathlib.LinearAlgebra.Prod",
"Mathlib.LinearAlgebra.Quotient.Basic"
] |
Mathlib/Algebra/Exact.lean
|
exact_iff_of_surjective_of_bijective_of_injective
|
When we have a commutative diagram from a sequence of two maps to another,
such that the left vertical map is surjective, the middle vertical map is bijective and the right
vertical map is injective, then the upper row is exact iff the lower row is.
See `ShortComplex.exact_iff_of_epi_of_isIso_of_mono` in the file
`Mathlib/Algebra/Homology/ShortComplex/Exact.lean` for the categorical version of this result.
|
addMonoidHom_ker_eq (hfg : Exact f g) :
ker g = range f :=
SetLike.ext hfg
|
lemma
|
Algebra
|
[
"Mathlib.Algebra.Module.Submodule.Range",
"Mathlib.LinearAlgebra.Prod",
"Mathlib.LinearAlgebra.Quotient.Basic"
] |
Mathlib/Algebra/Exact.lean
|
addMonoidHom_ker_eq
| null |
addMonoidHom_comp_eq_zero (h : Exact f g) : g.comp f = 0 :=
DFunLike.coe_injective h.comp_eq_zero
|
lemma
|
Algebra
|
[
"Mathlib.Algebra.Module.Submodule.Range",
"Mathlib.LinearAlgebra.Prod",
"Mathlib.LinearAlgebra.Quotient.Basic"
] |
Mathlib/Algebra/Exact.lean
|
addMonoidHom_comp_eq_zero
| null |
iff_of_ladder_addEquiv (comm₁₂ : g₁₂.comp e₁ = AddMonoidHom.comp e₂ f₁₂)
(comm₂₃ : g₂₃.comp e₂ = AddMonoidHom.comp e₃ f₂₃) : Exact g₁₂ g₂₃ ↔ Exact f₁₂ f₂₃ :=
(exact_iff_of_surjective_of_bijective_of_injective _ _ _ _ e₁ e₂ e₃ comm₁₂ comm₂₃
e₁.surjective e₂.bijective e₃.injective).symm
|
lemma
|
Algebra
|
[
"Mathlib.Algebra.Module.Submodule.Range",
"Mathlib.LinearAlgebra.Prod",
"Mathlib.LinearAlgebra.Quotient.Basic"
] |
Mathlib/Algebra/Exact.lean
|
iff_of_ladder_addEquiv
| null |
of_ladder_addEquiv_of_exact (comm₁₂ : g₁₂.comp e₁ = AddMonoidHom.comp e₂ f₁₂)
(comm₂₃ : g₂₃.comp e₂ = AddMonoidHom.comp e₃ f₂₃) (H : Exact f₁₂ f₂₃) : Exact g₁₂ g₂₃ :=
(iff_of_ladder_addEquiv _ _ _ comm₁₂ comm₂₃).2 H
|
lemma
|
Algebra
|
[
"Mathlib.Algebra.Module.Submodule.Range",
"Mathlib.LinearAlgebra.Prod",
"Mathlib.LinearAlgebra.Quotient.Basic"
] |
Mathlib/Algebra/Exact.lean
|
of_ladder_addEquiv_of_exact
| null |
of_ladder_addEquiv_of_exact' (comm₁₂ : g₁₂.comp e₁ = AddMonoidHom.comp e₂ f₁₂)
(comm₂₃ : g₂₃.comp e₂ = AddMonoidHom.comp e₃ f₂₃) (H : Exact g₁₂ g₂₃) : Exact f₁₂ f₂₃ :=
(iff_of_ladder_addEquiv _ _ _ comm₁₂ comm₂₃).1 H
|
lemma
|
Algebra
|
[
"Mathlib.Algebra.Module.Submodule.Range",
"Mathlib.LinearAlgebra.Prod",
"Mathlib.LinearAlgebra.Quotient.Basic"
] |
Mathlib/Algebra/Exact.lean
|
of_ladder_addEquiv_of_exact'
| null |
iff_addMonoidHom_rangeRestrict :
Exact f g ↔ Exact f.range.subtype g.rangeRestrict :=
iff_rangeFactorization (zero_mem g.range)
alias ⟨addMonoidHom_rangeRestrict, _⟩ := iff_addMonoidHom_rangeRestrict
|
lemma
|
Algebra
|
[
"Mathlib.Algebra.Module.Submodule.Range",
"Mathlib.LinearAlgebra.Prod",
"Mathlib.LinearAlgebra.Quotient.Basic"
] |
Mathlib/Algebra/Exact.lean
|
iff_addMonoidHom_rangeRestrict
|
Two maps `f : M →+ N` and `g : N →+ P` are exact if and only if the induced maps
`AddMonoidHom.range f → N → AddMonoidHom.range g` are exact.
|
exact_iff :
Exact f g ↔ LinearMap.ker g = LinearMap.range f :=
Iff.symm SetLike.ext_iff
|
lemma
|
Algebra
|
[
"Mathlib.Algebra.Module.Submodule.Range",
"Mathlib.LinearAlgebra.Prod",
"Mathlib.LinearAlgebra.Quotient.Basic"
] |
Mathlib/Algebra/Exact.lean
|
exact_iff
| null |
exact_of_comp_eq_zero_of_ker_le_range
(h1 : g ∘ₗ f = 0) (h2 : ker g ≤ range f) : Exact f g :=
Exact.of_comp_of_mem_range (congrArg DFunLike.coe h1) h2
|
lemma
|
Algebra
|
[
"Mathlib.Algebra.Module.Submodule.Range",
"Mathlib.LinearAlgebra.Prod",
"Mathlib.LinearAlgebra.Quotient.Basic"
] |
Mathlib/Algebra/Exact.lean
|
exact_of_comp_eq_zero_of_ker_le_range
| null |
exact_of_comp_of_mem_range
(h1 : g ∘ₗ f = 0) (h2 : ∀ x, g x = 0 → x ∈ range f) : Exact f g :=
exact_of_comp_eq_zero_of_ker_le_range h1 h2
|
lemma
|
Algebra
|
[
"Mathlib.Algebra.Module.Submodule.Range",
"Mathlib.LinearAlgebra.Prod",
"Mathlib.LinearAlgebra.Quotient.Basic"
] |
Mathlib/Algebra/Exact.lean
|
exact_of_comp_of_mem_range
| null |
exact_subtype_mkQ (Q : Submodule R N) :
Exact (Submodule.subtype Q) (Submodule.mkQ Q) := by
rw [exact_iff, Submodule.ker_mkQ, Submodule.range_subtype Q]
|
lemma
|
Algebra
|
[
"Mathlib.Algebra.Module.Submodule.Range",
"Mathlib.LinearAlgebra.Prod",
"Mathlib.LinearAlgebra.Quotient.Basic"
] |
Mathlib/Algebra/Exact.lean
|
exact_subtype_mkQ
| null |
exact_map_mkQ_range (f : M →ₗ[R] N) :
Exact f (Submodule.mkQ (range f)) :=
exact_iff.mpr <| Submodule.ker_mkQ _
|
lemma
|
Algebra
|
[
"Mathlib.Algebra.Module.Submodule.Range",
"Mathlib.LinearAlgebra.Prod",
"Mathlib.LinearAlgebra.Quotient.Basic"
] |
Mathlib/Algebra/Exact.lean
|
exact_map_mkQ_range
| null |
exact_subtype_ker_map (g : N →ₗ[R] P) :
Exact (Submodule.subtype (ker g)) g :=
exact_iff.mpr <| (Submodule.range_subtype _).symm
@[simp]
|
lemma
|
Algebra
|
[
"Mathlib.Algebra.Module.Submodule.Range",
"Mathlib.LinearAlgebra.Prod",
"Mathlib.LinearAlgebra.Quotient.Basic"
] |
Mathlib/Algebra/Exact.lean
|
exact_subtype_ker_map
| null |
exact_zero_iff_injective {M N : Type*} (P : Type*)
[AddCommGroup M] [AddCommGroup N] [AddCommMonoid P] [Module R N] [Module R M]
[Module R P] (f : M →ₗ[R] N) :
Function.Exact (0 : P →ₗ[R] M) f ↔ Function.Injective f := by
simp [← ker_eq_bot, exact_iff]
|
lemma
|
Algebra
|
[
"Mathlib.Algebra.Module.Submodule.Range",
"Mathlib.LinearAlgebra.Prod",
"Mathlib.LinearAlgebra.Quotient.Basic"
] |
Mathlib/Algebra/Exact.lean
|
exact_zero_iff_injective
| null |
@[simp]
exact_zero_iff_surjective {M N : Type*} (P : Type*)
[AddCommGroup M] [AddCommGroup N] [AddCommMonoid P] [Module R N] [Module R M]
[Module R P] (f : M →ₗ[R] N) :
Function.Exact f (0 : N →ₗ[R] P) ↔ Function.Surjective f := by
simp [← range_eq_top, exact_iff, eq_comm]
|
lemma
|
Algebra
|
[
"Mathlib.Algebra.Module.Submodule.Range",
"Mathlib.LinearAlgebra.Prod",
"Mathlib.LinearAlgebra.Quotient.Basic"
] |
Mathlib/Algebra/Exact.lean
|
exact_zero_iff_surjective
| null |
LinearEquiv.conj_exact_iff_exact (e : N ≃ₗ[R] N') :
Function.Exact (e ∘ₗ f) (g ∘ₗ (e.symm : N' →ₗ[R] N)) ↔ Exact f g := by
simp_rw [LinearMap.exact_iff, LinearMap.ker_comp, ← Submodule.map_equiv_eq_comap_symm,
LinearMap.range_comp]
exact (Submodule.map_injective_of_injective e.injective).eq_iff
|
lemma
|
Algebra
|
[
"Mathlib.Algebra.Module.Submodule.Range",
"Mathlib.LinearAlgebra.Prod",
"Mathlib.LinearAlgebra.Quotient.Basic"
] |
Mathlib/Algebra/Exact.lean
|
LinearEquiv.conj_exact_iff_exact
| null |
Exact.linearMap_ker_eq (hfg : Exact f g) : ker g = range f :=
SetLike.ext hfg
|
lemma
|
Algebra
|
[
"Mathlib.Algebra.Module.Submodule.Range",
"Mathlib.LinearAlgebra.Prod",
"Mathlib.LinearAlgebra.Quotient.Basic"
] |
Mathlib/Algebra/Exact.lean
|
Exact.linearMap_ker_eq
| null |
Exact.linearMap_comp_eq_zero (h : Exact f g) : g.comp f = 0 :=
DFunLike.coe_injective h.comp_eq_zero
|
lemma
|
Algebra
|
[
"Mathlib.Algebra.Module.Submodule.Range",
"Mathlib.LinearAlgebra.Prod",
"Mathlib.LinearAlgebra.Quotient.Basic"
] |
Mathlib/Algebra/Exact.lean
|
Exact.linearMap_comp_eq_zero
| null |
Surjective.comp_exact_iff_exact {p : M' →ₗ[R] M} (h : Surjective p) :
Exact (f ∘ₗ p) g ↔ Exact f g :=
iff_of_eq <| forall_congr fun x =>
congrArg (g x = 0 ↔ x ∈ ·) (h.range_comp f)
|
lemma
|
Algebra
|
[
"Mathlib.Algebra.Module.Submodule.Range",
"Mathlib.LinearAlgebra.Prod",
"Mathlib.LinearAlgebra.Quotient.Basic"
] |
Mathlib/Algebra/Exact.lean
|
Surjective.comp_exact_iff_exact
| null |
Injective.comp_exact_iff_exact {i : P →ₗ[R] P'} (h : Injective i) :
Exact f (i ∘ₗ g) ↔ Exact f g :=
forall_congr' fun _ => iff_congr (LinearMap.map_eq_zero_iff _ h) Iff.rfl
|
lemma
|
Algebra
|
[
"Mathlib.Algebra.Module.Submodule.Range",
"Mathlib.LinearAlgebra.Prod",
"Mathlib.LinearAlgebra.Quotient.Basic"
] |
Mathlib/Algebra/Exact.lean
|
Injective.comp_exact_iff_exact
| null |
iff_of_ladder_linearEquiv
(h₁₂ : g₁₂ ∘ₗ e₁ = e₂ ∘ₗ f₁₂) (h₂₃ : g₂₃ ∘ₗ e₂ = e₃ ∘ₗ f₂₃) :
Exact g₁₂ g₂₃ ↔ Exact f₁₂ f₂₃ :=
iff_of_ladder_addEquiv e₁.toAddEquiv e₂.toAddEquiv e₃.toAddEquiv
(f₁₂ := f₁₂) (f₂₃ := f₂₃) (g₁₂ := g₁₂) (g₂₃ := g₂₃)
(congr_arg LinearMap.toAddMonoidHom h₁₂) (congr_arg LinearMap.toAddMonoidHom h₂₃)
|
lemma
|
Algebra
|
[
"Mathlib.Algebra.Module.Submodule.Range",
"Mathlib.LinearAlgebra.Prod",
"Mathlib.LinearAlgebra.Quotient.Basic"
] |
Mathlib/Algebra/Exact.lean
|
iff_of_ladder_linearEquiv
| null |
of_ladder_linearEquiv_of_exact
(h₁₂ : g₁₂ ∘ₗ e₁ = e₂ ∘ₗ f₁₂) (h₂₃ : g₂₃ ∘ₗ e₂ = e₃ ∘ₗ f₂₃)
(H : Exact f₁₂ f₂₃) : Exact g₁₂ g₂₃ := by
rwa [iff_of_ladder_linearEquiv h₁₂ h₂₃]
|
lemma
|
Algebra
|
[
"Mathlib.Algebra.Module.Submodule.Range",
"Mathlib.LinearAlgebra.Prod",
"Mathlib.LinearAlgebra.Quotient.Basic"
] |
Mathlib/Algebra/Exact.lean
|
of_ladder_linearEquiv_of_exact
| null |
iff_linearMap_rangeRestrict :
Exact f g ↔ Exact (LinearMap.range f).subtype g.rangeRestrict :=
iff_rangeFactorization (zero_mem (LinearMap.range g))
alias ⟨linearMap_rangeRestrict, _⟩ := iff_linearMap_rangeRestrict
|
lemma
|
Algebra
|
[
"Mathlib.Algebra.Module.Submodule.Range",
"Mathlib.LinearAlgebra.Prod",
"Mathlib.LinearAlgebra.Quotient.Basic"
] |
Mathlib/Algebra/Exact.lean
|
iff_linearMap_rangeRestrict
|
Two maps `f : M →ₗ[R] N` and `g : N →ₗ[R] P` are exact if and only if the induced maps
`LinearMap.range f → N → LinearMap.range g` are exact.
|
noncomputable
Exact.splitSurjectiveEquiv (h : Function.Exact f g) (hf : Function.Injective f) :
{ l // g ∘ₗ l = .id } ≃
{ e : N ≃ₗ[R] M × P // f = e.symm ∘ₗ inl R M P ∧ g = snd R M P ∘ₗ e } := by
refine
{ toFun := fun l ↦ ⟨(LinearEquiv.ofBijective (f ∘ₗ fst R M P + l.1 ∘ₗ snd R M P) ?_).symm, ?_⟩
invFun := fun e ↦ ⟨e.1.symm ∘ₗ inr R M P, ?_⟩
left_inv := ?_
right_inv := ?_ }
· have h₁ : ∀ x, g (l.1 x) = x := LinearMap.congr_fun l.2
have h₂ : ∀ x, g (f x) = 0 := congr_fun h.comp_eq_zero
constructor
· intro x y e
simp only [add_apply, coe_comp, comp_apply, fst_apply, snd_apply] at e
suffices x.2 = y.2 from Prod.ext (hf (by rwa [this, add_left_inj] at e)) this
simpa [h₁, h₂] using DFunLike.congr_arg g e
· intro x
obtain ⟨y, hy⟩ := (h (x - l.1 (g x))).mp (by simp [h₁, g.map_sub])
exact ⟨⟨y, g x⟩, by simp [hy]⟩
· have h₁ : ∀ x, g (l.1 x) = x := LinearMap.congr_fun l.2
have h₂ : ∀ x, g (f x) = 0 := congr_fun h.comp_eq_zero
constructor
· ext; simp
· rw [LinearEquiv.eq_comp_toLinearMap_symm]
ext <;> simp [h₁, h₂]
· rw [← LinearMap.comp_assoc, (LinearEquiv.eq_comp_toLinearMap_symm _ _).mp e.2.2]; rfl
· intro; ext; simp
· rintro ⟨e, rfl, rfl⟩
ext1
apply LinearEquiv.symm_bijective.injective
ext
apply e.injective
ext <;> simp
|
def
|
Algebra
|
[
"Mathlib.Algebra.Module.Submodule.Range",
"Mathlib.LinearAlgebra.Prod",
"Mathlib.LinearAlgebra.Quotient.Basic"
] |
Mathlib/Algebra/Exact.lean
|
Exact.splitSurjectiveEquiv
|
Given an exact sequence `0 → M → N → P`, giving a section `P → N` is equivalent to giving a
splitting `N ≃ M × P`.
|
noncomputable
Exact.splitInjectiveEquiv
{R M N P} [Semiring R] [AddCommGroup M] [AddCommGroup N]
[AddCommGroup P] [Module R M] [Module R N] [Module R P] {f : M →ₗ[R] N} {g : N →ₗ[R] P}
(h : Function.Exact f g) (hg : Function.Surjective g) :
{ l // l ∘ₗ f = .id } ≃
{ e : N ≃ₗ[R] M × P // f = e.symm ∘ₗ inl R M P ∧ g = snd R M P ∘ₗ e } := by
refine
{ toFun := fun l ↦ ⟨(LinearEquiv.ofBijective (l.1.prod g) ?_), ?_⟩
invFun := fun e ↦ ⟨fst R M P ∘ₗ e.1, ?_⟩
left_inv := ?_
right_inv := ?_ }
· have h₁ : ∀ x, l.1 (f x) = x := LinearMap.congr_fun l.2
have h₂ : ∀ x, g (f x) = 0 := congr_fun h.comp_eq_zero
constructor
· intro x y e
simp only [prod_apply, Pi.prod, Prod.mk.injEq] at e
obtain ⟨z, hz⟩ := (h (x - y)).mp (by simpa [sub_eq_zero] using e.2)
suffices z = 0 by rw [← sub_eq_zero, ← hz, this, map_zero]
rw [← h₁ z, hz, map_sub, e.1, sub_self]
· rintro ⟨x, y⟩
obtain ⟨y, rfl⟩ := hg y
refine ⟨f x + y - f (l.1 y), by ext <;> simp [h₁, h₂]⟩
· have h₁ : ∀ x, l.1 (f x) = x := LinearMap.congr_fun l.2
have h₂ : ∀ x, g (f x) = 0 := congr_fun h.comp_eq_zero
constructor
· rw [LinearEquiv.eq_toLinearMap_symm_comp]
ext <;> simp [h₁, h₂]
· ext; simp
· rw [LinearMap.comp_assoc, (LinearEquiv.eq_toLinearMap_symm_comp _ _).mp e.2.1]; rfl
· intro; ext; simp
· rintro ⟨e, rfl, rfl⟩
ext x <;> simp
|
def
|
Algebra
|
[
"Mathlib.Algebra.Module.Submodule.Range",
"Mathlib.LinearAlgebra.Prod",
"Mathlib.LinearAlgebra.Quotient.Basic"
] |
Mathlib/Algebra/Exact.lean
|
Exact.splitInjectiveEquiv
|
Given an exact sequence `M → N → P → 0`, giving a retraction `N → M` is equivalent to giving a
splitting `N ≃ M × P`.
|
Exact.split_tfae' (h : Function.Exact f g) :
List.TFAE [
Function.Injective f ∧ ∃ l, g ∘ₗ l = LinearMap.id,
Function.Surjective g ∧ ∃ l, l ∘ₗ f = LinearMap.id,
∃ e : N ≃ₗ[R] M × P, f = e.symm ∘ₗ LinearMap.inl R M P ∧ g = LinearMap.snd R M P ∘ₗ e] := by
tfae_have 1 → 3
| ⟨hf, l, hl⟩ => ⟨_, (h.splitSurjectiveEquiv hf ⟨l, hl⟩).2⟩
tfae_have 2 → 3
| ⟨hg, l, hl⟩ => ⟨_, (h.splitInjectiveEquiv hg ⟨l, hl⟩).2⟩
tfae_have 3 → 1
| ⟨e, e₁, e₂⟩ => by
have : Function.Injective f := e₁ ▸ e.symm.injective.comp LinearMap.inl_injective
exact ⟨this, ⟨_, ((h.splitSurjectiveEquiv this).symm ⟨e, e₁, e₂⟩).2⟩⟩
tfae_have 3 → 2
| ⟨e, e₁, e₂⟩ => by
have : Function.Surjective g := e₂ ▸ Prod.snd_surjective.comp e.surjective
exact ⟨this, ⟨_, ((h.splitInjectiveEquiv this).symm ⟨e, e₁, e₂⟩).2⟩⟩
tfae_finish
|
theorem
|
Algebra
|
[
"Mathlib.Algebra.Module.Submodule.Range",
"Mathlib.LinearAlgebra.Prod",
"Mathlib.LinearAlgebra.Quotient.Basic"
] |
Mathlib/Algebra/Exact.lean
|
Exact.split_tfae'
| null |
Exact.split_tfae
{R M N P} [Semiring R] [AddCommGroup M] [AddCommGroup N]
[AddCommGroup P] [Module R M] [Module R N] [Module R P] {f : M →ₗ[R] N} {g : N →ₗ[R] P}
(h : Function.Exact f g) (hf : Function.Injective f) (hg : Function.Surjective g) :
List.TFAE [
∃ l, g ∘ₗ l = LinearMap.id,
∃ l, l ∘ₗ f = LinearMap.id,
∃ e : N ≃ₗ[R] M × P, f = e.symm ∘ₗ LinearMap.inl R M P ∧ g = LinearMap.snd R M P ∘ₗ e] := by
tfae_have 1 ↔ 3 := by
simpa using (h.splitSurjectiveEquiv hf).nonempty_congr
tfae_have 2 ↔ 3 := by
simpa using (h.splitInjectiveEquiv hg).nonempty_congr
tfae_finish
|
theorem
|
Algebra
|
[
"Mathlib.Algebra.Module.Submodule.Range",
"Mathlib.LinearAlgebra.Prod",
"Mathlib.LinearAlgebra.Quotient.Basic"
] |
Mathlib/Algebra/Exact.lean
|
Exact.split_tfae
|
Equivalent characterizations of split exact sequences. Also known as the **Splitting lemma**.
|
Exact.inr_fst : Function.Exact (LinearMap.inr R M N) (LinearMap.fst R M N) := by
rintro ⟨x, y⟩
simp only [LinearMap.fst_apply, @eq_comm _ x, LinearMap.coe_inr, Set.mem_range, Prod.mk.injEq,
exists_eq_right]
|
lemma
|
Algebra
|
[
"Mathlib.Algebra.Module.Submodule.Range",
"Mathlib.LinearAlgebra.Prod",
"Mathlib.LinearAlgebra.Quotient.Basic"
] |
Mathlib/Algebra/Exact.lean
|
Exact.inr_fst
| null |
Exact.inl_snd : Function.Exact (LinearMap.inl R M N) (LinearMap.snd R M N) := by
rintro ⟨x, y⟩
simp only [LinearMap.snd_apply, @eq_comm _ y, LinearMap.coe_inl, Set.mem_range, Prod.mk.injEq,
exists_eq_left]
|
lemma
|
Algebra
|
[
"Mathlib.Algebra.Module.Submodule.Range",
"Mathlib.LinearAlgebra.Prod",
"Mathlib.LinearAlgebra.Quotient.Basic"
] |
Mathlib/Algebra/Exact.lean
|
Exact.inl_snd
| null |
Exact.exact_mapQ_iff
(hfg : Exact f g) {p q r} (hpq : p ≤ comap f q) (hqr : q ≤ comap g r) :
Exact (mapQ p q f hpq) (mapQ q r g hqr) ↔ range g ⊓ r ≤ map g q := by
rw [exact_iff, ← (comap_injective_of_surjective (mkQ_surjective _)).eq_iff]
dsimp only [mapQ]
rw [← ker_comp, range_liftQ, liftQ_mkQ, ker_comp, range_comp, comap_map_eq,
ker_mkQ, ker_mkQ, ← hfg.linearMap_ker_eq, sup_comm,
← (sup_le hqr (ker_le_comap g)).ge_iff_eq',
← comap_map_eq, ← map_le_iff_le_comap, map_comap_eq]
|
lemma
|
Algebra
|
[
"Mathlib.Algebra.Module.Submodule.Range",
"Mathlib.LinearAlgebra.Prod",
"Mathlib.LinearAlgebra.Quotient.Basic"
] |
Mathlib/Algebra/Exact.lean
|
Exact.exact_mapQ_iff
|
A necessary and sufficient condition for an exact sequence to descend to a quotient.
|
exact_iff_of_surjective_of_bijective_of_injective
{M₁ M₂ M₃ N₁ N₂ N₃ : Type*} [AddCommMonoid M₁] [AddCommMonoid M₂] [AddCommMonoid M₃]
[AddCommMonoid N₁] [AddCommMonoid N₂] [AddCommMonoid N₃]
[Module R M₁] [Module R M₂] [Module R M₃]
[Module R N₁] [Module R N₂] [Module R N₃]
(f : M₁ →ₗ[R] M₂) (g : M₂ →ₗ[R] M₃) (f' : N₁ →ₗ[R] N₂) (g' : N₂ →ₗ[R] N₃)
(τ₁ : M₁ →ₗ[R] N₁) (τ₂ : M₂ →ₗ[R] N₂) (τ₃ : M₃ →ₗ[R] N₃)
(comm₁₂ : f'.comp τ₁ = τ₂.comp f) (comm₂₃ : g'.comp τ₂ = τ₃.comp g)
(h₁ : Function.Surjective τ₁) (h₂ : Function.Bijective τ₂) (h₃ : Function.Injective τ₃) :
Function.Exact f g ↔ Function.Exact f' g' :=
AddMonoidHom.exact_iff_of_surjective_of_bijective_of_injective
f.toAddMonoidHom g.toAddMonoidHom f'.toAddMonoidHom g'.toAddMonoidHom
τ₁.toAddMonoidHom τ₂.toAddMonoidHom τ₃.toAddMonoidHom
(by ext; apply DFunLike.congr_fun comm₁₂) (by ext; apply DFunLike.congr_fun comm₂₃) h₁ h₂ h₃
|
lemma
|
Algebra
|
[
"Mathlib.Algebra.Module.Submodule.Range",
"Mathlib.LinearAlgebra.Prod",
"Mathlib.LinearAlgebra.Quotient.Basic"
] |
Mathlib/Algebra/Exact.lean
|
exact_iff_of_surjective_of_bijective_of_injective
|
When we have a commutative diagram from a sequence of two linear maps to another,
such that the left vertical map is surjective, the middle vertical map is bijective and the right
vertical map is injective, then the upper row is exact iff the lower row is.
See `ShortComplex.exact_iff_of_epi_of_isIso_of_mono` in the file
`Mathlib/Algebra/Homology/ShortComplex/Exact.lean` for the categorical version of this result.
|
surjective_range_liftQ (h : range f ≤ ker g) (hg : Function.Surjective g) :
Function.Surjective ((range f).liftQ g h) := by
intro x₃
obtain ⟨x₂, rfl⟩ := hg x₃
exact ⟨Submodule.Quotient.mk x₂, rfl⟩
|
lemma
|
Algebra
|
[
"Mathlib.Algebra.Module.Submodule.Range",
"Mathlib.LinearAlgebra.Prod",
"Mathlib.LinearAlgebra.Quotient.Basic"
] |
Mathlib/Algebra/Exact.lean
|
surjective_range_liftQ
| null |
ker_eq_bot_range_liftQ_iff (h : range f ≤ ker g) :
ker ((range f).liftQ g h) = ⊥ ↔ ker g = range f := by
simp only [Submodule.ext_iff, mem_ker, Submodule.mem_bot, mem_range]
constructor
· intro hfg x
simpa using hfg (Submodule.Quotient.mk x)
· intro hfg x
obtain ⟨x, rfl⟩ := Submodule.Quotient.mk_surjective _ x
simpa using hfg x
|
lemma
|
Algebra
|
[
"Mathlib.Algebra.Module.Submodule.Range",
"Mathlib.LinearAlgebra.Prod",
"Mathlib.LinearAlgebra.Quotient.Basic"
] |
Mathlib/Algebra/Exact.lean
|
ker_eq_bot_range_liftQ_iff
| null |
injective_range_liftQ_of_exact (h : Function.Exact f g) :
Function.Injective ((range f).liftQ g (h · |>.mpr)) := by
simpa only [← LinearMap.ker_eq_bot, ker_eq_bot_range_liftQ_iff, exact_iff] using h
|
lemma
|
Algebra
|
[
"Mathlib.Algebra.Module.Submodule.Range",
"Mathlib.LinearAlgebra.Prod",
"Mathlib.LinearAlgebra.Quotient.Basic"
] |
Mathlib/Algebra/Exact.lean
|
injective_range_liftQ_of_exact
| null |
@[simps! apply]
noncomputable Function.Exact.linearEquivOfSurjective (h : Function.Exact f g)
(hg : Function.Surjective g) : (N ⧸ LinearMap.range f) ≃ₗ[R] P :=
LinearEquiv.ofBijective ((LinearMap.range f).liftQ g (h · |>.mpr))
⟨LinearMap.injective_range_liftQ_of_exact h, LinearMap.surjective_range_liftQ _ hg⟩
|
def
|
Algebra
|
[
"Mathlib.Algebra.Module.Submodule.Range",
"Mathlib.LinearAlgebra.Prod",
"Mathlib.LinearAlgebra.Quotient.Basic"
] |
Mathlib/Algebra/Exact.lean
|
Function.Exact.linearEquivOfSurjective
|
The linear equivalence `(N ⧸ LinearMap.range f) ≃ₗ[A] P` associated to
an exact sequence `M → N → P → 0` of `R`-modules.
|
Expr.instOne {u : Lean.Level} (α : Q(Type u)) (_ : Q(One $α)) : One Q($α) where
one := q(1 : $α)
|
def
|
Algebra
|
[
"Mathlib.Init",
"Qq"
] |
Mathlib/Algebra/Expr.lean
|
Expr.instOne
|
Produce a `One` instance for `Q($α)` such that `1 : Q($α)` is `q(1 : $α)`.
|
Expr.instZero {u : Lean.Level} (α : Q(Type u)) (_ : Q(Zero $α)) : Zero Q($α) where
zero := q(0 : $α)
|
def
|
Algebra
|
[
"Mathlib.Init",
"Qq"
] |
Mathlib/Algebra/Expr.lean
|
Expr.instZero
|
Produce a `Zero` instance for `Q($α)` such that `0 : Q($α)` is `q(0 : $α)`.
|
Expr.instMul {u : Lean.Level} (α : Q(Type u)) (_ : Q(Mul $α)) : Mul Q($α) where
mul x y := q($x * $y)
|
def
|
Algebra
|
[
"Mathlib.Init",
"Qq"
] |
Mathlib/Algebra/Expr.lean
|
Expr.instMul
|
Produce a `Mul` instance for `Q($α)` such that `x * y : Q($α)` is `q($x * $y)`.
|
Expr.instAdd {u : Lean.Level} (α : Q(Type u)) (_ : Q(Add $α)) : Add Q($α) where
add x y := q($x + $y)
|
def
|
Algebra
|
[
"Mathlib.Init",
"Qq"
] |
Mathlib/Algebra/Expr.lean
|
Expr.instAdd
|
Produce an `Add` instance for `Q($α)` such that `x + y : Q($α)` is `q($x + $y)`.
|
surjective_of_surjective_of_surjective_of_injective (hi₁ : Function.Surjective i₁)
(hi₃ : Function.Surjective i₃) (hi₄ : Function.Injective i₄) :
Function.Surjective i₂ := by
intro x
obtain ⟨y, hy⟩ := hi₃ (g₂ x)
obtain ⟨a, rfl⟩ : y ∈ Set.range f₂ := (hf₂ _).mp <| by
simpa [hy, hg₂.apply_apply_eq_zero, map_eq_zero_iff _ hi₄] using (DFunLike.congr_fun hc₃ y).symm
obtain ⟨b, hb⟩ : x - i₂ a ∈ Set.range g₁ := (hg₁ _).mp <| by
simp [← hy, show g₂ (i₂ a) = i₃ (f₂ a) by simpa using DFunLike.congr_fun hc₂ a]
obtain ⟨o, rfl⟩ := hi₁ b
use f₁ o + a
simp [← show g₁ (i₁ o) = i₂ (f₁ o) by simpa using DFunLike.congr_fun hc₁ o, hb]
include hf₁ hf₂ hg₁ hc₁ hc₂ hc₃ in
|
lemma
|
Algebra
|
[
"Mathlib.Algebra.Exact"
] |
Mathlib/Algebra/FiveLemma.lean
|
surjective_of_surjective_of_surjective_of_injective
|
One four lemma in terms of (additive) groups. For a diagram explaining the variables,
see the module docstring.
|
injective_of_surjective_of_injective_of_injective (hi₁ : Function.Surjective i₁)
(hi₂ : Function.Injective i₂) (hi₄ : Function.Injective i₄) : Function.Injective i₃ := by
rw [injective_iff_map_eq_zero]
intro m hm
obtain ⟨x, rfl⟩ := (hf₂ m).mp <| by
suffices h : i₄ (f₃ m) = 0 by rwa [map_eq_zero_iff _ hi₄] at h
simp [← show g₃ (i₃ m) = i₄ (f₃ m) by simpa using DFunLike.congr_fun hc₃ m, hm]
obtain ⟨y, hy⟩ := (hg₁ _).mp <| by
rwa [show g₂ (i₂ x) = i₃ (f₂ x) by simpa using DFunLike.congr_fun hc₂ x]
obtain ⟨a, rfl⟩ := hi₁ y
rw [show g₁ (i₁ a) = i₂ (f₁ a) by simpa using DFunLike.congr_fun hc₁ a] at hy
apply hi₂ at hy
subst hy
rw [hf₁.apply_apply_eq_zero]
include hf₁ hf₂ hf₃ hg₁ hg₂ hg₃ hc₁ hc₂ hc₃ hc₄ in
|
lemma
|
Algebra
|
[
"Mathlib.Algebra.Exact"
] |
Mathlib/Algebra/FiveLemma.lean
|
injective_of_surjective_of_injective_of_injective
|
One four lemma in terms of (additive) groups. For a diagram explaining the variables,
see the module docstring.
|
bijective_of_surjective_of_bijective_of_bijective_of_injective (hi₁ : Function.Surjective i₁)
(hi₂ : Function.Bijective i₂) (hi₄ : Function.Bijective i₄) (hi₅ : Function.Injective i₅) :
Function.Bijective i₃ :=
⟨injective_of_surjective_of_injective_of_injective f₁ f₂ f₃ g₁ g₂ g₃ i₁ i₂ i₃ i₄
hc₁ hc₂ hc₃ hf₁ hf₂ hg₁ hi₁ hi₂.1 hi₄.1,
surjective_of_surjective_of_surjective_of_injective f₂ f₃ f₄ g₂ g₃ g₄ i₂ i₃ i₄ i₅
hc₂ hc₃ hc₄ hf₃ hg₂ hg₃ hi₂.2 hi₄.2 hi₅⟩
|
lemma
|
Algebra
|
[
"Mathlib.Algebra.Exact"
] |
Mathlib/Algebra/FiveLemma.lean
|
bijective_of_surjective_of_bijective_of_bijective_of_injective
|
The five lemma in terms of (additive) groups. For a diagram explaining the variables,
see the module docstring.
|
surjective_of_surjective_of_surjective_of_injective (hi₁ : Function.Surjective i₁)
(hi₃ : Function.Surjective i₃) (hi₄ : Function.Injective i₄) :
Function.Surjective i₂ :=
AddMonoidHom.surjective_of_surjective_of_surjective_of_injective
f₁.toAddMonoidHom f₂.toAddMonoidHom f₃.toAddMonoidHom g₁.toAddMonoidHom g₂.toAddMonoidHom
g₃.toAddMonoidHom i₁.toAddMonoidHom i₂.toAddMonoidHom i₃.toAddMonoidHom i₄.toAddMonoidHom
(AddMonoidHom.ext fun x ↦ DFunLike.congr_fun hc₁ x)
(AddMonoidHom.ext fun x ↦ DFunLike.congr_fun hc₂ x)
(AddMonoidHom.ext fun x ↦ DFunLike.congr_fun hc₃ x) hf₂ hg₁ hg₂ hi₁ hi₃ hi₄
include hf₁ hf₂ hg₁ hc₁ hc₂ hc₃ in
|
lemma
|
Algebra
|
[
"Mathlib.Algebra.Exact"
] |
Mathlib/Algebra/FiveLemma.lean
|
surjective_of_surjective_of_surjective_of_injective
|
One four lemma in terms of modules. For a diagram explaining the variables,
see the module docstring.
|
injective_of_surjective_of_injective_of_injective (hi₁ : Function.Surjective i₁)
(hi₂ : Function.Injective i₂) (hi₄ : Function.Injective i₄) :
Function.Injective i₃ :=
AddMonoidHom.injective_of_surjective_of_injective_of_injective
f₁.toAddMonoidHom f₂.toAddMonoidHom f₃.toAddMonoidHom g₁.toAddMonoidHom g₂.toAddMonoidHom
g₃.toAddMonoidHom i₁.toAddMonoidHom i₂.toAddMonoidHom i₃.toAddMonoidHom i₄.toAddMonoidHom
(AddMonoidHom.ext fun x ↦ DFunLike.congr_fun hc₁ x)
(AddMonoidHom.ext fun x ↦ DFunLike.congr_fun hc₂ x)
(AddMonoidHom.ext fun x ↦ DFunLike.congr_fun hc₃ x) hf₁ hf₂ hg₁ hi₁ hi₂ hi₄
include hf₁ hf₂ hf₃ hg₁ hg₂ hg₃ hc₁ hc₂ hc₃ hc₄ in
|
lemma
|
Algebra
|
[
"Mathlib.Algebra.Exact"
] |
Mathlib/Algebra/FiveLemma.lean
|
injective_of_surjective_of_injective_of_injective
|
One four lemma in terms of modules. For a diagram explaining the variables,
see the module docstring.
|
bijective_of_surjective_of_bijective_of_bijective_of_injective (hi₁ : Function.Surjective i₁)
(hi₂ : Function.Bijective i₂) (hi₄ : Function.Bijective i₄) (hi₅ : Function.Injective i₅) :
Function.Bijective i₃ :=
⟨injective_of_surjective_of_injective_of_injective f₁ f₂ f₃ g₁ g₂ g₃ i₁ i₂ i₃ i₄
hc₁ hc₂ hc₃ hf₁ hf₂ hg₁ hi₁ hi₂.1 hi₄.1,
surjective_of_surjective_of_surjective_of_injective f₂ f₃ f₄ g₂ g₃ g₄ i₂ i₃ i₄ i₅
hc₂ hc₃ hc₄ hf₃ hg₂ hg₃ hi₂.2 hi₄.2 hi₅⟩
|
lemma
|
Algebra
|
[
"Mathlib.Algebra.Exact"
] |
Mathlib/Algebra/FiveLemma.lean
|
bijective_of_surjective_of_bijective_of_bijective_of_injective
|
The five lemma in terms of modules. For a diagram explaining the variables,
see the module docstring.
|
FreeAddMagma (α : Type u) : Type u
| of : α → FreeAddMagma α
| add : FreeAddMagma α → FreeAddMagma α → FreeAddMagma α
deriving DecidableEq
compile_inductive% FreeAddMagma
set_option genSizeOfSpec false in
set_option genInjectivity false in
|
inductive
|
Algebra
|
[
"Mathlib.Algebra.Group.Basic",
"Mathlib.Algebra.Group.Equiv.Defs",
"Mathlib.Control.Applicative",
"Mathlib.Control.Traversable.Basic",
"Mathlib.Logic.Equiv.Defs",
"Mathlib.Tactic.AdaptationNote"
] |
Mathlib/Algebra/Free.lean
|
FreeAddMagma
|
If `α` is a type, then `FreeAddMagma α` is the free additive magma generated by `α`.
This is an additive magma equipped with a function `FreeAddMagma.of : α → FreeAddMagma α` which has
the following universal property: if `M` is any magma, and `f : α → M` is any function,
then this function is the composite of `FreeAddMagma.of` and a unique additive homomorphism
`FreeAddMagma.lift f : FreeAddMagma α →ₙ+ M`.
A typical element of `FreeAddMagma α` is a formal non-associative sum of
elements of `α`. For example if `x` and `y` are terms of type `α` then `x + ((y + y) + x)` is a
"typical" element of `FreeAddMagma α`.
One can think of `FreeAddMagma α` as the type of binary trees with leaves labelled by `α`.
In general, no pair of distinct elements in `FreeAddMagma α` will commute.
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.