def lt_succ_ne

bendtorch-core@0.1.0.0 · src/tensor/contracts/pointwise_proof.bend:86

import bendtorch-core@0.1.0.0/src/tensor/contracts/pointwise_proof.bend as PointwiseProof
import Base
import bendtorch-core@0.1.0.0/src/storage/arith.bend as Arith

86def lt_succ_ne(+index: Nat, +previous: Nat, below: {Nat.is_lt(index, 1n+previous) == True{} : Bool},
87  other: {False{} == Nat.is_eq(index, previous) : Bool}) -> {Nat.is_lt(index, previous) == True{} : Bool}:
88  match index previous:
89    case 0n 0n:
90      Empty.absurd({Nat.is_lt(0n, 0n) == True{} : Bool}, Arith.clash(other))
91    case 0n 1n+q:
92      {==}
93    case 1n+p 0n:
94      Empty.absurd({Nat.is_lt(1n+p, 0n) == True{} : Bool}, Arith.lt_zero(p, below))
95    case 1n+p 1n+q:
96      lt_succ_ne(p, q, below, other)

Uses (7)

Used by (5)