Documentation

Cedar.Thm.Validation.Typechecker.Or

This file proves that typechecking of .or expressions is sound.

theorem Cedar.Thm.type_of_or_is_sound {x₁ x₂ : Spec.Expr} {c₁ c₂ : Validation.Capabilities} {env : Validation.TypeEnv} {ty : Validation.TypedExpr} {request : Spec.Request} {entities : Spec.Entities} (h₁ : CapabilitiesInvariant c₁ request entities) (h₂ : InstanceOfWellFormedEnvironment request entities env) (h₃ : Validation.typeOf (x₁.or x₂) c₁ env = Except.ok (ty, c₂)) (ih₁ : TypeOfIsSound x₁) (ih₂ : TypeOfIsSound x₂) :
GuardedCapabilitiesInvariant (x₁.or x₂) c₂ request entities (v : Spec.Value), EvaluatesTo (x₁.or x₂) request entities v InstanceOfType env v ty.typeOf