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

Theorem nbgrval 27126
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 27123 . 2 NeighbVtx = (𝑔 ∈ V, 𝑘 ∈ (Vtx‘𝑔) ↦ {𝑛 ∈ ((Vtx‘𝑔) ∖ {𝑘}) ∣ ∃𝑒 ∈ (Edg‘𝑔){𝑘, 𝑛} ⊆ 𝑒})
2 nbgrval.v . . . 4 𝑉 = (Vtx‘𝐺)
321vgrex 26795 . . 3 (𝑁𝑉𝐺 ∈ V)
4 fveq2 6645 . . . . . 6 (𝑔 = 𝐺 → (Vtx‘𝑔) = (Vtx‘𝐺))
52, 4eqtr4id 2852 . . . . 5 (𝑔 = 𝐺𝑉 = (Vtx‘𝑔))
65eleq2d 2875 . . . 4 (𝑔 = 𝐺 → (𝑁𝑉𝑁 ∈ (Vtx‘𝑔)))
76biimpac 482 . . 3 ((𝑁𝑉𝑔 = 𝐺) → 𝑁 ∈ (Vtx‘𝑔))
8 fvex 6658 . . . . 5 (Vtx‘𝑔) ∈ V
98difexi 5196 . . . 4 ((Vtx‘𝑔) ∖ {𝑘}) ∈ V
10 rabexg 5198 . . . 4 (((Vtx‘𝑔) ∖ {𝑘}) ∈ V → {𝑛 ∈ ((Vtx‘𝑔) ∖ {𝑘}) ∣ ∃𝑒 ∈ (Edg‘𝑔){𝑘, 𝑛} ⊆ 𝑒} ∈ V)
119, 10mp1i 13 . . 3 ((𝑁𝑉 ∧ (𝑔 = 𝐺𝑘 = 𝑁)) → {𝑛 ∈ ((Vtx‘𝑔) ∖ {𝑘}) ∣ ∃𝑒 ∈ (Edg‘𝑔){𝑘, 𝑛} ⊆ 𝑒} ∈ V)
124, 2eqtr4di 2851 . . . . . . 7 (𝑔 = 𝐺 → (Vtx‘𝑔) = 𝑉)
1312adantr 484 . . . . . 6 ((𝑔 = 𝐺𝑘 = 𝑁) → (Vtx‘𝑔) = 𝑉)
14 sneq 4535 . . . . . . 7 (𝑘 = 𝑁 → {𝑘} = {𝑁})
1514adantl 485 . . . . . 6 ((𝑔 = 𝐺𝑘 = 𝑁) → {𝑘} = {𝑁})
1613, 15difeq12d 4051 . . . . 5 ((𝑔 = 𝐺𝑘 = 𝑁) → ((Vtx‘𝑔) ∖ {𝑘}) = (𝑉 ∖ {𝑁}))
1716adantl 485 . . . 4 ((𝑁𝑉 ∧ (𝑔 = 𝐺𝑘 = 𝑁)) → ((Vtx‘𝑔) ∖ {𝑘}) = (𝑉 ∖ {𝑁}))
18 fveq2 6645 . . . . . . . 8 (𝑔 = 𝐺 → (Edg‘𝑔) = (Edg‘𝐺))
19 nbgrval.e . . . . . . . 8 𝐸 = (Edg‘𝐺)
2018, 19eqtr4di 2851 . . . . . . 7 (𝑔 = 𝐺 → (Edg‘𝑔) = 𝐸)
2120adantr 484 . . . . . 6 ((𝑔 = 𝐺𝑘 = 𝑁) → (Edg‘𝑔) = 𝐸)
2221adantl 485 . . . . 5 ((𝑁𝑉 ∧ (𝑔 = 𝐺𝑘 = 𝑁)) → (Edg‘𝑔) = 𝐸)
23 preq1 4629 . . . . . . . 8 (𝑘 = 𝑁 → {𝑘, 𝑛} = {𝑁, 𝑛})
2423sseq1d 3946 . . . . . . 7 (𝑘 = 𝑁 → ({𝑘, 𝑛} ⊆ 𝑒 ↔ {𝑁, 𝑛} ⊆ 𝑒))
2524adantl 485 . . . . . 6 ((𝑔 = 𝐺𝑘 = 𝑁) → ({𝑘, 𝑛} ⊆ 𝑒 ↔ {𝑁, 𝑛} ⊆ 𝑒))
2625adantl 485 . . . . 5 ((𝑁𝑉 ∧ (𝑔 = 𝐺𝑘 = 𝑁)) → ({𝑘, 𝑛} ⊆ 𝑒 ↔ {𝑁, 𝑛} ⊆ 𝑒))
2722, 26rexeqbidv 3355 . . . 4 ((𝑁𝑉 ∧ (𝑔 = 𝐺𝑘 = 𝑁)) → (∃𝑒 ∈ (Edg‘𝑔){𝑘, 𝑛} ⊆ 𝑒 ↔ ∃𝑒𝐸 {𝑁, 𝑛} ⊆ 𝑒))
2817, 27rabeqbidv 3433 . . 3 ((𝑁𝑉 ∧ (𝑔 = 𝐺𝑘 = 𝑁)) → {𝑛 ∈ ((Vtx‘𝑔) ∖ {𝑘}) ∣ ∃𝑒 ∈ (Edg‘𝑔){𝑘, 𝑛} ⊆ 𝑒} = {𝑛 ∈ (𝑉 ∖ {𝑁}) ∣ ∃𝑒𝐸 {𝑁, 𝑛} ⊆ 𝑒})
293, 7, 11, 28ovmpodv2 7287 . 2 (𝑁𝑉 → ( NeighbVtx = (𝑔 ∈ V, 𝑘 ∈ (Vtx‘𝑔) ↦ {𝑛 ∈ ((Vtx‘𝑔) ∖ {𝑘}) ∣ ∃𝑒 ∈ (Edg‘𝑔){𝑘, 𝑛} ⊆ 𝑒}) → (𝐺 NeighbVtx 𝑁) = {𝑛 ∈ (𝑉 ∖ {𝑁}) ∣ ∃𝑒𝐸 {𝑁, 𝑛} ⊆ 𝑒}))
301, 29mpi 20 1 (𝑁𝑉 → (𝐺 NeighbVtx 𝑁) = {𝑛 ∈ (𝑉 ∖ {𝑁}) ∣ ∃𝑒𝐸 {𝑁, 𝑛} ⊆ 𝑒})
Colors of variables: wff setvar class
Syntax hints:  wi 4  wb 209  wa 399   = wceq 1538  wcel 2111  wrex 3107  {crab 3110  Vcvv 3441  cdif 3878  wss 3881  {csn 4525  {cpr 4527  cfv 6324  (class class class)co 7135  cmpo 7137  Vtxcvtx 26789  Edgcedg 26840   NeighbVtx cnbgr 27122
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1797  ax-4 1811  ax-5 1911  ax-6 1970  ax-7 2015  ax-8 2113  ax-9 2121  ax-10 2142  ax-11 2158  ax-12 2175  ax-ext 2770  ax-sep 5167  ax-nul 5174  ax-pow 5231  ax-pr 5295
This theorem depends on definitions:  df-bi 210  df-an 400  df-or 845  df-3an 1086  df-tru 1541  df-ex 1782  df-nf 1786  df-sb 2070  df-mo 2598  df-eu 2629  df-clab 2777  df-cleq 2791  df-clel 2870  df-nfc 2938  df-ral 3111  df-rex 3112  df-rab 3115  df-v 3443  df-sbc 3721  df-dif 3884  df-un 3886  df-in 3888  df-ss 3898  df-nul 4244  df-if 4426  df-sn 4526  df-pr 4528  df-op 4532  df-uni 4801  df-br 5031  df-opab 5093  df-id 5425  df-xp 5525  df-rel 5526  df-cnv 5527  df-co 5528  df-dm 5529  df-iota 6283  df-fun 6326  df-fv 6332  df-ov 7138  df-oprab 7139  df-mpo 7140  df-nbgr 27123
This theorem is referenced by:  dfnbgr2  27127  dfnbgr3  27128  nbgrel  27130  nbuhgr  27133  nbupgr  27134  nbumgrvtx  27136  nbgr0vtxlem  27145  nbgrnself  27149
  Copyright terms: Public domain W3C validator