Algosim documentation: ∀

∀ (for all)

Tests if a property holds for all objects in a container.

Syntax

Description

If X is a container and p a predicate, then ∀(X, p) returns true iff p(x) for all x in X.

Notes

ForAll is a synonym of .

Examples

L ≔ compute(ReflectionMatrix(RandomVector(3)), n, 1, 1000);
∀(L, A ↦ IsSymmetric(A) ∧ IsOrthogonal(A) ∧ IsInvolution(A) ∧ spectrum(A) = {−1, 1})
true
∀(
  flatten(compute(
    clamp(x, a, b) = max(a, min(x, b)),
    a, −10, 10,
    b, −10, 10,
    x, −10, 10)
  ),
  identity
)
true

See also