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

Theorem cusgra2v 23369
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 23269 . . . . 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 23363 . . . 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 985 . . . . . 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 3886 . . . . . . . 8  |-  ( k  =  A  ->  { k }  =  { A } )
87difeq2d 3473 . . . . . . 7  |-  ( k  =  A  ->  ( { A ,  B }  \  { k } )  =  ( { A ,  B }  \  { A } ) )
9 preq2 3954 . . . . . . . 8  |-  ( k  =  A  ->  { n ,  k }  =  { n ,  A } )
109eleq1d 2508 . . . . . . 7  |-  ( k  =  A  ->  ( { n ,  k }  e.  ran  E  <->  { n ,  A }  e.  ran  E ) )
118, 10raleqbidv 2930 . . . . . 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 3886 . . . . . . . 8  |-  ( k  =  B  ->  { k }  =  { B } )
1312difeq2d 3473 . . . . . . 7  |-  ( k  =  B  ->  ( { A ,  B }  \  { k } )  =  ( { A ,  B }  \  { B } ) )
14 preq2 3954 . . . . . . . 8  |-  ( k  =  B  ->  { n ,  k }  =  { n ,  B } )
1514eleq1d 2508 . . . . . . 7  |-  ( k  =  B  ->  ( { n ,  k }  e.  ran  E  <->  { n ,  B }  e.  ran  E ) )
1613, 15raleqbidv 2930 . . . . . 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 3924 . . . . 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 4009 . . . . . . . . . 10  |-  ( A  =/=  B  ->  ( { A ,  B }  \  { A } )  =  { B }
)
22213ad2ant3 1011 . . . . . . . . 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 2922 . . . . . . 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 3953 . . . . . . . . . . 11  |-  ( n  =  B  ->  { n ,  A }  =  { B ,  A }
)
2625eleq1d 2508 . . . . . . . . . 10  |-  ( n  =  B  ->  ( { n ,  A }  e.  ran  E  <->  { B ,  A }  e.  ran  E ) )
2726ralsng 3911 . . . . . . . . 9  |-  ( B  e.  W  ->  ( A. n  e.  { B }  { n ,  A }  e.  ran  E  <->  { B ,  A }  e.  ran  E ) )
28273ad2ant2 1010 . . . . . . . 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 4010 . . . . . . . . . 10  |-  ( A  =/=  B  ->  ( { A ,  B }  \  { B } )  =  { A }
)
32313ad2ant3 1011 . . . . . . . . 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 2922 . . . . . . 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 3953 . . . . . . . . . . 11  |-  ( n  =  A  ->  { n ,  B }  =  { A ,  B }
)
3635eleq1d 2508 . . . . . . . . . 10  |-  ( n  =  A  ->  ( { n ,  B }  e.  ran  E  <->  { A ,  B }  e.  ran  E ) )
3736ralsng 3911 . . . . . . . . 9  |-  ( A  e.  V  ->  ( A. n  e.  { A }  { n ,  B }  e.  ran  E  <->  { A ,  B }  e.  ran  E ) )
38373ad2ant1 1009 . . . . . . . 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 3952 . . . . . . . 8  |-  { B ,  A }  =  { A ,  B }
4342eleq1i 2505 . . . . . . 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 965    = wceq 1369    e. wcel 1756    =/= wne 2605   A.wral 2714   _Vcvv 2971    \ cdif 3324   {csn 3876   {cpr 3878   class class class wbr 4291   ran crn 4840   USGrph cusg 23263   ComplUSGrph ccusgra 23329
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1591  ax-4 1602  ax-5 1670  ax-6 1708  ax-7 1728  ax-9 1760  ax-10 1775  ax-11 1780  ax-12 1792  ax-13 1943  ax-ext 2423  ax-sep 4412  ax-nul 4420  ax-pr 4530
This theorem depends on definitions:  df-bi 185  df-or 370  df-an 371  df-3an 967  df-tru 1372  df-ex 1587  df-nf 1590  df-sb 1701  df-eu 2257  df-mo 2258  df-clab 2429  df-cleq 2435  df-clel 2438  df-nfc 2567  df-ne 2607  df-ral 2719  df-rex 2720  df-rab 2723  df-v 2973  df-sbc 3186  df-dif 3330  df-un 3332  df-in 3334  df-ss 3341  df-nul 3637  df-if 3791  df-sn 3877  df-pr 3879  df-op 3883  df-br 4292  df-opab 4350  df-xp 4845  df-rel 4846  df-cnv 4847  df-dm 4849  df-rn 4850  df-usgra 23265  df-cusgra 23332
This theorem is referenced by: (None)
  Copyright terms: Public domain W3C validator