Metamath Proof Explorer


Theorem 2sqn0

Description: If the sum of two squares is prime, none of the original number is zero. (Contributed by Thierry Arnoux, 4-Feb-2020)

Ref Expression
Hypotheses 2sqcoprm.1 φ P
2sqcoprm.2 φ A
2sqcoprm.3 φ B
2sqcoprm.4 φ A 2 + B 2 = P
Assertion 2sqn0 φ A 0

Proof

Step Hyp Ref Expression
1 2sqcoprm.1 φ P
2 2sqcoprm.2 φ A
3 2sqcoprm.3 φ B
4 2sqcoprm.4 φ A 2 + B 2 = P
5 4 1 eqeltrd φ A 2 + B 2
6 5 adantr φ A = 0 A 2 + B 2
7 sq0i A = 0 A 2 = 0
8 7 oveq1d A = 0 A 2 + B 2 = 0 + B 2
9 3 zcnd φ B
10 9 sqcld φ B 2
11 10 addid2d φ 0 + B 2 = B 2
12 8 11 sylan9eqr φ A = 0 A 2 + B 2 = B 2
13 sqnprm B ¬ B 2
14 3 13 syl φ ¬ B 2
15 14 adantr φ A = 0 ¬ B 2
16 12 15 eqneltrd φ A = 0 ¬ A 2 + B 2
17 6 16 pm2.65da φ ¬ A = 0
18 17 neqned φ A 0