ForAll 
Details
- ForAll[x,expr] can be entered as ∀xexpr. The character ∀ can be entered as
fa
or \[ForAll]. The variable x is given as a subscript. - ForAll[x,cond,expr] can be entered as ∀x,condexpr.
- In StandardForm, ForAll[x,expr] is output as ∀xexpr.
- ForAll[x,cond,expr] is output as ∀x,condexpr.
- ForAll can be used in such functions as Reduce, Resolve, and FullSimplify.
- The condition cond is often used to specify the domain of a variable, as in x∈Integers.
- ForAll[x,cond,expr] is equivalent to ForAll[x,Implies[cond,expr]].
- ForAll[{x1,x2,…},…] is equivalent to
. - The value of
in ForAll[x,expr] is taken to be localized, as in Block.
Examples
open all close allBasic Examples (1)
This states that for all
,
is positive:
ForAll[x, a x ^ 2 + b x + c > 0]Use Resolve to get a condition on real parameters for which the statement is true:
Resolve[%, Reals]Reduce gives the condition in a solved form:
Reduce[%%, {a, b, c}, Reals]Scope (6)
This states that for all
the inequation is true:
ForAll[x, x ^ 2 - x + 1 ≠ 0]Use Resolve to prove that the statement is false:
Resolve[%]This states that for all real
the inequation is true:
ForAll[x, Element[x, Reals], x ^ 2 - x + 1 ≠ 0]Use Resolve to prove that the statement is true:
Resolve[%]This states that for all pairs
the inequality is true:
ForAll[{x, y}, x ^ 2 + y ^ 2 ≥ 0]With domain not specified, Resolve considers algebraic variables in inequalities to be real:
Resolve[%]With domain Complexes, complex values that make the inequality False are allowed:
Resolve[%%, Complexes]This states the tautology
implies
:
ForAll[{p, q}, Implies[p && Implies[p, q], q]]Resolve[%]If the expression does not explicitly contain a variable, ForAll simplifies automatically:
ForAll[x, y == 0]ForAll[{x, y, z}, y == z]TraditionalForm formatting:
ForAll[x, p[x]]//TraditionalFormApplications (5)
This states the inequality between the arithmetic mean and the geometric mean:
ForAll[{a, b}, a > 0 && b > 0, (a + b) / 2 ≥ Sqrt[a b]]Use Resolve to prove the inequality:
Resolve[%]This states a special case of Hölder's inequality:
ForAll[{a, b, c, d}, a > 0 && b > 0 && c > 0 && d > 0, a c + b d ≤ Sqrt[a ^ 2 + b ^ 2]Sqrt[c ^ 2 + d ^ 2]]Use Resolve to prove the inequality:
Resolve[%]This states a special case of Minkowski's inequality:
ForAll[{a, b, c, d}, Sqrt[(a + c) ^ 2 + (b + d) ^ 2] ≤ Sqrt[a ^ 2 + b ^ 2] + Sqrt[c ^ 2 + d ^ 2]]Use Resolve to prove the inequality:
Resolve[%]Prove geometric inequalities for
,
, and
sides of a triangle:
triangle = a > 0 && b > 0 && c > 0 && a + b > c && a + c > b && b + c > a;
acute = a ^ 2 + b ^ 2 > c ^ 2 && a ^ 2 + c ^ 2 > b ^ 2 && b ^ 2 + c ^ 2 > a ^ 2;
s = 1 / 2(a + b + c);
F = Sqrt[s(s - a)(s - b)(s - c)];This states that an inequality is satisfied for all triangles:
ForAll[{a, b, c}, triangle, a b c(a ^ 2 / b ^ 2 + b ^ 2 / c ^ 2 + c ^ 2 / a ^ 2) ≥ a ^ 3 + b ^ 3 + c ^ 3 + a b(b - a) + a c(a - c) + b c(c - b)]Use Resolve to prove the inequality:
Resolve[%]This states that an inequality is satisfied for all acute triangles:
ForAll[{a, b, c}, triangle && acute, 27(b ^ 2 + c ^ 2 - a ^ 2) ^ 2(a ^ 2 + c ^ 2 - b ^ 2) ^ 2(a ^ 2 + b ^ 2 - c ^ 2) ^ 2 ≤ (4F) ^ 6]Use Resolve to prove the inequality:
Resolve[%]Test whether one region is included in another:
R1 = (2x) ^ 2 + y ^ 2 + 2 x y ≤ 1;
R2 = x ^ 2 + y ^ 2 ≤ 2;This states that all points satisfying R1 also satisfy R2:
ForAll[{x, y}, R1 R2]The statement is true, hence the region defined by R1 is included in the region defined by R2:
Resolve[%]{r1, r2} = {RegionPlot[R1, {x, -2, 2}, {y, -2, 2}, PlotPoints -> 35, PlotStyle -> Pink], RegionPlot[R2, {x, -2, 2}, {y, -2, 2}]};Show[{r2, r1}]Properties & Relations (3)
Negation of ForAll gives Exists:
!ForAll[x, x == a]!ForAll[x, Element[x, Reals], x == a]Quantifiers can be eliminated using Resolve or Reduce:
form = ForAll[{x, y}, Implies[a ≠ 0 && a x ^ 2 + b x + c == 0 && a y ^ 2 + b y + c == 0, x == y]]This eliminates the quantifier:
Resolve[form, Reals]This eliminates the quantifier and solves the resulting equations and inequalities:
Reduce[form, {a, b, c}, Reals]This states that an equation is true for all complex values of
:
ForAll[x, (a - 2b + 1)x ^ 2 + (a - b ^ 2 - c)x == a ^ 2 - b + 3c - 1]Use Reduce to find the values of parameters for which the statement is true:
Reduce[%]This solves the same problem using SolveAlways:
SolveAlways[(a - 2b + 1)x ^ 2 + (a - b ^ 2 - c)x == a ^ 2 - b + 3c - 1, x]See Also
Exists Resolve Conjunction Reduce Element Blank SolveAlways TautologyQ AllTrue
Characters: \[ForAll]
Tech Notes
Related Guides
Related Links
History
Introduced in 2003 (5.0)
Text
Wolfram Research (2003), ForAll, Wolfram Language function, https://reference.wolfram.com/language/ref/ForAll.html.
CMS
Wolfram Language. 2003. "ForAll." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/ForAll.html.
APA
Wolfram Language. (2003). ForAll. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/ForAll.html
BibTeX
@misc{reference.wolfram_2026_forall, author="Wolfram Research", title="{ForAll}", year="2003", howpublished="\url{https://reference.wolfram.com/language/ref/ForAll.html}", note=[Accessed: 13-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_forall, organization={Wolfram Research}, title={ForAll}, year={2003}, url={https://reference.wolfram.com/language/ref/ForAll.html}, note=[Accessed: 13-June-2026]}