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

Theorem nbgrael 24291
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 24285 . . . 4  |- Neighbors  =  ( g  e.  _V , 
k  e.  ( 1st `  g )  |->  { n  e.  ( 1st `  g
)  |  { k ,  n }  e.  ran  ( 2nd `  g
) } )
21mpt2xopn0yelv 6939 . . 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 24288 . . . . . 6  |-  ( ( ( V  e.  X  /\  E  e.  Y
)  /\  K  e.  V )  ->  ( <. V ,  E >. Neighbors  K
)  =  { n  e.  V  |  { K ,  n }  e.  ran  E } )
54eleq2d 2511 . . . . 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 4091 . . . . . . 7  |-  ( n  =  N  ->  { K ,  n }  =  { K ,  N }
)
76eleq1d 2510 . . . . . 6  |-  ( n  =  N  ->  ( { K ,  n }  e.  ran  E  <->  { K ,  N }  e.  ran  E ) )
87elrab 3241 . . . . 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 976 . . 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 972    = wceq 1381    e. wcel 1802   {crab 2795   {cpr 4012   <.cop 4016   ran crn 4986   ` cfv 5574  (class class class)co 6277   1stc1st 6779   2ndc2nd 6780   Neighbors cnbgra 24282
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1603  ax-4 1616  ax-5 1689  ax-6 1732  ax-7 1774  ax-8 1804  ax-9 1806  ax-10 1821  ax-11 1826  ax-12 1838  ax-13 1983  ax-ext 2419  ax-sep 4554  ax-nul 4562  ax-pow 4611  ax-pr 4672  ax-un 6573
This theorem depends on definitions:  df-bi 185  df-or 370  df-an 371  df-3an 974  df-tru 1384  df-ex 1598  df-nf 1602  df-sb 1725  df-eu 2270  df-mo 2271  df-clab 2427  df-cleq 2433  df-clel 2436  df-nfc 2591  df-ne 2638  df-ral 2796  df-rex 2797  df-rab 2800  df-v 3095  df-sbc 3312  df-csb 3418  df-dif 3461  df-un 3463  df-in 3465  df-ss 3472  df-nul 3768  df-if 3923  df-sn 4011  df-pr 4013  df-op 4017  df-uni 4231  df-iun 4313  df-br 4434  df-opab 4492  df-mpt 4493  df-id 4781  df-xp 4991  df-rel 4992  df-cnv 4993  df-co 4994  df-dm 4995  df-rn 4996  df-res 4997  df-ima 4998  df-iota 5537  df-fun 5576  df-fv 5582  df-ov 6280  df-oprab 6281  df-mpt2 6282  df-1st 6781  df-2nd 6782  df-nbgra 24285
This theorem is referenced by:  nbgrasym  24304  nbgraf1olem1  24306  usg2spot2nb  24930  extwwlkfablem1  24939
  Copyright terms: Public domain W3C validator