This file contains theorems saying that compile succeeds
with the correct term type on well-typed expressions.
States the symbolic compiler succeeds on a typed expression tx and
produces a term t with the corresponding type.
Equations
- Cedar.Thm.CompileWellTyped tx εnv = ∃ (t : Cedar.SymCC.Term), Cedar.SymCC.compile tx.toExpr εnv = Except.ok t ∧ t.typeOf = (Cedar.SymCC.TermType.ofType tx.typeOf).option
Instances For
A sufficient condition for CompileWellTyped to hold.
Equations
- Cedar.Thm.CompileWellTypedCondition tx Γ εnv = (εnv = Cedar.SymCC.SymEnv.ofEnv Γ ∧ Cedar.Thm.TypedExpr.WellTyped Γ tx ∧ εnv.WellFormedFor tx.toExpr)
Instances For
A stronger version of CompileWellTyped that
also includes well-formedness of the term
Equations
- One or more equations did not get rendered due to their size.
Instances For
If some attribute exists in a record type,
then it should still exist after applying TermType.ofRecordType
Combined case for or and and
Similar to compileApp₂_wf_types, but for compile
Since we have the nice lemma compileApp₂_wf_types,
it's enough to prove that compile of a binaryApp succeeds.
Compiling a well-typed expression should produce a term of the corresponding TermType,
assuming that the expression is well-formed in the symbolic environment.