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 49043
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 12477 . . . . 5 4 ∈ ℕ
21a1i 11 . . . 4 (𝑁 ∈ ℤ → 4 ∈ ℕ)
3 3nn0 12675 . . . . . 6 3 ∈ ℕ0
43a1i 11 . . . . 5 (𝑁 ∈ ℤ → 3 ∈ ℕ0)
5 3lt4 12570 . . . . 5 3 < 4
64, 5jctir 530 . . . 4 (𝑁 ∈ ℤ → (3 ∈ ℕ0 ∧ 3 < 4))
7 modremain 16634 . . . 4 ((𝑁 ∈ ℤ ∧ 4 ∈ ℕ ∧ (3 ∈ ℕ0 ∧ 3 < 4)) → ((𝑁 mod 4) = 3 ↔ ∃𝑧 ∈ ℤ ((𝑧 · 4) + 3) = 𝑁))
82, 6, 7mpd3an23 1495 . . 3 (𝑁 ∈ ℤ → ((𝑁 mod 4) = 3 ↔ ∃𝑧 ∈ ℤ ((𝑧 · 4) + 3) = 𝑁))
9 2cnd 12472 . . . . . . . . . . 11 ((𝑁 ∈ ℤ ∧ 𝑧 ∈ ℤ) → 2 ∈ ℂ)
10 simpr 490 . . . . . . . . . . . . 13 ((𝑁 ∈ ℤ ∧ 𝑧 ∈ ℤ) → 𝑧 ∈ ℤ)
11 4z 12781 . . . . . . . . . . . . . 14 4 ∈ ℤ
1211a1i 11 . . . . . . . . . . . . 13 ((𝑁 ∈ ℤ ∧ 𝑧 ∈ ℤ) → 4 ∈ ℤ)
1310, 12zmulcld 12860 . . . . . . . . . . . 12 ((𝑁 ∈ ℤ ∧ 𝑧 ∈ ℤ) → (𝑧 · 4) ∈ ℤ)
1413zcnd 12855 . . . . . . . . . . 11 ((𝑁 ∈ ℤ ∧ 𝑧 ∈ ℤ) → (𝑧 · 4) ∈ ℂ)
15 3cn 12475 . . . . . . . . . . . 12 3 ∈ ℂ
1615a1i 11 . . . . . . . . . . 11 ((𝑁 ∈ ℤ ∧ 𝑧 ∈ ℤ) → 3 ∈ ℂ)
179, 14, 16adddid 11383 . . . . . . . . . 10 ((𝑁 ∈ ℤ ∧ 𝑧 ∈ ℤ) → (2 · ((𝑧 · 4) + 3)) = ((2 · (𝑧 · 4)) + (2 · 3)))
1810zcnd 12855 . . . . . . . . . . . . 13 ((𝑁 ∈ ℤ ∧ 𝑧 ∈ ℤ) → 𝑧 ∈ ℂ)
19 4cn 12479 . . . . . . . . . . . . . 14 4 ∈ ℂ
2019a1i 11 . . . . . . . . . . . . 13 ((𝑁 ∈ ℤ ∧ 𝑧 ∈ ℤ) → 4 ∈ ℂ)
219, 18, 20mul12d 11569 . . . . . . . . . . . 12 ((𝑁 ∈ ℤ ∧ 𝑧 ∈ ℤ) → (2 · (𝑧 · 4)) = (𝑧 · (2 · 4)))
22 2t4e8 12563 . . . . . . . . . . . . 13 (2 · 4) = 8
2322oveq2i 7473 . . . . . . . . . . . 12 (𝑧 · (2 · 4)) = (𝑧 · 8)
2421, 23eqtrdi 2820 . . . . . . . . . . 11 ((𝑁 ∈ ℤ ∧ 𝑧 ∈ ℤ) → (2 · (𝑧 · 4)) = (𝑧 · 8))
25 2t3e6 12560 . . . . . . . . . . . 12 (2 · 3) = 6
2625a1i 11 . . . . . . . . . . 11 ((𝑁 ∈ ℤ ∧ 𝑧 ∈ ℤ) → (2 · 3) = 6)
2724, 26oveq12d 7480 . . . . . . . . . 10 ((𝑁 ∈ ℤ ∧ 𝑧 ∈ ℤ) → ((2 · (𝑧 · 4)) + (2 · 3)) = ((𝑧 · 8) + 6))
2817, 27eqtrd 2804 . . . . . . . . 9 ((𝑁 ∈ ℤ ∧ 𝑧 ∈ ℤ) → (2 · ((𝑧 · 4) + 3)) = ((𝑧 · 8) + 6))
2928oveq1d 7477 . . . . . . . 8 ((𝑁 ∈ ℤ ∧ 𝑧 ∈ ℤ) → ((2 · ((𝑧 · 4) + 3)) + 1) = (((𝑧 · 8) + 6) + 1))
30 id 23 . . . . . . . . . . . . 13 (𝑧 ∈ ℤ → 𝑧 ∈ ℤ)
31 8nn 12489 . . . . . . . . . . . . . . 15 8 ∈ ℕ
3231nnzi 12771 . . . . . . . . . . . . . 14 8 ∈ ℤ
3332a1i 11 . . . . . . . . . . . . 13 (𝑧 ∈ ℤ → 8 ∈ ℤ)
3430, 33zmulcld 12860 . . . . . . . . . . . 12 (𝑧 ∈ ℤ → (𝑧 · 8) ∈ ℤ)
3534zcnd 12855 . . . . . . . . . . 11 (𝑧 ∈ ℤ → (𝑧 · 8) ∈ ℂ)
36 6cn 12485 . . . . . . . . . . . 12 6 ∈ ℂ
3736a1i 11 . . . . . . . . . . 11 (𝑧 ∈ ℤ → 6 ∈ ℂ)
38 1cnd 11352 . . . . . . . . . . 11 (𝑧 ∈ ℤ → 1 ∈ ℂ)
3935, 37, 38addassd 11381 . . . . . . . . . 10 (𝑧 ∈ ℤ → (((𝑧 · 8) + 6) + 1) = ((𝑧 · 8) + (6 + 1)))
40 6p1e7 12541 . . . . . . . . . . . 12 (6 + 1) = 7
4140a1i 11 . . . . . . . . . . 11 (𝑧 ∈ ℤ → (6 + 1) = 7)
4241oveq2d 7478 . . . . . . . . . 10 (𝑧 ∈ ℤ → ((𝑧 · 8) + (6 + 1)) = ((𝑧 · 8) + 7))
4339, 42eqtrd 2804 . . . . . . . . 9 (𝑧 ∈ ℤ → (((𝑧 · 8) + 6) + 1) = ((𝑧 · 8) + 7))
4443adantl 487 . . . . . . . 8 ((𝑁 ∈ ℤ ∧ 𝑧 ∈ ℤ) → (((𝑧 · 8) + 6) + 1) = ((𝑧 · 8) + 7))
4529, 44eqtrd 2804 . . . . . . 7 ((𝑁 ∈ ℤ ∧ 𝑧 ∈ ℤ) → ((2 · ((𝑧 · 4) + 3)) + 1) = ((𝑧 · 8) + 7))
4645oveq1d 7477 . . . . . 6 ((𝑁 ∈ ℤ ∧ 𝑧 ∈ ℤ) → (((2 · ((𝑧 · 4) + 3)) + 1) mod 8) = (((𝑧 · 8) + 7) mod 8))
47 nnrp 13183 . . . . . . . . 9 (8 ∈ ℕ → 8 ∈ ℝ+)
4831, 47mp1i 14 . . . . . . . 8 (𝑧 ∈ ℤ → 8 ∈ ℝ+)
49 0xr 11406 . . . . . . . . . 10 0 ∈ ℝ*
5049a1i 11 . . . . . . . . 9 (𝑧 ∈ ℤ → 0 ∈ ℝ*)
51 8re 12490 . . . . . . . . . . 11 8 ∈ ℝ
5251rexri 11417 . . . . . . . . . 10 8 ∈ ℝ*
5352a1i 11 . . . . . . . . 9 (𝑧 ∈ ℤ → 8 ∈ ℝ*)
54 7re 12487 . . . . . . . . . . 11 7 ∈ ℝ
5554rexri 11417 . . . . . . . . . 10 7 ∈ ℝ*
5655a1i 11 . . . . . . . . 9 (𝑧 ∈ ℤ → 7 ∈ ℝ*)
57 0re 11360 . . . . . . . . . . 11 0 ∈ ℝ
58 7pos 12508 . . . . . . . . . . 11 0 < 7
5957, 54, 58ltleii 11483 . . . . . . . . . 10 0 ≤ 7
6059a1i 11 . . . . . . . . 9 (𝑧 ∈ ℤ → 0 ≤ 7)
61 7lt8 12588 . . . . . . . . . 10 7 < 8
6261a1i 11 . . . . . . . . 9 (𝑧 ∈ ℤ → 7 < 8)
6350, 53, 56, 60, 62elicod 13577 . . . . . . . 8 (𝑧 ∈ ℤ → 7 ∈ (0[,)8))
64 muladdmodid 14106 . . . . . . . 8 ((𝑧 ∈ ℤ ∧ 8 ∈ ℝ+ ∧ 7 ∈ (0[,)8)) → (((𝑧 · 8) + 7) mod 8) = 7)
6548, 63, 64mpd3an23 1495 . . . . . . 7 (𝑧 ∈ ℤ → (((𝑧 · 8) + 7) mod 8) = 7)
6665adantl 487 . . . . . 6 ((𝑁 ∈ ℤ ∧ 𝑧 ∈ ℤ) → (((𝑧 · 8) + 7) mod 8) = 7)
6746, 66eqtrd 2804 . . . . 5 ((𝑁 ∈ ℤ ∧ 𝑧 ∈ ℤ) → (((2 · ((𝑧 · 4) + 3)) + 1) mod 8) = 7)
68 oveq2 7470 . . . . . . . 8 (((𝑧 · 4) + 3) = 𝑁 → (2 · ((𝑧 · 4) + 3)) = (2 · 𝑁))
6968oveq1d 7477 . . . . . . 7 (((𝑧 · 4) + 3) = 𝑁 → ((2 · ((𝑧 · 4) + 3)) + 1) = ((2 · 𝑁) + 1))
7069oveq1d 7477 . . . . . 6 (((𝑧 · 4) + 3) = 𝑁 → (((2 · ((𝑧 · 4) + 3)) + 1) mod 8) = (((2 · 𝑁) + 1) mod 8))
7170eqeq1d 2771 . . . . 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 3173 . . 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 1572   ∈ wcel 2151  ∃wrex 3096   class class class wbr 5111  (class class class)co 7462  ℂcc 11248  0cc0 11250  1c1 11251   + caddc 11253   · cmul 11255  ℝ*cxr 11392   < clt 11393   ≤ cle 11394  ℕcn 12386  2c2 12448  3c3 12449  4c4 12450  6c6 12452  7c7 12453  8c8 12454  ℕ0cn0 12657  ℤcz 12744  ℝ+crp 13171  [,)cico 13529   mod cmo 14062
This proof depends on axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1830  ax-4 1844  ax-5 1947  ax-6 2004  ax-7 2045  ax-8 2153  ax-9 2161  ax-10 2184  ax-11 2201  ax-12 2220  ax-ext 2741  ax-sep 5258  ax-nul 5269  ax-pow 5337  ax-pr 5401  ax-un 7794  ax-cnex 11306  ax-resscn 11307  ax-1cn 11308  ax-icn 11309  ax-addcl 11310  ax-addrcl 11311  ax-mulcl 11312  ax-mulrcl 11313  ax-mulcom 11314  ax-addass 11315  ax-mulass 11316  ax-distr 11317  ax-i2m1 11318  ax-1ne0 11319  ax-1rid 11320  ax-rnegex 11321  ax-rrecex 11322  ax-cnre 11323  ax-pre-lttri 11324  ax-pre-lttrn 11325  ax-pre-ltadd 11326  ax-pre-mulgt0 11327  ax-pre-sup 11328
This proof depends on definitions:  df-bi 210  df-an 402  df-or 862  df-3or 1105  df-3an 1106  df-tru 1575  df-fal 1585  df-ex 1815  df-nf 1819  df-sb 2105  df-mo 2571  df-eu 2601  df-clab 2748  df-cleq 2761  df-clel 2845  df-nfc 2919  df-ne 2966  df-nel 3072  df-ral 3087  df-rex 3097  df-rmo 3371  df-reu 3372  df-rab 3419  df-v 3458  df-sbc 3745  df-csb 3854  df-ss 3903  df-pss 4019  df-dif 4052  df-in 4096  df-un 4156  df-nul 4284  df-if 4488  df-pw 4564  df-sn 4591  df-pr 4593  df-op 4844  df-uni 4876  df-iun 4961  df-br 5112  df-opab 5177  df-mpt 5196  df-tr 5222  df-id 5556  df-eprel 5561  df-po 5569  df-so 5570  df-fr 5614  df-we 5616  df-xp 5667  df-rel 5668  df-cnv 5669  df-co 5670  df-dm 5671  df-rn 5672  df-res 5673  df-ima 5674  df-pred 6337  df-ord 6398  df-on 6399  df-lim 6400  df-suc 6401  df-iota 6527  df-fun 6575  df-fn 6576  df-f 6577  df-f1 6578  df-fo 6579  df-f1o 6580  df-fv 6581  df-riota 7418  df-ov 7465  df-oprab 7466  df-mpo 7467  df-om 7923  df-1st 8046  df-2nd 8047  df-frecs 8348  df-wrecs 8379  df-recs 8428  df-rdg 8467  df-er 8766  df-en 9023  df-dom 9024  df-sdom 9025  df-sup 9482  df-inf 9483  df-pnf 11395  df-mnf 11396  df-xr 11397  df-ltxr 11398  df-le 11399  df-sub 11593  df-neg 11594  df-div 12025  df-nn 12387  df-2 12456  df-3 12457  df-4 12458  df-5 12459  df-6 12460  df-7 12461  df-8 12462  df-n0 12658  df-z 12745  df-uz 13017  df-rp 13172  df-ico 13533  df-fz 13691  df-fl 13985  df-mod 14063  df-seq 14198  df-exp 14258  df-cj 15322  df-re 15323  df-im 15324  df-sqrt 15458  df-abs 15459  df-dvds 16479
This theorem is used by:  sgprmdvdsmersenne  49045
  Copyright terms: Public domain W3C validator