Metamath Proof Explorer


Theorem uspgr2wlkeqi

Description: Conditions for two walks within the same simple pseudograph to be identical. It is sufficient that the vertices (in the same order) are identical. (Contributed by AV, 6-May-2021)

Ref Expression
Assertion uspgr2wlkeqi
|- ( ( G e. USPGraph /\ ( A e. ( Walks ` G ) /\ B e. ( Walks ` G ) ) /\ ( 2nd ` A ) = ( 2nd ` B ) ) -> A = B )

Proof

Step Hyp Ref Expression
1 wlkcpr
 |-  ( A e. ( Walks ` G ) <-> ( 1st ` A ) ( Walks ` G ) ( 2nd ` A ) )
2 wlkcpr
 |-  ( B e. ( Walks ` G ) <-> ( 1st ` B ) ( Walks ` G ) ( 2nd ` B ) )
3 wlkcl
 |-  ( ( 1st ` A ) ( Walks ` G ) ( 2nd ` A ) -> ( # ` ( 1st ` A ) ) e. NN0 )
4 fveq2
 |-  ( ( 2nd ` A ) = ( 2nd ` B ) -> ( # ` ( 2nd ` A ) ) = ( # ` ( 2nd ` B ) ) )
5 4 oveq1d
 |-  ( ( 2nd ` A ) = ( 2nd ` B ) -> ( ( # ` ( 2nd ` A ) ) - 1 ) = ( ( # ` ( 2nd ` B ) ) - 1 ) )
6 5 eqcomd
 |-  ( ( 2nd ` A ) = ( 2nd ` B ) -> ( ( # ` ( 2nd ` B ) ) - 1 ) = ( ( # ` ( 2nd ` A ) ) - 1 ) )
7 6 adantl
 |-  ( ( ( ( 1st ` A ) ( Walks ` G ) ( 2nd ` A ) /\ ( 1st ` B ) ( Walks ` G ) ( 2nd ` B ) ) /\ ( 2nd ` A ) = ( 2nd ` B ) ) -> ( ( # ` ( 2nd ` B ) ) - 1 ) = ( ( # ` ( 2nd ` A ) ) - 1 ) )
8 wlklenvm1
 |-  ( ( 1st ` B ) ( Walks ` G ) ( 2nd ` B ) -> ( # ` ( 1st ` B ) ) = ( ( # ` ( 2nd ` B ) ) - 1 ) )
9 wlklenvm1
 |-  ( ( 1st ` A ) ( Walks ` G ) ( 2nd ` A ) -> ( # ` ( 1st ` A ) ) = ( ( # ` ( 2nd ` A ) ) - 1 ) )
10 8 9 eqeqan12rd
 |-  ( ( ( 1st ` A ) ( Walks ` G ) ( 2nd ` A ) /\ ( 1st ` B ) ( Walks ` G ) ( 2nd ` B ) ) -> ( ( # ` ( 1st ` B ) ) = ( # ` ( 1st ` A ) ) <-> ( ( # ` ( 2nd ` B ) ) - 1 ) = ( ( # ` ( 2nd ` A ) ) - 1 ) ) )
11 10 adantr
 |-  ( ( ( ( 1st ` A ) ( Walks ` G ) ( 2nd ` A ) /\ ( 1st ` B ) ( Walks ` G ) ( 2nd ` B ) ) /\ ( 2nd ` A ) = ( 2nd ` B ) ) -> ( ( # ` ( 1st ` B ) ) = ( # ` ( 1st ` A ) ) <-> ( ( # ` ( 2nd ` B ) ) - 1 ) = ( ( # ` ( 2nd ` A ) ) - 1 ) ) )
12 7 11 mpbird
 |-  ( ( ( ( 1st ` A ) ( Walks ` G ) ( 2nd ` A ) /\ ( 1st ` B ) ( Walks ` G ) ( 2nd ` B ) ) /\ ( 2nd ` A ) = ( 2nd ` B ) ) -> ( # ` ( 1st ` B ) ) = ( # ` ( 1st ` A ) ) )
13 12 anim2i
 |-  ( ( ( # ` ( 1st ` A ) ) e. NN0 /\ ( ( ( 1st ` A ) ( Walks ` G ) ( 2nd ` A ) /\ ( 1st ` B ) ( Walks ` G ) ( 2nd ` B ) ) /\ ( 2nd ` A ) = ( 2nd ` B ) ) ) -> ( ( # ` ( 1st ` A ) ) e. NN0 /\ ( # ` ( 1st ` B ) ) = ( # ` ( 1st ` A ) ) ) )
14 13 exp44
 |-  ( ( # ` ( 1st ` A ) ) e. NN0 -> ( ( 1st ` A ) ( Walks ` G ) ( 2nd ` A ) -> ( ( 1st ` B ) ( Walks ` G ) ( 2nd ` B ) -> ( ( 2nd ` A ) = ( 2nd ` B ) -> ( ( # ` ( 1st ` A ) ) e. NN0 /\ ( # ` ( 1st ` B ) ) = ( # ` ( 1st ` A ) ) ) ) ) ) )
15 3 14 mpcom
 |-  ( ( 1st ` A ) ( Walks ` G ) ( 2nd ` A ) -> ( ( 1st ` B ) ( Walks ` G ) ( 2nd ` B ) -> ( ( 2nd ` A ) = ( 2nd ` B ) -> ( ( # ` ( 1st ` A ) ) e. NN0 /\ ( # ` ( 1st ` B ) ) = ( # ` ( 1st ` A ) ) ) ) ) )
16 2 15 syl5bi
 |-  ( ( 1st ` A ) ( Walks ` G ) ( 2nd ` A ) -> ( B e. ( Walks ` G ) -> ( ( 2nd ` A ) = ( 2nd ` B ) -> ( ( # ` ( 1st ` A ) ) e. NN0 /\ ( # ` ( 1st ` B ) ) = ( # ` ( 1st ` A ) ) ) ) ) )
17 1 16 sylbi
 |-  ( A e. ( Walks ` G ) -> ( B e. ( Walks ` G ) -> ( ( 2nd ` A ) = ( 2nd ` B ) -> ( ( # ` ( 1st ` A ) ) e. NN0 /\ ( # ` ( 1st ` B ) ) = ( # ` ( 1st ` A ) ) ) ) ) )
18 17 imp31
 |-  ( ( ( A e. ( Walks ` G ) /\ B e. ( Walks ` G ) ) /\ ( 2nd ` A ) = ( 2nd ` B ) ) -> ( ( # ` ( 1st ` A ) ) e. NN0 /\ ( # ` ( 1st ` B ) ) = ( # ` ( 1st ` A ) ) ) )
19 18 3adant1
 |-  ( ( G e. USPGraph /\ ( A e. ( Walks ` G ) /\ B e. ( Walks ` G ) ) /\ ( 2nd ` A ) = ( 2nd ` B ) ) -> ( ( # ` ( 1st ` A ) ) e. NN0 /\ ( # ` ( 1st ` B ) ) = ( # ` ( 1st ` A ) ) ) )
20 simpl
 |-  ( ( G e. USPGraph /\ ( A e. ( Walks ` G ) /\ B e. ( Walks ` G ) ) ) -> G e. USPGraph )
21 simpl
 |-  ( ( ( # ` ( 1st ` A ) ) e. NN0 /\ ( # ` ( 1st ` B ) ) = ( # ` ( 1st ` A ) ) ) -> ( # ` ( 1st ` A ) ) e. NN0 )
22 20 21 anim12i
 |-  ( ( ( G e. USPGraph /\ ( A e. ( Walks ` G ) /\ B e. ( Walks ` G ) ) ) /\ ( ( # ` ( 1st ` A ) ) e. NN0 /\ ( # ` ( 1st ` B ) ) = ( # ` ( 1st ` A ) ) ) ) -> ( G e. USPGraph /\ ( # ` ( 1st ` A ) ) e. NN0 ) )
23 simpl
 |-  ( ( A e. ( Walks ` G ) /\ B e. ( Walks ` G ) ) -> A e. ( Walks ` G ) )
24 23 adantl
 |-  ( ( G e. USPGraph /\ ( A e. ( Walks ` G ) /\ B e. ( Walks ` G ) ) ) -> A e. ( Walks ` G ) )
25 eqidd
 |-  ( ( ( # ` ( 1st ` A ) ) e. NN0 /\ ( # ` ( 1st ` B ) ) = ( # ` ( 1st ` A ) ) ) -> ( # ` ( 1st ` A ) ) = ( # ` ( 1st ` A ) ) )
26 24 25 anim12i
 |-  ( ( ( G e. USPGraph /\ ( A e. ( Walks ` G ) /\ B e. ( Walks ` G ) ) ) /\ ( ( # ` ( 1st ` A ) ) e. NN0 /\ ( # ` ( 1st ` B ) ) = ( # ` ( 1st ` A ) ) ) ) -> ( A e. ( Walks ` G ) /\ ( # ` ( 1st ` A ) ) = ( # ` ( 1st ` A ) ) ) )
27 simpr
 |-  ( ( A e. ( Walks ` G ) /\ B e. ( Walks ` G ) ) -> B e. ( Walks ` G ) )
28 27 adantl
 |-  ( ( G e. USPGraph /\ ( A e. ( Walks ` G ) /\ B e. ( Walks ` G ) ) ) -> B e. ( Walks ` G ) )
29 simpr
 |-  ( ( ( # ` ( 1st ` A ) ) e. NN0 /\ ( # ` ( 1st ` B ) ) = ( # ` ( 1st ` A ) ) ) -> ( # ` ( 1st ` B ) ) = ( # ` ( 1st ` A ) ) )
30 28 29 anim12i
 |-  ( ( ( G e. USPGraph /\ ( A e. ( Walks ` G ) /\ B e. ( Walks ` G ) ) ) /\ ( ( # ` ( 1st ` A ) ) e. NN0 /\ ( # ` ( 1st ` B ) ) = ( # ` ( 1st ` A ) ) ) ) -> ( B e. ( Walks ` G ) /\ ( # ` ( 1st ` B ) ) = ( # ` ( 1st ` A ) ) ) )
31 uspgr2wlkeq2
 |-  ( ( ( G e. USPGraph /\ ( # ` ( 1st ` A ) ) e. NN0 ) /\ ( A e. ( Walks ` G ) /\ ( # ` ( 1st ` A ) ) = ( # ` ( 1st ` A ) ) ) /\ ( B e. ( Walks ` G ) /\ ( # ` ( 1st ` B ) ) = ( # ` ( 1st ` A ) ) ) ) -> ( ( 2nd ` A ) = ( 2nd ` B ) -> A = B ) )
32 22 26 30 31 syl3anc
 |-  ( ( ( G e. USPGraph /\ ( A e. ( Walks ` G ) /\ B e. ( Walks ` G ) ) ) /\ ( ( # ` ( 1st ` A ) ) e. NN0 /\ ( # ` ( 1st ` B ) ) = ( # ` ( 1st ` A ) ) ) ) -> ( ( 2nd ` A ) = ( 2nd ` B ) -> A = B ) )
33 32 ex
 |-  ( ( G e. USPGraph /\ ( A e. ( Walks ` G ) /\ B e. ( Walks ` G ) ) ) -> ( ( ( # ` ( 1st ` A ) ) e. NN0 /\ ( # ` ( 1st ` B ) ) = ( # ` ( 1st ` A ) ) ) -> ( ( 2nd ` A ) = ( 2nd ` B ) -> A = B ) ) )
34 33 com23
 |-  ( ( G e. USPGraph /\ ( A e. ( Walks ` G ) /\ B e. ( Walks ` G ) ) ) -> ( ( 2nd ` A ) = ( 2nd ` B ) -> ( ( ( # ` ( 1st ` A ) ) e. NN0 /\ ( # ` ( 1st ` B ) ) = ( # ` ( 1st ` A ) ) ) -> A = B ) ) )
35 34 3impia
 |-  ( ( G e. USPGraph /\ ( A e. ( Walks ` G ) /\ B e. ( Walks ` G ) ) /\ ( 2nd ` A ) = ( 2nd ` B ) ) -> ( ( ( # ` ( 1st ` A ) ) e. NN0 /\ ( # ` ( 1st ` B ) ) = ( # ` ( 1st ` A ) ) ) -> A = B ) )
36 19 35 mpd
 |-  ( ( G e. USPGraph /\ ( A e. ( Walks ` G ) /\ B e. ( Walks ` G ) ) /\ ( 2nd ` A ) = ( 2nd ` B ) ) -> A = B )