Metamath Proof Explorer


Theorem lgsquad3

Description: Extend lgsquad2 to integers which share a factor. (Contributed by Mario Carneiro, 19-Jun-2015)

Ref Expression
Assertion lgsquad3 M ¬ 2 M N ¬ 2 N M / L N = 1 M 1 2 N 1 2 N / L M

Proof

Step Hyp Ref Expression
1 simplrl M ¬ 2 M N ¬ 2 N M gcd N = 1 N
2 nnz N N
3 1 2 syl M ¬ 2 M N ¬ 2 N M gcd N = 1 N
4 nnz M M
5 4 ad3antrrr M ¬ 2 M N ¬ 2 N M gcd N = 1 M
6 lgscl N M N / L M
7 3 5 6 syl2anc M ¬ 2 M N ¬ 2 N M gcd N = 1 N / L M
8 7 zred M ¬ 2 M N ¬ 2 N M gcd N = 1 N / L M
9 absresq N / L M N / L M 2 = N / L M 2
10 8 9 syl M ¬ 2 M N ¬ 2 N M gcd N = 1 N / L M 2 = N / L M 2
11 3 5 gcdcomd M ¬ 2 M N ¬ 2 N M gcd N = 1 N gcd M = M gcd N
12 simpr M ¬ 2 M N ¬ 2 N M gcd N = 1 M gcd N = 1
13 11 12 eqtrd M ¬ 2 M N ¬ 2 N M gcd N = 1 N gcd M = 1
14 lgsabs1 N M N / L M = 1 N gcd M = 1
15 3 5 14 syl2anc M ¬ 2 M N ¬ 2 N M gcd N = 1 N / L M = 1 N gcd M = 1
16 13 15 mpbird M ¬ 2 M N ¬ 2 N M gcd N = 1 N / L M = 1
17 16 oveq1d M ¬ 2 M N ¬ 2 N M gcd N = 1 N / L M 2 = 1 2
18 sq1 1 2 = 1
19 17 18 eqtrdi M ¬ 2 M N ¬ 2 N M gcd N = 1 N / L M 2 = 1
20 7 zcnd M ¬ 2 M N ¬ 2 N M gcd N = 1 N / L M
21 20 sqvald M ¬ 2 M N ¬ 2 N M gcd N = 1 N / L M 2 = N / L M N / L M
22 10 19 21 3eqtr3d M ¬ 2 M N ¬ 2 N M gcd N = 1 1 = N / L M N / L M
23 22 oveq2d M ¬ 2 M N ¬ 2 N M gcd N = 1 M / L N 1 = M / L N N / L M N / L M
24 lgscl M N M / L N
25 5 3 24 syl2anc M ¬ 2 M N ¬ 2 N M gcd N = 1 M / L N
26 25 zcnd M ¬ 2 M N ¬ 2 N M gcd N = 1 M / L N
27 26 20 20 mulassd M ¬ 2 M N ¬ 2 N M gcd N = 1 M / L N N / L M N / L M = M / L N N / L M N / L M
28 23 27 eqtr4d M ¬ 2 M N ¬ 2 N M gcd N = 1 M / L N 1 = M / L N N / L M N / L M
29 26 mulid1d M ¬ 2 M N ¬ 2 N M gcd N = 1 M / L N 1 = M / L N
30 simplll M ¬ 2 M N ¬ 2 N M gcd N = 1 M
31 simpllr M ¬ 2 M N ¬ 2 N M gcd N = 1 ¬ 2 M
32 simplrr M ¬ 2 M N ¬ 2 N M gcd N = 1 ¬ 2 N
33 30 31 1 32 12 lgsquad2 M ¬ 2 M N ¬ 2 N M gcd N = 1 M / L N N / L M = 1 M 1 2 N 1 2
34 33 oveq1d M ¬ 2 M N ¬ 2 N M gcd N = 1 M / L N N / L M N / L M = 1 M 1 2 N 1 2 N / L M
35 28 29 34 3eqtr3d M ¬ 2 M N ¬ 2 N M gcd N = 1 M / L N = 1 M 1 2 N 1 2 N / L M
36 neg1cn 1
37 36 a1i M ¬ 2 M N ¬ 2 N ¬ M gcd N = 1 1
38 neg1ne0 1 0
39 38 a1i M ¬ 2 M N ¬ 2 N ¬ M gcd N = 1 1 0
40 4 ad3antrrr M ¬ 2 M N ¬ 2 N ¬ M gcd N = 1 M
41 simpllr M ¬ 2 M N ¬ 2 N ¬ M gcd N = 1 ¬ 2 M
42 1zzd M ¬ 2 M N ¬ 2 N ¬ M gcd N = 1 1
43 2prm 2
44 nprmdvds1 2 ¬ 2 1
45 43 44 mp1i M ¬ 2 M N ¬ 2 N ¬ M gcd N = 1 ¬ 2 1
46 omoe M ¬ 2 M 1 ¬ 2 1 2 M 1
47 40 41 42 45 46 syl22anc M ¬ 2 M N ¬ 2 N ¬ M gcd N = 1 2 M 1
48 2z 2
49 2ne0 2 0
50 peano2zm M M 1
51 40 50 syl M ¬ 2 M N ¬ 2 N ¬ M gcd N = 1 M 1
52 dvdsval2 2 2 0 M 1 2 M 1 M 1 2
53 48 49 51 52 mp3an12i M ¬ 2 M N ¬ 2 N ¬ M gcd N = 1 2 M 1 M 1 2
54 47 53 mpbid M ¬ 2 M N ¬ 2 N ¬ M gcd N = 1 M 1 2
55 2 adantr N ¬ 2 N N
56 55 ad2antlr M ¬ 2 M N ¬ 2 N ¬ M gcd N = 1 N
57 simplrr M ¬ 2 M N ¬ 2 N ¬ M gcd N = 1 ¬ 2 N
58 omoe N ¬ 2 N 1 ¬ 2 1 2 N 1
59 56 57 42 45 58 syl22anc M ¬ 2 M N ¬ 2 N ¬ M gcd N = 1 2 N 1
60 peano2zm N N 1
61 56 60 syl M ¬ 2 M N ¬ 2 N ¬ M gcd N = 1 N 1
62 dvdsval2 2 2 0 N 1 2 N 1 N 1 2
63 48 49 61 62 mp3an12i M ¬ 2 M N ¬ 2 N ¬ M gcd N = 1 2 N 1 N 1 2
64 59 63 mpbid M ¬ 2 M N ¬ 2 N ¬ M gcd N = 1 N 1 2
65 54 64 zmulcld M ¬ 2 M N ¬ 2 N ¬ M gcd N = 1 M 1 2 N 1 2
66 37 39 65 expclzd M ¬ 2 M N ¬ 2 N ¬ M gcd N = 1 1 M 1 2 N 1 2
67 66 mul01d M ¬ 2 M N ¬ 2 N ¬ M gcd N = 1 1 M 1 2 N 1 2 0 = 0
68 lgsne0 N M N / L M 0 N gcd M = 1
69 gcdcom N M N gcd M = M gcd N
70 69 eqeq1d N M N gcd M = 1 M gcd N = 1
71 68 70 bitrd N M N / L M 0 M gcd N = 1
72 2 4 71 syl2anr M N N / L M 0 M gcd N = 1
73 72 necon1bbid M N ¬ M gcd N = 1 N / L M = 0
74 73 ad2ant2r M ¬ 2 M N ¬ 2 N ¬ M gcd N = 1 N / L M = 0
75 74 biimpa M ¬ 2 M N ¬ 2 N ¬ M gcd N = 1 N / L M = 0
76 75 oveq2d M ¬ 2 M N ¬ 2 N ¬ M gcd N = 1 1 M 1 2 N 1 2 N / L M = 1 M 1 2 N 1 2 0
77 lgsne0 M N M / L N 0 M gcd N = 1
78 77 necon1bbid M N ¬ M gcd N = 1 M / L N = 0
79 4 2 78 syl2an M N ¬ M gcd N = 1 M / L N = 0
80 79 ad2ant2r M ¬ 2 M N ¬ 2 N ¬ M gcd N = 1 M / L N = 0
81 80 biimpa M ¬ 2 M N ¬ 2 N ¬ M gcd N = 1 M / L N = 0
82 67 76 81 3eqtr4rd M ¬ 2 M N ¬ 2 N ¬ M gcd N = 1 M / L N = 1 M 1 2 N 1 2 N / L M
83 35 82 pm2.61dan M ¬ 2 M N ¬ 2 N M / L N = 1 M 1 2 N 1 2 N / L M