Lean!
Try it out on: https://live.lean-lang.org/
Formalizing the Statement
import Mathlib
open Subgroup in
example {p : ℕ} {P : Type u_1} [Group P] (hP : IsPGroup p P) [hp : Fact (Nat.Prime p)]
[Finite P] [IsSimpleGroup P]: Nat.card P = p := by sorry
Step-by-Step Solution
- The center of must be nontrivial since it is a -group.
have center_nontriv := hP.center_nontrivial
- Since is simple, its center (which is a normal subgroup) must be either trivial or itself.
have center_bot_top := (center P).normal_of_characteristic.eq_bot_or_eq_top
- The center is not trivial, therefore it is itself.
have center_not_bot := (center P).nontrivial_iff_ne_bot.mp center_nontriv
replace center_bot_top := center_bot_top.resolve_left center_not_bot
Which means that should be abelian.
letI : CommGroup P := Group.commGroupOfCenterEqTop center_bot_top
- Of course is nontrivial since its center is nontrivial.
letI : Nontrivial P := Set.nontrivial_of_nontrivial_coe center_nontriv
- And the cardinality of should be divisible by since has cardinality for some and for: is nontrivial, and nontrivial implies a cardinality strictly greater than 1.
letI : Fintype P := Fintype.ofFinite P
have : p ∣ Fintype.card P := by
/- since $P$ has cardinality $p^n$ for some $n$--/
obtain ⟨n, hnp⟩ := IsPGroup.iff_card.1 hP
rw [← Nat.card_eq_fintype_card, hnp]
/- and $n \neq 0$--/
have : n ≠ 0 := by
by_contra nzero
rw [nzero, pow_zero] at hnp
/- for $P$ is nontrivial, and nontrivial implies a cardinality strictly greater than 1.--/
have := hnp ▸ Finite.one_lt_card_iff_nontrivial (α := P)
tauto
exact Prime.dvd_pow_iff_dvd hp.out.prime this |>.2 p.dvd_refl
By Cauchy’s theorem, this admits the existence of an element whose order is . We define the subgroup generated by the element as .
obtain ⟨x, hx⟩ := exists_prime_orderOf_dvd_card p this
set sub := zpowers x with hsub
- It must be of cardinality since the element has order .
have sub_card := hsub ▸ hx ▸ Nat.card_zpowers x
- And it must be normal since is abelian.
have sub_normal : sub.Normal := sub.normal_of_comm
- Furthermore it mustn’t be trivial since its generator is not the identity (identity won’t have order ).
have sub_ntriv : sub ≠ ⊥ := by
/- since its generator is not the identity (identity won't have order $p$).--/
refine zpowers_ne_bot.mpr ?_
by_contra hx_one
rw [hx_one, orderOf_one] at hx
rw [← hx] at hp
tauto
Thus, since is simple, must be it self. Therefore the cardinality of is exactly .
have sub_eq_top := sub_normal.eq_bot_or_eq_top.resolve_left sub_ntriv
exact card_top (G := P) ▸ sub_eq_top ▸ sub_card
Complete Code
import Mathlib
open Subgroup in
example {p : ℕ} {P : Type u_1} [Group P] (hP : IsPGroup p P) [hp : Fact (Nat.Prime p)]
[Finite P] [IsSimpleGroup P]: Nat.card P = p := by
have center_nontriv := hP.center_nontrivial
have center_bot_top := (center P).normal_of_characteristic.eq_bot_or_eq_top
have center_not_bot := (center P).nontrivial_iff_ne_bot.mp center_nontriv
replace center_bot_top := center_bot_top.resolve_left center_not_bot
letI : CommGroup P := Group.commGroupOfCenterEqTop center_bot_top
letI : Fintype P := Fintype.ofFinite P
letI : Nontrivial P := Set.nontrivial_of_nontrivial_coe center_nontriv
have : p ∣ Fintype.card P := by
obtain ⟨n, hnp⟩ := IsPGroup.iff_card.1 hP
rw [← Nat.card_eq_fintype_card, hnp]
have : n ≠ 0 := by
by_contra nzero
rw [nzero, pow_zero] at hnp
have := hnp ▸ Finite.one_lt_card_iff_nontrivial (α := P)
tauto
exact Prime.dvd_pow_iff_dvd hp.out.prime this |>.2 p.dvd_refl
obtain ⟨x, hx⟩ := exists_prime_orderOf_dvd_card p this
set sub := zpowers x with hsub
have sub_card := hsub ▸ hx ▸ Nat.card_zpowers x
have sub_normal : sub.Normal := sub.normal_of_comm
have sub_ntriv : sub ≠ ⊥ := by
refine zpowers_ne_bot.mpr ?_
by_contra hx_one
rw [hx_one, orderOf_one] at hx
rw [← hx] at hp
tauto
have sub_eq_top := sub_normal.eq_bot_or_eq_top.resolve_left sub_ntriv
exact card_top (G := P) ▸ sub_eq_top ▸ sub_card Lean!
/posts/6/
评论