Buckets:
| import Mathlib | |
| import OAI.NumberTheory.CubicGram.Mobius | |
| import OAI.NumberTheory.CubicGram.GramPoisson | |
| namespace OAI | |
| /-! Moebius removal of common factors and coprime Gram decomposition. -/ | |
| section | |
| noncomputable section | |
| open scoped BigOperators SchwartzMap ContDiff | |
| open Set Filter MeasureTheory Topology | |
| attribute [local instance] Classical.propDecidable | |
| namespace CubicFirstMoment | |
| lemma mixedSymbol_remove_common {k a b : Eisenstein} (hk : primary k) | |
| (ha : primary a) (hb : primary b) (n : Eisenstein) : | |
| mixedSymbol (k*a) (k*b) n = | |
| if IsCoprime k n then mixedSymbol a b n else 0 := by | |
| rw [mixedSymbol, cubicSymbol_mul_lower (primary_ne_zero hk) (primary_ne_zero ha), | |
| cubicSymbol_mul_lower (primary_ne_zero hk) (primary_ne_zero hb), star_mul] | |
| by_cases hc : IsCoprime k n | |
| · rw [ite_eq_left hc] | |
| have hu : cubicSymbol k n * star (cubicSymbol k n) = 1 := by | |
| change cubicSymbol k n * starRingEnd ℂ (cubicSymbol k n) = 1 | |
| rw [Complex.mul_conj', norm_cubicSymbol_of_isCoprime hk hc] | |
| norm_num | |
| simp only [mixedSymbol] | |
| linear_combination (cubicSymbol a n * star (cubicSymbol b n)) * hu | |
| · rw [ite_eq_right hc, cubicSymbol_eq_zero_of_not_isCoprime hk hc] | |
| simp | |
| lemma primary_subsets_prod_dvd {k : Eisenstein} (hk : primary k) | |
| {s : Finset Eisenstein} (hs : s ⊆ primaryPrimeFactors k) (n : Eisenstein) : | |
| (∏ p ∈ s, p) ∣ n ↔ ∀ p ∈ s, p ∣ n := by | |
| constructor | |
| · intro h p hp | |
| exact dvd_trans (Finset.dvd_prod_of_mem (fun p : Eisenstein => p) hp) h | |
| · intro h | |
| apply Finset.prod_dvd_of_coprime _ h | |
| intro p hp q hq hpq | |
| exact primaryPrimes_isCoprime (primaryPrimeFactor_spec hk (hs hp)).1 | |
| (primaryPrimeFactor_spec hk (hs hq)).1 hpq | |
| theorem primary_moebius_coprimality {k : Eisenstein} (hk : primary k) | |
| (hsk : Squarefree k) (n : Eisenstein) : | |
| (if IsCoprime k n then (1 : ℂ) else 0) = | |
| ∑ s ∈ (primaryPrimeFactors k).powerset, | |
| (idealMoebius (∏ p ∈ s, p) : ℂ) * | |
| (if (∏ p ∈ s, p) ∣ n then 1 else 0) := by | |
| let P := primaryPrimeFactors k | |
| have hprod : (∏ p ∈ P, (1 - (if p ∣ n then (1 : ℂ) else 0))) = | |
| if IsCoprime k n then 1 else 0 := by | |
| by_cases h : IsCoprime k n | |
| · rw [ite_eq_left h] | |
| apply Finset.prod_eq_one | |
| intro p hp | |
| have hpn : ¬p ∣ n := by | |
| intro hd | |
| exact (primaryPrimeFactor_spec hk hp).1.2.not_isUnit | |
| (h.isUnit_of_dvd' (primaryPrimeFactor_spec hk hp).2 hd) | |
| simp [hpn] | |
| · rw [ite_eq_right h] | |
| have hex : ∃ p ∈ P, p ∣ n := by | |
| by_contra hn | |
| have hall : ∀ p ∈ P, IsCoprime p n := by | |
| intro p hp | |
| exact ((primaryPrimeFactor_spec hk hp).1.2.irreducible.coprime_iff_not_dvd).mpr | |
| (fun hd => hn ⟨p, hp, hd⟩) | |
| have := IsCoprime.prod_left hall | |
| rw [primaryPrimeFactors_prod hk hsk] at this | |
| exact h this | |
| obtain ⟨p, hp, hpn⟩ := hex | |
| apply Finset.prod_eq_zero hp | |
| simp [hpn] | |
| rw [← hprod] | |
| have hex := Finset.prod_add (fun p : Eisenstein => -(if p ∣ n then (1 : ℂ) else 0)) | |
| (fun _ => (1 : ℂ)) P | |
| simp only [Finset.prod_const_one, mul_one, ← sub_eq_neg_add] at hex | |
| rw [hex] | |
| apply Finset.sum_congr rfl | |
| intro s hs | |
| have hsub : s ⊆ primaryPrimeFactors k := Finset.mem_powerset.mp hs | |
| rw [idealMoebius_prod_primaryPrimes s | |
| (fun p hp => (primaryPrimeFactor_spec hk (hsub hp)).1), Finset.prod_neg] | |
| push_cast | |
| congr 1 | |
| by_cases h : (∏ p ∈ s, p) ∣ n | |
| · rw [ite_eq_left h] | |
| apply Finset.prod_eq_one | |
| intro p hp | |
| simp [(primary_subsets_prod_dvd hk hsub n).mp h p hp] | |
| · rw [ite_eq_right h] | |
| have hex : ∃ p ∈ s, ¬p ∣ n := by | |
| by_contra hn | |
| apply h | |
| apply (primary_subsets_prod_dvd hk hsub n).mpr | |
| intro p hp | |
| by_contra hpn | |
| exact hn ⟨p, hp, hpn⟩ | |
| obtain ⟨p, hp, hpn⟩ := hex | |
| exact Finset.prod_eq_zero hp (by simp [hpn]) | |
| end CubicFirstMoment | |
| namespace CubicFirstMoment | |
| lemma norm_cubicSymbol_le_one {a : Eisenstein} (ha : primary a) (b : Eisenstein) : | |
| ‖cubicSymbol a b‖ ≤ 1 := by | |
| by_cases hab : IsCoprime a b | |
| · rw [norm_cubicSymbol_of_isCoprime ha hab] | |
| · simp [cubicSymbol_eq_zero_of_not_isCoprime ha hab] | |
| lemma summable_gram_restricted {a b : Eisenstein} (ha : primary a) (hb : primary b) | |
| (W : ℝ → ℂ) (hW : HasCompactSupport W) (hW' : ContDiff ℝ ∞ W) | |
| {Z : ℝ} (hZ : 0 < Z) (S : Eisenstein → Prop) : | |
| Summable (fun n : Eisenstein => if primary n ∧ S n then | |
| W (norm n / Z) * cubicSymbol a n * star (cubicSymbol b n) else 0) := by | |
| apply Summable.of_norm_bounded | |
| (schwartz_summable_eisenstein (normProfileSchwartz W hW hW' Z hZ)).norm | |
| intro n | |
| change ‖ite _ _ _‖ ≤ ‖W (norm n / Z)‖ | |
| split_ifs with hn | |
| · rw [norm_mul, norm_mul, norm_star] | |
| calc | |
| _ ≤ ‖W (norm n / Z)‖ * 1 * 1 := | |
| mul_le_mul (mul_le_mul_of_nonneg_left (norm_cubicSymbol_le_one ha n) | |
| (_root_.norm_nonneg _)) (norm_cubicSymbol_le_one hb n) | |
| (_root_.norm_nonneg _) (by positivity) | |
| _ = _ := by ring | |
| · simp | |
| def multiplesMap (m : Eisenstein) (x : Eisenstein) : {n : Eisenstein // m ∣ n} := | |
| ⟨m*x, dvd_mul_right m x⟩ | |
| lemma multiplesMap_bijective {m : Eisenstein} (hm : m ≠ 0) : | |
| Function.Bijective (multiplesMap m) := by | |
| constructor | |
| · intro x y h | |
| exact mul_left_cancel₀ hm (congrArg Subtype.val h) | |
| · intro n | |
| obtain ⟨x, hx⟩ := n.property | |
| exact ⟨x, Subtype.ext hx.symm⟩ | |
| lemma tsum_dvd_eq_multiples {m : Eisenstein} (hm : m ≠ 0) (F : Eisenstein → ℂ) : | |
| (∑' n : Eisenstein, if m ∣ n then F n else 0) = | |
| ∑' x : Eisenstein, F (m*x) := by | |
| have he := (Equiv.ofBijective (multiplesMap m) (multiplesMap_bijective hm)).tsum_eq | |
| (fun n => F n.val) | |
| change (∑' n : Eisenstein, Set.indicator {n | m ∣ n} F n) = _ | |
| rw [← tsum_subtype] | |
| exact he.symm | |
| lemma tsum_primary_dvd_eq_multiples {m : Eisenstein} (hm : primary m) | |
| (F : Eisenstein → ℂ) : | |
| (∑' n : Eisenstein, if primary n ∧ m ∣ n then F n else 0) = | |
| ∑' x : Eisenstein, if primary x then F (m*x) else 0 := by | |
| have he := tsum_dvd_eq_multiples (primary_ne_zero hm) | |
| (fun n => if primary n then F n else 0) | |
| convert he using 1 | |
| · apply tsum_congr | |
| intro n | |
| by_cases hn : primary n <;> by_cases hd : m ∣ n <;> simp [hn, hd] | |
| · apply tsum_congr | |
| intro n | |
| have hp : primary (m*n) ↔ primary n := ⟨primary_of_mul hm, primary_mul hm⟩ | |
| simp only [hp] | |
| theorem primaryCharacterGram_divisor_scale {a b m : Eisenstein} (ha : primary a) | |
| (hb : primary b) (hm : primary m) (W : ℝ → ℂ) (Z : ℝ) : | |
| (∑' n : Eisenstein, if primary n ∧ m ∣ n then | |
| W (norm n / Z) * cubicSymbol a n * star (cubicSymbol b n) else 0) = | |
| mixedSymbol a b m * primaryCharacterGram a b W (Z / norm m) := by | |
| rw [tsum_primary_dvd_eq_multiples hm | |
| (fun n => W (norm n / Z) * cubicSymbol a n * star (cubicSymbol b n))] | |
| unfold primaryCharacterGram | |
| rw [← tsum_mul_left] | |
| apply tsum_congr | |
| intro n | |
| by_cases hn : primary n | |
| · have hnorm : norm (m*n) = norm m * norm n := Complex.normSq_mul _ _ | |
| simp only [ite_eq_left hn, hnorm, div_div_eq_mul_div, cubicSymbol_mul_upper ha, | |
| cubicSymbol_mul_upper hb, star_mul, mixedSymbol] | |
| rw [show norm m * norm n / Z = norm n * norm m / Z by ring] | |
| ring | |
| · simp only [ite_eq_right hn, mul_zero] | |
| theorem primaryCharacterGram_common_factor {k a b : Eisenstein} (hk : primary k) | |
| (hsk : Squarefree k) (ha : primary a) (hb : primary b) | |
| (W : ℝ → ℂ) (hW : HasCompactSupport W) (hW' : ContDiff ℝ ∞ W) | |
| {Z : ℝ} (hZ : 0 < Z) : | |
| primaryCharacterGram (k*a) (k*b) W Z = | |
| ∑ s ∈ (primaryPrimeFactors k).powerset, | |
| (idealMoebius (∏ p ∈ s, p) : ℂ) * | |
| mixedSymbol a b (∏ p ∈ s, p) * | |
| primaryCharacterGram a b W (Z / norm (∏ p ∈ s, p)) := by | |
| let P := (primaryPrimeFactors k).powerset | |
| let T (s : Finset Eisenstein) (n : Eisenstein) : ℂ := | |
| (idealMoebius (∏ p ∈ s, p) : ℂ) * | |
| (if primary n ∧ (∏ p ∈ s, p) ∣ n then | |
| W (norm n / Z) * cubicSymbol a n * star (cubicSymbol b n) else 0) | |
| have hsumm (s : Finset Eisenstein) : Summable (T s) := | |
| (summable_gram_restricted ha hb W hW hW' hZ (fun n => (∏ p ∈ s, p) ∣ n)).mul_left _ | |
| have hpoint (n : Eisenstein) : | |
| (if primary n then W (norm n / Z) * cubicSymbol (k*a) n * | |
| star (cubicSymbol (k*b) n) else 0) = ∑ s ∈ P, T s n := by | |
| by_cases hn : primary n | |
| · simp only [ite_eq_left hn] | |
| rw [mul_assoc] | |
| change W (norm n / Z) * mixedSymbol (k*a) (k*b) n = _ | |
| rw [mixedSymbol_remove_common hk ha hb] | |
| have he := primary_moebius_coprimality hk hsk n | |
| have hmul := congrArg (fun z : ℂ => z * | |
| (W (norm n / Z) * mixedSymbol a b n)) he | |
| simp only [Finset.sum_mul] at hmul | |
| convert hmul using 1 | |
| · split_ifs <;> ring | |
| · apply Finset.sum_congr rfl | |
| intro s hs | |
| simp only [T, hn, true_and, mixedSymbol] | |
| split_ifs <;> ring | |
| · simp only [T, hn, false_and, ite_false, mul_zero, Finset.sum_const_zero] | |
| change (∑' n : Eisenstein, if primary n then _ else 0) = _ | |
| simp_rw [hpoint] | |
| rw [Summable.tsum_finsetSum (fun s _ => hsumm s)] | |
| apply Finset.sum_congr rfl | |
| intro s hs | |
| change (∑' n, (idealMoebius (∏ p ∈ s, p) : ℂ) * _) = _ | |
| rw [tsum_mul_left] | |
| have hm : primary (∏ p ∈ s, p) := primary_finset_prod _ _ | |
| (fun p hp => (primaryPrimeFactor_spec hk (Finset.mem_powerset.mp hs hp)).1.1) | |
| rw [primaryCharacterGram_divisor_scale ha hb hm] | |
| ring | |
| end CubicFirstMoment | |
| namespace CubicFirstMoment | |
| theorem primarySquarefree_common_decomposition {p q : Eisenstein} | |
| (hp : primary p) (hq : primary q) (hsp : Squarefree p) (hsq : Squarefree q) : | |
| ∃ k a b : Eisenstein, primary k ∧ primary a ∧ primary b ∧ | |
| Squarefree k ∧ Squarefree a ∧ Squarefree b ∧ | |
| IsCoprime a b ∧ IsCoprime k a ∧ IsCoprime k b ∧ p = k*a ∧ q = k*b := by | |
| let P := primaryPrimeFactors p | |
| let Q := primaryPrimeFactors q | |
| let k := ∏ r ∈ P ∩ Q, r | |
| let a := ∏ r ∈ P \ Q, r | |
| let b := ∏ r ∈ Q \ P, r | |
| have hk : primary k := primary_finset_prod _ _ | |
| (fun r hr => (primaryPrimeFactor_spec hp (Finset.mem_inter.mp hr).1).1.1) | |
| have ha : primary a := primary_finset_prod _ _ | |
| (fun r hr => (primaryPrimeFactor_spec hp (Finset.mem_sdiff.mp hr).1).1.1) | |
| have hb : primary b := primary_finset_prod _ _ | |
| (fun r hr => (primaryPrimeFactor_spec hq (Finset.mem_sdiff.mp hr).1).1.1) | |
| have hep : k*a = p := | |
| (Finset.prod_inter_mul_prod_sdiff P Q (fun r : Eisenstein => r)).trans | |
| (primaryPrimeFactors_prod hp hsp) | |
| have heq : k*b = q := by | |
| change (∏ r ∈ P ∩ Q, r) * (∏ r ∈ Q \ P, r) = q | |
| rw [Finset.inter_comm P Q] | |
| exact (Finset.prod_inter_mul_prod_sdiff Q P (fun r : Eisenstein => r)).trans | |
| (primaryPrimeFactors_prod hq hsq) | |
| have hab : IsCoprime a b := by | |
| apply IsCoprime.prod_left | |
| intro r hr | |
| apply IsCoprime.prod_right | |
| intro s hs | |
| apply primaryPrimes_isCoprime (primaryPrimeFactor_spec hp (Finset.mem_sdiff.mp hr).1).1 | |
| (primaryPrimeFactor_spec hq (Finset.mem_sdiff.mp hs).1).1 | |
| intro he | |
| exact (Finset.mem_sdiff.mp hr).2 (he ▸ (Finset.mem_sdiff.mp hs).1) | |
| have hka : IsCoprime k a := by | |
| apply IsCoprime.prod_left | |
| intro r hr | |
| apply IsCoprime.prod_right | |
| intro s hs | |
| apply primaryPrimes_isCoprime (primaryPrimeFactor_spec hp (Finset.mem_inter.mp hr).1).1 | |
| (primaryPrimeFactor_spec hp (Finset.mem_sdiff.mp hs).1).1 | |
| intro he | |
| exact (Finset.mem_sdiff.mp hs).2 (he ▸ (Finset.mem_inter.mp hr).2) | |
| have hkb : IsCoprime k b := by | |
| apply IsCoprime.prod_left | |
| intro r hr | |
| apply IsCoprime.prod_right | |
| intro s hs | |
| apply primaryPrimes_isCoprime (primaryPrimeFactor_spec hp (Finset.mem_inter.mp hr).1).1 | |
| (primaryPrimeFactor_spec hq (Finset.mem_sdiff.mp hs).1).1 | |
| intro he | |
| exact (Finset.mem_sdiff.mp hs).2 (he ▸ (Finset.mem_inter.mp hr).1) | |
| exact ⟨k, a, b, hk, ha, hb, | |
| Squarefree.squarefree_of_dvd (hep ▸ dvd_mul_right k a) hsp, Squarefree.squarefree_of_dvd (hep ▸ dvd_mul_left a k) hsp, | |
| Squarefree.squarefree_of_dvd (heq ▸ dvd_mul_left b k) hsq, hab, hka, hkb, hep.symm, heq.symm⟩ | |
| theorem primaryCharacterGram_common_poisson {k a b : Eisenstein} | |
| (hk : primary k) (hsk : Squarefree k) (ha : primary a) (hb : primary b) | |
| (hsa : Squarefree a) (hsb : Squarefree b) (hab : IsCoprime a b) | |
| (W : ℝ → ℂ) (hW : HasCompactSupport W) (hW' : ContDiff ℝ ∞ W) | |
| {Z : ℝ} (hZ : 0 < Z) : | |
| primaryCharacterGram (k*a) (k*b) W Z = | |
| ∑ s ∈ (primaryPrimeFactors k).powerset, | |
| let m := ∏ p ∈ s, p | |
| (idealMoebius m : ℂ) * mixedSymbol a b m * | |
| (((Z / norm m) / (9*Real.sqrt (norm (a*b)))) : ℝ) * | |
| (gauss a * star (gauss b)) * | |
| ∑' h : Eisenstein, gramDualTerm a b W (Z / norm m) h := by | |
| rw [primaryCharacterGram_common_factor hk hsk ha hb W hW hW' hZ] | |
| apply Finset.sum_congr rfl | |
| intro s hs | |
| have hm : primary (∏ p ∈ s, p) := primary_finset_prod _ _ | |
| (fun p hp => (primaryPrimeFactor_spec hk (Finset.mem_powerset.mp hs hp)).1.1) | |
| have hmpos : 0 < norm (∏ p ∈ s, p) := Complex.normSq_pos.mpr | |
| (fun h => primary_ne_zero hm (Subtype.ext h)) | |
| rw [primaryCharacterGram_poisson_normalized ha hb hsa hsb hab W hW hW' | |
| (div_pos hZ hmpos)] | |
| dsimp only | |
| ring | |
| end CubicFirstMoment | |
| end | |
| end | |
| end OAI | |
Xet Storage Details
- Size:
- 13.5 kB
- Xet hash:
- d3803b225377968e88a8fa3da5b78d28dd88bde1b6464bc2fa00c18b39fcd41a
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.