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

Theorem nbgrel 29914
Description: Characterization of a neighbor 𝑁 of a vertex 𝑋 in a graph 𝐺. (Contributed by Alexander van der Vekens and Mario Carneiro, 9-Oct-2017.) (Revised by AV, 26-Oct-2020.) (Revised by AV, 12-Feb-2022.)
Hypotheses
Ref Expression
nbgrel.v 𝑉 = (Vtx‘𝐺)
nbgrel.e 𝐸 = (Edg‘𝐺)
Assertion
Ref Expression
nbgrel (𝑁 ∈ (𝐺 NeighbVtx 𝑋) ↔ ((𝑁 ∈ 𝑉 ∧ 𝑋 ∈ 𝑉) ∧ 𝑁 ≠ 𝑋 ∧ ∃𝑒 ∈ 𝐸 {𝑋, 𝑁} ⊆ 𝑒))
Distinct variable groups:   𝑒,𝐸   𝑒,𝐺   𝑒,𝑁   𝑒,𝑋   𝑒,𝑉

Proof of Theorem nbgrel
Dummy variable 𝑛 is distinct from all other variables.
StepHypRef Expression
1 nbgrel.v . . . 4 𝑉 = (Vtx‘𝐺)
21nbgrcl 29909 . . 3 (𝑁 ∈ (𝐺 NeighbVtx 𝑋) → 𝑋 ∈ 𝑉)
32pm4.71ri 570 . 2 (𝑁 ∈ (𝐺 NeighbVtx 𝑋) ↔ (𝑋 ∈ 𝑉 ∧ 𝑁 ∈ (𝐺 NeighbVtx 𝑋)))
4 nbgrel.e . . . . . . 7 𝐸 = (Edg‘𝐺)
51, 4nbgrval 29910 . . . . . 6 (𝑋 ∈ 𝑉 → (𝐺 NeighbVtx 𝑋) = {𝑛 ∈ (𝑉 ∖ {𝑋}) ∣ ∃𝑒 ∈ 𝐸 {𝑋, 𝑛} ⊆ 𝑒})
65eleq2d 2847 . . . . 5 (𝑋 ∈ 𝑉 → (𝑁 ∈ (𝐺 NeighbVtx 𝑋) ↔ 𝑁 ∈ {𝑛 ∈ (𝑉 ∖ {𝑋}) ∣ ∃𝑒 ∈ 𝐸 {𝑋, 𝑛} ⊆ 𝑒}))
7 preq2 4695 . . . . . . . . 9 (𝑛 = 𝑁 → {𝑋, 𝑛} = {𝑋, 𝑁})
87sseq1d 3962 . . . . . . . 8 (𝑛 = 𝑁 → ({𝑋, 𝑛} ⊆ 𝑒 ↔ {𝑋, 𝑁} ⊆ 𝑒))
98rexbidv 3187 . . . . . . 7 (𝑛 = 𝑁 → (∃𝑒 ∈ 𝐸 {𝑋, 𝑛} ⊆ 𝑒 ↔ ∃𝑒 ∈ 𝐸 {𝑋, 𝑁} ⊆ 𝑒))
109elrab 3645 . . . . . 6 (𝑁 ∈ {𝑛 ∈ (𝑉 ∖ {𝑋}) ∣ ∃𝑒 ∈ 𝐸 {𝑋, 𝑛} ⊆ 𝑒} ↔ (𝑁 ∈ (𝑉 ∖ {𝑋}) ∧ ∃𝑒 ∈ 𝐸 {𝑋, 𝑁} ⊆ 𝑒))
11 eldifsn 4748 . . . . . . 7 (𝑁 ∈ (𝑉 ∖ {𝑋}) ↔ (𝑁 ∈ 𝑉 ∧ 𝑁 ≠ 𝑋))
1211anbi1i 636 . . . . . 6 ((𝑁 ∈ (𝑉 ∖ {𝑋}) ∧ ∃𝑒 ∈ 𝐸 {𝑋, 𝑁} ⊆ 𝑒) ↔ ((𝑁 ∈ 𝑉 ∧ 𝑁 ≠ 𝑋) ∧ ∃𝑒 ∈ 𝐸 {𝑋, 𝑁} ⊆ 𝑒))
1310, 12bitri 278 . . . . 5 (𝑁 ∈ {𝑛 ∈ (𝑉 ∖ {𝑋}) ∣ ∃𝑒 ∈ 𝐸 {𝑋, 𝑛} ⊆ 𝑒} ↔ ((𝑁 ∈ 𝑉 ∧ 𝑁 ≠ 𝑋) ∧ ∃𝑒 ∈ 𝐸 {𝑋, 𝑁} ⊆ 𝑒))
146, 13bitrdi 290 . . . 4 (𝑋 ∈ 𝑉 → (𝑁 ∈ (𝐺 NeighbVtx 𝑋) ↔ ((𝑁 ∈ 𝑉 ∧ 𝑁 ≠ 𝑋) ∧ ∃𝑒 ∈ 𝐸 {𝑋, 𝑁} ⊆ 𝑒)))
1514pm5.32i 585 . . 3 ((𝑋 ∈ 𝑉 ∧ 𝑁 ∈ (𝐺 NeighbVtx 𝑋)) ↔ (𝑋 ∈ 𝑉 ∧ ((𝑁 ∈ 𝑉 ∧ 𝑁 ≠ 𝑋) ∧ ∃𝑒 ∈ 𝐸 {𝑋, 𝑁} ⊆ 𝑒)))
16 df-3an 1105 . . . 4 (((𝑁 ∈ 𝑉 ∧ 𝑋 ∈ 𝑉) ∧ 𝑁 ≠ 𝑋 ∧ ∃𝑒 ∈ 𝐸 {𝑋, 𝑁} ⊆ 𝑒) ↔ (((𝑁 ∈ 𝑉 ∧ 𝑋 ∈ 𝑉) ∧ 𝑁 ≠ 𝑋) ∧ ∃𝑒 ∈ 𝐸 {𝑋, 𝑁} ⊆ 𝑒))
17 anass 474 . . . . . 6 (((𝑋 ∈ 𝑉 ∧ 𝑁 ∈ 𝑉) ∧ 𝑁 ≠ 𝑋) ↔ (𝑋 ∈ 𝑉 ∧ (𝑁 ∈ 𝑉 ∧ 𝑁 ≠ 𝑋)))
18 ancom 466 . . . . . . 7 ((𝑋 ∈ 𝑉 ∧ 𝑁 ∈ 𝑉) ↔ (𝑁 ∈ 𝑉 ∧ 𝑋 ∈ 𝑉))
1918anbi1i 636 . . . . . 6 (((𝑋 ∈ 𝑉 ∧ 𝑁 ∈ 𝑉) ∧ 𝑁 ≠ 𝑋) ↔ ((𝑁 ∈ 𝑉 ∧ 𝑋 ∈ 𝑉) ∧ 𝑁 ≠ 𝑋))
2017, 19bitr3i 280 . . . . 5 ((𝑋 ∈ 𝑉 ∧ (𝑁 ∈ 𝑉 ∧ 𝑁 ≠ 𝑋)) ↔ ((𝑁 ∈ 𝑉 ∧ 𝑋 ∈ 𝑉) ∧ 𝑁 ≠ 𝑋))
2120anbi1i 636 . . . 4 (((𝑋 ∈ 𝑉 ∧ (𝑁 ∈ 𝑉 ∧ 𝑁 ≠ 𝑋)) ∧ ∃𝑒 ∈ 𝐸 {𝑋, 𝑁} ⊆ 𝑒) ↔ (((𝑁 ∈ 𝑉 ∧ 𝑋 ∈ 𝑉) ∧ 𝑁 ≠ 𝑋) ∧ ∃𝑒 ∈ 𝐸 {𝑋, 𝑁} ⊆ 𝑒))
22 anass 474 . . . 4 (((𝑋 ∈ 𝑉 ∧ (𝑁 ∈ 𝑉 ∧ 𝑁 ≠ 𝑋)) ∧ ∃𝑒 ∈ 𝐸 {𝑋, 𝑁} ⊆ 𝑒) ↔ (𝑋 ∈ 𝑉 ∧ ((𝑁 ∈ 𝑉 ∧ 𝑁 ≠ 𝑋) ∧ ∃𝑒 ∈ 𝐸 {𝑋, 𝑁} ⊆ 𝑒)))
2316, 21, 223bitr2ri 303 . . 3 ((𝑋 ∈ 𝑉 ∧ ((𝑁 ∈ 𝑉 ∧ 𝑁 ≠ 𝑋) ∧ ∃𝑒 ∈ 𝐸 {𝑋, 𝑁} ⊆ 𝑒)) ↔ ((𝑁 ∈ 𝑉 ∧ 𝑋 ∈ 𝑉) ∧ 𝑁 ≠ 𝑋 ∧ ∃𝑒 ∈ 𝐸 {𝑋, 𝑁} ⊆ 𝑒))
2415, 23bitri 278 . 2 ((𝑋 ∈ 𝑉 ∧ 𝑁 ∈ (𝐺 NeighbVtx 𝑋)) ↔ ((𝑁 ∈ 𝑉 ∧ 𝑋 ∈ 𝑉) ∧ 𝑁 ≠ 𝑋 ∧ ∃𝑒 ∈ 𝐸 {𝑋, 𝑁} ⊆ 𝑒))
253, 24bitri 278 1 (𝑁 ∈ (𝐺 NeighbVtx 𝑋) ↔ ((𝑁 ∈ 𝑉 ∧ 𝑋 ∈ 𝑉) ∧ 𝑁 ≠ 𝑋 ∧ ∃𝑒 ∈ 𝐸 {𝑋, 𝑁} ⊆ 𝑒))
Colors of variables:    wff setvar class
This proof depends on syntax axioms:   ↔ wb 209   ∧ wa 401   ∧ w3a 1103   = wceq 1570   ∈ wcel 2145   ≠ wne 2956  ∃wrex 3087  {crab 3413   ∖ cdif 3896   ⊆ wss 3899  {csn 4584  {cpr 4586  ‘cfv 6537  (class class class)co 7418  Vtxcvtx 29567  Edgcedg 29618   NeighbVtx cnbgr 29906
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  ax-un 7749
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-sbc 3740  df-csb 3848  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-iun 4953  df-br 5104  df-opab 5168  df-mpt 5187  df-id 5546  df-xp 5657  df-rel 5658  df-cnv 5659  df-co 5660  df-dm 5661  df-rn 5662  df-res 5663  df-ima 5664  df-iota 6493  df-fun 6539  df-fv 6545  df-ov 7421  df-oprab 7422  df-mpo 7423  df-1st 7999  df-2nd 8000  df-nbgr 29907
This theorem is used by:  nbgrisvtx  29915  nbgr2vtx1edg  29924  nbuhgr2vtx1edgblem  29925  nbuhgr2vtx1edgb  29926  nbgrsym  29937  isuvtx  29969  iscplgredg  29991  cusgrexi  30017  structtocusgr  30020  dfvopnbgr2  48920
  Copyright terms: Public domain W3C validator