The law of Universal Generalization states that:
P(c)
(x) P(x)
Now, I understand that this works only if c is any random element from the universe. Such arbitrary selection makes this rule mathematically valid. However, I do not understand how it holds true in practical examples.
For instance, if I randomly pick out a number from the set of the integers 1 to 10 and it turns out to be a prime number, I can infer using Universal Generalization that all the numbers in the set are prime. But this would be a fallacious conclusion. How then, can the law be used in practice?
It's not "I pick a random $c$ and if it's true for $c$, then it's true for all $x$"
It's "If I know it's true for $c$ even if I don't know which $c$ I have, then it's true for all $x$".
In other words, your example should be:
And this, of course, is not true, since if all you know is that you will get an integer smaller than $100$, you can't conclude you will get a prime.