Metamath Proof Explorer


Theorem resasplit

Description: If two functions agree on their common domain, express their union as a union of three functions with pairwise disjoint domains. (Contributed by Stefan O'Rear, 9-Oct-2014)

Ref Expression
Assertion resasplit ( ( 𝐹 Fn 𝐴𝐺 Fn 𝐵 ∧ ( 𝐹 ↾ ( 𝐴𝐵 ) ) = ( 𝐺 ↾ ( 𝐴𝐵 ) ) ) → ( 𝐹𝐺 ) = ( ( 𝐹 ↾ ( 𝐴𝐵 ) ) ∪ ( ( 𝐹 ↾ ( 𝐴𝐵 ) ) ∪ ( 𝐺 ↾ ( 𝐵𝐴 ) ) ) ) )

Proof

Step Hyp Ref Expression
1 fnresdm ( 𝐹 Fn 𝐴 → ( 𝐹𝐴 ) = 𝐹 )
2 fnresdm ( 𝐺 Fn 𝐵 → ( 𝐺𝐵 ) = 𝐺 )
3 uneq12 ( ( ( 𝐹𝐴 ) = 𝐹 ∧ ( 𝐺𝐵 ) = 𝐺 ) → ( ( 𝐹𝐴 ) ∪ ( 𝐺𝐵 ) ) = ( 𝐹𝐺 ) )
4 1 2 3 syl2an ( ( 𝐹 Fn 𝐴𝐺 Fn 𝐵 ) → ( ( 𝐹𝐴 ) ∪ ( 𝐺𝐵 ) ) = ( 𝐹𝐺 ) )
5 4 3adant3 ( ( 𝐹 Fn 𝐴𝐺 Fn 𝐵 ∧ ( 𝐹 ↾ ( 𝐴𝐵 ) ) = ( 𝐺 ↾ ( 𝐴𝐵 ) ) ) → ( ( 𝐹𝐴 ) ∪ ( 𝐺𝐵 ) ) = ( 𝐹𝐺 ) )
6 inundif ( ( 𝐴𝐵 ) ∪ ( 𝐴𝐵 ) ) = 𝐴
7 6 reseq2i ( 𝐹 ↾ ( ( 𝐴𝐵 ) ∪ ( 𝐴𝐵 ) ) ) = ( 𝐹𝐴 )
8 resundi ( 𝐹 ↾ ( ( 𝐴𝐵 ) ∪ ( 𝐴𝐵 ) ) ) = ( ( 𝐹 ↾ ( 𝐴𝐵 ) ) ∪ ( 𝐹 ↾ ( 𝐴𝐵 ) ) )
9 7 8 eqtr3i ( 𝐹𝐴 ) = ( ( 𝐹 ↾ ( 𝐴𝐵 ) ) ∪ ( 𝐹 ↾ ( 𝐴𝐵 ) ) )
10 incom ( 𝐴𝐵 ) = ( 𝐵𝐴 )
11 10 uneq1i ( ( 𝐴𝐵 ) ∪ ( 𝐵𝐴 ) ) = ( ( 𝐵𝐴 ) ∪ ( 𝐵𝐴 ) )
12 inundif ( ( 𝐵𝐴 ) ∪ ( 𝐵𝐴 ) ) = 𝐵
13 11 12 eqtri ( ( 𝐴𝐵 ) ∪ ( 𝐵𝐴 ) ) = 𝐵
14 13 reseq2i ( 𝐺 ↾ ( ( 𝐴𝐵 ) ∪ ( 𝐵𝐴 ) ) ) = ( 𝐺𝐵 )
15 resundi ( 𝐺 ↾ ( ( 𝐴𝐵 ) ∪ ( 𝐵𝐴 ) ) ) = ( ( 𝐺 ↾ ( 𝐴𝐵 ) ) ∪ ( 𝐺 ↾ ( 𝐵𝐴 ) ) )
16 14 15 eqtr3i ( 𝐺𝐵 ) = ( ( 𝐺 ↾ ( 𝐴𝐵 ) ) ∪ ( 𝐺 ↾ ( 𝐵𝐴 ) ) )
17 9 16 uneq12i ( ( 𝐹𝐴 ) ∪ ( 𝐺𝐵 ) ) = ( ( ( 𝐹 ↾ ( 𝐴𝐵 ) ) ∪ ( 𝐹 ↾ ( 𝐴𝐵 ) ) ) ∪ ( ( 𝐺 ↾ ( 𝐴𝐵 ) ) ∪ ( 𝐺 ↾ ( 𝐵𝐴 ) ) ) )
18 simp3 ( ( 𝐹 Fn 𝐴𝐺 Fn 𝐵 ∧ ( 𝐹 ↾ ( 𝐴𝐵 ) ) = ( 𝐺 ↾ ( 𝐴𝐵 ) ) ) → ( 𝐹 ↾ ( 𝐴𝐵 ) ) = ( 𝐺 ↾ ( 𝐴𝐵 ) ) )
19 18 uneq1d ( ( 𝐹 Fn 𝐴𝐺 Fn 𝐵 ∧ ( 𝐹 ↾ ( 𝐴𝐵 ) ) = ( 𝐺 ↾ ( 𝐴𝐵 ) ) ) → ( ( 𝐹 ↾ ( 𝐴𝐵 ) ) ∪ ( 𝐺 ↾ ( 𝐵𝐴 ) ) ) = ( ( 𝐺 ↾ ( 𝐴𝐵 ) ) ∪ ( 𝐺 ↾ ( 𝐵𝐴 ) ) ) )
20 19 uneq2d ( ( 𝐹 Fn 𝐴𝐺 Fn 𝐵 ∧ ( 𝐹 ↾ ( 𝐴𝐵 ) ) = ( 𝐺 ↾ ( 𝐴𝐵 ) ) ) → ( ( ( 𝐹 ↾ ( 𝐴𝐵 ) ) ∪ ( 𝐹 ↾ ( 𝐴𝐵 ) ) ) ∪ ( ( 𝐹 ↾ ( 𝐴𝐵 ) ) ∪ ( 𝐺 ↾ ( 𝐵𝐴 ) ) ) ) = ( ( ( 𝐹 ↾ ( 𝐴𝐵 ) ) ∪ ( 𝐹 ↾ ( 𝐴𝐵 ) ) ) ∪ ( ( 𝐺 ↾ ( 𝐴𝐵 ) ) ∪ ( 𝐺 ↾ ( 𝐵𝐴 ) ) ) ) )
21 17 20 eqtr4id ( ( 𝐹 Fn 𝐴𝐺 Fn 𝐵 ∧ ( 𝐹 ↾ ( 𝐴𝐵 ) ) = ( 𝐺 ↾ ( 𝐴𝐵 ) ) ) → ( ( 𝐹𝐴 ) ∪ ( 𝐺𝐵 ) ) = ( ( ( 𝐹 ↾ ( 𝐴𝐵 ) ) ∪ ( 𝐹 ↾ ( 𝐴𝐵 ) ) ) ∪ ( ( 𝐹 ↾ ( 𝐴𝐵 ) ) ∪ ( 𝐺 ↾ ( 𝐵𝐴 ) ) ) ) )
22 un4 ( ( ( 𝐹 ↾ ( 𝐴𝐵 ) ) ∪ ( 𝐹 ↾ ( 𝐴𝐵 ) ) ) ∪ ( ( 𝐹 ↾ ( 𝐴𝐵 ) ) ∪ ( 𝐺 ↾ ( 𝐵𝐴 ) ) ) ) = ( ( ( 𝐹 ↾ ( 𝐴𝐵 ) ) ∪ ( 𝐹 ↾ ( 𝐴𝐵 ) ) ) ∪ ( ( 𝐹 ↾ ( 𝐴𝐵 ) ) ∪ ( 𝐺 ↾ ( 𝐵𝐴 ) ) ) )
23 21 22 eqtrdi ( ( 𝐹 Fn 𝐴𝐺 Fn 𝐵 ∧ ( 𝐹 ↾ ( 𝐴𝐵 ) ) = ( 𝐺 ↾ ( 𝐴𝐵 ) ) ) → ( ( 𝐹𝐴 ) ∪ ( 𝐺𝐵 ) ) = ( ( ( 𝐹 ↾ ( 𝐴𝐵 ) ) ∪ ( 𝐹 ↾ ( 𝐴𝐵 ) ) ) ∪ ( ( 𝐹 ↾ ( 𝐴𝐵 ) ) ∪ ( 𝐺 ↾ ( 𝐵𝐴 ) ) ) ) )
24 unidm ( ( 𝐹 ↾ ( 𝐴𝐵 ) ) ∪ ( 𝐹 ↾ ( 𝐴𝐵 ) ) ) = ( 𝐹 ↾ ( 𝐴𝐵 ) )
25 24 uneq1i ( ( ( 𝐹 ↾ ( 𝐴𝐵 ) ) ∪ ( 𝐹 ↾ ( 𝐴𝐵 ) ) ) ∪ ( ( 𝐹 ↾ ( 𝐴𝐵 ) ) ∪ ( 𝐺 ↾ ( 𝐵𝐴 ) ) ) ) = ( ( 𝐹 ↾ ( 𝐴𝐵 ) ) ∪ ( ( 𝐹 ↾ ( 𝐴𝐵 ) ) ∪ ( 𝐺 ↾ ( 𝐵𝐴 ) ) ) )
26 23 25 eqtrdi ( ( 𝐹 Fn 𝐴𝐺 Fn 𝐵 ∧ ( 𝐹 ↾ ( 𝐴𝐵 ) ) = ( 𝐺 ↾ ( 𝐴𝐵 ) ) ) → ( ( 𝐹𝐴 ) ∪ ( 𝐺𝐵 ) ) = ( ( 𝐹 ↾ ( 𝐴𝐵 ) ) ∪ ( ( 𝐹 ↾ ( 𝐴𝐵 ) ) ∪ ( 𝐺 ↾ ( 𝐵𝐴 ) ) ) ) )
27 5 26 eqtr3d ( ( 𝐹 Fn 𝐴𝐺 Fn 𝐵 ∧ ( 𝐹 ↾ ( 𝐴𝐵 ) ) = ( 𝐺 ↾ ( 𝐴𝐵 ) ) ) → ( 𝐹𝐺 ) = ( ( 𝐹 ↾ ( 𝐴𝐵 ) ) ∪ ( ( 𝐹 ↾ ( 𝐴𝐵 ) ) ∪ ( 𝐺 ↾ ( 𝐵𝐴 ) ) ) ) )