Skip to content

Commit

Permalink
chore(Algebra/CharP/Quotient): slightly golf (#7992)
Browse files Browse the repository at this point in the history
removes a todo but not sure if the most principled.
  • Loading branch information
ericrbg committed Oct 31, 2023
1 parent d99ad9b commit 0965c0b
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions Mathlib/Algebra/CharP/Quotient.lean
Expand Up @@ -60,9 +60,6 @@ theorem Ideal.Quotient.index_eq_zero {R : Type*} [CommRing R] (I : Ideal R) :
(↑I.toAddSubgroup.index : R ⧸ I) = 0 := by
rw [AddSubgroup.index, Nat.card_eq]
split_ifs with hq; swap; simp
by_contra h
-- TODO: can we avoid rewriting the `I.to_add_subgroup` here?
letI : Fintype (R ⧸ I) := @Fintype.ofFinite _ hq
have h : (Fintype.card (R ⧸ I) : R ⧸ I) ≠ 0 := h
simp at h
exact CharP.cast_card_eq_zero (R ⧸ I)
#align ideal.quotient.index_eq_zero Ideal.Quotient.index_eq_zero

0 comments on commit 0965c0b

Please sign in to comment.