# Is there a giant AND symbol/How to solve tons of equations simultaneously

$$\sum_{k=1}^na_k=a_1+...+a_n$$ $$\prod_{k=1}^na_k=a_1\cdot...\cdot a_n$$ $$\large{?}\small{_{k=1}^na_k=a_1~\&\&...\&\& ~a_n}$$ What in mathematica would allow me to index logical statements in an operation like AND or OR? I'm trying to solve a system of n vector equations, so I can't afford to type them all in manually into the argument of Solve[].

Someone suggested that I take the product of the equations, i.e. if $a_i=(x_i=y_i)$, then $$a_1~\&\&...\&\& ~a_n\leftrightarrow \prod_{k=1}^n(x_i-y_i)$$ However, $x_i,y_i$ are vectors, and even their lengths vary, depending on $i$. Does anyone know how to solve this issue?

• If you apply And: And @@ {a1, a2, a3} you'll get a1 && a2 && a3. (a1 && a2 && a3)[[2]] yields a2. Commented Jan 19, 2014 at 22:57

Artes solution is probably the easiest

And @@ Array[b, 10]


but if you like the syntax of Sum, you can use it and then transform Plus into And

Sum[b[i], {i, 1, 10}] /. Plus -> And


Both of these give the logical And of the entries in the array b:

b[1] && b[2] && b[3] && b[4] && b[5] && b[6] && b[7] && b[8] && b[9] && b[10]


And @@ Outer[f, Range[10]] gets the job done.

• I feel it would be "easier" to write And @@ (f /@ Range[10]) here. Outer with 2 arguments is Map. Or even And @@ f /@ Range[10] if you are feeling right associative :P. Commented Jan 20, 2014 at 9:14
• @JacobAkkerboom: You are tempting me to post the TuringMachine implementation...
– ciao
Commented Jan 20, 2014 at 9:26