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

Theorem nbgrael 23490
Description: The set of neighbors of an element of the first component of an ordered pair, especially of a vertex in a graph. (Contributed by Alexander van der Vekens and Mario Carneiro, 9-Oct-2017.)
Assertion
Ref Expression
nbgrael  |-  ( ( V  e.  X  /\  E  e.  Y )  ->  ( N  e.  (
<. V ,  E >. Neighbors  K
)  <->  ( K  e.  V  /\  N  e.  V  /\  { K ,  N }  e.  ran  E ) ) )

Proof of Theorem nbgrael
Dummy variables  g 
k  n are mutually distinct and distinct from all other variables.
StepHypRef Expression
1 df-nbgra 23485 . . . 4  |- Neighbors  =  ( g  e.  _V , 
k  e.  ( 1st `  g )  |->  { n  e.  ( 1st `  g
)  |  { k ,  n }  e.  ran  ( 2nd `  g
) } )
21mpt2xopn0yelv 6841 . . 3  |-  ( ( V  e.  X  /\  E  e.  Y )  ->  ( N  e.  (
<. V ,  E >. Neighbors  K
)  ->  K  e.  V ) )
32pm4.71rd 635 . 2  |-  ( ( V  e.  X  /\  E  e.  Y )  ->  ( N  e.  (
<. V ,  E >. Neighbors  K
)  <->  ( K  e.  V  /\  N  e.  ( <. V ,  E >. Neighbors  K ) ) ) )
4 nbgraop 23488 . . . . . 6  |-  ( ( ( V  e.  X  /\  E  e.  Y
)  /\  K  e.  V )  ->  ( <. V ,  E >. Neighbors  K
)  =  { n  e.  V  |  { K ,  n }  e.  ran  E } )
54eleq2d 2524 . . . . 5  |-  ( ( ( V  e.  X  /\  E  e.  Y
)  /\  K  e.  V )  ->  ( N  e.  ( <. V ,  E >. Neighbors  K )  <-> 
N  e.  { n  e.  V  |  { K ,  n }  e.  ran  E } ) )
6 preq2 4064 . . . . . . 7  |-  ( n  =  N  ->  { K ,  n }  =  { K ,  N }
)
76eleq1d 2523 . . . . . 6  |-  ( n  =  N  ->  ( { K ,  n }  e.  ran  E  <->  { K ,  N }  e.  ran  E ) )
87elrab 3224 . . . . 5  |-  ( N  e.  { n  e.  V  |  { K ,  n }  e.  ran  E }  <->  ( N  e.  V  /\  { K ,  N }  e.  ran  E ) )
95, 8syl6bb 261 . . . 4  |-  ( ( ( V  e.  X  /\  E  e.  Y
)  /\  K  e.  V )  ->  ( N  e.  ( <. V ,  E >. Neighbors  K )  <-> 
( N  e.  V  /\  { K ,  N }  e.  ran  E ) ) )
109pm5.32da 641 . . 3  |-  ( ( V  e.  X  /\  E  e.  Y )  ->  ( ( K  e.  V  /\  N  e.  ( <. V ,  E >. Neighbors  K ) )  <->  ( K  e.  V  /\  ( N  e.  V  /\  { K ,  N }  e.  ran  E ) ) ) )
11 3anass 969 . . 3  |-  ( ( K  e.  V  /\  N  e.  V  /\  { K ,  N }  e.  ran  E )  <->  ( K  e.  V  /\  ( N  e.  V  /\  { K ,  N }  e.  ran  E ) ) )
1210, 11syl6bbr 263 . 2  |-  ( ( V  e.  X  /\  E  e.  Y )  ->  ( ( K  e.  V  /\  N  e.  ( <. V ,  E >. Neighbors  K ) )  <->  ( K  e.  V  /\  N  e.  V  /\  { K ,  N }  e.  ran  E ) ) )
133, 12bitrd 253 1  |-  ( ( V  e.  X  /\  E  e.  Y )  ->  ( N  e.  (
<. V ,  E >. Neighbors  K
)  <->  ( K  e.  V  /\  N  e.  V  /\  { K ,  N }  e.  ran  E ) ) )
Colors of variables: wff setvar class
Syntax hints:    -> wi 4    <-> wb 184    /\ wa 369    /\ w3a 965    = wceq 1370    e. wcel 1758   {crab 2803   {cpr 3988   <.cop 3992   ran crn 4950   ` cfv 5527  (class class class)co 6201   1stc1st 6686   2ndc2nd 6687   Neighbors cnbgra 23482
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-sep 4522  ax-nul 4530  ax-pow 4579  ax-pr 4640  ax-un 6483
This theorem depends on definitions:  df-bi 185  df-or 370  df-an 371  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-ral 2804  df-rex 2805  df-rab 2808  df-v 3080  df-sbc 3295  df-csb 3397  df-dif 3440  df-un 3442  df-in 3444  df-ss 3451  df-nul 3747  df-if 3901  df-sn 3987  df-pr 3989  df-op 3993  df-uni 4201  df-iun 4282  df-br 4402  df-opab 4460  df-mpt 4461  df-id 4745  df-xp 4955  df-rel 4956  df-cnv 4957  df-co 4958  df-dm 4959  df-rn 4960  df-res 4961  df-ima 4962  df-iota 5490  df-fun 5529  df-fv 5535  df-ov 6204  df-oprab 6205  df-mpt2 6206  df-1st 6688  df-2nd 6689  df-nbgra 23485
This theorem is referenced by:  nbgrasym  23501  nbgraf1olem1  23503  usg2spot2nb  30807  extwwlkfablem1  30816
  Copyright terms: Public domain W3C validator