Metamath Proof Explorer


Theorem 2sqlem5

Description: Lemma for 2sq . If a number that is a sum of two squares is divisible by a prime that is a sum of two squares, then the quotient is a sum of two squares. (Contributed by Mario Carneiro, 20-Jun-2015)

Ref Expression
Hypotheses 2sq.1 S = ran w i w 2
2sqlem5.1 φ N
2sqlem5.2 φ P
2sqlem5.3 φ N P S
2sqlem5.4 φ P S
Assertion 2sqlem5 φ N S

Proof

Step Hyp Ref Expression
1 2sq.1 S = ran w i w 2
2 2sqlem5.1 φ N
3 2sqlem5.2 φ P
4 2sqlem5.3 φ N P S
5 2sqlem5.4 φ P S
6 1 2sqlem2 P S p q P = p 2 + q 2
7 5 6 sylib φ p q P = p 2 + q 2
8 1 2sqlem2 N P S x y N P = x 2 + y 2
9 4 8 sylib φ x y N P = x 2 + y 2
10 reeanv p x q P = p 2 + q 2 y N P = x 2 + y 2 p q P = p 2 + q 2 x y N P = x 2 + y 2
11 reeanv q y P = p 2 + q 2 N P = x 2 + y 2 q P = p 2 + q 2 y N P = x 2 + y 2
12 2 ad2antrr φ p x q y P = p 2 + q 2 N P = x 2 + y 2 N
13 3 ad2antrr φ p x q y P = p 2 + q 2 N P = x 2 + y 2 P
14 simplrr φ p x q y P = p 2 + q 2 N P = x 2 + y 2 x
15 simprlr φ p x q y P = p 2 + q 2 N P = x 2 + y 2 y
16 simplrl φ p x q y P = p 2 + q 2 N P = x 2 + y 2 p
17 simprll φ p x q y P = p 2 + q 2 N P = x 2 + y 2 q
18 simprrr φ p x q y P = p 2 + q 2 N P = x 2 + y 2 N P = x 2 + y 2
19 simprrl φ p x q y P = p 2 + q 2 N P = x 2 + y 2 P = p 2 + q 2
20 1 12 13 14 15 16 17 18 19 2sqlem4 φ p x q y P = p 2 + q 2 N P = x 2 + y 2 N S
21 20 expr φ p x q y P = p 2 + q 2 N P = x 2 + y 2 N S
22 21 rexlimdvva φ p x q y P = p 2 + q 2 N P = x 2 + y 2 N S
23 11 22 syl5bir φ p x q P = p 2 + q 2 y N P = x 2 + y 2 N S
24 23 rexlimdvva φ p x q P = p 2 + q 2 y N P = x 2 + y 2 N S
25 10 24 syl5bir φ p q P = p 2 + q 2 x y N P = x 2 + y 2 N S
26 7 9 25 mp2and φ N S