Download data/lean/OAI/Probability/IsingPerceptron/EnrichedGGFinite.lean from introvoyz045/math: direct link, hf CLI and curl.
- Browser
- Download file 19.5 kB
-
https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Probability/IsingPerceptron/EnrichedGGFinite.lean
- Command line
-
hf download hf://datasets/introvoyz045/math/data/lean/OAI/Probability/IsingPerceptron/EnrichedGGFinite.lean
-
curl -L -o EnrichedGGFinite.lean https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Probability/IsingPerceptron/EnrichedGGFinite.lean
19.5 kB
| import Mathlib | |
| import OAI.Probability.IsingPerceptron.JointGGClosure | |
| namespace OAI | |
| /-! Enriched G G Finite. -/ | |
| noncomputable section | |
| open MeasureTheory ProbabilityTheory Filter Set | |
| open scoped BigOperators Topology ENNReal NNReal | |
| open MeasureTheory ProbabilityTheory Filter Set | |
| open scoped BigOperators Topology ENNReal NNReal | |
| namespace IsingPerceptron | |
| def enrichedMonomialResidual {N : β} {A : Type*} [MeasurableSpace A] | |
| (P : Measure A) (r : ββ₯0) (n : β) (b h : β β β) | |
| (u : Fin N β β) (Ξ½ : Measure (Spin N)) (Ο : A β Spin N β β) | |
| (p d : β) {m : β} (D : (Fin (m+1) β Spin N Γ LabeledLeaf n) β β) : β := | |
| let ΞΊ := fun x y : Spin N Γ LabeledLeaf n => spinOverlap x.1 y.1 ^ p * treeOverlap n x.2 y.2 ^ d | |
| (m+1 : β)*enrichedReplicaAverage P r n b h u Ξ½ Ο | |
| (fun Ο : Fin (m+1+1) β Spin N Γ LabeledLeaf n => D (Fin.tail Ο)*ΞΊ ((Fin.tail Ο) 0) (Ο 0)) - | |
| enrichedReplicaAverage P r n b h u Ξ½ Ο D * enrichedReplicaAverage P r n b h u Ξ½ Ο | |
| (fun Ο : Fin 2 β Spin N Γ LabeledLeaf n => ΞΊ (Ο 1) (Ο 0)) - | |
| enrichedReplicaAverage P r n b h u Ξ½ Ο | |
| (fun Ο => D Ο*(β l : Fin m, ΞΊ (Ο 0) (Ο l.succ))) | |
| lemma enrichedMonomialResidual_bound {N : β} (hN : 0 < N) (n : β) (b : β β β) | |
| (hb : CascadeExponents n b) {h : β β β} (hh : Monotone h) (h0 : 0 β€ h 0) | |
| {H : β} (hH : h n β€ H) (u : Fin N β β) (hu : β j, u j β Icc (1:β) 2) (j : Fin N) | |
| (Ξ½ : Measure (Spin N)) [IsProbabilityMeasure Ξ½] | |
| {A : Type*} [MeasurableSpace A] (P : Measure A) [IsProbabilityMeasure P] | |
| {Ο : A β Spin N β β} (hm : Measurable Ο) {K : β} (hK : 0 β€ K) | |
| (hΟ : β y x, |Ο y x| β€ K) (r : ββ₯0) {Ξ± : β} (hr : (r:β) β€ Ξ±*N) | |
| (hmin : β v β Icc (1:β) 2, enrichedCoordinateObjective P r n b h u j Ξ½ Ο (u j) β€ | |
| enrichedCoordinateObjective P r n b h u j Ξ½ Ο v) | |
| (he : perturbationScale N β€ 1/8) (hs : contactStep N β€ 1/4) | |
| {m : β} (D : (Fin (m+1) β Spin N Γ LabeledLeaf n) β β) | |
| {B : β} (hB : 0 β€ B) (hD : β Ο, |D Ο| β€ B) : | |
| |enrichedMonomialResidual P r n b h u Ξ½ Ο (monomialIndex j).1 (monomialIndex j).2 D| β€ | |
| contactGGRate N j | |
| (4*(β« T, (Real.log (rawTreeTotal n T).toReal)^2 β(rawCascadeLaw n b : Measure (RawTree n)))+ | |
| H+4+5*K^2*Ξ±) B := by | |
| have hua : β i, |u i| β€ 2 := fun i => abs_le.mpr β¨by linarith [(hu i).1],(hu i).2β© | |
| have hint := enriched_coordinate_minimum_interior hN n b hb hh h0 u hua j Ξ½ P hm hK hΟ r hmin he hs | |
| have hn : (0:β) < N := by exact_mod_cast hN | |
| have hstep : 0 < contactStep N := Real.rpow_pos_of_pos hn _ | |
| have hepos : 0 < perturbationScale N := Real.rpow_pos_of_pos hn _ | |
| have ha := perturbationAmplitude_pos hN j | |
| have hg := enriched_gg_at_coordinate_minimum hN n b hb hh h0 hH u hua j Ξ½ P hm hK hΟ r hr | |
| hstep (one_div_pos.mpr hepos) hint.1 hint.2 hmin D hB hD | |
| change |perturbationAmplitude N j*u j| * | |
| |enrichedMonomialResidual P r n b h u Ξ½ Ο (monomialIndex j).1 (monomialIndex j).2 D| β€ _ at hg | |
| have hau : perturbationAmplitude N j β€ |perturbationAmplitude N j*u j| := by | |
| rw [abs_of_pos (mul_pos ha (lt_of_lt_of_le zero_lt_one (hu j).1))] | |
| nlinarith [(hu j).1] | |
| apply (le_div_iffβ ha).2 | |
| calc | |
| _ = perturbationAmplitude N j* | |
| |enrichedMonomialResidual P r n b h u Ξ½ Ο (monomialIndex j).1 (monomialIndex j).2 D| := by ring | |
| _ β€ |perturbationAmplitude N j*u j| * | |
| |enrichedMonomialResidual P r n b h u Ξ½ Ο (monomialIndex j).1 (monomialIndex j).2 D| := | |
| mul_le_mul_of_nonneg_right hau (abs_nonneg _) | |
| _ β€ _ := hg | |
| def enrichedPerturbationObjective {N : β} {A : Type*} [MeasurableSpace A] | |
| (P : Measure A) (r : ββ₯0) (n : β) (b h : β β β) | |
| (Ξ½ : Measure (Spin N)) (Ο : A β Spin N β β) (u : Fin N β β) : β := | |
| -enrichedMeanPressure P r n b h u Ξ½ Ο + | |
| β j : Fin N, perturbationWeight j*(u j-3/2)^2 | |
| lemma enriched_minimum_coordinate {N : β} {A : Type*} [MeasurableSpace A] | |
| (P : Measure A) (r : ββ₯0) (n : β) (b h : β β β) | |
| (Ξ½ : Measure (Spin N)) (Ο : A β Spin N β β) (u : Fin N β β) | |
| (hu : β j, u j β Icc (1:β) 2) | |
| (hmin : β v : Fin N β β, (β j, v j β Icc (1:β) 2) β | |
| enrichedPerturbationObjective P r n b h Ξ½ Ο u β€ enrichedPerturbationObjective P r n b h Ξ½ Ο v) | |
| (j : Fin N) (v : β) (hv : v β Icc (1:β) 2) : | |
| enrichedCoordinateObjective P r n b h u j Ξ½ Ο (u j) β€ | |
| enrichedCoordinateObjective P r n b h u j Ξ½ Ο v := by | |
| classical | |
| have huv : β i, Function.update u j v i β Icc (1:β) 2 := by | |
| intro i | |
| by_cases hi : i = j | |
| Β· subst i; simpa only [Function.update_self] using hv | |
| Β· simpa only [Function.update_of_ne hi] using hu i | |
| have hc := hmin (Function.update u j v) huv | |
| unfold enrichedPerturbationObjective at hc | |
| rw [β Finset.add_sum_erase _ _ (Finset.mem_univ j), | |
| β Finset.add_sum_erase _ _ (Finset.mem_univ j)] at hc | |
| have he : (β i β Finset.univ.erase j, perturbationWeight i*(Function.update u j v i-3/2)^2) = | |
| β i β Finset.univ.erase j, perturbationWeight i*(u i-3/2)^2 := by | |
| apply Finset.sum_congr rfl | |
| intro i hi | |
| rw [Function.update_of_ne (Finset.mem_erase.mp hi).1] | |
| rw [he,Function.update_self] at hc | |
| unfold enrichedCoordinateObjective | |
| rw [Function.update_eq_self] | |
| linarith | |
| end IsingPerceptron | |
| open MeasureTheory ProbabilityTheory Filter Set | |
| open scoped BigOperators Topology ENNReal NNReal BoundedContinuousFunction | |
| namespace IsingPerceptron | |
| def newReplicaEmbedding (k : β) (e : Equiv.Perm (Fin k)) : Fin (k+1) β β := | |
| Fin.cases k (fun j => (e j).val) | |
| lemma newReplicaEmbedding_injective (k : β) (e : Equiv.Perm (Fin k)) : | |
| Function.Injective (newReplicaEmbedding k e) := by | |
| intro a | |
| refine Fin.cases ?_ (fun a => ?_) a | |
| Β· intro b | |
| refine Fin.cases ?_ (fun b => ?_) b | |
| Β· exact fun _ => rfl | |
| Β· intro hab | |
| have hlt := (e b).isLt | |
| simp only [newReplicaEmbedding,Fin.cases_zero,Fin.cases_succ] at hab | |
| omega | |
| Β· intro b | |
| refine Fin.cases ?_ (fun b => ?_) b | |
| Β· intro hab | |
| have hlt := (e a).isLt | |
| simp only [newReplicaEmbedding,Fin.cases_zero,Fin.cases_succ] at hab | |
| omega | |
| Β· intro hab | |
| apply congrArg Fin.succ | |
| apply e.injective | |
| apply Fin.val_injective | |
| exact hab | |
| lemma sum_nonzero_permutation {m : β} (e : Equiv.Perm (Fin (m+1))) (f : Fin (m+1) β β) : | |
| (β l : Fin m, f (e l.succ)) = β j β Finset.univ.erase (e 0), f j := by | |
| classical | |
| have he := Equiv.sum_comp e f | |
| rw [Fin.sum_univ_succ,β Finset.add_sum_erase _ _ (Finset.mem_univ (e 0))] at he | |
| exact add_left_cancel he | |
| lemma jointEntry_monomial_le (x : JointEntry) (p d : β) : |x.1.1^p*x.2.1^d| β€ 1 := by | |
| rw [abs_mul,abs_pow,abs_pow] | |
| have h1 : |x.1.1| β€ 1 := abs_le.mpr x.1.2 | |
| have h2 : |x.2.1| β€ 1 := abs_le.mpr β¨by linarith [x.2.2.1],x.2.2.2β© | |
| exact (mul_le_mul (pow_le_oneβ (abs_nonneg _) h1) | |
| (pow_le_oneβ (abs_nonneg _) h2) (pow_nonneg (abs_nonneg _) _) zero_le_one).trans_eq | |
| (one_mul 1) | |
| def monomialPair (n p d : β) {N : β} (x y : Spin N Γ LabeledLeaf n) : β := | |
| spinOverlap x.1 y.1^p*treeOverlap n x.2 y.2^d | |
| lemma abs_monomialPair_le_one (n p d : β) {N : β} (x y : Spin N Γ LabeledLeaf n) : | |
| |monomialPair n p d x y| β€ 1 := jointEntry_monomial_le (enrichedJointEntry n x y) p d | |
| def finiteJointBlock {N m : β} (n : β) (Ο : Fin m β Spin N Γ LabeledLeaf n) : JointBlock m := | |
| fun i j => enrichedJointEntry n (Ο i) (Ο j) | |
| def permutedBlockTest {N m : β} (n : β) (e : Equiv.Perm (Fin m)) | |
| (D : JointBlock m β β) (Ο : Fin m β Spin N Γ LabeledLeaf n) : β := | |
| D (finiteJointBlock n (Ο β e.symm)) | |
| lemma enrichedArrayLawTest_integral {N : β} (hN : 0 < N) (n : β) (b : β β β) | |
| {h : β β β} (hh : Monotone h) (h0 : 0 β€ h 0) | |
| (u : Fin N β β) (hu : β j, |u j| β€ 2) | |
| (Ξ½ : Measure (Spin N)) [IsProbabilityMeasure Ξ½] | |
| {A : Type*} [MeasurableSpace A] (P : Measure A) [IsProbabilityMeasure P] | |
| {Ο : A β Spin N β β} (hm : Measurable Ο) {K : β} (hK : 0 β€ K) | |
| (hΟ : β y x, |Ο y x| β€ K) (r : ββ₯0) | |
| (F : JointArray β β) (hF : Measurable F) | |
| {m : β} (D : (Fin m β Spin N Γ LabeledLeaf n) β β) {C : β} (hD : β Ο, |D Ο| β€ C) | |
| (ΞΉ : Fin m β β) (hi : Function.Injective ΞΉ) | |
| (he : β Ο, F (sampledOverlapArray (enrichedJointEntry n) Ο) = D (fun i => Ο (ΞΉ i))) : | |
| (β« x, F x β(enrichedArrayLaw P r n b h u Ξ½ hm : Measure JointArray)) = | |
| enrichedReplicaAverage P r n b h u Ξ½ Ο D := by | |
| rw [enrichedArrayLaw_integral _ _ _ _ _ _ _ _ _ hF] | |
| simp_rw [he] | |
| exact enrichedReplicaLaw_integral hN n b hh h0 u hu Ξ½ P hm hK hΟ r D hD ΞΉ hi | |
| lemma permutedBlockTest_embedding {N m : β} (n : β) (e : Equiv.Perm (Fin m)) | |
| (D : JointBlock m β β) (Ο : β β Spin N Γ LabeledLeaf n) : | |
| permutedBlockTest n e D (fun j => Ο (e j)) = | |
| D (jointBlockView m (sampledOverlapArray (enrichedJointEntry n) Ο)) := by | |
| unfold permutedBlockTest | |
| apply congrArg D | |
| funext i j | |
| simp [finiteJointBlock,jointBlockView,sampledOverlapArray] | |
| lemma enrichedArrayLaw_residual {N : β} (hN : 0 < N) (n : β) (b : β β β) | |
| {h : β β β} (hh : Monotone h) (h0 : 0 β€ h 0) | |
| (u : Fin N β β) (hu : β j, |u j| β€ 2) | |
| (Ξ½ : Measure (Spin N)) [IsProbabilityMeasure Ξ½] | |
| {A : Type*} [MeasurableSpace A] (P : Measure A) [IsProbabilityMeasure P] | |
| {Ο : A β Spin N β β} (hm : Measurable Ο) {K : β} (hK : 0 β€ K) | |
| (hΟ : β y x, |Ο y x| β€ K) (r : ββ₯0) | |
| {m : β} (e : Equiv.Perm (Fin (m+1))) (D : JointBlock (m+1) β β) | |
| (hDc : Continuous D) {B : β} (hB : 0 β€ B) (hD : β x, |D x| β€ B) (p d : β) : | |
| jointMonomialResidual (enrichedArrayLaw P r n b h u Ξ½ hm) (m+1) (e 0) D p d = | |
| enrichedMonomialResidual P r n b h u Ξ½ Ο p d (permutedBlockTest n e D) := by | |
| classical | |
| let ΞΌ : Measure JointArray := enrichedArrayLaw P r n b h u Ξ½ hm | |
| let D' := permutedBlockTest (N := N) n e D | |
| have hD' : β Ο, |D' Ο| β€ B := fun Ο => hD _ | |
| have hcD : Continuous (fun x => D (jointBlockView (m+1) x)) := | |
| hDc.comp (continuous_jointBlockView _) | |
| have hmono (x y : Spin N Γ LabeledLeaf n) := abs_monomialPair_le_one n p d x y | |
| have hnew : (β« x, D (jointBlockView (m+1) x)*(x (e 0,m+1)).1.1^p*(x (e 0,m+1)).2.1^d βΞΌ) = | |
| enrichedReplicaAverage P r n b h u Ξ½ Ο | |
| (fun Ο : Fin (m+1+1) β Spin N Γ LabeledLeaf n => | |
| D' (Fin.tail Ο)*monomialPair n p d ((Fin.tail Ο) 0) (Ο 0)) := by | |
| refine enrichedArrayLawTest_integral hN n b hh h0 u hu Ξ½ P hm hK hΟ r _ | |
| (hcD.mul (by fun_prop) |>.mul (by fun_prop) |>.measurable) _ (C := B) | |
| (fun Ο => ?_) (newReplicaEmbedding (m+1) e) (newReplicaEmbedding_injective _ e) ?_ | |
| Β· rw [abs_mul] | |
| exact (mul_le_mul (hD' _) (hmono _ _) (abs_nonneg _) hB).trans_eq (mul_one B) | |
| Β· intro Ο | |
| change D (jointBlockView (m+1) (sampledOverlapArray (enrichedJointEntry n) Ο)) * | |
| (enrichedJointEntry n (Ο (e 0)) (Ο (m+1))).1.1^p * | |
| (enrichedJointEntry n (Ο (e 0)) (Ο (m+1))).2.1^d = | |
| D' (fun i => Ο ((e i).val)) * monomialPair n p d (Ο (e 0)) (Ο (m+1)) | |
| rw [show D' (fun i => Ο ((e i).val)) = | |
| D (jointBlockView (m+1) (sampledOverlapArray (enrichedJointEntry n) Ο)) from | |
| permutedBlockTest_embedding n e D Ο] | |
| simp only [enrichedJointEntry,monomialPair,mul_assoc] | |
| have hblock : (β« x, D (jointBlockView (m+1) x) βΞΌ) = | |
| enrichedReplicaAverage P r n b h u Ξ½ Ο D' := by | |
| apply enrichedArrayLawTest_integral hN n b hh h0 u hu Ξ½ P hm hK hΟ r _ hcD.measurable | |
| D' hD' (fun j => (e j).val) (Fin.val_injective.comp e.injective) | |
| intro Ο | |
| exact (permutedBlockTest_embedding n e D Ο).symm | |
| have hpair : (β« x, (x (0,1)).1.1^p*(x (0,1)).2.1^d βΞΌ) = | |
| enrichedReplicaAverage P r n b h u Ξ½ Ο | |
| (fun Ο : Fin 2 β Spin N Γ LabeledLeaf n => monomialPair n p d (Ο 1) (Ο 0)) := by | |
| refine enrichedArrayLawTest_integral hN n b hh h0 u hu Ξ½ P hm hK hΟ r _ (by fun_prop) | |
| _ (C := 1) (fun Ο => hmono _ _) ![1,0] ?_ ?_ | |
| Β· intro a b hab | |
| fin_cases a <;> fin_cases b <;> simp_all | |
| Β· intro Ο | |
| rfl | |
| have hsumBound (Ο : Fin (m+1) β Spin N Γ LabeledLeaf n) : | |
| |D' Ο*(β l : Fin m, monomialPair n p d (Ο 0) (Ο l.succ))| β€ B*m := by | |
| rw [abs_mul] | |
| apply mul_le_mul (hD' _) _ (abs_nonneg _) hB | |
| calc | |
| _ β€ β l : Fin m, |monomialPair n p d (Ο 0) (Ο l.succ)| := Finset.abs_sum_le_sum_abs _ _ | |
| _ β€ β _ : Fin m, (1:β) := Finset.sum_le_sum (fun l _ => hmono _ _) | |
| _ = _ := by simp | |
| have hsum : (β j β Finset.univ.erase (e 0), | |
| β« x, D (jointBlockView (m+1) x)*(x (e 0,j)).1.1^p*(x (e 0,j)).2.1^d βΞΌ) = | |
| enrichedReplicaAverage P r n b h u Ξ½ Ο | |
| (fun Ο => D' Ο*(β l : Fin m, monomialPair n p d (Ο 0) (Ο l.succ))) := by | |
| have hI (j : Fin (m+1)) : Integrable | |
| (fun x : JointArray => D (jointBlockView (m+1) x)*(x (e 0,j)).1.1^p*(x (e 0,j)).2.1^d) ΞΌ := | |
| compact_integrable (hcD.mul (by fun_prop) |>.mul (by fun_prop)) | |
| rw [β integral_finsetSum _ (fun j _ => hI j)] | |
| apply enrichedArrayLawTest_integral hN n b hh h0 u hu Ξ½ P hm hK hΟ r _ | |
| (by apply Finset.measurable_sum; intro j hj; exact (hcD.mul (by fun_prop) |>.mul (by fun_prop)).measurable) | |
| _ hsumBound (fun j => (e j).val) (Fin.val_injective.comp e.injective) | |
| intro Ο | |
| rw [show D' (fun j => Ο ((e j).val)) = | |
| D (jointBlockView (m+1) (sampledOverlapArray (enrichedJointEntry n) Ο)) from | |
| permutedBlockTest_embedding n e D Ο] | |
| rw [sum_nonzero_permutation e (fun j => monomialPair n p d (Ο (e 0)) (Ο j)),Finset.mul_sum] | |
| apply Finset.sum_congr rfl | |
| intro j hj | |
| simp only [sampledOverlapArray,enrichedJointEntry,monomialPair,mul_assoc] | |
| unfold jointMonomialResidual | |
| rw [hnew,hblock,hpair,hsum] | |
| rfl | |
| end IsingPerceptron | |
| open MeasureTheory ProbabilityTheory Filter Set | |
| open scoped BigOperators Topology ENNReal NNReal BoundedContinuousFunction | |
| namespace IsingPerceptron | |
| lemma jointMonomialResidual_zero (ΞΌ : Measure JointArray) [IsProbabilityMeasure ΞΌ] | |
| (m : β) (i : Fin (m+1)) (D : JointBlock (m+1) β β) : | |
| jointMonomialResidual ΞΌ (m+1) i D 0 0 = 0 := by | |
| classical | |
| simp only [jointMonomialResidual,pow_zero,mul_one,integral_const,probReal_univ, | |
| smul_eq_mul,Finset.sum_const,Finset.card_erase_of_mem (Finset.mem_univ i), | |
| Finset.card_univ,Fintype.card_fin,Nat.add_sub_cancel,nsmul_eq_mul,Nat.cast_add,Nat.cast_one] | |
| ring | |
| lemma enrichedArrayLaw_residual_bound {N : β} (hN : 0 < N) (n : β) (b : β β β) | |
| (hb : CascadeExponents n b) {h : β β β} (hh : Monotone h) (h0 : 0 β€ h 0) | |
| {H : β} (hH : h n β€ H) (u : Fin N β β) (hu : β j, u j β Icc (1:β) 2) (j : Fin N) | |
| (Ξ½ : Measure (Spin N)) [IsProbabilityMeasure Ξ½] | |
| {A : Type*} [MeasurableSpace A] (P : Measure A) [IsProbabilityMeasure P] | |
| {Ο : A β Spin N β β} (hm : Measurable Ο) {K : β} (hK : 0 β€ K) | |
| (hΟ : β y x, |Ο y x| β€ K) (r : ββ₯0) {Ξ± : β} (hr : (r:β) β€ Ξ±*N) | |
| (hmin : β v : Fin N β β, (β j, v j β Icc (1:β) 2) β | |
| enrichedPerturbationObjective P r n b h Ξ½ Ο u β€ enrichedPerturbationObjective P r n b h Ξ½ Ο v) | |
| (he : perturbationScale N β€ 1/8) (hs : contactStep N β€ 1/4) | |
| {m : β} (i : Fin (m+1)) (D : JointBlock (m+1) β β) (hDc : Continuous D) | |
| {B : β} (hB : 0 β€ B) (hD : β x, |D x| β€ B) : | |
| |jointMonomialResidual (enrichedArrayLaw P r n b h u Ξ½ hm) (m+1) i D | |
| (monomialIndex j).1 (monomialIndex j).2| β€ | |
| contactGGRate N j | |
| (4*(β« T, (Real.log (rawTreeTotal n T).toReal)^2 β(rawCascadeLaw n b : Measure (RawTree n)))+ | |
| H+4+5*K^2*Ξ±) B := by | |
| classical | |
| have hua : β l, |u l| β€ 2 := fun l => abs_le.mpr β¨by linarith [(hu l).1],(hu l).2β© | |
| have hg := enrichedMonomialResidual_bound hN n b hb hh h0 hH u hu j Ξ½ P hm hK hΟ r hr | |
| (enriched_minimum_coordinate P r n b h Ξ½ Ο u hu hmin j) he hs | |
| (permutedBlockTest n (Equiv.swap 0 i) D) hB (fun Ο => hD _) | |
| have ht := enrichedArrayLaw_residual hN n b hh h0 u hua Ξ½ P hm hK hΟ r | |
| (Equiv.swap 0 i) D hDc hB hD (monomialIndex j).1 (monomialIndex j).2 | |
| rw [Equiv.swap_apply_left] at ht | |
| rw [ht] | |
| exact hg | |
| theorem enriched_minimizers_jointGG | |
| (N : β β β) (hN : β k, 0 < N k) (hNlim : Tendsto N atTop atTop) | |
| (n : β) (b : β β β) (hb : CascadeExponents n b) | |
| (h : β β β β β) (hh : β k, Monotone (h k)) (h0 : β k, 0 β€ h k 0) | |
| (H : β) (hH : β k, h k n β€ H) | |
| (u : (k : β) β Fin (N k) β β) (hu : β k j, u k j β Icc (1:β) 2) | |
| (Ξ½ : (k : β) β Measure (Spin (N k))) [β k, IsProbabilityMeasure (Ξ½ k)] | |
| (A : β β Type*) [β k, MeasurableSpace (A k)] | |
| (P : (k : β) β Measure (A k)) [β k, IsProbabilityMeasure (P k)] | |
| (Ο : (k : β) β A k β Spin (N k) β β) (hm : β k, Measurable (Ο k)) | |
| (K : β) (hK : 0 β€ K) (hΟ : β k y x, |Ο k y x| β€ K) | |
| (r : β β ββ₯0) (Ξ± : β) (hr : β k, (r k:β) β€ Ξ±*N k) | |
| (hmin : β k (v : Fin (N k) β β), (β j, v j β Icc (1:β) 2) β | |
| enrichedPerturbationObjective (P k) (r k) n b (h k) (Ξ½ k) (Ο k) (u k) β€ | |
| enrichedPerturbationObjective (P k) (r k) n b (h k) (Ξ½ k) (Ο k) v) | |
| (ΞΌ : ProbabilityMeasure JointArray) | |
| (hL : Tendsto (fun k => enrichedArrayLaw (P k) (r k) n b (h k) (u k) (Ξ½ k) (hm k)) atTop (π ΞΌ)) : | |
| HasEntryGhirlandaGuerra (fun x i j => x (i,j)) (ΞΌ : Measure JointArray) := by | |
| apply jointGG_of_weak_monomial_residuals hL | |
| intro m hm2 i D hDc p d | |
| cases m with | |
| | zero => omega | |
| | succ m => | |
| by_cases hpd : p+d = 0 | |
| Β· have hp : p = 0 := by omega | |
| have hd : d = 0 := by omega | |
| subst p d | |
| simpa only [jointMonomialResidual_zero] using | |
| (tendsto_const_nhds : Tendsto (fun _ : β => (0:β)) atTop (π 0)) | |
| Β· obtain β¨j,hjβ© := monomialIndex_surjective p d (by omega) | |
| let BD := BoundedContinuousFunction.mkOfCompact β¨D,hDcβ© | |
| have hD : β x, |D x| β€ βBDβ := fun x => by | |
| simpa only [BD,BoundedContinuousFunction.mkOfCompact_apply,ContinuousMap.coe_mk,Real.norm_eq_abs] using BD.norm_coe_le_norm x | |
| let L := 4*(β« T, (Real.log (rawTreeTotal n T).toReal)^2 | |
| β(rawCascadeLaw n b : Measure (RawTree n)))+H+4+5*K^2*Ξ± | |
| have he : βαΆ k in atTop, perturbationScale (N k) β€ 1/8 := | |
| (perturbationScale_tendsto.comp hNlim).eventually (eventually_le_nhds (by norm_num)) | |
| have hs : βαΆ k in atTop, contactStep (N k) β€ 1/4 := | |
| (contactStep_tendsto.comp hNlim).eventually (eventually_le_nhds (by norm_num)) | |
| have hjN : βαΆ k in atTop, j < N k := hNlim.eventually (eventually_gt_atTop j) | |
| apply squeeze_zero_norm' _ ((contactGGRate_tendsto j L βBDβ).comp hNlim) | |
| filter_upwards [he,hs,hjN] with k he hs hjN | |
| let j' : Fin (N k) := β¨j,hjNβ© | |
| have ht := enrichedArrayLaw_residual_bound (hN k) n b hb (hh k) (h0 k) (hH k) | |
| (u k) (hu k) j' (Ξ½ k) (P k) (hm k) hK (hΟ k) (r k) (hr k) (hmin k) | |
| he hs i D hDc (norm_nonneg BD) hD | |
| simpa only [j',hj,Prod.fst,Prod.snd,Real.norm_eq_abs,Function.comp_def,L] using ht | |
| end IsingPerceptron | |
| end | |
| end OAI | |