Description: Distribute a function over an if-clause. (Contributed by Mario Carneiro, 14-Aug-2013)
Ref | Expression | ||
---|---|---|---|
Hypotheses | ifsb.1 | ⊢ ( if ( 𝜑 , 𝐴 , 𝐵 ) = 𝐴 → 𝐶 = 𝐷 ) | |
ifsb.2 | ⊢ ( if ( 𝜑 , 𝐴 , 𝐵 ) = 𝐵 → 𝐶 = 𝐸 ) | ||
Assertion | ifsb | ⊢ 𝐶 = if ( 𝜑 , 𝐷 , 𝐸 ) |
Step | Hyp | Ref | Expression |
---|---|---|---|
1 | ifsb.1 | ⊢ ( if ( 𝜑 , 𝐴 , 𝐵 ) = 𝐴 → 𝐶 = 𝐷 ) | |
2 | ifsb.2 | ⊢ ( if ( 𝜑 , 𝐴 , 𝐵 ) = 𝐵 → 𝐶 = 𝐸 ) | |
3 | iftrue | ⊢ ( 𝜑 → if ( 𝜑 , 𝐴 , 𝐵 ) = 𝐴 ) | |
4 | 3 1 | syl | ⊢ ( 𝜑 → 𝐶 = 𝐷 ) |
5 | iftrue | ⊢ ( 𝜑 → if ( 𝜑 , 𝐷 , 𝐸 ) = 𝐷 ) | |
6 | 4 5 | eqtr4d | ⊢ ( 𝜑 → 𝐶 = if ( 𝜑 , 𝐷 , 𝐸 ) ) |
7 | iffalse | ⊢ ( ¬ 𝜑 → if ( 𝜑 , 𝐴 , 𝐵 ) = 𝐵 ) | |
8 | 7 2 | syl | ⊢ ( ¬ 𝜑 → 𝐶 = 𝐸 ) |
9 | iffalse | ⊢ ( ¬ 𝜑 → if ( 𝜑 , 𝐷 , 𝐸 ) = 𝐸 ) | |
10 | 8 9 | eqtr4d | ⊢ ( ¬ 𝜑 → 𝐶 = if ( 𝜑 , 𝐷 , 𝐸 ) ) |
11 | 6 10 | pm2.61i | ⊢ 𝐶 = if ( 𝜑 , 𝐷 , 𝐸 ) |