Proof of Theorem ccatopth
Step | Hyp | Ref
| Expression |
1 | | oveq1 7282 |
. . . . 5
⊢ ((𝐴 ++ 𝐵) = (𝐶 ++ 𝐷) → ((𝐴 ++ 𝐵) prefix (♯‘𝐴)) = ((𝐶 ++ 𝐷) prefix (♯‘𝐴))) |
2 | | pfxccat1 14415 |
. . . . . 6
⊢ ((𝐴 ∈ Word 𝑋 ∧ 𝐵 ∈ Word 𝑋) → ((𝐴 ++ 𝐵) prefix (♯‘𝐴)) = 𝐴) |
3 | | oveq2 7283 |
. . . . . . 7
⊢
((♯‘𝐴) =
(♯‘𝐶) →
((𝐶 ++ 𝐷) prefix (♯‘𝐴)) = ((𝐶 ++ 𝐷) prefix (♯‘𝐶))) |
4 | | pfxccat1 14415 |
. . . . . . 7
⊢ ((𝐶 ∈ Word 𝑋 ∧ 𝐷 ∈ Word 𝑋) → ((𝐶 ++ 𝐷) prefix (♯‘𝐶)) = 𝐶) |
5 | 3, 4 | sylan9eqr 2800 |
. . . . . 6
⊢ (((𝐶 ∈ Word 𝑋 ∧ 𝐷 ∈ Word 𝑋) ∧ (♯‘𝐴) = (♯‘𝐶)) → ((𝐶 ++ 𝐷) prefix (♯‘𝐴)) = 𝐶) |
6 | 2, 5 | eqeqan12d 2752 |
. . . . 5
⊢ (((𝐴 ∈ Word 𝑋 ∧ 𝐵 ∈ Word 𝑋) ∧ ((𝐶 ∈ Word 𝑋 ∧ 𝐷 ∈ Word 𝑋) ∧ (♯‘𝐴) = (♯‘𝐶))) → (((𝐴 ++ 𝐵) prefix (♯‘𝐴)) = ((𝐶 ++ 𝐷) prefix (♯‘𝐴)) ↔ 𝐴 = 𝐶)) |
7 | 1, 6 | syl5ib 243 |
. . . 4
⊢ (((𝐴 ∈ Word 𝑋 ∧ 𝐵 ∈ Word 𝑋) ∧ ((𝐶 ∈ Word 𝑋 ∧ 𝐷 ∈ Word 𝑋) ∧ (♯‘𝐴) = (♯‘𝐶))) → ((𝐴 ++ 𝐵) = (𝐶 ++ 𝐷) → 𝐴 = 𝐶)) |
8 | 7 | 3impb 1114 |
. . 3
⊢ (((𝐴 ∈ Word 𝑋 ∧ 𝐵 ∈ Word 𝑋) ∧ (𝐶 ∈ Word 𝑋 ∧ 𝐷 ∈ Word 𝑋) ∧ (♯‘𝐴) = (♯‘𝐶)) → ((𝐴 ++ 𝐵) = (𝐶 ++ 𝐷) → 𝐴 = 𝐶)) |
9 | | simpr 485 |
. . . . . 6
⊢ ((((𝐴 ∈ Word 𝑋 ∧ 𝐵 ∈ Word 𝑋) ∧ (𝐶 ∈ Word 𝑋 ∧ 𝐷 ∈ Word 𝑋) ∧ (♯‘𝐴) = (♯‘𝐶)) ∧ (𝐴 ++ 𝐵) = (𝐶 ++ 𝐷)) → (𝐴 ++ 𝐵) = (𝐶 ++ 𝐷)) |
10 | | simpl3 1192 |
. . . . . . 7
⊢ ((((𝐴 ∈ Word 𝑋 ∧ 𝐵 ∈ Word 𝑋) ∧ (𝐶 ∈ Word 𝑋 ∧ 𝐷 ∈ Word 𝑋) ∧ (♯‘𝐴) = (♯‘𝐶)) ∧ (𝐴 ++ 𝐵) = (𝐶 ++ 𝐷)) → (♯‘𝐴) = (♯‘𝐶)) |
11 | 9 | fveq2d 6778 |
. . . . . . . 8
⊢ ((((𝐴 ∈ Word 𝑋 ∧ 𝐵 ∈ Word 𝑋) ∧ (𝐶 ∈ Word 𝑋 ∧ 𝐷 ∈ Word 𝑋) ∧ (♯‘𝐴) = (♯‘𝐶)) ∧ (𝐴 ++ 𝐵) = (𝐶 ++ 𝐷)) → (♯‘(𝐴 ++ 𝐵)) = (♯‘(𝐶 ++ 𝐷))) |
12 | | simpl1 1190 |
. . . . . . . . 9
⊢ ((((𝐴 ∈ Word 𝑋 ∧ 𝐵 ∈ Word 𝑋) ∧ (𝐶 ∈ Word 𝑋 ∧ 𝐷 ∈ Word 𝑋) ∧ (♯‘𝐴) = (♯‘𝐶)) ∧ (𝐴 ++ 𝐵) = (𝐶 ++ 𝐷)) → (𝐴 ∈ Word 𝑋 ∧ 𝐵 ∈ Word 𝑋)) |
13 | | ccatlen 14278 |
. . . . . . . . 9
⊢ ((𝐴 ∈ Word 𝑋 ∧ 𝐵 ∈ Word 𝑋) → (♯‘(𝐴 ++ 𝐵)) = ((♯‘𝐴) + (♯‘𝐵))) |
14 | 12, 13 | syl 17 |
. . . . . . . 8
⊢ ((((𝐴 ∈ Word 𝑋 ∧ 𝐵 ∈ Word 𝑋) ∧ (𝐶 ∈ Word 𝑋 ∧ 𝐷 ∈ Word 𝑋) ∧ (♯‘𝐴) = (♯‘𝐶)) ∧ (𝐴 ++ 𝐵) = (𝐶 ++ 𝐷)) → (♯‘(𝐴 ++ 𝐵)) = ((♯‘𝐴) + (♯‘𝐵))) |
15 | | simpl2 1191 |
. . . . . . . . 9
⊢ ((((𝐴 ∈ Word 𝑋 ∧ 𝐵 ∈ Word 𝑋) ∧ (𝐶 ∈ Word 𝑋 ∧ 𝐷 ∈ Word 𝑋) ∧ (♯‘𝐴) = (♯‘𝐶)) ∧ (𝐴 ++ 𝐵) = (𝐶 ++ 𝐷)) → (𝐶 ∈ Word 𝑋 ∧ 𝐷 ∈ Word 𝑋)) |
16 | | ccatlen 14278 |
. . . . . . . . 9
⊢ ((𝐶 ∈ Word 𝑋 ∧ 𝐷 ∈ Word 𝑋) → (♯‘(𝐶 ++ 𝐷)) = ((♯‘𝐶) + (♯‘𝐷))) |
17 | 15, 16 | syl 17 |
. . . . . . . 8
⊢ ((((𝐴 ∈ Word 𝑋 ∧ 𝐵 ∈ Word 𝑋) ∧ (𝐶 ∈ Word 𝑋 ∧ 𝐷 ∈ Word 𝑋) ∧ (♯‘𝐴) = (♯‘𝐶)) ∧ (𝐴 ++ 𝐵) = (𝐶 ++ 𝐷)) → (♯‘(𝐶 ++ 𝐷)) = ((♯‘𝐶) + (♯‘𝐷))) |
18 | 11, 14, 17 | 3eqtr3d 2786 |
. . . . . . 7
⊢ ((((𝐴 ∈ Word 𝑋 ∧ 𝐵 ∈ Word 𝑋) ∧ (𝐶 ∈ Word 𝑋 ∧ 𝐷 ∈ Word 𝑋) ∧ (♯‘𝐴) = (♯‘𝐶)) ∧ (𝐴 ++ 𝐵) = (𝐶 ++ 𝐷)) → ((♯‘𝐴) + (♯‘𝐵)) = ((♯‘𝐶) + (♯‘𝐷))) |
19 | 10, 18 | opeq12d 4812 |
. . . . . 6
⊢ ((((𝐴 ∈ Word 𝑋 ∧ 𝐵 ∈ Word 𝑋) ∧ (𝐶 ∈ Word 𝑋 ∧ 𝐷 ∈ Word 𝑋) ∧ (♯‘𝐴) = (♯‘𝐶)) ∧ (𝐴 ++ 𝐵) = (𝐶 ++ 𝐷)) → 〈(♯‘𝐴), ((♯‘𝐴) + (♯‘𝐵))〉 =
〈(♯‘𝐶),
((♯‘𝐶) +
(♯‘𝐷))〉) |
20 | 9, 19 | oveq12d 7293 |
. . . . 5
⊢ ((((𝐴 ∈ Word 𝑋 ∧ 𝐵 ∈ Word 𝑋) ∧ (𝐶 ∈ Word 𝑋 ∧ 𝐷 ∈ Word 𝑋) ∧ (♯‘𝐴) = (♯‘𝐶)) ∧ (𝐴 ++ 𝐵) = (𝐶 ++ 𝐷)) → ((𝐴 ++ 𝐵) substr 〈(♯‘𝐴), ((♯‘𝐴) + (♯‘𝐵))〉) = ((𝐶 ++ 𝐷) substr 〈(♯‘𝐶), ((♯‘𝐶) + (♯‘𝐷))〉)) |
21 | | swrdccat2 14382 |
. . . . . 6
⊢ ((𝐴 ∈ Word 𝑋 ∧ 𝐵 ∈ Word 𝑋) → ((𝐴 ++ 𝐵) substr 〈(♯‘𝐴), ((♯‘𝐴) + (♯‘𝐵))〉) = 𝐵) |
22 | 12, 21 | syl 17 |
. . . . 5
⊢ ((((𝐴 ∈ Word 𝑋 ∧ 𝐵 ∈ Word 𝑋) ∧ (𝐶 ∈ Word 𝑋 ∧ 𝐷 ∈ Word 𝑋) ∧ (♯‘𝐴) = (♯‘𝐶)) ∧ (𝐴 ++ 𝐵) = (𝐶 ++ 𝐷)) → ((𝐴 ++ 𝐵) substr 〈(♯‘𝐴), ((♯‘𝐴) + (♯‘𝐵))〉) = 𝐵) |
23 | | swrdccat2 14382 |
. . . . . 6
⊢ ((𝐶 ∈ Word 𝑋 ∧ 𝐷 ∈ Word 𝑋) → ((𝐶 ++ 𝐷) substr 〈(♯‘𝐶), ((♯‘𝐶) + (♯‘𝐷))〉) = 𝐷) |
24 | 15, 23 | syl 17 |
. . . . 5
⊢ ((((𝐴 ∈ Word 𝑋 ∧ 𝐵 ∈ Word 𝑋) ∧ (𝐶 ∈ Word 𝑋 ∧ 𝐷 ∈ Word 𝑋) ∧ (♯‘𝐴) = (♯‘𝐶)) ∧ (𝐴 ++ 𝐵) = (𝐶 ++ 𝐷)) → ((𝐶 ++ 𝐷) substr 〈(♯‘𝐶), ((♯‘𝐶) + (♯‘𝐷))〉) = 𝐷) |
25 | 20, 22, 24 | 3eqtr3d 2786 |
. . . 4
⊢ ((((𝐴 ∈ Word 𝑋 ∧ 𝐵 ∈ Word 𝑋) ∧ (𝐶 ∈ Word 𝑋 ∧ 𝐷 ∈ Word 𝑋) ∧ (♯‘𝐴) = (♯‘𝐶)) ∧ (𝐴 ++ 𝐵) = (𝐶 ++ 𝐷)) → 𝐵 = 𝐷) |
26 | 25 | ex 413 |
. . 3
⊢ (((𝐴 ∈ Word 𝑋 ∧ 𝐵 ∈ Word 𝑋) ∧ (𝐶 ∈ Word 𝑋 ∧ 𝐷 ∈ Word 𝑋) ∧ (♯‘𝐴) = (♯‘𝐶)) → ((𝐴 ++ 𝐵) = (𝐶 ++ 𝐷) → 𝐵 = 𝐷)) |
27 | 8, 26 | jcad 513 |
. 2
⊢ (((𝐴 ∈ Word 𝑋 ∧ 𝐵 ∈ Word 𝑋) ∧ (𝐶 ∈ Word 𝑋 ∧ 𝐷 ∈ Word 𝑋) ∧ (♯‘𝐴) = (♯‘𝐶)) → ((𝐴 ++ 𝐵) = (𝐶 ++ 𝐷) → (𝐴 = 𝐶 ∧ 𝐵 = 𝐷))) |
28 | | oveq12 7284 |
. 2
⊢ ((𝐴 = 𝐶 ∧ 𝐵 = 𝐷) → (𝐴 ++ 𝐵) = (𝐶 ++ 𝐷)) |
29 | 27, 28 | impbid1 224 |
1
⊢ (((𝐴 ∈ Word 𝑋 ∧ 𝐵 ∈ Word 𝑋) ∧ (𝐶 ∈ Word 𝑋 ∧ 𝐷 ∈ Word 𝑋) ∧ (♯‘𝐴) = (♯‘𝐶)) → ((𝐴 ++ 𝐵) = (𝐶 ++ 𝐷) ↔ (𝐴 = 𝐶 ∧ 𝐵 = 𝐷))) |