Commit a1b205e
proof(p3.2): A16 — typed ProgressiveCheckW + progressive-order monotonicity
PROOF-NEEDS §P3.2 (A8) reframed the level-monotonicity claim under
the operational (untyped) `ProgressiveCheck`, leaving the stronger
"progressive-order" claim — achieving level N implies levels 1..N
were all visited — explicitly deferred:
> the stronger "progressive-order" claim requires redesigning
> `ProgressiveCheck` with a typed `level = S prevLevel` index and
> is left as future work.
A16 closes that deferred half.
What lands in src/abi/TypedWasm/ABI/Proofs.idr (~150 LOC appended, no
existing definition touched):
* `ProgressiveCheckW : (highestLevel : Nat) -> Type` — typed chain
built on top of the standards#130 `LevelAttestationW` family
(already in tree). Constructors enforce that each attestation
attest the exact level it sits at:
StartL1W : LevelAttestationW 1 -> ProgressiveCheckW 1
AdvanceW : (n : Nat)
-> ProgressiveCheckW n
-> LevelAttestationW (S n)
-> ProgressiveCheckW (S n)
Skipping levels (advancing L1 → L5 in one step) and out-of-order
attestations (attaching `AttestL3W` to a `ProgressiveCheckW 5`)
are now type errors — they cannot construct.
* `VisitedAt : (m : Nat) -> ProgressiveCheckW n -> Type` — sub-
derivation witness with three constructors (StartW / HeadW / TailW
shift).
* `lteSuccCases : {m, n : Nat} -> LTE m (S n) -> Either (m = S n)
(LTE m n)` — decidable case-split helper used by the recursion.
* `progressiveOrderW : (check : ProgressiveCheckW n) -> (m : Nat)
-> LT 0 m -> LTE m n -> VisitedAt m check`
— the progressive-order theorem. By induction on the check and
one LTE branch at each `AdvanceW` layer. Total.
* `chainAlwaysVisitsL1` — specialised corollary for the common
"L1 is the entry point" guarantee.
* `forgetProgressiveCheckW : ProgressiveCheckW n -> ProgressiveCheck`
— index-erasing bridge to the legacy untyped chain, so downstream
consumers can still feed `buildCertificate` via the typed API.
What lands in PROOF-NEEDS.md:
* New `RECONCILIATION 2026-06-03 (A16 — P3.2 progressive-order half
closed)` banner at the top.
* §P3.2 itself now records the closure with the typed-chain
signature, the bridge, and the "Purely additive" / "Zero escape
hatches" disclaimers.
* 3-line owner-line header normalisation (incidental hook
compliance — same micro-pattern as PR #153 / #155).
Purely additive arc. The legacy `ProgressiveCheck`,
`LevelAchievedIn`, `composeAchievedL/R`, and the entire
`buildCertificate` pipeline are untouched. No external caller of
`ProgressiveCheck` / `StartL1` / `Advance` exists in src/ /
examples/ / tests/ (grep-verified before landing), so the
additivity preserves the typed-wasm public surface.
Verification:
* Whole-package build rc=0, 22/22 modules, 0 errors (only pre-
existing shadowing warnings in unrelated modules — Epistemic,
Tropical, Choreography).
* `idris2 --check src/abi/TypedWasm/ABI/Proofs.idr` clean.
No `believe_me`, `assert_total`, `postulate`, `sorry`, `Admitted`,
or `assert_smaller` introduced. `%default total` preserved across
the arc.
Stacks on `proof/epistemic-fresh-pin-102` (#152) — same reason as
PR #155 (the HEAD build break PR #152 fixes is required for the
package build to pass).
Refs PROOF-NEEDS §P3.2 (the deferred half).
Refs #102, #152, #153, #155 (companion proof work in flight).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent aa7ee25 commit a1b205e
2 files changed
Lines changed: 262 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
1 | 5 | | |
2 | | - | |
3 | 6 | | |
4 | 7 | | |
5 | 8 | | |
| |||
20 | 23 | | |
21 | 24 | | |
22 | 25 | | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
23 | 91 | | |
24 | 92 | | |
25 | 93 | | |
| |||
852 | 920 | | |
853 | 921 | | |
854 | 922 | | |
855 | | - | |
856 | | - | |
857 | | - | |
858 | | - | |
859 | | - | |
860 | | - | |
| 923 | + | |
| 924 | + | |
| 925 | + | |
| 926 | + | |
| 927 | + | |
| 928 | + | |
| 929 | + | |
| 930 | + | |
| 931 | + | |
| 932 | + | |
| 933 | + | |
| 934 | + | |
| 935 | + | |
| 936 | + | |
| 937 | + | |
| 938 | + | |
| 939 | + | |
| 940 | + | |
| 941 | + | |
| 942 | + | |
| 943 | + | |
| 944 | + | |
| 945 | + | |
| 946 | + | |
| 947 | + | |
| 948 | + | |
| 949 | + | |
| 950 | + | |
| 951 | + | |
| 952 | + | |
| 953 | + | |
| 954 | + | |
| 955 | + | |
| 956 | + | |
| 957 | + | |
| 958 | + | |
| 959 | + | |
| 960 | + | |
| 961 | + | |
| 962 | + | |
| 963 | + | |
| 964 | + | |
| 965 | + | |
| 966 | + | |
| 967 | + | |
| 968 | + | |
861 | 969 | | |
862 | 970 | | |
863 | 971 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1548 | 1548 | | |
1549 | 1549 | | |
1550 | 1550 | | |
| 1551 | + | |
| 1552 | + | |
| 1553 | + | |
| 1554 | + | |
| 1555 | + | |
| 1556 | + | |
| 1557 | + | |
| 1558 | + | |
| 1559 | + | |
| 1560 | + | |
| 1561 | + | |
| 1562 | + | |
| 1563 | + | |
| 1564 | + | |
| 1565 | + | |
| 1566 | + | |
| 1567 | + | |
| 1568 | + | |
| 1569 | + | |
| 1570 | + | |
| 1571 | + | |
| 1572 | + | |
| 1573 | + | |
| 1574 | + | |
| 1575 | + | |
| 1576 | + | |
| 1577 | + | |
| 1578 | + | |
| 1579 | + | |
| 1580 | + | |
| 1581 | + | |
| 1582 | + | |
| 1583 | + | |
| 1584 | + | |
| 1585 | + | |
| 1586 | + | |
| 1587 | + | |
| 1588 | + | |
| 1589 | + | |
| 1590 | + | |
| 1591 | + | |
| 1592 | + | |
| 1593 | + | |
| 1594 | + | |
| 1595 | + | |
| 1596 | + | |
| 1597 | + | |
| 1598 | + | |
| 1599 | + | |
| 1600 | + | |
| 1601 | + | |
| 1602 | + | |
| 1603 | + | |
| 1604 | + | |
| 1605 | + | |
| 1606 | + | |
| 1607 | + | |
| 1608 | + | |
| 1609 | + | |
| 1610 | + | |
| 1611 | + | |
| 1612 | + | |
| 1613 | + | |
| 1614 | + | |
| 1615 | + | |
| 1616 | + | |
| 1617 | + | |
| 1618 | + | |
| 1619 | + | |
| 1620 | + | |
| 1621 | + | |
| 1622 | + | |
| 1623 | + | |
| 1624 | + | |
| 1625 | + | |
| 1626 | + | |
| 1627 | + | |
| 1628 | + | |
| 1629 | + | |
| 1630 | + | |
| 1631 | + | |
| 1632 | + | |
| 1633 | + | |
| 1634 | + | |
| 1635 | + | |
| 1636 | + | |
| 1637 | + | |
| 1638 | + | |
| 1639 | + | |
| 1640 | + | |
| 1641 | + | |
| 1642 | + | |
| 1643 | + | |
| 1644 | + | |
| 1645 | + | |
| 1646 | + | |
| 1647 | + | |
| 1648 | + | |
| 1649 | + | |
| 1650 | + | |
| 1651 | + | |
| 1652 | + | |
| 1653 | + | |
| 1654 | + | |
| 1655 | + | |
| 1656 | + | |
| 1657 | + | |
| 1658 | + | |
| 1659 | + | |
| 1660 | + | |
| 1661 | + | |
| 1662 | + | |
| 1663 | + | |
| 1664 | + | |
| 1665 | + | |
| 1666 | + | |
| 1667 | + | |
| 1668 | + | |
| 1669 | + | |
| 1670 | + | |
| 1671 | + | |
| 1672 | + | |
| 1673 | + | |
| 1674 | + | |
| 1675 | + | |
| 1676 | + | |
| 1677 | + | |
| 1678 | + | |
| 1679 | + | |
| 1680 | + | |
| 1681 | + | |
| 1682 | + | |
| 1683 | + | |
| 1684 | + | |
| 1685 | + | |
| 1686 | + | |
| 1687 | + | |
| 1688 | + | |
| 1689 | + | |
| 1690 | + | |
| 1691 | + | |
| 1692 | + | |
| 1693 | + | |
| 1694 | + | |
| 1695 | + | |
| 1696 | + | |
| 1697 | + | |
0 commit comments