Metamath Proof Explorer


Theorem wwlksnextprop

Description: Adding additional properties to the set of walks (as words) of a fixed length starting at a fixed vertex. (Contributed by Alexander van der Vekens, 1-Aug-2018) (Revised by AV, 20-Apr-2021) (Revised by AV, 29-Oct-2022)

Ref Expression
Hypotheses wwlksnextprop.x X=N+1WWalksNG
wwlksnextprop.e E=EdgG
wwlksnextprop.y Y=wNWWalksNG|w0=P
Assertion wwlksnextprop N0xX|x0=P=xX|yYxprefixN+1=yy0=PlastSylastSxE

Proof

Step Hyp Ref Expression
1 wwlksnextprop.x X=N+1WWalksNG
2 wwlksnextprop.e E=EdgG
3 wwlksnextprop.y Y=wNWWalksNG|w0=P
4 eqidd N0xXx0=PxprefixN+1=xprefixN+1
5 1 wwlksnextproplem1 xXN0xprefixN+10=x0
6 5 ancoms N0xXxprefixN+10=x0
7 6 adantr N0xXx0=PxprefixN+10=x0
8 eqeq2 x0=PxprefixN+10=x0xprefixN+10=P
9 8 adantl N0xXx0=PxprefixN+10=x0xprefixN+10=P
10 7 9 mpbid N0xXx0=PxprefixN+10=P
11 1 2 wwlksnextproplem2 xXN0lastSxprefixN+1lastSxE
12 11 ancoms N0xXlastSxprefixN+1lastSxE
13 12 adantr N0xXx0=PlastSxprefixN+1lastSxE
14 simpr N0xXxX
15 14 adantr N0xXx0=PxX
16 simpr N0xXx0=Px0=P
17 simpll N0xXx0=PN0
18 1 2 3 wwlksnextproplem3 xXx0=PN0xprefixN+1Y
19 15 16 17 18 syl3anc N0xXx0=PxprefixN+1Y
20 eqeq2 y=xprefixN+1xprefixN+1=yxprefixN+1=xprefixN+1
21 fveq1 y=xprefixN+1y0=xprefixN+10
22 21 eqeq1d y=xprefixN+1y0=PxprefixN+10=P
23 fveq2 y=xprefixN+1lastSy=lastSxprefixN+1
24 23 preq1d y=xprefixN+1lastSylastSx=lastSxprefixN+1lastSx
25 24 eleq1d y=xprefixN+1lastSylastSxElastSxprefixN+1lastSxE
26 20 22 25 3anbi123d y=xprefixN+1xprefixN+1=yy0=PlastSylastSxExprefixN+1=xprefixN+1xprefixN+10=PlastSxprefixN+1lastSxE
27 26 adantl N0xXx0=Py=xprefixN+1xprefixN+1=yy0=PlastSylastSxExprefixN+1=xprefixN+1xprefixN+10=PlastSxprefixN+1lastSxE
28 19 27 rspcedv N0xXx0=PxprefixN+1=xprefixN+1xprefixN+10=PlastSxprefixN+1lastSxEyYxprefixN+1=yy0=PlastSylastSxE
29 4 10 13 28 mp3and N0xXx0=PyYxprefixN+1=yy0=PlastSylastSxE
30 29 ex N0xXx0=PyYxprefixN+1=yy0=PlastSylastSxE
31 21 eqcoms xprefixN+1=yy0=xprefixN+10
32 31 eqeq1d xprefixN+1=yy0=PxprefixN+10=P
33 5 eqcomd xXN0x0=xprefixN+10
34 33 ancoms N0xXx0=xprefixN+10
35 34 adantr N0xXyYx0=xprefixN+10
36 eqeq2 P=xprefixN+10x0=Px0=xprefixN+10
37 36 eqcoms xprefixN+10=Px0=Px0=xprefixN+10
38 35 37 imbitrrid xprefixN+10=PN0xXyYx0=P
39 32 38 syl6bi xprefixN+1=yy0=PN0xXyYx0=P
40 39 imp xprefixN+1=yy0=PN0xXyYx0=P
41 40 3adant3 xprefixN+1=yy0=PlastSylastSxEN0xXyYx0=P
42 41 com12 N0xXyYxprefixN+1=yy0=PlastSylastSxEx0=P
43 42 rexlimdva N0xXyYxprefixN+1=yy0=PlastSylastSxEx0=P
44 30 43 impbid N0xXx0=PyYxprefixN+1=yy0=PlastSylastSxE
45 44 rabbidva N0xX|x0=P=xX|yYxprefixN+1=yy0=PlastSylastSxE