Documentation

Cedar.Thm.WellTyped.Expr.Typechecking

This file contains expression-kind-specific lemmas of the theorem typechecked_is_well_typed_after_lifting

theorem Cedar.Thm.typechecked_is_well_typed_after_lifting_ite {cond thenExpr elseExpr : Spec.Expr} {c₁ c₂ : Validation.Capabilities} {env : Validation.TypeEnv} {ty : Validation.TypedExpr} (hᵢ₁ : ∀ {c₂ : Validation.Capabilities} {ty : Validation.TypedExpr}, Validation.typeOf cond c₁ env = Except.ok (ty, c₂)TypedExpr.WellTyped env ty.liftBoolTypes) (hᵢ₂ : ∀ (c₁_1 : Validation.Capabilities) {c₂ : Validation.Capabilities} {ty : Validation.TypedExpr}, Validation.typeOf thenExpr (c₁ c₁_1) env = Except.ok (ty, c₂)TypedExpr.WellTyped env ty.liftBoolTypes) (hᵢ₃ : ∀ {c₂ : Validation.Capabilities} {ty : Validation.TypedExpr}, Validation.typeOf elseExpr c₁ env = Except.ok (ty, c₂)TypedExpr.WellTyped env ty.liftBoolTypes) :
Validation.typeOf (cond.ite thenExpr elseExpr) c₁ env = Except.ok (ty, c₂)TypedExpr.WellTyped env ty.liftBoolTypes

The type checker produces typed expressions that are well-typed after type lifting. TODO: move this around after the proof is fixed