Documentation

SSA.Projects.LeanMlirCommon.SimplyTyped.Basic

Types #

def MLIR.SimplyTyped.Var {Ty : Type} (Γ : MLIR.SimplyTyped.Context Ty) (ty : Ty) :

An instrinsically well-typed variable

Equations
Instances For

    A list of instrinsically well-typed variables

    Equations
    Instances For

      An Expr binds the result of a single operation to a new variable. Morally, it represents $varName = $op($args) { $regions }

      Equations
      Instances For

        Lets is an intrinsically well-typed sequence of operations, which grows downwards. That is, the head of the list represents the first operation to be executed

        Equations
        Instances For

          RevLets is an intrinsically well-typed sequence of operations, which grows upwards. That is, the head of the list represents the last operation to be executed, and in particular, may refer to any variables defined in the tail of the list

          Equations
          Instances For

            Projections #

            @[reducible, inline]
            Equations
            • e.varName = (↑e).varName
            Instances For
              @[reducible, inline]
              abbrev MLIR.SimplyTyped.Expr.op {Op : Type} {Ty : Type} [MLIR.SimplyTyped.OpSignature Op Ty] {Γ : MLIR.SimplyTyped.Context Ty} {ty : Ty} (e : MLIR.SimplyTyped.Expr Op Γ ty) :
              Op
              Equations
              • e.op = (↑e).op
              Instances For
                @[reducible, inline]
                Equations
                • l.inner = (↑l).inner
                Instances For

                  The context under which the return statement of a body is typed

                  Equations
                  Instances For
                    def MLIR.SimplyTyped.Body.lets {Op : Type} {Ty : Type} [MLIR.SimplyTyped.OpSignature Op Ty] {Γ : MLIR.SimplyTyped.Context Ty} {ty : Ty} (body : MLIR.SimplyTyped.Body Op Γ ty) :
                    MLIR.SimplyTyped.Lets Op Γ body.returnContext
                    Equations
                    Instances For
                      def MLIR.SimplyTyped.Body.return {Op : Type} {Ty : Type} [MLIR.SimplyTyped.OpSignature Op Ty] {Γ : MLIR.SimplyTyped.Context Ty} {ty : Ty} (body : MLIR.SimplyTyped.Body Op Γ ty) :
                      MLIR.SimplyTyped.Var body.returnContext ty
                      Equations
                      Instances For

                        Constructors #

                        Equations
                        Instances For

                          The empty sequence of operations

                          Equations
                          Instances For
                            def MLIR.SimplyTyped.Lets.lete {Op : Type} {Ty : Type} [MLIR.SimplyTyped.OpSignature Op Ty] {Γ_in : MLIR.SimplyTyped.Context Ty} {ty : Ty} {Γ_out : MLIR.SimplyTyped.Context Ty} (e : MLIR.SimplyTyped.Expr Op Γ_in ty) (lets : MLIR.SimplyTyped.Lets Op (Γ_in.push e.varName ty) Γ_out) :
                            MLIR.SimplyTyped.Lets Op Γ_in Γ_out

                            Add a new operation to the top of the sequence, abstracting over a previously free variable

                            Equations
                            Instances For
                              def MLIR.SimplyTyped.Body.mk {Op : Type} {Ty : Type} [MLIR.SimplyTyped.OpSignature Op Ty] {Γ_in : MLIR.SimplyTyped.Context Ty} {Γ_out : MLIR.SimplyTyped.Context Ty} {ty : Ty} (lets : MLIR.SimplyTyped.Lets Op Γ_in Γ_out) (ret : MLIR.SimplyTyped.Var Γ_out ty) :
                              Equations
                              Instances For

                                Return an empty Body, whose terminator is "return v"

                                Equations
                                Instances For
                                  def MLIR.SimplyTyped.Body.lete {Op : Type} {Ty : Type} [MLIR.SimplyTyped.OpSignature Op Ty] {Γ : MLIR.SimplyTyped.Context Ty} {eTy : Ty} {ty : Ty} (e : MLIR.SimplyTyped.Expr Op Γ eTy) :
                                  MLIR.SimplyTyped.Body Op (Γ.push e.varName eTy) tyMLIR.SimplyTyped.Body Op Γ ty

                                  Add a new operation to the top of a Body, abstracting over a previously free variable

                                  Equations
                                  Instances For

                                    Eliminators / Induction Principles #

                                    def MLIR.SimplyTyped.Expr.recOn {Op : Type} {Ty : Type} [MLIR.SimplyTyped.OpSignature Op Ty] {Γ : MLIR.SimplyTyped.Context Ty} {ty : Ty} {motive : MLIR.SimplyTyped.Expr Op Γ tySort u} (mk : (varName : MLIR.VarName) → (op : Op) → (ty_eq : ty = (MLIR.SimplyTyped.OpSignature.signature op).returnType) → (args : MLIR.SimplyTyped.VarList Γ (MLIR.SimplyTyped.OpSignature.signature op).arguments) → (regions : MLIR.SimplyTyped.RegionList Op (MLIR.SimplyTyped.OpSignature.signature op).regions) → motive (MLIR.SimplyTyped.Expr.mk varName op ty_eq args regions)) (e : MLIR.SimplyTyped.Expr Op Γ ty) :
                                    motive e
                                    Equations
                                    Instances For
                                      def MLIR.SimplyTyped.Lets.recOn {Op : Type} {Ty : Type} [MLIR.SimplyTyped.OpSignature Op Ty] {Γ_out : MLIR.SimplyTyped.Context Ty} {motive : {Γ_in : MLIR.SimplyTyped.Context Ty} → MLIR.SimplyTyped.Lets Op Γ_in Γ_outSort u} (nil : motive MLIR.SimplyTyped.Lets.nil) (lete : {Γ_in : MLIR.SimplyTyped.Context Ty} → {ty : Ty} → (e : MLIR.SimplyTyped.Expr Op Γ_in ty) → (lets : MLIR.SimplyTyped.Lets Op (Γ_in.push e.varName ty) Γ_out) → motive (MLIR.SimplyTyped.Lets.lete e lets)) {Γ_in : MLIR.SimplyTyped.Context Ty} (lets : MLIR.SimplyTyped.Lets Op Γ_in Γ_out) :
                                      motive lets
                                      Equations
                                      Instances For