test module
Tests.ProximalBPSCenteredRootOrderInverse
1 named declarations scanned from Tests/ProximalBPSCenteredRootOrderInverse.lean.
Declarations
theorem Tests.ProximalBPSCenteredRootOrderInverse.genuine_actual_centered_inverse_consumer Partial Not mapped
No declaration docstring.
theorem genuine_actual_centered_inverse_consumer
{E : Type*} [NormedAddCommGroup E] [InnerProductSpace ℝ E]
[FiniteDimensional ℝ E] [MeasurableSpace E] [BorelSpace E]
{V : E → ℝ} {α β : ℝ≥0} {η : ℝ}
(hα : 0 < (α : ℝ)) (hαβ : α ≤ β) (hV : ContDiff ℝ 2 V)
(hH : ∀ x v : E,
(α : ℝ)*‖v‖^2 ≤ (fderiv ℝ (fderiv ℝ V) x v) v ∧
(fderiv ℝ (fderiv ℝ V) x v) v ≤ (β : ℝ)*‖v‖^2)
(hη : 0 < η) (hβη : (β : ℝ)*η ≤ 1) :
let μ := (volume : Measure E).tilted (fun x => -V x)
let J := (μ.prod (stdGaussian E)).map
(fun p : E × E => (p.1,p.1+Real.sqrt η • p.2))
let ν := J.snd
let Λ := J.map (fun p : E × E => (p.2,(2 : ℝ) • p.1-p.2))
let F := fun p : E × E => (p.1,(2 : ℝ) • p.1-p.2)
let mY := MeasurableSpace.comap Prod.snd (inferInstance : MeasurableSpace E)
letI : MeasurableSpace (E × E) := Prod.instMeasurableSpace
letI : Fact (mY ≤ (inferInstance : MeasurableSpace (E × E))) :=
⟨measurable_snd.comap_le⟩
let HP := lpMeas ℝ ℝ mY 2 J
let P : Lp ℝ 2 J →L[ℝ] Lp ℝ 2 J :=
HP.subtypeL ∘L condExpL2 ℝ ℝ (μ := J) measurable_snd.comap_le
let hp : MeasurePreserving (Prod.snd : E × E → E) J ν := ⟨measurable_snd,rfl⟩
let M : Lp ℝ 2 ν →ₗᵢ[ℝ] Lp ℝ 2 J := Lp.compMeasurePreservingₗᵢ ℝ Prod.snd hp
IsProbabilityMeasure μ ∧ IsProbabilityMeasure J ∧ IsProbabilityMeasure ν ∧
HP = P.toLinearMap.range ∧
(∀ f : HP, P (f : Lp ℝ 2 J) = f) ∧
∃ S : Kernel E E, IsMarkovKernel S ∧
(∀ y, S y = (volume : Measure E).tilted
(fun x => -V ((1/2 : ℝ) • (y+x)) - ‖y-x‖^2/(8*η))) ∧
Λ.IsCondKernel S ∧ Λ.fst = ν ∧ Λ.snd = ν ∧
∃ e : Lp ℝ 2 ν ≃ₗᵢ[ℝ] HP,
(∀ u : Lp ℝ 2 ν, (e u : Lp ℝ 2 J) = M u) ∧
∃ U : Lp ℝ 2 J →ₗᵢ[ℝ] Lp ℝ 2 J,
(∀ g : Lp ℝ 2 J, (U g : E × E → ℝ) =ᵐ[J] g ∘ F) ∧
Function.Involutive U ∧ IsSelfAdjoint U.toContinuousLinearMap ∧
∃ T : Lp ℝ 2 ν →L[ℝ] Lp ℝ 2 ν,
IsSelfAdjoint T ∧
(∀ u : Lp ℝ 2 ν,
‖T u‖ ≤ ‖u‖ ∧
(T u : E → ℝ) =ᵐ[ν] (fun y => ∫ x, u x ∂S y) ∧
(∫ y, T u y ∂ν) = ∫ y, u y ∂ν) ∧
let A : HP →L[ℝ] HP :=
HP.orthogonalProjectionOnto ∘L U.toContinuousLinearMap ∘L HP.subtypeL
-- Source excerpt truncated; follow the exact source link.
Tests/ProximalBPSCenteredRootOrderInverse.lean:12published source at ed709a7f320d
Excerpt truncated; the exact source link is authoritative.
Complete Lean source
Tests/ProximalBPSCenteredRootOrderInverse.lean — full module with imports and context
import AutoSamplingTheory.ExampleCases.ProximalBPS.CenteredRootOrderInverse
open MeasureTheory ProbabilityTheory InnerProductSpace
open scoped RealInnerProductSpace ContDiff NNReal Topology ENNReal
namespace Tests.ProximalBPSCenteredRootOrderInverse
noncomputable section
set_option autoImplicit false
set_option maxHeartbeats 2000000
-- Original-input consumer: normalized actual leakage preserves the norm and lies in ker P.
-- This tests the same bounded inverse without assuming a gap, root or polar isometry.
theorem genuine_actual_centered_inverse_consumer
{E : Type*} [NormedAddCommGroup E] [InnerProductSpace ℝ E]
[FiniteDimensional ℝ E] [MeasurableSpace E] [BorelSpace E]
{V : E → ℝ} {α β : ℝ≥0} {η : ℝ}
(hα : 0 < (α : ℝ)) (hαβ : α ≤ β) (hV : ContDiff ℝ 2 V)
(hH : ∀ x v : E,
(α : ℝ)*‖v‖^2 ≤ (fderiv ℝ (fderiv ℝ V) x v) v ∧
(fderiv ℝ (fderiv ℝ V) x v) v ≤ (β : ℝ)*‖v‖^2)
(hη : 0 < η) (hβη : (β : ℝ)*η ≤ 1) :
let μ := (volume : Measure E).tilted (fun x => -V x)
let J := (μ.prod (stdGaussian E)).map
(fun p : E × E => (p.1,p.1+Real.sqrt η • p.2))
let ν := J.snd
let Λ := J.map (fun p : E × E => (p.2,(2 : ℝ) • p.1-p.2))
let F := fun p : E × E => (p.1,(2 : ℝ) • p.1-p.2)
let mY := MeasurableSpace.comap Prod.snd (inferInstance : MeasurableSpace E)
letI : MeasurableSpace (E × E) := Prod.instMeasurableSpace
letI : Fact (mY ≤ (inferInstance : MeasurableSpace (E × E))) :=
⟨measurable_snd.comap_le⟩
let HP := lpMeas ℝ ℝ mY 2 J
let P : Lp ℝ 2 J →L[ℝ] Lp ℝ 2 J :=
HP.subtypeL ∘L condExpL2 ℝ ℝ (μ := J) measurable_snd.comap_le
let hp : MeasurePreserving (Prod.snd : E × E → E) J ν := ⟨measurable_snd,rfl⟩
let M : Lp ℝ 2 ν →ₗᵢ[ℝ] Lp ℝ 2 J := Lp.compMeasurePreservingₗᵢ ℝ Prod.snd hp
IsProbabilityMeasure μ ∧ IsProbabilityMeasure J ∧ IsProbabilityMeasure ν ∧
HP = P.toLinearMap.range ∧
(∀ f : HP, P (f : Lp ℝ 2 J) = f) ∧
∃ S : Kernel E E, IsMarkovKernel S ∧
(∀ y, S y = (volume : Measure E).tilted
(fun x => -V ((1/2 : ℝ) • (y+x)) - ‖y-x‖^2/(8*η))) ∧
Λ.IsCondKernel S ∧ Λ.fst = ν ∧ Λ.snd = ν ∧
∃ e : Lp ℝ 2 ν ≃ₗᵢ[ℝ] HP,
(∀ u : Lp ℝ 2 ν, (e u : Lp ℝ 2 J) = M u) ∧
∃ U : Lp ℝ 2 J →ₗᵢ[ℝ] Lp ℝ 2 J,
(∀ g : Lp ℝ 2 J, (U g : E × E → ℝ) =ᵐ[J] g ∘ F) ∧
Function.Involutive U ∧ IsSelfAdjoint U.toContinuousLinearMap ∧
∃ T : Lp ℝ 2 ν →L[ℝ] Lp ℝ 2 ν,
IsSelfAdjoint T ∧
(∀ u : Lp ℝ 2 ν,
‖T u‖ ≤ ‖u‖ ∧
(T u : E → ℝ) =ᵐ[ν] (fun y => ∫ x, u x ∂S y) ∧
(∫ y, T u y ∂ν) = ∫ y, u y ∂ν) ∧
let A : HP →L[ℝ] HP :=
HP.orthogonalProjectionOnto ∘L U.toContinuousLinearMap ∘L HP.subtypeL
let B : HP →L[ℝ] Lp ℝ 2 J :=
(((1 : Lp ℝ 2 J →L[ℝ] Lp ℝ 2 J)-P)*U.toContinuousLinearMap*P) ∘L HP.subtypeL
A = e.conjStarAlgEquiv T ∧ IsSelfAdjoint A ∧
(∀ f : HP, ‖A f‖ ≤ ‖f‖) ∧
(∀ f : HP, P (B f) = 0) ∧
∃ Γ : Lp ℝ 2 ν →L[ℝ] Lp ℝ 2 ν,
Γ.IsPositive ∧ Γ*Γ=(1 : Lp ℝ 2 ν →L[ℝ] Lp ℝ 2 ν)-T*T ∧
let ΓP : HP →L[ℝ] HP := e.conjStarAlgEquiv Γ
ΓP.IsPositive ∧ ΓP*ΓP=(1 : HP →L[ℝ] HP)-A*A ∧
B.adjoint ∘L B = ΓP*ΓP ∧
∃ q : Lp ℝ 2 ν,
(q : E → ℝ) =ᵐ[ν] (fun _ => (1 : ℝ)) ∧ T q = q ∧
(∀ u : Lp ℝ 2 ν, inner ℝ q u = ∫ y, u y ∂ν) ∧
let qP : HP := e q
let HP0 := (innerSL ℝ qP).ker
letI : NormedAddCommGroup HP0 := HP0.normedAddCommGroup
letI : InnerProductSpace ℝ HP0 := HP0.innerProductSpace
let γ : ℝ := 2*Real.sqrt ((α : ℝ)*η)/(1+(α : ℝ)*η)
(∀ f : HP, f ∈ HP0 ↔ (∫ y, (e.symm f) y ∂ν) = 0) ∧
ΓP qP = 0 ∧ 0 < γ ∧
∃ ΓP0 : HP0 →L[ℝ] HP0,
(∀ f : HP0, (ΓP0 f : HP) = ΓP (f : HP)) ∧
ΓP0.IsPositive ∧ (ΓP0-γ • (1 : HP0 →L[ℝ] HP0)).IsPositive ∧
IsUnit ΓP0 ∧
∃ Inv : HP0 →L[ℝ] HP0,
Inv*ΓP0=(1 : HP0 →L[ℝ] HP0) ∧
ΓP0*Inv=(1 : HP0 →L[ℝ] HP0) ∧ ‖Inv‖ ≤ 1/γ ∧
(∀ f : HP0,
‖B (HP0.subtypeL (Inv f))‖ = ‖f‖ ∧
P (B (HP0.subtypeL (Inv f))) = 0) := by
classical
dsimp only
let μ := (volume : Measure E).tilted (fun x => -V x)
let J := (μ.prod (stdGaussian E)).map
(fun p : E × E => (p.1,p.1+Real.sqrt η • p.2))
let ν := J.snd
let mY : MeasurableSpace (E × E) := MeasurableSpace.comap Prod.snd (inferInstance : MeasurableSpace E)
letI : MeasurableSpace (E × E) := Prod.instMeasurableSpace
letI : Fact (mY ≤ (inferInstance : MeasurableSpace (E × E))) := ⟨measurable_snd.comap_le⟩
let HP := lpMeas ℝ ℝ mY 2 J
letI : NormedAddCommGroup HP := HP.normedAddCommGroup
letI : InnerProductSpace ℝ HP := HP.innerProductSpace
let P : Lp ℝ 2 J →L[ℝ] Lp ℝ 2 J :=
HP.subtypeL ∘L condExpL2 ℝ ℝ (μ := J) measurable_snd.comap_le
have hBase := AutoSamplingTheory.ExampleCases.ProximalBPS.CenteredRootOrderInverse.actual_centered_root_order_inverse
(E:=E) (V:=V) (α:=α) (β:=β) (η:=η) hα hαβ hV hH hη hβη
dsimp only at hBase
rcases hBase with
⟨hμ,hJ,hν,hRange,hPf,S,hS,hSd,hSc,hSf,hSs,e,he,U,hU,hUi,hUs,
T,hTs,hAll,hAeq,hAs,hAn,hPB,Γ,hΓ,hΓSq,hΓP,hΓPSq,hGram,
q,hqa,hTq,hq,hCenter,hΓPq,hγ,ΓP0,hΓP0,hPos0,hOrder0,hUnit,
Inv,hLeft,hRight,hNormInv⟩
let A : HP →L[ℝ] HP := HP.orthogonalProjectionOnto ∘L U.toContinuousLinearMap ∘L HP.subtypeL
let B : HP →L[ℝ] Lp ℝ 2 J :=
(((1 : Lp ℝ 2 J →L[ℝ] Lp ℝ 2 J)-P)*U.toContinuousLinearMap*P) ∘L HP.subtypeL
let ΓP : HP →L[ℝ] HP := e.conjStarAlgEquiv Γ
let qP : HP := e q
let HP0 := (innerSL ℝ qP).ker
letI : NormedAddCommGroup HP0 := HP0.normedAddCommGroup
letI : InnerProductSpace ℝ HP0 := HP0.innerProductSpace
have hGramLocal : B.adjoint ∘L B=ΓP*ΓP := hGram
have hPosLocal : ΓP.IsPositive := hΓP
refine ⟨hμ,hJ,hν,hRange,hPf,S,hS,hSd,hSc,hSf,hSs,e,he,U,hU,hUi,hUs,T,hTs,hAll,
hAeq,hAs,hAn,hPB,Γ,hΓ,hΓSq,hΓP,hΓPSq,hGram,q,hqa,hTq,hq,hCenter,hΓPq,hγ,
ΓP0,hΓP0,hPos0,hOrder0,hUnit,Inv,hLeft,hRight,hNormInv,?_⟩
intro f
let g : HP0 := Inv f
have hg : ΓP0 g=f := congrArg (fun C : HP0 →L[ℝ] HP0 => C f) hRight
have hb := B.apply_norm_sq_eq_inner_adjoint_right (g : HP)
have hr := ΓP.apply_norm_sq_eq_inner_adjoint_right (g : HP)
rw [hGramLocal] at hb
rw [hPosLocal.isSelfAdjoint.adjoint_eq] at hr
have hNorm : ‖B (g : HP)‖=‖ΓP (g : HP)‖ :=
(sq_eq_sq₀ (norm_nonneg _) (norm_nonneg _)).mp (hb.trans hr.symm)
refine ⟨?_,hPB (g : HP)⟩
calc
‖B (HP0.subtypeL (Inv f))‖=‖ΓP (g : HP)‖ := hNorm
_ = ‖ΓP0 g‖ := congrArg (fun z : HP => ‖z‖) (hΓP0 g).symm
_ = ‖f‖ := congrArg (fun z : HP0 => ‖z‖) hg
end
end Tests.ProximalBPSCenteredRootOrderInverse
#print axioms AutoSamplingTheory.TechnicalLemmas.Measure.L2RealSquareOrder.positive_square_order
#print axioms AutoSamplingTheory.ExampleCases.ProximalBPS.CenteredRootOrderInverse.actual_centered_root_order_inverse
#print axioms Tests.ProximalBPSCenteredRootOrderInverse.genuine_actual_centered_inverse_consumer