math / data /lean /OAI /NumberTheory /PiExponent /Geometry /CurveContactSum.lean
introvoyz045's picture
Migrated from GitHub
4a56cd6 verified
Raw History Blame Contribute Delete
14.7 kB
import OAI.NumberTheory.PiExponent.Geometry.CurveParameterFinite
import OAI.NumberTheory.PiExponent.Geometry.CurveProductFormula
import OAI.NumberTheory.PiExponent.Geometry.CurveValuationCenter
import OAI.NumberTheory.PiExponent.Jets.DVRBranchJet
import OAI.NumberTheory.PiExponent.Polynomials.WeightedPolynomialPole
namespace OAI
noncomputable section
open scoped BigOperators
namespace PiExponent.CurveContactSum
open WeightedPolynomialPole WeightedCurveDegree CurveValuationCenter PolynomialPoleBound
theorem contact_sum_le_of_principal_sum
{P : Type*} (z : P β†’β‚€ β„€) (pole : P β†’β‚€ β„š)
(hz : z.sum (fun _ n => n) = 0) (hpole_nonneg : βˆ€ p, 0 ≀ pole p)
(S : Finset P) (ΞΌ : P β†’ ℝ) (N B : ℝ) (hN : 0 ≀ N)
(hlocal : βˆ€ p ∈ S, B * ΞΌ p ≀ (z p : ℝ))
(hglobal : βˆ€ p, -N * (pole p : ℝ) ≀ (z p : ℝ)) :
B * (βˆ‘ p ∈ S, ΞΌ p) ≀ N * pole.sum (fun _ n => (n : ℝ)) := by
classical
let T := S βˆͺ z.support βˆͺ pole.support
have hST : S βŠ† T := by intro p hp; simp [T, hp]
have hzT : z.support βŠ† T := by intro p hp; simp [T, hp]
have hpT : pole.support βŠ† T := by intro p hp; simp [T, hp]
have hzsum : (βˆ‘ p ∈ T, (z p : ℝ)) = 0 := by
have hh := z.sum_of_support_subset hzT (fun _ n => n) (by simp)
have hi : (βˆ‘ p ∈ T, z p) = 0 := hh.symm.trans hz
exact_mod_cast hi
have hpsum : (βˆ‘ p ∈ T, (pole p : ℝ)) = pole.sum (fun _ n => (n : ℝ)) :=
(pole.sum_of_support_subset hpT (fun _ n => (n : ℝ)) (by simp)).symm
calc
B * (βˆ‘ p ∈ S, ΞΌ p) = βˆ‘ p ∈ S, B * ΞΌ p := Finset.mul_sum _ _ _
_ ≀ βˆ‘ p ∈ S, ((z p : ℝ) + N * (pole p : ℝ)) := by
apply Finset.sum_le_sum
intro p hp
exact (hlocal p hp).trans (le_add_of_nonneg_right
(mul_nonneg hN (by exact_mod_cast hpole_nonneg p)))
_ ≀ βˆ‘ p ∈ T, ((z p : ℝ) + N * (pole p : ℝ)) := by
apply Finset.sum_le_sum_of_subset_of_nonneg hST
intro p hp hnot
have hh := hglobal p
linarith
_ = N * pole.sum (fun _ n => (n : ℝ)) := by
rw [Finset.sum_add_distrib, ← Finset.mul_sum, hzsum, zero_add, hpsum]
theorem contact_sum_le_div_of_principal_sum
{P : Type*} (z : P β†’β‚€ β„€) (pole : P β†’β‚€ β„š)
(hz : z.sum (fun _ n => n) = 0) (hpole_nonneg : βˆ€ p, 0 ≀ pole p)
(S : Finset P) (ΞΌ : P β†’ ℝ) (N B : ℝ) (hN : 0 ≀ N) (hB : 0 < B)
(hlocal : βˆ€ p ∈ S, B * ΞΌ p ≀ (z p : ℝ))
(hglobal : βˆ€ p, -N * (pole p : ℝ) ≀ (z p : ℝ)) :
(βˆ‘ p ∈ S, ΞΌ p) ≀ N / B * pole.sum (fun _ n => (n : ℝ)) := by
rw [div_mul_eq_mul_div]
apply (le_div_iffβ‚€ hB).mpr
simpa only [mul_comm B] using
contact_sum_le_of_principal_sum z pole hz hpole_nonneg S ΞΌ N B hN hlocal hglobal
theorem coordinatePole_eq_zero {E ΞΉ : Type*} [Field E] [Fintype ΞΉ]
(v : AddValuation E (WithTop β„€)) (x : ΞΉ β†’ E) (w : ΞΉ β†’ β„š)
(hx : βˆ€ i, coordinateOrder v (x i) = 0) : coordinatePole v x w = 0 := by
unfold coordinatePole weightedPole
simp only [hx, Int.cast_zero, neg_zero, zero_div]
have he : (fun i : Option ΞΉ => i.elim 0 (fun _ => (0 : β„š))) = fun _ => 0 := by
funext i
cases i <;> rfl
rw [he]
exact Finset.sup'_const _ _
theorem coordinatePole_finite_support {E ΞΉ P : Type*} [Field E] [Fintype ΞΉ]
(v : P β†’ AddValuation E (WithTop β„€)) (x : ΞΉ β†’ E) (w : ΞΉ β†’ β„š)
(hfinite : βˆ€ i, Set.Finite {p | coordinateOrder (v p) (x i) β‰  0}) :
Set.Finite {p | coordinatePole (v p) x w β‰  0} := by
have hu : Set.Finite (⋃ i, {p | coordinateOrder (v p) (x i) β‰  0}) :=
Set.finite_iUnion (fun i => hfinite i)
apply hu.subset
intro p hp
by_contra hn
apply hp
apply coordinatePole_eq_zero
intro i
by_contra hi
exact hn (Set.mem_iUnion.mpr ⟨i,hi⟩)
theorem exists_constant_of_isAlgebraic {E : Type*} [Field E] [Algebra β„‚ E]
(f : E) (hf : IsAlgebraic β„‚ f) : βˆƒ c : β„‚, algebraMap β„‚ E c = f := by
have hm : f ∈ algebraicClosure β„‚ E := mem_algebraicClosure_iff.mpr hf
rw [IntermediateField.eq_bot_of_isAlgClosed_of_isAlgebraic (algebraicClosure β„‚ E)] at hm
exact hm
theorem frameWord_field_order_lower
{A E : Type*} [CommRing A] [IsDomain A] [IsDiscreteValuationRing A]
[Algebra β„‚ A] [Algebra.IsIntegral β„‚ (IsLocalRing.ResidueField A)]
[Field E] [Algebra A E] [IsFractionRing A E] [Algebra β„‚ E] [IsScalarTower β„‚ A E]
{m : β„•} (v : Fin (m+1) β†’ β„š) (hv : βˆ€ i, 0 < v i) (H : β„š)
(c : Fin m β†’ β„‚) (y : A) (x : Fin m β†’ A)
(hy : CurveLocalOrder.residueAugmentation β„‚ A y = 1)
(hx : βˆ€ i, CurveLocalOrder.residueAugmentation β„‚ A (x i) = c i)
(hnc : y β‰  1 ∨ βˆƒ i, x i β‰  algebraMap β„‚ A (c i))
(p : PiExponentApprox.FramePolynomial m)
(hp : FormalLogJet.formalJet c p ∈
JetGeometry.rationalWeightedIdeal v (fun i => (hv i).le) H)
(word : List (Fin (m+1)))
(hne : MvPolynomial.aeval (Fin.cases (algebraMap A E y) (fun i => algebraMap A E (x i)))
(PiExponentApprox.polynomialFrameWord m word p) β‰  0) :
DVRBranchJet.contact v c y x hnc * (H - (word.map v).sum) ≀
(integerOrder (CurveLocalOrder.fractionAddValuation A E)
(Units.mk0 (MvPolynomial.aeval
(Fin.cases (algebraMap A E y) (fun i => algebraMap A E (x i)))
(PiExponentApprox.polynomialFrameWord m word p)) hne) : β„š) := by
have he (q : PiExponentApprox.FramePolynomial m) :
algebraMap A E (MvPolynomial.aeval (Fin.cases y x) q) =
MvPolynomial.aeval (Fin.cases (algebraMap A E y) (fun i => algebraMap A E (x i))) q := by
have hh := MvPolynomial.comp_aeval_apply (f := Fin.cases y x)
(IsScalarTower.toAlgHom β„‚ A E) q
exact hh.trans (congrArg (fun z => MvPolynomial.aeval z q) (by
funext i
cases i using Fin.cases <;> rfl))
have hn : MvPolynomial.aeval (Fin.cases y x)
(PiExponentApprox.polynomialFrameWord m word p) β‰  0 := by
intro hz
apply hne
rw [← he, hz, map_zero]
have hlen := CurveLocalOrder.integerOrder_field_image_eq_length (K := E) hn
have hu : Units.mk0 (MvPolynomial.aeval
(Fin.cases (algebraMap A E y) (fun i => algebraMap A E (x i)))
(PiExponentApprox.polynomialFrameWord m word p)) hne =
Units.mk0 (algebraMap A E (MvPolynomial.aeval (Fin.cases y x)
(PiExponentApprox.polynomialFrameWord m word p)))
((map_ne_zero_iff _ (IsFractionRing.injective A E)).mpr hn) := by
apply Units.ext
exact (he _).symm
rw [hu, hlen]
simpa only [Int.cast_natCast] using
DVRBranchJet.frameWord_colength_lower v hv H c y x hy hx hnc p hp word hn
theorem coordinateOrder_constant_eq_zero {E : Type*} [Field E] [Algebra β„‚ E]
(p : NormalizedPlace β„‚ E) (c : β„‚) : coordinateOrder p.valuation (algebraMap β„‚ E c) = 0 := by
by_cases hc : c = 0
Β· simp [hc, coordinateOrder]
have hm : algebraMap β„‚ E c β‰  0 := (map_ne_zero_iff _ (algebraMap β„‚ E).injective).mpr hc
rw [coordinateOrder, dite_eq_right hm]
exact CurveProductFormula.placeOrder_constant_eq_zero p c hc
def coordinateOrderDivisor {E : Type*} [Field E] [Algebra β„‚ E]
(hfinite : βˆ€ f : E, Transcendental β„‚ f β†’ FiniteDimensional (IntermediateField.adjoin β„‚ {f}) E)
(f : E) : NormalizedPlace β„‚ E β†’β‚€ β„€ := by
classical
exact if ht : Transcendental β„‚ f then
letI := hfinite f ht
CurveProductFormula.principalDivisor f ht
else 0
@[simp] theorem coordinateOrderDivisor_apply {E : Type*} [Field E] [Algebra β„‚ E]
(hfinite : βˆ€ f : E, Transcendental β„‚ f β†’ FiniteDimensional (IntermediateField.adjoin β„‚ {f}) E)
(f : E) (p : NormalizedPlace β„‚ E) :
coordinateOrderDivisor hfinite f p = coordinateOrder p.valuation f := by
classical
by_cases ht : Transcendental β„‚ f
Β· let := hfinite f ht
simp only [coordinateOrderDivisor, dite_eq_left ht, CurveProductFormula.principalDivisor_apply,
coordinateOrder, dite_eq_right ht.ne_zero]
rfl
Β· rw [coordinateOrderDivisor, dite_eq_right ht]
obtain ⟨c,rfl⟩ := exists_constant_of_isAlgebraic f (not_not.mp ht)
exact (coordinateOrder_constant_eq_zero p c).symm
theorem coordinateOrderDivisor_degree_zero {E : Type*} [Field E] [Algebra β„‚ E]
(hfinite : βˆ€ f : E, Transcendental β„‚ f β†’ FiniteDimensional (IntermediateField.adjoin β„‚ {f}) E)
(f : E) : (coordinateOrderDivisor hfinite f).sum (fun _ n => n) = 0 := by
classical
by_cases ht : Transcendental β„‚ f
Β· let := hfinite f ht
rw [coordinateOrderDivisor, dite_eq_left ht]
exact CurveProductFormula.principalDivisor_degree_zero f ht
Β· simp [coordinateOrderDivisor, ht]
def weightedPoleDivisor {E ΞΉ : Type*} [Field E] [Algebra β„‚ E] [Fintype ΞΉ]
(hfinite : βˆ€ f : E, Transcendental β„‚ f β†’ FiniteDimensional (IntermediateField.adjoin β„‚ {f}) E)
(x : ΞΉ β†’ E) (w : ΞΉ β†’ β„š) : NormalizedPlace β„‚ E β†’β‚€ β„š :=
Finsupp.ofSupportFinite (fun p => coordinatePole p.valuation x w)
(coordinatePole_finite_support (fun p : NormalizedPlace β„‚ E => p.valuation) x w (by
intro i
simpa only [Function.HasFiniteSupport, Function.support, coordinateOrderDivisor_apply] using
(coordinateOrderDivisor hfinite (x i)).hasFiniteSupport))
@[simp] theorem weightedPoleDivisor_apply {E ΞΉ : Type*} [Field E] [Algebra β„‚ E] [Fintype ΞΉ]
(hfinite : βˆ€ f : E, Transcendental β„‚ f β†’ FiniteDimensional (IntermediateField.adjoin β„‚ {f}) E)
(x : ΞΉ β†’ E) (w : ΞΉ β†’ β„š) (p : NormalizedPlace β„‚ E) :
weightedPoleDivisor hfinite x w p = coordinatePole p.valuation x w := rfl
def weightedDegree {E ΞΉ : Type*} [Field E] [Algebra β„‚ E] [Fintype ΞΉ]
(hfinite : βˆ€ f : E, Transcendental β„‚ f β†’ FiniteDimensional (IntermediateField.adjoin β„‚ {f}) E)
(x : ΞΉ β†’ E) (w : ΞΉ β†’ β„š) : ℝ :=
(weightedPoleDivisor hfinite x w).sum (fun _ n => (n : ℝ))
theorem weightedDegree_nonneg {E ΞΉ : Type*} [Field E] [Algebra β„‚ E] [Fintype ΞΉ]
(hfinite : βˆ€ f : E, Transcendental β„‚ f β†’ FiniteDimensional (IntermediateField.adjoin β„‚ {f}) E)
(x : ΞΉ β†’ E) (w : ΞΉ β†’ β„š) : 0 ≀ weightedDegree hfinite x w := by
apply Finset.sum_nonneg
intro p hp
change (0 : ℝ) ≀ (coordinatePole p.valuation x w : β„š)
exact_mod_cast weightedPole_nonneg w (fun i => (coordinateOrder p.valuation (x i) : β„š))
theorem constants_real_nonneg {E : Type*} [Field E] [Algebra β„‚ E]
(p : NormalizedPlace β„‚ E) (c : β„‚) :
0 ≀ realValuation p.valuation (algebraMap β„‚ E c) := by
have h := (show Monotone (WithTop.map (fun z : β„€ => (z : ℝ))) from
(Int.cast_mono (R := ℝ)).withTop_map) (p.constants_nonneg c)
have hz : WithTop.map (fun z : β„€ => (z : ℝ)) (0 : WithTop β„€) = (0 : WithTop ℝ) := by
change (((0 : β„€) : ℝ) : WithTop ℝ) = 0
norm_num
rw [hz] at h
exact h
theorem polynomial_order_lower {E ΞΉ : Type*} [Field E] [Algebra β„‚ E] [Fintype ΞΉ]
(x : ΞΉ β†’ E) (w : ΞΉ β†’ β„š) (hw : βˆ€ i, 0 < w i) (N : ℝ)
(f : MvPolynomial ΞΉ β„‚)
(hdegree : βˆ€ d ∈ f.support, Finsupp.weight (fun i => (w i : ℝ)) d ≀ N)
(hne : MvPolynomial.aeval x f β‰  0) (p : NormalizedPlace β„‚ E) :
-N * (coordinatePole p.valuation x w : ℝ) ≀
(coordinateOrder p.valuation (MvPolynomial.aeval x f) : ℝ) := by
have h := PolynomialPoleBound.polynomial_order_lower (realValuation p.valuation) x
(fun i => (w i : ℝ)) (coordinatePole p.valuation x w : ℝ) N
(by exact_mod_cast weightedPole_nonneg w (fun i => (coordinateOrder p.valuation (x i) : β„š)))
(coordinate_order_lower p.valuation x w hw) (constants_real_nonneg p) f hdegree
rw [realValuation_of_ne_zero _ _ hne] at h
exact WithTop.coe_le_coe.mp h
theorem polynomial_contact_sum_le {E ΞΉ : Type*} [Field E] [Algebra β„‚ E] [Fintype ΞΉ]
(hfinite : βˆ€ f : E, Transcendental β„‚ f β†’ FiniteDimensional (IntermediateField.adjoin β„‚ {f}) E)
(x : ΞΉ β†’ E) (w : ΞΉ β†’ β„š) (hw : βˆ€ i, 0 < w i) (N B : ℝ) (hN : 0 ≀ N)
(f : MvPolynomial ΞΉ β„‚)
(hdegree : βˆ€ d ∈ f.support, Finsupp.weight (fun i => (w i : ℝ)) d ≀ N)
(hne : MvPolynomial.aeval x f β‰  0)
(S : Finset (NormalizedPlace β„‚ E)) (ΞΌ : NormalizedPlace β„‚ E β†’ ℝ)
(hlocal : βˆ€ p ∈ S, B * ΞΌ p ≀
(coordinateOrder p.valuation (MvPolynomial.aeval x f) : ℝ)) :
B * (βˆ‘ p ∈ S, ΞΌ p) ≀ N * weightedDegree hfinite x w := by
refine contact_sum_le_of_principal_sum
(coordinateOrderDivisor hfinite (MvPolynomial.aeval x f)) (weightedPoleDivisor hfinite x w)
(coordinateOrderDivisor_degree_zero hfinite _) ?_ S ΞΌ N B hN ?_ ?_
Β· intro p
exact weightedPole_nonneg w (fun i => (coordinateOrder p.valuation (x i) : β„š))
Β· intro p hp
simpa only [coordinateOrderDivisor_apply] using hlocal p hp
Β· intro p
simpa only [weightedPoleDivisor_apply, coordinateOrderDivisor_apply] using
polynomial_order_lower x w hw N f hdegree hne p
theorem polynomial_contact_sum_le_div {E ΞΉ : Type*} [Field E] [Algebra β„‚ E] [Fintype ΞΉ]
(hfinite : βˆ€ f : E, Transcendental β„‚ f β†’ FiniteDimensional (IntermediateField.adjoin β„‚ {f}) E)
(x : ΞΉ β†’ E) (w : ΞΉ β†’ β„š) (hw : βˆ€ i, 0 < w i) (N B : ℝ) (hN : 0 ≀ N) (hB : 0 < B)
(f : MvPolynomial ΞΉ β„‚)
(hdegree : βˆ€ d ∈ f.support, Finsupp.weight (fun i => (w i : ℝ)) d ≀ N)
(hne : MvPolynomial.aeval x f β‰  0)
(S : Finset (NormalizedPlace β„‚ E)) (ΞΌ : NormalizedPlace β„‚ E β†’ ℝ)
(hlocal : βˆ€ p ∈ S, B * ΞΌ p ≀
(coordinateOrder p.valuation (MvPolynomial.aeval x f) : ℝ)) :
(βˆ‘ p ∈ S, ΞΌ p) ≀ N / B * weightedDegree hfinite x w := by
rw [div_mul_eq_mul_div]
apply (le_div_iffβ‚€ hB).mpr
simpa only [mul_comm B] using
polynomial_contact_sum_le hfinite x w hw N B hN f hdegree hne S ΞΌ hlocal
theorem polynomial_eq_zero_of_excess_contact
{E ΞΉ : Type*} [Field E] [Algebra β„‚ E] [Fintype ΞΉ]
(hfinite : βˆ€ f : E, Transcendental β„‚ f β†’ FiniteDimensional (IntermediateField.adjoin β„‚ {f}) E)
(x : ΞΉ β†’ E) (w : ΞΉ β†’ β„š) (hw : βˆ€ i, 0 < w i) (N B : ℝ) (hN : 0 ≀ N)
(f : MvPolynomial ΞΉ β„‚)
(hdegree : βˆ€ d ∈ f.support, Finsupp.weight (fun i => (w i : ℝ)) d ≀ N)
(S : Finset (NormalizedPlace β„‚ E)) (ΞΌ : NormalizedPlace β„‚ E β†’ ℝ)
(hlocal : MvPolynomial.aeval x f β‰  0 β†’ βˆ€ p ∈ S, B * ΞΌ p ≀
(coordinateOrder p.valuation (MvPolynomial.aeval x f) : ℝ))
(hexcess : N * weightedDegree hfinite x w < B * (βˆ‘ p ∈ S, ΞΌ p)) :
MvPolynomial.aeval x f = 0 := by
by_contra hne
exact (not_le_of_gt hexcess)
(polynomial_contact_sum_le hfinite x w hw N B hN f hdegree hne S ΞΌ (hlocal hne))
end PiExponent.CurveContactSum
end
end OAI