File size: 4,862 Bytes
4a56cd6 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 | import Mathlib
import OAI.Probability.Perceptron.Variational.EnergyMean
import OAI.Probability.Perceptron.Variational.GaussianAbsoluteEnergyBound
namespace OAI
noncomputable section
open MeasureTheory ProbabilityTheory Filter Set
open scoped Topology NNReal ENNReal BigOperators BoundedContinuousFunction
namespace SphericalPerceptronFreeEnergy
lemma sourceExpectedPressure_coordinate_derivative (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 β β) (hz : StrictMono z)
(hz0 : β i, 0<z i) (hz1 : β i, z i<1) (t : ββ₯0) :
let P := (sourceBaseDataLaw n k z t).prod countableGaussianLaw
β D : β,
HasDerivAt (fun r => β« a, sourceKernelPressure n k f p d (u+Pi.single j r) h a βP) D 0 β§
D = (1/(n+1:β))*(perturbationAmplitude (n+1) (fun _ => 1) j*perturbationAmplitude (n+1) u j*
((k:β)/(k+1:β))^(d j)-
β« a, gibbsReplicaMean (sourceSpinLeafKernel n k a.1)
(sourceCouplingHamiltonian n k f p d h u a) 2
(fun x => sourceCouplingCovariance n k p d u j (x 1) (x 0)) βP) := by
dsimp only
let P := (sourceBaseDataLaw n k z t).prod countableGaussianLaw
have hi (r : β) : Integrable (sourceKernelPressure n k f p d (u+Pi.single j r) h) P := by
have hr := sourceKernelPressure_memLp n k f p d (u+Pi.single j r) h z hz hz0 hz1 t
exact hr.integrable (by norm_num)
have hreg := sourceCoupling_regular_ae n k f p d h hh0 hh u j z t
have hd := annealed_convex_hasDerivAt P (D := sourceCouplingMean n k f p d h u j)
(fun r => (hi r).aestronglyMeasurable)
(fun r => (sourceCoupling_observables_measurable n k f p d h u j r).1.aestronglyMeasurable)
hi (hreg.mono fun a ha => β¨ha.2.1,ha.2.2.1β©) 0
refine β¨_,hd.2,?_β©
simp only [sourceCouplingMean,zero_mul,add_zero,integral_const_mul]
rw [sourceCoupling_energy_mean n k f p d h hh0 hh u j z t
(sourceCoupling_abs_energy_integrable n k f p d h hh0 hh u j z t)]
lemma sourceExpectedPressure_coordinate_derivative_bound (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 β β) (hz : StrictMono z)
(hz0 : β i, 0<z i) (hz1 : β i, z i<1) (t : ββ₯0) :
β D : β,
HasDerivAt (fun r => β« a, sourceKernelPressure n k f p d (u+Pi.single j r) h a
β((sourceBaseDataLaw n k z t).prod countableGaussianLaw)) D 0 β§
|D| β€ 2*|perturbationAmplitude (n+1) (fun _ => 1) j*perturbationAmplitude (n+1) u j|/(n+1:β) := by
obtain β¨D,hD,rflβ© := sourceExpectedPressure_coordinate_derivative n k f p d h hh0 hh u j z hz hz0 hz1 t
refine β¨_,hD,?_β©
let C := |perturbationAmplitude (n+1) (fun _ => 1) j*perturbationAmplitude (n+1) u j|
have hcov (a : SourceBaseData n k Γ (β β β)) :
|gibbsReplicaMean (sourceSpinLeafKernel n k a.1) (sourceCouplingHamiltonian n k f p d h u a) 2
(fun x => sourceCouplingCovariance n k p d u j (x 1) (x 0))| β€ C :=
tiltMean_bound_general _ (replicaPotential_measurable (sourceCouplingHamiltonian_section n k f p d h u a) 2)
(sourceCouplingCovariance_measurable n k 2 p d u j 1 0)
(abs_nonneg _) (fun x => sourceCouplingCovariance_bound n k p d u j _ _)
have hci : |β« a, gibbsReplicaMean (sourceSpinLeafKernel n k a.1)
(sourceCouplingHamiltonian n k f p d h u a) 2
(fun x => sourceCouplingCovariance n k p d u j (x 1) (x 0))
β((sourceBaseDataLaw n k z t).prod countableGaussianLaw)| β€ C := by
simpa only [Real.norm_eq_abs,probReal_univ,mul_one] using norm_integral_le_of_norm_le_const
(ΞΌ := ((sourceBaseDataLaw n k z t).prod countableGaussianLaw))
(f := fun a => gibbsReplicaMean (sourceSpinLeafKernel n k a.1) (sourceCouplingHamiltonian n k f p d h u a) 2
(fun x => sourceCouplingCovariance n k p d u j (x 1) (x 0)))
(ae_of_all _ fun a => by simpa only [Real.norm_eq_abs] using hcov a)
have hk : |((k:β)/(k+1:β))^(d j)| β€ 1 := by
rw [abs_of_nonneg (pow_nonneg (by positivity) _)]
apply pow_le_oneβ (by positivity)
apply (div_le_oneβ (by positivity : (0:β)<(k+1:β))).mpr
exact_mod_cast Nat.le_succ k
have hdiag : |perturbationAmplitude (n+1) (fun _ => 1) j*perturbationAmplitude (n+1) u j*
((k:β)/(k+1:β))^(d j)| β€ C := by
rw [abs_mul]
exact (mul_le_mul_of_nonneg_left hk (abs_nonneg _)).trans_eq (mul_one _)
have hsum := (abs_sub _ _).trans (add_le_add hdiag hci)
rw [abs_mul,abs_of_pos (by positivity : (0:β)<1/(n+1:β))]
calc
_ β€ (1/(n+1:β))*(C+C) := mul_le_mul_of_nonneg_left hsum (by positivity)
_ = _ := by dsimp [C]; ring
end SphericalPerceptronFreeEnergy
end
end OAI
|