Metamath Proof Explorer


Theorem cofmpt2

Description: Express composition of a maps-to function with another function in a maps-to notation. (Contributed by Thierry Arnoux, 15-Jul-2023)

Ref Expression
Hypotheses cofmpt2.1 ( ( 𝜑𝑦 = ( 𝐹𝑥 ) ) → 𝐶 = 𝐷 )
cofmpt2.2 ( ( 𝜑𝑦𝐵 ) → 𝐶𝐸 )
cofmpt2.3 ( 𝜑𝐹 : 𝐴𝐵 )
cofmpt2.4 ( 𝜑𝐷𝑉 )
Assertion cofmpt2 ( 𝜑 → ( ( 𝑦𝐵𝐶 ) ∘ 𝐹 ) = ( 𝑥𝐴𝐷 ) )

Proof

Step Hyp Ref Expression
1 cofmpt2.1 ( ( 𝜑𝑦 = ( 𝐹𝑥 ) ) → 𝐶 = 𝐷 )
2 cofmpt2.2 ( ( 𝜑𝑦𝐵 ) → 𝐶𝐸 )
3 cofmpt2.3 ( 𝜑𝐹 : 𝐴𝐵 )
4 cofmpt2.4 ( 𝜑𝐷𝑉 )
5 2 fmpttd ( 𝜑 → ( 𝑦𝐵𝐶 ) : 𝐵𝐸 )
6 fcompt ( ( ( 𝑦𝐵𝐶 ) : 𝐵𝐸𝐹 : 𝐴𝐵 ) → ( ( 𝑦𝐵𝐶 ) ∘ 𝐹 ) = ( 𝑥𝐴 ↦ ( ( 𝑦𝐵𝐶 ) ‘ ( 𝐹𝑥 ) ) ) )
7 5 3 6 syl2anc ( 𝜑 → ( ( 𝑦𝐵𝐶 ) ∘ 𝐹 ) = ( 𝑥𝐴 ↦ ( ( 𝑦𝐵𝐶 ) ‘ ( 𝐹𝑥 ) ) ) )
8 eqid ( 𝑦𝐵𝐶 ) = ( 𝑦𝐵𝐶 )
9 1 adantlr ( ( ( 𝜑𝑥𝐴 ) ∧ 𝑦 = ( 𝐹𝑥 ) ) → 𝐶 = 𝐷 )
10 3 ffvelrnda ( ( 𝜑𝑥𝐴 ) → ( 𝐹𝑥 ) ∈ 𝐵 )
11 4 adantr ( ( 𝜑𝑥𝐴 ) → 𝐷𝑉 )
12 8 9 10 11 fvmptd2 ( ( 𝜑𝑥𝐴 ) → ( ( 𝑦𝐵𝐶 ) ‘ ( 𝐹𝑥 ) ) = 𝐷 )
13 12 mpteq2dva ( 𝜑 → ( 𝑥𝐴 ↦ ( ( 𝑦𝐵𝐶 ) ‘ ( 𝐹𝑥 ) ) ) = ( 𝑥𝐴𝐷 ) )
14 7 13 eqtrd ( 𝜑 → ( ( 𝑦𝐵𝐶 ) ∘ 𝐹 ) = ( 𝑥𝐴𝐷 ) )