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 40671
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 1513 . 2 ((𝜑𝜓) ↔ ((𝜑𝜓) ∧ ¬ (𝜑𝜓)))
2 ifpdfor 40649 . . 3 ((𝜑𝜓) ↔ if-(𝜑, ⊤, 𝜓))
3 ifpnot23 40662 . . . 4 (¬ if-(𝜑, 𝜓, ⊥) ↔ if-(𝜑, ¬ 𝜓, ¬ ⊥))
4 ifpdfan 40650 . . . 4 ((𝜑𝜓) ↔ if-(𝜑, 𝜓, ⊥))
53, 4xchnxbir 336 . . 3 (¬ (𝜑𝜓) ↔ if-(𝜑, ¬ 𝜓, ¬ ⊥))
62, 5anbi12i 630 . 2 (((𝜑𝜓) ∧ ¬ (𝜑𝜓)) ↔ (if-(𝜑, ⊤, 𝜓) ∧ if-(𝜑, ¬ 𝜓, ¬ ⊥)))
7 ifpan23 40644 . . 3 ((if-(𝜑, ⊤, 𝜓) ∧ if-(𝜑, ¬ 𝜓, ¬ ⊥)) ↔ if-(𝜑, (⊤ ∧ ¬ 𝜓), (𝜓 ∧ ¬ ⊥)))
8 truan 1553 . . . 4 ((⊤ ∧ ¬ 𝜓) ↔ ¬ 𝜓)
9 fal 1556 . . . . . 6 ¬ ⊥
109biantru 533 . . . . 5 (𝜓 ↔ (𝜓 ∧ ¬ ⊥))
1110bicomi 227 . . . 4 ((𝜓 ∧ ¬ ⊥) ↔ 𝜓)
12 ifpbi23 40657 . . . 4 ((((⊤ ∧ ¬ 𝜓) ↔ ¬ 𝜓) ∧ ((𝜓 ∧ ¬ ⊥) ↔ 𝜓)) → (if-(𝜑, (⊤ ∧ ¬ 𝜓), (𝜓 ∧ ¬ ⊥)) ↔ if-(𝜑, ¬ 𝜓, 𝜓)))
138, 11, 12mp2an 692 . . 3 (if-(𝜑, (⊤ ∧ ¬ 𝜓), (𝜓 ∧ ¬ ⊥)) ↔ if-(𝜑, ¬ 𝜓, 𝜓))
147, 13bitri 278 . 2 ((if-(𝜑, ⊤, 𝜓) ∧ if-(𝜑, ¬ 𝜓, ¬ ⊥)) ↔ if-(𝜑, ¬ 𝜓, 𝜓))
151, 6, 143bitri 300 1 ((𝜑𝜓) ↔ if-(𝜑, ¬ 𝜓, 𝜓))
Colors of variables: wff setvar class
Syntax hints:  ¬ wn 3  wb 209  wa 399  wo 846  if-wif 1062  wxo 1506  wtru 1543  wfal 1554
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 210  df-an 400  df-or 847  df-ifp 1063  df-xor 1507  df-tru 1545  df-fal 1555
This theorem is referenced by: (None)
  Copyright terms: Public domain W3C validator