Metamath Proof Explorer


Theorem setsfun0

Description: A structure with replacement without the empty set is a function if the original structure without the empty set is a function. This variant of setsfun is useful for proofs based on isstruct2 which requires Fun ( F \ { (/) } ) for F to be an extensible structure. (Contributed by AV, 7-Jun-2021)

Ref Expression
Assertion setsfun0
|- ( ( ( G e. V /\ Fun ( G \ { (/) } ) ) /\ ( I e. U /\ E e. W ) ) -> Fun ( ( G sSet <. I , E >. ) \ { (/) } ) )

Proof

Step Hyp Ref Expression
1 funres
 |-  ( Fun ( G \ { (/) } ) -> Fun ( ( G \ { (/) } ) |` ( _V \ dom { <. I , E >. } ) ) )
2 1 adantl
 |-  ( ( G e. V /\ Fun ( G \ { (/) } ) ) -> Fun ( ( G \ { (/) } ) |` ( _V \ dom { <. I , E >. } ) ) )
3 2 adantr
 |-  ( ( ( G e. V /\ Fun ( G \ { (/) } ) ) /\ ( I e. U /\ E e. W ) ) -> Fun ( ( G \ { (/) } ) |` ( _V \ dom { <. I , E >. } ) ) )
4 funsng
 |-  ( ( I e. U /\ E e. W ) -> Fun { <. I , E >. } )
5 4 adantl
 |-  ( ( ( G e. V /\ Fun ( G \ { (/) } ) ) /\ ( I e. U /\ E e. W ) ) -> Fun { <. I , E >. } )
6 dmres
 |-  dom ( ( G \ { (/) } ) |` ( _V \ dom { <. I , E >. } ) ) = ( ( _V \ dom { <. I , E >. } ) i^i dom ( G \ { (/) } ) )
7 6 ineq1i
 |-  ( dom ( ( G \ { (/) } ) |` ( _V \ dom { <. I , E >. } ) ) i^i dom { <. I , E >. } ) = ( ( ( _V \ dom { <. I , E >. } ) i^i dom ( G \ { (/) } ) ) i^i dom { <. I , E >. } )
8 in32
 |-  ( ( ( _V \ dom { <. I , E >. } ) i^i dom ( G \ { (/) } ) ) i^i dom { <. I , E >. } ) = ( ( ( _V \ dom { <. I , E >. } ) i^i dom { <. I , E >. } ) i^i dom ( G \ { (/) } ) )
9 disjdifr
 |-  ( ( _V \ dom { <. I , E >. } ) i^i dom { <. I , E >. } ) = (/)
10 9 ineq1i
 |-  ( ( ( _V \ dom { <. I , E >. } ) i^i dom { <. I , E >. } ) i^i dom ( G \ { (/) } ) ) = ( (/) i^i dom ( G \ { (/) } ) )
11 0in
 |-  ( (/) i^i dom ( G \ { (/) } ) ) = (/)
12 8 10 11 3eqtri
 |-  ( ( ( _V \ dom { <. I , E >. } ) i^i dom ( G \ { (/) } ) ) i^i dom { <. I , E >. } ) = (/)
13 7 12 eqtri
 |-  ( dom ( ( G \ { (/) } ) |` ( _V \ dom { <. I , E >. } ) ) i^i dom { <. I , E >. } ) = (/)
14 13 a1i
 |-  ( ( ( G e. V /\ Fun ( G \ { (/) } ) ) /\ ( I e. U /\ E e. W ) ) -> ( dom ( ( G \ { (/) } ) |` ( _V \ dom { <. I , E >. } ) ) i^i dom { <. I , E >. } ) = (/) )
15 funun
 |-  ( ( ( Fun ( ( G \ { (/) } ) |` ( _V \ dom { <. I , E >. } ) ) /\ Fun { <. I , E >. } ) /\ ( dom ( ( G \ { (/) } ) |` ( _V \ dom { <. I , E >. } ) ) i^i dom { <. I , E >. } ) = (/) ) -> Fun ( ( ( G \ { (/) } ) |` ( _V \ dom { <. I , E >. } ) ) u. { <. I , E >. } ) )
16 3 5 14 15 syl21anc
 |-  ( ( ( G e. V /\ Fun ( G \ { (/) } ) ) /\ ( I e. U /\ E e. W ) ) -> Fun ( ( ( G \ { (/) } ) |` ( _V \ dom { <. I , E >. } ) ) u. { <. I , E >. } ) )
17 difundir
 |-  ( ( ( G |` ( _V \ dom { <. I , E >. } ) ) u. { <. I , E >. } ) \ { (/) } ) = ( ( ( G |` ( _V \ dom { <. I , E >. } ) ) \ { (/) } ) u. ( { <. I , E >. } \ { (/) } ) )
18 resdifcom
 |-  ( ( G |` ( _V \ dom { <. I , E >. } ) ) \ { (/) } ) = ( ( G \ { (/) } ) |` ( _V \ dom { <. I , E >. } ) )
19 18 a1i
 |-  ( ( ( G e. V /\ Fun ( G \ { (/) } ) ) /\ ( I e. U /\ E e. W ) ) -> ( ( G |` ( _V \ dom { <. I , E >. } ) ) \ { (/) } ) = ( ( G \ { (/) } ) |` ( _V \ dom { <. I , E >. } ) ) )
20 elex
 |-  ( I e. U -> I e. _V )
21 elex
 |-  ( E e. W -> E e. _V )
22 20 21 anim12i
 |-  ( ( I e. U /\ E e. W ) -> ( I e. _V /\ E e. _V ) )
23 opnz
 |-  ( <. I , E >. =/= (/) <-> ( I e. _V /\ E e. _V ) )
24 22 23 sylibr
 |-  ( ( I e. U /\ E e. W ) -> <. I , E >. =/= (/) )
25 24 adantl
 |-  ( ( ( G e. V /\ Fun ( G \ { (/) } ) ) /\ ( I e. U /\ E e. W ) ) -> <. I , E >. =/= (/) )
26 disjsn2
 |-  ( <. I , E >. =/= (/) -> ( { <. I , E >. } i^i { (/) } ) = (/) )
27 disjdif2
 |-  ( ( { <. I , E >. } i^i { (/) } ) = (/) -> ( { <. I , E >. } \ { (/) } ) = { <. I , E >. } )
28 25 26 27 3syl
 |-  ( ( ( G e. V /\ Fun ( G \ { (/) } ) ) /\ ( I e. U /\ E e. W ) ) -> ( { <. I , E >. } \ { (/) } ) = { <. I , E >. } )
29 19 28 uneq12d
 |-  ( ( ( G e. V /\ Fun ( G \ { (/) } ) ) /\ ( I e. U /\ E e. W ) ) -> ( ( ( G |` ( _V \ dom { <. I , E >. } ) ) \ { (/) } ) u. ( { <. I , E >. } \ { (/) } ) ) = ( ( ( G \ { (/) } ) |` ( _V \ dom { <. I , E >. } ) ) u. { <. I , E >. } ) )
30 17 29 eqtrid
 |-  ( ( ( G e. V /\ Fun ( G \ { (/) } ) ) /\ ( I e. U /\ E e. W ) ) -> ( ( ( G |` ( _V \ dom { <. I , E >. } ) ) u. { <. I , E >. } ) \ { (/) } ) = ( ( ( G \ { (/) } ) |` ( _V \ dom { <. I , E >. } ) ) u. { <. I , E >. } ) )
31 30 funeqd
 |-  ( ( ( G e. V /\ Fun ( G \ { (/) } ) ) /\ ( I e. U /\ E e. W ) ) -> ( Fun ( ( ( G |` ( _V \ dom { <. I , E >. } ) ) u. { <. I , E >. } ) \ { (/) } ) <-> Fun ( ( ( G \ { (/) } ) |` ( _V \ dom { <. I , E >. } ) ) u. { <. I , E >. } ) ) )
32 16 31 mpbird
 |-  ( ( ( G e. V /\ Fun ( G \ { (/) } ) ) /\ ( I e. U /\ E e. W ) ) -> Fun ( ( ( G |` ( _V \ dom { <. I , E >. } ) ) u. { <. I , E >. } ) \ { (/) } ) )
33 opex
 |-  <. I , E >. e. _V
34 33 a1i
 |-  ( Fun ( G \ { (/) } ) -> <. I , E >. e. _V )
35 setsvalg
 |-  ( ( G e. V /\ <. I , E >. e. _V ) -> ( G sSet <. I , E >. ) = ( ( G |` ( _V \ dom { <. I , E >. } ) ) u. { <. I , E >. } ) )
36 34 35 sylan2
 |-  ( ( G e. V /\ Fun ( G \ { (/) } ) ) -> ( G sSet <. I , E >. ) = ( ( G |` ( _V \ dom { <. I , E >. } ) ) u. { <. I , E >. } ) )
37 36 difeq1d
 |-  ( ( G e. V /\ Fun ( G \ { (/) } ) ) -> ( ( G sSet <. I , E >. ) \ { (/) } ) = ( ( ( G |` ( _V \ dom { <. I , E >. } ) ) u. { <. I , E >. } ) \ { (/) } ) )
38 37 funeqd
 |-  ( ( G e. V /\ Fun ( G \ { (/) } ) ) -> ( Fun ( ( G sSet <. I , E >. ) \ { (/) } ) <-> Fun ( ( ( G |` ( _V \ dom { <. I , E >. } ) ) u. { <. I , E >. } ) \ { (/) } ) ) )
39 38 adantr
 |-  ( ( ( G e. V /\ Fun ( G \ { (/) } ) ) /\ ( I e. U /\ E e. W ) ) -> ( Fun ( ( G sSet <. I , E >. ) \ { (/) } ) <-> Fun ( ( ( G |` ( _V \ dom { <. I , E >. } ) ) u. { <. I , E >. } ) \ { (/) } ) ) )
40 32 39 mpbird
 |-  ( ( ( G e. V /\ Fun ( G \ { (/) } ) ) /\ ( I e. U /\ E e. W ) ) -> Fun ( ( G sSet <. I , E >. ) \ { (/) } ) )