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

Theorem numclwlk1lem1 28143
 Description: Lemma 1 for numclwlk1 28145 (Statement 9 in [Huneke] p. 2 for n=2): "the number of closed 2-walks v(0) v(1) v(2) from v = v(0) = v(2) ... is kf(0)". (Contributed by AV, 23-May-2022.)
Hypotheses
Ref Expression
numclwlk1.v 𝑉 = (Vtx‘𝐺)
numclwlk1.c 𝐶 = {𝑤 ∈ (ClWalks‘𝐺) ∣ ((♯‘(1st𝑤)) = 𝑁 ∧ ((2nd𝑤)‘0) = 𝑋 ∧ ((2nd𝑤)‘(𝑁 − 2)) = 𝑋)}
numclwlk1.f 𝐹 = {𝑤 ∈ (ClWalks‘𝐺) ∣ ((♯‘(1st𝑤)) = (𝑁 − 2) ∧ ((2nd𝑤)‘0) = 𝑋)}
Assertion
Ref Expression
numclwlk1lem1 (((𝑉 ∈ Fin ∧ 𝐺 RegUSGraph 𝐾) ∧ (𝑋𝑉𝑁 = 2)) → (♯‘𝐶) = (𝐾 · (♯‘𝐹)))
Distinct variable groups:   𝑤,𝐺   𝑤,𝐾   𝑤,𝑁   𝑤,𝑉   𝑤,𝑋
Allowed substitution hints:   𝐶(𝑤)   𝐹(𝑤)

Proof of Theorem numclwlk1lem1
StepHypRef Expression
1 3anass 1092 . . . . . . 7 (((♯‘(1st𝑤)) = 2 ∧ ((2nd𝑤)‘0) = 𝑋 ∧ ((2nd𝑤)‘0) = 𝑋) ↔ ((♯‘(1st𝑤)) = 2 ∧ (((2nd𝑤)‘0) = 𝑋 ∧ ((2nd𝑤)‘0) = 𝑋)))
2 anidm 568 . . . . . . . 8 ((((2nd𝑤)‘0) = 𝑋 ∧ ((2nd𝑤)‘0) = 𝑋) ↔ ((2nd𝑤)‘0) = 𝑋)
32anbi2i 625 . . . . . . 7 (((♯‘(1st𝑤)) = 2 ∧ (((2nd𝑤)‘0) = 𝑋 ∧ ((2nd𝑤)‘0) = 𝑋)) ↔ ((♯‘(1st𝑤)) = 2 ∧ ((2nd𝑤)‘0) = 𝑋))
41, 3bitri 278 . . . . . 6 (((♯‘(1st𝑤)) = 2 ∧ ((2nd𝑤)‘0) = 𝑋 ∧ ((2nd𝑤)‘0) = 𝑋) ↔ ((♯‘(1st𝑤)) = 2 ∧ ((2nd𝑤)‘0) = 𝑋))
54rabbii 3458 . . . . 5 {𝑤 ∈ (ClWalks‘𝐺) ∣ ((♯‘(1st𝑤)) = 2 ∧ ((2nd𝑤)‘0) = 𝑋 ∧ ((2nd𝑤)‘0) = 𝑋)} = {𝑤 ∈ (ClWalks‘𝐺) ∣ ((♯‘(1st𝑤)) = 2 ∧ ((2nd𝑤)‘0) = 𝑋)}
65fveq2i 6654 . . . 4 (♯‘{𝑤 ∈ (ClWalks‘𝐺) ∣ ((♯‘(1st𝑤)) = 2 ∧ ((2nd𝑤)‘0) = 𝑋 ∧ ((2nd𝑤)‘0) = 𝑋)}) = (♯‘{𝑤 ∈ (ClWalks‘𝐺) ∣ ((♯‘(1st𝑤)) = 2 ∧ ((2nd𝑤)‘0) = 𝑋)})
7 simpl 486 . . . . 5 ((𝑉 ∈ Fin ∧ 𝐺 RegUSGraph 𝐾) → 𝑉 ∈ Fin)
8 simpr 488 . . . . 5 ((𝑉 ∈ Fin ∧ 𝐺 RegUSGraph 𝐾) → 𝐺 RegUSGraph 𝐾)
9 simpl 486 . . . . 5 ((𝑋𝑉𝑁 = 2) → 𝑋𝑉)
10 numclwlk1.v . . . . . 6 𝑉 = (Vtx‘𝐺)
1110clwlknon2num 28142 . . . . 5 ((𝑉 ∈ Fin ∧ 𝐺 RegUSGraph 𝐾𝑋𝑉) → (♯‘{𝑤 ∈ (ClWalks‘𝐺) ∣ ((♯‘(1st𝑤)) = 2 ∧ ((2nd𝑤)‘0) = 𝑋)}) = 𝐾)
127, 8, 9, 11syl2an3an 1419 . . . 4 (((𝑉 ∈ Fin ∧ 𝐺 RegUSGraph 𝐾) ∧ (𝑋𝑉𝑁 = 2)) → (♯‘{𝑤 ∈ (ClWalks‘𝐺) ∣ ((♯‘(1st𝑤)) = 2 ∧ ((2nd𝑤)‘0) = 𝑋)}) = 𝐾)
136, 12syl5eq 2871 . . 3 (((𝑉 ∈ Fin ∧ 𝐺 RegUSGraph 𝐾) ∧ (𝑋𝑉𝑁 = 2)) → (♯‘{𝑤 ∈ (ClWalks‘𝐺) ∣ ((♯‘(1st𝑤)) = 2 ∧ ((2nd𝑤)‘0) = 𝑋 ∧ ((2nd𝑤)‘0) = 𝑋)}) = 𝐾)
14 rusgrusgr 27343 . . . . . . . . 9 (𝐺 RegUSGraph 𝐾𝐺 ∈ USGraph)
1514anim2i 619 . . . . . . . 8 ((𝑉 ∈ Fin ∧ 𝐺 RegUSGraph 𝐾) → (𝑉 ∈ Fin ∧ 𝐺 ∈ USGraph))
1615ancomd 465 . . . . . . 7 ((𝑉 ∈ Fin ∧ 𝐺 RegUSGraph 𝐾) → (𝐺 ∈ USGraph ∧ 𝑉 ∈ Fin))
1710isfusgr 27097 . . . . . . 7 (𝐺 ∈ FinUSGraph ↔ (𝐺 ∈ USGraph ∧ 𝑉 ∈ Fin))
1816, 17sylibr 237 . . . . . 6 ((𝑉 ∈ Fin ∧ 𝐺 RegUSGraph 𝐾) → 𝐺 ∈ FinUSGraph)
19 ne0i 4281 . . . . . . 7 (𝑋𝑉𝑉 ≠ ∅)
2019adantr 484 . . . . . 6 ((𝑋𝑉𝑁 = 2) → 𝑉 ≠ ∅)
2110frusgrnn0 27350 . . . . . 6 ((𝐺 ∈ FinUSGraph ∧ 𝐺 RegUSGraph 𝐾𝑉 ≠ ∅) → 𝐾 ∈ ℕ0)
2218, 8, 20, 21syl2an3an 1419 . . . . 5 (((𝑉 ∈ Fin ∧ 𝐺 RegUSGraph 𝐾) ∧ (𝑋𝑉𝑁 = 2)) → 𝐾 ∈ ℕ0)
2322nn0red 11942 . . . 4 (((𝑉 ∈ Fin ∧ 𝐺 RegUSGraph 𝐾) ∧ (𝑋𝑉𝑁 = 2)) → 𝐾 ∈ ℝ)
24 ax-1rid 10592 . . . 4 (𝐾 ∈ ℝ → (𝐾 · 1) = 𝐾)
2523, 24syl 17 . . 3 (((𝑉 ∈ Fin ∧ 𝐺 RegUSGraph 𝐾) ∧ (𝑋𝑉𝑁 = 2)) → (𝐾 · 1) = 𝐾)
2610wlkl0 28141 . . . . . . 7 (𝑋𝑉 → {𝑤 ∈ (ClWalks‘𝐺) ∣ ((♯‘(1st𝑤)) = 0 ∧ ((2nd𝑤)‘0) = 𝑋)} = {⟨∅, {⟨0, 𝑋⟩}⟩})
2726ad2antrl 727 . . . . . 6 (((𝑉 ∈ Fin ∧ 𝐺 RegUSGraph 𝐾) ∧ (𝑋𝑉𝑁 = 2)) → {𝑤 ∈ (ClWalks‘𝐺) ∣ ((♯‘(1st𝑤)) = 0 ∧ ((2nd𝑤)‘0) = 𝑋)} = {⟨∅, {⟨0, 𝑋⟩}⟩})
2827fveq2d 6655 . . . . 5 (((𝑉 ∈ Fin ∧ 𝐺 RegUSGraph 𝐾) ∧ (𝑋𝑉𝑁 = 2)) → (♯‘{𝑤 ∈ (ClWalks‘𝐺) ∣ ((♯‘(1st𝑤)) = 0 ∧ ((2nd𝑤)‘0) = 𝑋)}) = (♯‘{⟨∅, {⟨0, 𝑋⟩}⟩}))
29 opex 5337 . . . . . 6 ⟨∅, {⟨0, 𝑋⟩}⟩ ∈ V
30 hashsng 13724 . . . . . 6 (⟨∅, {⟨0, 𝑋⟩}⟩ ∈ V → (♯‘{⟨∅, {⟨0, 𝑋⟩}⟩}) = 1)
3129, 30ax-mp 5 . . . . 5 (♯‘{⟨∅, {⟨0, 𝑋⟩}⟩}) = 1
3228, 31syl6req 2876 . . . 4 (((𝑉 ∈ Fin ∧ 𝐺 RegUSGraph 𝐾) ∧ (𝑋𝑉𝑁 = 2)) → 1 = (♯‘{𝑤 ∈ (ClWalks‘𝐺) ∣ ((♯‘(1st𝑤)) = 0 ∧ ((2nd𝑤)‘0) = 𝑋)}))
3332oveq2d 7154 . . 3 (((𝑉 ∈ Fin ∧ 𝐺 RegUSGraph 𝐾) ∧ (𝑋𝑉𝑁 = 2)) → (𝐾 · 1) = (𝐾 · (♯‘{𝑤 ∈ (ClWalks‘𝐺) ∣ ((♯‘(1st𝑤)) = 0 ∧ ((2nd𝑤)‘0) = 𝑋)})))
3413, 25, 333eqtr2d 2865 . 2 (((𝑉 ∈ Fin ∧ 𝐺 RegUSGraph 𝐾) ∧ (𝑋𝑉𝑁 = 2)) → (♯‘{𝑤 ∈ (ClWalks‘𝐺) ∣ ((♯‘(1st𝑤)) = 2 ∧ ((2nd𝑤)‘0) = 𝑋 ∧ ((2nd𝑤)‘0) = 𝑋)}) = (𝐾 · (♯‘{𝑤 ∈ (ClWalks‘𝐺) ∣ ((♯‘(1st𝑤)) = 0 ∧ ((2nd𝑤)‘0) = 𝑋)})))
35 numclwlk1.c . . . . . 6 𝐶 = {𝑤 ∈ (ClWalks‘𝐺) ∣ ((♯‘(1st𝑤)) = 𝑁 ∧ ((2nd𝑤)‘0) = 𝑋 ∧ ((2nd𝑤)‘(𝑁 − 2)) = 𝑋)}
36 eqeq2 2836 . . . . . . . 8 (𝑁 = 2 → ((♯‘(1st𝑤)) = 𝑁 ↔ (♯‘(1st𝑤)) = 2))
37 oveq1 7145 . . . . . . . . . 10 (𝑁 = 2 → (𝑁 − 2) = (2 − 2))
38 2cn 11698 . . . . . . . . . . 11 2 ∈ ℂ
3938subidi 10942 . . . . . . . . . 10 (2 − 2) = 0
4037, 39syl6eq 2875 . . . . . . . . 9 (𝑁 = 2 → (𝑁 − 2) = 0)
4140fveqeq2d 6659 . . . . . . . 8 (𝑁 = 2 → (((2nd𝑤)‘(𝑁 − 2)) = 𝑋 ↔ ((2nd𝑤)‘0) = 𝑋))
4236, 413anbi13d 1435 . . . . . . 7 (𝑁 = 2 → (((♯‘(1st𝑤)) = 𝑁 ∧ ((2nd𝑤)‘0) = 𝑋 ∧ ((2nd𝑤)‘(𝑁 − 2)) = 𝑋) ↔ ((♯‘(1st𝑤)) = 2 ∧ ((2nd𝑤)‘0) = 𝑋 ∧ ((2nd𝑤)‘0) = 𝑋)))
4342rabbidv 3465 . . . . . 6 (𝑁 = 2 → {𝑤 ∈ (ClWalks‘𝐺) ∣ ((♯‘(1st𝑤)) = 𝑁 ∧ ((2nd𝑤)‘0) = 𝑋 ∧ ((2nd𝑤)‘(𝑁 − 2)) = 𝑋)} = {𝑤 ∈ (ClWalks‘𝐺) ∣ ((♯‘(1st𝑤)) = 2 ∧ ((2nd𝑤)‘0) = 𝑋 ∧ ((2nd𝑤)‘0) = 𝑋)})
4435, 43syl5eq 2871 . . . . 5 (𝑁 = 2 → 𝐶 = {𝑤 ∈ (ClWalks‘𝐺) ∣ ((♯‘(1st𝑤)) = 2 ∧ ((2nd𝑤)‘0) = 𝑋 ∧ ((2nd𝑤)‘0) = 𝑋)})
4544fveq2d 6655 . . . 4 (𝑁 = 2 → (♯‘𝐶) = (♯‘{𝑤 ∈ (ClWalks‘𝐺) ∣ ((♯‘(1st𝑤)) = 2 ∧ ((2nd𝑤)‘0) = 𝑋 ∧ ((2nd𝑤)‘0) = 𝑋)}))
46 numclwlk1.f . . . . . . 7 𝐹 = {𝑤 ∈ (ClWalks‘𝐺) ∣ ((♯‘(1st𝑤)) = (𝑁 − 2) ∧ ((2nd𝑤)‘0) = 𝑋)}
4740eqeq2d 2835 . . . . . . . . 9 (𝑁 = 2 → ((♯‘(1st𝑤)) = (𝑁 − 2) ↔ (♯‘(1st𝑤)) = 0))
4847anbi1d 632 . . . . . . . 8 (𝑁 = 2 → (((♯‘(1st𝑤)) = (𝑁 − 2) ∧ ((2nd𝑤)‘0) = 𝑋) ↔ ((♯‘(1st𝑤)) = 0 ∧ ((2nd𝑤)‘0) = 𝑋)))
4948rabbidv 3465 . . . . . . 7 (𝑁 = 2 → {𝑤 ∈ (ClWalks‘𝐺) ∣ ((♯‘(1st𝑤)) = (𝑁 − 2) ∧ ((2nd𝑤)‘0) = 𝑋)} = {𝑤 ∈ (ClWalks‘𝐺) ∣ ((♯‘(1st𝑤)) = 0 ∧ ((2nd𝑤)‘0) = 𝑋)})
5046, 49syl5eq 2871 . . . . . 6 (𝑁 = 2 → 𝐹 = {𝑤 ∈ (ClWalks‘𝐺) ∣ ((♯‘(1st𝑤)) = 0 ∧ ((2nd𝑤)‘0) = 𝑋)})
5150fveq2d 6655 . . . . 5 (𝑁 = 2 → (♯‘𝐹) = (♯‘{𝑤 ∈ (ClWalks‘𝐺) ∣ ((♯‘(1st𝑤)) = 0 ∧ ((2nd𝑤)‘0) = 𝑋)}))
5251oveq2d 7154 . . . 4 (𝑁 = 2 → (𝐾 · (♯‘𝐹)) = (𝐾 · (♯‘{𝑤 ∈ (ClWalks‘𝐺) ∣ ((♯‘(1st𝑤)) = 0 ∧ ((2nd𝑤)‘0) = 𝑋)})))
5345, 52eqeq12d 2840 . . 3 (𝑁 = 2 → ((♯‘𝐶) = (𝐾 · (♯‘𝐹)) ↔ (♯‘{𝑤 ∈ (ClWalks‘𝐺) ∣ ((♯‘(1st𝑤)) = 2 ∧ ((2nd𝑤)‘0) = 𝑋 ∧ ((2nd𝑤)‘0) = 𝑋)}) = (𝐾 · (♯‘{𝑤 ∈ (ClWalks‘𝐺) ∣ ((♯‘(1st𝑤)) = 0 ∧ ((2nd𝑤)‘0) = 𝑋)}))))
5453ad2antll 728 . 2 (((𝑉 ∈ Fin ∧ 𝐺 RegUSGraph 𝐾) ∧ (𝑋𝑉𝑁 = 2)) → ((♯‘𝐶) = (𝐾 · (♯‘𝐹)) ↔ (♯‘{𝑤 ∈ (ClWalks‘𝐺) ∣ ((♯‘(1st𝑤)) = 2 ∧ ((2nd𝑤)‘0) = 𝑋 ∧ ((2nd𝑤)‘0) = 𝑋)}) = (𝐾 · (♯‘{𝑤 ∈ (ClWalks‘𝐺) ∣ ((♯‘(1st𝑤)) = 0 ∧ ((2nd𝑤)‘0) = 𝑋)}))))
5534, 54mpbird 260 1 (((𝑉 ∈ Fin ∧ 𝐺 RegUSGraph 𝐾) ∧ (𝑋𝑉𝑁 = 2)) → (♯‘𝐶) = (𝐾 · (♯‘𝐹)))
 Colors of variables: wff setvar class Syntax hints:   → wi 4   ↔ wb 209   ∧ wa 399   ∧ w3a 1084   = wceq 1538   ∈ wcel 2115   ≠ wne 3013  {crab 3136  Vcvv 3479  ∅c0 4274  {csn 4548  ⟨cop 4554   class class class wbr 5047  ‘cfv 6336  (class class class)co 7138  1st c1st 7670  2nd c2nd 7671  Fincfn 8492  ℝcr 10521  0cc0 10522  1c1 10523   · cmul 10527   − cmin 10855  2c2 11678  ℕ0cn0 11883  ♯chash 13684  Vtxcvtx 26778  USGraphcusgr 26931  FinUSGraphcfusgr 27095   RegUSGraph crusgr 27335  ClWalkscclwlks 27548 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 1912  ax-6 1971  ax-7 2016  ax-8 2117  ax-9 2125  ax-10 2146  ax-11 2162  ax-12 2179  ax-ext 2796  ax-rep 5171  ax-sep 5184  ax-nul 5191  ax-pow 5247  ax-pr 5311  ax-un 7444  ax-cnex 10578  ax-resscn 10579  ax-1cn 10580  ax-icn 10581  ax-addcl 10582  ax-addrcl 10583  ax-mulcl 10584  ax-mulrcl 10585  ax-mulcom 10586  ax-addass 10587  ax-mulass 10588  ax-distr 10589  ax-i2m1 10590  ax-1ne0 10591  ax-1rid 10592  ax-rnegex 10593  ax-rrecex 10594  ax-cnre 10595  ax-pre-lttri 10596  ax-pre-lttrn 10597  ax-pre-ltadd 10598  ax-pre-mulgt0 10599 This theorem depends on definitions:  df-bi 210  df-an 400  df-or 845  df-ifp 1059  df-3or 1085  df-3an 1086  df-tru 1541  df-fal 1551  df-ex 1782  df-nf 1786  df-sb 2071  df-mo 2624  df-eu 2655  df-clab 2803  df-cleq 2817  df-clel 2896  df-nfc 2964  df-ne 3014  df-nel 3118  df-ral 3137  df-rex 3138  df-reu 3139  df-rmo 3140  df-rab 3141  df-v 3481  df-sbc 3758  df-csb 3866  df-dif 3921  df-un 3923  df-in 3925  df-ss 3935  df-pss 3937  df-nul 4275  df-if 4449  df-pw 4522  df-sn 4549  df-pr 4551  df-tp 4553  df-op 4555  df-uni 4820  df-int 4858  df-iun 4902  df-br 5048  df-opab 5110  df-mpt 5128  df-tr 5154  df-id 5441  df-eprel 5446  df-po 5455  df-so 5456  df-fr 5495  df-we 5497  df-xp 5542  df-rel 5543  df-cnv 5544  df-co 5545  df-dm 5546  df-rn 5547  df-res 5548  df-ima 5549  df-pred 6129  df-ord 6175  df-on 6176  df-lim 6177  df-suc 6178  df-iota 6295  df-fun 6338  df-fn 6339  df-f 6340  df-f1 6341  df-fo 6342  df-f1o 6343  df-fv 6344  df-riota 7096  df-ov 7141  df-oprab 7142  df-mpo 7143  df-om 7564  df-1st 7672  df-2nd 7673  df-wrecs 7930  df-recs 7991  df-rdg 8029  df-1o 8085  df-2o 8086  df-oadd 8089  df-er 8272  df-map 8391  df-pm 8392  df-en 8493  df-dom 8494  df-sdom 8495  df-fin 8496  df-dju 9314  df-card 9352  df-pnf 10662  df-mnf 10663  df-xr 10664  df-ltxr 10665  df-le 10666  df-sub 10857  df-neg 10858  df-nn 11624  df-2 11686  df-n0 11884  df-xnn0 11954  df-z 11968  df-uz 12230  df-rp 12376  df-xadd 12494  df-fz 12884  df-fzo 13027  df-seq 13363  df-exp 13424  df-hash 13685  df-word 13856  df-lsw 13904  df-concat 13912  df-s1 13939  df-substr 13992  df-pfx 14022  df-vtx 26780  df-iedg 26781  df-edg 26830  df-uhgr 26840  df-ushgr 26841  df-upgr 26864  df-umgr 26865  df-uspgr 26932  df-usgr 26933  df-fusgr 27096  df-nbgr 27112  df-vtxdg 27245  df-rgr 27336  df-rusgr 27337  df-wlks 27378  df-clwlks 27549  df-wwlks 27605  df-wwlksn 27606  df-clwwlk 27756  df-clwwlkn 27799  df-clwwlknon 27862 This theorem is referenced by:  numclwlk1  28145
 Copyright terms: Public domain W3C validator