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

Theorem partfun 6694
Description: Rewrite a function defined by parts, using a mapping and an if construct, into a union of functions on disjoint domains. (Contributed by Thierry Arnoux, 30-Mar-2017.)
Assertion
Ref Expression
partfun (𝑥 ∈ 𝐴 ↦ if(𝑥 ∈ 𝐵, 𝐶, 𝐷)) = ((𝑥 ∈ (𝐴 ∩ 𝐵) ↦ 𝐶) ∪ (𝑥 ∈ (𝐴 ∖ 𝐵) ↦ 𝐷))

Proof of Theorem partfun
StepHypRef Expression
1 mptun 6693 . 2 (𝑥 ∈ ((𝐴 ∩ 𝐵) ∪ (𝐴 ∖ 𝐵)) ↦ if(𝑥 ∈ 𝐵, 𝐶, 𝐷)) = ((𝑥 ∈ (𝐴 ∩ 𝐵) ↦ if(𝑥 ∈ 𝐵, 𝐶, 𝐷)) ∪ (𝑥 ∈ (𝐴 ∖ 𝐵) ↦ if(𝑥 ∈ 𝐵, 𝐶, 𝐷)))
2 inundif 4437 . . 3 ((𝐴 ∩ 𝐵) ∪ (𝐴 ∖ 𝐵)) = 𝐴
3 eqid 2763 . . 3 if(𝑥 ∈ 𝐵, 𝐶, 𝐷) = if(𝑥 ∈ 𝐵, 𝐶, 𝐷)
42, 3mpteq12i 5204 . 2 (𝑥 ∈ ((𝐴 ∩ 𝐵) ∪ (𝐴 ∖ 𝐵)) ↦ if(𝑥 ∈ 𝐵, 𝐶, 𝐷)) = (𝑥 ∈ 𝐴 ↦ if(𝑥 ∈ 𝐵, 𝐶, 𝐷))
5 elinel2 4101 . . . . 5 (𝑥 ∈ (𝐴 ∩ 𝐵) → 𝑥 ∈ 𝐵)
65iftrued 4492 . . . 4 (𝑥 ∈ (𝐴 ∩ 𝐵) → if(𝑥 ∈ 𝐵, 𝐶, 𝐷) = 𝐶)
76mpteq2ia 5202 . . 3 (𝑥 ∈ (𝐴 ∩ 𝐵) ↦ if(𝑥 ∈ 𝐵, 𝐶, 𝐷)) = (𝑥 ∈ (𝐴 ∩ 𝐵) ↦ 𝐶)
8 eldifn 4070 . . . . 5 (𝑥 ∈ (𝐴 ∖ 𝐵) → ¬ 𝑥 ∈ 𝐵)
98iffalsed 4495 . . . 4 (𝑥 ∈ (𝐴 ∖ 𝐵) → if(𝑥 ∈ 𝐵, 𝐶, 𝐷) = 𝐷)
109mpteq2ia 5202 . . 3 (𝑥 ∈ (𝐴 ∖ 𝐵) ↦ if(𝑥 ∈ 𝐵, 𝐶, 𝐷)) = (𝑥 ∈ (𝐴 ∖ 𝐵) ↦ 𝐷)
117, 10uneq12i 4167 . 2 ((𝑥 ∈ (𝐴 ∩ 𝐵) ↦ if(𝑥 ∈ 𝐵, 𝐶, 𝐷)) ∪ (𝑥 ∈ (𝐴 ∖ 𝐵) ↦ if(𝑥 ∈ 𝐵, 𝐶, 𝐷))) = ((𝑥 ∈ (𝐴 ∩ 𝐵) ↦ 𝐶) ∪ (𝑥 ∈ (𝐴 ∖ 𝐵) ↦ 𝐷))
121, 4, 113eqtr3i 2794 1 (𝑥 ∈ 𝐴 ↦ if(𝑥 ∈ 𝐵, 𝐶, 𝐷)) = ((𝑥 ∈ (𝐴 ∩ 𝐵) ↦ 𝐶) ∪ (𝑥 ∈ (𝐴 ∖ 𝐵) ↦ 𝐷))
Colors of variables:    wff setvar class
This proof depends on syntax axioms:   = wceq 1569   ∈ wcel 2146   ∖ cdif 4047   ∩ cin 4091   ∪ cun 4151  ifcif 4484   ↦ cmpt 5188
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 1944  ax-6 2001  ax-7 2042  ax-8 2148  ax-9 2156  ax-ext 2735
This proof depends on definitions:  df-bi 210  df-an 402  df-or 862  df-tru 1572  df-ex 1812  df-sb 2101  df-clab 2742  df-cleq 2755  df-clel 2838  df-v 3455  df-dif 4049  df-in 4093  df-un 4153  df-if 4485  df-opab 5170  df-mpt 5189
This theorem is used by:  partfun2  33324  mptiffisupp  33340  mptprop  33345  cycpm2tr  33733  redvmptabs  43551  fsuppssindlem2  43760
  Copyright terms: Public domain W3C validator