l3lab/ntp-mathlib huggingface dataset:
/-- If `R` is a Jacobson ring, and `P` is a maximal ideal of `R[X]`,
  then `R → R[X]/P` is an integral map. -/
theorem quotient_mk_comp_C_isIntegral_of_jacobson :
    ((Quotient.mk P).comp C : R →+* R[X] ⧸ P).IsIntegral := by
  let P' : Ideal R := P.comap C
  haveI : P'.IsPrime := comap_isPrime C P
  let f : R[X] →+* Polynomial (R ⧸ P') := Polynomial.mapRingHom (Quotient.mk P')
  have hf : Function.Surjective ↑f := map_surjective (Quotient.mk P') Quotient.mk_surjective
  have hPJ : P = (P.map f).comap f := by
    rw [comap_map_of_surjective _ hf]
    refine' le_antisymm (le_sup_of_le_left le_rfl) (sup_le le_rfl _)
    refine' fun p hp =>
      polynomial_mem_ideal_of_coeff_mem_ideal P p fun n => Quotient.eq_zero_iff_mem.mp _
    simpa only [coeff_map, coe_mapRingHom] using (Polynomial.ext_iff.mp hp) n
  refine' RingHom.IsIntegral.tower_bot _ _ (injective_quotient_le_comap_map P) _
  rw [← quotient_mk_maps_eq]
  refine ((Quotient.mk P').isIntegral_of_surjective Quotient.mk_surjective).trans _ _ ?_
  have : IsMaximal (map (mapRingHom (Quotient.mk (comap C P))) P)
  · exact Or.recOn (map_eq_top_or_isMaximal_of_surjective f hf hP)
      (fun h => absurd (_root_.trans (h ▸ hPJ : P = comap f ⊤) comap_top : P = ⊤) hP.ne_top) id
  apply quotient_mk_comp_C_isIntegral_of_jacobson' _ ?_ (fun x hx => ?_)
  any_goals 

Proof state:
R : Type u_1
inst✝¹ : CommRing R
inst✝ : IsJacobson R
P : Ideal R[X]
hP : IsMaximal P
P' : Ideal R := comap C P
this✝ : IsPrime P'
f : R[X] →+* (R ⧸ P')[X] := mapRingHom (Quotient.mk P')
hf : Function.Surjective ⇑f
hPJ : P = comap f (map f P)
this : IsMaximal (map (mapRingHom (Quotient.mk (comap C P))) P)
x : R ⧸ P'
hx : C x ∈ map (mapRingHom (Quotient.mk (comap C P))) P
⊢ x = 0

Next tactic:
exact Ideal.isJacobson_quotient
/-- If `R` is a Jacobson ring, and `P` is a maximal ideal of `R[X]`,
  then `R → R[X]/P` is an integral map. -/
theorem quotient_mk_comp_C_isIntegral_of_jacobson :
    ((Quotient.mk P).comp C : R →+* R[X] ⧸ P).IsIntegral := by
  let P' : Ideal R := P.comap C
  haveI : P'.IsPrime := comap_isPrime C P
  let f : R[X] →+* Polynomial (R ⧸ P') := Polynomial.mapRingHom (Quotient.mk P')
  have hf : Function.Surjective ↑f := map_surjective (Quotient.mk P') Quotient.mk_surjective
  have hPJ : P = (P.map f).comap f := by
    rw [comap_map_of_surjective _ hf]
    refine' le_antisymm (le_sup_of_le_left le_rfl) (sup_le le_rfl _)
    refine' fun p hp =>
      polynomial_mem_ideal_of_coeff_mem_ideal P p fun n => Quotient.eq_zero_iff_mem.mp _
    simpa only [coeff_map, coe_mapRingHom] using (Polynomial.ext_iff.mp hp) n
  refine' RingHom.IsIntegral.tower_bot _ _ (injective_quotient_le_comap_map P) _
  rw [← quotient_mk_maps_eq]
  refine ((Quotient.mk P').isIntegral_of_surjective Quotient.mk_surjective).trans _ _ ?_
  have : IsMaximal (map (mapRingHom (Quotient.mk (comap C P))) P)
  · exact Or.recOn (map_eq_top_or_isMaximal_of_surjective f hf hP)
      (fun h => absurd (_root_.trans (h ▸ hPJ : P = comap f ⊤) comap_top : P = ⊤) hP.ne_top) id
  apply quotient_mk_comp_C_isIntegral_of_jacobson' _ ?_ (fun x hx => ?_)
  any_goals exact Ideal.isJacobson_quotient
  · 

Proof state:
R : Type u_1
inst✝¹ : CommRing R
inst✝ : IsJacobson R
P : Ideal R[X]
hP : IsMaximal P
P' : Ideal R := comap C P
this✝ : IsPrime P'
f : R[X] →+* (R ⧸ P')[X] := mapRingHom (Quotient.mk P')
hf : Function.Surjective ⇑f
hPJ : P = comap f (map f P)
this : IsMaximal (map (mapRingHom (Quotient.mk (comap C P))) P)
x : R ⧸ P'
hx : C x ∈ map (mapRingHom (Quotient.mk (comap C P))) P
⊢ x = 0

Next tactic:
obtain ⟨z, rfl⟩ := Quotient.mk_surjective x
/-- If `R` is a Jacobson ring, and `P` is a maximal ideal of `R[X]`,
  then `R → R[X]/P` is an integral map. -/
theorem quotient_mk_comp_C_isIntegral_of_jacobson :
    ((Quotient.mk P).comp C : R →+* R[X] ⧸ P).IsIntegral := by
  let P' : Ideal R := P.comap C
  haveI : P'.IsPrime := comap_isPrime C P
  let f : R[X] →+* Polynomial (R ⧸ P') := Polynomial.mapRingHom (Quotient.mk P')
  have hf : Function.Surjective ↑f := map_surjective (Quotient.mk P') Quotient.mk_surjective
  have hPJ : P = (P.map f).comap f := by
    rw [comap_map_of_surjective _ hf]
    refine' le_antisymm (le_sup_of_le_left le_rfl) (sup_le le_rfl _)
    refine' fun p hp =>
      polynomial_mem_ideal_of_coeff_mem_ideal P p fun n => Quotient.eq_zero_iff_mem.mp _
    simpa only [coeff_map, coe_mapRingHom] using (Polynomial.ext_iff.mp hp) n
  refine' RingHom.IsIntegral.tower_bot _ _ (injective_quotient_le_comap_map P) _
  rw [← quotient_mk_maps_eq]
  refine ((Quotient.mk P').isIntegral_of_surjective Quotient.mk_surjective).trans _ _ ?_
  have : IsMaximal (map (mapRingHom (Quotient.mk (comap C P))) P)
  · exact Or.recOn (map_eq_top_or_isMaximal_of_surjective f hf hP)
      (fun h => absurd (_root_.trans (h ▸ hPJ : P = comap f ⊤) comap_top : P = ⊤) hP.ne_top) id
  apply quotient_mk_comp_C_isIntegral_of_jacobson' _ ?_ (fun x hx => ?_)
  any_goals exact Ideal.isJacobson_quotient
  · obtain ⟨z, rfl⟩ := Quotient.mk_surjective x
    

Proof state:
case intro
R : Type u_1
inst✝¹ : CommRing R
inst✝ : IsJacobson R
P : Ideal R[X]
hP : IsMaximal P
P' : Ideal R := comap C P
this✝ : IsPrime P'
f : R[X] →+* (R ⧸ P')[X] := mapRingHom (Quotient.mk P')
hf : Function.Surjective ⇑f
hPJ : P = comap f (map f P)
this : IsMaximal (map (mapRingHom (Quotient.mk (comap C P))) P)
z : R
hx : C ((Quotient.mk P') z) ∈ map (mapRingHom (Quotient.mk (comap C P))) P
⊢ (Quotient.mk P') z = 0

Next tactic:
rwa [Quotient.eq_zero_iff_mem, mem_comap, hPJ, mem_comap, coe_mapRingHom, map_C]
theorem isMaximal_comap_C_of_isJacobson : (P.comap (C : R →+* R[X])).IsMaximal := by
  

Proof state:
R : Type u_1
inst✝¹ : CommRing R
inst✝ : IsJacobson R
P : Ideal R[X]
hP : IsMaximal P
⊢ IsMaximal (comap C P)

Next tactic:
rw [← @mk_ker _ _ P, RingHom.ker_eq_comap_bot, comap_comap]
theorem isMaximal_comap_C_of_isJacobson : (P.comap (C : R →+* R[X])).IsMaximal := by
  rw [← @mk_ker _ _ P, RingHom.ker_eq_comap_bot, comap_comap]
  

Proof state:
R : Type u_1
inst✝¹ : CommRing R
inst✝ : IsJacobson R
P : Ideal R[X]
hP : IsMaximal P
⊢ IsMaximal (comap (RingHom.comp (Quotient.mk P) C) ⊥)

Next tactic:
exact isMaximal_comap_of_isIntegral_of_isMaximal' _ (quotient_mk_comp_C_isIntegral_of_jacobson P)
    ⊥ ((bot_quotient_isMaximal_iff _).mpr hP)
lemma isMaximal_comap_C_of_isJacobson' {P : Ideal R[X]} (hP : IsMaximal P) :
    (P.comap (C : R →+* R[X])).IsMaximal := by
  

Proof state:
R : Type u_1
inst✝¹ : CommRing R
inst✝ : IsJacobson R
P✝ : Ideal R[X]
hP✝ : IsMaximal P✝
P : Ideal R[X]
hP : IsMaximal P
⊢ IsMaximal (comap C P)

Next tactic:
haveI := hP
lemma isMaximal_comap_C_of_isJacobson' {P : Ideal R[X]} (hP : IsMaximal P) :
    (P.comap (C : R →+* R[X])).IsMaximal := by
  haveI := hP
  

Proof state:
R : Type u_1
inst✝¹ : CommRing R
inst✝ : IsJacobson R
P✝ : Ideal R[X]
hP✝ : IsMaximal P✝
P : Ideal R[X]
hP this : IsMaximal P
⊢ IsMaximal (comap C P)

Next tactic:
exact isMaximal_comap_C_of_isJacobson P
theorem comp_C_integral_of_surjective_of_jacobson {S : Type*} [Field S] (f : R[X] →+* S)
    (hf : Function.Surjective ↑f) : (f.comp C).IsIntegral := by
  

Proof state:
R : Type u_1
inst✝² : CommRing R
inst✝¹ : IsJacobson R
P : Ideal R[X]
hP : IsMaximal P
S : Type u_2
inst✝ : Field S
f : R[X] →+* S
hf : Function.Surjective ⇑f
⊢ RingHom.IsIntegral (RingHom.comp f C)

Next tactic:
haveI : f.ker.IsMaximal := RingHom.ker_isMaximal_of_surjective f hf
theorem comp_C_integral_of_surjective_of_jacobson {S : Type*} [Field S] (f : R[X] →+* S)
    (hf : Function.Surjective ↑f) : (f.comp C).IsIntegral := by
  haveI : f.ker.IsMaximal := RingHom.ker_isMaximal_of_surjective f hf
  

Proof state:
R : Type u_1
inst✝² : CommRing R
inst✝¹ : IsJacobson R
P : Ideal R[X]
hP : IsMaximal P
S : Type u_2
inst✝ : Field S
f : R[X] →+* S
hf : Function.Surjective ⇑f
this : IsMaximal (RingHom.ker f)
⊢ RingHom.IsIntegral (RingHom.comp f C)

Next tactic:
let g : R[X] ⧸ (RingHom.ker f) →+* S := Ideal.Quotient.lift (RingHom.ker f) f fun _ h => h
theorem comp_C_integral_of_surjective_of_jacobson {S : Type*} [Field S] (f : R[X] →+* S)
    (hf : Function.Surjective ↑f) : (f.comp C).IsIntegral := by
  haveI : f.ker.IsMaximal := RingHom.ker_isMaximal_of_surjective f hf
  let g : R[X] ⧸ (RingHom.ker f) →+* S := Ideal.Quotient.lift (RingHom.ker f) f fun _ h => h
  

Proof state:
R : Type u_1
inst✝² : CommRing R
inst✝¹ : IsJacobson R
P : Ideal R[X]
hP : IsMaximal P
S : Type u_2
inst✝ : Field S
f : R[X] →+* S
hf : Function.Surjective ⇑f
this : IsMaximal (RingHom.ker f)
g : R[X] ⧸ RingHom.ker f →+* S := Quotient.lift (RingHom.ker f) f (_ : ∀ x ∈ RingHom.ker f, x ∈ RingHom.ker f)
⊢ RingHom.IsIntegral (RingHom.comp f C)

Next tactic:
have hfg : g.comp (Quotient.mk (RingHom.ker f)) = f := ringHom_ext' rfl rfl
theorem comp_C_integral_of_surjective_of_jacobson {S : Type*} [Field S] (f : R[X] →+* S)
    (hf : Function.Surjective ↑f) : (f.comp C).IsIntegral := by
  haveI : f.ker.IsMaximal := RingHom.ker_isMaximal_of_surjective f hf
  let g : R[X] ⧸ (RingHom.ker f) →+* S := Ideal.Quotient.lift (RingHom.ker f) f fun _ h => h
  have hfg : g.comp (Quotient.mk (RingHom.ker f)) = f := ringHom_ext' rfl rfl
  

Proof state:
R : Type u_1
inst✝² : CommRing R
inst✝¹ : IsJacobson R
P : Ideal R[X]
hP : IsMaximal P
S : Type u_2
inst✝ : Field S
f : R[X] →+* S
hf : Function.Surjective ⇑f
this : IsMaximal (RingHom.ker f)
g : R[X] ⧸ RingHom.ker f →+* S := Quotient.lift (RingHom.ker f) f (_ : ∀ x ∈ RingHom.ker f, x ∈ RingHom.ker f)
hfg : RingHom.comp g (Quotient.mk (RingHom.ker f)) = f
⊢ RingHom.IsIntegral (RingHom.comp f C)

Next tactic:
rw [← hfg, RingHom.comp_assoc]
theorem comp_C_integral_of_surjective_of_jacobson {S : Type*} [Field S] (f : R[X] →+* S)
    (hf : Function.Surjective ↑f) : (f.comp C).IsIntegral := by
  haveI : f.ker.IsMaximal := RingHom.ker_isMaximal_of_surjective f hf
  let g : R[X] ⧸ (RingHom.ker f) →+* S := Ideal.Quotient.lift (RingHom.ker f) f fun _ h => h
  have hfg : g.comp (Quotient.mk (RingHom.ker f)) = f := ringHom_ext' rfl rfl
  rw [← hfg, RingHom.comp_assoc]
  

Proof state:
R : Type u_1
inst✝² : CommRing R
inst✝¹ : IsJacobson R
P : Ideal R[X]
hP : IsMaximal P
S : Type u_2
inst✝ : Field S
f : R[X] →+* S
hf : Function.Surjective ⇑f
this : IsMaximal (RingHom.ker f)
g : R[X] ⧸ RingHom.ker f →+* S := Quotient.lift (RingHom.ker f) f (_ : ∀ x ∈ RingHom.ker f, x ∈ RingHom.ker f)
hfg : RingHom.comp g (Quotient.mk (RingHom.ker f)) = f
⊢ RingHom.IsIntegral (RingHom.comp g (RingHom.comp (Quotient.mk (RingHom.ker f)) C))

Next tactic:
refine (quotient_mk_comp_C_isIntegral_of_jacobson (RingHom.ker f)).trans _ g
    (g.isIntegral_of_surjective ?_)
theorem comp_C_integral_of_surjective_of_jacobson {S : Type*} [Field S] (f : R[X] →+* S)
    (hf : Function.Surjective ↑f) : (f.comp C).IsIntegral := by
  haveI : f.ker.IsMaximal := RingHom.ker_isMaximal_of_surjective f hf
  let g : R[X] ⧸ (RingHom.ker f) →+* S := Ideal.Quotient.lift (RingHom.ker f) f fun _ h => h
  have hfg : g.comp (Quotient.mk (RingHom.ker f)) = f := ringHom_ext' rfl rfl
  rw [← hfg, RingHom.comp_assoc]
  refine (quotient_mk_comp_C_isIntegral_of_jacobson (RingHom.ker f)).trans _ g
    (g.isIntegral_of_surjective ?_)
  

Proof state:
R : Type u_1
inst✝² : CommRing R
inst✝¹ : IsJacobson R
P : Ideal R[X]
hP : IsMaximal P
S : Type u_2
inst✝ : Field S
f : R[X] →+* S
hf : Function.Surjective ⇑f
this : IsMaximal (RingHom.ker f)
g : R[X] ⧸ RingHom.ker f →+* S := Quotient.lift (RingHom.ker f) f (_ : ∀ x ∈ RingHom.ker f, x ∈ RingHom.ker f)
hfg : RingHom.comp g (Quotient.mk (RingHom.ker f)) = f
⊢ Function.Surjective ⇑g

Next tactic:
rw [← hfg] at hf
theorem comp_C_integral_of_surjective_of_jacobson {S : Type*} [Field S] (f : R[X] →+* S)
    (hf : Function.Surjective ↑f) : (f.comp C).IsIntegral := by
  haveI : f.ker.IsMaximal := RingHom.ker_isMaximal_of_surjective f hf
  let g : R[X] ⧸ (RingHom.ker f) →+* S := Ideal.Quotient.lift (RingHom.ker f) f fun _ h => h
  have hfg : g.comp (Quotient.mk (RingHom.ker f)) = f := ringHom_ext' rfl rfl
  rw [← hfg, RingHom.comp_assoc]
  refine (quotient_mk_comp_C_isIntegral_of_jacobson (RingHom.ker f)).trans _ g
    (g.isIntegral_of_surjective ?_)
  rw [← hfg] at hf
  

Proof state:
R : Type u_1
inst✝² : CommRing R
inst✝¹ : IsJacobson R
P : Ideal R[X]
hP : IsMaximal P
S : Type u_2
inst✝ : Field S
f : R[X] →+* S
this : IsMaximal (RingHom.ker f)
g : R[X] ⧸ RingHom.ker f →+* S := Quotient.lift (RingHom.ker f) f (_ : ∀ x ∈ RingHom.ker f, x ∈ RingHom.ker f)
hf : Function.Surjective ⇑(RingHom.comp g (Quotient.mk (RingHom.ker f)))
hfg : RingHom.comp g (Quotient.mk (RingHom.ker f)) = f
⊢ Function.Surjective ⇑g

Next tactic:
norm_num at hf
theorem comp_C_integral_of_surjective_of_jacobson {S : Type*} [Field S] (f : R[X] →+* S)
    (hf : Function.Surjective ↑f) : (f.comp C).IsIntegral := by
  haveI : f.ker.IsMaximal := RingHom.ker_isMaximal_of_surjective f hf
  let g : R[X] ⧸ (RingHom.ker f) →+* S := Ideal.Quotient.lift (RingHom.ker f) f fun _ h => h
  have hfg : g.comp (Quotient.mk (RingHom.ker f)) = f := ringHom_ext' rfl rfl
  rw [← hfg, RingHom.comp_assoc]
  refine (quotient_mk_comp_C_isIntegral_of_jacobson (RingHom.ker f)).trans _ g
    (g.isIntegral_of_surjective ?_)
  rw [← hfg] at hf
  norm_num at hf
  

Proof state:
R : Type u_1
inst✝² : CommRing R
inst✝¹ : IsJacobson R
P : Ideal R[X]
hP : IsMaximal P
S : Type u_2
inst✝ : Field S
f : R[X] →+* S
this : IsMaximal (RingHom.ker f)
g : R[X] ⧸ RingHom.ker f →+* S := Quotient.lift (RingHom.ker f) f (_ : ∀ x ∈ RingHom.ker f, x ∈ RingHom.ker f)
hf :
  Function.Surjective
    (⇑(Quotient.lift (RingHom.ker f) f (_ : ∀ x ∈ RingHom.ker f, x ∈ RingHom.ker f)) ∘ ⇑(Quotient.mk (RingHom.ker f)))
hfg : RingHom.comp g (Quotient.mk (RingHom.ker f)) = f
⊢ Function.Surjective ⇑g

Next tactic:
exact Function.Surjective.of_comp hf
/-- General form of the Nullstellensatz for Jacobson rings, since in a Jacobson ring we have
  `Inf {P maximal | P ≥ I} = Inf {P prime | P ≥ I} = I.radical`. Fields are always Jacobson,
  and in that special case this is (most of) the classical Nullstellensatz,
  since `I(V(I))` is the intersection of maximal ideals containing `I`, which is then `I.radical` -/
instance isJacobson {R : Type*} [CommRing R] {ι : Type*} [Finite ι] [IsJacobson R] :
    IsJacobson (MvPolynomial ι R) := by
  

Proof state:
R : Type u_1
inst✝² : CommRing R
ι : Type u_2
inst✝¹ : _root_.Finite ι
inst✝ : IsJacobson R
⊢ IsJacobson (MvPolynomial ι R)

Next tactic:
cases nonempty_fintype ι
/-- General form of the Nullstellensatz for Jacobson rings, since in a Jacobson ring we have
  `Inf {P maximal | P ≥ I} = Inf {P prime | P ≥ I} = I.radical`. Fields are always Jacobson,
  and in that special case this is (most of) the classical Nullstellensatz,
  since `I(V(I))` is the intersection of maximal ideals containing `I`, which is then `I.radical` -/
instance isJacobson {R : Type*} [CommRing R] {ι : Type*} [Finite ι] [IsJacobson R] :
    IsJacobson (MvPolynomial ι R) := by
  cases nonempty_fintype ι
  

Proof state:
case intro
R : Type u_1
inst✝² : CommRing R
ι : Type u_2
inst✝¹ : _root_.Finite ι
inst✝ : IsJacobson R
val✝ : Fintype ι
⊢ IsJacobson (MvPolynomial ι R)

Next tactic:
haveI := Classical.decEq ι
/-- General form of the Nullstellensatz for Jacobson rings, since in a Jacobson ring we have
  `Inf {P maximal | P ≥ I} = Inf {P prime | P ≥ I} = I.radical`. Fields are always Jacobson,
  and in that special case this is (most of) the classical Nullstellensatz,
  since `I(V(I))` is the intersection of maximal ideals containing `I`, which is then `I.radical` -/
instance isJacobson {R : Type*} [CommRing R] {ι : Type*} [Finite ι] [IsJacobson R] :
    IsJacobson (MvPolynomial ι R) := by
  cases nonempty_fintype ι
  haveI := Classical.decEq ι
  

Proof state:
case intro
R : Type u_1
inst✝² : CommRing R
ι : Type u_2
inst✝¹ : _root_.Finite ι
inst✝ : IsJacobson R
val✝ : Fintype ι
this : DecidableEq ι
⊢ IsJacobson (MvPolynomial ι R)

Next tactic:
let e := Fintype.equivFin ι
/-- General form of the Nullstellensatz for Jacobson rings, since in a Jacobson ring we have
  `Inf {P maximal | P ≥ I} = Inf {P prime | P ≥ I} = I.radical`. Fields are always Jacobson,
  and in that special case this is (most of) the classical Nullstellensatz,
  since `I(V(I))` is the intersection of maximal ideals containing `I`, which is then `I.radical` -/
instance isJacobson {R : Type*} [CommRing R] {ι : Type*} [Finite ι] [IsJacobson R] :
    IsJacobson (MvPolynomial ι R) := by
  cases nonempty_fintype ι
  haveI := Classical.decEq ι
  let e := Fintype.equivFin ι
  

Proof state:
case intro
R : Type u_1
inst✝² : CommRing R
ι : Type u_2
inst✝¹ : _root_.Finite ι
inst✝ : IsJacobson R
val✝ : Fintype ι
this : DecidableEq ι
e : ι ≃ Fin (Fintype.card ι) := Fintype.equivFin ι
⊢ IsJacobson (MvPolynomial ι R)

Next tactic:
rw [isJacobson_iso (renameEquiv R e).toRingEquiv]
/-- General form of the Nullstellensatz for Jacobson rings, since in a Jacobson ring we have
  `Inf {P maximal | P ≥ I} = Inf {P prime | P ≥ I} = I.radical`. Fields are always Jacobson,
  and in that special case this is (most of) the classical Nullstellensatz,
  since `I(V(I))` is the intersection of maximal ideals containing `I`, which is then `I.radical` -/
instance isJacobson {R : Type*} [CommRing R] {ι : Type*} [Finite ι] [IsJacobson R] :
    IsJacobson (MvPolynomial ι R) := by
  cases nonempty_fintype ι
  haveI := Classical.decEq ι
  let e := Fintype.equivFin ι
  rw [isJacobson_iso (renameEquiv R e).toRingEquiv]
  

Proof state:
case intro
R : Type u_1
inst✝² : CommRing R
ι : Type u_2
inst✝¹ : _root_.Finite ι
inst✝ : IsJacobson R
val✝ : Fintype ι
this : DecidableEq ι
e : ι ≃ Fin (Fintype.card ι) := Fintype.equivFin ι
⊢ IsJacobson (MvPolynomial (Fin (Fintype.card ι)) R)

Next tactic:
exact isJacobson_MvPolynomial_fin _
/-- The constant coefficient as an R-linear morphism -/
private noncomputable def Cₐ (R : Type u) (S : Type v)
    [CommRing R] [CommRing S] [Algebra R S] : S →ₐ[R] S[X] :=
  { Polynomial.C with commutes' := fun r => by 

Proof state:
n : ℕ
R : Type u
S : Type v
inst✝² : CommRing R
inst✝¹ : CommRing S
inst✝ : Algebra R S
src✝ : S →+* S[X] := Polynomial.C
r : R
⊢ OneHom.toFun
      (↑↑{ toMonoidHom := ↑src✝, map_zero' := (_ : OneHom.toFun (↑↑src✝) 0 = 0),
            map_add' :=
              (_ : ∀ (x y : S), OneHom.toFun (↑↑src✝) (x + y) = OneHom.toFun (↑↑src✝) x + OneHom.toFun (↑↑src✝) y) })
      ((algebraMap R S) r) =
    (algebraMap R S[X]) r

Next tactic:
rfl
private lemma aux_IH {R : Type u} {S : Type v} {T : Type w}
  [CommRing R] [CommRing S] [CommRing T] [IsJacobson S] [Algebra R S] [Algebra R T]
  (IH : ∀ (Q : Ideal S), (IsMaximal Q) → RingHom.IsIntegral (algebraMap R (S ⧸ Q)))
  (v : S[X] ≃ₐ[R] T) (P : Ideal T) (hP : P.IsMaximal) :
  RingHom.IsIntegral (algebraMap R (T ⧸ P)) := by
  

Proof state:
n : ℕ
R : Type u
S : Type v
T : Type w
inst✝⁵ : CommRing R
inst✝⁴ : CommRing S
inst✝³ : CommRing T
inst✝² : IsJacobson S
inst✝¹ : Algebra R S
inst✝ : Algebra R T
IH : ∀ (Q : Ideal S), IsMaximal Q → RingHom.IsIntegral (algebraMap R (S ⧸ Q))
v : S[X] ≃ₐ[R] T
P : Ideal T
hP : IsMaximal P
⊢ RingHom.IsIntegral (algebraMap R (T ⧸ P))

Next tactic:
let Q := P.comap v.toAlgHom.toRingHom
private lemma aux_IH {R : Type u} {S : Type v} {T : Type w}
  [CommRing R] [CommRing S] [CommRing T] [IsJacobson S] [Algebra R S] [Algebra R T]
  (IH : ∀ (Q : Ideal S), (IsMaximal Q) → RingHom.IsIntegral (algebraMap R (S ⧸ Q)))
  (v : S[X] ≃ₐ[R] T) (P : Ideal T) (hP : P.IsMaximal) :
  RingHom.IsIntegral (algebraMap R (T ⧸ P)) := by
  let Q := P.comap v.toAlgHom.toRingHom
  

Proof state:
n : ℕ
R : Type u
S : Type v
T : Type w
inst✝⁵ : CommRing R
inst✝⁴ : CommRing S
inst✝³ : CommRing T
inst✝² : IsJacobson S
inst✝¹ : Algebra R S
inst✝ : Algebra R T
IH : ∀ (Q : Ideal S), IsMaximal Q → RingHom.IsIntegral (algebraMap R (S ⧸ Q))
v : S[X] ≃ₐ[R] T
P : Ideal T
hP : IsMaximal P
Q : Ideal S[X] := comap (↑↑v) P
⊢ RingHom.IsIntegral (algebraMap R (T ⧸ P))

Next tactic:
have hw : Ideal.map v Q = P := map_comap_of_surjective v v.surjective P
private lemma aux_IH {R : Type u} {S : Type v} {T : Type w}
  [CommRing R] [CommRing S] [CommRing T] [IsJacobson S] [Algebra R S] [Algebra R T]
  (IH : ∀ (Q : Ideal S), (IsMaximal Q) → RingHom.IsIntegral (algebraMap R (S ⧸ Q)))
  (v : S[X] ≃ₐ[R] T) (P : Ideal T) (hP : P.IsMaximal) :
  RingHom.IsIntegral (algebraMap R (T ⧸ P)) := by
  let Q := P.comap v.toAlgHom.toRingHom
  have hw : Ideal.map v Q = P := map_comap_of_surjective v v.surjective P
  

Proof state:
n : ℕ
R : Type u
S : Type v
T : Type w
inst✝⁵ : CommRing R
inst✝⁴ : CommRing S
inst✝³ : CommRing T
inst✝² : IsJacobson S
inst✝¹ : Algebra R S
inst✝ : Algebra R T
IH : ∀ (Q : Ideal S), IsMaximal Q → RingHom.IsIntegral (algebraMap R (S ⧸ Q))
v : S[X] ≃ₐ[R] T
P : Ideal T
hP : IsMaximal P
Q : Ideal S[X] := comap (↑↑v) P
hw : map v Q = P
⊢ RingHom.IsIntegral (algebraMap R (T ⧸ P))

Next tactic:
haveI hQ : IsMaximal Q := comap_isMaximal_of_surjective _ v.surjective
private lemma aux_IH {R : Type u} {S : Type v} {T : Type w}
  [CommRing R] [CommRing S] [CommRing T] [IsJacobson S] [Algebra R S] [Algebra R T]
  (IH : ∀ (Q : Ideal S), (IsMaximal Q) → RingHom.IsIntegral (algebraMap R (S ⧸ Q)))
  (v : S[X] ≃ₐ[R] T) (P : Ideal T) (hP : P.IsMaximal) :
  RingHom.IsIntegral (algebraMap R (T ⧸ P)) := by
  let Q := P.comap v.toAlgHom.toRingHom
  have hw : Ideal.map v Q = P := map_comap_of_surjective v v.surjective P
  haveI hQ : IsMaximal Q := comap_isMaximal_of_surjective _ v.surjective
  

Proof state:
n : ℕ
R : Type u
S : Type v
T : Type w
inst✝⁵ : CommRing R
inst✝⁴ : CommRing S
inst✝³ : CommRing T
inst✝² : IsJacobson S
inst✝¹ : Algebra R S
inst✝ : Algebra R T
IH : ∀ (Q : Ideal S), IsMaximal Q → RingHom.IsIntegral (algebraMap R (S ⧸ Q))
v : S[X] ≃ₐ[R] T
P : Ideal T
hP : IsMaximal P
Q : Ideal S[X] := comap (↑↑v) P
hw : map v Q = P
hQ : IsMaximal Q
⊢ RingHom.IsIntegral (algebraMap R (T ⧸ P))

Next tactic:
let w : (S[X] ⧸ Q) ≃ₐ[R] (T ⧸ P) := Ideal.quotientEquivAlg Q P v hw.symm
private lemma aux_IH {R : Type u} {S : Type v} {T : Type w}
  [CommRing R] [CommRing S] [CommRing T] [IsJacobson S] [Algebra R S] [Algebra R T]
  (IH : ∀ (Q : Ideal S), (IsMaximal Q) → RingHom.IsIntegral (algebraMap R (S ⧸ Q)))
  (v : S[X] ≃ₐ[R] T) (P : Ideal T) (hP : P.IsMaximal) :
  RingHom.IsIntegral (algebraMap R (T ⧸ P)) := by
  let Q := P.comap v.toAlgHom.toRingHom
  have hw : Ideal.map v Q = P := map_comap_of_surjective v v.surjective P
  haveI hQ : IsMaximal Q := comap_isMaximal_of_surjective _ v.surjective
  let w : (S[X] ⧸ Q) ≃ₐ[R] (T ⧸ P) := Ideal.quotientEquivAlg Q P v hw.symm
  

Proof state:
n : ℕ
R : Type u
S : Type v
T : Type w
inst✝⁵ : CommRing R
inst✝⁴ : CommRing S
inst✝³ : CommRing T
inst✝² : IsJacobson S
inst✝¹ : Algebra R S
inst✝ : Algebra R T
IH : ∀ (Q : Ideal S), IsMaximal Q → RingHom.IsIntegral (algebraMap R (S ⧸ Q))
v : S[X] ≃ₐ[R] T
P : Ideal T
hP : IsMaximal P
Q : Ideal S[X] := comap (↑↑v) P
hw : map v Q = P
hQ : IsMaximal Q
w : (S[X] ⧸ Q) ≃ₐ[R] T ⧸ P := quotientEquivAlg Q P v (_ : P = map v Q)
⊢ RingHom.IsIntegral (algebraMap R (T ⧸ P))

Next tactic:
let Q' := Q.comap (Polynomial.C)
private lemma aux_IH {R : Type u} {S : Type v} {T : Type w}
  [CommRing R] [CommRing S] [CommRing T] [IsJacobson S] [Algebra R S] [Algebra R T]
  (IH : ∀ (Q : Ideal S), (IsMaximal Q) → RingHom.IsIntegral (algebraMap R (S ⧸ Q)))
  (v : S[X] ≃ₐ[R] T) (P : Ideal T) (hP : P.IsMaximal) :
  RingHom.IsIntegral (algebraMap R (T ⧸ P)) := by
  let Q := P.comap v.toAlgHom.toRingHom
  have hw : Ideal.map v Q = P := map_comap_of_surjective v v.surjective P
  haveI hQ : IsMaximal Q := comap_isMaximal_of_surjective _ v.surjective
  let w : (S[X] ⧸ Q) ≃ₐ[R] (T ⧸ P) := Ideal.quotientEquivAlg Q P v hw.symm
  let Q' := Q.comap (Polynomial.C)
  

Proof state:
n : ℕ
R : Type u
S : Type v
T : Type w
inst✝⁵ : CommRing R
inst✝⁴ : CommRing S
inst✝³ : CommRing T
inst✝² : IsJacobson S
inst✝¹ : Algebra R S
inst✝ : Algebra R T
IH : ∀ (Q : Ideal S), IsMaximal Q → RingHom.IsIntegral (algebraMap R (S ⧸ Q))
v : S[X] ≃ₐ[R] T
P : Ideal T
hP : IsMaximal P
Q : Ideal S[X] := comap (↑↑v) P
hw : map v Q = P
hQ : IsMaximal Q
w : (S[X] ⧸ Q) ≃ₐ[R] T ⧸ P := quotientEquivAlg Q P v (_ : P = map v Q)
Q' : Ideal S := comap Polynomial.C Q
⊢ RingHom.IsIntegral (algebraMap R (T ⧸ P))

Next tactic:
let w' : (S ⧸ Q') →ₐ[R] (S[X] ⧸ Q) := Ideal.quotientMapₐ Q (Cₐ R S) le_rfl