def capacity_built

bendtorch-core@0.1.0.0 · src/shape/construct_proofs.bend:67

import bendtorch-core@0.1.0.0/src/shape/construct_proofs.bend as ConstructProofs
import Base
import bendtorch-core@0.1.0.0/src/shape/core.bend as Shape
import bendtorch-core@0.1.0.0/src/shape/LAWS.bend as Laws

67def capacity_built(+input: List<&2, U32>, rank_bound: Shape.LE(Shape.rank_dimensions(input), 4n), +capacity: Shape.Capacity<Shape.naturals(input)>, fits: {True{} == within(Shape.naturals(input), capacity) : Bool}) -> {Laws.built(input, Shape.construct.capacity(input, rank_bound, capacity)) == Some{input} : Maybe<&2, List<&2, U32>>}:
68  match capacity:
69    case Shape.Beyond{}:
70      Empty.absurd({Laws.built(input, Shape.construct.capacity(input, rank_bound, Shape.Beyond{})) == Some{input} : Maybe<&2, List<&2, U32>>}, Shape.clash(fits))
71    case Shape.Within{size, exact, bound}:
72      {==}

Uses (13)

Used by (1)