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
of_bot : IsPGroup p (⊥ : Subgroup G) := of_card (n := 0) (by rw [Subgroup.card_bot, pow_zero])
theorem
GroupTheory
[ "Mathlib.GroupTheory.Perm.Cycle.Type", "Mathlib.GroupTheory.SpecificGroups.Cyclic" ]
Mathlib/GroupTheory/PGroup.lean
of_bot
null
iff_card [Fact p.Prime] [Finite G] : IsPGroup p G ↔ ∃ n : ℕ, Nat.card G = p ^ n := by have hG : Nat.card G ≠ 0 := Nat.card_pos.ne' refine ⟨fun h => ?_, fun ⟨n, hn⟩ => of_card hn⟩ suffices ∀ q ∈ (Nat.card G).primeFactorsList, q = p by use (Nat.card G).primeFactorsList.length rw [← List.prod_replicate, ← List.eq_replicate_of_mem this, Nat.prod_primeFactorsList hG] intro q hq obtain ⟨hq1, hq2⟩ := (Nat.mem_primeFactorsList hG).mp hq haveI : Fact q.Prime := ⟨hq1⟩ obtain ⟨g, hg⟩ := exists_prime_orderOf_dvd_card' q hq2 obtain ⟨k, hk⟩ := (iff_orderOf.mp h) g exact (hq1.pow_eq_iff.mp (hg.symm.trans hk).symm).1.symm alias ⟨exists_card_eq, _⟩ := iff_card
theorem
GroupTheory
[ "Mathlib.GroupTheory.Perm.Cycle.Type", "Mathlib.GroupTheory.SpecificGroups.Cyclic" ]
Mathlib/GroupTheory/PGroup.lean
iff_card
null
of_injective {H : Type*} [Group H] (ϕ : H →* G) (hϕ : Function.Injective ϕ) : IsPGroup p H := by simp_rw [IsPGroup, ← hϕ.eq_iff, ϕ.map_pow, ϕ.map_one] exact fun h => hG (ϕ h)
theorem
GroupTheory
[ "Mathlib.GroupTheory.Perm.Cycle.Type", "Mathlib.GroupTheory.SpecificGroups.Cyclic" ]
Mathlib/GroupTheory/PGroup.lean
of_injective
null
to_subgroup (H : Subgroup G) : IsPGroup p H := hG.of_injective H.subtype Subtype.coe_injective
theorem
GroupTheory
[ "Mathlib.GroupTheory.Perm.Cycle.Type", "Mathlib.GroupTheory.SpecificGroups.Cyclic" ]
Mathlib/GroupTheory/PGroup.lean
to_subgroup
null
of_surjective {H : Type*} [Group H] (ϕ : G →* H) (hϕ : Function.Surjective ϕ) : IsPGroup p H := by refine fun h => Exists.elim (hϕ h) fun g hg => Exists.imp (fun k hk => ?_) (hG g) rw [← hg, ← ϕ.map_pow, hk, ϕ.map_one]
theorem
GroupTheory
[ "Mathlib.GroupTheory.Perm.Cycle.Type", "Mathlib.GroupTheory.SpecificGroups.Cyclic" ]
Mathlib/GroupTheory/PGroup.lean
of_surjective
null
to_quotient (H : Subgroup G) [H.Normal] : IsPGroup p (G ⧸ H) := hG.of_surjective (QuotientGroup.mk' H) Quotient.mk''_surjective
theorem
GroupTheory
[ "Mathlib.GroupTheory.Perm.Cycle.Type", "Mathlib.GroupTheory.SpecificGroups.Cyclic" ]
Mathlib/GroupTheory/PGroup.lean
to_quotient
null
of_equiv {H : Type*} [Group H] (ϕ : G ≃* H) : IsPGroup p H := hG.of_surjective ϕ.toMonoidHom ϕ.surjective
theorem
GroupTheory
[ "Mathlib.GroupTheory.Perm.Cycle.Type", "Mathlib.GroupTheory.SpecificGroups.Cyclic" ]
Mathlib/GroupTheory/PGroup.lean
of_equiv
null
orderOf_coprime {n : ℕ} (hn : p.Coprime n) (g : G) : (orderOf g).Coprime n := let ⟨k, hk⟩ := hG g (hn.pow_left k).coprime_dvd_left (orderOf_dvd_of_pow_eq_one hk)
theorem
GroupTheory
[ "Mathlib.GroupTheory.Perm.Cycle.Type", "Mathlib.GroupTheory.SpecificGroups.Cyclic" ]
Mathlib/GroupTheory/PGroup.lean
orderOf_coprime
null
noncomputable powEquiv {n : ℕ} (hn : p.Coprime n) : G ≃ G := let h : ∀ g : G, (Nat.card (Subgroup.zpowers g)).Coprime n := fun g => (Nat.card_zpowers g).symm ▸ hG.orderOf_coprime hn g { toFun := (· ^ n) invFun := fun g => (powCoprime (h g)).symm ⟨g, Subgroup.mem_zpowers g⟩ left_inv := fun g => Subtype.ext_iff.1 <| (powCoprime (h (g ^ n))).left_inv ⟨g, _, Subtype.ext_iff.1 <| (powCoprime (h g)).left_inv ⟨g, Subgroup.mem_zpowers g⟩⟩ right_inv := fun g => Subtype.ext_iff.1 <| (powCoprime (h g)).right_inv ⟨g, Subgroup.mem_zpowers g⟩ } @[simp]
def
GroupTheory
[ "Mathlib.GroupTheory.Perm.Cycle.Type", "Mathlib.GroupTheory.SpecificGroups.Cyclic" ]
Mathlib/GroupTheory/PGroup.lean
powEquiv
If `gcd(p,n) = 1`, then the `n`th power map is a bijection.
powEquiv_apply {n : ℕ} (hn : p.Coprime n) (g : G) : hG.powEquiv hn g = g ^ n := rfl @[simp]
theorem
GroupTheory
[ "Mathlib.GroupTheory.Perm.Cycle.Type", "Mathlib.GroupTheory.SpecificGroups.Cyclic" ]
Mathlib/GroupTheory/PGroup.lean
powEquiv_apply
null
powEquiv_symm_apply {n : ℕ} (hn : p.Coprime n) (g : G) : (hG.powEquiv hn).symm g = g ^ (orderOf g).gcdB n := by rw [← Nat.card_zpowers]; rfl variable [hp : Fact p.Prime]
theorem
GroupTheory
[ "Mathlib.GroupTheory.Perm.Cycle.Type", "Mathlib.GroupTheory.SpecificGroups.Cyclic" ]
Mathlib/GroupTheory/PGroup.lean
powEquiv_symm_apply
null
noncomputable powEquiv' {n : ℕ} (hn : ¬p ∣ n) : G ≃ G := powEquiv hG (hp.out.coprime_iff_not_dvd.mpr hn)
abbrev
GroupTheory
[ "Mathlib.GroupTheory.Perm.Cycle.Type", "Mathlib.GroupTheory.SpecificGroups.Cyclic" ]
Mathlib/GroupTheory/PGroup.lean
powEquiv'
If `p ∤ n`, then the `n`th power map is a bijection.
index (H : Subgroup G) [H.FiniteIndex] : ∃ n : ℕ, H.index = p ^ n := by obtain ⟨n, hn⟩ := iff_card.mp (hG.to_quotient H.normalCore) obtain ⟨k, _, hk2⟩ := (Nat.dvd_prime_pow hp.out).mp ((congr_arg _ (H.normalCore.index_eq_card.trans hn)).mp (Subgroup.index_dvd_of_le H.normalCore_le)) exact ⟨k, hk2⟩
theorem
GroupTheory
[ "Mathlib.GroupTheory.Perm.Cycle.Type", "Mathlib.GroupTheory.SpecificGroups.Cyclic" ]
Mathlib/GroupTheory/PGroup.lean
index
null
card_eq_or_dvd : Nat.card G = 1 ∨ p ∣ Nat.card G := by cases finite_or_infinite G · obtain ⟨n, hn⟩ := iff_card.mp hG rw [hn] rcases n with - | n · exact Or.inl rfl · exact Or.inr ⟨p ^ n, by rw [pow_succ']⟩ · rw [Nat.card_eq_zero_of_infinite] exact Or.inr ⟨0, rfl⟩
theorem
GroupTheory
[ "Mathlib.GroupTheory.Perm.Cycle.Type", "Mathlib.GroupTheory.SpecificGroups.Cyclic" ]
Mathlib/GroupTheory/PGroup.lean
card_eq_or_dvd
null
nontrivial_iff_card [Finite G] : Nontrivial G ↔ ∃ n > 0, Nat.card G = p ^ n := ⟨fun hGnt => let ⟨k, hk⟩ := iff_card.1 hG ⟨k, Nat.pos_of_ne_zero fun hk0 => by rw [hk0, pow_zero] at hk; exact Finite.one_lt_card.ne' hk, hk⟩, fun ⟨_, hk0, hk⟩ => Finite.one_lt_card_iff_nontrivial.1 <| hk.symm ▸ one_lt_pow₀ (Fact.out (p := p.Prime)).one_lt (ne_of_gt hk0)⟩ variable {α : Type*} [MulAction G α]
theorem
GroupTheory
[ "Mathlib.GroupTheory.Perm.Cycle.Type", "Mathlib.GroupTheory.SpecificGroups.Cyclic" ]
Mathlib/GroupTheory/PGroup.lean
nontrivial_iff_card
null
card_orbit (a : α) [Finite (orbit G a)] : ∃ n : ℕ, Nat.card (orbit G a) = p ^ n := by let ϕ := orbitEquivQuotientStabilizer G a haveI := Finite.of_equiv (orbit G a) ϕ haveI := (stabilizer G a).finiteIndex_of_finite_quotient rw [Nat.card_congr ϕ] exact hG.index (stabilizer G a) variable (α) [Finite α]
theorem
GroupTheory
[ "Mathlib.GroupTheory.Perm.Cycle.Type", "Mathlib.GroupTheory.SpecificGroups.Cyclic" ]
Mathlib/GroupTheory/PGroup.lean
card_orbit
null
card_modEq_card_fixedPoints : Nat.card α ≡ Nat.card (fixedPoints G α) [MOD p] := by have := Fintype.ofFinite α have := Fintype.ofFinite (fixedPoints G α) rw [Nat.card_eq_fintype_card, Nat.card_eq_fintype_card] classical calc card α = card (Σ y : Quotient (orbitRel G α), { x // Quotient.mk'' x = y }) := card_congr (Equiv.sigmaFiberEquiv (@Quotient.mk'' _ (orbitRel G α))).symm _ = ∑ a : Quotient (orbitRel G α), card { x // Quotient.mk'' x = a } := card_sigma _ ≡ ∑ _a : fixedPoints G α, 1 [MOD p] := ?_ _ = _ := by simp rw [← ZMod.natCast_eq_natCast_iff _ _ p, Nat.cast_sum, Nat.cast_sum] have key : ∀ x, card { y // (Quotient.mk'' y : Quotient (orbitRel G α)) = Quotient.mk'' x } = card (orbit G x) := fun x => by simp only [Quotient.eq'']; congr refine Eq.symm (Finset.sum_bij_ne_zero (fun a _ _ => Quotient.mk'' a.1) (fun _ _ _ => Finset.mem_univ _) (fun a₁ _ _ a₂ _ _ h => Subtype.eq (mem_fixedPoints'.mp a₂.2 a₁.1 (Quotient.exact' h))) (fun b => Quotient.inductionOn' b fun b _ hb => ?_) fun a ha _ => by rw [key, mem_fixedPoints_iff_card_orbit_eq_one.mp a.2]) obtain ⟨k, hk⟩ := hG.card_orbit b rw [Nat.card_eq_fintype_card] at hk have : k = 0 := by contrapose! hb simp [-Quotient.eq, key, hk, hb] exact ⟨⟨b, mem_fixedPoints_iff_card_orbit_eq_one.2 <| by rw [hk, this, pow_zero]⟩, Finset.mem_univ _, ne_of_eq_of_ne Nat.cast_one one_ne_zero, rfl⟩
theorem
GroupTheory
[ "Mathlib.GroupTheory.Perm.Cycle.Type", "Mathlib.GroupTheory.SpecificGroups.Cyclic" ]
Mathlib/GroupTheory/PGroup.lean
card_modEq_card_fixedPoints
If `G` is a `p`-group acting on a finite set `α`, then the number of fixed points of the action is congruent mod `p` to the cardinality of `α`
nonempty_fixed_point_of_prime_not_dvd_card (α) [MulAction G α] (hpα : ¬p ∣ Nat.card α) : (fixedPoints G α).Nonempty := have : Finite α := Nat.finite_of_card_ne_zero (fun h ↦ (h ▸ hpα) (dvd_zero p)) @Set.Nonempty.of_subtype _ _ (by rw [← Finite.card_pos_iff, pos_iff_ne_zero] contrapose! hpα rw [← Nat.modEq_zero_iff_dvd, ← hpα] exact hG.card_modEq_card_fixedPoints α)
theorem
GroupTheory
[ "Mathlib.GroupTheory.Perm.Cycle.Type", "Mathlib.GroupTheory.SpecificGroups.Cyclic" ]
Mathlib/GroupTheory/PGroup.lean
nonempty_fixed_point_of_prime_not_dvd_card
If a p-group acts on `α` and the cardinality of `α` is not a multiple of `p` then the action has a fixed point.
exists_fixed_point_of_prime_dvd_card_of_fixed_point (hpα : p ∣ Nat.card α) {a : α} (ha : a ∈ fixedPoints G α) : ∃ b, b ∈ fixedPoints G α ∧ a ≠ b := by have hpf : p ∣ Nat.card (fixedPoints G α) := Nat.modEq_zero_iff_dvd.mp ((hG.card_modEq_card_fixedPoints α).symm.trans hpα.modEq_zero_nat) have hα : 1 < Nat.card (fixedPoints G α) := (Fact.out (p := p.Prime)).one_lt.trans_le (Nat.le_of_dvd (Finite.card_pos_iff.2 ⟨⟨a, ha⟩⟩) hpf) rw [Finite.one_lt_card_iff_nontrivial] at hα exact let ⟨⟨b, hb⟩, hba⟩ := exists_ne (⟨a, ha⟩ : fixedPoints G α) ⟨b, hb, fun hab => hba (by simp_rw [hab])⟩
theorem
GroupTheory
[ "Mathlib.GroupTheory.Perm.Cycle.Type", "Mathlib.GroupTheory.SpecificGroups.Cyclic" ]
Mathlib/GroupTheory/PGroup.lean
exists_fixed_point_of_prime_dvd_card_of_fixed_point
If a p-group acts on `α` and the cardinality of `α` is a multiple of `p`, and the action has one fixed point, then it has another fixed point.
center_nontrivial [Nontrivial G] [Finite G] : Nontrivial (Subgroup.center G) := by classical have := (hG.of_equiv ConjAct.toConjAct).exists_fixed_point_of_prime_dvd_card_of_fixed_point G rw [ConjAct.fixedPoints_eq_center] at this have dvd : p ∣ Nat.card G := by obtain ⟨n, hn0, hn⟩ := hG.nontrivial_iff_card.mp inferInstance exact hn.symm ▸ dvd_pow_self _ (ne_of_gt hn0) obtain ⟨g, hg⟩ := this dvd (Subgroup.center G).one_mem exact ⟨⟨1, ⟨g, hg.1⟩, mt Subtype.ext_iff.mp hg.2⟩⟩
theorem
GroupTheory
[ "Mathlib.GroupTheory.Perm.Cycle.Type", "Mathlib.GroupTheory.SpecificGroups.Cyclic" ]
Mathlib/GroupTheory/PGroup.lean
center_nontrivial
null
bot_lt_center [Nontrivial G] [Finite G] : ⊥ < Subgroup.center G := by haveI := center_nontrivial hG classical exact bot_lt_iff_ne_bot.mpr ((Subgroup.center G).one_lt_card_iff_ne_bot.mp Finite.one_lt_card)
theorem
GroupTheory
[ "Mathlib.GroupTheory.Perm.Cycle.Type", "Mathlib.GroupTheory.SpecificGroups.Cyclic" ]
Mathlib/GroupTheory/PGroup.lean
bot_lt_center
null
to_le {H K : Subgroup G} (hK : IsPGroup p K) (hHK : H ≤ K) : IsPGroup p H := hK.of_injective (Subgroup.inclusion hHK) fun a b h => Subtype.ext (by change ((Subgroup.inclusion hHK) a : G) = (Subgroup.inclusion hHK) b apply Subtype.ext_iff.mp h)
theorem
GroupTheory
[ "Mathlib.GroupTheory.Perm.Cycle.Type", "Mathlib.GroupTheory.SpecificGroups.Cyclic" ]
Mathlib/GroupTheory/PGroup.lean
to_le
null
to_inf_left {H K : Subgroup G} (hH : IsPGroup p H) : IsPGroup p (H ⊓ K : Subgroup G) := hH.to_le inf_le_left
theorem
GroupTheory
[ "Mathlib.GroupTheory.Perm.Cycle.Type", "Mathlib.GroupTheory.SpecificGroups.Cyclic" ]
Mathlib/GroupTheory/PGroup.lean
to_inf_left
null
to_inf_right {H K : Subgroup G} (hK : IsPGroup p K) : IsPGroup p (H ⊓ K : Subgroup G) := hK.to_le inf_le_right
theorem
GroupTheory
[ "Mathlib.GroupTheory.Perm.Cycle.Type", "Mathlib.GroupTheory.SpecificGroups.Cyclic" ]
Mathlib/GroupTheory/PGroup.lean
to_inf_right
null
map {H : Subgroup G} (hH : IsPGroup p H) {K : Type*} [Group K] (ϕ : G →* K) : IsPGroup p (H.map ϕ) := by rw [← H.range_subtype, MonoidHom.map_range] exact hH.of_surjective (ϕ.restrict H).rangeRestrict (ϕ.restrict H).rangeRestrict_surjective
theorem
GroupTheory
[ "Mathlib.GroupTheory.Perm.Cycle.Type", "Mathlib.GroupTheory.SpecificGroups.Cyclic" ]
Mathlib/GroupTheory/PGroup.lean
map
null
comap_of_ker_isPGroup {H : Subgroup G} (hH : IsPGroup p H) {K : Type*} [Group K] (ϕ : K →* G) (hϕ : IsPGroup p ϕ.ker) : IsPGroup p (H.comap ϕ) := by intro g obtain ⟨j, hj⟩ := hH ⟨ϕ g.1, g.2⟩ rw [Subtype.ext_iff, H.coe_pow, Subtype.coe_mk, ← ϕ.map_pow] at hj obtain ⟨k, hk⟩ := hϕ ⟨g.1 ^ p ^ j, hj⟩ rw [Subtype.ext_iff, ϕ.ker.coe_pow, Subtype.coe_mk, ← pow_mul, ← pow_add] at hk exact ⟨j + k, by rwa [Subtype.ext_iff, (H.comap ϕ).coe_pow]⟩
theorem
GroupTheory
[ "Mathlib.GroupTheory.Perm.Cycle.Type", "Mathlib.GroupTheory.SpecificGroups.Cyclic" ]
Mathlib/GroupTheory/PGroup.lean
comap_of_ker_isPGroup
null
ker_isPGroup_of_injective {K : Type*} [Group K] {ϕ : K →* G} (hϕ : Function.Injective ϕ) : IsPGroup p ϕ.ker := (congr_arg (fun Q : Subgroup K => IsPGroup p Q) (ϕ.ker_eq_bot_iff.mpr hϕ)).mpr IsPGroup.of_bot
theorem
GroupTheory
[ "Mathlib.GroupTheory.Perm.Cycle.Type", "Mathlib.GroupTheory.SpecificGroups.Cyclic" ]
Mathlib/GroupTheory/PGroup.lean
ker_isPGroup_of_injective
null
comap_of_injective {H : Subgroup G} (hH : IsPGroup p H) {K : Type*} [Group K] (ϕ : K →* G) (hϕ : Function.Injective ϕ) : IsPGroup p (H.comap ϕ) := hH.comap_of_ker_isPGroup ϕ (ker_isPGroup_of_injective hϕ)
theorem
GroupTheory
[ "Mathlib.GroupTheory.Perm.Cycle.Type", "Mathlib.GroupTheory.SpecificGroups.Cyclic" ]
Mathlib/GroupTheory/PGroup.lean
comap_of_injective
null
comap_subtype {H : Subgroup G} (hH : IsPGroup p H) {K : Subgroup G} : IsPGroup p (H.comap K.subtype) := hH.comap_of_injective K.subtype Subtype.coe_injective
theorem
GroupTheory
[ "Mathlib.GroupTheory.Perm.Cycle.Type", "Mathlib.GroupTheory.SpecificGroups.Cyclic" ]
Mathlib/GroupTheory/PGroup.lean
comap_subtype
null
to_sup_of_normal_right {H K : Subgroup G} (hH : IsPGroup p H) (hK : IsPGroup p K) [K.Normal] : IsPGroup p (H ⊔ K : Subgroup G) := by rw [← QuotientGroup.ker_mk' K, ← Subgroup.comap_map_eq] apply (hH.map (QuotientGroup.mk' K)).comap_of_ker_isPGroup rwa [QuotientGroup.ker_mk']
theorem
GroupTheory
[ "Mathlib.GroupTheory.Perm.Cycle.Type", "Mathlib.GroupTheory.SpecificGroups.Cyclic" ]
Mathlib/GroupTheory/PGroup.lean
to_sup_of_normal_right
null
to_sup_of_normal_left {H K : Subgroup G} (hH : IsPGroup p H) (hK : IsPGroup p K) [H.Normal] : IsPGroup p (H ⊔ K : Subgroup G) := sup_comm H K ▸ to_sup_of_normal_right hK hH
theorem
GroupTheory
[ "Mathlib.GroupTheory.Perm.Cycle.Type", "Mathlib.GroupTheory.SpecificGroups.Cyclic" ]
Mathlib/GroupTheory/PGroup.lean
to_sup_of_normal_left
null
to_sup_of_normal_right' {H K : Subgroup G} (hH : IsPGroup p H) (hK : IsPGroup p K) (hHK : H ≤ K.normalizer) : IsPGroup p (H ⊔ K : Subgroup G) := let hHK' := to_sup_of_normal_right (hH.of_equiv (Subgroup.subgroupOfEquivOfLe hHK).symm) (hK.of_equiv (Subgroup.subgroupOfEquivOfLe Subgroup.le_normalizer).symm) ((congr_arg (fun H : Subgroup K.normalizer => IsPGroup p H) (Subgroup.sup_subgroupOf_eq hHK Subgroup.le_normalizer)).mp hHK').of_equiv (Subgroup.subgroupOfEquivOfLe (sup_le hHK Subgroup.le_normalizer))
theorem
GroupTheory
[ "Mathlib.GroupTheory.Perm.Cycle.Type", "Mathlib.GroupTheory.SpecificGroups.Cyclic" ]
Mathlib/GroupTheory/PGroup.lean
to_sup_of_normal_right'
null
to_sup_of_normal_left' {H K : Subgroup G} (hH : IsPGroup p H) (hK : IsPGroup p K) (hHK : K ≤ H.normalizer) : IsPGroup p (H ⊔ K : Subgroup G) := sup_comm H K ▸ to_sup_of_normal_right' hK hH hHK
theorem
GroupTheory
[ "Mathlib.GroupTheory.Perm.Cycle.Type", "Mathlib.GroupTheory.SpecificGroups.Cyclic" ]
Mathlib/GroupTheory/PGroup.lean
to_sup_of_normal_left'
null
coprime_card_of_ne {G₂ : Type*} [Group G₂] (p₁ p₂ : ℕ) [hp₁ : Fact p₁.Prime] [hp₂ : Fact p₂.Prime] (hne : p₁ ≠ p₂) (H₁ : Subgroup G) (H₂ : Subgroup G₂) [Finite H₁] [Finite H₂] (hH₁ : IsPGroup p₁ H₁) (hH₂ : IsPGroup p₂ H₂) : Nat.Coprime (Nat.card H₁) (Nat.card H₂) := by obtain ⟨n₁, heq₁⟩ := iff_card.mp hH₁; rw [heq₁]; clear heq₁ obtain ⟨n₂, heq₂⟩ := iff_card.mp hH₂; rw [heq₂]; clear heq₂ exact Nat.coprime_pow_primes _ _ hp₁.elim hp₂.elim hne
theorem
GroupTheory
[ "Mathlib.GroupTheory.Perm.Cycle.Type", "Mathlib.GroupTheory.SpecificGroups.Cyclic" ]
Mathlib/GroupTheory/PGroup.lean
coprime_card_of_ne
finite p-groups with different p have coprime orders
disjoint_of_ne (p₁ p₂ : ℕ) [hp₁ : Fact p₁.Prime] [hp₂ : Fact p₂.Prime] (hne : p₁ ≠ p₂) (H₁ H₂ : Subgroup G) (hH₁ : IsPGroup p₁ H₁) (hH₂ : IsPGroup p₂ H₂) : Disjoint H₁ H₂ := by rw [Subgroup.disjoint_def] intro x hx₁ hx₂ obtain ⟨n₁, hn₁⟩ := iff_orderOf.mp hH₁ ⟨x, hx₁⟩ obtain ⟨n₂, hn₂⟩ := iff_orderOf.mp hH₂ ⟨x, hx₂⟩ rw [Subgroup.orderOf_mk] at hn₁ hn₂ have : p₁ ^ n₁ = p₂ ^ n₂ := by rw [← hn₁, ← hn₂] rcases n₁.eq_zero_or_pos with (rfl | hn₁) · simpa using hn₁ · exact absurd (eq_of_prime_pow_eq hp₁.out.prime hp₂.out.prime hn₁ this) hne
theorem
GroupTheory
[ "Mathlib.GroupTheory.Perm.Cycle.Type", "Mathlib.GroupTheory.SpecificGroups.Cyclic" ]
Mathlib/GroupTheory/PGroup.lean
disjoint_of_ne
p-groups with different p are disjoint
le_or_disjoint_of_coprime [hp : Fact p.Prime] {P : Subgroup G} (hP : IsPGroup p P) {H : Subgroup G} [H.Normal] (h_cop : (Nat.card H).Coprime H.index) : P ≤ H ∨ Disjoint H P := by by_cases h1 : Nat.card H = 0 · rw [h1, Nat.coprime_zero_left, Subgroup.index_eq_one] at h_cop rw [h_cop] exact Or.inl le_top by_cases h2 : H.index = 0 · rw [h2, Nat.coprime_zero_right, Subgroup.card_eq_one] at h_cop rw [h_cop] exact Or.inr disjoint_bot_left have : Finite G := by apply Nat.finite_of_card_ne_zero rw [← H.card_mul_index] exact mul_ne_zero h1 h2 have h3 : (Nat.card H).Coprime (Nat.card P) ∨ H.index.Coprime (Nat.card P) := by obtain ⟨k, hk⟩ := hP.exists_card_eq refine hk ▸ Or.imp hp.out.coprime_pow_of_not_dvd hp.out.coprime_pow_of_not_dvd ?_ contrapose! h_cop exact Nat.Prime.not_coprime_iff_dvd.mpr ⟨p, hp.out, h_cop⟩ refine h3.symm.imp (fun h4 ↦ ?_) (fun h4 ↦ ?_) · rw [← Subgroup.relIndex_eq_one] exact Nat.eq_one_of_dvd_coprimes h4 (H.relIndex_dvd_index_of_normal P) (Subgroup.relIndex_dvd_card H P) · exact disjoint_iff.mpr (Subgroup.inf_eq_bot_of_coprime h4)
theorem
GroupTheory
[ "Mathlib.GroupTheory.Perm.Cycle.Type", "Mathlib.GroupTheory.SpecificGroups.Cyclic" ]
Mathlib/GroupTheory/PGroup.lean
le_or_disjoint_of_coprime
null
card_center_eq_prime_pow (hGpn : Nat.card G = p ^ n) (hn : 0 < n) : ∃ k > 0, Nat.card (center G) = p ^ k := by have : Finite G := Nat.finite_of_card_ne_zero (hGpn ▸ pow_ne_zero n (NeZero.ne p)) have hcG := to_subgroup (of_card hGpn) (center G) rcases iff_card.1 hcG with _ haveI : Nontrivial G := (nontrivial_iff_card <| of_card hGpn).2 ⟨n, hn, hGpn⟩ exact (nontrivial_iff_card hcG).mp (center_nontrivial (of_card hGpn))
theorem
GroupTheory
[ "Mathlib.GroupTheory.Perm.Cycle.Type", "Mathlib.GroupTheory.SpecificGroups.Cyclic" ]
Mathlib/GroupTheory/PGroup.lean
card_center_eq_prime_pow
The cardinality of the `center` of a `p`-group is `p ^ k` where `k` is positive.
cyclic_center_quotient_of_card_eq_prime_sq (hG : Nat.card G = p ^ 2) : IsCyclic (G ⧸ center G) := by apply isCyclic_of_card_dvd_prime (p := p) rw [← mul_dvd_mul_iff_left (NeZero.ne p), ← sq, ← hG, ← (center G).card_mul_index] apply mul_dvd_mul_right rcases card_center_eq_prime_pow hG zero_lt_two with ⟨k, hk0, hk⟩ rw [hk] exact dvd_pow_self p hk0.ne'
theorem
GroupTheory
[ "Mathlib.GroupTheory.Perm.Cycle.Type", "Mathlib.GroupTheory.SpecificGroups.Cyclic" ]
Mathlib/GroupTheory/PGroup.lean
cyclic_center_quotient_of_card_eq_prime_sq
The quotient by the center of a group of cardinality `p ^ 2` is cyclic.
commGroupOfCardEqPrimeSq (hG : Nat.card G = p ^ 2) : CommGroup G := @commGroupOfCyclicCenterQuotient _ _ _ _ (cyclic_center_quotient_of_card_eq_prime_sq hG) _ (QuotientGroup.ker_mk' (center G)).le
def
GroupTheory
[ "Mathlib.GroupTheory.Perm.Cycle.Type", "Mathlib.GroupTheory.SpecificGroups.Cyclic" ]
Mathlib/GroupTheory/PGroup.lean
commGroupOfCardEqPrimeSq
A group of order `p ^ 2` is commutative. See also `IsPGroup.commutative_of_card_eq_prime_sq` for just the proof that `∀ a b, a * b = b * a`
commutative_of_card_eq_prime_sq (hG : Nat.card G = p ^ 2) : ∀ a b : G, a * b = b * a := (commGroupOfCardEqPrimeSq hG).mul_comm
theorem
GroupTheory
[ "Mathlib.GroupTheory.Perm.Cycle.Type", "Mathlib.GroupTheory.SpecificGroups.Cyclic" ]
Mathlib/GroupTheory/PGroup.lean
commutative_of_card_eq_prime_sq
A group of order `p ^ 2` is commutative. See also `IsPGroup.commGroupOfCardEqPrimeSq` for the `CommGroup` instance.
isPGroup_multiplicative : IsPGroup n (Multiplicative G) := by simpa [IsPGroup, Multiplicative.forall] using fun _ ↦ ⟨1, by simp [← ofAdd_nsmul, ZModModule.char_nsmul_eq_zero]⟩
lemma
GroupTheory
[ "Mathlib.GroupTheory.Perm.Cycle.Type", "Mathlib.GroupTheory.SpecificGroups.Cyclic" ]
Mathlib/GroupTheory/PGroup.lean
isPGroup_multiplicative
null
PresentedGroup (rels : Set (FreeGroup α)) := FreeGroup α ⧸ Subgroup.normalClosure rels
def
GroupTheory
[ "Mathlib.Algebra.Group.Subgroup.Basic", "Mathlib.GroupTheory.FreeGroup.Basic", "Mathlib.GroupTheory.QuotientGroup.Defs" ]
Mathlib/GroupTheory/PresentedGroup.lean
PresentedGroup
Given a set of relations, `rels`, over a type `α`, `PresentedGroup` constructs the group with generators `x : α` and relations `rels` as a quotient of `FreeGroup α`.
mk (rels : Set (FreeGroup α)) : FreeGroup α →* PresentedGroup rels := ⟨⟨QuotientGroup.mk, rfl⟩, fun _ _ => rfl⟩
def
GroupTheory
[ "Mathlib.Algebra.Group.Subgroup.Basic", "Mathlib.GroupTheory.FreeGroup.Basic", "Mathlib.GroupTheory.QuotientGroup.Defs" ]
Mathlib/GroupTheory/PresentedGroup.lean
mk
The canonical map from the free group on `α` to a presented group with generators `x : α`, where `x` is mapped to its equivalence class under the given set of relations `rels`
mk_surjective (rels : Set (FreeGroup α)) : Function.Surjective <| mk rels := QuotientGroup.mk_surjective
theorem
GroupTheory
[ "Mathlib.Algebra.Group.Subgroup.Basic", "Mathlib.GroupTheory.FreeGroup.Basic", "Mathlib.GroupTheory.QuotientGroup.Defs" ]
Mathlib/GroupTheory/PresentedGroup.lean
mk_surjective
null
of {rels : Set (FreeGroup α)} (x : α) : PresentedGroup rels := mk rels (FreeGroup.of x)
def
GroupTheory
[ "Mathlib.Algebra.Group.Subgroup.Basic", "Mathlib.GroupTheory.FreeGroup.Basic", "Mathlib.GroupTheory.QuotientGroup.Defs" ]
Mathlib/GroupTheory/PresentedGroup.lean
of
`of` is the canonical map from `α` to a presented group with generators `x : α`. The term `x` is mapped to the equivalence class of the image of `x` in `FreeGroup α`.
mk_eq_one_iff {rels : Set (FreeGroup α)} {x : FreeGroup α} : mk rels x = 1 ↔ x ∈ Subgroup.normalClosure rels := QuotientGroup.eq_one_iff _
lemma
GroupTheory
[ "Mathlib.Algebra.Group.Subgroup.Basic", "Mathlib.GroupTheory.FreeGroup.Basic", "Mathlib.GroupTheory.QuotientGroup.Defs" ]
Mathlib/GroupTheory/PresentedGroup.lean
mk_eq_one_iff
null
one_of_mem {rels : Set (FreeGroup α)} {x : FreeGroup α} (hx : x ∈ rels) : mk rels x = 1 := mk_eq_one_iff.mpr <| Subgroup.subset_normalClosure hx
lemma
GroupTheory
[ "Mathlib.Algebra.Group.Subgroup.Basic", "Mathlib.GroupTheory.FreeGroup.Basic", "Mathlib.GroupTheory.QuotientGroup.Defs" ]
Mathlib/GroupTheory/PresentedGroup.lean
one_of_mem
null
mk_eq_mk_of_mul_inv_mem {rels : Set (FreeGroup α)} {x y : FreeGroup α} (hx : x * y⁻¹ ∈ rels) : mk rels x = mk rels y := eq_of_mul_inv_eq_one <| one_of_mem hx
lemma
GroupTheory
[ "Mathlib.Algebra.Group.Subgroup.Basic", "Mathlib.GroupTheory.FreeGroup.Basic", "Mathlib.GroupTheory.QuotientGroup.Defs" ]
Mathlib/GroupTheory/PresentedGroup.lean
mk_eq_mk_of_mul_inv_mem
null
mk_eq_mk_of_inv_mul_mem {rels : Set (FreeGroup α)} {x y : FreeGroup α} (hx : x⁻¹ * y ∈ rels) : mk rels x = mk rels y := eq_of_inv_mul_eq_one <| one_of_mem hx
lemma
GroupTheory
[ "Mathlib.Algebra.Group.Subgroup.Basic", "Mathlib.GroupTheory.FreeGroup.Basic", "Mathlib.GroupTheory.QuotientGroup.Defs" ]
Mathlib/GroupTheory/PresentedGroup.lean
mk_eq_mk_of_inv_mul_mem
null
@[simp] closure_range_of (rels : Set (FreeGroup α)) : Subgroup.closure (Set.range (PresentedGroup.of : α → PresentedGroup rels)) = ⊤ := by have : (PresentedGroup.of : α → PresentedGroup rels) = QuotientGroup.mk' _ ∘ FreeGroup.of := rfl rw [this, Set.range_comp, ← MonoidHom.map_closure (QuotientGroup.mk' _), FreeGroup.closure_range_of, ← MonoidHom.range_eq_map] exact MonoidHom.range_eq_top.2 (QuotientGroup.mk'_surjective _) @[induction_eliminator]
theorem
GroupTheory
[ "Mathlib.Algebra.Group.Subgroup.Basic", "Mathlib.GroupTheory.FreeGroup.Basic", "Mathlib.GroupTheory.QuotientGroup.Defs" ]
Mathlib/GroupTheory/PresentedGroup.lean
closure_range_of
The generators of a presented group generate the presented group. That is, the subgroup closure of the set of generators equals `⊤`.
induction_on {rels : Set (FreeGroup α)} {C : PresentedGroup rels → Prop} (x : PresentedGroup rels) (H : ∀ z, C (mk rels z)) : C x := Quotient.inductionOn' x H
theorem
GroupTheory
[ "Mathlib.Algebra.Group.Subgroup.Basic", "Mathlib.GroupTheory.FreeGroup.Basic", "Mathlib.GroupTheory.QuotientGroup.Defs" ]
Mathlib/GroupTheory/PresentedGroup.lean
induction_on
null
generated_by (rels : Set (FreeGroup α)) (H : Subgroup (PresentedGroup rels)) (h : ∀ j : α, PresentedGroup.of j ∈ H) (x : PresentedGroup rels) : x ∈ H := by obtain ⟨z⟩ := x induction z · exact one_mem H · exact h _ · exact (Subgroup.inv_mem_iff H).mpr (by assumption) rename_i h1 h2 change QuotientGroup.mk _ ∈ H.carrier rw [QuotientGroup.mk_mul] exact Subgroup.mul_mem _ h1 h2
theorem
GroupTheory
[ "Mathlib.Algebra.Group.Subgroup.Basic", "Mathlib.GroupTheory.FreeGroup.Basic", "Mathlib.GroupTheory.QuotientGroup.Defs" ]
Mathlib/GroupTheory/PresentedGroup.lean
generated_by
null
closure_rels_subset_ker (h : ∀ r ∈ rels, FreeGroup.lift f r = 1) : Subgroup.normalClosure rels ≤ MonoidHom.ker F := Subgroup.normalClosure_le_normal fun x w ↦ MonoidHom.mem_ker.2 (h x w)
theorem
GroupTheory
[ "Mathlib.Algebra.Group.Subgroup.Basic", "Mathlib.GroupTheory.FreeGroup.Basic", "Mathlib.GroupTheory.QuotientGroup.Defs" ]
Mathlib/GroupTheory/PresentedGroup.lean
closure_rels_subset_ker
null
to_group_eq_one_of_mem_closure (h : ∀ r ∈ rels, FreeGroup.lift f r = 1) : ∀ x ∈ Subgroup.normalClosure rels, F x = 1 := fun _ w ↦ MonoidHom.mem_ker.1 <| closure_rels_subset_ker h w
theorem
GroupTheory
[ "Mathlib.Algebra.Group.Subgroup.Basic", "Mathlib.GroupTheory.FreeGroup.Basic", "Mathlib.GroupTheory.QuotientGroup.Defs" ]
Mathlib/GroupTheory/PresentedGroup.lean
to_group_eq_one_of_mem_closure
null
toGroup (h : ∀ r ∈ rels, FreeGroup.lift f r = 1) : PresentedGroup rels →* G := QuotientGroup.lift (Subgroup.normalClosure rels) F (to_group_eq_one_of_mem_closure h) @[simp]
def
GroupTheory
[ "Mathlib.Algebra.Group.Subgroup.Basic", "Mathlib.GroupTheory.FreeGroup.Basic", "Mathlib.GroupTheory.QuotientGroup.Defs" ]
Mathlib/GroupTheory/PresentedGroup.lean
toGroup
The extension of a map `f : α → G` that satisfies the given relations to a group homomorphism from `PresentedGroup rels → G`.
toGroup.of (h : ∀ r ∈ rels, FreeGroup.lift f r = 1) {x : α} : toGroup h (of x) = f x := FreeGroup.lift_apply_of
theorem
GroupTheory
[ "Mathlib.Algebra.Group.Subgroup.Basic", "Mathlib.GroupTheory.FreeGroup.Basic", "Mathlib.GroupTheory.QuotientGroup.Defs" ]
Mathlib/GroupTheory/PresentedGroup.lean
toGroup.of
null
toGroup.unique (h : ∀ r ∈ rels, FreeGroup.lift f r = 1) (g : PresentedGroup rels →* G) (hg : ∀ x : α, g (PresentedGroup.of x) = f x) : ∀ {x}, g x = toGroup h x := by intro x refine QuotientGroup.induction_on x ?_ exact fun _ ↦ FreeGroup.lift_unique (g.comp (QuotientGroup.mk' _)) hg @[ext]
theorem
GroupTheory
[ "Mathlib.Algebra.Group.Subgroup.Basic", "Mathlib.GroupTheory.FreeGroup.Basic", "Mathlib.GroupTheory.QuotientGroup.Defs" ]
Mathlib/GroupTheory/PresentedGroup.lean
toGroup.unique
null
ext {φ ψ : PresentedGroup rels →* G} (hx : ∀ (x : α), φ (.of x) = ψ (.of x)) : φ = ψ := by unfold PresentedGroup ext apply hx variable {β : Type*}
theorem
GroupTheory
[ "Mathlib.Algebra.Group.Subgroup.Basic", "Mathlib.GroupTheory.FreeGroup.Basic", "Mathlib.GroupTheory.QuotientGroup.Defs" ]
Mathlib/GroupTheory/PresentedGroup.lean
ext
null
equivPresentedGroup (rels : Set (FreeGroup α)) (e : α ≃ β) : PresentedGroup rels ≃* PresentedGroup (FreeGroup.freeGroupCongr e '' rels) := QuotientGroup.congr (Subgroup.normalClosure rels) (Subgroup.normalClosure ((FreeGroup.freeGroupCongr e) '' rels)) (FreeGroup.freeGroupCongr e) (Subgroup.map_normalClosure rels (FreeGroup.freeGroupCongr e).toMonoidHom (FreeGroup.freeGroupCongr e).surjective)
def
GroupTheory
[ "Mathlib.Algebra.Group.Subgroup.Basic", "Mathlib.GroupTheory.FreeGroup.Basic", "Mathlib.GroupTheory.QuotientGroup.Defs" ]
Mathlib/GroupTheory/PresentedGroup.lean
equivPresentedGroup
Presented groups of isomorphic types are isomorphic.
equivPresentedGroup_apply_of (x : α) (rels : Set (FreeGroup α)) (e : α ≃ β) : equivPresentedGroup rels e (PresentedGroup.of x) = PresentedGroup.of (rels := FreeGroup.freeGroupCongr e '' rels) (e x) := rfl
theorem
GroupTheory
[ "Mathlib.Algebra.Group.Subgroup.Basic", "Mathlib.GroupTheory.FreeGroup.Basic", "Mathlib.GroupTheory.QuotientGroup.Defs" ]
Mathlib/GroupTheory/PresentedGroup.lean
equivPresentedGroup_apply_of
null
equivPresentedGroup_symm_apply_of (x : β) (rels : Set (FreeGroup α)) (e : α ≃ β) : (equivPresentedGroup rels e).symm (PresentedGroup.of x) = PresentedGroup.of (rels := rels) (e.symm x) := rfl
theorem
GroupTheory
[ "Mathlib.Algebra.Group.Subgroup.Basic", "Mathlib.GroupTheory.FreeGroup.Basic", "Mathlib.GroupTheory.QuotientGroup.Defs" ]
Mathlib/GroupTheory/PresentedGroup.lean
equivPresentedGroup_symm_apply_of
null
PushoutI.con [∀ i, Monoid (G i)] [Monoid H] (φ : ∀ i, H →* G i) : Con (Coprod (CoprodI G) H) := conGen (fun x y : Coprod (CoprodI G) H => ∃ i x', x = inl (of (φ i x')) ∧ y = inr x')
def
GroupTheory
[ "Mathlib.GroupTheory.CoprodI", "Mathlib.GroupTheory.Coprod.Basic", "Mathlib.GroupTheory.Complement" ]
Mathlib/GroupTheory/PushoutI.lean
PushoutI.con
The relation we quotient by to form the pushout
PushoutI [∀ i, Monoid (G i)] [Monoid H] (φ : ∀ i, H →* G i) : Type _ := (PushoutI.con φ).Quotient
def
GroupTheory
[ "Mathlib.GroupTheory.CoprodI", "Mathlib.GroupTheory.Coprod.Basic", "Mathlib.GroupTheory.Complement" ]
Mathlib/GroupTheory/PushoutI.lean
PushoutI
The indexed pushout of monoids, which is the pushout in the category of monoids, or the category of groups.
protected mul : Mul (PushoutI φ) := by delta PushoutI; infer_instance
instance
GroupTheory
[ "Mathlib.GroupTheory.CoprodI", "Mathlib.GroupTheory.Coprod.Basic", "Mathlib.GroupTheory.Complement" ]
Mathlib/GroupTheory/PushoutI.lean
mul
null
protected one : One (PushoutI φ) := by delta PushoutI; infer_instance
instance
GroupTheory
[ "Mathlib.GroupTheory.CoprodI", "Mathlib.GroupTheory.Coprod.Basic", "Mathlib.GroupTheory.Complement" ]
Mathlib/GroupTheory/PushoutI.lean
one
null
monoid : Monoid (PushoutI φ) := { Con.monoid _ with toMul := PushoutI.mul toOne := PushoutI.one }
instance
GroupTheory
[ "Mathlib.GroupTheory.CoprodI", "Mathlib.GroupTheory.Coprod.Basic", "Mathlib.GroupTheory.Complement" ]
Mathlib/GroupTheory/PushoutI.lean
monoid
null
of (i : ι) : G i →* PushoutI φ := (Con.mk' _).comp <| inl.comp CoprodI.of variable (φ) in
def
GroupTheory
[ "Mathlib.GroupTheory.CoprodI", "Mathlib.GroupTheory.Coprod.Basic", "Mathlib.GroupTheory.Complement" ]
Mathlib/GroupTheory/PushoutI.lean
of
The map from each indexing group into the pushout
base : H →* PushoutI φ := (Con.mk' _).comp inr
def
GroupTheory
[ "Mathlib.GroupTheory.CoprodI", "Mathlib.GroupTheory.Coprod.Basic", "Mathlib.GroupTheory.Complement" ]
Mathlib/GroupTheory/PushoutI.lean
base
The map from the base monoid into the pushout
of_comp_eq_base (i : ι) : (of i).comp (φ i) = (base φ) := by ext x apply (Con.eq _).2 refine ConGen.Rel.of _ _ ?_ simp only [MonoidHom.comp_apply] exact ⟨_, _, rfl, rfl⟩ variable (φ) in
theorem
GroupTheory
[ "Mathlib.GroupTheory.CoprodI", "Mathlib.GroupTheory.Coprod.Basic", "Mathlib.GroupTheory.Complement" ]
Mathlib/GroupTheory/PushoutI.lean
of_comp_eq_base
null
of_apply_eq_base (i : ι) (x : H) : of i (φ i x) = base φ x := by rw [← MonoidHom.comp_apply, of_comp_eq_base]
theorem
GroupTheory
[ "Mathlib.GroupTheory.CoprodI", "Mathlib.GroupTheory.Coprod.Basic", "Mathlib.GroupTheory.Complement" ]
Mathlib/GroupTheory/PushoutI.lean
of_apply_eq_base
null
lift (f : ∀ i, G i →* K) (k : H →* K) (hf : ∀ i, (f i).comp (φ i) = k) : PushoutI φ →* K := Con.lift _ (Coprod.lift (CoprodI.lift f) k) <| by apply Con.conGen_le fun x y => ?_ rintro ⟨i, x', rfl, rfl⟩ simp only [DFunLike.ext_iff, MonoidHom.coe_comp, comp_apply] at hf simp [hf] @[simp]
def
GroupTheory
[ "Mathlib.GroupTheory.CoprodI", "Mathlib.GroupTheory.Coprod.Basic", "Mathlib.GroupTheory.Complement" ]
Mathlib/GroupTheory/PushoutI.lean
lift
Define a homomorphism out of the pushout of monoids be defining it on each object in the diagram
lift_of (f : ∀ i, G i →* K) (k : H →* K) (hf : ∀ i, (f i).comp (φ i) = k) {i : ι} (g : G i) : (lift f k hf) (of i g : PushoutI φ) = f i g := by delta PushoutI lift of simp only [MonoidHom.coe_comp, Con.coe_mk', comp_apply, Con.lift_coe, lift_apply_inl, CoprodI.lift_of] @[simp]
theorem
GroupTheory
[ "Mathlib.GroupTheory.CoprodI", "Mathlib.GroupTheory.Coprod.Basic", "Mathlib.GroupTheory.Complement" ]
Mathlib/GroupTheory/PushoutI.lean
lift_of
null
lift_base (f : ∀ i, G i →* K) (k : H →* K) (hf : ∀ i, (f i).comp (φ i) = k) (g : H) : (lift f k hf) (base φ g : PushoutI φ) = k g := by delta PushoutI lift base simp only [MonoidHom.coe_comp, Con.coe_mk', comp_apply, Con.lift_coe, lift_apply_inr] @[ext 1199]
theorem
GroupTheory
[ "Mathlib.GroupTheory.CoprodI", "Mathlib.GroupTheory.Coprod.Basic", "Mathlib.GroupTheory.Complement" ]
Mathlib/GroupTheory/PushoutI.lean
lift_base
null
hom_ext {f g : PushoutI φ →* K} (h : ∀ i, f.comp (of i : G i →* _) = g.comp (of i : G i →* _)) (hbase : f.comp (base φ) = g.comp (base φ)) : f = g := (MonoidHom.cancel_right Con.mk'_surjective).mp <| Coprod.hom_ext (CoprodI.ext_hom _ _ h) hbase @[ext high]
theorem
GroupTheory
[ "Mathlib.GroupTheory.CoprodI", "Mathlib.GroupTheory.Coprod.Basic", "Mathlib.GroupTheory.Complement" ]
Mathlib/GroupTheory/PushoutI.lean
hom_ext
null
hom_ext_nonempty [hn : Nonempty ι] {f g : PushoutI φ →* K} (h : ∀ i, f.comp (of i : G i →* _) = g.comp (of i : G i →* _)) : f = g := hom_ext h <| by cases hn with | intro i => ext rw [← of_comp_eq_base i, ← MonoidHom.comp_assoc, h, MonoidHom.comp_assoc]
theorem
GroupTheory
[ "Mathlib.GroupTheory.CoprodI", "Mathlib.GroupTheory.Coprod.Basic", "Mathlib.GroupTheory.Complement" ]
Mathlib/GroupTheory/PushoutI.lean
hom_ext_nonempty
null
@[simps] homEquiv : (PushoutI φ →* K) ≃ { f : (Π i, G i →* K) × (H →* K) // ∀ i, (f.1 i).comp (φ i) = f.2 } := { toFun := fun f => ⟨(fun i => f.comp (of i), f.comp (base φ)), fun i => by rw [MonoidHom.comp_assoc, of_comp_eq_base]⟩ invFun := fun f => lift f.1.1 f.1.2 f.2, left_inv := fun _ => hom_ext (by simp [DFunLike.ext_iff]) (by simp [DFunLike.ext_iff]) right_inv := fun ⟨⟨_, _⟩, _⟩ => by simp [DFunLike.ext_iff, funext_iff] }
def
GroupTheory
[ "Mathlib.GroupTheory.CoprodI", "Mathlib.GroupTheory.Coprod.Basic", "Mathlib.GroupTheory.Complement" ]
Mathlib/GroupTheory/PushoutI.lean
homEquiv
The equivalence that is part of the universal property of the pushout. A hom out of the pushout is just a morphism out of all groups in the pushout that satisfies a commutativity condition.
ofCoprodI : CoprodI G →* PushoutI φ := CoprodI.lift of @[simp]
def
GroupTheory
[ "Mathlib.GroupTheory.CoprodI", "Mathlib.GroupTheory.Coprod.Basic", "Mathlib.GroupTheory.Complement" ]
Mathlib/GroupTheory/PushoutI.lean
ofCoprodI
The map from the coproduct into the pushout
ofCoprodI_of (i : ι) (g : G i) : (ofCoprodI (CoprodI.of g) : PushoutI φ) = of i g := by simp [ofCoprodI]
theorem
GroupTheory
[ "Mathlib.GroupTheory.CoprodI", "Mathlib.GroupTheory.Coprod.Basic", "Mathlib.GroupTheory.Complement" ]
Mathlib/GroupTheory/PushoutI.lean
ofCoprodI_of
null
induction_on {motive : PushoutI φ → Prop} (x : PushoutI φ) (of : ∀ (i : ι) (g : G i), motive (of i g)) (base : ∀ h, motive (base φ h)) (mul : ∀ x y, motive x → motive y → motive (x * y)) : motive x := by delta PushoutI PushoutI.of PushoutI.base at * induction x using Con.induction_on with | H x => induction x using Coprod.induction_on with | inl g => induction g using CoprodI.induction_on with | of i g => exact of i g | mul x y ihx ihy => rw [map_mul] exact mul _ _ ihx ihy | one => simpa using base 1 | inr h => exact base h | mul x y ihx ihy => exact mul _ _ ihx ihy
theorem
GroupTheory
[ "Mathlib.GroupTheory.CoprodI", "Mathlib.GroupTheory.Coprod.Basic", "Mathlib.GroupTheory.Complement" ]
Mathlib/GroupTheory/PushoutI.lean
induction_on
null
Transversal : Type _ where /-- All maps in the diagram are injective -/ injective : ∀ i, Injective (φ i) /-- The underlying set, containing exactly one element of each coset of the base group -/ set : ∀ i, Set (G i) /-- The chosen element of the base group itself is the identity -/ one_mem : ∀ i, 1 ∈ set i /-- We have exactly one element of each coset of the base group -/ compl : ∀ i, IsComplement (φ i).range (set i)
structure
GroupTheory
[ "Mathlib.GroupTheory.CoprodI", "Mathlib.GroupTheory.Coprod.Basic", "Mathlib.GroupTheory.Complement" ]
Mathlib/GroupTheory/PushoutI.lean
Transversal
The data we need to pick a normal form for words in the pushout. We need to pick a canonical element of each coset. We also need all the maps in the diagram to be injective
transversal_nonempty (hφ : ∀ i, Injective (φ i)) : Nonempty (Transversal φ) := by choose t ht using fun i => (φ i).range.exists_isComplement_right 1 apply Nonempty.intro exact { injective := hφ set := t one_mem := fun i => (ht i).2 compl := fun i => (ht i).1 } variable {φ}
theorem
GroupTheory
[ "Mathlib.GroupTheory.CoprodI", "Mathlib.GroupTheory.Coprod.Basic", "Mathlib.GroupTheory.Complement" ]
Mathlib/GroupTheory/PushoutI.lean
transversal_nonempty
null
_root_.Monoid.PushoutI.NormalWord (d : Transversal φ) extends CoprodI.Word G where /-- Every `NormalWord` is the product of an element of the base group and a word made up of letters each of which is in the transversal. `head` is that element of the base group. -/ head : H /-- All letter in the word are in the transversal. -/ normalized : ∀ i g, ⟨i, g⟩ ∈ toList → g ∈ d.set i
structure
GroupTheory
[ "Mathlib.GroupTheory.CoprodI", "Mathlib.GroupTheory.Coprod.Basic", "Mathlib.GroupTheory.Complement" ]
Mathlib/GroupTheory/PushoutI.lean
_root_.Monoid.PushoutI.NormalWord
The normal form for words in the pushout. Every element of the pushout is the product of an element of the base group and a word made up of letters each of which is in the transversal.
Pair (d : Transversal φ) (i : ι) extends CoprodI.Word.Pair G i where /-- All letters in the word are in the transversal. -/ normalized : ∀ i g, ⟨i, g⟩ ∈ tail.toList → g ∈ d.set i variable {d : Transversal φ}
structure
GroupTheory
[ "Mathlib.GroupTheory.CoprodI", "Mathlib.GroupTheory.Coprod.Basic", "Mathlib.GroupTheory.Complement" ]
Mathlib/GroupTheory/PushoutI.lean
Pair
A `Pair d i` is a word in the coproduct, `Coprod G`, the `tail`, and an element of the group `G i`, the `head`. The first letter of the `tail` must not be an element of `G i`. Note that the `head` may be `1` Every letter in the `tail` must be in the transversal given by `d`. Similar to `Monoid.CoprodI.Pair` except every letter must be in the transversal (not including the head letter).
@[simps!] empty : NormalWord d := ⟨CoprodI.Word.empty, 1, fun i g => by simp [CoprodI.Word.empty]⟩
def
GroupTheory
[ "Mathlib.GroupTheory.CoprodI", "Mathlib.GroupTheory.Coprod.Basic", "Mathlib.GroupTheory.Complement" ]
Mathlib/GroupTheory/PushoutI.lean
empty
The empty normalized word, representing the identity element of the group.
@[ext] ext {w₁ w₂ : NormalWord d} (hhead : w₁.head = w₂.head) (hlist : w₁.toList = w₂.toList) : w₁ = w₂ := by rcases w₁ with ⟨⟨_, _, _⟩, _, _⟩ rcases w₂ with ⟨⟨_, _, _⟩, _, _⟩ simp_all open Subgroup.IsComplement
theorem
GroupTheory
[ "Mathlib.GroupTheory.CoprodI", "Mathlib.GroupTheory.Coprod.Basic", "Mathlib.GroupTheory.Complement" ]
Mathlib/GroupTheory/PushoutI.lean
ext
null
baseAction : MulAction H (NormalWord d) := { smul := fun h w => { w with head := h * w.head }, one_smul := by simp [instHSMul] mul_smul := by simp [instHSMul, mul_assoc] }
instance
GroupTheory
[ "Mathlib.GroupTheory.CoprodI", "Mathlib.GroupTheory.Coprod.Basic", "Mathlib.GroupTheory.Complement" ]
Mathlib/GroupTheory/PushoutI.lean
baseAction
null
base_smul_def' (h : H) (w : NormalWord d) : h • w = { w with head := h * w.head } := rfl
theorem
GroupTheory
[ "Mathlib.GroupTheory.CoprodI", "Mathlib.GroupTheory.Coprod.Basic", "Mathlib.GroupTheory.Complement" ]
Mathlib/GroupTheory/PushoutI.lean
base_smul_def'
null
prod (w : NormalWord d) : PushoutI φ := base φ w.head * ofCoprodI (w.toWord).prod @[simp]
def
GroupTheory
[ "Mathlib.GroupTheory.CoprodI", "Mathlib.GroupTheory.Coprod.Basic", "Mathlib.GroupTheory.Complement" ]
Mathlib/GroupTheory/PushoutI.lean
prod
Take the product of a normal word as an element of the `PushoutI`. We show that this is bijective, in `NormalWord.equiv`.
prod_base_smul (h : H) (w : NormalWord d) : (h • w).prod = base φ h * w.prod := by simp only [base_smul_def', prod, map_mul, mul_assoc] @[simp]
theorem
GroupTheory
[ "Mathlib.GroupTheory.CoprodI", "Mathlib.GroupTheory.Coprod.Basic", "Mathlib.GroupTheory.Complement" ]
Mathlib/GroupTheory/PushoutI.lean
prod_base_smul
null
prod_empty : (empty : NormalWord d).prod = 1 := by simp [prod, empty]
theorem
GroupTheory
[ "Mathlib.GroupTheory.CoprodI", "Mathlib.GroupTheory.Coprod.Basic", "Mathlib.GroupTheory.Complement" ]
Mathlib/GroupTheory/PushoutI.lean
prod_empty
null
@[simps!] noncomputable cons {i} (g : G i) (w : NormalWord d) (hmw : w.fstIdx ≠ some i) (hgr : g ∉ (φ i).range) : NormalWord d := letI n := (d.compl i).equiv (g * (φ i w.head)) letI w' := Word.cons (n.2 : G i) w.toWord hmw (mt (coe_equiv_snd_eq_one_iff_mem _ (d.one_mem _)).1 (mt (mul_mem_cancel_right (by simp)).1 hgr)) { toWord := w' head := (MonoidHom.ofInjective (d.injective i)).symm n.1 normalized := fun i g hg => by simp only [w', Word.cons, mem_cons, Sigma.mk.inj_iff] at hg rcases hg with ⟨rfl, hg | hg⟩ · simp · exact w.normalized _ _ (by assumption) } @[simp]
def
GroupTheory
[ "Mathlib.GroupTheory.CoprodI", "Mathlib.GroupTheory.Coprod.Basic", "Mathlib.GroupTheory.Complement" ]
Mathlib/GroupTheory/PushoutI.lean
cons
A constructor that multiplies a `NormalWord` by an element, with condition to make sure the underlying list does get longer.
prod_cons {i} (g : G i) (w : NormalWord d) (hmw : w.fstIdx ≠ some i) (hgr : g ∉ (φ i).range) : (cons g w hmw hgr).prod = of i g * w.prod := by simp [prod, cons, ← of_apply_eq_base φ i, equiv_fst_eq_mul_inv, mul_assoc] variable [DecidableEq ι] [∀ i, DecidableEq (G i)]
theorem
GroupTheory
[ "Mathlib.GroupTheory.CoprodI", "Mathlib.GroupTheory.Coprod.Basic", "Mathlib.GroupTheory.Complement" ]
Mathlib/GroupTheory/PushoutI.lean
prod_cons
null
eq_one_of_smul_normalized (w : CoprodI.Word G) {i : ι} (h : H) (hw : ∀ i g, ⟨i, g⟩ ∈ w.toList → g ∈ d.set i) (hφw : ∀ j g, ⟨j, g⟩ ∈ (CoprodI.of (φ i h) • w).toList → g ∈ d.set j) : h = 1 := by simp only [← (d.compl _).equiv_snd_eq_self_iff_mem (one_mem _)] at hw hφw have hhead : ((d.compl i).equiv (Word.equivPair i w).head).2 = (Word.equivPair i w).head := by rw [Word.equivPair_head] split_ifs with h · rcases h with ⟨_, rfl⟩ exact hw _ _ (List.head_mem _) · rw [equiv_one (d.compl i) (one_mem _) (d.one_mem _)] by_contra hh1 have := hφw i (φ i h * (Word.equivPair i w).head) ?_ · apply hh1 rw [equiv_mul_left_of_mem (d.compl i) ⟨_, rfl⟩, hhead] at this simpa [((injective_iff_map_eq_one' _).1 (d.injective i))] using this · simp only [Word.mem_smul_iff, not_true, false_and, ne_eq, Option.mem_def, mul_right_inj, exists_eq_right', mul_eq_left, exists_prop, true_and, false_or] constructor · intro h apply_fun (d.compl i).equiv at h simp only [Prod.ext_iff, equiv_one (d.compl i) (one_mem _) (d.one_mem _), equiv_mul_left_of_mem (d.compl i) ⟨_, rfl⟩, hhead, Subtype.ext_iff, Prod.ext_iff] at h rcases h with ⟨h₁, h₂⟩ rw [h₂, equiv_one (d.compl i) (one_mem _) (d.one_mem _)] at h₁ erw [mul_one] at h₁ simp only [((injective_iff_map_eq_one' _).1 (d.injective i))] at h₁ contradiction · rw [Word.equivPair_head] dsimp split_ifs with hep · rcases hep with ⟨hnil, rfl⟩ rw [head?_eq_head hnil] simp_all · push_neg at hep by_cases hw : w.toList = [] · simp [hw, Word.fstIdx] · simp [head?_eq_head hw, Word.fstIdx, hep hw]
theorem
GroupTheory
[ "Mathlib.GroupTheory.CoprodI", "Mathlib.GroupTheory.Coprod.Basic", "Mathlib.GroupTheory.Complement" ]
Mathlib/GroupTheory/PushoutI.lean
eq_one_of_smul_normalized
Given a word in `CoprodI`, if every letter is in the transversal and when we multiply by an element of the base group it still has this property, then the element of the base group we multiplied by was one.
ext_smul {w₁ w₂ : NormalWord d} (i : ι) (h : CoprodI.of (φ i w₁.head) • w₁.toWord = CoprodI.of (φ i w₂.head) • w₂.toWord) : w₁ = w₂ := by rcases w₁ with ⟨w₁, h₁, hw₁⟩ rcases w₂ with ⟨w₂, h₂, hw₂⟩ dsimp at * rw [smul_eq_iff_eq_inv_smul, ← mul_smul] at h subst h simp only [← map_inv, ← map_mul] at hw₁ have : h₁⁻¹ * h₂ = 1 := eq_one_of_smul_normalized w₂ (h₁⁻¹ * h₂) hw₂ hw₁ rw [inv_mul_eq_one] at this; subst this simp
theorem
GroupTheory
[ "Mathlib.GroupTheory.CoprodI", "Mathlib.GroupTheory.Coprod.Basic", "Mathlib.GroupTheory.Complement" ]
Mathlib/GroupTheory/PushoutI.lean
ext_smul
null
noncomputable rcons (i : ι) (p : Pair d i) : NormalWord d := letI n := (d.compl i).equiv p.head let w := (Word.equivPair i).symm { p.toPair with head := n.2 } { toWord := w head := (MonoidHom.ofInjective (d.injective i)).symm n.1 normalized := fun i g hg => by dsimp [w] at hg rw [Word.equivPair_symm, Word.mem_rcons_iff] at hg rcases hg with hg | ⟨_, rfl, rfl⟩ · exact p.normalized _ _ hg · simp }
def
GroupTheory
[ "Mathlib.GroupTheory.CoprodI", "Mathlib.GroupTheory.Coprod.Basic", "Mathlib.GroupTheory.Complement" ]
Mathlib/GroupTheory/PushoutI.lean
rcons
Given a pair `(head, tail)`, we can form a word by prepending `head` to `tail`, but putting head into normal form first, by making sure it is expressed as an element of the base group multiplied by an element of the transversal.
rcons_injective {i : ι} : Function.Injective (rcons (d := d) i) := by rintro ⟨⟨head₁, tail₁⟩, _⟩ ⟨⟨head₂, tail₂⟩, _⟩ simp only [rcons, NormalWord.mk.injEq, EmbeddingLike.apply_eq_iff_eq, Word.Pair.mk.injEq, Pair.mk.injEq, and_imp] intro h₁ h₂ h₃ subst h₂ rw [← equiv_fst_mul_equiv_snd (d.compl i) head₁, ← equiv_fst_mul_equiv_snd (d.compl i) head₂, h₁, h₃] simp
theorem
GroupTheory
[ "Mathlib.GroupTheory.CoprodI", "Mathlib.GroupTheory.Coprod.Basic", "Mathlib.GroupTheory.Complement" ]
Mathlib/GroupTheory/PushoutI.lean
rcons_injective
null
noncomputable equivPair (i) : NormalWord d ≃ Pair d i := letI toFun : NormalWord d → Pair d i := fun w => letI p := Word.equivPair i (CoprodI.of (φ i w.head) • w.toWord) { toPair := p normalized := fun j g hg => by dsimp only [p] at hg rw [Word.of_smul_def, ← Word.equivPair_symm, Equiv.apply_symm_apply] at hg dsimp at hg exact w.normalized _ _ (Word.mem_of_mem_equivPair_tail _ hg) } haveI leftInv : Function.LeftInverse (rcons i) toFun := fun w => ext_smul i <| by simp only [toFun, rcons, Word.equivPair_symm, Word.equivPair_smul_same, Word.equivPair_tail_eq_inv_smul, Word.rcons_eq_smul, MonoidHom.apply_ofInjective_symm, equiv_fst_eq_mul_inv, mul_assoc, map_mul, map_inv, mul_smul, inv_smul_smul, smul_inv_smul] { toFun := toFun invFun := rcons i left_inv := leftInv right_inv := fun _ => rcons_injective (leftInv _) }
def
GroupTheory
[ "Mathlib.GroupTheory.CoprodI", "Mathlib.GroupTheory.Coprod.Basic", "Mathlib.GroupTheory.Complement" ]
Mathlib/GroupTheory/PushoutI.lean
equivPair
The equivalence between `NormalWord`s and pairs. We can turn a `NormalWord` into a pair by taking the head of the `List` if it is in `G i` and multiplying it by the element of the base group.
noncomputable summandAction (i : ι) : MulAction (G i) (NormalWord d) := { smul := fun g w => (equivPair i).symm { equivPair i w with head := g * (equivPair i w).head } one_smul := fun _ => by dsimp [instHSMul] rw [one_mul] exact (equivPair i).symm_apply_apply _ mul_smul := fun _ _ _ => by dsimp [instHSMul] simp [mul_assoc, Equiv.apply_symm_apply] }
instance
GroupTheory
[ "Mathlib.GroupTheory.CoprodI", "Mathlib.GroupTheory.Coprod.Basic", "Mathlib.GroupTheory.Complement" ]
Mathlib/GroupTheory/PushoutI.lean
summandAction
null
summand_smul_def' {i : ι} (g : G i) (w : NormalWord d) : g • w = (equivPair i).symm { equivPair i w with head := g * (equivPair i w).head } := rfl
theorem
GroupTheory
[ "Mathlib.GroupTheory.CoprodI", "Mathlib.GroupTheory.Coprod.Basic", "Mathlib.GroupTheory.Complement" ]
Mathlib/GroupTheory/PushoutI.lean
summand_smul_def'
null
noncomputable mulAction : MulAction (PushoutI φ) (NormalWord d) := MulAction.ofEndHom <| lift (fun _ => MulAction.toEndHom) MulAction.toEndHom <| by intro i simp only [MulAction.toEndHom, DFunLike.ext_iff, MonoidHom.coe_comp, MonoidHom.coe_mk, OneHom.coe_mk, comp_apply] intro h funext w apply NormalWord.ext_smul i simp only [summand_smul_def', equivPair, rcons, Word.equivPair_symm, Equiv.coe_fn_mk, Equiv.coe_fn_symm_mk, Word.equivPair_smul_same, Word.equivPair_tail_eq_inv_smul, Word.rcons_eq_smul, equiv_fst_eq_mul_inv, map_mul, map_inv, mul_smul, inv_smul_smul, smul_inv_smul, base_smul_def', MonoidHom.apply_ofInjective_symm]
instance
GroupTheory
[ "Mathlib.GroupTheory.CoprodI", "Mathlib.GroupTheory.Coprod.Basic", "Mathlib.GroupTheory.Complement" ]
Mathlib/GroupTheory/PushoutI.lean
mulAction
null