Metamath Proof Explorer


Theorem fveqressseq

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 class restricted to the domain of the function is the function itself. (Contributed by AV, 28-Jan-2020)

Ref Expression
Hypothesis fveqdmss.1
|- D = dom B
Assertion fveqressseq
|- ( ( Fun B /\ (/) e/ ran B /\ A. x e. D ( A ` x ) = ( B ` x ) ) -> ( A |` D ) = B )

Proof

Step Hyp Ref Expression
1 fveqdmss.1
 |-  D = dom B
2 1 fveqdmss
 |-  ( ( Fun B /\ (/) e/ ran B /\ A. x e. D ( A ` x ) = ( B ` x ) ) -> D C_ dom A )
3 dmres
 |-  dom ( A |` D ) = ( D i^i dom A )
4 incom
 |-  ( D i^i dom A ) = ( dom A i^i D )
5 sseqin2
 |-  ( D C_ dom A <-> ( dom A i^i D ) = D )
6 5 biimpi
 |-  ( D C_ dom A -> ( dom A i^i D ) = D )
7 4 6 eqtrid
 |-  ( D C_ dom A -> ( D i^i dom A ) = D )
8 3 7 eqtrid
 |-  ( D C_ dom A -> dom ( A |` D ) = D )
9 8 1 eqtrdi
 |-  ( D C_ dom A -> dom ( A |` D ) = dom B )
10 2 9 syl
 |-  ( ( Fun B /\ (/) e/ ran B /\ A. x e. D ( A ` x ) = ( B ` x ) ) -> dom ( A |` D ) = dom B )
11 fvres
 |-  ( x e. D -> ( ( A |` D ) ` x ) = ( A ` x ) )
12 11 adantl
 |-  ( ( ( Fun B /\ (/) e/ ran B ) /\ x e. D ) -> ( ( A |` D ) ` x ) = ( A ` x ) )
13 id
 |-  ( ( A ` x ) = ( B ` x ) -> ( A ` x ) = ( B ` x ) )
14 12 13 sylan9eq
 |-  ( ( ( ( Fun B /\ (/) e/ ran B ) /\ x e. D ) /\ ( A ` x ) = ( B ` x ) ) -> ( ( A |` D ) ` x ) = ( B ` x ) )
15 14 ex
 |-  ( ( ( Fun B /\ (/) e/ ran B ) /\ x e. D ) -> ( ( A ` x ) = ( B ` x ) -> ( ( A |` D ) ` x ) = ( B ` x ) ) )
16 15 ralimdva
 |-  ( ( Fun B /\ (/) e/ ran B ) -> ( A. x e. D ( A ` x ) = ( B ` x ) -> A. x e. D ( ( A |` D ) ` x ) = ( B ` x ) ) )
17 16 3impia
 |-  ( ( Fun B /\ (/) e/ ran B /\ A. x e. D ( A ` x ) = ( B ` x ) ) -> A. x e. D ( ( A |` D ) ` x ) = ( B ` x ) )
18 2 7 syl
 |-  ( ( Fun B /\ (/) e/ ran B /\ A. x e. D ( A ` x ) = ( B ` x ) ) -> ( D i^i dom A ) = D )
19 3 18 eqtrid
 |-  ( ( Fun B /\ (/) e/ ran B /\ A. x e. D ( A ` x ) = ( B ` x ) ) -> dom ( A |` D ) = D )
20 19 raleqdv
 |-  ( ( Fun B /\ (/) e/ ran B /\ A. x e. D ( A ` x ) = ( B ` x ) ) -> ( A. x e. dom ( A |` D ) ( ( A |` D ) ` x ) = ( B ` x ) <-> A. x e. D ( ( A |` D ) ` x ) = ( B ` x ) ) )
21 17 20 mpbird
 |-  ( ( Fun B /\ (/) e/ ran B /\ A. x e. D ( A ` x ) = ( B ` x ) ) -> A. x e. dom ( A |` D ) ( ( A |` D ) ` x ) = ( B ` x ) )
22 simpll
 |-  ( ( ( Fun B /\ (/) e/ ran B ) /\ x e. D ) -> Fun B )
23 1 eleq2i
 |-  ( x e. D <-> x e. dom B )
24 23 biimpi
 |-  ( x e. D -> x e. dom B )
25 24 adantl
 |-  ( ( ( Fun B /\ (/) e/ ran B ) /\ x e. D ) -> x e. dom B )
26 simplr
 |-  ( ( ( Fun B /\ (/) e/ ran B ) /\ x e. D ) -> (/) e/ ran B )
27 nelrnfvne
 |-  ( ( Fun B /\ x e. dom B /\ (/) e/ ran B ) -> ( B ` x ) =/= (/) )
28 22 25 26 27 syl3anc
 |-  ( ( ( Fun B /\ (/) e/ ran B ) /\ x e. D ) -> ( B ` x ) =/= (/) )
29 neeq1
 |-  ( ( A ` x ) = ( B ` x ) -> ( ( A ` x ) =/= (/) <-> ( B ` x ) =/= (/) ) )
30 28 29 syl5ibrcom
 |-  ( ( ( Fun B /\ (/) e/ ran B ) /\ x e. D ) -> ( ( A ` x ) = ( B ` x ) -> ( A ` x ) =/= (/) ) )
31 30 ralimdva
 |-  ( ( Fun B /\ (/) e/ ran B ) -> ( A. x e. D ( A ` x ) = ( B ` x ) -> A. x e. D ( A ` x ) =/= (/) ) )
32 31 3impia
 |-  ( ( Fun B /\ (/) e/ ran B /\ A. x e. D ( A ` x ) = ( B ` x ) ) -> A. x e. D ( A ` x ) =/= (/) )
33 fvn0ssdmfun
 |-  ( A. x e. D ( A ` x ) =/= (/) -> ( D C_ dom A /\ Fun ( A |` D ) ) )
34 33 simprd
 |-  ( A. x e. D ( A ` x ) =/= (/) -> Fun ( A |` D ) )
35 32 34 syl
 |-  ( ( Fun B /\ (/) e/ ran B /\ A. x e. D ( A ` x ) = ( B ` x ) ) -> Fun ( A |` D ) )
36 simp1
 |-  ( ( Fun B /\ (/) e/ ran B /\ A. x e. D ( A ` x ) = ( B ` x ) ) -> Fun B )
37 eqfunfv
 |-  ( ( Fun ( A |` D ) /\ Fun B ) -> ( ( A |` D ) = B <-> ( dom ( A |` D ) = dom B /\ A. x e. dom ( A |` D ) ( ( A |` D ) ` x ) = ( B ` x ) ) ) )
38 35 36 37 syl2anc
 |-  ( ( Fun B /\ (/) e/ ran B /\ A. x e. D ( A ` x ) = ( B ` x ) ) -> ( ( A |` D ) = B <-> ( dom ( A |` D ) = dom B /\ A. x e. dom ( A |` D ) ( ( A |` D ) ` x ) = ( B ` x ) ) ) )
39 10 21 38 mpbir2and
 |-  ( ( Fun B /\ (/) e/ ran B /\ A. x e. D ( A ` x ) = ( B ` x ) ) -> ( A |` D ) = B )