math / data /lean /OAI /NumberTheory /PowerFree /NormalMonomials.lean
introvoyz045's picture
Migrated from GitHub
4a56cd6 verified
Raw History Blame Contribute Delete
18.8 kB
import OAI.NumberTheory.PowerFree.Sieve
namespace OAI
namespace QuarticPowerFree
open MvPolynomial Finsupp MonomialOrder
open scoped MonomialOrder
variable {Οƒ K : Type*} [Field K]
def IdealNormal (m : MonomialOrder Οƒ) (I : Ideal (MvPolynomial Οƒ K))
(d : Οƒ β†’β‚€ β„•) : Prop :=
βˆ€ p ∈ I, p β‰  0 β†’ Β¬ m.degree p ≀ d
theorem ideal_normal_form (m : MonomialOrder Οƒ) (I : Ideal (MvPolynomial Οƒ K))
(p : MvPolynomial Οƒ K) :
βˆƒ r : MvPolynomial Οƒ K, p-r ∈ I ∧
(βˆ€ d ∈ r.support, IdealNormal m I d) ∧ m.degree r β‰Ό[m] m.degree p := by
classical
let b : {q : MvPolynomial Οƒ K // q ∈ I ∧ q β‰  0} β†’ MvPolynomial Οƒ K := Subtype.val
have hb : βˆ€ i, IsUnit (m.leadingCoeff (b i)) := by
intro i
apply isUnit_iff_ne_zero.mpr
exact m.leadingCoeff_ne_zero_iff.mpr i.property.2
obtain ⟨g, r, hpr, hdeg, hr⟩ := m.div hb p
have hg : Finsupp.linearCombination _ b g ∈ I := by
rw [Finsupp.linearCombination_apply, Finsupp.sum]
apply Ideal.sum_mem
intro i _
exact Ideal.mul_mem_left _ _ i.property.1
refine ⟨r, ?_, ?_, ?_⟩
Β· rw [hpr, add_sub_cancel_right]; exact hg
Β· intro d hd q hq hq0
exact hr d hd ⟨q, hq, hq0⟩
Β· have hlin : m.degree (Finsupp.linearCombination _ b g) β‰Ό[m] m.degree p := by
rw [Finsupp.linearCombination_apply, Finsupp.sum]
apply m.degree_sum_le.trans
apply Finset.sup_le
intro i _
simpa [smul_eq_mul, mul_comm] using hdeg i
have heq : r = p - Finsupp.linearCombination _ b g := by rw [hpr]; ring
rw [heq]
exact (m.degree_sub_le).trans (max_le le_rfl hlin)
theorem ideal_normal_injective (m : MonomialOrder Οƒ) (I : Ideal (MvPolynomial Οƒ K))
(p : MvPolynomial Οƒ K) (hp : βˆ€ d ∈ p.support, IdealNormal m I d)
(hI : p ∈ I) : p = 0 := by
by_contra hp0
exact hp _ (m.degree_mem_support hp0) p hI hp0 le_rfl
theorem ideal_normal_quotient_bijective (m : MonomialOrder Οƒ)
(I : Ideal (MvPolynomial Οƒ K)) :
Function.Bijective
(((Ideal.Quotient.mkₐ K I).toLinearMap).comp
(restrictSupport K {d : Οƒ β†’β‚€ β„• | IdealNormal m I d}).subtype) := by
classical
constructor
Β· apply LinearMap.ker_eq_bot.mp
apply LinearMap.ker_eq_bot'.mpr
intro p hp
apply Subtype.ext
exact ideal_normal_injective m I p.val (fun d hd => p.property hd)
(Ideal.Quotient.eq_zero_iff_mem.mp hp)
Β· intro y
obtain ⟨p, rfl⟩ := Ideal.Quotient.mk_surjective y
obtain ⟨r, hr, hn, _⟩ := ideal_normal_form m I p
refine ⟨⟨r, fun d hd => hn d hd⟩, ?_⟩
change (Ideal.Quotient.mk I) r = (Ideal.Quotient.mk I) p
apply Ideal.Quotient.eq.mpr
simpa only [neg_sub] using I.neg_mem hr
noncomputable def idealNormalEquiv (m : MonomialOrder Οƒ)
(I : Ideal (MvPolynomial Οƒ K)) :
restrictSupport K {d : Οƒ β†’β‚€ β„• | IdealNormal m I d} ≃ₗ[K]
MvPolynomial Οƒ K β§Έ I :=
LinearEquiv.ofBijective
(((Ideal.Quotient.mkₐ K I).toLinearMap).comp
(restrictSupport K {d : Οƒ β†’β‚€ β„• | IdealNormal m I d}).subtype)
(ideal_normal_quotient_bijective m I)
noncomputable def idealNormalBasis (m : MonomialOrder Οƒ)
(I : Ideal (MvPolynomial Οƒ K)) :
Module.Basis {d : Οƒ β†’β‚€ β„• // IdealNormal m I d} K (MvPolynomial Οƒ K β§Έ I) :=
(basisRestrictSupport K {d : Οƒ β†’β‚€ β„• | IdealNormal m I d}).map (idealNormalEquiv m I)
theorem ideal_normal_finite_obstructions [Finite Οƒ] (m : MonomialOrder Οƒ)
(I : Ideal (MvPolynomial Οƒ K)) :
βˆƒ s : Finset (Οƒ β†’β‚€ β„•),
(βˆ€ d ∈ s, βˆƒ p ∈ I, p β‰  0 ∧ m.degree p = d) ∧
βˆ€ d, IdealNormal m I d ↔ βˆ€ a ∈ s, Β¬ a ≀ d := by
classical
let D : Set (Οƒ β†’β‚€ β„•) := {d | βˆƒ p ∈ I, p β‰  0 ∧ m.degree p = d}
have hf : {a | Minimal (· ∈ D) a}.Finite :=
WellQuasiOrderedLE.finite_of_isAntichain (setOfPred_minimal_antichain _)
refine ⟨hf.toFinset, ?_, ?_⟩
Β· intro d hd
exact (hf.mem_toFinset.mp hd).1
Β· intro d
constructor
Β· intro hn a ha had
obtain ⟨p, hp, hp0, he⟩ := (hf.mem_toFinset.mp ha).1
exact hn p hp hp0 (he β–Έ had)
Β· intro hn p hp hp0 hpd
have hpD : m.degree p ∈ D := ⟨p, hp, hp0, rfl⟩
obtain ⟨a, hap, ha⟩ := (show D.IsPWO from Set.isPWO_of_wellQuasiOrderedLE D).exists_le_minimal hpD
exact hn a (hf.mem_toFinset.mpr ha) (hap.trans hpd)
noncomputable def totalSpace (T : β„•) : Submodule K (MvPolynomial Οƒ K) :=
restrictSupport K {d | d.degree ≀ T}
@[simp] theorem mem_totalSpace {T : β„•} {p : MvPolynomial Οƒ K} :
p ∈ totalSpace T ↔ p.totalDegree ≀ T := by
simp only [totalSpace, mem_restrictSupport_iff, totalDegree, Finset.sup_le_iff]
rfl
noncomputable def normalTotalSpace (m : MonomialOrder Οƒ) (I : Ideal (MvPolynomial Οƒ K))
(T : β„•) : Submodule K (MvPolynomial Οƒ K) :=
restrictSupport K {d | IdealNormal m I d ∧ d.degree ≀ T}
theorem normalTotalSpace_le (m : MonomialOrder Οƒ) (I : Ideal (MvPolynomial Οƒ K))
(T : β„•) : normalTotalSpace m I T ≀ totalSpace T := by
intro p hp d hd
exact (hp hd).2
theorem totalSpace_image_normal [LinearOrder Οƒ] [WellFoundedGT Οƒ]
(I : Ideal (MvPolynomial Οƒ K)) (T : β„•) :
(totalSpace T).map (Ideal.Quotient.mkₐ K I).toLinearMap =
(normalTotalSpace degLex I T).map (Ideal.Quotient.mkₐ K I).toLinearMap := by
apply le_antisymm
· rintro y ⟨p, hp, rfl⟩
obtain ⟨r, hr, hn, hd⟩ := ideal_normal_form degLex I p
refine ⟨r, ?_, ?_⟩
Β· intro d hdr
refine ⟨hn d hdr, ?_⟩
exact (le_totalDegree hdr).trans
((degLex_totalDegree_monotone hd).trans (mem_totalSpace.mp hp))
Β· apply Ideal.Quotient.eq.mpr
simpa only [neg_sub] using I.neg_mem hr
Β· exact Submodule.map_mono (normalTotalSpace_le _ _ _)
theorem coordinate_hilbert_count [LinearOrder Οƒ] [WellFoundedGT Οƒ]
(I : Ideal (MvPolynomial Οƒ K)) (T : β„•) :
Module.finrank K ((totalSpace T).map (Ideal.Quotient.mkₐ K I).toLinearMap) =
Nat.card {d : Οƒ β†’β‚€ β„• // IdealNormal degLex I d ∧ d.degree ≀ T} := by
rw [totalSpace_image_normal]
let M := normalTotalSpace degLex I T
let f := (Ideal.Quotient.mkₐ K I).toLinearMap.domRestrict M
have hf : Function.Injective f := by
apply LinearMap.ker_eq_bot.mp
apply LinearMap.ker_eq_bot'.mpr
intro p hp
apply Subtype.ext
exact ideal_normal_injective degLex I p.val (fun d hd => (p.property hd).1)
(Ideal.Quotient.eq_zero_iff_mem.mp hp)
have heq : LinearMap.range f = M.map (Ideal.Quotient.mkₐ K I).toLinearMap :=
LinearMap.range_domRestrict _ _
rw [← heq, LinearMap.finrank_range_of_inj hf]
exact Module.finrank_eq_nat_card_basis (basisRestrictSupport K _)
open scoped BigOperators
noncomputable def simplexTuple (h N : β„•) : Finset (Fin h β†’ β„•) :=
(Finset.range (N+1)).biUnion (Finset.Nat.antidiagonalTuple h)
@[simp] theorem mem_simplexTuple {h N : β„•} (x : Fin h β†’ β„•) :
x ∈ simplexTuple h N ↔ βˆ‘ i, x i ≀ N := by
classical
simp only [simplexTuple, Finset.mem_biUnion, Finset.mem_range,
Finset.Nat.mem_antidiagonalTuple]
constructor
· rintro ⟨n, hn, he⟩; omega
· intro hx; exact ⟨_, by omega, rfl⟩
private theorem card_antidiagonalTuple (h N : β„•) :
(Finset.Nat.antidiagonalTuple h N).card = h.multichoose N := by
classical
have hc := Finset.card_finsuppAntidiag_nat_eq_multichoose
(s := (Finset.univ : Finset (Fin h))) N
rw [Finset.card_univ, Fintype.card_fin] at hc
rw [← hc]
apply Finset.card_bij (fun x _ => Finsupp.equivFunOnFinite.symm x)
Β· intro x hx
rw [Finset.mem_finsuppAntidiag']
exact ⟨by simpa [Finsupp.sum_fintype] using Finset.Nat.mem_antidiagonalTuple.mp hx,
Finset.subset_univ _⟩
Β· intro x _ y _ he
exact Finsupp.equivFunOnFinite.symm.injective he
Β· intro x hx
refine ⟨Finsupp.equivFunOnFinite x, ?_, by simp⟩
rw [Finset.Nat.mem_antidiagonalTuple]
simpa [Finsupp.sum_fintype] using (Finset.mem_finsuppAntidiag'.mp hx).1
theorem card_simplexTuple (h N : β„•) :
(simplexTuple h N).card = (N+h).choose h := by
classical
rw [simplexTuple, Finset.card_biUnion]
Β· simp_rw [card_antidiagonalTuple]
exact Nat.sum_range_multichoose N h
Β· intro i _ j _ hij
apply Finset.disjoint_left.mpr
intro x hi hj
exact hij ((Finset.Nat.mem_antidiagonalTuple.mp hi).symm.trans
(Finset.Nat.mem_antidiagonalTuple.mp hj))
noncomputable def simplexExponents (n T : β„•) : Finset (Fin n β†’β‚€ β„•) :=
(simplexTuple n T).map Finsupp.equivFunOnFinite.symm.toEmbedding
@[simp] theorem mem_simplexExponents {n T : β„•} (d : Fin n β†’β‚€ β„•) :
d ∈ simplexExponents n T ↔ d.degree ≀ T := by
classical
simp only [simplexExponents, Finset.mem_map_equiv, mem_simplexTuple]
change (βˆ‘ i, d i) ≀ T ↔ (d.sum fun _ e => e) ≀ T
rw [Finsupp.sum_fintype]
intro i; rfl
@[simp] theorem card_simplexExponents (n T : β„•) :
(simplexExponents n T).card = (T+n).choose n := by
rw [simplexExponents, Finset.card_map, card_simplexTuple]
noncomputable def normalExponents {n : β„•} (s : Finset (Fin n β†’β‚€ β„•)) (T : β„•) :
Finset (Fin n β†’β‚€ β„•) := by
classical
exact (simplexExponents n T).filter (fun d => βˆ€ a ∈ s, Β¬ a ≀ d)
@[simp] theorem mem_normalExponents {n : β„•} (s : Finset (Fin n β†’β‚€ β„•)) (T : β„•)
(d : Fin n β†’β‚€ β„•) :
d ∈ normalExponents s T ↔ d.degree ≀ T ∧ βˆ€ a ∈ s, Β¬ a ≀ d := by
classical
simp [normalExponents]
@[simp] theorem normalExponents_empty (n T : β„•) :
normalExponents (βˆ… : Finset (Fin n β†’β‚€ β„•)) T = simplexExponents n T := by
classical
ext; simp
noncomputable def colonMonomials {n : β„•} (a : Fin n β†’β‚€ β„•)
(s : Finset (Fin n β†’β‚€ β„•)) : Finset (Fin n β†’β‚€ β„•) := by
classical
exact s.image (fun b => b-a)
theorem colonMonomials_card_le {n : β„•} (a : Fin n β†’β‚€ β„•)
(s : Finset (Fin n β†’β‚€ β„•)) : (colonMonomials a s).card ≀ s.card := by
classical
exact Finset.card_image_le
theorem finsupp_tsub_le_iff {n : β„•} (a b d : Fin n β†’β‚€ β„•) :
b-a ≀ d ↔ b ≀ a+d := by
simp only [Finsupp.le_def, Finsupp.tsub_apply, Finsupp.add_apply]
constructor
Β· intro h i; have := h i; omega
Β· intro h i; have := h i; omega
theorem normalExponents_card_insert {n : β„•} (a : Fin n β†’β‚€ β„•)
(s : Finset (Fin n β†’β‚€ β„•)) (T : β„•) (ha : a.degree ≀ T) :
(normalExponents (insert a s) T).card +
(normalExponents (colonMonomials a s) (T-a.degree)).card =
(normalExponents s T).card := by
classical
have hs : normalExponents (insert a s) T =
(normalExponents s T).filter (fun d => Β¬ a ≀ d) := by
ext d; simp [and_left_comm, and_comm]
have hc : ((normalExponents s T).filter (a ≀ Β·)).card =
(normalExponents (colonMonomials a s) (T-a.degree)).card := by
symm
apply Finset.card_bij (fun d _ => a+d)
Β· intro d hd
obtain ⟨hdT, hdS⟩ := (mem_normalExponents _ _ d).mp hd
apply Finset.mem_filter.mpr
refine ⟨(mem_normalExponents _ _ _).mpr ⟨?_, ?_⟩, le_add_right le_rfl⟩
Β· rw [map_add]; omega
Β· intro b hb hbad
exact hdS (b-a) (Finset.mem_image.mpr ⟨b, hb, rfl⟩)
((finsupp_tsub_le_iff a b d).mpr hbad)
Β· intro d _ e _ h; exact add_left_cancel h
Β· intro d hd
obtain ⟨hdS, had⟩ := Finset.mem_filter.mp hd
obtain ⟨hdT, hdN⟩ := (mem_normalExponents _ _ d).mp hdS
refine ⟨d-a, (mem_normalExponents _ _ _).mpr ⟨?_, ?_⟩,
add_tsub_cancel_of_le had⟩
Β· have he := congrArg Finsupp.degree (add_tsub_cancel_of_le had)
simp only [map_add] at he
omega
Β· intro b hb hbd
obtain ⟨c, hc, rfl⟩ := Finset.mem_image.mp hb
apply hdN c hc
have h := (finsupp_tsub_le_iff a c (d-a)).mp hbd
simpa only [add_tsub_cancel_of_le had] using h
rw [hs, ← hc, add_comm]
exact Finset.card_filter_add_card_filter_not _
theorem normalExponents_eventually_polynomial {n : β„•} (s : Finset (Fin n β†’β‚€ β„•)) :
βˆƒ P : Polynomial β„š, P.natDegree ≀ n ∧ βˆƒ Tβ‚€ : β„•, βˆ€ T β‰₯ Tβ‚€,
((normalExponents s T).card : β„š) = P.eval (T : β„š) := by
classical
suffices H : βˆ€ N, βˆ€ s : Finset (Fin n β†’β‚€ β„•), s.card = N β†’
βˆƒ P : Polynomial β„š, P.natDegree ≀ n ∧ βˆƒ Tβ‚€ : β„•, βˆ€ T β‰₯ Tβ‚€,
((normalExponents s T).card : β„š) = P.eval (T : β„š) by
exact H s.card s rfl
intro N
induction N using Nat.strong_induction_on with
| h N ih =>
intro s hs
by_cases he : s = βˆ…
Β· subst s
refine ⟨Polynomial.preHilbertPoly β„š n 0,
(Polynomial.natDegree_preHilbertPoly _ _ _).le, 0, ?_⟩
intro T _
rw [normalExponents_empty, card_simplexExponents,
Polynomial.preHilbertPoly_eq_choose_add_sub _ _ (Nat.zero_le _)]
simp
· obtain ⟨a, ha⟩ := Finset.nonempty_iff_ne_empty.mpr he
let s' := s.erase a
have ht : s'.card < N := by rw [← hs]; exact Finset.card_erase_lt_of_mem ha
obtain ⟨P, hP, TP, hPT⟩ := ih s'.card ht s' rfl
obtain ⟨Q, hQ, TQ, hQT⟩ := ih (colonMonomials a s').card
((colonMonomials_card_le _ _).trans_lt ht) _ rfl
refine ⟨P - Q.comp (Polynomial.X - Polynomial.C (a.degree : β„š)), ?_,
max TP (TQ+a.degree), ?_⟩
Β· apply (Polynomial.natDegree_sub_le _ _).trans
apply max_le hP
rw [Polynomial.natDegree_comp, Polynomial.natDegree_X_sub_C, mul_one]
exact hQ
Β· intro T hT
have hTP : TP ≀ T := (le_max_left _ _).trans hT
have hTQ : TQ+a.degree ≀ T := (le_max_right _ _).trans hT
have haT : a.degree ≀ T := by omega
have hh := normalExponents_card_insert a s' T haT
rw [show insert a s' = s from Finset.insert_erase ha] at hh
have hhQ : ((normalExponents s T).card : β„š) +
((normalExponents (colonMonomials a s') (T-a.degree)).card : β„š) =
((normalExponents s' T).card : β„š) := by exact_mod_cast hh
rw [hPT T hTP, hQT (T-a.degree) (by omega)] at hhQ
rw [Polynomial.eval_sub, Polynomial.eval_comp, Polynomial.eval_sub,
Polynomial.eval_X, Polynomial.eval_C]
rw [Nat.cast_sub haT] at hhQ
linarith
theorem coordinate_hilbert_eventually_polynomial {n : β„•}
(I : Ideal (MvPolynomial (Fin n) K)) :
βˆƒ P : Polynomial β„š, P.natDegree ≀ n ∧ βˆƒ Tβ‚€ : β„•, βˆ€ T β‰₯ Tβ‚€,
(Module.finrank K ((totalSpace T).map (Ideal.Quotient.mkₐ K I).toLinearMap) : β„š) =
P.eval (T : β„š) := by
classical
obtain ⟨s, _, hs⟩ := ideal_normal_finite_obstructions degLex I
have hc (T : β„•) :
Module.finrank K ((totalSpace T).map (Ideal.Quotient.mkₐ K I).toLinearMap) =
(normalExponents s T).card := by
rw [coordinate_hilbert_count, ← Fintype.card_coe, ← Nat.card_eq_fintype_card]
apply Nat.card_congr
apply Equiv.subtypeEquivRight
intro d
simp only [mem_normalExponents, hs, and_comm]
obtain ⟨P, hP, Tβ‚€, hT⟩ := normalExponents_eventually_polynomial s
refine ⟨P, hP, Tβ‚€, ?_⟩
intro T h
rw [hc]
exact hT T h
theorem idealNormal_span_singleton (m : MonomialOrder Οƒ)
(p : MvPolynomial Οƒ K) (hp : p β‰  0) (d : Οƒ β†’β‚€ β„•) :
IdealNormal m (Ideal.span {p}) d ↔ Β¬ m.degree p ≀ d := by
constructor
Β· intro h
exact h p (Ideal.subset_span (Set.mem_singleton p)) hp
Β· intro h q hq hq0 hqd
obtain ⟨r, rfl⟩ := Ideal.mem_span_singleton.mp hq
have hr : r β‰  0 := by intro he; simp [he] at hq0
rw [m.degree_mul hp hr] at hqd
exact h ((_root_.le_add_right le_rfl).trans hqd)
theorem hypersurface_hilbert_count {n : β„•} (p : MvPolynomial (Fin n) K)
(hp : p β‰  0) (T : β„•) (hT : p.totalDegree ≀ T) :
Module.finrank K ((totalSpace T).map
(Ideal.Quotient.mkₐ K (Ideal.span {p})).toLinearMap) +
(T-p.totalDegree+n).choose n = (T+n).choose n := by
classical
have hc : Module.finrank K ((totalSpace T).map
(Ideal.Quotient.mkₐ K (Ideal.span {p})).toLinearMap) =
(normalExponents {degLex.degree p} T).card := by
rw [coordinate_hilbert_count, ← Fintype.card_coe, ← Nat.card_eq_fintype_card]
apply Nat.card_congr
apply Equiv.subtypeEquivRight
intro d
simp only [mem_normalExponents, idealNormal_span_singleton degLex p hp,
Finset.mem_singleton, forall_eq, and_comm]
rw [hc]
have hh := normalExponents_card_insert (degLex.degree p) βˆ… T
(by simpa only [degree_degLexDegree] using hT)
simpa [colonMonomials, degree_degLexDegree] using hh
theorem binomial_difference_sum (n e T : β„•) (he : e ≀ T) :
(T-e+(n+1)).choose (n+1) +
βˆ‘ j ∈ Finset.range e, (T-j+n).choose n =
(T+(n+1)).choose (n+1) := by
induction e with
| zero => simp
| succ e ih =>
rw [Finset.sum_range_succ]
have hi := ih (by omega)
have hE : T-e+n = (T-(e+1)+(n+1)) := by omega
have hE' : T-e+(n+1) = (T-e+n)+1 := by omega
have hb := Nat.choose_succ_succ (T-e+n) n
change (T-e+n+1).choose (n+1) = (T-e+n).choose n + (T-e+n).choose (n+1) at hb
rw [← hE'] at hb
rw [← hE]
omega
noncomputable def hypersurfaceHilbertPolynomial (n e : β„•) : Polynomial β„š :=
βˆ‘ j ∈ Finset.range e, Polynomial.preHilbertPoly β„š n j
theorem hypersurfaceHilbertPolynomial_coeff (n e : β„•) :
(hypersurfaceHilbertPolynomial n e).coeff n = (e : β„š)/(n.factorial : β„š) := by
simp [hypersurfaceHilbertPolynomial, Polynomial.coeff_preHilbertPoly_self, div_eq_mul_inv]
theorem hypersurfaceHilbertPolynomial_degree (n e : β„•) :
(hypersurfaceHilbertPolynomial n e).natDegree ≀ n := by
apply Polynomial.natDegree_sum_le_of_forall_le
intro j _
exact (Polynomial.natDegree_preHilbertPoly _ _ _).le
theorem hypersurface_hilbert_polynomial {n : β„•} (p : MvPolynomial (Fin (n+1)) K)
(hp : p β‰  0) (T : β„•) (hT : p.totalDegree ≀ T) :
(Module.finrank K ((totalSpace T).map
(Ideal.Quotient.mkₐ K (Ideal.span {p})).toLinearMap) : β„š) =
(hypersurfaceHilbertPolynomial n p.totalDegree).eval (T : β„š) := by
have hh := hypersurface_hilbert_count p hp T hT
have hb := binomial_difference_sum n p.totalDegree T hT
have he : Module.finrank K ((totalSpace T).map
(Ideal.Quotient.mkₐ K (Ideal.span {p})).toLinearMap) =
βˆ‘ j ∈ Finset.range p.totalDegree, (T-j+n).choose n := by omega
rw [he, Nat.cast_sum]
simp only [hypersurfaceHilbertPolynomial, Polynomial.eval_finsetSum]
apply Finset.sum_congr rfl
intro j hj
rw [Polynomial.preHilbertPoly_eq_choose_add_sub _ _
(Nat.le_add_right_of_le ((Finset.mem_range.mp hj).le.trans hT)),
Nat.sub_add_comm ((Finset.mem_range.mp hj).le.trans hT)]
end QuarticPowerFree
end OAI