1

I have two ways to write down a certain formula, but I am not sure if both have correct syntax.

Given $f:A\rightarrow B$ and $b\in B$.

One could write

$(\forall a\in A)( f(a)=b )$,

but is it also allowed to write the following?

$(\forall a)( a\in A \implies f(a)=b )$

Constant
  • 134

3 Answers3

1

Your first suggestion is just notational shorthand for the second, so both have the same meaning, characterising $f$ as a constant function.

Slightly nicer to read:

$$\forall a{\in}A\:\: f(a)=b\,;\\ \forall a\:\:( a\in A \implies f(a)=b ).$$

ryang
  • 38,879
  • 14
  • 81
  • 179
  • 1
    This answer is also fine, but Nate Eldredge's answer is for me more satisfying. – Constant Feb 05 '22 at 18:51
  • @Constant No worries; I agree. Do note that that pair of parentheses in my second modification is not optional: the latter is not equivalent to $\forall a: a\in A \implies f(a)=b,$ which means $(\forall a: a\in A) \implies f(a)=b.$ – ryang Feb 05 '22 at 19:00
  • Thank you, that is good to know. – Constant Feb 05 '22 at 19:08
1

Both ways are fine, mathematically speaking. There might be a notational preference for one or the other depending on the situation.

The fundamental definition of the $\forall$ symbol is that $\forall x \,\psi$ means that for every $x$ in the universe of discourse, the predicate $\psi$ is true. In that sense, the notation $(\forall a)( a\in A \implies f(a)=b )$ is actually more formally correct. I'd expect to see it written this way in the context of formal logic, where the author wants to strictly follow the precise syntax rules of first-order logic.

It does have the effective meaning of "for all $a$ in $A$, we have $f(a)=b$". The predicate $a\in A \implies f(a)=b$ is vacuously true when $a \notin A$, so its truth really only depends on what happens when $a \in A$.

Since $(\forall a)( a\in A \implies \phi )$ is a little awkward to write and not as intuitively clear, the notation $(\forall a \in A) \phi$ is generally accepted as an abbreviation of it. So if anything, it's the $\forall a \in A$ notation that is the "abuse", but it's extremely common and isn't going to bother anybody except an unusually pedantic logician. This would be more likely to appear in a "working mathematics" paper, where the author is more concerned with overall mathematical meaning than with strictly precise syntax.

(In all cases, the placement of parentheses isn't really important and you can choose whatever you think looks best typographically, so long as there is no real ambiguity what you mean.)

Nate Eldredge
  • 97,710
-1

You are allowed to write any symbols you like on your piece of paper.

But if you'd like to communicate your idea to someone else, I'm sure they would be happy if you wrote what you meant clearly.

I'd consider $$\forall x \in A\quad f(x) = b$$ or $$ f(x) =b \quad (x \in A)$$ or $$ f(x) =b \quad (x \in A \subseteq A')$$

clear, depending on what you meant. The first two mean the same thing. I would be looking at your intention first and foremost, and be less worried about absolutely correct syntax (unless you're doing something like automated theorem proving).

Some people would fight me on this opinion though.

JuliusL33t
  • 2,424