Live states (docs/roleflow.tex, sec:live) #
The density proof runs on live states: the values of the positions in a finite set A,
X_A = ∏_{v ∈ A} X_{σ v}. Here the sorts σ are read from one fixed context Γ (the
context of all variables of a program), so a live state is a function on the positions of Γ
that lie in A (LState Γ A), measured by the product lvol Γ A. Positions of A beyond
Γ are ignored.
The reorders between live states and values of contexts are measure-preserving measurable
equivalences, built from reorderEquiv:
- reading a live state at a duplicate-free list of positions that covers
A(LState.pick) givesX_A ≅ X_as(LState.pickEquiv,measurePreserving_pick); - if
Ais the disjoint union ofBand the positions of such a list, keepingBand reading the list givesX_A ≅ X_B × X_as(LState.extract,measurePreserving_extract), with Mathlib'smeasurePreserving_piEquivPiSubtypeProd.
A live state: a value for each position of Γ in A.
Equations
- RoleFlow.LState Γ A = ((i : RoleFlow.Pos Γ A) → RoleFlow.X (Γ.get ↑i))
Instances For
The product measure on live states.
Equations
- RoleFlow.lvol Γ A = MeasureTheory.Measure.pi fun (i : RoleFlow.Pos Γ A) => RoleFlow.μ (Γ.get ↑i)
Instances For
Reading a live state at a list of positions #
Read a live state at the positions xs.
Equations
- s.pick xs hA h j = RoleFlow.tr RoleFlow.X ⋯ (s (RoleFlow.LState.pickPos hA h j))
Instances For
If xs has no duplicates and covers A, the positions of xs are the positions of A.
Reorder: reading a live state at a duplicate-free list that covers A, as a measurable
equivalence X_A ≅ X_as.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Extracting positions from a live state #
Splitting: X_A ≅ X_B × X_as when A is the disjoint union of B and the positions
xs; it keeps the positions of B and reads those of xs.
Equations
- One or more equations did not get rendered due to their size.