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

Theorem structtocusgr 29379
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 29378 . 2 (𝜑𝐺 ∈ USGraph)
6 simpr 484 . . . . 5 ((𝜑𝑣 ∈ (Vtx‘𝐺)) → 𝑣 ∈ (Vtx‘𝐺))
7 eldifi 4096 . . . . . . . 8 (𝑛 ∈ ((Vtx‘𝐺) ∖ {𝑣}) → 𝑛 ∈ (Vtx‘𝐺))
86, 7anim12ci 614 . . . . . . 7 (((𝜑𝑣 ∈ (Vtx‘𝐺)) ∧ 𝑛 ∈ ((Vtx‘𝐺) ∖ {𝑣})) → (𝑛 ∈ (Vtx‘𝐺) ∧ 𝑣 ∈ (Vtx‘𝐺)))
9 eldifsni 4756 . . . . . . . 8 (𝑛 ∈ ((Vtx‘𝐺) ∖ {𝑣}) → 𝑛𝑣)
109adantl 481 . . . . . . 7 (((𝜑𝑣 ∈ (Vtx‘𝐺)) ∧ 𝑛 ∈ ((Vtx‘𝐺) ∖ {𝑣})) → 𝑛𝑣)
11 fvexd 6875 . . . . . . . . 9 (((𝜑𝑣 ∈ (Vtx‘𝐺)) ∧ 𝑛 ∈ ((Vtx‘𝐺) ∖ {𝑣})) → (Base‘𝑆) ∈ V)
123fveq2i 6863 . . . . . . . . . . . . 13 (Vtx‘𝐺) = (Vtx‘(𝑆 sSet ⟨(.ef‘ndx), ( I ↾ 𝑃)⟩))
13 eqid 2730 . . . . . . . . . . . . . 14 (.ef‘ndx) = (.ef‘ndx)
14 fvex 6873 . . . . . . . . . . . . . . 15 (Base‘𝑆) ∈ V
151cusgrexilem1 29372 . . . . . . . . . . . . . . 15 ((Base‘𝑆) ∈ V → ( I ↾ 𝑃) ∈ V)
1614, 15mp1i 13 . . . . . . . . . . . . . 14 (𝜑 → ( I ↾ 𝑃) ∈ V)
1713, 2, 4, 16setsvtx 28968 . . . . . . . . . . . . 13 (𝜑 → (Vtx‘(𝑆 sSet ⟨(.ef‘ndx), ( I ↾ 𝑃)⟩)) = (Base‘𝑆))
1812, 17eqtrid 2777 . . . . . . . . . . . 12 (𝜑 → (Vtx‘𝐺) = (Base‘𝑆))
1918eleq2d 2815 . . . . . . . . . . 11 (𝜑 → (𝑣 ∈ (Vtx‘𝐺) ↔ 𝑣 ∈ (Base‘𝑆)))
2019biimpa 476 . . . . . . . . . 10 ((𝜑𝑣 ∈ (Vtx‘𝐺)) → 𝑣 ∈ (Base‘𝑆))
2120adantr 480 . . . . . . . . 9 (((𝜑𝑣 ∈ (Vtx‘𝐺)) ∧ 𝑛 ∈ ((Vtx‘𝐺) ∖ {𝑣})) → 𝑣 ∈ (Base‘𝑆))
2218difeq1d 4090 . . . . . . . . . . . . 13 (𝜑 → ((Vtx‘𝐺) ∖ {𝑣}) = ((Base‘𝑆) ∖ {𝑣}))
2322eleq2d 2815 . . . . . . . . . . . 12 (𝜑 → (𝑛 ∈ ((Vtx‘𝐺) ∖ {𝑣}) ↔ 𝑛 ∈ ((Base‘𝑆) ∖ {𝑣})))
2423biimpd 229 . . . . . . . . . . 11 (𝜑 → (𝑛 ∈ ((Vtx‘𝐺) ∖ {𝑣}) → 𝑛 ∈ ((Base‘𝑆) ∖ {𝑣})))
2524adantr 480 . . . . . . . . . 10 ((𝜑𝑣 ∈ (Vtx‘𝐺)) → (𝑛 ∈ ((Vtx‘𝐺) ∖ {𝑣}) → 𝑛 ∈ ((Base‘𝑆) ∖ {𝑣})))
2625imp 406 . . . . . . . . 9 (((𝜑𝑣 ∈ (Vtx‘𝐺)) ∧ 𝑛 ∈ ((Vtx‘𝐺) ∖ {𝑣})) → 𝑛 ∈ ((Base‘𝑆) ∖ {𝑣}))
271cusgrexilem2 29375 . . . . . . . . 9 ((((Base‘𝑆) ∈ V ∧ 𝑣 ∈ (Base‘𝑆)) ∧ 𝑛 ∈ ((Base‘𝑆) ∖ {𝑣})) → ∃𝑒 ∈ ran ( I ↾ 𝑃){𝑣, 𝑛} ⊆ 𝑒)
2811, 21, 26, 27syl21anc 837 . . . . . . . 8 (((𝜑𝑣 ∈ (Vtx‘𝐺)) ∧ 𝑛 ∈ ((Vtx‘𝐺) ∖ {𝑣})) → ∃𝑒 ∈ ran ( I ↾ 𝑃){𝑣, 𝑛} ⊆ 𝑒)
29 edgval 28982 . . . . . . . . . . 11 (Edg‘𝐺) = ran (iEdg‘𝐺)
303fveq2i 6863 . . . . . . . . . . . . 13 (iEdg‘𝐺) = (iEdg‘(𝑆 sSet ⟨(.ef‘ndx), ( I ↾ 𝑃)⟩))
3113, 2, 4, 16setsiedg 28969 . . . . . . . . . . . . 13 (𝜑 → (iEdg‘(𝑆 sSet ⟨(.ef‘ndx), ( I ↾ 𝑃)⟩)) = ( I ↾ 𝑃))
3230, 31eqtrid 2777 . . . . . . . . . . . 12 (𝜑 → (iEdg‘𝐺) = ( I ↾ 𝑃))
3332rneqd 5904 . . . . . . . . . . 11 (𝜑 → ran (iEdg‘𝐺) = ran ( I ↾ 𝑃))
3429, 33eqtrid 2777 . . . . . . . . . 10 (𝜑 → (Edg‘𝐺) = ran ( I ↾ 𝑃))
3534rexeqdv 3302 . . . . . . . . 9 (𝜑 → (∃𝑒 ∈ (Edg‘𝐺){𝑣, 𝑛} ⊆ 𝑒 ↔ ∃𝑒 ∈ ran ( I ↾ 𝑃){𝑣, 𝑛} ⊆ 𝑒))
3635ad2antrr 726 . . . . . . . 8 (((𝜑𝑣 ∈ (Vtx‘𝐺)) ∧ 𝑛 ∈ ((Vtx‘𝐺) ∖ {𝑣})) → (∃𝑒 ∈ (Edg‘𝐺){𝑣, 𝑛} ⊆ 𝑒 ↔ ∃𝑒 ∈ ran ( I ↾ 𝑃){𝑣, 𝑛} ⊆ 𝑒))
3728, 36mpbird 257 . . . . . . 7 (((𝜑𝑣 ∈ (Vtx‘𝐺)) ∧ 𝑛 ∈ ((Vtx‘𝐺) ∖ {𝑣})) → ∃𝑒 ∈ (Edg‘𝐺){𝑣, 𝑛} ⊆ 𝑒)
38 eqid 2730 . . . . . . . 8 (Vtx‘𝐺) = (Vtx‘𝐺)
39 eqid 2730 . . . . . . . 8 (Edg‘𝐺) = (Edg‘𝐺)
4038, 39nbgrel 29273 . . . . . . 7 (𝑛 ∈ (𝐺 NeighbVtx 𝑣) ↔ ((𝑛 ∈ (Vtx‘𝐺) ∧ 𝑣 ∈ (Vtx‘𝐺)) ∧ 𝑛𝑣 ∧ ∃𝑒 ∈ (Edg‘𝐺){𝑣, 𝑛} ⊆ 𝑒))
418, 10, 37, 40syl3anbrc 1344 . . . . . 6 (((𝜑𝑣 ∈ (Vtx‘𝐺)) ∧ 𝑛 ∈ ((Vtx‘𝐺) ∖ {𝑣})) → 𝑛 ∈ (𝐺 NeighbVtx 𝑣))
4241ralrimiva 3126 . . . . 5 ((𝜑𝑣 ∈ (Vtx‘𝐺)) → ∀𝑛 ∈ ((Vtx‘𝐺) ∖ {𝑣})𝑛 ∈ (𝐺 NeighbVtx 𝑣))
4338uvtxel 29321 . . . . 5 (𝑣 ∈ (UnivVtx‘𝐺) ↔ (𝑣 ∈ (Vtx‘𝐺) ∧ ∀𝑛 ∈ ((Vtx‘𝐺) ∖ {𝑣})𝑛 ∈ (𝐺 NeighbVtx 𝑣)))
446, 42, 43sylanbrc 583 . . . 4 ((𝜑𝑣 ∈ (Vtx‘𝐺)) → 𝑣 ∈ (UnivVtx‘𝐺))
4544ralrimiva 3126 . . 3 (𝜑 → ∀𝑣 ∈ (Vtx‘𝐺)𝑣 ∈ (UnivVtx‘𝐺))
465elexd 3474 . . . 4 (𝜑𝐺 ∈ V)
4738iscplgr 29348 . . . 4 (𝐺 ∈ V → (𝐺 ∈ ComplGraph ↔ ∀𝑣 ∈ (Vtx‘𝐺)𝑣 ∈ (UnivVtx‘𝐺)))
4846, 47syl 17 . . 3 (𝜑 → (𝐺 ∈ ComplGraph ↔ ∀𝑣 ∈ (Vtx‘𝐺)𝑣 ∈ (UnivVtx‘𝐺)))
4945, 48mpbird 257 . 2 (𝜑𝐺 ∈ ComplGraph)
50 iscusgr 29351 . 2 (𝐺 ∈ ComplUSGraph ↔ (𝐺 ∈ USGraph ∧ 𝐺 ∈ ComplGraph))
515, 49, 50sylanbrc 583 1 (𝜑𝐺 ∈ ComplUSGraph)
Colors of variables: wff setvar class
Syntax hints:  wi 4  wb 206  wa 395   = wceq 1540  wcel 2109  wne 2926  wral 3045  wrex 3054  {crab 3408  Vcvv 3450  cdif 3913  wss 3916  𝒫 cpw 4565  {csn 4591  {cpr 4593  cop 4597   class class class wbr 5109   I cid 5534  dom cdm 5640  ran crn 5641  cres 5642  cfv 6513  (class class class)co 7389  2c2 12242  chash 14301   Struct cstr 17122   sSet csts 17139  ndxcnx 17169  Basecbs 17185  .efcedgf 28921  Vtxcvtx 28929  iEdgciedg 28930  Edgcedg 28980  USGraphcusgr 29082   NeighbVtx cnbgr 29265  UnivVtxcuvtx 29318  ComplGraphccplgr 29342  ComplUSGraphccusgr 29343
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1795  ax-4 1809  ax-5 1910  ax-6 1967  ax-7 2008  ax-8 2111  ax-9 2119  ax-10 2142  ax-11 2158  ax-12 2178  ax-ext 2702  ax-sep 5253  ax-nul 5263  ax-pow 5322  ax-pr 5389  ax-un 7713  ax-cnex 11130  ax-resscn 11131  ax-1cn 11132  ax-icn 11133  ax-addcl 11134  ax-addrcl 11135  ax-mulcl 11136  ax-mulrcl 11137  ax-mulcom 11138  ax-addass 11139  ax-mulass 11140  ax-distr 11141  ax-i2m1 11142  ax-1ne0 11143  ax-1rid 11144  ax-rnegex 11145  ax-rrecex 11146  ax-cnre 11147  ax-pre-lttri 11148  ax-pre-lttrn 11149  ax-pre-ltadd 11150  ax-pre-mulgt0 11151
This theorem depends on definitions:  df-bi 207  df-an 396  df-or 848  df-3or 1087  df-3an 1088  df-tru 1543  df-fal 1553  df-ex 1780  df-nf 1784  df-sb 2066  df-mo 2534  df-eu 2563  df-clab 2709  df-cleq 2722  df-clel 2804  df-nfc 2879  df-ne 2927  df-nel 3031  df-ral 3046  df-rex 3055  df-reu 3357  df-rab 3409  df-v 3452  df-sbc 3756  df-csb 3865  df-dif 3919  df-un 3921  df-in 3923  df-ss 3933  df-pss 3936  df-nul 4299  df-if 4491  df-pw 4567  df-sn 4592  df-pr 4594  df-op 4598  df-uni 4874  df-int 4913  df-iun 4959  df-br 5110  df-opab 5172  df-mpt 5191  df-tr 5217  df-id 5535  df-eprel 5540  df-po 5548  df-so 5549  df-fr 5593  df-we 5595  df-xp 5646  df-rel 5647  df-cnv 5648  df-co 5649  df-dm 5650  df-rn 5651  df-res 5652  df-ima 5653  df-pred 6276  df-ord 6337  df-on 6338  df-lim 6339  df-suc 6340  df-iota 6466  df-fun 6515  df-fn 6516  df-f 6517  df-f1 6518  df-fo 6519  df-f1o 6520  df-fv 6521  df-riota 7346  df-ov 7392  df-oprab 7393  df-mpo 7394  df-om 7845  df-1st 7970  df-2nd 7971  df-frecs 8262  df-wrecs 8293  df-recs 8342  df-rdg 8380  df-1o 8436  df-oadd 8440  df-er 8673  df-en 8921  df-dom 8922  df-sdom 8923  df-fin 8924  df-dju 9860  df-card 9898  df-pnf 11216  df-mnf 11217  df-xr 11218  df-ltxr 11219  df-le 11220  df-sub 11413  df-neg 11414  df-nn 12188  df-2 12250  df-3 12251  df-4 12252  df-5 12253  df-6 12254  df-7 12255  df-8 12256  df-9 12257  df-n0 12449  df-xnn0 12522  df-z 12536  df-dec 12656  df-uz 12800  df-fz 13475  df-hash 14302  df-struct 17123  df-sets 17140  df-slot 17158  df-ndx 17170  df-base 17186  df-edgf 28922  df-vtx 28931  df-iedg 28932  df-edg 28981  df-usgr 29084  df-nbgr 29266  df-uvtx 29319  df-cplgr 29344  df-cusgr 29345
This theorem is referenced by:  cffldtocusgr  29380  cffldtocusgrOLD  29381
  Copyright terms: Public domain W3C validator