Description: Two (nonempty) words are equal if and only if they have the same prefix and the same single symbol suffix. (Contributed by Alexander van der Vekens, 23-Sep-2018) (Revised by AV, 6-May-2020)
Ref | Expression | ||
---|---|---|---|
Assertion | pfxsuff1eqwrdeq | |
Step | Hyp | Ref | Expression |
---|---|---|---|
1 | hashgt0n0 | |
|
2 | lennncl | |
|
3 | 1 2 | syldan | |
4 | 3 | 3adant2 | |
5 | fzo0end | |
|
6 | 4 5 | syl | |
7 | pfxsuffeqwrdeq | |
|
8 | 6 7 | syld3an3 | |
9 | hashneq0 | |
|
10 | 9 | biimpd | |
11 | 10 | imdistani | |
12 | 11 | 3adant2 | |
13 | 12 | adantr | |
14 | swrdlsw | |
|
15 | 13 14 | syl | |
16 | breq2 | |
|
17 | 16 | 3anbi3d | |
18 | hashneq0 | |
|
19 | 18 | biimpd | |
20 | 19 | imdistani | |
21 | 20 | 3adant1 | |
22 | swrdlsw | |
|
23 | 21 22 | syl | |
24 | 17 23 | syl6bi | |
25 | 24 | impcom | |
26 | oveq1 | |
|
27 | id | |
|
28 | 26 27 | opeq12d | |
29 | 28 | oveq2d | |
30 | 29 | eqeq1d | |
31 | 30 | adantl | |
32 | 25 31 | mpbird | |
33 | 15 32 | eqeq12d | |
34 | fvexd | |
|
35 | fvex | |
|
36 | s111 | |
|
37 | 34 35 36 | sylancl | |
38 | 33 37 | bitrd | |
39 | 38 | anbi2d | |
40 | 39 | pm5.32da | |
41 | 8 40 | bitrd | |