l3lab/ntp-mathlib huggingface dataset:
/-- If `S` is the localization of the Jacobson ring `R` at the submonoid generated by `y : R`, then
`S` is Jacobson. -/
theorem isJacobson_localization [H : IsJacobson R] : IsJacobson S := by
  rw [isJacobson_iff_prime_eq]
  refine' fun P' hP' => le_antisymm _ le_jacobson
  obtain ⟨hP', hPM⟩ := (IsLocalization.isPrime_iff_isPrime_disjoint (powers y) S P').mp hP'
  have hP := H.out hP'.isRadical
  refine' (IsLocalization.map_comap (powers y) S P'.jacobson).ge.trans
    ((map_mono _).trans (IsLocalization.map_comap (powers y) S P').le)
  have : sInf { I : Ideal R | comap (algebraMap R S) P' ≤ I ∧ I.IsMaximal ∧ y ∉ I } ≤
      comap (algebraMap R S) P' := by
    intro x hx
    have hxy : x * y ∈ (comap (algebraMap R S) P').jacobson := by
      rw [Ideal.jacobson, mem_sInf]
      intro J hJ
      

Proof state:
R : Type u_1
S : Type u_2
inst✝³ : CommRing R
inst✝² : CommRing S
I : Ideal R
y : R
inst✝¹ : Algebra R S
inst✝ : Away y S
H : IsJacobson R
P' : Ideal S
hP'✝ : IsPrime P'
hP' : IsPrime (comap (algebraMap R S) P')
hPM : Disjoint ↑(powers y) ↑(comap (algebraMap R S) P')
hP : jacobson (comap (algebraMap R S) P') = comap (algebraMap R S) P'
x : R
hx : x ∈ sInf {I | comap (algebraMap R S) P' ≤ I ∧ IsMaximal I ∧ y ∉ I}
J : Ideal R
hJ : J ∈ {J | comap (algebraMap R S) P' ≤ J ∧ IsMaximal J}
⊢ x * y ∈ J

Next tactic:
by_cases h : y ∈ J
/-- If `S` is the localization of the Jacobson ring `R` at the submonoid generated by `y : R`, then
`S` is Jacobson. -/
theorem isJacobson_localization [H : IsJacobson R] : IsJacobson S := by
  rw [isJacobson_iff_prime_eq]
  refine' fun P' hP' => le_antisymm _ le_jacobson
  obtain ⟨hP', hPM⟩ := (IsLocalization.isPrime_iff_isPrime_disjoint (powers y) S P').mp hP'
  have hP := H.out hP'.isRadical
  refine' (IsLocalization.map_comap (powers y) S P'.jacobson).ge.trans
    ((map_mono _).trans (IsLocalization.map_comap (powers y) S P').le)
  have : sInf { I : Ideal R | comap (algebraMap R S) P' ≤ I ∧ I.IsMaximal ∧ y ∉ I } ≤
      comap (algebraMap R S) P' := by
    intro x hx
    have hxy : x * y ∈ (comap (algebraMap R S) P').jacobson := by
      rw [Ideal.jacobson, mem_sInf]
      intro J hJ
      by_cases h : y ∈ J
      · 

Proof state:
case pos
R : Type u_1
S : Type u_2
inst✝³ : CommRing R
inst✝² : CommRing S
I : Ideal R
y : R
inst✝¹ : Algebra R S
inst✝ : Away y S
H : IsJacobson R
P' : Ideal S
hP'✝ : IsPrime P'
hP' : IsPrime (comap (algebraMap R S) P')
hPM : Disjoint ↑(powers y) ↑(comap (algebraMap R S) P')
hP : jacobson (comap (algebraMap R S) P') = comap (algebraMap R S) P'
x : R
hx : x ∈ sInf {I | comap (algebraMap R S) P' ≤ I ∧ IsMaximal I ∧ y ∉ I}
J : Ideal R
hJ : J ∈ {J | comap (algebraMap R S) P' ≤ J ∧ IsMaximal J}
h : y ∈ J
⊢ x * y ∈ J

Next tactic:
exact J.mul_mem_left x h
/-- If `S` is the localization of the Jacobson ring `R` at the submonoid generated by `y : R`, then
`S` is Jacobson. -/
theorem isJacobson_localization [H : IsJacobson R] : IsJacobson S := by
  rw [isJacobson_iff_prime_eq]
  refine' fun P' hP' => le_antisymm _ le_jacobson
  obtain ⟨hP', hPM⟩ := (IsLocalization.isPrime_iff_isPrime_disjoint (powers y) S P').mp hP'
  have hP := H.out hP'.isRadical
  refine' (IsLocalization.map_comap (powers y) S P'.jacobson).ge.trans
    ((map_mono _).trans (IsLocalization.map_comap (powers y) S P').le)
  have : sInf { I : Ideal R | comap (algebraMap R S) P' ≤ I ∧ I.IsMaximal ∧ y ∉ I } ≤
      comap (algebraMap R S) P' := by
    intro x hx
    have hxy : x * y ∈ (comap (algebraMap R S) P').jacobson := by
      rw [Ideal.jacobson, mem_sInf]
      intro J hJ
      by_cases h : y ∈ J
      · exact J.mul_mem_left x h
      · 

Proof state:
case neg
R : Type u_1
S : Type u_2
inst✝³ : CommRing R
inst✝² : CommRing S
I : Ideal R
y : R
inst✝¹ : Algebra R S
inst✝ : Away y S
H : IsJacobson R
P' : Ideal S
hP'✝ : IsPrime P'
hP' : IsPrime (comap (algebraMap R S) P')
hPM : Disjoint ↑(powers y) ↑(comap (algebraMap R S) P')
hP : jacobson (comap (algebraMap R S) P') = comap (algebraMap R S) P'
x : R
hx : x ∈ sInf {I | comap (algebraMap R S) P' ≤ I ∧ IsMaximal I ∧ y ∉ I}
J : Ideal R
hJ : J ∈ {J | comap (algebraMap R S) P' ≤ J ∧ IsMaximal J}
h : y ∉ J
⊢ x * y ∈ J

Next tactic:
exact J.mul_mem_right y ((mem_sInf.1 hx) ⟨hJ.left, ⟨hJ.right, h⟩⟩)
/-- If `S` is the localization of the Jacobson ring `R` at the submonoid generated by `y : R`, then
`S` is Jacobson. -/
theorem isJacobson_localization [H : IsJacobson R] : IsJacobson S := by
  rw [isJacobson_iff_prime_eq]
  refine' fun P' hP' => le_antisymm _ le_jacobson
  obtain ⟨hP', hPM⟩ := (IsLocalization.isPrime_iff_isPrime_disjoint (powers y) S P').mp hP'
  have hP := H.out hP'.isRadical
  refine' (IsLocalization.map_comap (powers y) S P'.jacobson).ge.trans
    ((map_mono _).trans (IsLocalization.map_comap (powers y) S P').le)
  have : sInf { I : Ideal R | comap (algebraMap R S) P' ≤ I ∧ I.IsMaximal ∧ y ∉ I } ≤
      comap (algebraMap R S) P' := by
    intro x hx
    have hxy : x * y ∈ (comap (algebraMap R S) P').jacobson := by
      rw [Ideal.jacobson, mem_sInf]
      intro J hJ
      by_cases h : y ∈ J
      · exact J.mul_mem_left x h
      · exact J.mul_mem_right y ((mem_sInf.1 hx) ⟨hJ.left, ⟨hJ.right, h⟩⟩)
    

Proof state:
R : Type u_1
S : Type u_2
inst✝³ : CommRing R
inst✝² : CommRing S
I : Ideal R
y : R
inst✝¹ : Algebra R S
inst✝ : Away y S
H : IsJacobson R
P' : Ideal S
hP'✝ : IsPrime P'
hP' : IsPrime (comap (algebraMap R S) P')
hPM : Disjoint ↑(powers y) ↑(comap (algebraMap R S) P')
hP : jacobson (comap (algebraMap R S) P') = comap (algebraMap R S) P'
x : R
hx : x ∈ sInf {I | comap (algebraMap R S) P' ≤ I ∧ IsMaximal I ∧ y ∉ I}
hxy : x * y ∈ jacobson (comap (algebraMap R S) P')
⊢ x ∈ comap (algebraMap R S) P'

Next tactic:
rw [hP] at hxy
/-- If `S` is the localization of the Jacobson ring `R` at the submonoid generated by `y : R`, then
`S` is Jacobson. -/
theorem isJacobson_localization [H : IsJacobson R] : IsJacobson S := by
  rw [isJacobson_iff_prime_eq]
  refine' fun P' hP' => le_antisymm _ le_jacobson
  obtain ⟨hP', hPM⟩ := (IsLocalization.isPrime_iff_isPrime_disjoint (powers y) S P').mp hP'
  have hP := H.out hP'.isRadical
  refine' (IsLocalization.map_comap (powers y) S P'.jacobson).ge.trans
    ((map_mono _).trans (IsLocalization.map_comap (powers y) S P').le)
  have : sInf { I : Ideal R | comap (algebraMap R S) P' ≤ I ∧ I.IsMaximal ∧ y ∉ I } ≤
      comap (algebraMap R S) P' := by
    intro x hx
    have hxy : x * y ∈ (comap (algebraMap R S) P').jacobson := by
      rw [Ideal.jacobson, mem_sInf]
      intro J hJ
      by_cases h : y ∈ J
      · exact J.mul_mem_left x h
      · exact J.mul_mem_right y ((mem_sInf.1 hx) ⟨hJ.left, ⟨hJ.right, h⟩⟩)
    rw [hP] at hxy
    

Proof state:
R : Type u_1
S : Type u_2
inst✝³ : CommRing R
inst✝² : CommRing S
I : Ideal R
y : R
inst✝¹ : Algebra R S
inst✝ : Away y S
H : IsJacobson R
P' : Ideal S
hP'✝ : IsPrime P'
hP' : IsPrime (comap (algebraMap R S) P')
hPM : Disjoint ↑(powers y) ↑(comap (algebraMap R S) P')
hP : jacobson (comap (algebraMap R S) P') = comap (algebraMap R S) P'
x : R
hx : x ∈ sInf {I | comap (algebraMap R S) P' ≤ I ∧ IsMaximal I ∧ y ∉ I}
hxy : x * y ∈ comap (algebraMap R S) P'
⊢ x ∈ comap (algebraMap R S) P'

Next tactic:
cases' hP'.mem_or_mem hxy with hxy hxy
/-- If `S` is the localization of the Jacobson ring `R` at the submonoid generated by `y : R`, then
`S` is Jacobson. -/
theorem isJacobson_localization [H : IsJacobson R] : IsJacobson S := by
  rw [isJacobson_iff_prime_eq]
  refine' fun P' hP' => le_antisymm _ le_jacobson
  obtain ⟨hP', hPM⟩ := (IsLocalization.isPrime_iff_isPrime_disjoint (powers y) S P').mp hP'
  have hP := H.out hP'.isRadical
  refine' (IsLocalization.map_comap (powers y) S P'.jacobson).ge.trans
    ((map_mono _).trans (IsLocalization.map_comap (powers y) S P').le)
  have : sInf { I : Ideal R | comap (algebraMap R S) P' ≤ I ∧ I.IsMaximal ∧ y ∉ I } ≤
      comap (algebraMap R S) P' := by
    intro x hx
    have hxy : x * y ∈ (comap (algebraMap R S) P').jacobson := by
      rw [Ideal.jacobson, mem_sInf]
      intro J hJ
      by_cases h : y ∈ J
      · exact J.mul_mem_left x h
      · exact J.mul_mem_right y ((mem_sInf.1 hx) ⟨hJ.left, ⟨hJ.right, h⟩⟩)
    rw [hP] at hxy
    cases' hP'.mem_or_mem hxy with hxy hxy
    · 

Proof state:
case inl
R : Type u_1
S : Type u_2
inst✝³ : CommRing R
inst✝² : CommRing S
I : Ideal R
y : R
inst✝¹ : Algebra R S
inst✝ : Away y S
H : IsJacobson R
P' : Ideal S
hP'✝ : IsPrime P'
hP' : IsPrime (comap (algebraMap R S) P')
hPM : Disjoint ↑(powers y) ↑(comap (algebraMap R S) P')
hP : jacobson (comap (algebraMap R S) P') = comap (algebraMap R S) P'
x : R
hx : x ∈ sInf {I | comap (algebraMap R S) P' ≤ I ∧ IsMaximal I ∧ y ∉ I}
hxy✝ : x * y ∈ comap (algebraMap R S) P'
hxy : x ∈ comap (algebraMap R S) P'
⊢ x ∈ comap (algebraMap R S) P'

Next tactic:
exact hxy
/-- If `S` is the localization of the Jacobson ring `R` at the submonoid generated by `y : R`, then
`S` is Jacobson. -/
theorem isJacobson_localization [H : IsJacobson R] : IsJacobson S := by
  rw [isJacobson_iff_prime_eq]
  refine' fun P' hP' => le_antisymm _ le_jacobson
  obtain ⟨hP', hPM⟩ := (IsLocalization.isPrime_iff_isPrime_disjoint (powers y) S P').mp hP'
  have hP := H.out hP'.isRadical
  refine' (IsLocalization.map_comap (powers y) S P'.jacobson).ge.trans
    ((map_mono _).trans (IsLocalization.map_comap (powers y) S P').le)
  have : sInf { I : Ideal R | comap (algebraMap R S) P' ≤ I ∧ I.IsMaximal ∧ y ∉ I } ≤
      comap (algebraMap R S) P' := by
    intro x hx
    have hxy : x * y ∈ (comap (algebraMap R S) P').jacobson := by
      rw [Ideal.jacobson, mem_sInf]
      intro J hJ
      by_cases h : y ∈ J
      · exact J.mul_mem_left x h
      · exact J.mul_mem_right y ((mem_sInf.1 hx) ⟨hJ.left, ⟨hJ.right, h⟩⟩)
    rw [hP] at hxy
    cases' hP'.mem_or_mem hxy with hxy hxy
    · exact hxy
    · 

Proof state:
case inr
R : Type u_1
S : Type u_2
inst✝³ : CommRing R
inst✝² : CommRing S
I : Ideal R
y : R
inst✝¹ : Algebra R S
inst✝ : Away y S
H : IsJacobson R
P' : Ideal S
hP'✝ : IsPrime P'
hP' : IsPrime (comap (algebraMap R S) P')
hPM : Disjoint ↑(powers y) ↑(comap (algebraMap R S) P')
hP : jacobson (comap (algebraMap R S) P') = comap (algebraMap R S) P'
x : R
hx : x ∈ sInf {I | comap (algebraMap R S) P' ≤ I ∧ IsMaximal I ∧ y ∉ I}
hxy✝ : x * y ∈ comap (algebraMap R S) P'
hxy : y ∈ comap (algebraMap R S) P'
⊢ x ∈ comap (algebraMap R S) P'

Next tactic:
exact (hPM.le_bot ⟨Submonoid.mem_powers _, hxy⟩).elim
/-- If `S` is the localization of the Jacobson ring `R` at the submonoid generated by `y : R`, then
`S` is Jacobson. -/
theorem isJacobson_localization [H : IsJacobson R] : IsJacobson S := by
  rw [isJacobson_iff_prime_eq]
  refine' fun P' hP' => le_antisymm _ le_jacobson
  obtain ⟨hP', hPM⟩ := (IsLocalization.isPrime_iff_isPrime_disjoint (powers y) S P').mp hP'
  have hP := H.out hP'.isRadical
  refine' (IsLocalization.map_comap (powers y) S P'.jacobson).ge.trans
    ((map_mono _).trans (IsLocalization.map_comap (powers y) S P').le)
  have : sInf { I : Ideal R | comap (algebraMap R S) P' ≤ I ∧ I.IsMaximal ∧ y ∉ I } ≤
      comap (algebraMap R S) P' := by
    intro x hx
    have hxy : x * y ∈ (comap (algebraMap R S) P').jacobson := by
      rw [Ideal.jacobson, mem_sInf]
      intro J hJ
      by_cases h : y ∈ J
      · exact J.mul_mem_left x h
      · exact J.mul_mem_right y ((mem_sInf.1 hx) ⟨hJ.left, ⟨hJ.right, h⟩⟩)
    rw [hP] at hxy
    cases' hP'.mem_or_mem hxy with hxy hxy
    · exact hxy
    · exact (hPM.le_bot ⟨Submonoid.mem_powers _, hxy⟩).elim
  

Proof state:
case intro
R : Type u_1
S : Type u_2
inst✝³ : CommRing R
inst✝² : CommRing S
I : Ideal R
y : R
inst✝¹ : Algebra R S
inst✝ : Away y S
H : IsJacobson R
P' : Ideal S
hP'✝ : IsPrime P'
hP' : IsPrime (comap (algebraMap R S) P')
hPM : Disjoint ↑(powers y) ↑(comap (algebraMap R S) P')
hP : jacobson (comap (algebraMap R S) P') = comap (algebraMap R S) P'
this : sInf {I | comap (algebraMap R S) P' ≤ I ∧ IsMaximal I ∧ y ∉ I} ≤ comap (algebraMap R S) P'
⊢ comap (algebraMap R S) (jacobson P') ≤ comap (algebraMap R S) P'

Next tactic:
refine' le_trans _ this
/-- If `S` is the localization of the Jacobson ring `R` at the submonoid generated by `y : R`, then
`S` is Jacobson. -/
theorem isJacobson_localization [H : IsJacobson R] : IsJacobson S := by
  rw [isJacobson_iff_prime_eq]
  refine' fun P' hP' => le_antisymm _ le_jacobson
  obtain ⟨hP', hPM⟩ := (IsLocalization.isPrime_iff_isPrime_disjoint (powers y) S P').mp hP'
  have hP := H.out hP'.isRadical
  refine' (IsLocalization.map_comap (powers y) S P'.jacobson).ge.trans
    ((map_mono _).trans (IsLocalization.map_comap (powers y) S P').le)
  have : sInf { I : Ideal R | comap (algebraMap R S) P' ≤ I ∧ I.IsMaximal ∧ y ∉ I } ≤
      comap (algebraMap R S) P' := by
    intro x hx
    have hxy : x * y ∈ (comap (algebraMap R S) P').jacobson := by
      rw [Ideal.jacobson, mem_sInf]
      intro J hJ
      by_cases h : y ∈ J
      · exact J.mul_mem_left x h
      · exact J.mul_mem_right y ((mem_sInf.1 hx) ⟨hJ.left, ⟨hJ.right, h⟩⟩)
    rw [hP] at hxy
    cases' hP'.mem_or_mem hxy with hxy hxy
    · exact hxy
    · exact (hPM.le_bot ⟨Submonoid.mem_powers _, hxy⟩).elim
  refine' le_trans _ this
  

Proof state:
case intro
R : Type u_1
S : Type u_2
inst✝³ : CommRing R
inst✝² : CommRing S
I : Ideal R
y : R
inst✝¹ : Algebra R S
inst✝ : Away y S
H : IsJacobson R
P' : Ideal S
hP'✝ : IsPrime P'
hP' : IsPrime (comap (algebraMap R S) P')
hPM : Disjoint ↑(powers y) ↑(comap (algebraMap R S) P')
hP : jacobson (comap (algebraMap R S) P') = comap (algebraMap R S) P'
this : sInf {I | comap (algebraMap R S) P' ≤ I ∧ IsMaximal I ∧ y ∉ I} ≤ comap (algebraMap R S) P'
⊢ comap (algebraMap R S) (jacobson P') ≤ sInf {I | comap (algebraMap R S) P' ≤ I ∧ IsMaximal I ∧ y ∉ I}

Next tactic:
rw [Ideal.jacobson, comap_sInf', sInf_eq_iInf]
/-- If `S` is the localization of the Jacobson ring `R` at the submonoid generated by `y : R`, then
`S` is Jacobson. -/
theorem isJacobson_localization [H : IsJacobson R] : IsJacobson S := by
  rw [isJacobson_iff_prime_eq]
  refine' fun P' hP' => le_antisymm _ le_jacobson
  obtain ⟨hP', hPM⟩ := (IsLocalization.isPrime_iff_isPrime_disjoint (powers y) S P').mp hP'
  have hP := H.out hP'.isRadical
  refine' (IsLocalization.map_comap (powers y) S P'.jacobson).ge.trans
    ((map_mono _).trans (IsLocalization.map_comap (powers y) S P').le)
  have : sInf { I : Ideal R | comap (algebraMap R S) P' ≤ I ∧ I.IsMaximal ∧ y ∉ I } ≤
      comap (algebraMap R S) P' := by
    intro x hx
    have hxy : x * y ∈ (comap (algebraMap R S) P').jacobson := by
      rw [Ideal.jacobson, mem_sInf]
      intro J hJ
      by_cases h : y ∈ J
      · exact J.mul_mem_left x h
      · exact J.mul_mem_right y ((mem_sInf.1 hx) ⟨hJ.left, ⟨hJ.right, h⟩⟩)
    rw [hP] at hxy
    cases' hP'.mem_or_mem hxy with hxy hxy
    · exact hxy
    · exact (hPM.le_bot ⟨Submonoid.mem_powers _, hxy⟩).elim
  refine' le_trans _ this
  rw [Ideal.jacobson, comap_sInf', sInf_eq_iInf]
  

Proof state:
case intro
R : Type u_1
S : Type u_2
inst✝³ : CommRing R
inst✝² : CommRing S
I : Ideal R
y : R
inst✝¹ : Algebra R S
inst✝ : Away y S
H : IsJacobson R
P' : Ideal S
hP'✝ : IsPrime P'
hP' : IsPrime (comap (algebraMap R S) P')
hPM : Disjoint ↑(powers y) ↑(comap (algebraMap R S) P')
hP : jacobson (comap (algebraMap R S) P') = comap (algebraMap R S) P'
this : sInf {I | comap (algebraMap R S) P' ≤ I ∧ IsMaximal I ∧ y ∉ I} ≤ comap (algebraMap R S) P'
⊢ ⨅ I ∈ comap (algebraMap R S) '' {J | P' ≤ J ∧ IsMaximal J}, I ≤
    ⨅ a ∈ {I | comap (algebraMap R S) P' ≤ I ∧ IsMaximal I ∧ y ∉ I}, a

Next tactic:
refine' iInf_le_iInf_of_subset fun I hI => ⟨map (algebraMap R S) I, ⟨_, _⟩⟩
/-- If `S` is the localization of the Jacobson ring `R` at the submonoid generated by `y : R`, then
`S` is Jacobson. -/
theorem isJacobson_localization [H : IsJacobson R] : IsJacobson S := by
  rw [isJacobson_iff_prime_eq]
  refine' fun P' hP' => le_antisymm _ le_jacobson
  obtain ⟨hP', hPM⟩ := (IsLocalization.isPrime_iff_isPrime_disjoint (powers y) S P').mp hP'
  have hP := H.out hP'.isRadical
  refine' (IsLocalization.map_comap (powers y) S P'.jacobson).ge.trans
    ((map_mono _).trans (IsLocalization.map_comap (powers y) S P').le)
  have : sInf { I : Ideal R | comap (algebraMap R S) P' ≤ I ∧ I.IsMaximal ∧ y ∉ I } ≤
      comap (algebraMap R S) P' := by
    intro x hx
    have hxy : x * y ∈ (comap (algebraMap R S) P').jacobson := by
      rw [Ideal.jacobson, mem_sInf]
      intro J hJ
      by_cases h : y ∈ J
      · exact J.mul_mem_left x h
      · exact J.mul_mem_right y ((mem_sInf.1 hx) ⟨hJ.left, ⟨hJ.right, h⟩⟩)
    rw [hP] at hxy
    cases' hP'.mem_or_mem hxy with hxy hxy
    · exact hxy
    · exact (hPM.le_bot ⟨Submonoid.mem_powers _, hxy⟩).elim
  refine' le_trans _ this
  rw [Ideal.jacobson, comap_sInf', sInf_eq_iInf]
  refine' iInf_le_iInf_of_subset fun I hI => ⟨map (algebraMap R S) I, ⟨_, _⟩⟩
  · 

Proof state:
case intro.refine'_1
R : Type u_1
S : Type u_2
inst✝³ : CommRing R
inst✝² : CommRing S
I✝ : Ideal R
y : R
inst✝¹ : Algebra R S
inst✝ : Away y S
H : IsJacobson R
P' : Ideal S
hP'✝ : IsPrime P'
hP' : IsPrime (comap (algebraMap R S) P')
hPM : Disjoint ↑(powers y) ↑(comap (algebraMap R S) P')
hP : jacobson (comap (algebraMap R S) P') = comap (algebraMap R S) P'
this : sInf {I | comap (algebraMap R S) P' ≤ I ∧ IsMaximal I ∧ y ∉ I} ≤ comap (algebraMap R S) P'
I : Ideal R
hI : I ∈ {I | comap (algebraMap R S) P' ≤ I ∧ IsMaximal I ∧ y ∉ I}
⊢ map (algebraMap R S) I ∈ {J | P' ≤ J ∧ IsMaximal J}

Next tactic:
exact ⟨le_trans (le_of_eq (IsLocalization.map_comap (powers y) S P').symm) (map_mono hI.1),
      isMaximal_of_isMaximal_disjoint y _ hI.2.1 hI.2.2⟩
/-- If `S` is the localization of the Jacobson ring `R` at the submonoid generated by `y : R`, then
`S` is Jacobson. -/
theorem isJacobson_localization [H : IsJacobson R] : IsJacobson S := by
  rw [isJacobson_iff_prime_eq]
  refine' fun P' hP' => le_antisymm _ le_jacobson
  obtain ⟨hP', hPM⟩ := (IsLocalization.isPrime_iff_isPrime_disjoint (powers y) S P').mp hP'
  have hP := H.out hP'.isRadical
  refine' (IsLocalization.map_comap (powers y) S P'.jacobson).ge.trans
    ((map_mono _).trans (IsLocalization.map_comap (powers y) S P').le)
  have : sInf { I : Ideal R | comap (algebraMap R S) P' ≤ I ∧ I.IsMaximal ∧ y ∉ I } ≤
      comap (algebraMap R S) P' := by
    intro x hx
    have hxy : x * y ∈ (comap (algebraMap R S) P').jacobson := by
      rw [Ideal.jacobson, mem_sInf]
      intro J hJ
      by_cases h : y ∈ J
      · exact J.mul_mem_left x h
      · exact J.mul_mem_right y ((mem_sInf.1 hx) ⟨hJ.left, ⟨hJ.right, h⟩⟩)
    rw [hP] at hxy
    cases' hP'.mem_or_mem hxy with hxy hxy
    · exact hxy
    · exact (hPM.le_bot ⟨Submonoid.mem_powers _, hxy⟩).elim
  refine' le_trans _ this
  rw [Ideal.jacobson, comap_sInf', sInf_eq_iInf]
  refine' iInf_le_iInf_of_subset fun I hI => ⟨map (algebraMap R S) I, ⟨_, _⟩⟩
  · exact ⟨le_trans (le_of_eq (IsLocalization.map_comap (powers y) S P').symm) (map_mono hI.1),
      isMaximal_of_isMaximal_disjoint y _ hI.2.1 hI.2.2⟩
  · 

Proof state:
case intro.refine'_2
R : Type u_1
S : Type u_2
inst✝³ : CommRing R
inst✝² : CommRing S
I✝ : Ideal R
y : R
inst✝¹ : Algebra R S
inst✝ : Away y S
H : IsJacobson R
P' : Ideal S
hP'✝ : IsPrime P'
hP' : IsPrime (comap (algebraMap R S) P')
hPM : Disjoint ↑(powers y) ↑(comap (algebraMap R S) P')
hP : jacobson (comap (algebraMap R S) P') = comap (algebraMap R S) P'
this : sInf {I | comap (algebraMap R S) P' ≤ I ∧ IsMaximal I ∧ y ∉ I} ≤ comap (algebraMap R S) P'
I : Ideal R
hI : I ∈ {I | comap (algebraMap R S) P' ≤ I ∧ IsMaximal I ∧ y ∉ I}
⊢ comap (algebraMap R S) (map (algebraMap R S) I) = I

Next tactic:
exact IsLocalization.comap_map_of_isPrime_disjoint _ S I (IsMaximal.isPrime hI.2.1)
      ((disjoint_powers_iff_not_mem y hI.2.1.isPrime.isRadical).2 hI.2.2)
lemma Subring.mem_closure_image_of {S T : Type*} [CommRing S] [CommRing T] (g : S →+* T)
    (u : Set S) (x : S) (hx : x ∈ Subring.closure u) : g x ∈ Subring.closure (g '' u) := by
  

Proof state:
S : Type u_1
T : Type u_2
inst✝¹ : CommRing S
inst✝ : CommRing T
g : S →+* T
u : Set S
x : S
hx : x ∈ Subring.closure u
⊢ g x ∈ Subring.closure (⇑g '' u)

Next tactic:
rw [Subring.mem_closure] at hx ⊢
lemma Subring.mem_closure_image_of {S T : Type*} [CommRing S] [CommRing T] (g : S →+* T)
    (u : Set S) (x : S) (hx : x ∈ Subring.closure u) : g x ∈ Subring.closure (g '' u) := by
  rw [Subring.mem_closure] at hx ⊢
  

Proof state:
S : Type u_1
T : Type u_2
inst✝¹ : CommRing S
inst✝ : CommRing T
g : S →+* T
u : Set S
x : S
hx : ∀ (S_1 : Subring S), u ⊆ ↑S_1 → x ∈ S_1
⊢ ∀ (S_1 : Subring T), ⇑g '' u ⊆ ↑S_1 → g x ∈ S_1

Next tactic:
intro T₁ h₁
lemma Subring.mem_closure_image_of {S T : Type*} [CommRing S] [CommRing T] (g : S →+* T)
    (u : Set S) (x : S) (hx : x ∈ Subring.closure u) : g x ∈ Subring.closure (g '' u) := by
  rw [Subring.mem_closure] at hx ⊢
  intro T₁ h₁
  

Proof state:
S : Type u_1
T : Type u_2
inst✝¹ : CommRing S
inst✝ : CommRing T
g : S →+* T
u : Set S
x : S
hx : ∀ (S_1 : Subring S), u ⊆ ↑S_1 → x ∈ S_1
T₁ : Subring T
h₁ : ⇑g '' u ⊆ ↑T₁
⊢ g x ∈ T₁

Next tactic:
rw [← Subring.mem_comap]
lemma Subring.mem_closure_image_of {S T : Type*} [CommRing S] [CommRing T] (g : S →+* T)
    (u : Set S) (x : S) (hx : x ∈ Subring.closure u) : g x ∈ Subring.closure (g '' u) := by
  rw [Subring.mem_closure] at hx ⊢
  intro T₁ h₁
  rw [← Subring.mem_comap]
  

Proof state:
S : Type u_1
T : Type u_2
inst✝¹ : CommRing S
inst✝ : CommRing T
g : S →+* T
u : Set S
x : S
hx : ∀ (S_1 : Subring S), u ⊆ ↑S_1 → x ∈ S_1
T₁ : Subring T
h₁ : ⇑g '' u ⊆ ↑T₁
⊢ x ∈ Subring.comap g T₁

Next tactic:
apply hx
lemma Subring.mem_closure_image_of {S T : Type*} [CommRing S] [CommRing T] (g : S →+* T)
    (u : Set S) (x : S) (hx : x ∈ Subring.closure u) : g x ∈ Subring.closure (g '' u) := by
  rw [Subring.mem_closure] at hx ⊢
  intro T₁ h₁
  rw [← Subring.mem_comap]
  apply hx
  

Proof state:
case a
S : Type u_1
T : Type u_2
inst✝¹ : CommRing S
inst✝ : CommRing T
g : S →+* T
u : Set S
x : S
hx : ∀ (S_1 : Subring S), u ⊆ ↑S_1 → x ∈ S_1
T₁ : Subring T
h₁ : ⇑g '' u ⊆ ↑T₁
⊢ u ⊆ ↑(Subring.comap g T₁)

Next tactic:
simp only [Subring.coe_comap, ← Set.image_subset_iff, SetLike.mem_coe]
lemma Subring.mem_closure_image_of {S T : Type*} [CommRing S] [CommRing T] (g : S →+* T)
    (u : Set S) (x : S) (hx : x ∈ Subring.closure u) : g x ∈ Subring.closure (g '' u) := by
  rw [Subring.mem_closure] at hx ⊢
  intro T₁ h₁
  rw [← Subring.mem_comap]
  apply hx
  simp only [Subring.coe_comap, ← Set.image_subset_iff, SetLike.mem_coe]
  

Proof state:
case a
S : Type u_1
T : Type u_2
inst✝¹ : CommRing S
inst✝ : CommRing T
g : S →+* T
u : Set S
x : S
hx : ∀ (S_1 : Subring S), u ⊆ ↑S_1 → x ∈ S_1
T₁ : Subring T
h₁ : ⇑g '' u ⊆ ↑T₁
⊢ ⇑g '' u ⊆ ↑T₁

Next tactic:
exact h₁
lemma mem_closure_X_union_C {R : Type*} [Ring R] (p : R[X]) :
    p ∈ Subring.closure (insert X {f | f.degree ≤ 0} : Set R[X]) := by
  

Proof state:
R : Type u_1
inst✝ : Ring R
p : R[X]
⊢ p ∈ Subring.closure (insert X {f | degree f ≤ 0})

Next tactic:
refine' Polynomial.induction_on p _ _ _
lemma mem_closure_X_union_C {R : Type*} [Ring R] (p : R[X]) :
    p ∈ Subring.closure (insert X {f | f.degree ≤ 0} : Set R[X]) := by
  refine' Polynomial.induction_on p _ _ _
  · 

Proof state:
case refine'_1
R : Type u_1
inst✝ : Ring R
p : R[X]
⊢ ∀ (a : R), C a ∈ Subring.closure (insert X {f | degree f ≤ 0})

Next tactic:
intro r
lemma mem_closure_X_union_C {R : Type*} [Ring R] (p : R[X]) :
    p ∈ Subring.closure (insert X {f | f.degree ≤ 0} : Set R[X]) := by
  refine' Polynomial.induction_on p _ _ _
  · intro r
    

Proof state:
case refine'_1
R : Type u_1
inst✝ : Ring R
p : R[X]
r : R
⊢ C r ∈ Subring.closure (insert X {f | degree f ≤ 0})

Next tactic:
apply Subring.subset_closure
lemma mem_closure_X_union_C {R : Type*} [Ring R] (p : R[X]) :
    p ∈ Subring.closure (insert X {f | f.degree ≤ 0} : Set R[X]) := by
  refine' Polynomial.induction_on p _ _ _
  · intro r
    apply Subring.subset_closure
    

Proof state:
case refine'_1.a
R : Type u_1
inst✝ : Ring R
p : R[X]
r : R
⊢ C r ∈ insert X {f | degree f ≤ 0}

Next tactic:
apply Set.mem_insert_of_mem