3

I was wondering: how does one use the ForAll function in Reduce? In particular, I am looking for the set $\{w\in \mathbb{R}^2 | \forall x \in \mathbb{R}^2 : \left<w,x\right> \leq f(x)\},$ where $\left<,\right> $ is the inner product and $f: \mathbb{R}^2\rightarrow\mathbb{R}^1$. Thank you!

Eli Lansey
  • 7,499
  • 3
  • 36
  • 73
Uri
  • 31
  • 1

2 Answers2

3

This is a simple example. Suppose you have the following equation and you want to get the coefficients of it:

gl = a x^3 + b x^2 + c x + d == -x + (-3 + x) (5 + x^2);
Reduce[ForAll[x, gl]]

Your output will be:

d == -15 && c == 4 && b == -3 && a == 1
Peter Breitfeld
  • 5,182
  • 1
  • 24
  • 32
2

Perhaps you mean something like this:

f[{x1_, x2_}, {y1_, y2_}] := x1 y2 - x2 y1
Reduce[ForAll[{x1, x2, y1, y2}, 
   {x1, x2}.{y1, y2} <= f[{x1, x2}, {y1, y2}]]]
murray
  • 11,888
  • 2
  • 26
  • 50