# Should we always introduce new variables to define sets?

If the 'scope' of a variable in set builder notation is limited to the set we're defining, is it an abuse of notation to define sets using a currently defined variable?

For example, if I define $$x$$ and $$y$$ as being any element of the real numbers, am I allowed to use the same symbol again for simplicity to define the domain of the function $$f(x,y)$$? Is this an abuse of notation?

Is it alright to define two sets using the same symbols?

• "Re use" again? Why do you speak of re-using instead of the syntax rules for variables and quantifier? In $\forall x Px$ the occurrence of $x$ are bound and thus we can freely write $\forall y Py$ and the meaning of the formula is the same, and we can also write a formula like $\forall x Px \to \exists x Px$ and we have no problem. What we cannot do is to write $\forall x P(x,y)$ and put $x$ in place of $y$; the result: $\forall x P(x,x)$ has a different meaning. The same with set-builder notation: in $\{ x \mid \varphi (x) \}$ both occurrences of $x$ are bound. 1/2 Commented Sep 21, 2022 at 13:02
• Thus, if we write $\{ y \mid \varphi(y) \}$ what we get is the same set. As you can see, the "logic" is the same as that described above for quantifiers. This means that we can write e.g. $x \in \{ x \mid \varphi(x) \}$ without problem. 2/2 Commented Sep 21, 2022 at 13:02
• Use whatever you want unless you are afraid of a confusion keep in mind that depend on your audience Commented Sep 21, 2022 at 15:20
• @MauroALLEGRANZA So in the set builder notation it is 'bound' being 'bound' means that I cannot substitute, I understand that, but why do we ignore previously defined things about $x$ in the set builder notation? I might limit it to $N$ in it's free occurrences? Is it the 'same' variable? Or is the 'scope' of a variable locked by the binding? This is what, for some reason I cannot understand (as much as people explain it)
– user1096856
Commented Sep 21, 2022 at 16:29

A variable that appears as a dummy variable in a function or set definition (always twice) is called a bound variable. Their scope is indeed limited to the current definition and you can reuse it freely in the next definition.

Let $$E = \{ x\in \mathbb R, x\neq 1\}$$

Now let $$f : E \to \mathbb R, x\mapsto 1/(x-1)$$.

Especially in the above, it would be stupid not to, since $$x$$ is in both cases an element of $$E$$.

I don't think there's a formal interdiction to reuse it as a free variable either, though it's a bit weird to do so

Let $$E = \{x\in \mathbb R, x\neq 1\}$$

Now let $$x = \sqrt{2}+8$$. (or even worse : let $$x=1)$$.

On the other hand, I generally wouldn't reuse a free variable as a bound variable.

Let $$x = \sqrt{2}+8$$.

Let $$E = \{x\in \mathbb R, x\neq 1\}$$

Keep in mind there are a lot of implicit scopes in math. For instance if you write "let $$\epsilon >0$$ to prove some "$$\forall \epsilon >0$$ blah blah" statement, the scope of that $$\epsilon$$ stops as soon as you finish the proof of that statement.

• In a lot of calculus we re-use the variables, for example we might say $f(x)=....$ and then say: when $x=1$...however we are 'defining' and then sort of re-using the symbol for convenience but it doesn't necessarily have to be the same 'variable' strictly and formally speaking? this is very new to me, but makes sense as many of my professors like to re-use $x$ and $y$ in set definitions, completely ignoring anything else they have defined like '$x$ is an element of $N$' etc.
– user1096856
Commented Sep 21, 2022 at 12:02
• My third example is not really a strict interdiction either. Many people just don't care about reusing an already defined free variable as a dummy in a definition. But often it's because an implicit scope (a proof, the study of a specific case, etc.) ended in the meantime. Formally each reuse is a different variable yes. Commented Sep 21, 2022 at 12:34