fin
本頁內容尚未翻譯。
data Fin : Nat -> TypeA natural number below n.
Fin.absurdZero
Section titled “Fin.absurdZero”def absurdZero {A : Type} (i : Fin zero) : AThere is no index below zero.
Fin.toNat
Section titled “Fin.toNat”def toNat {n : Nat} (i : Fin n) : NatThe number.
Fin.ofNat
Section titled “Fin.ofNat”def ofNat (n : Nat) (k : Nat) (below : Nat.blt k n = true) : Fin nThe index of a number below the bound.
Fin.ofNatOption
Section titled “Fin.ofNatOption”def ofNatOption (n : Nat) (k : Nat) : Option (Fin n)The index of a number, if it is below the bound.
Fin.last
Section titled “Fin.last”def last (n : Nat) : Fin (succ n)The largest index below succ n, which is n.
Fin.weaken
Section titled “Fin.weaken”def weaken {n : Nat} (i : Fin n) : Fin (succ n)The same number under a bound one larger.
Fin.beq
Section titled “Fin.beq”def beq {n : Nat} (i : Fin n) (j : Fin n) : BoolWhether two indices are the same number.
Fin.blt
Section titled “Fin.blt”def blt {n : Nat} (i : Fin n) (j : Fin n) : BoolWhether i is below j.
Fin.all
Section titled “Fin.all”def all (n : Nat) : List (Fin n)All the indices below n, in order.
Fin.toNatBelow
Section titled “Fin.toNatBelow”def toNatBelow {n : Nat} (i : Fin n) : Nat.blt (toNat i) n = trueAn index’s number is below its bound.
Fin.toNatOfNat
Section titled “Fin.toNatOfNat”def toNatOfNat (n : Nat) (k : Nat) (below : Nat.blt k n = true) : toNat (ofNat n k below) = kAn index made from a number has that number.
Fin.toNatWeaken
Section titled “Fin.toNatWeaken”def toNatWeaken {n : Nat} (i : Fin n) : toNat (weaken i) = toNat iWeakening keeps the number.
Fin.toNatLast
Section titled “Fin.toNatLast”def toNatLast (n : Nat) : toNat (last n) = nThe last index below succ n is n.
Fin.allLength
Section titled “Fin.allLength”def allLength (n : Nat) : List.length (all n) = nThere are n indices below n.