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

Theorem numclwwlk3 25837
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 25826) and with v(n-2) =/= v(n) ( see numclwwlk2 25835): 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 25659 . . . 4  |-  ( <. V ,  E >. RegUSGrph  K  ->  V USGrph  E )
21ad2antrr 732 . . 3  |-  ( ( ( <. V ,  E >. RegUSGrph  K  /\  V FriendGrph  E )  /\  ( V  e.  Fin  /\  X  e.  V  /\  N  e.  ( ZZ>= ` 
3 ) ) )  ->  V USGrph  E )
3 simp1 1008 . . . 4  |-  ( ( V  e.  Fin  /\  X  e.  V  /\  N  e.  ( ZZ>= ` 
3 ) )  ->  V  e.  Fin )
43adantl 468 . . 3  |-  ( ( ( <. V ,  E >. RegUSGrph  K  /\  V FriendGrph  E )  /\  ( V  e.  Fin  /\  X  e.  V  /\  N  e.  ( ZZ>= ` 
3 ) ) )  ->  V  e.  Fin )
5 simp2 1009 . . . 4  |-  ( ( V  e.  Fin  /\  X  e.  V  /\  N  e.  ( ZZ>= ` 
3 ) )  ->  X  e.  V )
65adantl 468 . . 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 1031 . . . 4  |-  ( ( V  e.  Fin  /\  X  e.  V  /\  N  e.  ( ZZ>= ` 
3 ) )  ->  N  e.  ( ZZ>= ` 
2 ) )
98adantl 468 . . 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 25836 . . 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 1271 . 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 25835 . . 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 459 . . . . 5  |-  ( (
<. V ,  E >. RegUSGrph  K  /\  V FriendGrph  E )  ->  <. V ,  E >. RegUSGrph  K
)
1918, 3anim12ci 571 . . . 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 1007 . . . . 5  |-  ( ( V  e.  Fin  /\  X  e.  V  /\  N  e.  ( ZZ>= ` 
3 ) )  -> 
( X  e.  V  /\  N  e.  ( ZZ>=
`  3 ) ) )
2120adantl 468 . . . 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 25826 . . . 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 667 . . 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 6308 . 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 25657 . . . . 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 1030 . . . . 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 732 . . 3  |-  ( ( ( <. V ,  E >. RegUSGrph  K  /\  V FriendGrph  E )  /\  ( V  e.  Fin  /\  X  e.  V  /\  N  e.  ( ZZ>= ` 
3 ) ) )  ->  K  e.  CC )
30 usgrav 25065 . . . . . . . . 9  |-  ( V USGrph  E  ->  ( V  e. 
_V  /\  E  e.  _V ) )
3130simprd 465 . . . . . . . 8  |-  ( V USGrph  E  ->  E  e.  _V )
321, 31syl 17 . . . . . . 7  |-  ( <. V ,  E >. RegUSGrph  K  ->  E  e.  _V )
3332adantr 467 . . . . . 6  |-  ( (
<. V ,  E >. RegUSGrph  K  /\  V FriendGrph  E )  ->  E  e.  _V )
3433, 3anim12ci 571 . . . . 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 1031 . . . . . . 7  |-  ( ( V  e.  Fin  /\  X  e.  V  /\  N  e.  ( ZZ>= ` 
3 ) )  -> 
( N  -  2 )  e.  NN0 )
385, 37jca 535 . . . . . 6  |-  ( ( V  e.  Fin  /\  X  e.  V  /\  N  e.  ( ZZ>= ` 
3 ) )  -> 
( X  e.  V  /\  ( N  -  2 )  e.  NN0 )
)
3938adantl 468 . . . . 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 25810 . . . . 5  |-  ( ( ( V  e.  Fin  /\  E  e.  _V )  /\  ( X  e.  V  /\  ( N  -  2 )  e.  NN0 )
)  ->  ( X F ( N  - 
2 ) )  e. 
Fin )
4134, 39, 40syl2anc 667 . . . 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 12538 . . . . 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 25801 . . 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 1268 . 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 2489 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 371    /\ w3a 985    = wceq 1444    e. wcel 1887    =/= wne 2622   A.wral 2737   {crab 2741   _Vcvv 3045   <.cop 3974   class class class wbr 4402    |-> cmpt 4461   ` cfv 5582  (class class class)co 6290    |-> cmpt2 6292   Fincfn 7569   CCcc 9537   0cc0 9539   1c1 9540    + caddc 9542    x. cmul 9544    - cmin 9860   2c2 10659   3c3 10660   NN0cn0 10869   ZZ>=cuz 11159   ^cexp 12272   #chash 12515   lastS clsw 12657   USGrph cusg 25057   WWalksN cwwlkn 25406   ClWWalksN cclwwlkn 25477   VDeg cvdg 25621   RegUSGrph crusgra 25651   FriendGrph cfrgra 25716
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1669  ax-4 1682  ax-5 1758  ax-6 1805  ax-7 1851  ax-8 1889  ax-9 1896  ax-10 1915  ax-11 1920  ax-12 1933  ax-13 2091  ax-ext 2431  ax-rep 4515  ax-sep 4525  ax-nul 4534  ax-pow 4581  ax-pr 4639  ax-un 6583  ax-inf2 8146  ax-cnex 9595  ax-resscn 9596  ax-1cn 9597  ax-icn 9598  ax-addcl 9599  ax-addrcl 9600  ax-mulcl 9601  ax-mulrcl 9602  ax-mulcom 9603  ax-addass 9604  ax-mulass 9605  ax-distr 9606  ax-i2m1 9607  ax-1ne0 9608  ax-1rid 9609  ax-rnegex 9610  ax-rrecex 9611  ax-cnre 9612  ax-pre-lttri 9613  ax-pre-lttrn 9614  ax-pre-ltadd 9615  ax-pre-mulgt0 9616  ax-pre-sup 9617
This theorem depends on definitions:  df-bi 189  df-or 372  df-an 373  df-3or 986  df-3an 987  df-tru 1447  df-fal 1450  df-ex 1664  df-nf 1668  df-sb 1798  df-eu 2303  df-mo 2304  df-clab 2438  df-cleq 2444  df-clel 2447  df-nfc 2581  df-ne 2624  df-nel 2625  df-ral 2742  df-rex 2743  df-reu 2744  df-rmo 2745  df-rab 2746  df-v 3047  df-sbc 3268  df-csb 3364  df-dif 3407  df-un 3409  df-in 3411  df-ss 3418  df-pss 3420  df-nul 3732  df-if 3882  df-pw 3953  df-sn 3969  df-pr 3971  df-tp 3973  df-op 3975  df-uni 4199  df-int 4235  df-iun 4280  df-disj 4374  df-br 4403  df-opab 4462  df-mpt 4463  df-tr 4498  df-eprel 4745  df-id 4749  df-po 4755  df-so 4756  df-fr 4793  df-se 4794  df-we 4795  df-xp 4840  df-rel 4841  df-cnv 4842  df-co 4843  df-dm 4844  df-rn 4845  df-res 4846  df-ima 4847  df-pred 5380  df-ord 5426  df-on 5427  df-lim 5428  df-suc 5429  df-iota 5546  df-fun 5584  df-fn 5585  df-f 5586  df-f1 5587  df-fo 5588  df-f1o 5589  df-fv 5590  df-isom 5591  df-riota 6252  df-ov 6293  df-oprab 6294  df-mpt2 6295  df-om 6693  df-1st 6793  df-2nd 6794  df-wrecs 7028  df-recs 7090  df-rdg 7128  df-1o 7182  df-2o 7183  df-oadd 7186  df-er 7363  df-map 7474  df-pm 7475  df-en 7570  df-dom 7571  df-sdom 7572  df-fin 7573  df-sup 7956  df-oi 8025  df-card 8373  df-cda 8598  df-pnf 9677  df-mnf 9678  df-xr 9679  df-ltxr 9680  df-le 9681  df-sub 9862  df-neg 9863  df-div 10270  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 11785  df-fzo 11916  df-seq 12214  df-exp 12273  df-hash 12516  df-word 12664  df-lsw 12665  df-concat 12666  df-s1 12667  df-substr 12668  df-s2 12944  df-cj 13162  df-re 13163  df-im 13164  df-sqrt 13298  df-abs 13299  df-clim 13552  df-sum 13753  df-usgra 25060  df-nbgra 25148  df-wlk 25236  df-wwlk 25407  df-wwlkn 25408  df-clwwlk 25479  df-clwwlkn 25480  df-vdgr 25622  df-rgra 25652  df-rusgra 25653  df-frgra 25717
This theorem is referenced by:  numclwwlk5  25840
  Copyright terms: Public domain W3C validator