Skip to content

feat(formal): add Lean 4 discrete-event kernel model and CI gate - #10

Merged
imMamdouhaboammar merged 2 commits into
mainfrom
feat/milestone-1-formal-lean-kernel
Nov 14, 2026
Merged

imMamdouhaboammar merged 2 commits into
mainfrom
feat/milestone-1-formal-lean-kernel

Conversation

@imMamdouhaboammar

Copy link
Copy Markdown
Contributor

Summary

Adds the formal Lean 4 discrete-event kernel model, mechanized proofs, and CI gate for Milestone 1 formal verification of the FunnelScript event kernel.

Key Deliverables

  • Lean 4 Formal Model (formal/Formal/Kernel.lean): Pinned to Lean 4.35.0, implements finite discrete-time event calendar ordering by (time, priority, insertion ordinal), small-step functional transition advance, legal non-retrograde emission witness, and fuel-bounded run.
  • Mechanized Proofs (formal/Formal/Theorems.lean):
    • timestamp_monotonicity: Mechanized proof that processed event timestamps are monotonically non-decreasing over successful executions (ChronologicalFrom).
    • deterministic_replay: Mechanized proof that identical initial machine state, seed, and fuel produce identical final trace.
    • unique_advance: Functional determinism theorem proving transition results cannot diverge.
    • Proof check verified with 0 untrusted proof constructs (sorry, admit, or custom axioms).
  • GitHub Actions Gate (.github/workflows/formal-lean.yml): Automated CI running lake build and untrusted construct check on push and pull requests.
  • Repository Hygiene (.gitignore): Hardened gitignore against OS metadata and build artifacts.

Verification

  • cd formal && lake build: 5 jobs completed successfully.
  • Proof hole scan: 0 sorry/admit/axiom occurrences found.
  • Python research suite: uv run --no-project --python 3.12 --with pytest pytest -v (63 passed, 154 subtests passed).
  • Unittest discover: python3 -m unittest discover -s tests -v (10 passed).

@imMamdouhaboammar
imMamdouhaboammar merged commit 9f09595 into main Nov 14, 2026
2 checks passed
@imMamdouhaboammar
imMamdouhaboammar deleted the feat/milestone-1-formal-lean-kernel branch November 14, 2026 14:54
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.

1 participant