Metamath Proof Explorer


Theorem structtocusgr

Description: Any (extensible) structure with a base set can be made a complete simple graph with the set of pairs of elements of the base set regarded as edges. (Contributed by AV, 10-Nov-2021) (Revised by AV, 17-Nov-2021) (Proof shortened by AV, 14-Feb-2022)

Ref Expression
Hypotheses structtousgr.p P=x𝒫BaseS|x=2
structtousgr.s φSStructX
structtousgr.g G=SsSetefndxIP
structtousgr.b φBasendxdomS
Assertion structtocusgr φGComplUSGraph

Proof

Step Hyp Ref Expression
1 structtousgr.p P=x𝒫BaseS|x=2
2 structtousgr.s φSStructX
3 structtousgr.g G=SsSetefndxIP
4 structtousgr.b φBasendxdomS
5 1 2 3 4 structtousgr φGUSGraph
6 simpr φvVtxGvVtxG
7 eldifi nVtxGvnVtxG
8 6 7 anim12ci φvVtxGnVtxGvnVtxGvVtxG
9 eldifsni nVtxGvnv
10 9 adantl φvVtxGnVtxGvnv
11 fvexd φvVtxGnVtxGvBaseSV
12 3 fveq2i VtxG=VtxSsSetefndxIP
13 eqid efndx=efndx
14 fvex BaseSV
15 1 cusgrexilem1 BaseSVIPV
16 14 15 mp1i φIPV
17 13 2 4 16 setsvtx φVtxSsSetefndxIP=BaseS
18 12 17 eqtrid φVtxG=BaseS
19 18 eleq2d φvVtxGvBaseS
20 19 biimpa φvVtxGvBaseS
21 20 adantr φvVtxGnVtxGvvBaseS
22 18 difeq1d φVtxGv=BaseSv
23 22 eleq2d φnVtxGvnBaseSv
24 23 biimpd φnVtxGvnBaseSv
25 24 adantr φvVtxGnVtxGvnBaseSv
26 25 imp φvVtxGnVtxGvnBaseSv
27 1 cusgrexilem2 BaseSVvBaseSnBaseSveranIPvne
28 11 21 26 27 syl21anc φvVtxGnVtxGveranIPvne
29 edgval EdgG=raniEdgG
30 3 fveq2i iEdgG=iEdgSsSetefndxIP
31 13 2 4 16 setsiedg φiEdgSsSetefndxIP=IP
32 30 31 eqtrid φiEdgG=IP
33 32 rneqd φraniEdgG=ranIP
34 29 33 eqtrid φEdgG=ranIP
35 34 rexeqdv φeEdgGvneeranIPvne
36 35 ad2antrr φvVtxGnVtxGveEdgGvneeranIPvne
37 28 36 mpbird φvVtxGnVtxGveEdgGvne
38 eqid VtxG=VtxG
39 eqid EdgG=EdgG
40 38 39 nbgrel nGNeighbVtxvnVtxGvVtxGnveEdgGvne
41 8 10 37 40 syl3anbrc φvVtxGnVtxGvnGNeighbVtxv
42 41 ralrimiva φvVtxGnVtxGvnGNeighbVtxv
43 38 uvtxel vUnivVtxGvVtxGnVtxGvnGNeighbVtxv
44 6 42 43 sylanbrc φvVtxGvUnivVtxG
45 44 ralrimiva φvVtxGvUnivVtxG
46 5 elexd φGV
47 38 iscplgr GVGComplGraphvVtxGvUnivVtxG
48 46 47 syl φGComplGraphvVtxGvUnivVtxG
49 45 48 mpbird φGComplGraph
50 iscusgr GComplUSGraphGUSGraphGComplGraph
51 5 49 50 sylanbrc φGComplUSGraph