math / data /lean /OAI /NumberTheory /PowerFree /NormComponents.lean
introvoyz045's picture
Migrated from GitHub
4a56cd6 verified
Raw History Blame Contribute Delete
16.6 kB
import OAI.NumberTheory.PowerFree.CurveThresholds
namespace OAI
namespace QuarticPowerFree
section
open MvPolynomial
open scoped BigOperators Classical
theorem quotient_pair_generates {n d : β„•} (a b : Fin d β†’ MvPolynomial (Fin n) β„‚)
(hg : Algebra.adjoin β„‚ (Set.range a βˆͺ Set.range b) = ⊀)
(I : Ideal (MvPolynomial (Fin n) β„‚)) :
Algebra.adjoin β„‚ (Set.range (fun i => Ideal.Quotient.mk I (a i)) βˆͺ
Set.range (fun i => Ideal.Quotient.mk I (b i))) = ⊀ := by
let e := Ideal.Quotient.mkₐ β„‚ I
have hr : Set.range (fun i => Ideal.Quotient.mk I (a i)) βˆͺ Set.range (fun i => Ideal.Quotient.mk I (b i)) =
e '' (Set.range a βˆͺ Set.range b) := by
simp only [Set.image_union,← Set.range_comp]
rfl
rw [hr,Algebra.adjoin_image,hg]
apply top_unique
intro z _
obtain ⟨p,rfl⟩ := Ideal.Quotient.mkₐ_surjective β„‚ I z
exact ⟨p,by trivial,_root_.rfl⟩
theorem norm_dimension_le {n d : β„•} (I : Ideal (MvPolynomial (Fin n) β„‚)) [I.IsPrime]
(k : β„•) (a b : Fin d β†’ MvPolynomial (Fin n) β„‚) (q : MvPolynomial (Fin n) β„‚) (ΞΈ : Fin d β†’ β„‚)
(ha : βˆ€ i, Ideal.Quotient.mk I (a i) β‰  0)
(heq : βˆ€ i, Ideal.Quotient.mk I (a i)^k*Ideal.Quotient.mk I (b i) =
Ideal.Quotient.mk I q-algebraMap β„‚ _ (ΞΈ i))
(hg : Algebra.adjoin β„‚ (Set.range a βˆͺ Set.range b) = ⊀)
(hq : Transcendental β„‚ (Ideal.Quotient.mk I q)) : affineDimension I ≀ d+1 := by
let := pair_projection_isAlgebraic k (fun i => Ideal.Quotient.mk I (a i))
(fun i => Ideal.Quotient.mk I (b i)) (Ideal.Quotient.mk I q) ΞΈ ha heq (quotient_pair_generates a b hg I)
obtain ⟨m,j,_,hj,ht⟩ := left_coordinates_transcendence_selection
(fun i => Ideal.Quotient.mk I (a i)) (Ideal.Quotient.mk I q) hq
have hm : m ≀ d := by simpa using Fintype.card_le_of_injective j hj
have hdim := hilbert_natDegree_eq_trdeg I (coordinateHilbert I) (coordinateHilbert_eventually I)
rw [ht] at hdim
have hh : affineDimension I = m+1 := by exact_mod_cast hdim
omega
theorem polynomial_constant_at_point {n : β„•} (I : Ideal (MvPolynomial (Fin n) β„‚))
(q : MvPolynomial (Fin n) β„‚) (t : β„‚)
(ht : algebraMap β„‚ (MvPolynomial (Fin n) β„‚ β§Έ I) t = Ideal.Quotient.mk I q)
(z : Fin n β†’ β„€) (hz : PointOn I z) : MvPolynomial.aeval (fun j => (z j:β„‚)) q = t := by
have hh := congrArg (pointEvaluation I z hz) ht
rw [AlgHom.commutes] at hh
change t = MvPolynomial.aeval (fun j => (z j:β„‚)) q at hh
exact hh.symm
theorem algebraic_polynomial_fibre_count {n : β„•} (S : Finset (Fin n β†’ β„€)) (F : β„•)
(q : MvPolynomial (Fin n) β„‚)
(hf : βˆ€ t : β„‚, (S.filter (fun z => MvPolynomial.aeval (fun j => (z j:β„‚)) q = t)).card ≀ F)
(I : Ideal (MvPolynomial (Fin n) β„‚)) [I.IsPrime]
(hq : IsAlgebraic β„‚ (Ideal.Quotient.mk I q)) : (S.filter (PointOn I)).card ≀ F := by
obtain ⟨t,ht⟩ := algebraic_coordinate_constant (Ideal.Quotient.mk I q) hq
apply (Finset.card_le_card ?_).trans (hf t)
intro z hz
have h := Finset.mem_filter.mp hz
exact Finset.mem_filter.mpr ⟨h.1,polynomial_constant_at_point I q t ht z h.2⟩
theorem algebraic_left_fibre_count {n d : β„•} (S : Finset (Fin n β†’ β„€)) (F : β„•)
(x : Fin d β†’ Fin n)
(hf : βˆ€ c : Fin d β†’ β„€, (S.filter (fun z => βˆ€ i, z (x i) = c i)).card ≀ F)
(I : Ideal (MvPolynomial (Fin n) β„‚)) [I.IsPrime]
(hx : βˆ€ i, IsAlgebraic β„‚ (Ideal.Quotient.mk I (MvPolynomial.X (x i)))) :
(S.filter (PointOn I)).card ≀ F := by
by_cases he : (S.filter (PointOn I)).Nonempty
· obtain ⟨z,hz⟩ := he
have hzI := (Finset.mem_filter.mp hz).2
apply (Finset.card_le_card ?_).trans (hf (fun i => z (x i)))
intro w hw
obtain ⟨hwS,hwI⟩ := Finset.mem_filter.mp hw
refine Finset.mem_filter.mpr ⟨hwS,fun i => ?_⟩
obtain ⟨t,ht⟩ := algebraic_coordinate_constant (Ideal.Quotient.mk I (MvPolynomial.X (x i))) (hx i)
exact Int.cast_injective (Ξ± := β„‚) ((coordinate_constant_at_point I w hwI (x i) t ht).trans
(coordinate_constant_at_point I z hzI (x i) t ht).symm)
Β· rw [Finset.not_nonempty_iff_eq_empty.mp he,Finset.card_empty]
exact Nat.zero_le _
end
section
open MvPolynomial
theorem norm_generic_threshold_uniform {n d h : β„•} (hd : 5 ≀ d) (hd' : d ≀ 8)
(hh : 2 ≀ h) (hh' : h ≀ d) (E D : β„•) (hD : 0 < D) :
βˆƒ C : ℝ, 0 ≀ C ∧
βˆ€ (I : Ideal (MvPolynomial (Fin n) β„‚)) [I.IsPrime]
(a b : Fin d β†’ MvPolynomial (Fin n) β„‚) (q : MvPolynomial (Fin n) β„‚)
(ΞΈ : Fin d β†’ β„‚), Function.Injective ΞΈ β†’
(βˆ€ i, Ideal.Quotient.mk I (a i) β‰  0) β†’
(βˆ€ i, Ideal.Quotient.mk I (a i)^(d-2)*Ideal.Quotient.mk I (b i) =
Ideal.Quotient.mk I q-algebraMap β„‚ _ (ΞΈ i)) β†’
Algebra.adjoin β„‚ (Set.range a βˆͺ Set.range b) = ⊀ β†’
Transcendental β„‚ (Ideal.Quotient.mk I q) β†’ affineDimension I = h β†’ affineDegree I ≀ E β†’
(βˆ€ i, (a i).totalDegree ≀ D) β†’ q.totalDegree ≀ D β†’
βˆ€ (w : Fin n β†’ β„•), (βˆ€ i, w i β‰  0) β†’
(βˆ€ i, a i ∈ weightedSpace w 5) β†’ (βˆ€ i, b i ∈ weightedSpace w 6) β†’
βˆ€ (Ο‰ : Fin n β†’ ℝ), (βˆ€ i, 0 < Ο‰ i) β†’ (βˆ€ i, (w i:ℝ) = 15*Ο‰ i) β†’
βˆ€ T : ℝ, 1 ≀ T β†’
T^h/((h.factorial:ℝ)*(normBoxEnvelope d h)^h)-C*T^(h-1) ≀ weightedHilbert I Ο‰ T := by
have hsucc : h-1+1 = h := by omega
obtain ⟨C,hC,hbound⟩ := norm_real_hilbert_uniform (n := n) (d := d) (h := h-1) (K := β„‚)
(k := d-2) (by omega) 5 6 (by norm_num) (by norm_num) E D hD 15 (by norm_num)
refine ⟨C,hC,fun I _ a b q ΞΈ hΞΈ ha heq hg hq hdim hdeg hadeg hqdeg w hw haw hbw Ο‰ hΟ‰ hscale T hT => ?_⟩
have hb := hbound I a b q ΞΈ hΞΈ ha heq (quotient_pair_generates a b hg I) hq
(hsucc ▸ hdim) (hsucc ▸ hh') hdeg hadeg hqdeg w hw haw hbw ω hω hscale T hT
rw [hsucc] at hb
norm_num only [Nat.min_def,show (5:β„•) ≀ 6 by omega,ite_true,Nat.cast_ofNat] at hb
have hc := mul_le_mul_of_nonneg_right (normBox_generic_threshold d h hd hd' hh hh')
(pow_nonneg (by linarith : 0 ≀ T) h)
have hc' : T^h/((h.factorial:ℝ)*(normBoxEnvelope d h)^h) ≀
5*(((d-2)*5+6:β„•):ℝ)^(h-1)*15^h/((h.factorial:ℝ)*5^h*6^h)*T^h := by
simpa only [one_div_mul_eq_div] using hc
linarith only [hb,hc']
theorem norm_full_threshold_uniform {n d : β„•} (hd : 5 ≀ d) (hd' : d ≀ 8) : βˆƒ C : ℝ, 0 ≀ C ∧ βˆ€ (I : Ideal (MvPolynomial (Fin n) β„‚)) [I.IsPrime]
(a b : Fin d β†’ MvPolynomial (Fin n) β„‚) (q : MvPolynomial (Fin n) β„‚)
(ΞΈ : Fin d β†’ β„‚),
(βˆ€ i, Ideal.Quotient.mk I (a i) β‰  0) β†’
(βˆ€ i, Ideal.Quotient.mk I (a i)^(d-2)*Ideal.Quotient.mk I (b i) =
Ideal.Quotient.mk I q-algebraMap β„‚ _ (ΞΈ i)) β†’
Algebra.adjoin β„‚ (Set.range a βˆͺ Set.range b) = ⊀ β†’
Transcendental β„‚ (Ideal.Quotient.mk I q) β†’ affineDimension I = d+1 β†’
βˆ€ (w : Fin n β†’ β„•), (βˆ€ i, w i β‰  0) β†’
(βˆ€ i, a i ∈ weightedSpace w 5) β†’ (βˆ€ i, b i ∈ weightedSpace w 6) β†’
βˆ€ (Ο‰ : Fin n β†’ ℝ), (βˆ€ i, 0 < Ο‰ i) β†’ (βˆ€ i, (w i:ℝ) = 15*Ο‰ i) β†’
βˆ€ T : ℝ, 1 ≀ T β†’
T^(d+1)/(((d+1).factorial:ℝ)*(normBoxEnvelope d (d+1))^(d+1))-C*T^d ≀ weightedHilbert I Ο‰ T := by
have hsucc : d-1+1 = d := by omega
have hsucc' : d-1+2 = d+1 := by omega
have hb := norm_full_real_hilbert_uniform (N := n) (n := d-1) (K := β„‚)
(d-2) 5 6 (by norm_num) (by norm_num) 15 (by norm_num)
rw [hsucc,hsucc'] at hb
obtain ⟨C,hC,hbound⟩ := hb
refine ⟨C,hC,fun I _ a b q ΞΈ ha heq hg hq hdim w hw haw hbw Ο‰ hΟ‰ hscale T hT => ?_⟩
have hb := hbound I a b q ΞΈ ha heq (quotient_pair_generates a b hg I) hq
hdim w hw haw hbw ω hω hscale T hT
have hc := mul_le_mul_of_nonneg_right (normBox_full_threshold d hd hd')
(pow_nonneg (by linarith : 0 ≀ T) (d+1))
have hc' : T^(d+1)/(((d+1).factorial:ℝ)*(normBoxEnvelope d (d+1))^(d+1)) ≀
(((d-2)*5+6:β„•):ℝ)^(d-1)*15^(d+1)/(((d+1).factorial:ℝ)*5^d*6^d)*T^(d+1) := by
simpa only [one_div_mul_eq_div] using hc
norm_num only [Nat.cast_ofNat] at hb
linarith only [hb,hc']
open MvPolynomial
open scoped BigOperators Classical
structure NormBoxSystem (n d D : β„•) (Ο‰ : Fin n β†’ ℝ) (w : Fin n β†’ β„•) where
Carrier : Type
[field : Field Carrier]
[charZero : CharZero Carrier]
v : Fin d β†’ Carrier
independent : LinearIndependent β„š v
Οƒ : Fin d β†’ Carrier β†’+* β„‚
ΞΈ : Fin d β†’ β„‚
distinct : Function.Injective ΞΈ
x : Fin d β†’ Fin n
xweight : βˆ€ i, Ο‰ (x i) = 1/3
b : Fin d β†’ MvPolynomial (Fin n) β„‚
q : MvPolynomial (Fin n) β„‚
generates : Algebra.adjoin β„‚
(Set.range (fun i => coordinateLinearForm x (Οƒ i ∘ v)) βˆͺ Set.range b) = ⊀
leftDegree : βˆ€ i, (coordinateLinearForm x (Οƒ i ∘ v)).totalDegree ≀ D
qDegree : q.totalDegree ≀ D
leftWeight : βˆ€ i, coordinateLinearForm x (Οƒ i ∘ v) ∈ weightedSpace w 5
rightWeight : βˆ€ i, b i ∈ weightedSpace w 6
attribute [instance] NormBoxSystem.field NormBoxSystem.charZero
noncomputable def NormBoxSystem.a {n d D : β„•} {Ο‰ : Fin n β†’ ℝ} {w : Fin n β†’ β„•}
(M : NormBoxSystem n d D Ο‰ w) (i : Fin d) : MvPolynomial (Fin n) β„‚ :=
coordinateLinearForm M.x (M.Οƒ i ∘ M.v)
noncomputable def NormBoxSystem.equation {n d D : β„•} {Ο‰ : Fin n β†’ ℝ} {w : Fin n β†’ β„•}
(M : NormBoxSystem n d D Ο‰ w) (i : Fin d) : MvPolynomial (Fin n) β„‚ :=
M.a i^(d-2)*M.b i-M.q+C (M.ΞΈ i)
noncomputable def NormBoxSystem.ideal {n d D : β„•} {Ο‰ : Fin n β†’ ℝ} {w : Fin n β†’ β„•}
(M : NormBoxSystem n d D Ο‰ w) : Ideal (MvPolynomial (Fin n) β„‚) :=
Ideal.span (Set.range M.equation)
theorem NormBoxSystem.quotient_equations {n d D : β„•} {Ο‰ : Fin n β†’ ℝ} {w : Fin n β†’ β„•}
(M : NormBoxSystem n d D Ο‰ w) (I : Ideal (MvPolynomial (Fin n) β„‚)) (hI : M.ideal ≀ I) :
βˆ€ i, Ideal.Quotient.mk I (M.a i)^(d-2)*Ideal.Quotient.mk I (M.b i) =
Ideal.Quotient.mk I M.q-algebraMap β„‚ _ (M.ΞΈ i) := by
intro i
have hm : M.equation i ∈ I := hI (Ideal.subset_span ⟨i,rfl⟩)
have he := (Ideal.Quotient.eq_zero_iff_mem).mpr hm
simp only [NormBoxSystem.equation,map_add,map_sub,map_mul,map_pow] at he
change Ideal.Quotient.mk I (M.a i)^(d-2)*Ideal.Quotient.mk I (M.b i)-
Ideal.Quotient.mk I M.q+algebraMap β„‚ (MvPolynomial (Fin n) β„‚ β§Έ I) (M.ΞΈ i) = 0 at he
linear_combination he
theorem NormBoxSystem.quotient_left_nonzero {n d D : β„•} {Ο‰ : Fin n β†’ ℝ} {w : Fin n β†’ β„•}
(M : NormBoxSystem n d D Ο‰ w) (I : Ideal (MvPolynomial (Fin n) β„‚))
(z : Fin n β†’ β„€) (hz : PointOn I z)
(ha : βˆ€ i, MvPolynomial.aeval (fun j => (z j:β„‚)) (M.a i) β‰  0) :
βˆ€ i, Ideal.Quotient.mk I (M.a i) β‰  0 := by
intro i hi
have hh := congrArg (pointEvaluation I z hz) hi
rw [map_zero] at hh
change MvPolynomial.aeval (fun j => (z j:β„‚)) (M.a i) = 0 at hh
exact ha i hh
theorem NormBoxSystem.right_real_weight {n d D : β„•} {Ο‰ : Fin n β†’ ℝ} {w : Fin n β†’ β„•}
(M : NormBoxSystem n d D Ο‰ w) (hΟ‰ : βˆ€ i, 0 < Ο‰ i) (hscale : βˆ€ i, (w i:ℝ) = 15*Ο‰ i)
(I : Ideal (MvPolynomial (Fin n) β„‚)) (i : Fin d) :
Ideal.Quotient.mk I (M.b i) ∈ weightedFunctions I Ο‰ (2/5) := by
have hh := weightedSpace_map_le_weightedFunctions I w ω hω 15 (by norm_num) hscale (2/5) (by norm_num)
norm_num only [show (15:ℝ)*(2/5) = 6 by norm_num,Nat.floor_natCast] at hh
exact hh ⟨M.b i,M.rightWeight i,rfl⟩
end
open MvPolynomial
open scoped BigOperators Classical
theorem norm_component_alternatives {n d h D : β„•} (hd : 5 ≀ d) (hd' : d ≀ 8) (hh : 1 ≀ h) (hh' : h ≀ d+1) (hD : 0 < D)
(Ο‰ : Fin n β†’ ℝ) (hΟ‰ : βˆ€ i, 0 < Ο‰ i) (hΟ‰W : βˆ€ i, Ο‰ i ≀ 2/5)
(w : Fin n β†’ β„•) (hw : βˆ€ i, w i β‰  0) (hscale : βˆ€ i, (w i:ℝ) = 15*Ο‰ i)
(M : NormBoxSystem n d D Ο‰ w) (Cbox : ℝ) (hCbox : 0 < Cbox)
(F E : β„•) (Ξ΅ : ℝ) (hΞ΅ : 0 < Ξ΅) :
βˆƒ K H : ℝ, 1 ≀ K ∧ 0 ≀ H ∧ βˆ€ X : ℝ, 2 ≀ X β†’ βˆ€ S : Finset (Fin n β†’ β„€),
(βˆ€ z ∈ S, βˆ€ j, |(z j:ℝ)| ≀ Cbox*X^(Ο‰ j)) β†’
(βˆ€ t : β„‚, (S.filter (fun z => MvPolynomial.aeval (fun j => (z j:β„‚)) M.q = t)).card ≀ F) β†’
(βˆ€ c : Fin d β†’ β„€, (S.filter (fun z => βˆ€ i, z (M.x i) = c i)).card ≀ F) β†’
βˆ€ (I : Ideal (MvPolynomial (Fin n) β„‚)), I.IsPrime β†’ M.ideal ≀ I β†’
affineDimension I = h β†’ affineDegree I ≀ E β†’
(βˆ€ i, Ideal.Quotient.mk I (M.a i) β‰  0) β†’
((S.filter (PointOn I)).card:ℝ) ≀ K*X^Ξ΅ ∨
βˆ€ T : ℝ, 1 ≀ T β†’ T^h/((h.factorial:ℝ)*(normBoxEnvelope d h)^h)-H*T^(h-1) ≀ weightedHilbert I Ο‰ T := by
classical
have hsmall (X : ℝ) (hX : 2 ≀ X) (S : Finset (Fin n β†’ β„€)) (I : Ideal (MvPolynomial (Fin n) β„‚))
(K : ℝ) (hKF : (F:ℝ) ≀ K) (hK : 0 ≀ K) (hcard : (S.filter (PointOn I)).card ≀ F) :
((S.filter (PointOn I)).card:ℝ) ≀ K*X^Ξ΅ := by
have hx : 1 ≀ X^Ξ΅ := Real.one_le_rpow (by linarith) hΞ΅.le
calc
_ ≀ (F:ℝ) := by exact_mod_cast hcard
_ ≀ K := hKF
_ ≀ K*X^Ξ΅ := by nlinarith
by_cases h1 : h = 1
Β· subst h
obtain ⟨B,H,hB,hH,hcurve⟩ := norm_curve_alternatives (n := n) (d := d) (by omega)
(d-2) (by omega) ω hω M.x (1/3) (2/5) (2/5) Cbox (by norm_num) (by norm_num)
(by norm_num) hCbox M.xweight hωW E Ρ hΡ
let K : ℝ := max 1 (max B F)
have hK : 1 ≀ K := le_max_left _ _
have hKF : (F:ℝ) ≀ K := (le_max_right _ _).trans (le_max_right _ _)
have hKB : B ≀ K := (le_max_left _ _).trans (le_max_right _ _)
refine ⟨K,H,hK,hH,fun X hX S hbox hnF haF I hI hMI hdim hdeg ha => ?_⟩
let : I.IsPrime := hI
by_cases hq : IsAlgebraic β„‚ (Ideal.Quotient.mk I M.q)
Β· exact Or.inl (hsmall X hX S I K hKF (by linarith) (algebraic_polynomial_fibre_count S F M.q hnF I hq))
by_cases hxa : βˆ€ i, IsAlgebraic β„‚ (Ideal.Quotient.mk I (MvPolynomial.X (M.x i)))
Β· exact Or.inl (hsmall X hX S I K hKF (by linarith) (algebraic_left_fibre_count S F M.x haF I hxa))
push Not at hxa
obtain ⟨s,hs⟩ := hxa
have hsS (z) (hz : z ∈ S.filter (PointOn I)) := (Finset.mem_filter.mp hz).1
have hh := hcurve M.Carrier M.v M.independent M.Οƒ M.ΞΈ M.distinct X hX
(S.filter (PointOn I)) (fun z hz j => hbox z (hsS z hz) j) I hI hdim.le hdeg
(fun z hz => (Finset.mem_filter.mp hz).2) M.b M.q
(M.right_real_weight hω hscale I) hq (M.quotient_equations I hMI) s hs
rcases hh with hc | hHilb
Β· left
exact hc.trans (mul_le_mul_of_nonneg_right hKB (Real.rpow_nonneg (by linarith) _))
Β· right
intro T hT
have hb := hHilb T (by linarith)
have hc := mul_le_mul_of_nonneg_right (normBox_curve_threshold d hd hd') (by linarith : 0 ≀ T) norm_num only [pow_one,Nat.factorial_one,Nat.cast_one,one_mul,Nat.sub_self,pow_zero,mul_one]
have hc' : T/normBoxEnvelope d 1 ≀ min (2/(1/3:ℝ)) (max (1/(1/3:ℝ)) (((d-1)*(d-2-1):β„•)/(2/5:ℝ)))*T := by
simpa only [one_div_mul_eq_div] using hc
linarith only [hb,hc']
Β· have hh2 : 2 ≀ h := by omega
by_cases hhd : h ≀ d
· obtain ⟨H,hH,hHilb⟩ := norm_generic_threshold_uniform (n := n) hd hd' hh2 hhd E D hD
let K : ℝ := max 1 F
have hK : 1 ≀ K := le_max_left _ _
have hKF : (F:ℝ) ≀ K := le_max_right _ _
refine ⟨K,H,hK,hH,fun X hX S _ hnF _ I hI hMI hdim hdeg ha => ?_⟩
let : I.IsPrime := hI
by_cases hq : IsAlgebraic β„‚ (Ideal.Quotient.mk I M.q)
Β· exact Or.inl (hsmall X hX S I K hKF (by linarith) (algebraic_polynomial_fibre_count S F M.q hnF I hq))
Β· exact Or.inr (hHilb I M.a M.b M.q M.ΞΈ M.distinct ha (M.quotient_equations I hMI)
M.generates hq hdim hdeg M.leftDegree M.qDegree w hw M.leftWeight M.rightWeight ω hω hscale)
Β· have he : h = d+1 := by omega
subst h
obtain ⟨H,hH,hHilb⟩ := norm_full_threshold_uniform (n := n) hd hd'
let K : ℝ := max 1 F
have hK : 1 ≀ K := le_max_left _ _
have hKF : (F:ℝ) ≀ K := le_max_right _ _
refine ⟨K,H,hK,hH,fun X hX S _ hnF _ I hI hMI hdim _ ha => ?_⟩
let : I.IsPrime := hI
by_cases hq : IsAlgebraic β„‚ (Ideal.Quotient.mk I M.q)
Β· exact Or.inl (hsmall X hX S I K hKF (by linarith) (algebraic_polynomial_fibre_count S F M.q hnF I hq))
Β· right
simpa only [Nat.add_sub_cancel] using hHilb I M.a M.b M.q M.ΞΈ ha (M.quotient_equations I hMI)
M.generates hq hdim w hw M.leftWeight M.rightWeight ω hω hscale
end QuarticPowerFree
end OAI