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 48631
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 12407 . . . . 5 4 ∈ ℕ
21a1i 11 . . . 4 (𝑁 ∈ ℤ → 4 ∈ ℕ)
3 3nn0 12605 . . . . . 6 3 ∈ ℕ0
43a1i 11 . . . . 5 (𝑁 ∈ ℤ → 3 ∈ ℕ0)
5 3lt4 12500 . . . . 5 3 < 4
64, 5jctir 530 . . . 4 (𝑁 ∈ ℤ → (3 ∈ ℕ0 ∧ 3 < 4))
7 modremain 16558 . . . 4 ((𝑁 ∈ ℤ ∧ 4 ∈ ℕ ∧ (3 ∈ ℕ0 ∧ 3 < 4)) → ((𝑁 mod 4) = 3 ↔ ∃𝑧 ∈ ℤ ((𝑧 · 4) + 3) = 𝑁))
82, 6, 7mpd3an23 1492 . . 3 (𝑁 ∈ ℤ → ((𝑁 mod 4) = 3 ↔ ∃𝑧 ∈ ℤ ((𝑧 · 4) + 3) = 𝑁))
9 2cnd 12402 . . . . . . . . . . 11 ((𝑁 ∈ ℤ ∧ 𝑧 ∈ ℤ) → 2 ∈ ℂ)
10 simpr 490 . . . . . . . . . . . . 13 ((𝑁 ∈ ℤ ∧ 𝑧 ∈ ℤ) → 𝑧 ∈ ℤ)
11 4z 12711 . . . . . . . . . . . . . 14 4 ∈ ℤ
1211a1i 11 . . . . . . . . . . . . 13 ((𝑁 ∈ ℤ ∧ 𝑧 ∈ ℤ) → 4 ∈ ℤ)
1310, 12zmulcld 12790 . . . . . . . . . . . 12 ((𝑁 ∈ ℤ ∧ 𝑧 ∈ ℤ) → (𝑧 · 4) ∈ ℤ)
1413zcnd 12785 . . . . . . . . . . 11 ((𝑁 ∈ ℤ ∧ 𝑧 ∈ ℤ) → (𝑧 · 4) ∈ ℂ)
15 3cn 12405 . . . . . . . . . . . 12 3 ∈ ℂ
1615a1i 11 . . . . . . . . . . 11 ((𝑁 ∈ ℤ ∧ 𝑧 ∈ ℤ) → 3 ∈ ℂ)
179, 14, 16adddid 11314 . . . . . . . . . 10 ((𝑁 ∈ ℤ ∧ 𝑧 ∈ ℤ) → (2 · ((𝑧 · 4) + 3)) = ((2 · (𝑧 · 4)) + (2 · 3)))
1810zcnd 12785 . . . . . . . . . . . . 13 ((𝑁 ∈ ℤ ∧ 𝑧 ∈ ℤ) → 𝑧 ∈ ℂ)
19 4cn 12409 . . . . . . . . . . . . . 14 4 ∈ ℂ
2019a1i 11 . . . . . . . . . . . . 13 ((𝑁 ∈ ℤ ∧ 𝑧 ∈ ℤ) → 4 ∈ ℂ)
219, 18, 20mul12d 11500 . . . . . . . . . . . 12 ((𝑁 ∈ ℤ ∧ 𝑧 ∈ ℤ) → (2 · (𝑧 · 4)) = (𝑧 · (2 · 4)))
22 2t4e8 12493 . . . . . . . . . . . . 13 (2 · 4) = 8
2322oveq2i 7423 . . . . . . . . . . . 12 (𝑧 · (2 · 4)) = (𝑧 · 8)
2421, 23eqtrdi 2812 . . . . . . . . . . 11 ((𝑁 ∈ ℤ ∧ 𝑧 ∈ ℤ) → (2 · (𝑧 · 4)) = (𝑧 · 8))
25 2t3e6 12490 . . . . . . . . . . . 12 (2 · 3) = 6
2625a1i 11 . . . . . . . . . . 11 ((𝑁 ∈ ℤ ∧ 𝑧 ∈ ℤ) → (2 · 3) = 6)
2724, 26oveq12d 7430 . . . . . . . . . 10 ((𝑁 ∈ ℤ ∧ 𝑧 ∈ ℤ) → ((2 · (𝑧 · 4)) + (2 · 3)) = ((𝑧 · 8) + 6))
2817, 27eqtrd 2796 . . . . . . . . 9 ((𝑁 ∈ ℤ ∧ 𝑧 ∈ ℤ) → (2 · ((𝑧 · 4) + 3)) = ((𝑧 · 8) + 6))
2928oveq1d 7427 . . . . . . . 8 ((𝑁 ∈ ℤ ∧ 𝑧 ∈ ℤ) → ((2 · ((𝑧 · 4) + 3)) + 1) = (((𝑧 · 8) + 6) + 1))
30 id 23 . . . . . . . . . . . . 13 (𝑧 ∈ ℤ → 𝑧 ∈ ℤ)
31 8nn 12419 . . . . . . . . . . . . . . 15 8 ∈ ℕ
3231nnzi 12701 . . . . . . . . . . . . . 14 8 ∈ ℤ
3332a1i 11 . . . . . . . . . . . . 13 (𝑧 ∈ ℤ → 8 ∈ ℤ)
3430, 33zmulcld 12790 . . . . . . . . . . . 12 (𝑧 ∈ ℤ → (𝑧 · 8) ∈ ℤ)
3534zcnd 12785 . . . . . . . . . . 11 (𝑧 ∈ ℤ → (𝑧 · 8) ∈ ℂ)
36 6cn 12415 . . . . . . . . . . . 12 6 ∈ ℂ
3736a1i 11 . . . . . . . . . . 11 (𝑧 ∈ ℤ → 6 ∈ ℂ)
38 1cnd 11283 . . . . . . . . . . 11 (𝑧 ∈ ℤ → 1 ∈ ℂ)
3935, 37, 38addassd 11312 . . . . . . . . . 10 (𝑧 ∈ ℤ → (((𝑧 · 8) + 6) + 1) = ((𝑧 · 8) + (6 + 1)))
40 6p1e7 12471 . . . . . . . . . . . 12 (6 + 1) = 7
4140a1i 11 . . . . . . . . . . 11 (𝑧 ∈ ℤ → (6 + 1) = 7)
4241oveq2d 7428 . . . . . . . . . 10 (𝑧 ∈ ℤ → ((𝑧 · 8) + (6 + 1)) = ((𝑧 · 8) + 7))
4339, 42eqtrd 2796 . . . . . . . . 9 (𝑧 ∈ ℤ → (((𝑧 · 8) + 6) + 1) = ((𝑧 · 8) + 7))
4443adantl 487 . . . . . . . 8 ((𝑁 ∈ ℤ ∧ 𝑧 ∈ ℤ) → (((𝑧 · 8) + 6) + 1) = ((𝑧 · 8) + 7))
4529, 44eqtrd 2796 . . . . . . 7 ((𝑁 ∈ ℤ ∧ 𝑧 ∈ ℤ) → ((2 · ((𝑧 · 4) + 3)) + 1) = ((𝑧 · 8) + 7))
4645oveq1d 7427 . . . . . 6 ((𝑁 ∈ ℤ ∧ 𝑧 ∈ ℤ) → (((2 · ((𝑧 · 4) + 3)) + 1) mod 8) = (((𝑧 · 8) + 7) mod 8))
47 nnrp 13113 . . . . . . . . 9 (8 ∈ ℕ → 8 ∈ ℝ+)
4831, 47mp1i 14 . . . . . . . 8 (𝑧 ∈ ℤ → 8 ∈ ℝ+)
49 0xr 11337 . . . . . . . . . 10 0 ∈ ℝ*
5049a1i 11 . . . . . . . . 9 (𝑧 ∈ ℤ → 0 ∈ ℝ*)
51 8re 12420 . . . . . . . . . . 11 8 ∈ ℝ
5251rexri 11348 . . . . . . . . . 10 8 ∈ ℝ*
5352a1i 11 . . . . . . . . 9 (𝑧 ∈ ℤ → 8 ∈ ℝ*)
54 7re 12417 . . . . . . . . . . 11 7 ∈ ℝ
5554rexri 11348 . . . . . . . . . 10 7 ∈ ℝ*
5655a1i 11 . . . . . . . . 9 (𝑧 ∈ ℤ → 7 ∈ ℝ*)
57 0re 11291 . . . . . . . . . . 11 0 ∈ ℝ
58 7pos 12438 . . . . . . . . . . 11 0 < 7
5957, 54, 58ltleii 11414 . . . . . . . . . 10 0 ≤ 7
6059a1i 11 . . . . . . . . 9 (𝑧 ∈ ℤ → 0 ≤ 7)
61 7lt8 12518 . . . . . . . . . 10 7 < 8
6261a1i 11 . . . . . . . . 9 (𝑧 ∈ ℤ → 7 < 8)
6350, 53, 56, 60, 62elicod 13507 . . . . . . . 8 (𝑧 ∈ ℤ → 7 ∈ (0[,)8))
64 muladdmodid 14033 . . . . . . . 8 ((𝑧 ∈ ℤ ∧ 8 ∈ ℝ+ ∧ 7 ∈ (0[,)8)) → (((𝑧 · 8) + 7) mod 8) = 7)
6548, 63, 64mpd3an23 1492 . . . . . . 7 (𝑧 ∈ ℤ → (((𝑧 · 8) + 7) mod 8) = 7)
6665adantl 487 . . . . . 6 ((𝑁 ∈ ℤ ∧ 𝑧 ∈ ℤ) → (((𝑧 · 8) + 7) mod 8) = 7)
6746, 66eqtrd 2796 . . . . 5 ((𝑁 ∈ ℤ ∧ 𝑧 ∈ ℤ) → (((2 · ((𝑧 · 4) + 3)) + 1) mod 8) = 7)
68 oveq2 7420 . . . . . . . 8 (((𝑧 · 4) + 3) = 𝑁 → (2 · ((𝑧 · 4) + 3)) = (2 · 𝑁))
6968oveq1d 7427 . . . . . . 7 (((𝑧 · 4) + 3) = 𝑁 → ((2 · ((𝑧 · 4) + 3)) + 1) = ((2 · 𝑁) + 1))
7069oveq1d 7427 . . . . . 6 (((𝑧 · 4) + 3) = 𝑁 → (((2 · ((𝑧 · 4) + 3)) + 1) mod 8) = (((2 · 𝑁) + 1) mod 8))
7170eqeq1d 2763 . . . . 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 3164 . . 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 2145  ∃wrex 3087   class class class wbr 5103  (class class class)co 7412  ℂcc 11179  0cc0 11181  1c1 11182   + caddc 11184   · cmul 11186  ℝ*cxr 11323   < clt 11324   ≤ cle 11325  ℕcn 12316  2c2 12378  3c3 12379  4c4 12380  6c6 12382  7c7 12383  8c8 12384  ℕ0cn0 12587  ℤcz 12674  ℝ+crp 13101  [,)cico 13459   mod cmo 13989
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 1943  ax-6 2000  ax-7 2041  ax-8 2147  ax-9 2155  ax-10 2178  ax-11 2194  ax-12 2213  ax-ext 2733  ax-sep 5249  ax-nul 5260  ax-pow 5327  ax-pr 5391  ax-un 7740  ax-cnex 11237  ax-resscn 11238  ax-1cn 11239  ax-icn 11240  ax-addcl 11241  ax-addrcl 11242  ax-mulcl 11243  ax-mulrcl 11244  ax-mulcom 11245  ax-addass 11246  ax-mulass 11247  ax-distr 11248  ax-i2m1 11249  ax-1ne0 11250  ax-1rid 11251  ax-rnegex 11252  ax-rrecex 11253  ax-cnre 11254  ax-pre-lttri 11255  ax-pre-lttrn 11256  ax-pre-ltadd 11257  ax-pre-mulgt0 11258  ax-pre-sup 11259
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 2100  df-mo 2565  df-eu 2595  df-clab 2740  df-cleq 2753  df-clel 2836  df-nfc 2910  df-ne 2957  df-nel 3063  df-ral 3078  df-rex 3088  df-rmo 3366  df-reu 3367  df-rab 3414  df-v 3453  df-sbc 3740  df-csb 3848  df-dif 3902  df-un 3904  df-in 3906  df-ss 3916  df-pss 3919  df-nul 4280  df-if 4483  df-pw 4559  df-sn 4585  df-pr 4587  df-op 4591  df-uni 4868  df-iun 4953  df-br 5104  df-opab 5168  df-mpt 5187  df-tr 5213  df-id 5546  df-eprel 5551  df-po 5559  df-so 5560  df-fr 5604  df-we 5606  df-xp 5657  df-rel 5658  df-cnv 5659  df-co 5660  df-dm 5661  df-rn 5662  df-res 5663  df-ima 5664  df-pred 6297  df-ord 6358  df-on 6359  df-lim 6360  df-suc 6361  df-iota 6487  df-fun 6533  df-fn 6534  df-f 6535  df-f1 6536  df-fo 6537  df-f1o 6538  df-fv 6539  df-riota 7369  df-ov 7415  df-oprab 7416  df-mpo 7417  df-om 7867  df-1st 7990  df-2nd 7991  df-frecs 8283  df-wrecs 8314  df-recs 8363  df-rdg 8402  df-er 8701  df-en 8958  df-dom 8959  df-sdom 8960  df-sup 9418  df-inf 9419  df-pnf 11326  df-mnf 11327  df-xr 11328  df-ltxr 11329  df-le 11330  df-sub 11524  df-neg 11525  df-div 11955  df-nn 12317  df-2 12386  df-3 12387  df-4 12388  df-5 12389  df-6 12390  df-7 12391  df-8 12392  df-n0 12588  df-z 12675  df-uz 12947  df-rp 13102  df-ico 13463  df-fz 13621  df-fl 13912  df-mod 13990  df-seq 14125  df-exp 14185  df-cj 15246  df-re 15247  df-im 15248  df-sqrt 15382  df-abs 15383  df-dvds 16403
This theorem is used by:  sgprmdvdsmersenne  48633
  Copyright terms: Public domain W3C validator