Metamath Proof Explorer


Theorem fco

Description: Composition of two functions with domain and codomain as a function with domain and codomain. (Contributed by NM, 29-Aug-1999) (Proof shortened by Andrew Salmon, 17-Sep-2011) (Proof shortened by AV, 20-Sep-2024)

Ref Expression
Assertion fco ( ( 𝐹 : 𝐵𝐶𝐺 : 𝐴𝐵 ) → ( 𝐹𝐺 ) : 𝐴𝐶 )

Proof

Step Hyp Ref Expression
1 ffun ( 𝐺 : 𝐴𝐵 → Fun 𝐺 )
2 fcof ( ( 𝐹 : 𝐵𝐶 ∧ Fun 𝐺 ) → ( 𝐹𝐺 ) : ( 𝐺𝐵 ) ⟶ 𝐶 )
3 1 2 sylan2 ( ( 𝐹 : 𝐵𝐶𝐺 : 𝐴𝐵 ) → ( 𝐹𝐺 ) : ( 𝐺𝐵 ) ⟶ 𝐶 )
4 fimacnv ( 𝐺 : 𝐴𝐵 → ( 𝐺𝐵 ) = 𝐴 )
5 4 eqcomd ( 𝐺 : 𝐴𝐵𝐴 = ( 𝐺𝐵 ) )
6 5 adantl ( ( 𝐹 : 𝐵𝐶𝐺 : 𝐴𝐵 ) → 𝐴 = ( 𝐺𝐵 ) )
7 6 feq2d ( ( 𝐹 : 𝐵𝐶𝐺 : 𝐴𝐵 ) → ( ( 𝐹𝐺 ) : 𝐴𝐶 ↔ ( 𝐹𝐺 ) : ( 𝐺𝐵 ) ⟶ 𝐶 ) )
8 3 7 mpbird ( ( 𝐹 : 𝐵𝐶𝐺 : 𝐴𝐵 ) → ( 𝐹𝐺 ) : 𝐴𝐶 )