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 ⌀ |
|---|---|---|---|---|---|---|
noncomputable equiv {S T : Set G} (hST : IsComplement S T) : G ≃ S × T :=
(Equiv.ofBijective (fun x : S × T => x.1.1 * x.2.1) hST).symm
variable (hST : IsComplement S T) (hHT : IsComplement H T) (hSK : IsComplement S K)
@[simp] theorem equiv_symm_apply (x : S × T) : (hST.equiv.symm x : G) = x.1.1 * x.2.1 := rfl
@[simp] | def | GroupTheory | [
"Mathlib.GroupTheory.Index"
] | Mathlib/GroupTheory/Complement.lean | equiv | The equivalence `G ≃ S × T`, such that the inverse is `(*) : S × T → G` |
equiv_fst_mul_equiv_snd (g : G) : ↑(hST.equiv g).fst * (hST.equiv g).snd = g :=
(Equiv.ofBijective (fun x : S × T => x.1.1 * x.2.1) hST).right_inv g | theorem | GroupTheory | [
"Mathlib.GroupTheory.Index"
] | Mathlib/GroupTheory/Complement.lean | equiv_fst_mul_equiv_snd | null |
equiv_fst_eq_mul_inv (g : G) : ↑(hST.equiv g).fst = g * ((hST.equiv g).snd : G)⁻¹ :=
eq_mul_inv_of_mul_eq (hST.equiv_fst_mul_equiv_snd g) | theorem | GroupTheory | [
"Mathlib.GroupTheory.Index"
] | Mathlib/GroupTheory/Complement.lean | equiv_fst_eq_mul_inv | null |
equiv_snd_eq_inv_mul (g : G) : ↑(hST.equiv g).snd = ((hST.equiv g).fst : G)⁻¹ * g :=
eq_inv_mul_of_mul_eq (hST.equiv_fst_mul_equiv_snd g) | theorem | GroupTheory | [
"Mathlib.GroupTheory.Index"
] | Mathlib/GroupTheory/Complement.lean | equiv_snd_eq_inv_mul | null |
equiv_fst_eq_iff_leftCosetEquivalence {g₁ g₂ : G} :
(hSK.equiv g₁).fst = (hSK.equiv g₂).fst ↔ LeftCosetEquivalence K g₁ g₂ := by
rw [LeftCosetEquivalence, leftCoset_eq_iff]
constructor
· intro h
rw [← hSK.equiv_fst_mul_equiv_snd g₂, ← hSK.equiv_fst_mul_equiv_snd g₁, ← h,
mul_inv_rev, ← mul_assoc, inv_mul_cancel_right, ← coe_inv, ← coe_mul]
exact Subtype.property _
· intro h
apply (isComplement_iff_existsUnique_inv_mul_mem.1 hSK g₁).unique
· -- This used to be `simp [...]` before https://github.com/leanprover/lean4/pull/2644
rw [equiv_fst_eq_mul_inv]; simp
· rw [SetLike.mem_coe, ← mul_mem_cancel_right h]
rw [equiv_fst_eq_mul_inv]; simp [← mul_assoc] | theorem | GroupTheory | [
"Mathlib.GroupTheory.Index"
] | Mathlib/GroupTheory/Complement.lean | equiv_fst_eq_iff_leftCosetEquivalence | null |
equiv_snd_eq_iff_rightCosetEquivalence {g₁ g₂ : G} :
(hHT.equiv g₁).snd = (hHT.equiv g₂).snd ↔ RightCosetEquivalence H g₁ g₂ := by
rw [RightCosetEquivalence, rightCoset_eq_iff]
constructor
· intro h
rw [← hHT.equiv_fst_mul_equiv_snd g₂, ← hHT.equiv_fst_mul_equiv_snd g₁, ← h,
mul_inv_rev, mul_assoc, mul_inv_cancel_left, ← coe_inv, ← coe_mul]
exact Subtype.property _
· intro h
apply (isComplement_iff_existsUnique_mul_inv_mem.1 hHT g₁).unique
· -- This used to be `simp [...]` before https://github.com/leanprover/lean4/pull/2644
rw [equiv_snd_eq_inv_mul]; simp
· rw [SetLike.mem_coe, ← mul_mem_cancel_left h]
rw [equiv_snd_eq_inv_mul, mul_assoc]; simp | theorem | GroupTheory | [
"Mathlib.GroupTheory.Index"
] | Mathlib/GroupTheory/Complement.lean | equiv_snd_eq_iff_rightCosetEquivalence | null |
leftCosetEquivalence_equiv_fst (g : G) :
LeftCosetEquivalence K g ((hSK.equiv g).fst : G) := by
rw [equiv_fst_eq_mul_inv]; simp [LeftCosetEquivalence, leftCoset_eq_iff] | theorem | GroupTheory | [
"Mathlib.GroupTheory.Index"
] | Mathlib/GroupTheory/Complement.lean | leftCosetEquivalence_equiv_fst | null |
rightCosetEquivalence_equiv_snd (g : G) :
RightCosetEquivalence H g ((hHT.equiv g).snd : G) := by
rw [RightCosetEquivalence, rightCoset_eq_iff, equiv_snd_eq_inv_mul]; simp | theorem | GroupTheory | [
"Mathlib.GroupTheory.Index"
] | Mathlib/GroupTheory/Complement.lean | rightCosetEquivalence_equiv_snd | null |
equiv_fst_eq_self_of_mem_of_one_mem {g : G} (h1 : 1 ∈ T) (hg : g ∈ S) :
(hST.equiv g).fst = ⟨g, hg⟩ := by
have : hST.equiv.symm (⟨g, hg⟩, ⟨1, h1⟩) = g := by
rw [equiv, Equiv.ofBijective]; simp
conv_lhs => rw [← this, Equiv.apply_symm_apply] | theorem | GroupTheory | [
"Mathlib.GroupTheory.Index"
] | Mathlib/GroupTheory/Complement.lean | equiv_fst_eq_self_of_mem_of_one_mem | null |
equiv_snd_eq_self_of_mem_of_one_mem {g : G} (h1 : 1 ∈ S) (hg : g ∈ T) :
(hST.equiv g).snd = ⟨g, hg⟩ := by
have : hST.equiv.symm (⟨1, h1⟩, ⟨g, hg⟩) = g := by
rw [equiv, Equiv.ofBijective]; simp
conv_lhs => rw [← this, Equiv.apply_symm_apply] | theorem | GroupTheory | [
"Mathlib.GroupTheory.Index"
] | Mathlib/GroupTheory/Complement.lean | equiv_snd_eq_self_of_mem_of_one_mem | null |
equiv_snd_eq_one_of_mem_of_one_mem {g : G} (h1 : 1 ∈ T) (hg : g ∈ S) :
(hST.equiv g).snd = ⟨1, h1⟩ := by
ext
rw [equiv_snd_eq_inv_mul, equiv_fst_eq_self_of_mem_of_one_mem _ h1 hg, inv_mul_cancel] | theorem | GroupTheory | [
"Mathlib.GroupTheory.Index"
] | Mathlib/GroupTheory/Complement.lean | equiv_snd_eq_one_of_mem_of_one_mem | null |
equiv_fst_eq_one_of_mem_of_one_mem {g : G} (h1 : 1 ∈ S) (hg : g ∈ T) :
(hST.equiv g).fst = ⟨1, h1⟩ := by
ext
rw [equiv_fst_eq_mul_inv, equiv_snd_eq_self_of_mem_of_one_mem _ h1 hg, mul_inv_cancel] | theorem | GroupTheory | [
"Mathlib.GroupTheory.Index"
] | Mathlib/GroupTheory/Complement.lean | equiv_fst_eq_one_of_mem_of_one_mem | null |
equiv_mul_right (g : G) (k : K) :
hSK.equiv (g * k) = ((hSK.equiv g).fst, (hSK.equiv g).snd * k) := by
have : (hSK.equiv (g * k)).fst = (hSK.equiv g).fst :=
hSK.equiv_fst_eq_iff_leftCosetEquivalence.2
(by simp [LeftCosetEquivalence, leftCoset_eq_iff])
ext
· rw [this]
· rw [coe_mul, equiv_snd_eq_inv_mul, this, equiv_snd_eq_inv_mul, mul_assoc] | theorem | GroupTheory | [
"Mathlib.GroupTheory.Index"
] | Mathlib/GroupTheory/Complement.lean | equiv_mul_right | null |
equiv_mul_right_of_mem {g k : G} (h : k ∈ K) :
hSK.equiv (g * k) = ((hSK.equiv g).fst, (hSK.equiv g).snd * ⟨k, h⟩) :=
equiv_mul_right _ g ⟨k, h⟩ | theorem | GroupTheory | [
"Mathlib.GroupTheory.Index"
] | Mathlib/GroupTheory/Complement.lean | equiv_mul_right_of_mem | null |
equiv_mul_left (h : H) (g : G) :
hHT.equiv (h * g) = (h * (hHT.equiv g).fst, (hHT.equiv g).snd) := by
have : (hHT.equiv (h * g)).2 = (hHT.equiv g).2 := hHT.equiv_snd_eq_iff_rightCosetEquivalence.2 ?_
· ext
· rw [coe_mul, equiv_fst_eq_mul_inv, this, equiv_fst_eq_mul_inv, mul_assoc]
· rw [this]
· simp [RightCosetEquivalence, ← smul_smul] | theorem | GroupTheory | [
"Mathlib.GroupTheory.Index"
] | Mathlib/GroupTheory/Complement.lean | equiv_mul_left | null |
equiv_mul_left_of_mem {h g : G} (hh : h ∈ H) :
hHT.equiv (h * g) = (⟨h, hh⟩ * (hHT.equiv g).fst, (hHT.equiv g).snd) :=
equiv_mul_left _ ⟨h, hh⟩ g | theorem | GroupTheory | [
"Mathlib.GroupTheory.Index"
] | Mathlib/GroupTheory/Complement.lean | equiv_mul_left_of_mem | null |
equiv_one (hs1 : 1 ∈ S) (ht1 : 1 ∈ T) :
hST.equiv 1 = (⟨1, hs1⟩, ⟨1, ht1⟩) := by
rw [Equiv.apply_eq_iff_eq_symm_apply]; simp [equiv] | theorem | GroupTheory | [
"Mathlib.GroupTheory.Index"
] | Mathlib/GroupTheory/Complement.lean | equiv_one | null |
equiv_fst_eq_self_iff_mem {g : G} (h1 : 1 ∈ T) :
((hST.equiv g).fst : G) = g ↔ g ∈ S := by
constructor
· intro h
rw [← h]
exact Subtype.prop _
· intro h
rw [hST.equiv_fst_eq_self_of_mem_of_one_mem h1 h] | theorem | GroupTheory | [
"Mathlib.GroupTheory.Index"
] | Mathlib/GroupTheory/Complement.lean | equiv_fst_eq_self_iff_mem | null |
equiv_snd_eq_self_iff_mem {g : G} (h1 : 1 ∈ S) :
((hST.equiv g).snd : G) = g ↔ g ∈ T := by
constructor
· intro h
rw [← h]
exact Subtype.prop _
· intro h
rw [hST.equiv_snd_eq_self_of_mem_of_one_mem h1 h] | theorem | GroupTheory | [
"Mathlib.GroupTheory.Index"
] | Mathlib/GroupTheory/Complement.lean | equiv_snd_eq_self_iff_mem | null |
coe_equiv_fst_eq_one_iff_mem {g : G} (h1 : 1 ∈ S) :
((hST.equiv g).fst : G) = 1 ↔ g ∈ T := by
rw [equiv_fst_eq_mul_inv, mul_inv_eq_one, eq_comm, equiv_snd_eq_self_iff_mem _ h1] | theorem | GroupTheory | [
"Mathlib.GroupTheory.Index"
] | Mathlib/GroupTheory/Complement.lean | coe_equiv_fst_eq_one_iff_mem | null |
coe_equiv_snd_eq_one_iff_mem {g : G} (h1 : 1 ∈ T) :
((hST.equiv g).snd : G) = 1 ↔ g ∈ S := by
rw [equiv_snd_eq_inv_mul, inv_mul_eq_one, equiv_fst_eq_self_iff_mem _ h1] | theorem | GroupTheory | [
"Mathlib.GroupTheory.Index"
] | Mathlib/GroupTheory/Complement.lean | coe_equiv_snd_eq_one_iff_mem | null |
@[to_additive /-- A left transversal is in bijection with left cosets. -/]
noncomputable leftQuotientEquiv (hS : IsComplement S H) : G ⧸ H ≃ S :=
(Equiv.ofBijective _ (isComplement_subgroup_right_iff_bijective.mp hS)).symm | def | GroupTheory | [
"Mathlib.GroupTheory.Index"
] | Mathlib/GroupTheory/Complement.lean | leftQuotientEquiv | A left transversal is in bijection with left cosets. |
@[to_additive /-- A left transversal is finite iff the subgroup has finite index. -/]
finite_left_iff (h : IsComplement S H) : Finite S ↔ H.FiniteIndex := by
rw [← h.leftQuotientEquiv.finite_iff]
exact ⟨fun _ ↦ finiteIndex_of_finite_quotient, fun _ ↦ finite_quotient_of_finiteIndex⟩
@[to_additive] | theorem | GroupTheory | [
"Mathlib.GroupTheory.Index"
] | Mathlib/GroupTheory/Complement.lean | finite_left_iff | A left transversal is finite iff the subgroup has finite index. |
finite_left [H.FiniteIndex] (hS : IsComplement S H) : S.Finite := hS.finite_left_iff.2 ‹_›
@[to_additive] | lemma | GroupTheory | [
"Mathlib.GroupTheory.Index"
] | Mathlib/GroupTheory/Complement.lean | finite_left | null |
quotientGroupMk_leftQuotientEquiv (hS : IsComplement S H) (q : G ⧸ H) :
Quotient.mk'' (leftQuotientEquiv hS q : G) = q :=
hS.leftQuotientEquiv.symm_apply_apply q
@[to_additive] | theorem | GroupTheory | [
"Mathlib.GroupTheory.Index"
] | Mathlib/GroupTheory/Complement.lean | quotientGroupMk_leftQuotientEquiv | null |
leftQuotientEquiv_apply {f : G ⧸ H → G} (hf : ∀ q, (f q : G ⧸ H) = q) (q : G ⧸ H) :
(leftQuotientEquiv (isComplement_range_left hf) q : G) = f q := by
refine (Subtype.ext_iff.mp ?_).trans (Subtype.coe_mk (f q) ⟨q, rfl⟩)
exact (leftQuotientEquiv (isComplement_range_left hf)).apply_eq_iff_eq_symm_apply.mpr (hf q).symm | theorem | GroupTheory | [
"Mathlib.GroupTheory.Index"
] | Mathlib/GroupTheory/Complement.lean | leftQuotientEquiv_apply | null |
@[to_additive /-- A left transversal can be viewed as a function mapping each element of the group
to the chosen representative from that left coset. -/]
noncomputable toLeftFun (hS : IsComplement S H) : G → S := leftQuotientEquiv hS ∘ Quotient.mk''
@[to_additive] | def | GroupTheory | [
"Mathlib.GroupTheory.Index"
] | Mathlib/GroupTheory/Complement.lean | toLeftFun | A left transversal can be viewed as a function mapping each element of the group
to the chosen representative from that left coset. |
inv_toLeftFun_mul_mem (hS : IsComplement S H) (g : G) :
(toLeftFun hS g : G)⁻¹ * g ∈ H :=
QuotientGroup.leftRel_apply.mp <| Quotient.exact' <| quotientGroupMk_leftQuotientEquiv _ _
@[to_additive] | theorem | GroupTheory | [
"Mathlib.GroupTheory.Index"
] | Mathlib/GroupTheory/Complement.lean | inv_toLeftFun_mul_mem | null |
inv_mul_toLeftFun_mem (hS : IsComplement S H) (g : G) :
g⁻¹ * toLeftFun hS g ∈ H :=
(congr_arg (· ∈ H) (by rw [mul_inv_rev, inv_inv])).mp (H.inv_mem (inv_toLeftFun_mul_mem hS g)) | theorem | GroupTheory | [
"Mathlib.GroupTheory.Index"
] | Mathlib/GroupTheory/Complement.lean | inv_mul_toLeftFun_mem | null |
@[to_additive /-- A right transversal is in bijection with right cosets. -/]
noncomputable rightQuotientEquiv (hT : IsComplement H T) :
Quotient (QuotientGroup.rightRel H) ≃ T :=
(Equiv.ofBijective _ (isComplement_subgroup_left_iff_bijective.mp hT)).symm | def | GroupTheory | [
"Mathlib.GroupTheory.Index"
] | Mathlib/GroupTheory/Complement.lean | rightQuotientEquiv | A right transversal is in bijection with right cosets. |
@[to_additive /-- A right transversal is finite iff the subgroup has finite index. -/]
finite_right_iff (h : IsComplement H T) : Finite T ↔ H.FiniteIndex := by
rw [← h.rightQuotientEquiv.finite_iff,
(QuotientGroup.quotientRightRelEquivQuotientLeftRel H).finite_iff]
exact ⟨fun _ ↦ finiteIndex_of_finite_quotient, fun _ ↦ finite_quotient_of_finiteIndex⟩
@[to_additive] | theorem | GroupTheory | [
"Mathlib.GroupTheory.Index"
] | Mathlib/GroupTheory/Complement.lean | finite_right_iff | A right transversal is finite iff the subgroup has finite index. |
finite_right [H.FiniteIndex] (hT : IsComplement H T) : T.Finite := hT.finite_right_iff.2 ‹_›
@[to_additive] | lemma | GroupTheory | [
"Mathlib.GroupTheory.Index"
] | Mathlib/GroupTheory/Complement.lean | finite_right | null |
mk''_rightQuotientEquiv (hT : IsComplement H T)
(q : Quotient (QuotientGroup.rightRel H)) : Quotient.mk'' (rightQuotientEquiv hT q : G) = q :=
(rightQuotientEquiv hT).symm_apply_apply q
@[to_additive] | theorem | GroupTheory | [
"Mathlib.GroupTheory.Index"
] | Mathlib/GroupTheory/Complement.lean | mk''_rightQuotientEquiv | null |
rightQuotientEquiv_apply {f : Quotient (QuotientGroup.rightRel H) → G}
(hf : ∀ q, Quotient.mk'' (f q) = q) (q : Quotient (QuotientGroup.rightRel H)) :
(rightQuotientEquiv (isComplement_range_right hf) q : G) = f q := by
refine (Subtype.ext_iff.mp ?_).trans (Subtype.coe_mk (f q) ⟨q, rfl⟩)
exact (rightQuotientEquiv (isComplement_range_right hf)).apply_eq_iff_eq_symm_apply.2 (hf q).symm | theorem | GroupTheory | [
"Mathlib.GroupTheory.Index"
] | Mathlib/GroupTheory/Complement.lean | rightQuotientEquiv_apply | null |
@[to_additive /-- A right transversal can be viewed as a function mapping each element of the group
to the chosen representative from that right coset. -/]
noncomputable toRightFun (hT : IsComplement H T) : G → T := rightQuotientEquiv hT ∘ .mk''
@[to_additive] | def | GroupTheory | [
"Mathlib.GroupTheory.Index"
] | Mathlib/GroupTheory/Complement.lean | toRightFun | A right transversal can be viewed as a function mapping each element of the group
to the chosen representative from that right coset. |
mul_inv_toRightFun_mem (hT : IsComplement H T) (g : G) :
g * (toRightFun hT g : G)⁻¹ ∈ H :=
QuotientGroup.rightRel_apply.mp <| Quotient.exact' <| mk''_rightQuotientEquiv _ _
@[to_additive] | theorem | GroupTheory | [
"Mathlib.GroupTheory.Index"
] | Mathlib/GroupTheory/Complement.lean | mul_inv_toRightFun_mem | null |
toRightFun_mul_inv_mem (hT : IsComplement H T) (g : G) :
(toRightFun hT g : G) * g⁻¹ ∈ H :=
(congr_arg (· ∈ H) (by rw [mul_inv_rev, inv_inv])).mp (H.inv_mem (mul_inv_toRightFun_mem hT g))
@[to_additive] | theorem | GroupTheory | [
"Mathlib.GroupTheory.Index"
] | Mathlib/GroupTheory/Complement.lean | toRightFun_mul_inv_mem | null |
encard_left [H.FiniteIndex] (h : IsComplement S H) : S.encard = H.index := by
rw [← h.finite_left.cast_ncard_eq, h.ncard_left]
@[to_additive] | theorem | GroupTheory | [
"Mathlib.GroupTheory.Index"
] | Mathlib/GroupTheory/Complement.lean | encard_left | null |
encard_right [H.FiniteIndex] (h : IsComplement H T) : T.encard = H.index := by
rw [← h.finite_right.cast_ncard_eq, h.ncard_right] | theorem | GroupTheory | [
"Mathlib.GroupTheory.Index"
] | Mathlib/GroupTheory/Complement.lean | encard_right | null |
@[to_additive /-- The collection of left transversals of a subgroup. -/]
LeftTransversal (H : Subgroup G) := {S : Set G // IsComplement S H} | abbrev | GroupTheory | [
"Mathlib.GroupTheory.Index"
] | Mathlib/GroupTheory/Complement.lean | LeftTransversal | The collection of left transversals of a subgroup |
@[to_additive /-- The collection of right transversals of a subgroup. -/]
RightTransversal (H : Subgroup G) := {T : Set G // IsComplement H T}
variable {F : Type*} [Group F] [MulAction F G] [QuotientAction F H]
@[to_additive] | abbrev | GroupTheory | [
"Mathlib.GroupTheory.Index"
] | Mathlib/GroupTheory/Complement.lean | RightTransversal | The collection of right transversals of a subgroup |
@[to_additive]
smul_toLeftFun (f : F) (S : H.LeftTransversal) (g : G) :
(f • (S.2.toLeftFun g : G)) = (f • S).2.toLeftFun (f • g) :=
Subtype.ext_iff.mp <| @ExistsUnique.unique (↥(f • (S : Set G))) (fun s => (↑s)⁻¹ * f • g ∈ H)
(isComplement_iff_existsUnique_inv_mul_mem.mp (f • S).2 (f • g))
⟨f • (S.2.toLeftFun g : G), Set.smul_mem_smul_set (Subtype.coe_prop _)⟩
((f • S).2.toLeftFun (f • g))
(QuotientAction.inv_mul_mem f (S.2.inv_toLeftFun_mul_mem g))
((f • S).2.inv_toLeftFun_mul_mem (f • g))
@[to_additive] | theorem | GroupTheory | [
"Mathlib.GroupTheory.Index"
] | Mathlib/GroupTheory/Complement.lean | smul_toLeftFun | null |
smul_leftQuotientEquiv (f : F) (S : H.LeftTransversal) (q : G ⧸ H) :
f • (S.2.leftQuotientEquiv q : G) = (f • S).2.leftQuotientEquiv (f • q) :=
Quotient.inductionOn' q fun g => smul_toLeftFun f S g
@[to_additive] | theorem | GroupTheory | [
"Mathlib.GroupTheory.Index"
] | Mathlib/GroupTheory/Complement.lean | smul_leftQuotientEquiv | null |
smul_apply_eq_smul_apply_inv_smul (f : F) (S : H.LeftTransversal) (q : G ⧸ H) :
((f • S).2.leftQuotientEquiv q : G) = f • (S.2.leftQuotientEquiv (f⁻¹ • q) : G) := by
rw [smul_leftQuotientEquiv, smul_inv_smul] | theorem | GroupTheory | [
"Mathlib.GroupTheory.Index"
] | Mathlib/GroupTheory/Complement.lean | smul_apply_eq_smul_apply_inv_smul | null |
IsComplement'.isCompl (h : IsComplement' H K) : IsCompl H K := by
refine
⟨disjoint_iff_inf_le.mpr fun g ⟨p, q⟩ =>
let x : H × K := ⟨⟨g, p⟩, 1⟩
let y : H × K := ⟨1, g, q⟩
Subtype.ext_iff.mp
(Prod.ext_iff.mp (show x = y from h.1 ((mul_one g).trans (one_mul g).symm))).1,
codisjoint_iff_le_sup.mpr fun g _ => ?_⟩
obtain ⟨⟨h, k⟩, rfl⟩ := h.2 g
exact Subgroup.mul_mem_sup h.2 k.2 | theorem | GroupTheory | [
"Mathlib.GroupTheory.Index"
] | Mathlib/GroupTheory/Complement.lean | IsComplement'.isCompl | null |
IsComplement'.sup_eq_top (h : IsComplement' H K) : H ⊔ K = ⊤ :=
h.isCompl.sup_eq_top | theorem | GroupTheory | [
"Mathlib.GroupTheory.Index"
] | Mathlib/GroupTheory/Complement.lean | IsComplement'.sup_eq_top | null |
IsComplement'.disjoint (h : IsComplement' H K) : Disjoint H K :=
h.isCompl.disjoint | theorem | GroupTheory | [
"Mathlib.GroupTheory.Index"
] | Mathlib/GroupTheory/Complement.lean | IsComplement'.disjoint | null |
IsComplement'.index_eq_card (h : IsComplement' H K) : K.index = Nat.card H :=
h.card_left.symm | theorem | GroupTheory | [
"Mathlib.GroupTheory.Index"
] | Mathlib/GroupTheory/Complement.lean | IsComplement'.index_eq_card | null |
@[simps!]
noncomputable IsComplement'.QuotientMulEquiv [K.Normal] (h : H.IsComplement' K) :
G ⧸ K ≃* H :=
MulEquiv.symm
{ h.leftQuotientEquiv.symm with
map_mul' := fun _ _ ↦ rfl } | def | GroupTheory | [
"Mathlib.GroupTheory.Index"
] | Mathlib/GroupTheory/Complement.lean | IsComplement'.QuotientMulEquiv | If `H` and `K` are complementary with `K` normal, then `G ⧸ K` is isomorphic to `H`. |
IsComplement.card_mul (h : IsComplement S T) :
Nat.card S * Nat.card T = Nat.card G :=
(Nat.card_prod _ _).symm.trans (Nat.card_eq_of_bijective _ h) | theorem | GroupTheory | [
"Mathlib.GroupTheory.Index"
] | Mathlib/GroupTheory/Complement.lean | IsComplement.card_mul | null |
IsComplement'.card_mul (h : IsComplement' H K) :
Nat.card H * Nat.card K = Nat.card G :=
IsComplement.card_mul h | theorem | GroupTheory | [
"Mathlib.GroupTheory.Index"
] | Mathlib/GroupTheory/Complement.lean | IsComplement'.card_mul | null |
isComplement'_of_disjoint_and_mul_eq_univ (h1 : Disjoint H K)
(h2 : ↑H * ↑K = (Set.univ : Set G)) : IsComplement' H K := by
refine ⟨mul_injective_of_disjoint h1, fun g => ?_⟩
obtain ⟨h, hh, k, hk, hg⟩ := Set.eq_univ_iff_forall.mp h2 g
exact ⟨(⟨h, hh⟩, ⟨k, hk⟩), hg⟩ | theorem | GroupTheory | [
"Mathlib.GroupTheory.Index"
] | Mathlib/GroupTheory/Complement.lean | isComplement'_of_disjoint_and_mul_eq_univ | null |
isComplement'_of_card_mul_and_disjoint [Finite G]
(h1 : Nat.card H * Nat.card K = Nat.card G) (h2 : Disjoint H K) :
IsComplement' H K :=
(Nat.bijective_iff_injective_and_card _).mpr
⟨mul_injective_of_disjoint h2, (Nat.card_prod H K).trans h1⟩ | theorem | GroupTheory | [
"Mathlib.GroupTheory.Index"
] | Mathlib/GroupTheory/Complement.lean | isComplement'_of_card_mul_and_disjoint | null |
isComplement'_iff_card_mul_and_disjoint [Finite G] :
IsComplement' H K ↔ Nat.card H * Nat.card K = Nat.card G ∧ Disjoint H K :=
⟨fun h => ⟨h.card_mul, h.disjoint⟩, fun h => isComplement'_of_card_mul_and_disjoint h.1 h.2⟩ | theorem | GroupTheory | [
"Mathlib.GroupTheory.Index"
] | Mathlib/GroupTheory/Complement.lean | isComplement'_iff_card_mul_and_disjoint | null |
isComplement'_of_coprime [Finite G]
(h1 : Nat.card H * Nat.card K = Nat.card G)
(h2 : Nat.Coprime (Nat.card H) (Nat.card K)) : IsComplement' H K :=
isComplement'_of_card_mul_and_disjoint h1 (disjoint_iff.mpr (inf_eq_bot_of_coprime h2)) | theorem | GroupTheory | [
"Mathlib.GroupTheory.Index"
] | Mathlib/GroupTheory/Complement.lean | isComplement'_of_coprime | null |
isComplement'_stabilizer {α : Type*} [MulAction G α] (a : α)
(h1 : ∀ h : H, h • a = a → h = 1) (h2 : ∀ g : G, ∃ h : H, h • g • a = a) :
IsComplement' H (MulAction.stabilizer G a) := by
refine isComplement_iff_existsUnique.mpr fun g => ?_
obtain ⟨h, hh⟩ := h2 g
have hh' : (↑h * g) • a = a := by rwa [mul_smul]
refine ⟨⟨h⁻¹, h * g, hh'⟩, inv_mul_cancel_left ↑h g, ?_⟩
rintro ⟨h', g, hg : g • a = a⟩ rfl
specialize h1 (h * h') (by rwa [mul_smul, smul_def h', ← hg, ← mul_smul, hg])
refine Prod.ext (eq_inv_of_mul_eq_one_right h1) (Subtype.ext ?_)
rwa [Subtype.ext_iff, coe_one, coe_mul, ← right_eq_mul, mul_assoc (↑h) (↑h') g] at h1 | theorem | GroupTheory | [
"Mathlib.GroupTheory.Index"
] | Mathlib/GroupTheory/Complement.lean | isComplement'_stabilizer | null |
Monoid.CoprodI.Rel : FreeMonoid (Σ i, M i) → FreeMonoid (Σ i, M i) → Prop
| of_one (i : ι) : Monoid.CoprodI.Rel (FreeMonoid.of ⟨i, 1⟩) 1
| of_mul {i : ι} (x y : M i) :
Monoid.CoprodI.Rel (FreeMonoid.of ⟨i, x⟩ * FreeMonoid.of ⟨i, y⟩) (FreeMonoid.of ⟨i, x * y⟩) | inductive | GroupTheory | [
"Mathlib.Algebra.Group.Action.End",
"Mathlib.Algebra.Group.Action.Pointwise.Set.Basic",
"Mathlib.Algebra.Group.Submonoid.Membership",
"Mathlib.GroupTheory.Congruence.Basic",
"Mathlib.GroupTheory.FreeGroup.IsFreeGroup",
"Mathlib.SetTheory.Cardinal.Basic"
] | Mathlib/GroupTheory/CoprodI.lean | Monoid.CoprodI.Rel | A relation on the free monoid on alphabet `Σ i, M i`,
relating `⟨i, 1⟩` with `1` and `⟨i, x⟩ * ⟨i, y⟩` with `⟨i, x * y⟩`. |
Monoid.CoprodI : Type _ := (conGen (Monoid.CoprodI.Rel M)).Quotient
deriving Monoid, Inhabited | def | GroupTheory | [
"Mathlib.Algebra.Group.Action.End",
"Mathlib.Algebra.Group.Action.Pointwise.Set.Basic",
"Mathlib.Algebra.Group.Submonoid.Membership",
"Mathlib.GroupTheory.Congruence.Basic",
"Mathlib.GroupTheory.FreeGroup.IsFreeGroup",
"Mathlib.SetTheory.Cardinal.Basic"
] | Mathlib/GroupTheory/CoprodI.lean | Monoid.CoprodI | The free product (categorical coproduct) of an indexed family of monoids. |
@[ext]
Word where
/-- A `Word` is a `List (Σ i, M i)`, such that `1` is not in the list, and no
two adjacent letters are from the same summand -/
toList : List (Σ i, M i)
/-- A reduced word does not contain `1` -/
ne_one : ∀ l ∈ toList, Sigma.snd l ≠ 1
/-- Adjacent letters are not from the same summand. -/
chain_ne : toList.IsChain fun l l' => Sigma.fst l ≠ Sigma.fst l'
variable {M} | structure | GroupTheory | [
"Mathlib.Algebra.Group.Action.End",
"Mathlib.Algebra.Group.Action.Pointwise.Set.Basic",
"Mathlib.Algebra.Group.Submonoid.Membership",
"Mathlib.GroupTheory.Congruence.Basic",
"Mathlib.GroupTheory.FreeGroup.IsFreeGroup",
"Mathlib.SetTheory.Cardinal.Basic"
] | Mathlib/GroupTheory/CoprodI.lean | Word | The type of reduced words. A reduced word cannot contain a letter `1`, and no two adjacent
letters can come from the same summand. |
of {i : ι} : M i →* CoprodI M where
toFun x := Con.mk' _ (FreeMonoid.of <| Sigma.mk i x)
map_one' := (Con.eq _).mpr (ConGen.Rel.of _ _ (CoprodI.Rel.of_one i))
map_mul' x y := Eq.symm <| (Con.eq _).mpr (ConGen.Rel.of _ _ (CoprodI.Rel.of_mul x y)) | def | GroupTheory | [
"Mathlib.Algebra.Group.Action.End",
"Mathlib.Algebra.Group.Action.Pointwise.Set.Basic",
"Mathlib.Algebra.Group.Submonoid.Membership",
"Mathlib.GroupTheory.Congruence.Basic",
"Mathlib.GroupTheory.FreeGroup.IsFreeGroup",
"Mathlib.SetTheory.Cardinal.Basic"
] | Mathlib/GroupTheory/CoprodI.lean | of | The inclusion of a summand into the free product. |
of_apply {i} (m : M i) : of m = Con.mk' _ (FreeMonoid.of <| Sigma.mk i m) :=
rfl
variable {N : Type*} [Monoid N] | theorem | GroupTheory | [
"Mathlib.Algebra.Group.Action.End",
"Mathlib.Algebra.Group.Action.Pointwise.Set.Basic",
"Mathlib.Algebra.Group.Submonoid.Membership",
"Mathlib.GroupTheory.Congruence.Basic",
"Mathlib.GroupTheory.FreeGroup.IsFreeGroup",
"Mathlib.SetTheory.Cardinal.Basic"
] | Mathlib/GroupTheory/CoprodI.lean | of_apply | null |
@[simps symm_apply]
lift : (∀ i, M i →* N) ≃ (CoprodI M →* N) where
toFun fi :=
Con.lift _ (FreeMonoid.lift fun p : Σ i, M i => fi p.fst p.snd) <|
Con.conGen_le <| by
simp_rw [Con.ker_rel]
rintro _ _ (i | ⟨x, y⟩) <;> simp
invFun f _ := f.comp of
left_inv := by
intro fi
ext i x
rfl
right_inv := by
intro f
ext i x
rfl
@[simp] | def | GroupTheory | [
"Mathlib.Algebra.Group.Action.End",
"Mathlib.Algebra.Group.Action.Pointwise.Set.Basic",
"Mathlib.Algebra.Group.Submonoid.Membership",
"Mathlib.GroupTheory.Congruence.Basic",
"Mathlib.GroupTheory.FreeGroup.IsFreeGroup",
"Mathlib.SetTheory.Cardinal.Basic"
] | Mathlib/GroupTheory/CoprodI.lean | lift | See note [partially-applied ext lemmas]. -/
@[ext 1100] -- This needs a higher `ext` priority
theorem ext_hom (f g : CoprodI M →* N) (h : ∀ i, f.comp (of : M i →* _) = g.comp of) : f = g :=
(MonoidHom.cancel_right Con.mk'_surjective).mp <|
FreeMonoid.hom_eq fun ⟨i, x⟩ => by
rw [MonoidHom.comp_apply, MonoidHom.comp_apply, ← of_apply]
unfold CoprodI
rw [← MonoidHom.comp_apply, ← MonoidHom.comp_apply, h]
/-- A map out of the free product corresponds to a family of maps out of the summands. This is the
universal property of the free product, characterizing it as a categorical coproduct. |
lift_comp_of {N} [Monoid N] (fi : ∀ i, M i →* N) i : (lift fi).comp of = fi i :=
congr_fun (lift.symm_apply_apply fi) i
@[simp] | theorem | GroupTheory | [
"Mathlib.Algebra.Group.Action.End",
"Mathlib.Algebra.Group.Action.Pointwise.Set.Basic",
"Mathlib.Algebra.Group.Submonoid.Membership",
"Mathlib.GroupTheory.Congruence.Basic",
"Mathlib.GroupTheory.FreeGroup.IsFreeGroup",
"Mathlib.SetTheory.Cardinal.Basic"
] | Mathlib/GroupTheory/CoprodI.lean | lift_comp_of | null |
lift_of {N} [Monoid N] (fi : ∀ i, M i →* N) {i} (m : M i) : lift fi (of m) = fi i m :=
DFunLike.congr_fun (lift_comp_of ..) m
@[simp] | theorem | GroupTheory | [
"Mathlib.Algebra.Group.Action.End",
"Mathlib.Algebra.Group.Action.Pointwise.Set.Basic",
"Mathlib.Algebra.Group.Submonoid.Membership",
"Mathlib.GroupTheory.Congruence.Basic",
"Mathlib.GroupTheory.FreeGroup.IsFreeGroup",
"Mathlib.SetTheory.Cardinal.Basic"
] | Mathlib/GroupTheory/CoprodI.lean | lift_of | null |
lift_comp_of' {N} [Monoid N] (f : CoprodI M →* N) :
lift (fun i ↦ f.comp (of (i := i))) = f :=
lift.apply_symm_apply f
@[simp] | theorem | GroupTheory | [
"Mathlib.Algebra.Group.Action.End",
"Mathlib.Algebra.Group.Action.Pointwise.Set.Basic",
"Mathlib.Algebra.Group.Submonoid.Membership",
"Mathlib.GroupTheory.Congruence.Basic",
"Mathlib.GroupTheory.FreeGroup.IsFreeGroup",
"Mathlib.SetTheory.Cardinal.Basic"
] | Mathlib/GroupTheory/CoprodI.lean | lift_comp_of' | null |
lift_of' : lift (fun i ↦ (of : M i →* CoprodI M)) = .id (CoprodI M) :=
lift_comp_of' (.id _) | theorem | GroupTheory | [
"Mathlib.Algebra.Group.Action.End",
"Mathlib.Algebra.Group.Action.Pointwise.Set.Basic",
"Mathlib.Algebra.Group.Submonoid.Membership",
"Mathlib.GroupTheory.Congruence.Basic",
"Mathlib.GroupTheory.FreeGroup.IsFreeGroup",
"Mathlib.SetTheory.Cardinal.Basic"
] | Mathlib/GroupTheory/CoprodI.lean | lift_of' | null |
of_leftInverse [DecidableEq ι] (i : ι) :
Function.LeftInverse (lift <| Pi.mulSingle i (MonoidHom.id (M i))) of := fun x => by
simp only [lift_of, Pi.mulSingle_eq_same, MonoidHom.id_apply] | theorem | GroupTheory | [
"Mathlib.Algebra.Group.Action.End",
"Mathlib.Algebra.Group.Action.Pointwise.Set.Basic",
"Mathlib.Algebra.Group.Submonoid.Membership",
"Mathlib.GroupTheory.Congruence.Basic",
"Mathlib.GroupTheory.FreeGroup.IsFreeGroup",
"Mathlib.SetTheory.Cardinal.Basic"
] | Mathlib/GroupTheory/CoprodI.lean | of_leftInverse | null |
of_injective (i : ι) : Function.Injective (of : M i →* _) := by
classical exact (of_leftInverse i).injective | theorem | GroupTheory | [
"Mathlib.Algebra.Group.Action.End",
"Mathlib.Algebra.Group.Action.Pointwise.Set.Basic",
"Mathlib.Algebra.Group.Submonoid.Membership",
"Mathlib.GroupTheory.Congruence.Basic",
"Mathlib.GroupTheory.FreeGroup.IsFreeGroup",
"Mathlib.SetTheory.Cardinal.Basic"
] | Mathlib/GroupTheory/CoprodI.lean | of_injective | null |
mrange_eq_iSup {N} [Monoid N] (f : ∀ i, M i →* N) :
MonoidHom.mrange (lift f) = ⨆ i, MonoidHom.mrange (f i) := by
rw [lift, Equiv.coe_fn_mk, Con.lift_range, FreeMonoid.mrange_lift,
range_sigma_eq_iUnion_range, Submonoid.closure_iUnion]
simp only [MonoidHom.mclosure_range] | theorem | GroupTheory | [
"Mathlib.Algebra.Group.Action.End",
"Mathlib.Algebra.Group.Action.Pointwise.Set.Basic",
"Mathlib.Algebra.Group.Submonoid.Membership",
"Mathlib.GroupTheory.Congruence.Basic",
"Mathlib.GroupTheory.FreeGroup.IsFreeGroup",
"Mathlib.SetTheory.Cardinal.Basic"
] | Mathlib/GroupTheory/CoprodI.lean | mrange_eq_iSup | null |
lift_mrange_le {N} [Monoid N] (f : ∀ i, M i →* N) {s : Submonoid N} :
MonoidHom.mrange (lift f) ≤ s ↔ ∀ i, MonoidHom.mrange (f i) ≤ s := by
simp [mrange_eq_iSup]
@[simp] | theorem | GroupTheory | [
"Mathlib.Algebra.Group.Action.End",
"Mathlib.Algebra.Group.Action.Pointwise.Set.Basic",
"Mathlib.Algebra.Group.Submonoid.Membership",
"Mathlib.GroupTheory.Congruence.Basic",
"Mathlib.GroupTheory.FreeGroup.IsFreeGroup",
"Mathlib.SetTheory.Cardinal.Basic"
] | Mathlib/GroupTheory/CoprodI.lean | lift_mrange_le | null |
iSup_mrange_of : ⨆ i, MonoidHom.mrange (of : M i →* CoprodI M) = ⊤ := by
simp [← mrange_eq_iSup]
@[simp] | theorem | GroupTheory | [
"Mathlib.Algebra.Group.Action.End",
"Mathlib.Algebra.Group.Action.Pointwise.Set.Basic",
"Mathlib.Algebra.Group.Submonoid.Membership",
"Mathlib.GroupTheory.Congruence.Basic",
"Mathlib.GroupTheory.FreeGroup.IsFreeGroup",
"Mathlib.SetTheory.Cardinal.Basic"
] | Mathlib/GroupTheory/CoprodI.lean | iSup_mrange_of | null |
mclosure_iUnion_range_of :
Submonoid.closure (⋃ i, Set.range (of : M i →* CoprodI M)) = ⊤ := by
simp [Submonoid.closure_iUnion]
@[elab_as_elim] | theorem | GroupTheory | [
"Mathlib.Algebra.Group.Action.End",
"Mathlib.Algebra.Group.Action.Pointwise.Set.Basic",
"Mathlib.Algebra.Group.Submonoid.Membership",
"Mathlib.GroupTheory.Congruence.Basic",
"Mathlib.GroupTheory.FreeGroup.IsFreeGroup",
"Mathlib.SetTheory.Cardinal.Basic"
] | Mathlib/GroupTheory/CoprodI.lean | mclosure_iUnion_range_of | null |
induction_left {motive : CoprodI M → Prop} (m : CoprodI M) (one : motive 1)
(mul : ∀ {i} (m : M i) x, motive x → motive (of m * x)) : motive m := by
induction m using Submonoid.induction_of_closure_eq_top_left mclosure_iUnion_range_of with
| one => exact one
| mul_left x hx y ihy =>
obtain ⟨i, m, rfl⟩ : ∃ (i : ι) (m : M i), of m = x := by simpa using hx
exact mul m y ihy
@[elab_as_elim] | theorem | GroupTheory | [
"Mathlib.Algebra.Group.Action.End",
"Mathlib.Algebra.Group.Action.Pointwise.Set.Basic",
"Mathlib.Algebra.Group.Submonoid.Membership",
"Mathlib.GroupTheory.Congruence.Basic",
"Mathlib.GroupTheory.FreeGroup.IsFreeGroup",
"Mathlib.SetTheory.Cardinal.Basic"
] | Mathlib/GroupTheory/CoprodI.lean | induction_left | null |
induction_on {motive : CoprodI M → Prop} (m : CoprodI M) (one : motive 1)
(of : ∀ (i) (m : M i), motive (of m))
(mul : ∀ x y, motive x → motive y → motive (x * y)) : motive m := by
induction m using CoprodI.induction_left with
| one => exact one
| mul m x hx => exact mul _ _ (of _ _) hx | theorem | GroupTheory | [
"Mathlib.Algebra.Group.Action.End",
"Mathlib.Algebra.Group.Action.Pointwise.Set.Basic",
"Mathlib.Algebra.Group.Submonoid.Membership",
"Mathlib.GroupTheory.Congruence.Basic",
"Mathlib.GroupTheory.FreeGroup.IsFreeGroup",
"Mathlib.SetTheory.Cardinal.Basic"
] | Mathlib/GroupTheory/CoprodI.lean | induction_on | null |
inv_def (x : CoprodI G) :
x⁻¹ =
MulOpposite.unop
(lift (fun i => (of : G i →* _).op.comp (MulEquiv.inv' (G i)).toMonoidHom) x) :=
rfl | theorem | GroupTheory | [
"Mathlib.Algebra.Group.Action.End",
"Mathlib.Algebra.Group.Action.Pointwise.Set.Basic",
"Mathlib.Algebra.Group.Submonoid.Membership",
"Mathlib.GroupTheory.Congruence.Basic",
"Mathlib.GroupTheory.FreeGroup.IsFreeGroup",
"Mathlib.SetTheory.Cardinal.Basic"
] | Mathlib/GroupTheory/CoprodI.lean | inv_def | null |
lift_range_le {N} [Group N] (f : ∀ i, G i →* N) {s : Subgroup N}
(h : ∀ i, (f i).range ≤ s) : (lift f).range ≤ s := by
rintro _ ⟨x, rfl⟩
induction x using CoprodI.induction_on with
| one => exact s.one_mem
| of i x =>
simp only [lift_of]
exact h i (Set.mem_range_self x)
| mul x y hx hy =>
simp only [map_mul]
exact s.mul_mem hx hy | theorem | GroupTheory | [
"Mathlib.Algebra.Group.Action.End",
"Mathlib.Algebra.Group.Action.Pointwise.Set.Basic",
"Mathlib.Algebra.Group.Submonoid.Membership",
"Mathlib.GroupTheory.Congruence.Basic",
"Mathlib.GroupTheory.FreeGroup.IsFreeGroup",
"Mathlib.SetTheory.Cardinal.Basic"
] | Mathlib/GroupTheory/CoprodI.lean | lift_range_le | null |
range_eq_iSup {N} [Group N] (f : ∀ i, G i →* N) : (lift f).range = ⨆ i, (f i).range := by
apply le_antisymm (lift_range_le _ f fun i => le_iSup (fun i => MonoidHom.range (f i)) i)
apply iSup_le _
rintro i _ ⟨x, rfl⟩
exact ⟨of x, by simp only [lift_of]⟩ | theorem | GroupTheory | [
"Mathlib.Algebra.Group.Action.End",
"Mathlib.Algebra.Group.Action.Pointwise.Set.Basic",
"Mathlib.Algebra.Group.Submonoid.Membership",
"Mathlib.GroupTheory.Congruence.Basic",
"Mathlib.GroupTheory.FreeGroup.IsFreeGroup",
"Mathlib.SetTheory.Cardinal.Basic"
] | Mathlib/GroupTheory/CoprodI.lean | range_eq_iSup | null |
@[simps]
empty : Word M where
toList := []
ne_one := by simp
chain_ne := List.isChain_nil | def | GroupTheory | [
"Mathlib.Algebra.Group.Action.End",
"Mathlib.Algebra.Group.Action.Pointwise.Set.Basic",
"Mathlib.Algebra.Group.Submonoid.Membership",
"Mathlib.GroupTheory.Congruence.Basic",
"Mathlib.GroupTheory.FreeGroup.IsFreeGroup",
"Mathlib.SetTheory.Cardinal.Basic"
] | Mathlib/GroupTheory/CoprodI.lean | empty | The empty reduced word. |
prod (w : Word M) : CoprodI M :=
List.prod (w.toList.map fun l => of l.snd)
@[simp] | def | GroupTheory | [
"Mathlib.Algebra.Group.Action.End",
"Mathlib.Algebra.Group.Action.Pointwise.Set.Basic",
"Mathlib.Algebra.Group.Submonoid.Membership",
"Mathlib.GroupTheory.Congruence.Basic",
"Mathlib.GroupTheory.FreeGroup.IsFreeGroup",
"Mathlib.SetTheory.Cardinal.Basic"
] | Mathlib/GroupTheory/CoprodI.lean | prod | A reduced word determines an element of the free product, given by multiplication. |
prod_empty : prod (empty : Word M) = 1 :=
rfl | theorem | GroupTheory | [
"Mathlib.Algebra.Group.Action.End",
"Mathlib.Algebra.Group.Action.Pointwise.Set.Basic",
"Mathlib.Algebra.Group.Submonoid.Membership",
"Mathlib.GroupTheory.Congruence.Basic",
"Mathlib.GroupTheory.FreeGroup.IsFreeGroup",
"Mathlib.SetTheory.Cardinal.Basic"
] | Mathlib/GroupTheory/CoprodI.lean | prod_empty | null |
fstIdx (w : Word M) : Option ι :=
w.toList.head?.map Sigma.fst | def | GroupTheory | [
"Mathlib.Algebra.Group.Action.End",
"Mathlib.Algebra.Group.Action.Pointwise.Set.Basic",
"Mathlib.Algebra.Group.Submonoid.Membership",
"Mathlib.GroupTheory.Congruence.Basic",
"Mathlib.GroupTheory.FreeGroup.IsFreeGroup",
"Mathlib.SetTheory.Cardinal.Basic"
] | Mathlib/GroupTheory/CoprodI.lean | fstIdx | `fstIdx w` is `some i` if the first letter of `w` is `⟨i, m⟩` with `m : M i`. If `w` is empty
then it's `none`. |
fstIdx_ne_iff {w : Word M} {i} :
fstIdx w ≠ some i ↔ ∀ l ∈ w.toList.head?, i ≠ Sigma.fst l :=
not_iff_not.mp <| by simp [fstIdx]
variable (M) | theorem | GroupTheory | [
"Mathlib.Algebra.Group.Action.End",
"Mathlib.Algebra.Group.Action.Pointwise.Set.Basic",
"Mathlib.Algebra.Group.Submonoid.Membership",
"Mathlib.GroupTheory.Congruence.Basic",
"Mathlib.GroupTheory.FreeGroup.IsFreeGroup",
"Mathlib.SetTheory.Cardinal.Basic"
] | Mathlib/GroupTheory/CoprodI.lean | fstIdx_ne_iff | null |
@[ext]
Pair (i : ι) where
/-- An element of `M i`, the first letter of the word. -/
head : M i
/-- The remaining letters of the word, excluding the first letter -/
tail : Word M
/-- The index first letter of tail of a `Pair M i` is not equal to `i` -/
fstIdx_ne : fstIdx tail ≠ some i | structure | GroupTheory | [
"Mathlib.Algebra.Group.Action.End",
"Mathlib.Algebra.Group.Action.Pointwise.Set.Basic",
"Mathlib.Algebra.Group.Submonoid.Membership",
"Mathlib.GroupTheory.Congruence.Basic",
"Mathlib.GroupTheory.FreeGroup.IsFreeGroup",
"Mathlib.SetTheory.Cardinal.Basic"
] | Mathlib/GroupTheory/CoprodI.lean | Pair | Given an index `i : ι`, `Pair M i` is the type of pairs `(head, tail)` where `head : M i` and
`tail : Word M`, subject to the constraint that first letter of `tail` can't be `⟨i, m⟩`.
By prepending `head` to `tail`, one obtains a new word. We'll show that any word can be uniquely
obtained in this way. |
@[simps]
cons {i} (m : M i) (w : Word M) (hmw : w.fstIdx ≠ some i) (h1 : m ≠ 1) : Word M :=
{ toList := ⟨i, m⟩ :: w.toList,
ne_one := by
simp only [List.mem_cons]
rintro l (rfl | hl)
· exact h1
· exact w.ne_one l hl
chain_ne := w.chain_ne.cons' (fstIdx_ne_iff.mp hmw) }
@[simp] | def | GroupTheory | [
"Mathlib.Algebra.Group.Action.End",
"Mathlib.Algebra.Group.Action.Pointwise.Set.Basic",
"Mathlib.Algebra.Group.Submonoid.Membership",
"Mathlib.GroupTheory.Congruence.Basic",
"Mathlib.GroupTheory.FreeGroup.IsFreeGroup",
"Mathlib.SetTheory.Cardinal.Basic"
] | Mathlib/GroupTheory/CoprodI.lean | cons | Construct a new `Word` without any reduction. The underlying list of
`cons m w _ _` is `⟨_, m⟩::w` |
fstIdx_cons {i} (m : M i) (w : Word M) (hmw : w.fstIdx ≠ some i) (h1 : m ≠ 1) :
fstIdx (cons m w hmw h1) = some i := by simp [cons, fstIdx]
@[simp] | theorem | GroupTheory | [
"Mathlib.Algebra.Group.Action.End",
"Mathlib.Algebra.Group.Action.Pointwise.Set.Basic",
"Mathlib.Algebra.Group.Submonoid.Membership",
"Mathlib.GroupTheory.Congruence.Basic",
"Mathlib.GroupTheory.FreeGroup.IsFreeGroup",
"Mathlib.SetTheory.Cardinal.Basic"
] | Mathlib/GroupTheory/CoprodI.lean | fstIdx_cons | null |
prod_cons (i) (m : M i) (w : Word M) (h1 : m ≠ 1) (h2 : w.fstIdx ≠ some i) :
prod (cons m w h2 h1) = of m * prod w := by
simp [cons, prod, List.map_cons, List.prod_cons] | theorem | GroupTheory | [
"Mathlib.Algebra.Group.Action.End",
"Mathlib.Algebra.Group.Action.Pointwise.Set.Basic",
"Mathlib.Algebra.Group.Submonoid.Membership",
"Mathlib.GroupTheory.Congruence.Basic",
"Mathlib.GroupTheory.FreeGroup.IsFreeGroup",
"Mathlib.SetTheory.Cardinal.Basic"
] | Mathlib/GroupTheory/CoprodI.lean | prod_cons | null |
rcons {i} (p : Pair M i) : Word M :=
if h : p.head = 1 then p.tail
else cons p.head p.tail p.fstIdx_ne h
@[simp] | def | GroupTheory | [
"Mathlib.Algebra.Group.Action.End",
"Mathlib.Algebra.Group.Action.Pointwise.Set.Basic",
"Mathlib.Algebra.Group.Submonoid.Membership",
"Mathlib.GroupTheory.Congruence.Basic",
"Mathlib.GroupTheory.FreeGroup.IsFreeGroup",
"Mathlib.SetTheory.Cardinal.Basic"
] | Mathlib/GroupTheory/CoprodI.lean | rcons | Given a pair `(head, tail)`, we can form a word by prepending `head` to `tail`, except if `head`
is `1 : M i` then we have to just return `Word` since we need the result to be reduced. |
prod_rcons {i} (p : Pair M i) : prod (rcons p) = of p.head * prod p.tail :=
if hm : p.head = 1 then by rw [rcons, dif_pos hm, hm, MonoidHom.map_one, one_mul]
else by rw [rcons, dif_neg hm, cons, prod, List.map_cons, List.prod_cons, prod] | theorem | GroupTheory | [
"Mathlib.Algebra.Group.Action.End",
"Mathlib.Algebra.Group.Action.Pointwise.Set.Basic",
"Mathlib.Algebra.Group.Submonoid.Membership",
"Mathlib.GroupTheory.Congruence.Basic",
"Mathlib.GroupTheory.FreeGroup.IsFreeGroup",
"Mathlib.SetTheory.Cardinal.Basic"
] | Mathlib/GroupTheory/CoprodI.lean | prod_rcons | null |
rcons_inj {i} : Function.Injective (rcons : Pair M i → Word M) := by
rintro ⟨m, w, h⟩ ⟨m', w', h'⟩ he
by_cases hm : m = 1 <;> by_cases hm' : m' = 1
· simp only [rcons, dif_pos hm, dif_pos hm'] at he
simp_all
· exfalso
simp only [rcons, dif_pos hm, dif_neg hm'] at he
rw [he] at h
exact h rfl
· exfalso
simp only [rcons, dif_pos hm', dif_neg hm] at he
rw [← he] at h'
exact h' rfl
· have : m = m' ∧ w.toList = w'.toList := by
simpa [cons, rcons, dif_neg hm, dif_neg hm', eq_self_iff_true, Subtype.mk_eq_mk,
heq_iff_eq, ← Subtype.ext_iff] using he
rcases this with ⟨rfl, h⟩
congr
exact Word.ext h | theorem | GroupTheory | [
"Mathlib.Algebra.Group.Action.End",
"Mathlib.Algebra.Group.Action.Pointwise.Set.Basic",
"Mathlib.Algebra.Group.Submonoid.Membership",
"Mathlib.GroupTheory.Congruence.Basic",
"Mathlib.GroupTheory.FreeGroup.IsFreeGroup",
"Mathlib.SetTheory.Cardinal.Basic"
] | Mathlib/GroupTheory/CoprodI.lean | rcons_inj | null |
mem_rcons_iff {i j : ι} (p : Pair M i) (m : M j) :
⟨_, m⟩ ∈ (rcons p).toList ↔ ⟨_, m⟩ ∈ p.tail.toList ∨
m ≠ 1 ∧ (∃ h : i = j, m = h ▸ p.head) := by
simp only [rcons, cons, ne_eq]
grind | theorem | GroupTheory | [
"Mathlib.Algebra.Group.Action.End",
"Mathlib.Algebra.Group.Action.Pointwise.Set.Basic",
"Mathlib.Algebra.Group.Submonoid.Membership",
"Mathlib.GroupTheory.Congruence.Basic",
"Mathlib.GroupTheory.FreeGroup.IsFreeGroup",
"Mathlib.SetTheory.Cardinal.Basic"
] | Mathlib/GroupTheory/CoprodI.lean | mem_rcons_iff | null |
@[elab_as_elim]
consRecOn {motive : Word M → Sort*} (w : Word M) (empty : motive empty)
(cons : ∀ (i) (m : M i) (w) h1 h2, motive w → motive (cons m w h1 h2)) :
motive w := by
rcases w with ⟨w, h1, h2⟩
induction w with
| nil => exact empty
| cons m w ih =>
refine cons m.1 m.2 ⟨w, fun _ hl => h1 _ (List.mem_cons_of_mem _ hl), h2.tail⟩ ?_ ?_ (ih _ _)
· rw [List.isChain_cons'] at h2
simp only [fstIdx, ne_eq, Option.map_eq_some_iff,
Sigma.exists, exists_and_right, exists_eq_right, not_exists]
intro m' hm'
exact h2.1 _ hm' rfl
· exact h1 _ List.mem_cons_self
@[simp] | def | GroupTheory | [
"Mathlib.Algebra.Group.Action.End",
"Mathlib.Algebra.Group.Action.Pointwise.Set.Basic",
"Mathlib.Algebra.Group.Submonoid.Membership",
"Mathlib.GroupTheory.Congruence.Basic",
"Mathlib.GroupTheory.FreeGroup.IsFreeGroup",
"Mathlib.SetTheory.Cardinal.Basic"
] | Mathlib/GroupTheory/CoprodI.lean | consRecOn | Induct on a word by adding letters one at a time without reduction,
effectively inducting on the underlying `List`. |
consRecOn_empty {motive : Word M → Sort*} (h_empty : motive empty)
(h_cons : ∀ (i) (m : M i) (w) h1 h2, motive w → motive (cons m w h1 h2)) :
consRecOn empty h_empty h_cons = h_empty := rfl
@[simp] | theorem | GroupTheory | [
"Mathlib.Algebra.Group.Action.End",
"Mathlib.Algebra.Group.Action.Pointwise.Set.Basic",
"Mathlib.Algebra.Group.Submonoid.Membership",
"Mathlib.GroupTheory.Congruence.Basic",
"Mathlib.GroupTheory.FreeGroup.IsFreeGroup",
"Mathlib.SetTheory.Cardinal.Basic"
] | Mathlib/GroupTheory/CoprodI.lean | consRecOn_empty | null |
consRecOn_cons {motive : Word M → Sort*} (i) (m : M i) (w : Word M) h1 h2
(h_empty : motive empty)
(h_cons : ∀ (i) (m : M i) (w) h1 h2, motive w → motive (cons m w h1 h2)) :
consRecOn (cons m w h1 h2) h_empty h_cons = h_cons i m w h1 h2
(consRecOn w h_empty h_cons) := rfl
variable [DecidableEq ι] [∀ i, DecidableEq (M i)] | theorem | GroupTheory | [
"Mathlib.Algebra.Group.Action.End",
"Mathlib.Algebra.Group.Action.Pointwise.Set.Basic",
"Mathlib.Algebra.Group.Submonoid.Membership",
"Mathlib.GroupTheory.Congruence.Basic",
"Mathlib.GroupTheory.FreeGroup.IsFreeGroup",
"Mathlib.SetTheory.Cardinal.Basic"
] | Mathlib/GroupTheory/CoprodI.lean | consRecOn_cons | null |
private equivPairAux (i) (w : Word M) : { p : Pair M i // rcons p = w } :=
consRecOn w ⟨⟨1, .empty, by simp [fstIdx, empty]⟩, by simp [rcons]⟩ <|
fun j m w h1 h2 _ =>
if ij : i = j then
{ val :=
{ head := ij ▸ m
tail := w
fstIdx_ne := ij ▸ h1 }
property := by subst ij; simp [rcons, h2] }
else ⟨⟨1, cons m w h1 h2, by simp [cons, fstIdx, Ne.symm ij]⟩, by simp [rcons]⟩ | def | GroupTheory | [
"Mathlib.Algebra.Group.Action.End",
"Mathlib.Algebra.Group.Action.Pointwise.Set.Basic",
"Mathlib.Algebra.Group.Submonoid.Membership",
"Mathlib.GroupTheory.Congruence.Basic",
"Mathlib.GroupTheory.FreeGroup.IsFreeGroup",
"Mathlib.SetTheory.Cardinal.Basic"
] | Mathlib/GroupTheory/CoprodI.lean | equivPairAux | Given `i : ι`, any reduced word can be decomposed into a pair `p` such that `w = rcons p`. |
equivPair (i) : Word M ≃ Pair M i where
toFun w := (equivPairAux i w).val
invFun := rcons
left_inv w := (equivPairAux i w).property
right_inv _ := rcons_inj (equivPairAux i _).property | def | GroupTheory | [
"Mathlib.Algebra.Group.Action.End",
"Mathlib.Algebra.Group.Action.Pointwise.Set.Basic",
"Mathlib.Algebra.Group.Submonoid.Membership",
"Mathlib.GroupTheory.Congruence.Basic",
"Mathlib.GroupTheory.FreeGroup.IsFreeGroup",
"Mathlib.SetTheory.Cardinal.Basic"
] | Mathlib/GroupTheory/CoprodI.lean | equivPair | The equivalence between words and pairs. Given a word, it decomposes it as a pair by removing
the first letter if it comes from `M i`. Given a pair, it prepends the head to the tail. |
equivPair_symm (i) (p : Pair M i) : (equivPair i).symm p = rcons p :=
rfl | theorem | GroupTheory | [
"Mathlib.Algebra.Group.Action.End",
"Mathlib.Algebra.Group.Action.Pointwise.Set.Basic",
"Mathlib.Algebra.Group.Submonoid.Membership",
"Mathlib.GroupTheory.Congruence.Basic",
"Mathlib.GroupTheory.FreeGroup.IsFreeGroup",
"Mathlib.SetTheory.Cardinal.Basic"
] | Mathlib/GroupTheory/CoprodI.lean | equivPair_symm | null |
equivPair_eq_of_fstIdx_ne {i} {w : Word M} (h : fstIdx w ≠ some i) :
equivPair i w = ⟨1, w, h⟩ :=
(equivPair i).apply_eq_iff_eq_symm_apply.mpr <| Eq.symm (dif_pos rfl) | theorem | GroupTheory | [
"Mathlib.Algebra.Group.Action.End",
"Mathlib.Algebra.Group.Action.Pointwise.Set.Basic",
"Mathlib.Algebra.Group.Submonoid.Membership",
"Mathlib.GroupTheory.Congruence.Basic",
"Mathlib.GroupTheory.FreeGroup.IsFreeGroup",
"Mathlib.SetTheory.Cardinal.Basic"
] | Mathlib/GroupTheory/CoprodI.lean | equivPair_eq_of_fstIdx_ne | null |
mem_equivPair_tail_iff {i j : ι} {w : Word M} (m : M i) :
(⟨i, m⟩ ∈ (equivPair j w).tail.toList) ↔ ⟨i, m⟩ ∈ w.toList.tail
∨ i ≠ j ∧ ∃ h : w.toList ≠ [], w.toList.head h = ⟨i, m⟩ := by
simp only [equivPair, equivPairAux, ne_eq, Equiv.coe_fn_mk]
induction w using consRecOn with
| empty => simp
| cons k g tail h1 h2 ih =>
simp only [consRecOn_cons]
split_ifs with h
· subst k
by_cases hij : j = i <;> simp_all
· by_cases hik : i = k
· subst i; simp_all [@eq_comm _ m g, @eq_comm _ k j, or_comm]
· simp [hik, Ne.symm hik] | theorem | GroupTheory | [
"Mathlib.Algebra.Group.Action.End",
"Mathlib.Algebra.Group.Action.Pointwise.Set.Basic",
"Mathlib.Algebra.Group.Submonoid.Membership",
"Mathlib.GroupTheory.Congruence.Basic",
"Mathlib.GroupTheory.FreeGroup.IsFreeGroup",
"Mathlib.SetTheory.Cardinal.Basic"
] | Mathlib/GroupTheory/CoprodI.lean | mem_equivPair_tail_iff | null |
mem_of_mem_equivPair_tail {i j : ι} {w : Word M} (m : M i) :
(⟨i, m⟩ ∈ (equivPair j w).tail.toList) → ⟨i, m⟩ ∈ w.toList := by
rw [mem_equivPair_tail_iff]
rintro (h | h)
· exact List.mem_of_mem_tail h
· revert h; cases w.toList <;> simp +contextual | theorem | GroupTheory | [
"Mathlib.Algebra.Group.Action.End",
"Mathlib.Algebra.Group.Action.Pointwise.Set.Basic",
"Mathlib.Algebra.Group.Submonoid.Membership",
"Mathlib.GroupTheory.Congruence.Basic",
"Mathlib.GroupTheory.FreeGroup.IsFreeGroup",
"Mathlib.SetTheory.Cardinal.Basic"
] | Mathlib/GroupTheory/CoprodI.lean | mem_of_mem_equivPair_tail | null |
equivPair_head {i : ι} {w : Word M} :
(equivPair i w).head =
if h : ∃ (h : w.toList ≠ []), (w.toList.head h).1 = i
then h.snd ▸ (w.toList.head h.1).2
else 1 := by
simp only [equivPair, equivPairAux]
induction w using consRecOn with
| empty => simp
| cons head =>
by_cases hi : i = head
· subst hi; simp
· simp [hi, Ne.symm hi] | theorem | GroupTheory | [
"Mathlib.Algebra.Group.Action.End",
"Mathlib.Algebra.Group.Action.Pointwise.Set.Basic",
"Mathlib.Algebra.Group.Submonoid.Membership",
"Mathlib.GroupTheory.Congruence.Basic",
"Mathlib.GroupTheory.FreeGroup.IsFreeGroup",
"Mathlib.SetTheory.Cardinal.Basic"
] | Mathlib/GroupTheory/CoprodI.lean | equivPair_head | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.