Metamath Proof Explorer


Theorem 2lgslem3d

Description: Lemma for 2lgslem3d1 . (Contributed by AV, 16-Jul-2021)

Ref Expression
Hypothesis 2lgslem2.n N = P 1 2 P 4
Assertion 2lgslem3d K 0 P = 8 K + 7 N = 2 K + 2

Proof

Step Hyp Ref Expression
1 2lgslem2.n N = P 1 2 P 4
2 oveq1 P = 8 K + 7 P 1 = 8 K + 7 - 1
3 2 oveq1d P = 8 K + 7 P 1 2 = 8 K + 7 - 1 2
4 fvoveq1 P = 8 K + 7 P 4 = 8 K + 7 4
5 3 4 oveq12d P = 8 K + 7 P 1 2 P 4 = 8 K + 7 - 1 2 8 K + 7 4
6 1 5 eqtrid P = 8 K + 7 N = 8 K + 7 - 1 2 8 K + 7 4
7 8nn0 8 0
8 7 a1i K 0 8 0
9 id K 0 K 0
10 8 9 nn0mulcld K 0 8 K 0
11 10 nn0cnd K 0 8 K
12 7cn 7
13 12 a1i K 0 7
14 1cnd K 0 1
15 11 13 14 addsubassd K 0 8 K + 7 - 1 = 8 K + 7 - 1
16 4t2e8 4 2 = 8
17 16 eqcomi 8 = 4 2
18 17 a1i K 0 8 = 4 2
19 18 oveq1d K 0 8 K = 4 2 K
20 4cn 4
21 20 a1i K 0 4
22 2cn 2
23 22 a1i K 0 2
24 nn0cn K 0 K
25 21 23 24 mul32d K 0 4 2 K = 4 K 2
26 19 25 eqtrd K 0 8 K = 4 K 2
27 7m1e6 7 1 = 6
28 27 a1i K 0 7 1 = 6
29 26 28 oveq12d K 0 8 K + 7 - 1 = 4 K 2 + 6
30 15 29 eqtrd K 0 8 K + 7 - 1 = 4 K 2 + 6
31 30 oveq1d K 0 8 K + 7 - 1 2 = 4 K 2 + 6 2
32 4nn0 4 0
33 32 a1i K 0 4 0
34 33 9 nn0mulcld K 0 4 K 0
35 34 nn0cnd K 0 4 K
36 35 23 mulcld K 0 4 K 2
37 6cn 6
38 37 a1i K 0 6
39 2rp 2 +
40 39 a1i K 0 2 +
41 40 rpcnne0d K 0 2 2 0
42 divdir 4 K 2 6 2 2 0 4 K 2 + 6 2 = 4 K 2 2 + 6 2
43 36 38 41 42 syl3anc K 0 4 K 2 + 6 2 = 4 K 2 2 + 6 2
44 2ne0 2 0
45 44 a1i K 0 2 0
46 35 23 45 divcan4d K 0 4 K 2 2 = 4 K
47 3t2e6 3 2 = 6
48 47 eqcomi 6 = 3 2
49 48 oveq1i 6 2 = 3 2 2
50 3cn 3
51 50 22 44 divcan4i 3 2 2 = 3
52 49 51 eqtri 6 2 = 3
53 52 a1i K 0 6 2 = 3
54 46 53 oveq12d K 0 4 K 2 2 + 6 2 = 4 K + 3
55 31 43 54 3eqtrd K 0 8 K + 7 - 1 2 = 4 K + 3
56 4ne0 4 0
57 20 56 pm3.2i 4 4 0
58 57 a1i K 0 4 4 0
59 divdir 8 K 7 4 4 0 8 K + 7 4 = 8 K 4 + 7 4
60 11 13 58 59 syl3anc K 0 8 K + 7 4 = 8 K 4 + 7 4
61 8cn 8
62 61 a1i K 0 8
63 div23 8 K 4 4 0 8 K 4 = 8 4 K
64 62 24 58 63 syl3anc K 0 8 K 4 = 8 4 K
65 17 oveq1i 8 4 = 4 2 4
66 22 20 56 divcan3i 4 2 4 = 2
67 65 66 eqtri 8 4 = 2
68 67 a1i K 0 8 4 = 2
69 68 oveq1d K 0 8 4 K = 2 K
70 64 69 eqtrd K 0 8 K 4 = 2 K
71 70 oveq1d K 0 8 K 4 + 7 4 = 2 K + 7 4
72 60 71 eqtrd K 0 8 K + 7 4 = 2 K + 7 4
73 72 fveq2d K 0 8 K + 7 4 = 2 K + 7 4
74 3lt4 3 < 4
75 2nn0 2 0
76 75 a1i K 0 2 0
77 76 9 nn0mulcld K 0 2 K 0
78 77 nn0zd K 0 2 K
79 78 peano2zd K 0 2 K + 1
80 3nn0 3 0
81 80 a1i K 0 3 0
82 4nn 4
83 82 a1i K 0 4
84 adddivflid 2 K + 1 3 0 4 3 < 4 2 K + 1 + 3 4 = 2 K + 1
85 79 81 83 84 syl3anc K 0 3 < 4 2 K + 1 + 3 4 = 2 K + 1
86 23 24 mulcld K 0 2 K
87 50 a1i K 0 3
88 56 a1i K 0 4 0
89 87 21 88 divcld K 0 3 4
90 86 14 89 addassd K 0 2 K + 1 + 3 4 = 2 K + 1 + 3 4
91 4p3e7 4 + 3 = 7
92 91 eqcomi 7 = 4 + 3
93 92 oveq1i 7 4 = 4 + 3 4
94 20 50 20 56 divdiri 4 + 3 4 = 4 4 + 3 4
95 20 56 dividi 4 4 = 1
96 95 oveq1i 4 4 + 3 4 = 1 + 3 4
97 93 94 96 3eqtri 7 4 = 1 + 3 4
98 97 a1i K 0 7 4 = 1 + 3 4
99 98 eqcomd K 0 1 + 3 4 = 7 4
100 99 oveq2d K 0 2 K + 1 + 3 4 = 2 K + 7 4
101 90 100 eqtrd K 0 2 K + 1 + 3 4 = 2 K + 7 4
102 101 fveqeq2d K 0 2 K + 1 + 3 4 = 2 K + 1 2 K + 7 4 = 2 K + 1
103 85 102 bitrd K 0 3 < 4 2 K + 7 4 = 2 K + 1
104 74 103 mpbii K 0 2 K + 7 4 = 2 K + 1
105 73 104 eqtrd K 0 8 K + 7 4 = 2 K + 1
106 55 105 oveq12d K 0 8 K + 7 - 1 2 8 K + 7 4 = 4 K + 3 - 2 K + 1
107 77 nn0cnd K 0 2 K
108 35 87 107 14 addsub4d K 0 4 K + 3 - 2 K + 1 = 4 K 2 K + 3 - 1
109 2t2e4 2 2 = 4
110 109 eqcomi 4 = 2 2
111 110 a1i K 0 4 = 2 2
112 111 oveq1d K 0 4 K = 2 2 K
113 23 23 24 mulassd K 0 2 2 K = 2 2 K
114 112 113 eqtrd K 0 4 K = 2 2 K
115 114 oveq1d K 0 4 K 2 K = 2 2 K 2 K
116 2txmxeqx 2 K 2 2 K 2 K = 2 K
117 107 116 syl K 0 2 2 K 2 K = 2 K
118 115 117 eqtrd K 0 4 K 2 K = 2 K
119 3m1e2 3 1 = 2
120 119 a1i K 0 3 1 = 2
121 118 120 oveq12d K 0 4 K 2 K + 3 - 1 = 2 K + 2
122 106 108 121 3eqtrd K 0 8 K + 7 - 1 2 8 K + 7 4 = 2 K + 2
123 6 122 sylan9eqr K 0 P = 8 K + 7 N = 2 K + 2