def inventory_units
import bendvy-ecs-core@0.1.0.3/relation_cleanup_engine.bend as RelationCleanupEngineimport Base
21# This is the existing structural inventory bound expressed as arbitrary Nat.
22# Counting is eager; very large inventories can spend work in arithmetic before
23# the same driver discovers completion. No narrower integer or cap is used.
24def inventory_units(remaining:Nat,nodes:Nat,+edges:Nat,descriptors:Nat) -> Nat:
25 Nat.mul(remaining,Nat.mul(Nat.add(edges,1n+nodes),Nat.add(3n,Nat.add(Nat.mul(2n,descriptors),Nat.mul(2n,edges)))))