Metamath Proof Explorer


Theorem fundcmpsurbijinjpreimafv

Description: Every function F : A --> B can be decomposed into a surjective function onto P , a bijective function from P and an injective function into the codomain of F . (Contributed by AV, 22-Mar-2024)

Ref Expression
Hypothesis fundcmpsurinj.p P = z | x A z = F -1 F x
Assertion fundcmpsurbijinjpreimafv F : A B A V g h i g : A onto P h : P 1-1 onto F A i : F A 1-1 B F = i h g

Proof

Step Hyp Ref Expression
1 fundcmpsurinj.p P = z | x A z = F -1 F x
2 simpr F : A B A V A V
3 2 mptexd F : A B A V a A F -1 F a V
4 1 setpreimafvex A V P V
5 4 adantl F : A B A V P V
6 5 mptexd F : A B A V y P F y V
7 ffun F : A B Fun F
8 funimaexg Fun F A V F A V
9 7 8 sylan F : A B A V F A V
10 9 resiexd F : A B A V I F A V
11 3 6 10 3jca F : A B A V a A F -1 F a V y P F y V I F A V
12 ffn F : A B F Fn A
13 fveq2 a = x F a = F x
14 13 sneqd a = x F a = F x
15 14 imaeq2d a = x F -1 F a = F -1 F x
16 15 cbvmptv a A F -1 F a = x A F -1 F x
17 1 16 fundcmpsurinjlem2 F Fn A A V a A F -1 F a : A onto P
18 12 17 sylan F : A B A V a A F -1 F a : A onto P
19 eqid y P F y = y P F y
20 1 19 imasetpreimafvbij F Fn A A V y P F y : P 1-1 onto F A
21 12 20 sylan F : A B A V y P F y : P 1-1 onto F A
22 f1oi I F A : F A 1-1 onto F A
23 f1of1 I F A : F A 1-1 onto F A I F A : F A 1-1 F A
24 fimass F : A B F A B
25 f1ss I F A : F A 1-1 F A F A B I F A : F A 1-1 B
26 24 25 sylan2 I F A : F A 1-1 F A F : A B I F A : F A 1-1 B
27 26 ex I F A : F A 1-1 F A F : A B I F A : F A 1-1 B
28 22 23 27 mp2b F : A B I F A : F A 1-1 B
29 28 adantr F : A B A V I F A : F A 1-1 B
30 18 21 29 3jca F : A B A V a A F -1 F a : A onto P y P F y : P 1-1 onto F A I F A : F A 1-1 B
31 12 adantr F : A B A V F Fn A
32 uniimaprimaeqfv F Fn A a A F F -1 F a = F a
33 31 32 sylan F : A B A V a A F F -1 F a = F a
34 33 fveq2d F : A B A V a A I F A F F -1 F a = I F A F a
35 34 mpteq2dva F : A B A V a A I F A F F -1 F a = a A I F A F a
36 ffrn F : A B F : A ran F
37 36 adantr F : A B A V F : A ran F
38 37 funfvima2d F : A B A V a A F a F A
39 fvresi F a F A I F A F a = F a
40 38 39 syl F : A B A V a A I F A F a = F a
41 40 mpteq2dva F : A B A V a A I F A F a = a A F a
42 35 41 eqtrd F : A B A V a A I F A F F -1 F a = a A F a
43 12 ad2antrr F : A B A V a A F Fn A
44 2 adantr F : A B A V a A A V
45 simpr F : A B A V a A a A
46 1 preimafvelsetpreimafv F Fn A A V a A F -1 F a P
47 43 44 45 46 syl3anc F : A B A V a A F -1 F a P
48 eqidd F : A B A V a A F -1 F a = a A F -1 F a
49 eqidd F : A B A V y P I F A F y = y P I F A F y
50 imaeq2 y = F -1 F a F y = F F -1 F a
51 50 unieqd y = F -1 F a F y = F F -1 F a
52 51 fveq2d y = F -1 F a I F A F y = I F A F F -1 F a
53 47 48 49 52 fmptco F : A B A V y P I F A F y a A F -1 F a = a A I F A F F -1 F a
54 dffn5 F Fn A F = a A F a
55 12 54 sylib F : A B F = a A F a
56 55 adantr F : A B A V F = a A F a
57 42 53 56 3eqtr4rd F : A B A V F = y P I F A F y a A F -1 F a
58 f1of I F A : F A 1-1 onto F A I F A : F A F A
59 22 58 mp1i F Fn A I F A : F A F A
60 fnima F Fn A F A = ran F
61 60 eqcomd F Fn A ran F = F A
62 61 feq2d F Fn A I F A : ran F F A I F A : F A F A
63 59 62 mpbird F Fn A I F A : ran F F A
64 1 uniimaelsetpreimafv F Fn A y P F y ran F
65 63 64 cofmpt F Fn A I F A y P F y = y P I F A F y
66 65 eqcomd F Fn A y P I F A F y = I F A y P F y
67 31 66 syl F : A B A V y P I F A F y = I F A y P F y
68 67 coeq1d F : A B A V y P I F A F y a A F -1 F a = I F A y P F y a A F -1 F a
69 57 68 eqtrd F : A B A V F = I F A y P F y a A F -1 F a
70 30 69 jca F : A B A V a A F -1 F a : A onto P y P F y : P 1-1 onto F A I F A : F A 1-1 B F = I F A y P F y a A F -1 F a
71 foeq1 g = a A F -1 F a g : A onto P a A F -1 F a : A onto P
72 71 3ad2ant1 g = a A F -1 F a h = y P F y i = I F A g : A onto P a A F -1 F a : A onto P
73 f1oeq1 h = y P F y h : P 1-1 onto F A y P F y : P 1-1 onto F A
74 73 3ad2ant2 g = a A F -1 F a h = y P F y i = I F A h : P 1-1 onto F A y P F y : P 1-1 onto F A
75 f1eq1 i = I F A i : F A 1-1 B I F A : F A 1-1 B
76 75 3ad2ant3 g = a A F -1 F a h = y P F y i = I F A i : F A 1-1 B I F A : F A 1-1 B
77 72 74 76 3anbi123d g = a A F -1 F a h = y P F y i = I F A g : A onto P h : P 1-1 onto F A i : F A 1-1 B a A F -1 F a : A onto P y P F y : P 1-1 onto F A I F A : F A 1-1 B
78 simp3 g = a A F -1 F a h = y P F y i = I F A i = I F A
79 simp2 g = a A F -1 F a h = y P F y i = I F A h = y P F y
80 78 79 coeq12d g = a A F -1 F a h = y P F y i = I F A i h = I F A y P F y
81 simp1 g = a A F -1 F a h = y P F y i = I F A g = a A F -1 F a
82 80 81 coeq12d g = a A F -1 F a h = y P F y i = I F A i h g = I F A y P F y a A F -1 F a
83 82 eqeq2d g = a A F -1 F a h = y P F y i = I F A F = i h g F = I F A y P F y a A F -1 F a
84 77 83 anbi12d g = a A F -1 F a h = y P F y i = I F A g : A onto P h : P 1-1 onto F A i : F A 1-1 B F = i h g a A F -1 F a : A onto P y P F y : P 1-1 onto F A I F A : F A 1-1 B F = I F A y P F y a A F -1 F a
85 84 spc3egv a A F -1 F a V y P F y V I F A V a A F -1 F a : A onto P y P F y : P 1-1 onto F A I F A : F A 1-1 B F = I F A y P F y a A F -1 F a g h i g : A onto P h : P 1-1 onto F A i : F A 1-1 B F = i h g
86 11 70 85 sylc F : A B A V g h i g : A onto P h : P 1-1 onto F A i : F A 1-1 B F = i h g