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

Theorem structtocusgr 29472
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 29471 . 2 (𝜑𝐺 ∈ USGraph)
6 simpr 484 . . . . 5 ((𝜑𝑣 ∈ (Vtx‘𝐺)) → 𝑣 ∈ (Vtx‘𝐺))
7 eldifi 4148 . . . . . . . 8 (𝑛 ∈ ((Vtx‘𝐺) ∖ {𝑣}) → 𝑛 ∈ (Vtx‘𝐺))
86, 7anim12ci 613 . . . . . . 7 (((𝜑𝑣 ∈ (Vtx‘𝐺)) ∧ 𝑛 ∈ ((Vtx‘𝐺) ∖ {𝑣})) → (𝑛 ∈ (Vtx‘𝐺) ∧ 𝑣 ∈ (Vtx‘𝐺)))
9 eldifsni 4815 . . . . . . . 8 (𝑛 ∈ ((Vtx‘𝐺) ∖ {𝑣}) → 𝑛𝑣)
109adantl 481 . . . . . . 7 (((𝜑𝑣 ∈ (Vtx‘𝐺)) ∧ 𝑛 ∈ ((Vtx‘𝐺) ∖ {𝑣})) → 𝑛𝑣)
11 fvexd 6934 . . . . . . . . 9 (((𝜑𝑣 ∈ (Vtx‘𝐺)) ∧ 𝑛 ∈ ((Vtx‘𝐺) ∖ {𝑣})) → (Base‘𝑆) ∈ V)
123fveq2i 6922 . . . . . . . . . . . . 13 (Vtx‘𝐺) = (Vtx‘(𝑆 sSet ⟨(.ef‘ndx), ( I ↾ 𝑃)⟩))
13 eqid 2734 . . . . . . . . . . . . . 14 (.ef‘ndx) = (.ef‘ndx)
14 fvex 6932 . . . . . . . . . . . . . . 15 (Base‘𝑆) ∈ V
151cusgrexilem1 29465 . . . . . . . . . . . . . . 15 ((Base‘𝑆) ∈ V → ( I ↾ 𝑃) ∈ V)
1614, 15mp1i 13 . . . . . . . . . . . . . 14 (𝜑 → ( I ↾ 𝑃) ∈ V)
1713, 2, 4, 16setsvtx 29061 . . . . . . . . . . . . 13 (𝜑 → (Vtx‘(𝑆 sSet ⟨(.ef‘ndx), ( I ↾ 𝑃)⟩)) = (Base‘𝑆))
1812, 17eqtrid 2786 . . . . . . . . . . . 12 (𝜑 → (Vtx‘𝐺) = (Base‘𝑆))
1918eleq2d 2824 . . . . . . . . . . 11 (𝜑 → (𝑣 ∈ (Vtx‘𝐺) ↔ 𝑣 ∈ (Base‘𝑆)))
2019biimpa 476 . . . . . . . . . 10 ((𝜑𝑣 ∈ (Vtx‘𝐺)) → 𝑣 ∈ (Base‘𝑆))
2120adantr 480 . . . . . . . . 9 (((𝜑𝑣 ∈ (Vtx‘𝐺)) ∧ 𝑛 ∈ ((Vtx‘𝐺) ∖ {𝑣})) → 𝑣 ∈ (Base‘𝑆))
2218difeq1d 4142 . . . . . . . . . . . . 13 (𝜑 → ((Vtx‘𝐺) ∖ {𝑣}) = ((Base‘𝑆) ∖ {𝑣}))
2322eleq2d 2824 . . . . . . . . . . . 12 (𝜑 → (𝑛 ∈ ((Vtx‘𝐺) ∖ {𝑣}) ↔ 𝑛 ∈ ((Base‘𝑆) ∖ {𝑣})))
2423biimpd 229 . . . . . . . . . . 11 (𝜑 → (𝑛 ∈ ((Vtx‘𝐺) ∖ {𝑣}) → 𝑛 ∈ ((Base‘𝑆) ∖ {𝑣})))
2524adantr 480 . . . . . . . . . 10 ((𝜑𝑣 ∈ (Vtx‘𝐺)) → (𝑛 ∈ ((Vtx‘𝐺) ∖ {𝑣}) → 𝑛 ∈ ((Base‘𝑆) ∖ {𝑣})))
2625imp 406 . . . . . . . . 9 (((𝜑𝑣 ∈ (Vtx‘𝐺)) ∧ 𝑛 ∈ ((Vtx‘𝐺) ∖ {𝑣})) → 𝑛 ∈ ((Base‘𝑆) ∖ {𝑣}))
271cusgrexilem2 29468 . . . . . . . . 9 ((((Base‘𝑆) ∈ V ∧ 𝑣 ∈ (Base‘𝑆)) ∧ 𝑛 ∈ ((Base‘𝑆) ∖ {𝑣})) → ∃𝑒 ∈ ran ( I ↾ 𝑃){𝑣, 𝑛} ⊆ 𝑒)
2811, 21, 26, 27syl21anc 837 . . . . . . . 8 (((𝜑𝑣 ∈ (Vtx‘𝐺)) ∧ 𝑛 ∈ ((Vtx‘𝐺) ∖ {𝑣})) → ∃𝑒 ∈ ran ( I ↾ 𝑃){𝑣, 𝑛} ⊆ 𝑒)
29 edgval 29075 . . . . . . . . . . 11 (Edg‘𝐺) = ran (iEdg‘𝐺)
303fveq2i 6922 . . . . . . . . . . . . 13 (iEdg‘𝐺) = (iEdg‘(𝑆 sSet ⟨(.ef‘ndx), ( I ↾ 𝑃)⟩))
3113, 2, 4, 16setsiedg 29062 . . . . . . . . . . . . 13 (𝜑 → (iEdg‘(𝑆 sSet ⟨(.ef‘ndx), ( I ↾ 𝑃)⟩)) = ( I ↾ 𝑃))
3230, 31eqtrid 2786 . . . . . . . . . . . 12 (𝜑 → (iEdg‘𝐺) = ( I ↾ 𝑃))
3332rneqd 5962 . . . . . . . . . . 11 (𝜑 → ran (iEdg‘𝐺) = ran ( I ↾ 𝑃))
3429, 33eqtrid 2786 . . . . . . . . . 10 (𝜑 → (Edg‘𝐺) = ran ( I ↾ 𝑃))
3534rexeqdv 3330 . . . . . . . . 9 (𝜑 → (∃𝑒 ∈ (Edg‘𝐺){𝑣, 𝑛} ⊆ 𝑒 ↔ ∃𝑒 ∈ ran ( I ↾ 𝑃){𝑣, 𝑛} ⊆ 𝑒))
3635ad2antrr 725 . . . . . . . 8 (((𝜑𝑣 ∈ (Vtx‘𝐺)) ∧ 𝑛 ∈ ((Vtx‘𝐺) ∖ {𝑣})) → (∃𝑒 ∈ (Edg‘𝐺){𝑣, 𝑛} ⊆ 𝑒 ↔ ∃𝑒 ∈ ran ( I ↾ 𝑃){𝑣, 𝑛} ⊆ 𝑒))
3728, 36mpbird 257 . . . . . . 7 (((𝜑𝑣 ∈ (Vtx‘𝐺)) ∧ 𝑛 ∈ ((Vtx‘𝐺) ∖ {𝑣})) → ∃𝑒 ∈ (Edg‘𝐺){𝑣, 𝑛} ⊆ 𝑒)
38 eqid 2734 . . . . . . . 8 (Vtx‘𝐺) = (Vtx‘𝐺)
39 eqid 2734 . . . . . . . 8 (Edg‘𝐺) = (Edg‘𝐺)
4038, 39nbgrel 29366 . . . . . . 7 (𝑛 ∈ (𝐺 NeighbVtx 𝑣) ↔ ((𝑛 ∈ (Vtx‘𝐺) ∧ 𝑣 ∈ (Vtx‘𝐺)) ∧ 𝑛𝑣 ∧ ∃𝑒 ∈ (Edg‘𝐺){𝑣, 𝑛} ⊆ 𝑒))
418, 10, 37, 40syl3anbrc 1343 . . . . . 6 (((𝜑𝑣 ∈ (Vtx‘𝐺)) ∧ 𝑛 ∈ ((Vtx‘𝐺) ∖ {𝑣})) → 𝑛 ∈ (𝐺 NeighbVtx 𝑣))
4241ralrimiva 3148 . . . . 5 ((𝜑𝑣 ∈ (Vtx‘𝐺)) → ∀𝑛 ∈ ((Vtx‘𝐺) ∖ {𝑣})𝑛 ∈ (𝐺 NeighbVtx 𝑣))
4338uvtxel 29414 . . . . 5 (𝑣 ∈ (UnivVtx‘𝐺) ↔ (𝑣 ∈ (Vtx‘𝐺) ∧ ∀𝑛 ∈ ((Vtx‘𝐺) ∖ {𝑣})𝑛 ∈ (𝐺 NeighbVtx 𝑣)))
446, 42, 43sylanbrc 582 . . . 4 ((𝜑𝑣 ∈ (Vtx‘𝐺)) → 𝑣 ∈ (UnivVtx‘𝐺))
4544ralrimiva 3148 . . 3 (𝜑 → ∀𝑣 ∈ (Vtx‘𝐺)𝑣 ∈ (UnivVtx‘𝐺))
465elexd 3507 . . . 4 (𝜑𝐺 ∈ V)
4738iscplgr 29441 . . . 4 (𝐺 ∈ V → (𝐺 ∈ ComplGraph ↔ ∀𝑣 ∈ (Vtx‘𝐺)𝑣 ∈ (UnivVtx‘𝐺)))
4846, 47syl 17 . . 3 (𝜑 → (𝐺 ∈ ComplGraph ↔ ∀𝑣 ∈ (Vtx‘𝐺)𝑣 ∈ (UnivVtx‘𝐺)))
4945, 48mpbird 257 . 2 (𝜑𝐺 ∈ ComplGraph)
50 iscusgr 29444 . 2 (𝐺 ∈ ComplUSGraph ↔ (𝐺 ∈ USGraph ∧ 𝐺 ∈ ComplGraph))
515, 49, 50sylanbrc 582 1 (𝜑𝐺 ∈ ComplUSGraph)
Colors of variables: wff setvar class
Syntax hints:  wi 4  wb 206  wa 395   = wceq 1537  wcel 2103  wne 2942  wral 3063  wrex 3072  {crab 3438  Vcvv 3482  cdif 3967  wss 3970  𝒫 cpw 4622  {csn 4648  {cpr 4650  cop 4654   class class class wbr 5169   I cid 5596  dom cdm 5699  ran crn 5700  cres 5701  cfv 6572  (class class class)co 7445  2c2 12344  chash 14375   Struct cstr 17188   sSet csts 17205  ndxcnx 17235  Basecbs 17253  .efcedgf 29012  Vtxcvtx 29022  iEdgciedg 29023  Edgcedg 29073  USGraphcusgr 29175   NeighbVtx cnbgr 29358  UnivVtxcuvtx 29411  ComplGraphccplgr 29435  ComplUSGraphccusgr 29436
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1793  ax-4 1807  ax-5 1909  ax-6 1967  ax-7 2007  ax-8 2105  ax-9 2113  ax-10 2136  ax-11 2153  ax-12 2173  ax-ext 2705  ax-sep 5320  ax-nul 5327  ax-pow 5386  ax-pr 5450  ax-un 7766  ax-cnex 11236  ax-resscn 11237  ax-1cn 11238  ax-icn 11239  ax-addcl 11240  ax-addrcl 11241  ax-mulcl 11242  ax-mulrcl 11243  ax-mulcom 11244  ax-addass 11245  ax-mulass 11246  ax-distr 11247  ax-i2m1 11248  ax-1ne0 11249  ax-1rid 11250  ax-rnegex 11251  ax-rrecex 11252  ax-cnre 11253  ax-pre-lttri 11254  ax-pre-lttrn 11255  ax-pre-ltadd 11256  ax-pre-mulgt0 11257
This theorem depends on definitions:  df-bi 207  df-an 396  df-or 847  df-3or 1088  df-3an 1089  df-tru 1540  df-fal 1550  df-ex 1778  df-nf 1782  df-sb 2065  df-mo 2537  df-eu 2566  df-clab 2712  df-cleq 2726  df-clel 2813  df-nfc 2890  df-ne 2943  df-nel 3049  df-ral 3064  df-rex 3073  df-reu 3384  df-rab 3439  df-v 3484  df-sbc 3799  df-csb 3916  df-dif 3973  df-un 3975  df-in 3977  df-ss 3987  df-pss 3990  df-nul 4348  df-if 4549  df-pw 4624  df-sn 4649  df-pr 4651  df-op 4655  df-uni 4932  df-int 4973  df-iun 5021  df-br 5170  df-opab 5232  df-mpt 5253  df-tr 5287  df-id 5597  df-eprel 5603  df-po 5611  df-so 5612  df-fr 5654  df-we 5656  df-xp 5705  df-rel 5706  df-cnv 5707  df-co 5708  df-dm 5709  df-rn 5710  df-res 5711  df-ima 5712  df-pred 6331  df-ord 6397  df-on 6398  df-lim 6399  df-suc 6400  df-iota 6524  df-fun 6574  df-fn 6575  df-f 6576  df-f1 6577  df-fo 6578  df-f1o 6579  df-fv 6580  df-riota 7401  df-ov 7448  df-oprab 7449  df-mpo 7450  df-om 7900  df-1st 8026  df-2nd 8027  df-frecs 8318  df-wrecs 8349  df-recs 8423  df-rdg 8462  df-1o 8518  df-oadd 8522  df-er 8759  df-en 9000  df-dom 9001  df-sdom 9002  df-fin 9003  df-dju 9966  df-card 10004  df-pnf 11322  df-mnf 11323  df-xr 11324  df-ltxr 11325  df-le 11326  df-sub 11518  df-neg 11519  df-nn 12290  df-2 12352  df-3 12353  df-4 12354  df-5 12355  df-6 12356  df-7 12357  df-8 12358  df-9 12359  df-n0 12550  df-xnn0 12622  df-z 12636  df-dec 12755  df-uz 12900  df-fz 13564  df-hash 14376  df-struct 17189  df-sets 17206  df-slot 17224  df-ndx 17236  df-base 17254  df-edgf 29013  df-vtx 29024  df-iedg 29025  df-edg 29074  df-usgr 29177  df-nbgr 29359  df-uvtx 29412  df-cplgr 29437  df-cusgr 29438
This theorem is referenced by:  cffldtocusgr  29473  cffldtocusgrOLD  29474
  Copyright terms: Public domain W3C validator