Builtin

all

all(a, attr)
all(a)

Returns true if all of the specified attr for tuples in relation a are true.

If the relation has only one attribute then it is used and no attr need be specified.

can be used instead of all.

Examples

$P{*, heavy:=WEIGHT>12}
heavyPNOPNAMECOLORWEIGHTCITY
falseP1NutRed12London
falseP5CamBlue12Paris
trueP2BoltGreen17Paris
trueP3ScrewBlue17Rome
trueP4ScrewRed14London
trueP6CogRed19London
None
all($P{*, heavy:=WEIGHT>12}[PNO="P0"], heavy)
true

Some
all($P{*, heavy:=WEIGHT>12}, heavy)
false