Skip to content

[Layer 3] Prove variable assignment statement equivalence #28

@Th0rgal

Description

@Th0rgal

Statement Type

Statement: Variable Assignment
Theorem: assign_equiv
File: Compiler/Proofs/YulGeneration/StatementEquivalence.lean:70

Description

Prove that executing variable assignment statements in IR matches executing them in Yul when states are aligned.

IR Semantics: See Compiler/Proofs/IRGeneration/IRInterpreter.lean
Yul Semantics: See Compiler/Proofs/YulGeneration/Semantics.lean

Proof Strategy

See theorem stub in StatementEquivalence.lean for detailed proof strategy and the worked example (variable assignment) for proof pattern.

Difficulty & Effort

  • Difficulty: Low
  • Estimated Effort: 1h
  • Dependencies: None

Acceptance Criteria

  • Replace sorry in theorem stub with complete proof
  • Add tests in Compiler/Proofs/YulGeneration/SmokeTests.lean demonstrating equivalence
  • Update roadmap progress table (docs/ROADMAP.md) to mark as ✅ Complete
  • CI passes (all proofs check, no new sorries)
  • PR review approved

References

  • Roadmap: docs/ROADMAP.md - Layer 3 section
  • IR Semantics: Compiler/Proofs/IRGeneration/IRInterpreter.lean
  • Yul Semantics: Compiler/Proofs/YulGeneration/Semantics.lean
  • Equivalence Definitions: Compiler/Proofs/YulGeneration/Equivalence.lean
  • Theorem Stub: Compiler/Proofs/YulGeneration/StatementEquivalence.lean:70
  • Preservation Theorem: Compiler/Proofs/YulGeneration/Preservation.lean

Getting Started

  1. Read the roadmap context in docs/ROADMAP.md
  2. Review the theorem stub in StatementEquivalence.lean:70
  3. Study the worked example (variable assignment) for proof patterns
  4. Review IR and Yul semantics for this statement type
  5. Replace sorry with your proof
  6. Add smoke tests to verify your proof works
  7. Submit PR referencing this issue

Questions?

Ask in the PR or open a discussion. See Compiler/Proofs/README.md for proof development guide.


Part of: Layer 3 (IR → Yul) verification completion
Blocks: End-to-end verification EDSL → Bytecode
Related: All 8 statement proofs must be completed before composition theorem

Metadata

Metadata

Assignees

No one assigned

    Labels

    good-first-issueGood for newcomershelp-wantedExtra attention is neededlayer-3Layer 3 (IR → Yul) verification proofsleanLean 4 codeproofLean proof work

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions