l3lab/ntp-mathlib huggingface dataset:
theorem isJacobson_polynomial_of_isJacobson (hR : IsJacobson R) : IsJacobson R[X] := by
  rw [isJacobson_iff_prime_eq]
  intro I hI
  let R' : Subring (R[X] ⧸ I) := ((Quotient.mk I).comp C).range
  let i : R →+* R' := ((Quotient.mk I).comp C).rangeRestrict
  have hi : Function.Surjective ↑i := ((Quotient.mk I).comp C).rangeRestrict_surjective
  have hi' : RingHom.ker (mapRingHom i) ≤ I
  · intro f hf
    apply polynomial_mem_ideal_of_coeff_mem_ideal I f
    intro n
    replace hf := congrArg (fun g : Polynomial ((Quotient.mk I).comp C).range => g.coeff n) hf
    change (Polynomial.map ((Quotient.mk I).comp C).rangeRestrict f).coeff n = 0 at hf
    rw [coeff_map, Subtype.ext_iff] at hf
    rwa [mem_comap, ← Quotient.eq_zero_iff_mem, ← RingHom.comp_apply]
  have R'_jacob : IsJacobson R' := isJacobson_of_surjective ⟨i, hi⟩
  let J := map (mapRingHom i) I
  -- Porting note: moved ↓ this up a few lines, so that it can be used in the `have`
  have h_surj : Function.Surjective (mapRingHom i) := Polynomial.map_surjective i hi
  have : IsPrime J := map_isPrime_of_surjective h_surj hi'
  suffices h : J.jacobson = J
  · replace h := congrArg (comap (Polynomial.mapRingHom i)) h
    rw [← map_jacobson_of_surjective h_surj hi', comap_map_of_surjective _ h_surj,
      comap_map_of_surjective _ h_surj] at h
    refine le_antisymm ?_ le_jacobson
    

Proof state:
R : Type u_1
S : Type u_2
inst✝⁴ : CommRing R
inst✝³ : CommRing S
inst✝² : IsDomain S
Rₘ : Type u_3
Sₘ : Type u_4
inst✝¹ : CommRing Rₘ
inst✝ : CommRing Sₘ
hR : IsJacobson R
I : Ideal R[X]
hI : IsPrime I
R' : Subring (R[X] ⧸ I) := RingHom.range (RingHom.comp (Quotient.mk I) C)
i : R →+* ↥R' := RingHom.rangeRestrict (RingHom.comp (Quotient.mk I) C)
hi : Function.Surjective ⇑i
hi' : RingHom.ker (mapRingHom i) ≤ I
R'_jacob : IsJacobson ↥R'
J : Ideal (↥R')[X] := map (mapRingHom i) I
h_surj : Function.Surjective ⇑(mapRingHom i)
this : IsPrime J
h : jacobson I ⊔ comap (mapRingHom i) ⊥ = I ⊔ comap (mapRingHom i) ⊥
⊢ jacobson I ≤ I

Next tactic:
exact le_trans (le_sup_of_le_left le_rfl) (le_trans (le_of_eq h) (sup_le le_rfl hi'))
theorem isJacobson_polynomial_of_isJacobson (hR : IsJacobson R) : IsJacobson R[X] := by
  rw [isJacobson_iff_prime_eq]
  intro I hI
  let R' : Subring (R[X] ⧸ I) := ((Quotient.mk I).comp C).range
  let i : R →+* R' := ((Quotient.mk I).comp C).rangeRestrict
  have hi : Function.Surjective ↑i := ((Quotient.mk I).comp C).rangeRestrict_surjective
  have hi' : RingHom.ker (mapRingHom i) ≤ I
  · intro f hf
    apply polynomial_mem_ideal_of_coeff_mem_ideal I f
    intro n
    replace hf := congrArg (fun g : Polynomial ((Quotient.mk I).comp C).range => g.coeff n) hf
    change (Polynomial.map ((Quotient.mk I).comp C).rangeRestrict f).coeff n = 0 at hf
    rw [coeff_map, Subtype.ext_iff] at hf
    rwa [mem_comap, ← Quotient.eq_zero_iff_mem, ← RingHom.comp_apply]
  have R'_jacob : IsJacobson R' := isJacobson_of_surjective ⟨i, hi⟩
  let J := map (mapRingHom i) I
  -- Porting note: moved ↓ this up a few lines, so that it can be used in the `have`
  have h_surj : Function.Surjective (mapRingHom i) := Polynomial.map_surjective i hi
  have : IsPrime J := map_isPrime_of_surjective h_surj hi'
  suffices h : J.jacobson = J
  · replace h := congrArg (comap (Polynomial.mapRingHom i)) h
    rw [← map_jacobson_of_surjective h_surj hi', comap_map_of_surjective _ h_surj,
      comap_map_of_surjective _ h_surj] at h
    refine le_antisymm ?_ le_jacobson
    exact le_trans (le_sup_of_le_left le_rfl) (le_trans (le_of_eq h) (sup_le le_rfl hi'))
  

Proof state:
case h
R : Type u_1
S : Type u_2
inst✝⁴ : CommRing R
inst✝³ : CommRing S
inst✝² : IsDomain S
Rₘ : Type u_3
Sₘ : Type u_4
inst✝¹ : CommRing Rₘ
inst✝ : CommRing Sₘ
hR : IsJacobson R
I : Ideal R[X]
hI : IsPrime I
R' : Subring (R[X] ⧸ I) := RingHom.range (RingHom.comp (Quotient.mk I) C)
i : R →+* ↥R' := RingHom.rangeRestrict (RingHom.comp (Quotient.mk I) C)
hi : Function.Surjective ⇑i
hi' : RingHom.ker (mapRingHom i) ≤ I
R'_jacob : IsJacobson ↥R'
J : Ideal (↥R')[X] := map (mapRingHom i) I
h_surj : Function.Surjective ⇑(mapRingHom i)
this : IsPrime J
⊢ jacobson J = J

Next tactic:
apply isJacobson_polynomial_of_domain R' J
theorem isJacobson_polynomial_of_isJacobson (hR : IsJacobson R) : IsJacobson R[X] := by
  rw [isJacobson_iff_prime_eq]
  intro I hI
  let R' : Subring (R[X] ⧸ I) := ((Quotient.mk I).comp C).range
  let i : R →+* R' := ((Quotient.mk I).comp C).rangeRestrict
  have hi : Function.Surjective ↑i := ((Quotient.mk I).comp C).rangeRestrict_surjective
  have hi' : RingHom.ker (mapRingHom i) ≤ I
  · intro f hf
    apply polynomial_mem_ideal_of_coeff_mem_ideal I f
    intro n
    replace hf := congrArg (fun g : Polynomial ((Quotient.mk I).comp C).range => g.coeff n) hf
    change (Polynomial.map ((Quotient.mk I).comp C).rangeRestrict f).coeff n = 0 at hf
    rw [coeff_map, Subtype.ext_iff] at hf
    rwa [mem_comap, ← Quotient.eq_zero_iff_mem, ← RingHom.comp_apply]
  have R'_jacob : IsJacobson R' := isJacobson_of_surjective ⟨i, hi⟩
  let J := map (mapRingHom i) I
  -- Porting note: moved ↓ this up a few lines, so that it can be used in the `have`
  have h_surj : Function.Surjective (mapRingHom i) := Polynomial.map_surjective i hi
  have : IsPrime J := map_isPrime_of_surjective h_surj hi'
  suffices h : J.jacobson = J
  · replace h := congrArg (comap (Polynomial.mapRingHom i)) h
    rw [← map_jacobson_of_surjective h_surj hi', comap_map_of_surjective _ h_surj,
      comap_map_of_surjective _ h_surj] at h
    refine le_antisymm ?_ le_jacobson
    exact le_trans (le_sup_of_le_left le_rfl) (le_trans (le_of_eq h) (sup_le le_rfl hi'))
  apply isJacobson_polynomial_of_domain R' J
  

Proof state:
case h
R : Type u_1
S : Type u_2
inst✝⁴ : CommRing R
inst✝³ : CommRing S
inst✝² : IsDomain S
Rₘ : Type u_3
Sₘ : Type u_4
inst✝¹ : CommRing Rₘ
inst✝ : CommRing Sₘ
hR : IsJacobson R
I : Ideal R[X]
hI : IsPrime I
R' : Subring (R[X] ⧸ I) := RingHom.range (RingHom.comp (Quotient.mk I) C)
i : R →+* ↥R' := RingHom.rangeRestrict (RingHom.comp (Quotient.mk I) C)
hi : Function.Surjective ⇑i
hi' : RingHom.ker (mapRingHom i) ≤ I
R'_jacob : IsJacobson ↥R'
J : Ideal (↥R')[X] := map (mapRingHom i) I
h_surj : Function.Surjective ⇑(mapRingHom i)
this : IsPrime J
⊢ ∀ (x : ↥R'), C x ∈ J → x = 0

Next tactic:
exact (eq_zero_of_polynomial_mem_map_range I)
theorem isJacobson_polynomial_iff_isJacobson : IsJacobson R[X] ↔ IsJacobson R := by
  

Proof state:
R : Type u_1
S : Type u_2
inst✝⁴ : CommRing R
inst✝³ : CommRing S
inst✝² : IsDomain S
Rₘ : Type u_3
Sₘ : Type u_4
inst✝¹ : CommRing Rₘ
inst✝ : CommRing Sₘ
⊢ IsJacobson R[X] ↔ IsJacobson R

Next tactic:
refine' ⟨_, isJacobson_polynomial_of_isJacobson⟩
theorem isJacobson_polynomial_iff_isJacobson : IsJacobson R[X] ↔ IsJacobson R := by
  refine' ⟨_, isJacobson_polynomial_of_isJacobson⟩
  

Proof state:
R : Type u_1
S : Type u_2
inst✝⁴ : CommRing R
inst✝³ : CommRing S
inst✝² : IsDomain S
Rₘ : Type u_3
Sₘ : Type u_4
inst✝¹ : CommRing Rₘ
inst✝ : CommRing Sₘ
⊢ IsJacobson R[X] → IsJacobson R

Next tactic:
intro H
theorem isJacobson_polynomial_iff_isJacobson : IsJacobson R[X] ↔ IsJacobson R := by
  refine' ⟨_, isJacobson_polynomial_of_isJacobson⟩
  intro H
  

Proof state:
R : Type u_1
S : Type u_2
inst✝⁴ : CommRing R
inst✝³ : CommRing S
inst✝² : IsDomain S
Rₘ : Type u_3
Sₘ : Type u_4
inst✝¹ : CommRing Rₘ
inst✝ : CommRing Sₘ
H : IsJacobson R[X]
⊢ IsJacobson R

Next tactic:
exact isJacobson_of_surjective ⟨eval₂RingHom (RingHom.id _) 1, fun x =>
    ⟨C x, by simp only [coe_eval₂RingHom, RingHom.id_apply, eval₂_C]⟩⟩
theorem isJacobson_polynomial_iff_isJacobson : IsJacobson R[X] ↔ IsJacobson R := by
  refine' ⟨_, isJacobson_polynomial_of_isJacobson⟩
  intro H
  exact isJacobson_of_surjective ⟨eval₂RingHom (RingHom.id _) 1, fun x =>
    ⟨C x, by 

Proof state:
R : Type u_1
S : Type u_2
inst✝⁴ : CommRing R
inst✝³ : CommRing S
inst✝² : IsDomain S
Rₘ : Type u_3
Sₘ : Type u_4
inst✝¹ : CommRing Rₘ
inst✝ : CommRing Sₘ
H : IsJacobson R[X]
x : R
⊢ (eval₂RingHom (RingHom.id R) 1) (C x) = x

Next tactic:
simp only [coe_eval₂RingHom, RingHom.id_apply, eval₂_C]
theorem isMaximal_comap_C_of_isMaximal [Nontrivial R] (hP' : ∀ x : R, C x ∈ P → x = 0) :
    IsMaximal (comap (C : R →+* R[X]) P : Ideal R) := by
  

Proof state:
R : Type u_1
inst✝² : CommRing R
inst✝¹ : IsJacobson R
P : Ideal R[X]
hP : IsMaximal P
inst✝ : Nontrivial R
hP' : ∀ (x : R), C x ∈ P → x = 0
⊢ IsMaximal (comap C P)

Next tactic:
let P' := comap (C : R →+* R[X]) P
theorem isMaximal_comap_C_of_isMaximal [Nontrivial R] (hP' : ∀ x : R, C x ∈ P → x = 0) :
    IsMaximal (comap (C : R →+* R[X]) P : Ideal R) := by
  let P' := comap (C : R →+* R[X]) P
  

Proof state:
R : Type u_1
inst✝² : CommRing R
inst✝¹ : IsJacobson R
P : Ideal R[X]
hP : IsMaximal P
inst✝ : Nontrivial R
hP' : ∀ (x : R), C x ∈ P → x = 0
P' : Ideal R := comap C P
⊢ IsMaximal (comap C P)

Next tactic:
haveI hP'_prime : P'.IsPrime := comap_isPrime C P
theorem isMaximal_comap_C_of_isMaximal [Nontrivial R] (hP' : ∀ x : R, C x ∈ P → x = 0) :
    IsMaximal (comap (C : R →+* R[X]) P : Ideal R) := by
  let P' := comap (C : R →+* R[X]) P
  haveI hP'_prime : P'.IsPrime := comap_isPrime C P
  

Proof state:
R : Type u_1
inst✝² : CommRing R
inst✝¹ : IsJacobson R
P : Ideal R[X]
hP : IsMaximal P
inst✝ : Nontrivial R
hP' : ∀ (x : R), C x ∈ P → x = 0
P' : Ideal R := comap C P
hP'_prime : IsPrime P'
⊢ IsMaximal (comap C P)

Next tactic:
obtain ⟨⟨m, hmem_P⟩, hm⟩ :=
    Submodule.nonzero_mem_of_bot_lt (bot_lt_of_maximal P polynomial_not_isField)
theorem isMaximal_comap_C_of_isMaximal [Nontrivial R] (hP' : ∀ x : R, C x ∈ P → x = 0) :
    IsMaximal (comap (C : R →+* R[X]) P : Ideal R) := by
  let P' := comap (C : R →+* R[X]) P
  haveI hP'_prime : P'.IsPrime := comap_isPrime C P
  obtain ⟨⟨m, hmem_P⟩, hm⟩ :=
    Submodule.nonzero_mem_of_bot_lt (bot_lt_of_maximal P polynomial_not_isField)
  

Proof state:
case intro.mk
R : Type u_1
inst✝² : CommRing R
inst✝¹ : IsJacobson R
P : Ideal R[X]
hP : IsMaximal P
inst✝ : Nontrivial R
hP' : ∀ (x : R), C x ∈ P → x = 0
P' : Ideal R := comap C P
hP'_prime : IsPrime P'
m : R[X]
hmem_P : m ∈ P
hm : { val := m, property := hmem_P } ≠ 0
⊢ IsMaximal (comap C P)

Next tactic:
have hm' : m ≠ 0 := by
    simpa [Submodule.coe_eq_zero] using hm
theorem isMaximal_comap_C_of_isMaximal [Nontrivial R] (hP' : ∀ x : R, C x ∈ P → x = 0) :
    IsMaximal (comap (C : R →+* R[X]) P : Ideal R) := by
  let P' := comap (C : R →+* R[X]) P
  haveI hP'_prime : P'.IsPrime := comap_isPrime C P
  obtain ⟨⟨m, hmem_P⟩, hm⟩ :=
    Submodule.nonzero_mem_of_bot_lt (bot_lt_of_maximal P polynomial_not_isField)
  have hm' : m ≠ 0 := by
    

Proof state:
R : Type u_1
inst✝² : CommRing R
inst✝¹ : IsJacobson R
P : Ideal R[X]
hP : IsMaximal P
inst✝ : Nontrivial R
hP' : ∀ (x : R), C x ∈ P → x = 0
P' : Ideal R := comap C P
hP'_prime : IsPrime P'
m : R[X]
hmem_P : m ∈ P
hm : { val := m, property := hmem_P } ≠ 0
⊢ m ≠ 0

Next tactic:
simpa [Submodule.coe_eq_zero] using hm
theorem isMaximal_comap_C_of_isMaximal [Nontrivial R] (hP' : ∀ x : R, C x ∈ P → x = 0) :
    IsMaximal (comap (C : R →+* R[X]) P : Ideal R) := by
  let P' := comap (C : R →+* R[X]) P
  haveI hP'_prime : P'.IsPrime := comap_isPrime C P
  obtain ⟨⟨m, hmem_P⟩, hm⟩ :=
    Submodule.nonzero_mem_of_bot_lt (bot_lt_of_maximal P polynomial_not_isField)
  have hm' : m ≠ 0 := by
    simpa [Submodule.coe_eq_zero] using hm
  

Proof state:
case intro.mk
R : Type u_1
inst✝² : CommRing R
inst✝¹ : IsJacobson R
P : Ideal R[X]
hP : IsMaximal P
inst✝ : Nontrivial R
hP' : ∀ (x : R), C x ∈ P → x = 0
P' : Ideal R := comap C P
hP'_prime : IsPrime P'
m : R[X]
hmem_P : m ∈ P
hm : { val := m, property := hmem_P } ≠ 0
hm' : m ≠ 0
⊢ IsMaximal (comap C P)

Next tactic:
let φ : R ⧸ P' →+* R[X] ⧸ P := quotientMap P (C : R →+* R[X]) le_rfl
theorem isMaximal_comap_C_of_isMaximal [Nontrivial R] (hP' : ∀ x : R, C x ∈ P → x = 0) :
    IsMaximal (comap (C : R →+* R[X]) P : Ideal R) := by
  let P' := comap (C : R →+* R[X]) P
  haveI hP'_prime : P'.IsPrime := comap_isPrime C P
  obtain ⟨⟨m, hmem_P⟩, hm⟩ :=
    Submodule.nonzero_mem_of_bot_lt (bot_lt_of_maximal P polynomial_not_isField)
  have hm' : m ≠ 0 := by
    simpa [Submodule.coe_eq_zero] using hm
  let φ : R ⧸ P' →+* R[X] ⧸ P := quotientMap P (C : R →+* R[X]) le_rfl
  

Proof state:
case intro.mk
R : Type u_1
inst✝² : CommRing R
inst✝¹ : IsJacobson R
P : Ideal R[X]
hP : IsMaximal P
inst✝ : Nontrivial R
hP' : ∀ (x : R), C x ∈ P → x = 0
P' : Ideal R := comap C P
hP'_prime : IsPrime P'
m : R[X]
hmem_P : m ∈ P
hm : { val := m, property := hmem_P } ≠ 0
hm' : m ≠ 0
φ : R ⧸ P' →+* R[X] ⧸ P := quotientMap P C (_ : P' ≤ P')
⊢ IsMaximal (comap C P)

Next tactic:
let a : R ⧸ P' := (m.map (Quotient.mk P')).leadingCoeff
theorem isMaximal_comap_C_of_isMaximal [Nontrivial R] (hP' : ∀ x : R, C x ∈ P → x = 0) :
    IsMaximal (comap (C : R →+* R[X]) P : Ideal R) := by
  let P' := comap (C : R →+* R[X]) P
  haveI hP'_prime : P'.IsPrime := comap_isPrime C P
  obtain ⟨⟨m, hmem_P⟩, hm⟩ :=
    Submodule.nonzero_mem_of_bot_lt (bot_lt_of_maximal P polynomial_not_isField)
  have hm' : m ≠ 0 := by
    simpa [Submodule.coe_eq_zero] using hm
  let φ : R ⧸ P' →+* R[X] ⧸ P := quotientMap P (C : R →+* R[X]) le_rfl
  let a : R ⧸ P' := (m.map (Quotient.mk P')).leadingCoeff
  

Proof state:
case intro.mk
R : Type u_1
inst✝² : CommRing R
inst✝¹ : IsJacobson R
P : Ideal R[X]
hP : IsMaximal P
inst✝ : Nontrivial R
hP' : ∀ (x : R), C x ∈ P → x = 0
P' : Ideal R := comap C P
hP'_prime : IsPrime P'
m : R[X]
hmem_P : m ∈ P
hm : { val := m, property := hmem_P } ≠ 0
hm' : m ≠ 0
φ : R ⧸ P' →+* R[X] ⧸ P := quotientMap P C (_ : P' ≤ P')
a : R ⧸ P' := Polynomial.leadingCoeff (Polynomial.map (Quotient.mk P') m)
⊢ IsMaximal (comap C P)

Next tactic:
let M : Submonoid (R ⧸ P') := Submonoid.powers a
theorem isMaximal_comap_C_of_isMaximal [Nontrivial R] (hP' : ∀ x : R, C x ∈ P → x = 0) :
    IsMaximal (comap (C : R →+* R[X]) P : Ideal R) := by
  let P' := comap (C : R →+* R[X]) P
  haveI hP'_prime : P'.IsPrime := comap_isPrime C P
  obtain ⟨⟨m, hmem_P⟩, hm⟩ :=
    Submodule.nonzero_mem_of_bot_lt (bot_lt_of_maximal P polynomial_not_isField)
  have hm' : m ≠ 0 := by
    simpa [Submodule.coe_eq_zero] using hm
  let φ : R ⧸ P' →+* R[X] ⧸ P := quotientMap P (C : R →+* R[X]) le_rfl
  let a : R ⧸ P' := (m.map (Quotient.mk P')).leadingCoeff
  let M : Submonoid (R ⧸ P') := Submonoid.powers a
  

Proof state:
case intro.mk
R : Type u_1
inst✝² : CommRing R
inst✝¹ : IsJacobson R
P : Ideal R[X]
hP : IsMaximal P
inst✝ : Nontrivial R
hP' : ∀ (x : R), C x ∈ P → x = 0
P' : Ideal R := comap C P
hP'_prime : IsPrime P'
m : R[X]
hmem_P : m ∈ P
hm : { val := m, property := hmem_P } ≠ 0
hm' : m ≠ 0
φ : R ⧸ P' →+* R[X] ⧸ P := quotientMap P C (_ : P' ≤ P')
a : R ⧸ P' := Polynomial.leadingCoeff (Polynomial.map (Quotient.mk P') m)
M : Submonoid (R ⧸ P') := Submonoid.powers a
⊢ IsMaximal (comap C P)

Next tactic:
rw [← bot_quotient_isMaximal_iff]
theorem isMaximal_comap_C_of_isMaximal [Nontrivial R] (hP' : ∀ x : R, C x ∈ P → x = 0) :
    IsMaximal (comap (C : R →+* R[X]) P : Ideal R) := by
  let P' := comap (C : R →+* R[X]) P
  haveI hP'_prime : P'.IsPrime := comap_isPrime C P
  obtain ⟨⟨m, hmem_P⟩, hm⟩ :=
    Submodule.nonzero_mem_of_bot_lt (bot_lt_of_maximal P polynomial_not_isField)
  have hm' : m ≠ 0 := by
    simpa [Submodule.coe_eq_zero] using hm
  let φ : R ⧸ P' →+* R[X] ⧸ P := quotientMap P (C : R →+* R[X]) le_rfl
  let a : R ⧸ P' := (m.map (Quotient.mk P')).leadingCoeff
  let M : Submonoid (R ⧸ P') := Submonoid.powers a
  rw [← bot_quotient_isMaximal_iff]
  

Proof state:
case intro.mk
R : Type u_1
inst✝² : CommRing R
inst✝¹ : IsJacobson R
P : Ideal R[X]
hP : IsMaximal P
inst✝ : Nontrivial R
hP' : ∀ (x : R), C x ∈ P → x = 0
P' : Ideal R := comap C P
hP'_prime : IsPrime P'
m : R[X]
hmem_P : m ∈ P
hm : { val := m, property := hmem_P } ≠ 0
hm' : m ≠ 0
φ : R ⧸ P' →+* R[X] ⧸ P := quotientMap P C (_ : P' ≤ P')
a : R ⧸ P' := Polynomial.leadingCoeff (Polynomial.map (Quotient.mk P') m)
M : Submonoid (R ⧸ P') := Submonoid.powers a
⊢ IsMaximal ⊥

Next tactic:
have hp0 : a ≠ 0 := fun hp0' =>
    hm' <| map_injective (Quotient.mk (P.comap (C : R →+* R[X]) : Ideal R))
      ((injective_iff_map_eq_zero (Quotient.mk (P.comap (C : R →+* R[X]) : Ideal R))).2
        fun x hx => by
          rwa [Quotient.eq_zero_iff_mem, (by rwa [eq_bot_iff] : (P.comap C : Ideal R) = ⊥)] at hx)
        (by simpa only [leadingCoeff_eq_zero, Polynomial.map_zero] using hp0')
theorem isMaximal_comap_C_of_isMaximal [Nontrivial R] (hP' : ∀ x : R, C x ∈ P → x = 0) :
    IsMaximal (comap (C : R →+* R[X]) P : Ideal R) := by
  let P' := comap (C : R →+* R[X]) P
  haveI hP'_prime : P'.IsPrime := comap_isPrime C P
  obtain ⟨⟨m, hmem_P⟩, hm⟩ :=
    Submodule.nonzero_mem_of_bot_lt (bot_lt_of_maximal P polynomial_not_isField)
  have hm' : m ≠ 0 := by
    simpa [Submodule.coe_eq_zero] using hm
  let φ : R ⧸ P' →+* R[X] ⧸ P := quotientMap P (C : R →+* R[X]) le_rfl
  let a : R ⧸ P' := (m.map (Quotient.mk P')).leadingCoeff
  let M : Submonoid (R ⧸ P') := Submonoid.powers a
  rw [← bot_quotient_isMaximal_iff]
  have hp0 : a ≠ 0 := fun hp0' =>
    hm' <| map_injective (Quotient.mk (P.comap (C : R →+* R[X]) : Ideal R))
      ((injective_iff_map_eq_zero (Quotient.mk (P.comap (C : R →+* R[X]) : Ideal R))).2
        fun x hx => by
          

Proof state:
R : Type u_1
inst✝² : CommRing R
inst✝¹ : IsJacobson R
P : Ideal R[X]
hP : IsMaximal P
inst✝ : Nontrivial R
hP' : ∀ (x : R), C x ∈ P → x = 0
P' : Ideal R := comap C P
hP'_prime : IsPrime P'
m : R[X]
hmem_P : m ∈ P
hm : { val := m, property := hmem_P } ≠ 0
hm' : m ≠ 0
φ : R ⧸ P' →+* R[X] ⧸ P := quotientMap P C (_ : P' ≤ P')
a : R ⧸ P' := Polynomial.leadingCoeff (Polynomial.map (Quotient.mk P') m)
M : Submonoid (R ⧸ P') := Submonoid.powers a
hp0' : a = 0
x : R
hx : (Quotient.mk (comap C P)) x = 0
⊢ x = 0

Next tactic:
rwa [Quotient.eq_zero_iff_mem, (by rwa [eq_bot_iff] : (P.comap C : Ideal R) = ⊥)] at hx
theorem isMaximal_comap_C_of_isMaximal [Nontrivial R] (hP' : ∀ x : R, C x ∈ P → x = 0) :
    IsMaximal (comap (C : R →+* R[X]) P : Ideal R) := by
  let P' := comap (C : R →+* R[X]) P
  haveI hP'_prime : P'.IsPrime := comap_isPrime C P
  obtain ⟨⟨m, hmem_P⟩, hm⟩ :=
    Submodule.nonzero_mem_of_bot_lt (bot_lt_of_maximal P polynomial_not_isField)
  have hm' : m ≠ 0 := by
    simpa [Submodule.coe_eq_zero] using hm
  let φ : R ⧸ P' →+* R[X] ⧸ P := quotientMap P (C : R →+* R[X]) le_rfl
  let a : R ⧸ P' := (m.map (Quotient.mk P')).leadingCoeff
  let M : Submonoid (R ⧸ P') := Submonoid.powers a
  rw [← bot_quotient_isMaximal_iff]
  have hp0 : a ≠ 0 := fun hp0' =>
    hm' <| map_injective (Quotient.mk (P.comap (C : R →+* R[X]) : Ideal R))
      ((injective_iff_map_eq_zero (Quotient.mk (P.comap (C : R →+* R[X]) : Ideal R))).2
        fun x hx => by
          rwa [Quotient.eq_zero_iff_mem, (by 

Proof state:
R : Type u_1
inst✝² : CommRing R
inst✝¹ : IsJacobson R
P : Ideal R[X]
hP : IsMaximal P
inst✝ : Nontrivial R
hP' : ∀ (x : R), C x ∈ P → x = 0
P' : Ideal R := comap C P
hP'_prime : IsPrime P'
m : R[X]
hmem_P : m ∈ P
hm : { val := m, property := hmem_P } ≠ 0
hm' : m ≠ 0
φ : R ⧸ P' →+* R[X] ⧸ P := quotientMap P C (_ : P' ≤ P')
a : R ⧸ P' := Polynomial.leadingCoeff (Polynomial.map (Quotient.mk P') m)
M : Submonoid (R ⧸ P') := Submonoid.powers a
hp0' : a = 0
x : R
hx : x ∈ comap C P
⊢ comap C P = ⊥

Next tactic:
rwa [eq_bot_iff]
theorem isMaximal_comap_C_of_isMaximal [Nontrivial R] (hP' : ∀ x : R, C x ∈ P → x = 0) :
    IsMaximal (comap (C : R →+* R[X]) P : Ideal R) := by
  let P' := comap (C : R →+* R[X]) P
  haveI hP'_prime : P'.IsPrime := comap_isPrime C P
  obtain ⟨⟨m, hmem_P⟩, hm⟩ :=
    Submodule.nonzero_mem_of_bot_lt (bot_lt_of_maximal P polynomial_not_isField)
  have hm' : m ≠ 0 := by
    simpa [Submodule.coe_eq_zero] using hm
  let φ : R ⧸ P' →+* R[X] ⧸ P := quotientMap P (C : R →+* R[X]) le_rfl
  let a : R ⧸ P' := (m.map (Quotient.mk P')).leadingCoeff
  let M : Submonoid (R ⧸ P') := Submonoid.powers a
  rw [← bot_quotient_isMaximal_iff]
  have hp0 : a ≠ 0 := fun hp0' =>
    hm' <| map_injective (Quotient.mk (P.comap (C : R →+* R[X]) : Ideal R))
      ((injective_iff_map_eq_zero (Quotient.mk (P.comap (C : R →+* R[X]) : Ideal R))).2
        fun x hx => by
          rwa [Quotient.eq_zero_iff_mem, (by rwa [eq_bot_iff] : (P.comap C : Ideal R) = ⊥)] at hx)
        (by 

Proof state:
R : Type u_1
inst✝² : CommRing R
inst✝¹ : IsJacobson R
P : Ideal R[X]
hP : IsMaximal P
inst✝ : Nontrivial R
hP' : ∀ (x : R), C x ∈ P → x = 0
P' : Ideal R := comap C P
hP'_prime : IsPrime P'
m : R[X]
hmem_P : m ∈ P
hm : { val := m, property := hmem_P } ≠ 0
hm' : m ≠ 0
φ : R ⧸ P' →+* R[X] ⧸ P := quotientMap P C (_ : P' ≤ P')
a : R ⧸ P' := Polynomial.leadingCoeff (Polynomial.map (Quotient.mk P') m)
M : Submonoid (R ⧸ P') := Submonoid.powers a
hp0' : a = 0
⊢ Polynomial.map (Quotient.mk (comap C P)) m = Polynomial.map (Quotient.mk (comap C P)) 0

Next tactic:
simpa only [leadingCoeff_eq_zero, Polynomial.map_zero] using hp0'
theorem isMaximal_comap_C_of_isMaximal [Nontrivial R] (hP' : ∀ x : R, C x ∈ P → x = 0) :
    IsMaximal (comap (C : R →+* R[X]) P : Ideal R) := by
  let P' := comap (C : R →+* R[X]) P
  haveI hP'_prime : P'.IsPrime := comap_isPrime C P
  obtain ⟨⟨m, hmem_P⟩, hm⟩ :=
    Submodule.nonzero_mem_of_bot_lt (bot_lt_of_maximal P polynomial_not_isField)
  have hm' : m ≠ 0 := by
    simpa [Submodule.coe_eq_zero] using hm
  let φ : R ⧸ P' →+* R[X] ⧸ P := quotientMap P (C : R →+* R[X]) le_rfl
  let a : R ⧸ P' := (m.map (Quotient.mk P')).leadingCoeff
  let M : Submonoid (R ⧸ P') := Submonoid.powers a
  rw [← bot_quotient_isMaximal_iff]
  have hp0 : a ≠ 0 := fun hp0' =>
    hm' <| map_injective (Quotient.mk (P.comap (C : R →+* R[X]) : Ideal R))
      ((injective_iff_map_eq_zero (Quotient.mk (P.comap (C : R →+* R[X]) : Ideal R))).2
        fun x hx => by
          rwa [Quotient.eq_zero_iff_mem, (by rwa [eq_bot_iff] : (P.comap C : Ideal R) = ⊥)] at hx)
        (by simpa only [leadingCoeff_eq_zero, Polynomial.map_zero] using hp0')
  

Proof state:
case intro.mk
R : Type u_1
inst✝² : CommRing R
inst✝¹ : IsJacobson R
P : Ideal R[X]
hP : IsMaximal P
inst✝ : Nontrivial R
hP' : ∀ (x : R), C x ∈ P → x = 0
P' : Ideal R := comap C P
hP'_prime : IsPrime P'
m : R[X]
hmem_P : m ∈ P
hm : { val := m, property := hmem_P } ≠ 0
hm' : m ≠ 0
φ : R ⧸ P' →+* R[X] ⧸ P := quotientMap P C (_ : P' ≤ P')
a : R ⧸ P' := Polynomial.leadingCoeff (Polynomial.map (Quotient.mk P') m)
M : Submonoid (R ⧸ P') := Submonoid.powers a
hp0 : a ≠ 0
⊢ IsMaximal ⊥

Next tactic:
have hM : (0 : R ⧸ P') ∉ M := fun ⟨n, hn⟩ => hp0 (pow_eq_zero hn)