pRHL lens rules: self-shift, framing, and the EquivModuloLens bridge #
These are the rules that interact with the lens-based memory model:
ProgramDenotation.rel.self_shift/ProgramDenotation.relE.self_lens_set— relate a program to itself from two starting states that differ by an update outside its footprint (the relational packaging ofProgramDenotation.wp_shift_input_prob). This is the rule every client involving an abstract adversary needs.ProgramDenotation.rel.frame— strengthen a judgment with value constraints on lenses outside each side's footprint (the relational packaging ofProgramDenotation.wp_strengthen_lens_preserved_footprint).ProgramDenotation.EquivModuloLens.to_relE/ProgramDenotation.relE.to_equivModuloLens—EquivModuloLens L p qis exactly the diagonalrelEwhose post relates pairs with equal results and equalL-complement content. The existingEquivModuloLenscalculus remains the ergonomic API for the diagonal case; this bridge lets its lemmas feedrelchains and vice versa.
Self-shift: running p from f σ (for f outside p's footprint)
relates to running p from σ with the shift carried into the post.
Framing: a judgment can be strengthened with value constraints on a
lens outside each side's footprint. The proof strengthens the left post
with the L-frame (wp_strengthen_lens_preserved_footprint) and interpolates the
right post with a ⊤-override off the M-frame.
Two-sided form of ProgramDenotation.rel.self_shift.
Self-shift specialized to a lens write outside p's footprint:
running p from L.set v σ vs from σ.
Two-sided framing.
The EquivModuloLens bridge #
EquivModuloLens → relE: an equivalence-modulo-L is the diagonal
relE at the post "equal results, equal L-complement content".
relE → EquivModuloLens: conversely, the diagonal relE at the
L-complement-equality post yields an equivalence-modulo-L.