Documentation

Lean.Data.RArray

Auxillary definitions related to Lean.RArray that are typically only used in meta-code, in particular the ToExpr instance.

def Lean.RArray.ofFn {α : Type} {n : Nat} (f : Fin nα) (h : 0 < n) :
Equations
Instances For
    @[irreducible]
    def Lean.RArray.ofFn.go {α : Type} {n : Nat} (f : Fin nα) (lb ub : Nat) (h1 : lb < ub) (h2 : ub n) :
    Equations
    • One or more equations did not get rendered due to their size.
    Instances For
      def Lean.RArray.ofArray {α : Type} (xs : Array α) (h : 0 < xs.size) :
      Equations
      Instances For
        theorem Lean.RArray.get_ofFn {α : Type} {n : Nat} (f : Fin nα) (h : 0 < n) (i : Fin n) :
        (Lean.RArray.ofFn f h).get i = f i

        The correctness theorem for ofFn

        theorem Lean.RArray.get_ofFn.go {α : Type} {n : Nat} (f : Fin nα) (i : Fin n) (lb ub : Nat) (h1 : lb < ub) (h2 : ub n) (h3 : lb i) :
        i < ub(Lean.RArray.ofFn.go f lb ub h1 h2).get i = f i
        @[simp]
        theorem Lean.RArray.size_ofFn {α : Type} {n : Nat} (f : Fin nα) (h : 0 < n) :
        (Lean.RArray.ofFn f h).size = n
        theorem Lean.RArray.size_ofFn.go {α : Type} {n : Nat} (f : Fin nα) (lb ub : Nat) (h1 : lb < ub) (h2 : ub n) :
        (Lean.RArray.ofFn.go f lb ub h1 h2).size = ub - lb
        def Lean.RArray.toExpr {α : Type} (ty : Lean.Expr) (f : αLean.Expr) :
        Equations
        Instances For
          Equations