You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(proofs): close proof holes — eliminate postulates, Obj.magic, and {!!} holes
Agda proof closure:
- FileContentOperations: _≟ₚ_ postulate replaced with proven _path-≟_ from
FilesystemModel; writeFileSameContent-proof postulate replaced with full
constructive proof via funext + content-restore-lemma
- RMOOperations: FALSE obliterate-not-reversible postulate replaced with
proven obliterate-not-injective (correct formalization of information loss)
- CopyMoveOperations: all 10 {!!} holes filled; file rewritten with correct
names from FilesystemModel/FileOperations; all theorems proven including
moveFile-reversible via funext + pointwise case analysis
- FilesystemModel: funext postulate annotated as standard axiom (HoTT 2.9.3)
ReScript type safety:
- Server.res: all 24 Obj.magic calls replaced with type-safe toolResultToJson
conversion function defined in Mcp.res bindings
Remaining: 1 Coq gap (obliterate_overwrites_all_blocks), 1 standard axiom (funext)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|**Structural**| 2 | 0 | Standard type theory axioms |
14
-
|**Total**|**10**|**-21**||
13
+
|**Structural**| 1 | -1 |`funext` only (`_≟ₚ_` proven via `_path-≟_`) |
14
+
|**Total**|**6**|**-25**||
15
+
16
+
### What Was Closed (2026-04-03 proof closure session)
17
+
18
+
**Agda proof holes eliminated:**
19
+
-`agda/FileContentOperations.agda` — `_≟ₚ_` postulate REMOVED: now delegates to proven `_path-≟_` from FilesystemModel
20
+
-`agda/FileContentOperations.agda` — `writeFileSameContent-proof` postulate PROVEN: via funext + content-restore-lemma (same pattern as writeFileReversible)
21
+
-`agda/RMOOperations.agda` — FALSE `obliterate-not-reversible` postulate REPLACED with proven `obliterate-not-injective` (correct formalization of information loss)
22
+
-`agda/CopyMoveOperations.agda` — ALL 10 `{!!}` holes FILLED: rewrote file using correct names from FilesystemModel/FileOperations, proved all theorems including moveFile-reversible via funext + pointwise case analysis
23
+
-`agda/FilesystemModel.agda` — `funext` postulate ANNOTATED as standard axiom (provable in cubical Agda, consistent with intensional TT)
24
+
25
+
**ReScript Obj.magic elimination:**
26
+
-`impl/mcp/src/Server.res` — ALL 24 `Obj.magic` calls REPLACED with type-safe `toolResultToJson` conversion function defined in Mcp.res bindings
15
27
16
28
### What Was Closed (2026-03-08 P5 session)
17
29
@@ -50,12 +62,13 @@ The `obliterate_not_reversible` theorem was **FALSE as stated** in all 3 systems
50
62
51
63
Replaced with `obliterate_not_injective` — the correct formalization of "not reversible" as information loss: different starting states produce the same result after obliteration.
52
64
53
-
## Structural Axioms (2) — Standard Type Theory
65
+
## Structural Axioms (1) — Standard Type Theory
54
66
55
67
| File | Line(s) | Name | Nature |
56
68
|------|---------|------|--------|
57
-
|`agda/FilesystemModel.agda`| 157-159 |`funext`| Functional extensionality (standard in intensional TT) |
|`agda/FilesystemModel.agda`| 161-163 |`funext`| Functional extensionality (standard in intensional TT, provable in cubical Agda) |
70
+
71
+
~~`agda/FileContentOperations.agda``_≟ₚ_`~~**RESOLVED 2026-04-03** — Now delegates to proven `_path-≟_` from FilesystemModel (structural recursion on List String with Data.String._≟_).
59
72
60
73
## Well-Formedness Axioms (2) — Added 2026-03-08
61
74
@@ -66,7 +79,7 @@ Replaced with `obliterate_not_injective` — the correct formalization of "not r
66
79
67
80
These are provable by induction on path length but require significant infrastructure. Axiomatized with clear specifications.
68
81
69
-
## Remaining Real Gaps (3)
82
+
## Remaining Real Gaps (1)
70
83
71
84
### RMO Storage Proofs (1 gap remaining — low priority)
72
85
@@ -80,16 +93,16 @@ three auxiliary lemmas (`overwriteBlock_determined_by_shape`, `overwritePathBloc
80
93
must have same blockId/length/overwriteCount) and `hlen` (patterns nonempty). After one deterministic
81
94
overwrite pass, mapped blocks become byte-identical; remaining passes operate on equal inputs.
|`agda/CopyMoveOperations.agda`| 260 |`delete-after-update`| delete_file = fsUpdate nothing after fsUpdate just |
103
+
~~`agda/FileContentOperations.agda``writeFileSameContent-proof`~~**PROVEN** — via funext + content-restore-lemma.
91
104
92
-
Both have full proof sketches and are proven in corresponding Lean 4/Coq files. The Agda proofs are deferred due to with-clause complexity.
105
+
~~`agda/CopyMoveOperations.agda` holes~~**PROVEN** — File rewritten with correct names from FilesystemModel/FileOperations. All theorems proven including moveFile-reversible via funext + pointwise case analysis on fsUpdate properties.
93
106
94
107
## Pre-existing Axioms (unchanged)
95
108
@@ -100,10 +113,10 @@ Both have full proof sketches and are proven in corresponding Lean 4/Coq files.
100
113
101
114
## Recommendations
102
115
103
-
1.**3 remaining gaps are all low-medium priority** — RMO is not user-facing, Agda proofs exist in Lean 4
104
-
2.**Axiom count is healthy** — 4 new axioms are well-known filesystem/type theory properties
116
+
1.**1 remaining gap is low priority** — Coq `obliterate_overwrites_all_blocks` requires mechanical induction, not conceptually hard
117
+
2.**Axiom count is minimal** — 1 structural (funext), 2 well-formedness, 6 decidability, 1 Coq funext = all standard
105
118
3.**Model improvement needed**: Parameterize `mkdir`/`createFile` with permissions for full reverse-direction reversibility
0 commit comments