Metamath Proof Explorer


Theorem fundcmpsurbijinj

Description: Every function F : A --> B can be decomposed into a surjective, a bijective and an injective function. (Contributed by AV, 23-Mar-2024)

Ref Expression
Assertion fundcmpsurbijinj F : A B A V g h i p q g : A onto p h : p 1-1 onto q i : q 1-1 B F = i h g

Proof

Step Hyp Ref Expression
1 ffun F : A B Fun F
2 funimaexg Fun F A V F A V
3 1 2 sylan F : A B A V F A V
4 abrexexg A V z | y A z = F -1 F y V
5 4 adantl F : A B A V z | y A z = F -1 F y V
6 fveq2 y = x F y = F x
7 6 sneqd y = x F y = F x
8 7 imaeq2d y = x F -1 F y = F -1 F x
9 8 eqeq2d y = x z = F -1 F y z = F -1 F x
10 9 cbvrexvw y A z = F -1 F y x A z = F -1 F x
11 10 abbii z | y A z = F -1 F y = z | x A z = F -1 F x
12 11 fundcmpsurbijinjpreimafv F : A B A V g h i g : A onto z | y A z = F -1 F y h : z | y A z = F -1 F y 1-1 onto F A i : F A 1-1 B F = i h g
13 foeq3 p = z | y A z = F -1 F y g : A onto p g : A onto z | y A z = F -1 F y
14 13 adantl q = F A p = z | y A z = F -1 F y g : A onto p g : A onto z | y A z = F -1 F y
15 f1oeq23 p = z | y A z = F -1 F y q = F A h : p 1-1 onto q h : z | y A z = F -1 F y 1-1 onto F A
16 15 ancoms q = F A p = z | y A z = F -1 F y h : p 1-1 onto q h : z | y A z = F -1 F y 1-1 onto F A
17 f1eq2 q = F A i : q 1-1 B i : F A 1-1 B
18 17 adantr q = F A p = z | y A z = F -1 F y i : q 1-1 B i : F A 1-1 B
19 14 16 18 3anbi123d q = F A p = z | y A z = F -1 F y g : A onto p h : p 1-1 onto q i : q 1-1 B g : A onto z | y A z = F -1 F y h : z | y A z = F -1 F y 1-1 onto F A i : F A 1-1 B
20 19 anbi1d q = F A p = z | y A z = F -1 F y g : A onto p h : p 1-1 onto q i : q 1-1 B F = i h g g : A onto z | y A z = F -1 F y h : z | y A z = F -1 F y 1-1 onto F A i : F A 1-1 B F = i h g
21 20 3exbidv q = F A p = z | y A z = F -1 F y g h i g : A onto p h : p 1-1 onto q i : q 1-1 B F = i h g g h i g : A onto z | y A z = F -1 F y h : z | y A z = F -1 F y 1-1 onto F A i : F A 1-1 B F = i h g
22 21 spc2egv F A V z | y A z = F -1 F y V g h i g : A onto z | y A z = F -1 F y h : z | y A z = F -1 F y 1-1 onto F A i : F A 1-1 B F = i h g q p g h i g : A onto p h : p 1-1 onto q i : q 1-1 B F = i h g
23 22 imp F A V z | y A z = F -1 F y V g h i g : A onto z | y A z = F -1 F y h : z | y A z = F -1 F y 1-1 onto F A i : F A 1-1 B F = i h g q p g h i g : A onto p h : p 1-1 onto q i : q 1-1 B F = i h g
24 3 5 12 23 syl21anc F : A B A V q p g h i g : A onto p h : p 1-1 onto q i : q 1-1 B F = i h g
25 exrot4 q p g h i g : A onto p h : p 1-1 onto q i : q 1-1 B F = i h g g h q p i g : A onto p h : p 1-1 onto q i : q 1-1 B F = i h g
26 excom13 q p i g : A onto p h : p 1-1 onto q i : q 1-1 B F = i h g i p q g : A onto p h : p 1-1 onto q i : q 1-1 B F = i h g
27 26 2exbii g h q p i g : A onto p h : p 1-1 onto q i : q 1-1 B F = i h g g h i p q g : A onto p h : p 1-1 onto q i : q 1-1 B F = i h g
28 25 27 bitri q p g h i g : A onto p h : p 1-1 onto q i : q 1-1 B F = i h g g h i p q g : A onto p h : p 1-1 onto q i : q 1-1 B F = i h g
29 24 28 sylib F : A B A V g h i p q g : A onto p h : p 1-1 onto q i : q 1-1 B F = i h g