Metamath Proof Explorer


Theorem cusgrsize

Description: The size of a finite complete simple graph with n vertices ( n e. NN0 ) is ( n _C 2 ) (" n choose 2") resp. ( ( ( n - 1 ) * n ) / 2 ) , see definition in section I.1 of Bollobas p. 3 . (Contributed by Alexander van der Vekens, 11-Jan-2018) (Revised by AV, 10-Nov-2020)

Ref Expression
Hypotheses cusgrsizeindb0.v V=VtxG
cusgrsizeindb0.e E=EdgG
Assertion cusgrsize GComplUSGraphVFinE=(V2)

Proof

Step Hyp Ref Expression
1 cusgrsizeindb0.v V=VtxG
2 cusgrsizeindb0.e E=EdgG
3 edgval EdgG=raniEdgG
4 2 3 eqtri E=raniEdgG
5 4 a1i GComplUSGraphVFinE=raniEdgG
6 5 fveq2d GComplUSGraphVFinE=raniEdgG
7 1 opeq1i ViEdgG=VtxGiEdgG
8 cusgrop GComplUSGraphVtxGiEdgGComplUSGraph
9 7 8 eqeltrid GComplUSGraphViEdgGComplUSGraph
10 fvex iEdgGV
11 fvex EdgveV
12 rabexg EdgveVcEdgve|ncV
13 12 resiexd EdgveVIcEdgve|ncV
14 11 13 ax-mp IcEdgve|ncV
15 rneq e=iEdgGrane=raniEdgG
16 15 fveq2d e=iEdgGrane=raniEdgG
17 fveq2 v=Vv=V
18 17 oveq1d v=V(v2)=(V2)
19 16 18 eqeqan12rd v=Ve=iEdgGrane=(v2)raniEdgG=(V2)
20 rneq e=frane=ranf
21 20 fveq2d e=frane=ranf
22 fveq2 v=wv=w
23 22 oveq1d v=w(v2)=(w2)
24 21 23 eqeqan12rd v=we=frane=(v2)ranf=(w2)
25 vex vV
26 vex eV
27 25 26 opvtxfvi Vtxve=v
28 27 eqcomi v=Vtxve
29 eqid Edgve=Edgve
30 eqid cEdgve|nc=cEdgve|nc
31 eqid vnIcEdgve|nc=vnIcEdgve|nc
32 28 29 30 31 cusgrres veComplUSGraphnvvnIcEdgve|ncComplUSGraph
33 rneq f=IcEdgve|ncranf=ranIcEdgve|nc
34 33 fveq2d f=IcEdgve|ncranf=ranIcEdgve|nc
35 34 adantl w=vnf=IcEdgve|ncranf=ranIcEdgve|nc
36 fveq2 w=vnw=vn
37 36 adantr w=vnf=IcEdgve|ncw=vn
38 37 oveq1d w=vnf=IcEdgve|nc(w2)=(vn2)
39 35 38 eqeq12d w=vnf=IcEdgve|ncranf=(w2)ranIcEdgve|nc=(vn2)
40 edgopval vVeVEdgve=rane
41 40 el2v Edgve=rane
42 41 a1i veComplUSGraphv=0Edgve=rane
43 42 eqcomd veComplUSGraphv=0rane=Edgve
44 43 fveq2d veComplUSGraphv=0rane=Edgve
45 cusgrusgr veComplUSGraphveUSGraph
46 usgruhgr veUSGraphveUHGraph
47 45 46 syl veComplUSGraphveUHGraph
48 28 29 cusgrsizeindb0 veUHGraphv=0Edgve=(v2)
49 47 48 sylan veComplUSGraphv=0Edgve=(v2)
50 44 49 eqtrd veComplUSGraphv=0rane=(v2)
51 rnresi ranIcEdgve|nc=cEdgve|nc
52 51 fveq2i ranIcEdgve|nc=cEdgve|nc
53 41 a1i y+10veComplUSGraphv=y+1nvEdgve=rane
54 53 rabeqdv y+10veComplUSGraphv=y+1nvcEdgve|nc=crane|nc
55 54 fveq2d y+10veComplUSGraphv=y+1nvcEdgve|nc=crane|nc
56 52 55 eqtrid y+10veComplUSGraphv=y+1nvranIcEdgve|nc=crane|nc
57 56 eqeq1d y+10veComplUSGraphv=y+1nvranIcEdgve|nc=(vn2)crane|nc=(vn2)
58 57 biimpd y+10veComplUSGraphv=y+1nvranIcEdgve|nc=(vn2)crane|nc=(vn2)
59 58 imdistani y+10veComplUSGraphv=y+1nvranIcEdgve|nc=(vn2)y+10veComplUSGraphv=y+1nvcrane|nc=(vn2)
60 41 eqcomi rane=Edgve
61 eqid crane|nc=crane|nc
62 28 60 61 cusgrsize2inds y+10veComplUSGraphv=y+1nvcrane|nc=(vn2)rane=(v2)
63 62 imp31 y+10veComplUSGraphv=y+1nvcrane|nc=(vn2)rane=(v2)
64 59 63 syl y+10veComplUSGraphv=y+1nvranIcEdgve|nc=(vn2)rane=(v2)
65 10 14 19 24 32 39 50 64 opfi1ind ViEdgGComplUSGraphVFinraniEdgG=(V2)
66 9 65 sylan GComplUSGraphVFinraniEdgG=(V2)
67 6 66 eqtrd GComplUSGraphVFinE=(V2)