def valid
import bendvy-ecs-core@0.1.0.4/ordinary_condition_declaration.bend as OrdinaryConditionDeclarationimport Base
80# Structural validation only. Trusted closed constructors establish provenance.
81# Check width/name length agreement, representable slot range and slot bounds.
82# Structural validation only: trusted constructors establish correspondence
83# between predicates, names and plan; this is not runtime authority validation.
84def valid(~S:Data,entries:Entries<S>) -> Bool:
85 match entries:
86 case Entries{+width,plan,names}:Bool.and(Nat.is_eq(width,List.length(&2,String,names)),Bool.and(Nat.is_le(width,1n+U32.to_nat(4294967295)),slots(~S,plan,width)))