{- | Duality between $\mathrm L^1$ and $\mathrm L^\infty$ .
* {l1Int}: the integral on $\mathrm L^1$; it is additive ({l1IntHom}), rational-linear ({l1Int-*q}), monotone ({l1Int-mono}),
extends the integral of `L` ({l1Int-char}) and $I(|u|) = \|u\|_1$ ({l1Int-abs-eq}, {l1Int-pos}).
* {linfDual}: $T_\infty F \colon u \mapsto I(F u)$ for $F \in \mathrm L^\infty$; {linfDual-bound}: $\|T_\infty F\| \le \|F\|_\infty$.
* {linfDual-norm}: Proposition `prop:dual1-iso`, from the converse bound {linfDual-converse}
(with $w = (F - C)^+$: $I(w u) \le 0$ for $u = e \wedge h$, so $d_h(w, 0) \le I(\tau_\varepsilon h)$; see `LInfty/Excess.ard`); {linfDual-inj}.
* {IsLocallyNormable}, {linfDual-locallyNormable}, {linfDual-surj}: Theorem `thm:dual1`.
For $d \in L^+$, local normability and Theorem `thm:dual` ($p = 2$) give the unique $v_d \in \mathrm L^2$ with
$I(v_d t) = \Lambda(t d)$ ({linfDual-surj.rep}); $v_a - v_b = v_{a-b}$ and $|v_d| \le C d$ ({linfDual-surj.rep-bound}, via `L2-le`).
The net $j_2(v_{\tau(n)})$, $n \in L^+$, converges in `L⁰` to $g$ with $|g| \le C$ (`trunc-controlled-conv`, `trunc-controlled-below`),
and $I(g t) = \lim_n \Lambda(t \tau(n)) = \Lambda(t)$ for `t ∈ L` ({linfDual-surj.glue-char}).
-}
\import Algebra.Group
\import Algebra.Group.GroupHom
\import Algebra.Meta
\import Algebra.Monoid
\import Algebra.Ordered
\import Algebra.Ordered.RieszSpace
\import Algebra.Ordered.TruncRieszSpace
\import Algebra.Pointed
\import Algebra.QModule
\import Analysis.Integration.FullIntegrationSpace
\import Analysis.Integration.L0
\import Analysis.Integration.L0Unit
\import Analysis.Integration.L0Product
\import Analysis.Integration.LInfty
\import Analysis.Integration.Lp
\import Analysis.Integration.LpCharacterization
\import Analysis.Integration.LpEmbedding
\import Analysis.Limit
\import Arith.Rat
\import Arith.Real
\import Arith.Real.Field
\import Arith.Real.UpperReal
\import Function.Meta
\import Logic
\import Order.Biordered
\import Order.Lattice
\import Order.PartialOrder
\import Order.StrictOrder
\import Paths
\import Paths.Meta
\import Topology.CoverSpace.Complete
\import Topology.CoverSpace.Product
\import Topology.NormedAbGroup
\import Topology.NormedAbGroup.Real
\import Topology.TopRieszSpace
\import Topology.TopRieszSpace.Completion
\import Topology.TopSpace
\import Analysis.Integration.IntegrationSpace
\import Analysis.Integration.LInfty.Excess
\import Analysis.Integration.LInfty.LpAction
\import Topology.TopAbGroup.Product
\import Analysis.Integration.Lp.L1
\import Analysis.Integration.Lp.Duality
\import Analysis.Integration.Lp.Hilbert
\import Analysis.Integration.Lp.Holder
\import Analysis.Integration.FunctionalCalculus.Operations
\import Analysis.Integration.FunctionalCalculus.Pointwise
\import Logic.Meta
\import Topology.BanachSpace
\import Topology.BanachSpace.Dual
\open QModule (*q)
\open TruncRieszSpace
-- | The integral on $\mathrm L^1$.
\func l1Int {L : FullIntegrationSpace} (u : LpSpace L 1 RealAbGroup.<=-refl) : Real
=> integral (lp1-map u)
-- | $|I(u)| \le \|u\|_1$.
\lemma l1Int-abs {L : FullIntegrationSpace} {u : LpSpace L 1 RealAbGroup.<=-refl} : RealAbGroup.abs (l1Int u) <= lnorm {LpSpace L 1 RealAbGroup.<=-refl} u
=> IntegrationSpace.integral_abs {IntegrationSpaceCompletion L} <=∘ =_<= lp1-map-norm
-- | {lp1-map} is additive.
\lemma lp1-map-+ {L : FullIntegrationSpace} {u v : LpSpace L 1 RealAbGroup.<=-refl} : lp1-map (u + v) = (+) {IntegrationSpaceCompletion L} (lp1-map u) (lp1-map v)
=> dense-lift-unique (ProductCoverSpace.prod (lpInc 1 RealAbGroup.<=-refl) (lpInc 1 RealAbGroup.<=-refl)) lpInc.isDense2
(lp1-map CoverMap.∘ +-uniform {LpSpace L 1 RealAbGroup.<=-refl}) (+-uniform {IntegrationSpaceCompletion L} CoverMap.∘ ProductCoverSpace.prod lp1-map lp1-map)
(\lam (s : \Sigma L L) => pmap lp1-map (inv (lpInc 1 RealAbGroup.<=-refl).func-+) *> lp1-map-char *> integrationCompletion.func-+ *> inv (pmap2 (+) lp1-map-char lp1-map-char)) (u,v)
-- | $T_\infty F \colon u \mapsto I(F u)$.
\func linfDual {L : FullIntegrationSpace} (F : LInftyElem L) : BoundedFunctional (LpSpace L 1 RealAbGroup.<=-refl) \cowith
| func u => l1Int (linfLpMul {L} {1} {RealAbGroup.<=-refl} F u)
| func-+ => pmap l1Int (linfLpMul {L} {1} {RealAbGroup.<=-refl} F).func-+ *> pmap integral lp1-map-+ *> integral_+
| func-bounded => \case F.bounded \with {
| inP (M,FM) =>
\let a => M RatField.∨ 1
\in \have a>0 : RatField.zro RatField.< a => RatField.zro<ide <∘l RatField.join-right
\in inP (a, <=-less a>0, \lam {u} {b} ub => l1Int-abs <=∘ linfLpMul-norm {L} {1} {RealAbGroup.<=-refl} {F} a>0 (IsBelow-level RatField.join-left FM) u
<=∘ RealField.<=_*_positive-right positivity (<=-less (real_<_U.2 ub)) <=∘ =_<= RealField.*-rat)
}
-- | $|T_\infty F u| \le a \|u\|_1$ for $|F| \le a$.
\lemma linfDual-bound-at {L : FullIntegrationSpace} {F : LInftyElem L} {a : Rat} (a>0 : RatField.zro RatField.< a) (Fa : IsBelow {L0Space L} (LatticeAbGroup.abs {L0Space L} F.el) a)
: IsFunctionalBound {LpSpace L 1 RealAbGroup.<=-refl} (linfDual F) a
=> \lam {u} {b} ub => l1Int-abs <=∘ linfLpMul-norm {L} {1} {RealAbGroup.<=-refl} {F} a>0 Fa u
<=∘ RealField.<=_*_positive-right positivity (<=-less (real_<_U.2 ub)) <=∘ =_<= RealField.*-rat
-- | $\|T_\infty F\| \le \|F\|_\infty$.
\lemma linfDual-bound {L : FullIntegrationSpace} {F : LInftyElem L} : opNorm (linfDual F) <= linfNorm F.el
=> \lam {b} (inP (M,M<b,FM)) =>
\let a => RatField.mid M b
\in \have | M>=0 : RatField.zro RatField.<= M => FM.1
| a>0 : RatField.zro RatField.< a => M>=0 <∘r RatField.mid>left M<b
\in inP (a, <=-less a>0, RatField.mid<right M<b, linfDual-bound-at a>0 (IsBelow-level {L0Space L} (<=-less (RatField.mid>left M<b)) FM))
-- | $|\Lambda u| \le C \|u\|_1$ from a functional bound.
\lemma l1-bound-lnorm {L : FullIntegrationSpace} {f : LpSpace L 1 RealAbGroup.<=-refl -> Real} {C : Rat} (C>0 : RatField.zro RatField.< C)
(p : IsFunctionalBound {LpSpace L 1 RealAbGroup.<=-refl} f C) (u : LpSpace L 1 RealAbGroup.<=-refl)
: RealAbGroup.abs (f u) <= Real.fromRat C * lnorm {LpSpace L 1 RealAbGroup.<=-refl} u
=> real_<=-eps \lam {d} d>0 =>
\let e => d RatField.* RatField.finv C
\in \have | e>0 : 0 < Real.fromRat e => rat_real_<.1 (RatField.<_*_positive_positive d>0 (RatField.finv>0 C>0))
| Ce : Real.fromRat C * Real.fromRat e = Real.fromRat d
=> RealField.*-rat *> pmap Real.fromRat (equation.cRing {RatField.finv-right (RatField.>_/= C>0)})
| lt : lnorm {LpSpace L 1 RealAbGroup.<=-refl} u < lnorm {LpSpace L 1 RealAbGroup.<=-refl} u + Real.fromRat e => linarith
\in \case real_<-char.1 lt \with {
| inP (b,ub,be) => (p (real_<_U.1 ub) <=∘ =_<= (inv RealField.*-rat))
<∘r (RealField.<_*_positive-right (rat_real_<.1 C>0) be <∘l =_<= (RealField.ldistr *> pmap (_ +) Ce))
}
-- | {l1Int} is additive.
\func l1IntHom {L : FullIntegrationSpace} : AddGroupHom (LpSpace L 1 RealAbGroup.<=-refl) RealAbGroup l1Int \cowith
| func-+ => pmap integral lp1-map-+ *> integral_+
-- | {lp1-map} as an additive map.
\func lp1Hom {L : FullIntegrationSpace} : AddGroupHom (LpSpace L 1 RealAbGroup.<=-refl) (IntegrationSpaceCompletion L) lp1-map \cowith
| func-+ => lp1-map-+
-- | {lp1-map} preserves `|·|`.
\lemma lp1-map-abs {L : FullIntegrationSpace} {u : LpSpace L 1 RealAbGroup.<=-refl} : lp1-map (LatticeAbGroup.abs {LpSpace L 1 RealAbGroup.<=-refl} u) = LatticeAbGroup.abs {IntegrationSpaceCompletion L} (lp1-map u)
=> lp1-map-join *> pmap (IntegrationSpaceCompletion.join-func {L} (lp1-map u)) (AddGroupHom.func-negative {lp1Hom} {u})
-- | $I(|u|) = \|u\|_1$.
\lemma l1Int-abs-eq {L : FullIntegrationSpace} {u : LpSpace L 1 RealAbGroup.<=-refl} : l1Int (LatticeAbGroup.abs {LpSpace L 1 RealAbGroup.<=-refl} u) = lnorm {LpSpace L 1 RealAbGroup.<=-refl} u
=> pmap integral lp1-map-abs *> lp1-map-norm
-- | $I(u) = \|u\|_1$ for $u \ge 0$.
\lemma l1Int-pos {L : FullIntegrationSpace} {u : LpSpace L 1 RealAbGroup.<=-refl} (u>=0 : (<=) {LpSpace L 1 RealAbGroup.<=-refl} (zro {LpSpace L 1 RealAbGroup.<=-refl}) u) : l1Int u = lnorm {LpSpace L 1 RealAbGroup.<=-refl} u
=> pmap l1Int (inv (LatticeAbGroup.abs-ofPos {LpSpace L 1 RealAbGroup.<=-refl} u>=0)) *> l1Int-abs-eq
-- | {l1Int} is monotone.
\lemma l1Int-mono {L : FullIntegrationSpace} {u v : LpSpace L 1 RealAbGroup.<=-refl} (u<=v : (<=) {LpSpace L 1 RealAbGroup.<=-refl} u v) : l1Int u <= l1Int v
=> \have | e : l1Int v = l1Int u + l1Int ((-) {LpSpace L 1 RealAbGroup.<=-refl} v u) => pmap l1Int (inv (ab-split {LpSpace L 1 RealAbGroup.<=-refl})) *> l1IntHom.func-+
| d>=0 : (0 : Real) <= l1Int ((-) {LpSpace L 1 RealAbGroup.<=-refl} v u) => lnorm>=0 {LpSpace L 1 RealAbGroup.<=-refl} <=∘ =_<= (inv (l1Int-pos (PosetAddGroup.to>=0 {LpSpace L 1 RealAbGroup.<=-refl} u<=v)))
\in linarith
\where
\lemma ab-split {A : AbGroup} {u v : A} : u + (v - u) = v
=> equation.abGroup
-- | $I(q u) = q I(u)$.
\lemma l1Int-*q {L : FullIntegrationSpace} {q : Rat} {u : LpSpace L 1 RealAbGroup.<=-refl} : l1Int (q *q u) = Real.fromRat q * l1Int u
=> func-*q {LpSpace L 1 RealAbGroup.<=-refl} {QModule.fromRatModule RealField} {\new AddGroupHom (LpSpace L 1 RealAbGroup.<=-refl) (QModule.fromRatModule RealField) { | func => l1Int | func-+ => l1IntHom.func-+ }}
*> QModule.fromRatModule_*q
-- | $I(f) = \int f$ for `f ∈ L`.
\lemma l1Int-char {L : FullIntegrationSpace} {f : L} : l1Int (lpInc 1 RealAbGroup.<=-refl f) = L.integral f
=> pmap integral lp1-map-char *> integrationCompletion.func-integral
-- | The converse bound of Proposition `prop:dual1-iso`: if $|I(F u)| \le C \|u\|_1$ for all `u`, then $|F| \le C$.
\lemma linfDual-converse {L : FullIntegrationSpace} {F : LInftyElem L} {C : Rat} (C>0 : RatField.zro RatField.< C)
(h : IsFunctionalBound {LpSpace L 1 RealAbGroup.<=-refl} (linfDual F) C)
: IsBelow {L0Space L} (LatticeAbGroup.abs {L0Space L} F.el) C
=> \case F.bounded \with {
| inP (M,FM) =>
\let N => M RatField.∨ 1
\in \have | N>0 : RatField.zro RatField.< N => RatField.zro<ide <∘l RatField.join-right
| FN : IsBelow {L0Space L} (LatticeAbGroup.abs {L0Space L} F.el) N => IsBelow-level {L0Space L} RatField.join-left FM
\in excess-zero-below C>0
(excess-zero C>0 N>0 FN \lam u _ => RealAbGroup.abs>=id <=∘ l1-bound-lnorm C>0 h u)
(excess-zero C>0 N>0 (linf-negative-below FN) \lam u _ =>
=_<= (pmap l1Int (linfLpMul-negative u) *> AddGroupHom.func-negative {l1IntHom}) <=∘ RealAbGroup.abs>=neg <=∘ l1-bound-lnorm C>0 h u)
}
\where
-- | The core of Proposition `prop:dual1-iso`: if $I(F u) \le C \|u\|_1$ for $u \ge 0$, then $(F - C)^+ = 0$.
\lemma excess-zero {L : FullIntegrationSpace} {F : LInftyElem L} {C N : Rat} (C>0 : RatField.zro RatField.< C) (N>0 : RatField.zro RatField.< N)
(FN : IsBelow {L0Space L} (LatticeAbGroup.abs {L0Space L} F.el) N)
(hyp : \Pi (u : LpSpace L 1 RealAbGroup.<=-refl) -> (<=) {LpSpace L 1 RealAbGroup.<=-refl} (zro {LpSpace L 1 RealAbGroup.<=-refl}) u -> linfDual F u <= Real.fromRat C * lnorm {LpSpace L 1 RealAbGroup.<=-refl} u)
: excess {L0Space L} C F.el = (L0Space L).zro
=> l0-gauge-zero \lam {h} h>=0 {d} d>0 => \case L.integral-trunc-small h>=0 d>0 \with {
| inP (eps,eps>0,small) =>
\let | s => excess-parts {L} {F} C>0 N>0 eps>0 FN h>=0
| K => 1 RatField.∨ RatField.finv eps
\in \have | hu : Real.fromRat C * l1Int s.1 + l1Int s.2 <= Real.fromRat C * l1Int s.1
=> =_<= (inv (pmap l1Int s.5 *> l1IntHom.func-+ *> pmap (`+ _) l1Int-*q)) <=∘ hyp s.1 s.4 <=∘ =_<= (pmap (_ *) (inv (l1Int-pos s.4)))
| w'<=0 : l1Int s.2 <= 0 => linarith
| K>=0 : (0 : Real) <= Real.fromRat K => rat_real_<=.1 (RatField.zro<=ide <=∘ RatField.join-left)
| Kw : Real.fromRat K * l1Int s.2 <= 0 => RealField.<=_*_positive-right K>=0 w'<=0 <=∘ =_<= RealField.zro_*-right
\in rewrite s.7 $ (=_<= (inv l1Int-abs-eq) <=∘ l1Int-mono s.6 <=∘ =_<= (l1IntHom.func-+ *> pmap2 (+) l1Int-char l1Int-*q))
<∘r (linarith : L.integral (L.truncAt eps h) + Real.fromRat K * l1Int s.2 < Real.fromRat d)
}
-- | Proposition `prop:dual1-iso`: $\|T_\infty F\| = \|F\|_\infty$ as upper reals.
\lemma linfDual-norm {L : FullIntegrationSpace} {F : LInftyElem L} : opNorm (linfDual F) = linfNorm F.el
=> <=-antisymmetric linfDual-bound (\lam {b} (inP (C,C>=0,C<b,h)) =>
\let c => RatField.mid C b
\in \have c>0 : RatField.zro RatField.< c => C>=0 <∘r RatField.mid>left C<b
\in inP (c, RatField.mid<right C<b, linfDual-converse c>0 (\lam ub => h ub <=∘ rat_real_<=.1 (RatField.<=_*_positive-left (<=-less (RatField.mid>left C<b)) (<=-less (norm>=0 {LpSpace L 1 RealAbGroup.<=-refl} ub))))))
-- | $T_\infty$ is injective.
\lemma linfDual-inj {L : FullIntegrationSpace} {F G : LInftyElem L} (e : \Pi (u : LpSpace L 1 RealAbGroup.<=-refl) -> linfDual F u = linfDual G u) : F = G
=> \let D => F - {LInfty L} G
\in \have | Dz (u : LpSpace L 1 RealAbGroup.<=-refl) : linfDual D u = 0
=> pmap l1Int (linfLpMul-+ u *> pmap (_ +) (linfLpMul-negative u)) *> l1IntHom.func-+
*> pmap (_ +) (AddGroupHom.func-negative {l1IntHom}) *> AddGroup.toZero (e u)
| bound {C : Rat} (C>0 : RatField.zro RatField.< C) : IsFunctionalBound {LpSpace L 1 RealAbGroup.<=-refl} (linfDual D) C
=> \lam {u} ub => =_<= (pmap RealAbGroup.abs (Dz u) *> RealAbGroup.abs_zro)
<=∘ rat_real_<=.1 (<=-less (RatField.<_*_positive_positive C>0 (norm>=0 {LpSpace L 1 RealAbGroup.<=-refl} ub)))
\in AddGroup.fromZero {LInfty L} (ext (l0-bounded-zero \lam {c} c>0 => linfDual-converse c>0 (bound c>0)))
{- | $\Lambda \in (\mathrm L^1)^*$ is locally normable if, for every $h \in L^+$, the functional $\Lambda_h(u) = \Lambda(u h)$ on $\mathrm L^2$
- is normable. $\Lambda_h$ is characterized on the dense subspace `L`.
-}
\func IsLocallyNormable {L : FullIntegrationSpace} (f : BoundedFunctional (LpSpace L 1 RealAbGroup.<=-refl)) : \Prop
=> \Pi {h : L} -> L.zro <= h -> ∃ (fh : BoundedFunctional (LpSpace L 2 fmul-polar.two>=1))
(\Pi (g : L) -> fh (lpInc 2 fmul-polar.two>=1 g) = f (lpInc 1 RealAbGroup.<=-refl (fmul g h)))
(IsNormable fh)
-- | Theorem `thm:dual1`: every $T_\infty F$ is locally normable.
\lemma linfDual-locallyNormable {L : FullIntegrationSpace} (F : LInftyElem L) : IsLocallyNormable (linfDual F)
=> \lam {h} _ => inP (lpDual {L} {2} {2} {fmul-polar.two>=1} {fmul-polar.two>=1} two-conj (linfLpMul {L} {2} {fmul-polar.two>=1} F (lpInc 2 fmul-polar.two>=1 h)),
\lam g => local F g h,
lpDual-normable {L} {2} {2} two>1 two>1 two-conj (linfLpMul {L} {2} {fmul-polar.two>=1} F (lpInc 2 fmul-polar.two>=1 h)))
\where \protected {
\lemma two>1 : (1 : Real) < 2
=> linarith
-- | $I((F h) g) = I(F (g h))$ for `g h ∈ L`.
\lemma local {L : FullIntegrationSpace} (F : LInftyElem L) (g h : L)
: lpDual {L} {2} {2} {fmul-polar.two>=1} {fmul-polar.two>=1} two-conj (linfLpMul {L} {2} {fmul-polar.two>=1} F (lpInc 2 fmul-polar.two>=1 h)) (lpInc 2 fmul-polar.two>=1 g)
= linfDual F (lpInc 1 RealAbGroup.<=-refl (fmul g h))
=> \case F.bounded \with {
| inP (M,FM) =>
\let N => M RatField.∨ 1
\in \have N>0 : RatField.zro RatField.< N => RatField.zro<ide <∘l RatField.join-right
\in local-at N>0 (IsBelow-level {L0Space L} RatField.join-left FM)
}
\lemma local-at {L : FullIntegrationSpace} {F : LInftyElem L} {N : Rat} (N>0 : RatField.zro RatField.< N)
(FN : IsBelow {L0Space L} (LatticeAbGroup.abs {L0Space L} F.el) N) {g h : L}
: lpDual {L} {2} {2} {fmul-polar.two>=1} {fmul-polar.two>=1} two-conj (linfLpMul {L} {2} {fmul-polar.two>=1} F (lpInc 2 fmul-polar.two>=1 h)) (lpInc 2 fmul-polar.two>=1 g)
= linfDual F (lpInc 1 RealAbGroup.<=-refl (fmul g h))
=> pmap (\lam z => integral (lpMul two-conj z (lpInc 2 fmul-polar.two>=1 g))) (linfLpMul-clip N>0 FN *> pmap (\lam z => lpClip 2 fmul-polar.two>=1 (linfLpMul.elem.dom>=0 N>0 {h}) (l0Mul (z, pointCF {L0PreSpace L} h))) (inv (bclip-id {L0Space L} N>0 FN)))
*> gen N>0 {g} {h} F.el
*> inv (pmap l1Int (linfLpMul-clip N>0 FN *> pmap (\lam z => lpClip 1 RealAbGroup.<=-refl (linfLpMul.elem.dom>=0 N>0 {fmul g h}) (l0Mul (z, pointCF {L0PreSpace L} (fmul g h)))) (inv (bclip-id {L0Space L} N>0 FN))))
-- | The identity of {local-at} with `F` replaced by the clamping of any `X ∈ L⁰`, by density.
\lemma gen {L : FullIntegrationSpace} {N : Rat} (N>0 : RatField.zro RatField.< N) {g h : L} (X : L0Space L)
: integral (lpMul two-conj (lpClip 2 fmul-polar.two>=1 (linfLpMul.elem.dom>=0 N>0 {h}) (l0Mul (bclip {L0Space L} N X, pointCF {L0PreSpace L} h))) (lpInc 2 fmul-polar.two>=1 g))
= l1Int (lpClip 1 RealAbGroup.<=-refl (linfLpMul.elem.dom>=0 N>0 {fmul g h}) (l0Mul (bclip {L0Space L} N X, pointCF {L0PreSpace L} (fmul g h))))
=> pmap integral lpMul.cover-eq *> dense-lift-unique (completion {L0PreSpace L}) (completion.isDenseEmbedding {L0PreSpace L}).1
((IntegrationSpaceCompletion L).integral-metric CoverMap.∘ lpMul.cover two-conj CoverMap.∘ ProductCoverSpace.tuple
(lpClip 2 fmul-polar.two>=1 (linfLpMul.elem.dom>=0 N>0 {h}) CoverMap.∘ l0Mul CoverMap.∘ ProductCoverSpace.tuple (bclip-cover {L0Space L} N) (CoverMap.const {L0Space L} {L0Space L} (pointCF {L0PreSpace L} h)))
(CoverMap.const (lpInc 2 fmul-polar.two>=1 g)))
((IntegrationSpaceCompletion L).integral-metric CoverMap.∘ lp1-map CoverMap.∘ lpClip 1 RealAbGroup.<=-refl (linfLpMul.elem.dom>=0 N>0 {fmul g h})
CoverMap.∘ l0Mul CoverMap.∘ ProductCoverSpace.tuple (bclip-cover {L0Space L} N) (CoverMap.const {L0Space L} {L0Space L} (pointCF {L0PreSpace L} (fmul g h))))
(\lam f =>
\have b {p : Real} {p>=1 : (1 : Real) <= p} {k : L}
: lpClip p p>=1 (linfLpMul.elem.dom>=0 N>0 {k}) (l0Mul (bclip {L0Space L} N (pointCF {L0PreSpace L} f), pointCF {L0PreSpace L} k)) = lpInc p p>=1 (fmul (L.bclip N f) k)
=> pmap (lpClip p p>=1 (linfLpMul.elem.dom>=0 N>0 {k})) (pmap (\lam z => l0Mul (z, pointCF {L0PreSpace L} k)) (inv (l0-bclip {L})) *> l0Mul-char)
*> {LpSpace L p p>=1} lpClip.char (linfLpMul.elem.dom>=0 N>0 {k}) *> {LpSpace L p p>=1} pmap (lpInc p p>=1) (L.clip-id (fmul-bounded (<=-less N>0) (L.bclip-below N>0)))
\in pmap (\lam z => integral (lpMul.cover two-conj (z, lpInc 2 fmul-polar.two>=1 g))) b
*> pmap integral (inv (lpMul.cover-eq {L} {2} {2} {fmul-polar.two>=1} {fmul-polar.two>=1} {two-conj}) *> lpMul-char {L} {2} {2} {fmul-polar.two>=1} {fmul-polar.two>=1} {two-conj}) *> integrationCompletion.func-integral
*> pmap L.integral (fmul-assoc *> pmap (fmul (L.bclip N f)) fmul-comm)
*> inv (pmap (\lam z => integral (lp1-map z)) b *> pmap integral lp1-map-char *> integrationCompletion.func-integral)) X
}
-- | Theorem `thm:dual1`: every locally normable functional on $\mathrm L^1$ is $T_\infty F$ (unique by {linfDual-inj}).
\lemma linfDual-surj {L : FullIntegrationSpace} {f : BoundedFunctional (LpSpace L 1 RealAbGroup.<=-refl)} (fn : IsLocallyNormable f)
: ∃ (F : LInftyElem L) (\Pi (u : LpSpace L 1 RealAbGroup.<=-refl) -> f u = linfDual F u)
=> \case f.func-bounded \with {
| inP (C0,C0>=0,fC0) =>
\let C => C0 RatField.∨ 1
\in \have | C>=1 : 1 RatField.<= C => RatField.join-right
| fC : IsFunctionalBound {LpSpace L 1 RealAbGroup.<=-refl} f C => \lam ub => fC0 ub <=∘ rat_real_<=.1 (RatField.<=_*_positive-left RatField.join-left (<=-less (norm>=0 {LpSpace L 1 RealAbGroup.<=-refl} ub)))
\in inP (glue fn C>=1 fC, \lam u => functional-dense-eq {_} {LpSpace L 1 RealAbGroup.<=-refl} (lpInc 1 RealAbGroup.<=-refl) lpInc.isDense {f} {linfDual (glue fn C>=1 fC)} (glue-char fn C>=1 fC) u)
}
\where \private {
-- | $T_2 v \colon u \mapsto I(v u)$ on $\mathrm L^2$.
\func T2 {L : FullIntegrationSpace} (v : LpSpace L 2 fmul-polar.two>=1) : BoundedFunctional (LpSpace L 2 fmul-polar.two>=1)
=> lpDual {L} {2} {2} {fmul-polar.two>=1} {fmul-polar.two>=1} two-conj v
-- | `v ∈ L²` represents $u \mapsto \Lambda(u d)$.
\func Rep {L : FullIntegrationSpace} (f : BoundedFunctional (LpSpace L 1 RealAbGroup.<=-refl)) (d : L) (v : LpSpace L 2 fmul-polar.two>=1) : \Prop
=> \Pi (t : L) -> T2 v (lpInc 2 fmul-polar.two>=1 t) = f (lpInc 1 RealAbGroup.<=-refl (fmul t d))
\lemma rep-unique {L : FullIntegrationSpace} {f : BoundedFunctional (LpSpace L 1 RealAbGroup.<=-refl)} {d : L} {v v' : LpSpace L 2 fmul-polar.two>=1}
(r : Rep f d v) (r' : Rep f d v') : v = v'
=> lpDual-inj {L} {2} {2} linfDual-locallyNormable.two>1 linfDual-locallyNormable.two>1 two-conj
(functional-dense-eq {_} {LpSpace L 2 fmul-polar.two>=1} (lpInc 2 fmul-polar.two>=1) lpInc.isDense {T2 v} {T2 v'} (\lam t => r t *> inv (r' t)))
-- | The representative of $u \mapsto \Lambda(u d)$, by local normability and Theorem `thm:dual` for $p = 2$ (unique by {lpDual-inj}).
\lemma rep {L : FullIntegrationSpace} {f : BoundedFunctional (LpSpace L 1 RealAbGroup.<=-refl)} (fn : IsLocallyNormable f) {d : L} (d>=0 : L.zro <= d)
: \Sigma (v : LpSpace L 2 fmul-polar.two>=1) (Rep f d v) \level \lam s t => ext (rep-unique s.2 t.2)
=> TruncP.remove {\Sigma (v : LpSpace L 2 fmul-polar.two>=1) (Rep f d v)} (\lam s t => ext (rep-unique s.2 t.2)) \case fn d>=0 \with {
| inP (fh,fc,nh) => \case lpDual-surj {L} {2} {2} linfDual-locallyNormable.two>1 linfDual-locallyNormable.two>1 two-conj nh \with {
| inP (v,e) => inP (v, \lam t => inv (e _) *> fc t)
}
}
-- | $v_a - v_b = v_{a - b}$.
\lemma rep-minus {L : FullIntegrationSpace} {f : BoundedFunctional (LpSpace L 1 RealAbGroup.<=-refl)} (fn : IsLocallyNormable f) {a b : L}
(a>=0 : L.zro <= a) (b>=0 : L.zro <= b) (ab>=0 : L.zro <= a - b)
: (rep fn a>=0).1 - (rep fn b>=0).1 = (rep fn ab>=0).1
=> rep-unique (\lam t => AddGroupHom.func-minus {lpDual-hom {L} {2} {2} {fmul-polar.two>=1} {fmul-polar.two>=1} two-conj (lpInc 2 fmul-polar.two>=1 t)}
*> pmap2 (-) ((rep fn a>=0).2 t) ((rep fn b>=0).2 t) *> inv f.toAddGroupHom.func-minus
*> pmap f (inv (AddGroupHom.func-minus {lpInc 1 RealAbGroup.<=-refl}) *> pmap (lpInc 1 RealAbGroup.<=-refl) (inv (AddGroupHom.func-minus {fmulHom t}))))
(rep fn ab>=0).2
\where
\func fmulHom {L : FullIntegrationSpace} (t : L) : AddGroupHom L L (fmul t) \cowith
| func-+ => fmul-ldistr
-- | $|v_d| \le C d$ if $|\Lambda u| \le C \|u\|_1$.
\lemma rep-bound {L : FullIntegrationSpace} {f : BoundedFunctional (LpSpace L 1 RealAbGroup.<=-refl)} (fn : IsLocallyNormable f) {C : Rat} (C>=1 : 1 RatField.<= C)
(fC : IsFunctionalBound {LpSpace L 1 RealAbGroup.<=-refl} f C) {d : L} (d>=0 : L.zro <= d)
: (<=) {LpSpace L 2 fmul-polar.two>=1} (LatticeAbGroup.abs {LpSpace L 2 fmul-polar.two>=1} (rep fn d>=0).1) (lpInc 2 fmul-polar.two>=1 (C *q d))
=> \let | v => (rep fn d>=0).1
| C>0 : RatField.zro RatField.< C => RatField.zro<ide <∘l C>=1
| bnd (u : L) (u>=0 : L.zro <= u) : RealAbGroup.abs (T2 v (lpInc 2 fmul-polar.two>=1 u)) <= T2 (lpInc 2 fmul-polar.two>=1 (C *q d)) (lpInc 2 fmul-polar.two>=1 u)
=> \have ud>=0 : L.zro <= fmul u d => transport (L.zro <=) (fmul-abs *> pmap2 fmul (L.abs-ofPos u>=0) (L.abs-ofPos d>=0)) L.abs>=0
\in =_<= (pmap RealAbGroup.abs ((rep fn d>=0).2 u)) <=∘ l1-bound-lnorm C>0 fC _
<=∘ =_<= (pmap (_ *) (inv (l1Int-pos (transport (\lam z => (<=) {LpSpace L 1 RealAbGroup.<=-refl} z (lpInc 1 RealAbGroup.<=-refl (fmul u d))) (lpInc 1 RealAbGroup.<=-refl).func-zro ((lpInc 1 RealAbGroup.<=-refl).func-<= ud>=0))) *> l1Int-char)
*> inv (L.integral_*q *> pmap (\lam z => Real.fromRat C * L.integral z) fmul-comm) *> inv (pmap L.integral fmul-*q-left)
*> inv (pmap integral lpMul-char *> integrationCompletion.func-integral))
\in join-univ (L2-le \lam u u>=0 => RealAbGroup.abs>=id <=∘ bnd u u>=0)
(L2-le \lam u u>=0 => =_<= (AddGroupHom.func-negative {lpDual-hom {L} {2} {2} {fmul-polar.two>=1} {fmul-polar.two>=1} two-conj (lpInc 2 fmul-polar.two>=1 u)})
<=∘ RealAbGroup.abs>=neg <=∘ bnd u u>=0)
-- | The net $j_2(v_{\tau(n)})$, $n \in L^+$.
\func net {L : FullIntegrationSpace} {f : BoundedFunctional (LpSpace L 1 RealAbGroup.<=-refl)} (fn : IsLocallyNormable f) (n : PosCone L) : L0Space L
=> lpToL0 2 fmul-polar.two>=1 (rep fn (L.trunc-pos n.el>=0)).1
\lemma net-conv {L : FullIntegrationSpace} {f : BoundedFunctional (LpSpace L 1 RealAbGroup.<=-refl)} (fn : IsLocallyNormable f) {C : Rat} (C>=1 : 1 RatField.<= C)
(fC : IsFunctionalBound {LpSpace L 1 RealAbGroup.<=-refl} f C) : IsConvergent {PosCone L} {L0Space L} (net fn)
=> trunc-controlled-conv C>=1 \lam {m} {n} mn =>
\have ab>=0 : L.zro <= L.trunc n.el - L.trunc m.el => L.to>=0 (L.trunc-mono mn)
\in transport2 (\lam x y => (<=) {L0Space L} (LatticeAbGroup.abs {L0Space L} x) y)
(inv (pmap (lpToL0 2 fmul-polar.two>=1) (rep-minus fn (L.trunc-pos n.el>=0) (L.trunc-pos m.el>=0) ab>=0)) *> (lpToL0 2 fmul-polar.two>=1).func-minus)
(pmap (\lam z => pointCF {L0PreSpace L} (C *q z)) (inv (L.abs-ofPos ab>=0)))
(lpToL0-dominated (rep-bound fn C>=1 fC ab>=0))
-- | The glued density $g = \lim_n j_2(v_{\tau(n)})$; $|g| \le C$.
\func glue {L : FullIntegrationSpace} {f : BoundedFunctional (LpSpace L 1 RealAbGroup.<=-refl)} (fn : IsLocallyNormable f) {C : Rat} (C>=1 : 1 RatField.<= C)
(fC : IsFunctionalBound {LpSpace L 1 RealAbGroup.<=-refl} f C) : LInftyElem L
=> \new LInftyElem L (limit {PosCone L} {L0Space L} (net fn) (net-conv fn C>=1 fC)) (inP (C, glue-below fn C>=1 fC))
\lemma glue-below {L : FullIntegrationSpace} {f : BoundedFunctional (LpSpace L 1 RealAbGroup.<=-refl)} (fn : IsLocallyNormable f) {C : Rat} (C>=1 : 1 RatField.<= C)
(fC : IsFunctionalBound {LpSpace L 1 RealAbGroup.<=-refl} f C) : IsBelow {L0Space L} (LatticeAbGroup.abs {L0Space L} (limit {PosCone L} {L0Space L} (net fn) (net-conv fn C>=1 fC))) C
=> trunc-controlled-below (RatField.zro<ide <∘l C>=1) {net fn} (\lam n => lpToL0-dominated (rep-bound fn C>=1 fC (L.trunc-pos n.el>=0))) (limit-isLimit {PosCone L} {L0Space L} {net fn} {net-conv fn C>=1 fC})
-- | $\Lambda(t) = I(g t)$ for `t ∈ L`.
\lemma glue-char {L : FullIntegrationSpace} {f : BoundedFunctional (LpSpace L 1 RealAbGroup.<=-refl)} (fn : IsLocallyNormable f) {C : Rat} (C>=1 : 1 RatField.<= C)
(fC : IsFunctionalBound {LpSpace L 1 RealAbGroup.<=-refl} f C) (t : L) : f (lpInc 1 RealAbGroup.<=-refl t) = linfDual (glue fn C>=1 fC) (lpInc 1 RealAbGroup.<=-refl t)
=> \let | C>0 : RatField.zro RatField.< C => RatField.zro<ide <∘l C>=1
| J : CoverMap (L0Space L) RealNormed => (IntegrationSpaceCompletion L).integral-metric CoverMap.∘ lp1-map CoverMap.∘ lpClip 1 RealAbGroup.<=-refl (linfLpMul.elem.dom>=0 C>0 {t})
CoverMap.∘ l0Mul CoverMap.∘ ProductCoverSpace.tuple (CoverMap.id {L0Space L}) (CoverMap.const {L0Space L} {L0Space L} (pointCF {L0PreSpace L} t))
\in \have l1 : RealNormed.IsLimit {PosCone L} (\lam n => J (net fn n)) (J (glue fn C>=1 fC).el)
=> cont-limit {PosCone L} (limit-isLimit {PosCone L} {L0Space L} {net fn} {net-conv fn C>=1 fC}) J
\in inv (RealNormed.limit-unique {PosCone L} (transport (RealNormed.IsLimit {PosCone L} __ (J (glue fn C>=1 fC).el)) (ext \lam n => net-char fn C>=1 fC C>0 <=-refl n) l1) (tail-limit C>=1 fC t))
*> inv (pmap l1Int (linfLpMul-clip C>0 (glue-below fn C>=1 fC)))
-- | $I(j_2(v_{\tau(n)}) t) = \Lambda(t \tau(n))$, computed through $\kappa_{N|t|}$.
\lemma net-char {L : FullIntegrationSpace} {f : BoundedFunctional (LpSpace L 1 RealAbGroup.<=-refl)} (fn : IsLocallyNormable f) {C : Rat} (C>=1 : 1 RatField.<= C)
(fC : IsFunctionalBound {LpSpace L 1 RealAbGroup.<=-refl} f C) {N : Rat} (N>0 : RatField.zro RatField.< N) (CN : C RatField.<= N) {t : L} (n : PosCone L)
: l1Int (lpClip 1 RealAbGroup.<=-refl (linfLpMul.elem.dom>=0 N>0 {t}) (l0Mul (net fn n, pointCF {L0PreSpace L} t))) = f (lpInc 1 RealAbGroup.<=-refl (fmul t (L.trunc n.el)))
=> \let | C>0 : RatField.zro RatField.< C => RatField.zro<ide <∘l C>=1
| h>=0 : L.zro <= C *q L.trunc n.el => L.*q_>=0 (<=-less C>0) (L.trunc-pos n.el>=0)
| b => rep-bound fn C>=1 fC (L.trunc-pos n.el>=0)
\in \have hN : L.IsBelow (L.abs (C *q L.trunc n.el)) N
=> transportInv (L.IsBelow __ N) (L.abs-ofPos h>=0) $ L.IsBelow-level (=_<= RatField.ide-right <=∘ CN) $
L.IsBelow_*q (<=-less C>0) (transport (L.IsBelow __ 1) (L.abs-ofPos (L.trunc-pos n.el>=0)) (l0One.trunc-below n))
\in inv (pmap (\lam z => l1Int (lpClip 1 RealAbGroup.<=-refl (linfLpMul.elem.dom>=0 N>0 {t}) (l0Mul (z, pointCF {L0PreSpace L} t)))) (LatticeAbGroup.clip-id {L0Space L} (lpToL0-dominated b)))
*> inv (gen2 N>0 h>=0 hN (net fn n))
*> pmap (\lam z => integral (lpMul two-conj z (lpInc 2 fmul-polar.two>=1 t))) (lpClip-lpToL0 h>=0 (rep fn (L.trunc-pos n.el>=0)).1 *> LatticeAbGroup.clip-id {LpSpace L 2 fmul-polar.two>=1} b)
*> (rep fn (L.trunc-pos n.el>=0)).2 t
-- | $I(\kappa_h(X) t) = I(\kappa_{N|t|}(\mathrm{clip}_h(X) t))$ for `X ∈ L⁰`, by density.
\lemma gen2 {L : FullIntegrationSpace} {N : Rat} (N>0 : RatField.zro RatField.< N) {h t : L} (h>=0 : L.zro <= h) (hN : L.IsBelow (L.abs h) N) (X : L0Space L)
: integral (lpMul two-conj (lpClip 2 fmul-polar.two>=1 h>=0 X) (lpInc 2 fmul-polar.two>=1 t))
= l1Int (lpClip 1 RealAbGroup.<=-refl (linfLpMul.elem.dom>=0 N>0 {t}) (l0Mul (LatticeAbGroup.clip {L0Space L} (pointCF {L0PreSpace L} h) X, pointCF {L0PreSpace L} t)))
=> pmap integral lpMul.cover-eq *> dense-lift-unique (completion {L0PreSpace L}) (completion.isDenseEmbedding {L0PreSpace L}).1
((IntegrationSpaceCompletion L).integral-metric CoverMap.∘ lpMul.cover two-conj CoverMap.∘ ProductCoverSpace.tuple (lpClip 2 fmul-polar.two>=1 h>=0) (CoverMap.const (lpInc 2 fmul-polar.two>=1 t)))
((IntegrationSpaceCompletion L).integral-metric CoverMap.∘ lp1-map CoverMap.∘ lpClip 1 RealAbGroup.<=-refl (linfLpMul.elem.dom>=0 N>0 {t})
CoverMap.∘ l0Mul CoverMap.∘ ProductCoverSpace.tuple (clip-cover {L0Space L} (pointCF {L0PreSpace L} h)) (CoverMap.const {L0Space L} {L0Space L} (pointCF {L0PreSpace L} t)))
(\lam g =>
\have | cN : L.IsBelow (L.abs (L.clip h g)) N => L.IsBelow_<= (=_<= (L.clip-abs-eq h>=0) <=∘ L.meet-right <=∘ =_<= (inv (L.abs-ofPos h>=0))) hN
| ci : L.clip (N *q L.abs t) (fmul (L.clip h g) t) = fmul (L.clip h g) t => L.clip-id (fmul-bounded (<=-less N>0) cN)
\in pmap (\lam z => integral (lpMul.cover two-conj (z, lpInc 2 fmul-polar.two>=1 t))) (lpClip.char h>=0)
*> pmap integral (inv (lpMul.cover-eq {L} {2} {2} {fmul-polar.two>=1} {fmul-polar.two>=1} {two-conj}) *> lpMul-char {L} {2} {2} {fmul-polar.two>=1} {fmul-polar.two>=1} {two-conj}) *> integrationCompletion.func-integral
*> inv (pmap (\lam z => l1Int (lpClip 1 RealAbGroup.<=-refl (linfLpMul.elem.dom>=0 N>0 {t}) (l0Mul (z, pointCF {L0PreSpace L} t)))) (inv (RieszSpaceHom.func-clip {topTruncCompletion {L0PreSpace L}}))
*> pmap (\lam z => l1Int (lpClip 1 RealAbGroup.<=-refl (linfLpMul.elem.dom>=0 N>0 {t}) z)) l0Mul-char
*> pmap l1Int (lpClip.char (linfLpMul.elem.dom>=0 N>0 {t}) *> pmap (lpInc 1 RealAbGroup.<=-refl) ci) *> l1Int-char)) X
-- | $\Lambda(t \tau(n)) \to \Lambda(t)$, since $\|t \tau(n) - t\|_1 \le I(\tau_\eta |t|)$ for $n \ge |t|/\eta$.
\lemma tail-limit {L : FullIntegrationSpace} {f : BoundedFunctional (LpSpace L 1 RealAbGroup.<=-refl)} {C : Rat} (C>=1 : 1 RatField.<= C)
(fC : IsFunctionalBound {LpSpace L 1 RealAbGroup.<=-refl} f C) (t : L)
: RealNormed.IsLimit {PosCone L} (\lam n => f (lpInc 1 RealAbGroup.<=-refl (fmul t (L.trunc n.el)))) (f (lpInc 1 RealAbGroup.<=-refl t))
=> \have | C>0 : RatField.zro RatField.< C => RatField.zro<ide <∘l C>=1
| t>=0 : L.zro <= L.abs t => L.abs>=0
\in limit-metric-real.2 \lam {eps} eps>0 => \case l0One.small t>=0 {Real.fromRat (RatField.finv C) * eps} positivity \with {
| inP (eta,eta>0,s) => inP (l0One.start t>=0 eta>0, \lam {n : PosCone L} sn =>
\have | ab : L.abs (t - fmul t (L.trunc n.el)) <= L.truncAt eta (L.abs t)
=> =_<= (L.abs_- *> inv (L.meet_<= (fmul-trunc-dev n.el>=0)))
<=∘ transport (\lam z => L.abs (fmul t (L.trunc z) - t) ∧ L.abs t <= L.truncAt eta (L.abs t)) (inv l0One.split) (fmul-trunc-tail eta>0 t>=0 (L.to>=0 sn))
| ln : lnorm {LpSpace L 1 RealAbGroup.<=-refl} (lpInc 1 RealAbGroup.<=-refl (t - fmul t (L.trunc n.el))) = L.integral (L.abs (t - fmul t (L.trunc n.el)))
=> inv l1Int-abs-eq *> pmap l1Int (inv (RieszSpaceHom.func-abs {lpInc 1 RealAbGroup.<=-refl})) *> l1Int-char
\in (=_<= (pmap RealAbGroup.abs (inv f.toAddGroupHom.func-minus *> pmap f (inv (AddGroupHom.func-minus {lpInc 1 RealAbGroup.<=-refl}))))
<=∘ l1-bound-lnorm C>0 fC _ <=∘ RealField.<=_*_positive-right positivity (=_<= ln <=∘ L.integral-mono ab))
<∘r (RealField.<_*_positive-right (rat_real_<.1 C>0) s <∘l =_<= (inv RealField.*-assoc *> pmap (`* eps) (RealField.*-rat *> pmap Real.fromRat (RatField.finv-right (RatField.>_/= C>0))) *> ide-left)))
}
}