Metamath Proof Explorer


Theorem partfun

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)

Ref Expression
Assertion partfun xAifxBCD=xABCxABD

Proof

Step Hyp Ref Expression
1 mptun xABABifxBCD=xABifxBCDxABifxBCD
2 inundif ABAB=A
3 eqid ifxBCD=ifxBCD
4 2 3 mpteq12i xABABifxBCD=xAifxBCD
5 elinel2 xABxB
6 5 iftrued xABifxBCD=C
7 6 mpteq2ia xABifxBCD=xABC
8 eldifn xAB¬xB
9 8 iffalsed xABifxBCD=D
10 9 mpteq2ia xABifxBCD=xABD
11 7 10 uneq12i xABifxBCDxABifxBCD=xABCxABD
12 1 4 11 3eqtr3i xAifxBCD=xABCxABD