Proof of Theorem ccats1pfxeq
Step | Hyp | Ref
| Expression |
1 | | oveq1 7262 |
. . . 4
⊢ (𝑊 = (𝑈 prefix (♯‘𝑊)) → (𝑊 ++ 〈“(lastS‘𝑈)”〉) = ((𝑈 prefix (♯‘𝑊)) ++
〈“(lastS‘𝑈)”〉)) |
2 | 1 | adantl 481 |
. . 3
⊢ (((𝑊 ∈ Word 𝑉 ∧ 𝑈 ∈ Word 𝑉 ∧ (♯‘𝑈) = ((♯‘𝑊) + 1)) ∧ 𝑊 = (𝑈 prefix (♯‘𝑊))) → (𝑊 ++ 〈“(lastS‘𝑈)”〉) = ((𝑈 prefix (♯‘𝑊)) ++
〈“(lastS‘𝑈)”〉)) |
3 | | lencl 14164 |
. . . . . . . . . . . 12
⊢ (𝑊 ∈ Word 𝑉 → (♯‘𝑊) ∈
ℕ0) |
4 | 3 | nn0cnd 12225 |
. . . . . . . . . . 11
⊢ (𝑊 ∈ Word 𝑉 → (♯‘𝑊) ∈ ℂ) |
5 | | pncan1 11329 |
. . . . . . . . . . 11
⊢
((♯‘𝑊)
∈ ℂ → (((♯‘𝑊) + 1) − 1) = (♯‘𝑊)) |
6 | 4, 5 | syl 17 |
. . . . . . . . . 10
⊢ (𝑊 ∈ Word 𝑉 → (((♯‘𝑊) + 1) − 1) = (♯‘𝑊)) |
7 | 6 | eqcomd 2744 |
. . . . . . . . 9
⊢ (𝑊 ∈ Word 𝑉 → (♯‘𝑊) = (((♯‘𝑊) + 1) − 1)) |
8 | 7 | 3ad2ant1 1131 |
. . . . . . . 8
⊢ ((𝑊 ∈ Word 𝑉 ∧ 𝑈 ∈ Word 𝑉 ∧ (♯‘𝑈) = ((♯‘𝑊) + 1)) → (♯‘𝑊) = (((♯‘𝑊) + 1) −
1)) |
9 | | oveq1 7262 |
. . . . . . . . . 10
⊢
((♯‘𝑈) =
((♯‘𝑊) + 1)
→ ((♯‘𝑈)
− 1) = (((♯‘𝑊) + 1) − 1)) |
10 | 9 | eqcomd 2744 |
. . . . . . . . 9
⊢
((♯‘𝑈) =
((♯‘𝑊) + 1)
→ (((♯‘𝑊)
+ 1) − 1) = ((♯‘𝑈) − 1)) |
11 | 10 | 3ad2ant3 1133 |
. . . . . . . 8
⊢ ((𝑊 ∈ Word 𝑉 ∧ 𝑈 ∈ Word 𝑉 ∧ (♯‘𝑈) = ((♯‘𝑊) + 1)) → (((♯‘𝑊) + 1) − 1) =
((♯‘𝑈) −
1)) |
12 | 8, 11 | eqtrd 2778 |
. . . . . . 7
⊢ ((𝑊 ∈ Word 𝑉 ∧ 𝑈 ∈ Word 𝑉 ∧ (♯‘𝑈) = ((♯‘𝑊) + 1)) → (♯‘𝑊) = ((♯‘𝑈) − 1)) |
13 | 12 | oveq2d 7271 |
. . . . . 6
⊢ ((𝑊 ∈ Word 𝑉 ∧ 𝑈 ∈ Word 𝑉 ∧ (♯‘𝑈) = ((♯‘𝑊) + 1)) → (𝑈 prefix (♯‘𝑊)) = (𝑈 prefix ((♯‘𝑈) − 1))) |
14 | 13 | oveq1d 7270 |
. . . . 5
⊢ ((𝑊 ∈ Word 𝑉 ∧ 𝑈 ∈ Word 𝑉 ∧ (♯‘𝑈) = ((♯‘𝑊) + 1)) → ((𝑈 prefix (♯‘𝑊)) ++ 〈“(lastS‘𝑈)”〉) = ((𝑈 prefix ((♯‘𝑈) − 1)) ++
〈“(lastS‘𝑈)”〉)) |
15 | | simp2 1135 |
. . . . . 6
⊢ ((𝑊 ∈ Word 𝑉 ∧ 𝑈 ∈ Word 𝑉 ∧ (♯‘𝑈) = ((♯‘𝑊) + 1)) → 𝑈 ∈ Word 𝑉) |
16 | | nn0p1gt0 12192 |
. . . . . . . . . 10
⊢
((♯‘𝑊)
∈ ℕ0 → 0 < ((♯‘𝑊) + 1)) |
17 | 3, 16 | syl 17 |
. . . . . . . . 9
⊢ (𝑊 ∈ Word 𝑉 → 0 < ((♯‘𝑊) + 1)) |
18 | 17 | 3ad2ant1 1131 |
. . . . . . . 8
⊢ ((𝑊 ∈ Word 𝑉 ∧ 𝑈 ∈ Word 𝑉 ∧ (♯‘𝑈) = ((♯‘𝑊) + 1)) → 0 < ((♯‘𝑊) + 1)) |
19 | | breq2 5074 |
. . . . . . . . 9
⊢
((♯‘𝑈) =
((♯‘𝑊) + 1)
→ (0 < (♯‘𝑈) ↔ 0 < ((♯‘𝑊) + 1))) |
20 | 19 | 3ad2ant3 1133 |
. . . . . . . 8
⊢ ((𝑊 ∈ Word 𝑉 ∧ 𝑈 ∈ Word 𝑉 ∧ (♯‘𝑈) = ((♯‘𝑊) + 1)) → (0 < (♯‘𝑈) ↔ 0 <
((♯‘𝑊) +
1))) |
21 | 18, 20 | mpbird 256 |
. . . . . . 7
⊢ ((𝑊 ∈ Word 𝑉 ∧ 𝑈 ∈ Word 𝑉 ∧ (♯‘𝑈) = ((♯‘𝑊) + 1)) → 0 < (♯‘𝑈)) |
22 | | hashneq0 14007 |
. . . . . . . 8
⊢ (𝑈 ∈ Word 𝑉 → (0 < (♯‘𝑈) ↔ 𝑈 ≠ ∅)) |
23 | 22 | 3ad2ant2 1132 |
. . . . . . 7
⊢ ((𝑊 ∈ Word 𝑉 ∧ 𝑈 ∈ Word 𝑉 ∧ (♯‘𝑈) = ((♯‘𝑊) + 1)) → (0 < (♯‘𝑈) ↔ 𝑈 ≠ ∅)) |
24 | 21, 23 | mpbid 231 |
. . . . . 6
⊢ ((𝑊 ∈ Word 𝑉 ∧ 𝑈 ∈ Word 𝑉 ∧ (♯‘𝑈) = ((♯‘𝑊) + 1)) → 𝑈 ≠ ∅) |
25 | | pfxlswccat 14354 |
. . . . . 6
⊢ ((𝑈 ∈ Word 𝑉 ∧ 𝑈 ≠ ∅) → ((𝑈 prefix ((♯‘𝑈) − 1)) ++
〈“(lastS‘𝑈)”〉) = 𝑈) |
26 | 15, 24, 25 | syl2anc 583 |
. . . . 5
⊢ ((𝑊 ∈ Word 𝑉 ∧ 𝑈 ∈ Word 𝑉 ∧ (♯‘𝑈) = ((♯‘𝑊) + 1)) → ((𝑈 prefix ((♯‘𝑈) − 1)) ++
〈“(lastS‘𝑈)”〉) = 𝑈) |
27 | 14, 26 | eqtrd 2778 |
. . . 4
⊢ ((𝑊 ∈ Word 𝑉 ∧ 𝑈 ∈ Word 𝑉 ∧ (♯‘𝑈) = ((♯‘𝑊) + 1)) → ((𝑈 prefix (♯‘𝑊)) ++ 〈“(lastS‘𝑈)”〉) = 𝑈) |
28 | 27 | adantr 480 |
. . 3
⊢ (((𝑊 ∈ Word 𝑉 ∧ 𝑈 ∈ Word 𝑉 ∧ (♯‘𝑈) = ((♯‘𝑊) + 1)) ∧ 𝑊 = (𝑈 prefix (♯‘𝑊))) → ((𝑈 prefix (♯‘𝑊)) ++ 〈“(lastS‘𝑈)”〉) = 𝑈) |
29 | 2, 28 | eqtr2d 2779 |
. 2
⊢ (((𝑊 ∈ Word 𝑉 ∧ 𝑈 ∈ Word 𝑉 ∧ (♯‘𝑈) = ((♯‘𝑊) + 1)) ∧ 𝑊 = (𝑈 prefix (♯‘𝑊))) → 𝑈 = (𝑊 ++ 〈“(lastS‘𝑈)”〉)) |
30 | 29 | ex 412 |
1
⊢ ((𝑊 ∈ Word 𝑉 ∧ 𝑈 ∈ Word 𝑉 ∧ (♯‘𝑈) = ((♯‘𝑊) + 1)) → (𝑊 = (𝑈 prefix (♯‘𝑊)) → 𝑈 = (𝑊 ++ 〈“(lastS‘𝑈)”〉))) |