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

Theorem nbgraop 24214
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, 7-Oct-2017.)
Assertion
Ref Expression
nbgraop  |-  ( ( ( V  e.  Y  /\  E  e.  Z
)  /\  N  e.  V )  ->  ( <. V ,  E >. Neighbors  N
)  =  { n  e.  V  |  { N ,  n }  e.  ran  E } )
Distinct variable groups:    n, V    n, E    n, N    n, Y    n, Z

Proof of Theorem nbgraop
Dummy variables  g 
k are mutually distinct and distinct from all other variables.
StepHypRef Expression
1 df-nbgra 24211 . 2  |- Neighbors  =  ( g  e.  _V , 
k  e.  ( 1st `  g )  |->  { n  e.  ( 1st `  g
)  |  { k ,  n }  e.  ran  ( 2nd `  g
) } )
2 opex 4716 . . . 4  |-  <. V ,  E >.  e.  _V
32a1i 11 . . 3  |-  ( ( ( V  e.  Y  /\  E  e.  Z
)  /\  N  e.  V )  ->  <. V ,  E >.  e.  _V )
4 op1stg 6806 . . . . . . . 8  |-  ( ( V  e.  Y  /\  E  e.  Z )  ->  ( 1st `  <. V ,  E >. )  =  V )
54eqcomd 2475 . . . . . . 7  |-  ( ( V  e.  Y  /\  E  e.  Z )  ->  V  =  ( 1st `  <. V ,  E >. ) )
65eleq2d 2537 . . . . . 6  |-  ( ( V  e.  Y  /\  E  e.  Z )  ->  ( N  e.  V  <->  N  e.  ( 1st `  <. V ,  E >. )
) )
76biimpa 484 . . . . 5  |-  ( ( ( V  e.  Y  /\  E  e.  Z
)  /\  N  e.  V )  ->  N  e.  ( 1st `  <. V ,  E >. )
)
87adantr 465 . . . 4  |-  ( ( ( ( V  e.  Y  /\  E  e.  Z )  /\  N  e.  V )  /\  g  =  <. V ,  E >. )  ->  N  e.  ( 1st `  <. V ,  E >. ) )
9 fveq2 5871 . . . . 5  |-  ( g  =  <. V ,  E >.  ->  ( 1st `  g
)  =  ( 1st `  <. V ,  E >. ) )
109adantl 466 . . . 4  |-  ( ( ( ( V  e.  Y  /\  E  e.  Z )  /\  N  e.  V )  /\  g  =  <. V ,  E >. )  ->  ( 1st `  g )  =  ( 1st `  <. V ,  E >. ) )
118, 10eleqtrrd 2558 . . 3  |-  ( ( ( ( V  e.  Y  /\  E  e.  Z )  /\  N  e.  V )  /\  g  =  <. V ,  E >. )  ->  N  e.  ( 1st `  g ) )
12 fvex 5881 . . . 4  |-  ( 1st `  g )  e.  _V
13 rabexg 4602 . . . 4  |-  ( ( 1st `  g )  e.  _V  ->  { n  e.  ( 1st `  g
)  |  { k ,  n }  e.  ran  ( 2nd `  g
) }  e.  _V )
1412, 13mp1i 12 . . 3  |-  ( ( ( ( V  e.  Y  /\  E  e.  Z )  /\  N  e.  V )  /\  (
g  =  <. V ,  E >.  /\  k  =  N ) )  ->  { n  e.  ( 1st `  g )  |  { k ,  n }  e.  ran  ( 2nd `  g ) }  e.  _V )
159, 4sylan9eq 2528 . . . . . . . . 9  |-  ( ( g  =  <. V ,  E >.  /\  ( V  e.  Y  /\  E  e.  Z ) )  -> 
( 1st `  g
)  =  V )
1615ex 434 . . . . . . . 8  |-  ( g  =  <. V ,  E >.  ->  ( ( V  e.  Y  /\  E  e.  Z )  ->  ( 1st `  g )  =  V ) )
1716adantr 465 . . . . . . 7  |-  ( ( g  =  <. V ,  E >.  /\  k  =  N )  ->  (
( V  e.  Y  /\  E  e.  Z
)  ->  ( 1st `  g )  =  V ) )
1817com12 31 . . . . . 6  |-  ( ( V  e.  Y  /\  E  e.  Z )  ->  ( ( g  = 
<. V ,  E >.  /\  k  =  N )  ->  ( 1st `  g
)  =  V ) )
1918adantr 465 . . . . 5  |-  ( ( ( V  e.  Y  /\  E  e.  Z
)  /\  N  e.  V )  ->  (
( g  =  <. V ,  E >.  /\  k  =  N )  ->  ( 1st `  g )  =  V ) )
2019imp 429 . . . 4  |-  ( ( ( ( V  e.  Y  /\  E  e.  Z )  /\  N  e.  V )  /\  (
g  =  <. V ,  E >.  /\  k  =  N ) )  -> 
( 1st `  g
)  =  V )
21 preq1 4111 . . . . . . 7  |-  ( k  =  N  ->  { k ,  n }  =  { N ,  n }
)
2221adantl 466 . . . . . 6  |-  ( ( g  =  <. V ,  E >.  /\  k  =  N )  ->  { k ,  n }  =  { N ,  n }
)
2322adantl 466 . . . . 5  |-  ( ( ( ( V  e.  Y  /\  E  e.  Z )  /\  N  e.  V )  /\  (
g  =  <. V ,  E >.  /\  k  =  N ) )  ->  { k ,  n }  =  { N ,  n } )
24 fveq2 5871 . . . . . . . . . . . 12  |-  ( g  =  <. V ,  E >.  ->  ( 2nd `  g
)  =  ( 2nd `  <. V ,  E >. ) )
25 op2ndg 6807 . . . . . . . . . . . 12  |-  ( ( V  e.  Y  /\  E  e.  Z )  ->  ( 2nd `  <. V ,  E >. )  =  E )
2624, 25sylan9eq 2528 . . . . . . . . . . 11  |-  ( ( g  =  <. V ,  E >.  /\  ( V  e.  Y  /\  E  e.  Z ) )  -> 
( 2nd `  g
)  =  E )
2726ex 434 . . . . . . . . . 10  |-  ( g  =  <. V ,  E >.  ->  ( ( V  e.  Y  /\  E  e.  Z )  ->  ( 2nd `  g )  =  E ) )
2827adantr 465 . . . . . . . . 9  |-  ( ( g  =  <. V ,  E >.  /\  k  =  N )  ->  (
( V  e.  Y  /\  E  e.  Z
)  ->  ( 2nd `  g )  =  E ) )
2928com12 31 . . . . . . . 8  |-  ( ( V  e.  Y  /\  E  e.  Z )  ->  ( ( g  = 
<. V ,  E >.  /\  k  =  N )  ->  ( 2nd `  g
)  =  E ) )
3029adantr 465 . . . . . . 7  |-  ( ( ( V  e.  Y  /\  E  e.  Z
)  /\  N  e.  V )  ->  (
( g  =  <. V ,  E >.  /\  k  =  N )  ->  ( 2nd `  g )  =  E ) )
3130imp 429 . . . . . 6  |-  ( ( ( ( V  e.  Y  /\  E  e.  Z )  /\  N  e.  V )  /\  (
g  =  <. V ,  E >.  /\  k  =  N ) )  -> 
( 2nd `  g
)  =  E )
3231rneqd 5235 . . . . 5  |-  ( ( ( ( V  e.  Y  /\  E  e.  Z )  /\  N  e.  V )  /\  (
g  =  <. V ,  E >.  /\  k  =  N ) )  ->  ran  ( 2nd `  g
)  =  ran  E
)
3323, 32eleq12d 2549 . . . 4  |-  ( ( ( ( V  e.  Y  /\  E  e.  Z )  /\  N  e.  V )  /\  (
g  =  <. V ,  E >.  /\  k  =  N ) )  -> 
( { k ,  n }  e.  ran  ( 2nd `  g )  <->  { N ,  n }  e.  ran  E ) )
3420, 33rabeqbidv 3113 . . 3  |-  ( ( ( ( V  e.  Y  /\  E  e.  Z )  /\  N  e.  V )  /\  (
g  =  <. V ,  E >.  /\  k  =  N ) )  ->  { n  e.  ( 1st `  g )  |  { k ,  n }  e.  ran  ( 2nd `  g ) }  =  { n  e.  V  |  { N ,  n }  e.  ran  E }
)
353, 11, 14, 34ovmpt2dv2 6430 . 2  |-  ( ( ( V  e.  Y  /\  E  e.  Z
)  /\  N  e.  V )  ->  ( Neighbors  =  ( g  e.  _V ,  k  e.  ( 1st `  g )  |->  { n  e.  ( 1st `  g )  |  {
k ,  n }  e.  ran  ( 2nd `  g
) } )  -> 
( <. V ,  E >. Neighbors  N )  =  {
n  e.  V  |  { N ,  n }  e.  ran  E } ) )
361, 35mpi 17 1  |-  ( ( ( V  e.  Y  /\  E  e.  Z
)  /\  N  e.  V )  ->  ( <. V ,  E >. Neighbors  N
)  =  { n  e.  V  |  { N ,  n }  e.  ran  E } )
Colors of variables: wff setvar class
Syntax hints:    -> wi 4    /\ wa 369    = wceq 1379    e. wcel 1767   {crab 2821   _Vcvv 3118   {cpr 4034   <.cop 4038   ran crn 5005   ` cfv 5593  (class class class)co 6294    |-> cmpt2 6296   1stc1st 6792   2ndc2nd 6793   Neighbors cnbgra 24208
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1601  ax-4 1612  ax-5 1680  ax-6 1719  ax-7 1739  ax-8 1769  ax-9 1771  ax-10 1786  ax-11 1791  ax-12 1803  ax-13 1968  ax-ext 2445  ax-sep 4573  ax-nul 4581  ax-pow 4630  ax-pr 4691  ax-un 6586
This theorem depends on definitions:  df-bi 185  df-or 370  df-an 371  df-3an 975  df-tru 1382  df-ex 1597  df-nf 1600  df-sb 1712  df-eu 2279  df-mo 2280  df-clab 2453  df-cleq 2459  df-clel 2462  df-nfc 2617  df-ne 2664  df-ral 2822  df-rex 2823  df-rab 2826  df-v 3120  df-sbc 3337  df-dif 3484  df-un 3486  df-in 3488  df-ss 3495  df-nul 3791  df-if 3945  df-sn 4033  df-pr 4035  df-op 4039  df-uni 4251  df-br 4453  df-opab 4511  df-mpt 4512  df-id 4800  df-xp 5010  df-rel 5011  df-cnv 5012  df-co 5013  df-dm 5014  df-rn 5015  df-iota 5556  df-fun 5595  df-fv 5601  df-ov 6297  df-oprab 6298  df-mpt2 6299  df-1st 6794  df-2nd 6795  df-nbgra 24211
This theorem is referenced by:  nbgraop1  24216  nbgrael  24217  nbusgra  24219  rusgraprop3  24734
  Copyright terms: Public domain W3C validator