ProCGroups.Abelian.card_filter_eq_le_card_ker
Source context 3 commands
Surrounding namespaces, section variables, and local commands at this declaration.
@[expose] public section
open scoped BigOperators
namespace ProCGroups.AbelianLean source · full declaration
theorem card_filter_eq_le_card_ker {A B : Type*} [Group A] [Fintype A] [Group B]
(f : A →* B) (b : B) [DecidablePred (fun a => f a = b)] :
(Finset.univ.filter (fun a => f a = b)).card ≤ Nat.card f.ker := by
classical
let s := Finset.univ.filter (fun a => f a = b)
change s.card ≤ Nat.card f.ker
by_cases hs : s.Nonempty
· obtain ⟨x, hx⟩ := hs
have hx' : f x = b := (Finset.mem_filter.mp hx).2
let e : {a // a ∈ s} → f.ker := fun a => ⟨a.1 / x, by
have ha : f a.1 = b := (Finset.mem_filter.mp a.2).2
rw [MonoidHom.mem_ker, map_div, ha, hx', div_self']⟩
have he : Function.Injective e := by
intro a c h
apply Subtype.ext
exact div_left_injective (congrArg Subtype.val h)
rw [← Fintype.card_coe s, ← Nat.card_eq_fintype_card]
exact Nat.card_le_card_of_injective e he
· rw [Finset.not_nonempty_iff_eq_empty.mp hs, Finset.card_empty]
exact Nat.zero_le _