| Mathbox for Thierry Arnoux | 
      
      
      < Previous  
      Next >
      
       Nearby theorems  | 
  ||
| Mirrors > Home > MPE Home > Th. List > Mathboxes > ifeq3da | Structured version Visualization version GIF version | ||
| Description: Given an expression 𝐶 containing if(𝜓, 𝐸, 𝐹), substitute (hypotheses .1 and .2) and evaluate (hypotheses .3 and .4) it for both cases at the same time. (Contributed by Thierry Arnoux, 13-Dec-2021.) | 
| Ref | Expression | 
|---|---|
| ifeq3da.1 | ⊢ (if(𝜓, 𝐸, 𝐹) = 𝐸 → 𝐶 = 𝐺) | 
| ifeq3da.2 | ⊢ (if(𝜓, 𝐸, 𝐹) = 𝐹 → 𝐶 = 𝐻) | 
| ifeq3da.3 | ⊢ (𝜑 → 𝐺 = 𝐴) | 
| ifeq3da.4 | ⊢ (𝜑 → 𝐻 = 𝐵) | 
| Ref | Expression | 
|---|---|
| ifeq3da | ⊢ (𝜑 → if(𝜓, 𝐴, 𝐵) = 𝐶) | 
| Step | Hyp | Ref | Expression | 
|---|---|---|---|
| 1 | iftrue 4513 | . . . . 5 ⊢ (𝜓 → if(𝜓, 𝐸, 𝐹) = 𝐸) | |
| 2 | ifeq3da.1 | . . . . 5 ⊢ (if(𝜓, 𝐸, 𝐹) = 𝐸 → 𝐶 = 𝐺) | |
| 3 | 1, 2 | syl 17 | . . . 4 ⊢ (𝜓 → 𝐶 = 𝐺) | 
| 4 | 3 | adantl 481 | . . 3 ⊢ ((𝜑 ∧ 𝜓) → 𝐶 = 𝐺) | 
| 5 | ifeq3da.3 | . . . 4 ⊢ (𝜑 → 𝐺 = 𝐴) | |
| 6 | 5 | adantr 480 | . . 3 ⊢ ((𝜑 ∧ 𝜓) → 𝐺 = 𝐴) | 
| 7 | 4, 6 | eqtr2d 2770 | . 2 ⊢ ((𝜑 ∧ 𝜓) → 𝐴 = 𝐶) | 
| 8 | iffalse 4516 | . . . . 5 ⊢ (¬ 𝜓 → if(𝜓, 𝐸, 𝐹) = 𝐹) | |
| 9 | ifeq3da.2 | . . . . 5 ⊢ (if(𝜓, 𝐸, 𝐹) = 𝐹 → 𝐶 = 𝐻) | |
| 10 | 8, 9 | syl 17 | . . . 4 ⊢ (¬ 𝜓 → 𝐶 = 𝐻) | 
| 11 | 10 | adantl 481 | . . 3 ⊢ ((𝜑 ∧ ¬ 𝜓) → 𝐶 = 𝐻) | 
| 12 | ifeq3da.4 | . . . 4 ⊢ (𝜑 → 𝐻 = 𝐵) | |
| 13 | 12 | adantr 480 | . . 3 ⊢ ((𝜑 ∧ ¬ 𝜓) → 𝐻 = 𝐵) | 
| 14 | 11, 13 | eqtr2d 2770 | . 2 ⊢ ((𝜑 ∧ ¬ 𝜓) → 𝐵 = 𝐶) | 
| 15 | 7, 14 | ifeqda 4544 | 1 ⊢ (𝜑 → if(𝜓, 𝐴, 𝐵) = 𝐶) | 
| Colors of variables: wff setvar class | 
| Syntax hints: ¬ wn 3 → wi 4 ∧ wa 395 = wceq 1539 ifcif 4507 | 
| This theorem was proved from axioms: ax-mp 5 ax-1 6 ax-2 7 ax-3 8 ax-gen 1794 ax-4 1808 ax-5 1909 ax-6 1966 ax-7 2006 ax-8 2109 ax-9 2117 ax-ext 2706 | 
| This theorem depends on definitions: df-bi 207 df-an 396 df-or 848 df-ex 1779 df-sb 2064 df-clab 2713 df-cleq 2726 df-clel 2808 df-if 4508 | 
| This theorem is referenced by: circlemeth 34592 | 
| Copyright terms: Public domain | W3C validator |