@@ -12,18 +12,18 @@ import Mathlib.RingTheory.Ideal.Quotient.Defs
1212# Characteristic of quotient rings
1313-/
1414
15-
16- universe u v
17-
18- namespace CharP
19-
20- theorem ker_intAlgebraMap_eq_span
15+ theorem CharP.ker_intAlgebraMap_eq_span
2116 {R : Type *} [Ring R] (p : ℕ) [CharP R p] :
2217 RingHom.ker (algebraMap ℤ R) = Ideal.span {(p : ℤ)} := by
2318 ext a
2419 simp [CharP.intCast_eq_zero_iff R p, Ideal.mem_span_singleton]
2520
26- theorem quotient (R : Type u) [CommRing R] (p : ℕ) [hp1 : Fact p.Prime] (hp2 : ↑p ∈ nonunits R) :
21+ variable {R : Type *} [CommRing R]
22+
23+ namespace CharP
24+
25+ variable (R) in
26+ theorem quotient (p : ℕ) [hp1 : Fact p.Prime] (hp2 : ↑p ∈ nonunits R) :
2727 CharP (R ⧸ (Ideal.span ({(p : R)} : Set R) : Ideal R)) p :=
2828 have hp0 : (p : R ⧸ (Ideal.span {(p : R)} : Ideal R)) = 0 :=
2929 map_natCast (Ideal.Quotient.mk (Ideal.span {(p : R)} : Ideal R)) p ▸
@@ -38,30 +38,33 @@ theorem quotient (R : Type u) [CommRing R] (p : ℕ) [hp1 : Fact p.Prime] (hp2 :
3838
3939/-- If an ideal does not contain any coercions of natural numbers other than zero, then its quotient
4040inherits the characteristic of the underlying ring. -/
41- theorem quotient' {R : Type *} [CommRing R] (p : ℕ) [CharP R p] (I : Ideal R)
42- (h : ∀ x : ℕ, (x : R) ∈ I → (x : R) = 0 ) : CharP (R ⧸ I) p :=
43- ⟨ fun x => by
41+ theorem quotient' (p : ℕ) [CharP R p] (I : Ideal R) (h : ∀ x : ℕ, (x : R) ∈ I → (x : R) = 0 ) :
42+ CharP (R ⧸ I) p where
43+ cast_eq_zero_iff x := by
4444 rw [← cast_eq_zero_iff R p x, ← map_natCast (Ideal.Quotient.mk I)]
4545 refine Ideal.Quotient.eq.trans (?_ : ↑x - 0 ∈ I ↔ _)
4646 rw [sub_zero]
47- exact ⟨h x, fun h' => h'.symm ▸ I.zero_mem⟩⟩
47+ exact ⟨h x, fun h' => h'.symm ▸ I.zero_mem⟩
4848
4949/-- `CharP.quotient'` as an `Iff`. -/
50- theorem quotient_iff {R : Type *} [CommRing R] (n : ℕ) [CharP R n] (I : Ideal R) :
50+ theorem quotient_iff (n : ℕ) [CharP R n] (I : Ideal R) :
5151 CharP (R ⧸ I) n ↔ ∀ x : ℕ, ↑x ∈ I → (x : R) = 0 := by
5252 refine ⟨fun _ x hx => ?_, CharP.quotient' n I⟩
5353 rw [CharP.cast_eq_zero_iff R n, ← CharP.cast_eq_zero_iff (R ⧸ I) n _]
5454 exact (Submodule.Quotient.mk_eq_zero I).mpr hx
5555
5656/-- `CharP.quotient_iff`, but stated in terms of inclusions of ideals. -/
57- theorem quotient_iff_le_ker_natCast {R : Type *} [CommRing R] (n : ℕ) [CharP R n] (I : Ideal R) :
57+ theorem quotient_iff_le_ker_natCast (n : ℕ) [CharP R n] (I : Ideal R) :
5858 CharP (R ⧸ I) n ↔ I.comap (Nat.castRingHom R) ≤ RingHom.ker (Nat.castRingHom R) := by
5959 rw [CharP.quotient_iff, RingHom.ker_eq_comap_bot]; rfl
6060
6161end CharP
6262
63- theorem Ideal.Quotient.index_eq_zero {R : Type *} [CommRing R] (I : Ideal R) :
64- (↑I.toAddSubgroup.index : R ⧸ I) = 0 := by
63+ lemma Ideal.natCast_mem_of_charP_quotient (p : ℕ) (I : Ideal R) [CharP (R ⧸ I) p] :
64+ (p : R) ∈ I :=
65+ Ideal.Quotient.eq_zero_iff_mem.mp <| by simp
66+
67+ theorem Ideal.Quotient.index_eq_zero (I : Ideal R) : (↑I.toAddSubgroup.index : R ⧸ I) = 0 := by
6568 rw [AddSubgroup.index, Nat.card_eq]
6669 split_ifs with hq; swap
6770 · simp
0 commit comments