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

Theorem numclwwlk2 25309
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 25160, 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  |-  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
numclwwlk2  |-  ( ( ( <. 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 ) ) ) ) )
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 numclwwlk2
StepHypRef Expression
1 eluzelcn 11093 . . . . . . . 8  |-  ( N  e.  ( ZZ>= `  3
)  ->  N  e.  CC )
2 2cnd 10604 . . . . . . . 8  |-  ( N  e.  ( ZZ>= `  3
)  ->  2  e.  CC )
31, 2npcand 9926 . . . . . . 7  |-  ( N  e.  ( ZZ>= `  3
)  ->  ( ( N  -  2 )  +  2 )  =  N )
43eqcomd 2462 . . . . . 6  |-  ( N  e.  ( ZZ>= `  3
)  ->  N  =  ( ( N  - 
2 )  +  2 ) )
543ad2ant3 1017 . . . . 5  |-  ( ( V  e.  Fin  /\  X  e.  V  /\  N  e.  ( ZZ>= ` 
3 ) )  ->  N  =  ( ( N  -  2 )  +  2 ) )
65adantl 464 . . . 4  |-  ( ( ( <. V ,  E >. RegUSGrph  K  /\  V FriendGrph  E )  /\  ( V  e.  Fin  /\  X  e.  V  /\  N  e.  ( ZZ>= ` 
3 ) ) )  ->  N  =  ( ( N  -  2 )  +  2 ) )
76oveq2d 6286 . . 3  |-  ( ( ( <. V ,  E >. RegUSGrph  K  /\  V FriendGrph  E )  /\  ( V  e.  Fin  /\  X  e.  V  /\  N  e.  ( ZZ>= ` 
3 ) ) )  ->  ( X H N )  =  ( X H ( ( N  -  2 )  +  2 ) ) )
87fveq2d 5852 . 2  |-  ( ( ( <. V ,  E >. RegUSGrph  K  /\  V FriendGrph  E )  /\  ( V  e.  Fin  /\  X  e.  V  /\  N  e.  ( ZZ>= ` 
3 ) ) )  ->  ( # `  ( X H N ) )  =  ( # `  ( X H ( ( N  -  2 )  +  2 ) ) ) )
9 simplr 753 . . 3  |-  ( ( ( <. V ,  E >. RegUSGrph  K  /\  V FriendGrph  E )  /\  ( V  e.  Fin  /\  X  e.  V  /\  N  e.  ( ZZ>= ` 
3 ) ) )  ->  V FriendGrph  E )
10 simp2 995 . . . 4  |-  ( ( V  e.  Fin  /\  X  e.  V  /\  N  e.  ( ZZ>= ` 
3 ) )  ->  X  e.  V )
1110adantl 464 . . 3  |-  ( ( ( <. V ,  E >. RegUSGrph  K  /\  V FriendGrph  E )  /\  ( V  e.  Fin  /\  X  e.  V  /\  N  e.  ( ZZ>= ` 
3 ) ) )  ->  X  e.  V
)
12 uz3m2nn 11124 . . . . 5  |-  ( N  e.  ( ZZ>= `  3
)  ->  ( N  -  2 )  e.  NN )
13123ad2ant3 1017 . . . 4  |-  ( ( V  e.  Fin  /\  X  e.  V  /\  N  e.  ( ZZ>= ` 
3 ) )  -> 
( N  -  2 )  e.  NN )
1413adantl 464 . . 3  |-  ( ( ( <. V ,  E >. RegUSGrph  K  /\  V FriendGrph  E )  /\  ( V  e.  Fin  /\  X  e.  V  /\  N  e.  ( ZZ>= ` 
3 ) ) )  ->  ( N  - 
2 )  e.  NN )
15 numclwwlk.c . . . 4  |-  C  =  ( n  e.  NN0  |->  ( ( V ClWWalksN  E ) `
 n ) )
16 numclwwlk.f . . . 4  |-  F  =  ( v  e.  V ,  n  e.  NN0  |->  { w  e.  ( C `  n )  |  ( w ` 
0 )  =  v } )
17 numclwwlk.g . . . 4  |-  G  =  ( v  e.  V ,  n  e.  ( ZZ>=
`  2 )  |->  { w  e.  ( C `
 n )  |  ( ( w ` 
0 )  =  v  /\  ( w `  ( n  -  2
) )  =  ( w `  0 ) ) } )
18 numclwwlk.q . . . 4  |-  Q  =  ( v  e.  V ,  n  e.  NN0  |->  { w  e.  (
( V WWalksN  E ) `  n )  |  ( ( w `  0
)  =  v  /\  ( lastS  `  w )  =/=  v ) } )
19 numclwwlk.h . . . 4  |-  H  =  ( v  e.  V ,  n  e.  NN0  |->  { w  e.  ( C `  n )  |  ( ( w `
 0 )  =  v  /\  ( w `
 ( n  - 
2 ) )  =/=  ( w `  0
) ) } )
2015, 16, 17, 18, 19numclwwlk2lem3 25308 . . 3  |-  ( ( V FriendGrph  E  /\  X  e.  V  /\  ( N  -  2 )  e.  NN )  ->  ( # `
 ( X Q ( N  -  2 ) ) )  =  ( # `  ( X H ( ( N  -  2 )  +  2 ) ) ) )
219, 11, 14, 20syl3anc 1226 . 2  |-  ( ( ( <. V ,  E >. RegUSGrph  K  /\  V FriendGrph  E )  /\  ( V  e.  Fin  /\  X  e.  V  /\  N  e.  ( ZZ>= ` 
3 ) ) )  ->  ( # `  ( X Q ( N  - 
2 ) ) )  =  ( # `  ( X H ( ( N  -  2 )  +  2 ) ) ) )
22 simpl 455 . . . 4  |-  ( (
<. V ,  E >. RegUSGrph  K  /\  V FriendGrph  E )  ->  <. V ,  E >. RegUSGrph  K
)
23 simp1 994 . . . 4  |-  ( ( V  e.  Fin  /\  X  e.  V  /\  N  e.  ( ZZ>= ` 
3 ) )  ->  V  e.  Fin )
2422, 23anim12i 564 . . 3  |-  ( ( ( <. V ,  E >. RegUSGrph  K  /\  V FriendGrph  E )  /\  ( V  e.  Fin  /\  X  e.  V  /\  N  e.  ( ZZ>= ` 
3 ) ) )  ->  ( <. V ,  E >. RegUSGrph  K  /\  V  e. 
Fin ) )
2510, 13jca 530 . . . 4  |-  ( ( V  e.  Fin  /\  X  e.  V  /\  N  e.  ( ZZ>= ` 
3 ) )  -> 
( X  e.  V  /\  ( N  -  2 )  e.  NN ) )
2625adantl 464 . . 3  |-  ( ( ( <. V ,  E >. RegUSGrph  K  /\  V FriendGrph  E )  /\  ( V  e.  Fin  /\  X  e.  V  /\  N  e.  ( ZZ>= ` 
3 ) ) )  ->  ( X  e.  V  /\  ( N  -  2 )  e.  NN ) )
2715, 16, 17, 18numclwwlkqhash 25302 . . 3  |-  ( ( ( <. V ,  E >. RegUSGrph  K  /\  V  e.  Fin )  /\  ( X  e.  V  /\  ( N  -  2 )  e.  NN ) )  -> 
( # `  ( X Q ( N  - 
2 ) ) )  =  ( ( K ^ ( N  - 
2 ) )  -  ( # `  ( X F ( N  - 
2 ) ) ) ) )
2824, 26, 27syl2anc 659 . 2  |-  ( ( ( <. V ,  E >. RegUSGrph  K  /\  V FriendGrph  E )  /\  ( V  e.  Fin  /\  X  e.  V  /\  N  e.  ( ZZ>= ` 
3 ) ) )  ->  ( # `  ( X Q ( N  - 
2 ) ) )  =  ( ( K ^ ( N  - 
2 ) )  -  ( # `  ( X F ( N  - 
2 ) ) ) ) )
298, 21, 283eqtr2d 2501 1  |-  ( ( ( <. 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 ) ) ) ) )
Colors of variables: wff setvar class
Syntax hints:    -> wi 4    /\ wa 367    /\ w3a 971    = wceq 1398    e. wcel 1823    =/= wne 2649   {crab 2808   <.cop 4022   class class class wbr 4439    |-> cmpt 4497   ` cfv 5570  (class class class)co 6270    |-> cmpt2 6272   Fincfn 7509   0cc0 9481    + caddc 9484    - cmin 9796   NNcn 10531   2c2 10581   3c3 10582   NN0cn0 10791   ZZ>=cuz 11082   ^cexp 12148   #chash 12387   lastS clsw 12519   WWalksN cwwlkn 24880   ClWWalksN cclwwlkn 24951   RegUSGrph crusgra 25125   FriendGrph cfrgra 25190
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1623  ax-4 1636  ax-5 1709  ax-6 1752  ax-7 1795  ax-8 1825  ax-9 1827  ax-10 1842  ax-11 1847  ax-12 1859  ax-13 2004  ax-ext 2432  ax-rep 4550  ax-sep 4560  ax-nul 4568  ax-pow 4615  ax-pr 4676  ax-un 6565  ax-inf2 8049  ax-cnex 9537  ax-resscn 9538  ax-1cn 9539  ax-icn 9540  ax-addcl 9541  ax-addrcl 9542  ax-mulcl 9543  ax-mulrcl 9544  ax-mulcom 9545  ax-addass 9546  ax-mulass 9547  ax-distr 9548  ax-i2m1 9549  ax-1ne0 9550  ax-1rid 9551  ax-rnegex 9552  ax-rrecex 9553  ax-cnre 9554  ax-pre-lttri 9555  ax-pre-lttrn 9556  ax-pre-ltadd 9557  ax-pre-mulgt0 9558  ax-pre-sup 9559
This theorem depends on definitions:  df-bi 185  df-or 368  df-an 369  df-3or 972  df-3an 973  df-tru 1401  df-fal 1404  df-ex 1618  df-nf 1622  df-sb 1745  df-eu 2288  df-mo 2289  df-clab 2440  df-cleq 2446  df-clel 2449  df-nfc 2604  df-ne 2651  df-nel 2652  df-ral 2809  df-rex 2810  df-reu 2811  df-rmo 2812  df-rab 2813  df-v 3108  df-sbc 3325  df-csb 3421  df-dif 3464  df-un 3466  df-in 3468  df-ss 3475  df-pss 3477  df-nul 3784  df-if 3930  df-pw 4001  df-sn 4017  df-pr 4019  df-tp 4021  df-op 4023  df-uni 4236  df-int 4272  df-iun 4317  df-disj 4411  df-br 4440  df-opab 4498  df-mpt 4499  df-tr 4533  df-eprel 4780  df-id 4784  df-po 4789  df-so 4790  df-fr 4827  df-se 4828  df-we 4829  df-ord 4870  df-on 4871  df-lim 4872  df-suc 4873  df-xp 4994  df-rel 4995  df-cnv 4996  df-co 4997  df-dm 4998  df-rn 4999  df-res 5000  df-ima 5001  df-iota 5534  df-fun 5572  df-fn 5573  df-f 5574  df-f1 5575  df-fo 5576  df-f1o 5577  df-fv 5578  df-isom 5579  df-riota 6232  df-ov 6273  df-oprab 6274  df-mpt2 6275  df-om 6674  df-1st 6773  df-2nd 6774  df-recs 7034  df-rdg 7068  df-1o 7122  df-2o 7123  df-oadd 7126  df-er 7303  df-map 7414  df-pm 7415  df-en 7510  df-dom 7511  df-sdom 7512  df-fin 7513  df-sup 7893  df-oi 7927  df-card 8311  df-cda 8539  df-pnf 9619  df-mnf 9620  df-xr 9621  df-ltxr 9622  df-le 9623  df-sub 9798  df-neg 9799  df-div 10203  df-nn 10532  df-2 10590  df-3 10591  df-n0 10792  df-z 10861  df-uz 11083  df-rp 11222  df-xadd 11322  df-fz 11676  df-fzo 11800  df-seq 12090  df-exp 12149  df-hash 12388  df-word 12526  df-lsw 12527  df-concat 12528  df-s1 12529  df-substr 12530  df-cj 13014  df-re 13015  df-im 13016  df-sqrt 13150  df-abs 13151  df-clim 13393  df-sum 13591  df-usgra 24535  df-nbgra 24622  df-wlk 24710  df-wwlk 24881  df-wwlkn 24882  df-clwwlk 24953  df-clwwlkn 24954  df-vdgr 25096  df-rgra 25126  df-rusgra 25127  df-frgra 25191
This theorem is referenced by:  numclwwlk3  25311
  Copyright terms: Public domain W3C validator