def lt_le

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

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

166def lt_le(+number: Nat, +bound: Nat, below: {Nat.is_lt(number, bound) == True{} : Bool}) ->
167  {Nat.is_le(number, bound) == True{} : Bool}:
168  match number bound:
169    case 0n 0n:
170      Empty.absurd({Nat.is_le(0n, 0n) == True{} : Bool}, Arith.clash(below))
171    case 0n 1n+p:
172      {==}
173    case 1n+n 0n:
174      Empty.absurd({Nat.is_le(1n+n, 0n) == True{} : Bool}, Arith.clash(below))
175    case 1n+n 1n+p:
176      lt_le(n, p, below)

Uses (6)

Used by (20)