Naked selection from multi-partition WL does not work
Extended Description
Naked selection from a single-partition WL works fine, e.g.:
vec = iota(N);
z = _sel_VxA_( iv, vec);
However, if vec has multiple WL partitions, then AWLF can not always
statically pick a partition from which to fold.
Bodo suggested, a few weeks ago, that we should generate
conditionals on the partition bounds to support this capability.
E.g., if vec has three partitions, and generator bounds of:
P0: lb0 ub0
P1: lb1 ub1
P2: lb2 ub2
z = ( member( iv, lb0, ub0) ? indexfrom( iv, P0) :
member( iv, lb1, ub1) ? indexfrom( iv, P1) :
member( iv, lb2, ub2) ? indexfrom( iv, P2) :
indexerror);
where:
member( iv, lb, ub) = (iv<=lb) && (iv