Is there a mathematical symbol for "For every element"?

Solution 1:

This should work.

$\forall x\in A\cdots$

Solution 2:

I still think the universal quantifier is the answer you are looking for.

From the wording you use e.g. "loop" and "iteration", I infer that your confusion might be coming form the fact that in mathematics there are no variables only constants (here I using the meaning from computer science). For example when you define $x = 2$, even if mathematician would say it is a variable, in fact (in computer science sense) it is a constant: you set $x$ only once, and afterwards it does not change. If it would, then we would have a contradiction i.e. $x = 2 \land x \neq 2$ (please note, that if there are other $x$-es in the text, it just means that those are different constants, but with the same name).

So, when computer scientist wrote

for i from 2 to n do 
    a[i] := a[i-1] + a[i-2]

then mathematician would write $\forall i \in \{2,\ldots,n\}.\ a_i = a_{i-1} + a_{i-2}$. The order does not matter, $a_i$-s are constants that are defined by such recursive formula and that's it. You might not know how many solutions there are (none, single, many?), but usually you do if the formula is simple enough. You don't care how to compute it, how much time would it take or worry if you have enough memory to calculate it--those problems are just uninteresting :-)

Welcome to mathematics!

P.S. Naturally, there are domains of mathematics (notably theoretical computer science :D) in which you do care about such things, I am just teasing you ;-)

Solution 3:

The very concept of "doing something in some order" doesn't really make sense in mathematics. Things are defined once and for all, the whole set exists "all the time". This has the great advantage that there is no ambiguity: "do you mean, the variable at position $n$ before or after we looped past it?"

If you come from imperative programming, you may be surprised that it's possible to do any useful stuff when you're not allowed to modify something after its definition. But it's quite possible – also in programming! What you could write in C as

int v[14];
v[0] = first_value;
for(int i=1; i<14; ++i)
  v[i] = function_for_next(v[i-1]);

can also be written, without explicit mention of an "order" in which the set is traversed, as recursive buildup of e.g. a linked list. In Haskell,

v = vBuild 0 firstValue
     where vBuild 14 _ = []
           vBuild i lastValue
               = lastValue : vBuild (i+1) (functionForNext lastValue)

or simply

v = take 14 $ iterate functionForNext firstValue

This also works for arbitrarily more complicated examples, in fact you only need a very simple notational system to calculate anything that can be calculated at all. And in mathematics, you're usually not so much interested in how to calculate results (so it's not a problem if some calculations are a bit less efficient without explicit state, mutable variables, iterations etc.), but it's always very important that expressions aren't ambiguous so you can prove various properties.