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

Theorem nbgraop 23514
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 23511 . 2  |- Neighbors  =  ( g  e.  _V , 
k  e.  ( 1st `  g )  |->  { n  e.  ( 1st `  g
)  |  { k ,  n }  e.  ran  ( 2nd `  g
) } )
2 opex 4667 . . . 4  |-  <. V ,  E >.  e.  _V
32a1i 11 . . 3  |-  ( ( ( V  e.  Y  /\  E  e.  Z
)  /\  N  e.  V )  ->  <. V ,  E >.  e.  _V )
4 op1stg 6702 . . . . . . . 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 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 5802 . . . . 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 2545 . . 3  |-  ( ( ( ( V  e.  Y  /\  E  e.  Z )  /\  N  e.  V )  /\  g  =  <. V ,  E >. )  ->  N  e.  ( 1st `  g ) )
12 fvex 5812 . . . 4  |-  ( 1st `  g )  e.  _V
13 rabexg 4553 . . . 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 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 4065 . . . . . . 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 5802 . . . . . . . . . . . 12  |-  ( g  =  <. V ,  E >.  ->  ( 2nd `  g
)  =  ( 2nd `  <. V ,  E >. ) )
25 op2ndg 6703 . . . . . . . . . . . 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 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 5178 . . . . 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 3073 . . 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 6337 . 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 1370    e. wcel 1758   {crab 2803   _Vcvv 3078   {cpr 3990   <.cop 3994   ran crn 4952   ` cfv 5529  (class class class)co 6203    |-> cmpt2 6205   1stc1st 6688   2ndc2nd 6689   Neighbors cnbgra 23508
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1592  ax-4 1603  ax-5 1671  ax-6 1710  ax-7 1730  ax-8 1760  ax-9 1762  ax-10 1777  ax-11 1782  ax-12 1794  ax-13 1955  ax-ext 2432  ax-sep 4524  ax-nul 4532  ax-pow 4581  ax-pr 4642  ax-un 6485
This theorem depends on definitions:  df-bi 185  df-or 370  df-an 371  df-3an 967  df-tru 1373  df-ex 1588  df-nf 1591  df-sb 1703  df-eu 2266  df-mo 2267  df-clab 2440  df-cleq 2446  df-clel 2449  df-nfc 2604  df-ne 2650  df-ral 2804  df-rex 2805  df-rab 2808  df-v 3080  df-sbc 3295  df-dif 3442  df-un 3444  df-in 3446  df-ss 3453  df-nul 3749  df-if 3903  df-sn 3989  df-pr 3991  df-op 3995  df-uni 4203  df-br 4404  df-opab 4462  df-mpt 4463  df-id 4747  df-xp 4957  df-rel 4958  df-cnv 4959  df-co 4960  df-dm 4961  df-rn 4962  df-iota 5492  df-fun 5531  df-fv 5537  df-ov 6206  df-oprab 6207  df-mpt2 6208  df-1st 6690  df-2nd 6691  df-nbgra 23511
This theorem is referenced by:  nbgraop1  23515  nbgrael  23516  nbusgra  23518  rusgraprop3  30726
  Copyright terms: Public domain W3C validator