Metamath Proof Explorer


Theorem dmcosseq

Description: Domain of a composition. (Contributed by NM, 28-May-1998) (Proof shortened by Andrew Salmon, 27-Aug-2011)

Ref Expression
Assertion dmcosseq ( ran 𝐵 ⊆ dom 𝐴 → dom ( 𝐴𝐵 ) = dom 𝐵 )

Proof

Step Hyp Ref Expression
1 dmcoss dom ( 𝐴𝐵 ) ⊆ dom 𝐵
2 1 a1i ( ran 𝐵 ⊆ dom 𝐴 → dom ( 𝐴𝐵 ) ⊆ dom 𝐵 )
3 ssel ( ran 𝐵 ⊆ dom 𝐴 → ( 𝑦 ∈ ran 𝐵𝑦 ∈ dom 𝐴 ) )
4 vex 𝑦 ∈ V
5 4 elrn ( 𝑦 ∈ ran 𝐵 ↔ ∃ 𝑥 𝑥 𝐵 𝑦 )
6 4 eldm ( 𝑦 ∈ dom 𝐴 ↔ ∃ 𝑧 𝑦 𝐴 𝑧 )
7 5 6 imbi12i ( ( 𝑦 ∈ ran 𝐵𝑦 ∈ dom 𝐴 ) ↔ ( ∃ 𝑥 𝑥 𝐵 𝑦 → ∃ 𝑧 𝑦 𝐴 𝑧 ) )
8 19.8a ( 𝑥 𝐵 𝑦 → ∃ 𝑥 𝑥 𝐵 𝑦 )
9 8 imim1i ( ( ∃ 𝑥 𝑥 𝐵 𝑦 → ∃ 𝑧 𝑦 𝐴 𝑧 ) → ( 𝑥 𝐵 𝑦 → ∃ 𝑧 𝑦 𝐴 𝑧 ) )
10 pm3.2 ( 𝑥 𝐵 𝑦 → ( 𝑦 𝐴 𝑧 → ( 𝑥 𝐵 𝑦𝑦 𝐴 𝑧 ) ) )
11 10 eximdv ( 𝑥 𝐵 𝑦 → ( ∃ 𝑧 𝑦 𝐴 𝑧 → ∃ 𝑧 ( 𝑥 𝐵 𝑦𝑦 𝐴 𝑧 ) ) )
12 9 11 sylcom ( ( ∃ 𝑥 𝑥 𝐵 𝑦 → ∃ 𝑧 𝑦 𝐴 𝑧 ) → ( 𝑥 𝐵 𝑦 → ∃ 𝑧 ( 𝑥 𝐵 𝑦𝑦 𝐴 𝑧 ) ) )
13 7 12 sylbi ( ( 𝑦 ∈ ran 𝐵𝑦 ∈ dom 𝐴 ) → ( 𝑥 𝐵 𝑦 → ∃ 𝑧 ( 𝑥 𝐵 𝑦𝑦 𝐴 𝑧 ) ) )
14 3 13 syl ( ran 𝐵 ⊆ dom 𝐴 → ( 𝑥 𝐵 𝑦 → ∃ 𝑧 ( 𝑥 𝐵 𝑦𝑦 𝐴 𝑧 ) ) )
15 14 eximdv ( ran 𝐵 ⊆ dom 𝐴 → ( ∃ 𝑦 𝑥 𝐵 𝑦 → ∃ 𝑦𝑧 ( 𝑥 𝐵 𝑦𝑦 𝐴 𝑧 ) ) )
16 excom ( ∃ 𝑧𝑦 ( 𝑥 𝐵 𝑦𝑦 𝐴 𝑧 ) ↔ ∃ 𝑦𝑧 ( 𝑥 𝐵 𝑦𝑦 𝐴 𝑧 ) )
17 15 16 syl6ibr ( ran 𝐵 ⊆ dom 𝐴 → ( ∃ 𝑦 𝑥 𝐵 𝑦 → ∃ 𝑧𝑦 ( 𝑥 𝐵 𝑦𝑦 𝐴 𝑧 ) ) )
18 vex 𝑥 ∈ V
19 vex 𝑧 ∈ V
20 18 19 opelco ( ⟨ 𝑥 , 𝑧 ⟩ ∈ ( 𝐴𝐵 ) ↔ ∃ 𝑦 ( 𝑥 𝐵 𝑦𝑦 𝐴 𝑧 ) )
21 20 exbii ( ∃ 𝑧𝑥 , 𝑧 ⟩ ∈ ( 𝐴𝐵 ) ↔ ∃ 𝑧𝑦 ( 𝑥 𝐵 𝑦𝑦 𝐴 𝑧 ) )
22 17 21 syl6ibr ( ran 𝐵 ⊆ dom 𝐴 → ( ∃ 𝑦 𝑥 𝐵 𝑦 → ∃ 𝑧𝑥 , 𝑧 ⟩ ∈ ( 𝐴𝐵 ) ) )
23 18 eldm ( 𝑥 ∈ dom 𝐵 ↔ ∃ 𝑦 𝑥 𝐵 𝑦 )
24 18 eldm2 ( 𝑥 ∈ dom ( 𝐴𝐵 ) ↔ ∃ 𝑧𝑥 , 𝑧 ⟩ ∈ ( 𝐴𝐵 ) )
25 22 23 24 3imtr4g ( ran 𝐵 ⊆ dom 𝐴 → ( 𝑥 ∈ dom 𝐵𝑥 ∈ dom ( 𝐴𝐵 ) ) )
26 25 ssrdv ( ran 𝐵 ⊆ dom 𝐴 → dom 𝐵 ⊆ dom ( 𝐴𝐵 ) )
27 2 26 eqssd ( ran 𝐵 ⊆ dom 𝐴 → dom ( 𝐴𝐵 ) = dom 𝐵 )