Metamath Proof Explorer


Theorem fveqdmss

Description: If the empty set is not contained in the range of a function, and the function values of another class (not necessarily a function) are equal to the function values of the function for all elements of the domain of the function, then the domain of the function is contained in the domain of the class. (Contributed by AV, 28-Jan-2020)

Ref Expression
Hypothesis fveqdmss.1 𝐷 = dom 𝐵
Assertion fveqdmss ( ( Fun 𝐵 ∧ ∅ ∉ ran 𝐵 ∧ ∀ 𝑥𝐷 ( 𝐴𝑥 ) = ( 𝐵𝑥 ) ) → 𝐷 ⊆ dom 𝐴 )

Proof

Step Hyp Ref Expression
1 fveqdmss.1 𝐷 = dom 𝐵
2 fveq2 ( 𝑥 = 𝑎 → ( 𝐴𝑥 ) = ( 𝐴𝑎 ) )
3 fveq2 ( 𝑥 = 𝑎 → ( 𝐵𝑥 ) = ( 𝐵𝑎 ) )
4 2 3 eqeq12d ( 𝑥 = 𝑎 → ( ( 𝐴𝑥 ) = ( 𝐵𝑥 ) ↔ ( 𝐴𝑎 ) = ( 𝐵𝑎 ) ) )
5 4 rspcva ( ( 𝑎𝐷 ∧ ∀ 𝑥𝐷 ( 𝐴𝑥 ) = ( 𝐵𝑥 ) ) → ( 𝐴𝑎 ) = ( 𝐵𝑎 ) )
6 nelrnfvne ( ( Fun 𝐵𝑎 ∈ dom 𝐵 ∧ ∅ ∉ ran 𝐵 ) → ( 𝐵𝑎 ) ≠ ∅ )
7 n0 ( ( 𝐵𝑎 ) ≠ ∅ ↔ ∃ 𝑏 𝑏 ∈ ( 𝐵𝑎 ) )
8 eleq2 ( ( 𝐵𝑎 ) = ( 𝐴𝑎 ) → ( 𝑏 ∈ ( 𝐵𝑎 ) ↔ 𝑏 ∈ ( 𝐴𝑎 ) ) )
9 8 eqcoms ( ( 𝐴𝑎 ) = ( 𝐵𝑎 ) → ( 𝑏 ∈ ( 𝐵𝑎 ) ↔ 𝑏 ∈ ( 𝐴𝑎 ) ) )
10 elfvdm ( 𝑏 ∈ ( 𝐴𝑎 ) → 𝑎 ∈ dom 𝐴 )
11 9 10 syl6bi ( ( 𝐴𝑎 ) = ( 𝐵𝑎 ) → ( 𝑏 ∈ ( 𝐵𝑎 ) → 𝑎 ∈ dom 𝐴 ) )
12 11 com12 ( 𝑏 ∈ ( 𝐵𝑎 ) → ( ( 𝐴𝑎 ) = ( 𝐵𝑎 ) → 𝑎 ∈ dom 𝐴 ) )
13 12 exlimiv ( ∃ 𝑏 𝑏 ∈ ( 𝐵𝑎 ) → ( ( 𝐴𝑎 ) = ( 𝐵𝑎 ) → 𝑎 ∈ dom 𝐴 ) )
14 7 13 sylbi ( ( 𝐵𝑎 ) ≠ ∅ → ( ( 𝐴𝑎 ) = ( 𝐵𝑎 ) → 𝑎 ∈ dom 𝐴 ) )
15 6 14 syl ( ( Fun 𝐵𝑎 ∈ dom 𝐵 ∧ ∅ ∉ ran 𝐵 ) → ( ( 𝐴𝑎 ) = ( 𝐵𝑎 ) → 𝑎 ∈ dom 𝐴 ) )
16 15 3exp ( Fun 𝐵 → ( 𝑎 ∈ dom 𝐵 → ( ∅ ∉ ran 𝐵 → ( ( 𝐴𝑎 ) = ( 𝐵𝑎 ) → 𝑎 ∈ dom 𝐴 ) ) ) )
17 16 com12 ( 𝑎 ∈ dom 𝐵 → ( Fun 𝐵 → ( ∅ ∉ ran 𝐵 → ( ( 𝐴𝑎 ) = ( 𝐵𝑎 ) → 𝑎 ∈ dom 𝐴 ) ) ) )
18 17 1 eleq2s ( 𝑎𝐷 → ( Fun 𝐵 → ( ∅ ∉ ran 𝐵 → ( ( 𝐴𝑎 ) = ( 𝐵𝑎 ) → 𝑎 ∈ dom 𝐴 ) ) ) )
19 18 com24 ( 𝑎𝐷 → ( ( 𝐴𝑎 ) = ( 𝐵𝑎 ) → ( ∅ ∉ ran 𝐵 → ( Fun 𝐵𝑎 ∈ dom 𝐴 ) ) ) )
20 19 adantr ( ( 𝑎𝐷 ∧ ∀ 𝑥𝐷 ( 𝐴𝑥 ) = ( 𝐵𝑥 ) ) → ( ( 𝐴𝑎 ) = ( 𝐵𝑎 ) → ( ∅ ∉ ran 𝐵 → ( Fun 𝐵𝑎 ∈ dom 𝐴 ) ) ) )
21 5 20 mpd ( ( 𝑎𝐷 ∧ ∀ 𝑥𝐷 ( 𝐴𝑥 ) = ( 𝐵𝑥 ) ) → ( ∅ ∉ ran 𝐵 → ( Fun 𝐵𝑎 ∈ dom 𝐴 ) ) )
22 21 ex ( 𝑎𝐷 → ( ∀ 𝑥𝐷 ( 𝐴𝑥 ) = ( 𝐵𝑥 ) → ( ∅ ∉ ran 𝐵 → ( Fun 𝐵𝑎 ∈ dom 𝐴 ) ) ) )
23 22 com23 ( 𝑎𝐷 → ( ∅ ∉ ran 𝐵 → ( ∀ 𝑥𝐷 ( 𝐴𝑥 ) = ( 𝐵𝑥 ) → ( Fun 𝐵𝑎 ∈ dom 𝐴 ) ) ) )
24 23 com14 ( Fun 𝐵 → ( ∅ ∉ ran 𝐵 → ( ∀ 𝑥𝐷 ( 𝐴𝑥 ) = ( 𝐵𝑥 ) → ( 𝑎𝐷𝑎 ∈ dom 𝐴 ) ) ) )
25 24 3imp ( ( Fun 𝐵 ∧ ∅ ∉ ran 𝐵 ∧ ∀ 𝑥𝐷 ( 𝐴𝑥 ) = ( 𝐵𝑥 ) ) → ( 𝑎𝐷𝑎 ∈ dom 𝐴 ) )
26 25 ssrdv ( ( Fun 𝐵 ∧ ∅ ∉ ran 𝐵 ∧ ∀ 𝑥𝐷 ( 𝐴𝑥 ) = ( 𝐵𝑥 ) ) → 𝐷 ⊆ dom 𝐴 )