Metamath Proof Explorer


Theorem flt4lem5elem

Description: Version of fltaccoprm and fltbccoprm where M is not squared. This can be proved in general for any polynomial in three variables: using prmdvdsncoprmbd , dvds2addd , and prmdvdsexp , we can show that if two variables are coprime, the third is also coprime to the two. (Contributed by SN, 24-Aug-2024)

Ref Expression
Hypotheses flt4lem5elem.m φ M
flt4lem5elem.r φ R
flt4lem5elem.s φ S
flt4lem5elem.1 φ M = R 2 + S 2
flt4lem5elem.2 φ R gcd S = 1
Assertion flt4lem5elem φ R gcd M = 1 S gcd M = 1

Proof

Step Hyp Ref Expression
1 flt4lem5elem.m φ M
2 flt4lem5elem.r φ R
3 flt4lem5elem.s φ S
4 flt4lem5elem.1 φ M = R 2 + S 2
5 flt4lem5elem.2 φ R gcd S = 1
6 2 3 prmdvdsncoprmbd φ p p R p S R gcd S 1
7 6 necon2bbid φ R gcd S = 1 ¬ p p R p S
8 5 7 mpbid φ ¬ p p R p S
9 simprl φ p p R p M p R
10 simplr φ p p R p M p
11 prmz p p
12 10 11 syl φ p p R p M p
13 1 nnzd φ M
14 13 ad2antrr φ p p R p M M
15 2 nnsqcld φ R 2
16 15 nnzd φ R 2
17 16 ad2antrr φ p p R p M R 2
18 simprr φ p p R p M p M
19 2 nnzd φ R
20 19 ad2antrr φ p p R p M R
21 prmdvdssq p R p R p R 2
22 10 20 21 syl2anc φ p p R p M p R p R 2
23 9 22 mpbid φ p p R p M p R 2
24 12 14 17 18 23 dvds2subd φ p p R p M p M R 2
25 15 nncnd φ R 2
26 25 ad2antrr φ p p R p M R 2
27 3 nnsqcld φ S 2
28 27 nncnd φ S 2
29 28 ad2antrr φ p p R p M S 2
30 4 ad2antrr φ p p R p M M = R 2 + S 2
31 26 29 30 mvrladdd φ p p R p M M R 2 = S 2
32 24 31 breqtrd φ p p R p M p S 2
33 3 nnzd φ S
34 33 ad2antrr φ p p R p M S
35 prmdvdssq p S p S p S 2
36 10 34 35 syl2anc φ p p R p M p S p S 2
37 32 36 mpbird φ p p R p M p S
38 9 37 jca φ p p R p M p R p S
39 38 ex φ p p R p M p R p S
40 39 reximdva φ p p R p M p p R p S
41 8 40 mtod φ ¬ p p R p M
42 2 1 prmdvdsncoprmbd φ p p R p M R gcd M 1
43 42 necon2bbid φ R gcd M = 1 ¬ p p R p M
44 41 43 mpbird φ R gcd M = 1
45 simplr φ p p S p M p
46 45 11 syl φ p p S p M p
47 13 ad2antrr φ p p S p M M
48 27 nnzd φ S 2
49 48 ad2antrr φ p p S p M S 2
50 simprr φ p p S p M p M
51 simprl φ p p S p M p S
52 33 ad2antrr φ p p S p M S
53 45 52 35 syl2anc φ p p S p M p S p S 2
54 51 53 mpbid φ p p S p M p S 2
55 46 47 49 50 54 dvds2subd φ p p S p M p M S 2
56 25 ad2antrr φ p p S p M R 2
57 28 ad2antrr φ p p S p M S 2
58 4 ad2antrr φ p p S p M M = R 2 + S 2
59 56 57 58 mvrraddd φ p p S p M M S 2 = R 2
60 55 59 breqtrd φ p p S p M p R 2
61 19 ad2antrr φ p p S p M R
62 45 61 21 syl2anc φ p p S p M p R p R 2
63 60 62 mpbird φ p p S p M p R
64 63 51 jca φ p p S p M p R p S
65 64 ex φ p p S p M p R p S
66 65 reximdva φ p p S p M p p R p S
67 8 66 mtod φ ¬ p p S p M
68 3 1 prmdvdsncoprmbd φ p p S p M S gcd M 1
69 68 necon2bbid φ S gcd M = 1 ¬ p p S p M
70 67 69 mpbird φ S gcd M = 1
71 44 70 jca φ R gcd M = 1 S gcd M = 1