MPE Home Metamath Proof Explorer < Previous   Next >
Nearby theorems
Mirrors  >  Home  >  MPE Home  >  Th. List  >  numclwwlk3 Structured version   Unicode version

Theorem numclwwlk3 25682
Description: Statement 12 in [Huneke] p. 2: "Thus f(n) = (k - 1)f(n - 2) + k^(n-2)." - the number of the closed walks v(0) ... v(n-2) v(n-1) v(n) is the sum of the number of the closed walks v(0) ... v(n-2) v(n-1) v(n) with v(n-2) = v(n) (see numclwwlk1 25671) and with v(n-2) =/= v(n) ( see numclwwlk2 25680): f(n) = kf(n-2) + k^(n-2) - f(n-2) = (k - 1)f(n - 2) + k^(n-2) (Contributed by Alexander van der Vekens, 26-Aug-2018.)
Hypotheses
Ref Expression
numclwwlk.c  |-  C  =  ( n  e.  NN0  |->  ( ( V ClWWalksN  E ) `
 n ) )
numclwwlk.f  |-  F  =  ( v  e.  V ,  n  e.  NN0  |->  { w  e.  ( C `  n )  |  ( w ` 
0 )  =  v } )
numclwwlk.g  |-  G  =  ( v  e.  V ,  n  e.  ( ZZ>=
`  2 )  |->  { w  e.  ( C `
 n )  |  ( ( w ` 
0 )  =  v  /\  ( w `  ( n  -  2
) )  =  ( w `  0 ) ) } )
numclwwlk.q  |-  Q  =  ( v  e.  V ,  n  e.  NN0  |->  { w  e.  (
( V WWalksN  E ) `  n )  |  ( ( w `  0
)  =  v  /\  ( lastS  `  w )  =/=  v ) } )
numclwwlk.h  |-  H  =  ( v  e.  V ,  n  e.  NN0  |->  { w  e.  ( C `  n )  |  ( ( w `
 0 )  =  v  /\  ( w `
 ( n  - 
2 ) )  =/=  ( w `  0
) ) } )
Assertion
Ref Expression
numclwwlk3  |-  ( ( ( <. V ,  E >. RegUSGrph  K  /\  V FriendGrph  E )  /\  ( V  e.  Fin  /\  X  e.  V  /\  N  e.  ( ZZ>= ` 
3 ) ) )  ->  ( # `  ( X F N ) )  =  ( ( ( K  -  1 )  x.  ( # `  ( X F ( N  - 
2 ) ) ) )  +  ( K ^ ( N  - 
2 ) ) ) )
Distinct variable groups:    n, E    n, N    n, V    w, C    w, N    C, n, v, w    v, N    n, X, v, w    v, V   
w, E    w, V    w, F    w, Q    w, K    w, G    v, E    v, H, w
Allowed substitution hints:    Q( v, n)    F( v, n)    G( v, n)    H( n)    K( v, n)

Proof of Theorem numclwwlk3
Dummy variable  u is distinct from all other variables.
StepHypRef Expression
1 rusisusgra 25504 . . . 4  |-  ( <. V ,  E >. RegUSGrph  K  ->  V USGrph  E )
21ad2antrr 730 . . 3  |-  ( ( ( <. V ,  E >. RegUSGrph  K  /\  V FriendGrph  E )  /\  ( V  e.  Fin  /\  X  e.  V  /\  N  e.  ( ZZ>= ` 
3 ) ) )  ->  V USGrph  E )
3 simp1 1005 . . . 4  |-  ( ( V  e.  Fin  /\  X  e.  V  /\  N  e.  ( ZZ>= ` 
3 ) )  ->  V  e.  Fin )
43adantl 467 . . 3  |-  ( ( ( <. V ,  E >. RegUSGrph  K  /\  V FriendGrph  E )  /\  ( V  e.  Fin  /\  X  e.  V  /\  N  e.  ( ZZ>= ` 
3 ) ) )  ->  V  e.  Fin )
5 simp2 1006 . . . 4  |-  ( ( V  e.  Fin  /\  X  e.  V  /\  N  e.  ( ZZ>= ` 
3 ) )  ->  X  e.  V )
65adantl 467 . . 3  |-  ( ( ( <. V ,  E >. RegUSGrph  K  /\  V FriendGrph  E )  /\  ( V  e.  Fin  /\  X  e.  V  /\  N  e.  ( ZZ>= ` 
3 ) ) )  ->  X  e.  V
)
7 uzuzle23 11199 . . . . 5  |-  ( N  e.  ( ZZ>= `  3
)  ->  N  e.  ( ZZ>= `  2 )
)
873ad2ant3 1028 . . . 4  |-  ( ( V  e.  Fin  /\  X  e.  V  /\  N  e.  ( ZZ>= ` 
3 ) )  ->  N  e.  ( ZZ>= ` 
2 ) )
98adantl 467 . . 3  |-  ( ( ( <. V ,  E >. RegUSGrph  K  /\  V FriendGrph  E )  /\  ( V  e.  Fin  /\  X  e.  V  /\  N  e.  ( ZZ>= ` 
3 ) ) )  ->  N  e.  (
ZZ>= `  2 ) )
10 numclwwlk.c . . . 4  |-  C  =  ( n  e.  NN0  |->  ( ( V ClWWalksN  E ) `
 n ) )
11 numclwwlk.f . . . 4  |-  F  =  ( v  e.  V ,  n  e.  NN0  |->  { w  e.  ( C `  n )  |  ( w ` 
0 )  =  v } )
12 numclwwlk.g . . . 4  |-  G  =  ( v  e.  V ,  n  e.  ( ZZ>=
`  2 )  |->  { w  e.  ( C `
 n )  |  ( ( w ` 
0 )  =  v  /\  ( w `  ( n  -  2
) )  =  ( w `  0 ) ) } )
13 numclwwlk.q . . . 4  |-  Q  =  ( v  e.  V ,  n  e.  NN0  |->  { w  e.  (
( V WWalksN  E ) `  n )  |  ( ( w `  0
)  =  v  /\  ( lastS  `  w )  =/=  v ) } )
14 numclwwlk.h . . . 4  |-  H  =  ( v  e.  V ,  n  e.  NN0  |->  { w  e.  ( C `  n )  |  ( ( w `
 0 )  =  v  /\  ( w `
 ( n  - 
2 ) )  =/=  ( w `  0
) ) } )
1510, 11, 12, 13, 14numclwwlk3lem 25681 . . 3  |-  ( ( ( V USGrph  E  /\  V  e.  Fin  /\  X  e.  V )  /\  N  e.  ( ZZ>= `  2 )
)  ->  ( # `  ( X F N ) )  =  ( ( # `  ( X H N ) )  +  (
# `  ( X G N ) ) ) )
162, 4, 6, 9, 15syl31anc 1267 . 2  |-  ( ( ( <. V ,  E >. RegUSGrph  K  /\  V FriendGrph  E )  /\  ( V  e.  Fin  /\  X  e.  V  /\  N  e.  ( ZZ>= ` 
3 ) ) )  ->  ( # `  ( X F N ) )  =  ( ( # `  ( X H N ) )  +  (
# `  ( X G N ) ) ) )
1710, 11, 12, 13, 14numclwwlk2 25680 . . 3  |-  ( ( ( <. V ,  E >. RegUSGrph  K  /\  V FriendGrph  E )  /\  ( V  e.  Fin  /\  X  e.  V  /\  N  e.  ( ZZ>= ` 
3 ) ) )  ->  ( # `  ( X H N ) )  =  ( ( K ^ ( N  - 
2 ) )  -  ( # `  ( X F ( N  - 
2 ) ) ) ) )
18 simpl 458 . . . . 5  |-  ( (
<. V ,  E >. RegUSGrph  K  /\  V FriendGrph  E )  ->  <. V ,  E >. RegUSGrph  K
)
1918, 3anim12ci 569 . . . 4  |-  ( ( ( <. V ,  E >. RegUSGrph  K  /\  V FriendGrph  E )  /\  ( V  e.  Fin  /\  X  e.  V  /\  N  e.  ( ZZ>= ` 
3 ) ) )  ->  ( V  e. 
Fin  /\  <. V ,  E >. RegUSGrph  K ) )
20 3simpc 1004 . . . . 5  |-  ( ( V  e.  Fin  /\  X  e.  V  /\  N  e.  ( ZZ>= ` 
3 ) )  -> 
( X  e.  V  /\  N  e.  ( ZZ>=
`  3 ) ) )
2120adantl 467 . . . 4  |-  ( ( ( <. V ,  E >. RegUSGrph  K  /\  V FriendGrph  E )  /\  ( V  e.  Fin  /\  X  e.  V  /\  N  e.  ( ZZ>= ` 
3 ) ) )  ->  ( X  e.  V  /\  N  e.  ( ZZ>= `  3 )
) )
2210, 11, 12numclwwlk1 25671 . . . 4  |-  ( ( ( V  e.  Fin  /\ 
<. V ,  E >. RegUSGrph  K
)  /\  ( X  e.  V  /\  N  e.  ( ZZ>= `  3 )
) )  ->  ( # `
 ( X G N ) )  =  ( K  x.  ( # `
 ( X F ( N  -  2 ) ) ) ) )
2319, 21, 22syl2anc 665 . . 3  |-  ( ( ( <. V ,  E >. RegUSGrph  K  /\  V FriendGrph  E )  /\  ( V  e.  Fin  /\  X  e.  V  /\  N  e.  ( ZZ>= ` 
3 ) ) )  ->  ( # `  ( X G N ) )  =  ( K  x.  ( # `  ( X F ( N  - 
2 ) ) ) ) )
2417, 23oveq12d 6323 . 2  |-  ( ( ( <. V ,  E >. RegUSGrph  K  /\  V FriendGrph  E )  /\  ( V  e.  Fin  /\  X  e.  V  /\  N  e.  ( ZZ>= ` 
3 ) ) )  ->  ( ( # `  ( X H N ) )  +  (
# `  ( X G N ) ) )  =  ( ( ( K ^ ( N  -  2 ) )  -  ( # `  ( X F ( N  - 
2 ) ) ) )  +  ( K  x.  ( # `  ( X F ( N  - 
2 ) ) ) ) ) )
25 rusgraprop 25502 . . . . 5  |-  ( <. V ,  E >. RegUSGrph  K  ->  ( V USGrph  E  /\  K  e.  NN0  /\  A. u  e.  V  (
( V VDeg  E ) `  u )  =  K ) )
26 nn0cn 10879 . . . . . 6  |-  ( K  e.  NN0  ->  K  e.  CC )
27263ad2ant2 1027 . . . . 5  |-  ( ( V USGrph  E  /\  K  e. 
NN0  /\  A. u  e.  V  ( ( V VDeg  E ) `  u
)  =  K )  ->  K  e.  CC )
2825, 27syl 17 . . . 4  |-  ( <. V ,  E >. RegUSGrph  K  ->  K  e.  CC )
2928ad2antrr 730 . . 3  |-  ( ( ( <. V ,  E >. RegUSGrph  K  /\  V FriendGrph  E )  /\  ( V  e.  Fin  /\  X  e.  V  /\  N  e.  ( ZZ>= ` 
3 ) ) )  ->  K  e.  CC )
30 usgrav 24911 . . . . . . . . 9  |-  ( V USGrph  E  ->  ( V  e. 
_V  /\  E  e.  _V ) )
3130simprd 464 . . . . . . . 8  |-  ( V USGrph  E  ->  E  e.  _V )
321, 31syl 17 . . . . . . 7  |-  ( <. V ,  E >. RegUSGrph  K  ->  E  e.  _V )
3332adantr 466 . . . . . 6  |-  ( (
<. V ,  E >. RegUSGrph  K  /\  V FriendGrph  E )  ->  E  e.  _V )
3433, 3anim12ci 569 . . . . 5  |-  ( ( ( <. V ,  E >. RegUSGrph  K  /\  V FriendGrph  E )  /\  ( V  e.  Fin  /\  X  e.  V  /\  N  e.  ( ZZ>= ` 
3 ) ) )  ->  ( V  e. 
Fin  /\  E  e.  _V ) )
35 uz3m2nn 11201 . . . . . . . . 9  |-  ( N  e.  ( ZZ>= `  3
)  ->  ( N  -  2 )  e.  NN )
3635nnnn0d 10925 . . . . . . . 8  |-  ( N  e.  ( ZZ>= `  3
)  ->  ( N  -  2 )  e. 
NN0 )
37363ad2ant3 1028 . . . . . . 7  |-  ( ( V  e.  Fin  /\  X  e.  V  /\  N  e.  ( ZZ>= ` 
3 ) )  -> 
( N  -  2 )  e.  NN0 )
385, 37jca 534 . . . . . 6  |-  ( ( V  e.  Fin  /\  X  e.  V  /\  N  e.  ( ZZ>= ` 
3 ) )  -> 
( X  e.  V  /\  ( N  -  2 )  e.  NN0 )
)
3938adantl 467 . . . . 5  |-  ( ( ( <. V ,  E >. RegUSGrph  K  /\  V FriendGrph  E )  /\  ( V  e.  Fin  /\  X  e.  V  /\  N  e.  ( ZZ>= ` 
3 ) ) )  ->  ( X  e.  V  /\  ( N  -  2 )  e. 
NN0 ) )
4010, 11numclwwlkffin 25655 . . . . 5  |-  ( ( ( V  e.  Fin  /\  E  e.  _V )  /\  ( X  e.  V  /\  ( N  -  2 )  e.  NN0 )
)  ->  ( X F ( N  - 
2 ) )  e. 
Fin )
4134, 39, 40syl2anc 665 . . . 4  |-  ( ( ( <. V ,  E >. RegUSGrph  K  /\  V FriendGrph  E )  /\  ( V  e.  Fin  /\  X  e.  V  /\  N  e.  ( ZZ>= ` 
3 ) ) )  ->  ( X F ( N  -  2 ) )  e.  Fin )
42 hashcl 12535 . . . . 5  |-  ( ( X F ( N  -  2 ) )  e.  Fin  ->  ( # `
 ( X F ( N  -  2 ) ) )  e. 
NN0 )
4342nn0cnd 10927 . . . 4  |-  ( ( X F ( N  -  2 ) )  e.  Fin  ->  ( # `
 ( X F ( N  -  2 ) ) )  e.  CC )
4441, 43syl 17 . . 3  |-  ( ( ( <. V ,  E >. RegUSGrph  K  /\  V FriendGrph  E )  /\  ( V  e.  Fin  /\  X  e.  V  /\  N  e.  ( ZZ>= ` 
3 ) ) )  ->  ( # `  ( X F ( N  - 
2 ) ) )  e.  CC )
45 numclwlk3lem3 25646 . . 3  |-  ( ( K  e.  CC  /\  ( # `  ( X F ( N  - 
2 ) ) )  e.  CC  /\  N  e.  ( ZZ>= `  2 )
)  ->  ( (
( K ^ ( N  -  2 ) )  -  ( # `  ( X F ( N  -  2 ) ) ) )  +  ( K  x.  ( # `
 ( X F ( N  -  2 ) ) ) ) )  =  ( ( ( K  -  1 )  x.  ( # `  ( X F ( N  -  2 ) ) ) )  +  ( K ^ ( N  -  2 ) ) ) )
4629, 44, 9, 45syl3anc 1264 . 2  |-  ( ( ( <. V ,  E >. RegUSGrph  K  /\  V FriendGrph  E )  /\  ( V  e.  Fin  /\  X  e.  V  /\  N  e.  ( ZZ>= ` 
3 ) ) )  ->  ( ( ( K ^ ( N  -  2 ) )  -  ( # `  ( X F ( N  - 
2 ) ) ) )  +  ( K  x.  ( # `  ( X F ( N  - 
2 ) ) ) ) )  =  ( ( ( K  - 
1 )  x.  ( # `
 ( X F ( N  -  2 ) ) ) )  +  ( K ^
( N  -  2 ) ) ) )
4716, 24, 463eqtrd 2474 1  |-  ( ( ( <. V ,  E >. RegUSGrph  K  /\  V FriendGrph  E )  /\  ( V  e.  Fin  /\  X  e.  V  /\  N  e.  ( ZZ>= ` 
3 ) ) )  ->  ( # `  ( X F N ) )  =  ( ( ( K  -  1 )  x.  ( # `  ( X F ( N  - 
2 ) ) ) )  +  ( K ^ ( N  - 
2 ) ) ) )
Colors of variables: wff setvar class
Syntax hints:    -> wi 4    /\ wa 370    /\ w3a 982    = wceq 1437    e. wcel 1870    =/= wne 2625   A.wral 2782   {crab 2786   _Vcvv 3087   <.cop 4008   class class class wbr 4426    |-> cmpt 4484   ` cfv 5601  (class class class)co 6305    |-> cmpt2 6307   Fincfn 7577   CCcc 9536   0cc0 9538   1c1 9539    + caddc 9541    x. cmul 9543    - cmin 9859   2c2 10659   3c3 10660   NN0cn0 10869   ZZ>=cuz 11159   ^cexp 12269   #chash 12512   lastS clsw 12644   USGrph cusg 24903   WWalksN cwwlkn 25251   ClWWalksN cclwwlkn 25322   VDeg cvdg 25466   RegUSGrph crusgra 25496   FriendGrph cfrgra 25561
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1665  ax-4 1678  ax-5 1751  ax-6 1797  ax-7 1841  ax-8 1872  ax-9 1874  ax-10 1889  ax-11 1894  ax-12 1907  ax-13 2055  ax-ext 2407  ax-rep 4538  ax-sep 4548  ax-nul 4556  ax-pow 4603  ax-pr 4661  ax-un 6597  ax-inf2 8146  ax-cnex 9594  ax-resscn 9595  ax-1cn 9596  ax-icn 9597  ax-addcl 9598  ax-addrcl 9599  ax-mulcl 9600  ax-mulrcl 9601  ax-mulcom 9602  ax-addass 9603  ax-mulass 9604  ax-distr 9605  ax-i2m1 9606  ax-1ne0 9607  ax-1rid 9608  ax-rnegex 9609  ax-rrecex 9610  ax-cnre 9611  ax-pre-lttri 9612  ax-pre-lttrn 9613  ax-pre-ltadd 9614  ax-pre-mulgt0 9615  ax-pre-sup 9616
This theorem depends on definitions:  df-bi 188  df-or 371  df-an 372  df-3or 983  df-3an 984  df-tru 1440  df-fal 1443  df-ex 1660  df-nf 1664  df-sb 1790  df-eu 2270  df-mo 2271  df-clab 2415  df-cleq 2421  df-clel 2424  df-nfc 2579  df-ne 2627  df-nel 2628  df-ral 2787  df-rex 2788  df-reu 2789  df-rmo 2790  df-rab 2791  df-v 3089  df-sbc 3306  df-csb 3402  df-dif 3445  df-un 3447  df-in 3449  df-ss 3456  df-pss 3458  df-nul 3768  df-if 3916  df-pw 3987  df-sn 4003  df-pr 4005  df-tp 4007  df-op 4009  df-uni 4223  df-int 4259  df-iun 4304  df-disj 4398  df-br 4427  df-opab 4485  df-mpt 4486  df-tr 4521  df-eprel 4765  df-id 4769  df-po 4775  df-so 4776  df-fr 4813  df-se 4814  df-we 4815  df-xp 4860  df-rel 4861  df-cnv 4862  df-co 4863  df-dm 4864  df-rn 4865  df-res 4866  df-ima 4867  df-pred 5399  df-ord 5445  df-on 5446  df-lim 5447  df-suc 5448  df-iota 5565  df-fun 5603  df-fn 5604  df-f 5605  df-f1 5606  df-fo 5607  df-f1o 5608  df-fv 5609  df-isom 5610  df-riota 6267  df-ov 6308  df-oprab 6309  df-mpt2 6310  df-om 6707  df-1st 6807  df-2nd 6808  df-wrecs 7036  df-recs 7098  df-rdg 7136  df-1o 7190  df-2o 7191  df-oadd 7194  df-er 7371  df-map 7482  df-pm 7483  df-en 7578  df-dom 7579  df-sdom 7580  df-fin 7581  df-sup 7962  df-oi 8025  df-card 8372  df-cda 8596  df-pnf 9676  df-mnf 9677  df-xr 9678  df-ltxr 9679  df-le 9680  df-sub 9861  df-neg 9862  df-div 10269  df-nn 10610  df-2 10668  df-3 10669  df-n0 10870  df-z 10938  df-uz 11160  df-rp 11303  df-xadd 11410  df-fz 11783  df-fzo 11914  df-seq 12211  df-exp 12270  df-hash 12513  df-word 12651  df-lsw 12652  df-concat 12653  df-s1 12654  df-substr 12655  df-s2 12929  df-cj 13141  df-re 13142  df-im 13143  df-sqrt 13277  df-abs 13278  df-clim 13530  df-sum 13731  df-usgra 24906  df-nbgra 24993  df-wlk 25081  df-wwlk 25252  df-wwlkn 25253  df-clwwlk 25324  df-clwwlkn 25325  df-vdgr 25467  df-rgra 25497  df-rusgra 25498  df-frgra 25562
This theorem is referenced by:  numclwwlk5  25685
  Copyright terms: Public domain W3C validator