Metamath Proof Explorer


Theorem cocan2

Description: A surjection is right-cancelable. (Contributed by FL, 21-Nov-2011) (Proof shortened by Mario Carneiro, 21-Mar-2015)

Ref Expression
Assertion cocan2 F : A onto B H Fn B K Fn B H F = K F H = K

Proof

Step Hyp Ref Expression
1 fof F : A onto B F : A B
2 1 3ad2ant1 F : A onto B H Fn B K Fn B F : A B
3 fvco3 F : A B y A H F y = H F y
4 2 3 sylan F : A onto B H Fn B K Fn B y A H F y = H F y
5 fvco3 F : A B y A K F y = K F y
6 2 5 sylan F : A onto B H Fn B K Fn B y A K F y = K F y
7 4 6 eqeq12d F : A onto B H Fn B K Fn B y A H F y = K F y H F y = K F y
8 7 ralbidva F : A onto B H Fn B K Fn B y A H F y = K F y y A H F y = K F y
9 fveq2 F y = x H F y = H x
10 fveq2 F y = x K F y = K x
11 9 10 eqeq12d F y = x H F y = K F y H x = K x
12 11 cbvfo F : A onto B y A H F y = K F y x B H x = K x
13 12 3ad2ant1 F : A onto B H Fn B K Fn B y A H F y = K F y x B H x = K x
14 8 13 bitrd F : A onto B H Fn B K Fn B y A H F y = K F y x B H x = K x
15 simp2 F : A onto B H Fn B K Fn B H Fn B
16 fnfco H Fn B F : A B H F Fn A
17 15 2 16 syl2anc F : A onto B H Fn B K Fn B H F Fn A
18 simp3 F : A onto B H Fn B K Fn B K Fn B
19 fnfco K Fn B F : A B K F Fn A
20 18 2 19 syl2anc F : A onto B H Fn B K Fn B K F Fn A
21 eqfnfv H F Fn A K F Fn A H F = K F y A H F y = K F y
22 17 20 21 syl2anc F : A onto B H Fn B K Fn B H F = K F y A H F y = K F y
23 eqfnfv H Fn B K Fn B H = K x B H x = K x
24 15 18 23 syl2anc F : A onto B H Fn B K Fn B H = K x B H x = K x
25 14 22 24 3bitr4d F : A onto B H Fn B K Fn B H F = K F H = K