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

Theorem nneo 12505
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 12082 . . . . . 6 (𝑁 ∈ ℕ → 𝑁 ∈ ℂ)
2 peano2cn 11248 . . . . . 6 (𝑁 ∈ ℂ → (𝑁 + 1) ∈ ℂ)
31, 2syl 17 . . . . 5 (𝑁 ∈ ℕ → (𝑁 + 1) ∈ ℂ)
4 2cn 12149 . . . . . 6 2 ∈ ℂ
54a1i 11 . . . . 5 (𝑁 ∈ ℕ → 2 ∈ ℂ)
6 2ne0 12178 . . . . . 6 2 ≠ 0
76a1i 11 . . . . 5 (𝑁 ∈ ℕ → 2 ≠ 0)
83, 5, 7divcan2d 11854 . . . 4 (𝑁 ∈ ℕ → (2 · ((𝑁 + 1) / 2)) = (𝑁 + 1))
91, 5, 7divcan2d 11854 . . . . 5 (𝑁 ∈ ℕ → (2 · (𝑁 / 2)) = 𝑁)
109oveq1d 7352 . . . 4 (𝑁 ∈ ℕ → ((2 · (𝑁 / 2)) + 1) = (𝑁 + 1))
118, 10eqtr4d 2779 . . 3 (𝑁 ∈ ℕ → (2 · ((𝑁 + 1) / 2)) = ((2 · (𝑁 / 2)) + 1))
12 nnz 12443 . . . . . 6 (((𝑁 + 1) / 2) ∈ ℕ → ((𝑁 + 1) / 2) ∈ ℤ)
13 nnz 12443 . . . . . 6 ((𝑁 / 2) ∈ ℕ → (𝑁 / 2) ∈ ℤ)
14 zneo 12504 . . . . . 6 ((((𝑁 + 1) / 2) ∈ ℤ ∧ (𝑁 / 2) ∈ ℤ) → (2 · ((𝑁 + 1) / 2)) ≠ ((2 · (𝑁 / 2)) + 1))
1512, 13, 14syl2an 596 . . . . 5 ((((𝑁 + 1) / 2) ∈ ℕ ∧ (𝑁 / 2) ∈ ℕ) → (2 · ((𝑁 + 1) / 2)) ≠ ((2 · (𝑁 / 2)) + 1))
1615expcom 414 . . . 4 ((𝑁 / 2) ∈ ℕ → (((𝑁 + 1) / 2) ∈ ℕ → (2 · ((𝑁 + 1) / 2)) ≠ ((2 · (𝑁 / 2)) + 1)))
1716necon2bd 2956 . . 3 ((𝑁 / 2) ∈ ℕ → ((2 · ((𝑁 + 1) / 2)) = ((2 · (𝑁 / 2)) + 1) → ¬ ((𝑁 + 1) / 2) ∈ ℕ))
1811, 17syl5com 31 . 2 (𝑁 ∈ ℕ → ((𝑁 / 2) ∈ ℕ → ¬ ((𝑁 + 1) / 2) ∈ ℕ))
19 oveq1 7344 . . . . . . 7 (𝑗 = 1 → (𝑗 + 1) = (1 + 1))
2019oveq1d 7352 . . . . . 6 (𝑗 = 1 → ((𝑗 + 1) / 2) = ((1 + 1) / 2))
2120eleq1d 2821 . . . . 5 (𝑗 = 1 → (((𝑗 + 1) / 2) ∈ ℕ ↔ ((1 + 1) / 2) ∈ ℕ))
22 oveq1 7344 . . . . . 6 (𝑗 = 1 → (𝑗 / 2) = (1 / 2))
2322eleq1d 2821 . . . . 5 (𝑗 = 1 → ((𝑗 / 2) ∈ ℕ ↔ (1 / 2) ∈ ℕ))
2421, 23orbi12d 916 . . . 4 (𝑗 = 1 → ((((𝑗 + 1) / 2) ∈ ℕ ∨ (𝑗 / 2) ∈ ℕ) ↔ (((1 + 1) / 2) ∈ ℕ ∨ (1 / 2) ∈ ℕ)))
25 oveq1 7344 . . . . . . 7 (𝑗 = 𝑘 → (𝑗 + 1) = (𝑘 + 1))
2625oveq1d 7352 . . . . . 6 (𝑗 = 𝑘 → ((𝑗 + 1) / 2) = ((𝑘 + 1) / 2))
2726eleq1d 2821 . . . . 5 (𝑗 = 𝑘 → (((𝑗 + 1) / 2) ∈ ℕ ↔ ((𝑘 + 1) / 2) ∈ ℕ))
28 oveq1 7344 . . . . . 6 (𝑗 = 𝑘 → (𝑗 / 2) = (𝑘 / 2))
2928eleq1d 2821 . . . . 5 (𝑗 = 𝑘 → ((𝑗 / 2) ∈ ℕ ↔ (𝑘 / 2) ∈ ℕ))
3027, 29orbi12d 916 . . . 4 (𝑗 = 𝑘 → ((((𝑗 + 1) / 2) ∈ ℕ ∨ (𝑗 / 2) ∈ ℕ) ↔ (((𝑘 + 1) / 2) ∈ ℕ ∨ (𝑘 / 2) ∈ ℕ)))
31 oveq1 7344 . . . . . . 7 (𝑗 = (𝑘 + 1) → (𝑗 + 1) = ((𝑘 + 1) + 1))
3231oveq1d 7352 . . . . . 6 (𝑗 = (𝑘 + 1) → ((𝑗 + 1) / 2) = (((𝑘 + 1) + 1) / 2))
3332eleq1d 2821 . . . . 5 (𝑗 = (𝑘 + 1) → (((𝑗 + 1) / 2) ∈ ℕ ↔ (((𝑘 + 1) + 1) / 2) ∈ ℕ))
34 oveq1 7344 . . . . . 6 (𝑗 = (𝑘 + 1) → (𝑗 / 2) = ((𝑘 + 1) / 2))
3534eleq1d 2821 . . . . 5 (𝑗 = (𝑘 + 1) → ((𝑗 / 2) ∈ ℕ ↔ ((𝑘 + 1) / 2) ∈ ℕ))
3633, 35orbi12d 916 . . . 4 (𝑗 = (𝑘 + 1) → ((((𝑗 + 1) / 2) ∈ ℕ ∨ (𝑗 / 2) ∈ ℕ) ↔ ((((𝑘 + 1) + 1) / 2) ∈ ℕ ∨ ((𝑘 + 1) / 2) ∈ ℕ)))
37 oveq1 7344 . . . . . . 7 (𝑗 = 𝑁 → (𝑗 + 1) = (𝑁 + 1))
3837oveq1d 7352 . . . . . 6 (𝑗 = 𝑁 → ((𝑗 + 1) / 2) = ((𝑁 + 1) / 2))
3938eleq1d 2821 . . . . 5 (𝑗 = 𝑁 → (((𝑗 + 1) / 2) ∈ ℕ ↔ ((𝑁 + 1) / 2) ∈ ℕ))
40 oveq1 7344 . . . . . 6 (𝑗 = 𝑁 → (𝑗 / 2) = (𝑁 / 2))
4140eleq1d 2821 . . . . 5 (𝑗 = 𝑁 → ((𝑗 / 2) ∈ ℕ ↔ (𝑁 / 2) ∈ ℕ))
4239, 41orbi12d 916 . . . 4 (𝑗 = 𝑁 → ((((𝑗 + 1) / 2) ∈ ℕ ∨ (𝑗 / 2) ∈ ℕ) ↔ (((𝑁 + 1) / 2) ∈ ℕ ∨ (𝑁 / 2) ∈ ℕ)))
43 df-2 12137 . . . . . . . 8 2 = (1 + 1)
4443oveq1i 7347 . . . . . . 7 (2 / 2) = ((1 + 1) / 2)
45 2div2e1 12215 . . . . . . 7 (2 / 2) = 1
4644, 45eqtr3i 2766 . . . . . 6 ((1 + 1) / 2) = 1
47 1nn 12085 . . . . . 6 1 ∈ ℕ
4846, 47eqeltri 2833 . . . . 5 ((1 + 1) / 2) ∈ ℕ
4948orci 862 . . . 4 (((1 + 1) / 2) ∈ ℕ ∨ (1 / 2) ∈ ℕ)
50 peano2nn 12086 . . . . . . 7 ((𝑘 / 2) ∈ ℕ → ((𝑘 / 2) + 1) ∈ ℕ)
51 nncn 12082 . . . . . . . . 9 (𝑘 ∈ ℕ → 𝑘 ∈ ℂ)
52 add1p1 12325 . . . . . . . . . . 11 (𝑘 ∈ ℂ → ((𝑘 + 1) + 1) = (𝑘 + 2))
5352oveq1d 7352 . . . . . . . . . 10 (𝑘 ∈ ℂ → (((𝑘 + 1) + 1) / 2) = ((𝑘 + 2) / 2))
54 2cnne0 12284 . . . . . . . . . . . 12 (2 ∈ ℂ ∧ 2 ≠ 0)
55 divdir 11759 . . . . . . . . . . . 12 ((𝑘 ∈ ℂ ∧ 2 ∈ ℂ ∧ (2 ∈ ℂ ∧ 2 ≠ 0)) → ((𝑘 + 2) / 2) = ((𝑘 / 2) + (2 / 2)))
564, 54, 55mp3an23 1452 . . . . . . . . . . 11 (𝑘 ∈ ℂ → ((𝑘 + 2) / 2) = ((𝑘 / 2) + (2 / 2)))
5745oveq2i 7348 . . . . . . . . . . 11 ((𝑘 / 2) + (2 / 2)) = ((𝑘 / 2) + 1)
5856, 57eqtrdi 2792 . . . . . . . . . 10 (𝑘 ∈ ℂ → ((𝑘 + 2) / 2) = ((𝑘 / 2) + 1))
5953, 58eqtrd 2776 . . . . . . . . 9 (𝑘 ∈ ℂ → (((𝑘 + 1) + 1) / 2) = ((𝑘 / 2) + 1))
6051, 59syl 17 . . . . . . . 8 (𝑘 ∈ ℕ → (((𝑘 + 1) + 1) / 2) = ((𝑘 / 2) + 1))
6160eleq1d 2821 . . . . . . 7 (𝑘 ∈ ℕ → ((((𝑘 + 1) + 1) / 2) ∈ ℕ ↔ ((𝑘 / 2) + 1) ∈ ℕ))
6250, 61syl5ibr 245 . . . . . 6 (𝑘 ∈ ℕ → ((𝑘 / 2) ∈ ℕ → (((𝑘 + 1) + 1) / 2) ∈ ℕ))
6362orim2d 964 . . . . 5 (𝑘 ∈ ℕ → ((((𝑘 + 1) / 2) ∈ ℕ ∨ (𝑘 / 2) ∈ ℕ) → (((𝑘 + 1) / 2) ∈ ℕ ∨ (((𝑘 + 1) + 1) / 2) ∈ ℕ)))
64 orcom 867 . . . . 5 ((((𝑘 + 1) / 2) ∈ ℕ ∨ (((𝑘 + 1) + 1) / 2) ∈ ℕ) ↔ ((((𝑘 + 1) + 1) / 2) ∈ ℕ ∨ ((𝑘 + 1) / 2) ∈ ℕ))
6563, 64syl6ib 250 . . . 4 (𝑘 ∈ ℕ → ((((𝑘 + 1) / 2) ∈ ℕ ∨ (𝑘 / 2) ∈ ℕ) → ((((𝑘 + 1) + 1) / 2) ∈ ℕ ∨ ((𝑘 + 1) / 2) ∈ ℕ)))
6624, 30, 36, 42, 49, 65nnind 12092 . . 3 (𝑁 ∈ ℕ → (((𝑁 + 1) / 2) ∈ ℕ ∨ (𝑁 / 2) ∈ ℕ))
6766ord 861 . 2 (𝑁 ∈ ℕ → (¬ ((𝑁 + 1) / 2) ∈ ℕ → (𝑁 / 2) ∈ ℕ))
6818, 67impbid 211 1 (𝑁 ∈ ℕ → ((𝑁 / 2) ∈ ℕ ↔ ¬ ((𝑁 + 1) / 2) ∈ ℕ))
Colors of variables: wff setvar class
Syntax hints:  ¬ wn 3  wi 4  wb 205  wa 396  wo 844   = wceq 1540  wcel 2105  wne 2940  (class class class)co 7337  cc 10970  0cc0 10972  1c1 10973   + caddc 10975   · cmul 10977   / cdiv 11733  cn 12074  2c2 12129  cz 12420
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 1912  ax-6 1970  ax-7 2010  ax-8 2107  ax-9 2115  ax-10 2136  ax-11 2153  ax-12 2170  ax-ext 2707  ax-sep 5243  ax-nul 5250  ax-pow 5308  ax-pr 5372  ax-un 7650  ax-resscn 11029  ax-1cn 11030  ax-icn 11031  ax-addcl 11032  ax-addrcl 11033  ax-mulcl 11034  ax-mulrcl 11035  ax-mulcom 11036  ax-addass 11037  ax-mulass 11038  ax-distr 11039  ax-i2m1 11040  ax-1ne0 11041  ax-1rid 11042  ax-rnegex 11043  ax-rrecex 11044  ax-cnre 11045  ax-pre-lttri 11046  ax-pre-lttrn 11047  ax-pre-ltadd 11048  ax-pre-mulgt0 11049
This theorem depends on definitions:  df-bi 206  df-an 397  df-or 845  df-3or 1087  df-3an 1088  df-tru 1543  df-fal 1553  df-ex 1781  df-nf 1785  df-sb 2067  df-mo 2538  df-eu 2567  df-clab 2714  df-cleq 2728  df-clel 2814  df-nfc 2886  df-ne 2941  df-nel 3047  df-ral 3062  df-rex 3071  df-rmo 3349  df-reu 3350  df-rab 3404  df-v 3443  df-sbc 3728  df-csb 3844  df-dif 3901  df-un 3903  df-in 3905  df-ss 3915  df-pss 3917  df-nul 4270  df-if 4474  df-pw 4549  df-sn 4574  df-pr 4576  df-op 4580  df-uni 4853  df-iun 4943  df-br 5093  df-opab 5155  df-mpt 5176  df-tr 5210  df-id 5518  df-eprel 5524  df-po 5532  df-so 5533  df-fr 5575  df-we 5577  df-xp 5626  df-rel 5627  df-cnv 5628  df-co 5629  df-dm 5630  df-rn 5631  df-res 5632  df-ima 5633  df-pred 6238  df-ord 6305  df-on 6306  df-lim 6307  df-suc 6308  df-iota 6431  df-fun 6481  df-fn 6482  df-f 6483  df-f1 6484  df-fo 6485  df-f1o 6486  df-fv 6487  df-riota 7293  df-ov 7340  df-oprab 7341  df-mpo 7342  df-om 7781  df-2nd 7900  df-frecs 8167  df-wrecs 8198  df-recs 8272  df-rdg 8311  df-er 8569  df-en 8805  df-dom 8806  df-sdom 8807  df-pnf 11112  df-mnf 11113  df-xr 11114  df-ltxr 11115  df-le 11116  df-sub 11308  df-neg 11309  df-div 11734  df-nn 12075  df-2 12137  df-n0 12335  df-z 12421
This theorem is referenced by:  nneoi  12506  zeo  12507  ovolunlem1a  24766  ovolunlem1  24767  nneop  46223  nnolog2flm1  46287
  Copyright terms: Public domain W3C validator