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

Definition df-if 4488
Description: Definition of the conditional operator for classes. The expression if(𝜑, 𝐴, 𝐵) is read "if 𝜑 then 𝐴 else 𝐵". See iftrue 4493 and iffalse 4496 for its values. In the mathematical literature, this operator is rarely defined formally but is implicit in informal definitions such as "let f(x)=0 if x=0 and 1/x otherwise".

An important use for us is in conjunction with the weak deduction theorem, which is described in the next section, beginning at dedth 4546. (Contributed by NM, 15-May-1999.)

Assertion
Ref Expression
df-if if(𝜑, 𝐴, 𝐵) = {𝑥 ∣ ((𝑥 ∈ 𝐴 ∧ 𝜑) ∨ (𝑥 ∈ 𝐵 ∧ ¬ 𝜑))}
Distinct variable groups:   𝜑,𝑥   𝑥,𝐴   𝑥,𝐵

Detailed syntax breakdown of Definition df-if
StepHypRef Expression
1 wph . . 3 wff 𝜑
2 cA . . 3 class 𝐴
3 cB . . 3 class 𝐵
41, 2, 3cif 4487 . 2 class if(𝜑, 𝐴, 𝐵)
5 vx . . . . . . 7 setvar 𝑥
65cv 1571 . . . . . 6 class 𝑥
76, 2wcel 2151 . . . . 5 wff 𝑥 ∈ 𝐴
87, 1wa 401 . . . 4 wff (𝑥 ∈ 𝐴 ∧ 𝜑)
96, 3wcel 2151 . . . . 5 wff 𝑥 ∈ 𝐵
101wn 3 . . . . 5 wff ¬ 𝜑
119, 10wa 401 . . . 4 wff (𝑥 ∈ 𝐵 ∧ ¬ 𝜑)
128, 11wo 861 . . 3 wff ((𝑥 ∈ 𝐴 ∧ 𝜑) ∨ (𝑥 ∈ 𝐵 ∧ ¬ 𝜑))
1312, 5cab 2747 . 2 class {𝑥 ∣ ((𝑥 ∈ 𝐴 ∧ 𝜑) ∨ (𝑥 ∈ 𝐵 ∧ ¬ 𝜑))}
144, 13wceq 1572 1 wff if(𝜑, 𝐴, 𝐵) = {𝑥 ∣ ((𝑥 ∈ 𝐴 ∧ 𝜑) ∨ (𝑥 ∈ 𝐵 ∧ ¬ 𝜑))}
Colors of variables:    wff setvar class
This definition is used by:  dfif2  4489  dfif6  4490  iffalse  4496  rabsnifsb  4687  bj-df-ifc  37684
  Copyright terms: Public domain W3C validator