Metamath Proof Explorer


Theorem funfocofob

Description: If the domain of a function G is a subset of the range of a function F , then the composition ( G o. F ) is surjective iff G is surjective. (Contributed by GL and AV, 29-Sep-2024)

Ref Expression
Assertion funfocofob Fun F G : A B A ran F G F : F -1 A onto B G : A onto B

Proof

Step Hyp Ref Expression
1 fdmrn Fun F F : dom F ran F
2 1 biimpi Fun F F : dom F ran F
3 2 3ad2ant1 Fun F G : A B A ran F F : dom F ran F
4 3 adantr Fun F G : A B A ran F G F : F -1 A onto B F : dom F ran F
5 eqid ran F A = ran F A
6 eqid F -1 A = F -1 A
7 eqid F F -1 A = F F -1 A
8 simp2 Fun F G : A B A ran F G : A B
9 8 adantr Fun F G : A B A ran F G F : F -1 A onto B G : A B
10 eqid G ran F A = G ran F A
11 simpr Fun F G : A B A ran F G F : F -1 A onto B G F : F -1 A onto B
12 4 5 6 7 9 10 11 fcoresfo Fun F G : A B A ran F G F : F -1 A onto B G ran F A : ran F A onto B
13 12 ex Fun F G : A B A ran F G F : F -1 A onto B G ran F A : ran F A onto B
14 sseqin2 A ran F ran F A = A
15 14 biimpi A ran F ran F A = A
16 15 3ad2ant3 Fun F G : A B A ran F ran F A = A
17 8 fdmd Fun F G : A B A ran F dom G = A
18 16 17 eqtr4d Fun F G : A B A ran F ran F A = dom G
19 18 reseq2d Fun F G : A B A ran F G ran F A = G dom G
20 8 freld Fun F G : A B A ran F Rel G
21 resdm Rel G G dom G = G
22 20 21 syl Fun F G : A B A ran F G dom G = G
23 19 22 eqtrd Fun F G : A B A ran F G ran F A = G
24 eqidd Fun F G : A B A ran F B = B
25 23 16 24 foeq123d Fun F G : A B A ran F G ran F A : ran F A onto B G : A onto B
26 13 25 sylibd Fun F G : A B A ran F G F : F -1 A onto B G : A onto B
27 simpr Fun F G : A B A ran F G : A onto B G : A onto B
28 simpl1 Fun F G : A B A ran F G : A onto B Fun F
29 simpl3 Fun F G : A B A ran F G : A onto B A ran F
30 focofo G : A onto B Fun F A ran F G F : F -1 A onto B
31 27 28 29 30 syl3anc Fun F G : A B A ran F G : A onto B G F : F -1 A onto B
32 31 ex Fun F G : A B A ran F G : A onto B G F : F -1 A onto B
33 26 32 impbid Fun F G : A B A ran F G F : F -1 A onto B G : A onto B