def le_predecessor

bendtorch-core@0.1.0.0 · src/tensor/word_conversion.bend:66

import bendtorch-core@0.1.0.0/src/tensor/word_conversion.bend as WordConversion
import Base
import bendtorch-core@0.1.0.0/src/storage/arith.bend as Arith

66def le_predecessor(+number: Nat, +bound: Nat, within: {Nat.is_le(1n+number, bound) == True{} : Bool}) ->
67  {Nat.is_le(number, bound) == True{} : Bool}:
68  match bound:
69    case 0n:
70      Empty.absurd({Nat.is_le(number, 0n) == True{} : Bool}, Arith.clash(within))
71    case 1n+p:
72      Arith.le_succ(number, p, within)

Uses (6)

Used by (30)