Skip to content

Commit deaa607

Browse files
proofs(idris2): close #129 — overwriteIrreversible non-existence redesign (#137)
## Summary Closes #129. Replaces the non-theorem signature \`recovery randomData = Nothing\` (refuted by \`recovery = Just\`) with a non-existence quantifier flip and proves the redesigned theorem with a concrete counter-witness. ## What changed \`proofs/idris2/src/Filesystem/RMO.idr\`: \`\`\`idris overwriteIrreversible : (p : Path) -> (fs : Filesystem) -> Not ((recovery : FileContent -> Maybe FileContent) -> (orig : FileContent) -> (rand : FileContent) -> LTE (length orig) (length rand) -> recovery rand = Just orig) overwriteIrreversible p fs universal = let r : FileContent -> Maybe FileContent r = \\_ => Nothing eqEmpty : r [0] = Just [] eqEmpty = universal r [] [0] LTEZero eqOne : r [0] = Just [0] eqOne = universal r [0] [0] (LTESucc LTEZero) bad : Just (the FileContent []) = Just (the FileContent [0]) bad = trans (sym eqEmpty) eqOne in case bad of Refl impossible \`\`\` Two distinct origins (\`[]\` and \`[0]\`) plus rand \`[0]\` both satisfy the LTE precondition. If a universal recovery existed, it would have to return both \`Just []\` and \`Just [0]\` from the same input — contradiction via \`Just\` injectivity. \`proofs/idris2/README.md\` — hole list updated to reflect closure. ## Constraints honoured - ✅ Zero new axioms - ✅ No \`believe_me\` - ✅ Matches #60 / #61 / #119A theorem-shape redesign precedent - ✅ \`idris2 --build valence-shell.ipkg\` exit 0 (all 4 modules clean) ## Test plan - [x] \`grep -c '?overwriteIrreversible' RMO.idr\` → 0 - [x] \`believe_me\` policy guard passes - [x] Local build clean - [ ] CI \`idris-verification.yml\` green Closes #129. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 8318f73 commit deaa607

21 files changed

Lines changed: 88 additions & 102 deletions

File tree

.claude/CLAUDE.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -33,14 +33,14 @@ The following files in `.machine_readable/` contain structured project metadata:
3333

3434
| Language/Tool | Use Case | Notes |
3535
|---------------|----------|-------|
36-
| **ReScript** | Primary application code | Compiles to JS, type-safe |
36+
| **AffineScript** | Primary application code | Compiles to JS, type-safe |
3737
| **Deno** | Runtime & package management | Replaces Node/npm/bun |
3838
| **Rust** | Performance-critical, systems, WASM | Preferred for CLI tools |
3939
| **Tauri 2.0+** | Mobile apps (iOS/Android) | Rust backend + web UI |
4040
| **Dioxus** | Mobile apps (native UI) | Pure Rust, React-like |
4141
| **Gleam** | Backend services | Runs on BEAM or compiles to JS |
4242
| **Bash/POSIX Shell** | Scripts, automation | Keep minimal |
43-
| **JavaScript** | Only where ReScript cannot | MCP protocol glue, Deno APIs |
43+
| **JavaScript** | Only where AffineScript cannot | MCP protocol glue, Deno APIs |
4444
| **Python** | SaltStack only | No other Python permitted |
4545
| **Nickel** | Configuration language | For complex configs |
4646
| **Guile Scheme** | State/meta files | .machine_readable/6a2/STATE.a2ml, .machine_readable/6a2/META.a2ml, .machine_readable/6a2/ECOSYSTEM.a2ml |
@@ -52,13 +52,13 @@ The following files in `.machine_readable/` contain structured project metadata:
5252

5353
| Banned | Replacement |
5454
|--------|-------------|
55-
| TypeScript | ReScript |
55+
| TypeScript | AffineScript |
5656
| Node.js | Deno |
5757
| npm | Deno |
5858
| Bun | Deno |
5959
| pnpm/yarn | Deno |
6060
| Go | Rust |
61-
| Python (general) | ReScript/Rust |
61+
| Python (general) | AffineScript/Rust |
6262
| Java/Kotlin | Rust/Tauri/Dioxus |
6363
| Swift | Tauri/Dioxus |
6464
| React Native | Tauri/Dioxus |
@@ -68,15 +68,15 @@ The following files in `.machine_readable/` contain structured project metadata:
6868

6969
**No exceptions for Kotlin/Swift** - use Rust-first approach:
7070

71-
1. **Tauri 2.0+** - Web UI (ReScript) + Rust backend, MIT/Apache-2.0
71+
1. **Tauri 2.0+** - Web UI (AffineScript) + Rust backend, MIT/Apache-2.0
7272
2. **Dioxus** - Pure Rust native UI, MIT/Apache-2.0
7373

7474
Both are FOSS with independent governance (no Big Tech).
7575

7676
### Enforcement Rules
7777

78-
1. **No new TypeScript files** - Convert existing TS to ReScript
79-
2. **No package.json for runtime deps** - Use deno.json imports
78+
1. **No new TypeScript files** - Convert existing TS to AffineScript
79+
2. **No package.json - use deno.json deps** - Use deno.json imports
8080
3. **No node_modules in production** - Deno caches deps automatically
8181
4. **No Go code** - Use Rust instead
8282
5. **Python only for SaltStack** - All other Python must be rewritten
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

.machine_readable/svc/k9/examples/ci-config.k9.ncl renamed to .machine_readable/svc/self-validating/examples/ci-config.k9.ncl

File renamed without changes.

.machine_readable/svc/k9/examples/project-metadata.k9.ncl renamed to .machine_readable/svc/self-validating/examples/project-metadata.k9.ncl

File renamed without changes.

.machine_readable/svc/k9/examples/setup-repo.k9.ncl renamed to .machine_readable/svc/self-validating/examples/setup-repo.k9.ncl

File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)