Metamath Proof Explorer


Theorem fcores

Description: Every composite function ( G o. F ) can be written as composition of restrictions of the composed functions (to their minimum domains). (Contributed by GL and AV, 17-Sep-2024)

Ref Expression
Hypotheses fcores.f ( 𝜑𝐹 : 𝐴𝐵 )
fcores.e 𝐸 = ( ran 𝐹𝐶 )
fcores.p 𝑃 = ( 𝐹𝐶 )
fcores.x 𝑋 = ( 𝐹𝑃 )
fcores.g ( 𝜑𝐺 : 𝐶𝐷 )
fcores.y 𝑌 = ( 𝐺𝐸 )
Assertion fcores ( 𝜑 → ( 𝐺𝐹 ) = ( 𝑌𝑋 ) )

Proof

Step Hyp Ref Expression
1 fcores.f ( 𝜑𝐹 : 𝐴𝐵 )
2 fcores.e 𝐸 = ( ran 𝐹𝐶 )
3 fcores.p 𝑃 = ( 𝐹𝐶 )
4 fcores.x 𝑋 = ( 𝐹𝑃 )
5 fcores.g ( 𝜑𝐺 : 𝐶𝐷 )
6 fcores.y 𝑌 = ( 𝐺𝐸 )
7 1 ffund ( 𝜑 → Fun 𝐹 )
8 fcof ( ( 𝐺 : 𝐶𝐷 ∧ Fun 𝐹 ) → ( 𝐺𝐹 ) : ( 𝐹𝐶 ) ⟶ 𝐷 )
9 5 7 8 syl2anc ( 𝜑 → ( 𝐺𝐹 ) : ( 𝐹𝐶 ) ⟶ 𝐷 )
10 9 ffnd ( 𝜑 → ( 𝐺𝐹 ) Fn ( 𝐹𝐶 ) )
11 3 fneq2i ( ( 𝐺𝐹 ) Fn 𝑃 ↔ ( 𝐺𝐹 ) Fn ( 𝐹𝐶 ) )
12 10 11 sylibr ( 𝜑 → ( 𝐺𝐹 ) Fn 𝑃 )
13 1 2 3 4 5 6 fcoreslem4 ( 𝜑 → ( 𝑌𝑋 ) Fn 𝑃 )
14 4 fveq1i ( 𝑋𝑥 ) = ( ( 𝐹𝑃 ) ‘ 𝑥 )
15 simpr ( ( 𝜑𝑥𝑃 ) → 𝑥𝑃 )
16 15 fvresd ( ( 𝜑𝑥𝑃 ) → ( ( 𝐹𝑃 ) ‘ 𝑥 ) = ( 𝐹𝑥 ) )
17 14 16 syl5eq ( ( 𝜑𝑥𝑃 ) → ( 𝑋𝑥 ) = ( 𝐹𝑥 ) )
18 17 fveq2d ( ( 𝜑𝑥𝑃 ) → ( 𝑌 ‘ ( 𝑋𝑥 ) ) = ( 𝑌 ‘ ( 𝐹𝑥 ) ) )
19 6 fveq1i ( 𝑌 ‘ ( 𝐹𝑥 ) ) = ( ( 𝐺𝐸 ) ‘ ( 𝐹𝑥 ) )
20 cnvimass ( 𝐹𝐶 ) ⊆ dom 𝐹
21 3 20 eqsstri 𝑃 ⊆ dom 𝐹
22 21 sseli ( 𝑥𝑃𝑥 ∈ dom 𝐹 )
23 fvelrn ( ( Fun 𝐹𝑥 ∈ dom 𝐹 ) → ( 𝐹𝑥 ) ∈ ran 𝐹 )
24 7 22 23 syl2an ( ( 𝜑𝑥𝑃 ) → ( 𝐹𝑥 ) ∈ ran 𝐹 )
25 3 eleq2i ( 𝑥𝑃𝑥 ∈ ( 𝐹𝐶 ) )
26 25 biimpi ( 𝑥𝑃𝑥 ∈ ( 𝐹𝐶 ) )
27 fvimacnvi ( ( Fun 𝐹𝑥 ∈ ( 𝐹𝐶 ) ) → ( 𝐹𝑥 ) ∈ 𝐶 )
28 7 26 27 syl2an ( ( 𝜑𝑥𝑃 ) → ( 𝐹𝑥 ) ∈ 𝐶 )
29 24 28 elind ( ( 𝜑𝑥𝑃 ) → ( 𝐹𝑥 ) ∈ ( ran 𝐹𝐶 ) )
30 29 2 eleqtrrdi ( ( 𝜑𝑥𝑃 ) → ( 𝐹𝑥 ) ∈ 𝐸 )
31 30 fvresd ( ( 𝜑𝑥𝑃 ) → ( ( 𝐺𝐸 ) ‘ ( 𝐹𝑥 ) ) = ( 𝐺 ‘ ( 𝐹𝑥 ) ) )
32 19 31 syl5eq ( ( 𝜑𝑥𝑃 ) → ( 𝑌 ‘ ( 𝐹𝑥 ) ) = ( 𝐺 ‘ ( 𝐹𝑥 ) ) )
33 18 32 eqtrd ( ( 𝜑𝑥𝑃 ) → ( 𝑌 ‘ ( 𝑋𝑥 ) ) = ( 𝐺 ‘ ( 𝐹𝑥 ) ) )
34 1 2 3 4 fcoreslem3 ( 𝜑𝑋 : 𝑃onto𝐸 )
35 fof ( 𝑋 : 𝑃onto𝐸𝑋 : 𝑃𝐸 )
36 34 35 syl ( 𝜑𝑋 : 𝑃𝐸 )
37 36 adantr ( ( 𝜑𝑥𝑃 ) → 𝑋 : 𝑃𝐸 )
38 37 15 fvco3d ( ( 𝜑𝑥𝑃 ) → ( ( 𝑌𝑋 ) ‘ 𝑥 ) = ( 𝑌 ‘ ( 𝑋𝑥 ) ) )
39 1 adantr ( ( 𝜑𝑥𝑃 ) → 𝐹 : 𝐴𝐵 )
40 21 a1i ( 𝜑𝑃 ⊆ dom 𝐹 )
41 40 sselda ( ( 𝜑𝑥𝑃 ) → 𝑥 ∈ dom 𝐹 )
42 1 fdmd ( 𝜑 → dom 𝐹 = 𝐴 )
43 42 eqcomd ( 𝜑𝐴 = dom 𝐹 )
44 43 eleq2d ( 𝜑 → ( 𝑥𝐴𝑥 ∈ dom 𝐹 ) )
45 44 adantr ( ( 𝜑𝑥𝑃 ) → ( 𝑥𝐴𝑥 ∈ dom 𝐹 ) )
46 41 45 mpbird ( ( 𝜑𝑥𝑃 ) → 𝑥𝐴 )
47 39 46 fvco3d ( ( 𝜑𝑥𝑃 ) → ( ( 𝐺𝐹 ) ‘ 𝑥 ) = ( 𝐺 ‘ ( 𝐹𝑥 ) ) )
48 33 38 47 3eqtr4rd ( ( 𝜑𝑥𝑃 ) → ( ( 𝐺𝐹 ) ‘ 𝑥 ) = ( ( 𝑌𝑋 ) ‘ 𝑥 ) )
49 12 13 48 eqfnfvd ( 𝜑 → ( 𝐺𝐹 ) = ( 𝑌𝑋 ) )