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
  

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)
⊢ jacobson I = I

Next tactic:
let i : R →+* R' := ((Quotient.mk I).comp C).rangeRestrict
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
  

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)
⊢ jacobson I = I

Next tactic:
have hi : Function.Surjective ↑i := ((Quotient.mk I).comp C).rangeRestrict_surjective
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
  

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
⊢ jacobson I = I

Next tactic:
have hi' : RingHom.ker (mapRingHom i) ≤ I
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
  · 

Proof state:
case hi'
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
⊢ RingHom.ker (mapRingHom i) ≤ I

Next tactic:
intro f hf
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
    

Proof state:
case hi'
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
f : R[X]
hf : f ∈ RingHom.ker (mapRingHom i)
⊢ f ∈ I

Next tactic:
apply polynomial_mem_ideal_of_coeff_mem_ideal I f
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
    

Proof state:
case hi'
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
f : R[X]
hf : f ∈ RingHom.ker (mapRingHom i)
⊢ ∀ (n : ℕ), coeff f n ∈ comap C I

Next tactic:
intro n
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
    

Proof state:
case hi'
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
f : R[X]
hf : f ∈ RingHom.ker (mapRingHom i)
n : ℕ
⊢ coeff f n ∈ comap C I

Next tactic:
replace hf := congrArg (fun g : Polynomial ((Quotient.mk I).comp C).range => g.coeff n) hf
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
    

Proof state:
case hi'
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
f : R[X]
n : ℕ
hf : (fun g => coeff g n) ((mapRingHom i) f) = (fun g => coeff g n) 0
⊢ coeff f n ∈ comap C I

Next tactic:
change (Polynomial.map ((Quotient.mk I).comp C).rangeRestrict f).coeff n = 0 at hf
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
    

Proof state:
case hi'
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
f : R[X]
n : ℕ
hf : coeff (Polynomial.map (RingHom.rangeRestrict (RingHom.comp (Quotient.mk I) C)) f) n = 0
⊢ coeff f n ∈ comap C I

Next tactic:
rw [coeff_map, Subtype.ext_iff] at hf
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
    

Proof state:
case hi'
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
f : R[X]
n : ℕ
hf : ↑((RingHom.rangeRestrict (RingHom.comp (Quotient.mk I) C)) (coeff f n)) = ↑0
⊢ coeff f n ∈ comap C I

Next tactic:
rwa [mem_comap, ← Quotient.eq_zero_iff_mem, ← RingHom.comp_apply]
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]
  

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
⊢ jacobson I = I

Next tactic:
have R'_jacob : IsJacobson R' := isJacobson_of_surjective ⟨i, 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⟩
  

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'
⊢ jacobson I = I

Next tactic:
let J := map (mapRingHom i) I
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`
  

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
⊢ jacobson I = I

Next tactic:
have h_surj : Function.Surjective (mapRingHom i) := Polynomial.map_surjective i 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
  

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)
⊢ jacobson I = I

Next tactic:
have : IsPrime J := map_isPrime_of_surjective h_surj 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'
  

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
⊢ jacobson I = I

Next tactic:
suffices h : J.jacobson = 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
  · 

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 J = J
⊢ jacobson I = I

Next tactic:
replace h := congrArg (comap (Polynomial.mapRingHom i)) h
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
    

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 : comap (mapRingHom i) (jacobson J) = comap (mapRingHom i) J
⊢ jacobson I = I

Next tactic:
rw [← map_jacobson_of_surjective h_surj hi', comap_map_of_surjective _ h_surj,
      comap_map_of_surjective _ h_surj] at h
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
    

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:
refine le_antisymm ?_ le_jacobson