Users' Mathboxes Mathbox for Alexander van der Vekens < Previous   Next >
Nearby theorems
Mirrors  >  Home  >  MPE Home  >  Th. List  >   Mathboxes  >  numclwwlk3 Structured version   Unicode version

Theorem numclwwlk3 30843
Description: Huneke: "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 30832) and with v(n-2) =/= v(n) ( see numclwwlk2 30841): 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 30689 . . . 4  |-  ( <. V ,  E >. RegUSGrph  K  ->  V USGrph  E )
21ad2antrr 725 . . 3  |-  ( ( ( <. V ,  E >. RegUSGrph  K  /\  V FriendGrph  E )  /\  ( V  e.  Fin  /\  X  e.  V  /\  N  e.  ( ZZ>= ` 
3 ) ) )  ->  V USGrph  E )
3 simp1 988 . . . 4  |-  ( ( V  e.  Fin  /\  X  e.  V  /\  N  e.  ( ZZ>= ` 
3 ) )  ->  V  e.  Fin )
43adantl 466 . . 3  |-  ( ( ( <. V ,  E >. RegUSGrph  K  /\  V FriendGrph  E )  /\  ( V  e.  Fin  /\  X  e.  V  /\  N  e.  ( ZZ>= ` 
3 ) ) )  ->  V  e.  Fin )
5 simp2 989 . . . 4  |-  ( ( V  e.  Fin  /\  X  e.  V  /\  N  e.  ( ZZ>= ` 
3 ) )  ->  X  e.  V )
65adantl 466 . . 3  |-  ( ( ( <. V ,  E >. RegUSGrph  K  /\  V FriendGrph  E )  /\  ( V  e.  Fin  /\  X  e.  V  /\  N  e.  ( ZZ>= ` 
3 ) ) )  ->  X  e.  V
)
7 uzuzle23 30334 . . . . 5  |-  ( N  e.  ( ZZ>= `  3
)  ->  N  e.  ( ZZ>= `  2 )
)
873ad2ant3 1011 . . . 4  |-  ( ( V  e.  Fin  /\  X  e.  V  /\  N  e.  ( ZZ>= ` 
3 ) )  ->  N  e.  ( ZZ>= ` 
2 ) )
98adantl 466 . . 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 30842 . . 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 1222 . 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 30841 . . 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 457 . . . . 5  |-  ( (
<. V ,  E >. RegUSGrph  K  /\  V FriendGrph  E )  ->  <. V ,  E >. RegUSGrph  K
)
1918, 3anim12ci 567 . . . 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 987 . . . . 5  |-  ( ( V  e.  Fin  /\  X  e.  V  /\  N  e.  ( ZZ>= ` 
3 ) )  -> 
( X  e.  V  /\  N  e.  ( ZZ>=
`  3 ) ) )
2120adantl 466 . . . 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 30832 . . . 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 661 . . 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 6211 . 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 30687 . . . . 5  |-  ( <. V ,  E >. RegUSGrph  K  ->  ( V USGrph  E  /\  K  e.  NN0  /\  A. u  e.  V  (
( V VDeg  E ) `  u )  =  K ) )
26 nn0cn 10693 . . . . . 6  |-  ( K  e.  NN0  ->  K  e.  CC )
27263ad2ant2 1010 . . . . 5  |-  ( ( V USGrph  E  /\  K  e. 
NN0  /\  A. u  e.  V  ( ( V VDeg  E ) `  u
)  =  K )  ->  K  e.  CC )
2825, 27syl 16 . . . 4  |-  ( <. V ,  E >. RegUSGrph  K  ->  K  e.  CC )
2928ad2antrr 725 . . 3  |-  ( ( ( <. V ,  E >. RegUSGrph  K  /\  V FriendGrph  E )  /\  ( V  e.  Fin  /\  X  e.  V  /\  N  e.  ( ZZ>= ` 
3 ) ) )  ->  K  e.  CC )
30 usgrav 23415 . . . . . . . . 9  |-  ( V USGrph  E  ->  ( V  e. 
_V  /\  E  e.  _V ) )
3130simprd 463 . . . . . . . 8  |-  ( V USGrph  E  ->  E  e.  _V )
321, 31syl 16 . . . . . . 7  |-  ( <. V ,  E >. RegUSGrph  K  ->  E  e.  _V )
3332adantr 465 . . . . . 6  |-  ( (
<. V ,  E >. RegUSGrph  K  /\  V FriendGrph  E )  ->  E  e.  _V )
3433, 3anim12ci 567 . . . . 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 30336 . . . . . . . . 9  |-  ( N  e.  ( ZZ>= `  3
)  ->  ( N  -  2 )  e.  NN )
3635nnnn0d 10740 . . . . . . . 8  |-  ( N  e.  ( ZZ>= `  3
)  ->  ( N  -  2 )  e. 
NN0 )
37363ad2ant3 1011 . . . . . . 7  |-  ( ( V  e.  Fin  /\  X  e.  V  /\  N  e.  ( ZZ>= ` 
3 ) )  -> 
( N  -  2 )  e.  NN0 )
385, 37jca 532 . . . . . 6  |-  ( ( V  e.  Fin  /\  X  e.  V  /\  N  e.  ( ZZ>= ` 
3 ) )  -> 
( X  e.  V  /\  ( N  -  2 )  e.  NN0 )
)
3938adantl 466 . . . . 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 30816 . . . . 5  |-  ( ( ( V  e.  Fin  /\  E  e.  _V )  /\  ( X  e.  V  /\  ( N  -  2 )  e.  NN0 )
)  ->  ( X F ( N  - 
2 ) )  e. 
Fin )
4134, 39, 40syl2anc 661 . . . 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 12236 . . . . 5  |-  ( ( X F ( N  -  2 ) )  e.  Fin  ->  ( # `
 ( X F ( N  -  2 ) ) )  e. 
NN0 )
4342nn0cnd 10742 . . . 4  |-  ( ( X F ( N  -  2 ) )  e.  Fin  ->  ( # `
 ( X F ( N  -  2 ) ) )  e.  CC )
4441, 43syl 16 . . 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 30807 . . 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 1219 . 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 2496 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 369    /\ w3a 965    = wceq 1370    e. wcel 1758    =/= wne 2644   A.wral 2795   {crab 2799   _Vcvv 3071   <.cop 3984   class class class wbr 4393    |-> cmpt 4451   ` cfv 5519  (class class class)co 6193    |-> cmpt2 6195   Fincfn 7413   CCcc 9384   0cc0 9386   1c1 9387    + caddc 9389    x. cmul 9391    - cmin 9699   2c2 10475   3c3 10476   NN0cn0 10683   ZZ>=cuz 10965   ^cexp 11975   #chash 12213   lastS clsw 12333   USGrph cusg 23409   VDeg cvdg 23708   WWalksN cwwlkn 30453   ClWWalksN cclwwlkn 30555   RegUSGrph crusgra 30681   FriendGrph cfrgra 30721
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1592  ax-4 1603  ax-5 1671  ax-6 1710  ax-7 1730  ax-8 1760  ax-9 1762  ax-10 1777  ax-11 1782  ax-12 1794  ax-13 1952  ax-ext 2430  ax-rep 4504  ax-sep 4514  ax-nul 4522  ax-pow 4571  ax-pr 4632  ax-un 6475  ax-inf2 7951  ax-cnex 9442  ax-resscn 9443  ax-1cn 9444  ax-icn 9445  ax-addcl 9446  ax-addrcl 9447  ax-mulcl 9448  ax-mulrcl 9449  ax-mulcom 9450  ax-addass 9451  ax-mulass 9452  ax-distr 9453  ax-i2m1 9454  ax-1ne0 9455  ax-1rid 9456  ax-rnegex 9457  ax-rrecex 9458  ax-cnre 9459  ax-pre-lttri 9460  ax-pre-lttrn 9461  ax-pre-ltadd 9462  ax-pre-mulgt0 9463  ax-pre-sup 9464
This theorem depends on definitions:  df-bi 185  df-or 370  df-an 371  df-3or 966  df-3an 967  df-tru 1373  df-fal 1376  df-ex 1588  df-nf 1591  df-sb 1703  df-eu 2264  df-mo 2265  df-clab 2437  df-cleq 2443  df-clel 2446  df-nfc 2601  df-ne 2646  df-nel 2647  df-ral 2800  df-rex 2801  df-reu 2802  df-rmo 2803  df-rab 2804  df-v 3073  df-sbc 3288  df-csb 3390  df-dif 3432  df-un 3434  df-in 3436  df-ss 3443  df-pss 3445  df-nul 3739  df-if 3893  df-pw 3963  df-sn 3979  df-pr 3981  df-tp 3983  df-op 3985  df-uni 4193  df-int 4230  df-iun 4274  df-disj 4364  df-br 4394  df-opab 4452  df-mpt 4453  df-tr 4487  df-eprel 4733  df-id 4737  df-po 4742  df-so 4743  df-fr 4780  df-se 4781  df-we 4782  df-ord 4823  df-on 4824  df-lim 4825  df-suc 4826  df-xp 4947  df-rel 4948  df-cnv 4949  df-co 4950  df-dm 4951  df-rn 4952  df-res 4953  df-ima 4954  df-iota 5482  df-fun 5521  df-fn 5522  df-f 5523  df-f1 5524  df-fo 5525  df-f1o 5526  df-fv 5527  df-isom 5528  df-riota 6154  df-ov 6196  df-oprab 6197  df-mpt2 6198  df-om 6580  df-1st 6680  df-2nd 6681  df-recs 6935  df-rdg 6969  df-1o 7023  df-2o 7024  df-oadd 7027  df-er 7204  df-map 7319  df-pm 7320  df-en 7414  df-dom 7415  df-sdom 7416  df-fin 7417  df-sup 7795  df-oi 7828  df-card 8213  df-cda 8441  df-pnf 9524  df-mnf 9525  df-xr 9526  df-ltxr 9527  df-le 9528  df-sub 9701  df-neg 9702  df-div 10098  df-nn 10427  df-2 10484  df-3 10485  df-n0 10684  df-z 10751  df-uz 10966  df-rp 11096  df-xadd 11194  df-fz 11548  df-fzo 11659  df-seq 11917  df-exp 11976  df-hash 12214  df-word 12340  df-lsw 12341  df-concat 12342  df-s1 12343  df-substr 12344  df-s2 12586  df-cj 12699  df-re 12700  df-im 12701  df-sqr 12835  df-abs 12836  df-clim 13077  df-sum 13275  df-usgra 23411  df-nbgra 23477  df-wlk 23560  df-vdgr 23709  df-wwlk 30454  df-wwlkn 30455  df-clwwlk 30557  df-clwwlkn 30558  df-rgra 30682  df-rusgra 30683  df-frgra 30722
This theorem is referenced by:  numclwwlk5  30846
  Copyright terms: Public domain W3C validator