Binder / higher-order / ∀ transfer (as lemmas) #
Ground transfer handles closed op-trees. This module provides the
binder/higher-order/∀ capability as proven generic lemmas plus their
demonstrations on the existing realizations (the full MetaM ⟦·⟧ that
auto-applies these under elaboration is provided by the term-level translator).
- Function / fold transfer —
funMap_transfer,foldl_transfer: a commuting square lifts throughλ/List.foldl, so a function or a fold of a realized op transfers, generalizing the fixedOpExpr/PExprshapes to arbitrary arity. - ∀-transfer —
forall_transfer: a∀-quantified statement transfers from the pointwise transfer (forall_congr'). The security-game / verifier statements (∀ inputs, verify_eval … ↔ byte-check …) transfer this way. - Higher-order combinator transfer —
foldl_transferis thefoldlcombinator transfer;List.sum/Finset.sumare corollaries (sum =foldl (+);Finset.sumvia anAddMonoidHomwhen the byte side is a monoid).
The non-fabrication invariant holds: every lemma takes the commuting
square (comm / the pointwise transfer) as an explicit premise — the bound /
quantified / aggregated transfer composes a given witness, never invents one.
Function and fold transfer (generic) #
Function transfer. A commuting square lifts to a function argument: the
encoded value of op (f b) (g b) is the byte op on the encoded components —
the λ-rule at a concrete point.
Fold transfer. A commuting square lifts through List.foldl: the encoded
fold of op over a list equals the byte fold of bop over the encoded list.
Generalizes the fixed-arity OpExpr/PExpr composites to arbitrary lists.