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

Theorem nbgrval 27120
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 27117 . 2 NeighbVtx = (𝑔 ∈ V, 𝑘 ∈ (Vtx‘𝑔) ↦ {𝑛 ∈ ((Vtx‘𝑔) ∖ {𝑘}) ∣ ∃𝑒 ∈ (Edg‘𝑔){𝑘, 𝑛} ⊆ 𝑒})
2 nbgrval.v . . . 4 𝑉 = (Vtx‘𝐺)
321vgrex 26789 . . 3 (𝑁𝑉𝐺 ∈ V)
4 fveq2 6672 . . . . . 6 (𝑔 = 𝐺 → (Vtx‘𝑔) = (Vtx‘𝐺))
54, 2syl6reqr 2877 . . . . 5 (𝑔 = 𝐺𝑉 = (Vtx‘𝑔))
65eleq2d 2900 . . . 4 (𝑔 = 𝐺 → (𝑁𝑉𝑁 ∈ (Vtx‘𝑔)))
76biimpac 481 . . 3 ((𝑁𝑉𝑔 = 𝐺) → 𝑁 ∈ (Vtx‘𝑔))
8 fvex 6685 . . . . 5 (Vtx‘𝑔) ∈ V
98difexi 5234 . . . 4 ((Vtx‘𝑔) ∖ {𝑘}) ∈ V
10 rabexg 5236 . . . 4 (((Vtx‘𝑔) ∖ {𝑘}) ∈ V → {𝑛 ∈ ((Vtx‘𝑔) ∖ {𝑘}) ∣ ∃𝑒 ∈ (Edg‘𝑔){𝑘, 𝑛} ⊆ 𝑒} ∈ V)
119, 10mp1i 13 . . 3 ((𝑁𝑉 ∧ (𝑔 = 𝐺𝑘 = 𝑁)) → {𝑛 ∈ ((Vtx‘𝑔) ∖ {𝑘}) ∣ ∃𝑒 ∈ (Edg‘𝑔){𝑘, 𝑛} ⊆ 𝑒} ∈ V)
124, 2syl6eqr 2876 . . . . . . 7 (𝑔 = 𝐺 → (Vtx‘𝑔) = 𝑉)
1312adantr 483 . . . . . 6 ((𝑔 = 𝐺𝑘 = 𝑁) → (Vtx‘𝑔) = 𝑉)
14 sneq 4579 . . . . . . 7 (𝑘 = 𝑁 → {𝑘} = {𝑁})
1514adantl 484 . . . . . 6 ((𝑔 = 𝐺𝑘 = 𝑁) → {𝑘} = {𝑁})
1613, 15difeq12d 4102 . . . . 5 ((𝑔 = 𝐺𝑘 = 𝑁) → ((Vtx‘𝑔) ∖ {𝑘}) = (𝑉 ∖ {𝑁}))
1716adantl 484 . . . 4 ((𝑁𝑉 ∧ (𝑔 = 𝐺𝑘 = 𝑁)) → ((Vtx‘𝑔) ∖ {𝑘}) = (𝑉 ∖ {𝑁}))
18 fveq2 6672 . . . . . . . 8 (𝑔 = 𝐺 → (Edg‘𝑔) = (Edg‘𝐺))
19 nbgrval.e . . . . . . . 8 𝐸 = (Edg‘𝐺)
2018, 19syl6eqr 2876 . . . . . . 7 (𝑔 = 𝐺 → (Edg‘𝑔) = 𝐸)
2120adantr 483 . . . . . 6 ((𝑔 = 𝐺𝑘 = 𝑁) → (Edg‘𝑔) = 𝐸)
2221adantl 484 . . . . 5 ((𝑁𝑉 ∧ (𝑔 = 𝐺𝑘 = 𝑁)) → (Edg‘𝑔) = 𝐸)
23 preq1 4671 . . . . . . . 8 (𝑘 = 𝑁 → {𝑘, 𝑛} = {𝑁, 𝑛})
2423sseq1d 4000 . . . . . . 7 (𝑘 = 𝑁 → ({𝑘, 𝑛} ⊆ 𝑒 ↔ {𝑁, 𝑛} ⊆ 𝑒))
2524adantl 484 . . . . . 6 ((𝑔 = 𝐺𝑘 = 𝑁) → ({𝑘, 𝑛} ⊆ 𝑒 ↔ {𝑁, 𝑛} ⊆ 𝑒))
2625adantl 484 . . . . 5 ((𝑁𝑉 ∧ (𝑔 = 𝐺𝑘 = 𝑁)) → ({𝑘, 𝑛} ⊆ 𝑒 ↔ {𝑁, 𝑛} ⊆ 𝑒))
2722, 26rexeqbidv 3404 . . . 4 ((𝑁𝑉 ∧ (𝑔 = 𝐺𝑘 = 𝑁)) → (∃𝑒 ∈ (Edg‘𝑔){𝑘, 𝑛} ⊆ 𝑒 ↔ ∃𝑒𝐸 {𝑁, 𝑛} ⊆ 𝑒))
2817, 27rabeqbidv 3487 . . 3 ((𝑁𝑉 ∧ (𝑔 = 𝐺𝑘 = 𝑁)) → {𝑛 ∈ ((Vtx‘𝑔) ∖ {𝑘}) ∣ ∃𝑒 ∈ (Edg‘𝑔){𝑘, 𝑛} ⊆ 𝑒} = {𝑛 ∈ (𝑉 ∖ {𝑁}) ∣ ∃𝑒𝐸 {𝑁, 𝑛} ⊆ 𝑒})
293, 7, 11, 28ovmpodv2 7310 . 2 (𝑁𝑉 → ( NeighbVtx = (𝑔 ∈ V, 𝑘 ∈ (Vtx‘𝑔) ↦ {𝑛 ∈ ((Vtx‘𝑔) ∖ {𝑘}) ∣ ∃𝑒 ∈ (Edg‘𝑔){𝑘, 𝑛} ⊆ 𝑒}) → (𝐺 NeighbVtx 𝑁) = {𝑛 ∈ (𝑉 ∖ {𝑁}) ∣ ∃𝑒𝐸 {𝑁, 𝑛} ⊆ 𝑒}))
301, 29mpi 20 1 (𝑁𝑉 → (𝐺 NeighbVtx 𝑁) = {𝑛 ∈ (𝑉 ∖ {𝑁}) ∣ ∃𝑒𝐸 {𝑁, 𝑛} ⊆ 𝑒})
Colors of variables: wff setvar class
Syntax hints:  wi 4  wb 208  wa 398   = wceq 1537  wcel 2114  wrex 3141  {crab 3144  Vcvv 3496  cdif 3935  wss 3938  {csn 4569  {cpr 4571  cfv 6357  (class class class)co 7158  cmpo 7160  Vtxcvtx 26783  Edgcedg 26834   NeighbVtx cnbgr 27116
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1796  ax-4 1810  ax-5 1911  ax-6 1970  ax-7 2015  ax-8 2116  ax-9 2124  ax-10 2145  ax-11 2161  ax-12 2177  ax-ext 2795  ax-sep 5205  ax-nul 5212  ax-pow 5268  ax-pr 5332
This theorem depends on definitions:  df-bi 209  df-an 399  df-or 844  df-3an 1085  df-tru 1540  df-ex 1781  df-nf 1785  df-sb 2070  df-mo 2622  df-eu 2654  df-clab 2802  df-cleq 2816  df-clel 2895  df-nfc 2965  df-ral 3145  df-rex 3146  df-rab 3149  df-v 3498  df-sbc 3775  df-dif 3941  df-un 3943  df-in 3945  df-ss 3954  df-nul 4294  df-if 4470  df-sn 4570  df-pr 4572  df-op 4576  df-uni 4841  df-br 5069  df-opab 5131  df-id 5462  df-xp 5563  df-rel 5564  df-cnv 5565  df-co 5566  df-dm 5567  df-iota 6316  df-fun 6359  df-fv 6365  df-ov 7161  df-oprab 7162  df-mpo 7163  df-nbgr 27117
This theorem is referenced by:  dfnbgr2  27121  dfnbgr3  27122  nbgrel  27124  nbuhgr  27127  nbupgr  27128  nbumgrvtx  27130  nbgr0vtxlem  27139  nbgrnself  27143
  Copyright terms: Public domain W3C validator