File: Mathlib/RingTheory/Ideal/Over.lean

full_name: Ideal.coeff_zero_mem_comap_of_root_mem_of_eval_mem
code: theorem coeff_zero_mem_comap_of_root_mem_of_eval_mem {r : S} (hr : r ∈ I) {p : R[X]}
    (hp : p.eval₂ f r ∈ I) : p.coeff 0 ∈ I.comap f 
goal: p.coeff 0 ∈ Ideal.comap f I

full_name: Ideal.coeff_zero_mem_comap_of_root_mem
code: theorem coeff_zero_mem_comap_of_root_mem {r : S} (hr : r ∈ I) {p : R[X]} (hp : p.eval₂ f r = 0) :
    p.coeff 0 ∈ I.comap f 
goal: p.coeff 0 ∈ Ideal.comap f I

full_name: Ideal.exists_coeff_ne_zero_mem_comap_of_non_zero_divisor_root_mem
code: theorem exists_coeff_ne_zero_mem_comap_of_non_zero_divisor_root_mem {r : S}
    (r_non_zero_divisor : ∀ {x}, x * r = 0 → x = 0) (hr : r ∈ I) {p : R[X]} :
    p ≠ 0 → p.eval₂ f r = 0 → ∃ i, p.coeff i ≠ 0 ∧ p.coeff i ∈ I.comap f 
goal: p ≠ 0 → Polynomial.eval₂ f r p = 0 → ∃ i, p.coeff i ≠ 0 ∧ p.coeff i ∈ Ideal.comap f I

full_name: Ideal.injective_quotient_le_comap_map
code: /-- Let `P` be an ideal in `R[x]`.  The map
`R[x]/P → (R / (P ∩ R))[x] / (P / (P ∩ R))`
is injective.
-/
theorem injective_quotient_le_comap_map (P : Ideal R[X]) :
    Function.Injective <|
      Ideal.quotientMap
        (Ideal.map (Polynomial.mapRingHom (Quotient.mk (P.comap (C : R →+* R[X])))) P)
        (Polynomial.mapRingHom (Ideal.Quotient.mk (P.comap (C : R →+* R[X]))))
        le_comap_map 
goal: Function.Injective
  ⇑(Ideal.quotientMap (Ideal.map (Polynomial.mapRingHom (Ideal.Quotient.mk (Ideal.comap Polynomial.C P))) P)
      (Polynomial.mapRingHom (Ideal.Quotient.mk (Ideal.comap Polynomial.C P))) ⋯)

full_name: Ideal.quotient_mk_maps_eq
code: /-- The identity in this lemma asserts that the "obvious" square
```
    R    → (R / (P ∩ R))
    ↓          ↓
R[x] / P → (R / (P ∩ R))[x] / (P / (P ∩ R))
```
commutes.  It is used, for instance, in the proof of `quotient_mk_comp_C_is_integral_of_jacobson`,
in the file `RingTheory.Jacobson`.
-/
theorem quotient_mk_maps_eq (P : Ideal R[X]) :
    ((Quotient.mk (map (mapRingHom (Quotient.mk (P.comap (C : R →+* R[X])))) P)).comp C).comp
        (Quotient.mk (P.comap (C : R →+* R[X]))) =
      (Ideal.quotientMap (map (mapRingHom (Quotient.mk (P.comap (C : R →+* R[X])))) P)
            (mapRingHom (Quotient.mk (P.comap (C : R →+* R[X])))) le_comap_map).comp
        ((Quotient.mk P).comp C) 
goal: ((Ideal.Quotient.mk (Ideal.map (Polynomial.mapRingHom (Ideal.Quotient.mk (Ideal.comap Polynomial.C P))) P)).comp
        Polynomial.C).comp
    (Ideal.Quotient.mk (Ideal.comap Polynomial.C P)) =
  (Ideal.quotientMap (Ideal.map (Polynomial.mapRingHom (Ideal.Quotient.mk (Ideal.comap Polynomial.C P))) P)
        (Polynomial.mapRingHom (Ideal.Quotient.mk (Ideal.comap Polynomial.C P))) ⋯).comp
    ((Ideal.Quotient.mk P).comp Polynomial.C)

full_name: Ideal.exists_nonzero_mem_of_ne_bot
code: /-- This technical lemma asserts the existence of a polynomial `p` in an ideal `P ⊂ R[x]`
that is non-zero in the quotient `R / (P ∩ R) [x]`.  The assumptions are equivalent to
`P ≠ 0` and `P ∩ R = (0)`.
-/
theorem exists_nonzero_mem_of_ne_bot {P : Ideal R[X]} (Pb : P ≠ ⊥) (hP : ∀ x : R, C x ∈ P → x = 0) :
    ∃ p : R[X], p ∈ P ∧ Polynomial.map (Quotient.mk (P.comap (C : R →+* R[X]))) p ≠ 0 
goal: ∃ p ∈ P, Polynomial.map (Ideal.Quotient.mk (Ideal.comap Polynomial.C P)) p ≠ 0

full_name: Ideal.comap_eq_of_scalar_tower_quotient
code: /-- If there is an injective map `R/p → S/P` such that following diagram commutes:
```
R   → S
↓     ↓
R/p → S/P
```
then `P` lies over `p`.
-/
theorem comap_eq_of_scalar_tower_quotient [Algebra R S] [Algebra (R ⧸ p) (S ⧸ P)]
    [IsScalarTower R (R ⧸ p) (S ⧸ P)] (h : Function.Injective (algebraMap (R ⧸ p) (S ⧸ P))) :
    comap (algebraMap R S) P = p 
goal: Ideal.comap (algebraMap R S) P = p

full_name: Ideal.Quotient.algebraQuotientOfLEComap
code: /-- If `P` lies over `p`, then `R / p` has a canonical map to `S / P`. -/
def Quotient.algebraQuotientOfLEComap (h : p ≤ comap f P) : Algebra (R ⧸ p) (S ⧸ P) 
goal: Algebra (R ⧸ p) (S ⧸ P)

full_name: Ideal.Quotient.algebraQuotientMapQuotient
code: /-- `R / p` has a canonical map to `S / pS`. -/
instance Quotient.algebraQuotientMapQuotient : Algebra (R ⧸ p) (S ⧸ map f p) 
goal: Algebra (R ⧸ p) (S ⧸ Ideal.map f p)

full_name: Ideal.Quotient.algebraMap_quotient_map_quotient
code: @[simp]
theorem Quotient.algebraMap_quotient_map_quotient (x : R) :
    algebraMap (R ⧸ p) (S ⧸ map f p) (Ideal.Quotient.mk p x) =
    Ideal.Quotient.mk (map f p) (f x) 
goal: (algebraMap (R ⧸ p) (S ⧸ Ideal.map f p)) ((Ideal.Quotient.mk p) x) = (Ideal.Quotient.mk (Ideal.map f p)) (f x)

full_name: Ideal.Quotient.mk_smul_mk_quotient_map_quotient
code: @[simp]
theorem Quotient.mk_smul_mk_quotient_map_quotient (x : R) (y : S) :
    Quotient.mk p x • Quotient.mk (map f p) y = Quotient.mk (map f p) (f x * y) 
goal: (Ideal.Quotient.mk p) x • (Ideal.Quotient.mk (Ideal.map f p)) y = (Ideal.Quotient.mk (Ideal.map f p)) (f x * y)

full_name: Ideal.Quotient.tower_quotient_map_quotient
code: instance Quotient.tower_quotient_map_quotient [Algebra R S] :
    IsScalarTower R (R ⧸ p) (S ⧸ map (algebraMap R S) p) 
goal: IsScalarTower R (R ⧸ p) (S ⧸ Ideal.map (algebraMap R S) p)

full_name: Ideal.QuotientMapQuotient.isNoetherian
code: instance QuotientMapQuotient.isNoetherian [Algebra R S] [IsNoetherian R S] (I : Ideal R) :
    IsNoetherian (R ⧸ I) (S ⧸ Ideal.map (algebraMap R S) I) 
goal: IsNoetherian (R ⧸ I) (S ⧸ Ideal.map (algebraMap R S) I)

full_name: Ideal.exists_coeff_ne_zero_mem_comap_of_root_mem
code: theorem exists_coeff_ne_zero_mem_comap_of_root_mem [IsDomain S] {r : S} (r_ne_zero : r ≠ 0)
    (hr : r ∈ I) {p : R[X]} :
    p ≠ 0 → p.eval₂ f r = 0 → ∃ i, p.coeff i ≠ 0 ∧ p.coeff i ∈ I.comap f 
goal: p ≠ 0 → Polynomial.eval₂ f r p = 0 → ∃ i, p.coeff i ≠ 0 ∧ p.coeff i ∈ Ideal.comap f I

full_name: Ideal.exists_coeff_mem_comap_sdiff_comap_of_root_mem_sdiff
code: theorem exists_coeff_mem_comap_sdiff_comap_of_root_mem_sdiff [IsPrime I] (hIJ : I ≤ J) {r : S}
    (hr : r ∈ (J : Set S) \ I) {p : R[X]} (p_ne_zero : p.map (Quotient.mk (I.comap f)) ≠ 0)
    (hpI : p.eval₂ f r ∈ I) : ∃ i, p.coeff i ∈ (J.comap f : Set R) \ I.comap f 
goal: ∃ i, p.coeff i ∈ ↑(Ideal.comap f J) \ ↑(Ideal.comap f I)

full_name: Ideal.comap_lt_comap_of_root_mem_sdiff
code: theorem comap_lt_comap_of_root_mem_sdiff [I.IsPrime] (hIJ : I ≤ J) {r : S}
    (hr : r ∈ (J : Set S) \ I) {p : R[X]} (p_ne_zero : p.map (Quotient.mk (I.comap f)) ≠ 0)
    (hp : p.eval₂ f r ∈ I) : I.comap f < J.comap f 
goal: Ideal.comap f I < Ideal.comap f J

full_name: Ideal.mem_of_one_mem
code: theorem mem_of_one_mem (h : (1 : S) ∈ I) (x) : x ∈ I 
goal: x ∈ I

full_name: Ideal.comap_lt_comap_of_integral_mem_sdiff
code: theorem comap_lt_comap_of_integral_mem_sdiff [Algebra R S] [hI : I.IsPrime] (hIJ : I ≤ J) {x : S}
    (mem : x ∈ (J : Set S) \ I) (integral : IsIntegral R x) :
    I.comap (algebraMap R S) < J.comap (algebraMap R S) 
goal: Ideal.comap (algebraMap R S) I < Ideal.comap (algebraMap R S) J

full_name: Ideal.comap_ne_bot_of_root_mem
code: theorem comap_ne_bot_of_root_mem [IsDomain S] {r : S} (r_ne_zero : r ≠ 0) (hr : r ∈ I) {p : R[X]}
    (p_ne_zero : p ≠ 0) (hp : p.eval₂ f r = 0) : I.comap f ≠ ⊥ 
goal: Ideal.comap f I ≠ ⊥

full_name: Ideal.isMaximal_of_isIntegral_of_isMaximal_comap
code: theorem isMaximal_of_isIntegral_of_isMaximal_comap [Algebra R S] [Algebra.IsIntegral R S]
    (I : Ideal S) [I.IsPrime] (hI : IsMaximal (I.comap (algebraMap R S))) : IsMaximal I 
goal: I.IsMaximal

full_name: Ideal.isMaximal_of_isIntegral_of_isMaximal_comap'
code: theorem isMaximal_of_isIntegral_of_isMaximal_comap' (f : R →+* S) (hf : f.IsIntegral) (I : Ideal S)
    [I.IsPrime] (hI : IsMaximal (I.comap f)) : IsMaximal I 
goal: I.IsMaximal

full_name: Ideal.comap_ne_bot_of_algebraic_mem
code: theorem comap_ne_bot_of_algebraic_mem [IsDomain S] {x : S} (x_ne_zero : x ≠ 0) (x_mem : x ∈ I)
    (hx : IsAlgebraic R x) : I.comap (algebraMap R S) ≠ ⊥ 
goal: Ideal.comap (algebraMap R S) I ≠ ⊥

full_name: Ideal.comap_ne_bot_of_integral_mem
code: theorem comap_ne_bot_of_integral_mem [Nontrivial R] [IsDomain S] {x : S} (x_ne_zero : x ≠ 0)
    (x_mem : x ∈ I) (hx : IsIntegral R x) : I.comap (algebraMap R S) ≠ ⊥ 
goal: Ideal.comap (algebraMap R S) I ≠ ⊥

full_name: Ideal.eq_bot_of_comap_eq_bot
code: theorem eq_bot_of_comap_eq_bot [Nontrivial R] [IsDomain S] [Algebra.IsIntegral R S]
    (hI : I.comap (algebraMap R S) = ⊥) : I = ⊥ 
goal: I = ⊥

full_name: Ideal.isMaximal_comap_of_isIntegral_of_isMaximal
code: theorem isMaximal_comap_of_isIntegral_of_isMaximal [Algebra.IsIntegral R S] (I : Ideal S)
    [hI : I.IsMaximal] : IsMaximal (I.comap (algebraMap R S)) 
goal: (Ideal.comap (algebraMap R S) I).IsMaximal

full_name: Ideal.isMaximal_comap_of_isIntegral_of_isMaximal'
code: theorem isMaximal_comap_of_isIntegral_of_isMaximal' {R S : Type*} [CommRing R] [CommRing S]
    (f : R →+* S) (hf : f.IsIntegral) (I : Ideal S) [I.IsMaximal] : IsMaximal (I.comap f) 
goal: (Ideal.comap f I).IsMaximal

full_name: Ideal.IsIntegralClosure.comap_lt_comap
code: theorem IsIntegralClosure.comap_lt_comap {I J : Ideal A} [I.IsPrime] (I_lt_J : I < J) :
    I.comap (algebraMap R A) < J.comap (algebraMap R A) 
goal: Ideal.comap (algebraMap R A) I < Ideal.comap (algebraMap R A) J

full_name: Ideal.IsIntegralClosure.isMaximal_of_isMaximal_comap
code: theorem IsIntegralClosure.isMaximal_of_isMaximal_comap (I : Ideal A) [I.IsPrime]
    (hI : IsMaximal (I.comap (algebraMap R A))) : IsMaximal I 
goal: I.IsMaximal

full_name: Ideal.IsIntegralClosure.comap_ne_bot
code: theorem IsIntegralClosure.comap_ne_bot [Nontrivial R] {I : Ideal A} (I_ne_bot : I ≠ ⊥) :
    I.comap (algebraMap R A) ≠ ⊥ 
goal: Ideal.comap (algebraMap R A) I ≠ ⊥

full_name: Ideal.IsIntegralClosure.eq_bot_of_comap_eq_bot
code: theorem IsIntegralClosure.eq_bot_of_comap_eq_bot [Nontrivial R] {I : Ideal A} :
    I.comap (algebraMap R A) = ⊥ → I = ⊥ 
goal: Ideal.comap (algebraMap R A) I = ⊥ → I = ⊥

full_name: Ideal.IntegralClosure.comap_lt_comap
code: theorem IntegralClosure.comap_lt_comap {I J : Ideal (integralClosure R S)} [I.IsPrime]
    (I_lt_J : I < J) :
    I.comap (algebraMap R (integralClosure R S)) < J.comap (algebraMap R (integralClosure R S)) 
goal: Ideal.comap (algebraMap R ↥(integralClosure R S)) I < Ideal.comap (algebraMap R ↥(integralClosure R S)) J

full_name: Ideal.IntegralClosure.isMaximal_of_isMaximal_comap
code: theorem IntegralClosure.isMaximal_of_isMaximal_comap (I : Ideal (integralClosure R S)) [I.IsPrime]
    (hI : IsMaximal (I.comap (algebraMap R (integralClosure R S)))) : IsMaximal I 
goal: I.IsMaximal

full_name: Ideal.IntegralClosure.comap_ne_bot
code: theorem IntegralClosure.comap_ne_bot [Nontrivial R] {I : Ideal (integralClosure R S)}
    (I_ne_bot : I ≠ ⊥) : I.comap (algebraMap R (integralClosure R S)) ≠ ⊥ 
goal: Ideal.comap (algebraMap R ↥(integralClosure R S)) I ≠ ⊥

full_name: Ideal.IntegralClosure.eq_bot_of_comap_eq_bot
code: theorem IntegralClosure.eq_bot_of_comap_eq_bot [Nontrivial R] {I : Ideal (integralClosure R S)} :
    I.comap (algebraMap R (integralClosure R S)) = ⊥ → I = ⊥ 
goal: Ideal.comap (algebraMap R ↥(integralClosure R S)) I = ⊥ → I = ⊥

full_name: Ideal.exists_ideal_over_prime_of_isIntegral_of_isDomain
code: /-- `comap (algebraMap R S)` is a surjection from the prime spec of `R` to prime spec of `S`.
`hP : (algebraMap R S).ker ≤ P` is a slight generalization of the extension being injective -/
theorem exists_ideal_over_prime_of_isIntegral_of_isDomain [Algebra.IsIntegral R S] (P : Ideal R)
    [IsPrime P] (hP : RingHom.ker (algebraMap R S) ≤ P) :
    ∃ Q : Ideal S, IsPrime Q ∧ Q.comap (algebraMap R S) = P 
goal: ∃ Q, Q.IsPrime ∧ Ideal.comap (algebraMap R S) Q = P

full_name: Ideal.exists_ideal_over_prime_of_isIntegral_of_isPrime
code: /-- More general going-up theorem than `exists_ideal_over_prime_of_isIntegral_of_isDomain`.
TODO: Version of going-up theorem with arbitrary length chains (by induction on this)?
  Not sure how best to write an ascending chain in Lean -/
theorem exists_ideal_over_prime_of_isIntegral_of_isPrime
    [Algebra.IsIntegral R S] (P : Ideal R) [IsPrime P]
    (I : Ideal S) [IsPrime I] (hIP : I.comap (algebraMap R S) ≤ P) :
    ∃ Q ≥ I, IsPrime Q ∧ Q.comap (algebraMap R S) = P 
goal: ∃ Q ≥ I, Q.IsPrime ∧ Ideal.comap (algebraMap R S) Q = P

full_name: Ideal.exists_ideal_comap_le_prime
code: lemma exists_ideal_comap_le_prime (P : Ideal R) [P.IsPrime]
    (I : Ideal S) (hI : I.comap (algebraMap R S) ≤ P) :
    ∃ Q ≥ I, Q.IsPrime ∧ Q.comap (algebraMap R S) ≤ P 
goal: ∃ Q ≥ I, Q.IsPrime ∧ Ideal.comap (algebraMap R S) Q ≤ P

full_name: Ideal.exists_ideal_over_prime_of_isIntegral
code: theorem exists_ideal_over_prime_of_isIntegral [Algebra.IsIntegral R S] (P : Ideal R) [IsPrime P]
    (I : Ideal S) (hIP : I.comap (algebraMap R S) ≤ P) :
    ∃ Q ≥ I, IsPrime Q ∧ Q.comap (algebraMap R S) = P 
goal: ∃ Q ≥ I, Q.IsPrime ∧ Ideal.comap (algebraMap R S) Q = P

full_name: Ideal.exists_ideal_over_maximal_of_isIntegral
code: /-- `comap (algebraMap R S)` is a surjection from the max spec of `S` to max spec of `R`.
`hP : (algebraMap R S).ker ≤ P` is a slight generalization of the extension being injective -/
theorem exists_ideal_over_maximal_of_isIntegral [Algebra.IsIntegral R S]
    (P : Ideal R) [P_max : IsMaximal P] (hP : RingHom.ker (algebraMap R S) ≤ P) :
    ∃ Q : Ideal S, IsMaximal Q ∧ Q.comap (algebraMap R S) = P 
goal: ∃ Q, Q.IsMaximal ∧ Ideal.comap (algebraMap R S) Q = P

full_name: Ideal.map_eq_top_iff_of_ker_le
code: lemma map_eq_top_iff_of_ker_le
    (f : R →+* S) {I : Ideal R} (hf₁ : RingHom.ker f ≤ I) (hf₂ : f.IsIntegral) :
    I.map f = ⊤ ↔ I = ⊤ 
goal: Ideal.map f I = ⊤ ↔ I = ⊤

full_name: Ideal.map_eq_top_iff
code: lemma map_eq_top_iff
    (f : R →+* S) {I : Ideal R} (hf₁ : Function.Injective f) (hf₂ : f.IsIntegral) :
    I.map f = ⊤ ↔ I = ⊤ 
goal: Ideal.map f I = ⊤ ↔ I = ⊤