Metamath Proof Explorer


Theorem nbgrel

Description: Characterization of a neighbor N of a vertex X in a graph G . (Contributed by Alexander van der Vekens and Mario Carneiro, 9-Oct-2017) (Revised by AV, 26-Oct-2020) (Revised by AV, 12-Feb-2022)

Ref Expression
Hypotheses nbgrel.v V = Vtx G
nbgrel.e E = Edg G
Assertion nbgrel N G NeighbVtx X N V X V N X e E X N e

Proof

Step Hyp Ref Expression
1 nbgrel.v V = Vtx G
2 nbgrel.e E = Edg G
3 1 nbgrcl N G NeighbVtx X X V
4 3 pm4.71ri N G NeighbVtx X X V N G NeighbVtx X
5 1 2 nbgrval X V G NeighbVtx X = n V X | e E X n e
6 5 eleq2d X V N G NeighbVtx X N n V X | e E X n e
7 preq2 n = N X n = X N
8 7 sseq1d n = N X n e X N e
9 8 rexbidv n = N e E X n e e E X N e
10 9 elrab N n V X | e E X n e N V X e E X N e
11 eldifsn N V X N V N X
12 11 anbi1i N V X e E X N e N V N X e E X N e
13 10 12 bitri N n V X | e E X n e N V N X e E X N e
14 6 13 bitrdi X V N G NeighbVtx X N V N X e E X N e
15 14 pm5.32i X V N G NeighbVtx X X V N V N X e E X N e
16 df-3an N V X V N X e E X N e N V X V N X e E X N e
17 anass X V N V N X X V N V N X
18 ancom X V N V N V X V
19 18 anbi1i X V N V N X N V X V N X
20 17 19 bitr3i X V N V N X N V X V N X
21 20 anbi1i X V N V N X e E X N e N V X V N X e E X N e
22 anass X V N V N X e E X N e X V N V N X e E X N e
23 16 21 22 3bitr2ri X V N V N X e E X N e N V X V N X e E X N e
24 15 23 bitri X V N G NeighbVtx X N V X V N X e E X N e
25 4 24 bitri N G NeighbVtx X N V X V N X e E X N e