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

Theorem nbgraop 21441
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 21438 . 2  |- Neighbors  =  ( g  e.  _V , 
k  e.  ( 1st `  g )  |->  { n  e.  ( 1st `  g
)  |  { k ,  n }  e.  ran  ( 2nd `  g
) } )
2 opex 4430 . . . 4  |-  <. V ,  E >.  e.  _V
32a1i 11 . . 3  |-  ( ( ( V  e.  Y  /\  E  e.  Z
)  /\  N  e.  V )  ->  <. V ,  E >.  e.  _V )
4 op1stg 6362 . . . . . . . 8  |-  ( ( V  e.  Y  /\  E  e.  Z )  ->  ( 1st `  <. V ,  E >. )  =  V )
54eqcomd 2443 . . . . . . 7  |-  ( ( V  e.  Y  /\  E  e.  Z )  ->  V  =  ( 1st `  <. V ,  E >. ) )
65eleq2d 2505 . . . . . 6  |-  ( ( V  e.  Y  /\  E  e.  Z )  ->  ( N  e.  V  <->  N  e.  ( 1st `  <. V ,  E >. )
) )
76biimpa 472 . . . . 5  |-  ( ( ( V  e.  Y  /\  E  e.  Z
)  /\  N  e.  V )  ->  N  e.  ( 1st `  <. V ,  E >. )
)
87adantr 453 . . . 4  |-  ( ( ( ( V  e.  Y  /\  E  e.  Z )  /\  N  e.  V )  /\  g  =  <. V ,  E >. )  ->  N  e.  ( 1st `  <. V ,  E >. ) )
9 fveq2 5731 . . . . 5  |-  ( g  =  <. V ,  E >.  ->  ( 1st `  g
)  =  ( 1st `  <. V ,  E >. ) )
109adantl 454 . . . 4  |-  ( ( ( ( V  e.  Y  /\  E  e.  Z )  /\  N  e.  V )  /\  g  =  <. V ,  E >. )  ->  ( 1st `  g )  =  ( 1st `  <. V ,  E >. ) )
118, 10eleqtrrd 2515 . . 3  |-  ( ( ( ( V  e.  Y  /\  E  e.  Z )  /\  N  e.  V )  /\  g  =  <. V ,  E >. )  ->  N  e.  ( 1st `  g ) )
12 fvex 5745 . . . 4  |-  ( 1st `  g )  e.  _V
13 rabexg 4356 . . . 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 2490 . . . . . . . . 9  |-  ( ( g  =  <. V ,  E >.  /\  ( V  e.  Y  /\  E  e.  Z ) )  -> 
( 1st `  g
)  =  V )
1615ex 425 . . . . . . . 8  |-  ( g  =  <. V ,  E >.  ->  ( ( V  e.  Y  /\  E  e.  Z )  ->  ( 1st `  g )  =  V ) )
1716adantr 453 . . . . . . 7  |-  ( ( g  =  <. V ,  E >.  /\  k  =  N )  ->  (
( V  e.  Y  /\  E  e.  Z
)  ->  ( 1st `  g )  =  V ) )
1817com12 30 . . . . . 6  |-  ( ( V  e.  Y  /\  E  e.  Z )  ->  ( ( g  = 
<. V ,  E >.  /\  k  =  N )  ->  ( 1st `  g
)  =  V ) )
1918adantr 453 . . . . 5  |-  ( ( ( V  e.  Y  /\  E  e.  Z
)  /\  N  e.  V )  ->  (
( g  =  <. V ,  E >.  /\  k  =  N )  ->  ( 1st `  g )  =  V ) )
2019imp 420 . . . 4  |-  ( ( ( ( V  e.  Y  /\  E  e.  Z )  /\  N  e.  V )  /\  (
g  =  <. V ,  E >.  /\  k  =  N ) )  -> 
( 1st `  g
)  =  V )
21 preq1 3885 . . . . . . 7  |-  ( k  =  N  ->  { k ,  n }  =  { N ,  n }
)
2221adantl 454 . . . . . 6  |-  ( ( g  =  <. V ,  E >.  /\  k  =  N )  ->  { k ,  n }  =  { N ,  n }
)
2322adantl 454 . . . . 5  |-  ( ( ( ( V  e.  Y  /\  E  e.  Z )  /\  N  e.  V )  /\  (
g  =  <. V ,  E >.  /\  k  =  N ) )  ->  { k ,  n }  =  { N ,  n } )
24 fveq2 5731 . . . . . . . . . . . 12  |-  ( g  =  <. V ,  E >.  ->  ( 2nd `  g
)  =  ( 2nd `  <. V ,  E >. ) )
25 op2ndg 6363 . . . . . . . . . . . 12  |-  ( ( V  e.  Y  /\  E  e.  Z )  ->  ( 2nd `  <. V ,  E >. )  =  E )
2624, 25sylan9eq 2490 . . . . . . . . . . 11  |-  ( ( g  =  <. V ,  E >.  /\  ( V  e.  Y  /\  E  e.  Z ) )  -> 
( 2nd `  g
)  =  E )
2726ex 425 . . . . . . . . . 10  |-  ( g  =  <. V ,  E >.  ->  ( ( V  e.  Y  /\  E  e.  Z )  ->  ( 2nd `  g )  =  E ) )
2827adantr 453 . . . . . . . . 9  |-  ( ( g  =  <. V ,  E >.  /\  k  =  N )  ->  (
( V  e.  Y  /\  E  e.  Z
)  ->  ( 2nd `  g )  =  E ) )
2928com12 30 . . . . . . . 8  |-  ( ( V  e.  Y  /\  E  e.  Z )  ->  ( ( g  = 
<. V ,  E >.  /\  k  =  N )  ->  ( 2nd `  g
)  =  E ) )
3029adantr 453 . . . . . . 7  |-  ( ( ( V  e.  Y  /\  E  e.  Z
)  /\  N  e.  V )  ->  (
( g  =  <. V ,  E >.  /\  k  =  N )  ->  ( 2nd `  g )  =  E ) )
3130imp 420 . . . . . 6  |-  ( ( ( ( V  e.  Y  /\  E  e.  Z )  /\  N  e.  V )  /\  (
g  =  <. V ,  E >.  /\  k  =  N ) )  -> 
( 2nd `  g
)  =  E )
3231rneqd 5100 . . . . 5  |-  ( ( ( ( V  e.  Y  /\  E  e.  Z )  /\  N  e.  V )  /\  (
g  =  <. V ,  E >.  /\  k  =  N ) )  ->  ran  ( 2nd `  g
)  =  ran  E
)
3323, 32eleq12d 2506 . . . 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 2953 . . 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 6210 . 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 set class
Syntax hints:    -> wi 4    /\ wa 360    = wceq 1653    e. wcel 1726   {crab 2711   _Vcvv 2958   {cpr 3817   <.cop 3819   ran crn 4882   ` cfv 5457  (class class class)co 6084    e. cmpt2 6086   1stc1st 6350   2ndc2nd 6351   Neighbors cnbgra 21435
This theorem is referenced by:  nbgraop1  21442  nbgrael  21443  nbusgra  21445
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1556  ax-5 1567  ax-17 1627  ax-9 1667  ax-8 1688  ax-13 1728  ax-14 1730  ax-6 1745  ax-7 1750  ax-11 1762  ax-12 1951  ax-ext 2419  ax-sep 4333  ax-nul 4341  ax-pow 4380  ax-pr 4406  ax-un 4704
This theorem depends on definitions:  df-bi 179  df-or 361  df-an 362  df-3an 939  df-tru 1329  df-ex 1552  df-nf 1555  df-sb 1660  df-eu 2287  df-mo 2288  df-clab 2425  df-cleq 2431  df-clel 2434  df-nfc 2563  df-ne 2603  df-ral 2712  df-rex 2713  df-rab 2716  df-v 2960  df-sbc 3164  df-dif 3325  df-un 3327  df-in 3329  df-ss 3336  df-nul 3631  df-if 3742  df-sn 3822  df-pr 3823  df-op 3825  df-uni 4018  df-br 4216  df-opab 4270  df-mpt 4271  df-id 4501  df-xp 4887  df-rel 4888  df-cnv 4889  df-co 4890  df-dm 4891  df-rn 4892  df-iota 5421  df-fun 5459  df-fv 5465  df-ov 6087  df-oprab 6088  df-mpt2 6089  df-1st 6352  df-2nd 6353  df-nbgra 21438
  Copyright terms: Public domain W3C validator