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

Theorem nb3grapr2 23534
Description: The neighbors of a vertex in a graph with three elements are an unordered pair of the other vertices if and only if all vertices are connected with each other. (Contributed by Alexander van der Vekens, 18-Oct-2017.)
Assertion
Ref Expression
nb3grapr2  |-  ( ( ( A  e.  X  /\  B  e.  Y  /\  C  e.  Z
)  /\  ( V  =  { A ,  B ,  C }  /\  V USGrph  E )  /\  ( A  =/=  B  /\  A  =/=  C  /\  B  =/= 
C ) )  -> 
( ( { A ,  B }  e.  ran  E  /\  { B ,  C }  e.  ran  E  /\  { C ,  A }  e.  ran  E )  <->  ( ( <. V ,  E >. Neighbors  A
)  =  { B ,  C }  /\  ( <. V ,  E >. Neighbors  B
)  =  { A ,  C }  /\  ( <. V ,  E >. Neighbors  C
)  =  { A ,  B } ) ) )

Proof of Theorem nb3grapr2
StepHypRef Expression
1 3anan32 977 . . . . 5  |-  ( ( { A ,  B }  e.  ran  E  /\  { B ,  C }  e.  ran  E  /\  { C ,  A }  e.  ran  E )  <->  ( ( { A ,  B }  e.  ran  E  /\  { C ,  A }  e.  ran  E )  /\  { B ,  C }  e.  ran  E ) )
21a1i 11 . . . 4  |-  ( ( ( A  e.  X  /\  B  e.  Y  /\  C  e.  Z
)  /\  ( V  =  { A ,  B ,  C }  /\  V USGrph  E )  /\  ( A  =/=  B  /\  A  =/=  C  /\  B  =/= 
C ) )  -> 
( ( { A ,  B }  e.  ran  E  /\  { B ,  C }  e.  ran  E  /\  { C ,  A }  e.  ran  E )  <->  ( ( { A ,  B }  e.  ran  E  /\  { C ,  A }  e.  ran  E )  /\  { B ,  C }  e.  ran  E ) ) )
3 prcom 4064 . . . . . . . . . . 11  |-  { C ,  A }  =  { A ,  C }
43eleq1i 2531 . . . . . . . . . 10  |-  ( { C ,  A }  e.  ran  E  <->  { A ,  C }  e.  ran  E )
54biimpi 194 . . . . . . . . 9  |-  ( { C ,  A }  e.  ran  E  ->  { A ,  C }  e.  ran  E )
65pm4.71i 632 . . . . . . . 8  |-  ( { C ,  A }  e.  ran  E  <->  ( { C ,  A }  e.  ran  E  /\  { A ,  C }  e.  ran  E ) )
76anbi2i 694 . . . . . . 7  |-  ( ( { A ,  B }  e.  ran  E  /\  { C ,  A }  e.  ran  E )  <->  ( { A ,  B }  e.  ran  E  /\  ( { C ,  A }  e.  ran  E  /\  { A ,  C }  e.  ran  E ) ) )
8 anass 649 . . . . . . 7  |-  ( ( ( { A ,  B }  e.  ran  E  /\  { C ,  A }  e.  ran  E )  /\  { A ,  C }  e.  ran  E )  <->  ( { A ,  B }  e.  ran  E  /\  ( { C ,  A }  e.  ran  E  /\  { A ,  C }  e.  ran  E ) ) )
97, 8bitr4i 252 . . . . . 6  |-  ( ( { A ,  B }  e.  ran  E  /\  { C ,  A }  e.  ran  E )  <->  ( ( { A ,  B }  e.  ran  E  /\  { C ,  A }  e.  ran  E )  /\  { A ,  C }  e.  ran  E ) )
109anbi1i 695 . . . . 5  |-  ( ( ( { A ,  B }  e.  ran  E  /\  { C ,  A }  e.  ran  E )  /\  { B ,  C }  e.  ran  E )  <->  ( ( ( { A ,  B }  e.  ran  E  /\  { C ,  A }  e.  ran  E )  /\  { A ,  C }  e.  ran  E )  /\  { B ,  C }  e.  ran  E ) )
11 anass 649 . . . . 5  |-  ( ( ( ( { A ,  B }  e.  ran  E  /\  { C ,  A }  e.  ran  E )  /\  { A ,  C }  e.  ran  E )  /\  { B ,  C }  e.  ran  E )  <->  ( ( { A ,  B }  e.  ran  E  /\  { C ,  A }  e.  ran  E )  /\  ( { A ,  C }  e.  ran  E  /\  { B ,  C }  e.  ran  E ) ) )
1210, 11bitri 249 . . . 4  |-  ( ( ( { A ,  B }  e.  ran  E  /\  { C ,  A }  e.  ran  E )  /\  { B ,  C }  e.  ran  E )  <->  ( ( { A ,  B }  e.  ran  E  /\  { C ,  A }  e.  ran  E )  /\  ( { A ,  C }  e.  ran  E  /\  { B ,  C }  e.  ran  E ) ) )
132, 12syl6bb 261 . . 3  |-  ( ( ( A  e.  X  /\  B  e.  Y  /\  C  e.  Z
)  /\  ( V  =  { A ,  B ,  C }  /\  V USGrph  E )  /\  ( A  =/=  B  /\  A  =/=  C  /\  B  =/= 
C ) )  -> 
( ( { A ,  B }  e.  ran  E  /\  { B ,  C }  e.  ran  E  /\  { C ,  A }  e.  ran  E )  <->  ( ( { A ,  B }  e.  ran  E  /\  { C ,  A }  e.  ran  E )  /\  ( { A ,  C }  e.  ran  E  /\  { B ,  C }  e.  ran  E ) ) ) )
14 prcom 4064 . . . . . . . . . 10  |-  { A ,  B }  =  { B ,  A }
1514eleq1i 2531 . . . . . . . . 9  |-  ( { A ,  B }  e.  ran  E  <->  { B ,  A }  e.  ran  E )
1615biimpi 194 . . . . . . . 8  |-  ( { A ,  B }  e.  ran  E  ->  { B ,  A }  e.  ran  E )
1716pm4.71i 632 . . . . . . 7  |-  ( { A ,  B }  e.  ran  E  <->  ( { A ,  B }  e.  ran  E  /\  { B ,  A }  e.  ran  E ) )
1817anbi1i 695 . . . . . 6  |-  ( ( { A ,  B }  e.  ran  E  /\  { C ,  A }  e.  ran  E )  <->  ( ( { A ,  B }  e.  ran  E  /\  { B ,  A }  e.  ran  E )  /\  { C ,  A }  e.  ran  E ) )
19 df-3an 967 . . . . . 6  |-  ( ( { A ,  B }  e.  ran  E  /\  { B ,  A }  e.  ran  E  /\  { C ,  A }  e.  ran  E )  <->  ( ( { A ,  B }  e.  ran  E  /\  { B ,  A }  e.  ran  E )  /\  { C ,  A }  e.  ran  E ) )
2018, 19bitr4i 252 . . . . 5  |-  ( ( { A ,  B }  e.  ran  E  /\  { C ,  A }  e.  ran  E )  <->  ( { A ,  B }  e.  ran  E  /\  { B ,  A }  e.  ran  E  /\  { C ,  A }  e.  ran  E ) )
21 prcom 4064 . . . . . . . . . 10  |-  { B ,  C }  =  { C ,  B }
2221eleq1i 2531 . . . . . . . . 9  |-  ( { B ,  C }  e.  ran  E  <->  { C ,  B }  e.  ran  E )
2322biimpi 194 . . . . . . . 8  |-  ( { B ,  C }  e.  ran  E  ->  { C ,  B }  e.  ran  E )
2423pm4.71i 632 . . . . . . 7  |-  ( { B ,  C }  e.  ran  E  <->  ( { B ,  C }  e.  ran  E  /\  { C ,  B }  e.  ran  E ) )
2524anbi2i 694 . . . . . 6  |-  ( ( { A ,  C }  e.  ran  E  /\  { B ,  C }  e.  ran  E )  <->  ( { A ,  C }  e.  ran  E  /\  ( { B ,  C }  e.  ran  E  /\  { C ,  B }  e.  ran  E ) ) )
26 3anass 969 . . . . . 6  |-  ( ( { A ,  C }  e.  ran  E  /\  { B ,  C }  e.  ran  E  /\  { C ,  B }  e.  ran  E )  <->  ( { A ,  C }  e.  ran  E  /\  ( { B ,  C }  e.  ran  E  /\  { C ,  B }  e.  ran  E ) ) )
2725, 26bitr4i 252 . . . . 5  |-  ( ( { A ,  C }  e.  ran  E  /\  { B ,  C }  e.  ran  E )  <->  ( { A ,  C }  e.  ran  E  /\  { B ,  C }  e.  ran  E  /\  { C ,  B }  e.  ran  E ) )
2820, 27anbi12i 697 . . . 4  |-  ( ( ( { A ,  B }  e.  ran  E  /\  { C ,  A }  e.  ran  E )  /\  ( { A ,  C }  e.  ran  E  /\  { B ,  C }  e.  ran  E ) )  <-> 
( ( { A ,  B }  e.  ran  E  /\  { B ,  A }  e.  ran  E  /\  { C ,  A }  e.  ran  E )  /\  ( { A ,  C }  e.  ran  E  /\  { B ,  C }  e.  ran  E  /\  { C ,  B }  e.  ran  E ) ) )
29 an6 1299 . . . 4  |-  ( ( ( { A ,  B }  e.  ran  E  /\  { B ,  A }  e.  ran  E  /\  { C ,  A }  e.  ran  E )  /\  ( { A ,  C }  e.  ran  E  /\  { B ,  C }  e.  ran  E  /\  { C ,  B }  e.  ran  E ) )  <-> 
( ( { A ,  B }  e.  ran  E  /\  { A ,  C }  e.  ran  E )  /\  ( { B ,  A }  e.  ran  E  /\  { B ,  C }  e.  ran  E )  /\  ( { C ,  A }  e.  ran  E  /\  { C ,  B }  e.  ran  E ) ) )
3028, 29bitri 249 . . 3  |-  ( ( ( { A ,  B }  e.  ran  E  /\  { C ,  A }  e.  ran  E )  /\  ( { A ,  C }  e.  ran  E  /\  { B ,  C }  e.  ran  E ) )  <-> 
( ( { A ,  B }  e.  ran  E  /\  { A ,  C }  e.  ran  E )  /\  ( { B ,  A }  e.  ran  E  /\  { B ,  C }  e.  ran  E )  /\  ( { C ,  A }  e.  ran  E  /\  { C ,  B }  e.  ran  E ) ) )
3113, 30syl6bb 261 . 2  |-  ( ( ( A  e.  X  /\  B  e.  Y  /\  C  e.  Z
)  /\  ( V  =  { A ,  B ,  C }  /\  V USGrph  E )  /\  ( A  =/=  B  /\  A  =/=  C  /\  B  =/= 
C ) )  -> 
( ( { A ,  B }  e.  ran  E  /\  { B ,  C }  e.  ran  E  /\  { C ,  A }  e.  ran  E )  <->  ( ( { A ,  B }  e.  ran  E  /\  { A ,  C }  e.  ran  E )  /\  ( { B ,  A }  e.  ran  E  /\  { B ,  C }  e.  ran  E )  /\  ( { C ,  A }  e.  ran  E  /\  { C ,  B }  e.  ran  E ) ) ) )
32 nb3graprlem1 23531 . . . . 5  |-  ( ( ( A  e.  X  /\  B  e.  Y  /\  C  e.  Z
)  /\  ( V  =  { A ,  B ,  C }  /\  V USGrph  E ) )  ->  (
( <. V ,  E >. Neighbors  A )  =  { B ,  C }  <->  ( { A ,  B }  e.  ran  E  /\  { A ,  C }  e.  ran  E ) ) )
3332bicomd 201 . . . 4  |-  ( ( ( A  e.  X  /\  B  e.  Y  /\  C  e.  Z
)  /\  ( V  =  { A ,  B ,  C }  /\  V USGrph  E ) )  ->  (
( { A ,  B }  e.  ran  E  /\  { A ,  C }  e.  ran  E )  <->  ( <. V ,  E >. Neighbors  A )  =  { B ,  C }
) )
34 3ancoma 972 . . . . . . 7  |-  ( ( A  e.  X  /\  B  e.  Y  /\  C  e.  Z )  <->  ( B  e.  Y  /\  A  e.  X  /\  C  e.  Z )
)
3534biimpi 194 . . . . . 6  |-  ( ( A  e.  X  /\  B  e.  Y  /\  C  e.  Z )  ->  ( B  e.  Y  /\  A  e.  X  /\  C  e.  Z
) )
36 tpcoma 4082 . . . . . . . . 9  |-  { A ,  B ,  C }  =  { B ,  A ,  C }
3736eqeq2i 2472 . . . . . . . 8  |-  ( V  =  { A ,  B ,  C }  <->  V  =  { B ,  A ,  C }
)
3837biimpi 194 . . . . . . 7  |-  ( V  =  { A ,  B ,  C }  ->  V  =  { B ,  A ,  C }
)
3938anim1i 568 . . . . . 6  |-  ( ( V  =  { A ,  B ,  C }  /\  V USGrph  E )  -> 
( V  =  { B ,  A ,  C }  /\  V USGrph  E
) )
40 nb3graprlem1 23531 . . . . . 6  |-  ( ( ( B  e.  Y  /\  A  e.  X  /\  C  e.  Z
)  /\  ( V  =  { B ,  A ,  C }  /\  V USGrph  E ) )  ->  (
( <. V ,  E >. Neighbors  B )  =  { A ,  C }  <->  ( { B ,  A }  e.  ran  E  /\  { B ,  C }  e.  ran  E ) ) )
4135, 39, 40syl2an 477 . . . . 5  |-  ( ( ( A  e.  X  /\  B  e.  Y  /\  C  e.  Z
)  /\  ( V  =  { A ,  B ,  C }  /\  V USGrph  E ) )  ->  (
( <. V ,  E >. Neighbors  B )  =  { A ,  C }  <->  ( { B ,  A }  e.  ran  E  /\  { B ,  C }  e.  ran  E ) ) )
4241bicomd 201 . . . 4  |-  ( ( ( A  e.  X  /\  B  e.  Y  /\  C  e.  Z
)  /\  ( V  =  { A ,  B ,  C }  /\  V USGrph  E ) )  ->  (
( { B ,  A }  e.  ran  E  /\  { B ,  C }  e.  ran  E )  <->  ( <. V ,  E >. Neighbors  B )  =  { A ,  C }
) )
43 3anrot 970 . . . . . . 7  |-  ( ( C  e.  Z  /\  A  e.  X  /\  B  e.  Y )  <->  ( A  e.  X  /\  B  e.  Y  /\  C  e.  Z )
)
4443biimpri 206 . . . . . 6  |-  ( ( A  e.  X  /\  B  e.  Y  /\  C  e.  Z )  ->  ( C  e.  Z  /\  A  e.  X  /\  B  e.  Y
) )
45 tprot 4081 . . . . . . . . . 10  |-  { C ,  A ,  B }  =  { A ,  B ,  C }
4645eqcomi 2467 . . . . . . . . 9  |-  { A ,  B ,  C }  =  { C ,  A ,  B }
4746eqeq2i 2472 . . . . . . . 8  |-  ( V  =  { A ,  B ,  C }  <->  V  =  { C ,  A ,  B }
)
4847biimpi 194 . . . . . . 7  |-  ( V  =  { A ,  B ,  C }  ->  V  =  { C ,  A ,  B }
)
4948anim1i 568 . . . . . 6  |-  ( ( V  =  { A ,  B ,  C }  /\  V USGrph  E )  -> 
( V  =  { C ,  A ,  B }  /\  V USGrph  E
) )
50 nb3graprlem1 23531 . . . . . 6  |-  ( ( ( C  e.  Z  /\  A  e.  X  /\  B  e.  Y
)  /\  ( V  =  { C ,  A ,  B }  /\  V USGrph  E ) )  ->  (
( <. V ,  E >. Neighbors  C )  =  { A ,  B }  <->  ( { C ,  A }  e.  ran  E  /\  { C ,  B }  e.  ran  E ) ) )
5144, 49, 50syl2an 477 . . . . 5  |-  ( ( ( A  e.  X  /\  B  e.  Y  /\  C  e.  Z
)  /\  ( V  =  { A ,  B ,  C }  /\  V USGrph  E ) )  ->  (
( <. V ,  E >. Neighbors  C )  =  { A ,  B }  <->  ( { C ,  A }  e.  ran  E  /\  { C ,  B }  e.  ran  E ) ) )
5251bicomd 201 . . . 4  |-  ( ( ( A  e.  X  /\  B  e.  Y  /\  C  e.  Z
)  /\  ( V  =  { A ,  B ,  C }  /\  V USGrph  E ) )  ->  (
( { C ,  A }  e.  ran  E  /\  { C ,  B }  e.  ran  E )  <->  ( <. V ,  E >. Neighbors  C )  =  { A ,  B }
) )
5333, 42, 523anbi123d 1290 . . 3  |-  ( ( ( A  e.  X  /\  B  e.  Y  /\  C  e.  Z
)  /\  ( V  =  { A ,  B ,  C }  /\  V USGrph  E ) )  ->  (
( ( { A ,  B }  e.  ran  E  /\  { A ,  C }  e.  ran  E )  /\  ( { B ,  A }  e.  ran  E  /\  { B ,  C }  e.  ran  E )  /\  ( { C ,  A }  e.  ran  E  /\  { C ,  B }  e.  ran  E ) )  <-> 
( ( <. V ,  E >. Neighbors  A )  =  { B ,  C }  /\  ( <. V ,  E >. Neighbors  B )  =  { A ,  C }  /\  ( <. V ,  E >. Neighbors  C )  =  { A ,  B }
) ) )
54533adant3 1008 . 2  |-  ( ( ( A  e.  X  /\  B  e.  Y  /\  C  e.  Z
)  /\  ( V  =  { A ,  B ,  C }  /\  V USGrph  E )  /\  ( A  =/=  B  /\  A  =/=  C  /\  B  =/= 
C ) )  -> 
( ( ( { A ,  B }  e.  ran  E  /\  { A ,  C }  e.  ran  E )  /\  ( { B ,  A }  e.  ran  E  /\  { B ,  C }  e.  ran  E )  /\  ( { C ,  A }  e.  ran  E  /\  { C ,  B }  e.  ran  E ) )  <-> 
( ( <. V ,  E >. Neighbors  A )  =  { B ,  C }  /\  ( <. V ,  E >. Neighbors  B )  =  { A ,  C }  /\  ( <. V ,  E >. Neighbors  C )  =  { A ,  B }
) ) )
5531, 54bitrd 253 1  |-  ( ( ( A  e.  X  /\  B  e.  Y  /\  C  e.  Z
)  /\  ( V  =  { A ,  B ,  C }  /\  V USGrph  E )  /\  ( A  =/=  B  /\  A  =/=  C  /\  B  =/= 
C ) )  -> 
( ( { A ,  B }  e.  ran  E  /\  { B ,  C }  e.  ran  E  /\  { C ,  A }  e.  ran  E )  <->  ( ( <. V ,  E >. Neighbors  A
)  =  { B ,  C }  /\  ( <. V ,  E >. Neighbors  B
)  =  { A ,  C }  /\  ( <. V ,  E >. Neighbors  C
)  =  { A ,  B } ) ) )
Colors of variables: wff setvar class
Syntax hints:    -> wi 4    <-> wb 184    /\ wa 369    /\ w3a 965    = wceq 1370    e. wcel 1758    =/= wne 2648   {cpr 3990   {ctp 3992   <.cop 3994   class class class wbr 4403   ran crn 4952  (class class class)co 6203   USGrph cusg 23436   Neighbors cnbgra 23501
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1592  ax-4 1603  ax-5 1671  ax-6 1710  ax-7 1730  ax-8 1760  ax-9 1762  ax-10 1777  ax-11 1782  ax-12 1794  ax-13 1955  ax-ext 2432  ax-rep 4514  ax-sep 4524  ax-nul 4532  ax-pow 4581  ax-pr 4642  ax-un 6485  ax-cnex 9452  ax-resscn 9453  ax-1cn 9454  ax-icn 9455  ax-addcl 9456  ax-addrcl 9457  ax-mulcl 9458  ax-mulrcl 9459  ax-mulcom 9460  ax-addass 9461  ax-mulass 9462  ax-distr 9463  ax-i2m1 9464  ax-1ne0 9465  ax-1rid 9466  ax-rnegex 9467  ax-rrecex 9468  ax-cnre 9469  ax-pre-lttri 9470  ax-pre-lttrn 9471  ax-pre-ltadd 9472  ax-pre-mulgt0 9473
This theorem depends on definitions:  df-bi 185  df-or 370  df-an 371  df-3or 966  df-3an 967  df-tru 1373  df-ex 1588  df-nf 1591  df-sb 1703  df-eu 2266  df-mo 2267  df-clab 2440  df-cleq 2446  df-clel 2449  df-nfc 2604  df-ne 2650  df-nel 2651  df-ral 2804  df-rex 2805  df-reu 2806  df-rmo 2807  df-rab 2808  df-v 3080  df-sbc 3295  df-csb 3399  df-dif 3442  df-un 3444  df-in 3446  df-ss 3453  df-pss 3455  df-nul 3749  df-if 3903  df-pw 3973  df-sn 3989  df-pr 3991  df-tp 3993  df-op 3995  df-uni 4203  df-int 4240  df-iun 4284  df-br 4404  df-opab 4462  df-mpt 4463  df-tr 4497  df-eprel 4743  df-id 4747  df-po 4752  df-so 4753  df-fr 4790  df-we 4792  df-ord 4833  df-on 4834  df-lim 4835  df-suc 4836  df-xp 4957  df-rel 4958  df-cnv 4959  df-co 4960  df-dm 4961  df-rn 4962  df-res 4963  df-ima 4964  df-iota 5492  df-fun 5531  df-fn 5532  df-f 5533  df-f1 5534  df-fo 5535  df-f1o 5536  df-fv 5537  df-riota 6164  df-ov 6206  df-oprab 6207  df-mpt2 6208  df-om 6590  df-1st 6690  df-2nd 6691  df-recs 6945  df-rdg 6979  df-1o 7033  df-oadd 7037  df-er 7214  df-en 7424  df-dom 7425  df-sdom 7426  df-fin 7427  df-card 8223  df-cda 8451  df-pnf 9534  df-mnf 9535  df-xr 9536  df-ltxr 9537  df-le 9538  df-sub 9711  df-neg 9712  df-nn 10437  df-2 10494  df-n0 10694  df-z 10761  df-uz 10976  df-fz 11558  df-hash 12224  df-usgra 23438  df-nbgra 23504
This theorem is referenced by: (None)
  Copyright terms: Public domain W3C validator