Metamath Proof Explorer


Theorem bj-elid6

Description: Characterization of the elements of the diagonal of a Cartesian square. (Contributed by BJ, 22-Jun-2019)

Ref Expression
Assertion bj-elid6
|- ( B e. ( _I |` A ) <-> ( B e. ( A X. A ) /\ ( 1st ` B ) = ( 2nd ` B ) ) )

Proof

Step Hyp Ref Expression
1 df-res
 |-  ( _I |` A ) = ( _I i^i ( A X. _V ) )
2 1 elin2
 |-  ( B e. ( _I |` A ) <-> ( B e. _I /\ B e. ( A X. _V ) ) )
3 2 biancomi
 |-  ( B e. ( _I |` A ) <-> ( B e. ( A X. _V ) /\ B e. _I ) )
4 bj-elid4
 |-  ( B e. ( A X. _V ) -> ( B e. _I <-> ( 1st ` B ) = ( 2nd ` B ) ) )
5 4 pm5.32i
 |-  ( ( B e. ( A X. _V ) /\ B e. _I ) <-> ( B e. ( A X. _V ) /\ ( 1st ` B ) = ( 2nd ` B ) ) )
6 1st2nd2
 |-  ( B e. ( A X. _V ) -> B = <. ( 1st ` B ) , ( 2nd ` B ) >. )
7 6 pm4.71ri
 |-  ( B e. ( A X. _V ) <-> ( B = <. ( 1st ` B ) , ( 2nd ` B ) >. /\ B e. ( A X. _V ) ) )
8 eleq1
 |-  ( B = <. ( 1st ` B ) , ( 2nd ` B ) >. -> ( B e. ( A X. _V ) <-> <. ( 1st ` B ) , ( 2nd ` B ) >. e. ( A X. _V ) ) )
9 8 adantl
 |-  ( ( ( 1st ` B ) = ( 2nd ` B ) /\ B = <. ( 1st ` B ) , ( 2nd ` B ) >. ) -> ( B e. ( A X. _V ) <-> <. ( 1st ` B ) , ( 2nd ` B ) >. e. ( A X. _V ) ) )
10 simpl
 |-  ( ( ( 1st ` B ) e. A /\ ( 2nd ` B ) e. _V ) -> ( 1st ` B ) e. A )
11 10 a1i
 |-  ( ( 1st ` B ) = ( 2nd ` B ) -> ( ( ( 1st ` B ) e. A /\ ( 2nd ` B ) e. _V ) -> ( 1st ` B ) e. A ) )
12 eleq1
 |-  ( ( 1st ` B ) = ( 2nd ` B ) -> ( ( 1st ` B ) e. A <-> ( 2nd ` B ) e. A ) )
13 10 12 syl5ib
 |-  ( ( 1st ` B ) = ( 2nd ` B ) -> ( ( ( 1st ` B ) e. A /\ ( 2nd ` B ) e. _V ) -> ( 2nd ` B ) e. A ) )
14 11 13 jcad
 |-  ( ( 1st ` B ) = ( 2nd ` B ) -> ( ( ( 1st ` B ) e. A /\ ( 2nd ` B ) e. _V ) -> ( ( 1st ` B ) e. A /\ ( 2nd ` B ) e. A ) ) )
15 elex
 |-  ( ( 2nd ` B ) e. A -> ( 2nd ` B ) e. _V )
16 15 anim2i
 |-  ( ( ( 1st ` B ) e. A /\ ( 2nd ` B ) e. A ) -> ( ( 1st ` B ) e. A /\ ( 2nd ` B ) e. _V ) )
17 14 16 impbid1
 |-  ( ( 1st ` B ) = ( 2nd ` B ) -> ( ( ( 1st ` B ) e. A /\ ( 2nd ` B ) e. _V ) <-> ( ( 1st ` B ) e. A /\ ( 2nd ` B ) e. A ) ) )
18 17 adantr
 |-  ( ( ( 1st ` B ) = ( 2nd ` B ) /\ B = <. ( 1st ` B ) , ( 2nd ` B ) >. ) -> ( ( ( 1st ` B ) e. A /\ ( 2nd ` B ) e. _V ) <-> ( ( 1st ` B ) e. A /\ ( 2nd ` B ) e. A ) ) )
19 opelxp
 |-  ( <. ( 1st ` B ) , ( 2nd ` B ) >. e. ( A X. _V ) <-> ( ( 1st ` B ) e. A /\ ( 2nd ` B ) e. _V ) )
20 opelxp
 |-  ( <. ( 1st ` B ) , ( 2nd ` B ) >. e. ( A X. A ) <-> ( ( 1st ` B ) e. A /\ ( 2nd ` B ) e. A ) )
21 18 19 20 3bitr4g
 |-  ( ( ( 1st ` B ) = ( 2nd ` B ) /\ B = <. ( 1st ` B ) , ( 2nd ` B ) >. ) -> ( <. ( 1st ` B ) , ( 2nd ` B ) >. e. ( A X. _V ) <-> <. ( 1st ` B ) , ( 2nd ` B ) >. e. ( A X. A ) ) )
22 eleq1
 |-  ( B = <. ( 1st ` B ) , ( 2nd ` B ) >. -> ( B e. ( A X. A ) <-> <. ( 1st ` B ) , ( 2nd ` B ) >. e. ( A X. A ) ) )
23 22 bicomd
 |-  ( B = <. ( 1st ` B ) , ( 2nd ` B ) >. -> ( <. ( 1st ` B ) , ( 2nd ` B ) >. e. ( A X. A ) <-> B e. ( A X. A ) ) )
24 23 adantl
 |-  ( ( ( 1st ` B ) = ( 2nd ` B ) /\ B = <. ( 1st ` B ) , ( 2nd ` B ) >. ) -> ( <. ( 1st ` B ) , ( 2nd ` B ) >. e. ( A X. A ) <-> B e. ( A X. A ) ) )
25 9 21 24 3bitrd
 |-  ( ( ( 1st ` B ) = ( 2nd ` B ) /\ B = <. ( 1st ` B ) , ( 2nd ` B ) >. ) -> ( B e. ( A X. _V ) <-> B e. ( A X. A ) ) )
26 25 pm5.32da
 |-  ( ( 1st ` B ) = ( 2nd ` B ) -> ( ( B = <. ( 1st ` B ) , ( 2nd ` B ) >. /\ B e. ( A X. _V ) ) <-> ( B = <. ( 1st ` B ) , ( 2nd ` B ) >. /\ B e. ( A X. A ) ) ) )
27 simpr
 |-  ( ( B = <. ( 1st ` B ) , ( 2nd ` B ) >. /\ B e. ( A X. A ) ) -> B e. ( A X. A ) )
28 1st2nd2
 |-  ( B e. ( A X. A ) -> B = <. ( 1st ` B ) , ( 2nd ` B ) >. )
29 28 ancri
 |-  ( B e. ( A X. A ) -> ( B = <. ( 1st ` B ) , ( 2nd ` B ) >. /\ B e. ( A X. A ) ) )
30 27 29 impbii
 |-  ( ( B = <. ( 1st ` B ) , ( 2nd ` B ) >. /\ B e. ( A X. A ) ) <-> B e. ( A X. A ) )
31 26 30 bitrdi
 |-  ( ( 1st ` B ) = ( 2nd ` B ) -> ( ( B = <. ( 1st ` B ) , ( 2nd ` B ) >. /\ B e. ( A X. _V ) ) <-> B e. ( A X. A ) ) )
32 7 31 syl5bb
 |-  ( ( 1st ` B ) = ( 2nd ` B ) -> ( B e. ( A X. _V ) <-> B e. ( A X. A ) ) )
33 32 pm5.32ri
 |-  ( ( B e. ( A X. _V ) /\ ( 1st ` B ) = ( 2nd ` B ) ) <-> ( B e. ( A X. A ) /\ ( 1st ` B ) = ( 2nd ` B ) ) )
34 3 5 33 3bitri
 |-  ( B e. ( _I |` A ) <-> ( B e. ( A X. A ) /\ ( 1st ` B ) = ( 2nd ` B ) ) )