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

Theorem nb3grapr2 24600
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 983 . . . . 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 4039 . . . . . . . . . . 11  |-  { C ,  A }  =  { A ,  C }
43eleq1i 2473 . . . . . . . . . 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 630 . . . . . . . 8  |-  ( { C ,  A }  e.  ran  E  <->  ( { C ,  A }  e.  ran  E  /\  { A ,  C }  e.  ran  E ) )
76anbi2i 692 . . . . . . 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 647 . . . . . . 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 693 . . . . 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 647 . . . . 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 4039 . . . . . . . . . 10  |-  { A ,  B }  =  { B ,  A }
1514eleq1i 2473 . . . . . . . . 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 630 . . . . . . 7  |-  ( { A ,  B }  e.  ran  E  <->  ( { A ,  B }  e.  ran  E  /\  { B ,  A }  e.  ran  E ) )
1817anbi1i 693 . . . . . 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 973 . . . . . 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 4039 . . . . . . . . . 10  |-  { B ,  C }  =  { C ,  B }
2221eleq1i 2473 . . . . . . . . 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 630 . . . . . . 7  |-  ( { B ,  C }  e.  ran  E  <->  ( { B ,  C }  e.  ran  E  /\  { C ,  B }  e.  ran  E ) )
2524anbi2i 692 . . . . . 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 975 . . . . . 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 695 . . . 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 1306 . . . 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 24597 . . . . 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 978 . . . . . . 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 4057 . . . . . . . . 9  |-  { A ,  B ,  C }  =  { B ,  A ,  C }
3736eqeq2i 2414 . . . . . . . 8  |-  ( V  =  { A ,  B ,  C }  <->  V  =  { B ,  A ,  C }
)
3837biimpi 194 . . . . . . 7  |-  ( V  =  { A ,  B ,  C }  ->  V  =  { B ,  A ,  C }
)
3938anim1i 566 . . . . . 6  |-  ( ( V  =  { A ,  B ,  C }  /\  V USGrph  E )  -> 
( V  =  { B ,  A ,  C }  /\  V USGrph  E
) )
40 nb3graprlem1 24597 . . . . . 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 475 . . . . 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 976 . . . . . . 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 4056 . . . . . . . . . 10  |-  { C ,  A ,  B }  =  { A ,  B ,  C }
4645eqcomi 2409 . . . . . . . . 9  |-  { A ,  B ,  C }  =  { C ,  A ,  B }
4746eqeq2i 2414 . . . . . . . 8  |-  ( V  =  { A ,  B ,  C }  <->  V  =  { C ,  A ,  B }
)
4847biimpi 194 . . . . . . 7  |-  ( V  =  { A ,  B ,  C }  ->  V  =  { C ,  A ,  B }
)
4948anim1i 566 . . . . . 6  |-  ( ( V  =  { A ,  B ,  C }  /\  V USGrph  E )  -> 
( V  =  { C ,  A ,  B }  /\  V USGrph  E
) )
50 nb3graprlem1 24597 . . . . . 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 475 . . . . 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 1297 . . 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 1014 . 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 367    /\ w3a 971    = wceq 1399    e. wcel 1836    =/= wne 2591   {cpr 3963   {ctp 3965   <.cop 3967   class class class wbr 4384   ran crn 4931  (class class class)co 6218   USGrph cusg 24476   Neighbors cnbgra 24563
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1633  ax-4 1646  ax-5 1719  ax-6 1765  ax-7 1808  ax-8 1838  ax-9 1840  ax-10 1855  ax-11 1860  ax-12 1872  ax-13 2020  ax-ext 2374  ax-rep 4495  ax-sep 4505  ax-nul 4513  ax-pow 4560  ax-pr 4618  ax-un 6513  ax-cnex 9481  ax-resscn 9482  ax-1cn 9483  ax-icn 9484  ax-addcl 9485  ax-addrcl 9486  ax-mulcl 9487  ax-mulrcl 9488  ax-mulcom 9489  ax-addass 9490  ax-mulass 9491  ax-distr 9492  ax-i2m1 9493  ax-1ne0 9494  ax-1rid 9495  ax-rnegex 9496  ax-rrecex 9497  ax-cnre 9498  ax-pre-lttri 9499  ax-pre-lttrn 9500  ax-pre-ltadd 9501  ax-pre-mulgt0 9502
This theorem depends on definitions:  df-bi 185  df-or 368  df-an 369  df-3or 972  df-3an 973  df-tru 1402  df-ex 1628  df-nf 1632  df-sb 1758  df-eu 2236  df-mo 2237  df-clab 2382  df-cleq 2388  df-clel 2391  df-nfc 2546  df-ne 2593  df-nel 2594  df-ral 2751  df-rex 2752  df-reu 2753  df-rmo 2754  df-rab 2755  df-v 3053  df-sbc 3270  df-csb 3366  df-dif 3409  df-un 3411  df-in 3413  df-ss 3420  df-pss 3422  df-nul 3729  df-if 3875  df-pw 3946  df-sn 3962  df-pr 3964  df-tp 3966  df-op 3968  df-uni 4181  df-int 4217  df-iun 4262  df-br 4385  df-opab 4443  df-mpt 4444  df-tr 4478  df-eprel 4722  df-id 4726  df-po 4731  df-so 4732  df-fr 4769  df-we 4771  df-ord 4812  df-on 4813  df-lim 4814  df-suc 4815  df-xp 4936  df-rel 4937  df-cnv 4938  df-co 4939  df-dm 4940  df-rn 4941  df-res 4942  df-ima 4943  df-iota 5477  df-fun 5515  df-fn 5516  df-f 5517  df-f1 5518  df-fo 5519  df-f1o 5520  df-fv 5521  df-riota 6180  df-ov 6221  df-oprab 6222  df-mpt2 6223  df-om 6622  df-1st 6721  df-2nd 6722  df-recs 6982  df-rdg 7016  df-1o 7070  df-oadd 7074  df-er 7251  df-en 7458  df-dom 7459  df-sdom 7460  df-fin 7461  df-card 8255  df-cda 8483  df-pnf 9563  df-mnf 9564  df-xr 9565  df-ltxr 9566  df-le 9567  df-sub 9742  df-neg 9743  df-nn 10475  df-2 10533  df-n0 10735  df-z 10804  df-uz 11024  df-fz 11616  df-hash 12331  df-usgra 24479  df-nbgra 24566
This theorem is referenced by: (None)
  Copyright terms: Public domain W3C validator