File: Mathlib/Algebra/Polynomial/Lifts.lean

full_name: Polynomial.lifts
code: /-- We define the subsemiring of polynomials that lifts as the image of `RingHom.of (map f)`. -/
def lifts (f : R →+* S) : Subsemiring S[X] 
goal: Subsemiring S[X]

full_name: Polynomial.mem_lifts
code: theorem mem_lifts (p : S[X]) : p ∈ lifts f ↔ ∃ q : R[X], map f q = p 
goal: p ∈ Polynomial.lifts f ↔ ∃ q, Polynomial.map f q = p

full_name: Polynomial.lifts_iff_set_range
code: theorem lifts_iff_set_range (p : S[X]) : p ∈ lifts f ↔ p ∈ Set.range (map f) 
goal: p ∈ Polynomial.lifts f ↔ p ∈ Set.range (Polynomial.map f)

full_name: Polynomial.lifts_iff_ringHom_rangeS
code: theorem lifts_iff_ringHom_rangeS (p : S[X]) : p ∈ lifts f ↔ p ∈ (mapRingHom f).rangeS 
goal: p ∈ Polynomial.lifts f ↔ p ∈ (Polynomial.mapRingHom f).rangeS

full_name: Polynomial.lifts_iff_coeff_lifts
code: theorem lifts_iff_coeff_lifts (p : S[X]) : p ∈ lifts f ↔ ∀ n : ℕ, p.coeff n ∈ Set.range f 
goal: p ∈ Polynomial.lifts f ↔ ∀ (n : ℕ), p.coeff n ∈ Set.range ⇑f

full_name: Polynomial.C_mem_lifts
code: /-- If `(r : R)`, then `C (f r)` lifts. -/
theorem C_mem_lifts (f : R →+* S) (r : R) : C (f r) ∈ lifts f 
goal: Polynomial.C (f r) ∈ Polynomial.lifts f

full_name: Polynomial.C'_mem_lifts
code: /-- If `(s : S)` is in the image of `f`, then `C s` lifts. -/
theorem C'_mem_lifts {f : R →+* S} {s : S} (h : s ∈ Set.range f) : C s ∈ lifts f 
goal: Polynomial.C s ∈ Polynomial.lifts f

full_name: Polynomial.X_mem_lifts
code: /-- The polynomial `X` lifts. -/
theorem X_mem_lifts (f : R →+* S) : (X : S[X]) ∈ lifts f 
goal: Polynomial.X ∈ Polynomial.lifts f

full_name: Polynomial.X_pow_mem_lifts
code: /-- The polynomial `X ^ n` lifts. -/
theorem X_pow_mem_lifts (f : R →+* S) (n : ℕ) : (X ^ n : S[X]) ∈ lifts f 
goal: Polynomial.X ^ n ∈ Polynomial.lifts f

full_name: Polynomial.base_mul_mem_lifts
code: /-- If `p` lifts and `(r : R)` then `r * p` lifts. -/
theorem base_mul_mem_lifts {p : S[X]} (r : R) (hp : p ∈ lifts f) : C (f r) * p ∈ lifts f 
goal: Polynomial.C (f r) * p ∈ Polynomial.lifts f

full_name: Polynomial.monomial_mem_lifts
code: /-- If `(s : S)` is in the image of `f`, then `monomial n s` lifts. -/
theorem monomial_mem_lifts {s : S} (n : ℕ) (h : s ∈ Set.range f) : monomial n s ∈ lifts f 
goal: (Polynomial.monomial n) s ∈ Polynomial.lifts f

full_name: Polynomial.erase_mem_lifts
code: /-- If `p` lifts then `p.erase n` lifts. -/
theorem erase_mem_lifts {p : S[X]} (n : ℕ) (h : p ∈ lifts f) : p.erase n ∈ lifts f 
goal: Polynomial.erase n p ∈ Polynomial.lifts f

full_name: Polynomial.monomial_mem_lifts_and_degree_eq
code: theorem monomial_mem_lifts_and_degree_eq {s : S} {n : ℕ} (hl : monomial n s ∈ lifts f) :
    ∃ q : R[X], map f q = monomial n s ∧ q.degree = (monomial n s).degree 
goal: ∃ q, Polynomial.map f q = (Polynomial.monomial n) s ∧ q.degree = ((Polynomial.monomial n) s).degree

full_name: Polynomial.mem_lifts_and_degree_eq
code: /-- A polynomial lifts if and only if it can be lifted to a polynomial of the same degree. -/
theorem mem_lifts_and_degree_eq {p : S[X]} (hlifts : p ∈ lifts f) :
    ∃ q : R[X], map f q = p ∧ q.degree = p.degree 
goal: ∃ q, Polynomial.map f q = p ∧ q.degree = p.degree

full_name: Polynomial.lifts_and_degree_eq_and_monic
code: /-- A monic polynomial lifts if and only if it can be lifted to a monic polynomial
of the same degree. -/
theorem lifts_and_degree_eq_and_monic [Nontrivial S] {p : S[X]} (hlifts : p ∈ lifts f)
    (hp : p.Monic) : ∃ q : R[X], map f q = p ∧ q.degree = p.degree ∧ q.Monic 
goal: ∃ q, Polynomial.map f q = p ∧ q.degree = p.degree ∧ q.Monic

full_name: Polynomial.lifts_and_natDegree_eq_and_monic
code: theorem lifts_and_natDegree_eq_and_monic {p : S[X]} (hlifts : p ∈ lifts f) (hp : p.Monic) :
    ∃ q : R[X], map f q = p ∧ q.natDegree = p.natDegree ∧ q.Monic 
goal: ∃ q, Polynomial.map f q = p ∧ q.natDegree = p.natDegree ∧ q.Monic

full_name: Polynomial.liftsRing
code: /-- The subring of polynomials that lift. -/
def liftsRing (f : R →+* S) : Subring S[X] 
goal: Subring S[X]

full_name: Polynomial.lifts_iff_liftsRing
code: /-- If `R` and `S` are rings, `p` is in the subring of polynomials that lift if and only if it is in
the subsemiring of polynomials that lift. -/
theorem lifts_iff_liftsRing (p : S[X]) : p ∈ lifts f ↔ p ∈ liftsRing f 
goal: p ∈ Polynomial.lifts f ↔ p ∈ Polynomial.liftsRing f

full_name: Polynomial.mapAlg
code: /-- The map `R[X] → S[X]` as an algebra homomorphism. -/
def mapAlg (R : Type u) [CommSemiring R] (S : Type v) [Semiring S] [Algebra R S] :
    R[X] →ₐ[R] S[X] 
goal: R[X] →ₐ[R] S[X]

full_name: Polynomial.mapAlg_eq_map
code: /-- `mapAlg` is the morphism induced by `R → S`. -/
theorem mapAlg_eq_map (p : R[X]) : mapAlg R S p = map (algebraMap R S) p 
goal: (Polynomial.mapAlg R S) p = Polynomial.map (algebraMap R S) p

full_name: Polynomial.mem_lifts_iff_mem_alg
code: /-- A polynomial `p` lifts if and only if it is in the image of `mapAlg`. -/
theorem mem_lifts_iff_mem_alg (R : Type u) [CommSemiring R] {S : Type v} [Semiring S] [Algebra R S]
    (p : S[X]) : p ∈ lifts (algebraMap R S) ↔ p ∈ AlgHom.range (@mapAlg R _ S _ _) 
goal: p ∈ Polynomial.lifts (algebraMap R S) ↔ p ∈ (Polynomial.mapAlg R S).range

full_name: Polynomial.smul_mem_lifts
code: /-- If `p` lifts and `(r : R)` then `r • p` lifts. -/
theorem smul_mem_lifts {p : S[X]} (r : R) (hp : p ∈ lifts (algebraMap R S)) :
    r • p ∈ lifts (algebraMap R S) 
goal: r • p ∈ Polynomial.lifts (algebraMap R S)