MPE Home Metamath Proof Explorer < Previous   Next >
Nearby theorems
Mirrors  >  Home  >  MPE Home  >  Th. List  >  2lgslem3b1 Structured version   Visualization version   GIF version

Theorem 2lgslem3b1 26831
Description: Lemma 2 for 2lgslem3 26834. (Contributed by AV, 16-Jul-2021.)
Hypothesis
Ref Expression
2lgslem2.n 𝑁 = (((𝑃 − 1) / 2) − (⌊‘(𝑃 / 4)))
Assertion
Ref Expression
2lgslem3b1 ((𝑃 ∈ ℕ ∧ (𝑃 mod 8) = 3) → (𝑁 mod 2) = 1)

Proof of Theorem 2lgslem3b1
Dummy variable 𝑘 is distinct from all other variables.
StepHypRef Expression
1 nnnn0 12461 . . . 4 (𝑃 ∈ ℕ → 𝑃 ∈ ℕ0)
2 8nn 12289 . . . . 5 8 ∈ ℕ
3 nnrp 12967 . . . . 5 (8 ∈ ℕ → 8 ∈ ℝ+)
42, 3ax-mp 5 . . . 4 8 ∈ ℝ+
5 modmuladdnn0 13862 . . . 4 ((𝑃 ∈ ℕ0 ∧ 8 ∈ ℝ+) → ((𝑃 mod 8) = 3 → ∃𝑘 ∈ ℕ0 𝑃 = ((𝑘 · 8) + 3)))
61, 4, 5sylancl 586 . . 3 (𝑃 ∈ ℕ → ((𝑃 mod 8) = 3 → ∃𝑘 ∈ ℕ0 𝑃 = ((𝑘 · 8) + 3)))
7 simpr 485 . . . . 5 ((𝑃 ∈ ℕ ∧ 𝑘 ∈ ℕ0) → 𝑘 ∈ ℕ0)
8 nn0cn 12464 . . . . . . . . . . 11 (𝑘 ∈ ℕ0𝑘 ∈ ℂ)
9 8cn 12291 . . . . . . . . . . . 12 8 ∈ ℂ
109a1i 11 . . . . . . . . . . 11 (𝑘 ∈ ℕ0 → 8 ∈ ℂ)
118, 10mulcomd 11217 . . . . . . . . . 10 (𝑘 ∈ ℕ0 → (𝑘 · 8) = (8 · 𝑘))
1211adantl 482 . . . . . . . . 9 ((𝑃 ∈ ℕ ∧ 𝑘 ∈ ℕ0) → (𝑘 · 8) = (8 · 𝑘))
1312oveq1d 7408 . . . . . . . 8 ((𝑃 ∈ ℕ ∧ 𝑘 ∈ ℕ0) → ((𝑘 · 8) + 3) = ((8 · 𝑘) + 3))
1413eqeq2d 2742 . . . . . . 7 ((𝑃 ∈ ℕ ∧ 𝑘 ∈ ℕ0) → (𝑃 = ((𝑘 · 8) + 3) ↔ 𝑃 = ((8 · 𝑘) + 3)))
1514biimpa 477 . . . . . 6 (((𝑃 ∈ ℕ ∧ 𝑘 ∈ ℕ0) ∧ 𝑃 = ((𝑘 · 8) + 3)) → 𝑃 = ((8 · 𝑘) + 3))
16 2lgslem2.n . . . . . . 7 𝑁 = (((𝑃 − 1) / 2) − (⌊‘(𝑃 / 4)))
17162lgslem3b 26827 . . . . . 6 ((𝑘 ∈ ℕ0𝑃 = ((8 · 𝑘) + 3)) → 𝑁 = ((2 · 𝑘) + 1))
187, 15, 17syl2an2r 683 . . . . 5 (((𝑃 ∈ ℕ ∧ 𝑘 ∈ ℕ0) ∧ 𝑃 = ((𝑘 · 8) + 3)) → 𝑁 = ((2 · 𝑘) + 1))
19 oveq1 7400 . . . . . 6 (𝑁 = ((2 · 𝑘) + 1) → (𝑁 mod 2) = (((2 · 𝑘) + 1) mod 2))
20 nn0z 12565 . . . . . . . 8 (𝑘 ∈ ℕ0𝑘 ∈ ℤ)
21 eqidd 2732 . . . . . . . 8 (𝑘 ∈ ℕ0 → ((2 · 𝑘) + 1) = ((2 · 𝑘) + 1))
22 2tp1odd 16277 . . . . . . . 8 ((𝑘 ∈ ℤ ∧ ((2 · 𝑘) + 1) = ((2 · 𝑘) + 1)) → ¬ 2 ∥ ((2 · 𝑘) + 1))
2320, 21, 22syl2anc 584 . . . . . . 7 (𝑘 ∈ ℕ0 → ¬ 2 ∥ ((2 · 𝑘) + 1))
24 2z 12576 . . . . . . . . . . 11 2 ∈ ℤ
2524a1i 11 . . . . . . . . . 10 (𝑘 ∈ ℕ0 → 2 ∈ ℤ)
2625, 20zmulcld 12654 . . . . . . . . 9 (𝑘 ∈ ℕ0 → (2 · 𝑘) ∈ ℤ)
2726peano2zd 12651 . . . . . . . 8 (𝑘 ∈ ℕ0 → ((2 · 𝑘) + 1) ∈ ℤ)
28 mod2eq1n2dvds 16272 . . . . . . . 8 (((2 · 𝑘) + 1) ∈ ℤ → ((((2 · 𝑘) + 1) mod 2) = 1 ↔ ¬ 2 ∥ ((2 · 𝑘) + 1)))
2927, 28syl 17 . . . . . . 7 (𝑘 ∈ ℕ0 → ((((2 · 𝑘) + 1) mod 2) = 1 ↔ ¬ 2 ∥ ((2 · 𝑘) + 1)))
3023, 29mpbird 256 . . . . . 6 (𝑘 ∈ ℕ0 → (((2 · 𝑘) + 1) mod 2) = 1)
3119, 30sylan9eqr 2793 . . . . 5 ((𝑘 ∈ ℕ0𝑁 = ((2 · 𝑘) + 1)) → (𝑁 mod 2) = 1)
327, 18, 31syl2an2r 683 . . . 4 (((𝑃 ∈ ℕ ∧ 𝑘 ∈ ℕ0) ∧ 𝑃 = ((𝑘 · 8) + 3)) → (𝑁 mod 2) = 1)
3332rexlimdva2 3156 . . 3 (𝑃 ∈ ℕ → (∃𝑘 ∈ ℕ0 𝑃 = ((𝑘 · 8) + 3) → (𝑁 mod 2) = 1))
346, 33syld 47 . 2 (𝑃 ∈ ℕ → ((𝑃 mod 8) = 3 → (𝑁 mod 2) = 1))
3534imp 407 1 ((𝑃 ∈ ℕ ∧ (𝑃 mod 8) = 3) → (𝑁 mod 2) = 1)
Colors of variables: wff setvar class
Syntax hints:  ¬ wn 3  wi 4  wb 205  wa 396   = wceq 1541  wcel 2106  wrex 3069   class class class wbr 5141  cfv 6532  (class class class)co 7393  cc 11090  1c1 11093   + caddc 11095   · cmul 11097  cmin 11426   / cdiv 11853  cn 12194  2c2 12249  3c3 12250  4c4 12251  8c8 12255  0cn0 12454  cz 12540  +crp 12956  cfl 13737   mod cmo 13816  cdvds 16179
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1797  ax-4 1811  ax-5 1913  ax-6 1971  ax-7 2011  ax-8 2108  ax-9 2116  ax-10 2137  ax-11 2154  ax-12 2171  ax-ext 2702  ax-sep 5292  ax-nul 5299  ax-pow 5356  ax-pr 5420  ax-un 7708  ax-cnex 11148  ax-resscn 11149  ax-1cn 11150  ax-icn 11151  ax-addcl 11152  ax-addrcl 11153  ax-mulcl 11154  ax-mulrcl 11155  ax-mulcom 11156  ax-addass 11157  ax-mulass 11158  ax-distr 11159  ax-i2m1 11160  ax-1ne0 11161  ax-1rid 11162  ax-rnegex 11163  ax-rrecex 11164  ax-cnre 11165  ax-pre-lttri 11166  ax-pre-lttrn 11167  ax-pre-ltadd 11168  ax-pre-mulgt0 11169  ax-pre-sup 11170
This theorem depends on definitions:  df-bi 206  df-an 397  df-or 846  df-3or 1088  df-3an 1089  df-tru 1544  df-fal 1554  df-ex 1782  df-nf 1786  df-sb 2068  df-mo 2533  df-eu 2562  df-clab 2709  df-cleq 2723  df-clel 2809  df-nfc 2884  df-ne 2940  df-nel 3046  df-ral 3061  df-rex 3070  df-rmo 3375  df-reu 3376  df-rab 3432  df-v 3475  df-sbc 3774  df-csb 3890  df-dif 3947  df-un 3949  df-in 3951  df-ss 3961  df-pss 3963  df-nul 4319  df-if 4523  df-pw 4598  df-sn 4623  df-pr 4625  df-op 4629  df-uni 4902  df-iun 4992  df-br 5142  df-opab 5204  df-mpt 5225  df-tr 5259  df-id 5567  df-eprel 5573  df-po 5581  df-so 5582  df-fr 5624  df-we 5626  df-xp 5675  df-rel 5676  df-cnv 5677  df-co 5678  df-dm 5679  df-rn 5680  df-res 5681  df-ima 5682  df-pred 6289  df-ord 6356  df-on 6357  df-lim 6358  df-suc 6359  df-iota 6484  df-fun 6534  df-fn 6535  df-f 6536  df-f1 6537  df-fo 6538  df-f1o 6539  df-fv 6540  df-riota 7349  df-ov 7396  df-oprab 7397  df-mpo 7398  df-om 7839  df-2nd 7958  df-frecs 8248  df-wrecs 8279  df-recs 8353  df-rdg 8392  df-er 8686  df-en 8923  df-dom 8924  df-sdom 8925  df-sup 9419  df-inf 9420  df-pnf 11232  df-mnf 11233  df-xr 11234  df-ltxr 11235  df-le 11236  df-sub 11428  df-neg 11429  df-div 11854  df-nn 12195  df-2 12257  df-3 12258  df-4 12259  df-5 12260  df-6 12261  df-7 12262  df-8 12263  df-n0 12455  df-z 12541  df-uz 12805  df-rp 12957  df-ico 13312  df-fl 13739  df-mod 13817  df-dvds 16180
This theorem is referenced by:  2lgslem3  26834
  Copyright terms: Public domain W3C validator