/-- Used to bootstrap the more general `quotient_mk_comp_C_isIntegral_of_jacobson` -/
private theorem quotient_mk_comp_C_isIntegral_of_jacobson' [Nontrivial R] (hR : IsJacobson R)
    (hP' : ∀ x : R, C x ∈ P → x = 0) : ((Quotient.mk P).comp C : R →+* R[X] ⧸ P).IsIntegral := by
  refine' (isIntegral_quotientMap_iff _).mp _
  let P' : Ideal R := P.comap C
  obtain ⟨pX, hpX, hp0⟩ :=
    exists_nonzero_mem_of_ne_bot (ne_of_lt (bot_lt_of_maximal P polynomial_not_isField)).symm hP'
  let a : R ⧸ P' := (pX.map (Quotient.mk P')).leadingCoeff
  let M : Submonoid (R ⧸ P') := Submonoid.powers a
  let φ : R ⧸ P' →+* R[X] ⧸ P := quotientMap P C le_rfl
  haveI hP'_prime : P'.IsPrime := comap_isPrime C P
  have hM : (0 : R ⧸ P') ∉ M := fun ⟨n, hn⟩ => hp0 <| leadingCoeff_eq_zero.mp (pow_eq_zero hn)
  let M' : Submonoid (R[X] ⧸ P) := M.map φ
  refine' RingHom.IsIntegral.tower_bot φ (algebraMap _ (Localization M')) _ _
  · refine' IsLocalization.injective (Localization M')
      (show M' ≤ _ from le_nonZeroDivisors_of_noZeroDivisors fun hM' => hM _)
    exact
      let ⟨z, zM, z0⟩ := hM'
      quotientMap_injective (_root_.trans z0 φ.map_zero.symm) ▸ zM
  · suffices : RingHom.comp (algebraMap (R[X] ⧸ P) (Localization M')) φ =
      (IsLocalization.map (Localization M') φ M.le_comap_map).comp
        (algebraMap (R ⧸ P') (Localization M))
    rw [this]
    

Proof state:
case intro.intro.refine'_2
R : Type u_1
inst✝² : CommRing R
inst✝¹ : IsJacobson R
P : Ideal R[X]
hP : IsMaximal P
inst✝ : Nontrivial R
hR : IsJacobson R
hP' : ∀ (x : R), C x ∈ P → x = 0
P' : Ideal R := comap C P
pX : R[X]
hpX : pX ∈ P
hp0 : Polynomial.map (Quotient.mk (comap C P)) pX ≠ 0
a : R ⧸ P' := Polynomial.leadingCoeff (Polynomial.map (Quotient.mk P') pX)
M : Submonoid (R ⧸ P') := Submonoid.powers a
φ : R ⧸ P' →+* R[X] ⧸ P := quotientMap P C (_ : P' ≤ P')
hP'_prime : IsPrime P'
hM : 0 ∉ M
M' : Submonoid (R[X] ⧸ P) := Submonoid.map φ M
this :
  RingHom.comp (algebraMap (R[X] ⧸ P) (Localization M')) φ =
    RingHom.comp (IsLocalization.map (Localization M') φ (_ : M ≤ Submonoid.comap φ (Submonoid.map φ M)))
      (algebraMap (R ⧸ P') (Localization M))
⊢ RingHom.IsIntegral
    (RingHom.comp (IsLocalization.map (Localization M') φ (_ : M ≤ Submonoid.comap φ (Submonoid.map φ M)))
      (algebraMap (R ⧸ P') (Localization M)))
case this
R : Type u_1
inst✝² : CommRing R
inst✝¹ : IsJacobson R
P : Ideal R[X]
hP : IsMaximal P
inst✝ : Nontrivial R
hR : IsJacobson R
hP' : ∀ (x : R), C x ∈ P → x = 0
P' : Ideal R := comap C P
pX : R[X]
hpX : pX ∈ P
hp0 : Polynomial.map (Quotient.mk (comap C P)) pX ≠ 0
a : R ⧸ P' := Polynomial.leadingCoeff (Polynomial.map (Quotient.mk P') pX)
M : Submonoid (R ⧸ P') := Submonoid.powers a
φ : R ⧸ P' →+* R[X] ⧸ P := quotientMap P C (_ : P' ≤ P')
hP'_prime : IsPrime P'
hM : 0 ∉ M
M' : Submonoid (R[X] ⧸ P) := Submonoid.map φ M
⊢ RingHom.comp (algebraMap (R[X] ⧸ P) (Localization M')) φ =
    RingHom.comp (IsLocalization.map (Localization M') φ (_ : M ≤ Submonoid.comap φ (Submonoid.map φ M)))
      (algebraMap (R ⧸ P') (Localization M))

Next tactic:
refine' RingHom.IsIntegral.trans (algebraMap (R ⧸ P') (Localization M))
      (IsLocalization.map (Localization M') φ M.le_comap_map) _ _