[GOAL]
R : Type u_1
inst✝¹ : CommRing R
S : Type u_2
inst✝ : CommRing S
f : R →+* S
I J : Ideal S
r : S
hr : r ∈ I
p : R[X]
hp : eval₂ f r p ∈ I
⊢ coeff p 0 ∈ comap f I
[PROOFSTEP]
rw [← p.divX_mul_X_add, eval₂_add, eval₂_C, eval₂_mul, eval₂_X] at hp 
[GOAL]
R : Type u_1
inst✝¹ : CommRing R
S : Type u_2
inst✝ : CommRing S
f : R →+* S
I J : Ideal S
r : S
hr : r ∈ I
p : R[X]
hp : eval₂ f r (divX p) * r + ↑f (coeff p 0) ∈ I
⊢ coeff p 0 ∈ comap f I
[PROOFSTEP]
refine' mem_comap.mpr ((I.add_mem_iff_right _).mp hp)
[GOAL]
R : Type u_1
inst✝¹ : CommRing R
S : Type u_2
inst✝ : CommRing S
f : R →+* S
I J : Ideal S
r : S
hr : r ∈ I
p : R[X]
hp : eval₂ f r (divX p) * r + ↑f (coeff p 0) ∈ I
⊢ eval₂ f r (divX p) * r ∈ I
[PROOFSTEP]
exact I.mul_mem_left _ hr
[GOAL]
R : Type u_1
inst✝¹ : CommRing R
S : Type u_2
inst✝ : CommRing S
f : R →+* S
I J : Ideal S
r : S
r_non_zero_divisor : ∀ {x : S}, x * r = 0 → x = 0
hr : r ∈ I
p : R[X]
⊢ p ≠ 0 → eval₂ f r p = 0 → ∃ i, coeff p i ≠ 0 ∧ coeff p i ∈ comap f I
[PROOFSTEP]
refine' p.recOnHorner _ _ _
[GOAL]
case refine'_1
R : Type u_1
inst✝¹ : CommRing R
S : Type u_2
inst✝ : CommRing S
f : R →+* S
I J : Ideal S
r : S
r_non_zero_divisor : ∀ {x : S}, x * r = 0 → x = 0
hr : r ∈ I
p : R[X]
⊢ 0 ≠ 0 → eval₂ f r 0 = 0 → ∃ i, coeff 0 i ≠ 0 ∧ coeff 0 i ∈ comap f I
[PROOFSTEP]
intro h
[GOAL]
case refine'_1
R : Type u_1
inst✝¹ : CommRing R
S : Type u_2
inst✝ : CommRing S
f : R →+* S
I J : Ideal S
r : S
r_non_zero_divisor : ∀ {x : S}, x * r = 0 → x = 0
hr : r ∈ I
p : R[X]
h : 0 ≠ 0
⊢ eval₂ f r 0 = 0 → ∃ i, coeff 0 i ≠ 0 ∧ coeff 0 i ∈ comap f I
[PROOFSTEP]
contradiction
[GOAL]
case refine'_2
R : Type u_1
inst✝¹ : CommRing R
S : Type u_2
inst✝ : CommRing S
f : R →+* S
I J : Ideal S
r : S
r_non_zero_divisor : ∀ {x : S}, x * r = 0 → x = 0
hr : r ∈ I
p : R[X]
⊢ ∀ (p : R[X]) (a : R),
    coeff p 0 = 0 →
      a ≠ 0 →
        (p ≠ 0 → eval₂ f r p = 0 → ∃ i, coeff p i ≠ 0 ∧ coeff p i ∈ comap f I) →
          p + ↑C a ≠ 0 → eval₂ f r (p + ↑C a) = 0 → ∃ i, coeff (p + ↑C a) i ≠ 0 ∧ coeff (p + ↑C a) i ∈ comap f I
[PROOFSTEP]
intro p a coeff_eq_zero a_ne_zero _ _ hp
[GOAL]
case refine'_2
R : Type u_1
inst✝¹ : CommRing R
S : Type u_2
inst✝ : CommRing S
f : R →+* S
I J : Ideal S
r : S
r_non_zero_divisor : ∀ {x : S}, x * r = 0 → x = 0
hr : r ∈ I
p✝ p : R[X]
a : R
coeff_eq_zero : coeff p 0 = 0
a_ne_zero : a ≠ 0
a✝ : p ≠ 0 → eval₂ f r p = 0 → ∃ i, coeff p i ≠ 0 ∧ coeff p i ∈ comap f I
x✝ : p + ↑C a ≠ 0
hp : eval₂ f r (p + ↑C a) = 0
⊢ ∃ i, coeff (p + ↑C a) i ≠ 0 ∧ coeff (p + ↑C a) i ∈ comap f I
[PROOFSTEP]
refine' ⟨0, _, coeff_zero_mem_comap_of_root_mem hr hp⟩
[GOAL]
case refine'_2
R : Type u_1
inst✝¹ : CommRing R
S : Type u_2
inst✝ : CommRing S
f : R →+* S
I J : Ideal S
r : S
r_non_zero_divisor : ∀ {x : S}, x * r = 0 → x = 0
hr : r ∈ I
p✝ p : R[X]
a : R
coeff_eq_zero : coeff p 0 = 0
a_ne_zero : a ≠ 0
a✝ : p ≠ 0 → eval₂ f r p = 0 → ∃ i, coeff p i ≠ 0 ∧ coeff p i ∈ comap f I
x✝ : p + ↑C a ≠ 0
hp : eval₂ f r (p + ↑C a) = 0
⊢ coeff (p + ↑C a) 0 ≠ 0
[PROOFSTEP]
simp [coeff_eq_zero, a_ne_zero]
[GOAL]
case refine'_3
R : Type u_1
inst✝¹ : CommRing R
S : Type u_2
inst✝ : CommRing S
f : R →+* S
I J : Ideal S
r : S
r_non_zero_divisor : ∀ {x : S}, x * r = 0 → x = 0
hr : r ∈ I
p : R[X]
⊢ ∀ (p : R[X]),
    p ≠ 0 →
      (p ≠ 0 → eval₂ f r p = 0 → ∃ i, coeff p i ≠ 0 ∧ coeff p i ∈ comap f I) →
        p * X ≠ 0 → eval₂ f r (p * X) = 0 → ∃ i, coeff (p * X) i ≠ 0 ∧ coeff (p * X) i ∈ comap f I
[PROOFSTEP]
intro p p_nonzero ih _ hp
[GOAL]
case refine'_3
R : Type u_1
inst✝¹ : CommRing R
S : Type u_2
inst✝ : CommRing S
f : R →+* S
I J : Ideal S
r : S
r_non_zero_divisor : ∀ {x : S}, x * r = 0 → x = 0
hr : r ∈ I
p✝ p : R[X]
p_nonzero : p ≠ 0
ih : p ≠ 0 → eval₂ f r p = 0 → ∃ i, coeff p i ≠ 0 ∧ coeff p i ∈ comap f I
x✝ : p * X ≠ 0
hp : eval₂ f r (p * X) = 0
⊢ ∃ i, coeff (p * X) i ≠ 0 ∧ coeff (p * X) i ∈ comap f I
[PROOFSTEP]
rw [eval₂_mul, eval₂_X] at hp 
[GOAL]
case refine'_3
R : Type u_1
inst✝¹ : CommRing R
S : Type u_2
inst✝ : CommRing S
f : R →+* S
I J : Ideal S
r : S
r_non_zero_divisor : ∀ {x : S}, x * r = 0 → x = 0
hr : r ∈ I
p✝ p : R[X]
p_nonzero : p ≠ 0
ih : p ≠ 0 → eval₂ f r p = 0 → ∃ i, coeff p i ≠ 0 ∧ coeff p i ∈ comap f I
x✝ : p * X ≠ 0
hp : eval₂ f r p * r = 0
⊢ ∃ i, coeff (p * X) i ≠ 0 ∧ coeff (p * X) i ∈ comap f I
[PROOFSTEP]
obtain ⟨i, hi, mem⟩ := ih p_nonzero (r_non_zero_divisor hp)
[GOAL]
case refine'_3.intro.intro
R : Type u_1
inst✝¹ : CommRing R
S : Type u_2
inst✝ : CommRing S
f : R →+* S
I J : Ideal S
r : S
r_non_zero_divisor : ∀ {x : S}, x * r = 0 → x = 0
hr : r ∈ I
p✝ p : R[X]
p_nonzero : p ≠ 0
ih : p ≠ 0 → eval₂ f r p = 0 → ∃ i, coeff p i ≠ 0 ∧ coeff p i ∈ comap f I
x✝ : p * X ≠ 0
hp : eval₂ f r p * r = 0
i : ℕ
hi : coeff p i ≠ 0
mem : coeff p i ∈ comap f I
⊢ ∃ i, coeff (p * X) i ≠ 0 ∧ coeff (p * X) i ∈ comap f I
[PROOFSTEP]
refine' ⟨i + 1, _, _⟩
[GOAL]
case refine'_3.intro.intro.refine'_1
R : Type u_1
inst✝¹ : CommRing R
S : Type u_2
inst✝ : CommRing S
f : R →+* S
I J : Ideal S
r : S
r_non_zero_divisor : ∀ {x : S}, x * r = 0 → x = 0
hr : r ∈ I
p✝ p : R[X]
p_nonzero : p ≠ 0
ih : p ≠ 0 → eval₂ f r p = 0 → ∃ i, coeff p i ≠ 0 ∧ coeff p i ∈ comap f I
x✝ : p * X ≠ 0
hp : eval₂ f r p * r = 0
i : ℕ
hi : coeff p i ≠ 0
mem : coeff p i ∈ comap f I
⊢ coeff (p * X) (i + 1) ≠ 0
[PROOFSTEP]
simp [hi, mem]
[GOAL]
case refine'_3.intro.intro.refine'_2
R : Type u_1
inst✝¹ : CommRing R
S : Type u_2
inst✝ : CommRing S
f : R →+* S
I J : Ideal S
r : S
r_non_zero_divisor : ∀ {x : S}, x * r = 0 → x = 0
hr : r ∈ I
p✝ p : R[X]
p_nonzero : p ≠ 0
ih : p ≠ 0 → eval₂ f r p = 0 → ∃ i, coeff p i ≠ 0 ∧ coeff p i ∈ comap f I
x✝ : p * X ≠ 0
hp : eval₂ f r p * r = 0
i : ℕ
hi : coeff p i ≠ 0
mem : coeff p i ∈ comap f I
⊢ coeff (p * X) (i + 1) ∈ comap f I
[PROOFSTEP]
simpa [hi] using mem
[GOAL]
R : Type u_1
inst✝¹ : CommRing R
S : Type u_2
inst✝ : CommRing S
f : R →+* S
I J : Ideal S
P : Ideal R[X]
⊢ Function.Injective
    ↑(quotientMap (map (mapRingHom (Quotient.mk (comap C P))) P) (mapRingHom (Quotient.mk (comap C P)))
        (_ : P ≤ comap (mapRingHom (Quotient.mk (comap C P))) (map (mapRingHom (Quotient.mk (comap C P))) P)))
[PROOFSTEP]
refine' quotientMap_injective' (le_of_eq _)
[GOAL]
R : Type u_1
inst✝¹ : CommRing R
S : Type u_2
inst✝ : CommRing S
f : R →+* S
I J : Ideal S
P : Ideal R[X]
⊢ comap (mapRingHom (Quotient.mk (comap C P))) (map (mapRingHom (Quotient.mk (comap C P))) P) = P
[PROOFSTEP]
rw [comap_map_of_surjective (mapRingHom (Ideal.Quotient.mk (P.comap (C : R →+* R[X]))))
    (map_surjective (Ideal.Quotient.mk (P.comap (C : R →+* R[X]))) Ideal.Quotient.mk_surjective)]
[GOAL]
R : Type u_1
inst✝¹ : CommRing R
S : Type u_2
inst✝ : CommRing S
f : R →+* S
I J : Ideal S
P : Ideal R[X]
⊢ P ⊔ comap (mapRingHom (Quotient.mk (comap C P))) ⊥ = P
[PROOFSTEP]
refine' le_antisymm (sup_le le_rfl _) (le_sup_of_le_left le_rfl)
[GOAL]
R : Type u_1
inst✝¹ : CommRing R
S : Type u_2
inst✝ : CommRing S
f : R →+* S
I J : Ideal S
P : Ideal R[X]
⊢ comap (mapRingHom (Quotient.mk (comap C P))) ⊥ ≤ P
[PROOFSTEP]
refine' fun p hp => polynomial_mem_ideal_of_coeff_mem_ideal P p fun n => Ideal.Quotient.eq_zero_iff_mem.mp _
[GOAL]
R : Type u_1
inst✝¹ : CommRing R
S : Type u_2
inst✝ : CommRing S
f : R →+* S
I J : Ideal S
P : Ideal R[X]
p : R[X]
hp : p ∈ comap (mapRingHom (Quotient.mk (comap C P))) ⊥
n : ℕ
⊢ ↑(Quotient.mk (comap C P)) (coeff p n) = 0
[PROOFSTEP]
simpa only [coeff_map, coe_mapRingHom] using ext_iff.mp (Ideal.mem_bot.mp (mem_comap.mp hp)) n
[GOAL]
R : Type u_1
inst✝¹ : CommRing R
S : Type u_2
inst✝ : CommRing S
f : R →+* S
I J : Ideal S
P : Ideal R[X]
⊢ RingHom.comp (RingHom.comp (Quotient.mk (map (mapRingHom (Quotient.mk (comap C P))) P)) C) (Quotient.mk (comap C P)) =
    RingHom.comp
      (quotientMap (map (mapRingHom (Quotient.mk (comap C P))) P) (mapRingHom (Quotient.mk (comap C P)))
        (_ : P ≤ comap (mapRingHom (Quotient.mk (comap C P))) (map (mapRingHom (Quotient.mk (comap C P))) P)))
      (RingHom.comp (Quotient.mk P) C)
[PROOFSTEP]
refine' RingHom.ext fun x => _
[GOAL]
R : Type u_1
inst✝¹ : CommRing R
S : Type u_2
inst✝ : CommRing S
f : R →+* S
I J : Ideal S
P : Ideal R[X]
x : R
⊢ ↑(RingHom.comp (RingHom.comp (Quotient.mk (map (mapRingHom (Quotient.mk (comap C P))) P)) C)
          (Quotient.mk (comap C P)))
      x =
    ↑(RingHom.comp
          (quotientMap (map (mapRingHom (Quotient.mk (comap C P))) P) (mapRingHom (Quotient.mk (comap C P)))
            (_ : P ≤ comap (mapRingHom (Quotient.mk (comap C P))) (map (mapRingHom (Quotient.mk (comap C P))) P)))
          (RingHom.comp (Quotient.mk P) C))
      x
[PROOFSTEP]
repeat' rw [RingHom.coe_comp, Function.comp_apply]
[GOAL]
R : Type u_1
inst✝¹ : CommRing R
S : Type u_2
inst✝ : CommRing S
f : R →+* S
I J : Ideal S
P : Ideal R[X]
x : R
⊢ ↑(RingHom.comp (RingHom.comp (Quotient.mk (map (mapRingHom (Quotient.mk (comap C P))) P)) C)
          (Quotient.mk (comap C P)))
      x =
    ↑(RingHom.comp
          (quotientMap (map (mapRingHom (Quotient.mk (comap C P))) P) (mapRingHom (Quotient.mk (comap C P)))
            (_ : P ≤ comap (mapRingHom (Quotient.mk (comap C P))) (map (mapRingHom (Quotient.mk (comap C P))) P)))
          (RingHom.comp (Quotient.mk P) C))
      x
[PROOFSTEP]
rw [RingHom.coe_comp, Function.comp_apply]
[GOAL]
R : Type u_1
inst✝¹ : CommRing R
S : Type u_2
inst✝ : CommRing S
f : R →+* S
I J : Ideal S
P : Ideal R[X]
x : R
⊢ ↑(RingHom.comp (Quotient.mk (map (mapRingHom (Quotient.mk (comap C P))) P)) C) (↑(Quotient.mk (comap C P)) x) =
    ↑(RingHom.comp
          (quotientMap (map (mapRingHom (Quotient.mk (comap C P))) P) (mapRingHom (Quotient.mk (comap C P)))
            (_ : P ≤ comap (mapRingHom (Quotient.mk (comap C P))) (map (mapRingHom (Quotient.mk (comap C P))) P)))
          (RingHom.comp (Quotient.mk P) C))
      x
[PROOFSTEP]
rw [RingHom.coe_comp, Function.comp_apply]
[GOAL]
R : Type u_1
inst✝¹ : CommRing R
S : Type u_2
inst✝ : CommRing S
f : R →+* S
I J : Ideal S
P : Ideal R[X]
x : R
⊢ ↑(Quotient.mk (map (mapRingHom (Quotient.mk (comap C P))) P)) (↑C (↑(Quotient.mk (comap C P)) x)) =
    ↑(RingHom.comp
          (quotientMap (map (mapRingHom (Quotient.mk (comap C P))) P) (mapRingHom (Quotient.mk (comap C P)))
            (_ : P ≤ comap (mapRingHom (Quotient.mk (comap C P))) (map (mapRingHom (Quotient.mk (comap C P))) P)))
          (RingHom.comp (Quotient.mk P) C))
      x
[PROOFSTEP]
rw [RingHom.coe_comp, Function.comp_apply]
[GOAL]
R : Type u_1
inst✝¹ : CommRing R
S : Type u_2
inst✝ : CommRing S
f : R →+* S
I J : Ideal S
P : Ideal R[X]
x : R
⊢ ↑(Quotient.mk (map (mapRingHom (Quotient.mk (comap C P))) P)) (↑C (↑(Quotient.mk (comap C P)) x)) =
    ↑(quotientMap (map (mapRingHom (Quotient.mk (comap C P))) P) (mapRingHom (Quotient.mk (comap C P)))
          (_ : P ≤ comap (mapRingHom (Quotient.mk (comap C P))) (map (mapRingHom (Quotient.mk (comap C P))) P)))
      (↑(RingHom.comp (Quotient.mk P) C) x)
[PROOFSTEP]
rw [RingHom.coe_comp, Function.comp_apply]
[GOAL]
R : Type u_1
inst✝¹ : CommRing R
S : Type u_2
inst✝ : CommRing S
f : R →+* S
I J : Ideal S
P : Ideal R[X]
x : R
⊢ ↑(Quotient.mk (map (mapRingHom (Quotient.mk (comap C P))) P)) (↑C (↑(Quotient.mk (comap C P)) x)) =
    ↑(quotientMap (map (mapRingHom (Quotient.mk (comap C P))) P) (mapRingHom (Quotient.mk (comap C P)))
          (_ : P ≤ comap (mapRingHom (Quotient.mk (comap C P))) (map (mapRingHom (Quotient.mk (comap C P))) P)))
      (↑(Quotient.mk P) (↑C x))
[PROOFSTEP]
rw [RingHom.coe_comp, Function.comp_apply]
[GOAL]
R : Type u_1
inst✝¹ : CommRing R
S : Type u_2
inst✝ : CommRing S
f : R →+* S
I J : Ideal S
P : Ideal R[X]
x : R
⊢ ↑(Quotient.mk (map (mapRingHom (Quotient.mk (comap C P))) P)) (↑C (↑(Quotient.mk (comap C P)) x)) =
    ↑(quotientMap (map (mapRingHom (Quotient.mk (comap C P))) P) (mapRingHom (Quotient.mk (comap C P)))
          (_ : P ≤ comap (mapRingHom (Quotient.mk (comap C P))) (map (mapRingHom (Quotient.mk (comap C P))) P)))
      (↑(Quotient.mk P) (↑C x))
[PROOFSTEP]
rw [quotientMap_mk, coe_mapRingHom, map_C]
[GOAL]
R : Type u_1
inst✝¹ : CommRing R
S : Type u_2
inst✝ : CommRing S
f : R →+* S
I J : Ideal S
P : Ideal R[X]
Pb : P ≠ ⊥
hP : ∀ (x : R), ↑C x ∈ P → x = 0
⊢ ∃ p, p ∈ P ∧ Polynomial.map (Quotient.mk (comap C P)) p ≠ 0
[PROOFSTEP]
obtain ⟨m, hm⟩ := Submodule.nonzero_mem_of_bot_lt (bot_lt_iff_ne_bot.mpr Pb)
[GOAL]
case intro
R : Type u_1
inst✝¹ : CommRing R
S : Type u_2
inst✝ : CommRing S
f : R →+* S
I J : Ideal S
P : Ideal R[X]
Pb : P ≠ ⊥
hP : ∀ (x : R), ↑C x ∈ P → x = 0
m : { x // x ∈ P }
hm : m ≠ 0
⊢ ∃ p, p ∈ P ∧ Polynomial.map (Quotient.mk (comap C P)) p ≠ 0
[PROOFSTEP]
refine' ⟨m, Submodule.coe_mem m, fun pp0 => hm (Submodule.coe_eq_zero.mp _)⟩
[GOAL]
case intro
R : Type u_1
inst✝¹ : CommRing R
S : Type u_2
inst✝ : CommRing S
f : R →+* S
I J : Ideal S
P : Ideal R[X]
Pb : P ≠ ⊥
hP : ∀ (x : R), ↑C x ∈ P → x = 0
m : { x // x ∈ P }
hm : m ≠ 0
pp0 : Polynomial.map (Quotient.mk (comap C P)) ↑m = 0
⊢ ↑m = 0
[PROOFSTEP]
refine' (injective_iff_map_eq_zero (Polynomial.mapRingHom (Ideal.Quotient.mk (P.comap (C : R →+* R[X]))))).mp _ _ pp0
[GOAL]
case intro
R : Type u_1
inst✝¹ : CommRing R
S : Type u_2
inst✝ : CommRing S
f : R →+* S
I J : Ideal S
P : Ideal R[X]
Pb : P ≠ ⊥
hP : ∀ (x : R), ↑C x ∈ P → x = 0
m : { x // x ∈ P }
hm : m ≠ 0
pp0 : Polynomial.map (Quotient.mk (comap C P)) ↑m = 0
⊢ Function.Injective ↑(mapRingHom (Quotient.mk (comap C P)))
[PROOFSTEP]
refine' map_injective _ ((Ideal.Quotient.mk (P.comap C)).injective_iff_ker_eq_bot.mpr _)
[GOAL]
case intro
R : Type u_1
inst✝¹ : CommRing R
S : Type u_2
inst✝ : CommRing S
f : R →+* S
I J : Ideal S
P : Ideal R[X]
Pb : P ≠ ⊥
hP : ∀ (x : R), ↑C x ∈ P → x = 0
m : { x // x ∈ P }
hm : m ≠ 0
pp0 : Polynomial.map (Quotient.mk (comap C P)) ↑m = 0
⊢ RingHom.ker (Quotient.mk (comap C P)) = ⊥
[PROOFSTEP]
rw [mk_ker]
[GOAL]
case intro
R : Type u_1
inst✝¹ : CommRing R
S : Type u_2
inst✝ : CommRing S
f : R →+* S
I J : Ideal S
P : Ideal R[X]
Pb : P ≠ ⊥
hP : ∀ (x : R), ↑C x ∈ P → x = 0
m : { x // x ∈ P }
hm : m ≠ 0
pp0 : Polynomial.map (Quotient.mk (comap C P)) ↑m = 0
⊢ comap C P = ⊥
[PROOFSTEP]
exact (Submodule.eq_bot_iff _).mpr fun x hx => hP x (mem_comap.mp hx)
[GOAL]
R : Type u_1
inst✝⁴ : CommRing R
S : Type u_2
inst✝³ : CommRing S
f : R →+* S
I J : Ideal S
p : Ideal R
P : Ideal S
inst✝² : Algebra R S
inst✝¹ : Algebra (R ⧸ p) (S ⧸ P)
inst✝ : IsScalarTower R (R ⧸ p) (S ⧸ P)
h : Function.Injective ↑(algebraMap (R ⧸ p) (S ⧸ P))
⊢ comap (algebraMap R S) P = p
[PROOFSTEP]
ext x
[GOAL]
case h
R : Type u_1
inst✝⁴ : CommRing R
S : Type u_2
inst✝³ : CommRing S
f : R →+* S
I J : Ideal S
p : Ideal R
P : Ideal S
inst✝² : Algebra R S
inst✝¹ : Algebra (R ⧸ p) (S ⧸ P)
inst✝ : IsScalarTower R (R ⧸ p) (S ⧸ P)
h : Function.Injective ↑(algebraMap (R ⧸ p) (S ⧸ P))
x : R
⊢ x ∈ comap (algebraMap R S) P ↔ x ∈ p
[PROOFSTEP]
constructor
[GOAL]
case h.mp
R : Type u_1
inst✝⁴ : CommRing R
S : Type u_2
inst✝³ : CommRing S
f : R →+* S
I J : Ideal S
p : Ideal R
P : Ideal S
inst✝² : Algebra R S
inst✝¹ : Algebra (R ⧸ p) (S ⧸ P)
inst✝ : IsScalarTower R (R ⧸ p) (S ⧸ P)
h : Function.Injective ↑(algebraMap (R ⧸ p) (S ⧸ P))
x : R
⊢ x ∈ comap (algebraMap R S) P → x ∈ p
[PROOFSTEP]
rw [mem_comap, ← Quotient.eq_zero_iff_mem, ← Quotient.eq_zero_iff_mem, Quotient.mk_algebraMap,
  IsScalarTower.algebraMap_apply R (R ⧸ p) (S ⧸ P), Quotient.algebraMap_eq]
[GOAL]
case h.mpr
R : Type u_1
inst✝⁴ : CommRing R
S : Type u_2
inst✝³ : CommRing S
f : R →+* S
I J : Ideal S
p : Ideal R
P : Ideal S
inst✝² : Algebra R S
inst✝¹ : Algebra (R ⧸ p) (S ⧸ P)
inst✝ : IsScalarTower R (R ⧸ p) (S ⧸ P)
h : Function.Injective ↑(algebraMap (R ⧸ p) (S ⧸ P))
x : R
⊢ x ∈ p → x ∈ comap (algebraMap R S) P
[PROOFSTEP]
rw [mem_comap, ← Quotient.eq_zero_iff_mem, ← Quotient.eq_zero_iff_mem, Quotient.mk_algebraMap,
  IsScalarTower.algebraMap_apply R (R ⧸ p) (S ⧸ P), Quotient.algebraMap_eq]
[GOAL]
case h.mp
R : Type u_1
inst✝⁴ : CommRing R
S : Type u_2
inst✝³ : CommRing S
f : R →+* S
I J : Ideal S
p : Ideal R
P : Ideal S
inst✝² : Algebra R S
inst✝¹ : Algebra (R ⧸ p) (S ⧸ P)
inst✝ : IsScalarTower R (R ⧸ p) (S ⧸ P)
h : Function.Injective ↑(algebraMap (R ⧸ p) (S ⧸ P))
x : R
⊢ ↑(algebraMap (R ⧸ p) (S ⧸ P)) (↑(Quotient.mk p) x) = 0 → ↑(Quotient.mk p) x = 0
[PROOFSTEP]
intro hx
[GOAL]
case h.mp
R : Type u_1
inst✝⁴ : CommRing R
S : Type u_2
inst✝³ : CommRing S
f : R →+* S
I J : Ideal S
p : Ideal R
P : Ideal S
inst✝² : Algebra R S
inst✝¹ : Algebra (R ⧸ p) (S ⧸ P)
inst✝ : IsScalarTower R (R ⧸ p) (S ⧸ P)
h : Function.Injective ↑(algebraMap (R ⧸ p) (S ⧸ P))
x : R
hx : ↑(algebraMap (R ⧸ p) (S ⧸ P)) (↑(Quotient.mk p) x) = 0
⊢ ↑(Quotient.mk p) x = 0
[PROOFSTEP]
exact (injective_iff_map_eq_zero (algebraMap (R ⧸ p) (S ⧸ P))).mp h _ hx
[GOAL]
case h.mpr
R : Type u_1
inst✝⁴ : CommRing R
S : Type u_2
inst✝³ : CommRing S
f : R →+* S
I J : Ideal S
p : Ideal R
P : Ideal S
inst✝² : Algebra R S
inst✝¹ : Algebra (R ⧸ p) (S ⧸ P)
inst✝ : IsScalarTower R (R ⧸ p) (S ⧸ P)
h : Function.Injective ↑(algebraMap (R ⧸ p) (S ⧸ P))
x : R
⊢ ↑(Quotient.mk p) x = 0 → ↑(algebraMap (R ⧸ p) (S ⧸ P)) (↑(Quotient.mk p) x) = 0
[PROOFSTEP]
intro hx
[GOAL]
case h.mpr
R : Type u_1
inst✝⁴ : CommRing R
S : Type u_2
inst✝³ : CommRing S
f : R →+* S
I J : Ideal S
p : Ideal R
P : Ideal S
inst✝² : Algebra R S
inst✝¹ : Algebra (R ⧸ p) (S ⧸ P)
inst✝ : IsScalarTower R (R ⧸ p) (S ⧸ P)
h : Function.Injective ↑(algebraMap (R ⧸ p) (S ⧸ P))
x : R
hx : ↑(Quotient.mk p) x = 0
⊢ ↑(algebraMap (R ⧸ p) (S ⧸ P)) (↑(Quotient.mk p) x) = 0
[PROOFSTEP]
rw [hx, RingHom.map_zero]
[GOAL]
R : Type u_1
inst✝² : CommRing R
S : Type u_2
inst✝¹ : CommRing S
f : R →+* S
I J : Ideal S
p : Ideal R
P : Ideal S
inst✝ : Algebra R S
x : R
⊢ ↑(algebraMap R (S ⧸ map (algebraMap R S) p)) x =
    ↑(algebraMap (R ⧸ p) (S ⧸ map (algebraMap R S) p)) (↑(algebraMap R (R ⧸ p)) x)
[PROOFSTEP]
rw [Quotient.algebraMap_eq, Quotient.algebraMap_quotient_map_quotient, Quotient.mk_algebraMap]
[GOAL]
R : Type u_1
inst✝² : CommRing R
S : Type u_2
inst✝¹ : CommRing S
f : R →+* S
I J : Ideal S
inst✝ : IsPrime I
hIJ : I ≤ J
r : S
hr : r ∈ ↑J \ ↑I
p : R[X]
p_ne_zero : Polynomial.map (Quotient.mk (comap f I)) p ≠ 0
hpI : eval₂ f r p ∈ I
⊢ ∃ i, coeff p i ∈ ↑(comap f J) \ ↑(comap f I)
[PROOFSTEP]
obtain ⟨hrJ, hrI⟩ := hr
[GOAL]
case intro
R : Type u_1
inst✝² : CommRing R
S : Type u_2
inst✝¹ : CommRing S
f : R →+* S
I J : Ideal S
inst✝ : IsPrime I
hIJ : I ≤ J
r : S
p : R[X]
p_ne_zero : Polynomial.map (Quotient.mk (comap f I)) p ≠ 0
hpI : eval₂ f r p ∈ I
hrJ : r ∈ ↑J
hrI : ¬r ∈ ↑I
⊢ ∃ i, coeff p i ∈ ↑(comap f J) \ ↑(comap f I)
[PROOFSTEP]
have rbar_ne_zero : Ideal.Quotient.mk I r ≠ 0 := mt (Quotient.mk_eq_zero I).mp hrI
[GOAL]
case intro
R : Type u_1
inst✝² : CommRing R
S : Type u_2
inst✝¹ : CommRing S
f : R →+* S
I J : Ideal S
inst✝ : IsPrime I
hIJ : I ≤ J
r : S
p : R[X]
p_ne_zero : Polynomial.map (Quotient.mk (comap f I)) p ≠ 0
hpI : eval₂ f r p ∈ I
hrJ : r ∈ ↑J
hrI : ¬r ∈ ↑I
rbar_ne_zero : ↑(Quotient.mk I) r ≠ 0
⊢ ∃ i, coeff p i ∈ ↑(comap f J) \ ↑(comap f I)
[PROOFSTEP]
have rbar_mem_J : Ideal.Quotient.mk I r ∈ J.map (Ideal.Quotient.mk I) := mem_map_of_mem _ hrJ
[GOAL]
case intro
R : Type u_1
inst✝² : CommRing R
S : Type u_2
inst✝¹ : CommRing S
f : R →+* S
I J : Ideal S
inst✝ : IsPrime I
hIJ : I ≤ J
r : S
p : R[X]
p_ne_zero : Polynomial.map (Quotient.mk (comap f I)) p ≠ 0
hpI : eval₂ f r p ∈ I
hrJ : r ∈ ↑J
hrI : ¬r ∈ ↑I
rbar_ne_zero : ↑(Quotient.mk I) r ≠ 0
rbar_mem_J : ↑(Quotient.mk I) r ∈ map (Quotient.mk I) J
⊢ ∃ i, coeff p i ∈ ↑(comap f J) \ ↑(comap f I)
[PROOFSTEP]
have quotient_f : ∀ x ∈ I.comap f, (Ideal.Quotient.mk I).comp f x = 0 := by simp [Quotient.eq_zero_iff_mem]
[GOAL]
R : Type u_1
inst✝² : CommRing R
S : Type u_2
inst✝¹ : CommRing S
f : R →+* S
I J : Ideal S
inst✝ : IsPrime I
hIJ : I ≤ J
r : S
p : R[X]
p_ne_zero : Polynomial.map (Quotient.mk (comap f I)) p ≠ 0
hpI : eval₂ f r p ∈ I
hrJ : r ∈ ↑J
hrI : ¬r ∈ ↑I
rbar_ne_zero : ↑(Quotient.mk I) r ≠ 0
rbar_mem_J : ↑(Quotient.mk I) r ∈ map (Quotient.mk I) J
⊢ ∀ (x : R), x ∈ comap f I → ↑(RingHom.comp (Quotient.mk I) f) x = 0
[PROOFSTEP]
simp [Quotient.eq_zero_iff_mem]
[GOAL]
case intro
R : Type u_1
inst✝² : CommRing R
S : Type u_2
inst✝¹ : CommRing S
f : R →+* S
I J : Ideal S
inst✝ : IsPrime I
hIJ : I ≤ J
r : S
p : R[X]
p_ne_zero : Polynomial.map (Quotient.mk (comap f I)) p ≠ 0
hpI : eval₂ f r p ∈ I
hrJ : r ∈ ↑J
hrI : ¬r ∈ ↑I
rbar_ne_zero : ↑(Quotient.mk I) r ≠ 0
rbar_mem_J : ↑(Quotient.mk I) r ∈ map (Quotient.mk I) J
quotient_f : ∀ (x : R), x ∈ comap f I → ↑(RingHom.comp (Quotient.mk I) f) x = 0
⊢ ∃ i, coeff p i ∈ ↑(comap f J) \ ↑(comap f I)
[PROOFSTEP]
have rbar_root :
  (p.map (Ideal.Quotient.mk (I.comap f))).eval₂ (Quotient.lift (I.comap f) _ quotient_f) (Ideal.Quotient.mk I r) = 0 :=
  by
  convert Quotient.eq_zero_iff_mem.mpr hpI
  exact _root_.trans (eval₂_map _ _ _) (hom_eval₂ p f (Ideal.Quotient.mk I) r).symm
[GOAL]
R : Type u_1
inst✝² : CommRing R
S : Type u_2
inst✝¹ : CommRing S
f : R →+* S
I J : Ideal S
inst✝ : IsPrime I
hIJ : I ≤ J
r : S
p : R[X]
p_ne_zero : Polynomial.map (Quotient.mk (comap f I)) p ≠ 0
hpI : eval₂ f r p ∈ I
hrJ : r ∈ ↑J
hrI : ¬r ∈ ↑I
rbar_ne_zero : ↑(Quotient.mk I) r ≠ 0
rbar_mem_J : ↑(Quotient.mk I) r ∈ map (Quotient.mk I) J
quotient_f : ∀ (x : R), x ∈ comap f I → ↑(RingHom.comp (Quotient.mk I) f) x = 0
⊢ eval₂ (Quotient.lift (comap f I) (RingHom.comp (Quotient.mk I) f) quotient_f) (↑(Quotient.mk I) r)
      (Polynomial.map (Quotient.mk (comap f I)) p) =
    0
[PROOFSTEP]
convert Quotient.eq_zero_iff_mem.mpr hpI
[GOAL]
case h.e'_2
R : Type u_1
inst✝² : CommRing R
S : Type u_2
inst✝¹ : CommRing S
f : R →+* S
I J : Ideal S
inst✝ : IsPrime I
hIJ : I ≤ J
r : S
p : R[X]
p_ne_zero : Polynomial.map (Quotient.mk (comap f I)) p ≠ 0
hpI : eval₂ f r p ∈ I
hrJ : r ∈ ↑J
hrI : ¬r ∈ ↑I
rbar_ne_zero : ↑(Quotient.mk I) r ≠ 0
rbar_mem_J : ↑(Quotient.mk I) r ∈ map (Quotient.mk I) J
quotient_f : ∀ (x : R), x ∈ comap f I → ↑(RingHom.comp (Quotient.mk I) f) x = 0
⊢ eval₂ (Quotient.lift (comap f I) (RingHom.comp (Quotient.mk I) f) quotient_f) (↑(Quotient.mk I) r)
      (Polynomial.map (Quotient.mk (comap f I)) p) =
    ↑(Quotient.mk I) (eval₂ f r p)
[PROOFSTEP]
exact _root_.trans (eval₂_map _ _ _) (hom_eval₂ p f (Ideal.Quotient.mk I) r).symm
[GOAL]
case intro
R : Type u_1
inst✝² : CommRing R
S : Type u_2
inst✝¹ : CommRing S
f : R →+* S
I J : Ideal S
inst✝ : IsPrime I
hIJ : I ≤ J
r : S
p : R[X]
p_ne_zero : Polynomial.map (Quotient.mk (comap f I)) p ≠ 0
hpI : eval₂ f r p ∈ I
hrJ : r ∈ ↑J
hrI : ¬r ∈ ↑I
rbar_ne_zero : ↑(Quotient.mk I) r ≠ 0
rbar_mem_J : ↑(Quotient.mk I) r ∈ map (Quotient.mk I) J
quotient_f : ∀ (x : R), x ∈ comap f I → ↑(RingHom.comp (Quotient.mk I) f) x = 0
rbar_root :
  eval₂ (Quotient.lift (comap f I) (RingHom.comp (Quotient.mk I) f) quotient_f) (↑(Quotient.mk I) r)
      (Polynomial.map (Quotient.mk (comap f I)) p) =
    0
⊢ ∃ i, coeff p i ∈ ↑(comap f J) \ ↑(comap f I)
[PROOFSTEP]
obtain ⟨i, ne_zero, mem⟩ := exists_coeff_ne_zero_mem_comap_of_root_mem rbar_ne_zero rbar_mem_J p_ne_zero rbar_root
[GOAL]
case intro.intro.intro
R : Type u_1
inst✝² : CommRing R
S : Type u_2
inst✝¹ : CommRing S
f : R →+* S
I J : Ideal S
inst✝ : IsPrime I
hIJ : I ≤ J
r : S
p : R[X]
p_ne_zero : Polynomial.map (Quotient.mk (comap f I)) p ≠ 0
hpI : eval₂ f r p ∈ I
hrJ : r ∈ ↑J
hrI : ¬r ∈ ↑I
rbar_ne_zero : ↑(Quotient.mk I) r ≠ 0
rbar_mem_J : ↑(Quotient.mk I) r ∈ map (Quotient.mk I) J
quotient_f : ∀ (x : R), x ∈ comap f I → ↑(RingHom.comp (Quotient.mk I) f) x = 0
rbar_root :
  eval₂ (Quotient.lift (comap f I) (RingHom.comp (Quotient.mk I) f) quotient_f) (↑(Quotient.mk I) r)
      (Polynomial.map (Quotient.mk (comap f I)) p) =
    0
i : ℕ
ne_zero : coeff (Polynomial.map (Quotient.mk (comap f I)) p) i ≠ 0
mem :
  coeff (Polynomial.map (Quotient.mk (comap f I)) p) i ∈
    comap (Quotient.lift (comap f I) (RingHom.comp (Quotient.mk I) f) quotient_f) (map (Quotient.mk I) J)
⊢ ∃ i, coeff p i ∈ ↑(comap f J) \ ↑(comap f I)
[PROOFSTEP]
rw [coeff_map] at ne_zero mem 
[GOAL]
case intro.intro.intro
R : Type u_1
inst✝² : CommRing R
S : Type u_2
inst✝¹ : CommRing S
f : R →+* S
I J : Ideal S
inst✝ : IsPrime I
hIJ : I ≤ J
r : S
p : R[X]
p_ne_zero : Polynomial.map (Quotient.mk (comap f I)) p ≠ 0
hpI : eval₂ f r p ∈ I
hrJ : r ∈ ↑J
hrI : ¬r ∈ ↑I
rbar_ne_zero : ↑(Quotient.mk I) r ≠ 0
rbar_mem_J : ↑(Quotient.mk I) r ∈ map (Quotient.mk I) J
quotient_f : ∀ (x : R), x ∈ comap f I → ↑(RingHom.comp (Quotient.mk I) f) x = 0
rbar_root :
  eval₂ (Quotient.lift (comap f I) (RingHom.comp (Quotient.mk I) f) quotient_f) (↑(Quotient.mk I) r)
      (Polynomial.map (Quotient.mk (comap f I)) p) =
    0
i : ℕ
ne_zero : ↑(Quotient.mk (comap f I)) (coeff p i) ≠ 0
mem :
  ↑(Quotient.mk (comap f I)) (coeff p i) ∈
    comap (Quotient.lift (comap f I) (RingHom.comp (Quotient.mk I) f) quotient_f) (map (Quotient.mk I) J)
⊢ ∃ i, coeff p i ∈ ↑(comap f J) \ ↑(comap f I)
[PROOFSTEP]
refine' ⟨i, (mem_quotient_iff_mem hIJ).mp _, mt _ ne_zero⟩
[GOAL]
case intro.intro.intro.refine'_1
R : Type u_1
inst✝² : CommRing R
S : Type u_2
inst✝¹ : CommRing S
f : R →+* S
I J : Ideal S
inst✝ : IsPrime I
hIJ : I ≤ J
r : S
p : R[X]
p_ne_zero : Polynomial.map (Quotient.mk (comap f I)) p ≠ 0
hpI : eval₂ f r p ∈ I
hrJ : r ∈ ↑J
hrI : ¬r ∈ ↑I
rbar_ne_zero : ↑(Quotient.mk I) r ≠ 0
rbar_mem_J : ↑(Quotient.mk I) r ∈ map (Quotient.mk I) J
quotient_f : ∀ (x : R), x ∈ comap f I → ↑(RingHom.comp (Quotient.mk I) f) x = 0
rbar_root :
  eval₂ (Quotient.lift (comap f I) (RingHom.comp (Quotient.mk I) f) quotient_f) (↑(Quotient.mk I) r)
      (Polynomial.map (Quotient.mk (comap f I)) p) =
    0
i : ℕ
ne_zero : ↑(Quotient.mk (comap f I)) (coeff p i) ≠ 0
mem :
  ↑(Quotient.mk (comap f I)) (coeff p i) ∈
    comap (Quotient.lift (comap f I) (RingHom.comp (Quotient.mk I) f) quotient_f) (map (Quotient.mk I) J)
⊢ ↑(Quotient.mk I) (↑f (coeff p i)) ∈ map (Quotient.mk I) J
[PROOFSTEP]
simpa using mem
[GOAL]
case intro.intro.intro.refine'_2
R : Type u_1
inst✝² : CommRing R
S : Type u_2
inst✝¹ : CommRing S
f : R →+* S
I J : Ideal S
inst✝ : IsPrime I
hIJ : I ≤ J
r : S
p : R[X]
p_ne_zero : Polynomial.map (Quotient.mk (comap f I)) p ≠ 0
hpI : eval₂ f r p ∈ I
hrJ : r ∈ ↑J
hrI : ¬r ∈ ↑I
rbar_ne_zero : ↑(Quotient.mk I) r ≠ 0
rbar_mem_J : ↑(Quotient.mk I) r ∈ map (Quotient.mk I) J
quotient_f : ∀ (x : R), x ∈ comap f I → ↑(RingHom.comp (Quotient.mk I) f) x = 0
rbar_root :
  eval₂ (Quotient.lift (comap f I) (RingHom.comp (Quotient.mk I) f) quotient_f) (↑(Quotient.mk I) r)
      (Polynomial.map (Quotient.mk (comap f I)) p) =
    0
i : ℕ
ne_zero : ↑(Quotient.mk (comap f I)) (coeff p i) ≠ 0
mem :
  ↑(Quotient.mk (comap f I)) (coeff p i) ∈
    comap (Quotient.lift (comap f I) (RingHom.comp (Quotient.mk I) f) quotient_f) (map (Quotient.mk I) J)
⊢ coeff p i ∈ ↑(comap f I) → ↑(Quotient.mk (comap f I)) (coeff p i) = 0
[PROOFSTEP]
simp [Quotient.eq_zero_iff_mem]
[GOAL]
R : Type u_1
inst✝² : CommRing R
S : Type u_2
inst✝¹ : CommRing S
f : R →+* S
I J : Ideal S
inst✝ : Algebra R S
hI : IsPrime I
hIJ : I ≤ J
x : S
mem : x ∈ ↑J \ ↑I
integral : IsIntegral R x
⊢ comap (algebraMap R S) I < comap (algebraMap R S) J
[PROOFSTEP]
obtain ⟨p, p_monic, hpx⟩ := integral
[GOAL]
case intro.intro
R : Type u_1
inst✝² : CommRing R
S : Type u_2
inst✝¹ : CommRing S
f : R →+* S
I J : Ideal S
inst✝ : Algebra R S
hI : IsPrime I
hIJ : I ≤ J
x : S
mem : x ∈ ↑J \ ↑I
p : R[X]
p_monic : Monic p
hpx : eval₂ (algebraMap R S) x p = 0
⊢ comap (algebraMap R S) I < comap (algebraMap R S) J
[PROOFSTEP]
refine' comap_lt_comap_of_root_mem_sdiff hIJ mem _ _
[GOAL]
case intro.intro.refine'_1
R : Type u_1
inst✝² : CommRing R
S : Type u_2
inst✝¹ : CommRing S
f : R →+* S
I J : Ideal S
inst✝ : Algebra R S
hI : IsPrime I
hIJ : I ≤ J
x : S
mem : x ∈ ↑J \ ↑I
p : R[X]
p_monic : Monic p
hpx : eval₂ (algebraMap R S) x p = 0
⊢ R[X]
case intro.intro.refine'_2
R : Type u_1
inst✝² : CommRing R
S : Type u_2
inst✝¹ : CommRing S
f : R →+* S
I J : Ideal S
inst✝ : Algebra R S
hI : IsPrime I
hIJ : I ≤ J
x : S
mem : x ∈ ↑J \ ↑I
p : R[X]
p_monic : Monic p
hpx : eval₂ (algebraMap R S) x p = 0
⊢ Polynomial.map (Quotient.mk (comap (algebraMap R S) I)) ?intro.intro.refine'_1 ≠ 0
case intro.intro.refine'_3
R : Type u_1
inst✝² : CommRing R
S : Type u_2
inst✝¹ : CommRing S
f : R →+* S
I J : Ideal S
inst✝ : Algebra R S
hI : IsPrime I
hIJ : I ≤ J
x : S
mem : x ∈ ↑J \ ↑I
p : R[X]
p_monic : Monic p
hpx : eval₂ (algebraMap R S) x p = 0
⊢ eval₂ (algebraMap R S) x ?intro.intro.refine'_1 ∈ I
[PROOFSTEP]
swap
[GOAL]
case intro.intro.refine'_2
R : Type u_1
inst✝² : CommRing R
S : Type u_2
inst✝¹ : CommRing S
f : R →+* S
I J : Ideal S
inst✝ : Algebra R S
hI : IsPrime I
hIJ : I ≤ J
x : S
mem : x ∈ ↑J \ ↑I
p : R[X]
p_monic : Monic p
hpx : eval₂ (algebraMap R S) x p = 0
⊢ Polynomial.map (Quotient.mk (comap (algebraMap R S) I)) ?intro.intro.refine'_1 ≠ 0
[PROOFSTEP]
apply map_monic_ne_zero p_monic
[GOAL]
case intro.intro.refine'_3
R : Type u_1
inst✝² : CommRing R
S : Type u_2
inst✝¹ : CommRing S
f : R →+* S
I J : Ideal S
inst✝ : Algebra R S
hI : IsPrime I
hIJ : I ≤ J
x : S
mem : x ∈ ↑J \ ↑I
p : R[X]
p_monic : Monic p
hpx : eval₂ (algebraMap R S) x p = 0
⊢ eval₂ (algebraMap R S) x p ∈ I
[PROOFSTEP]
convert I.zero_mem
[GOAL]
R : Type u_1
inst✝⁴ : CommRing R
S : Type u_2
inst✝³ : CommRing S
f : R →+* S
I J : Ideal S
inst✝² : Algebra R S
inst✝¹ : Nontrivial R
inst✝ : IsDomain S
hRS : Algebra.IsIntegral R S
hI : comap (algebraMap R S) I = ⊥
⊢ I = ⊥
[PROOFSTEP]
refine' eq_bot_iff.2 fun x hx => _
[GOAL]
R : Type u_1
inst✝⁴ : CommRing R
S : Type u_2
inst✝³ : CommRing S
f : R →+* S
I J : Ideal S
inst✝² : Algebra R S
inst✝¹ : Nontrivial R
inst✝ : IsDomain S
hRS : Algebra.IsIntegral R S
hI : comap (algebraMap R S) I = ⊥
x : S
hx : x ∈ I
⊢ x ∈ ⊥
[PROOFSTEP]
by_cases hx0 : x = 0
[GOAL]
case pos
R : Type u_1
inst✝⁴ : CommRing R
S : Type u_2
inst✝³ : CommRing S
f : R →+* S
I J : Ideal S
inst✝² : Algebra R S
inst✝¹ : Nontrivial R
inst✝ : IsDomain S
hRS : Algebra.IsIntegral R S
hI : comap (algebraMap R S) I = ⊥
x : S
hx : x ∈ I
hx0 : x = 0
⊢ x ∈ ⊥
[PROOFSTEP]
exact hx0.symm ▸ Ideal.zero_mem ⊥
[GOAL]
case neg
R : Type u_1
inst✝⁴ : CommRing R
S : Type u_2
inst✝³ : CommRing S
f : R →+* S
I J : Ideal S
inst✝² : Algebra R S
inst✝¹ : Nontrivial R
inst✝ : IsDomain S
hRS : Algebra.IsIntegral R S
hI : comap (algebraMap R S) I = ⊥
x : S
hx : x ∈ I
hx0 : ¬x = 0
⊢ x ∈ ⊥
[PROOFSTEP]
exact absurd hI (comap_ne_bot_of_integral_mem hx0 hx (hRS x))
[GOAL]
R : Type u_1
inst✝² : CommRing R
S : Type u_2
inst✝¹ : CommRing S
f : R →+* S
I✝ J : Ideal S
inst✝ : Algebra R S
hRS : Algebra.IsIntegral R S
I : Ideal S
hI : IsMaximal I
⊢ IsMaximal (comap (algebraMap R S) I)
[PROOFSTEP]
refine' Ideal.Quotient.maximal_of_isField _ _
[GOAL]
R : Type u_1
inst✝² : CommRing R
S : Type u_2
inst✝¹ : CommRing S
f : R →+* S
I✝ J : Ideal S
inst✝ : Algebra R S
hRS : Algebra.IsIntegral R S
I : Ideal S
hI : IsMaximal I
⊢ IsField (R ⧸ comap (algebraMap R S) I)
[PROOFSTEP]
haveI : IsPrime (I.comap (algebraMap R S)) := comap_isPrime _ _
[GOAL]
R : Type u_1
inst✝² : CommRing R
S : Type u_2
inst✝¹ : CommRing S
f : R →+* S
I✝ J : Ideal S
inst✝ : Algebra R S
hRS : Algebra.IsIntegral R S
I : Ideal S
hI : IsMaximal I
this : IsPrime (comap (algebraMap R S) I)
⊢ IsField (R ⧸ comap (algebraMap R S) I)
[PROOFSTEP]
exact
  isField_of_isIntegral_of_isField (isIntegral_quotient_of_isIntegral hRS) algebraMap_quotient_injective
    (by rwa [← Quotient.maximal_ideal_iff_isField_quotient])
[GOAL]
R : Type u_1
inst✝² : CommRing R
S : Type u_2
inst✝¹ : CommRing S
f : R →+* S
I✝ J : Ideal S
inst✝ : Algebra R S
hRS : Algebra.IsIntegral R S
I : Ideal S
hI : IsMaximal I
this : IsPrime (comap (algebraMap R S) I)
⊢ IsField (S ⧸ I)
[PROOFSTEP]
rwa [← Quotient.maximal_ideal_iff_isField_quotient]
[GOAL]
R : Type u_1
inst✝⁹ : CommRing R
S : Type u_2
inst✝⁸ : CommRing S
f : R →+* S
I✝ J : Ideal S
inst✝⁷ : Algebra R S
A : Type u_3
inst✝⁶ : CommRing A
inst✝⁵ : Algebra R A
inst✝⁴ : Algebra A S
inst✝³ : IsScalarTower R A S
inst✝² : IsIntegralClosure A R S
inst✝¹ : IsDomain A
inst✝ : Nontrivial R
I : Ideal A
⊢ comap (algebraMap R A) I = ⊥ → I = ⊥
[PROOFSTEP]
contrapose
[GOAL]
R : Type u_1
inst✝⁹ : CommRing R
S : Type u_2
inst✝⁸ : CommRing S
f : R →+* S
I✝ J : Ideal S
inst✝⁷ : Algebra R S
A : Type u_3
inst✝⁶ : CommRing A
inst✝⁵ : Algebra R A
inst✝⁴ : Algebra A S
inst✝³ : IsScalarTower R A S
inst✝² : IsIntegralClosure A R S
inst✝¹ : IsDomain A
inst✝ : Nontrivial R
I : Ideal A
⊢ ¬I = ⊥ → ¬comap (algebraMap R A) I = ⊥
[PROOFSTEP]
exact (IsIntegralClosure.comap_ne_bot S)
[GOAL]
R : Type u_1
inst✝⁴ : CommRing R
S : Type u_2
inst✝³ : CommRing S
f : R →+* S
I J : Ideal S
inst✝² : Algebra R S
inst✝¹ : IsDomain S
H : Algebra.IsIntegral R S
P : Ideal R
inst✝ : IsPrime P
hP : RingHom.ker (algebraMap R S) ≤ P
⊢ ∃ Q, IsPrime Q ∧ comap (algebraMap R S) Q = P
[PROOFSTEP]
have hP0 : (0 : S) ∉ Algebra.algebraMapSubmonoid S P.primeCompl :=
  by
  rintro ⟨x, ⟨hx, x0⟩⟩
  exact absurd (hP x0) hx
[GOAL]
R : Type u_1
inst✝⁴ : CommRing R
S : Type u_2
inst✝³ : CommRing S
f : R →+* S
I J : Ideal S
inst✝² : Algebra R S
inst✝¹ : IsDomain S
H : Algebra.IsIntegral R S
P : Ideal R
inst✝ : IsPrime P
hP : RingHom.ker (algebraMap R S) ≤ P
⊢ ¬0 ∈ Algebra.algebraMapSubmonoid S (primeCompl P)
[PROOFSTEP]
rintro ⟨x, ⟨hx, x0⟩⟩
[GOAL]
case intro.intro
R : Type u_1
inst✝⁴ : CommRing R
S : Type u_2
inst✝³ : CommRing S
f : R →+* S
I J : Ideal S
inst✝² : Algebra R S
inst✝¹ : IsDomain S
H : Algebra.IsIntegral R S
P : Ideal R
inst✝ : IsPrime P
hP : RingHom.ker (algebraMap R S) ≤ P
x : R
hx : x ∈ ↑(primeCompl P)
x0 : ↑(algebraMap R S) x = 0
⊢ False
[PROOFSTEP]
exact absurd (hP x0) hx
[GOAL]
R : Type u_1
inst✝⁴ : CommRing R
S : Type u_2
inst✝³ : CommRing S
f : R →+* S
I J : Ideal S
inst✝² : Algebra R S
inst✝¹ : IsDomain S
H : Algebra.IsIntegral R S
P : Ideal R
inst✝ : IsPrime P
hP : RingHom.ker (algebraMap R S) ≤ P
hP0 : ¬0 ∈ Algebra.algebraMapSubmonoid S (primeCompl P)
⊢ ∃ Q, IsPrime Q ∧ comap (algebraMap R S) Q = P
[PROOFSTEP]
let Rₚ := Localization P.primeCompl
[GOAL]
R : Type u_1
inst✝⁴ : CommRing R
S : Type u_2
inst✝³ : CommRing S
f : R →+* S
I J : Ideal S
inst✝² : Algebra R S
inst✝¹ : IsDomain S
H : Algebra.IsIntegral R S
P : Ideal R
inst✝ : IsPrime P
hP : RingHom.ker (algebraMap R S) ≤ P
hP0 : ¬0 ∈ Algebra.algebraMapSubmonoid S (primeCompl P)
Rₚ : Type u_1 := Localization (primeCompl P)
⊢ ∃ Q, IsPrime Q ∧ comap (algebraMap R S) Q = P
[PROOFSTEP]
let Sₚ := Localization (Algebra.algebraMapSubmonoid S P.primeCompl)
[GOAL]
R : Type u_1
inst✝⁴ : CommRing R
S : Type u_2
inst✝³ : CommRing S
f : R →+* S
I J : Ideal S
inst✝² : Algebra R S
inst✝¹ : IsDomain S
H : Algebra.IsIntegral R S
P : Ideal R
inst✝ : IsPrime P
hP : RingHom.ker (algebraMap R S) ≤ P
hP0 : ¬0 ∈ Algebra.algebraMapSubmonoid S (primeCompl P)
Rₚ : Type u_1 := Localization (primeCompl P)
Sₚ : Type u_2 := Localization (Algebra.algebraMapSubmonoid S (primeCompl P))
⊢ ∃ Q, IsPrime Q ∧ comap (algebraMap R S) Q = P
[PROOFSTEP]
letI : IsDomain (Localization (Algebra.algebraMapSubmonoid S P.primeCompl)) :=
  IsLocalization.isDomain_localization (le_nonZeroDivisors_of_noZeroDivisors hP0)
[GOAL]
R : Type u_1
inst✝⁴ : CommRing R
S : Type u_2
inst✝³ : CommRing S
f : R →+* S
I J : Ideal S
inst✝² : Algebra R S
inst✝¹ : IsDomain S
H : Algebra.IsIntegral R S
P : Ideal R
inst✝ : IsPrime P
hP : RingHom.ker (algebraMap R S) ≤ P
hP0 : ¬0 ∈ Algebra.algebraMapSubmonoid S (primeCompl P)
Rₚ : Type u_1 := Localization (primeCompl P)
Sₚ : Type u_2 := Localization (Algebra.algebraMapSubmonoid S (primeCompl P))
this : IsDomain (Localization (Algebra.algebraMapSubmonoid S (primeCompl P))) :=
  IsLocalization.isDomain_localization (le_nonZeroDivisors_of_noZeroDivisors hP0)
⊢ ∃ Q, IsPrime Q ∧ comap (algebraMap R S) Q = P
[PROOFSTEP]
obtain ⟨Qₚ : Ideal Sₚ, Qₚ_maximal⟩ := exists_maximal Sₚ
[GOAL]
case intro
R : Type u_1
inst✝⁴ : CommRing R
S : Type u_2
inst✝³ : CommRing S
f : R →+* S
I J : Ideal S
inst✝² : Algebra R S
inst✝¹ : IsDomain S
H : Algebra.IsIntegral R S
P : Ideal R
inst✝ : IsPrime P
hP : RingHom.ker (algebraMap R S) ≤ P
hP0 : ¬0 ∈ Algebra.algebraMapSubmonoid S (primeCompl P)
Rₚ : Type u_1 := Localization (primeCompl P)
Sₚ : Type u_2 := Localization (Algebra.algebraMapSubmonoid S (primeCompl P))
this : IsDomain (Localization (Algebra.algebraMapSubmonoid S (primeCompl P))) :=
  IsLocalization.isDomain_localization (le_nonZeroDivisors_of_noZeroDivisors hP0)
Qₚ : Ideal Sₚ
Qₚ_maximal : IsMaximal Qₚ
⊢ ∃ Q, IsPrime Q ∧ comap (algebraMap R S) Q = P
[PROOFSTEP]
haveI Qₚ_max : IsMaximal (comap _ Qₚ) :=
  @isMaximal_comap_of_isIntegral_of_isMaximal Rₚ _ Sₚ _ (localizationAlgebra P.primeCompl S) (isIntegral_localization H)
    _ Qₚ_maximal
[GOAL]
case intro
R : Type u_1
inst✝⁴ : CommRing R
S : Type u_2
inst✝³ : CommRing S
f : R →+* S
I J : Ideal S
inst✝² : Algebra R S
inst✝¹ : IsDomain S
H : Algebra.IsIntegral R S
P : Ideal R
inst✝ : IsPrime P
hP : RingHom.ker (algebraMap R S) ≤ P
hP0 : ¬0 ∈ Algebra.algebraMapSubmonoid S (primeCompl P)
Rₚ : Type u_1 := Localization (primeCompl P)
Sₚ : Type u_2 := Localization (Algebra.algebraMapSubmonoid S (primeCompl P))
this : IsDomain (Localization (Algebra.algebraMapSubmonoid S (primeCompl P))) :=
  IsLocalization.isDomain_localization (le_nonZeroDivisors_of_noZeroDivisors hP0)
Qₚ : Ideal Sₚ
Qₚ_maximal : IsMaximal Qₚ
Qₚ_max : IsMaximal (comap (algebraMap Rₚ Sₚ) Qₚ)
⊢ ∃ Q, IsPrime Q ∧ comap (algebraMap R S) Q = P
[PROOFSTEP]
refine' ⟨comap (algebraMap S Sₚ) Qₚ, ⟨comap_isPrime _ Qₚ, _⟩⟩
[GOAL]
case intro
R : Type u_1
inst✝⁴ : CommRing R
S : Type u_2
inst✝³ : CommRing S
f : R →+* S
I J : Ideal S
inst✝² : Algebra R S
inst✝¹ : IsDomain S
H : Algebra.IsIntegral R S
P : Ideal R
inst✝ : IsPrime P
hP : RingHom.ker (algebraMap R S) ≤ P
hP0 : ¬0 ∈ Algebra.algebraMapSubmonoid S (primeCompl P)
Rₚ : Type u_1 := Localization (primeCompl P)
Sₚ : Type u_2 := Localization (Algebra.algebraMapSubmonoid S (primeCompl P))
this : IsDomain (Localization (Algebra.algebraMapSubmonoid S (primeCompl P))) :=
  IsLocalization.isDomain_localization (le_nonZeroDivisors_of_noZeroDivisors hP0)
Qₚ : Ideal Sₚ
Qₚ_maximal : IsMaximal Qₚ
Qₚ_max : IsMaximal (comap (algebraMap Rₚ Sₚ) Qₚ)
⊢ comap (algebraMap R S) (comap (algebraMap S Sₚ) Qₚ) = P
[PROOFSTEP]
convert Localization.AtPrime.comap_maximalIdeal (I := P)
[GOAL]
case h.e'_2
R : Type u_1
inst✝⁴ : CommRing R
S : Type u_2
inst✝³ : CommRing S
f : R →+* S
I J : Ideal S
inst✝² : Algebra R S
inst✝¹ : IsDomain S
H : Algebra.IsIntegral R S
P : Ideal R
inst✝ : IsPrime P
hP : RingHom.ker (algebraMap R S) ≤ P
hP0 : ¬0 ∈ Algebra.algebraMapSubmonoid S (primeCompl P)
Rₚ : Type u_1 := Localization (primeCompl P)
Sₚ : Type u_2 := Localization (Algebra.algebraMapSubmonoid S (primeCompl P))
this : IsDomain (Localization (Algebra.algebraMapSubmonoid S (primeCompl P))) :=
  IsLocalization.isDomain_localization (le_nonZeroDivisors_of_noZeroDivisors hP0)
Qₚ : Ideal Sₚ
Qₚ_maximal : IsMaximal Qₚ
Qₚ_max : IsMaximal (comap (algebraMap Rₚ Sₚ) Qₚ)
⊢ comap (algebraMap R S) (comap (algebraMap S Sₚ) Qₚ) =
    comap (algebraMap R (Localization.AtPrime P)) (LocalRing.maximalIdeal (Localization (primeCompl P)))
[PROOFSTEP]
rw [comap_comap, ← LocalRing.eq_maximalIdeal Qₚ_max, ←
  @IsLocalization.map_comp (P := S) (Q := Sₚ) (g := algebraMap R S) (M := P.primeCompl) (T :=
    Algebra.algebraMapSubmonoid S P.primeCompl) (S := Rₚ) _ _ _ _ _ _
    (fun p hp => Algebra.mem_algebraMapSubmonoid_of_mem ⟨p, hp⟩) _ _]
[GOAL]
case h.e'_2
R : Type u_1
inst✝⁴ : CommRing R
S : Type u_2
inst✝³ : CommRing S
f : R →+* S
I J : Ideal S
inst✝² : Algebra R S
inst✝¹ : IsDomain S
H : Algebra.IsIntegral R S
P : Ideal R
inst✝ : IsPrime P
hP : RingHom.ker (algebraMap R S) ≤ P
hP0 : ¬0 ∈ Algebra.algebraMapSubmonoid S (primeCompl P)
Rₚ : Type u_1 := Localization (primeCompl P)
Sₚ : Type u_2 := Localization (Algebra.algebraMapSubmonoid S (primeCompl P))
this : IsDomain (Localization (Algebra.algebraMapSubmonoid S (primeCompl P))) :=
  IsLocalization.isDomain_localization (le_nonZeroDivisors_of_noZeroDivisors hP0)
Qₚ : Ideal Sₚ
Qₚ_maximal : IsMaximal Qₚ
Qₚ_max : IsMaximal (comap (algebraMap Rₚ Sₚ) Qₚ)
⊢ comap
      (RingHom.comp
        (IsLocalization.map Sₚ (algebraMap R S)
          (_ :
            ∀ (p : R) (hp : p ∈ primeCompl P),
              ↑(algebraMap R S) ↑{ val := p, property := hp } ∈ Algebra.algebraMapSubmonoid S (primeCompl P)))
        (algebraMap R Rₚ))
      Qₚ =
    comap (algebraMap R (Localization.AtPrime P)) (comap (algebraMap Rₚ Sₚ) Qₚ)
[PROOFSTEP]
rfl
[GOAL]
R : Type u_1
inst✝⁴ : CommRing R
S : Type u_2
inst✝³ : CommRing S
f : R →+* S
I✝ J : Ideal S
inst✝² : Algebra R S
H : Algebra.IsIntegral R S
P : Ideal R
inst✝¹ : IsPrime P
I : Ideal S
inst✝ : IsPrime I
hIP : comap (algebraMap R S) I ≤ P
⊢ ∃ Q, Q ≥ I ∧ IsPrime Q ∧ comap (algebraMap R S) Q = P
[PROOFSTEP]
obtain ⟨Q' : Ideal (S ⧸ I), ⟨Q'_prime, hQ'⟩⟩ :=
  @exists_ideal_over_prime_of_is_integral' (R ⧸ I.comap (algebraMap R S)) _ (S ⧸ I) _ Ideal.quotientAlgebra _
    (isIntegral_quotient_of_isIntegral H) (map (Ideal.Quotient.mk (I.comap (algebraMap R S))) P)
    (map_isPrime_of_surjective Quotient.mk_surjective (by simp [hIP]))
    (le_trans (le_of_eq ((RingHom.injective_iff_ker_eq_bot _).1 algebraMap_quotient_injective)) bot_le)
[GOAL]
R : Type u_1
inst✝⁴ : CommRing R
S : Type u_2
inst✝³ : CommRing S
f : R →+* S
I✝ J : Ideal S
inst✝² : Algebra R S
H : Algebra.IsIntegral R S
P : Ideal R
inst✝¹ : IsPrime P
I : Ideal S
inst✝ : IsPrime I
hIP : comap (algebraMap R S) I ≤ P
⊢ RingHom.ker (Quotient.mk (comap (algebraMap R S) I)) ≤ P
[PROOFSTEP]
simp [hIP]
[GOAL]
case intro.intro
R : Type u_1
inst✝⁴ : CommRing R
S : Type u_2
inst✝³ : CommRing S
f : R →+* S
I✝ J : Ideal S
inst✝² : Algebra R S
H : Algebra.IsIntegral R S
P : Ideal R
inst✝¹ : IsPrime P
I : Ideal S
inst✝ : IsPrime I
hIP : comap (algebraMap R S) I ≤ P
Q' : Ideal (S ⧸ I)
Q'_prime : IsPrime Q'
hQ' : comap (algebraMap (R ⧸ comap (algebraMap R S) I) (S ⧸ I)) Q' = map (Quotient.mk (comap (algebraMap R S) I)) P
⊢ ∃ Q, Q ≥ I ∧ IsPrime Q ∧ comap (algebraMap R S) Q = P
[PROOFSTEP]
haveI := Q'_prime
[GOAL]
case intro.intro
R : Type u_1
inst✝⁴ : CommRing R
S : Type u_2
inst✝³ : CommRing S
f : R →+* S
I✝ J : Ideal S
inst✝² : Algebra R S
H : Algebra.IsIntegral R S
P : Ideal R
inst✝¹ : IsPrime P
I : Ideal S
inst✝ : IsPrime I
hIP : comap (algebraMap R S) I ≤ P
Q' : Ideal (S ⧸ I)
Q'_prime : IsPrime Q'
hQ' : comap (algebraMap (R ⧸ comap (algebraMap R S) I) (S ⧸ I)) Q' = map (Quotient.mk (comap (algebraMap R S) I)) P
this : IsPrime Q'
⊢ ∃ Q, Q ≥ I ∧ IsPrime Q ∧ comap (algebraMap R S) Q = P
[PROOFSTEP]
refine' ⟨Q'.comap _, le_trans (le_of_eq mk_ker.symm) (ker_le_comap _), ⟨comap_isPrime _ Q', _⟩⟩
[GOAL]
case intro.intro
R : Type u_1
inst✝⁴ : CommRing R
S : Type u_2
inst✝³ : CommRing S
f : R →+* S
I✝ J : Ideal S
inst✝² : Algebra R S
H : Algebra.IsIntegral R S
P : Ideal R
inst✝¹ : IsPrime P
I : Ideal S
inst✝ : IsPrime I
hIP : comap (algebraMap R S) I ≤ P
Q' : Ideal (S ⧸ I)
Q'_prime : IsPrime Q'
hQ' : comap (algebraMap (R ⧸ comap (algebraMap R S) I) (S ⧸ I)) Q' = map (Quotient.mk (comap (algebraMap R S) I)) P
this : IsPrime Q'
⊢ comap (algebraMap R S) (comap (Quotient.mk I) Q') = P
[PROOFSTEP]
rw [comap_comap]
[GOAL]
case intro.intro
R : Type u_1
inst✝⁴ : CommRing R
S : Type u_2
inst✝³ : CommRing S
f : R →+* S
I✝ J : Ideal S
inst✝² : Algebra R S
H : Algebra.IsIntegral R S
P : Ideal R
inst✝¹ : IsPrime P
I : Ideal S
inst✝ : IsPrime I
hIP : comap (algebraMap R S) I ≤ P
Q' : Ideal (S ⧸ I)
Q'_prime : IsPrime Q'
hQ' : comap (algebraMap (R ⧸ comap (algebraMap R S) I) (S ⧸ I)) Q' = map (Quotient.mk (comap (algebraMap R S) I)) P
this : IsPrime Q'
⊢ comap (RingHom.comp (Quotient.mk I) (algebraMap R S)) Q' = P
[PROOFSTEP]
refine' _root_.trans _ (_root_.trans (congr_arg (comap (Ideal.Quotient.mk (comap (algebraMap R S) I))) hQ') _)
[GOAL]
case intro.intro.refine'_1
R : Type u_1
inst✝⁴ : CommRing R
S : Type u_2
inst✝³ : CommRing S
f : R →+* S
I✝ J : Ideal S
inst✝² : Algebra R S
H : Algebra.IsIntegral R S
P : Ideal R
inst✝¹ : IsPrime P
I : Ideal S
inst✝ : IsPrime I
hIP : comap (algebraMap R S) I ≤ P
Q' : Ideal (S ⧸ I)
Q'_prime : IsPrime Q'
hQ' : comap (algebraMap (R ⧸ comap (algebraMap R S) I) (S ⧸ I)) Q' = map (Quotient.mk (comap (algebraMap R S) I)) P
this : IsPrime Q'
⊢ comap (RingHom.comp (Quotient.mk I) (algebraMap R S)) Q' =
    comap (Quotient.mk (comap (algebraMap R S) I)) (comap (algebraMap (R ⧸ comap (algebraMap R S) I) (S ⧸ I)) Q')
[PROOFSTEP]
rw [comap_comap]
[GOAL]
case intro.intro.refine'_1
R : Type u_1
inst✝⁴ : CommRing R
S : Type u_2
inst✝³ : CommRing S
f : R →+* S
I✝ J : Ideal S
inst✝² : Algebra R S
H : Algebra.IsIntegral R S
P : Ideal R
inst✝¹ : IsPrime P
I : Ideal S
inst✝ : IsPrime I
hIP : comap (algebraMap R S) I ≤ P
Q' : Ideal (S ⧸ I)
Q'_prime : IsPrime Q'
hQ' : comap (algebraMap (R ⧸ comap (algebraMap R S) I) (S ⧸ I)) Q' = map (Quotient.mk (comap (algebraMap R S) I)) P
this : IsPrime Q'
⊢ comap (RingHom.comp (Quotient.mk I) (algebraMap R S)) Q' =
    comap (RingHom.comp (algebraMap (R ⧸ comap (algebraMap R S) I) (S ⧸ I)) (Quotient.mk (comap (algebraMap R S) I))) Q'
[PROOFSTEP]
exact congr_arg (comap . Q') (RingHom.ext fun r => rfl)
[GOAL]
case intro.intro.refine'_2
R : Type u_1
inst✝⁴ : CommRing R
S : Type u_2
inst✝³ : CommRing S
f : R →+* S
I✝ J : Ideal S
inst✝² : Algebra R S
H : Algebra.IsIntegral R S
P : Ideal R
inst✝¹ : IsPrime P
I : Ideal S
inst✝ : IsPrime I
hIP : comap (algebraMap R S) I ≤ P
Q' : Ideal (S ⧸ I)
Q'_prime : IsPrime Q'
hQ' : comap (algebraMap (R ⧸ comap (algebraMap R S) I) (S ⧸ I)) Q' = map (Quotient.mk (comap (algebraMap R S) I)) P
this : IsPrime Q'
⊢ comap (Quotient.mk (comap (algebraMap R S) I)) (map (Quotient.mk (comap (algebraMap R S) I)) P) = P
[PROOFSTEP]
refine' _root_.trans (comap_map_of_surjective _ Quotient.mk_surjective _) (sup_eq_left.2 _)
[GOAL]
case intro.intro.refine'_2
R : Type u_1
inst✝⁴ : CommRing R
S : Type u_2
inst✝³ : CommRing S
f : R →+* S
I✝ J : Ideal S
inst✝² : Algebra R S
H : Algebra.IsIntegral R S
P : Ideal R
inst✝¹ : IsPrime P
I : Ideal S
inst✝ : IsPrime I
hIP : comap (algebraMap R S) I ≤ P
Q' : Ideal (S ⧸ I)
Q'_prime : IsPrime Q'
hQ' : comap (algebraMap (R ⧸ comap (algebraMap R S) I) (S ⧸ I)) Q' = map (Quotient.mk (comap (algebraMap R S) I)) P
this : IsPrime Q'
⊢ comap (Quotient.mk (comap (algebraMap R S) I)) ⊥ ≤ P
[PROOFSTEP]
simpa [← RingHom.ker_eq_comap_bot] using hIP
[GOAL]
R : Type u_1
inst✝³ : CommRing R
S : Type u_2
inst✝² : CommRing S
f : R →+* S
I J : Ideal S
inst✝¹ : Algebra R S
inst✝ : IsDomain S
H : Algebra.IsIntegral R S
P : Ideal R
P_max : IsMaximal P
hP : RingHom.ker (algebraMap R S) ≤ P
⊢ ∃ Q, IsMaximal Q ∧ comap (algebraMap R S) Q = P
[PROOFSTEP]
obtain ⟨Q, ⟨Q_prime, hQ⟩⟩ := exists_ideal_over_prime_of_is_integral' H P hP
[GOAL]
case intro.intro
R : Type u_1
inst✝³ : CommRing R
S : Type u_2
inst✝² : CommRing S
f : R →+* S
I J : Ideal S
inst✝¹ : Algebra R S
inst✝ : IsDomain S
H : Algebra.IsIntegral R S
P : Ideal R
P_max : IsMaximal P
hP : RingHom.ker (algebraMap R S) ≤ P
Q : Ideal S
Q_prime : IsPrime Q
hQ : comap (algebraMap R S) Q = P
⊢ ∃ Q, IsMaximal Q ∧ comap (algebraMap R S) Q = P
[PROOFSTEP]
haveI : Q.IsPrime := Q_prime
[GOAL]
case intro.intro
R : Type u_1
inst✝³ : CommRing R
S : Type u_2
inst✝² : CommRing S
f : R →+* S
I J : Ideal S
inst✝¹ : Algebra R S
inst✝ : IsDomain S
H : Algebra.IsIntegral R S
P : Ideal R
P_max : IsMaximal P
hP : RingHom.ker (algebraMap R S) ≤ P
Q : Ideal S
Q_prime : IsPrime Q
hQ : comap (algebraMap R S) Q = P
this : IsPrime Q
⊢ ∃ Q, IsMaximal Q ∧ comap (algebraMap R S) Q = P
[PROOFSTEP]
exact ⟨Q, isMaximal_of_isIntegral_of_isMaximal_comap H _ (hQ.symm ▸ P_max), hQ⟩
