Documentation

Cedar.Thm.SymCC.Compiler.Binary

This file proves the compilation lemmas for .binaryApp expressions. #

theorem Cedar.Thm.interpret_compileInₑ {t₁ t₂ : SymCC.Term} {ety₁ ety₂ : Spec.EntityType} {εs : SymCC.SymEntities} {I : SymCC.Interpretation} (hwε : εs.WellFormed) (hI : I.WellFormed εs) (hwφ₁ : SymCC.Term.WellFormed εs t₁) (hwφ₂ : SymCC.Term.WellFormed εs t₂) (hwl₁ : SymCC.Term.WellFormed εs (SymCC.Term.interpret I t₁) (SymCC.Term.interpret I t₁).typeOf = t₁.typeOf) (hwl₂ : SymCC.Term.WellFormed εs (SymCC.Term.interpret I t₂) (SymCC.Term.interpret I t₂).typeOf = t₂.typeOf) (hty₁ : t₁.typeOf = SymCC.TermType.entity ety₁) (hty₂ : t₂.typeOf = SymCC.TermType.entity ety₂) :
theorem Cedar.Thm.interpret_compileInₛ {t₁ t₂ : SymCC.Term} {ety₁ ety₂ : Spec.EntityType} {εs : SymCC.SymEntities} {I : SymCC.Interpretation} (hwε : εs.WellFormed) (hI : I.WellFormed εs) (hwφ₁ : SymCC.Term.WellFormed εs t₁) (hwφ₂ : SymCC.Term.WellFormed εs t₂) (hwl₁ : SymCC.Term.WellFormed εs (SymCC.Term.interpret I t₁) (SymCC.Term.interpret I t₁).typeOf = t₁.typeOf) (hwl₂ : SymCC.Term.WellFormed εs (SymCC.Term.interpret I t₂) (SymCC.Term.interpret I t₂).typeOf = t₂.typeOf) (hty₁ : t₁.typeOf = SymCC.TermType.entity ety₁) (hty₂ : t₂.typeOf = (SymCC.TermType.entity ety₂).set) :
theorem Cedar.Thm.interpret_hasTag {t₁ t₂ : SymCC.Term} {ety : Spec.EntityType} {εs : SymCC.SymEntities} {τs : SymCC.SymTags} {I : SymCC.Interpretation} (hwτ : SymCC.SymTags.WellFormed εs ety τs) (hI : I.WellFormed εs) (hwφ₁ : SymCC.Term.WellFormed εs t₁) (hwφ₂ : SymCC.Term.WellFormed εs t₂) (hty₁ : t₁.typeOf = SymCC.TermType.entity ety) :
theorem Cedar.Thm.interpret_getTag {t₁ t₂ : SymCC.Term} {ety : Spec.EntityType} {εs : SymCC.SymEntities} {τs : SymCC.SymTags} {I : SymCC.Interpretation} (hwτ : SymCC.SymTags.WellFormed εs ety τs) (hI : I.WellFormed εs) (hwφ₁ : SymCC.Term.WellFormed εs t₁) (hwφ₂ : SymCC.Term.WellFormed εs t₂) (hty₁ : t₁.typeOf = SymCC.TermType.entity ety) (hty₂ : t₂.typeOf = SymCC.TermType.string) :
theorem Cedar.Thm.compile_interpret_binaryApp {op₂ : Spec.BinaryOp} {x₁ x₂ : Spec.Expr} {εnv : SymCC.SymEnv} {I : SymCC.Interpretation} {t : SymCC.Term} (hI : I.WellFormed εnv.entities) (hwε : εnv.WellFormedFor (Spec.Expr.binaryApp op₂ x₁ x₂)) (hok : SymCC.compile (Spec.Expr.binaryApp op₂ x₁ x₂) εnv = Except.ok t) (ih₁ : CompileInterpret x₁) (ih₂ : CompileInterpret x₂) :
theorem Cedar.Thm.same_entities_ancestors_none_of_type {es : Spec.Entities} {εs : SymCC.SymEntities} {e₁ e₂ : Spec.EntityUID} (heq : es εs) (hno : εs.ancestorsOfType e₁.ty e₂.ty = none) :
¬e₂ es.ancestorsOrEmpty e₁
theorem Cedar.Thm.compile_evaluate_binaryApp {op₂ : Spec.BinaryOp} {x₁ x₂ : Spec.Expr} {env : Spec.Env} {εnv : SymCC.SymEnv} {t : SymCC.Term} (heq : env εnv) (hwe : env.WellFormedFor (Spec.Expr.binaryApp op₂ x₁ x₂)) (hwε : εnv.WellFormedFor (Spec.Expr.binaryApp op₂ x₁ x₂)) (hok : SymCC.compile (Spec.Expr.binaryApp op₂ x₁ x₂) εnv = Except.ok t) (ih₁ : CompileEvaluate x₁) (ih₂ : CompileEvaluate x₂) :