Metamath Proof Explorer


Theorem clwwlknwwlksn

Description: A word representing a closed walk of length N also represents a walk of length N - 1 . The walk is one edge shorter than the closed walk, because the last edge connecting the last with the first vertex is missing. For example, if <" a b c "> e. ( 3 ClWWalksN G ) represents a closed walk "abca" of length 3, then <" a b c "> e. ( 2 WWalksN G ) represents a walk "abc" (not closed if a =/= c ) of length 2, and <" a b c a "> e. ( 3 WWalksN G ) represents also a closed walk "abca" of length 3. (Contributed by AV, 24-Jan-2022) (Revised by AV, 22-Mar-2022)

Ref Expression
Assertion clwwlknwwlksn WNClWWalksNGWN1WWalksNG

Proof

Step Hyp Ref Expression
1 clwwlknnn WNClWWalksNGN
2 idd NWWordVtxGWWordVtxG
3 idd Ni0..^W1WiWi+1EdgGi0..^W1WiWi+1EdgG
4 nncn NN
5 npcan1 NN-1+1=N
6 4 5 syl NN-1+1=N
7 6 eqcomd NN=N-1+1
8 7 eqeq2d NW=NW=N-1+1
9 8 biimpd NW=NW=N-1+1
10 2 3 9 3anim123d NWWordVtxGi0..^W1WiWi+1EdgGW=NWWordVtxGi0..^W1WiWi+1EdgGW=N-1+1
11 10 com12 WWordVtxGi0..^W1WiWi+1EdgGW=NNWWordVtxGi0..^W1WiWi+1EdgGW=N-1+1
12 11 3exp WWordVtxGi0..^W1WiWi+1EdgGW=NNWWordVtxGi0..^W1WiWi+1EdgGW=N-1+1
13 12 a1dd WWordVtxGi0..^W1WiWi+1EdgGlastSWW0EdgGW=NNWWordVtxGi0..^W1WiWi+1EdgGW=N-1+1
14 13 adantr WWordVtxGWi0..^W1WiWi+1EdgGlastSWW0EdgGW=NNWWordVtxGi0..^W1WiWi+1EdgGW=N-1+1
15 14 3imp1 WWordVtxGWi0..^W1WiWi+1EdgGlastSWW0EdgGW=NNWWordVtxGi0..^W1WiWi+1EdgGW=N-1+1
16 15 com12 NWWordVtxGWi0..^W1WiWi+1EdgGlastSWW0EdgGW=NWWordVtxGi0..^W1WiWi+1EdgGW=N-1+1
17 isclwwlkn WNClWWalksNGWClWWalksGW=N
18 17 a1i NWNClWWalksNGWClWWalksGW=N
19 eqid VtxG=VtxG
20 eqid EdgG=EdgG
21 19 20 isclwwlk WClWWalksGWWordVtxGWi0..^W1WiWi+1EdgGlastSWW0EdgG
22 21 anbi1i WClWWalksGW=NWWordVtxGWi0..^W1WiWi+1EdgGlastSWW0EdgGW=N
23 18 22 bitrdi NWNClWWalksNGWWordVtxGWi0..^W1WiWi+1EdgGlastSWW0EdgGW=N
24 nnm1nn0 NN10
25 19 20 iswwlksnx N10WN1WWalksNGWWordVtxGi0..^W1WiWi+1EdgGW=N-1+1
26 24 25 syl NWN1WWalksNGWWordVtxGi0..^W1WiWi+1EdgGW=N-1+1
27 16 23 26 3imtr4d NWNClWWalksNGWN1WWalksNG
28 1 27 mpcom WNClWWalksNGWN1WWalksNG