Opt compile correctness
Cedar.Thm.Opt.compile.correctness
Project documentation
Correctness theorem for Opt.compile: Opt.compile produces the same term as SymCC.compile, and Opt.compile produces the same footprint as footprint
Exact Lean statement
theorem Opt.compile.correctness (x : Expr) (εnv : SymEnv) :
Opt.compile x εnv = (do
let term ← SymCC.compile x εnv
let footprint := footprint x εnv
.ok { term, footprint }
)Formal artifact
Lean source
theorem Opt.compile.correctness (x : Expr) (εnv : SymEnv) : Opt.compile x εnv = (do let term ← SymCC.compile x εnv let footprint := footprint x εnv .ok { term, footprint } ):= by cases x case lit p => exact Opt.compile.correctness.lit p εnv case var v => exact Opt.compile.correctness.var v εnv case and x₁ x₂ | or x₁ x₂ => first | exact (Opt.compile.correctness.andor x₁ x₂ εnv).left | exact (Opt.compile.correctness.andor x₁ x₂ εnv).right case ite x₁ x₂ x₃ => exact Opt.compile.correctness.ite x₁ x₂ x₃ εnv case unaryApp op x₁ => exact Opt.compile.correctness.unaryApp op x₁ εnv case binaryApp op x₁ x₂ => exact Opt.compile.correctness.binaryApp op x₁ x₂ εnv case getAttr x₁ attr => exact Opt.compile.correctness.getAttr x₁ attr εnv case hasAttr x₁ attr => exact Opt.compile.correctness.hasAttr x₁ attr εnv case set xs => exact Opt.compile.correctness.set xs εnv case record m => exact Opt.compile.correctness.record m εnv case call xfn args => exact Opt.compile.correctness.call xfn args εnv- Project
- Cedar Specification
- License
- Apache-2.0
- Commit
- 3f093947b8ae
- Source
- cedar-lean/Cedar/Thm/SymCC/Opt/Compiler.lean:1109-1130
Reuse this declaration
Bring the exact result into your workflow
The import identifies the source module. Your project still needs the pinned package dependency shown on this page.
What this badge means
This completion status comes from the project or community source. It has not yet been represented here as an independent rebuild and axiom audit.
Continue in this project
Related declarations
Find? ext
Cedar.Data.Map.find?_ext
Plain-language statement
Two well-formed maps are equal if they have the same find? for every key.
Source project: Cedar Specification
Person-level attribution pending.
Find? notmem keys
Cedar.Data.Map.find?_notmem_keys
Plain-language statement
Inverse of find?_mem_toList, except that this requires wf
Source project: Cedar Specification
Person-level attribution pending.
Find? some iff in values
Cedar.Data.Map.find?_some_iff_in_values
Plain-language statement
The mp direction of this does not need the wf precondition and, in fact, is available separately as find?_some_implies_in_values above
Source project: Cedar Specification
Person-level attribution pending.