Metamath Proof Explorer


Theorem sqabs

Description: The squares of two reals are equal iff their absolute values are equal. (Contributed by NM, 6-Mar-2009)

Ref Expression
Assertion sqabs A B A 2 = B 2 A = B

Proof

Step Hyp Ref Expression
1 resqcl A A 2
2 sqge0 A 0 A 2
3 absid A 2 0 A 2 A 2 = A 2
4 1 2 3 syl2anc A A 2 = A 2
5 recn A A
6 2nn0 2 0
7 absexp A 2 0 A 2 = A 2
8 5 6 7 sylancl A A 2 = A 2
9 4 8 eqtr3d A A 2 = A 2
10 resqcl B B 2
11 sqge0 B 0 B 2
12 absid B 2 0 B 2 B 2 = B 2
13 10 11 12 syl2anc B B 2 = B 2
14 recn B B
15 absexp B 2 0 B 2 = B 2
16 14 6 15 sylancl B B 2 = B 2
17 13 16 eqtr3d B B 2 = B 2
18 9 17 eqeqan12d A B A 2 = B 2 A 2 = B 2
19 abscl A A
20 absge0 A 0 A
21 19 20 jca A A 0 A
22 abscl B B
23 absge0 B 0 B
24 22 23 jca B B 0 B
25 sq11 A 0 A B 0 B A 2 = B 2 A = B
26 21 24 25 syl2an A B A 2 = B 2 A = B
27 5 14 26 syl2an A B A 2 = B 2 A = B
28 18 27 bitrd A B A 2 = B 2 A = B