Download data/lean/OAI/Probability/Perceptron/Variational/CompactJointMonomials.lean from introvoyz045/math: direct link, hf CLI and curl.
- Browser
- Download file 4.36 kB
-
https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Probability/Perceptron/Variational/CompactJointMonomials.lean
- Command line
-
hf download hf://datasets/introvoyz045/math/data/lean/OAI/Probability/Perceptron/Variational/CompactJointMonomials.lean
-
curl -L -o CompactJointMonomials.lean https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Probability/Perceptron/Variational/CompactJointMonomials.lean
4.36 kB
| import Mathlib | |
| import OAI.Probability.Perceptron.Interpolation.GibbsOverlapArray | |
| namespace OAI | |
| noncomputable section | |
| namespace SphericalPerceptronFreeEnergy | |
| open MeasureTheory ProbabilityTheory Filter Set | |
| open scoped Topology NNReal ENNReal BigOperators BoundedContinuousFunction | |
| def compactJointMonomial (p d : β) : CompactJointOverlap βα΅ β := | |
| BoundedContinuousFunction.mkOfCompact β¨fun x : CompactJointOverlap => (x.2:β)^d*(x.1:β)^p,by fun_propβ© | |
| @[simp] lemma compactJointMonomial_apply (p d : β) (x : CompactJointOverlap) : | |
| compactJointMonomial p d x = (x.2:β)^d*(x.1:β)^p := rfl | |
| lemma compactJointMonomial_zero : compactJointMonomial 0 0 = 1 := by ext x; simp | |
| lemma compactJointMonomial_add (p d p' d' : β) : | |
| compactJointMonomial (p+p') (d+d') = compactJointMonomial p d * compactJointMonomial p' d' := by | |
| ext x | |
| simp only [compactJointMonomial_apply,BoundedContinuousFunction.mul_apply,pow_add] | |
| ring | |
| lemma compactJointMonomial_separates (x y : CompactJointOverlap) (h : xβ y) : | |
| β p d, compactJointMonomial p d x β compactJointMonomial p d y := by | |
| by_contra hn | |
| push Not at hn | |
| apply h | |
| apply Prod.ext <;> apply Subtype.ext | |
| Β· simpa using hn 1 0 | |
| Β· simpa using hn 0 1 | |
| lemma compactJointMonomial_abs_le (p d : β) (x : CompactJointOverlap) : | |
| |compactJointMonomial p d x|β€1 := by | |
| rw [compactJointMonomial_apply,abs_mul,abs_pow,abs_pow,abs_of_nonneg x.2.property.1] | |
| exact (mul_le_of_le_one_left (by positivity) | |
| (pow_le_oneβ x.2.property.1 x.2.property.2)).trans | |
| (pow_le_oneβ (abs_nonneg _) (abs_le.mpr x.1.property)) | |
| lemma compactJoint_monomials_determine (P Q : Measure CompactJointOverlap) | |
| [IsFiniteMeasure P] [IsFiniteMeasure Q] | |
| (h : β p d, (β« x, compactJointMonomial p d x βP) = β« x, compactJointMonomial p d x βQ) : P=Q := by | |
| apply measure_eq_of_additive_test_family (fun a : βΓβ => compactJointMonomial a.1 a.2) | |
| compactJointMonomial_zero (fun a b => compactJointMonomial_add _ _ _ _) | |
| Β· intro x y hxy | |
| obtain β¨p,d,hpdβ© := compactJointMonomial_separates x y hxy | |
| exact β¨(p,d),hpdβ© | |
| Β· exact fun a => h a.1 a.2 | |
| lemma sourceJointOverlap_symm {N k : β} (x y : NormalizedSpin NΓIndexedLeaf k) : | |
| sourceJointOverlap x y = sourceJointOverlap y x := by | |
| apply Prod.ext <;> apply Subtype.ext | |
| Β· exact real_inner_comm _ _ | |
| Β· simp only [sourceJointOverlap,indexedCommonDepth_comm k y.2 x.2] | |
| lemma sourceGibbsArray_eq (n k : β) (f : β βα΅ β) (p d : Fin (n+1) β β) | |
| (h : Fin (k+1) β β) (u : Fin (n+1) β β) (z : Fin k β β) (t : ββ₯0) : | |
| sourceGibbsArrayLaw n k f p d h u z t = | |
| gibbsOverlapArrayLaw (sourceFullSpinLeafKernel n k) | |
| ((sourceBaseDataLaw n k z t).prod countableGaussianLaw) | |
| (sourceCouplingHamiltonian n k f p d h u) | |
| (sourceCouplingHamiltonian_measurable n k f p d h u) | |
| sourceJointOverlap (sourceJointOverlap_measurable (n+1) k) := rfl | |
| lemma source_compact_gg_defect (n k : β) (f : β βα΅ β) (p d : Fin (n+1) β β) | |
| (h : Fin (k+1) β β) (hh0 : β l, 0β€h l) (hh : Monotone h) | |
| (u : Fin (n+1) β β) (j : Fin (n+1)) (z : Fin k β β) (t : ββ₯0) | |
| (r : β) (i : Fin r) (G : CompactBlock CompactJointOverlap r βα΅ β) : | |
| compactGGDefect (sourceGibbsArrayLaw n k f p d h u z t) r i G (compactJointMonomial (p j) (d j)) = | |
| -kernelGGDefect (sourceFullSpinLeafKernel n k) | |
| ((sourceBaseDataLaw n k z t).prod countableGaussianLaw) | |
| (sourceCouplingHamiltonian n k f p d h u) (sourceJointMonomial p d j) | |
| (((k:β)/(k+1:β))^(d j)) r i | |
| (fun x => G (fun a b => sourceJointOverlap (x a) (x b))) := by | |
| rw [sourceGibbsArray_eq] | |
| have he := sourceCoupling_all_exp_ae n k f p d h hh0 hh u 0 z t | |
| have hexp : βα΅ a β(sourceBaseDataLaw n k z t).prod countableGaussianLaw, | |
| Integrable (fun x => Real.exp (sourceCouplingHamiltonian n k f p d h u a x)) | |
| (sourceFullSpinLeafKernel n k a) := by | |
| filter_upwards [he] with a ha | |
| simpa only [sourceFullSpinLeafKernel,Kernel.comap_apply,zero_mul,add_zero] using ha 0 | |
| apply compactGGDefect_gibbsOverlapArray _ _ _ _ _ _ hexp r i G (compactJointMonomial (p j) (d j)) | |
| Β· exact sourceJointMonomial_diagonal p d j | |
| Β· intro x y | |
| rw [sourceJointOverlap_symm x y] | |
| end SphericalPerceptronFreeEnergy | |
| end | |
| end OAI | |