Statement Type
Statement: Conditional (if)
Theorem: conditional_equiv
File: Compiler/Proofs/YulGeneration/StatementEquivalence.lean:187
Description
Prove that executing conditional (if) 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: Medium-High
- Estimated Effort: 4-8h
- Dependencies: Recursive equivalence for branches
Acceptance Criteria
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:187
- Preservation Theorem:
Compiler/Proofs/YulGeneration/Preservation.lean
Getting Started
- Read the roadmap context in
docs/ROADMAP.md
- Review the theorem stub in
StatementEquivalence.lean:187
- Study the worked example (variable assignment) for proof patterns
- Review IR and Yul semantics for this statement type
- Replace
sorry with your proof
- Add smoke tests to verify your proof works
- 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
Statement Type
Statement:
Conditional (if)Theorem:
conditional_equivFile:
Compiler/Proofs/YulGeneration/StatementEquivalence.lean:187Description
Prove that executing conditional (if) statements in IR matches executing them in Yul when states are aligned.
IR Semantics: See
Compiler/Proofs/IRGeneration/IRInterpreter.leanYul Semantics: See
Compiler/Proofs/YulGeneration/Semantics.leanProof Strategy
See theorem stub in
StatementEquivalence.leanfor detailed proof strategy and the worked example (variable assignment) for proof pattern.Difficulty & Effort
Acceptance Criteria
sorryin theorem stub with complete proofCompiler/Proofs/YulGeneration/SmokeTests.leandemonstrating equivalenceReferences
docs/ROADMAP.md- Layer 3 sectionCompiler/Proofs/IRGeneration/IRInterpreter.leanCompiler/Proofs/YulGeneration/Semantics.leanCompiler/Proofs/YulGeneration/Equivalence.leanCompiler/Proofs/YulGeneration/StatementEquivalence.lean:187Compiler/Proofs/YulGeneration/Preservation.leanGetting Started
docs/ROADMAP.mdStatementEquivalence.lean:187sorrywith your proofQuestions?
Ask in the PR or open a discussion. See
Compiler/Proofs/README.mdfor 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