def below_back

bendtorch-core@0.1.0.0 · src/autograd/reduce_replayed_proof.bend:434

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
import bendtorch-core@0.1.0.0/src/autograd/reduce_parallel_proof.bend as ReduceParallel

434def below_back(+xs: List<&2, Nat>, +ys: List<&2, Nat>, +bound: Nat,
435  +h: {ReduceParallel.all_below(List.append(&2, Nat, xs, ys), bound) == True{} : Bool}) ->
436  {ReduceParallel.all_below(ys, bound) == True{} : Bool}:
437  match xs:
438    case Nil{}:
439      h
440    case +x <> +rest:
441      below_back(rest, ys, bound, Arith.and_right(Nat.is_lt(x, bound), ReduceParallel.all_below(List.append(&2, Nat, rest, ys), bound), h))

Uses (7)

Used by (1)