Commit 89166e9
proof(lean4): complete preservation + determinism; build Phronesis.lean on core Lean (#40)
Clears the two TODO/sorry placeholders in the Lean 4 type-safety formalization
by porting the big-step evaluation relation + theorems from the complete Coq
development (../coq/Phronesis.v):
* Eval : ValEnv -> PhrExpr -> PhrValue -> Prop (big-step, mirrors Coq)
* preservation : a well-typed closed expr evaluates to a value of its type
* determinism : evaluation is deterministic
Also makes the whole file actually compile (it imported Mathlib but had no
build setup and several core errors, so it had never been checked): drops the
unnecessary Mathlib imports (proofs use only core tactics), makes size and
containsDangerous structurally terminate via mutual helpers, drops the
non-core-derivable (unused) DecidableEq on PhrType, fixes le_refl and size
type annotations. Adds lakefile.lean + lean-toolchain (Lean v4.12.0, no deps)
so CI can build with only the toolchain.
Verified: lake build succeeds; '#print axioms' shows determinism depends on NO
axioms and preservation only on propext -- no sorryAx anywhere.
https://claude.ai/code/session_01DQACj3RFmAPZaBPgR9SAaS
Co-authored-by: Claude <noreply@anthropic.com>1 parent e9d102c commit 89166e9
5 files changed
Lines changed: 255 additions & 134 deletions
File tree
- academic/formal-verification/lean4
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
0 commit comments