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
@[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.
def Lean.RArray.ofArray {α : Type} (xs : Array α) (h : 0 < xs.size) :
Equations
theorem Lean.RArray.get_ofFn {α : Type} {n : Nat} (f : Fin nα) (h : 0 < n) (i : Fin n) :
(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(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) :
(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) :
(ofFn.go f lb ub h1 h2).size = ub - lb
def Lean.RArray.toExpr {α : Type} (ty : Expr) (f : αExpr) :
RArray αExpr
Equations
instance Lean.instToExprRArray {α : Type} [ToExpr α] :
Equations