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

Theorem cusgra2v 24126
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 24003 . . . . 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 24120 . . . 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 988 . . . . . 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 4032 . . . . . . . 8  |-  ( k  =  A  ->  { k }  =  { A } )
87difeq2d 3617 . . . . . . 7  |-  ( k  =  A  ->  ( { A ,  B }  \  { k } )  =  ( { A ,  B }  \  { A } ) )
9 preq2 4102 . . . . . . . 8  |-  ( k  =  A  ->  { n ,  k }  =  { n ,  A } )
109eleq1d 2531 . . . . . . 7  |-  ( k  =  A  ->  ( { n ,  k }  e.  ran  E  <->  { n ,  A }  e.  ran  E ) )
118, 10raleqbidv 3067 . . . . . 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 4032 . . . . . . . 8  |-  ( k  =  B  ->  { k }  =  { B } )
1312difeq2d 3617 . . . . . . 7  |-  ( k  =  B  ->  ( { A ,  B }  \  { k } )  =  ( { A ,  B }  \  { B } ) )
14 preq2 4102 . . . . . . . 8  |-  ( k  =  B  ->  { n ,  k }  =  { n ,  B } )
1514eleq1d 2531 . . . . . . 7  |-  ( k  =  B  ->  ( { n ,  k }  e.  ran  E  <->  { n ,  B }  e.  ran  E ) )
1613, 15raleqbidv 3067 . . . . . 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 4071 . . . . 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 4158 . . . . . . . . . 10  |-  ( A  =/=  B  ->  ( { A ,  B }  \  { A } )  =  { B }
)
22213ad2ant3 1014 . . . . . . . . 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 3059 . . . . . . 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 4101 . . . . . . . . . . 11  |-  ( n  =  B  ->  { n ,  A }  =  { B ,  A }
)
2625eleq1d 2531 . . . . . . . . . 10  |-  ( n  =  B  ->  ( { n ,  A }  e.  ran  E  <->  { B ,  A }  e.  ran  E ) )
2726ralsng 4057 . . . . . . . . 9  |-  ( B  e.  W  ->  ( A. n  e.  { B }  { n ,  A }  e.  ran  E  <->  { B ,  A }  e.  ran  E ) )
28273ad2ant2 1013 . . . . . . . 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 4159 . . . . . . . . . 10  |-  ( A  =/=  B  ->  ( { A ,  B }  \  { B } )  =  { A }
)
32313ad2ant3 1014 . . . . . . . . 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 3059 . . . . . . 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 4101 . . . . . . . . . . 11  |-  ( n  =  A  ->  { n ,  B }  =  { A ,  B }
)
3635eleq1d 2531 . . . . . . . . . 10  |-  ( n  =  A  ->  ( { n ,  B }  e.  ran  E  <->  { A ,  B }  e.  ran  E ) )
3736ralsng 4057 . . . . . . . . 9  |-  ( A  e.  V  ->  ( A. n  e.  { A }  { n ,  B }  e.  ran  E  <->  { A ,  B }  e.  ran  E ) )
38373ad2ant1 1012 . . . . . . . 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 4100 . . . . . . . 8  |-  { B ,  A }  =  { A ,  B }
4342eleq1i 2539 . . . . . . 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 968    = wceq 1374    e. wcel 1762    =/= wne 2657   A.wral 2809   _Vcvv 3108    \ cdif 3468   {csn 4022   {cpr 4024   class class class wbr 4442   ran crn 4995   USGrph cusg 23995   ComplUSGrph ccusgra 24082
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1596  ax-4 1607  ax-5 1675  ax-6 1714  ax-7 1734  ax-9 1766  ax-10 1781  ax-11 1786  ax-12 1798  ax-13 1963  ax-ext 2440  ax-sep 4563  ax-nul 4571  ax-pr 4681
This theorem depends on definitions:  df-bi 185  df-or 370  df-an 371  df-3an 970  df-tru 1377  df-ex 1592  df-nf 1595  df-sb 1707  df-eu 2274  df-mo 2275  df-clab 2448  df-cleq 2454  df-clel 2457  df-nfc 2612  df-ne 2659  df-ral 2814  df-rex 2815  df-rab 2818  df-v 3110  df-sbc 3327  df-dif 3474  df-un 3476  df-in 3478  df-ss 3485  df-nul 3781  df-if 3935  df-sn 4023  df-pr 4025  df-op 4029  df-br 4443  df-opab 4501  df-xp 5000  df-rel 5001  df-cnv 5002  df-dm 5004  df-rn 5005  df-usgra 23998  df-cusgra 24085
This theorem is referenced by: (None)
  Copyright terms: Public domain W3C validator