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

Theorem difpar 49903
Description: Two integers have different parity (i.e., one integer is odd and the other is even) if and only if their sum is odd. (Contributed by AV, 3-Nov-2026.)
Hypotheses
Ref Expression
difpar.a (𝜑 → 𝐴 ∈ ℤ)
difpar.b (𝜑 → 𝐵 ∈ ℤ)
Assertion
Ref Expression
difpar (𝜑 → (¬ 2 ∥ (𝐴 + 𝐵) ↔ ((2 ∥ 𝐴 ∧ ¬ 2 ∥ 𝐵) ∨ (¬ 2 ∥ 𝐴 ∧ 2 ∥ 𝐵))))

Proof of Theorem difpar
StepHypRef Expression
1 ioran 1000 . . . 4 (¬ ((2 ∥ 𝐴 ∧ ¬ 2 ∥ 𝐵) ∨ (¬ 2 ∥ 𝐴 ∧ 2 ∥ 𝐵)) ↔ (¬ (2 ∥ 𝐴 ∧ ¬ 2 ∥ 𝐵) ∧ ¬ (¬ 2 ∥ 𝐴 ∧ 2 ∥ 𝐵)))
2 ianor 998 . . . . . 6 (¬ (2 ∥ 𝐴 ∧ ¬ 2 ∥ 𝐵) ↔ (¬ 2 ∥ 𝐴 ∨ ¬ ¬ 2 ∥ 𝐵))
3 ianor 998 . . . . . 6 (¬ (¬ 2 ∥ 𝐴 ∧ 2 ∥ 𝐵) ↔ (¬ ¬ 2 ∥ 𝐴 ∨ ¬ 2 ∥ 𝐵))
42, 3anbi12i 640 . . . . 5 ((¬ (2 ∥ 𝐴 ∧ ¬ 2 ∥ 𝐵) ∧ ¬ (¬ 2 ∥ 𝐴 ∧ 2 ∥ 𝐵)) ↔ ((¬ 2 ∥ 𝐴 ∨ ¬ ¬ 2 ∥ 𝐵) ∧ (¬ ¬ 2 ∥ 𝐴 ∨ ¬ 2 ∥ 𝐵)))
5 notnotb 318 . . . . . . . . . 10 (2 ∥ 𝐵 ↔ ¬ ¬ 2 ∥ 𝐵)
65bicomi 227 . . . . . . . . 9 (¬ ¬ 2 ∥ 𝐵 ↔ 2 ∥ 𝐵)
76orbi2i 926 . . . . . . . 8 ((¬ 2 ∥ 𝐴 ∨ ¬ ¬ 2 ∥ 𝐵) ↔ (¬ 2 ∥ 𝐴 ∨ 2 ∥ 𝐵))
8 notnotb 318 . . . . . . . . . 10 (2 ∥ 𝐴 ↔ ¬ ¬ 2 ∥ 𝐴)
98bicomi 227 . . . . . . . . 9 (¬ ¬ 2 ∥ 𝐴 ↔ 2 ∥ 𝐴)
109orbi1i 927 . . . . . . . 8 ((¬ ¬ 2 ∥ 𝐴 ∨ ¬ 2 ∥ 𝐵) ↔ (2 ∥ 𝐴 ∨ ¬ 2 ∥ 𝐵))
117, 10anbi12i 640 . . . . . . 7 (((¬ 2 ∥ 𝐴 ∨ ¬ ¬ 2 ∥ 𝐵) ∧ (¬ ¬ 2 ∥ 𝐴 ∨ ¬ 2 ∥ 𝐵)) ↔ ((¬ 2 ∥ 𝐴 ∨ 2 ∥ 𝐵) ∧ (2 ∥ 𝐴 ∨ ¬ 2 ∥ 𝐵)))
12 anddi 1029 . . . . . . 7 (((¬ 2 ∥ 𝐴 ∨ 2 ∥ 𝐵) ∧ (2 ∥ 𝐴 ∨ ¬ 2 ∥ 𝐵)) ↔ (((¬ 2 ∥ 𝐴 ∧ 2 ∥ 𝐴) ∨ (¬ 2 ∥ 𝐴 ∧ ¬ 2 ∥ 𝐵)) ∨ ((2 ∥ 𝐵 ∧ 2 ∥ 𝐴) ∨ (2 ∥ 𝐵 ∧ ¬ 2 ∥ 𝐵))))
1311, 12bitri 278 . . . . . 6 (((¬ 2 ∥ 𝐴 ∨ ¬ ¬ 2 ∥ 𝐵) ∧ (¬ ¬ 2 ∥ 𝐴 ∨ ¬ 2 ∥ 𝐵)) ↔ (((¬ 2 ∥ 𝐴 ∧ 2 ∥ 𝐴) ∨ (¬ 2 ∥ 𝐴 ∧ ¬ 2 ∥ 𝐵)) ∨ ((2 ∥ 𝐵 ∧ 2 ∥ 𝐴) ∨ (2 ∥ 𝐵 ∧ ¬ 2 ∥ 𝐵))))
14 pm3.24 408 . . . . . . . . . . 11 ¬ (2 ∥ 𝐴 ∧ ¬ 2 ∥ 𝐴)
1514pm2.21i 120 . . . . . . . . . 10 ((2 ∥ 𝐴 ∧ ¬ 2 ∥ 𝐴) → 2 ∥ (𝐴 + 𝐵))
1615ancoms 464 . . . . . . . . 9 ((¬ 2 ∥ 𝐴 ∧ 2 ∥ 𝐴) → 2 ∥ (𝐴 + 𝐵))
1716a1i 11 . . . . . . . 8 (𝜑 → ((¬ 2 ∥ 𝐴 ∧ 2 ∥ 𝐴) → 2 ∥ (𝐴 + 𝐵)))
18 difpar.a . . . . . . . . . . 11 (𝜑 → 𝐴 ∈ ℤ)
1918adantr 486 . . . . . . . . . 10 ((𝜑 ∧ (¬ 2 ∥ 𝐴 ∧ ¬ 2 ∥ 𝐵)) → 𝐴 ∈ ℤ)
20 simprl 783 . . . . . . . . . 10 ((𝜑 ∧ (¬ 2 ∥ 𝐴 ∧ ¬ 2 ∥ 𝐵)) → ¬ 2 ∥ 𝐴)
21 difpar.b . . . . . . . . . . 11 (𝜑 → 𝐵 ∈ ℤ)
2221adantr 486 . . . . . . . . . 10 ((𝜑 ∧ (¬ 2 ∥ 𝐴 ∧ ¬ 2 ∥ 𝐵)) → 𝐵 ∈ ℤ)
23 simprr 785 . . . . . . . . . 10 ((𝜑 ∧ (¬ 2 ∥ 𝐴 ∧ ¬ 2 ∥ 𝐵)) → ¬ 2 ∥ 𝐵)
24 opoe 16575 . . . . . . . . . 10 (((𝐴 ∈ ℤ ∧ ¬ 2 ∥ 𝐴) ∧ (𝐵 ∈ ℤ ∧ ¬ 2 ∥ 𝐵)) → 2 ∥ (𝐴 + 𝐵))
2519, 20, 22, 23, 24syl22anc 852 . . . . . . . . 9 ((𝜑 ∧ (¬ 2 ∥ 𝐴 ∧ ¬ 2 ∥ 𝐵)) → 2 ∥ (𝐴 + 𝐵))
2625ex 418 . . . . . . . 8 (𝜑 → ((¬ 2 ∥ 𝐴 ∧ ¬ 2 ∥ 𝐵) → 2 ∥ (𝐴 + 𝐵)))
2717, 26jaod 873 . . . . . . 7 (𝜑 → (((¬ 2 ∥ 𝐴 ∧ 2 ∥ 𝐴) ∨ (¬ 2 ∥ 𝐴 ∧ ¬ 2 ∥ 𝐵)) → 2 ∥ (𝐴 + 𝐵)))
28 2z 12767 . . . . . . . . . . 11 2 ∈ ℤ
2928a1i 11 . . . . . . . . . 10 ((𝜑 ∧ (2 ∥ 𝐵 ∧ 2 ∥ 𝐴)) → 2 ∈ ℤ)
3018adantr 486 . . . . . . . . . 10 ((𝜑 ∧ (2 ∥ 𝐵 ∧ 2 ∥ 𝐴)) → 𝐴 ∈ ℤ)
3121adantr 486 . . . . . . . . . 10 ((𝜑 ∧ (2 ∥ 𝐵 ∧ 2 ∥ 𝐴)) → 𝐵 ∈ ℤ)
32 simprr 785 . . . . . . . . . 10 ((𝜑 ∧ (2 ∥ 𝐵 ∧ 2 ∥ 𝐴)) → 2 ∥ 𝐴)
33 simprl 783 . . . . . . . . . 10 ((𝜑 ∧ (2 ∥ 𝐵 ∧ 2 ∥ 𝐴)) → 2 ∥ 𝐵)
3429, 30, 31, 32, 33dvds2addd 16504 . . . . . . . . 9 ((𝜑 ∧ (2 ∥ 𝐵 ∧ 2 ∥ 𝐴)) → 2 ∥ (𝐴 + 𝐵))
3534ex 418 . . . . . . . 8 (𝜑 → ((2 ∥ 𝐵 ∧ 2 ∥ 𝐴) → 2 ∥ (𝐴 + 𝐵)))
36 pm3.24 408 . . . . . . . . . 10 ¬ (2 ∥ 𝐵 ∧ ¬ 2 ∥ 𝐵)
3736pm2.21i 120 . . . . . . . . 9 ((2 ∥ 𝐵 ∧ ¬ 2 ∥ 𝐵) → 2 ∥ (𝐴 + 𝐵))
3837a1i 11 . . . . . . . 8 (𝜑 → ((2 ∥ 𝐵 ∧ ¬ 2 ∥ 𝐵) → 2 ∥ (𝐴 + 𝐵)))
3935, 38jaod 873 . . . . . . 7 (𝜑 → (((2 ∥ 𝐵 ∧ 2 ∥ 𝐴) ∨ (2 ∥ 𝐵 ∧ ¬ 2 ∥ 𝐵)) → 2 ∥ (𝐴 + 𝐵)))
4027, 39jaod 873 . . . . . 6 (𝜑 → ((((¬ 2 ∥ 𝐴 ∧ 2 ∥ 𝐴) ∨ (¬ 2 ∥ 𝐴 ∧ ¬ 2 ∥ 𝐵)) ∨ ((2 ∥ 𝐵 ∧ 2 ∥ 𝐴) ∨ (2 ∥ 𝐵 ∧ ¬ 2 ∥ 𝐵))) → 2 ∥ (𝐴 + 𝐵)))
4113, 40biimtrid 245 . . . . 5 (𝜑 → (((¬ 2 ∥ 𝐴 ∨ ¬ ¬ 2 ∥ 𝐵) ∧ (¬ ¬ 2 ∥ 𝐴 ∨ ¬ 2 ∥ 𝐵)) → 2 ∥ (𝐴 + 𝐵)))
424, 41biimtrid 245 . . . 4 (𝜑 → ((¬ (2 ∥ 𝐴 ∧ ¬ 2 ∥ 𝐵) ∧ ¬ (¬ 2 ∥ 𝐴 ∧ 2 ∥ 𝐵)) → 2 ∥ (𝐴 + 𝐵)))
431, 42biimtrid 245 . . 3 (𝜑 → (¬ ((2 ∥ 𝐴 ∧ ¬ 2 ∥ 𝐵) ∨ (¬ 2 ∥ 𝐴 ∧ 2 ∥ 𝐵)) → 2 ∥ (𝐴 + 𝐵)))
4443con1d 146 . 2 (𝜑 → (¬ 2 ∥ (𝐴 + 𝐵) → ((2 ∥ 𝐴 ∧ ¬ 2 ∥ 𝐵) ∨ (¬ 2 ∥ 𝐴 ∧ 2 ∥ 𝐵))))
4521adantr 486 . . . . . 6 ((𝜑 ∧ (2 ∥ 𝐴 ∧ ¬ 2 ∥ 𝐵)) → 𝐵 ∈ ℤ)
46 simprr 785 . . . . . 6 ((𝜑 ∧ (2 ∥ 𝐴 ∧ ¬ 2 ∥ 𝐵)) → ¬ 2 ∥ 𝐵)
4718adantr 486 . . . . . 6 ((𝜑 ∧ (2 ∥ 𝐴 ∧ ¬ 2 ∥ 𝐵)) → 𝐴 ∈ ℤ)
48 simprl 783 . . . . . 6 ((𝜑 ∧ (2 ∥ 𝐴 ∧ ¬ 2 ∥ 𝐵)) → 2 ∥ 𝐴)
49 opeo 16577 . . . . . 6 (((𝐵 ∈ ℤ ∧ ¬ 2 ∥ 𝐵) ∧ (𝐴 ∈ ℤ ∧ 2 ∥ 𝐴)) → ¬ 2 ∥ (𝐵 + 𝐴))
5045, 46, 47, 48, 49syl22anc 852 . . . . 5 ((𝜑 ∧ (2 ∥ 𝐴 ∧ ¬ 2 ∥ 𝐵)) → ¬ 2 ∥ (𝐵 + 𝐴))
5118zcnd 12843 . . . . . . . . 9 (𝜑 → 𝐴 ∈ ℂ)
5221zcnd 12843 . . . . . . . . 9 (𝜑 → 𝐵 ∈ ℂ)
5351, 52addcomd 11550 . . . . . . . 8 (𝜑 → (𝐴 + 𝐵) = (𝐵 + 𝐴))
5453breq2d 5119 . . . . . . 7 (𝜑 → (2 ∥ (𝐴 + 𝐵) ↔ 2 ∥ (𝐵 + 𝐴)))
5554notbid 321 . . . . . 6 (𝜑 → (¬ 2 ∥ (𝐴 + 𝐵) ↔ ¬ 2 ∥ (𝐵 + 𝐴)))
5655adantr 486 . . . . 5 ((𝜑 ∧ (2 ∥ 𝐴 ∧ ¬ 2 ∥ 𝐵)) → (¬ 2 ∥ (𝐴 + 𝐵) ↔ ¬ 2 ∥ (𝐵 + 𝐴)))
5750, 56mpbird 260 . . . 4 ((𝜑 ∧ (2 ∥ 𝐴 ∧ ¬ 2 ∥ 𝐵)) → ¬ 2 ∥ (𝐴 + 𝐵))
5857ex 418 . . 3 (𝜑 → ((2 ∥ 𝐴 ∧ ¬ 2 ∥ 𝐵) → ¬ 2 ∥ (𝐴 + 𝐵)))
5918adantr 486 . . . . 5 ((𝜑 ∧ (¬ 2 ∥ 𝐴 ∧ 2 ∥ 𝐵)) → 𝐴 ∈ ℤ)
60 simprl 783 . . . . 5 ((𝜑 ∧ (¬ 2 ∥ 𝐴 ∧ 2 ∥ 𝐵)) → ¬ 2 ∥ 𝐴)
6121adantr 486 . . . . 5 ((𝜑 ∧ (¬ 2 ∥ 𝐴 ∧ 2 ∥ 𝐵)) → 𝐵 ∈ ℤ)
62 simprr 785 . . . . 5 ((𝜑 ∧ (¬ 2 ∥ 𝐴 ∧ 2 ∥ 𝐵)) → 2 ∥ 𝐵)
63 opeo 16577 . . . . 5 (((𝐴 ∈ ℤ ∧ ¬ 2 ∥ 𝐴) ∧ (𝐵 ∈ ℤ ∧ 2 ∥ 𝐵)) → ¬ 2 ∥ (𝐴 + 𝐵))
6459, 60, 61, 62, 63syl22anc 852 . . . 4 ((𝜑 ∧ (¬ 2 ∥ 𝐴 ∧ 2 ∥ 𝐵)) → ¬ 2 ∥ (𝐴 + 𝐵))
6564ex 418 . . 3 (𝜑 → ((¬ 2 ∥ 𝐴 ∧ 2 ∥ 𝐵) → ¬ 2 ∥ (𝐴 + 𝐵)))
6658, 65jaod 873 . 2 (𝜑 → (((2 ∥ 𝐴 ∧ ¬ 2 ∥ 𝐵) ∨ (¬ 2 ∥ 𝐴 ∧ 2 ∥ 𝐵)) → ¬ 2 ∥ (𝐴 + 𝐵)))
6744, 66impbid 215 1 (𝜑 → (¬ 2 ∥ (𝐴 + 𝐵) ↔ ((2 ∥ 𝐴 ∧ ¬ 2 ∥ 𝐵) ∨ (¬ 2 ∥ 𝐴 ∧ 2 ∥ 𝐵))))
Colors of variables:    wff setvar class
This proof depends on syntax axioms:  ¬ wn 3   → wi 4   ↔ wb 209   ∧ wa 401   ∨ wo 861   ∈ wcel 2150   class class class wbr 5107  (class class class)co 7450   + caddc 11241  2c2 12436  ℤcz 12732   ∥ cdvds 16464
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 2152  ax-9 2160  ax-10 2183  ax-11 2200  ax-12 2219  ax-ext 2738  ax-sep 5254  ax-nul 5265  ax-pow 5333  ax-pr 5397  ax-un 7782  ax-resscn 11295  ax-1cn 11296  ax-icn 11297  ax-addcl 11298  ax-addrcl 11299  ax-mulcl 11300  ax-mulrcl 11301  ax-mulcom 11302  ax-addass 11303  ax-mulass 11304  ax-distr 11305  ax-i2m1 11306  ax-1ne0 11307  ax-1rid 11308  ax-rnegex 11309  ax-rrecex 11310  ax-cnre 11311  ax-pre-lttri 11312  ax-pre-lttrn 11313  ax-pre-ltadd 11314  ax-pre-mulgt0 11315
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 2104  df-mo 2570  df-eu 2600  df-clab 2745  df-cleq 2758  df-clel 2842  df-nfc 2916  df-ne 2963  df-nel 3069  df-ral 3084  df-rex 3094  df-rmo 3368  df-reu 3369  df-rab 3416  df-v 3455  df-sbc 3742  df-csb 3851  df-ss 3900  df-pss 4016  df-dif 4049  df-in 4093  df-un 4153  df-nul 4281  df-if 4485  df-pw 4561  df-sn 4588  df-pr 4590  df-op 4840  df-uni 4872  df-iun 4957  df-br 5108  df-opab 5173  df-mpt 5192  df-tr 5218  df-id 5552  df-eprel 5557  df-po 5565  df-so 5566  df-fr 5610  df-we 5612  df-xp 5663  df-rel 5664  df-cnv 5665  df-co 5666  df-dm 5667  df-rn 5668  df-res 5669  df-ima 5670  df-pred 6329  df-ord 6390  df-on 6391  df-lim 6392  df-suc 6393  df-iota 6519  df-fun 6567  df-fn 6568  df-f 6569  df-f1 6570  df-fo 6571  df-f1o 6572  df-fv 6573  df-riota 7407  df-ov 7453  df-oprab 7454  df-mpo 7455  df-om 7911  df-2nd 8035  df-frecs 8336  df-wrecs 8367  df-recs 8416  df-rdg 8455  df-er 8754  df-en 9011  df-dom 9012  df-sdom 9013  df-pnf 11383  df-mnf 11384  df-xr 11385  df-ltxr 11386  df-le 11387  df-sub 11581  df-neg 11582  df-div 12013  df-nn 12375  df-2 12444  df-n0 12646  df-z 12733  df-dvds 16465
This theorem is used by:  flt3lemD  49918  flt3lem5c  49927
  Copyright terms: Public domain W3C validator