Metamath Proof Explorer


Theorem dlwwlknondlwlknonf1olem1

Description: Lemma 1 for dlwwlknondlwlknonf1o . (Contributed by AV, 29-May-2022) (Revised by AV, 1-Nov-2022)

Ref Expression
Assertion dlwwlknondlwlknonf1olem1
|- ( ( ( # ` ( 1st ` c ) ) = N /\ c e. ( ClWalks ` G ) /\ N e. ( ZZ>= ` 2 ) ) -> ( ( ( 2nd ` c ) prefix ( # ` ( 1st ` c ) ) ) ` ( N - 2 ) ) = ( ( 2nd ` c ) ` ( N - 2 ) ) )

Proof

Step Hyp Ref Expression
1 clwlkwlk
 |-  ( c e. ( ClWalks ` G ) -> c e. ( Walks ` G ) )
2 wlkcpr
 |-  ( c e. ( Walks ` G ) <-> ( 1st ` c ) ( Walks ` G ) ( 2nd ` c ) )
3 1 2 sylib
 |-  ( c e. ( ClWalks ` G ) -> ( 1st ` c ) ( Walks ` G ) ( 2nd ` c ) )
4 eqid
 |-  ( Vtx ` G ) = ( Vtx ` G )
5 4 wlkpwrd
 |-  ( ( 1st ` c ) ( Walks ` G ) ( 2nd ` c ) -> ( 2nd ` c ) e. Word ( Vtx ` G ) )
6 3 5 syl
 |-  ( c e. ( ClWalks ` G ) -> ( 2nd ` c ) e. Word ( Vtx ` G ) )
7 6 3ad2ant2
 |-  ( ( ( # ` ( 1st ` c ) ) = N /\ c e. ( ClWalks ` G ) /\ N e. ( ZZ>= ` 2 ) ) -> ( 2nd ` c ) e. Word ( Vtx ` G ) )
8 eluzge2nn0
 |-  ( N e. ( ZZ>= ` 2 ) -> N e. NN0 )
9 8 3ad2ant3
 |-  ( ( ( # ` ( 1st ` c ) ) = N /\ c e. ( ClWalks ` G ) /\ N e. ( ZZ>= ` 2 ) ) -> N e. NN0 )
10 eleq1
 |-  ( ( # ` ( 1st ` c ) ) = N -> ( ( # ` ( 1st ` c ) ) e. NN0 <-> N e. NN0 ) )
11 10 3ad2ant1
 |-  ( ( ( # ` ( 1st ` c ) ) = N /\ c e. ( ClWalks ` G ) /\ N e. ( ZZ>= ` 2 ) ) -> ( ( # ` ( 1st ` c ) ) e. NN0 <-> N e. NN0 ) )
12 9 11 mpbird
 |-  ( ( ( # ` ( 1st ` c ) ) = N /\ c e. ( ClWalks ` G ) /\ N e. ( ZZ>= ` 2 ) ) -> ( # ` ( 1st ` c ) ) e. NN0 )
13 nn0fz0
 |-  ( ( # ` ( 1st ` c ) ) e. NN0 <-> ( # ` ( 1st ` c ) ) e. ( 0 ... ( # ` ( 1st ` c ) ) ) )
14 12 13 sylib
 |-  ( ( ( # ` ( 1st ` c ) ) = N /\ c e. ( ClWalks ` G ) /\ N e. ( ZZ>= ` 2 ) ) -> ( # ` ( 1st ` c ) ) e. ( 0 ... ( # ` ( 1st ` c ) ) ) )
15 fzelp1
 |-  ( ( # ` ( 1st ` c ) ) e. ( 0 ... ( # ` ( 1st ` c ) ) ) -> ( # ` ( 1st ` c ) ) e. ( 0 ... ( ( # ` ( 1st ` c ) ) + 1 ) ) )
16 14 15 syl
 |-  ( ( ( # ` ( 1st ` c ) ) = N /\ c e. ( ClWalks ` G ) /\ N e. ( ZZ>= ` 2 ) ) -> ( # ` ( 1st ` c ) ) e. ( 0 ... ( ( # ` ( 1st ` c ) ) + 1 ) ) )
17 wlklenvp1
 |-  ( ( 1st ` c ) ( Walks ` G ) ( 2nd ` c ) -> ( # ` ( 2nd ` c ) ) = ( ( # ` ( 1st ` c ) ) + 1 ) )
18 17 eqcomd
 |-  ( ( 1st ` c ) ( Walks ` G ) ( 2nd ` c ) -> ( ( # ` ( 1st ` c ) ) + 1 ) = ( # ` ( 2nd ` c ) ) )
19 3 18 syl
 |-  ( c e. ( ClWalks ` G ) -> ( ( # ` ( 1st ` c ) ) + 1 ) = ( # ` ( 2nd ` c ) ) )
20 19 oveq2d
 |-  ( c e. ( ClWalks ` G ) -> ( 0 ... ( ( # ` ( 1st ` c ) ) + 1 ) ) = ( 0 ... ( # ` ( 2nd ` c ) ) ) )
21 20 eleq2d
 |-  ( c e. ( ClWalks ` G ) -> ( ( # ` ( 1st ` c ) ) e. ( 0 ... ( ( # ` ( 1st ` c ) ) + 1 ) ) <-> ( # ` ( 1st ` c ) ) e. ( 0 ... ( # ` ( 2nd ` c ) ) ) ) )
22 21 3ad2ant2
 |-  ( ( ( # ` ( 1st ` c ) ) = N /\ c e. ( ClWalks ` G ) /\ N e. ( ZZ>= ` 2 ) ) -> ( ( # ` ( 1st ` c ) ) e. ( 0 ... ( ( # ` ( 1st ` c ) ) + 1 ) ) <-> ( # ` ( 1st ` c ) ) e. ( 0 ... ( # ` ( 2nd ` c ) ) ) ) )
23 16 22 mpbid
 |-  ( ( ( # ` ( 1st ` c ) ) = N /\ c e. ( ClWalks ` G ) /\ N e. ( ZZ>= ` 2 ) ) -> ( # ` ( 1st ` c ) ) e. ( 0 ... ( # ` ( 2nd ` c ) ) ) )
24 2nn
 |-  2 e. NN
25 24 a1i
 |-  ( N e. ( ZZ>= ` 2 ) -> 2 e. NN )
26 eluz2nn
 |-  ( N e. ( ZZ>= ` 2 ) -> N e. NN )
27 eluzle
 |-  ( N e. ( ZZ>= ` 2 ) -> 2 <_ N )
28 elfz1b
 |-  ( 2 e. ( 1 ... N ) <-> ( 2 e. NN /\ N e. NN /\ 2 <_ N ) )
29 25 26 27 28 syl3anbrc
 |-  ( N e. ( ZZ>= ` 2 ) -> 2 e. ( 1 ... N ) )
30 ubmelfzo
 |-  ( 2 e. ( 1 ... N ) -> ( N - 2 ) e. ( 0 ..^ N ) )
31 29 30 syl
 |-  ( N e. ( ZZ>= ` 2 ) -> ( N - 2 ) e. ( 0 ..^ N ) )
32 31 3ad2ant3
 |-  ( ( ( # ` ( 1st ` c ) ) = N /\ c e. ( ClWalks ` G ) /\ N e. ( ZZ>= ` 2 ) ) -> ( N - 2 ) e. ( 0 ..^ N ) )
33 oveq2
 |-  ( ( # ` ( 1st ` c ) ) = N -> ( 0 ..^ ( # ` ( 1st ` c ) ) ) = ( 0 ..^ N ) )
34 33 eleq2d
 |-  ( ( # ` ( 1st ` c ) ) = N -> ( ( N - 2 ) e. ( 0 ..^ ( # ` ( 1st ` c ) ) ) <-> ( N - 2 ) e. ( 0 ..^ N ) ) )
35 34 3ad2ant1
 |-  ( ( ( # ` ( 1st ` c ) ) = N /\ c e. ( ClWalks ` G ) /\ N e. ( ZZ>= ` 2 ) ) -> ( ( N - 2 ) e. ( 0 ..^ ( # ` ( 1st ` c ) ) ) <-> ( N - 2 ) e. ( 0 ..^ N ) ) )
36 32 35 mpbird
 |-  ( ( ( # ` ( 1st ` c ) ) = N /\ c e. ( ClWalks ` G ) /\ N e. ( ZZ>= ` 2 ) ) -> ( N - 2 ) e. ( 0 ..^ ( # ` ( 1st ` c ) ) ) )
37 pfxfv
 |-  ( ( ( 2nd ` c ) e. Word ( Vtx ` G ) /\ ( # ` ( 1st ` c ) ) e. ( 0 ... ( # ` ( 2nd ` c ) ) ) /\ ( N - 2 ) e. ( 0 ..^ ( # ` ( 1st ` c ) ) ) ) -> ( ( ( 2nd ` c ) prefix ( # ` ( 1st ` c ) ) ) ` ( N - 2 ) ) = ( ( 2nd ` c ) ` ( N - 2 ) ) )
38 7 23 36 37 syl3anc
 |-  ( ( ( # ` ( 1st ` c ) ) = N /\ c e. ( ClWalks ` G ) /\ N e. ( ZZ>= ` 2 ) ) -> ( ( ( 2nd ` c ) prefix ( # ` ( 1st ` c ) ) ) ` ( N - 2 ) ) = ( ( 2nd ` c ) ` ( N - 2 ) ) )