IntersectMBO / IntersectMBO/formal-ledger-specifications
Typo and informal notation in Babbage spec pdf
- Dominant language
- Agda
- Stars
- 52
- Forks
- 20
- Avg merge
- 6d 14h
- Merged PRs (30d)
- 7
Description
In the [babbage-ledger.pdf](https://github.com/IntersectMBO/cardano-ledger/releases/download/cardano-ledger-spec-2023-04-03/babbage-ledger.pdf) formal spec document, `txscripts` is defined as follows:
```agda
txscripts : Tx → UTxO → ScriptHash →∗ Script
txscripts tx utxo = txwitscripts tx ∪ refScripts tx utxo
```
Thus `txscripts tx utxo` has type `ScriptHash →∗ Script`, which is essentially a collection of `(hash, script)` pairs, so the expression
```agda
s ∈ range(txscripts tx utxo )
```
is well typed, but the expression
```agda
s ∈ txscripts tx utxo
```
in Fig 2 is ill-typed, so must be a typo.
Also, in Fig 6, in the expression,
```agda
∀s ∈ (txscripts txw utxo neededHashes ) ∩ Scriptᵖʰ¹
```
an informal shorthand is used to apply a function `txscripts txw utxo` to a collection `neededHashes` of elements in its domain. One way to express this more formally would be as as follows:
```agda
∀s ∈ map proj₂ ((txscripts txw utxo) ∩ (neededHashes × Scriptᵖʰ¹))
```
Contributor guide
Assessment
This issue has not been assessed yet.