Download data/lean/OAI/NumberTheory/PiExponent/Jets/JetGeometry.lean from introvoyz045/math: direct link, hf CLI and curl.
- Browser
- Download file 10.9 kB
-
https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/NumberTheory/PiExponent/Jets/JetGeometry.lean
- Command line
-
hf download hf://datasets/introvoyz045/math/data/lean/OAI/NumberTheory/PiExponent/Jets/JetGeometry.lean
-
curl -L -o JetGeometry.lean https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/NumberTheory/PiExponent/Jets/JetGeometry.lean
10.9 kB
| import Mathlib.RingTheory.Ideal.Quotient.Operations | |
| import Mathlib.RingTheory.MvPowerSeries.Order | |
| namespace OAI | |
| namespace PiExponent.JetGeometry | |
| noncomputable section | |
| open MvPowerSeries | |
| variable {Ο R : Type*} [CommRing R] | |
| def weightedIdeal (w : Ο β β) (N : β) : Ideal (MvPowerSeries Ο R) where | |
| carrier := {f | (N : ββ) β€ f.weightedOrder w} | |
| zero_mem' := by simp | |
| add_mem' hf hg := (le_min hf hg).trans (min_weightedOrder_le_add w) | |
| smul_mem' a f hf := by | |
| change (N : ββ) β€ weightedOrder w (a * f) | |
| exact hf.trans (le_add_self.trans (le_weightedOrder_mul w)) | |
| @[simp] theorem mem_weightedIdeal (w : Ο β β) (N : β) | |
| (f : MvPowerSeries Ο R) : | |
| f β weightedIdeal w N β (N : ββ) β€ f.weightedOrder w := Iff.rfl | |
| theorem mem_weightedIdeal_iff (w : Ο β β) (N : β) | |
| (f : MvPowerSeries Ο R) : | |
| f β weightedIdeal w N β β d, Finsupp.weight w d < N β coeff d f = 0 := by | |
| constructor | |
| Β· intro hf d hd | |
| have hd' : (Finsupp.weight w d : ββ) < (N : ββ) := by exact_mod_cast hd | |
| exact coeff_eq_zero_of_lt_weightedOrder w (hd'.trans_le hf) | |
| Β· intro hf | |
| exact nat_le_weightedOrder w hf | |
| theorem weightedIdeal_mul_le (w : Ο β β) (M N : β) : | |
| (weightedIdeal w M : Ideal (MvPowerSeries Ο R)) * weightedIdeal w N β€ | |
| weightedIdeal w (M + N) := by | |
| apply Ideal.mul_le.mpr | |
| intro f hf g hg | |
| change ((M + N : β) : ββ) β€ weightedOrder w (f * g) | |
| rw [Nat.cast_add] | |
| exact (add_le_add hf hg).trans (le_weightedOrder_mul w) | |
| theorem ideal_pow_le_weightedIdeal (w : Ο β β) (I : Ideal (MvPowerSeries Ο R)) | |
| (Rβ : β) (hI : I β€ weightedIdeal w Rβ) (n : β) : | |
| I ^ n β€ weightedIdeal w (n * Rβ) := by | |
| induction n with | |
| | zero => | |
| intro f hf | |
| change ((0 * Rβ : β) : ββ) β€ weightedOrder w f | |
| simp | |
| | succ n ih => | |
| rw [pow_succ, Nat.succ_mul] | |
| apply Ideal.mul_le.mpr | |
| intro f hf g hg | |
| exact (Ideal.mul_le.mp (weightedIdeal_mul_le w (n * Rβ) Rβ)) f (ih hf) g (hI hg) | |
| def coordinatePowerIdeal (e : Ο β β) : Ideal (MvPowerSeries Ο R) := | |
| Ideal.span (Set.range (fun i => (X i : MvPowerSeries Ο R) ^ e i)) | |
| theorem X_pow_mem_weightedIdeal (w e : Ο β β) (Rβ : β) | |
| (he : β i, Rβ β€ e i * w i) (i : Ο) : | |
| (X i : MvPowerSeries Ο R) ^ e i β weightedIdeal w Rβ := by | |
| classical | |
| apply (mem_weightedIdeal_iff w Rβ _).mpr | |
| intro d hd | |
| rw [coeff_X_pow] | |
| split_ifs with h | |
| Β· subst d | |
| have hweight : Finsupp.weight w (Finsupp.single i (e i)) = e i * w i := by | |
| simp [Finsupp.weight] | |
| rw [hweight] at hd | |
| exact False.elim ((not_lt_of_ge (he i)) hd) | |
| Β· rfl | |
| theorem coordinatePowerIdeal_pow_le (w e : Ο β β) (Rβ : β) | |
| (he : β i, Rβ β€ e i * w i) (n : β) : | |
| (coordinatePowerIdeal e : Ideal (MvPowerSeries Ο R)) ^ n β€ | |
| weightedIdeal w (n * Rβ) := by | |
| apply ideal_pow_le_weightedIdeal w _ Rβ _ n | |
| apply Ideal.span_le.mpr | |
| rintro _ β¨i, rflβ© | |
| exact X_pow_mem_weightedIdeal w e Rβ he i | |
| theorem quotient_surjective_of_le {A Ξ± : Type*} [CommRing A] | |
| (I J : Ideal A) (hIJ : I β€ J) (f : Ξ± β A) | |
| (hf : Function.Surjective (fun a => Ideal.Quotient.mk I (f a))) : | |
| Function.Surjective (fun a => Ideal.Quotient.mk J (f a)) := by | |
| intro y | |
| obtain β¨x, hxβ© := Ideal.Quotient.factor_surjective hIJ y | |
| obtain β¨a, haβ© := hf x | |
| refine β¨a, ?_β© | |
| rw [β hx, β ha] | |
| exact (Ideal.Quotient.factor_mk hIJ (f a)).symm | |
| def CoefficientPacket (w : Ο β β) (N : β) := | |
| {d : Ο ββ β // Finsupp.weight w d < N} β R | |
| def coefficientPacket (w : Ο β β) (N : β) (f : MvPowerSeries Ο R) : | |
| CoefficientPacket (R := R) w N := fun d => coeff d.val f | |
| theorem coefficientPacket_surjective_of_quotient {Ξ± : Type*} | |
| (w : Ο β β) (N : β) (I : Ideal (MvPowerSeries Ο R)) | |
| (hI : I β€ weightedIdeal w N) (f : Ξ± β MvPowerSeries Ο R) | |
| (hf : Function.Surjective (fun a => Ideal.Quotient.mk I (f a))) : | |
| Function.Surjective (fun a => coefficientPacket w N (f a)) := by | |
| classical | |
| intro packet | |
| let F : MvPowerSeries Ο R := fun d => | |
| if hd : Finsupp.weight w d < N then packet β¨d, hdβ© else 0 | |
| obtain β¨a, haβ© := hf (Ideal.Quotient.mk I F) | |
| have hdiff : f a - F β weightedIdeal w N := | |
| hI (Ideal.Quotient.eq.mp ha) | |
| refine β¨a, ?_β© | |
| funext d | |
| have hzero := (mem_weightedIdeal_iff w N (f a - F)).mp hdiff d.val d.property | |
| rw [map_sub, sub_eq_zero] at hzero | |
| change coeff d.val (f a) = packet d | |
| rw [hzero] | |
| change (if hd : Finsupp.weight w d.val < N then packet β¨d.val, hdβ© else 0) = packet d | |
| simp only [dite_eq_left d.property] | |
| theorem coefficientPacket_surjective_of_coordinatePowerIdeal {Ξ± : Type*} | |
| (w e : Ο β β) (Rβ : β) (he : β i, Rβ β€ e i * w i) | |
| (n : β) (f : Ξ± β MvPowerSeries Ο R) | |
| (hf : Function.Surjective (fun a => | |
| Ideal.Quotient.mk ((coordinatePowerIdeal e : Ideal (MvPowerSeries Ο R)) ^ n) (f a))) : | |
| Function.Surjective (fun a => coefficientPacket w (n * Rβ) (f a)) := | |
| coefficientPacket_surjective_of_quotient w (n * Rβ) _ | |
| (coordinatePowerIdeal_pow_le w e Rβ he n) f hf | |
| theorem rational_weight_nonneg (v : Ο β β) (hv : β i, 0 β€ v i) | |
| (d : Ο ββ β) : 0 β€ Finsupp.weight v d := by | |
| rw [Finsupp.weight_apply, Finsupp.sum] | |
| exact Finset.sum_nonneg (fun i _ => nsmul_nonneg (hv i) (d i)) | |
| def rationalWeightedIdeal (v : Ο β β) (hv : β i, 0 β€ v i) (H : β) : | |
| Ideal (MvPowerSeries Ο R) where | |
| carrier := {f | β d, Finsupp.weight v d < H β coeff d f = 0} | |
| zero_mem' := by simp | |
| add_mem' hf hg := by | |
| intro d hd | |
| rw [map_add, hf d hd, hg d hd, add_zero] | |
| smul_mem' a f hf := by | |
| classical | |
| intro d hd | |
| change coeff d (a * f) = 0 | |
| rw [coeff_mul] | |
| apply Finset.sum_eq_zero | |
| intro ij hij | |
| have he : ij.1 + ij.2 = d := Finset.mem_antidiagonal.mp hij | |
| have hw : Finsupp.weight v ij.2 β€ Finsupp.weight v d := by | |
| rw [β he, map_add] | |
| exact le_add_of_nonneg_left (rational_weight_nonneg v hv ij.1) | |
| rw [hf ij.2 (hw.trans_lt hd), mul_zero] | |
| @[simp] theorem mem_rationalWeightedIdeal (v : Ο β β) (hv : β i, 0 β€ v i) | |
| (H : β) (f : MvPowerSeries Ο R) : | |
| f β rationalWeightedIdeal v hv H β | |
| β d, Finsupp.weight v d < H β coeff d f = 0 := Iff.rfl | |
| theorem rationalWeightedIdeal_mul_le (v : Ο β β) (hv : β i, 0 β€ v i) (H K : β) : | |
| (rationalWeightedIdeal v hv H : Ideal (MvPowerSeries Ο R)) * | |
| rationalWeightedIdeal v hv K β€ rationalWeightedIdeal v hv (H + K) := by | |
| classical | |
| apply Ideal.mul_le.mpr | |
| intro f hf g hg d hd | |
| rw [coeff_mul] | |
| apply Finset.sum_eq_zero | |
| intro ij hij | |
| have he : ij.1 + ij.2 = d := Finset.mem_antidiagonal.mp hij | |
| by_cases hfirst : Finsupp.weight v ij.1 < H | |
| Β· rw [hf ij.1 hfirst, zero_mul] | |
| Β· have hsecond : Finsupp.weight v ij.2 < K := by | |
| apply lt_of_not_ge | |
| intro hsecond | |
| have hsum := add_le_add (le_of_not_gt hfirst) hsecond | |
| rw [β map_add, he] at hsum | |
| exact (not_le_of_gt hd) hsum | |
| rw [hg ij.2 hsecond, mul_zero] | |
| theorem ideal_pow_le_rationalWeightedIdeal (v : Ο β β) (hv : β i, 0 β€ v i) | |
| (I : Ideal (MvPowerSeries Ο R)) (H : β) | |
| (hI : I β€ rationalWeightedIdeal v hv H) (n : β) : | |
| I ^ n β€ rationalWeightedIdeal v hv (n * H) := by | |
| induction n with | |
| | zero => | |
| intro f hf d hd | |
| have hzero := rational_weight_nonneg v hv d | |
| simp only [Nat.cast_zero, zero_mul] at hd | |
| exact False.elim ((not_lt_of_ge hzero) hd) | |
| | succ n ih => | |
| rw [pow_succ, Nat.cast_add, Nat.cast_one, add_mul, one_mul] | |
| apply Ideal.mul_le.mpr | |
| intro f hf g hg | |
| exact (Ideal.mul_le.mp (rationalWeightedIdeal_mul_le v hv (n * H) H)) | |
| f (ih hf) g (hI hg) | |
| theorem coordinatePowerIdeal_pow_le_rational (v : Ο β β) (hv : β i, 0 β€ v i) | |
| (e : Ο β β) (H : β) (he : β i, H β€ (e i : β) * v i) (n : β) : | |
| (coordinatePowerIdeal e : Ideal (MvPowerSeries Ο R)) ^ n β€ | |
| rationalWeightedIdeal v hv (n * H) := by | |
| classical | |
| apply ideal_pow_le_rationalWeightedIdeal v hv _ H _ n | |
| apply Ideal.span_le.mpr | |
| rintro _ β¨i, rflβ© d hd | |
| rw [coeff_X_pow] | |
| split_ifs with h | |
| Β· subst d | |
| rw [Finsupp.weight_single, nsmul_eq_mul] at hd | |
| exact False.elim ((not_lt_of_ge (he i)) hd) | |
| Β· rfl | |
| def RationalCoefficientPacket (v : Ο β β) (H : β) := | |
| {d : Ο ββ β // Finsupp.weight v d < H} β R | |
| def rationalCoefficientPacket (v : Ο β β) (H : β) (f : MvPowerSeries Ο R) : | |
| RationalCoefficientPacket (R := R) v H := fun d => coeff d.val f | |
| theorem rationalCoefficientPacket_surjective_of_coordinatePowerIdeal {Ξ± : Type*} | |
| (v : Ο β β) (hv : β i, 0 β€ v i) (e : Ο β β) (H : β) | |
| (he : β i, H β€ (e i : β) * v i) (n : β) | |
| (f : Ξ± β MvPowerSeries Ο R) | |
| (hf : Function.Surjective (fun a => | |
| Ideal.Quotient.mk ((coordinatePowerIdeal e : Ideal (MvPowerSeries Ο R)) ^ n) (f a))) : | |
| Function.Surjective (fun a => rationalCoefficientPacket v (n * H) (f a)) := by | |
| classical | |
| intro packet | |
| let F : MvPowerSeries Ο R := fun d => | |
| if hd : Finsupp.weight v d < n * H then packet β¨d, hdβ© else 0 | |
| obtain β¨a, haβ© := hf (Ideal.Quotient.mk _ F) | |
| have hdiff : f a - F β rationalWeightedIdeal v hv (n * H) := | |
| coordinatePowerIdeal_pow_le_rational v hv e H he n (Ideal.Quotient.eq.mp ha) | |
| refine β¨a, ?_β© | |
| funext d | |
| have hzero := hdiff d.val d.property | |
| rw [map_sub, sub_eq_zero] at hzero | |
| change coeff d.val (f a) = packet d | |
| rw [hzero] | |
| change (if hd : Finsupp.weight v d.val < n * H then packet β¨d.val, hdβ© else 0) = packet d | |
| simp only [dite_eq_left d.property] | |
| theorem rationalCoefficientPackets_surjective_of_coordinatePowerIdeal {Ξ± J : Type*} | |
| (v : Ο β β) (hv : β i, 0 β€ v i) (e : Ο β β) (H : β) | |
| (he : β i, H β€ (e i : β) * v i) (n : β) | |
| (f : Ξ± β J β MvPowerSeries Ο R) | |
| (hf : Function.Surjective (fun a j => | |
| Ideal.Quotient.mk ((coordinatePowerIdeal e : Ideal (MvPowerSeries Ο R)) ^ n) (f a j))) : | |
| Function.Surjective (fun a j => rationalCoefficientPacket v (n * H) (f a j)) := by | |
| classical | |
| intro packets | |
| let F : J β MvPowerSeries Ο R := fun j d => | |
| if hd : Finsupp.weight v d < n * H then packets j β¨d, hdβ© else 0 | |
| obtain β¨a, haβ© := hf (fun j => Ideal.Quotient.mk _ (F j)) | |
| refine β¨a, ?_β© | |
| funext j d | |
| have hdiff : f a j - F j β rationalWeightedIdeal v hv (n * H) := | |
| coordinatePowerIdeal_pow_le_rational v hv e H he n | |
| (Ideal.Quotient.eq.mp (congrFun ha j)) | |
| have hzero := hdiff d.val d.property | |
| rw [map_sub, sub_eq_zero] at hzero | |
| change coeff d.val (f a j) = packets j d | |
| rw [hzero] | |
| change (if hd : Finsupp.weight v d.val < n * H then packets j β¨d.val, hdβ© else 0) = packets j d | |
| simp only [dite_eq_left d.property] | |
| end | |
| end PiExponent.JetGeometry | |
| end OAI | |