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

Theorem nbgrval 27118
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 27115 . 2 NeighbVtx = (𝑔 ∈ V, 𝑘 ∈ (Vtx‘𝑔) ↦ {𝑛 ∈ ((Vtx‘𝑔) ∖ {𝑘}) ∣ ∃𝑒 ∈ (Edg‘𝑔){𝑘, 𝑛} ⊆ 𝑒})
2 nbgrval.v . . . 4 𝑉 = (Vtx‘𝐺)
321vgrex 26787 . . 3 (𝑁𝑉𝐺 ∈ V)
4 fveq2 6670 . . . . . 6 (𝑔 = 𝐺 → (Vtx‘𝑔) = (Vtx‘𝐺))
54, 2syl6reqr 2875 . . . . 5 (𝑔 = 𝐺𝑉 = (Vtx‘𝑔))
65eleq2d 2898 . . . 4 (𝑔 = 𝐺 → (𝑁𝑉𝑁 ∈ (Vtx‘𝑔)))
76biimpac 481 . . 3 ((𝑁𝑉𝑔 = 𝐺) → 𝑁 ∈ (Vtx‘𝑔))
8 fvex 6683 . . . . 5 (Vtx‘𝑔) ∈ V
98difexi 5232 . . . 4 ((Vtx‘𝑔) ∖ {𝑘}) ∈ V
10 rabexg 5234 . . . 4 (((Vtx‘𝑔) ∖ {𝑘}) ∈ V → {𝑛 ∈ ((Vtx‘𝑔) ∖ {𝑘}) ∣ ∃𝑒 ∈ (Edg‘𝑔){𝑘, 𝑛} ⊆ 𝑒} ∈ V)
119, 10mp1i 13 . . 3 ((𝑁𝑉 ∧ (𝑔 = 𝐺𝑘 = 𝑁)) → {𝑛 ∈ ((Vtx‘𝑔) ∖ {𝑘}) ∣ ∃𝑒 ∈ (Edg‘𝑔){𝑘, 𝑛} ⊆ 𝑒} ∈ V)
124, 2syl6eqr 2874 . . . . . . 7 (𝑔 = 𝐺 → (Vtx‘𝑔) = 𝑉)
1312adantr 483 . . . . . 6 ((𝑔 = 𝐺𝑘 = 𝑁) → (Vtx‘𝑔) = 𝑉)
14 sneq 4577 . . . . . . 7 (𝑘 = 𝑁 → {𝑘} = {𝑁})
1514adantl 484 . . . . . 6 ((𝑔 = 𝐺𝑘 = 𝑁) → {𝑘} = {𝑁})
1613, 15difeq12d 4100 . . . . 5 ((𝑔 = 𝐺𝑘 = 𝑁) → ((Vtx‘𝑔) ∖ {𝑘}) = (𝑉 ∖ {𝑁}))
1716adantl 484 . . . 4 ((𝑁𝑉 ∧ (𝑔 = 𝐺𝑘 = 𝑁)) → ((Vtx‘𝑔) ∖ {𝑘}) = (𝑉 ∖ {𝑁}))
18 fveq2 6670 . . . . . . . 8 (𝑔 = 𝐺 → (Edg‘𝑔) = (Edg‘𝐺))
19 nbgrval.e . . . . . . . 8 𝐸 = (Edg‘𝐺)
2018, 19syl6eqr 2874 . . . . . . 7 (𝑔 = 𝐺 → (Edg‘𝑔) = 𝐸)
2120adantr 483 . . . . . 6 ((𝑔 = 𝐺𝑘 = 𝑁) → (Edg‘𝑔) = 𝐸)
2221adantl 484 . . . . 5 ((𝑁𝑉 ∧ (𝑔 = 𝐺𝑘 = 𝑁)) → (Edg‘𝑔) = 𝐸)
23 preq1 4669 . . . . . . . 8 (𝑘 = 𝑁 → {𝑘, 𝑛} = {𝑁, 𝑛})
2423sseq1d 3998 . . . . . . 7 (𝑘 = 𝑁 → ({𝑘, 𝑛} ⊆ 𝑒 ↔ {𝑁, 𝑛} ⊆ 𝑒))
2524adantl 484 . . . . . 6 ((𝑔 = 𝐺𝑘 = 𝑁) → ({𝑘, 𝑛} ⊆ 𝑒 ↔ {𝑁, 𝑛} ⊆ 𝑒))
2625adantl 484 . . . . 5 ((𝑁𝑉 ∧ (𝑔 = 𝐺𝑘 = 𝑁)) → ({𝑘, 𝑛} ⊆ 𝑒 ↔ {𝑁, 𝑛} ⊆ 𝑒))
2722, 26rexeqbidv 3402 . . . 4 ((𝑁𝑉 ∧ (𝑔 = 𝐺𝑘 = 𝑁)) → (∃𝑒 ∈ (Edg‘𝑔){𝑘, 𝑛} ⊆ 𝑒 ↔ ∃𝑒𝐸 {𝑁, 𝑛} ⊆ 𝑒))
2817, 27rabeqbidv 3485 . . 3 ((𝑁𝑉 ∧ (𝑔 = 𝐺𝑘 = 𝑁)) → {𝑛 ∈ ((Vtx‘𝑔) ∖ {𝑘}) ∣ ∃𝑒 ∈ (Edg‘𝑔){𝑘, 𝑛} ⊆ 𝑒} = {𝑛 ∈ (𝑉 ∖ {𝑁}) ∣ ∃𝑒𝐸 {𝑁, 𝑛} ⊆ 𝑒})
293, 7, 11, 28ovmpodv2 7308 . 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 3139  {crab 3142  Vcvv 3494  cdif 3933  wss 3936  {csn 4567  {cpr 4569  cfv 6355  (class class class)co 7156  cmpo 7158  Vtxcvtx 26781  Edgcedg 26832   NeighbVtx cnbgr 27114
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 2793  ax-sep 5203  ax-nul 5210  ax-pow 5266  ax-pr 5330
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 2800  df-cleq 2814  df-clel 2893  df-nfc 2963  df-ral 3143  df-rex 3144  df-rab 3147  df-v 3496  df-sbc 3773  df-dif 3939  df-un 3941  df-in 3943  df-ss 3952  df-nul 4292  df-if 4468  df-sn 4568  df-pr 4570  df-op 4574  df-uni 4839  df-br 5067  df-opab 5129  df-id 5460  df-xp 5561  df-rel 5562  df-cnv 5563  df-co 5564  df-dm 5565  df-iota 6314  df-fun 6357  df-fv 6363  df-ov 7159  df-oprab 7160  df-mpo 7161  df-nbgr 27115
This theorem is referenced by:  dfnbgr2  27119  dfnbgr3  27120  nbgrel  27122  nbuhgr  27125  nbupgr  27126  nbumgrvtx  27128  nbgr0vtxlem  27137  nbgrnself  27141
  Copyright terms: Public domain W3C validator