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

Theorem cusgra2v 24589
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 24465 . . . . 5  |-  ( { A ,  B } USGrph  E  ->  ( { A ,  B }  e.  _V  /\  E  e.  _V )
)
21adantr 465 . . . 4  |-  ( ( { A ,  B } USGrph  E  /\  ( A  e.  V  /\  B  e.  W  /\  A  =/= 
B ) )  -> 
( { A ,  B }  e.  _V  /\  E  e.  _V )
)
3 iscusgra 24583 . . . 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 16 . . 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 993 . . . . . 6  |-  ( ( A  e.  V  /\  B  e.  W  /\  A  =/=  B )  -> 
( A  e.  V  /\  B  e.  W
) )
65adantl 466 . . . . 5  |-  ( ( { A ,  B } USGrph  E  /\  ( A  e.  V  /\  B  e.  W  /\  A  =/= 
B ) )  -> 
( A  e.  V  /\  B  e.  W
) )
7 sneq 4042 . . . . . . . 8  |-  ( k  =  A  ->  { k }  =  { A } )
87difeq2d 3618 . . . . . . 7  |-  ( k  =  A  ->  ( { A ,  B }  \  { k } )  =  ( { A ,  B }  \  { A } ) )
9 preq2 4112 . . . . . . . 8  |-  ( k  =  A  ->  { n ,  k }  =  { n ,  A } )
109eleq1d 2526 . . . . . . 7  |-  ( k  =  A  ->  ( { n ,  k }  e.  ran  E  <->  { n ,  A }  e.  ran  E ) )
118, 10raleqbidv 3068 . . . . . 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 4042 . . . . . . . 8  |-  ( k  =  B  ->  { k }  =  { B } )
1312difeq2d 3618 . . . . . . 7  |-  ( k  =  B  ->  ( { A ,  B }  \  { k } )  =  ( { A ,  B }  \  { B } ) )
14 preq2 4112 . . . . . . . 8  |-  ( k  =  B  ->  { n ,  k }  =  { n ,  B } )
1514eleq1d 2526 . . . . . . 7  |-  ( k  =  B  ->  ( { n ,  k }  e.  ran  E  <->  { n ,  B }  e.  ran  E ) )
1613, 15raleqbidv 3068 . . . . . 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 4081 . . . . 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 16 . . . 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 504 . . . . 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 465 . . . 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 4168 . . . . . . . . . 10  |-  ( A  =/=  B  ->  ( { A ,  B }  \  { A } )  =  { B }
)
22213ad2ant3 1019 . . . . . . . . 9  |-  ( ( A  e.  V  /\  B  e.  W  /\  A  =/=  B )  -> 
( { A ,  B }  \  { A } )  =  { B } )
2322adantl 466 . . . . . . . 8  |-  ( ( { A ,  B } USGrph  E  /\  ( A  e.  V  /\  B  e.  W  /\  A  =/= 
B ) )  -> 
( { A ,  B }  \  { A } )  =  { B } )
2423raleqdv 3060 . . . . . . 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 4111 . . . . . . . . . . 11  |-  ( n  =  B  ->  { n ,  A }  =  { B ,  A }
)
2625eleq1d 2526 . . . . . . . . . 10  |-  ( n  =  B  ->  ( { n ,  A }  e.  ran  E  <->  { B ,  A }  e.  ran  E ) )
2726ralsng 4067 . . . . . . . . 9  |-  ( B  e.  W  ->  ( A. n  e.  { B }  { n ,  A }  e.  ran  E  <->  { B ,  A }  e.  ran  E ) )
28273ad2ant2 1018 . . . . . . . 8  |-  ( ( A  e.  V  /\  B  e.  W  /\  A  =/=  B )  -> 
( A. n  e. 
{ B }  {
n ,  A }  e.  ran  E  <->  { B ,  A }  e.  ran  E ) )
2928adantl 466 . . . . . . 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 253 . . . . . 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 4169 . . . . . . . . . 10  |-  ( A  =/=  B  ->  ( { A ,  B }  \  { B } )  =  { A }
)
32313ad2ant3 1019 . . . . . . . . 9  |-  ( ( A  e.  V  /\  B  e.  W  /\  A  =/=  B )  -> 
( { A ,  B }  \  { B } )  =  { A } )
3332adantl 466 . . . . . . . 8  |-  ( ( { A ,  B } USGrph  E  /\  ( A  e.  V  /\  B  e.  W  /\  A  =/= 
B ) )  -> 
( { A ,  B }  \  { B } )  =  { A } )
3433raleqdv 3060 . . . . . . 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 4111 . . . . . . . . . . 11  |-  ( n  =  A  ->  { n ,  B }  =  { A ,  B }
)
3635eleq1d 2526 . . . . . . . . . 10  |-  ( n  =  A  ->  ( { n ,  B }  e.  ran  E  <->  { A ,  B }  e.  ran  E ) )
3736ralsng 4067 . . . . . . . . 9  |-  ( A  e.  V  ->  ( A. n  e.  { A }  { n ,  B }  e.  ran  E  <->  { A ,  B }  e.  ran  E ) )
38373ad2ant1 1017 . . . . . . . 8  |-  ( ( A  e.  V  /\  B  e.  W  /\  A  =/=  B )  -> 
( A. n  e. 
{ A }  {
n ,  B }  e.  ran  E  <->  { A ,  B }  e.  ran  E ) )
3938adantl 466 . . . . . . 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 253 . . . . . 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 710 . . . . 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 4110 . . . . . . . 8  |-  { B ,  A }  =  { A ,  B }
4342eleq1i 2534 . . . . . . 7  |-  ( { B ,  A }  e.  ran  E  <->  { A ,  B }  e.  ran  E )
4443anbi1i 695 . . . . . 6  |-  ( ( { B ,  A }  e.  ran  E  /\  { A ,  B }  e.  ran  E )  <->  ( { A ,  B }  e.  ran  E  /\  { A ,  B }  e.  ran  E ) )
45 anidm 644 . . . . . 6  |-  ( ( { A ,  B }  e.  ran  E  /\  { A ,  B }  e.  ran  E )  <->  { A ,  B }  e.  ran  E )
4644, 45bitri 249 . . . . 5  |-  ( ( { B ,  A }  e.  ran  E  /\  { A ,  B }  e.  ran  E )  <->  { A ,  B }  e.  ran  E )
4741, 46syl6bb 261 . . . 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 283 . . 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 253 . 2  |-  ( ( { A ,  B } USGrph  E  /\  ( A  e.  V  /\  B  e.  W  /\  A  =/= 
B ) )  -> 
( { A ,  B } ComplUSGrph  E  <->  { A ,  B }  e.  ran  E ) )
5049expcom 435 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 184    /\ wa 369    /\ w3a 973    = wceq 1395    e. wcel 1819    =/= wne 2652   A.wral 2807   _Vcvv 3109    \ cdif 3468   {csn 4032   {cpr 4034   class class class wbr 4456   ran crn 5009   USGrph cusg 24457   ComplUSGrph ccusgra 24545
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1619  ax-4 1632  ax-5 1705  ax-6 1748  ax-7 1791  ax-9 1823  ax-10 1838  ax-11 1843  ax-12 1855  ax-13 2000  ax-ext 2435  ax-sep 4578  ax-nul 4586  ax-pr 4695
This theorem depends on definitions:  df-bi 185  df-or 370  df-an 371  df-3an 975  df-tru 1398  df-ex 1614  df-nf 1618  df-sb 1741  df-eu 2287  df-mo 2288  df-clab 2443  df-cleq 2449  df-clel 2452  df-nfc 2607  df-ne 2654  df-ral 2812  df-rex 2813  df-rab 2816  df-v 3111  df-sbc 3328  df-dif 3474  df-un 3476  df-in 3478  df-ss 3485  df-nul 3794  df-if 3945  df-sn 4033  df-pr 4035  df-op 4039  df-br 4457  df-opab 4516  df-xp 5014  df-rel 5015  df-cnv 5016  df-dm 5018  df-rn 5019  df-usgra 24460  df-cusgra 24548
This theorem is referenced by: (None)
  Copyright terms: Public domain W3C validator