openAI-math-dataset / lean /OAI /NumberTheory /PiExponent /LocalAlgebra /ComponentMultiplicitySum.lean
Download lean/OAI/NumberTheory/PiExponent/LocalAlgebra/ComponentMultiplicitySum.lean from roseking/openAI-math-dataset: direct link, hf CLI and curl.
- Browser
- Download file 6.65 kB
-
https://huggingface.co/datasets/roseking/openAI-math-dataset/resolve/main/lean/OAI/NumberTheory/PiExponent/LocalAlgebra/ComponentMultiplicitySum.lean
- Command line
-
hf download hf://datasets/roseking/openAI-math-dataset/lean/OAI/NumberTheory/PiExponent/LocalAlgebra/ComponentMultiplicitySum.lean
-
curl -L -o ComponentMultiplicitySum.lean https://huggingface.co/datasets/roseking/openAI-math-dataset/resolve/main/lean/OAI/NumberTheory/PiExponent/LocalAlgebra/ComponentMultiplicitySum.lean
6.65 kB
| import OAI.NumberTheory.PiExponent.LocalAlgebra.HilbertMultiplicityFiltration | |
| import OAI.NumberTheory.PiExponent.Polynomials.HomogeneousComponentLength | |
| namespace OAI | |
| namespace PiExponentJets.W22 | |
| open PiExponentJets.W64 | |
| open scoped BigOperators Classical | |
| attribute [local instance] MvPolynomial.gradedAlgebra | |
| theorem distinct_selected_factor_weight_le | |
| {τ β : Type*} [Fintype τ] (Q : τ → β) (hQinj : Function.Injective Q) | |
| (P : β) (W : τ → ℚ) (V : ℚ) (hV : 0 ≤ V) | |
| (hmatch : ∀ a, P = Q a → W a = V) : | |
| (∑ a, if P = Q a then W a else 0) ≤ V := by | |
| classical | |
| by_cases hex : ∃ a, P = Q a | |
| · obtain ⟨a, ha⟩ := hex | |
| have hsum : (∑ b, if P = Q b then W b else 0) = W a := by | |
| rw [Finset.sum_eq_single a] | |
| · simp only [ite_eq_left ha] | |
| · intro b _ hba | |
| have hb : P ≠ Q b := by | |
| intro hb | |
| exact hba (hQinj (hb.symm.trans ha)) | |
| exact ite_eq_right hb | |
| · intro hnot | |
| exact False.elim (hnot (Finset.mem_univ a)) | |
| rw [hsum, hmatch a ha] | |
| · have hzero : (∑ a, if P = Q a then W a else 0) = 0 := by | |
| apply Finset.sum_eq_zero | |
| intro a _ | |
| exact ite_eq_right (fun ha => hex ⟨a, ha⟩) | |
| rw [hzero] | |
| exact hV | |
| theorem grouped_count_weighted_sum_eq | |
| {τ β : Type*} [Fintype τ] (n : ℕ) (P : ℕ → β) (Q : τ → β) (W : τ → ℚ) : | |
| (∑ a, ((∑ i ∈ Finset.range n, if P i = Q a then 1 else 0 : ℕ) : ℚ) * W a) = | |
| ∑ i ∈ Finset.range n, ∑ a, if P i = Q a then W a else 0 := by | |
| classical | |
| simp only [Nat.cast_sum, Nat.cast_ite, Nat.cast_one, Nat.cast_zero, | |
| Finset.sum_mul, ite_mul, one_mul, zero_mul] | |
| exact Finset.sum_comm | |
| variable {k σ τ : Type*} [Field k] [Fintype σ] [Fintype τ] | |
| theorem component_multiplicity_sum_bound | |
| (I : Ideal (MvPolynomial σ k)) | |
| (hI : I.IsHomogeneous (MvPolynomial.homogeneousSubmodule σ k)) | |
| (Q : τ → Ideal (MvPolynomial σ k)) [∀ a, (Q a).IsPrime] | |
| (hQinj : Function.Injective Q) | |
| (hQhom : ∀ a, (Q a).IsHomogeneous (MvPolynomial.homogeneousSubmodule σ k)) | |
| (hQ : ∀ a, Q a ∈ I.minimalPrimes) | |
| (v : τ → σ) (hv : ∀ a, MvPolynomial.X (v a) ∉ Q a) | |
| (hdegree : ∀ a, (actualHP (Q a) (hQhom a)).natDegree = (actualHP I hI).natDegree) : | |
| ∃ m : τ → ℕ, | |
| (∀ a, Module.length (Localization.AtPrime (Q a)) | |
| (Localization.AtPrime (Q a) ⧸ I.map | |
| (algebraMap (MvPolynomial σ k) (Localization.AtPrime (Q a)))) = m a) ∧ | |
| (∀ a, 1 ≤ actualMultiplicity (Q a) (hQhom a) (actualHP I hI).natDegree) ∧ | |
| (∑ a, (m a : ℚ) * actualMultiplicity (Q a) (hQhom a) | |
| (actualHP I hI).natDegree) ≤ actualMultiplicity I hI (actualHP I hI).natDegree := by | |
| classical | |
| obtain ⟨n, J, f, degrees, hmono, hstart, hend, hdata⟩ := | |
| exists_homogeneous_cyclic_filtration_nat I hI | |
| let D := (actualHP I hI).natDegree | |
| have hJ : ∀ i, (J i).IsHomogeneous (MvPolynomial.homogeneousSubmodule σ k) := by | |
| intro i | |
| by_cases hi : i < n | |
| · exact (hdata i hi).1 | |
| · have heq : J i = ⊤ := by | |
| apply top_unique | |
| rw [← hend] | |
| exact (monotone_nat_of_le_succ hmono) (Nat.le_of_not_gt hi) | |
| rw [heq] | |
| exact Ideal.IsHomogeneous.top (MvPolynomial.homogeneousSubmodule σ k) | |
| have hIle : ∀ i, I ≤ J i := fun i => | |
| hstart.symm.le.trans ((monotone_nat_of_le_succ hmono) (Nat.zero_le i)) | |
| let P : Fin n → Ideal (MvPolynomial σ k) := fun i => (J i).colon {f i} | |
| have hP : ∀ i : Fin n, (P i).IsHomogeneous (MvPolynomial.homogeneousSubmodule σ k) := | |
| fun i => homogeneous_colon_singleton (J i) (hJ i) (hdata i i.isLt).2.1 | |
| have hIP : ∀ i : Fin n, I ≤ P i := fun i => | |
| (hIle i).trans (ideal_le_colon_singleton (J i) (f i)) | |
| have hPdeg : ∀ i : Fin n, (actualHP (P i) (hP i)).natDegree ≤ D := | |
| fun i => actualHP_natDegree_antitone hI (hP i) (hIP i) | |
| let U : ℕ → ℚ := fun i => actualMultiplicity (J i) (hJ i) D | |
| let V : ℕ → ℚ := fun i => | |
| if hi : i < n then actualMultiplicity (P ⟨i, hi⟩) (hP ⟨i, hi⟩) D else 0 | |
| have hUstep : ∀ i < n, U i = U (i+1) + V i := by | |
| intro i hi | |
| simp only [U, V, dite_eq_left hi] | |
| exact actualMultiplicity_cyclic_step (J i) (J (i+1)) (hJ i) (hJ (i+1)) | |
| (f i) (hdata i hi).2.1 (hdata i hi).2.2.2.2 (hP ⟨i, hi⟩) D (hPdeg ⟨i, hi⟩) | |
| have hUzero : U 0 = actualMultiplicity I hI D := | |
| actualMultiplicity_congr (hJ 0) hI hstart D | |
| have hUend : U n = 0 := by | |
| have htop := Ideal.IsHomogeneous.top (MvPolynomial.homogeneousSubmodule σ k) | |
| exact (actualMultiplicity_congr (hJ n) htop hend D).trans (actualMultiplicity_top htop D) | |
| have hsum : actualMultiplicity I hI D = ∑ i ∈ Finset.range n, V i := by | |
| have ht := rational_filtration_telescope U V n hUstep | |
| rw [hUzero, hUend, add_zero] at ht | |
| exact ht | |
| let m : τ → ℕ := fun a => | |
| ∑ i ∈ Finset.range n, if (J i).colon {f i} = Q a then 1 else 0 | |
| have hm : ∀ a, Module.length (Localization.AtPrime (Q a)) | |
| (Localization.AtPrime (Q a) ⧸ I.map | |
| (algebraMap (MvPolynomial σ k) (Localization.AtPrime (Q a)))) = m a := by | |
| intro a | |
| have hlength := localized_cyclic_filtration_length I (Q a) (hQ a) | |
| J hmono hstart n hend f | |
| (fun i hi => (hdata i hi).2.2.2.2) (fun i hi => (hdata i hi).2.2.2.1) | |
| rw [hlength] | |
| simp only [m, Nat.cast_sum, Nat.cast_ite, Nat.cast_one, Nat.cast_zero] | |
| have hpositive : ∀ a, 1 ≤ actualMultiplicity (Q a) (hQhom a) D := by | |
| intro a | |
| obtain ⟨N, hN⟩ := actualHP_eventually (Q a) (hQhom a) | |
| exact W27.prime_eventual_hilbert_coefficient_ge_one (Q a) (v a) (hv a) | |
| (actualHP (Q a) (hQhom a)) (N+1) D | |
| (fun t ht => (hN t (by omega)).symm) (hdegree a) | |
| refine ⟨m, hm, hpositive, ?_⟩ | |
| change (∑ a, (m a : ℚ) * actualMultiplicity (Q a) (hQhom a) D) ≤ | |
| actualMultiplicity I hI D | |
| rw [hsum] | |
| have hgroup := grouped_count_weighted_sum_eq n | |
| (fun i => (J i).colon {f i}) Q (fun a => actualMultiplicity (Q a) (hQhom a) D) | |
| change (∑ a, (m a : ℚ) * actualMultiplicity (Q a) (hQhom a) D) = _ at hgroup | |
| rw [hgroup] | |
| apply Finset.sum_le_sum | |
| intro i hi | |
| have hin : i < n := Finset.mem_range.mp hi | |
| have hnonneg : 0 ≤ V i := by | |
| simp only [V, dite_eq_left hin] | |
| exact actualMultiplicity_nonneg (P ⟨i, hin⟩) (hP ⟨i, hin⟩) D (hPdeg ⟨i, hin⟩) | |
| apply distinct_selected_factor_weight_le Q hQinj ((J i).colon {f i}) | |
| (fun a => actualMultiplicity (Q a) (hQhom a) D) (V i) hnonneg | |
| intro a heq | |
| simp only [V, dite_eq_left hin] | |
| exact (actualMultiplicity_congr (hP ⟨i, hin⟩) (hQhom a) heq D).symm | |
| end PiExponentJets.W22 | |
| end OAI | |