Documentation

SSA.Core.Util.ConcreteOrMVar

inductive ConcreteOrMVar (α : Type u) (φ : ) :

A general type that is either a concrete known value of type α, or one of φ metavariables

Instances For
    instance instDecidableEqConcreteOrMVar :
    {α : Type u_1} → {φ : } → [inst : DecidableEq α] → DecidableEq (ConcreteOrMVar α φ)
    Equations
    • instDecidableEqConcreteOrMVar = decEqConcreteOrMVar✝
    instance instReprConcreteOrMVar :
    {α : Type u_1} → {φ : } → [inst : Repr α] → Repr (ConcreteOrMVar α φ)
    Equations
    • instReprConcreteOrMVar = { reprPrec := reprConcreteOrMVar✝ }
    instance instInhabitedConcreteOrMVar :
    {a : Type u_1} → [inst : Inhabited a] → {a_1 : } → Inhabited (ConcreteOrMVar a a_1)
    Equations
    instance instToStringConcreteOrMVar {α : Type u_1} {n : } [ToString α] :
    Equations
    • One or more equations did not get rendered due to their size.
    instance instCoeConcreteOrMVar {α : Type u_1} {φ : } :
    Coe α (ConcreteOrMVar α φ)

    A coercion from the concrete type α to the ConcreteOrMVar

    Equations
    • instCoeConcreteOrMVar = { coe := ConcreteOrMVar.concrete }
    Equations
    def ConcreteOrMVar.toConcrete {α : Type u_1} :
    ConcreteOrMVar α 0α

    If there are no meta-variables, ConcreteOrMVar is just the concrete type α

    Equations
    Instances For
      @[simp]
      theorem ConcreteOrMVar.toConcrete_concrete :
      ∀ {α : Type u_1} {a : α}, (ConcreteOrMVar.concrete a).toConcrete = a
      def ConcreteOrMVar.instantiateOne {α : Type u_1} {φ : } (a : α) :
      ConcreteOrMVar α (φ + 1)ConcreteOrMVar α φ

      Provide a value for one of the metavariables. Specifically, the metavariable with the maximal index φ out of φ+1 total metavariables. All other metavariables indices' are left as-is, but cast to Fin φ

      Equations
      Instances For
        def ConcreteOrMVar.instantiate {α : Type u_1} {φ : } (as : Mathlib.Vector α φ) :
        ConcreteOrMVar α φα

        Instantiate all meta-variables

        Equations
        Instances For
          @[simp]

          We choose ConcreteOrMVar.concrete to be our simp normal form.

          Equations
          • =
          Instances For
            @[simp]
            Equations
            • =
            Instances For
              @[simp]
              theorem ConcreteOrMVar.instantiate_mvar_zero :
              ∀ {α : Type u_1} {w : α} {ws : List α} {φ : } { : (w :: ws).length = φ} {h0 : 0 < φ}, ConcreteOrMVar.instantiate w :: ws, (ConcreteOrMVar.mvar 0, h0) = w
              @[simp]
              theorem ConcreteOrMVar.instantiate_mvar_zero' :
              ∀ {α : Type u_1} {w : α}, ConcreteOrMVar.instantiate [w], (ConcreteOrMVar.mvar 0, ) = w
              @[simp]
              theorem ConcreteOrMVar.instantiate_mvar_zero'' :
              ∀ {α : Type u_1} {w : α} {h1 : [w].length = 1}, ConcreteOrMVar.instantiate [w], h1 (ConcreteOrMVar.mvar 0) = w