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

Theorem nbgrval 29899
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 29896 . 2 NeighbVtx = (𝑔 ∈ V, 𝑘 ∈ (Vtx‘𝑔) ↦ {𝑛 ∈ ((Vtx‘𝑔) ∖ {𝑘}) ∣ ∃𝑒 ∈ (Edg‘𝑔){𝑘, 𝑛} ⊆ 𝑒})
2 nbgrval.v . . . 4 𝑉 = (Vtx‘𝐺)
321vgrex 29562 . . 3 (𝑁 ∈ 𝑉 → 𝐺 ∈ V)
4 fveq2 6877 . . . . . 6 (𝑔 = 𝐺 → (Vtx‘𝑔) = (Vtx‘𝐺))
52, 4eqtr4id 2815 . . . . 5 (𝑔 = 𝐺 → 𝑉 = (Vtx‘𝑔))
65eleq2d 2847 . . . 4 (𝑔 = 𝐺 → (𝑁 ∈ 𝑉 ↔ 𝑁 ∈ (Vtx‘𝑔)))
76biimpac 484 . . 3 ((𝑁 ∈ 𝑉 ∧ 𝑔 = 𝐺) → 𝑁 ∈ (Vtx‘𝑔))
8 fvex 6890 . . . . 5 (Vtx‘𝑔) ∈ V
98difexi 5292 . . . 4 ((Vtx‘𝑔) ∖ {𝑘}) ∈ V
10 rabexg 5299 . . . 4 (((Vtx‘𝑔) ∖ {𝑘}) ∈ V → {𝑛 ∈ ((Vtx‘𝑔) ∖ {𝑘}) ∣ ∃𝑒 ∈ (Edg‘𝑔){𝑘, 𝑛} ⊆ 𝑒} ∈ V)
119, 10mp1i 14 . . 3 ((𝑁 ∈ 𝑉 ∧ (𝑔 = 𝐺 ∧ 𝑘 = 𝑁)) → {𝑛 ∈ ((Vtx‘𝑔) ∖ {𝑘}) ∣ ∃𝑒 ∈ (Edg‘𝑔){𝑘, 𝑛} ⊆ 𝑒} ∈ V)
124, 2eqtr4di 2814 . . . . . . 7 (𝑔 = 𝐺 → (Vtx‘𝑔) = 𝑉)
1312adantr 486 . . . . . 6 ((𝑔 = 𝐺 ∧ 𝑘 = 𝑁) → (Vtx‘𝑔) = 𝑉)
14 sneq 4594 . . . . . . 7 (𝑘 = 𝑁 → {𝑘} = {𝑁})
1514adantl 487 . . . . . 6 ((𝑔 = 𝐺 ∧ 𝑘 = 𝑁) → {𝑘} = {𝑁})
1613, 15difeq12d 4075 . . . . 5 ((𝑔 = 𝐺 ∧ 𝑘 = 𝑁) → ((Vtx‘𝑔) ∖ {𝑘}) = (𝑉 ∖ {𝑁}))
1716adantl 487 . . . 4 ((𝑁 ∈ 𝑉 ∧ (𝑔 = 𝐺 ∧ 𝑘 = 𝑁)) → ((Vtx‘𝑔) ∖ {𝑘}) = (𝑉 ∖ {𝑁}))
18 fveq2 6877 . . . . . . . 8 (𝑔 = 𝐺 → (Edg‘𝑔) = (Edg‘𝐺))
19 nbgrval.e . . . . . . . 8 𝐸 = (Edg‘𝐺)
2018, 19eqtr4di 2814 . . . . . . 7 (𝑔 = 𝐺 → (Edg‘𝑔) = 𝐸)
2120adantr 486 . . . . . 6 ((𝑔 = 𝐺 ∧ 𝑘 = 𝑁) → (Edg‘𝑔) = 𝐸)
2221adantl 487 . . . . 5 ((𝑁 ∈ 𝑉 ∧ (𝑔 = 𝐺 ∧ 𝑘 = 𝑁)) → (Edg‘𝑔) = 𝐸)
23 preq1 4694 . . . . . . . 8 (𝑘 = 𝑁 → {𝑘, 𝑛} = {𝑁, 𝑛})
2423sseq1d 3962 . . . . . . 7 (𝑘 = 𝑁 → ({𝑘, 𝑛} ⊆ 𝑒 ↔ {𝑁, 𝑛} ⊆ 𝑒))
2524adantl 487 . . . . . 6 ((𝑔 = 𝐺 ∧ 𝑘 = 𝑁) → ({𝑘, 𝑛} ⊆ 𝑒 ↔ {𝑁, 𝑛} ⊆ 𝑒))
2625adantl 487 . . . . 5 ((𝑁 ∈ 𝑉 ∧ (𝑔 = 𝐺 ∧ 𝑘 = 𝑁)) → ({𝑘, 𝑛} ⊆ 𝑒 ↔ {𝑁, 𝑛} ⊆ 𝑒))
2722, 26rexeqbidv 3336 . . . 4 ((𝑁 ∈ 𝑉 ∧ (𝑔 = 𝐺 ∧ 𝑘 = 𝑁)) → (∃𝑒 ∈ (Edg‘𝑔){𝑘, 𝑛} ⊆ 𝑒 ↔ ∃𝑒 ∈ 𝐸 {𝑁, 𝑛} ⊆ 𝑒))
2817, 27rabeqbidv 3430 . . 3 ((𝑁 ∈ 𝑉 ∧ (𝑔 = 𝐺 ∧ 𝑘 = 𝑁)) → {𝑛 ∈ ((Vtx‘𝑔) ∖ {𝑘}) ∣ ∃𝑒 ∈ (Edg‘𝑔){𝑘, 𝑛} ⊆ 𝑒} = {𝑛 ∈ (𝑉 ∖ {𝑁}) ∣ ∃𝑒 ∈ 𝐸 {𝑁, 𝑛} ⊆ 𝑒})
293, 7, 11, 28ovmpodv2 7570 . 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 2145  ∃wrex 3087  {crab 3413  Vcvv 3451   ∖ cdif 3896   ⊆ wss 3899  {csn 4584  {cpr 4586  ‘cfv 6531  (class class class)co 7412   ∈ cmpo 7414  Vtxcvtx 29556  Edgcedg 29607   NeighbVtx cnbgr 29895
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 1943  ax-6 2000  ax-7 2041  ax-8 2147  ax-9 2155  ax-10 2178  ax-11 2194  ax-12 2213  ax-ext 2733  ax-sep 5249  ax-nul 5260  ax-pr 5391
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 2100  df-mo 2565  df-eu 2595  df-clab 2740  df-cleq 2753  df-clel 2836  df-nfc 2910  df-ne 2957  df-ral 3078  df-rex 3088  df-rab 3414  df-v 3453  df-dif 3902  df-un 3904  df-in 3906  df-ss 3916  df-nul 4280  df-if 4483  df-pw 4559  df-sn 4585  df-pr 4587  df-op 4591  df-uni 4868  df-br 5104  df-opab 5168  df-id 5546  df-xp 5657  df-rel 5658  df-cnv 5659  df-co 5660  df-dm 5661  df-iota 6487  df-fun 6533  df-fv 6539  df-ov 7415  df-oprab 7416  df-mpo 7417  df-nbgr 29896
This theorem is used by:  dfnbgr2  29900  dfnbgr3  29901  nbgrel  29903  nbuhgr  29906  nbupgr  29907  nbumgrvtx  29909  nbgr0edglem  29919  nbgrnself  29922
  Copyright terms: Public domain W3C validator