Metamath Proof Explorer


Theorem fresaun

Description: The union of two functions which agree on their common domain is a function. (Contributed by Stefan O'Rear, 9-Oct-2014)

Ref Expression
Assertion fresaun ( ( 𝐹 : 𝐴𝐶𝐺 : 𝐵𝐶 ∧ ( 𝐹 ↾ ( 𝐴𝐵 ) ) = ( 𝐺 ↾ ( 𝐴𝐵 ) ) ) → ( 𝐹𝐺 ) : ( 𝐴𝐵 ) ⟶ 𝐶 )

Proof

Step Hyp Ref Expression
1 simp1 ( ( 𝐹 : 𝐴𝐶𝐺 : 𝐵𝐶 ∧ ( 𝐹 ↾ ( 𝐴𝐵 ) ) = ( 𝐺 ↾ ( 𝐴𝐵 ) ) ) → 𝐹 : 𝐴𝐶 )
2 inss1 ( 𝐴𝐵 ) ⊆ 𝐴
3 fssres ( ( 𝐹 : 𝐴𝐶 ∧ ( 𝐴𝐵 ) ⊆ 𝐴 ) → ( 𝐹 ↾ ( 𝐴𝐵 ) ) : ( 𝐴𝐵 ) ⟶ 𝐶 )
4 1 2 3 sylancl ( ( 𝐹 : 𝐴𝐶𝐺 : 𝐵𝐶 ∧ ( 𝐹 ↾ ( 𝐴𝐵 ) ) = ( 𝐺 ↾ ( 𝐴𝐵 ) ) ) → ( 𝐹 ↾ ( 𝐴𝐵 ) ) : ( 𝐴𝐵 ) ⟶ 𝐶 )
5 difss ( 𝐴𝐵 ) ⊆ 𝐴
6 fssres ( ( 𝐹 : 𝐴𝐶 ∧ ( 𝐴𝐵 ) ⊆ 𝐴 ) → ( 𝐹 ↾ ( 𝐴𝐵 ) ) : ( 𝐴𝐵 ) ⟶ 𝐶 )
7 1 5 6 sylancl ( ( 𝐹 : 𝐴𝐶𝐺 : 𝐵𝐶 ∧ ( 𝐹 ↾ ( 𝐴𝐵 ) ) = ( 𝐺 ↾ ( 𝐴𝐵 ) ) ) → ( 𝐹 ↾ ( 𝐴𝐵 ) ) : ( 𝐴𝐵 ) ⟶ 𝐶 )
8 simp2 ( ( 𝐹 : 𝐴𝐶𝐺 : 𝐵𝐶 ∧ ( 𝐹 ↾ ( 𝐴𝐵 ) ) = ( 𝐺 ↾ ( 𝐴𝐵 ) ) ) → 𝐺 : 𝐵𝐶 )
9 difss ( 𝐵𝐴 ) ⊆ 𝐵
10 fssres ( ( 𝐺 : 𝐵𝐶 ∧ ( 𝐵𝐴 ) ⊆ 𝐵 ) → ( 𝐺 ↾ ( 𝐵𝐴 ) ) : ( 𝐵𝐴 ) ⟶ 𝐶 )
11 8 9 10 sylancl ( ( 𝐹 : 𝐴𝐶𝐺 : 𝐵𝐶 ∧ ( 𝐹 ↾ ( 𝐴𝐵 ) ) = ( 𝐺 ↾ ( 𝐴𝐵 ) ) ) → ( 𝐺 ↾ ( 𝐵𝐴 ) ) : ( 𝐵𝐴 ) ⟶ 𝐶 )
12 indifdir ( ( 𝐴𝐵 ) ∩ ( 𝐵𝐴 ) ) = ( ( 𝐴 ∩ ( 𝐵𝐴 ) ) ∖ ( 𝐵 ∩ ( 𝐵𝐴 ) ) )
13 disjdif ( 𝐴 ∩ ( 𝐵𝐴 ) ) = ∅
14 13 difeq1i ( ( 𝐴 ∩ ( 𝐵𝐴 ) ) ∖ ( 𝐵 ∩ ( 𝐵𝐴 ) ) ) = ( ∅ ∖ ( 𝐵 ∩ ( 𝐵𝐴 ) ) )
15 0dif ( ∅ ∖ ( 𝐵 ∩ ( 𝐵𝐴 ) ) ) = ∅
16 12 14 15 3eqtri ( ( 𝐴𝐵 ) ∩ ( 𝐵𝐴 ) ) = ∅
17 16 a1i ( ( 𝐹 : 𝐴𝐶𝐺 : 𝐵𝐶 ∧ ( 𝐹 ↾ ( 𝐴𝐵 ) ) = ( 𝐺 ↾ ( 𝐴𝐵 ) ) ) → ( ( 𝐴𝐵 ) ∩ ( 𝐵𝐴 ) ) = ∅ )
18 7 11 17 fun2d ( ( 𝐹 : 𝐴𝐶𝐺 : 𝐵𝐶 ∧ ( 𝐹 ↾ ( 𝐴𝐵 ) ) = ( 𝐺 ↾ ( 𝐴𝐵 ) ) ) → ( ( 𝐹 ↾ ( 𝐴𝐵 ) ) ∪ ( 𝐺 ↾ ( 𝐵𝐴 ) ) ) : ( ( 𝐴𝐵 ) ∪ ( 𝐵𝐴 ) ) ⟶ 𝐶 )
19 indi ( ( 𝐴𝐵 ) ∩ ( ( 𝐴𝐵 ) ∪ ( 𝐵𝐴 ) ) ) = ( ( ( 𝐴𝐵 ) ∩ ( 𝐴𝐵 ) ) ∪ ( ( 𝐴𝐵 ) ∩ ( 𝐵𝐴 ) ) )
20 inass ( ( 𝐴𝐵 ) ∩ ( 𝐴𝐵 ) ) = ( 𝐴 ∩ ( 𝐵 ∩ ( 𝐴𝐵 ) ) )
21 disjdif ( 𝐵 ∩ ( 𝐴𝐵 ) ) = ∅
22 21 ineq2i ( 𝐴 ∩ ( 𝐵 ∩ ( 𝐴𝐵 ) ) ) = ( 𝐴 ∩ ∅ )
23 in0 ( 𝐴 ∩ ∅ ) = ∅
24 20 22 23 3eqtri ( ( 𝐴𝐵 ) ∩ ( 𝐴𝐵 ) ) = ∅
25 incom ( 𝐴𝐵 ) = ( 𝐵𝐴 )
26 25 ineq1i ( ( 𝐴𝐵 ) ∩ ( 𝐵𝐴 ) ) = ( ( 𝐵𝐴 ) ∩ ( 𝐵𝐴 ) )
27 inass ( ( 𝐵𝐴 ) ∩ ( 𝐵𝐴 ) ) = ( 𝐵 ∩ ( 𝐴 ∩ ( 𝐵𝐴 ) ) )
28 13 ineq2i ( 𝐵 ∩ ( 𝐴 ∩ ( 𝐵𝐴 ) ) ) = ( 𝐵 ∩ ∅ )
29 in0 ( 𝐵 ∩ ∅ ) = ∅
30 27 28 29 3eqtri ( ( 𝐵𝐴 ) ∩ ( 𝐵𝐴 ) ) = ∅
31 26 30 eqtri ( ( 𝐴𝐵 ) ∩ ( 𝐵𝐴 ) ) = ∅
32 24 31 uneq12i ( ( ( 𝐴𝐵 ) ∩ ( 𝐴𝐵 ) ) ∪ ( ( 𝐴𝐵 ) ∩ ( 𝐵𝐴 ) ) ) = ( ∅ ∪ ∅ )
33 un0 ( ∅ ∪ ∅ ) = ∅
34 19 32 33 3eqtri ( ( 𝐴𝐵 ) ∩ ( ( 𝐴𝐵 ) ∪ ( 𝐵𝐴 ) ) ) = ∅
35 34 a1i ( ( 𝐹 : 𝐴𝐶𝐺 : 𝐵𝐶 ∧ ( 𝐹 ↾ ( 𝐴𝐵 ) ) = ( 𝐺 ↾ ( 𝐴𝐵 ) ) ) → ( ( 𝐴𝐵 ) ∩ ( ( 𝐴𝐵 ) ∪ ( 𝐵𝐴 ) ) ) = ∅ )
36 4 18 35 fun2d ( ( 𝐹 : 𝐴𝐶𝐺 : 𝐵𝐶 ∧ ( 𝐹 ↾ ( 𝐴𝐵 ) ) = ( 𝐺 ↾ ( 𝐴𝐵 ) ) ) → ( ( 𝐹 ↾ ( 𝐴𝐵 ) ) ∪ ( ( 𝐹 ↾ ( 𝐴𝐵 ) ) ∪ ( 𝐺 ↾ ( 𝐵𝐴 ) ) ) ) : ( ( 𝐴𝐵 ) ∪ ( ( 𝐴𝐵 ) ∪ ( 𝐵𝐴 ) ) ) ⟶ 𝐶 )
37 un12 ( ( 𝐴𝐵 ) ∪ ( ( 𝐴𝐵 ) ∪ ( 𝐵𝐴 ) ) ) = ( ( 𝐴𝐵 ) ∪ ( ( 𝐴𝐵 ) ∪ ( 𝐵𝐴 ) ) )
38 25 uneq1i ( ( 𝐴𝐵 ) ∪ ( 𝐵𝐴 ) ) = ( ( 𝐵𝐴 ) ∪ ( 𝐵𝐴 ) )
39 inundif ( ( 𝐵𝐴 ) ∪ ( 𝐵𝐴 ) ) = 𝐵
40 38 39 eqtri ( ( 𝐴𝐵 ) ∪ ( 𝐵𝐴 ) ) = 𝐵
41 40 uneq2i ( ( 𝐴𝐵 ) ∪ ( ( 𝐴𝐵 ) ∪ ( 𝐵𝐴 ) ) ) = ( ( 𝐴𝐵 ) ∪ 𝐵 )
42 undif1 ( ( 𝐴𝐵 ) ∪ 𝐵 ) = ( 𝐴𝐵 )
43 37 41 42 3eqtri ( ( 𝐴𝐵 ) ∪ ( ( 𝐴𝐵 ) ∪ ( 𝐵𝐴 ) ) ) = ( 𝐴𝐵 )
44 43 feq2i ( ( ( 𝐹 ↾ ( 𝐴𝐵 ) ) ∪ ( ( 𝐹 ↾ ( 𝐴𝐵 ) ) ∪ ( 𝐺 ↾ ( 𝐵𝐴 ) ) ) ) : ( ( 𝐴𝐵 ) ∪ ( ( 𝐴𝐵 ) ∪ ( 𝐵𝐴 ) ) ) ⟶ 𝐶 ↔ ( ( 𝐹 ↾ ( 𝐴𝐵 ) ) ∪ ( ( 𝐹 ↾ ( 𝐴𝐵 ) ) ∪ ( 𝐺 ↾ ( 𝐵𝐴 ) ) ) ) : ( 𝐴𝐵 ) ⟶ 𝐶 )
45 ffn ( 𝐹 : 𝐴𝐶𝐹 Fn 𝐴 )
46 ffn ( 𝐺 : 𝐵𝐶𝐺 Fn 𝐵 )
47 id ( ( 𝐹 ↾ ( 𝐴𝐵 ) ) = ( 𝐺 ↾ ( 𝐴𝐵 ) ) → ( 𝐹 ↾ ( 𝐴𝐵 ) ) = ( 𝐺 ↾ ( 𝐴𝐵 ) ) )
48 resasplit ( ( 𝐹 Fn 𝐴𝐺 Fn 𝐵 ∧ ( 𝐹 ↾ ( 𝐴𝐵 ) ) = ( 𝐺 ↾ ( 𝐴𝐵 ) ) ) → ( 𝐹𝐺 ) = ( ( 𝐹 ↾ ( 𝐴𝐵 ) ) ∪ ( ( 𝐹 ↾ ( 𝐴𝐵 ) ) ∪ ( 𝐺 ↾ ( 𝐵𝐴 ) ) ) ) )
49 45 46 47 48 syl3an ( ( 𝐹 : 𝐴𝐶𝐺 : 𝐵𝐶 ∧ ( 𝐹 ↾ ( 𝐴𝐵 ) ) = ( 𝐺 ↾ ( 𝐴𝐵 ) ) ) → ( 𝐹𝐺 ) = ( ( 𝐹 ↾ ( 𝐴𝐵 ) ) ∪ ( ( 𝐹 ↾ ( 𝐴𝐵 ) ) ∪ ( 𝐺 ↾ ( 𝐵𝐴 ) ) ) ) )
50 49 feq1d ( ( 𝐹 : 𝐴𝐶𝐺 : 𝐵𝐶 ∧ ( 𝐹 ↾ ( 𝐴𝐵 ) ) = ( 𝐺 ↾ ( 𝐴𝐵 ) ) ) → ( ( 𝐹𝐺 ) : ( 𝐴𝐵 ) ⟶ 𝐶 ↔ ( ( 𝐹 ↾ ( 𝐴𝐵 ) ) ∪ ( ( 𝐹 ↾ ( 𝐴𝐵 ) ) ∪ ( 𝐺 ↾ ( 𝐵𝐴 ) ) ) ) : ( 𝐴𝐵 ) ⟶ 𝐶 ) )
51 44 50 bitr4id ( ( 𝐹 : 𝐴𝐶𝐺 : 𝐵𝐶 ∧ ( 𝐹 ↾ ( 𝐴𝐵 ) ) = ( 𝐺 ↾ ( 𝐴𝐵 ) ) ) → ( ( ( 𝐹 ↾ ( 𝐴𝐵 ) ) ∪ ( ( 𝐹 ↾ ( 𝐴𝐵 ) ) ∪ ( 𝐺 ↾ ( 𝐵𝐴 ) ) ) ) : ( ( 𝐴𝐵 ) ∪ ( ( 𝐴𝐵 ) ∪ ( 𝐵𝐴 ) ) ) ⟶ 𝐶 ↔ ( 𝐹𝐺 ) : ( 𝐴𝐵 ) ⟶ 𝐶 ) )
52 36 51 mpbid ( ( 𝐹 : 𝐴𝐶𝐺 : 𝐵𝐶 ∧ ( 𝐹 ↾ ( 𝐴𝐵 ) ) = ( 𝐺 ↾ ( 𝐴𝐵 ) ) ) → ( 𝐹𝐺 ) : ( 𝐴𝐵 ) ⟶ 𝐶 )