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

Theorem nneo 12069
Description: A positive integer is even or odd but not both. (Contributed by NM, 1-Jan-2006.) (Proof shortened by Mario Carneiro, 18-May-2014.)
Assertion
Ref Expression
nneo (𝑁 ∈ ℕ → ((𝑁 / 2) ∈ ℕ ↔ ¬ ((𝑁 + 1) / 2) ∈ ℕ))

Proof of Theorem nneo
Dummy variables 𝑗 𝑘 are mutually distinct and distinct from all other variables.
StepHypRef Expression
1 nncn 11648 . . . . . 6 (𝑁 ∈ ℕ → 𝑁 ∈ ℂ)
2 peano2cn 10814 . . . . . 6 (𝑁 ∈ ℂ → (𝑁 + 1) ∈ ℂ)
31, 2syl 17 . . . . 5 (𝑁 ∈ ℕ → (𝑁 + 1) ∈ ℂ)
4 2cn 11715 . . . . . 6 2 ∈ ℂ
54a1i 11 . . . . 5 (𝑁 ∈ ℕ → 2 ∈ ℂ)
6 2ne0 11744 . . . . . 6 2 ≠ 0
76a1i 11 . . . . 5 (𝑁 ∈ ℕ → 2 ≠ 0)
83, 5, 7divcan2d 11420 . . . 4 (𝑁 ∈ ℕ → (2 · ((𝑁 + 1) / 2)) = (𝑁 + 1))
91, 5, 7divcan2d 11420 . . . . 5 (𝑁 ∈ ℕ → (2 · (𝑁 / 2)) = 𝑁)
109oveq1d 7173 . . . 4 (𝑁 ∈ ℕ → ((2 · (𝑁 / 2)) + 1) = (𝑁 + 1))
118, 10eqtr4d 2861 . . 3 (𝑁 ∈ ℕ → (2 · ((𝑁 + 1) / 2)) = ((2 · (𝑁 / 2)) + 1))
12 nnz 12007 . . . . . 6 (((𝑁 + 1) / 2) ∈ ℕ → ((𝑁 + 1) / 2) ∈ ℤ)
13 nnz 12007 . . . . . 6 ((𝑁 / 2) ∈ ℕ → (𝑁 / 2) ∈ ℤ)
14 zneo 12068 . . . . . 6 ((((𝑁 + 1) / 2) ∈ ℤ ∧ (𝑁 / 2) ∈ ℤ) → (2 · ((𝑁 + 1) / 2)) ≠ ((2 · (𝑁 / 2)) + 1))
1512, 13, 14syl2an 597 . . . . 5 ((((𝑁 + 1) / 2) ∈ ℕ ∧ (𝑁 / 2) ∈ ℕ) → (2 · ((𝑁 + 1) / 2)) ≠ ((2 · (𝑁 / 2)) + 1))
1615expcom 416 . . . 4 ((𝑁 / 2) ∈ ℕ → (((𝑁 + 1) / 2) ∈ ℕ → (2 · ((𝑁 + 1) / 2)) ≠ ((2 · (𝑁 / 2)) + 1)))
1716necon2bd 3034 . . 3 ((𝑁 / 2) ∈ ℕ → ((2 · ((𝑁 + 1) / 2)) = ((2 · (𝑁 / 2)) + 1) → ¬ ((𝑁 + 1) / 2) ∈ ℕ))
1811, 17syl5com 31 . 2 (𝑁 ∈ ℕ → ((𝑁 / 2) ∈ ℕ → ¬ ((𝑁 + 1) / 2) ∈ ℕ))
19 oveq1 7165 . . . . . . 7 (𝑗 = 1 → (𝑗 + 1) = (1 + 1))
2019oveq1d 7173 . . . . . 6 (𝑗 = 1 → ((𝑗 + 1) / 2) = ((1 + 1) / 2))
2120eleq1d 2899 . . . . 5 (𝑗 = 1 → (((𝑗 + 1) / 2) ∈ ℕ ↔ ((1 + 1) / 2) ∈ ℕ))
22 oveq1 7165 . . . . . 6 (𝑗 = 1 → (𝑗 / 2) = (1 / 2))
2322eleq1d 2899 . . . . 5 (𝑗 = 1 → ((𝑗 / 2) ∈ ℕ ↔ (1 / 2) ∈ ℕ))
2421, 23orbi12d 915 . . . 4 (𝑗 = 1 → ((((𝑗 + 1) / 2) ∈ ℕ ∨ (𝑗 / 2) ∈ ℕ) ↔ (((1 + 1) / 2) ∈ ℕ ∨ (1 / 2) ∈ ℕ)))
25 oveq1 7165 . . . . . . 7 (𝑗 = 𝑘 → (𝑗 + 1) = (𝑘 + 1))
2625oveq1d 7173 . . . . . 6 (𝑗 = 𝑘 → ((𝑗 + 1) / 2) = ((𝑘 + 1) / 2))
2726eleq1d 2899 . . . . 5 (𝑗 = 𝑘 → (((𝑗 + 1) / 2) ∈ ℕ ↔ ((𝑘 + 1) / 2) ∈ ℕ))
28 oveq1 7165 . . . . . 6 (𝑗 = 𝑘 → (𝑗 / 2) = (𝑘 / 2))
2928eleq1d 2899 . . . . 5 (𝑗 = 𝑘 → ((𝑗 / 2) ∈ ℕ ↔ (𝑘 / 2) ∈ ℕ))
3027, 29orbi12d 915 . . . 4 (𝑗 = 𝑘 → ((((𝑗 + 1) / 2) ∈ ℕ ∨ (𝑗 / 2) ∈ ℕ) ↔ (((𝑘 + 1) / 2) ∈ ℕ ∨ (𝑘 / 2) ∈ ℕ)))
31 oveq1 7165 . . . . . . 7 (𝑗 = (𝑘 + 1) → (𝑗 + 1) = ((𝑘 + 1) + 1))
3231oveq1d 7173 . . . . . 6 (𝑗 = (𝑘 + 1) → ((𝑗 + 1) / 2) = (((𝑘 + 1) + 1) / 2))
3332eleq1d 2899 . . . . 5 (𝑗 = (𝑘 + 1) → (((𝑗 + 1) / 2) ∈ ℕ ↔ (((𝑘 + 1) + 1) / 2) ∈ ℕ))
34 oveq1 7165 . . . . . 6 (𝑗 = (𝑘 + 1) → (𝑗 / 2) = ((𝑘 + 1) / 2))
3534eleq1d 2899 . . . . 5 (𝑗 = (𝑘 + 1) → ((𝑗 / 2) ∈ ℕ ↔ ((𝑘 + 1) / 2) ∈ ℕ))
3633, 35orbi12d 915 . . . 4 (𝑗 = (𝑘 + 1) → ((((𝑗 + 1) / 2) ∈ ℕ ∨ (𝑗 / 2) ∈ ℕ) ↔ ((((𝑘 + 1) + 1) / 2) ∈ ℕ ∨ ((𝑘 + 1) / 2) ∈ ℕ)))
37 oveq1 7165 . . . . . . 7 (𝑗 = 𝑁 → (𝑗 + 1) = (𝑁 + 1))
3837oveq1d 7173 . . . . . 6 (𝑗 = 𝑁 → ((𝑗 + 1) / 2) = ((𝑁 + 1) / 2))
3938eleq1d 2899 . . . . 5 (𝑗 = 𝑁 → (((𝑗 + 1) / 2) ∈ ℕ ↔ ((𝑁 + 1) / 2) ∈ ℕ))
40 oveq1 7165 . . . . . 6 (𝑗 = 𝑁 → (𝑗 / 2) = (𝑁 / 2))
4140eleq1d 2899 . . . . 5 (𝑗 = 𝑁 → ((𝑗 / 2) ∈ ℕ ↔ (𝑁 / 2) ∈ ℕ))
4239, 41orbi12d 915 . . . 4 (𝑗 = 𝑁 → ((((𝑗 + 1) / 2) ∈ ℕ ∨ (𝑗 / 2) ∈ ℕ) ↔ (((𝑁 + 1) / 2) ∈ ℕ ∨ (𝑁 / 2) ∈ ℕ)))
43 df-2 11703 . . . . . . . 8 2 = (1 + 1)
4443oveq1i 7168 . . . . . . 7 (2 / 2) = ((1 + 1) / 2)
45 2div2e1 11781 . . . . . . 7 (2 / 2) = 1
4644, 45eqtr3i 2848 . . . . . 6 ((1 + 1) / 2) = 1
47 1nn 11651 . . . . . 6 1 ∈ ℕ
4846, 47eqeltri 2911 . . . . 5 ((1 + 1) / 2) ∈ ℕ
4948orci 861 . . . 4 (((1 + 1) / 2) ∈ ℕ ∨ (1 / 2) ∈ ℕ)
50 peano2nn 11652 . . . . . . 7 ((𝑘 / 2) ∈ ℕ → ((𝑘 / 2) + 1) ∈ ℕ)
51 nncn 11648 . . . . . . . . 9 (𝑘 ∈ ℕ → 𝑘 ∈ ℂ)
52 add1p1 11891 . . . . . . . . . . 11 (𝑘 ∈ ℂ → ((𝑘 + 1) + 1) = (𝑘 + 2))
5352oveq1d 7173 . . . . . . . . . 10 (𝑘 ∈ ℂ → (((𝑘 + 1) + 1) / 2) = ((𝑘 + 2) / 2))
54 2cnne0 11850 . . . . . . . . . . . 12 (2 ∈ ℂ ∧ 2 ≠ 0)
55 divdir 11325 . . . . . . . . . . . 12 ((𝑘 ∈ ℂ ∧ 2 ∈ ℂ ∧ (2 ∈ ℂ ∧ 2 ≠ 0)) → ((𝑘 + 2) / 2) = ((𝑘 / 2) + (2 / 2)))
564, 54, 55mp3an23 1449 . . . . . . . . . . 11 (𝑘 ∈ ℂ → ((𝑘 + 2) / 2) = ((𝑘 / 2) + (2 / 2)))
5745oveq2i 7169 . . . . . . . . . . 11 ((𝑘 / 2) + (2 / 2)) = ((𝑘 / 2) + 1)
5856, 57syl6eq 2874 . . . . . . . . . 10 (𝑘 ∈ ℂ → ((𝑘 + 2) / 2) = ((𝑘 / 2) + 1))
5953, 58eqtrd 2858 . . . . . . . . 9 (𝑘 ∈ ℂ → (((𝑘 + 1) + 1) / 2) = ((𝑘 / 2) + 1))
6051, 59syl 17 . . . . . . . 8 (𝑘 ∈ ℕ → (((𝑘 + 1) + 1) / 2) = ((𝑘 / 2) + 1))
6160eleq1d 2899 . . . . . . 7 (𝑘 ∈ ℕ → ((((𝑘 + 1) + 1) / 2) ∈ ℕ ↔ ((𝑘 / 2) + 1) ∈ ℕ))
6250, 61syl5ibr 248 . . . . . 6 (𝑘 ∈ ℕ → ((𝑘 / 2) ∈ ℕ → (((𝑘 + 1) + 1) / 2) ∈ ℕ))
6362orim2d 963 . . . . 5 (𝑘 ∈ ℕ → ((((𝑘 + 1) / 2) ∈ ℕ ∨ (𝑘 / 2) ∈ ℕ) → (((𝑘 + 1) / 2) ∈ ℕ ∨ (((𝑘 + 1) + 1) / 2) ∈ ℕ)))
64 orcom 866 . . . . 5 ((((𝑘 + 1) / 2) ∈ ℕ ∨ (((𝑘 + 1) + 1) / 2) ∈ ℕ) ↔ ((((𝑘 + 1) + 1) / 2) ∈ ℕ ∨ ((𝑘 + 1) / 2) ∈ ℕ))
6563, 64syl6ib 253 . . . 4 (𝑘 ∈ ℕ → ((((𝑘 + 1) / 2) ∈ ℕ ∨ (𝑘 / 2) ∈ ℕ) → ((((𝑘 + 1) + 1) / 2) ∈ ℕ ∨ ((𝑘 + 1) / 2) ∈ ℕ)))
6624, 30, 36, 42, 49, 65nnind 11658 . . 3 (𝑁 ∈ ℕ → (((𝑁 + 1) / 2) ∈ ℕ ∨ (𝑁 / 2) ∈ ℕ))
6766ord 860 . 2 (𝑁 ∈ ℕ → (¬ ((𝑁 + 1) / 2) ∈ ℕ → (𝑁 / 2) ∈ ℕ))
6818, 67impbid 214 1 (𝑁 ∈ ℕ → ((𝑁 / 2) ∈ ℕ ↔ ¬ ((𝑁 + 1) / 2) ∈ ℕ))
Colors of variables: wff setvar class
Syntax hints:  ¬ wn 3  wi 4  wb 208  wa 398  wo 843   = wceq 1537  wcel 2114  wne 3018  (class class class)co 7158  cc 10537  0cc0 10539  1c1 10540   + caddc 10542   · cmul 10544   / cdiv 11299  cn 11640  2c2 11695  cz 11984
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1796  ax-4 1810  ax-5 1911  ax-6 1970  ax-7 2015  ax-8 2116  ax-9 2124  ax-10 2145  ax-11 2161  ax-12 2177  ax-ext 2795  ax-sep 5205  ax-nul 5212  ax-pow 5268  ax-pr 5332  ax-un 7463  ax-resscn 10596  ax-1cn 10597  ax-icn 10598  ax-addcl 10599  ax-addrcl 10600  ax-mulcl 10601  ax-mulrcl 10602  ax-mulcom 10603  ax-addass 10604  ax-mulass 10605  ax-distr 10606  ax-i2m1 10607  ax-1ne0 10608  ax-1rid 10609  ax-rnegex 10610  ax-rrecex 10611  ax-cnre 10612  ax-pre-lttri 10613  ax-pre-lttrn 10614  ax-pre-ltadd 10615  ax-pre-mulgt0 10616
This theorem depends on definitions:  df-bi 209  df-an 399  df-or 844  df-3or 1084  df-3an 1085  df-tru 1540  df-ex 1781  df-nf 1785  df-sb 2070  df-mo 2622  df-eu 2654  df-clab 2802  df-cleq 2816  df-clel 2895  df-nfc 2965  df-ne 3019  df-nel 3126  df-ral 3145  df-rex 3146  df-reu 3147  df-rmo 3148  df-rab 3149  df-v 3498  df-sbc 3775  df-csb 3886  df-dif 3941  df-un 3943  df-in 3945  df-ss 3954  df-pss 3956  df-nul 4294  df-if 4470  df-pw 4543  df-sn 4570  df-pr 4572  df-tp 4574  df-op 4576  df-uni 4841  df-iun 4923  df-br 5069  df-opab 5131  df-mpt 5149  df-tr 5175  df-id 5462  df-eprel 5467  df-po 5476  df-so 5477  df-fr 5516  df-we 5518  df-xp 5563  df-rel 5564  df-cnv 5565  df-co 5566  df-dm 5567  df-rn 5568  df-res 5569  df-ima 5570  df-pred 6150  df-ord 6196  df-on 6197  df-lim 6198  df-suc 6199  df-iota 6316  df-fun 6359  df-fn 6360  df-f 6361  df-f1 6362  df-fo 6363  df-f1o 6364  df-fv 6365  df-riota 7116  df-ov 7161  df-oprab 7162  df-mpo 7163  df-om 7583  df-wrecs 7949  df-recs 8010  df-rdg 8048  df-er 8291  df-en 8512  df-dom 8513  df-sdom 8514  df-pnf 10679  df-mnf 10680  df-xr 10681  df-ltxr 10682  df-le 10683  df-sub 10874  df-neg 10875  df-div 11300  df-nn 11641  df-2 11703  df-n0 11901  df-z 11985
This theorem is referenced by:  nneoi  12070  zeo  12071  ovolunlem1a  24099  ovolunlem1  24100  nneop  44593  nnolog2flm1  44657
  Copyright terms: Public domain W3C validator