Add ENTITIES preservation-of-value
Step 4 of the LEDGER preservation-of-value plan (#1187). Chains the
three lemmas already proved in steps 2-3 over the single ENTITIES
constructor:
applyWithdrawals-pov on (wdrls, r₀)
CERTS-pov on the inner ⟦ ... ,CERTS⦈ premise
applyDirectDeposits-pov on (dd, r₁)
The resulting equation is the value-flow statement for the whole rule:
getCoin s + getCoin (DirectDepositsOf Γ)
≡ getCoin s' + getCoin (WithdrawalsOf Γ)
ENTITIES-pov takes the two per-batch NetworkId witnesses as separate
arguments, mirroring extract-netId's output in the old #1190 LEDGER-pov
proof. These witnesses are produced at the call site by the
SUBUTXOW/UTXOW step and threaded into ENTITIES-pov from there.
The module ENTITIES-PoV inherits and re-exports the three set/map
parameters of ApplyToRewards-PoV (∪ˡ-lookup-preserve,
sum-map-proj₂≡getCoin, setToList-Unique), to be discharged in a
follow-up.
Also adds a top-level Entities.Properties module that re-exports the
two property submodules, matching the existing Certs.Properties
convention.