Skip to content

feat(proofs): extend type safety — or/sub/mul operators + capability preorder#80

Merged
hyperpolymath merged 1 commit into
mainfrom
claude/sleepy-carson-bREoV
Jun 14, 2026
Merged

feat(proofs): extend type safety — or/sub/mul operators + capability preorder#80
hyperpolymath merged 1 commit into
mainfrom
claude/sleepy-carson-bREoV

Conversation

@hyperpolymath

Copy link
Copy Markdown
Owner

Summary

Builds on the now-verified WokeLang.lean (#79) by extending the type-safety proofs — Tier 1 (base operators) + Tier 3 (capability lattice) from AUDIT.md. Every addition is machine-checked under Lean 4.30.0 by the lean-proofs CI gate, still sorry-free, no axioms.

Tier 1 — base operators

Each adds a HasType rule + Step rule and full progress / preservation coverage (including the congruence and error-propagation cases):

  • or (logical) — mirrors the proven and.
  • sub, mul (integer) — mirror the proven add.

Tier 3 — capability lattice

  • capSubsumes_refl, capSubsumes_trans — capability subsumption is a preorder.

This is deliberately the order shape echo-types' DecorationStructure requires (≤-refl/≤-trans), keeping WokeLang's capability lattice on-path for a future echo/loss layer.

Echo-types design compatibility

Per your request, I checked echo-types main before extending, and documented it in AUDIT.md. The precedent is EchoEphapaxBridge: Ephapax (a linear-typed language) ports EchoLinear + EchoResidue into its prover as a separate L3 layer. So the echo/loss layer is a Mode-indexed decoration on top of the base type system — these base-operator extensions are orthogonal and compatible, and the capability preorder is a stepping stone toward it.

Verification

$ lean docs/proofs/verification/WokeLang.lean   # exit 0, sorry-free

Still open in Tier 1 (next increment)

Ordering comparisons (lt/gt/le/ge), div/mod (divide-by-zero → error panic, reusing the proven panic fragment), float variants, and array typing.

https://claude.ai/code/session_013wg3Mtq2QFhYi4XVw1Z6z7


Generated by Claude Code

…preorder

Tier 1 + Tier 3 extensions on the now-verified WokeLang.lean, each machine-
checked under Lean 4.30.0 (lean-proofs CI gate), still sorry-free, no axioms.

Tier 1 (base operators) — HasType + Step rules + full progress/preservation:
- `or`  (logical, mirrors `and`)
- `sub`, `mul` (integer, mirror `add`)

Tier 3 (capability lattice):
- `capSubsumes_refl`, `capSubsumes_trans` — capability subsumption is a
  preorder. Deliberately the order shape echo-types' `DecorationStructure`
  requires (≤-refl/≤-trans), keeping WokeLang on-path for a future echo layer.

Also checked echo-types `main` for design compatibility (AUDIT.md): the echo
layer is a Mode-indexed decoration ON TOP of the base type system (the Ephapax
L3 precedent), so these base extensions are orthogonal/compatible.

Still open in Tier 1: comparisons (lt/gt/le/ge), div/mod (panic), float, arrays.

https://claude.ai/code/session_013wg3Mtq2QFhYi4XVw1Z6z7
@hyperpolymath
hyperpolymath marked this pull request as ready for review June 14, 2026 04:23
@hyperpolymath
hyperpolymath merged commit da35ff4 into main Jun 14, 2026
13 of 16 checks passed
@hyperpolymath
hyperpolymath deleted the claude/sleepy-carson-bREoV branch June 14, 2026 04:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants