Metamath Proof Explorer


Theorem incistruhgr

Description: Anincidence structure <. P , L , I >. "where P is a set whose elements are calledpoints, L is a distinct set whose elements are calledlines and I C_ ( P X. L ) is theincidence relation" (see Wikipedia "Incidence structure" (24-Oct-2020), https://en.wikipedia.org/wiki/Incidence_structure ) implies an undirected hypergraph, if the incidence relation is right-total (to exclude empty edges). The points become the vertices, and the edge function is derived from the incidence relation by mapping each line ("edge") to the set of vertices incident to the line/edge. With P = ( BaseS ) and by defining two new slots for lines and incidence relations (analogous to LineG and Itv ) and enhancing the definition of iEdg accordingly, it would even be possible to express that a corresponding incidence structureis an undirected hypergraph. By choosing the incident relation appropriately, other kinds of undirected graphs (pseudographs, multigraphs, simple graphs, etc.) could be defined. (Contributed by AV, 24-Oct-2020)

Ref Expression
Hypotheses incistruhgr.v
|- V = ( Vtx ` G )
incistruhgr.e
|- E = ( iEdg ` G )
Assertion incistruhgr
|- ( ( G e. W /\ I C_ ( P X. L ) /\ ran I = L ) -> ( ( V = P /\ E = ( e e. L |-> { v e. P | v I e } ) ) -> G e. UHGraph ) )

Proof

Step Hyp Ref Expression
1 incistruhgr.v
 |-  V = ( Vtx ` G )
2 incistruhgr.e
 |-  E = ( iEdg ` G )
3 rabeq
 |-  ( V = P -> { v e. V | v I e } = { v e. P | v I e } )
4 3 mpteq2dv
 |-  ( V = P -> ( e e. L |-> { v e. V | v I e } ) = ( e e. L |-> { v e. P | v I e } ) )
5 4 eqeq2d
 |-  ( V = P -> ( E = ( e e. L |-> { v e. V | v I e } ) <-> E = ( e e. L |-> { v e. P | v I e } ) ) )
6 xpeq1
 |-  ( V = P -> ( V X. L ) = ( P X. L ) )
7 6 sseq2d
 |-  ( V = P -> ( I C_ ( V X. L ) <-> I C_ ( P X. L ) ) )
8 7 3anbi2d
 |-  ( V = P -> ( ( G e. W /\ I C_ ( V X. L ) /\ ran I = L ) <-> ( G e. W /\ I C_ ( P X. L ) /\ ran I = L ) ) )
9 5 8 anbi12d
 |-  ( V = P -> ( ( E = ( e e. L |-> { v e. V | v I e } ) /\ ( G e. W /\ I C_ ( V X. L ) /\ ran I = L ) ) <-> ( E = ( e e. L |-> { v e. P | v I e } ) /\ ( G e. W /\ I C_ ( P X. L ) /\ ran I = L ) ) ) )
10 dmeq
 |-  ( E = ( e e. L |-> { v e. V | v I e } ) -> dom E = dom ( e e. L |-> { v e. V | v I e } ) )
11 1 fvexi
 |-  V e. _V
12 11 rabex
 |-  { v e. V | v I e } e. _V
13 eqid
 |-  ( e e. L |-> { v e. V | v I e } ) = ( e e. L |-> { v e. V | v I e } )
14 12 13 dmmpti
 |-  dom ( e e. L |-> { v e. V | v I e } ) = L
15 10 14 eqtrdi
 |-  ( E = ( e e. L |-> { v e. V | v I e } ) -> dom E = L )
16 ssrab2
 |-  { v e. V | v I e } C_ V
17 16 a1i
 |-  ( ( ( G e. W /\ I C_ ( V X. L ) /\ ran I = L ) /\ e e. L ) -> { v e. V | v I e } C_ V )
18 12 elpw
 |-  ( { v e. V | v I e } e. ~P V <-> { v e. V | v I e } C_ V )
19 17 18 sylibr
 |-  ( ( ( G e. W /\ I C_ ( V X. L ) /\ ran I = L ) /\ e e. L ) -> { v e. V | v I e } e. ~P V )
20 eleq2
 |-  ( ran I = L -> ( e e. ran I <-> e e. L ) )
21 20 3ad2ant3
 |-  ( ( G e. W /\ I C_ ( V X. L ) /\ ran I = L ) -> ( e e. ran I <-> e e. L ) )
22 ssrelrn
 |-  ( ( I C_ ( V X. L ) /\ e e. ran I ) -> E. v e. V v I e )
23 22 ex
 |-  ( I C_ ( V X. L ) -> ( e e. ran I -> E. v e. V v I e ) )
24 23 3ad2ant2
 |-  ( ( G e. W /\ I C_ ( V X. L ) /\ ran I = L ) -> ( e e. ran I -> E. v e. V v I e ) )
25 21 24 sylbird
 |-  ( ( G e. W /\ I C_ ( V X. L ) /\ ran I = L ) -> ( e e. L -> E. v e. V v I e ) )
26 25 imp
 |-  ( ( ( G e. W /\ I C_ ( V X. L ) /\ ran I = L ) /\ e e. L ) -> E. v e. V v I e )
27 df-ne
 |-  ( { v e. V | v I e } =/= (/) <-> -. { v e. V | v I e } = (/) )
28 rabn0
 |-  ( { v e. V | v I e } =/= (/) <-> E. v e. V v I e )
29 27 28 bitr3i
 |-  ( -. { v e. V | v I e } = (/) <-> E. v e. V v I e )
30 26 29 sylibr
 |-  ( ( ( G e. W /\ I C_ ( V X. L ) /\ ran I = L ) /\ e e. L ) -> -. { v e. V | v I e } = (/) )
31 12 elsn
 |-  ( { v e. V | v I e } e. { (/) } <-> { v e. V | v I e } = (/) )
32 30 31 sylnibr
 |-  ( ( ( G e. W /\ I C_ ( V X. L ) /\ ran I = L ) /\ e e. L ) -> -. { v e. V | v I e } e. { (/) } )
33 19 32 eldifd
 |-  ( ( ( G e. W /\ I C_ ( V X. L ) /\ ran I = L ) /\ e e. L ) -> { v e. V | v I e } e. ( ~P V \ { (/) } ) )
34 33 fmpttd
 |-  ( ( G e. W /\ I C_ ( V X. L ) /\ ran I = L ) -> ( e e. L |-> { v e. V | v I e } ) : L --> ( ~P V \ { (/) } ) )
35 simpl
 |-  ( ( E = ( e e. L |-> { v e. V | v I e } ) /\ dom E = L ) -> E = ( e e. L |-> { v e. V | v I e } ) )
36 simpr
 |-  ( ( E = ( e e. L |-> { v e. V | v I e } ) /\ dom E = L ) -> dom E = L )
37 35 36 feq12d
 |-  ( ( E = ( e e. L |-> { v e. V | v I e } ) /\ dom E = L ) -> ( E : dom E --> ( ~P V \ { (/) } ) <-> ( e e. L |-> { v e. V | v I e } ) : L --> ( ~P V \ { (/) } ) ) )
38 34 37 syl5ibr
 |-  ( ( E = ( e e. L |-> { v e. V | v I e } ) /\ dom E = L ) -> ( ( G e. W /\ I C_ ( V X. L ) /\ ran I = L ) -> E : dom E --> ( ~P V \ { (/) } ) ) )
39 15 38 mpdan
 |-  ( E = ( e e. L |-> { v e. V | v I e } ) -> ( ( G e. W /\ I C_ ( V X. L ) /\ ran I = L ) -> E : dom E --> ( ~P V \ { (/) } ) ) )
40 39 imp
 |-  ( ( E = ( e e. L |-> { v e. V | v I e } ) /\ ( G e. W /\ I C_ ( V X. L ) /\ ran I = L ) ) -> E : dom E --> ( ~P V \ { (/) } ) )
41 9 40 syl6bir
 |-  ( V = P -> ( ( E = ( e e. L |-> { v e. P | v I e } ) /\ ( G e. W /\ I C_ ( P X. L ) /\ ran I = L ) ) -> E : dom E --> ( ~P V \ { (/) } ) ) )
42 41 expdimp
 |-  ( ( V = P /\ E = ( e e. L |-> { v e. P | v I e } ) ) -> ( ( G e. W /\ I C_ ( P X. L ) /\ ran I = L ) -> E : dom E --> ( ~P V \ { (/) } ) ) )
43 42 impcom
 |-  ( ( ( G e. W /\ I C_ ( P X. L ) /\ ran I = L ) /\ ( V = P /\ E = ( e e. L |-> { v e. P | v I e } ) ) ) -> E : dom E --> ( ~P V \ { (/) } ) )
44 1 2 isuhgr
 |-  ( G e. W -> ( G e. UHGraph <-> E : dom E --> ( ~P V \ { (/) } ) ) )
45 44 3ad2ant1
 |-  ( ( G e. W /\ I C_ ( P X. L ) /\ ran I = L ) -> ( G e. UHGraph <-> E : dom E --> ( ~P V \ { (/) } ) ) )
46 45 adantr
 |-  ( ( ( G e. W /\ I C_ ( P X. L ) /\ ran I = L ) /\ ( V = P /\ E = ( e e. L |-> { v e. P | v I e } ) ) ) -> ( G e. UHGraph <-> E : dom E --> ( ~P V \ { (/) } ) ) )
47 43 46 mpbird
 |-  ( ( ( G e. W /\ I C_ ( P X. L ) /\ ran I = L ) /\ ( V = P /\ E = ( e e. L |-> { v e. P | v I e } ) ) ) -> G e. UHGraph )
48 47 ex
 |-  ( ( G e. W /\ I C_ ( P X. L ) /\ ran I = L ) -> ( ( V = P /\ E = ( e e. L |-> { v e. P | v I e } ) ) -> G e. UHGraph ) )