Download data/lean/OAI/Geometry/PinnedDistances/ProductFormula.lean from introvoyz045/math: direct link, hf CLI and curl.
- Browser
- Download file 4.76 kB
-
https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Geometry/PinnedDistances/ProductFormula.lean
- Command line
-
hf download hf://datasets/introvoyz045/math/data/lean/OAI/Geometry/PinnedDistances/ProductFormula.lean
-
curl -L -o ProductFormula.lean https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Geometry/PinnedDistances/ProductFormula.lean
4.76 kB
| import OAI.Geometry.PinnedDistances.MixtureLaw | |
| namespace OAI | |
| universe u1 u2 u3 u4 | |
| section | |
| /- The finite-place absolute values are norm-normalized. Dividing their logarithms | |
| by [K:β] gives the weighted contribution of locally normalized absolute values. -/ | |
| noncomputable section | |
| open NumberField | |
| open scoped BigOperators | |
| namespace WeakPinned.Arithmetic | |
| variable {K : Type u1} [Field K] | |
| lemma totallyComplex_of_sq_neg_one (ii : K) (hii : ii ^ 2 = -1) : | |
| NumberField.IsTotallyComplex K := by | |
| constructor | |
| intro v | |
| rw [β InfinitePlace.not_isReal_iff_isComplex] | |
| intro hv | |
| let Ο := InfinitePlace.embedding_of_isReal hv | |
| have h := congrArg Ο hii | |
| simp only [map_pow, map_neg, map_one] at h | |
| nlinarith [sq_nonneg (Ο ii)] | |
| variable [NumberField K] | |
| lemma log_product_formula (z : K) (hz : z β 0) : | |
| (β v : InfinitePlace K, (v.mult : β) * Real.log (v z)) + | |
| βαΆ v : FinitePlace K, Real.log (v z) = 0 := by | |
| have hi : β v : InfinitePlace K, 0 < v z := fun _ => InfinitePlace.pos_iff.mpr hz | |
| have hf : β v : FinitePlace K, 0 < v z := fun _ => FinitePlace.pos_iff.mpr hz | |
| have h := congrArg Real.log (NumberField.prod_abs_eq_one hz) | |
| rw [Real.log_mul (Finset.prod_ne_zero_iff.mpr fun v _ => pow_ne_zero _ (hi v).ne') | |
| (finprod_ne_zero fun v => (hf v).ne'), Real.log_prod (fun v _ => pow_ne_zero _ (hi v).ne'), | |
| Real.log_finprod hf, Real.log_one] at h | |
| simpa only [Real.log_pow] using h | |
| def archWeight (v : InfinitePlace K) : β := | |
| (v.mult : β) / Module.finrank β K | |
| lemma sum_archWeight : β v : InfinitePlace K, archWeight v = 1 := by | |
| classical | |
| unfold archWeight | |
| rw [β Finset.sum_div, β Nat.cast_sum, InfinitePlace.sum_mult_eq, div_self] | |
| exact_mod_cast (Module.finrank_pos (R := β) (M := K)).ne' | |
| lemma archWeight_nonneg (v : InfinitePlace K) : 0 β€ archWeight v := by | |
| unfold archWeight | |
| positivity | |
| /-- The finitely many nonunit places for a given finite list of differences. -/ | |
| lemma finite_nonunit_places {ΞΉ : Type u2} [Finite ΞΉ] (z : ΞΉ β K) | |
| (hz : β i, z i β 0) : | |
| {v : FinitePlace K | β i, v (z i) β 1}.Finite := by | |
| have he : {v : FinitePlace K | β i, v (z i) β 1} = | |
| β i, Function.mulSupport (fun v : FinitePlace K => v (z i)) := by | |
| ext v | |
| simp | |
| rw [he] | |
| exact Set.finite_iUnion (fun i => FinitePlace.hasFiniteMulSupport (hz i)) | |
| omit [NumberField K] in | |
| /-- Multiplicativity gives the constant depth sum on each nonzero fiber at | |
| every absolute value; neither the embeddings nor the field are fixed. -/ | |
| lemma raw_fiber_identity (v : AbsoluteValue K β) (a b : K) (ha : a β 0) (hb : b β 0) : | |
| -Real.log (v a) + -Real.log (v b) = -Real.log (v (a * b)) := by | |
| rw [map_mul, Real.log_mul (v.pos ha).ne' (v.pos hb).ne'] | |
| ring | |
| /-- The algebraic inversion identity used both by the unbounded tree argument | |
| and the bounded Mobius argument. This is valid in any field. -/ | |
| lemma paired_coordinate {F : Type u3} [Field F] (a b c d t : F) | |
| (ha : c β a) (h : (c-a)*(d-b)=t) : d = b + t/(c-a) := by | |
| have h' : d-b = t/(c-a) := (eq_div_iff (sub_ne_zero.mpr ha)).mpr | |
| (by simpa [mul_comm] using h) | |
| rw [β h'] | |
| ring | |
| lemma paired_difference {F : Type u4} [Field F] (a b c d z w t : F) | |
| (hc : c β a) (hz : z β a) | |
| (hcd : (c-a)*(d-b)=t) (hzw : (z-a)*(w-b)=t) : | |
| w-d = t * (c-z) / ((z-a)*(c-a)) := by | |
| rw [paired_coordinate a b c d t hc hcd, paired_coordinate a b z w t hz hzw] | |
| field_simp | |
| ring | |
| lemma finite_raw_ultra (v : FinitePlace K) {x y z : K} | |
| (_hxy : x β y) (_hyz : y β z) (hxz : x β z) : | |
| min (-Real.log (v (x-y))) (-Real.log (v (y-z))) β€ -Real.log (v (x-z)) := by | |
| have h := v.add_le (x-y) (y-z) | |
| rw [sub_add_sub_cancel] at h | |
| have hp : 0 < v (x-z) := FinitePlace.pos_iff.mpr (sub_ne_zero.mpr hxz) | |
| have hl := Real.log_le_log hp h | |
| by_cases hc : v (x-y) β€ v (y-z) | |
| Β· rw [max_eq_right hc] at hl | |
| exact (min_le_right _ _).trans (neg_le_neg hl) | |
| Β· rw [max_eq_left (le_of_not_ge hc)] at hl | |
| exact (min_le_left _ _).trans (neg_le_neg hl) | |
| lemma normalized_log_product_formula (z : K) (hz : z β 0) : | |
| (β v : InfinitePlace K, archWeight v * (-Real.log (v z))) + | |
| (Module.finrank β K : β)β»ΒΉ * βαΆ v : FinitePlace K, -Real.log (v z) = 0 := by | |
| have hh := log_product_formula z hz | |
| simp only [archWeight, div_eq_mul_inv] | |
| rw [finsum_neg_distrib] | |
| have he : (β v : InfinitePlace K, (v.mult:β) * (Module.finrank β K : β)β»ΒΉ * (-Real.log (v z))) = | |
| -(Module.finrank β K : β)β»ΒΉ * β v : InfinitePlace K, (v.mult:β) * Real.log (v z) := by | |
| rw [Finset.mul_sum] | |
| apply Finset.sum_congr rfl | |
| intro v _ | |
| ring | |
| rw [he] | |
| linear_combination -(Module.finrank β K : β)β»ΒΉ * hh | |
| end WeakPinned.Arithmetic | |
| end | |
| end | |
| end OAI | |