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
summandAction (i) : MulAction (M i) (Word M) where smul m w := rcons { equivPair i w with head := m * (equivPair i w).head } one_smul w := by apply (equivPair i).symm_apply_eq.mpr simp [equivPair] mul_smul m m' w := by dsimp [instHSMul] simp [mul_assoc, ← equivPair_symm, Equiv.apply_symm_apply]
instance
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
summandAction
null
smul_def {i} (m : M i) (w : Word M) : m • w = rcons { equivPair i w with head := m * (equivPair i w).head } := 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
smul_def
null
of_smul_def (i) (w : Word M) (m : M i) : of m • w = rcons { equivPair i w with head := m * (equivPair i w).head } := 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
of_smul_def
null
equivPair_smul_same {i} (m : M i) (w : Word M) : equivPair i (of m • w) = ⟨m * (equivPair i w).head, (equivPair i w).tail, (equivPair i w).fstIdx_ne⟩ := by rw [of_smul_def, ← equivPair_symm] simp @[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
equivPair_smul_same
null
equivPair_tail {i} (p : Pair M i) : equivPair i p.tail = ⟨1, p.tail, p.fstIdx_ne⟩ := equivPair_eq_of_fstIdx_ne _
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_tail
null
smul_eq_of_smul {i} (m : M i) (w : Word M) : m • w = of m • w := 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
smul_eq_of_smul
null
mem_smul_iff {i j : ι} {m₁ : M i} {m₂ : M j} {w : Word M} : ⟨_, m₁⟩ ∈ (of m₂ • w).toList ↔ (¬i = j ∧ ⟨i, m₁⟩ ∈ w.toList) ∨ (m₁ ≠ 1 ∧ ∃ (hij : i = j),(⟨i, m₁⟩ ∈ w.toList.tail) ∨ (∃ m', ⟨j, m'⟩ ∈ w.toList.head? ∧ m₁ = hij ▸ (m₂ * m')) ∨ (w.fstIdx ≠ some j ∧ m₁ = hij ▸ m₂)) := by rw [of_smul_def, mem_rcons_iff, mem_equivPair_tail_iff, equivPair_head, or_assoc] by_cases hij : i = j · subst i simp only [not_true, ne_eq, false_and, exists_prop, true_and, false_or] by_cases hw : ⟨j, m₁⟩ ∈ w.toList.tail · simp [hw, show m₁ ≠ 1 from w.ne_one _ (List.mem_of_mem_tail hw)] · simp only [hw, false_or, Option.mem_def, and_congr_right_iff] intro hm1 split_ifs with h · rcases h with ⟨hnil, rfl⟩ simp only [List.head?_eq_head hnil, Option.some.injEq] constructor · rintro rfl exact Or.inl ⟨_, rfl, rfl⟩ · rintro (⟨_, h, rfl⟩ | hm') · simp only [Sigma.ext_iff, heq_eq_eq, true_and] at h subst h rfl · simp only [fstIdx, Option.map_eq_some_iff, Sigma.exists, exists_and_right, exists_eq_right, not_exists, ne_eq] at hm' exact (hm'.1 (w.toList.head hnil).2 (by rw [List.head?_eq_head])).elim · revert h rw [fstIdx] cases w.toList · simp · simp +contextual [Sigma.ext_iff] · rcases w with ⟨_ | _, _, _⟩ <;> simp [or_comm, hij, Ne.symm hij, eq_comm]
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_smul_iff
null
mem_smul_iff_of_ne {i j : ι} (hij : i ≠ j) {m₁ : M i} {m₂ : M j} {w : Word M} : ⟨_, m₁⟩ ∈ (of m₂ • w).toList ↔ ⟨i, m₁⟩ ∈ w.toList := by simp [mem_smul_iff, *]
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_smul_iff_of_ne
null
cons_eq_smul {i} {m : M i} {ls h1 h2} : cons m ls h1 h2 = of m • ls := by rw [of_smul_def, equivPair_eq_of_fstIdx_ne _] · simp [cons, rcons, h2] · exact h1
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
cons_eq_smul
null
rcons_eq_smul {i} (p : Pair M i) : rcons p = of p.head • p.tail := by simp [of_smul_def] @[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
rcons_eq_smul
null
equivPair_head_smul_equivPair_tail {i : ι} (w : Word M) : of (equivPair i w).head • (equivPair i w).tail = w := by rw [← rcons_eq_smul, ← equivPair_symm, Equiv.symm_apply_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
equivPair_head_smul_equivPair_tail
null
equivPair_tail_eq_inv_smul {G : ι → Type*} [∀ i, Group (G i)] [∀ i, DecidableEq (G i)] {i} (w : Word G) : (equivPair i w).tail = (of (equivPair i w).head)⁻¹ • w := Eq.symm <| inv_smul_eq_iff.2 (equivPair_head_smul_equivPair_tail w).symm @[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
equivPair_tail_eq_inv_smul
null
smul_induction {motive : Word M → Prop} (empty : motive empty) (smul : ∀ (i) (m : M i) (w), motive w → motive (of m • w)) (w : Word M) : motive w := by induction w using consRecOn with | empty => exact empty | cons _ _ _ _ _ ih => rw [cons_eq_smul] exact smul _ _ _ ih @[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
smul_induction
null
prod_smul (m) : ∀ w : Word M, prod (m • w) = m * prod w := by induction m using CoprodI.induction_on with | one => intro rw [one_smul, one_mul] | of _ => intros rw [of_smul_def, prod_rcons, of.map_mul, mul_assoc, ← prod_rcons, ← equivPair_symm, Equiv.symm_apply_apply] | mul x y hx hy => intro w rw [mul_smul, hx, hy, mul_assoc]
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_smul
null
equiv : CoprodI M ≃ Word M where toFun m := m • empty invFun w := prod w left_inv m := by dsimp only; rw [prod_smul, prod_empty, mul_one] right_inv := by apply smul_induction · dsimp only rw [prod_empty, one_smul] · dsimp only intro i m w ih rw [prod_smul, mul_smul, ih]
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
equiv
Each element of the free product corresponds to a unique reduced word.
NeWord : ι → ι → Type _ | singleton : ∀ {i : ι} (x : M i), x ≠ 1 → NeWord i i | append : ∀ {i j k l} (_w₁ : NeWord i j) (_hne : j ≠ k) (_w₂ : NeWord k l), NeWord i l
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
NeWord
A `NeWord M i j` is a representation of a non-empty reduced words where the first letter comes from `M i` and the last letter comes from `M j`. It can be constructed from singletons and via concatenation, and thus provides a useful induction principle.
@[simp] toList : ∀ {i j} (_w : NeWord M i j), List (Σ i, M i) | i, _, singleton x _ => [⟨i, x⟩] | _, _, append w₁ _ w₂ => w₁.toList ++ w₂.toList
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
toList
The list represented by a given `NeWord`
toList_ne_nil {i j} (w : NeWord M i j) : w.toList ≠ List.nil := by induction w · rintro ⟨rfl⟩ · apply List.append_ne_nil_of_left_ne_nil assumption
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
toList_ne_nil
null
@[simp] head : ∀ {i j} (_w : NeWord M i j), M i | _, _, singleton x _ => x | _, _, append w₁ _ _ => w₁.head
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
head
The first letter of a `NeWord`
@[simp] last : ∀ {i j} (_w : NeWord M i j), M j | _, _, singleton x _hne1 => x | _, _, append _w₁ _hne w₂ => w₂.last @[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
last
The last letter of a `NeWord`
toList_head? {i j} (w : NeWord M i j) : w.toList.head? = Option.some ⟨i, w.head⟩ := by rw [← Option.mem_def] induction w · rw [Option.mem_def] rfl · exact List.mem_head?_append_of_mem_head? (by assumption) @[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
toList_head
null
toList_getLast? {i j} (w : NeWord M i j) : w.toList.getLast? = Option.some ⟨j, w.last⟩ := by rw [← Option.mem_def] induction w · rw [Option.mem_def] rfl · exact List.mem_getLast?_append_of_mem_getLast? (by assumption)
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
toList_getLast
null
toWord {i j} (w : NeWord M i j) : Word M where toList := w.toList ne_one := by induction w · simpa only [toList, List.mem_singleton, ne_eq, forall_eq] · intro l h simp only [toList, List.mem_append] at h cases h <;> aesop chain_ne := by induction w · exact List.isChain_singleton _ · refine List.IsChain.append (by assumption) (by assumption) ?_ intro x hx y hy rw [toList_getLast?, Option.mem_some_iff] at hx rw [toList_head?, Option.mem_some_iff] at hy subst hx subst hy assumption
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
toWord
The `Word M` represented by a `NeWord M i j`
of_word (w : Word M) (h : w ≠ empty) : ∃ (i j : _) (w' : NeWord M i j), w'.toWord = w := by suffices ∃ (i j : _) (w' : NeWord M i j), w'.toWord.toList = w.toList by rcases this with ⟨i, j, w, h⟩ refine ⟨i, j, w, ?_⟩ ext rw [h] obtain ⟨l, hnot1, hchain⟩ := w induction l with | nil => contradiction | cons x l hi => rw [List.forall_mem_cons] at hnot1 rcases l with - | ⟨y, l⟩ · refine ⟨x.1, x.1, singleton x.2 hnot1.1, ?_⟩ simp [toWord] · rw [List.isChain_cons_cons] at hchain specialize hi hnot1.2 hchain.2 (by rintro ⟨rfl⟩) obtain ⟨i, j, w', hw' : w'.toList = y::l⟩ := hi obtain rfl : y = ⟨i, w'.head⟩ := by simpa [hw'] using w'.toList_head? refine ⟨x.1, j, append (singleton x.2 hnot1.1) hchain.1 w', ?_⟩ simpa [toWord] using hw'
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_word
Every nonempty `Word M` can be constructed as a `NeWord M i j`
prod {i j} (w : NeWord M i j) := w.toWord.prod @[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 non-empty reduced word determines an element of the free product, given by multiplication.
singleton_head {i} (x : M i) (hne_one : x ≠ 1) : (singleton x hne_one).head = x := 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
singleton_head
null
singleton_last {i} (x : M i) (hne_one : x ≠ 1) : (singleton x hne_one).last = x := 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
singleton_last
null
prod_singleton {i} (x : M i) (hne_one : x ≠ 1) : (singleton x hne_one).prod = of x := by simp [toWord, prod, Word.prod] @[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
prod_singleton
null
append_head {i j k l} {w₁ : NeWord M i j} {hne : j ≠ k} {w₂ : NeWord M k l} : (append w₁ hne w₂).head = w₁.head := 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
append_head
null
append_last {i j k l} {w₁ : NeWord M i j} {hne : j ≠ k} {w₂ : NeWord M k l} : (append w₁ hne w₂).last = w₂.last := 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
append_last
null
append_prod {i j k l} {w₁ : NeWord M i j} {hne : j ≠ k} {w₂ : NeWord M k l} : (append w₁ hne w₂).prod = w₁.prod * w₂.prod := by simp [toWord, prod, Word.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
append_prod
null
replaceHead : ∀ {i j : ι} (x : M i) (_hnotone : x ≠ 1) (_w : NeWord M i j), NeWord M i j | _, _, x, h, singleton _ _ => singleton x h | _, _, x, h, append w₁ hne w₂ => append (replaceHead x h w₁) hne w₂ @[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
replaceHead
One can replace the first letter in a non-empty reduced word by an element of the same group
replaceHead_head {i j : ι} (x : M i) (hnotone : x ≠ 1) (w : NeWord M i j) : (replaceHead x hnotone w).head = x := by induction w · rfl · simp [*, replaceHead]
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
replaceHead_head
null
mulHead {i j : ι} (w : NeWord M i j) (x : M i) (hnotone : x * w.head ≠ 1) : NeWord M i j := replaceHead (x * w.head) hnotone w @[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
mulHead
One can multiply an element from the left to a non-empty reduced word if it does not cancel with the first element in the word.
mulHead_head {i j : ι} (w : NeWord M i j) (x : M i) (hnotone : x * w.head ≠ 1) : (mulHead w x hnotone).head = x * w.head := by induction w · rfl · simp [*, mulHead] @[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
mulHead_head
null
mulHead_prod {i j : ι} (w : NeWord M i j) (x : M i) (hnotone : x * w.head ≠ 1) : (mulHead w x hnotone).prod = of x * w.prod := by unfold mulHead induction w with | singleton => simp [replaceHead] | append _ _ _ w_ih_w₁ w_ih_w₂ => specialize w_ih_w₁ _ hnotone simp only [replaceHead, append_prod, ← mul_assoc] congr 1
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
mulHead_prod
null
inv : ∀ {i j} (_w : NeWord G i j), NeWord G j i | _, _, singleton x h => singleton x⁻¹ (mt inv_eq_one.mp h) | _, _, append w₁ h w₂ => append w₂.inv h.symm w₁.inv @[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
inv
The inverse of a non-empty reduced word
inv_prod {i j} (w : NeWord G i j) : w.inv.prod = w.prod⁻¹ := by induction w <;> simp [inv, *] @[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
inv_prod
null
inv_head {i j} (w : NeWord G i j) : w.inv.head = w.last⁻¹ := by induction w <;> simp [inv, *] @[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
inv_head
null
inv_last {i j} (w : NeWord G i j) : w.inv.last = w.head⁻¹ := by induction w <;> simp [inv, *]
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_last
null
lift_word_ping_pong {i j k} (w : NeWord H i j) (hk : j ≠ k) : lift f w.prod • X k ⊆ X i := by induction w generalizing k with | singleton x hne_one => simpa using hpp hk _ hne_one | @append i j k l w₁ hne w₂ hIw₁ hIw₂ => calc lift f (NeWord.append w₁ hne w₂).prod • X k = lift f w₁.prod • lift f w₂.prod • X k := by simp [MulAction.mul_smul] _ ⊆ lift f w₁.prod • X _ := smul_set_subset_smul_set_iff.mpr (hIw₂ hk) _ ⊆ X i := hIw₁ hne include hXnonempty hXdisj
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_word_ping_pong
null
lift_word_prod_nontrivial_of_other_i {i j k} (w : NeWord H i j) (hhead : k ≠ i) (hlast : k ≠ j) : lift f w.prod ≠ 1 := by intro heq1 have : X k ⊆ X i := by simpa [heq1] using lift_word_ping_pong f X hpp w hlast.symm obtain ⟨x, hx⟩ := hXnonempty k exact (hXdisj hhead).le_bot ⟨hx, this hx⟩ variable [Nontrivial ι]
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_word_prod_nontrivial_of_other_i
null
lift_word_prod_nontrivial_of_head_eq_last {i} (w : NeWord H i i) : lift f w.prod ≠ 1 := by obtain ⟨k, hk⟩ := exists_ne i exact lift_word_prod_nontrivial_of_other_i f X hXnonempty hXdisj hpp w hk hk
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_word_prod_nontrivial_of_head_eq_last
null
lift_word_prod_nontrivial_of_head_card {i j} (w : NeWord H i j) (hcard : 3 ≤ #(H i)) (hheadtail : i ≠ j) : lift f w.prod ≠ 1 := by obtain ⟨h, hn1, hnh⟩ := Cardinal.three_le hcard 1 w.head⁻¹ have hnot1 : h * w.head ≠ 1 := by rw [← div_inv_eq_mul] exact div_ne_one_of_ne hnh let w' : NeWord H i i := NeWord.append (NeWord.mulHead w h hnot1) hheadtail.symm (NeWord.singleton h⁻¹ (inv_ne_one.mpr hn1)) have hw' : lift f w'.prod ≠ 1 := lift_word_prod_nontrivial_of_head_eq_last f X hXnonempty hXdisj hpp w' intro heq1 apply hw' simp [w', heq1] include hcard in
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_word_prod_nontrivial_of_head_card
null
lift_word_prod_nontrivial_of_not_empty {i j} (w : NeWord H i j) : lift f w.prod ≠ 1 := by classical rcases hcard with hcard | hcard · obtain ⟨i, h1, h2⟩ := Cardinal.three_le hcard i j exact lift_word_prod_nontrivial_of_other_i f X hXnonempty hXdisj hpp w h1 h2 · obtain ⟨k, hcard⟩ := hcard by_cases hh : i = k <;> by_cases hl : j = k · subst hh subst hl exact lift_word_prod_nontrivial_of_head_eq_last f X hXnonempty hXdisj hpp w · subst hh change j ≠ i at hl exact lift_word_prod_nontrivial_of_head_card f X hXnonempty hXdisj hpp w hcard hl.symm · subst hl change i ≠ j at hh have : lift f w.inv.prod ≠ 1 := lift_word_prod_nontrivial_of_head_card f X hXnonempty hXdisj hpp w.inv hcard hh.symm intro heq apply this simpa using heq · change i ≠ k at hh change j ≠ k at hl exact lift_word_prod_nontrivial_of_other_i f X hXnonempty hXdisj hpp w hh.symm hl.symm include hcard in
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_word_prod_nontrivial_of_not_empty
null
empty_of_word_prod_eq_one {w : Word H} (h : lift f w.prod = 1) : w = Word.empty := by by_contra hnotempty obtain ⟨i, j, w, rfl⟩ := NeWord.of_word w hnotempty exact lift_word_prod_nontrivial_of_not_empty f hcard X hXnonempty hXdisj hpp w h include hcard in
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
empty_of_word_prod_eq_one
null
lift_injective_of_ping_pong : Function.Injective (lift f) := by classical apply (injective_iff_map_eq_one (lift f)).mpr rw [(CoprodI.Word.equiv).forall_congr_left] intro w Heq dsimp [Word.equiv] at * rw [empty_of_word_prod_eq_one f hcard X hXnonempty hXdisj hpp Heq, Word.prod_empty]
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_injective_of_ping_pong
The **Ping-Pong-Lemma**. Given a group action of `G` on `X` so that the `H i` acts in a specific way on disjoint subsets `X i` we can prove that `lift f` is injective, and thus the image of `lift f` is isomorphic to the free product of the `H i`. Often the Ping-Pong-Lemma is stated with regard to subgroups `H i` that generate the whole group; we generalize to arbitrary group homomorphisms `f i : H i →* G` and do not require the group to be generated by the images. Usually the Ping-Pong-Lemma requires that one group `H i` has at least three elements. This condition is only needed if `# ι = 2`, and we accept `3 ≤ # ι` as an alternative.
FreeGroupBasis.coprodI {ι : Type*} {X : ι → Type*} {G : ι → Type*} [∀ i, Group (G i)] (B : ∀ i, FreeGroupBasis (X i) (G i)) : FreeGroupBasis (Σ i, X i) (CoprodI G) := ⟨MulEquiv.symm <| MonoidHom.toMulEquiv (FreeGroup.lift fun x : Σ i, X i => CoprodI.of (B x.1 x.2)) (CoprodI.lift fun i : ι => (B i).lift fun x : X i => FreeGroup.of (⟨i, x⟩ : Σ i, X i)) (by ext; simp) (by ext1 i; apply (B i).ext_hom; 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
FreeGroupBasis.coprodI
Given a family of free groups with distinguished bases, then their free product is free, with a basis given by the union of the bases of the components.
@[simps!] _root_.freeGroupEquivCoprodI {ι : Type u_1} : FreeGroup ι ≃* CoprodI fun _ : ι => FreeGroup Unit := by refine MonoidHom.toMulEquiv ?_ ?_ ?_ ?_ · exact FreeGroup.lift fun i => @CoprodI.of ι _ _ i (FreeGroup.of Unit.unit) · exact CoprodI.lift fun i => FreeGroup.lift fun _ => FreeGroup.of i · ext; simp · ext i a; cases a; 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
_root_.freeGroupEquivCoprodI
The free product of free groups is itself a free group. -/ instance {ι : Type*} (G : ι → Type*) [∀ i, Group (G i)] [∀ i, IsFreeGroup (G i)] : IsFreeGroup (CoprodI G) := (FreeGroupBasis.coprodI (fun i ↦ IsFreeGroup.basis (G i))).isFreeGroup -- NB: One might expect this theorem to be phrased with ℤ, but ℤ is an additive group, -- and using `Multiplicative ℤ` runs into diamond issues. /-- A free group is a free product of copies of the free_group over one generator.
_root_.FreeGroup.injective_lift_of_ping_pong : Function.Injective (FreeGroup.lift a) := by have : FreeGroup.lift a = (CoprodI.lift fun i => FreeGroup.lift fun _ => a i).comp (@freeGroupEquivCoprodI ι).toMonoidHom := by ext i simp rw [this, MonoidHom.coe_comp] clear this refine Function.Injective.comp ?_ (MulEquiv.injective freeGroupEquivCoprodI) change Function.Injective (lift fun i : ι => FreeGroup.lift fun _ => a i) let H : ι → Type _ := fun _i => FreeGroup Unit let f : ∀ i, H i →* G := fun i => FreeGroup.lift fun _ => a i let X' : ι → Set α := fun i => X i ∪ Y i apply lift_injective_of_ping_pong f _ X' · show ∀ i, (X' i).Nonempty exact fun i => Set.Nonempty.inl (hXnonempty i) · show Pairwise (Disjoint on X') intro i j hij simp only [X'] apply Disjoint.union_left <;> apply Disjoint.union_right · exact hXdisj hij · exact hXYdisj i j · exact (hXYdisj j i).symm · exact hYdisj hij · change Pairwise fun i j => ∀ h : H i, h ≠ 1 → f i h • X' j ⊆ X' i rintro i j hij refine FreeGroup.freeGroupUnitEquivInt.forall_congr_left.mpr ?_ intro n hne1 change FreeGroup.lift (fun _ => a i) (FreeGroup.of () ^ n) • X' j ⊆ X' i simp only [map_zpow, FreeGroup.lift_apply_of] change a i ^ n • X' j ⊆ X' i have hnne0 : n ≠ 0 := by rintro rfl apply hne1 simp [H, FreeGroup.freeGroupUnitEquivInt] clear hne1 simp only [X'] rcases (lt_or_gt_of_ne hnne0).symm with hlt | hgt · have h1n : 1 ≤ n := hlt calc a i ^ n • X' j ⊆ a i ^ n • (Y i)ᶜ := smul_set_mono ((hXYdisj j i).union_left <| hYdisj hij.symm).subset_compl_right _ ⊆ X i := by clear hnne0 hlt induction n, h1n using Int.le_induction with | base => rw [zpow_one]; exact hX i | succ n _hle hi => calc a i ^ (n + 1) • (Y i)ᶜ = (a i ^ n * a i) • (Y i)ᶜ := by rw [zpow_add, zpow_one] _ = a i ^ n • a i • (Y i)ᶜ := MulAction.mul_smul _ _ _ _ ⊆ a i ^ n • X i := smul_set_mono <| hX 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
_root_.FreeGroup.injective_lift_of_ping_pong
The Ping-Pong-Lemma. Given a group action of `G` on `X` so that the generators of the free groups act in specific ways on disjoint subsets `X i` and `Y i` we can prove that `lift f` is injective, and thus the image of `lift f` is isomorphic to the free group. Often the Ping-Pong-Lemma is stated with regard to group elements that generate the whole group; we generalize to arbitrary group homomorphisms from the free group to `G` and do not require the group to be generated by the elements.
@[to_additive] exists_leftTransversal_of_FiniteIndex {D H : Subgroup G} [D.FiniteIndex] (hD_le_H : D ≤ H) : ∃ t : Finset H, IsComplement (t : Set H) (D.subgroupOf H) ∧ ⋃ g ∈ t, (g : G) • (D : Set G) = H := by have ⟨t, ht⟩ := (D.subgroupOf H).exists_isComplement_left 1 have hf : t.Finite := ht.1.finite_left_iff.mpr inferInstance refine ⟨hf.toFinset, hf.coe_toFinset.symm ▸ ht.1, ?_⟩ ext x suffices (∃ y ∈ t, ∃ d ∈ D, y * d = x) ↔ x ∈ H by simpa using this constructor · rintro ⟨⟨y, hy⟩, -, d, h, rfl⟩ exact H.mul_mem hy (hD_le_H h) · intro hx exact ⟨_, (ht.1.toLeftFun ⟨x, hx⟩).2, _, ht.1.inv_toLeftFun_mul_mem ⟨x, hx⟩, mul_inv_cancel_left _ _⟩ variable {ι : Type*} {s : Finset ι} {H : Subgroup G} {g : ι → G} @[to_additive]
theorem
GroupTheory
[ "Mathlib.Algebra.Order.Ring.Rat", "Mathlib.GroupTheory.Complement", "Mathlib.LinearAlgebra.Basis.VectorSpace" ]
Mathlib/GroupTheory/CosetCover.lean
exists_leftTransversal_of_FiniteIndex
null
leftCoset_cover_const_iff_surjOn : ⋃ i ∈ s, g i • (H : Set G) = Set.univ ↔ Set.SurjOn (g · : ι → G ⧸ H) s Set.univ := by simp [Set.eq_univ_iff_forall, mem_leftCoset_iff, Set.SurjOn, QuotientGroup.forall_mk, QuotientGroup.eq] variable (hcovers : ⋃ i ∈ s, g i • (H : Set G) = Set.univ) include hcovers
theorem
GroupTheory
[ "Mathlib.Algebra.Order.Ring.Rat", "Mathlib.GroupTheory.Complement", "Mathlib.LinearAlgebra.Basis.VectorSpace" ]
Mathlib/GroupTheory/CosetCover.lean
leftCoset_cover_const_iff_surjOn
null
@[to_additive] finiteIndex_of_leftCoset_cover_const : H.FiniteIndex := by simp_rw [leftCoset_cover_const_iff_surjOn] at hcovers have := Set.finite_univ_iff.mp <| Set.Finite.of_surjOn _ hcovers s.finite_toSet exact H.finiteIndex_of_finite_quotient @[to_additive]
theorem
GroupTheory
[ "Mathlib.Algebra.Order.Ring.Rat", "Mathlib.GroupTheory.Complement", "Mathlib.LinearAlgebra.Basis.VectorSpace" ]
Mathlib/GroupTheory/CosetCover.lean
finiteIndex_of_leftCoset_cover_const
If `H` is a subgroup of `G` and `G` is the union of a finite family of left cosets of `H` then `H` has finite index.
index_le_of_leftCoset_cover_const : H.index ≤ s.card := by cases H.index.eq_zero_or_pos with | inl h => exact h ▸ s.card.zero_le | inr h => rw [leftCoset_cover_const_iff_surjOn, Set.surjOn_iff_surjective] at hcovers exact (Nat.card_le_card_of_surjective _ hcovers).trans_eq (Nat.card_eq_finsetCard _) @[to_additive]
theorem
GroupTheory
[ "Mathlib.Algebra.Order.Ring.Rat", "Mathlib.GroupTheory.Complement", "Mathlib.LinearAlgebra.Basis.VectorSpace" ]
Mathlib/GroupTheory/CosetCover.lean
index_le_of_leftCoset_cover_const
null
pairwiseDisjoint_leftCoset_cover_const_of_index_eq (hind : H.index = s.card) : Set.PairwiseDisjoint s (g · • (H : Set G)) := by have : Fintype (G ⧸ H) := fintypeOfIndexNeZero fun h => by rw [hind, Finset.card_eq_zero] at h rw [h, ← Finset.set_biUnion_coe, Finset.coe_empty, Set.biUnion_empty] at hcovers exact Set.empty_ne_univ hcovers suffices Function.Bijective (g · : s → G ⧸ H) by intro i hi j hj h' c hi' hj' x hx specialize hi' hx specialize hj' hx rw [mem_leftCoset_iff, SetLike.mem_coe, ← QuotientGroup.eq] at hi' hj' rw [ne_eq, ← Subtype.mk.injEq (p := (· ∈ (s : Set ι))) i hi j hj] at h' exact h' <| this.injective <| by simp only [hi', hj'] rw [Fintype.bijective_iff_surjective_and_card] constructor · rwa [leftCoset_cover_const_iff_surjOn, Set.surjOn_iff_surjective] at hcovers · simp only [Fintype.card_coe, ← hind, index_eq_card, Nat.card_eq_fintype_card]
theorem
GroupTheory
[ "Mathlib.Algebra.Order.Ring.Rat", "Mathlib.GroupTheory.Complement", "Mathlib.LinearAlgebra.Basis.VectorSpace" ]
Mathlib/GroupTheory/CosetCover.lean
pairwiseDisjoint_leftCoset_cover_const_of_index_eq
null
@[to_additive] exists_finiteIndex_of_leftCoset_cover_aux [DecidableEq (Subgroup G)] (j : ι) (hj : j ∈ s) (hcovers' : ⋃ i ∈ s.filter (H · = H j), g i • (H i : Set G) ≠ Set.univ) : ∃ i ∈ s, H i ≠ H j ∧ (H i).FiniteIndex := by classical have ⟨n, hn⟩ : ∃ n, n = (s.image H).card := exists_eq induction n using Nat.strongRec generalizing ι with | ind n ih => have ⟨x, hx⟩ : ∃ (x : G), ∀ i ∈ s, H i = H j → (g i : G ⧸ H i) ≠ ↑x := by simpa [Set.eq_univ_iff_forall, mem_leftCoset_iff, ← QuotientGroup.eq] using hcovers' replace hx : ∀ (y : G), y • (H j : Set G) ⊆ ⋃ i ∈ s.filter (H · ≠ H j), (y * x⁻¹ * g i) • (H i : Set G) := by intro y z hz simp_rw [Finset.mem_filter, Set.mem_iUnion] have ⟨i, hi, hmem⟩ : ∃ i ∈ s, x * (y⁻¹ * z) ∈ g i • (H i : Set G) := by simpa using Set.eq_univ_iff_forall.mp hcovers (x * (y⁻¹ * z)) rw [mem_leftCoset_iff, SetLike.mem_coe, ← QuotientGroup.eq] at hmem refine ⟨i, ⟨hi, fun hij => hx i hi hij ?_⟩, ?_⟩ · rwa [hmem, eq_comm, QuotientGroup.eq, hij, inv_mul_cancel_left, ← SetLike.mem_coe, ← mem_leftCoset_iff] · simpa [mem_leftCoset_iff, SetLike.mem_coe, QuotientGroup.eq, mul_assoc] using hmem let κ := ↥(s.filter (H · ≠ H j)) × Option ↥(s.filter (H · = H j)) let f : κ → G | ⟨k₁, some k₂⟩ => g k₂ * x⁻¹ * g k₁ | ⟨k₁, none⟩ => g k₁ let K (k : κ) : Subgroup G := H k.1.val have hK' (k : κ) : K k ∈ (s.image H).erase (H j) := by have := Finset.mem_filter.mp k.1.property exact Finset.mem_erase.mpr ⟨this.2, Finset.mem_image_of_mem H this.1⟩ have hK (k : κ) : K k ≠ H j := ((Finset.mem_erase.mp (hK' k)).left ·) replace hcovers : ⋃ k ∈ Finset.univ, f k • (K k : Set G) = Set.univ := Set.iUnion₂_eq_univ_iff.mpr fun y => by rw [← s.filter_union_filter_neg_eq (H · = H j), Finset.set_biUnion_union] at hcovers cases (Set.mem_union _ _ _).mp (hcovers.superset (Set.mem_univ y)) with | inl hy => have ⟨k, hk, hy⟩ := Set.mem_iUnion₂.mp hy have hk' : H k = H j := And.right <| by simpa using hk have ⟨i, hi, hy⟩ := Set.mem_iUnion₂.mp (hx (g k) (hk' ▸ hy)) exact ⟨⟨⟨i, hi⟩, some ⟨k, hk⟩⟩, Finset.mem_univ _, hy⟩ | inr hy => have ⟨i, hi, hy⟩ := Set.mem_iUnion₂.mp hy exact ⟨⟨⟨i, hi⟩, none⟩, Finset.mem_univ _, hy⟩ have ⟨k⟩ : Nonempty κ := not_isEmpty_iff.mp fun hempty => by rw [Set.iUnion_of_empty] at hcovers exact Set.empty_ne_univ hcovers by_cases hcovers' : ⋃ i ∈ Finset.filter (K · = K k) Finset.univ, f i • (K i : Set G) = Set.univ · rw [Set.iUnion₂_congr fun i hi => by rw [(Finset.mem_filter.mp hi).right]] at hcovers' exact ⟨k.1, Finset.mem_of_mem_filter k.1.1 k.1.2, hK k, finiteIndex_of_leftCoset_cover_const hcovers'⟩ have hn' : (Finset.univ.image K).card < n := hn ▸ by refine ((Finset.card_le_card fun x => ?_).trans_lt <| ...
theorem
GroupTheory
[ "Mathlib.Algebra.Order.Ring.Rat", "Mathlib.GroupTheory.Complement", "Mathlib.LinearAlgebra.Basis.VectorSpace" ]
Mathlib/GroupTheory/CosetCover.lean
exists_finiteIndex_of_leftCoset_cover_aux
null
@[to_additive] exists_finiteIndex_of_leftCoset_cover : ∃ k ∈ s, (H k).FiniteIndex := by classical have ⟨j, hj⟩ : s.Nonempty := Finset.nonempty_iff_ne_empty.mpr fun hempty => by rw [hempty, ← Finset.set_biUnion_coe, Finset.coe_empty, Set.biUnion_empty] at hcovers exact Set.empty_ne_univ hcovers by_cases hcovers' : ⋃ i ∈ s.filter (H · = H j), g i • (H i : Set G) = Set.univ · rw [Set.iUnion₂_congr fun i hi => by rw [(Finset.mem_filter.mp hi).right]] at hcovers' exact ⟨j, hj, finiteIndex_of_leftCoset_cover_const hcovers'⟩ · have ⟨i, hi, _, hfi⟩ := exists_finiteIndex_of_leftCoset_cover_aux hcovers j hj hcovers' exact ⟨i, hi, hfi⟩ @[to_additive]
theorem
GroupTheory
[ "Mathlib.Algebra.Order.Ring.Rat", "Mathlib.GroupTheory.Complement", "Mathlib.LinearAlgebra.Basis.VectorSpace" ]
Mathlib/GroupTheory/CosetCover.lean
exists_finiteIndex_of_leftCoset_cover
Let the group `G` be the union of finitely many left cosets `g i • H i`. Then at least one subgroup `H i` has finite index in `G`.
leftCoset_cover_filter_FiniteIndex_aux [DecidablePred (FiniteIndex : Subgroup G → Prop)] : (⋃ k ∈ s.filter (fun i => (H i).FiniteIndex), g k • (H k : Set G) = Set.univ) ∧ (1 ≤ ∑ i ∈ s, ((H i).index : ℚ)⁻¹) ∧ (∑ i ∈ s, ((H i).index : ℚ)⁻¹ = 1 → Set.PairwiseDisjoint (s.filter (fun i => (H i).FiniteIndex)) (fun i ↦ g i • (H i : Set G))) := by classical let D := ⨅ k ∈ s.filter (fun i => (H i).FiniteIndex), H k have hD : D.FiniteIndex := finiteIndex_iInf' _ <| by simp have hD_le {i} (hi : i ∈ s) (hfi : (H i).FiniteIndex) : D ≤ H i := iInf₂_le i (Finset.mem_filter.mpr ⟨hi, hfi⟩) choose t ht using fun i hi hfi => exists_leftTransversal_of_FiniteIndex (H := H i) (hD_le hi hfi) let κ := (i : s) × { x // x ∈ if h : (H i.1).FiniteIndex then t i.1 i.2 h else {1} } let f (k : κ) : G := g k.1 * k.2.val let K (k : κ) : Subgroup G := if (H k.1).FiniteIndex then D else H k.1 have hcovers' : ⋃ k ∈ Finset.univ, f k • (K k : Set G) = Set.univ := by rw [← s.filter_union_filter_neg_eq (fun i => (H i).FiniteIndex)] at hcovers rw [← hcovers, ← Finset.univ.filter_union_filter_neg_eq (fun k => (H k.1).FiniteIndex), Finset.set_biUnion_union, Finset.set_biUnion_union] apply congrArg₂ (· ∪ ·) <;> rw [Set.iUnion_sigma, Set.iUnion_subtype] <;> refine Set.iUnion_congr fun i => ?_ · by_cases hfi : (H i).FiniteIndex <;> simp [← Set.smul_set_iUnion₂, Set.iUnion_subtype, ← leftCoset_assoc, f, K, ht, hfi] · by_cases hfi : (H i).FiniteIndex <;> simp [Set.iUnion_subtype, f, K, hfi] have ⟨k, hkfi, hk⟩ : ∃ k, (H k.1.1).FiniteIndex ∧ K k = D := have ⟨j, hj, hjfi⟩ := exists_finiteIndex_of_leftCoset_cover hcovers have ⟨x, hx⟩ : (t j hj hjfi).Nonempty := Finset.nonempty_coe_sort.mp (ht j hj hjfi).1.leftQuotientEquiv.symm.nonempty ⟨⟨⟨j, hj⟩, ⟨x, dif_pos hjfi ▸ hx⟩⟩, hjfi, if_pos hjfi⟩ replace hcovers' : ⋃ i ∈ Finset.univ.filter (K · = D), f i • (D : Set G) = Set.univ := by rw [← hk, Set.iUnion₂_congr fun i hi => by rw [← (Finset.mem_filter.mp hi).2]] by_contra! h obtain ⟨i, -, hi⟩ := exists_finiteIndex_of_leftCoset_cover_aux hcovers' k (Finset.mem_univ k) h by_cases hfi : (H i.1.1).FiniteIndex <;> simp [K, hfi, hkfi] at hi have hHD (i) : ¬(H i).FiniteIndex → H i ≠ D := fun hfi hD' => (hD' ▸ hfi) hD have hdensity : ∑ i ∈ s, ((H i).index : ℚ)⁻¹ = (Finset.univ.filter (K · = D)).card * (D.index : ℚ)⁻¹ := by rw [eq_mul_inv_iff_mul_eq₀ (Nat.cast_ne_zero.mpr hD.index_ne_zero), Finset.sum_mul, ← Finset.sum_attach, eq_comm, Finset.card_filter, Nat.cast_sum, ← Finset.univ_sigma_univ, Finset.sum_sigma, Finset.sum_coe_sort_eq_attach] refine Finset.sum_congr rfl fun i _ => ?_ by_cases hfi : (H i).FiniteIndex · rw [← relIndex_mul_index (hD_le i.2 hfi), Nat.cast_mul, mul_comm, mul_inv_cancel_right₀ (Nat.cast_ne_zero.mpr hfi.index_ne_zero)] simpa [K, hfi] using (ht i.1 i.2 hfi).1.card_left · rw [of_not_not (FiniteIndex.mk.mt hfi), Nat.cast_zero, inv_zero, zero_mul] simpa [K, hfi] using hHD i hfi refine ⟨?_, ?_, ?_⟩ ...
theorem
GroupTheory
[ "Mathlib.Algebra.Order.Ring.Rat", "Mathlib.GroupTheory.Complement", "Mathlib.LinearAlgebra.Basis.VectorSpace" ]
Mathlib/GroupTheory/CosetCover.lean
leftCoset_cover_filter_FiniteIndex_aux
null
@[to_additive] leftCoset_cover_filter_FiniteIndex [DecidablePred (FiniteIndex : Subgroup G → Prop)] : ⋃ k ∈ s.filter (fun i => (H i).FiniteIndex), g k • (H k : Set G) = Set.univ := (leftCoset_cover_filter_FiniteIndex_aux hcovers).1
theorem
GroupTheory
[ "Mathlib.Algebra.Order.Ring.Rat", "Mathlib.GroupTheory.Complement", "Mathlib.LinearAlgebra.Basis.VectorSpace" ]
Mathlib/GroupTheory/CosetCover.lean
leftCoset_cover_filter_FiniteIndex
Let the group `G` be the union of finitely many left cosets `g i • H i`. Then the cosets of subgroups of infinite index may be omitted from the covering.
@[to_additive one_le_sum_inv_index_of_leftCoset_cover] one_le_sum_inv_index_of_leftCoset_cover : 1 ≤ ∑ i ∈ s, ((H i).index : ℚ)⁻¹ := have := Classical.decPred (FiniteIndex : Subgroup G → Prop) (leftCoset_cover_filter_FiniteIndex_aux hcovers).2.1
theorem
GroupTheory
[ "Mathlib.Algebra.Order.Ring.Rat", "Mathlib.GroupTheory.Complement", "Mathlib.LinearAlgebra.Basis.VectorSpace" ]
Mathlib/GroupTheory/CosetCover.lean
one_le_sum_inv_index_of_leftCoset_cover
Let the group `G` be the union of finitely many left cosets `g i • H i`. Then the sum of the inverses of the indexes of the subgroups `H i` is greater than or equal to 1.
@[to_additive] pairwiseDisjoint_leftCoset_cover_of_sum_inv_index_eq_one [DecidablePred (FiniteIndex : Subgroup G → Prop)] : ∑ i ∈ s, ((H i).index : ℚ)⁻¹ = 1 → Set.PairwiseDisjoint (s.filter (fun i => (H i).FiniteIndex)) (fun i ↦ g i • (H i : Set G)) := (leftCoset_cover_filter_FiniteIndex_aux hcovers).2.2
theorem
GroupTheory
[ "Mathlib.Algebra.Order.Ring.Rat", "Mathlib.GroupTheory.Complement", "Mathlib.LinearAlgebra.Basis.VectorSpace" ]
Mathlib/GroupTheory/CosetCover.lean
pairwiseDisjoint_leftCoset_cover_of_sum_inv_index_eq_one
Let the group `G` be the union of finitely many left cosets `g i • H i`. If the sum of the inverses of the indexes of the subgroups `H i` is equal to 1, then the cosets of the subgroups of finite index are pairwise disjoint.
@[to_additive] exists_index_le_card_of_leftCoset_cover : ∃ i ∈ s, (H i).FiniteIndex ∧ (H i).index ≤ s.card := by by_contra! h apply (one_le_sum_inv_index_of_leftCoset_cover hcovers).not_gt cases s.eq_empty_or_nonempty with | inl hs => simp only [hs, Finset.sum_empty, zero_lt_one] | inr hs => have hs' : 0 < s.card := hs.card_pos have hlt : ∀ i ∈ s, ((H i).index : ℚ)⁻¹ < (s.card : ℚ)⁻¹ := fun i hi ↦ by cases eq_or_ne (H i).index 0 with | inl hindex => rwa [hindex, Nat.cast_zero, inv_zero, inv_pos, Nat.cast_pos] | inr hindex => exact inv_strictAnti₀ (by exact_mod_cast hs') (by exact_mod_cast h i hi ⟨hindex⟩) apply (Finset.sum_lt_sum_of_nonempty hs hlt).trans_eq rw [Finset.sum_const, nsmul_eq_mul, mul_inv_cancel₀ (Nat.cast_ne_zero.mpr hs'.ne')]
theorem
GroupTheory
[ "Mathlib.Algebra.Order.Ring.Rat", "Mathlib.GroupTheory.Complement", "Mathlib.LinearAlgebra.Basis.VectorSpace" ]
Mathlib/GroupTheory/CosetCover.lean
exists_index_le_card_of_leftCoset_cover
B. H. Neumann Lemma : If a finite family of cosets of subgroups covers the group, then at least one of these subgroups has index not exceeding the number of cosets.
Submodule.exists_finiteIndex_of_cover (hcovers : ⋃ i ∈ s, (p i : Set M) = Set.univ) : ∃ k ∈ s, (p k).toAddSubgroup.FiniteIndex := have hcovers' : ⋃ i ∈ s, (0 : M) +ᵥ ((p i).toAddSubgroup : Set M) = Set.univ := by simpa only [zero_vadd] using hcovers AddSubgroup.exists_finiteIndex_of_leftCoset_cover hcovers'
theorem
GroupTheory
[ "Mathlib.Algebra.Order.Ring.Rat", "Mathlib.GroupTheory.Complement", "Mathlib.LinearAlgebra.Basis.VectorSpace" ]
Mathlib/GroupTheory/CosetCover.lean
Submodule.exists_finiteIndex_of_cover
null
Subspace.biUnion_ne_univ_of_top_notMem (hs : ⊤ ∉ s) : ⋃ p ∈ s, (p : Set E) ≠ Set.univ := by intro hcovers have ⟨p, hp, hfi⟩ := Submodule.exists_finiteIndex_of_cover hcovers have : Finite (E ⧸ p) := AddSubgroup.finite_quotient_of_finiteIndex have : Nontrivial (E ⧸ p) := Submodule.Quotient.nontrivial_of_lt_top p (ne_of_mem_of_not_mem hp hs).lt_top have : Infinite (E ⧸ p) := Module.Free.infinite k (E ⧸ p) exact not_finite (E ⧸ p) @[deprecated (since := "2025-05-24")] alias Subspace.biUnion_ne_univ_of_top_nmem := Subspace.biUnion_ne_univ_of_top_notMem /- A vector space over an infinite field cannot be a finite union of proper subspaces. -/
theorem
GroupTheory
[ "Mathlib.Algebra.Order.Ring.Rat", "Mathlib.GroupTheory.Complement", "Mathlib.LinearAlgebra.Basis.VectorSpace" ]
Mathlib/GroupTheory/CosetCover.lean
Subspace.biUnion_ne_univ_of_top_notMem
null
Subspace.top_mem_of_biUnion_eq_univ (hcovers : ⋃ p ∈ s, (p : Set E) = Set.univ) : ⊤ ∈ s := by contrapose! hcovers exact Subspace.biUnion_ne_univ_of_top_notMem hcovers
theorem
GroupTheory
[ "Mathlib.Algebra.Order.Ring.Rat", "Mathlib.GroupTheory.Complement", "Mathlib.LinearAlgebra.Basis.VectorSpace" ]
Mathlib/GroupTheory/CosetCover.lean
Subspace.top_mem_of_biUnion_eq_univ
null
Subspace.exists_eq_top_of_iUnion_eq_univ {ι} [Finite ι] {p : ι → Subspace k E} (hcovers : ⋃ i, (p i : Set E) = Set.univ) : ∃ i, p i = ⊤ := by have := Fintype.ofFinite (Set.range p) simp_rw [← Set.biUnion_range (f := p), ← Set.mem_toFinset] at hcovers apply Set.mem_toFinset.mp (Subspace.top_mem_of_biUnion_eq_univ hcovers)
theorem
GroupTheory
[ "Mathlib.Algebra.Order.Ring.Rat", "Mathlib.GroupTheory.Complement", "Mathlib.LinearAlgebra.Basis.VectorSpace" ]
Mathlib/GroupTheory/CosetCover.lean
Subspace.exists_eq_top_of_iUnion_eq_univ
null
DivisibleBy where /-- The division function -/ div : A → α → A div_zero : ∀ a, div a 0 = 0 div_cancel : ∀ {n : α} (a : A), n ≠ 0 → n • div a n = a
class
GroupTheory
[ "Mathlib.Algebra.Group.ULift", "Mathlib.Algebra.GroupWithZero.Subgroup", "Mathlib.Algebra.Module.NatInt", "Mathlib.GroupTheory.QuotientGroup.Defs", "Mathlib.Tactic.NormNum.Eq" ]
Mathlib/GroupTheory/Divisible.lean
DivisibleBy
An `AddMonoid A` is `α`-divisible iff `n • x = a` has a solution for all `n ≠ 0 ∈ α` and `a ∈ A`. Here we adopt a constructive approach where we ask an explicit `div : A → α → A` function such that * `div a 0 = 0` for all `a ∈ A` * `n • div a n = a` for all `n ≠ 0 ∈ α` and `a ∈ A`.
@[to_additive] RootableBy where /-- The root function -/ root : A → α → A root_zero : ∀ a, root a 0 = 1 root_cancel : ∀ {n : α} (a : A), n ≠ 0 → root a n ^ n = a @[to_additive smul_right_surj_of_divisibleBy]
class
GroupTheory
[ "Mathlib.Algebra.Group.ULift", "Mathlib.Algebra.GroupWithZero.Subgroup", "Mathlib.Algebra.Module.NatInt", "Mathlib.GroupTheory.QuotientGroup.Defs", "Mathlib.Tactic.NormNum.Eq" ]
Mathlib/GroupTheory/Divisible.lean
RootableBy
A `Monoid A` is `α`-rootable iff `xⁿ = a` has a solution for all `n ≠ 0 ∈ α` and `a ∈ A`. Here we adopt a constructive approach where we ask an explicit `root : A → α → A` function such that * `root a 0 = 1` for all `a ∈ A` * `(root a n)ⁿ = a` for all `n ≠ 0 ∈ α` and `a ∈ A`.
pow_left_surj_of_rootableBy [RootableBy A α] {n : α} (hn : n ≠ 0) : Function.Surjective (fun a => a ^ n : A → A) := fun x => ⟨RootableBy.root x n, RootableBy.root_cancel _ hn⟩
theorem
GroupTheory
[ "Mathlib.Algebra.Group.ULift", "Mathlib.Algebra.GroupWithZero.Subgroup", "Mathlib.Algebra.Module.NatInt", "Mathlib.GroupTheory.QuotientGroup.Defs", "Mathlib.Tactic.NormNum.Eq" ]
Mathlib/GroupTheory/Divisible.lean
pow_left_surj_of_rootableBy
null
@[to_additive divisibleByOfSMulRightSurj /-- An `AddMonoid A` is `α`-divisible iff `n • _` is a surjective function, i.e. the constructive version implies the textbook approach. -/] noncomputable rootableByOfPowLeftSurj (H : ∀ {n : α}, n ≠ 0 → Function.Surjective (fun a => a ^ n : A → A)) : RootableBy A α where root a n := @dite _ (n = 0) (Classical.dec _) (fun _ => (1 : A)) fun hn => (H hn a).choose root_zero _ := by classical exact dif_pos rfl root_cancel a hn := by dsimp only rw [dif_neg hn] exact (H hn a).choose_spec
def
GroupTheory
[ "Mathlib.Algebra.Group.ULift", "Mathlib.Algebra.GroupWithZero.Subgroup", "Mathlib.Algebra.Module.NatInt", "Mathlib.GroupTheory.QuotientGroup.Defs", "Mathlib.Tactic.NormNum.Eq" ]
Mathlib/GroupTheory/Divisible.lean
rootableByOfPowLeftSurj
A `Monoid A` is `α`-rootable iff the `pow _ n` function is surjective, i.e. the constructive version implies the textbook approach.
@[to_additive] Pi.rootableBy : RootableBy (∀ i, B i) β where root x n i := RootableBy.root (x i) n root_zero _x := funext fun _i => RootableBy.root_zero _ root_cancel _x hn := funext fun _i => RootableBy.root_cancel _ hn
instance
GroupTheory
[ "Mathlib.Algebra.Group.ULift", "Mathlib.Algebra.GroupWithZero.Subgroup", "Mathlib.Algebra.Module.NatInt", "Mathlib.GroupTheory.QuotientGroup.Defs", "Mathlib.Tactic.NormNum.Eq" ]
Mathlib/GroupTheory/Divisible.lean
Pi.rootableBy
null
@[to_additive] Prod.rootableBy : RootableBy (B × B') β where root p n := (RootableBy.root p.1 n, RootableBy.root p.2 n) root_zero _p := Prod.ext (RootableBy.root_zero _) (RootableBy.root_zero _) root_cancel _p hn := Prod.ext (RootableBy.root_cancel _ hn) (RootableBy.root_cancel _ hn)
instance
GroupTheory
[ "Mathlib.Algebra.Group.ULift", "Mathlib.Algebra.GroupWithZero.Subgroup", "Mathlib.Algebra.Module.NatInt", "Mathlib.GroupTheory.QuotientGroup.Defs", "Mathlib.Tactic.NormNum.Eq" ]
Mathlib/GroupTheory/Divisible.lean
Prod.rootableBy
null
@[to_additive] ULift.instRootableBy [RootableBy A α] : RootableBy (ULift A) α where root x a := ULift.up <| RootableBy.root x.down a root_zero x := ULift.ext _ _ <| RootableBy.root_zero x.down root_cancel _ h := ULift.ext _ _ <| RootableBy.root_cancel _ h
instance
GroupTheory
[ "Mathlib.Algebra.Group.ULift", "Mathlib.Algebra.GroupWithZero.Subgroup", "Mathlib.Algebra.Module.NatInt", "Mathlib.GroupTheory.QuotientGroup.Defs", "Mathlib.Tactic.NormNum.Eq" ]
Mathlib/GroupTheory/Divisible.lean
ULift.instRootableBy
null
smul_top_eq_top_of_divisibleBy_int [DivisibleBy A ℤ] {n : ℤ} (hn : n ≠ 0) : n • (⊤ : AddSubgroup A) = ⊤ := AddSubgroup.map_top_of_surjective _ fun a => ⟨DivisibleBy.div a n, DivisibleBy.div_cancel _ hn⟩
theorem
GroupTheory
[ "Mathlib.Algebra.Group.ULift", "Mathlib.Algebra.GroupWithZero.Subgroup", "Mathlib.Algebra.Module.NatInt", "Mathlib.GroupTheory.QuotientGroup.Defs", "Mathlib.Tactic.NormNum.Eq" ]
Mathlib/GroupTheory/Divisible.lean
smul_top_eq_top_of_divisibleBy_int
null
noncomputable divisibleByIntOfSMulTopEqTop (H : ∀ {n : ℤ} (_hn : n ≠ 0), n • (⊤ : AddSubgroup A) = ⊤) : DivisibleBy A ℤ where div a n := if hn : n = 0 then 0 else (show a ∈ n • (⊤ : AddSubgroup A) by rw [H hn]; trivial).choose div_zero _ := dif_pos rfl div_cancel a hn := by simp_rw [dif_neg hn] generalize_proofs h1 exact h1.choose_spec.2
def
GroupTheory
[ "Mathlib.Algebra.Group.ULift", "Mathlib.Algebra.GroupWithZero.Subgroup", "Mathlib.Algebra.Module.NatInt", "Mathlib.GroupTheory.QuotientGroup.Defs", "Mathlib.Tactic.NormNum.Eq" ]
Mathlib/GroupTheory/Divisible.lean
divisibleByIntOfSMulTopEqTop
If for all `n ≠ 0 ∈ ℤ`, `n • A = A`, then `A` is divisible.
@[to_additive /-- An additive group is `ℤ`-divisible if it is `ℕ`-divisible. -/] rootableByIntOfRootableByNat [RootableBy A ℕ] : RootableBy A ℤ where root a z := match z with | (n : ℕ) => RootableBy.root a n | -[n+1] => (RootableBy.root a (n + 1))⁻¹ root_zero a := RootableBy.root_zero a root_cancel {n} a hn := by cases n · rw [Int.ofNat_eq_coe, Nat.cast_ne_zero] at hn simp [RootableBy.root_cancel _ hn] · simp [RootableBy.root_cancel _ (Nat.add_one_ne_zero _)]
def
GroupTheory
[ "Mathlib.Algebra.Group.ULift", "Mathlib.Algebra.GroupWithZero.Subgroup", "Mathlib.Algebra.Module.NatInt", "Mathlib.GroupTheory.QuotientGroup.Defs", "Mathlib.Tactic.NormNum.Eq" ]
Mathlib/GroupTheory/Divisible.lean
rootableByIntOfRootableByNat
A group is `ℤ`-rootable if it is `ℕ`-rootable.
@[to_additive /-- An additive group is `ℕ`-divisible if it `ℤ`-divisible. -/] rootableByNatOfRootableByInt [RootableBy A ℤ] : RootableBy A ℕ where root a n := RootableBy.root a (n : ℤ) root_zero a := RootableBy.root_zero a root_cancel {n} a hn := by have := RootableBy.root_cancel a (show (n : ℤ) ≠ 0 from mod_cast hn) norm_num at this exact this
def
GroupTheory
[ "Mathlib.Algebra.Group.ULift", "Mathlib.Algebra.GroupWithZero.Subgroup", "Mathlib.Algebra.Module.NatInt", "Mathlib.GroupTheory.QuotientGroup.Defs", "Mathlib.Tactic.NormNum.Eq" ]
Mathlib/GroupTheory/Divisible.lean
rootableByNatOfRootableByInt
A group is `ℕ`-rootable if it is `ℤ`-rootable
@[to_additive /-- If `f : A → B` is a surjective homomorphism and `A` is `α`-divisible, then `B` is also `α`-divisible. -/] noncomputable Function.Surjective.rootableBy (hf : Function.Surjective f) (hpow : ∀ (a : A) (n : α), f (a ^ n) = f a ^ n) : RootableBy B α := rootableByOfPowLeftSurj _ _ fun {n} hn x => let ⟨y, hy⟩ := hf x ⟨f <| RootableBy.root y n, (by rw [← hpow (RootableBy.root y n) n, RootableBy.root_cancel _ hn, hy] : _ ^ n = x)⟩ @[to_additive DivisibleBy.surjective_smul]
def
GroupTheory
[ "Mathlib.Algebra.Group.ULift", "Mathlib.Algebra.GroupWithZero.Subgroup", "Mathlib.Algebra.Module.NatInt", "Mathlib.GroupTheory.QuotientGroup.Defs", "Mathlib.Tactic.NormNum.Eq" ]
Mathlib/GroupTheory/Divisible.lean
Function.Surjective.rootableBy
If `f : A → B` is a surjective homomorphism and `A` is `α`-rootable, then `B` is also `α`-rootable.
RootableBy.surjective_pow (A α : Type*) [Monoid A] [Pow A α] [Zero α] [RootableBy A α] {n : α} (hn : n ≠ 0) : Function.Surjective fun a : A => a ^ n := fun a => ⟨RootableBy.root a n, RootableBy.root_cancel a hn⟩
theorem
GroupTheory
[ "Mathlib.Algebra.Group.ULift", "Mathlib.Algebra.GroupWithZero.Subgroup", "Mathlib.Algebra.Module.NatInt", "Mathlib.GroupTheory.QuotientGroup.Defs", "Mathlib.Tactic.NormNum.Eq" ]
Mathlib/GroupTheory/Divisible.lean
RootableBy.surjective_pow
null
@[to_additive /-- Any quotient group of a divisible group is divisible -/] noncomputable QuotientGroup.rootableBy [RootableBy A ℕ] : RootableBy (A ⧸ B) ℕ := QuotientGroup.mk_surjective.rootableBy _ fun _ _ => rfl
instance
GroupTheory
[ "Mathlib.Algebra.Group.ULift", "Mathlib.Algebra.GroupWithZero.Subgroup", "Mathlib.Algebra.Module.NatInt", "Mathlib.GroupTheory.QuotientGroup.Defs", "Mathlib.Tactic.NormNum.Eq" ]
Mathlib/GroupTheory/Divisible.lean
QuotientGroup.rootableBy
Any quotient group of a rootable group is rootable.
doubleCoset (a : α) (s t : Set α) : Set α := s * {a} * t @[deprecated (since := "2025-07-12")] alias _root_.Doset.doset := doubleCoset
def
GroupTheory
[ "Mathlib.Algebra.Group.Subgroup.Pointwise", "Mathlib.GroupTheory.Coset.Basic" ]
Mathlib/GroupTheory/DoubleCoset.lean
doubleCoset
The double coset as an element of `Set α` corresponding to `s a t`
doubleCoset_eq_image2 (a : α) (s t : Set α) : doubleCoset a s t = Set.image2 (· * a * ·) s t := by simp_rw [doubleCoset, Set.mul_singleton, ← Set.image2_mul, Set.image2_image_left] @[deprecated (since := "2025-07-12")] alias _root_.Doset.doset_eq_image2 := doubleCoset_eq_image2
lemma
GroupTheory
[ "Mathlib.Algebra.Group.Subgroup.Pointwise", "Mathlib.GroupTheory.Coset.Basic" ]
Mathlib/GroupTheory/DoubleCoset.lean
doubleCoset_eq_image2
null
mem_doubleCoset {s t : Set α} {a b : α} : b ∈ doubleCoset a s t ↔ ∃ x ∈ s, ∃ y ∈ t, b = x * a * y := by simp only [doubleCoset_eq_image2, Set.mem_image2, eq_comm] @[deprecated (since := "2025-07-12")] alias _root_.Doset.mem_doset := mem_doubleCoset
theorem
GroupTheory
[ "Mathlib.Algebra.Group.Subgroup.Pointwise", "Mathlib.GroupTheory.Coset.Basic" ]
Mathlib/GroupTheory/DoubleCoset.lean
mem_doubleCoset
null
mem_doubleCoset_self (H K : Subgroup G) (a : G) : a ∈ doubleCoset a H K := mem_doubleCoset.mpr ⟨1, H.one_mem, 1, K.one_mem, (one_mul a).symm.trans (mul_one (1 * a)).symm⟩ @[deprecated (since := "2025-07-12")] alias _root_.Doset.mem_doset_self := mem_doubleCoset_self
theorem
GroupTheory
[ "Mathlib.Algebra.Group.Subgroup.Pointwise", "Mathlib.GroupTheory.Coset.Basic" ]
Mathlib/GroupTheory/DoubleCoset.lean
mem_doubleCoset_self
null
doubleCoset_eq_of_mem {H K : Subgroup G} {a b : G} (hb : b ∈ doubleCoset a H K) : doubleCoset b H K = doubleCoset a H K := by obtain ⟨h, hh, k, hk, rfl⟩ := mem_doubleCoset.1 hb rw [doubleCoset, doubleCoset, ← Set.singleton_mul_singleton, ← Set.singleton_mul_singleton, mul_assoc, mul_assoc, Subgroup.singleton_mul_subgroup hk, ← mul_assoc, ← mul_assoc, Subgroup.subgroup_mul_singleton hh] @[deprecated (since := "2025-07-12")] alias _root_.Doset.doset_eq_of_mem := doubleCoset_eq_of_mem
theorem
GroupTheory
[ "Mathlib.Algebra.Group.Subgroup.Pointwise", "Mathlib.GroupTheory.Coset.Basic" ]
Mathlib/GroupTheory/DoubleCoset.lean
doubleCoset_eq_of_mem
null
mem_doubleCoset_of_not_disjoint {H K : Subgroup G} {a b : G} (h : ¬Disjoint (doubleCoset a H K) (doubleCoset b H K)) : b ∈ doubleCoset a H K := by rw [Set.not_disjoint_iff] at h simp only [mem_doubleCoset] at * obtain ⟨x, ⟨l, hl, r, hr, hrx⟩, y, hy, ⟨r', hr', rfl⟩⟩ := h refine ⟨y⁻¹ * l, H.mul_mem (H.inv_mem hy) hl, r * r'⁻¹, K.mul_mem hr (K.inv_mem hr'), ?_⟩ rwa [mul_assoc, mul_assoc, eq_inv_mul_iff_mul_eq, ← mul_assoc, ← mul_assoc, eq_mul_inv_iff_mul_eq] @[deprecated (since := "2025-07-12")] alias _root_.Doset.mem_doset_of_not_disjoint := mem_doubleCoset_of_not_disjoint
theorem
GroupTheory
[ "Mathlib.Algebra.Group.Subgroup.Pointwise", "Mathlib.GroupTheory.Coset.Basic" ]
Mathlib/GroupTheory/DoubleCoset.lean
mem_doubleCoset_of_not_disjoint
null
eq_of_not_disjoint {H K : Subgroup G} {a b : G} (h : ¬Disjoint (doubleCoset a H K) (doubleCoset b H K)) : doubleCoset a H K = doubleCoset b H K := by rw [disjoint_comm] at h have ha : a ∈ doubleCoset b H K := mem_doubleCoset_of_not_disjoint h apply doubleCoset_eq_of_mem ha @[deprecated (since := "2025-07-12")] alias _root_.Doset.eq_of_not_disjoint := eq_of_not_disjoint
theorem
GroupTheory
[ "Mathlib.Algebra.Group.Subgroup.Pointwise", "Mathlib.GroupTheory.Coset.Basic" ]
Mathlib/GroupTheory/DoubleCoset.lean
eq_of_not_disjoint
null
setoid (H K : Set G) : Setoid G := Setoid.ker fun x => doubleCoset x H K @[deprecated (since := "2025-07-12")] alias _root_.Doset.setoid := setoid
def
GroupTheory
[ "Mathlib.Algebra.Group.Subgroup.Pointwise", "Mathlib.GroupTheory.Coset.Basic" ]
Mathlib/GroupTheory/DoubleCoset.lean
setoid
The setoid defined by the double_coset relation
Quotient (H K : Set G) : Type _ := _root_.Quotient (setoid H K) @[deprecated (since := "2025-07-12")] alias _root_.Doset.Quotient := Quotient
def
GroupTheory
[ "Mathlib.Algebra.Group.Subgroup.Pointwise", "Mathlib.GroupTheory.Coset.Basic" ]
Mathlib/GroupTheory/DoubleCoset.lean
Quotient
Quotient of `G` by the double coset relation, i.e. `H \ G / K`
rel_iff {H K : Subgroup G} {x y : G} : setoid ↑H ↑K x y ↔ ∃ a ∈ H, ∃ b ∈ K, y = a * x * b := Iff.trans ⟨fun (hxy : doubleCoset x H K = doubleCoset y H K) => hxy ▸ mem_doubleCoset_self H K y, fun hxy => (doubleCoset_eq_of_mem hxy).symm⟩ mem_doubleCoset @[deprecated (since := "2025-07-12")] alias _root_.Doset.rel_iff := rel_iff
theorem
GroupTheory
[ "Mathlib.Algebra.Group.Subgroup.Pointwise", "Mathlib.GroupTheory.Coset.Basic" ]
Mathlib/GroupTheory/DoubleCoset.lean
rel_iff
null
bot_rel_eq_leftRel (H : Subgroup G) : ⇑(setoid ↑(⊥ : Subgroup G) ↑H) = ⇑(QuotientGroup.leftRel H) := by ext a b rw [rel_iff, QuotientGroup.leftRel_apply] constructor · rintro ⟨a, rfl : a = 1, b, hb, rfl⟩ rwa [one_mul, inv_mul_cancel_left] · rintro (h : a⁻¹ * b ∈ H) exact ⟨1, rfl, a⁻¹ * b, h, by rw [one_mul, mul_inv_cancel_left]⟩ @[deprecated (since := "2025-07-12")] alias _root_.Doset.bot_rel_eq_leftRel := bot_rel_eq_leftRel
theorem
GroupTheory
[ "Mathlib.Algebra.Group.Subgroup.Pointwise", "Mathlib.GroupTheory.Coset.Basic" ]
Mathlib/GroupTheory/DoubleCoset.lean
bot_rel_eq_leftRel
null
rel_bot_eq_right_group_rel (H : Subgroup G) : ⇑(setoid ↑H ↑(⊥ : Subgroup G)) = ⇑(QuotientGroup.rightRel H) := by ext a b rw [rel_iff, QuotientGroup.rightRel_apply] constructor · rintro ⟨b, hb, a, rfl : a = 1, rfl⟩ rwa [mul_one, mul_inv_cancel_right] · rintro (h : b * a⁻¹ ∈ H) exact ⟨b * a⁻¹, h, 1, rfl, by rw [mul_one, inv_mul_cancel_right]⟩ @[deprecated (since := "2025-07-12")] alias _root_.Doset.rel_bot_eq_right_group_rel := rel_bot_eq_right_group_rel
theorem
GroupTheory
[ "Mathlib.Algebra.Group.Subgroup.Pointwise", "Mathlib.GroupTheory.Coset.Basic" ]
Mathlib/GroupTheory/DoubleCoset.lean
rel_bot_eq_right_group_rel
null
quotToDoubleCoset (H K : Subgroup G) (q : Quotient (H : Set G) K) : Set G := doubleCoset q.out H K @[deprecated (since := "2025-07-12")] alias _root_.Doset.quotToDoset := quotToDoubleCoset
def
GroupTheory
[ "Mathlib.Algebra.Group.Subgroup.Pointwise", "Mathlib.GroupTheory.Coset.Basic" ]
Mathlib/GroupTheory/DoubleCoset.lean
quotToDoubleCoset
Create a double coset out of an element of `H \ G / K`
mk (H K : Subgroup G) (a : G) : Quotient (H : Set G) K := Quotient.mk'' a @[deprecated (since := "2025-07-12")] alias _root_.Doset.mk := mk
abbrev
GroupTheory
[ "Mathlib.Algebra.Group.Subgroup.Pointwise", "Mathlib.GroupTheory.Coset.Basic" ]
Mathlib/GroupTheory/DoubleCoset.lean
mk
Map from `G` to `H \ G / K`
eq (H K : Subgroup G) (a b : G) : mk H K a = mk H K b ↔ ∃ h ∈ H, ∃ k ∈ K, b = h * a * k := by rw [Quotient.eq''] apply rel_iff @[deprecated (since := "2025-07-12")] alias _root_.Doset.eq := eq
theorem
GroupTheory
[ "Mathlib.Algebra.Group.Subgroup.Pointwise", "Mathlib.GroupTheory.Coset.Basic" ]
Mathlib/GroupTheory/DoubleCoset.lean
eq
null
out_eq' (H K : Subgroup G) (q : Quotient ↑H ↑K) : mk H K q.out = q := Quotient.out_eq' q @[deprecated (since := "2025-07-12")] alias _root_.Doset.out_eq' := out_eq'
theorem
GroupTheory
[ "Mathlib.Algebra.Group.Subgroup.Pointwise", "Mathlib.GroupTheory.Coset.Basic" ]
Mathlib/GroupTheory/DoubleCoset.lean
out_eq'
null
mk_out_eq_mul (H K : Subgroup G) (g : G) : ∃ h k : G, h ∈ H ∧ k ∈ K ∧ (mk H K g : Quotient ↑H ↑K).out = h * g * k := by have := eq H K (mk H K g : Quotient ↑H ↑K).out g rw [out_eq'] at this obtain ⟨h, h_h, k, hk, T⟩ := this.1 rfl refine ⟨h⁻¹, k⁻¹, H.inv_mem h_h, K.inv_mem hk, eq_mul_inv_of_mul_eq (eq_inv_mul_of_mul_eq ?_)⟩ rw [← mul_assoc, ← T] @[deprecated (since := "2025-07-12")] alias _root_.Doset.mk_out_eq_mul := mk_out_eq_mul
theorem
GroupTheory
[ "Mathlib.Algebra.Group.Subgroup.Pointwise", "Mathlib.GroupTheory.Coset.Basic" ]
Mathlib/GroupTheory/DoubleCoset.lean
mk_out_eq_mul
null
mk_eq_of_doubleCoset_eq {H K : Subgroup G} {a b : G} (h : doubleCoset a H K = doubleCoset b H K) : mk H K a = mk H K b := by rw [eq] exact mem_doubleCoset.mp (h.symm ▸ mem_doubleCoset_self H K b) @[deprecated (since := "2025-07-12")] alias _root_.Doset.mk_eq_of_doset_eq := mk_eq_of_doubleCoset_eq
theorem
GroupTheory
[ "Mathlib.Algebra.Group.Subgroup.Pointwise", "Mathlib.GroupTheory.Coset.Basic" ]
Mathlib/GroupTheory/DoubleCoset.lean
mk_eq_of_doubleCoset_eq
null
disjoint_out {H K : Subgroup G} {a b : Quotient H K} : a ≠ b → Disjoint (doubleCoset a.out H K) (doubleCoset b.out (H : Set G) K) := by contrapose! intro h simpa [out_eq'] using mk_eq_of_doubleCoset_eq (eq_of_not_disjoint h) @[deprecated (since := "2025-07-12")] alias _root_.Doset.disjoint_out := disjoint_out
theorem
GroupTheory
[ "Mathlib.Algebra.Group.Subgroup.Pointwise", "Mathlib.GroupTheory.Coset.Basic" ]
Mathlib/GroupTheory/DoubleCoset.lean
disjoint_out
null
union_quotToDoubleCoset (H K : Subgroup G) : ⋃ q, quotToDoubleCoset H K q = Set.univ := by ext x simp only [Set.mem_iUnion, quotToDoubleCoset, mem_doubleCoset, SetLike.mem_coe, Set.mem_univ, iff_true] use mk H K x obtain ⟨h, k, h3, h4, h5⟩ := mk_out_eq_mul H K x refine ⟨h⁻¹, H.inv_mem h3, k⁻¹, K.inv_mem h4, ?_⟩ simp only [h5, ← mul_assoc, one_mul, inv_mul_cancel, mul_inv_cancel_right] @[deprecated (since := "2025-07-12")] alias _root_.Doset.union_quotToDoset := union_quotToDoubleCoset
theorem
GroupTheory
[ "Mathlib.Algebra.Group.Subgroup.Pointwise", "Mathlib.GroupTheory.Coset.Basic" ]
Mathlib/GroupTheory/DoubleCoset.lean
union_quotToDoubleCoset
null