Metamath Proof Explorer


Theorem flt4lem5e

Description: Satisfy the hypotheses of flt4lem4 . (Contributed by SN, 23-Aug-2024)

Ref Expression
Hypotheses flt4lem5a.m M = C + B 2 + C B 2 2
flt4lem5a.n N = C + B 2 C B 2 2
flt4lem5a.r R = M + N + M N 2
flt4lem5a.s S = M + N M N 2
flt4lem5a.a φ A
flt4lem5a.b φ B
flt4lem5a.c φ C
flt4lem5a.1 φ ¬ 2 A
flt4lem5a.2 φ A gcd C = 1
flt4lem5a.3 φ A 4 + B 4 = C 2
Assertion flt4lem5e φ R gcd S = 1 R gcd M = 1 S gcd M = 1 R S M M R S = B 2 2 B 2

Proof

Step Hyp Ref Expression
1 flt4lem5a.m M = C + B 2 + C B 2 2
2 flt4lem5a.n N = C + B 2 C B 2 2
3 flt4lem5a.r R = M + N + M N 2
4 flt4lem5a.s S = M + N M N 2
5 flt4lem5a.a φ A
6 flt4lem5a.b φ B
7 flt4lem5a.c φ C
8 flt4lem5a.1 φ ¬ 2 A
9 flt4lem5a.2 φ A gcd C = 1
10 flt4lem5a.3 φ A 4 + B 4 = C 2
11 5 nnsqcld φ A 2
12 6 nnsqcld φ B 2
13 2prm 2
14 5 nnzd φ A
15 prmdvdssq 2 A 2 A 2 A 2
16 13 14 15 sylancr φ 2 A 2 A 2
17 8 16 mtbid φ ¬ 2 A 2
18 2nn 2
19 18 a1i φ 2
20 rplpwr A C 2 A gcd C = 1 A 2 gcd C = 1
21 5 7 19 20 syl3anc φ A gcd C = 1 A 2 gcd C = 1
22 9 21 mpd φ A 2 gcd C = 1
23 5 nncnd φ A
24 23 flt4lem φ A 4 = A 2 2
25 6 nncnd φ B
26 25 flt4lem φ B 4 = B 2 2
27 24 26 oveq12d φ A 4 + B 4 = A 2 2 + B 2 2
28 27 10 eqtr3d φ A 2 2 + B 2 2 = C 2
29 11 12 7 17 22 28 flt4lem1 φ A 2 B 2 C A 2 2 + B 2 2 = C 2 A 2 gcd B 2 = 1 ¬ 2 A 2
30 2 pythagtriplem13 A 2 B 2 C A 2 2 + B 2 2 = C 2 A 2 gcd B 2 = 1 ¬ 2 A 2 N
31 29 30 syl φ N
32 1 pythagtriplem11 A 2 B 2 C A 2 2 + B 2 2 = C 2 A 2 gcd B 2 = 1 ¬ 2 A 2 M
33 29 32 syl φ M
34 1 2 3 4 5 6 7 8 9 10 flt4lem5a φ A 2 + N 2 = M 2
35 31 nnzd φ N
36 14 35 gcdcomd φ A gcd N = N gcd A
37 33 nnzd φ M
38 35 37 gcdcomd φ N gcd M = M gcd N
39 1 2 flt4lem5 A 2 B 2 C A 2 2 + B 2 2 = C 2 A 2 gcd B 2 = 1 ¬ 2 A 2 M gcd N = 1
40 29 39 syl φ M gcd N = 1
41 38 40 eqtrd φ N gcd M = 1
42 31 nnsqcld φ N 2
43 42 nncnd φ N 2
44 11 nncnd φ A 2
45 43 44 addcomd φ N 2 + A 2 = A 2 + N 2
46 45 34 eqtrd φ N 2 + A 2 = M 2
47 31 5 33 41 46 fltabcoprm φ N gcd A = 1
48 36 47 eqtrd φ A gcd N = 1
49 3 4 flt4lem5 A N M A 2 + N 2 = M 2 A gcd N = 1 ¬ 2 A R gcd S = 1
50 5 31 33 34 48 8 49 syl312anc φ R gcd S = 1
51 3 pythagtriplem11 A N M A 2 + N 2 = M 2 A gcd N = 1 ¬ 2 A R
52 5 31 33 34 48 8 51 syl312anc φ R
53 4 pythagtriplem13 A N M A 2 + N 2 = M 2 A gcd N = 1 ¬ 2 A S
54 5 31 33 34 48 8 53 syl312anc φ S
55 1 2 3 4 5 6 7 8 9 10 flt4lem5d φ M = R 2 + S 2
56 33 52 54 55 50 flt4lem5elem φ R gcd M = 1 S gcd M = 1
57 3anass R gcd S = 1 R gcd M = 1 S gcd M = 1 R gcd S = 1 R gcd M = 1 S gcd M = 1
58 50 56 57 sylanbrc φ R gcd S = 1 R gcd M = 1 S gcd M = 1
59 52 54 33 3jca φ R S M
60 sq2 2 2 = 4
61 4cn 4
62 60 61 eqeltri 2 2
63 62 a1i φ 2 2
64 52 54 nnmulcld φ R S
65 33 64 nnmulcld φ M R S
66 65 nncnd φ M R S
67 4ne0 4 0
68 60 67 eqnetri 2 2 0
69 68 a1i φ 2 2 0
70 2cn 2
71 70 sqvali 2 2 = 2 2
72 71 oveq1i 2 2 M R S = 2 2 M R S
73 2cnd φ 2
74 33 nncnd φ M
75 64 nncnd φ R S
76 73 73 74 75 mul4d φ 2 2 M R S = 2 M 2 R S
77 1 2 3 4 5 6 7 8 9 10 flt4lem5c φ N = 2 R S
78 77 31 eqeltrrd φ 2 R S
79 78 nncnd φ 2 R S
80 73 74 79 mulassd φ 2 M 2 R S = 2 M 2 R S
81 77 eqcomd φ 2 R S = N
82 81 oveq2d φ M 2 R S = M N
83 82 oveq2d φ 2 M 2 R S = 2 M N
84 80 83 eqtrd φ 2 M 2 R S = 2 M N
85 1 2 3 4 5 6 7 8 9 10 flt4lem5b φ 2 M N = B 2
86 76 84 85 3eqtrd φ 2 2 M R S = B 2
87 72 86 syl5eq φ 2 2 M R S = B 2
88 63 66 69 87 mvllmuld φ M R S = B 2 2 2
89 2ne0 2 0
90 89 a1i φ 2 0
91 25 73 90 sqdivd φ B 2 2 = B 2 2 2
92 88 91 eqtr4d φ M R S = B 2 2
93 65 nnzd φ M R S
94 92 93 eqeltrrd φ B 2 2
95 6 nnzd φ B
96 znq B 2 B 2
97 95 18 96 sylancl φ B 2
98 6 nngt0d φ 0 < B
99 6 nnred φ B
100 halfpos2 B 0 < B 0 < B 2
101 99 100 syl φ 0 < B 0 < B 2
102 98 101 mpbid φ 0 < B 2
103 94 97 102 posqsqznn φ B 2
104 92 103 jca φ M R S = B 2 2 B 2
105 58 59 104 3jca φ R gcd S = 1 R gcd M = 1 S gcd M = 1 R S M M R S = B 2 2 B 2