Documentation

SSA.Projects.LeanMlirCommon.SimplyTyped.Context

Γ.hasType v ty holds if Γ maps variable v to type ty

Equations
Instances For

    Γ.hasType v ty is decidable when our type universe has decidable equality

    Equations
    • MLIR.SimplyTyped.Context.instDecidableHasTypeOfDecidableEq = id inferInstance

    Γ.push v ty returns a context which maps v to ty, and works like Γ on all other variables

    Equations
    • Γ.push v ty = (v, ty) :: Γ
    Instances For
      @[simp]
      theorem MLIR.SimplyTyped.Context.hasType_push {Ty : Type} {v : MLIR.VarName} {ty : Ty} {Γ : MLIR.SimplyTyped.Context Ty} :
      (Γ.push v ty).hasType v ty
      @[simp]
      theorem MLIR.SimplyTyped.Context.hasType_push_of_neq {Ty : Type} {w : MLIR.VarName} {v : MLIR.VarName} {ty : Ty} {ty' : Ty} {Γ : MLIR.SimplyTyped.Context Ty} (h : w v) :
      (Γ.push v ty).hasType w ty' Γ.hasType w ty'

      ExtEq #

      Two contexts are extensionally equal if they map each variable to the same type

      Equations
      Instances For
        @[simp]
        theorem MLIR.SimplyTyped.Context.ExtEq.trans {Ty : Type} {Γ : MLIR.SimplyTyped.Context Ty} {Δ : MLIR.SimplyTyped.Context Ty} {Ξ : MLIR.SimplyTyped.Context Ty} :
        Γ.ExtEq ΔΔ.ExtEq ΞΓ.ExtEq Ξ
        instance MLIR.SimplyTyped.Context.instTransExtEq {Op : Type} :
        Trans MLIR.SimplyTyped.Context.ExtEq MLIR.SimplyTyped.Context.ExtEq MLIR.SimplyTyped.Context.ExtEq
        Equations
        • MLIR.SimplyTyped.Context.instTransExtEq = { trans := }
        theorem MLIR.SimplyTyped.Context.ExtEq.symm {Ty : Type} {Γ : MLIR.SimplyTyped.Context Ty} {Δ : MLIR.SimplyTyped.Context Ty} :
        Γ.ExtEq ΔΔ.ExtEq Γ
        theorem MLIR.SimplyTyped.Context.hasType_of_extEq {Ty : Type} {v : MLIR.VarName} {t : Ty} {Γ : MLIR.SimplyTyped.Context Ty} {Δ : MLIR.SimplyTyped.Context Ty} (h_eq : Γ.ExtEq Δ) (h : Δ.hasType v t) :
        Γ.hasType v t