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

Theorem structtocusgr 27236
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.)
Hypotheses
Ref Expression
structtousgr.p 𝑃 = {𝑥 ∈ 𝒫 (Base‘𝑆) ∣ (♯‘𝑥) = 2}
structtousgr.s (𝜑𝑆 Struct 𝑋)
structtousgr.g 𝐺 = (𝑆 sSet ⟨(.ef‘ndx), ( I ↾ 𝑃)⟩)
structtousgr.b (𝜑 → (Base‘ndx) ∈ dom 𝑆)
Assertion
Ref Expression
structtocusgr (𝜑𝐺 ∈ ComplUSGraph)
Distinct variable groups:   𝑥,𝐺   𝑥,𝑃   𝑥,𝑆   𝜑,𝑥
Allowed substitution hint:   𝑋(𝑥)

Proof of Theorem structtocusgr
Dummy variables 𝑒 𝑛 𝑣 are mutually distinct and distinct from all other variables.
StepHypRef Expression
1 structtousgr.p . . 3 𝑃 = {𝑥 ∈ 𝒫 (Base‘𝑆) ∣ (♯‘𝑥) = 2}
2 structtousgr.s . . 3 (𝜑𝑆 Struct 𝑋)
3 structtousgr.g . . 3 𝐺 = (𝑆 sSet ⟨(.ef‘ndx), ( I ↾ 𝑃)⟩)
4 structtousgr.b . . 3 (𝜑 → (Base‘ndx) ∈ dom 𝑆)
51, 2, 3, 4structtousgr 27235 . 2 (𝜑𝐺 ∈ USGraph)
6 simpr 488 . . . . 5 ((𝜑𝑣 ∈ (Vtx‘𝐺)) → 𝑣 ∈ (Vtx‘𝐺))
7 eldifi 4054 . . . . . . . 8 (𝑛 ∈ ((Vtx‘𝐺) ∖ {𝑣}) → 𝑛 ∈ (Vtx‘𝐺))
86, 7anim12ci 616 . . . . . . 7 (((𝜑𝑣 ∈ (Vtx‘𝐺)) ∧ 𝑛 ∈ ((Vtx‘𝐺) ∖ {𝑣})) → (𝑛 ∈ (Vtx‘𝐺) ∧ 𝑣 ∈ (Vtx‘𝐺)))
9 eldifsni 4683 . . . . . . . 8 (𝑛 ∈ ((Vtx‘𝐺) ∖ {𝑣}) → 𝑛𝑣)
109adantl 485 . . . . . . 7 (((𝜑𝑣 ∈ (Vtx‘𝐺)) ∧ 𝑛 ∈ ((Vtx‘𝐺) ∖ {𝑣})) → 𝑛𝑣)
11 fvexd 6660 . . . . . . . . 9 (((𝜑𝑣 ∈ (Vtx‘𝐺)) ∧ 𝑛 ∈ ((Vtx‘𝐺) ∖ {𝑣})) → (Base‘𝑆) ∈ V)
123fveq2i 6648 . . . . . . . . . . . . 13 (Vtx‘𝐺) = (Vtx‘(𝑆 sSet ⟨(.ef‘ndx), ( I ↾ 𝑃)⟩))
13 eqid 2798 . . . . . . . . . . . . . 14 (.ef‘ndx) = (.ef‘ndx)
14 fvex 6658 . . . . . . . . . . . . . . 15 (Base‘𝑆) ∈ V
151cusgrexilem1 27229 . . . . . . . . . . . . . . 15 ((Base‘𝑆) ∈ V → ( I ↾ 𝑃) ∈ V)
1614, 15mp1i 13 . . . . . . . . . . . . . 14 (𝜑 → ( I ↾ 𝑃) ∈ V)
1713, 2, 4, 16setsvtx 26828 . . . . . . . . . . . . 13 (𝜑 → (Vtx‘(𝑆 sSet ⟨(.ef‘ndx), ( I ↾ 𝑃)⟩)) = (Base‘𝑆))
1812, 17syl5eq 2845 . . . . . . . . . . . 12 (𝜑 → (Vtx‘𝐺) = (Base‘𝑆))
1918eleq2d 2875 . . . . . . . . . . 11 (𝜑 → (𝑣 ∈ (Vtx‘𝐺) ↔ 𝑣 ∈ (Base‘𝑆)))
2019biimpa 480 . . . . . . . . . 10 ((𝜑𝑣 ∈ (Vtx‘𝐺)) → 𝑣 ∈ (Base‘𝑆))
2120adantr 484 . . . . . . . . 9 (((𝜑𝑣 ∈ (Vtx‘𝐺)) ∧ 𝑛 ∈ ((Vtx‘𝐺) ∖ {𝑣})) → 𝑣 ∈ (Base‘𝑆))
2218difeq1d 4049 . . . . . . . . . . . . 13 (𝜑 → ((Vtx‘𝐺) ∖ {𝑣}) = ((Base‘𝑆) ∖ {𝑣}))
2322eleq2d 2875 . . . . . . . . . . . 12 (𝜑 → (𝑛 ∈ ((Vtx‘𝐺) ∖ {𝑣}) ↔ 𝑛 ∈ ((Base‘𝑆) ∖ {𝑣})))
2423biimpd 232 . . . . . . . . . . 11 (𝜑 → (𝑛 ∈ ((Vtx‘𝐺) ∖ {𝑣}) → 𝑛 ∈ ((Base‘𝑆) ∖ {𝑣})))
2524adantr 484 . . . . . . . . . 10 ((𝜑𝑣 ∈ (Vtx‘𝐺)) → (𝑛 ∈ ((Vtx‘𝐺) ∖ {𝑣}) → 𝑛 ∈ ((Base‘𝑆) ∖ {𝑣})))
2625imp 410 . . . . . . . . 9 (((𝜑𝑣 ∈ (Vtx‘𝐺)) ∧ 𝑛 ∈ ((Vtx‘𝐺) ∖ {𝑣})) → 𝑛 ∈ ((Base‘𝑆) ∖ {𝑣}))
271cusgrexilem2 27232 . . . . . . . . 9 ((((Base‘𝑆) ∈ V ∧ 𝑣 ∈ (Base‘𝑆)) ∧ 𝑛 ∈ ((Base‘𝑆) ∖ {𝑣})) → ∃𝑒 ∈ ran ( I ↾ 𝑃){𝑣, 𝑛} ⊆ 𝑒)
2811, 21, 26, 27syl21anc 836 . . . . . . . 8 (((𝜑𝑣 ∈ (Vtx‘𝐺)) ∧ 𝑛 ∈ ((Vtx‘𝐺) ∖ {𝑣})) → ∃𝑒 ∈ ran ( I ↾ 𝑃){𝑣, 𝑛} ⊆ 𝑒)
29 edgval 26842 . . . . . . . . . . 11 (Edg‘𝐺) = ran (iEdg‘𝐺)
303fveq2i 6648 . . . . . . . . . . . . 13 (iEdg‘𝐺) = (iEdg‘(𝑆 sSet ⟨(.ef‘ndx), ( I ↾ 𝑃)⟩))
3113, 2, 4, 16setsiedg 26829 . . . . . . . . . . . . 13 (𝜑 → (iEdg‘(𝑆 sSet ⟨(.ef‘ndx), ( I ↾ 𝑃)⟩)) = ( I ↾ 𝑃))
3230, 31syl5eq 2845 . . . . . . . . . . . 12 (𝜑 → (iEdg‘𝐺) = ( I ↾ 𝑃))
3332rneqd 5772 . . . . . . . . . . 11 (𝜑 → ran (iEdg‘𝐺) = ran ( I ↾ 𝑃))
3429, 33syl5eq 2845 . . . . . . . . . 10 (𝜑 → (Edg‘𝐺) = ran ( I ↾ 𝑃))
3534rexeqdv 3365 . . . . . . . . 9 (𝜑 → (∃𝑒 ∈ (Edg‘𝐺){𝑣, 𝑛} ⊆ 𝑒 ↔ ∃𝑒 ∈ ran ( I ↾ 𝑃){𝑣, 𝑛} ⊆ 𝑒))
3635ad2antrr 725 . . . . . . . 8 (((𝜑𝑣 ∈ (Vtx‘𝐺)) ∧ 𝑛 ∈ ((Vtx‘𝐺) ∖ {𝑣})) → (∃𝑒 ∈ (Edg‘𝐺){𝑣, 𝑛} ⊆ 𝑒 ↔ ∃𝑒 ∈ ran ( I ↾ 𝑃){𝑣, 𝑛} ⊆ 𝑒))
3728, 36mpbird 260 . . . . . . 7 (((𝜑𝑣 ∈ (Vtx‘𝐺)) ∧ 𝑛 ∈ ((Vtx‘𝐺) ∖ {𝑣})) → ∃𝑒 ∈ (Edg‘𝐺){𝑣, 𝑛} ⊆ 𝑒)
38 eqid 2798 . . . . . . . 8 (Vtx‘𝐺) = (Vtx‘𝐺)
39 eqid 2798 . . . . . . . 8 (Edg‘𝐺) = (Edg‘𝐺)
4038, 39nbgrel 27130 . . . . . . 7 (𝑛 ∈ (𝐺 NeighbVtx 𝑣) ↔ ((𝑛 ∈ (Vtx‘𝐺) ∧ 𝑣 ∈ (Vtx‘𝐺)) ∧ 𝑛𝑣 ∧ ∃𝑒 ∈ (Edg‘𝐺){𝑣, 𝑛} ⊆ 𝑒))
418, 10, 37, 40syl3anbrc 1340 . . . . . 6 (((𝜑𝑣 ∈ (Vtx‘𝐺)) ∧ 𝑛 ∈ ((Vtx‘𝐺) ∖ {𝑣})) → 𝑛 ∈ (𝐺 NeighbVtx 𝑣))
4241ralrimiva 3149 . . . . 5 ((𝜑𝑣 ∈ (Vtx‘𝐺)) → ∀𝑛 ∈ ((Vtx‘𝐺) ∖ {𝑣})𝑛 ∈ (𝐺 NeighbVtx 𝑣))
4338uvtxel 27178 . . . . 5 (𝑣 ∈ (UnivVtx‘𝐺) ↔ (𝑣 ∈ (Vtx‘𝐺) ∧ ∀𝑛 ∈ ((Vtx‘𝐺) ∖ {𝑣})𝑛 ∈ (𝐺 NeighbVtx 𝑣)))
446, 42, 43sylanbrc 586 . . . 4 ((𝜑𝑣 ∈ (Vtx‘𝐺)) → 𝑣 ∈ (UnivVtx‘𝐺))
4544ralrimiva 3149 . . 3 (𝜑 → ∀𝑣 ∈ (Vtx‘𝐺)𝑣 ∈ (UnivVtx‘𝐺))
465elexd 3461 . . . 4 (𝜑𝐺 ∈ V)
4738iscplgr 27205 . . . 4 (𝐺 ∈ V → (𝐺 ∈ ComplGraph ↔ ∀𝑣 ∈ (Vtx‘𝐺)𝑣 ∈ (UnivVtx‘𝐺)))
4846, 47syl 17 . . 3 (𝜑 → (𝐺 ∈ ComplGraph ↔ ∀𝑣 ∈ (Vtx‘𝐺)𝑣 ∈ (UnivVtx‘𝐺)))
4945, 48mpbird 260 . 2 (𝜑𝐺 ∈ ComplGraph)
50 iscusgr 27208 . 2 (𝐺 ∈ ComplUSGraph ↔ (𝐺 ∈ USGraph ∧ 𝐺 ∈ ComplGraph))
515, 49, 50sylanbrc 586 1 (𝜑𝐺 ∈ ComplUSGraph)
Colors of variables: wff setvar class
Syntax hints:  wi 4  wb 209  wa 399   = wceq 1538  wcel 2111  wne 2987  wral 3106  wrex 3107  {crab 3110  Vcvv 3441  cdif 3878  wss 3881  𝒫 cpw 4497  {csn 4525  {cpr 4527  cop 4531   class class class wbr 5030   I cid 5424  dom cdm 5519  ran crn 5520  cres 5521  cfv 6324  (class class class)co 7135  2c2 11680  chash 13686   Struct cstr 16471  ndxcnx 16472   sSet csts 16473  Basecbs 16475  .efcedgf 26782  Vtxcvtx 26789  iEdgciedg 26790  Edgcedg 26840  USGraphcusgr 26942   NeighbVtx cnbgr 27122  UnivVtxcuvtx 27175  ComplGraphccplgr 27199  ComplUSGraphccusgr 27200
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1797  ax-4 1811  ax-5 1911  ax-6 1970  ax-7 2015  ax-8 2113  ax-9 2121  ax-10 2142  ax-11 2158  ax-12 2175  ax-ext 2770  ax-sep 5167  ax-nul 5174  ax-pow 5231  ax-pr 5295  ax-un 7441  ax-cnex 10582  ax-resscn 10583  ax-1cn 10584  ax-icn 10585  ax-addcl 10586  ax-addrcl 10587  ax-mulcl 10588  ax-mulrcl 10589  ax-mulcom 10590  ax-addass 10591  ax-mulass 10592  ax-distr 10593  ax-i2m1 10594  ax-1ne0 10595  ax-1rid 10596  ax-rnegex 10597  ax-rrecex 10598  ax-cnre 10599  ax-pre-lttri 10600  ax-pre-lttrn 10601  ax-pre-ltadd 10602  ax-pre-mulgt0 10603
This theorem depends on definitions:  df-bi 210  df-an 400  df-or 845  df-3or 1085  df-3an 1086  df-tru 1541  df-fal 1551  df-ex 1782  df-nf 1786  df-sb 2070  df-mo 2598  df-eu 2629  df-clab 2777  df-cleq 2791  df-clel 2870  df-nfc 2938  df-ne 2988  df-nel 3092  df-ral 3111  df-rex 3112  df-reu 3113  df-rab 3115  df-v 3443  df-sbc 3721  df-csb 3829  df-dif 3884  df-un 3886  df-in 3888  df-ss 3898  df-pss 3900  df-nul 4244  df-if 4426  df-pw 4499  df-sn 4526  df-pr 4528  df-tp 4530  df-op 4532  df-uni 4801  df-int 4839  df-iun 4883  df-br 5031  df-opab 5093  df-mpt 5111  df-tr 5137  df-id 5425  df-eprel 5430  df-po 5438  df-so 5439  df-fr 5478  df-we 5480  df-xp 5525  df-rel 5526  df-cnv 5527  df-co 5528  df-dm 5529  df-rn 5530  df-res 5531  df-ima 5532  df-pred 6116  df-ord 6162  df-on 6163  df-lim 6164  df-suc 6165  df-iota 6283  df-fun 6326  df-fn 6327  df-f 6328  df-f1 6329  df-fo 6330  df-f1o 6331  df-fv 6332  df-riota 7093  df-ov 7138  df-oprab 7139  df-mpo 7140  df-om 7561  df-1st 7671  df-2nd 7672  df-wrecs 7930  df-recs 7991  df-rdg 8029  df-1o 8085  df-oadd 8089  df-er 8272  df-en 8493  df-dom 8494  df-sdom 8495  df-fin 8496  df-dju 9314  df-card 9352  df-pnf 10666  df-mnf 10667  df-xr 10668  df-ltxr 10669  df-le 10670  df-sub 10861  df-neg 10862  df-nn 11626  df-2 11688  df-3 11689  df-4 11690  df-5 11691  df-6 11692  df-7 11693  df-8 11694  df-9 11695  df-n0 11886  df-xnn0 11956  df-z 11970  df-dec 12087  df-uz 12232  df-fz 12886  df-hash 13687  df-struct 16477  df-ndx 16478  df-slot 16479  df-base 16481  df-sets 16482  df-edgf 26783  df-vtx 26791  df-iedg 26792  df-edg 26841  df-usgr 26944  df-nbgr 27123  df-uvtx 27176  df-cplgr 27201  df-cusgr 27202
This theorem is referenced by:  cffldtocusgr  27237
  Copyright terms: Public domain W3C validator