def le_trans
bendtorch-core@0.1.0.0 · src/autograd/reduce_replayed_proof.bend:215
import bendtorch-core@0.1.0.0/src/autograd/reduce_replayed_proof.bend as ReduceReplayedProof
import Base
import bendtorch-core@0.1.0.0/src/storage/arith.bend as Arith
215def le_trans(+a: Nat, +b: Nat, +c: Nat, ab: {Nat.is_le(a, b) == True{} : Bool}, bc: {Nat.is_le(b, c) == True{} : Bool}) ->
216 {Nat.is_le(a, c) == True{} : Bool}:
217 match a b c:
218 case 0n _ _:
219 Arith.le_zero(c)
220 case 1n+p 0n _:
221 Empty.absurd({Nat.is_le(1n+p, c) == True{} : Bool}, Arith.clash(ab))
222 case 1n+p 1n+q 0n:
223 Empty.absurd({Nat.is_le(1n+p, 0n) == True{} : Bool}, Arith.clash(bc))
224 case 1n+p 1n+q 1n+r:
225 le_trans(p, q, r, ab, bc)