Documentation

Cedar.Thm.Validation.Typechecker.HasAttr

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

theorem Cedar.Thm.type_of_hasAttr_is_sound {x₁ : Spec.Expr} {a : Spec.Attr} {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₁.hasAttr a) c₁ env = Except.ok (ty, c₂)) (ih : TypeOfIsSound x₁) :
GuardedCapabilitiesInvariant (x₁.hasAttr a) c₂ request entities (v : Spec.Value), EvaluatesTo (x₁.hasAttr a) request entities v InstanceOfType env v ty.typeOf