math / data /lean /OAI /Probability /GaussianReplacement /HybridModel.lean
introvoyz045's picture
Migrated from GitHub
4a56cd6 verified
Raw History Blame Contribute Delete
4.1 kB
import OAI.Probability.GaussianReplacement.Comparison
namespace OAI
open MeasureTheory ProbabilityTheory Set Filter
open scoped ENNReal NNReal RealInnerProductSpace Topology
noncomputable section
namespace CurrentProjection
open InnerProductSpace
open InformationTheory
def blockInput {d m : β„•} {U : Type*} (z : (Sphere d Γ— U) Γ— Rows m d) :
U Γ— (Rows m d Γ— (Fin m β†’ ℝ)) :=
(z.1.2, z.2, label z.2 (z.1.1 : Vector d))
lemma measurable_blockInput {d m : β„•} {U : Type*} [MeasurableSpace U] :
Measurable (blockInput (d:=d) (m:=m) (U:=U)) := by
exact measurable_fst.snd.prodMk (measurable_snd.prodMk
((measurable_own_label (d:=d) (k:=m)).comp
(measurable_snd.prodMk measurable_fst.fst)))
def blockLaw {d m : β„•} {U V : Type*} [MeasurableSpace U] [MeasurableSpace V]
(P : Measure (Sphere d Γ— U))
(ΞΊ : Kernel (U Γ— (Rows m d Γ— (Fin m β†’ ℝ))) V) :
Measure (((Sphere d Γ— U) Γ— Rows m d) Γ— V) :=
(P.prod (gaussianRows m d)) βŠ—β‚˜ ΞΊ.comap blockInput measurable_blockInput
instance blockLaw_probability {d m : β„•} {U V : Type*}
[MeasurableSpace U] [MeasurableSpace V]
(P : Measure (Sphere d Γ— U)) [IsProbabilityMeasure P]
(ΞΊ : Kernel (U Γ— (Rows m d Γ— (Fin m β†’ ℝ))) V) [IsMarkovKernel ΞΊ] :
IsProbabilityMeasure (blockLaw P ΞΊ) := by
unfold blockLaw
infer_instance
def endingSignalLaw {d m : β„•} {U V : Type*}
[MeasurableSpace U] [MeasurableSpace V]
(P : Measure (Sphere d Γ— U))
(ΞΊ : Kernel (U Γ— (Rows m d Γ— (Fin m β†’ ℝ))) V) : Measure (Sphere d Γ— V) :=
(blockLaw P ΞΊ).map (fun z => (z.1.1.1, z.2))
instance endingSignalLaw_probability {d m : β„•} {U V : Type*}
[MeasurableSpace U] [MeasurableSpace V]
(P : Measure (Sphere d Γ— U)) [IsProbabilityMeasure P]
(ΞΊ : Kernel (U Γ— (Rows m d Γ— (Fin m β†’ ℝ))) V) [IsMarkovKernel ΞΊ] :
IsProbabilityMeasure (endingSignalLaw P ΞΊ) := by
unfold endingSignalLaw
infer_instance
def freshInformation {d : β„•} {U : Type*} [MeasurableSpace U] [StandardBorelSpace U]
(P : Measure (Sphere d Γ— U)) [IsFiniteMeasure P] (k : β„•) : ℝβ‰₯0∞ :=
exposedInformation (P.prod (gaussianRows k d))
def hybridFirst (d : β„•) : β„• := (d+3)/4
def hybridLast (d : β„•) : β„• := d/2
def hybridCount (d : β„•) : β„• := hybridLast d - hybridFirst d + 1
def averagedFreshInformation {d : β„•} {U : Type*}
[MeasurableSpace U] [StandardBorelSpace U]
(P : Measure (Sphere d Γ— U)) [IsFiniteMeasure P] : ℝ :=
(βˆ‘ k ∈ Finset.Icc (hybridFirst d) (hybridLast d), (freshInformation P k).toReal) /
hybridCount d
def HybridBlockMain : Prop :=
βˆƒ (C C' : ℝ) (dβ‚€ : β„•), 0 < C ∧ 0 < C' ∧ βˆ€ d, dβ‚€ ≀ d β†’
βˆ€ m, 1 ≀ m β†’ m ≀ d/8 β†’
βˆ€ (U V : Type) [Fintype U] [Fintype V]
[MeasurableSpace U] [MeasurableSpace V]
[MeasurableSingletonClass U] [MeasurableSingletonClass V],
βˆ€ (P : Measure (Sphere d Γ— U)) [IsProbabilityMeasure P],
P.fst = uniformSphere d β†’
βˆ€ (ΞΊ : Kernel (U Γ— (Rows m d Γ— (Fin m β†’ ℝ))) V) [IsMarkovKernel ΞΊ],
βˆ€ (B : ℝ), 0 ≀ B β†’
shannonEntropy (endingSignalLaw P ΞΊ).snd ≀ ENNReal.ofReal B β†’
averagedFreshInformation (endingSignalLaw P ΞΊ) - averagedFreshInformation P ≀
C*m + (m:ℝ) / hybridCount d * (C + B / (d/8:β„•)) + B / (d/32:β„•) ∧
(B ≀ (d:ℝ)^2 β†’
averagedFreshInformation (endingSignalLaw P ΞΊ) - averagedFreshInformation P ≀ C'*d)
def FiberBlockMain : Prop :=
βˆƒ (K : ℝ) (dβ‚€ : β„•), 0 < K ∧ βˆ€ d, dβ‚€ ≀ d β†’
βˆ€ (U V : Type) [Fintype U] [Fintype V]
[MeasurableSpace U] [MeasurableSpace V]
[MeasurableSingletonClass U] [MeasurableSingletonClass V],
βˆ€ (P : Measure (Sphere dΓ—U)) [IsProbabilityMeasure P],
P.fst = uniformSphere d β†’
βˆ€ (ΞΊ : Kernel (UΓ—(Rows (d/10) dΓ—(Fin (d/10)→ℝ))) V) [IsMarkovKernel ΞΊ],
βˆ€ N : β„•, 1 ≀ N β†’ Fintype.card V ≀ N β†’ Real.log N ≀ (d:ℝ)^2 β†’
freshInformation (endingSignalLaw P ΞΊ) (d/3) ≀ freshInformation P (d/3) + ENNReal.ofReal (K*d)
end CurrentProjection
end
end OAI