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

Theorem nbgraop 24295
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 24292 . 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 6797 . . . . . . . 8  |-  ( ( V  e.  Y  /\  E  e.  Z )  ->  ( 1st `  <. V ,  E >. )  =  V )
54eqcomd 2451 . . . . . . 7  |-  ( ( V  e.  Y  /\  E  e.  Z )  ->  V  =  ( 1st `  <. V ,  E >. ) )
65eleq2d 2513 . . . . . 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 5856 . . . . 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 2534 . . 3  |-  ( ( ( ( V  e.  Y  /\  E  e.  Z )  /\  N  e.  V )  /\  g  =  <. V ,  E >. )  ->  N  e.  ( 1st `  g ) )
12 fvex 5866 . . . 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 2504 . . . . . . . . 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 4094 . . . . . . 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 5856 . . . . . . . . . . . 12  |-  ( g  =  <. V ,  E >.  ->  ( 2nd `  g
)  =  ( 2nd `  <. V ,  E >. ) )
25 op2ndg 6798 . . . . . . . . . . . 12  |-  ( ( V  e.  Y  /\  E  e.  Z )  ->  ( 2nd `  <. V ,  E >. )  =  E )
2624, 25sylan9eq 2504 . . . . . . . . . . 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 5220 . . . . 5  |-  ( ( ( ( V  e.  Y  /\  E  e.  Z )  /\  N  e.  V )  /\  (
g  =  <. V ,  E >.  /\  k  =  N ) )  ->  ran  ( 2nd `  g
)  =  ran  E
)
3323, 32eleq12d 2525 . . . 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 3090 . . 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 6421 . 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 1383    e. wcel 1804   {crab 2797   _Vcvv 3095   {cpr 4016   <.cop 4020   ran crn 4990   ` cfv 5578  (class class class)co 6281    |-> cmpt2 6283   1stc1st 6783   2ndc2nd 6784   Neighbors cnbgra 24289
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1605  ax-4 1618  ax-5 1691  ax-6 1734  ax-7 1776  ax-8 1806  ax-9 1808  ax-10 1823  ax-11 1828  ax-12 1840  ax-13 1985  ax-ext 2421  ax-sep 4558  ax-nul 4566  ax-pow 4615  ax-pr 4676  ax-un 6577
This theorem depends on definitions:  df-bi 185  df-or 370  df-an 371  df-3an 976  df-tru 1386  df-ex 1600  df-nf 1604  df-sb 1727  df-eu 2272  df-mo 2273  df-clab 2429  df-cleq 2435  df-clel 2438  df-nfc 2593  df-ne 2640  df-ral 2798  df-rex 2799  df-rab 2802  df-v 3097  df-sbc 3314  df-dif 3464  df-un 3466  df-in 3468  df-ss 3475  df-nul 3771  df-if 3927  df-sn 4015  df-pr 4017  df-op 4021  df-uni 4235  df-br 4438  df-opab 4496  df-mpt 4497  df-id 4785  df-xp 4995  df-rel 4996  df-cnv 4997  df-co 4998  df-dm 4999  df-rn 5000  df-iota 5541  df-fun 5580  df-fv 5586  df-ov 6284  df-oprab 6285  df-mpt2 6286  df-1st 6785  df-2nd 6786  df-nbgra 24292
This theorem is referenced by:  nbgraop1  24297  nbgrael  24298  nbusgra  24300  rusgraprop3  24815
  Copyright terms: Public domain W3C validator