Users' Mathboxes Mathbox for Thierry Arnoux < Previous   Next >
Nearby theorems
Mirrors  >  Home  >  MPE Home  >  Th. List  >   Mathboxes  >  ifeq3da Structured version   Visualization version   GIF version

Theorem ifeq3da 33184
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.)
Hypotheses
Ref Expression
ifeq3da.1 (if(𝜓, 𝐸, 𝐹) = 𝐸 → 𝐶 = 𝐺)
ifeq3da.2 (if(𝜓, 𝐸, 𝐹) = 𝐹 → 𝐶 = 𝐻)
ifeq3da.3 (𝜑 → 𝐺 = 𝐴)
ifeq3da.4 (𝜑 → 𝐻 = 𝐵)
Assertion
Ref Expression
ifeq3da (𝜑 → if(𝜓, 𝐴, 𝐵) = 𝐶)

Proof of Theorem ifeq3da
StepHypRef Expression
1 iftrue 4487 . . . . 5 (𝜓 → if(𝜓, 𝐸, 𝐹) = 𝐸)
2 ifeq3da.1 . . . . 5 (if(𝜓, 𝐸, 𝐹) = 𝐸 → 𝐶 = 𝐺)
31, 2syl 18 . . . 4 (𝜓 → 𝐶 = 𝐺)
43adantl 487 . . 3 ((𝜑 ∧ 𝜓) → 𝐶 = 𝐺)
5 ifeq3da.3 . . . 4 (𝜑 → 𝐺 = 𝐴)
65adantr 486 . . 3 ((𝜑 ∧ 𝜓) → 𝐺 = 𝐴)
74, 6eqtr2d 2796 . 2 ((𝜑 ∧ 𝜓) → 𝐴 = 𝐶)
8 iffalse 4490 . . . . 5 (¬ 𝜓 → if(𝜓, 𝐸, 𝐹) = 𝐹)
9 ifeq3da.2 . . . . 5 (if(𝜓, 𝐸, 𝐹) = 𝐹 → 𝐶 = 𝐻)
108, 9syl 18 . . . 4 (¬ 𝜓 → 𝐶 = 𝐻)
1110adantl 487 . . 3 ((𝜑 ∧ ¬ 𝜓) → 𝐶 = 𝐻)
12 ifeq3da.4 . . . 4 (𝜑 → 𝐻 = 𝐵)
1312adantr 486 . . 3 ((𝜑 ∧ ¬ 𝜓) → 𝐻 = 𝐵)
1411, 13eqtr2d 2796 . 2 ((𝜑 ∧ ¬ 𝜓) → 𝐵 = 𝐶)
157, 14ifeqda 4518 1 (𝜑 → if(𝜓, 𝐴, 𝐵) = 𝐶)
Colors of variables:    wff setvar class
This proof depends on syntax axioms:  ¬ wn 3   → wi 4   ∧ wa 401   = wceq 1569  ifcif 4481
This proof depends on axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1827  ax-4 1841  ax-5 1942  ax-6 1999  ax-7 2040  ax-8 2146  ax-9 2154  ax-ext 2732
This proof depends on definitions:  df-bi 210  df-an 402  df-or 862  df-ex 1812  df-sb 2099  df-clab 2739  df-cleq 2752  df-clel 2835  df-if 4482
This theorem is used by:  circlemeth  35311
  Copyright terms: Public domain W3C validator