Step | Hyp | Ref
| Expression |
1 | | eqwrd 13201 |
. . 3
⊢ ((𝑊 ∈ Word 𝑉 ∧ 𝑆 ∈ Word 𝑉) → (𝑊 = 𝑆 ↔ ((#‘𝑊) = (#‘𝑆) ∧ ∀𝑖 ∈ (0..^(#‘𝑊))(𝑊‘𝑖) = (𝑆‘𝑖)))) |
2 | 1 | 3adant3 1074 |
. 2
⊢ ((𝑊 ∈ Word 𝑉 ∧ 𝑆 ∈ Word 𝑉 ∧ 𝐼 ∈ (0..^(#‘𝑊))) → (𝑊 = 𝑆 ↔ ((#‘𝑊) = (#‘𝑆) ∧ ∀𝑖 ∈ (0..^(#‘𝑊))(𝑊‘𝑖) = (𝑆‘𝑖)))) |
3 | | elfzofz 12354 |
. . . . . . . . 9
⊢ (𝐼 ∈ (0..^(#‘𝑊)) → 𝐼 ∈ (0...(#‘𝑊))) |
4 | | fzosplit 12370 |
. . . . . . . . 9
⊢ (𝐼 ∈ (0...(#‘𝑊)) → (0..^(#‘𝑊)) = ((0..^𝐼) ∪ (𝐼..^(#‘𝑊)))) |
5 | 3, 4 | syl 17 |
. . . . . . . 8
⊢ (𝐼 ∈ (0..^(#‘𝑊)) → (0..^(#‘𝑊)) = ((0..^𝐼) ∪ (𝐼..^(#‘𝑊)))) |
6 | 5 | 3ad2ant3 1077 |
. . . . . . 7
⊢ ((𝑊 ∈ Word 𝑉 ∧ 𝑆 ∈ Word 𝑉 ∧ 𝐼 ∈ (0..^(#‘𝑊))) → (0..^(#‘𝑊)) = ((0..^𝐼) ∪ (𝐼..^(#‘𝑊)))) |
7 | 6 | adantr 480 |
. . . . . 6
⊢ (((𝑊 ∈ Word 𝑉 ∧ 𝑆 ∈ Word 𝑉 ∧ 𝐼 ∈ (0..^(#‘𝑊))) ∧ (#‘𝑊) = (#‘𝑆)) → (0..^(#‘𝑊)) = ((0..^𝐼) ∪ (𝐼..^(#‘𝑊)))) |
8 | 7 | raleqdv 3121 |
. . . . 5
⊢ (((𝑊 ∈ Word 𝑉 ∧ 𝑆 ∈ Word 𝑉 ∧ 𝐼 ∈ (0..^(#‘𝑊))) ∧ (#‘𝑊) = (#‘𝑆)) → (∀𝑖 ∈ (0..^(#‘𝑊))(𝑊‘𝑖) = (𝑆‘𝑖) ↔ ∀𝑖 ∈ ((0..^𝐼) ∪ (𝐼..^(#‘𝑊)))(𝑊‘𝑖) = (𝑆‘𝑖))) |
9 | | ralunb 3756 |
. . . . 5
⊢
(∀𝑖 ∈
((0..^𝐼) ∪ (𝐼..^(#‘𝑊)))(𝑊‘𝑖) = (𝑆‘𝑖) ↔ (∀𝑖 ∈ (0..^𝐼)(𝑊‘𝑖) = (𝑆‘𝑖) ∧ ∀𝑖 ∈ (𝐼..^(#‘𝑊))(𝑊‘𝑖) = (𝑆‘𝑖))) |
10 | 8, 9 | syl6bb 275 |
. . . 4
⊢ (((𝑊 ∈ Word 𝑉 ∧ 𝑆 ∈ Word 𝑉 ∧ 𝐼 ∈ (0..^(#‘𝑊))) ∧ (#‘𝑊) = (#‘𝑆)) → (∀𝑖 ∈ (0..^(#‘𝑊))(𝑊‘𝑖) = (𝑆‘𝑖) ↔ (∀𝑖 ∈ (0..^𝐼)(𝑊‘𝑖) = (𝑆‘𝑖) ∧ ∀𝑖 ∈ (𝐼..^(#‘𝑊))(𝑊‘𝑖) = (𝑆‘𝑖)))) |
11 | | eqidd 2611 |
. . . . . . 7
⊢ (((𝑊 ∈ Word 𝑉 ∧ 𝑆 ∈ Word 𝑉 ∧ 𝐼 ∈ (0..^(#‘𝑊))) ∧ (#‘𝑊) = (#‘𝑆)) → 𝐼 = 𝐼) |
12 | 11 | biantrurd 528 |
. . . . . 6
⊢ (((𝑊 ∈ Word 𝑉 ∧ 𝑆 ∈ Word 𝑉 ∧ 𝐼 ∈ (0..^(#‘𝑊))) ∧ (#‘𝑊) = (#‘𝑆)) → (∀𝑖 ∈ (0..^𝐼)(𝑊‘𝑖) = (𝑆‘𝑖) ↔ (𝐼 = 𝐼 ∧ ∀𝑖 ∈ (0..^𝐼)(𝑊‘𝑖) = (𝑆‘𝑖)))) |
13 | | 3simpa 1051 |
. . . . . . . 8
⊢ ((𝑊 ∈ Word 𝑉 ∧ 𝑆 ∈ Word 𝑉 ∧ 𝐼 ∈ (0..^(#‘𝑊))) → (𝑊 ∈ Word 𝑉 ∧ 𝑆 ∈ Word 𝑉)) |
14 | 13 | adantr 480 |
. . . . . . 7
⊢ (((𝑊 ∈ Word 𝑉 ∧ 𝑆 ∈ Word 𝑉 ∧ 𝐼 ∈ (0..^(#‘𝑊))) ∧ (#‘𝑊) = (#‘𝑆)) → (𝑊 ∈ Word 𝑉 ∧ 𝑆 ∈ Word 𝑉)) |
15 | | elfzonn0 12380 |
. . . . . . . . . 10
⊢ (𝐼 ∈ (0..^(#‘𝑊)) → 𝐼 ∈
ℕ0) |
16 | 15, 15 | jca 553 |
. . . . . . . . 9
⊢ (𝐼 ∈ (0..^(#‘𝑊)) → (𝐼 ∈ ℕ0 ∧ 𝐼 ∈
ℕ0)) |
17 | 16 | 3ad2ant3 1077 |
. . . . . . . 8
⊢ ((𝑊 ∈ Word 𝑉 ∧ 𝑆 ∈ Word 𝑉 ∧ 𝐼 ∈ (0..^(#‘𝑊))) → (𝐼 ∈ ℕ0 ∧ 𝐼 ∈
ℕ0)) |
18 | 17 | adantr 480 |
. . . . . . 7
⊢ (((𝑊 ∈ Word 𝑉 ∧ 𝑆 ∈ Word 𝑉 ∧ 𝐼 ∈ (0..^(#‘𝑊))) ∧ (#‘𝑊) = (#‘𝑆)) → (𝐼 ∈ ℕ0 ∧ 𝐼 ∈
ℕ0)) |
19 | | elfzo0le 12379 |
. . . . . . . . 9
⊢ (𝐼 ∈ (0..^(#‘𝑊)) → 𝐼 ≤ (#‘𝑊)) |
20 | 19 | 3ad2ant3 1077 |
. . . . . . . 8
⊢ ((𝑊 ∈ Word 𝑉 ∧ 𝑆 ∈ Word 𝑉 ∧ 𝐼 ∈ (0..^(#‘𝑊))) → 𝐼 ≤ (#‘𝑊)) |
21 | 20 | adantr 480 |
. . . . . . 7
⊢ (((𝑊 ∈ Word 𝑉 ∧ 𝑆 ∈ Word 𝑉 ∧ 𝐼 ∈ (0..^(#‘𝑊))) ∧ (#‘𝑊) = (#‘𝑆)) → 𝐼 ≤ (#‘𝑊)) |
22 | | breq2 4587 |
. . . . . . . . . 10
⊢
((#‘𝑆) =
(#‘𝑊) → (𝐼 ≤ (#‘𝑆) ↔ 𝐼 ≤ (#‘𝑊))) |
23 | 22 | eqcoms 2618 |
. . . . . . . . 9
⊢
((#‘𝑊) =
(#‘𝑆) → (𝐼 ≤ (#‘𝑆) ↔ 𝐼 ≤ (#‘𝑊))) |
24 | 23 | adantl 481 |
. . . . . . . 8
⊢ (((𝑊 ∈ Word 𝑉 ∧ 𝑆 ∈ Word 𝑉 ∧ 𝐼 ∈ (0..^(#‘𝑊))) ∧ (#‘𝑊) = (#‘𝑆)) → (𝐼 ≤ (#‘𝑆) ↔ 𝐼 ≤ (#‘𝑊))) |
25 | 21, 24 | mpbird 246 |
. . . . . . 7
⊢ (((𝑊 ∈ Word 𝑉 ∧ 𝑆 ∈ Word 𝑉 ∧ 𝐼 ∈ (0..^(#‘𝑊))) ∧ (#‘𝑊) = (#‘𝑆)) → 𝐼 ≤ (#‘𝑆)) |
26 | | pfxeq 40267 |
. . . . . . 7
⊢ (((𝑊 ∈ Word 𝑉 ∧ 𝑆 ∈ Word 𝑉) ∧ (𝐼 ∈ ℕ0 ∧ 𝐼 ∈ ℕ0)
∧ (𝐼 ≤
(#‘𝑊) ∧ 𝐼 ≤ (#‘𝑆))) → ((𝑊 prefix 𝐼) = (𝑆 prefix 𝐼) ↔ (𝐼 = 𝐼 ∧ ∀𝑖 ∈ (0..^𝐼)(𝑊‘𝑖) = (𝑆‘𝑖)))) |
27 | 14, 18, 21, 25, 26 | syl112anc 1322 |
. . . . . 6
⊢ (((𝑊 ∈ Word 𝑉 ∧ 𝑆 ∈ Word 𝑉 ∧ 𝐼 ∈ (0..^(#‘𝑊))) ∧ (#‘𝑊) = (#‘𝑆)) → ((𝑊 prefix 𝐼) = (𝑆 prefix 𝐼) ↔ (𝐼 = 𝐼 ∧ ∀𝑖 ∈ (0..^𝐼)(𝑊‘𝑖) = (𝑆‘𝑖)))) |
28 | 12, 27 | bitr4d 270 |
. . . . 5
⊢ (((𝑊 ∈ Word 𝑉 ∧ 𝑆 ∈ Word 𝑉 ∧ 𝐼 ∈ (0..^(#‘𝑊))) ∧ (#‘𝑊) = (#‘𝑆)) → (∀𝑖 ∈ (0..^𝐼)(𝑊‘𝑖) = (𝑆‘𝑖) ↔ (𝑊 prefix 𝐼) = (𝑆 prefix 𝐼))) |
29 | | lencl 13179 |
. . . . . . . . . 10
⊢ (𝑊 ∈ Word 𝑉 → (#‘𝑊) ∈
ℕ0) |
30 | 29, 15 | anim12i 588 |
. . . . . . . . 9
⊢ ((𝑊 ∈ Word 𝑉 ∧ 𝐼 ∈ (0..^(#‘𝑊))) → ((#‘𝑊) ∈ ℕ0 ∧ 𝐼 ∈
ℕ0)) |
31 | 30 | 3adant2 1073 |
. . . . . . . 8
⊢ ((𝑊 ∈ Word 𝑉 ∧ 𝑆 ∈ Word 𝑉 ∧ 𝐼 ∈ (0..^(#‘𝑊))) → ((#‘𝑊) ∈ ℕ0 ∧ 𝐼 ∈
ℕ0)) |
32 | 31 | ancomd 466 |
. . . . . . 7
⊢ ((𝑊 ∈ Word 𝑉 ∧ 𝑆 ∈ Word 𝑉 ∧ 𝐼 ∈ (0..^(#‘𝑊))) → (𝐼 ∈ ℕ0 ∧
(#‘𝑊) ∈
ℕ0)) |
33 | 32 | adantr 480 |
. . . . . 6
⊢ (((𝑊 ∈ Word 𝑉 ∧ 𝑆 ∈ Word 𝑉 ∧ 𝐼 ∈ (0..^(#‘𝑊))) ∧ (#‘𝑊) = (#‘𝑆)) → (𝐼 ∈ ℕ0 ∧
(#‘𝑊) ∈
ℕ0)) |
34 | 29 | nn0red 11229 |
. . . . . . . . 9
⊢ (𝑊 ∈ Word 𝑉 → (#‘𝑊) ∈ ℝ) |
35 | 34 | leidd 10473 |
. . . . . . . 8
⊢ (𝑊 ∈ Word 𝑉 → (#‘𝑊) ≤ (#‘𝑊)) |
36 | 35 | 3ad2ant1 1075 |
. . . . . . 7
⊢ ((𝑊 ∈ Word 𝑉 ∧ 𝑆 ∈ Word 𝑉 ∧ 𝐼 ∈ (0..^(#‘𝑊))) → (#‘𝑊) ≤ (#‘𝑊)) |
37 | 36 | adantr 480 |
. . . . . 6
⊢ (((𝑊 ∈ Word 𝑉 ∧ 𝑆 ∈ Word 𝑉 ∧ 𝐼 ∈ (0..^(#‘𝑊))) ∧ (#‘𝑊) = (#‘𝑆)) → (#‘𝑊) ≤ (#‘𝑊)) |
38 | 34 | 3ad2ant1 1075 |
. . . . . . 7
⊢ ((𝑊 ∈ Word 𝑉 ∧ 𝑆 ∈ Word 𝑉 ∧ 𝐼 ∈ (0..^(#‘𝑊))) → (#‘𝑊) ∈ ℝ) |
39 | | eqle 10018 |
. . . . . . 7
⊢
(((#‘𝑊) ∈
ℝ ∧ (#‘𝑊) =
(#‘𝑆)) →
(#‘𝑊) ≤
(#‘𝑆)) |
40 | 38, 39 | sylan 487 |
. . . . . 6
⊢ (((𝑊 ∈ Word 𝑉 ∧ 𝑆 ∈ Word 𝑉 ∧ 𝐼 ∈ (0..^(#‘𝑊))) ∧ (#‘𝑊) = (#‘𝑆)) → (#‘𝑊) ≤ (#‘𝑆)) |
41 | | swrdspsleq 13301 |
. . . . . . 7
⊢ (((𝑊 ∈ Word 𝑉 ∧ 𝑆 ∈ Word 𝑉) ∧ (𝐼 ∈ ℕ0 ∧
(#‘𝑊) ∈
ℕ0) ∧ ((#‘𝑊) ≤ (#‘𝑊) ∧ (#‘𝑊) ≤ (#‘𝑆))) → ((𝑊 substr 〈𝐼, (#‘𝑊)〉) = (𝑆 substr 〈𝐼, (#‘𝑊)〉) ↔ ∀𝑖 ∈ (𝐼..^(#‘𝑊))(𝑊‘𝑖) = (𝑆‘𝑖))) |
42 | 41 | bicomd 212 |
. . . . . 6
⊢ (((𝑊 ∈ Word 𝑉 ∧ 𝑆 ∈ Word 𝑉) ∧ (𝐼 ∈ ℕ0 ∧
(#‘𝑊) ∈
ℕ0) ∧ ((#‘𝑊) ≤ (#‘𝑊) ∧ (#‘𝑊) ≤ (#‘𝑆))) → (∀𝑖 ∈ (𝐼..^(#‘𝑊))(𝑊‘𝑖) = (𝑆‘𝑖) ↔ (𝑊 substr 〈𝐼, (#‘𝑊)〉) = (𝑆 substr 〈𝐼, (#‘𝑊)〉))) |
43 | 14, 33, 37, 40, 42 | syl112anc 1322 |
. . . . 5
⊢ (((𝑊 ∈ Word 𝑉 ∧ 𝑆 ∈ Word 𝑉 ∧ 𝐼 ∈ (0..^(#‘𝑊))) ∧ (#‘𝑊) = (#‘𝑆)) → (∀𝑖 ∈ (𝐼..^(#‘𝑊))(𝑊‘𝑖) = (𝑆‘𝑖) ↔ (𝑊 substr 〈𝐼, (#‘𝑊)〉) = (𝑆 substr 〈𝐼, (#‘𝑊)〉))) |
44 | 28, 43 | anbi12d 743 |
. . . 4
⊢ (((𝑊 ∈ Word 𝑉 ∧ 𝑆 ∈ Word 𝑉 ∧ 𝐼 ∈ (0..^(#‘𝑊))) ∧ (#‘𝑊) = (#‘𝑆)) → ((∀𝑖 ∈ (0..^𝐼)(𝑊‘𝑖) = (𝑆‘𝑖) ∧ ∀𝑖 ∈ (𝐼..^(#‘𝑊))(𝑊‘𝑖) = (𝑆‘𝑖)) ↔ ((𝑊 prefix 𝐼) = (𝑆 prefix 𝐼) ∧ (𝑊 substr 〈𝐼, (#‘𝑊)〉) = (𝑆 substr 〈𝐼, (#‘𝑊)〉)))) |
45 | 10, 44 | bitrd 267 |
. . 3
⊢ (((𝑊 ∈ Word 𝑉 ∧ 𝑆 ∈ Word 𝑉 ∧ 𝐼 ∈ (0..^(#‘𝑊))) ∧ (#‘𝑊) = (#‘𝑆)) → (∀𝑖 ∈ (0..^(#‘𝑊))(𝑊‘𝑖) = (𝑆‘𝑖) ↔ ((𝑊 prefix 𝐼) = (𝑆 prefix 𝐼) ∧ (𝑊 substr 〈𝐼, (#‘𝑊)〉) = (𝑆 substr 〈𝐼, (#‘𝑊)〉)))) |
46 | 45 | pm5.32da 671 |
. 2
⊢ ((𝑊 ∈ Word 𝑉 ∧ 𝑆 ∈ Word 𝑉 ∧ 𝐼 ∈ (0..^(#‘𝑊))) → (((#‘𝑊) = (#‘𝑆) ∧ ∀𝑖 ∈ (0..^(#‘𝑊))(𝑊‘𝑖) = (𝑆‘𝑖)) ↔ ((#‘𝑊) = (#‘𝑆) ∧ ((𝑊 prefix 𝐼) = (𝑆 prefix 𝐼) ∧ (𝑊 substr 〈𝐼, (#‘𝑊)〉) = (𝑆 substr 〈𝐼, (#‘𝑊)〉))))) |
47 | 2, 46 | bitrd 267 |
1
⊢ ((𝑊 ∈ Word 𝑉 ∧ 𝑆 ∈ Word 𝑉 ∧ 𝐼 ∈ (0..^(#‘𝑊))) → (𝑊 = 𝑆 ↔ ((#‘𝑊) = (#‘𝑆) ∧ ((𝑊 prefix 𝐼) = (𝑆 prefix 𝐼) ∧ (𝑊 substr 〈𝐼, (#‘𝑊)〉) = (𝑆 substr 〈𝐼, (#‘𝑊)〉))))) |