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

Theorem cusgra2v 25269
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 25144 . . . . 5  |-  ( { A ,  B } USGrph  E  ->  ( { A ,  B }  e.  _V  /\  E  e.  _V )
)
21adantr 472 . . . 4  |-  ( ( { A ,  B } USGrph  E  /\  ( A  e.  V  /\  B  e.  W  /\  A  =/= 
B ) )  -> 
( { A ,  B }  e.  _V  /\  E  e.  _V )
)
3 iscusgra 25263 . . . 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 1027 . . . . . 6  |-  ( ( A  e.  V  /\  B  e.  W  /\  A  =/=  B )  -> 
( A  e.  V  /\  B  e.  W
) )
65adantl 473 . . . . 5  |-  ( ( { A ,  B } USGrph  E  /\  ( A  e.  V  /\  B  e.  W  /\  A  =/= 
B ) )  -> 
( A  e.  V  /\  B  e.  W
) )
7 sneq 3969 . . . . . . . 8  |-  ( k  =  A  ->  { k }  =  { A } )
87difeq2d 3540 . . . . . . 7  |-  ( k  =  A  ->  ( { A ,  B }  \  { k } )  =  ( { A ,  B }  \  { A } ) )
9 preq2 4043 . . . . . . . 8  |-  ( k  =  A  ->  { n ,  k }  =  { n ,  A } )
109eleq1d 2533 . . . . . . 7  |-  ( k  =  A  ->  ( { n ,  k }  e.  ran  E  <->  { n ,  A }  e.  ran  E ) )
118, 10raleqbidv 2987 . . . . . 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 3969 . . . . . . . 8  |-  ( k  =  B  ->  { k }  =  { B } )
1312difeq2d 3540 . . . . . . 7  |-  ( k  =  B  ->  ( { A ,  B }  \  { k } )  =  ( { A ,  B }  \  { B } ) )
14 preq2 4043 . . . . . . . 8  |-  ( k  =  B  ->  { n ,  k }  =  { n ,  B } )
1514eleq1d 2533 . . . . . . 7  |-  ( k  =  B  ->  ( { n ,  k }  e.  ran  E  <->  { n ,  B }  e.  ran  E ) )
1613, 15raleqbidv 2987 . . . . . 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 4012 . . . . 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 512 . . . . 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 472 . . . 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 4099 . . . . . . . . . 10  |-  ( A  =/=  B  ->  ( { A ,  B }  \  { A } )  =  { B }
)
22213ad2ant3 1053 . . . . . . . . 9  |-  ( ( A  e.  V  /\  B  e.  W  /\  A  =/=  B )  -> 
( { A ,  B }  \  { A } )  =  { B } )
2322adantl 473 . . . . . . . 8  |-  ( ( { A ,  B } USGrph  E  /\  ( A  e.  V  /\  B  e.  W  /\  A  =/= 
B ) )  -> 
( { A ,  B }  \  { A } )  =  { B } )
2423raleqdv 2979 . . . . . . 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 4042 . . . . . . . . . . 11  |-  ( n  =  B  ->  { n ,  A }  =  { B ,  A }
)
2625eleq1d 2533 . . . . . . . . . 10  |-  ( n  =  B  ->  ( { n ,  A }  e.  ran  E  <->  { B ,  A }  e.  ran  E ) )
2726ralsng 3997 . . . . . . . . 9  |-  ( B  e.  W  ->  ( A. n  e.  { B }  { n ,  A }  e.  ran  E  <->  { B ,  A }  e.  ran  E ) )
28273ad2ant2 1052 . . . . . . . 8  |-  ( ( A  e.  V  /\  B  e.  W  /\  A  =/=  B )  -> 
( A. n  e. 
{ B }  {
n ,  A }  e.  ran  E  <->  { B ,  A }  e.  ran  E ) )
2928adantl 473 . . . . . . 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 261 . . . . . 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 4100 . . . . . . . . . 10  |-  ( A  =/=  B  ->  ( { A ,  B }  \  { B } )  =  { A }
)
32313ad2ant3 1053 . . . . . . . . 9  |-  ( ( A  e.  V  /\  B  e.  W  /\  A  =/=  B )  -> 
( { A ,  B }  \  { B } )  =  { A } )
3332adantl 473 . . . . . . . 8  |-  ( ( { A ,  B } USGrph  E  /\  ( A  e.  V  /\  B  e.  W  /\  A  =/= 
B ) )  -> 
( { A ,  B }  \  { B } )  =  { A } )
3433raleqdv 2979 . . . . . . 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 4042 . . . . . . . . . . 11  |-  ( n  =  A  ->  { n ,  B }  =  { A ,  B }
)
3635eleq1d 2533 . . . . . . . . . 10  |-  ( n  =  A  ->  ( { n ,  B }  e.  ran  E  <->  { A ,  B }  e.  ran  E ) )
3736ralsng 3997 . . . . . . . . 9  |-  ( A  e.  V  ->  ( A. n  e.  { A }  { n ,  B }  e.  ran  E  <->  { A ,  B }  e.  ran  E ) )
38373ad2ant1 1051 . . . . . . . 8  |-  ( ( A  e.  V  /\  B  e.  W  /\  A  =/=  B )  -> 
( A. n  e. 
{ A }  {
n ,  B }  e.  ran  E  <->  { A ,  B }  e.  ran  E ) )
3938adantl 473 . . . . . . 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 261 . . . . . 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 725 . . . . 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 4041 . . . . . . . 8  |-  { B ,  A }  =  { A ,  B }
4342eleq1i 2540 . . . . . . 7  |-  ( { B ,  A }  e.  ran  E  <->  { A ,  B }  e.  ran  E )
4443anbi1i 709 . . . . . 6  |-  ( ( { B ,  A }  e.  ran  E  /\  { A ,  B }  e.  ran  E )  <->  ( { A ,  B }  e.  ran  E  /\  { A ,  B }  e.  ran  E ) )
45 anidm 656 . . . . . 6  |-  ( ( { A ,  B }  e.  ran  E  /\  { A ,  B }  e.  ran  E )  <->  { A ,  B }  e.  ran  E )
4644, 45bitri 257 . . . . 5  |-  ( ( { B ,  A }  e.  ran  E  /\  { A ,  B }  e.  ran  E )  <->  { A ,  B }  e.  ran  E )
4741, 46syl6bb 269 . . . 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 291 . . 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 261 . 2  |-  ( ( { A ,  B } USGrph  E  /\  ( A  e.  V  /\  B  e.  W  /\  A  =/= 
B ) )  -> 
( { A ,  B } ComplUSGrph  E  <->  { A ,  B }  e.  ran  E ) )
5049expcom 442 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 189    /\ wa 376    /\ w3a 1007    = wceq 1452    e. wcel 1904    =/= wne 2641   A.wral 2756   _Vcvv 3031    \ cdif 3387   {csn 3959   {cpr 3961   class class class wbr 4395   ran crn 4840   USGrph cusg 25136   ComplUSGrph ccusgra 25225
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1677  ax-4 1690  ax-5 1766  ax-6 1813  ax-7 1859  ax-9 1913  ax-10 1932  ax-11 1937  ax-12 1950  ax-13 2104  ax-ext 2451  ax-sep 4518  ax-nul 4527  ax-pr 4639
This theorem depends on definitions:  df-bi 190  df-or 377  df-an 378  df-3an 1009  df-tru 1455  df-ex 1672  df-nf 1676  df-sb 1806  df-eu 2323  df-mo 2324  df-clab 2458  df-cleq 2464  df-clel 2467  df-nfc 2601  df-ne 2643  df-ral 2761  df-rex 2762  df-rab 2765  df-v 3033  df-sbc 3256  df-dif 3393  df-un 3395  df-in 3397  df-ss 3404  df-nul 3723  df-if 3873  df-sn 3960  df-pr 3962  df-op 3966  df-br 4396  df-opab 4455  df-xp 4845  df-rel 4846  df-cnv 4847  df-dm 4849  df-rn 4850  df-usgra 25139  df-cusgra 25228
This theorem is referenced by: (None)
  Copyright terms: Public domain W3C validator