Metamath Proof Explorer


Theorem lgsdirnn0

Description: Variation on lgsdir valid for all A , B but only for positive N . (The exact location of the failure of this law is for A = 0 , B < 0 , N = -u 1 in which case ( 0 /L -u 1 ) = 1 but ( B /L -u 1 ) = -u 1 .) (Contributed by Mario Carneiro, 28-Apr-2016)

Ref Expression
Assertion lgsdirnn0 ABN0AB/LN=A/LNB/LN

Proof

Step Hyp Ref Expression
1 oveq1 x=Bx/LN=B/LN
2 1 oveq1d x=Bx/LN0/LN=B/LN0/LN
3 2 eqeq2d x=B0/LN=x/LN0/LN0/LN=B/LN0/LN
4 id xx
5 nn0z N0N
6 lgscl xNx/LN
7 4 5 6 syl2anr N0xx/LN
8 7 zcnd N0xx/LN
9 8 adantr N0x0/LN=0x/LN
10 9 mul01d N0x0/LN=0x/LN0=0
11 simpr N0x0/LN=00/LN=0
12 11 oveq2d N0x0/LN=0x/LN0/LN=x/LN0
13 10 12 11 3eqtr4rd N0x0/LN=00/LN=x/LN0/LN
14 0z 0
15 5 adantr N0xN
16 lgsne0 0N0/LN00gcdN=1
17 14 15 16 sylancr N0x0/LN00gcdN=1
18 gcdcom 0N0gcdN=Ngcd0
19 14 15 18 sylancr N0x0gcdN=Ngcd0
20 nn0gcdid0 N0Ngcd0=N
21 20 adantr N0xNgcd0=N
22 19 21 eqtrd N0x0gcdN=N
23 22 eqeq1d N0x0gcdN=1N=1
24 lgs1 xx/L1=1
25 24 adantl N0xx/L1=1
26 oveq2 N=1x/LN=x/L1
27 26 eqeq1d N=1x/LN=1x/L1=1
28 25 27 syl5ibrcom N0xN=1x/LN=1
29 23 28 sylbid N0x0gcdN=1x/LN=1
30 17 29 sylbid N0x0/LN0x/LN=1
31 30 imp N0x0/LN0x/LN=1
32 31 oveq1d N0x0/LN0x/LN0/LN=10/LN
33 5 ad2antrr N0x0/LN0N
34 lgscl 0N0/LN
35 14 33 34 sylancr N0x0/LN00/LN
36 35 zcnd N0x0/LN00/LN
37 36 mullidd N0x0/LN010/LN=0/LN
38 32 37 eqtr2d N0x0/LN00/LN=x/LN0/LN
39 13 38 pm2.61dane N0x0/LN=x/LN0/LN
40 39 ralrimiva N0x0/LN=x/LN0/LN
41 40 3ad2ant3 ABN0x0/LN=x/LN0/LN
42 simp2 ABN0B
43 3 41 42 rspcdva ABN00/LN=B/LN0/LN
44 43 adantr ABN0A=00/LN=B/LN0/LN
45 5 3ad2ant3 ABN0N
46 14 45 34 sylancr ABN00/LN
47 46 zcnd ABN00/LN
48 47 adantr ABN0A=00/LN
49 lgscl BNB/LN
50 42 45 49 syl2anc ABN0B/LN
51 50 zcnd ABN0B/LN
52 51 adantr ABN0A=0B/LN
53 48 52 mulcomd ABN0A=00/LNB/LN=B/LN0/LN
54 44 53 eqtr4d ABN0A=00/LN=0/LNB/LN
55 oveq1 A=0AB=0B
56 zcn BB
57 56 3ad2ant2 ABN0B
58 57 mul02d ABN00B=0
59 55 58 sylan9eqr ABN0A=0AB=0
60 59 oveq1d ABN0A=0AB/LN=0/LN
61 simpr ABN0A=0A=0
62 61 oveq1d ABN0A=0A/LN=0/LN
63 62 oveq1d ABN0A=0A/LNB/LN=0/LNB/LN
64 54 60 63 3eqtr4d ABN0A=0AB/LN=A/LNB/LN
65 oveq1 x=Ax/LN=A/LN
66 65 oveq1d x=Ax/LN0/LN=A/LN0/LN
67 66 eqeq2d x=A0/LN=x/LN0/LN0/LN=A/LN0/LN
68 simp1 ABN0A
69 67 41 68 rspcdva ABN00/LN=A/LN0/LN
70 69 adantr ABN0B=00/LN=A/LN0/LN
71 oveq2 B=0AB=A0
72 68 zcnd ABN0A
73 72 mul01d ABN0A0=0
74 71 73 sylan9eqr ABN0B=0AB=0
75 74 oveq1d ABN0B=0AB/LN=0/LN
76 simpr ABN0B=0B=0
77 76 oveq1d ABN0B=0B/LN=0/LN
78 77 oveq2d ABN0B=0A/LNB/LN=A/LN0/LN
79 70 75 78 3eqtr4d ABN0B=0AB/LN=A/LNB/LN
80 lgsdir ABNA0B0AB/LN=A/LNB/LN
81 5 80 syl3anl3 ABN0A0B0AB/LN=A/LNB/LN
82 64 79 81 pm2.61da2ne ABN0AB/LN=A/LNB/LN