fvP: the computed-footprint (free-variables) layer over Footprint #
The probabilistic re-incarnation of the old FV development (now quarantined as
CounterExamples/FV.lean), rebased from the deterministic DetermFootprint/Function.End
foundation onto Footprint and the Kleisli monoid of sub-probability kernels
m → SubProbability m.
It instantiates the generic InductiveFunctionGettersSetters/ReducibleGettersSetters
machinery (from Language.Modules.InductiveFunctions) at T := Footprint, giving a
syntactic over-approximation fvP of the part of the state a Module/Procedure can
read or modify, together with the soundness bound fvP (m.toModule) ≤ fvPMexpr m.
fvP_extend_sup #
Kleisli product of a × b-kernels in bind form.
Lens.liftFootprint distributes over arbitrary indexed suprema.
Generalises Lens.liftFootprint_sup from binary joins to indexed families.
End of fvP_extend_sup #
Lens.reduceFootprint_sup #
End of Lens.reduceFootprint_sup #
Family version of ProgramDenotation.footprint: the supremum of the per-input ranges. Used to
give a setter (which is a family a → ProgramDenotation s Unit, one program per written value) a
single footprint.
Equations
- GaudisCrypt.ProgramDenotation.footprint' progs = ⨆ (x : a), (progs x).footprint
Instances For
Properties of Lens.reduceFootprint / Lens.liftFootprint needed for the framework instance. #
lens.liftSubProbability is a monoid homomorphism, and the resulting closure algebra. #
lens.liftSubProbability preserves the identity kernel.
A diracKer of a localized deterministic update is the updateK of the base diracKer
(alias of Lens.liftSubProbability_diracKer, kept under the updateK naming of this file).
Lens.reduceFootprint is a retraction of Lens.liftFootprint (reduce (extend r) ≤ r):
pushing a footprint forward along a lens and pulling it back recovers at most it.
Proven in full from updateK being a monoid homomorphism
(centralizer_preimage_image_subset).
Lens.reduceFootprint is an exact left inverse of Lens.liftFootprint (strengthening
Lens.reduceFootprint_extend to equality): every p ∈ r.updates is itself
Lens.reduceSubProbability lens (lens.liftSubProbability p, i, o) for the trivial
i () = pure β / o _ = pure (), hence lies in the generator set defining Lens.reduceFootprint.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Instances For
Equations
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
Instances For
Equations
Instances For
EasyCrypt's glob A: the getter reading everything the procedure A may touch —
the touched_getter of its computed footprint. ={glob A} between two states is
(glob A).get σ₁ = (glob A).get σ₂: the states differ only by updates outside
fvP_proc A.
Equations
Instances For
Footprint/reduce/lift algebra #
General footprint, Lens.reduceFootprint and Lens.liftFootprint facts, independent of any particular
program spec.
A chained lens's footprint is the liftFootprint of the inner lens's footprint through the
outer lens (generator-level): diracKer ((L.chain v).liftFunction g) is exactly
L.liftSubProbability (diracKer (v.liftFunction g)). The chained overwrite is the inner
overwrite performed on the L-content and written back.
The lift of a v.footprint-update commutes with every R-update, when the
L-reduction of R is disjoint from v.footprint — the lens-region instance of
Footprint.liftSubProbability_comm_reduce_compl.
A chained lens's footprint lies in Rᶜ whenever the inner footprint's L-reduction does:
from Lens.reduceFootprint L R ≤ (v.footprint)ᶜ conclude R ≤ ((L.chain v).footprint)ᶜ. Route: flip the
goal via le_compl_comm to (L.chain v).footprint ≤ Rᶜ, then show each generator
L.liftSubProbability (diracKer (v.liftFunction g)) commutes with every k ∈ R.updates via
liftSubProbability_comm_of_reduce_disj.
globalL.liftSubProbability f applied to a padded state applies f to the global.
Reading the global out of globalL.liftSubProbability f recovers f on the global.
A sampled value's footprint is trivial — μ.toProgramDenotation only draws its result, it
touches no state, so it lies in ⊥ (mirrors inFootprint_uniform for an arbitrary μ).
Chained and FromLens footprints #
Moved here from Footprint.lean: the chain law's nontrivial inclusion — the intermediate
bicommutant closure adds nothing — is exactly the Lens.liftFootprint_updates extraction.
The complement of Lens.fst, as a footprint, is Lens.snd. (Lens.fst).compl
has abstract ComplContent type, so this is a footprint equality (via the getter
that identifies fst.compl.get with snd.get), not a lens equality.