# Definition of absolute value

## Main Question or Discussion Point

Which of the following two definitions is correct:

1) $\forall x\forall y[ |x|=y\Longleftrightarrow( x\geq 0\Longrightarrow x=y)\wedge(x<0\Longrightarrow x=-y)]$

2) $\forall x\forall y[ |x|=y\Longleftrightarrow( x\geq 0\Longrightarrow x=y)\vee(x<0\Longrightarrow x=-y)]$

I think the second one

Related Set Theory, Logic, Probability, Statistics News on Phys.org
Erland
Which of the following two definitions is correct:

1) $\forall x\forall y[ |x|=y\Longleftrightarrow( x\geq 0\Longrightarrow x=y)\wedge(x<0\Longrightarrow x=-y)]$

2) $\forall x\forall y[ |x|=y\Longleftrightarrow( x\geq 0\Longrightarrow x=y)\vee(x<0\Longrightarrow x=-y)]$

I think the second one
No, the first one is correct, and the second one is wrong.

Recall that $A\Longrightarrow B$ is true if A is false, and also if B is true. It is false if and only if A is true and B is false.

Therefore $(x\geq 0\Longrightarrow x=y)\vee(x<0\Longrightarrow x=-y)$ is true no matter which values x and y have (as long as they are real numbers). For if $x\geq 0$, then the second implication is automatically true, and if $x<0$, then the first implication is true. Thus, the disjunction is always true, so 2) then means that |x|=y for all y, which makes no sense.

But for 1), if $x\geq 0$, then the second implication is automatically true, while the first one is true only for x=y, and thus the conjunction is true only if x=y. If, instead, $x<0$, then the first implication is automatically true, while the second one is true only for x=-y, and thus the conjunction is true only if x=-y. Together, this means that the conjunction is true if and only if |x|=y, just as we desired.

No, the first one is correct, and the second one is wrong.

Recall that $A\Longrightarrow B$ is true if A is false, and also if B is true. It is false if and only if A is true and B is false.

Therefore $(x\geq 0\Longrightarrow x=y)\vee(x<0\Longrightarrow x=-y)$ is true no matter which values x and y have (as long as they are real numbers). For if $x\geq 0$, then the second implication is automatically true, and if $x<0$, then the first implication is true. Thus, the disjunction is always true, so 2) then means that |x|=y for all y, which makes no sense.

But for 1), if $x\geq 0$, then the second implication is automatically true, while the first one is true only for x=y, and thus the conjunction is true only if x=y. If, instead, $x<0$, then the first implication is automatically true, while the second one is true only for x=-y, and thus the conjunction is true only if x=-y. Together, this means that the conjunction is true if and only if |x|=y, just as we desired.
But also the second definition,to use your words," is true no matter which values x and y have"

Because :

$[(x\geq 0\Longrightarrow x=y)\wedge(x<0\Longrightarrow x=-y)]\Longrightarrow [(x\geq 0\wedge x<0)\Longrightarrow(x=y\wedge x=-y)]$

Which is always true ,since $(x\geq 0\wedge x<0)$ is always false

Last edited:
Stephen Tashi
But also the second definition,to use your words," is true no matter which values x and y have"

Because :
$[(x\geq 0\Longrightarrow x=y)\wedge(x<0\Longrightarrow x=-y)]\Longrightarrow [(x\geq 0\wedge x<0)\Longrightarrow(x=y\wedge x=-y)]$
The second definition you gave uses $\vee$, not $\wedge$.

Showing that statement $(x \geq 0 \Rightarrow x = y) \wedge (x \lt 0 \Rightarrow x = -y)$ implies a true statement for each value of x and y does not show that $(x \geq 0 \Rightarrow x = y) \wedge (x \lt 0 \Rightarrow x = -y)$ itself is a true statement for all values of x and y.

The statement $( x \ge 0 \Rightarrow x = y) \vee (x \lt 0 \Rightarrow x = -y)$
is true for all values of x and y. Hence it is true for x = 6 and y = -6. If the statement were equivalent to the statement $|x| = y$ then |6| = -6 would be true.

The statement $(x \ge 0 \Rightarrow x = y) \wedge (x \lt 0 \Rightarrow x = -y)$ is not true for all values of x and y. It is not true for x = 6 and y =-6 because the statement $(x \ge 0 \Rightarrow x = y)$ is not true.

The second definition you gave uses $\vee$, not $\wedge$.

Showing that statement $(x \geq 0 \Rightarrow x = y) \wedge (x \lt 0 \Rightarrow x = -y)$ implies a true statement for each value of x and y does not show that $(x \geq 0 \Rightarrow x = y) \wedge (x \lt 0 \Rightarrow x = -y)$ itself is a true statement for all values of x and y.

The statement $( x \ge 0 \Rightarrow x = y) \vee (x \lt 0 \Rightarrow x = -y)$
is true for all values of x and y. Hence it is true for x = 6 and y = -6. If the statement were equivalent to the statement $|x| = y$ then |6| = -6 would be true.

The statement $(x \ge 0 \Rightarrow x = y) \wedge (x \lt 0 \Rightarrow x = -y)$ is not true for all values of x and y. It is not true for x = 6 and y =-6 because the statement $(x \ge 0 \Rightarrow x = y)$ is not true.
Sorry my mistake. I should have reffered to the 1st definition instead of the 2nd one.

Your thinking looks quite reasonable ,but then again ,if the 1st definition is correct we should be able to get:

$\forall x[ (x\geq 0\Longrightarrow |x|=x)\wedge(x<0\Longrightarrow |x|=-x)]$ instead of:

$\forall x[ (x\geq 0\Longrightarrow |x|=x)\vee(x<0\Longrightarrow |x|=-x)]$

Erland
Sorry my mistake. I should have reffered to the 1st definition instead of the 2nd one.

Your thinking looks quite reasonable ,but then again ,if the 1st definition is correct we should be able to get:

$\forall x[ (x\geq 0\Longrightarrow |x|=x)\wedge(x<0\Longrightarrow |x|=-x)]$
Indeed. This is true and it follows from 1).

The statement

$\forall x[ (x\geq 0\Longrightarrow |x|=x)\vee(x<0\Longrightarrow |x|=-x)]$

is also true, but not interesting wrt the definition of absolute value.

Indeed. This is true and it follows from 1).

.

How ??

Erland
How ??
Assume that 1) is true. This means that |x|=y⟺(x≥0⟹x=y)∧(x<0⟹x=−y)

holds for all x and y, including all x and y such that y=|x|, so

|x|=|x|⟺(x≥0⟹x=|x|)∧(x<0⟹x=−|x|)

for all x. But |x|=|x| is certainly true, so

(x≥0⟹x=|x|)∧(x<0⟹x=−|x|)

holds for all x, which is the same as

∀x[(x≥0⟹|x|=x)∧(x<0⟹|x|=−x)].

Assume that 1) is true. This means that |x|=y⟺(x≥0⟹x=y)∧(x<0⟹x=−y)

holds for all x and y, including all x and y such that y=|x|, so

|x|=|x|⟺(x≥0⟹x=|x|)∧(x<0⟹x=−|x|)

for all x. But |x|=|x| is certainly true, so

(x≥0⟹x=|x|)∧(x<0⟹x=−|x|)

holds for all x, which is the same as

∀x[(x≥0⟹|x|=x)∧(x<0⟹|x|=−x)].
This does not look very convincing to me, how can you know that what you have proved is correct

Erland
This does not look very convincing to me, how can you know that what you have proved is correct
It is a chain of logical reasoning. Which steps do you doubt?

It is a chain of logical reasoning. Which steps do you doubt?
exactly ,i am confused with the logical reasoning. What is logical reasoning anyway

Stephen Tashi
exactly ,i am confused with the logical reasoning. What is logical reasoning anyway
Where did you get the question in your original post? Aren't you studying some materials that deal with logic?

Where did you get the question in your original post? Aren't you studying some materials that deal with logic?
In the "axiomatic set theory" book of Patrick Suppes ,page 172

Erland
Stauros, just tell us which steps in the above reasoning (in Post 8) you have difficulties with. Otherwise, it is hard to help you.

Stauros, just tell us which steps in the above reasoning (in Post 8) you have difficulties with. Otherwise, it is hard to help you.
O.k ,in substituting in the definition y =|x| are you allowed to do that?

And then how do you jump from :

$|x|=|x|\Longleftrightarrow (x\geq 0\Longrightarrow x=y)\wedge (x<0\Longrightarrow x= -y)$ to

$(x\geq 0\Longrightarrow |x|=x)\wedge (x<0\Longrightarrow |x|= -x)$

Erland
O.k ,in substituting in the definition y =|x| are you allowed to do that?
Yes. $\forall x\forall y P(x,y)$ means that $P(x,y)$ holds no matter which values x and y have. It must then also hold for all values of x and y such that y=|x|. Therefore $P(x,|x|)$ must hold for all x.

As an analogous example, you agree that the rule

$\forall x\forall y[(x+y)(x-y)=x^2-y^2]$

holds, right?

Then, don't you also agree that e.g.

$(x+\sin x)(x-\sin x)=x^2-\sin^2 x$

holds for all x, and that this is a consequence of the rule?
And then how do you jump from :

$|x|=|x|\Longleftrightarrow (x\geq 0\Longrightarrow x=y)\wedge (x<0\Longrightarrow x= -y)$ to

$(x\geq 0\Longrightarrow |x|=x)\wedge (x<0\Longrightarrow |x|= -x)$
That $A \Longleftrightarrow B$ means that $A$ and $B$ either are both true or both false. Then, if we now that $A \Longleftrightarrow B$ is true and that also $A$ is true, then $B$ must also be true.

Since we established that

$|x|=|x|\Longleftrightarrow (x\geq 0\Longrightarrow x=|x|)\wedge (x<0\Longrightarrow x= -|x|)$

(you wrote it erroneously, with y instead of |x|) is true for all x, and since, certainly, $|x|=|x|$ is true for all x, we obtain that

$(x\geq 0\Longrightarrow x=|x|)\wedge (x<0\Longrightarrow x= -|x|)$

holds for all x.

Yes. $\forall x\forall y P(x,y)$ means that $P(x,y)$ holds no matter which values x and y have. It must then also hold for all values of x and y such that y=|x|. Therefore $P(x,|x|)$ must hold for all x.
How about if you put y=x,then you have :

$[|x|=x\Longleftrightarrow (x\geq 0\Longrightarrow x=x)\wedge(x<0\Longrightarrow x=-x)]$

Is that true ,and if yes how do we prove it?

That $A \Longleftrightarrow B$ means that $A$ and $B$ either are both true or both false. Then, if we now that $A \Longleftrightarrow B$ is true and that also $A$ is true, then $B$ must also be true.

Since we established that

$|x|=|x|\Longleftrightarrow (x\geq 0\Longrightarrow x=|x|)\wedge (x<0\Longrightarrow x= -|x|)$

(you wrote it erroneously, with y instead of |x|) is true for all x, and since, certainly, $|x|=|x|$ is true for all x, we obtain that

$(x\geq 0\Longrightarrow x=|x|)\wedge (x<0\Longrightarrow x= -|x|)$

holds for all x.
1) I think you have not established that :

$[|x|=|x|\Longleftrightarrow (x\geq 0\Longrightarrow x=|x|)\wedge(x<0\Longrightarrow x=-|x|)]$ is true,for all values of x

You have just assume that the above holds for a particular value of x and y.

To establish that the above holds for all values of x and y you must try all real values of x and y

2) Why $|x|= |x|$ is always true for all x?

Erland
How about if you put y=x,then you have :

$[|x|=x\Longleftrightarrow (x\geq 0\Longrightarrow x=x)\wedge(x<0\Longrightarrow x=-x)]$ (*)

Is that true ,and if yes how do we prove it?
Yes, it is true. It also follows from

1) $\forall x\forall y[ |x|=y\Longleftrightarrow( x\geq 0\Longrightarrow x=y)\wedge(x<0\Longrightarrow x=-y)]$.

Of course, if you don't accept 1), you don't have to accept its consequences either (at least not without more facts). But if we accept 1), which we should do since it can be taken as a definition of absolute value (it precisely expresses what we mean with absolute value), then we must also accept its logical consequences, such as (*) and

$[|x|=|x|\Longleftrightarrow (x\geq 0\Longrightarrow x=|x|)\wedge(x<0\Longrightarrow x=-|x|)]$

(both true for all (x)).

However, it is also easy to verify (*) directly, without deducing it from 1). I leave this as as an exercise for you. (Hint: Verify that if $x\ge 0$ then both sides of the equivalence in (*) are true, and if $x<0$ then both sides are false. This means that the equivalence is true for all values of $x$.)
1) I think you have not established that :

$[|x|=|x|\Longleftrightarrow (x\geq 0\Longrightarrow x=|x|)\wedge(x<0\Longrightarrow x=-|x|)]$ is true,for all values of x.
Yes, I established that it follows from 1). Nothing more is needed. But of course, one can verify also this without using 1). You can try that.
2) Why $|x|= |x|$ is always true for all x?
How can you doubt this? Do you really believe that something can be unequal to itself?

However, it is also easy to verify (*) directly, without deducing it from 1). I leave this as as an exercise for you. (Hint: Verify that if $x\ge 0$ then both sides of the equivalence in (*) are true, and if $x<0$ then both sides are false. This means that the equivalence is true for all values of $x$.)
1) First of vall i think you agree that verification is not a proof

2)Your hint inspired me for the following proof :

Let $|x|=x$............................................................................1

We know from the law of trichotomy that:

$x\geq 0\vee \ x<0$................................................................2

Let : $x\geq 0$..........................................................................3

But we know that : $x=x$.............................................................4

Hence : $x\geq 0\Longrightarrow x=x$............................................5

Let : $x<0$..................................................................................6

But we know that : $x<0\Longrightarrow |x|=-x$...............................7

Hence from (6) and(7) we conclude that : $|x|=-x$..............................................8

And by substituting (1) into (8) we have: $x=-x$..................................................9

Thus : $x<0\Longrightarrow x=-x$......................................................................10

And by the power of the law of logic called proof by cases we can conclude:

$(x\geq 0\Longrightarrow x=x)\vee(x<0\Longrightarrow x=-x)$

Therefor : $|x|=x\Longrightarrow (x\geq 0\Longrightarrow x=x)\vee(x<0\Longrightarrow x=-x)$

So:

$|x|=x\Longrightarrow (x\geq 0\Longrightarrow x=x)\vee(x<0\Longrightarrow x=-x)$

is right ,and

$|x|=x\Longrightarrow (x\geq 0\Longrightarrow x=x)\wedge(x<0\Longrightarrow x=-x)$

is wrong

Hence:

$|x|=x\Longleftrightarrow (x\geq 0\Longrightarrow x=x)\wedge(x<0\Longrightarrow x=-x)$

is not true

Erland
1) First of vall i think you agree that verification is not a proof
That is in itself correct. For a correct proof, 1) should be used. But I had in mind a more direct argument, where we freely use these two properties of absolute value:

$x\ge 0 \Longrightarrow |x|=x$ and $x<0 \Longrightarrow |x|=-x$ (the last one you also used in your dervation, step 7).

These properties are actually consequences of 1), and in a rigorous proof of (*) it is unnecessary to prove and use these, for we only need to set y=x. But still it can be instructive to use these two properties in a proof (or argument) to better understand why (*) is true.

2)Your hint inspired me for the following proof :

[---]

So:

$|x|=x\Longrightarrow (x\geq 0\Longrightarrow x=x)\vee(x<0\Longrightarrow x=-x)$

is right
Everything in the derivation is correct thus far, but then you claim:
$|x|=x\Longrightarrow(x\geq 0\Longrightarrow x=x)\wedge(x<0\Longrightarrow x=-x)$

is wrong.
This does not follow. What you claim is wrong is not wrong, but right.

Instead, you can do like this:

Assume first that $x\ge 0$. Prove that then $|x|=x$ is true and

$(x\geq 0\Longrightarrow x=x)\wedge(x<0\Longrightarrow x=-x)$

is true. Conclude that then is

$|x|=x\Longleftrightarrow(x\geq 0\Longrightarrow x=x)\wedge(x<0\Longrightarrow x=-x)$

true.

Assume then that $x<0$. Prove that then $|x|=x$ is false and

$(x\geq 0\Longrightarrow x=x)\wedge(x<0\Longrightarrow x=-x)$

is false. Conclude that then is

$|x|=x\Longleftrightarrow(x\geq 0\Longrightarrow x=x)\wedge(x<0\Longrightarrow x=-x)$

true.

Conclude that in all cases (for all x)

$|x|=x\Longleftrightarrow(x\geq 0\Longrightarrow x=x)\wedge(x<0\Longrightarrow x=-x)$

is true.

Assume first that $x\ge 0$. Prove that then $|x|=x$ is true and

$(x\geq 0\Longrightarrow x=x)\wedge(x<0\Longrightarrow x=-x)$

is true. Conclude that then is

$|x|=x\Longleftrightarrow(x\geq 0\Longrightarrow x=x)\wedge(x<0\Longrightarrow x=-x)$

true.

.
How??

Erland
Assume that $x\ge 0$.

Then $|x|=x$.

Since $x=x$, we also have $x\geq 0\Longrightarrow x=x$.

Since $x\ge 0$, $\neg \, x<0$, which gives $x<0\Longrightarrow x=-x$.

Thus, $(x\geq 0\Longrightarrow x=x)\wedge(x<0\Longrightarrow x=-x)$.

But we also had $|x|=x$, so

$|x|=x\Longleftrightarrow(x\geq 0\Longrightarrow x=x)\wedge(x<0\Longrightarrow x=-x)$

(if we assume $x\ge 0$, that is).

Assume that $x\ge 0$.

Then $|x|=x$.

Since $x=x$, we also have $x\geq 0\Longrightarrow x=x$.

Since $x\ge 0$, $\neg \, x<0$, which gives $x<0\Longrightarrow x=-x$.

Thus, $(x\geq 0\Longrightarrow x=x)\wedge(x<0\Longrightarrow x=-x)$.

But we also had $|x|=x$, so

$|x|=x\Longleftrightarrow(x\geq 0\Longrightarrow x=x)\wedge(x<0\Longrightarrow x=-x)$

(if we assume $x\ge 0$, that is).
Sorry ,i cannot follow.

Can you write your proof in a stepwise manner in more details ,like i did mine?

So i will not have to ask questions for each line of the proof.

Thanks

Erland
Sorry ,i cannot follow.

Can you write your proof in a stepwise manner in more details ,like i did mine?

So i will not have to ask questions for each line of the proof.

Thanks
I think it is better to make a partial truth table, for all combinations of truth values of the atomic formulae that can occur together. A full truth table has $2^5=32$ rows, but it turns out that we need only check 3 of them, for the other 29 combinations of truth values can never occur together in this case.

The only three combinations that can occur together are:

1)
a) $|x|=x$ true
b) $x\ge 0$ true
c) $x=x$ true
d) $x<0$ false
e) $x=-x$ true
(this holds if and only if $x=0$, the only case where $x=-x$ is true)

2)
a) $|x|=x$ true
b) $x\ge 0$ true
c) $x=x$ true
d) $x<0$ false
e) $x=-x$ false
(this holds if and only if $x>0$)

3)
a) $|x|=x$ false
b) $x\ge 0$ false
c) $x=x$ true
d) $x<0$ true
e) $x=-x$ false
(this holds if and only if $x<0$)

You should convince yourself that these are the only combinations of truth values of these five atomic formulae that can occur.

Now, if we use the truth tables for implication, conjunction, and equivalence, we see that:

Case 1) and 2):
i) $|x|=x$ true (1 a or 2 a)
ii) $x\ge 0\Longrightarrow x=x$ true (from 1 b and c, or 2 b and c)
iii) $x<0\Longrightarrow x=-x$ true (from 1 d and e, or 2 d and e)
iv) $(x\ge 0\Longrightarrow x=x)\wedge (x<0\Longrightarrow x=-x)$ true (from ii and iii)
v) $|x|=x\Longleftrightarrow(x\geq 0\Longrightarrow x=x)\wedge(x<0\Longrightarrow x=-x)$ true (from i and iv)

Case 3):
i) $|x|=x$ false (3 a)
ii) $x\ge 0\Longrightarrow x=x$ true (from 3 b and c)
iii) $x<0\Longrightarrow x=-x$ false (from 3 d and e)
iv) $(x\ge 0\Longrightarrow x=x)\wedge (x<0\Longrightarrow x=-x)$ false (from ii and iii)
v) $|x|=x\Longleftrightarrow(x\geq 0\Longrightarrow x=x)\wedge(x<0\Longrightarrow x=-x)$ true (from i and iv)

Thus, in all cases which can occur: $| x|=x\Longleftrightarrow(x\geq 0\Longrightarrow x=x)\wedge(x<0\Longrightarrow x=-x)$ is true, so this formula is true for all $x$.

In other words:
$\forall x[|x|=x\Longleftrightarrow(x\geq 0\Longrightarrow x=x)\wedge(x<0\Longrightarrow x=-x)]$
is true.

I think it is better to make a partial truth table, for all combinations of truth values of the atomic formulae that can occur together. A full truth table has $2^5=32$ rows, but it turns out that we need only check 3 of them, for the other 29 combinations of truth values can never occur together in this case.

The only three combinations that can occur together are:

1)
a) $|x|=x$ true
b) $x\ge 0$ true
c) $x=x$ true
d) $x<0$ false
e) $x=-x$ true
(this holds if and only if $x=0$, the only case where $x=-x$ is true)

2)
a) $|x|=x$ true
b) $x\ge 0$ true
c) $x=x$ true
d) $x<0$ false
e) $x=-x$ false
(this holds if and only if $x>0$)

3)
a) $|x|=x$ false
b) $x\ge 0$ false
c) $x=x$ true
d) $x<0$ true
e) $x=-x$ false
(this holds if and only if $x<0$)

You should convince yourself that these are the only combinations of truth values of these five atomic formulae that can occur.

Now, if we use the truth tables for implication, conjunction, and equivalence, we see that:

Case 1) and 2):
i) $|x|=x$ true (1 a or 2 a)
ii) $x\ge 0\Longrightarrow x=x$ true (from 1 b and c, or 2 b and c)
iii) $x<0\Longrightarrow x=-x$ true (from 1 d and e, or 2 d and e)
iv) $(x\ge 0\Longrightarrow x=x)\wedge (x<0\Longrightarrow x=-x)$ true (from ii and iii)
v) $|x|=x\Longleftrightarrow(x\geq 0\Longrightarrow x=x)\wedge(x<0\Longrightarrow x=-x)$ true (from i and iv)

Case 3):
i) $|x|=x$ false (3 a)
ii) $x\ge 0\Longrightarrow x=x$ true (from 3 b and c)
iii) $x<0\Longrightarrow x=-x$ false (from 3 d and e)
iv) $(x\ge 0\Longrightarrow x=x)\wedge (x<0\Longrightarrow x=-x)$ false (from ii and iii)
v) $|x|=x\Longleftrightarrow(x\geq 0\Longrightarrow x=x)\wedge(x<0\Longrightarrow x=-x)$ true (from i and iv)

Thus, in all cases which can occur: $| x|=x\Longleftrightarrow(x\geq 0\Longrightarrow x=x)\wedge(x<0\Longrightarrow x=-x)$ is true, so this formula is true for all $x$.

In other words:
$\forall x[|x|=x\Longleftrightarrow(x\geq 0\Longrightarrow x=x)\wedge(x<0\Longrightarrow x=-x)]$
is true.
Before we examine the correctness of your proof,

Can you use your semantical method of true and false values to find out whether the formula:

$\forall a[a\neq 0\Longrightarrow a^2>0]$ is a theorem or not?