Metamath Proof Explorer


Theorem sqeqor

Description: The squares of two complex numbers are equal iff one number equals the other or its negative. Lemma 15-4.7 of Gleason p. 311 and its converse. (Contributed by Paul Chapman, 15-Mar-2008)

Ref Expression
Assertion sqeqor ABA2=B2A=BA=B

Proof

Step Hyp Ref Expression
1 oveq1 A=ifAA0A2=ifAA02
2 1 eqeq1d A=ifAA0A2=B2ifAA02=B2
3 eqeq1 A=ifAA0A=BifAA0=B
4 eqeq1 A=ifAA0A=BifAA0=B
5 3 4 orbi12d A=ifAA0A=BA=BifAA0=BifAA0=B
6 2 5 bibi12d A=ifAA0A2=B2A=BA=BifAA02=B2ifAA0=BifAA0=B
7 oveq1 B=ifBB0B2=ifBB02
8 7 eqeq2d B=ifBB0ifAA02=B2ifAA02=ifBB02
9 eqeq2 B=ifBB0ifAA0=BifAA0=ifBB0
10 negeq B=ifBB0B=ifBB0
11 10 eqeq2d B=ifBB0ifAA0=BifAA0=ifBB0
12 9 11 orbi12d B=ifBB0ifAA0=BifAA0=BifAA0=ifBB0ifAA0=ifBB0
13 8 12 bibi12d B=ifBB0ifAA02=B2ifAA0=BifAA0=BifAA02=ifBB02ifAA0=ifBB0ifAA0=ifBB0
14 0cn 0
15 14 elimel ifAA0
16 14 elimel ifBB0
17 15 16 sqeqori ifAA02=ifBB02ifAA0=ifBB0ifAA0=ifBB0
18 6 13 17 dedth2h ABA2=B2A=BA=B