def capped_classifies

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

import bendtorch-core@0.1.0.0/src/tensor/signed_PROOF.bend as SignedPROOF
import Base
import bendtorch-core@0.1.0.0/src/tensor/signed.bend as Signed
import bendtorch-core@0.1.0.0/src/tensor/signed_LAWS.bend as Laws

358def capped_classifies(+bound: Nat, +extents: List<&2, Signed.Extent>) ->
359  {Signed.capped(bound, extents) == Laws.classify(bound, Signed.exact_product(extents)) : Signed.Product}:
360  match extents:
361    case Nil{}:
362      bounded_classified(1n, Nat.is_le(1n, bound))
363    case Signed.Exact{+size} <> +tail:
364      %Equal.sym(Signed.Product, Signed.capped(bound, tail), Laws.classify(bound, Signed.exact_product(tail)), capped_classifies(bound, tail)) :
365        {Signed.times(bound, U32.to_nat(size), _) == Laws.classify(bound, Nat.mul(U32.to_nat(size), Signed.exact_product(tail))) : Signed.Product}
366      times_classify(bound, U32.to_nat(size), Signed.exact_product(tail))
367    case Signed.Inferred{} <> +tail:
368      capped_classifies(bound, tail)

Uses (14)

Used by (6)