This is an inofficial mirror of http://metamath.tirix.org for personal testing of a visualizer extension only.
Description: Express composition of two functions as a maps-to applying both in sequence. (Contributed by Stefan O'Rear, 5-Oct-2014) (Proof shortened by Mario Carneiro, 27-Dec-2014)
| Ref | Expression | ||
|---|---|---|---|
| Assertion | fcompt | ⊢ ( ( 𝐴 : 𝐷 ⟶ 𝐸 ∧ 𝐵 : 𝐶 ⟶ 𝐷 ) → ( 𝐴 ∘ 𝐵 ) = ( 𝑥 ∈ 𝐶 ↦ ( 𝐴 ‘ ( 𝐵 ‘ 𝑥 ) ) ) ) |
| Step | Hyp | Ref | Expression |
|---|---|---|---|
| 1 | ffvelcdm | ⊢ ( ( 𝐵 : 𝐶 ⟶ 𝐷 ∧ 𝑥 ∈ 𝐶 ) → ( 𝐵 ‘ 𝑥 ) ∈ 𝐷 ) | |
| 2 | 1 | adantll | ⊢ ( ( ( 𝐴 : 𝐷 ⟶ 𝐸 ∧ 𝐵 : 𝐶 ⟶ 𝐷 ) ∧ 𝑥 ∈ 𝐶 ) → ( 𝐵 ‘ 𝑥 ) ∈ 𝐷 ) |
| 3 | ffn | ⊢ ( 𝐵 : 𝐶 ⟶ 𝐷 → 𝐵 Fn 𝐶 ) | |
| 4 | 3 | adantl | ⊢ ( ( 𝐴 : 𝐷 ⟶ 𝐸 ∧ 𝐵 : 𝐶 ⟶ 𝐷 ) → 𝐵 Fn 𝐶 ) |
| 5 | dffn5 | ⊢ ( 𝐵 Fn 𝐶 ↔ 𝐵 = ( 𝑥 ∈ 𝐶 ↦ ( 𝐵 ‘ 𝑥 ) ) ) | |
| 6 | 4 5 | sylib | ⊢ ( ( 𝐴 : 𝐷 ⟶ 𝐸 ∧ 𝐵 : 𝐶 ⟶ 𝐷 ) → 𝐵 = ( 𝑥 ∈ 𝐶 ↦ ( 𝐵 ‘ 𝑥 ) ) ) |
| 7 | ffn | ⊢ ( 𝐴 : 𝐷 ⟶ 𝐸 → 𝐴 Fn 𝐷 ) | |
| 8 | 7 | adantr | ⊢ ( ( 𝐴 : 𝐷 ⟶ 𝐸 ∧ 𝐵 : 𝐶 ⟶ 𝐷 ) → 𝐴 Fn 𝐷 ) |
| 9 | dffn5 | ⊢ ( 𝐴 Fn 𝐷 ↔ 𝐴 = ( 𝑦 ∈ 𝐷 ↦ ( 𝐴 ‘ 𝑦 ) ) ) | |
| 10 | 8 9 | sylib | ⊢ ( ( 𝐴 : 𝐷 ⟶ 𝐸 ∧ 𝐵 : 𝐶 ⟶ 𝐷 ) → 𝐴 = ( 𝑦 ∈ 𝐷 ↦ ( 𝐴 ‘ 𝑦 ) ) ) |
| 11 | fveq2 | ⊢ ( 𝑦 = ( 𝐵 ‘ 𝑥 ) → ( 𝐴 ‘ 𝑦 ) = ( 𝐴 ‘ ( 𝐵 ‘ 𝑥 ) ) ) | |
| 12 | 2 6 10 11 | fmptco | ⊢ ( ( 𝐴 : 𝐷 ⟶ 𝐸 ∧ 𝐵 : 𝐶 ⟶ 𝐷 ) → ( 𝐴 ∘ 𝐵 ) = ( 𝑥 ∈ 𝐶 ↦ ( 𝐴 ‘ ( 𝐵 ‘ 𝑥 ) ) ) ) |