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

Theorem numclwwlk2 26428
Description: Statement 10 in [Huneke] p. 2: "If n > 1, then the number of closed n-walks v(0) ... v(n-2) v(n-1) v(n) from v = v(0) = v(n) ... with v(n-2) =/= v is k^(n-2) - f(n-2)." According to rusgranumwlkg 26279, we have k^(n-2) different walks of length (n-2): v(0) ... v(n-2). From this number, the number of closed walks of length (n-2), which is f(n-2) per definition, must be subtracted, because for these walks v(n-2) =/= v(0) = v would hold. Because of the friendship condition, there is exactly one vertex v(n-1) which is a neighbor of v(n-2) as well as of v(n)=v=v(0), because v(n-2) and v(n)=v are different, so the number of walks v(0) ... v(n-2) is identical with the number of walks v(0) ... v(n), that means each (not closed) walk v(0) ... v(n-2) can be extended by two edges to a closed walk v(0) ... v(n)=v=v(0) in exactly one way. (Contributed by Alexander van der Vekens, 6-Oct-2018.)
Hypotheses
Ref Expression
numclwwlk.c 𝐶 = (𝑛 ∈ ℕ0 ↦ ((𝑉 ClWWalksN 𝐸)‘𝑛))
numclwwlk.f 𝐹 = (𝑣𝑉, 𝑛 ∈ ℕ0 ↦ {𝑤 ∈ (𝐶𝑛) ∣ (𝑤‘0) = 𝑣})
numclwwlk.g 𝐺 = (𝑣𝑉, 𝑛 ∈ (ℤ‘2) ↦ {𝑤 ∈ (𝐶𝑛) ∣ ((𝑤‘0) = 𝑣 ∧ (𝑤‘(𝑛 − 2)) = (𝑤‘0))})
numclwwlk.q 𝑄 = (𝑣𝑉, 𝑛 ∈ ℕ0 ↦ {𝑤 ∈ ((𝑉 WWalksN 𝐸)‘𝑛) ∣ ((𝑤‘0) = 𝑣 ∧ ( lastS ‘𝑤) ≠ 𝑣)})
numclwwlk.h 𝐻 = (𝑣𝑉, 𝑛 ∈ ℕ0 ↦ {𝑤 ∈ (𝐶𝑛) ∣ ((𝑤‘0) = 𝑣 ∧ (𝑤‘(𝑛 − 2)) ≠ (𝑤‘0))})
Assertion
Ref Expression
numclwwlk2 (((⟨𝑉, 𝐸⟩ RegUSGrph 𝐾𝑉 FriendGrph 𝐸) ∧ (𝑉 ∈ Fin ∧ 𝑋𝑉𝑁 ∈ (ℤ‘3))) → (#‘(𝑋𝐻𝑁)) = ((𝐾↑(𝑁 − 2)) − (#‘(𝑋𝐹(𝑁 − 2)))))
Distinct variable groups:   𝑛,𝐸   𝑛,𝑁   𝑛,𝑉   𝑤,𝐶   𝑤,𝑁   𝐶,𝑛,𝑣,𝑤   𝑣,𝑁   𝑛,𝑋,𝑣,𝑤   𝑣,𝑉   𝑤,𝐸   𝑤,𝑉   𝑤,𝐹   𝑤,𝑄   𝑤,𝐾   𝑤,𝐺   𝑣,𝐸   𝑣,𝐻,𝑤
Allowed substitution hints:   𝑄(𝑣,𝑛)   𝐹(𝑣,𝑛)   𝐺(𝑣,𝑛)   𝐻(𝑛)   𝐾(𝑣,𝑛)

Proof of Theorem numclwwlk2
StepHypRef Expression
1 eluzelcn 11534 . . . . . . . 8 (𝑁 ∈ (ℤ‘3) → 𝑁 ∈ ℂ)
2 2cnd 10943 . . . . . . . 8 (𝑁 ∈ (ℤ‘3) → 2 ∈ ℂ)
31, 2npcand 10248 . . . . . . 7 (𝑁 ∈ (ℤ‘3) → ((𝑁 − 2) + 2) = 𝑁)
43eqcomd 2615 . . . . . 6 (𝑁 ∈ (ℤ‘3) → 𝑁 = ((𝑁 − 2) + 2))
543ad2ant3 1076 . . . . 5 ((𝑉 ∈ Fin ∧ 𝑋𝑉𝑁 ∈ (ℤ‘3)) → 𝑁 = ((𝑁 − 2) + 2))
65adantl 480 . . . 4 (((⟨𝑉, 𝐸⟩ RegUSGrph 𝐾𝑉 FriendGrph 𝐸) ∧ (𝑉 ∈ Fin ∧ 𝑋𝑉𝑁 ∈ (ℤ‘3))) → 𝑁 = ((𝑁 − 2) + 2))
76oveq2d 6543 . . 3 (((⟨𝑉, 𝐸⟩ RegUSGrph 𝐾𝑉 FriendGrph 𝐸) ∧ (𝑉 ∈ Fin ∧ 𝑋𝑉𝑁 ∈ (ℤ‘3))) → (𝑋𝐻𝑁) = (𝑋𝐻((𝑁 − 2) + 2)))
87fveq2d 6092 . 2 (((⟨𝑉, 𝐸⟩ RegUSGrph 𝐾𝑉 FriendGrph 𝐸) ∧ (𝑉 ∈ Fin ∧ 𝑋𝑉𝑁 ∈ (ℤ‘3))) → (#‘(𝑋𝐻𝑁)) = (#‘(𝑋𝐻((𝑁 − 2) + 2))))
9 simplr 787 . . 3 (((⟨𝑉, 𝐸⟩ RegUSGrph 𝐾𝑉 FriendGrph 𝐸) ∧ (𝑉 ∈ Fin ∧ 𝑋𝑉𝑁 ∈ (ℤ‘3))) → 𝑉 FriendGrph 𝐸)
10 simp2 1054 . . . 4 ((𝑉 ∈ Fin ∧ 𝑋𝑉𝑁 ∈ (ℤ‘3)) → 𝑋𝑉)
1110adantl 480 . . 3 (((⟨𝑉, 𝐸⟩ RegUSGrph 𝐾𝑉 FriendGrph 𝐸) ∧ (𝑉 ∈ Fin ∧ 𝑋𝑉𝑁 ∈ (ℤ‘3))) → 𝑋𝑉)
12 uz3m2nn 11566 . . . . 5 (𝑁 ∈ (ℤ‘3) → (𝑁 − 2) ∈ ℕ)
13123ad2ant3 1076 . . . 4 ((𝑉 ∈ Fin ∧ 𝑋𝑉𝑁 ∈ (ℤ‘3)) → (𝑁 − 2) ∈ ℕ)
1413adantl 480 . . 3 (((⟨𝑉, 𝐸⟩ RegUSGrph 𝐾𝑉 FriendGrph 𝐸) ∧ (𝑉 ∈ Fin ∧ 𝑋𝑉𝑁 ∈ (ℤ‘3))) → (𝑁 − 2) ∈ ℕ)
15 numclwwlk.c . . . 4 𝐶 = (𝑛 ∈ ℕ0 ↦ ((𝑉 ClWWalksN 𝐸)‘𝑛))
16 numclwwlk.f . . . 4 𝐹 = (𝑣𝑉, 𝑛 ∈ ℕ0 ↦ {𝑤 ∈ (𝐶𝑛) ∣ (𝑤‘0) = 𝑣})
17 numclwwlk.g . . . 4 𝐺 = (𝑣𝑉, 𝑛 ∈ (ℤ‘2) ↦ {𝑤 ∈ (𝐶𝑛) ∣ ((𝑤‘0) = 𝑣 ∧ (𝑤‘(𝑛 − 2)) = (𝑤‘0))})
18 numclwwlk.q . . . 4 𝑄 = (𝑣𝑉, 𝑛 ∈ ℕ0 ↦ {𝑤 ∈ ((𝑉 WWalksN 𝐸)‘𝑛) ∣ ((𝑤‘0) = 𝑣 ∧ ( lastS ‘𝑤) ≠ 𝑣)})
19 numclwwlk.h . . . 4 𝐻 = (𝑣𝑉, 𝑛 ∈ ℕ0 ↦ {𝑤 ∈ (𝐶𝑛) ∣ ((𝑤‘0) = 𝑣 ∧ (𝑤‘(𝑛 − 2)) ≠ (𝑤‘0))})
2015, 16, 17, 18, 19numclwwlk2lem3 26427 . . 3 ((𝑉 FriendGrph 𝐸𝑋𝑉 ∧ (𝑁 − 2) ∈ ℕ) → (#‘(𝑋𝑄(𝑁 − 2))) = (#‘(𝑋𝐻((𝑁 − 2) + 2))))
219, 11, 14, 20syl3anc 1317 . 2 (((⟨𝑉, 𝐸⟩ RegUSGrph 𝐾𝑉 FriendGrph 𝐸) ∧ (𝑉 ∈ Fin ∧ 𝑋𝑉𝑁 ∈ (ℤ‘3))) → (#‘(𝑋𝑄(𝑁 − 2))) = (#‘(𝑋𝐻((𝑁 − 2) + 2))))
22 simpl 471 . . . 4 ((⟨𝑉, 𝐸⟩ RegUSGrph 𝐾𝑉 FriendGrph 𝐸) → ⟨𝑉, 𝐸⟩ RegUSGrph 𝐾)
23 simp1 1053 . . . 4 ((𝑉 ∈ Fin ∧ 𝑋𝑉𝑁 ∈ (ℤ‘3)) → 𝑉 ∈ Fin)
2422, 23anim12i 587 . . 3 (((⟨𝑉, 𝐸⟩ RegUSGrph 𝐾𝑉 FriendGrph 𝐸) ∧ (𝑉 ∈ Fin ∧ 𝑋𝑉𝑁 ∈ (ℤ‘3))) → (⟨𝑉, 𝐸⟩ RegUSGrph 𝐾𝑉 ∈ Fin))
2510, 13jca 552 . . . 4 ((𝑉 ∈ Fin ∧ 𝑋𝑉𝑁 ∈ (ℤ‘3)) → (𝑋𝑉 ∧ (𝑁 − 2) ∈ ℕ))
2625adantl 480 . . 3 (((⟨𝑉, 𝐸⟩ RegUSGrph 𝐾𝑉 FriendGrph 𝐸) ∧ (𝑉 ∈ Fin ∧ 𝑋𝑉𝑁 ∈ (ℤ‘3))) → (𝑋𝑉 ∧ (𝑁 − 2) ∈ ℕ))
2715, 16, 17, 18numclwwlkqhash 26421 . . 3 (((⟨𝑉, 𝐸⟩ RegUSGrph 𝐾𝑉 ∈ Fin) ∧ (𝑋𝑉 ∧ (𝑁 − 2) ∈ ℕ)) → (#‘(𝑋𝑄(𝑁 − 2))) = ((𝐾↑(𝑁 − 2)) − (#‘(𝑋𝐹(𝑁 − 2)))))
2824, 26, 27syl2anc 690 . 2 (((⟨𝑉, 𝐸⟩ RegUSGrph 𝐾𝑉 FriendGrph 𝐸) ∧ (𝑉 ∈ Fin ∧ 𝑋𝑉𝑁 ∈ (ℤ‘3))) → (#‘(𝑋𝑄(𝑁 − 2))) = ((𝐾↑(𝑁 − 2)) − (#‘(𝑋𝐹(𝑁 − 2)))))
298, 21, 283eqtr2d 2649 1 (((⟨𝑉, 𝐸⟩ RegUSGrph 𝐾𝑉 FriendGrph 𝐸) ∧ (𝑉 ∈ Fin ∧ 𝑋𝑉𝑁 ∈ (ℤ‘3))) → (#‘(𝑋𝐻𝑁)) = ((𝐾↑(𝑁 − 2)) − (#‘(𝑋𝐹(𝑁 − 2)))))
Colors of variables: wff setvar class
Syntax hints:  wi 4  wa 382  w3a 1030   = wceq 1474  wcel 1976  wne 2779  {crab 2899  cop 4130   class class class wbr 4577  cmpt 4637  cfv 5790  (class class class)co 6527  cmpt2 6529  Fincfn 7819  0cc0 9793   + caddc 9796  cmin 10118  cn 10870  2c2 10920  3c3 10921  0cn0 11142  cuz 11522  cexp 12680  #chash 12937   lastS clsw 13096   WWalksN cwwlkn 26000   ClWWalksN cclwwlkn 26071   RegUSGrph crusgra 26244   FriendGrph cfrgra 26309
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1712  ax-4 1727  ax-5 1826  ax-6 1874  ax-7 1921  ax-8 1978  ax-9 1985  ax-10 2005  ax-11 2020  ax-12 2033  ax-13 2233  ax-ext 2589  ax-rep 4693  ax-sep 4703  ax-nul 4712  ax-pow 4764  ax-pr 4828  ax-un 6825  ax-inf2 8399  ax-cnex 9849  ax-resscn 9850  ax-1cn 9851  ax-icn 9852  ax-addcl 9853  ax-addrcl 9854  ax-mulcl 9855  ax-mulrcl 9856  ax-mulcom 9857  ax-addass 9858  ax-mulass 9859  ax-distr 9860  ax-i2m1 9861  ax-1ne0 9862  ax-1rid 9863  ax-rnegex 9864  ax-rrecex 9865  ax-cnre 9866  ax-pre-lttri 9867  ax-pre-lttrn 9868  ax-pre-ltadd 9869  ax-pre-mulgt0 9870  ax-pre-sup 9871
This theorem depends on definitions:  df-bi 195  df-or 383  df-an 384  df-3or 1031  df-3an 1032  df-tru 1477  df-fal 1480  df-ex 1695  df-nf 1700  df-sb 1867  df-eu 2461  df-mo 2462  df-clab 2596  df-cleq 2602  df-clel 2605  df-nfc 2739  df-ne 2781  df-nel 2782  df-ral 2900  df-rex 2901  df-reu 2902  df-rmo 2903  df-rab 2904  df-v 3174  df-sbc 3402  df-csb 3499  df-dif 3542  df-un 3544  df-in 3546  df-ss 3553  df-pss 3555  df-nul 3874  df-if 4036  df-pw 4109  df-sn 4125  df-pr 4127  df-tp 4129  df-op 4131  df-uni 4367  df-int 4405  df-iun 4451  df-disj 4548  df-br 4578  df-opab 4638  df-mpt 4639  df-tr 4675  df-eprel 4939  df-id 4943  df-po 4949  df-so 4950  df-fr 4987  df-se 4988  df-we 4989  df-xp 5034  df-rel 5035  df-cnv 5036  df-co 5037  df-dm 5038  df-rn 5039  df-res 5040  df-ima 5041  df-pred 5583  df-ord 5629  df-on 5630  df-lim 5631  df-suc 5632  df-iota 5754  df-fun 5792  df-fn 5793  df-f 5794  df-f1 5795  df-fo 5796  df-f1o 5797  df-fv 5798  df-isom 5799  df-riota 6489  df-ov 6530  df-oprab 6531  df-mpt2 6532  df-om 6936  df-1st 7037  df-2nd 7038  df-wrecs 7272  df-recs 7333  df-rdg 7371  df-1o 7425  df-2o 7426  df-oadd 7429  df-er 7607  df-map 7724  df-pm 7725  df-en 7820  df-dom 7821  df-sdom 7822  df-fin 7823  df-sup 8209  df-oi 8276  df-card 8626  df-cda 8851  df-pnf 9933  df-mnf 9934  df-xr 9935  df-ltxr 9936  df-le 9937  df-sub 10120  df-neg 10121  df-div 10537  df-nn 10871  df-2 10929  df-3 10930  df-n0 11143  df-z 11214  df-uz 11523  df-rp 11668  df-xadd 11782  df-fz 12156  df-fzo 12293  df-seq 12622  df-exp 12681  df-hash 12938  df-word 13103  df-lsw 13104  df-concat 13105  df-s1 13106  df-substr 13107  df-cj 13636  df-re 13637  df-im 13638  df-sqrt 13772  df-abs 13773  df-clim 14016  df-sum 14214  df-usgra 25656  df-nbgra 25743  df-wlk 25830  df-wwlk 26001  df-wwlkn 26002  df-clwwlk 26073  df-clwwlkn 26074  df-vdgr 26215  df-rgra 26245  df-rusgra 26246  df-frgra 26310
This theorem is referenced by:  numclwwlk3  26430
  Copyright terms: Public domain W3C validator