Metamath Proof Explorer


Theorem flt4lem5e

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

Ref Expression
Hypotheses flt4lem5a.m M=C+B2+CB22
flt4lem5a.n N=C+B2CB22
flt4lem5a.r R=M+N+MN2
flt4lem5a.s S=M+NMN2
flt4lem5a.a φA
flt4lem5a.b φB
flt4lem5a.c φC
flt4lem5a.1 φ¬2A
flt4lem5a.2 φAgcdC=1
flt4lem5a.3 φA4+B4=C2
Assertion flt4lem5e φRgcdS=1RgcdM=1SgcdM=1RSMMRS=B22B2

Proof

Step Hyp Ref Expression
1 flt4lem5a.m M=C+B2+CB22
2 flt4lem5a.n N=C+B2CB22
3 flt4lem5a.r R=M+N+MN2
4 flt4lem5a.s S=M+NMN2
5 flt4lem5a.a φA
6 flt4lem5a.b φB
7 flt4lem5a.c φC
8 flt4lem5a.1 φ¬2A
9 flt4lem5a.2 φAgcdC=1
10 flt4lem5a.3 φA4+B4=C2
11 5 nnsqcld φA2
12 6 nnsqcld φB2
13 2prm 2
14 5 nnzd φA
15 prmdvdssq 2A2A2A2
16 13 14 15 sylancr φ2A2A2
17 8 16 mtbid φ¬2A2
18 2nn 2
19 18 a1i φ2
20 rplpwr AC2AgcdC=1A2gcdC=1
21 5 7 19 20 syl3anc φAgcdC=1A2gcdC=1
22 9 21 mpd φA2gcdC=1
23 5 nncnd φA
24 23 flt4lem φA4=A22
25 6 nncnd φB
26 25 flt4lem φB4=B22
27 24 26 oveq12d φA4+B4=A22+B22
28 27 10 eqtr3d φA22+B22=C2
29 11 12 7 17 22 28 flt4lem1 φA2B2CA22+B22=C2A2gcdB2=1¬2A2
30 2 pythagtriplem13 A2B2CA22+B22=C2A2gcdB2=1¬2A2N
31 29 30 syl φN
32 1 pythagtriplem11 A2B2CA22+B22=C2A2gcdB2=1¬2A2M
33 29 32 syl φM
34 1 2 3 4 5 6 7 8 9 10 flt4lem5a φA2+N2=M2
35 31 nnzd φN
36 14 35 gcdcomd φAgcdN=NgcdA
37 33 nnzd φM
38 35 37 gcdcomd φNgcdM=MgcdN
39 1 2 flt4lem5 A2B2CA22+B22=C2A2gcdB2=1¬2A2MgcdN=1
40 29 39 syl φMgcdN=1
41 38 40 eqtrd φNgcdM=1
42 31 nnsqcld φN2
43 42 nncnd φN2
44 11 nncnd φA2
45 43 44 addcomd φN2+A2=A2+N2
46 45 34 eqtrd φN2+A2=M2
47 31 5 33 41 46 fltabcoprm φNgcdA=1
48 36 47 eqtrd φAgcdN=1
49 3 4 flt4lem5 ANMA2+N2=M2AgcdN=1¬2ARgcdS=1
50 5 31 33 34 48 8 49 syl312anc φRgcdS=1
51 3 pythagtriplem11 ANMA2+N2=M2AgcdN=1¬2AR
52 5 31 33 34 48 8 51 syl312anc φR
53 4 pythagtriplem13 ANMA2+N2=M2AgcdN=1¬2AS
54 5 31 33 34 48 8 53 syl312anc φS
55 1 2 3 4 5 6 7 8 9 10 flt4lem5d φM=R2+S2
56 33 52 54 55 50 flt4lem5elem φRgcdM=1SgcdM=1
57 3anass RgcdS=1RgcdM=1SgcdM=1RgcdS=1RgcdM=1SgcdM=1
58 50 56 57 sylanbrc φRgcdS=1RgcdM=1SgcdM=1
59 52 54 33 3jca φRSM
60 sq2 22=4
61 4cn 4
62 60 61 eqeltri 22
63 62 a1i φ22
64 52 54 nnmulcld φRS
65 33 64 nnmulcld φMRS
66 65 nncnd φMRS
67 4ne0 40
68 60 67 eqnetri 220
69 68 a1i φ220
70 2cn 2
71 70 sqvali 22=22
72 71 oveq1i 22MRS=22MRS
73 2cnd φ2
74 33 nncnd φM
75 64 nncnd φRS
76 73 73 74 75 mul4d φ22MRS=2 M2RS
77 1 2 3 4 5 6 7 8 9 10 flt4lem5c φN=2RS
78 77 31 eqeltrrd φ2RS
79 78 nncnd φ2RS
80 73 74 79 mulassd φ2 M2RS=2M2RS
81 77 eqcomd φ2RS=N
82 81 oveq2d φM2RS= M N
83 82 oveq2d φ2M2RS=2 M N
84 80 83 eqtrd φ2 M2RS=2 M N
85 1 2 3 4 5 6 7 8 9 10 flt4lem5b φ2 M N=B2
86 76 84 85 3eqtrd φ22MRS=B2
87 72 86 eqtrid φ22MRS=B2
88 63 66 69 87 mvllmuld φMRS=B222
89 2ne0 20
90 89 a1i φ20
91 25 73 90 sqdivd φB22=B222
92 88 91 eqtr4d φMRS=B22
93 65 nnzd φMRS
94 92 93 eqeltrrd φB22
95 6 nnzd φB
96 znq B2B2
97 95 18 96 sylancl φB2
98 6 nngt0d φ0<B
99 6 nnred φB
100 halfpos2 B0<B0<B2
101 99 100 syl φ0<B0<B2
102 98 101 mpbid φ0<B2
103 94 97 102 posqsqznn φB2
104 92 103 jca φMRS=B22B2
105 58 59 104 3jca φRgcdS=1RgcdM=1SgcdM=1RSMMRS=B22B2