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 40992
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 1510 . 2 ((𝜑𝜓) ↔ ((𝜑𝜓) ∧ ¬ (𝜑𝜓)))
2 ifpdfor 40970 . . 3 ((𝜑𝜓) ↔ if-(𝜑, ⊤, 𝜓))
3 ifpnot23 40983 . . . 4 (¬ if-(𝜑, 𝜓, ⊥) ↔ if-(𝜑, ¬ 𝜓, ¬ ⊥))
4 ifpdfan 40971 . . . 4 ((𝜑𝜓) ↔ if-(𝜑, 𝜓, ⊥))
53, 4xchnxbir 332 . . 3 (¬ (𝜑𝜓) ↔ if-(𝜑, ¬ 𝜓, ¬ ⊥))
62, 5anbi12i 626 . 2 (((𝜑𝜓) ∧ ¬ (𝜑𝜓)) ↔ (if-(𝜑, ⊤, 𝜓) ∧ if-(𝜑, ¬ 𝜓, ¬ ⊥)))
7 ifpan23 40965 . . 3 ((if-(𝜑, ⊤, 𝜓) ∧ if-(𝜑, ¬ 𝜓, ¬ ⊥)) ↔ if-(𝜑, (⊤ ∧ ¬ 𝜓), (𝜓 ∧ ¬ ⊥)))
8 truan 1550 . . . 4 ((⊤ ∧ ¬ 𝜓) ↔ ¬ 𝜓)
9 fal 1553 . . . . . 6 ¬ ⊥
109biantru 529 . . . . 5 (𝜓 ↔ (𝜓 ∧ ¬ ⊥))
1110bicomi 223 . . . 4 ((𝜓 ∧ ¬ ⊥) ↔ 𝜓)
12 ifpbi23 40978 . . . 4 ((((⊤ ∧ ¬ 𝜓) ↔ ¬ 𝜓) ∧ ((𝜓 ∧ ¬ ⊥) ↔ 𝜓)) → (if-(𝜑, (⊤ ∧ ¬ 𝜓), (𝜓 ∧ ¬ ⊥)) ↔ if-(𝜑, ¬ 𝜓, 𝜓)))
138, 11, 12mp2an 688 . . 3 (if-(𝜑, (⊤ ∧ ¬ 𝜓), (𝜓 ∧ ¬ ⊥)) ↔ if-(𝜑, ¬ 𝜓, 𝜓))
147, 13bitri 274 . 2 ((if-(𝜑, ⊤, 𝜓) ∧ if-(𝜑, ¬ 𝜓, ¬ ⊥)) ↔ if-(𝜑, ¬ 𝜓, 𝜓))
151, 6, 143bitri 296 1 ((𝜑𝜓) ↔ if-(𝜑, ¬ 𝜓, 𝜓))
Colors of variables: wff setvar class
Syntax hints:  ¬ wn 3  wb 205  wa 395  wo 843  if-wif 1059  wxo 1503  wtru 1540  wfal 1551
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 206  df-an 396  df-or 844  df-ifp 1060  df-xor 1504  df-tru 1542  df-fal 1552
This theorem is referenced by: (None)
  Copyright terms: Public domain W3C validator