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

Theorem nbgraop 24625
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 24622 . 2  |- Neighbors  =  ( g  e.  _V , 
k  e.  ( 1st `  g )  |->  { n  e.  ( 1st `  g
)  |  { k ,  n }  e.  ran  ( 2nd `  g
) } )
2 opex 4701 . . . 4  |-  <. V ,  E >.  e.  _V
32a1i 11 . . 3  |-  ( ( ( V  e.  Y  /\  E  e.  Z
)  /\  N  e.  V )  ->  <. V ,  E >.  e.  _V )
4 op1stg 6785 . . . . . . . 8  |-  ( ( V  e.  Y  /\  E  e.  Z )  ->  ( 1st `  <. V ,  E >. )  =  V )
54eqcomd 2462 . . . . . . 7  |-  ( ( V  e.  Y  /\  E  e.  Z )  ->  V  =  ( 1st `  <. V ,  E >. ) )
65eleq2d 2524 . . . . . 6  |-  ( ( V  e.  Y  /\  E  e.  Z )  ->  ( N  e.  V  <->  N  e.  ( 1st `  <. V ,  E >. )
) )
76biimpa 482 . . . . 5  |-  ( ( ( V  e.  Y  /\  E  e.  Z
)  /\  N  e.  V )  ->  N  e.  ( 1st `  <. V ,  E >. )
)
87adantr 463 . . . 4  |-  ( ( ( ( V  e.  Y  /\  E  e.  Z )  /\  N  e.  V )  /\  g  =  <. V ,  E >. )  ->  N  e.  ( 1st `  <. V ,  E >. ) )
9 fveq2 5848 . . . . 5  |-  ( g  =  <. V ,  E >.  ->  ( 1st `  g
)  =  ( 1st `  <. V ,  E >. ) )
109adantl 464 . . . 4  |-  ( ( ( ( V  e.  Y  /\  E  e.  Z )  /\  N  e.  V )  /\  g  =  <. V ,  E >. )  ->  ( 1st `  g )  =  ( 1st `  <. V ,  E >. ) )
118, 10eleqtrrd 2545 . . 3  |-  ( ( ( ( V  e.  Y  /\  E  e.  Z )  /\  N  e.  V )  /\  g  =  <. V ,  E >. )  ->  N  e.  ( 1st `  g ) )
12 fvex 5858 . . . 4  |-  ( 1st `  g )  e.  _V
13 rabexg 4587 . . . 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 2515 . . . . . . . . 9  |-  ( ( g  =  <. V ,  E >.  /\  ( V  e.  Y  /\  E  e.  Z ) )  -> 
( 1st `  g
)  =  V )
1615ex 432 . . . . . . . 8  |-  ( g  =  <. V ,  E >.  ->  ( ( V  e.  Y  /\  E  e.  Z )  ->  ( 1st `  g )  =  V ) )
1716adantr 463 . . . . . . 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 463 . . . . 5  |-  ( ( ( V  e.  Y  /\  E  e.  Z
)  /\  N  e.  V )  ->  (
( g  =  <. V ,  E >.  /\  k  =  N )  ->  ( 1st `  g )  =  V ) )
2019imp 427 . . . 4  |-  ( ( ( ( V  e.  Y  /\  E  e.  Z )  /\  N  e.  V )  /\  (
g  =  <. V ,  E >.  /\  k  =  N ) )  -> 
( 1st `  g
)  =  V )
21 preq1 4095 . . . . . . 7  |-  ( k  =  N  ->  { k ,  n }  =  { N ,  n }
)
2221adantl 464 . . . . . 6  |-  ( ( g  =  <. V ,  E >.  /\  k  =  N )  ->  { k ,  n }  =  { N ,  n }
)
2322adantl 464 . . . . 5  |-  ( ( ( ( V  e.  Y  /\  E  e.  Z )  /\  N  e.  V )  /\  (
g  =  <. V ,  E >.  /\  k  =  N ) )  ->  { k ,  n }  =  { N ,  n } )
24 fveq2 5848 . . . . . . . . . . . 12  |-  ( g  =  <. V ,  E >.  ->  ( 2nd `  g
)  =  ( 2nd `  <. V ,  E >. ) )
25 op2ndg 6786 . . . . . . . . . . . 12  |-  ( ( V  e.  Y  /\  E  e.  Z )  ->  ( 2nd `  <. V ,  E >. )  =  E )
2624, 25sylan9eq 2515 . . . . . . . . . . 11  |-  ( ( g  =  <. V ,  E >.  /\  ( V  e.  Y  /\  E  e.  Z ) )  -> 
( 2nd `  g
)  =  E )
2726ex 432 . . . . . . . . . 10  |-  ( g  =  <. V ,  E >.  ->  ( ( V  e.  Y  /\  E  e.  Z )  ->  ( 2nd `  g )  =  E ) )
2827adantr 463 . . . . . . . . 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 463 . . . . . . 7  |-  ( ( ( V  e.  Y  /\  E  e.  Z
)  /\  N  e.  V )  ->  (
( g  =  <. V ,  E >.  /\  k  =  N )  ->  ( 2nd `  g )  =  E ) )
3130imp 427 . . . . . 6  |-  ( ( ( ( V  e.  Y  /\  E  e.  Z )  /\  N  e.  V )  /\  (
g  =  <. V ,  E >.  /\  k  =  N ) )  -> 
( 2nd `  g
)  =  E )
3231rneqd 5219 . . . . 5  |-  ( ( ( ( V  e.  Y  /\  E  e.  Z )  /\  N  e.  V )  /\  (
g  =  <. V ,  E >.  /\  k  =  N ) )  ->  ran  ( 2nd `  g
)  =  ran  E
)
3323, 32eleq12d 2536 . . . 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 3101 . . 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 6409 . 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 367    = wceq 1398    e. wcel 1823   {crab 2808   _Vcvv 3106   {cpr 4018   <.cop 4022   ran crn 4989   ` cfv 5570  (class class class)co 6270    |-> cmpt2 6272   1stc1st 6771   2ndc2nd 6772   Neighbors cnbgra 24619
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1623  ax-4 1636  ax-5 1709  ax-6 1752  ax-7 1795  ax-8 1825  ax-9 1827  ax-10 1842  ax-11 1847  ax-12 1859  ax-13 2004  ax-ext 2432  ax-sep 4560  ax-nul 4568  ax-pow 4615  ax-pr 4676  ax-un 6565
This theorem depends on definitions:  df-bi 185  df-or 368  df-an 369  df-3an 973  df-tru 1401  df-ex 1618  df-nf 1622  df-sb 1745  df-eu 2288  df-mo 2289  df-clab 2440  df-cleq 2446  df-clel 2449  df-nfc 2604  df-ne 2651  df-ral 2809  df-rex 2810  df-rab 2813  df-v 3108  df-sbc 3325  df-dif 3464  df-un 3466  df-in 3468  df-ss 3475  df-nul 3784  df-if 3930  df-sn 4017  df-pr 4019  df-op 4023  df-uni 4236  df-br 4440  df-opab 4498  df-mpt 4499  df-id 4784  df-xp 4994  df-rel 4995  df-cnv 4996  df-co 4997  df-dm 4998  df-rn 4999  df-iota 5534  df-fun 5572  df-fv 5578  df-ov 6273  df-oprab 6274  df-mpt2 6275  df-1st 6773  df-2nd 6774  df-nbgra 24622
This theorem is referenced by:  nbgraop1  24627  nbgrael  24628  nbusgra  24630  rusgraprop3  25145
  Copyright terms: Public domain W3C validator