MPE Home Metamath Proof Explorer < Previous   Next >
Nearby theorems
Mirrors  >  Home  >  MPE Home  >  Th. List  >  nbgrval Structured version   Visualization version   GIF version

Theorem nbgrval 29950
Description: The set of neighbors of a vertex 𝑉 in a graph 𝐺. (Contributed by Alexander van der Vekens, 7-Oct-2017.) (Revised by AV, 24-Oct-2020.) (Revised by AV, 21-Mar-2021.)
Hypotheses
Ref Expression
nbgrval.v 𝑉 = (Vtx‘𝐺)
nbgrval.e 𝐸 = (Edg‘𝐺)
Assertion
Ref Expression
nbgrval (𝑁 ∈ 𝑉 → (𝐺 NeighbVtx 𝑁) = {𝑛 ∈ (𝑉 ∖ {𝑁}) ∣ ∃𝑒 ∈ 𝐸 {𝑁, 𝑛} ⊆ 𝑒})
Distinct variable groups:   𝑒,𝐸   𝑒,𝐺,𝑛   𝑒,𝑁,𝑛   𝑒,𝑉,𝑛
Allowed substitution hint:   𝐸(𝑛)

Proof of Theorem nbgrval
Dummy variables 𝑔 𝑘 are mutually distinct and distinct from all other variables.
StepHypRef Expression
1 df-nbgr 29947 . 2 NeighbVtx = (𝑔 ∈ V, 𝑘 ∈ (Vtx‘𝑔) ↦ {𝑛 ∈ ((Vtx‘𝑔) ∖ {𝑘}) ∣ ∃𝑒 ∈ (Edg‘𝑔){𝑘, 𝑛} ⊆ 𝑒})
2 nbgrval.v . . . 4 𝑉 = (Vtx‘𝐺)
321vgrex 29613 . . 3 (𝑁 ∈ 𝑉 → 𝐺 ∈ V)
4 fveq2 6911 . . . . . 6 (𝑔 = 𝐺 → (Vtx‘𝑔) = (Vtx‘𝐺))
52, 4eqtr4id 2817 . . . . 5 (𝑔 = 𝐺 → 𝑉 = (Vtx‘𝑔))
65eleq2d 2850 . . . 4 (𝑔 = 𝐺 → (𝑁 ∈ 𝑉 ↔ 𝑁 ∈ (Vtx‘𝑔)))
76biimpac 484 . . 3 ((𝑁 ∈ 𝑉 ∧ 𝑔 = 𝐺) → 𝑁 ∈ (Vtx‘𝑔))
8 fvex 6924 . . . . 5 (Vtx‘𝑔) ∈ V
98difexi 5297 . . . 4 ((Vtx‘𝑔) ∖ {𝑘}) ∈ V
10 rabexg 5304 . . . 4 (((Vtx‘𝑔) ∖ {𝑘}) ∈ V → {𝑛 ∈ ((Vtx‘𝑔) ∖ {𝑘}) ∣ ∃𝑒 ∈ (Edg‘𝑔){𝑘, 𝑛} ⊆ 𝑒} ∈ V)
119, 10mp1i 14 . . 3 ((𝑁 ∈ 𝑉 ∧ (𝑔 = 𝐺 ∧ 𝑘 = 𝑁)) → {𝑛 ∈ ((Vtx‘𝑔) ∖ {𝑘}) ∣ ∃𝑒 ∈ (Edg‘𝑔){𝑘, 𝑛} ⊆ 𝑒} ∈ V)
124, 2eqtr4di 2816 . . . . . . 7 (𝑔 = 𝐺 → (Vtx‘𝑔) = 𝑉)
1312adantr 486 . . . . . 6 ((𝑔 = 𝐺 ∧ 𝑘 = 𝑁) → (Vtx‘𝑔) = 𝑉)
14 sneq 4594 . . . . . . 7 (𝑘 = 𝑁 → {𝑘} = {𝑁})
1514adantl 487 . . . . . 6 ((𝑔 = 𝐺 ∧ 𝑘 = 𝑁) → {𝑘} = {𝑁})
1613, 15difeq12d 4067 . . . . 5 ((𝑔 = 𝐺 ∧ 𝑘 = 𝑁) → ((Vtx‘𝑔) ∖ {𝑘}) = (𝑉 ∖ {𝑁}))
1716adantl 487 . . . 4 ((𝑁 ∈ 𝑉 ∧ (𝑔 = 𝐺 ∧ 𝑘 = 𝑁)) → ((Vtx‘𝑔) ∖ {𝑘}) = (𝑉 ∖ {𝑁}))
18 fveq2 6911 . . . . . . . 8 (𝑔 = 𝐺 → (Edg‘𝑔) = (Edg‘𝐺))
19 nbgrval.e . . . . . . . 8 𝐸 = (Edg‘𝐺)
2018, 19eqtr4di 2816 . . . . . . 7 (𝑔 = 𝐺 → (Edg‘𝑔) = 𝐸)
2120adantr 486 . . . . . 6 ((𝑔 = 𝐺 ∧ 𝑘 = 𝑁) → (Edg‘𝑔) = 𝐸)
2221adantl 487 . . . . 5 ((𝑁 ∈ 𝑉 ∧ (𝑔 = 𝐺 ∧ 𝑘 = 𝑁)) → (Edg‘𝑔) = 𝐸)
23 preq1 4694 . . . . . . . 8 (𝑘 = 𝑁 → {𝑘, 𝑛} = {𝑁, 𝑛})
2423sseq1d 3944 . . . . . . 7 (𝑘 = 𝑁 → ({𝑘, 𝑛} ⊆ 𝑒 ↔ {𝑁, 𝑛} ⊆ 𝑒))
2524adantl 487 . . . . . 6 ((𝑔 = 𝐺 ∧ 𝑘 = 𝑁) → ({𝑘, 𝑛} ⊆ 𝑒 ↔ {𝑁, 𝑛} ⊆ 𝑒))
2625adantl 487 . . . . 5 ((𝑁 ∈ 𝑉 ∧ (𝑔 = 𝐺 ∧ 𝑘 = 𝑁)) → ({𝑘, 𝑛} ⊆ 𝑒 ↔ {𝑁, 𝑛} ⊆ 𝑒))
2722, 26rexeqbidv 3339 . . . 4 ((𝑁 ∈ 𝑉 ∧ (𝑔 = 𝐺 ∧ 𝑘 = 𝑁)) → (∃𝑒 ∈ (Edg‘𝑔){𝑘, 𝑛} ⊆ 𝑒 ↔ ∃𝑒 ∈ 𝐸 {𝑁, 𝑛} ⊆ 𝑒))
2817, 27rabeqbidv 3433 . . 3 ((𝑁 ∈ 𝑉 ∧ (𝑔 = 𝐺 ∧ 𝑘 = 𝑁)) → {𝑛 ∈ ((Vtx‘𝑔) ∖ {𝑘}) ∣ ∃𝑒 ∈ (Edg‘𝑔){𝑘, 𝑛} ⊆ 𝑒} = {𝑛 ∈ (𝑉 ∖ {𝑁}) ∣ ∃𝑒 ∈ 𝐸 {𝑁, 𝑛} ⊆ 𝑒})
293, 7, 11, 28ovmpodv2 7605 . 2 (𝑁 ∈ 𝑉 → ( NeighbVtx = (𝑔 ∈ V, 𝑘 ∈ (Vtx‘𝑔) ↦ {𝑛 ∈ ((Vtx‘𝑔) ∖ {𝑘}) ∣ ∃𝑒 ∈ (Edg‘𝑔){𝑘, 𝑛} ⊆ 𝑒}) → (𝐺 NeighbVtx 𝑁) = {𝑛 ∈ (𝑉 ∖ {𝑁}) ∣ ∃𝑒 ∈ 𝐸 {𝑁, 𝑛} ⊆ 𝑒}))
301, 29mpi 21 1 (𝑁 ∈ 𝑉 → (𝐺 NeighbVtx 𝑁) = {𝑛 ∈ (𝑉 ∖ {𝑁}) ∣ ∃𝑒 ∈ 𝐸 {𝑁, 𝑛} ⊆ 𝑒})
Colors of variables:    wff setvar class
This proof depends on syntax axioms:   → wi 4   ↔ wb 209   ∧ wa 401   = wceq 1570   ∈ wcel 2147  ∃wrex 3090  {crab 3416  Vcvv 3454   ⊆ wss 3900   ∖ cdif 4048  {csn 4588  {cpr 4590  ‘cfv 6561  (class class class)co 7446   ∈ cmpo 7448  Vtxcvtx 29607  Edgcedg 29658   NeighbVtx cnbgr 29946
This proof depends on axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1828  ax-4 1842  ax-5 1945  ax-6 2002  ax-7 2043  ax-8 2149  ax-9 2157  ax-10 2180  ax-11 2197  ax-12 2216  ax-ext 2735  ax-sep 5253  ax-nul 5264  ax-pr 5396
This proof depends on definitions:  df-bi 210  df-an 402  df-or 862  df-3an 1105  df-tru 1573  df-fal 1583  df-ex 1813  df-nf 1817  df-sb 2102  df-mo 2567  df-eu 2597  df-clab 2742  df-cleq 2755  df-clel 2839  df-nfc 2913  df-ne 2960  df-ral 3081  df-rex 3091  df-rab 3417  df-v 3456  df-ss 3901  df-dif 4050  df-in 4094  df-un 4154  df-nul 4282  df-if 4486  df-pw 4562  df-sn 4589  df-pr 4591  df-op 4839  df-uni 4871  df-br 5107  df-opab 5172  df-id 5551  df-xp 5662  df-rel 5663  df-cnv 5664  df-co 5665  df-dm 5666  df-iota 6515  df-fun 6563  df-fv 6569  df-ov 7449  df-oprab 7450  df-mpo 7451  df-nbgr 29947
This theorem is used by:  dfnbgr2  29951  dfnbgr3  29952  nbgrel  29954  nbuhgr  29957  nbupgr  29958  nbumgrvtx  29960  nbgr0edglem  29970  nbgrnself  29973
  Copyright terms: Public domain W3C validator