Download data/lean/OAI/NumberTheory/PiExponent/Geometry/CurveContactSum.lean from introvoyz045/math: direct link, hf CLI and curl.
- Browser
- Download file 14.7 kB
-
https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/NumberTheory/PiExponent/Geometry/CurveContactSum.lean
- Command line
-
hf download hf://datasets/introvoyz045/math/data/lean/OAI/NumberTheory/PiExponent/Geometry/CurveContactSum.lean
-
curl -L -o CurveContactSum.lean https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/NumberTheory/PiExponent/Geometry/CurveContactSum.lean
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 | |