def le_add

bendtorch-core@0.1.0.0 · src/tensor/signed_PROOF.bend:263

import bendtorch-core@0.1.0.0/src/tensor/signed_PROOF.bend as SignedPROOF
import Base
import bendtorch-core@0.1.0.0/src/storage/arith.bend as Arith
import bendtorch-core@0.1.0.0/src/tensor/signed.bend as Signed

263# The inference classifies the exact sizes' product against the count
264# (Signed.capped) instead of forming it. These lemmas give capped as the
265# classification of exact_product, so the laws stated with exact_product hold.
266def le_add(+a: Nat, +b: Nat) -> {Nat.is_le(a, Nat.add(a, b)) == True{} : Bool}:
267  match a:
268    case 0n:
269      Arith.le_zero(b)
270    case 1n+p:
271      le_add(p, b)

Uses (5)

Used by (1)