Users' Mathboxes Mathbox for Richard Penner < Previous   Next >
Nearby theorems
Mirrors  >  Home  >  MPE Home  >  Th. List  >   Mathboxes  >  ifpdfxor Structured version   Visualization version   GIF version

Theorem ifpdfxor 39846
Description: Define xor as conditional logic operator. (Contributed by RP, 20-Apr-2020.)
Assertion
Ref Expression
ifpdfxor ((𝜑𝜓) ↔ if-(𝜑, ¬ 𝜓, 𝜓))

Proof of Theorem ifpdfxor
StepHypRef Expression
1 xor2 1506 . 2 ((𝜑𝜓) ↔ ((𝜑𝜓) ∧ ¬ (𝜑𝜓)))
2 ifpdfor 39823 . . 3 ((𝜑𝜓) ↔ if-(𝜑, ⊤, 𝜓))
3 ifpnot23 39837 . . . 4 (¬ if-(𝜑, 𝜓, ⊥) ↔ if-(𝜑, ¬ 𝜓, ¬ ⊥))
4 ifpdfan 39824 . . . 4 ((𝜑𝜓) ↔ if-(𝜑, 𝜓, ⊥))
53, 4xchnxbir 335 . . 3 (¬ (𝜑𝜓) ↔ if-(𝜑, ¬ 𝜓, ¬ ⊥))
62, 5anbi12i 628 . 2 (((𝜑𝜓) ∧ ¬ (𝜑𝜓)) ↔ (if-(𝜑, ⊤, 𝜓) ∧ if-(𝜑, ¬ 𝜓, ¬ ⊥)))
7 ifpan23 39818 . . 3 ((if-(𝜑, ⊤, 𝜓) ∧ if-(𝜑, ¬ 𝜓, ¬ ⊥)) ↔ if-(𝜑, (⊤ ∧ ¬ 𝜓), (𝜓 ∧ ¬ ⊥)))
8 truan 1544 . . . 4 ((⊤ ∧ ¬ 𝜓) ↔ ¬ 𝜓)
9 fal 1547 . . . . . 6 ¬ ⊥
109biantru 532 . . . . 5 (𝜓 ↔ (𝜓 ∧ ¬ ⊥))
1110bicomi 226 . . . 4 ((𝜓 ∧ ¬ ⊥) ↔ 𝜓)
12 ifpbi23 39831 . . . 4 ((((⊤ ∧ ¬ 𝜓) ↔ ¬ 𝜓) ∧ ((𝜓 ∧ ¬ ⊥) ↔ 𝜓)) → (if-(𝜑, (⊤ ∧ ¬ 𝜓), (𝜓 ∧ ¬ ⊥)) ↔ if-(𝜑, ¬ 𝜓, 𝜓)))
138, 11, 12mp2an 690 . . 3 (if-(𝜑, (⊤ ∧ ¬ 𝜓), (𝜓 ∧ ¬ ⊥)) ↔ if-(𝜑, ¬ 𝜓, 𝜓))
147, 13bitri 277 . 2 ((if-(𝜑, ⊤, 𝜓) ∧ if-(𝜑, ¬ 𝜓, ¬ ⊥)) ↔ if-(𝜑, ¬ 𝜓, 𝜓))
151, 6, 143bitri 299 1 ((𝜑𝜓) ↔ if-(𝜑, ¬ 𝜓, 𝜓))
Colors of variables: wff setvar class
Syntax hints:  ¬ wn 3  wb 208  wa 398  wo 843  if-wif 1057  wxo 1500  wtru 1534  wfal 1545
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8
This theorem depends on definitions:  df-bi 209  df-an 399  df-or 844  df-ifp 1058  df-xor 1501  df-tru 1536  df-fal 1546
This theorem is referenced by: (None)
  Copyright terms: Public domain W3C validator