Metamath Proof Explorer


Theorem 2lgslem3b1

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

Ref Expression
Hypothesis 2lgslem2.n N = P 1 2 P 4
Assertion 2lgslem3b1 P P mod 8 = 3 N mod 2 = 1

Proof

Step Hyp Ref Expression
1 2lgslem2.n N = P 1 2 P 4
2 nnnn0 P P 0
3 8nn 8
4 nnrp 8 8 +
5 3 4 ax-mp 8 +
6 modmuladdnn0 P 0 8 + P mod 8 = 3 k 0 P = k 8 + 3
7 2 5 6 sylancl P P mod 8 = 3 k 0 P = k 8 + 3
8 simpr P k 0 k 0
9 nn0cn k 0 k
10 8cn 8
11 10 a1i k 0 8
12 9 11 mulcomd k 0 k 8 = 8 k
13 12 adantl P k 0 k 8 = 8 k
14 13 oveq1d P k 0 k 8 + 3 = 8 k + 3
15 14 eqeq2d P k 0 P = k 8 + 3 P = 8 k + 3
16 15 biimpa P k 0 P = k 8 + 3 P = 8 k + 3
17 1 2lgslem3b k 0 P = 8 k + 3 N = 2 k + 1
18 8 16 17 syl2an2r P k 0 P = k 8 + 3 N = 2 k + 1
19 oveq1 N = 2 k + 1 N mod 2 = 2 k + 1 mod 2
20 nn0z k 0 k
21 eqidd k 0 2 k + 1 = 2 k + 1
22 2tp1odd k 2 k + 1 = 2 k + 1 ¬ 2 2 k + 1
23 20 21 22 syl2anc k 0 ¬ 2 2 k + 1
24 2z 2
25 24 a1i k 0 2
26 25 20 zmulcld k 0 2 k
27 26 peano2zd k 0 2 k + 1
28 mod2eq1n2dvds 2 k + 1 2 k + 1 mod 2 = 1 ¬ 2 2 k + 1
29 27 28 syl k 0 2 k + 1 mod 2 = 1 ¬ 2 2 k + 1
30 23 29 mpbird k 0 2 k + 1 mod 2 = 1
31 19 30 sylan9eqr k 0 N = 2 k + 1 N mod 2 = 1
32 8 18 31 syl2an2r P k 0 P = k 8 + 3 N mod 2 = 1
33 32 rexlimdva2 P k 0 P = k 8 + 3 N mod 2 = 1
34 7 33 syld P P mod 8 = 3 N mod 2 = 1
35 34 imp P P mod 8 = 3 N mod 2 = 1