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

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

Proof of Theorem 2lgslem3c1
Dummy variable 𝑘 is distinct from all other variables.
StepHypRef Expression
1 nnnn0 11715 . . . 4 (𝑃 ∈ ℕ → 𝑃 ∈ ℕ0)
2 8nn 11540 . . . . 5 8 ∈ ℕ
3 nnrp 12217 . . . . 5 (8 ∈ ℕ → 8 ∈ ℝ+)
42, 3ax-mp 5 . . . 4 8 ∈ ℝ+
5 modmuladdnn0 13098 . . . 4 ((𝑃 ∈ ℕ0 ∧ 8 ∈ ℝ+) → ((𝑃 mod 8) = 5 → ∃𝑘 ∈ ℕ0 𝑃 = ((𝑘 · 8) + 5)))
61, 4, 5sylancl 577 . . 3 (𝑃 ∈ ℕ → ((𝑃 mod 8) = 5 → ∃𝑘 ∈ ℕ0 𝑃 = ((𝑘 · 8) + 5)))
7 simpr 477 . . . . 5 ((𝑃 ∈ ℕ ∧ 𝑘 ∈ ℕ0) → 𝑘 ∈ ℕ0)
8 nn0cn 11718 . . . . . . . . . . 11 (𝑘 ∈ ℕ0𝑘 ∈ ℂ)
9 8cn 11542 . . . . . . . . . . . 12 8 ∈ ℂ
109a1i 11 . . . . . . . . . . 11 (𝑘 ∈ ℕ0 → 8 ∈ ℂ)
118, 10mulcomd 10461 . . . . . . . . . 10 (𝑘 ∈ ℕ0 → (𝑘 · 8) = (8 · 𝑘))
1211adantl 474 . . . . . . . . 9 ((𝑃 ∈ ℕ ∧ 𝑘 ∈ ℕ0) → (𝑘 · 8) = (8 · 𝑘))
1312oveq1d 6991 . . . . . . . 8 ((𝑃 ∈ ℕ ∧ 𝑘 ∈ ℕ0) → ((𝑘 · 8) + 5) = ((8 · 𝑘) + 5))
1413eqeq2d 2788 . . . . . . 7 ((𝑃 ∈ ℕ ∧ 𝑘 ∈ ℕ0) → (𝑃 = ((𝑘 · 8) + 5) ↔ 𝑃 = ((8 · 𝑘) + 5)))
1514biimpa 469 . . . . . 6 (((𝑃 ∈ ℕ ∧ 𝑘 ∈ ℕ0) ∧ 𝑃 = ((𝑘 · 8) + 5)) → 𝑃 = ((8 · 𝑘) + 5))
16 2lgslem2.n . . . . . . 7 𝑁 = (((𝑃 − 1) / 2) − (⌊‘(𝑃 / 4)))
17162lgslem3c 25676 . . . . . 6 ((𝑘 ∈ ℕ0𝑃 = ((8 · 𝑘) + 5)) → 𝑁 = ((2 · 𝑘) + 1))
187, 15, 17syl2an2r 672 . . . . 5 (((𝑃 ∈ ℕ ∧ 𝑘 ∈ ℕ0) ∧ 𝑃 = ((𝑘 · 8) + 5)) → 𝑁 = ((2 · 𝑘) + 1))
19 oveq1 6983 . . . . . 6 (𝑁 = ((2 · 𝑘) + 1) → (𝑁 mod 2) = (((2 · 𝑘) + 1) mod 2))
20 nn0z 11818 . . . . . . . 8 (𝑘 ∈ ℕ0𝑘 ∈ ℤ)
21 eqidd 2779 . . . . . . . 8 (𝑘 ∈ ℕ0 → ((2 · 𝑘) + 1) = ((2 · 𝑘) + 1))
22 2tp1odd 15561 . . . . . . . 8 ((𝑘 ∈ ℤ ∧ ((2 · 𝑘) + 1) = ((2 · 𝑘) + 1)) → ¬ 2 ∥ ((2 · 𝑘) + 1))
2320, 21, 22syl2anc 576 . . . . . . 7 (𝑘 ∈ ℕ0 → ¬ 2 ∥ ((2 · 𝑘) + 1))
24 2z 11827 . . . . . . . . . . 11 2 ∈ ℤ
2524a1i 11 . . . . . . . . . 10 (𝑘 ∈ ℕ0 → 2 ∈ ℤ)
2625, 20zmulcld 11906 . . . . . . . . 9 (𝑘 ∈ ℕ0 → (2 · 𝑘) ∈ ℤ)
2726peano2zd 11903 . . . . . . . 8 (𝑘 ∈ ℕ0 → ((2 · 𝑘) + 1) ∈ ℤ)
28 mod2eq1n2dvds 15556 . . . . . . . 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 249 . . . . . 6 (𝑘 ∈ ℕ0 → (((2 · 𝑘) + 1) mod 2) = 1)
3119, 30sylan9eqr 2836 . . . . 5 ((𝑘 ∈ ℕ0𝑁 = ((2 · 𝑘) + 1)) → (𝑁 mod 2) = 1)
327, 18, 31syl2an2r 672 . . . 4 (((𝑃 ∈ ℕ ∧ 𝑘 ∈ ℕ0) ∧ 𝑃 = ((𝑘 · 8) + 5)) → (𝑁 mod 2) = 1)
3332rexlimdva2 3232 . . 3 (𝑃 ∈ ℕ → (∃𝑘 ∈ ℕ0 𝑃 = ((𝑘 · 8) + 5) → (𝑁 mod 2) = 1))
346, 33syld 47 . 2 (𝑃 ∈ ℕ → ((𝑃 mod 8) = 5 → (𝑁 mod 2) = 1))
3534imp 398 1 ((𝑃 ∈ ℕ ∧ (𝑃 mod 8) = 5) → (𝑁 mod 2) = 1)
Colors of variables: wff setvar class
Syntax hints:  ¬ wn 3  wi 4  wb 198  wa 387   = wceq 1507  wcel 2050  wrex 3089   class class class wbr 4929  cfv 6188  (class class class)co 6976  cc 10333  1c1 10336   + caddc 10338   · cmul 10340  cmin 10670   / cdiv 11098  cn 11439  2c2 11495  4c4 11497  5c5 11498  8c8 11501  0cn0 11707  cz 11793  +crp 12204  cfl 12975   mod cmo 13052  cdvds 15467
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1758  ax-4 1772  ax-5 1869  ax-6 1928  ax-7 1965  ax-8 2052  ax-9 2059  ax-10 2079  ax-11 2093  ax-12 2106  ax-13 2301  ax-ext 2750  ax-sep 5060  ax-nul 5067  ax-pow 5119  ax-pr 5186  ax-un 7279  ax-cnex 10391  ax-resscn 10392  ax-1cn 10393  ax-icn 10394  ax-addcl 10395  ax-addrcl 10396  ax-mulcl 10397  ax-mulrcl 10398  ax-mulcom 10399  ax-addass 10400  ax-mulass 10401  ax-distr 10402  ax-i2m1 10403  ax-1ne0 10404  ax-1rid 10405  ax-rnegex 10406  ax-rrecex 10407  ax-cnre 10408  ax-pre-lttri 10409  ax-pre-lttrn 10410  ax-pre-ltadd 10411  ax-pre-mulgt0 10412  ax-pre-sup 10413
This theorem depends on definitions:  df-bi 199  df-an 388  df-or 834  df-3or 1069  df-3an 1070  df-tru 1510  df-ex 1743  df-nf 1747  df-sb 2016  df-mo 2547  df-eu 2584  df-clab 2759  df-cleq 2771  df-clel 2846  df-nfc 2918  df-ne 2968  df-nel 3074  df-ral 3093  df-rex 3094  df-reu 3095  df-rmo 3096  df-rab 3097  df-v 3417  df-sbc 3682  df-csb 3787  df-dif 3832  df-un 3834  df-in 3836  df-ss 3843  df-pss 3845  df-nul 4179  df-if 4351  df-pw 4424  df-sn 4442  df-pr 4444  df-tp 4446  df-op 4448  df-uni 4713  df-iun 4794  df-br 4930  df-opab 4992  df-mpt 5009  df-tr 5031  df-id 5312  df-eprel 5317  df-po 5326  df-so 5327  df-fr 5366  df-we 5368  df-xp 5413  df-rel 5414  df-cnv 5415  df-co 5416  df-dm 5417  df-rn 5418  df-res 5419  df-ima 5420  df-pred 5986  df-ord 6032  df-on 6033  df-lim 6034  df-suc 6035  df-iota 6152  df-fun 6190  df-fn 6191  df-f 6192  df-f1 6193  df-fo 6194  df-f1o 6195  df-fv 6196  df-riota 6937  df-ov 6979  df-oprab 6980  df-mpo 6981  df-om 7397  df-wrecs 7750  df-recs 7812  df-rdg 7850  df-er 8089  df-en 8307  df-dom 8308  df-sdom 8309  df-sup 8701  df-inf 8702  df-pnf 10476  df-mnf 10477  df-xr 10478  df-ltxr 10479  df-le 10480  df-sub 10672  df-neg 10673  df-div 11099  df-nn 11440  df-2 11503  df-3 11504  df-4 11505  df-5 11506  df-6 11507  df-7 11508  df-8 11509  df-n0 11708  df-z 11794  df-uz 12059  df-rp 12205  df-ico 12560  df-fl 12977  df-mod 13053  df-dvds 15468
This theorem is referenced by:  2lgslem3  25682
  Copyright terms: Public domain W3C validator