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 α} {φ : ℕ} {hφ : (w :: ws).length = φ} {h0 : 0 < φ}, ConcreteOrMVar.instantiate ⟨w :: ws, hφ⟩ (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