Skip to content

Add emptyScan to the Lean Phase 1 plan model - #1418

Merged
SkBlaz merged 2 commits into
masterfrom
copilot/update-readme-after-issue-resolution
Jul 13, 2026
Merged

Add emptyScan to the Lean Phase 1 plan model#1418
SkBlaz merged 2 commits into
masterfrom
copilot/update-readme-after-issue-resolution

Conversation

Copilot AI commented Jul 12, 2026

Copy link
Copy Markdown
Contributor

This extends the formal Phase 1 model to cover one more concrete optimizer primitive from the Python plan tree: LogicalEmptyScan. It closes a gap in the formal TODO list by modeling empty scans explicitly instead of encoding them indirectly as scan [].

  • Lean plan model

    • Added Plan.emptyScan to formal/Py3plex/DSL/Syntax.lean
    • Mapped it directly to Python's LogicalEmptyScan
  • Lean semantics

    • Added Plan.eval_emptyScan
    • Updated Plan.filter_empty_scan to state the ShortCircuitEmptyLayer behavior in terms of emptyScan
  • Formal docs / roadmap

    • Marked Plan.emptyScan as completed in formal/README.md
    • Updated the Phase 1 proof table and Python↔Lean mapping to include emptyScan
    • Clarified the ShortCircuitEmptyLayer correspondence around emptyScan.eval = []
  • Alignment guardrails

    • Extended tests/test_formal_phase1_alignment.py to enforce:
      • Plan.emptyScan is documented
      • the Python↔Lean mapping stays present
      • Plan.eval_emptyScan remains part of the Lean semantics surface
inductive Plan (α : Type) where
  | scan : List α → Plan α
  | emptyScan : Plan α
  | filter : (α → Bool) → Plan α → Plan α

theorem Plan.eval_emptyScan :
    ((Plan.emptyScan : Plan α)).eval = [] := rfl

Copilot AI linked an issue Jul 12, 2026 that may be closed by this pull request
Copilot AI changed the title [WIP] Update readme after completing task from todos Add emptyScan to the Lean Phase 1 plan model Jul 12, 2026
Copilot AI requested a review from SkBlaz July 12, 2026 18:23
@SkBlaz
SkBlaz marked this pull request as ready for review July 13, 2026 03:18
@SkBlaz
SkBlaz merged commit eabd310 into master Jul 13, 2026
38 checks passed
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.

lean coverage

2 participants