Documentation

HexBasic.OfFn

def Hex.Array.ofFn' {α : Type u} {n : Nat} (f : Fin nα) :

An Array.ofFn equivalent that reduces in the kernel under the module system.

Equations
Instances For
    def Hex.Vector.ofFn' {n : Nat} {α : Type u} (f : Fin nα) :
    Vector α n

    A Vector.ofFn equivalent that reduces in the kernel under the module system.

    Equations
    Instances For
      @[simp]
      theorem Hex.Array.ofFn'_eq_ofFn {α : Type u} {n : Nat} (f : Fin nα) :
      @[simp]
      theorem Hex.Vector.ofFn'_eq_ofFn {n : Nat} {α : Type u} (f : Fin nα) :
      @[simp]
      theorem Hex.Array.size_ofFn' {α : Type u} {n : Nat} (f : Fin nα) :
      (ofFn' f).size = n
      @[simp]
      theorem Hex.Array.getElem_ofFn' {α : Type u} {n : Nat} (f : Fin nα) (i : Nat) (h : i < (ofFn' f).size) :
      (ofFn' f)[i] = f i,
      @[simp]
      theorem Hex.Vector.toArray_ofFn' {n : Nat} {α : Type u} (f : Fin nα) :
      @[simp]
      theorem Hex.Vector.getElem_ofFn' {n : Nat} {α : Type u} (f : Fin nα) (i : Nat) (h : i < n) :
      (ofFn' f)[i] = f i, h
      @[csimp]

      Compiled code uses the core Array.ofFn, which fills an array of known capacity instead of building a List first. The List route exists only so that the kernel can reduce it.