Metamath Proof Explorer


Definition df-if

Description: Definition of the conditional operator for classes. The expression if ( ph , A , B ) is read "if ph then A else B ". See iftrue and iffalse 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 . (Contributed by NM, 15-May-1999)

Ref Expression
Assertion df-if ifφAB=x|xAφxB¬φ

Detailed syntax breakdown

Step Hyp Ref Expression
0 wph wffφ
1 cA classA
2 cB classB
3 0 1 2 cif classifφAB
4 vx setvarx
5 4 cv setvarx
6 5 1 wcel wffxA
7 6 0 wa wffxAφ
8 5 2 wcel wffxB
9 0 wn wff¬φ
10 8 9 wa wffxB¬φ
11 7 10 wo wffxAφxB¬φ
12 11 4 cab classx|xAφxB¬φ
13 3 12 wceq wffifφAB=x|xAφxB¬φ