formal-ledger-specifications
formal-ledger-specifications copied to clipboard
Refactor `UTXO-inductive`
Since I'm thinking about it right now, here are some things that should help readability a bit:
-
UTXO-inductiveshould be renamed toUTXO. It's not an induction rule, so this name is just misleading. I think this name comes from a very old version of the Shelley spec where it was indeed an induction principle, and nobody bothered renaming it. - We have 5 checks in there that quantify over outputs. It might be a good idea to introduce some kind of
validOutputpredicate and replace all of those lines with∀[ (_ , txout) ∈ ∣ txoutsʰ ∣ ] validOutput txout. The only check that shouldn't go there is the one about theNetworkId, because of the next item. - Finally introduce a
transactionWellFormedpredicate, which checks all theNetworkIdchecks as well as thetxADhashcheck fromUTXOW. For now I think the best place to check this new predicate is as part ofUTXOW.