Proof of Theorem ccatopth
Step | Hyp | Ref
| Expression |
1 | | oveq1 7262 |
. . . . 5
⊢ ((𝐴 ++ 𝐵) = (𝐶 ++ 𝐷) → ((𝐴 ++ 𝐵) prefix (♯‘𝐴)) = ((𝐶 ++ 𝐷) prefix (♯‘𝐴))) |
2 | | pfxccat1 14343 |
. . . . . 6
⊢ ((𝐴 ∈ Word 𝑋 ∧ 𝐵 ∈ Word 𝑋) → ((𝐴 ++ 𝐵) prefix (♯‘𝐴)) = 𝐴) |
3 | | oveq2 7263 |
. . . . . . 7
⊢
((♯‘𝐴) =
(♯‘𝐶) →
((𝐶 ++ 𝐷) prefix (♯‘𝐴)) = ((𝐶 ++ 𝐷) prefix (♯‘𝐶))) |
4 | | pfxccat1 14343 |
. . . . . . 7
⊢ ((𝐶 ∈ Word 𝑋 ∧ 𝐷 ∈ Word 𝑋) → ((𝐶 ++ 𝐷) prefix (♯‘𝐶)) = 𝐶) |
5 | 3, 4 | sylan9eqr 2801 |
. . . . . 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 1113 |
. . 3
⊢ (((𝐴 ∈ Word 𝑋 ∧ 𝐵 ∈ Word 𝑋) ∧ (𝐶 ∈ Word 𝑋 ∧ 𝐷 ∈ Word 𝑋) ∧ (♯‘𝐴) = (♯‘𝐶)) → ((𝐴 ++ 𝐵) = (𝐶 ++ 𝐷) → 𝐴 = 𝐶)) |
9 | | simpr 484 |
. . . . . 6
⊢ ((((𝐴 ∈ Word 𝑋 ∧ 𝐵 ∈ Word 𝑋) ∧ (𝐶 ∈ Word 𝑋 ∧ 𝐷 ∈ Word 𝑋) ∧ (♯‘𝐴) = (♯‘𝐶)) ∧ (𝐴 ++ 𝐵) = (𝐶 ++ 𝐷)) → (𝐴 ++ 𝐵) = (𝐶 ++ 𝐷)) |
10 | | simpl3 1191 |
. . . . . . 7
⊢ ((((𝐴 ∈ Word 𝑋 ∧ 𝐵 ∈ Word 𝑋) ∧ (𝐶 ∈ Word 𝑋 ∧ 𝐷 ∈ Word 𝑋) ∧ (♯‘𝐴) = (♯‘𝐶)) ∧ (𝐴 ++ 𝐵) = (𝐶 ++ 𝐷)) → (♯‘𝐴) = (♯‘𝐶)) |
11 | 9 | fveq2d 6760 |
. . . . . . . 8
⊢ ((((𝐴 ∈ Word 𝑋 ∧ 𝐵 ∈ Word 𝑋) ∧ (𝐶 ∈ Word 𝑋 ∧ 𝐷 ∈ Word 𝑋) ∧ (♯‘𝐴) = (♯‘𝐶)) ∧ (𝐴 ++ 𝐵) = (𝐶 ++ 𝐷)) → (♯‘(𝐴 ++ 𝐵)) = (♯‘(𝐶 ++ 𝐷))) |
12 | | simpl1 1189 |
. . . . . . . . 9
⊢ ((((𝐴 ∈ Word 𝑋 ∧ 𝐵 ∈ Word 𝑋) ∧ (𝐶 ∈ Word 𝑋 ∧ 𝐷 ∈ Word 𝑋) ∧ (♯‘𝐴) = (♯‘𝐶)) ∧ (𝐴 ++ 𝐵) = (𝐶 ++ 𝐷)) → (𝐴 ∈ Word 𝑋 ∧ 𝐵 ∈ Word 𝑋)) |
13 | | ccatlen 14206 |
. . . . . . . . 9
⊢ ((𝐴 ∈ Word 𝑋 ∧ 𝐵 ∈ Word 𝑋) → (♯‘(𝐴 ++ 𝐵)) = ((♯‘𝐴) + (♯‘𝐵))) |
14 | 12, 13 | syl 17 |
. . . . . . . 8
⊢ ((((𝐴 ∈ Word 𝑋 ∧ 𝐵 ∈ Word 𝑋) ∧ (𝐶 ∈ Word 𝑋 ∧ 𝐷 ∈ Word 𝑋) ∧ (♯‘𝐴) = (♯‘𝐶)) ∧ (𝐴 ++ 𝐵) = (𝐶 ++ 𝐷)) → (♯‘(𝐴 ++ 𝐵)) = ((♯‘𝐴) + (♯‘𝐵))) |
15 | | simpl2 1190 |
. . . . . . . . 9
⊢ ((((𝐴 ∈ Word 𝑋 ∧ 𝐵 ∈ Word 𝑋) ∧ (𝐶 ∈ Word 𝑋 ∧ 𝐷 ∈ Word 𝑋) ∧ (♯‘𝐴) = (♯‘𝐶)) ∧ (𝐴 ++ 𝐵) = (𝐶 ++ 𝐷)) → (𝐶 ∈ Word 𝑋 ∧ 𝐷 ∈ Word 𝑋)) |
16 | | ccatlen 14206 |
. . . . . . . . 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 4809 |
. . . . . 6
⊢ ((((𝐴 ∈ Word 𝑋 ∧ 𝐵 ∈ Word 𝑋) ∧ (𝐶 ∈ Word 𝑋 ∧ 𝐷 ∈ Word 𝑋) ∧ (♯‘𝐴) = (♯‘𝐶)) ∧ (𝐴 ++ 𝐵) = (𝐶 ++ 𝐷)) → 〈(♯‘𝐴), ((♯‘𝐴) + (♯‘𝐵))〉 =
〈(♯‘𝐶),
((♯‘𝐶) +
(♯‘𝐷))〉) |
20 | 9, 19 | oveq12d 7273 |
. . . . 5
⊢ ((((𝐴 ∈ Word 𝑋 ∧ 𝐵 ∈ Word 𝑋) ∧ (𝐶 ∈ Word 𝑋 ∧ 𝐷 ∈ Word 𝑋) ∧ (♯‘𝐴) = (♯‘𝐶)) ∧ (𝐴 ++ 𝐵) = (𝐶 ++ 𝐷)) → ((𝐴 ++ 𝐵) substr 〈(♯‘𝐴), ((♯‘𝐴) + (♯‘𝐵))〉) = ((𝐶 ++ 𝐷) substr 〈(♯‘𝐶), ((♯‘𝐶) + (♯‘𝐷))〉)) |
21 | | swrdccat2 14310 |
. . . . . 6
⊢ ((𝐴 ∈ Word 𝑋 ∧ 𝐵 ∈ Word 𝑋) → ((𝐴 ++ 𝐵) substr 〈(♯‘𝐴), ((♯‘𝐴) + (♯‘𝐵))〉) = 𝐵) |
22 | 12, 21 | syl 17 |
. . . . 5
⊢ ((((𝐴 ∈ Word 𝑋 ∧ 𝐵 ∈ Word 𝑋) ∧ (𝐶 ∈ Word 𝑋 ∧ 𝐷 ∈ Word 𝑋) ∧ (♯‘𝐴) = (♯‘𝐶)) ∧ (𝐴 ++ 𝐵) = (𝐶 ++ 𝐷)) → ((𝐴 ++ 𝐵) substr 〈(♯‘𝐴), ((♯‘𝐴) + (♯‘𝐵))〉) = 𝐵) |
23 | | swrdccat2 14310 |
. . . . . 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 412 |
. . 3
⊢ (((𝐴 ∈ Word 𝑋 ∧ 𝐵 ∈ Word 𝑋) ∧ (𝐶 ∈ Word 𝑋 ∧ 𝐷 ∈ Word 𝑋) ∧ (♯‘𝐴) = (♯‘𝐶)) → ((𝐴 ++ 𝐵) = (𝐶 ++ 𝐷) → 𝐵 = 𝐷)) |
27 | 8, 26 | jcad 512 |
. 2
⊢ (((𝐴 ∈ Word 𝑋 ∧ 𝐵 ∈ Word 𝑋) ∧ (𝐶 ∈ Word 𝑋 ∧ 𝐷 ∈ Word 𝑋) ∧ (♯‘𝐴) = (♯‘𝐶)) → ((𝐴 ++ 𝐵) = (𝐶 ++ 𝐷) → (𝐴 = 𝐶 ∧ 𝐵 = 𝐷))) |
28 | | oveq12 7264 |
. 2
⊢ ((𝐴 = 𝐶 ∧ 𝐵 = 𝐷) → (𝐴 ++ 𝐵) = (𝐶 ++ 𝐷)) |
29 | 27, 28 | impbid1 224 |
1
⊢ (((𝐴 ∈ Word 𝑋 ∧ 𝐵 ∈ Word 𝑋) ∧ (𝐶 ∈ Word 𝑋 ∧ 𝐷 ∈ Word 𝑋) ∧ (♯‘𝐴) = (♯‘𝐶)) → ((𝐴 ++ 𝐵) = (𝐶 ++ 𝐷) ↔ (𝐴 = 𝐶 ∧ 𝐵 = 𝐷))) |