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

Theorem nbgrael 21430
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 21425 . . . 4  |- Neighbors  =  ( g  e.  _V , 
k  e.  ( 1st `  g )  |->  { n  e.  ( 1st `  g
)  |  { k ,  n }  e.  ran  ( 2nd `  g
) } )
21mpt2xopn0yelv 6456 . . 3  |-  ( ( V  e.  X  /\  E  e.  Y )  ->  ( N  e.  (
<. V ,  E >. Neighbors  K
)  ->  K  e.  V ) )
32pm4.71rd 617 . 2  |-  ( ( V  e.  X  /\  E  e.  Y )  ->  ( N  e.  (
<. V ,  E >. Neighbors  K
)  <->  ( K  e.  V  /\  N  e.  ( <. V ,  E >. Neighbors  K ) ) ) )
4 nbgraop 21428 . . . . . 6  |-  ( ( ( V  e.  X  /\  E  e.  Y
)  /\  K  e.  V )  ->  ( <. V ,  E >. Neighbors  K
)  =  { n  e.  V  |  { K ,  n }  e.  ran  E } )
54eleq2d 2502 . . . . 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 3876 . . . . . . 7  |-  ( n  =  N  ->  { K ,  n }  =  { K ,  N }
)
76eleq1d 2501 . . . . . 6  |-  ( n  =  N  ->  ( { K ,  n }  e.  ran  E  <->  { K ,  N }  e.  ran  E ) )
87elrab 3084 . . . . 5  |-  ( N  e.  { n  e.  V  |  { K ,  n }  e.  ran  E }  <->  ( N  e.  V  /\  { K ,  N }  e.  ran  E ) )
95, 8syl6bb 253 . . . 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 623 . . 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 940 . . 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 255 . 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 245 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 set class
Syntax hints:    -> wi 4    <-> wb 177    /\ wa 359    /\ w3a 936    = wceq 1652    e. wcel 1725   {crab 2701   {cpr 3807   <.cop 3809   ran crn 4871   ` cfv 5446  (class class class)co 6073   1stc1st 6339   2ndc2nd 6340   Neighbors cnbgra 21422
This theorem is referenced by:  nbgrasym  21441  nbgraf1olem1  21443  usg2spot2nb  28391
This theorem was proved from axioms:  ax-1 5  ax-2 6  ax-3 7  ax-mp 8  ax-gen 1555  ax-5 1566  ax-17 1626  ax-9 1666  ax-8 1687  ax-13 1727  ax-14 1729  ax-6 1744  ax-7 1749  ax-11 1761  ax-12 1950  ax-ext 2416  ax-sep 4322  ax-nul 4330  ax-pow 4369  ax-pr 4395  ax-un 4693
This theorem depends on definitions:  df-bi 178  df-or 360  df-an 361  df-3an 938  df-tru 1328  df-ex 1551  df-nf 1554  df-sb 1659  df-eu 2284  df-mo 2285  df-clab 2422  df-cleq 2428  df-clel 2431  df-nfc 2560  df-ne 2600  df-ral 2702  df-rex 2703  df-rab 2706  df-v 2950  df-sbc 3154  df-csb 3244  df-dif 3315  df-un 3317  df-in 3319  df-ss 3326  df-nul 3621  df-if 3732  df-sn 3812  df-pr 3813  df-op 3815  df-uni 4008  df-iun 4087  df-br 4205  df-opab 4259  df-mpt 4260  df-id 4490  df-xp 4876  df-rel 4877  df-cnv 4878  df-co 4879  df-dm 4880  df-rn 4881  df-res 4882  df-ima 4883  df-iota 5410  df-fun 5448  df-fv 5454  df-ov 6076  df-oprab 6077  df-mpt2 6078  df-1st 6341  df-2nd 6342  df-nbgra 21425
  Copyright terms: Public domain W3C validator