ModuleAddCommGroupMvPolynomialTotalDegreeLeEvalEq.lean
Nyll.SchemeTheory.RingTheory.Polynomial.AddCommGroupMvPolynomialTotalDegreeLeEvalEq
8 declarations indexed from sourceView source ↗ Module documentation
Add Comm Group exists mv Polynomial total Degree le eval eq of forall exists polynomial
zsmul add
Declarations
AlgebraicCurves.Foundations.Polynomial.Proofs.PolynomialAdditiveInterpolation.P2mPolyLines.mvPolynomial_eq_of_forall_eval_intCast_eq
Source context 6 commands
Surrounding namespaces, section variables, and local commands at this declaration.
@[expose] public section
section ProofImplementation
namespace AlgebraicCurves.Foundations.Polynomial.Proofs.PolynomialAdditiveInterpolation
open MvPolynomial Finset
namespace P2mPolyLines
variable {R : Type*}
AlgebraicCurves.Foundations.Polynomial.Proofs.PolynomialAdditiveInterpolation.P2mPolyLines.eval_mul_of_isHomogeneous
Source context 6 commands
Surrounding namespaces, section variables, and local commands at this declaration.
@[expose] public section
section ProofImplementation
namespace AlgebraicCurves.Foundations.Polynomial.Proofs.PolynomialAdditiveInterpolation
open MvPolynomial Finset
namespace P2mPolyLines
variable {R : Type*}
AlgebraicCurves.Foundations.Polynomial.Proofs.PolynomialAdditiveInterpolation.P2mPolyLines.LinePoly
DocumentationA function whose restriction to every integral affine line is polynomial of degree at most d.
Source context 9 commands
Surrounding namespaces, section variables, and local commands at this declaration.
@[expose] public section
section ProofImplementation
namespace AlgebraicCurves.Foundations.Polynomial.Proofs.PolynomialAdditiveInterpolation
open MvPolynomial Finset
namespace P2mPolyLines
variable {R : Type*}
section Lines
variable [Field R]
variable {M : Type*} [AddCommGroup M]
AlgebraicCurves.Foundations.Polynomial.Proofs.PolynomialAdditiveInterpolation.P2mPolyLines.LinePoly.shift
Source context 9 commands
Surrounding namespaces, section variables, and local commands at this declaration.
@[expose] public section
section ProofImplementation
namespace AlgebraicCurves.Foundations.Polynomial.Proofs.PolynomialAdditiveInterpolation
open MvPolynomial Finset
namespace P2mPolyLines
variable {R : Type*}
section Lines
variable [Field R]
variable {M : Type*} [AddCommGroup M]
AlgebraicCurves.Foundations.Polynomial.Proofs.PolynomialAdditiveInterpolation.P2mPolyLines.exists_mvPolynomial_fin
Source context 10 commands
Surrounding namespaces, section variables, and local commands at this declaration.
@[expose] public section
section ProofImplementation
namespace AlgebraicCurves.Foundations.Polynomial.Proofs.PolynomialAdditiveInterpolation
open MvPolynomial Finset
namespace P2mPolyLines
variable {R : Type*}
section Lines
variable [Field R]
variable {M : Type*} [AddCommGroup M]
variable [CharZero R]
AlgebraicCurves.Foundations.Polynomial.Proofs.PolynomialAdditiveInterpolation.P2mPolyLines.exists_mvPolynomial_totalDegree_le
Source context 10 commands
Surrounding namespaces, section variables, and local commands at this declaration.
@[expose] public section
section ProofImplementation
namespace AlgebraicCurves.Foundations.Polynomial.Proofs.PolynomialAdditiveInterpolation
open MvPolynomial Finset
namespace P2mPolyLines
variable {R : Type*}
section Lines
variable [Field R]
variable {M : Type*} [AddCommGroup M]
variable [CharZero R]
Lean source · full declarationtheorem exists_mvPolynomial_totalDegree_le {ι : Type*} [Fintype ι] (f : M → R) (d : ℕ)
(hf : LinePoly f d) (e : ι → M) (P : MvPolynomial ι R)
(hP : ∀ c : ι → ℤ, eval (fun i => (c i : R)) P = f (∑ i, c i • e i)) :
∃ P' : MvPolynomial ι R, P'.totalDegree ≤ d ∧
∀ c : ι → ℤ, eval (fun i => (c i : R)) P' = f (∑ i, c i • e i) := by
classical
set N := P.totalDegree with hN
have hcomp : ∀ k, d < k → homogeneousComponent k P = 0 := by
intro k hdk
by_cases hkN : N < k
· exact homogeneousComponent_eq_zero k P hkN
push Not at hkN
apply mvPolynomial_eq_of_forall_eval_intCast_eq (R := R)
intro c
rw [map_zero]
obtain ⟨p, hp, hpf⟩ := hf (∑ i, c i • e i) 0
set q : Polynomial R :=
∑ j ∈ range (N + 1), Polynomial.C (eval (fun i => (c i : R)) (homogeneousComponent j P)) *
Polynomial.X ^ j with hq
have hqp : q = p := by
apply Polynomial.eq_of_infinite_eval_eq
refine Set.Infinite.mono (s := Set.range (Int.cast : ℤ → R)) ?_
(Set.infinite_range_of_injective Int.cast_injective)
rintro _ ⟨n, rfl⟩
change Polynomial.eval (n : R) q = Polynomial.eval (n : R) p
rw [← hpf n, add_zero, Finset.smul_sum]
simp_rw [smul_smul]
rw [← hP (fun i => n * c i), hq, Polynomial.eval_finsetSum]
conv_rhs => rw [← sum_homogeneousComponent P, map_sum]
refine Finset.sum_congr rfl fun j _ => ?_
rw [Polynomial.eval_mul, Polynomial.eval_C, Polynomial.eval_pow, Polynomial.eval_X, mul_comm]
have e1 : (fun i => ((n * c i : ℤ) : R)) = fun i => (n : R) * (c i : R) := by
funext i; push_cast; ring
rw [e1, eval_mul_of_isHomogeneous (homogeneousComponent_isHomogeneous j P)]
have hcq : q.coeff k = eval (fun i => (c i : R)) (homogeneousComponent k P) := by
rw [hq, Polynomial.finsetSum_coeff]
simp only [Polynomial.coeff_C_mul_X_pow]
rw [Finset.sum_ite_eq, ite_eq_left (Finset.mem_range.mpr (Nat.lt_succ_of_le hkN))]
have hcp : p.coeff k = 0 := Polynomial.coeff_eq_zero_of_natDegree_lt (lt_of_le_of_lt hp hdk)
rw [← hcq, hqp, hcp]
refine ⟨∑ k ∈ range (d + 1), homogeneousComponent k P, ?_, fun c => ?_⟩
· refine (totalDegree_finsetSum _ _).trans (Finset.sup_le fun k hk => ?_)
exact (homogeneousComponent_isHomogeneous k P).totalDegree_le.trans
(Nat.lt_succ_iff.mp (Finset.mem_range.mp hk))
· rw [← hP c]
conv_rhs => rw [← sum_homogeneousComponent P]
rw [map_sum, map_sum]
have key : ∀ k, eval (fun i => (c i : R)) (homogeneousComponent k P) =
if k ≤ d ∧ k ≤ N then eval (fun i => (c i : R)) (homogeneousComponent k P) else 0 := by
intro k
split_ifs with hk
· rfl
· rw [not_and_or, not_le, not_le] at hk
rcases hk with hk | hk
· rw [hcomp k hk, map_zero]
· rw [homogeneousComponent_eq_zero k P hk, map_zero]
have hL : ∑ k ∈ range (d + 1), eval (fun i => (c i : R)) (homogeneousComponent k P) =
∑ k ∈ range (min d N + 1), eval (fun i => (c i : R)) (homogeneousComponent k P) := by
rw [eq_comm]
apply Finset.sum_subset (Finset.range_subset_range.mpr (by omega))
intro k hk hk'
rw [Finset.mem_range] at hk hk'
rw [key, ite_eq_right]
omega
have hR : ∑ k ∈ range (N + 1), eval (fun i => (c i : R)) (homogeneousComponent k P) =
∑ k ∈ range (min d N + 1), eval (fun i => (c i : R)) (homogeneousComponent k P) := by
rw [eq_comm]
apply Finset.sum_subset (Finset.range_subset_range.mpr (by omega))
intro k hk hk'
rw [Finset.mem_range] at hk hk'
rw [key, ite_eq_right]
omega
rw [hL, hR]
AlgebraicCurves.Foundations.Polynomial.Proofs.PolynomialAdditiveInterpolation.P2mPolyLines.exists_mvPolynomial_totalDegree_le_of_linePoly
Source context 10 commands
Surrounding namespaces, section variables, and local commands at this declaration.
@[expose] public section
section ProofImplementation
namespace AlgebraicCurves.Foundations.Polynomial.Proofs.PolynomialAdditiveInterpolation
open MvPolynomial Finset
namespace P2mPolyLines
variable {R : Type*}
section Lines
variable [Field R]
variable {M : Type*} [AddCommGroup M]
variable [CharZero R]
AddCommGroup.exists_mvPolynomial_totalDegree_le_eval_eq_of_forall_exists_polynomial_zsmul_add
Source context 5 commands
Surrounding namespaces, section variables, and local commands at this declaration.
@[expose] public section
section ProofImplementation
namespace AddCommGroup
open _root_.AlgebraicCurves.Foundations.Polynomial.Proofs.PolynomialAdditiveInterpolation
open _root_.MvPolynomial _root_.Finset