MPE Home Metamath Proof Explorer < Previous   Next >
Nearby theorems
Mirrors  >  Home  >  MPE Home  >  Th. List  >  cusgra2v Structured version   Visualization version   Unicode version

Theorem cusgra2v 25202
Description: A graph with two (different) vertices is complete if and only if there is an edge between these two vertices. (Contributed by Alexander van der Vekens, 12-Oct-2017.) (Proof shortened by Alexander van der Vekens, 16-Dec-2017.)
Assertion
Ref Expression
cusgra2v  |-  ( ( A  e.  V  /\  B  e.  W  /\  A  =/=  B )  -> 
( { A ,  B } USGrph  E  ->  ( { A ,  B } ComplUSGrph  E  <->  { A ,  B }  e.  ran  E ) ) )

Proof of Theorem cusgra2v
Dummy variables  k  n are mutually distinct and distinct from all other variables.
StepHypRef Expression
1 usgrav 25077 . . . . 5  |-  ( { A ,  B } USGrph  E  ->  ( { A ,  B }  e.  _V  /\  E  e.  _V )
)
21adantr 467 . . . 4  |-  ( ( { A ,  B } USGrph  E  /\  ( A  e.  V  /\  B  e.  W  /\  A  =/= 
B ) )  -> 
( { A ,  B }  e.  _V  /\  E  e.  _V )
)
3 iscusgra 25196 . . . 4  |-  ( ( { A ,  B }  e.  _V  /\  E  e.  _V )  ->  ( { A ,  B } ComplUSGrph  E  <-> 
( { A ,  B } USGrph  E  /\  A. k  e.  { A ,  B } A. n  e.  ( { A ,  B }  \  { k } ) { n ,  k }  e.  ran  E ) ) )
42, 3syl 17 . . 3  |-  ( ( { A ,  B } USGrph  E  /\  ( A  e.  V  /\  B  e.  W  /\  A  =/= 
B ) )  -> 
( { A ,  B } ComplUSGrph  E  <->  ( { A ,  B } USGrph  E  /\  A. k  e. 
{ A ,  B } A. n  e.  ( { A ,  B }  \  { k } ) { n ,  k }  e.  ran  E ) ) )
5 3simpa 1006 . . . . . 6  |-  ( ( A  e.  V  /\  B  e.  W  /\  A  =/=  B )  -> 
( A  e.  V  /\  B  e.  W
) )
65adantl 468 . . . . 5  |-  ( ( { A ,  B } USGrph  E  /\  ( A  e.  V  /\  B  e.  W  /\  A  =/= 
B ) )  -> 
( A  e.  V  /\  B  e.  W
) )
7 sneq 3980 . . . . . . . 8  |-  ( k  =  A  ->  { k }  =  { A } )
87difeq2d 3553 . . . . . . 7  |-  ( k  =  A  ->  ( { A ,  B }  \  { k } )  =  ( { A ,  B }  \  { A } ) )
9 preq2 4055 . . . . . . . 8  |-  ( k  =  A  ->  { n ,  k }  =  { n ,  A } )
109eleq1d 2515 . . . . . . 7  |-  ( k  =  A  ->  ( { n ,  k }  e.  ran  E  <->  { n ,  A }  e.  ran  E ) )
118, 10raleqbidv 3003 . . . . . 6  |-  ( k  =  A  ->  ( A. n  e.  ( { A ,  B }  \  { k } ) { n ,  k }  e.  ran  E  <->  A. n  e.  ( { A ,  B }  \  { A } ) { n ,  A }  e.  ran  E ) )
12 sneq 3980 . . . . . . . 8  |-  ( k  =  B  ->  { k }  =  { B } )
1312difeq2d 3553 . . . . . . 7  |-  ( k  =  B  ->  ( { A ,  B }  \  { k } )  =  ( { A ,  B }  \  { B } ) )
14 preq2 4055 . . . . . . . 8  |-  ( k  =  B  ->  { n ,  k }  =  { n ,  B } )
1514eleq1d 2515 . . . . . . 7  |-  ( k  =  B  ->  ( { n ,  k }  e.  ran  E  <->  { n ,  B }  e.  ran  E ) )
1613, 15raleqbidv 3003 . . . . . 6  |-  ( k  =  B  ->  ( A. n  e.  ( { A ,  B }  \  { k } ) { n ,  k }  e.  ran  E  <->  A. n  e.  ( { A ,  B }  \  { B } ) { n ,  B }  e.  ran  E ) )
1711, 16ralprg 4023 . . . . 5  |-  ( ( A  e.  V  /\  B  e.  W )  ->  ( A. k  e. 
{ A ,  B } A. n  e.  ( { A ,  B }  \  { k } ) { n ,  k }  e.  ran  E  <-> 
( A. n  e.  ( { A ,  B }  \  { A } ) { n ,  A }  e.  ran  E  /\  A. n  e.  ( { A ,  B }  \  { B } ) { n ,  B }  e.  ran  E ) ) )
186, 17syl 17 . . . 4  |-  ( ( { A ,  B } USGrph  E  /\  ( A  e.  V  /\  B  e.  W  /\  A  =/= 
B ) )  -> 
( A. k  e. 
{ A ,  B } A. n  e.  ( { A ,  B }  \  { k } ) { n ,  k }  e.  ran  E  <-> 
( A. n  e.  ( { A ,  B }  \  { A } ) { n ,  A }  e.  ran  E  /\  A. n  e.  ( { A ,  B }  \  { B } ) { n ,  B }  e.  ran  E ) ) )
19 ibar 507 . . . . 5  |-  ( { A ,  B } USGrph  E  ->  ( A. k  e.  { A ,  B } A. n  e.  ( { A ,  B }  \  { k } ) { n ,  k }  e.  ran  E  <-> 
( { A ,  B } USGrph  E  /\  A. k  e.  { A ,  B } A. n  e.  ( { A ,  B }  \  { k } ) { n ,  k }  e.  ran  E ) ) )
2019adantr 467 . . . 4  |-  ( ( { A ,  B } USGrph  E  /\  ( A  e.  V  /\  B  e.  W  /\  A  =/= 
B ) )  -> 
( A. k  e. 
{ A ,  B } A. n  e.  ( { A ,  B }  \  { k } ) { n ,  k }  e.  ran  E  <-> 
( { A ,  B } USGrph  E  /\  A. k  e.  { A ,  B } A. n  e.  ( { A ,  B }  \  { k } ) { n ,  k }  e.  ran  E ) ) )
21 difprsn1 4111 . . . . . . . . . 10  |-  ( A  =/=  B  ->  ( { A ,  B }  \  { A } )  =  { B }
)
22213ad2ant3 1032 . . . . . . . . 9  |-  ( ( A  e.  V  /\  B  e.  W  /\  A  =/=  B )  -> 
( { A ,  B }  \  { A } )  =  { B } )
2322adantl 468 . . . . . . . 8  |-  ( ( { A ,  B } USGrph  E  /\  ( A  e.  V  /\  B  e.  W  /\  A  =/= 
B ) )  -> 
( { A ,  B }  \  { A } )  =  { B } )
2423raleqdv 2995 . . . . . . 7  |-  ( ( { A ,  B } USGrph  E  /\  ( A  e.  V  /\  B  e.  W  /\  A  =/= 
B ) )  -> 
( A. n  e.  ( { A ,  B }  \  { A } ) { n ,  A }  e.  ran  E  <->  A. n  e.  { B }  { n ,  A }  e.  ran  E ) )
25 preq1 4054 . . . . . . . . . . 11  |-  ( n  =  B  ->  { n ,  A }  =  { B ,  A }
)
2625eleq1d 2515 . . . . . . . . . 10  |-  ( n  =  B  ->  ( { n ,  A }  e.  ran  E  <->  { B ,  A }  e.  ran  E ) )
2726ralsng 4008 . . . . . . . . 9  |-  ( B  e.  W  ->  ( A. n  e.  { B }  { n ,  A }  e.  ran  E  <->  { B ,  A }  e.  ran  E ) )
28273ad2ant2 1031 . . . . . . . 8  |-  ( ( A  e.  V  /\  B  e.  W  /\  A  =/=  B )  -> 
( A. n  e. 
{ B }  {
n ,  A }  e.  ran  E  <->  { B ,  A }  e.  ran  E ) )
2928adantl 468 . . . . . . 7  |-  ( ( { A ,  B } USGrph  E  /\  ( A  e.  V  /\  B  e.  W  /\  A  =/= 
B ) )  -> 
( A. n  e. 
{ B }  {
n ,  A }  e.  ran  E  <->  { B ,  A }  e.  ran  E ) )
3024, 29bitrd 257 . . . . . 6  |-  ( ( { A ,  B } USGrph  E  /\  ( A  e.  V  /\  B  e.  W  /\  A  =/= 
B ) )  -> 
( A. n  e.  ( { A ,  B }  \  { A } ) { n ,  A }  e.  ran  E  <->  { B ,  A }  e.  ran  E ) )
31 difprsn2 4112 . . . . . . . . . 10  |-  ( A  =/=  B  ->  ( { A ,  B }  \  { B } )  =  { A }
)
32313ad2ant3 1032 . . . . . . . . 9  |-  ( ( A  e.  V  /\  B  e.  W  /\  A  =/=  B )  -> 
( { A ,  B }  \  { B } )  =  { A } )
3332adantl 468 . . . . . . . 8  |-  ( ( { A ,  B } USGrph  E  /\  ( A  e.  V  /\  B  e.  W  /\  A  =/= 
B ) )  -> 
( { A ,  B }  \  { B } )  =  { A } )
3433raleqdv 2995 . . . . . . 7  |-  ( ( { A ,  B } USGrph  E  /\  ( A  e.  V  /\  B  e.  W  /\  A  =/= 
B ) )  -> 
( A. n  e.  ( { A ,  B }  \  { B } ) { n ,  B }  e.  ran  E  <->  A. n  e.  { A }  { n ,  B }  e.  ran  E ) )
35 preq1 4054 . . . . . . . . . . 11  |-  ( n  =  A  ->  { n ,  B }  =  { A ,  B }
)
3635eleq1d 2515 . . . . . . . . . 10  |-  ( n  =  A  ->  ( { n ,  B }  e.  ran  E  <->  { A ,  B }  e.  ran  E ) )
3736ralsng 4008 . . . . . . . . 9  |-  ( A  e.  V  ->  ( A. n  e.  { A }  { n ,  B }  e.  ran  E  <->  { A ,  B }  e.  ran  E ) )
38373ad2ant1 1030 . . . . . . . 8  |-  ( ( A  e.  V  /\  B  e.  W  /\  A  =/=  B )  -> 
( A. n  e. 
{ A }  {
n ,  B }  e.  ran  E  <->  { A ,  B }  e.  ran  E ) )
3938adantl 468 . . . . . . 7  |-  ( ( { A ,  B } USGrph  E  /\  ( A  e.  V  /\  B  e.  W  /\  A  =/= 
B ) )  -> 
( A. n  e. 
{ A }  {
n ,  B }  e.  ran  E  <->  { A ,  B }  e.  ran  E ) )
4034, 39bitrd 257 . . . . . 6  |-  ( ( { A ,  B } USGrph  E  /\  ( A  e.  V  /\  B  e.  W  /\  A  =/= 
B ) )  -> 
( A. n  e.  ( { A ,  B }  \  { B } ) { n ,  B }  e.  ran  E  <->  { A ,  B }  e.  ran  E ) )
4130, 40anbi12d 718 . . . . 5  |-  ( ( { A ,  B } USGrph  E  /\  ( A  e.  V  /\  B  e.  W  /\  A  =/= 
B ) )  -> 
( ( A. n  e.  ( { A ,  B }  \  { A } ) { n ,  A }  e.  ran  E  /\  A. n  e.  ( { A ,  B }  \  { B } ) { n ,  B }  e.  ran  E )  <->  ( { B ,  A }  e.  ran  E  /\  { A ,  B }  e.  ran  E ) ) )
42 prcom 4053 . . . . . . . 8  |-  { B ,  A }  =  { A ,  B }
4342eleq1i 2522 . . . . . . 7  |-  ( { B ,  A }  e.  ran  E  <->  { A ,  B }  e.  ran  E )
4443anbi1i 702 . . . . . 6  |-  ( ( { B ,  A }  e.  ran  E  /\  { A ,  B }  e.  ran  E )  <->  ( { A ,  B }  e.  ran  E  /\  { A ,  B }  e.  ran  E ) )
45 anidm 650 . . . . . 6  |-  ( ( { A ,  B }  e.  ran  E  /\  { A ,  B }  e.  ran  E )  <->  { A ,  B }  e.  ran  E )
4644, 45bitri 253 . . . . 5  |-  ( ( { B ,  A }  e.  ran  E  /\  { A ,  B }  e.  ran  E )  <->  { A ,  B }  e.  ran  E )
4741, 46syl6bb 265 . . . 4  |-  ( ( { A ,  B } USGrph  E  /\  ( A  e.  V  /\  B  e.  W  /\  A  =/= 
B ) )  -> 
( ( A. n  e.  ( { A ,  B }  \  { A } ) { n ,  A }  e.  ran  E  /\  A. n  e.  ( { A ,  B }  \  { B } ) { n ,  B }  e.  ran  E )  <->  { A ,  B }  e.  ran  E ) )
4818, 20, 473bitr3d 287 . . 3  |-  ( ( { A ,  B } USGrph  E  /\  ( A  e.  V  /\  B  e.  W  /\  A  =/= 
B ) )  -> 
( ( { A ,  B } USGrph  E  /\  A. k  e.  { A ,  B } A. n  e.  ( { A ,  B }  \  { k } ) { n ,  k }  e.  ran  E )  <->  { A ,  B }  e.  ran  E ) )
494, 48bitrd 257 . 2  |-  ( ( { A ,  B } USGrph  E  /\  ( A  e.  V  /\  B  e.  W  /\  A  =/= 
B ) )  -> 
( { A ,  B } ComplUSGrph  E  <->  { A ,  B }  e.  ran  E ) )
5049expcom 437 1  |-  ( ( A  e.  V  /\  B  e.  W  /\  A  =/=  B )  -> 
( { A ,  B } USGrph  E  ->  ( { A ,  B } ComplUSGrph  E  <->  { A ,  B }  e.  ran  E ) ) )
Colors of variables: wff setvar class
Syntax hints:    -> wi 4    <-> wb 188    /\ wa 371    /\ w3a 986    = wceq 1446    e. wcel 1889    =/= wne 2624   A.wral 2739   _Vcvv 3047    \ cdif 3403   {csn 3970   {cpr 3972   class class class wbr 4405   ran crn 4838   USGrph cusg 25069   ComplUSGrph ccusgra 25158
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1671  ax-4 1684  ax-5 1760  ax-6 1807  ax-7 1853  ax-9 1898  ax-10 1917  ax-11 1922  ax-12 1935  ax-13 2093  ax-ext 2433  ax-sep 4528  ax-nul 4537  ax-pr 4642
This theorem depends on definitions:  df-bi 189  df-or 372  df-an 373  df-3an 988  df-tru 1449  df-ex 1666  df-nf 1670  df-sb 1800  df-eu 2305  df-mo 2306  df-clab 2440  df-cleq 2446  df-clel 2449  df-nfc 2583  df-ne 2626  df-ral 2744  df-rex 2745  df-rab 2748  df-v 3049  df-sbc 3270  df-dif 3409  df-un 3411  df-in 3413  df-ss 3420  df-nul 3734  df-if 3884  df-sn 3971  df-pr 3973  df-op 3977  df-br 4406  df-opab 4465  df-xp 4843  df-rel 4844  df-cnv 4845  df-dm 4847  df-rn 4848  df-usgra 25072  df-cusgra 25161
This theorem is referenced by: (None)
  Copyright terms: Public domain W3C validator