Users' Mathboxes Mathbox for Alexander van der Vekens < Previous   Next >
Nearby theorems
Mirrors  >  Home  >  MPE Home  >  Th. List  >   Mathboxes  >  mod42tp1mod8 Structured version   Visualization version   GIF version

Theorem mod42tp1mod8 48902
Description: If a number is 3 modulo 4, twice the number plus 1 is 7 modulo 8. (Contributed by AV, 19-Aug-2021.)
Assertion
Ref Expression
mod42tp1mod8 ((𝑁 ∈ ℤ ∧ (𝑁 mod 4) = 3) → (((2 · 𝑁) + 1) mod 8) = 7)

Proof of Theorem mod42tp1mod8
Dummy variable 𝑧 is distinct from all other variables.
StepHypRef Expression
1 4nn 12456 . . . . 5 4 ∈ ℕ
21a1i 11 . . . 4 (𝑁 ∈ ℤ → 4 ∈ ℕ)
3 3nn0 12654 . . . . . 6 3 ∈ ℕ0
43a1i 11 . . . . 5 (𝑁 ∈ ℤ → 3 ∈ ℕ0)
5 3lt4 12549 . . . . 5 3 < 4
64, 5jctir 530 . . . 4 (𝑁 ∈ ℤ → (3 ∈ ℕ0 ∧ 3 < 4))
7 modremain 16610 . . . 4 ((𝑁 ∈ ℤ ∧ 4 ∈ ℕ ∧ (3 ∈ ℕ0 ∧ 3 < 4)) → ((𝑁 mod 4) = 3 ↔ ∃𝑧 ∈ ℤ ((𝑧 · 4) + 3) = 𝑁))
82, 6, 7mpd3an23 1493 . . 3 (𝑁 ∈ ℤ → ((𝑁 mod 4) = 3 ↔ ∃𝑧 ∈ ℤ ((𝑧 · 4) + 3) = 𝑁))
9 2cnd 12451 . . . . . . . . . . 11 ((𝑁 ∈ ℤ ∧ 𝑧 ∈ ℤ) → 2 ∈ ℂ)
10 simpr 490 . . . . . . . . . . . . 13 ((𝑁 ∈ ℤ ∧ 𝑧 ∈ ℤ) → 𝑧 ∈ ℤ)
11 4z 12760 . . . . . . . . . . . . . 14 4 ∈ ℤ
1211a1i 11 . . . . . . . . . . . . 13 ((𝑁 ∈ ℤ ∧ 𝑧 ∈ ℤ) → 4 ∈ ℤ)
1310, 12zmulcld 12839 . . . . . . . . . . . 12 ((𝑁 ∈ ℤ ∧ 𝑧 ∈ ℤ) → (𝑧 · 4) ∈ ℤ)
1413zcnd 12834 . . . . . . . . . . 11 ((𝑁 ∈ ℤ ∧ 𝑧 ∈ ℤ) → (𝑧 · 4) ∈ ℂ)
15 3cn 12454 . . . . . . . . . . . 12 3 ∈ ℂ
1615a1i 11 . . . . . . . . . . 11 ((𝑁 ∈ ℤ ∧ 𝑧 ∈ ℤ) → 3 ∈ ℂ)
179, 14, 16adddid 11363 . . . . . . . . . 10 ((𝑁 ∈ ℤ ∧ 𝑧 ∈ ℤ) → (2 · ((𝑧 · 4) + 3)) = ((2 · (𝑧 · 4)) + (2 · 3)))
1810zcnd 12834 . . . . . . . . . . . . 13 ((𝑁 ∈ ℤ ∧ 𝑧 ∈ ℤ) → 𝑧 ∈ ℂ)
19 4cn 12458 . . . . . . . . . . . . . 14 4 ∈ ℂ
2019a1i 11 . . . . . . . . . . . . 13 ((𝑁 ∈ ℤ ∧ 𝑧 ∈ ℤ) → 4 ∈ ℂ)
219, 18, 20mul12d 11549 . . . . . . . . . . . 12 ((𝑁 ∈ ℤ ∧ 𝑧 ∈ ℤ) → (2 · (𝑧 · 4)) = (𝑧 · (2 · 4)))
22 2t4e8 12542 . . . . . . . . . . . . 13 (2 · 4) = 8
2322oveq2i 7457 . . . . . . . . . . . 12 (𝑧 · (2 · 4)) = (𝑧 · 8)
2421, 23eqtrdi 2814 . . . . . . . . . . 11 ((𝑁 ∈ ℤ ∧ 𝑧 ∈ ℤ) → (2 · (𝑧 · 4)) = (𝑧 · 8))
25 2t3e6 12539 . . . . . . . . . . . 12 (2 · 3) = 6
2625a1i 11 . . . . . . . . . . 11 ((𝑁 ∈ ℤ ∧ 𝑧 ∈ ℤ) → (2 · 3) = 6)
2724, 26oveq12d 7464 . . . . . . . . . 10 ((𝑁 ∈ ℤ ∧ 𝑧 ∈ ℤ) → ((2 · (𝑧 · 4)) + (2 · 3)) = ((𝑧 · 8) + 6))
2817, 27eqtrd 2798 . . . . . . . . 9 ((𝑁 ∈ ℤ ∧ 𝑧 ∈ ℤ) → (2 · ((𝑧 · 4) + 3)) = ((𝑧 · 8) + 6))
2928oveq1d 7461 . . . . . . . 8 ((𝑁 ∈ ℤ ∧ 𝑧 ∈ ℤ) → ((2 · ((𝑧 · 4) + 3)) + 1) = (((𝑧 · 8) + 6) + 1))
30 id 23 . . . . . . . . . . . . 13 (𝑧 ∈ ℤ → 𝑧 ∈ ℤ)
31 8nn 12468 . . . . . . . . . . . . . . 15 8 ∈ ℕ
3231nnzi 12750 . . . . . . . . . . . . . 14 8 ∈ ℤ
3332a1i 11 . . . . . . . . . . . . 13 (𝑧 ∈ ℤ → 8 ∈ ℤ)
3430, 33zmulcld 12839 . . . . . . . . . . . 12 (𝑧 ∈ ℤ → (𝑧 · 8) ∈ ℤ)
3534zcnd 12834 . . . . . . . . . . 11 (𝑧 ∈ ℤ → (𝑧 · 8) ∈ ℂ)
36 6cn 12464 . . . . . . . . . . . 12 6 ∈ ℂ
3736a1i 11 . . . . . . . . . . 11 (𝑧 ∈ ℤ → 6 ∈ ℂ)
38 1cnd 11332 . . . . . . . . . . 11 (𝑧 ∈ ℤ → 1 ∈ ℂ)
3935, 37, 38addassd 11361 . . . . . . . . . 10 (𝑧 ∈ ℤ → (((𝑧 · 8) + 6) + 1) = ((𝑧 · 8) + (6 + 1)))
40 6p1e7 12520 . . . . . . . . . . . 12 (6 + 1) = 7
4140a1i 11 . . . . . . . . . . 11 (𝑧 ∈ ℤ → (6 + 1) = 7)
4241oveq2d 7462 . . . . . . . . . 10 (𝑧 ∈ ℤ → ((𝑧 · 8) + (6 + 1)) = ((𝑧 · 8) + 7))
4339, 42eqtrd 2798 . . . . . . . . 9 (𝑧 ∈ ℤ → (((𝑧 · 8) + 6) + 1) = ((𝑧 · 8) + 7))
4443adantl 487 . . . . . . . 8 ((𝑁 ∈ ℤ ∧ 𝑧 ∈ ℤ) → (((𝑧 · 8) + 6) + 1) = ((𝑧 · 8) + 7))
4529, 44eqtrd 2798 . . . . . . 7 ((𝑁 ∈ ℤ ∧ 𝑧 ∈ ℤ) → ((2 · ((𝑧 · 4) + 3)) + 1) = ((𝑧 · 8) + 7))
4645oveq1d 7461 . . . . . 6 ((𝑁 ∈ ℤ ∧ 𝑧 ∈ ℤ) → (((2 · ((𝑧 · 4) + 3)) + 1) mod 8) = (((𝑧 · 8) + 7) mod 8))
47 nnrp 13162 . . . . . . . . 9 (8 ∈ ℕ → 8 ∈ ℝ+)
4831, 47mp1i 14 . . . . . . . 8 (𝑧 ∈ ℤ → 8 ∈ ℝ+)
49 0xr 11386 . . . . . . . . . 10 0 ∈ ℝ*
5049a1i 11 . . . . . . . . 9 (𝑧 ∈ ℤ → 0 ∈ ℝ*)
51 8re 12469 . . . . . . . . . . 11 8 ∈ ℝ
5251rexri 11397 . . . . . . . . . 10 8 ∈ ℝ*
5352a1i 11 . . . . . . . . 9 (𝑧 ∈ ℤ → 8 ∈ ℝ*)
54 7re 12466 . . . . . . . . . . 11 7 ∈ ℝ
5554rexri 11397 . . . . . . . . . 10 7 ∈ ℝ*
5655a1i 11 . . . . . . . . 9 (𝑧 ∈ ℤ → 7 ∈ ℝ*)
57 0re 11340 . . . . . . . . . . 11 0 ∈ ℝ
58 7pos 12487 . . . . . . . . . . 11 0 < 7
5957, 54, 58ltleii 11463 . . . . . . . . . 10 0 ≤ 7
6059a1i 11 . . . . . . . . 9 (𝑧 ∈ ℤ → 0 ≤ 7)
61 7lt8 12567 . . . . . . . . . 10 7 < 8
6261a1i 11 . . . . . . . . 9 (𝑧 ∈ ℤ → 7 < 8)
6350, 53, 56, 60, 62elicod 13556 . . . . . . . 8 (𝑧 ∈ ℤ → 7 ∈ (0[,)8))
64 muladdmodid 14083 . . . . . . . 8 ((𝑧 ∈ ℤ ∧ 8 ∈ ℝ+ ∧ 7 ∈ (0[,)8)) → (((𝑧 · 8) + 7) mod 8) = 7)
6548, 63, 64mpd3an23 1493 . . . . . . 7 (𝑧 ∈ ℤ → (((𝑧 · 8) + 7) mod 8) = 7)
6665adantl 487 . . . . . 6 ((𝑁 ∈ ℤ ∧ 𝑧 ∈ ℤ) → (((𝑧 · 8) + 7) mod 8) = 7)
6746, 66eqtrd 2798 . . . . 5 ((𝑁 ∈ ℤ ∧ 𝑧 ∈ ℤ) → (((2 · ((𝑧 · 4) + 3)) + 1) mod 8) = 7)
68 oveq2 7454 . . . . . . . 8 (((𝑧 · 4) + 3) = 𝑁 → (2 · ((𝑧 · 4) + 3)) = (2 · 𝑁))
6968oveq1d 7461 . . . . . . 7 (((𝑧 · 4) + 3) = 𝑁 → ((2 · ((𝑧 · 4) + 3)) + 1) = ((2 · 𝑁) + 1))
7069oveq1d 7461 . . . . . 6 (((𝑧 · 4) + 3) = 𝑁 → (((2 · ((𝑧 · 4) + 3)) + 1) mod 8) = (((2 · 𝑁) + 1) mod 8))
7170eqeq1d 2765 . . . . 5 (((𝑧 · 4) + 3) = 𝑁 → ((((2 · ((𝑧 · 4) + 3)) + 1) mod 8) = 7 ↔ (((2 · 𝑁) + 1) mod 8) = 7))
7267, 71syl5ibcom 248 . . . 4 ((𝑁 ∈ ℤ ∧ 𝑧 ∈ ℤ) → (((𝑧 · 4) + 3) = 𝑁 → (((2 · 𝑁) + 1) mod 8) = 7))
7372rexlimdva 3167 . . 3 (𝑁 ∈ ℤ → (∃𝑧 ∈ ℤ ((𝑧 · 4) + 3) = 𝑁 → (((2 · 𝑁) + 1) mod 8) = 7))
748, 73sylbid 243 . 2 (𝑁 ∈ ℤ → ((𝑁 mod 4) = 3 → (((2 · 𝑁) + 1) mod 8) = 7))
7574imp 412 1 ((𝑁 ∈ ℤ ∧ (𝑁 mod 4) = 3) → (((2 · 𝑁) + 1) mod 8) = 7)
Colors of variables:    wff setvar class
This proof depends on syntax axioms:   → wi 4   ↔ wb 209   ∧ wa 401   = wceq 1570   ∈ wcel 2147  ∃wrex 3090   class class class wbr 5106  (class class class)co 7446  ℂcc 11228  0cc0 11230  1c1 11231   + caddc 11233   · cmul 11235  ℝ*cxr 11372   < clt 11373   ≤ cle 11374  ℕcn 12365  2c2 12427  3c3 12428  4c4 12429  6c6 12431  7c7 12432  8c8 12433  ℕ0cn0 12636  ℤcz 12723  ℝ+crp 13150  [,)cico 13508   mod cmo 14039
This proof depends on axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1828  ax-4 1842  ax-5 1945  ax-6 2002  ax-7 2043  ax-8 2149  ax-9 2157  ax-10 2180  ax-11 2197  ax-12 2216  ax-ext 2735  ax-sep 5253  ax-nul 5264  ax-pow 5332  ax-pr 5396  ax-un 7778  ax-cnex 11286  ax-resscn 11287  ax-1cn 11288  ax-icn 11289  ax-addcl 11290  ax-addrcl 11291  ax-mulcl 11292  ax-mulrcl 11293  ax-mulcom 11294  ax-addass 11295  ax-mulass 11296  ax-distr 11297  ax-i2m1 11298  ax-1ne0 11299  ax-1rid 11300  ax-rnegex 11301  ax-rrecex 11302  ax-cnre 11303  ax-pre-lttri 11304  ax-pre-lttrn 11305  ax-pre-ltadd 11306  ax-pre-mulgt0 11307  ax-pre-sup 11308
This proof depends on definitions:  df-bi 210  df-an 402  df-or 862  df-3or 1104  df-3an 1105  df-tru 1573  df-fal 1583  df-ex 1813  df-nf 1817  df-sb 2102  df-mo 2567  df-eu 2597  df-clab 2742  df-cleq 2755  df-clel 2839  df-nfc 2913  df-ne 2960  df-nel 3066  df-ral 3081  df-rex 3091  df-rmo 3369  df-reu 3370  df-rab 3417  df-v 3456  df-sbc 3743  df-csb 3852  df-ss 3901  df-pss 4017  df-dif 4050  df-in 4094  df-un 4154  df-nul 4282  df-if 4486  df-pw 4562  df-sn 4589  df-pr 4591  df-op 4839  df-uni 4871  df-iun 4956  df-br 5107  df-opab 5172  df-mpt 5191  df-tr 5217  df-id 5551  df-eprel 5556  df-po 5564  df-so 5565  df-fr 5609  df-we 5611  df-xp 5662  df-rel 5663  df-cnv 5664  df-co 5665  df-dm 5666  df-rn 5667  df-res 5668  df-ima 5669  df-pred 6325  df-ord 6386  df-on 6387  df-lim 6388  df-suc 6389  df-iota 6515  df-fun 6563  df-fn 6564  df-f 6565  df-f1 6566  df-fo 6567  df-f1o 6568  df-fv 6569  df-riota 7403  df-ov 7449  df-oprab 7450  df-mpo 7451  df-om 7905  df-1st 8028  df-2nd 8029  df-frecs 8330  df-wrecs 8361  df-recs 8410  df-rdg 8449  df-er 8748  df-en 9005  df-dom 9006  df-sdom 9007  df-sup 9464  df-inf 9465  df-pnf 11375  df-mnf 11376  df-xr 11377  df-ltxr 11378  df-le 11379  df-sub 11573  df-neg 11574  df-div 12004  df-nn 12366  df-2 12435  df-3 12436  df-4 12437  df-5 12438  df-6 12439  df-7 12440  df-8 12441  df-n0 12637  df-z 12724  df-uz 12996  df-rp 13151  df-ico 13512  df-fz 13670  df-fl 13962  df-mod 14040  df-seq 14175  df-exp 14235  df-cj 15298  df-re 15299  df-im 15300  df-sqrt 15434  df-abs 15435  df-dvds 16455
This theorem is used by:  sgprmdvdsmersenne  48904
  Copyright terms: Public domain W3C validator