Metamath Proof Explorer


Theorem foco2

Description: If a composition of two functions is surjective, then the function on the left is surjective. (Contributed by Jeff Madsen, 16-Jun-2011) (Proof shortened by JJ, 14-Jul-2021)

Ref Expression
Assertion foco2 ( ( 𝐹 : 𝐵𝐶𝐺 : 𝐴𝐵 ∧ ( 𝐹𝐺 ) : 𝐴onto𝐶 ) → 𝐹 : 𝐵onto𝐶 )

Proof

Step Hyp Ref Expression
1 foelrn ( ( ( 𝐹𝐺 ) : 𝐴onto𝐶𝑦𝐶 ) → ∃ 𝑧𝐴 𝑦 = ( ( 𝐹𝐺 ) ‘ 𝑧 ) )
2 ffvelrn ( ( 𝐺 : 𝐴𝐵𝑧𝐴 ) → ( 𝐺𝑧 ) ∈ 𝐵 )
3 fvco3 ( ( 𝐺 : 𝐴𝐵𝑧𝐴 ) → ( ( 𝐹𝐺 ) ‘ 𝑧 ) = ( 𝐹 ‘ ( 𝐺𝑧 ) ) )
4 fveq2 ( 𝑥 = ( 𝐺𝑧 ) → ( 𝐹𝑥 ) = ( 𝐹 ‘ ( 𝐺𝑧 ) ) )
5 4 rspceeqv ( ( ( 𝐺𝑧 ) ∈ 𝐵 ∧ ( ( 𝐹𝐺 ) ‘ 𝑧 ) = ( 𝐹 ‘ ( 𝐺𝑧 ) ) ) → ∃ 𝑥𝐵 ( ( 𝐹𝐺 ) ‘ 𝑧 ) = ( 𝐹𝑥 ) )
6 2 3 5 syl2anc ( ( 𝐺 : 𝐴𝐵𝑧𝐴 ) → ∃ 𝑥𝐵 ( ( 𝐹𝐺 ) ‘ 𝑧 ) = ( 𝐹𝑥 ) )
7 eqeq1 ( 𝑦 = ( ( 𝐹𝐺 ) ‘ 𝑧 ) → ( 𝑦 = ( 𝐹𝑥 ) ↔ ( ( 𝐹𝐺 ) ‘ 𝑧 ) = ( 𝐹𝑥 ) ) )
8 7 rexbidv ( 𝑦 = ( ( 𝐹𝐺 ) ‘ 𝑧 ) → ( ∃ 𝑥𝐵 𝑦 = ( 𝐹𝑥 ) ↔ ∃ 𝑥𝐵 ( ( 𝐹𝐺 ) ‘ 𝑧 ) = ( 𝐹𝑥 ) ) )
9 6 8 syl5ibrcom ( ( 𝐺 : 𝐴𝐵𝑧𝐴 ) → ( 𝑦 = ( ( 𝐹𝐺 ) ‘ 𝑧 ) → ∃ 𝑥𝐵 𝑦 = ( 𝐹𝑥 ) ) )
10 9 rexlimdva ( 𝐺 : 𝐴𝐵 → ( ∃ 𝑧𝐴 𝑦 = ( ( 𝐹𝐺 ) ‘ 𝑧 ) → ∃ 𝑥𝐵 𝑦 = ( 𝐹𝑥 ) ) )
11 1 10 syl5 ( 𝐺 : 𝐴𝐵 → ( ( ( 𝐹𝐺 ) : 𝐴onto𝐶𝑦𝐶 ) → ∃ 𝑥𝐵 𝑦 = ( 𝐹𝑥 ) ) )
12 11 impl ( ( ( 𝐺 : 𝐴𝐵 ∧ ( 𝐹𝐺 ) : 𝐴onto𝐶 ) ∧ 𝑦𝐶 ) → ∃ 𝑥𝐵 𝑦 = ( 𝐹𝑥 ) )
13 12 ralrimiva ( ( 𝐺 : 𝐴𝐵 ∧ ( 𝐹𝐺 ) : 𝐴onto𝐶 ) → ∀ 𝑦𝐶𝑥𝐵 𝑦 = ( 𝐹𝑥 ) )
14 13 anim2i ( ( 𝐹 : 𝐵𝐶 ∧ ( 𝐺 : 𝐴𝐵 ∧ ( 𝐹𝐺 ) : 𝐴onto𝐶 ) ) → ( 𝐹 : 𝐵𝐶 ∧ ∀ 𝑦𝐶𝑥𝐵 𝑦 = ( 𝐹𝑥 ) ) )
15 3anass ( ( 𝐹 : 𝐵𝐶𝐺 : 𝐴𝐵 ∧ ( 𝐹𝐺 ) : 𝐴onto𝐶 ) ↔ ( 𝐹 : 𝐵𝐶 ∧ ( 𝐺 : 𝐴𝐵 ∧ ( 𝐹𝐺 ) : 𝐴onto𝐶 ) ) )
16 dffo3 ( 𝐹 : 𝐵onto𝐶 ↔ ( 𝐹 : 𝐵𝐶 ∧ ∀ 𝑦𝐶𝑥𝐵 𝑦 = ( 𝐹𝑥 ) ) )
17 14 15 16 3imtr4i ( ( 𝐹 : 𝐵𝐶𝐺 : 𝐴𝐵 ∧ ( 𝐹𝐺 ) : 𝐴onto𝐶 ) → 𝐹 : 𝐵onto𝐶 )