Metamath Proof Explorer


Theorem brfvrcld2

Description: If two elements are connected by the reflexive closure of a relation, then they are equal or related by relation. (Contributed by RP, 21-Jul-2020)

Ref Expression
Hypothesis brfvrcld2.r
|- ( ph -> R e. _V )
Assertion brfvrcld2
|- ( ph -> ( A ( r* ` R ) B <-> ( ( A e. ( dom R u. ran R ) /\ B e. ( dom R u. ran R ) /\ A = B ) \/ A R B ) ) )

Proof

Step Hyp Ref Expression
1 brfvrcld2.r
 |-  ( ph -> R e. _V )
2 1 brfvrcld
 |-  ( ph -> ( A ( r* ` R ) B <-> ( A ( R ^r 0 ) B \/ A ( R ^r 1 ) B ) ) )
3 relexp0g
 |-  ( R e. _V -> ( R ^r 0 ) = ( _I |` ( dom R u. ran R ) ) )
4 1 3 syl
 |-  ( ph -> ( R ^r 0 ) = ( _I |` ( dom R u. ran R ) ) )
5 4 breqd
 |-  ( ph -> ( A ( R ^r 0 ) B <-> A ( _I |` ( dom R u. ran R ) ) B ) )
6 relres
 |-  Rel ( _I |` ( dom R u. ran R ) )
7 6 releldmi
 |-  ( A ( _I |` ( dom R u. ran R ) ) B -> A e. dom ( _I |` ( dom R u. ran R ) ) )
8 6 relelrni
 |-  ( A ( _I |` ( dom R u. ran R ) ) B -> B e. ran ( _I |` ( dom R u. ran R ) ) )
9 dmresi
 |-  dom ( _I |` ( dom R u. ran R ) ) = ( dom R u. ran R )
10 9 eleq2i
 |-  ( A e. dom ( _I |` ( dom R u. ran R ) ) <-> A e. ( dom R u. ran R ) )
11 10 biimpi
 |-  ( A e. dom ( _I |` ( dom R u. ran R ) ) -> A e. ( dom R u. ran R ) )
12 rnresi
 |-  ran ( _I |` ( dom R u. ran R ) ) = ( dom R u. ran R )
13 12 eleq2i
 |-  ( B e. ran ( _I |` ( dom R u. ran R ) ) <-> B e. ( dom R u. ran R ) )
14 13 biimpi
 |-  ( B e. ran ( _I |` ( dom R u. ran R ) ) -> B e. ( dom R u. ran R ) )
15 11 14 anim12i
 |-  ( ( A e. dom ( _I |` ( dom R u. ran R ) ) /\ B e. ran ( _I |` ( dom R u. ran R ) ) ) -> ( A e. ( dom R u. ran R ) /\ B e. ( dom R u. ran R ) ) )
16 7 8 15 syl2anc
 |-  ( A ( _I |` ( dom R u. ran R ) ) B -> ( A e. ( dom R u. ran R ) /\ B e. ( dom R u. ran R ) ) )
17 resieq
 |-  ( ( A e. ( dom R u. ran R ) /\ B e. ( dom R u. ran R ) ) -> ( A ( _I |` ( dom R u. ran R ) ) B <-> A = B ) )
18 16 17 biadanii
 |-  ( A ( _I |` ( dom R u. ran R ) ) B <-> ( ( A e. ( dom R u. ran R ) /\ B e. ( dom R u. ran R ) ) /\ A = B ) )
19 df-3an
 |-  ( ( A e. ( dom R u. ran R ) /\ B e. ( dom R u. ran R ) /\ A = B ) <-> ( ( A e. ( dom R u. ran R ) /\ B e. ( dom R u. ran R ) ) /\ A = B ) )
20 18 19 bitr4i
 |-  ( A ( _I |` ( dom R u. ran R ) ) B <-> ( A e. ( dom R u. ran R ) /\ B e. ( dom R u. ran R ) /\ A = B ) )
21 5 20 bitrdi
 |-  ( ph -> ( A ( R ^r 0 ) B <-> ( A e. ( dom R u. ran R ) /\ B e. ( dom R u. ran R ) /\ A = B ) ) )
22 1 relexp1d
 |-  ( ph -> ( R ^r 1 ) = R )
23 22 breqd
 |-  ( ph -> ( A ( R ^r 1 ) B <-> A R B ) )
24 21 23 orbi12d
 |-  ( ph -> ( ( A ( R ^r 0 ) B \/ A ( R ^r 1 ) B ) <-> ( ( A e. ( dom R u. ran R ) /\ B e. ( dom R u. ran R ) /\ A = B ) \/ A R B ) ) )
25 2 24 bitrd
 |-  ( ph -> ( A ( r* ` R ) B <-> ( ( A e. ( dom R u. ran R ) /\ B e. ( dom R u. ran R ) /\ A = B ) \/ A R B ) ) )