Proof of Theorem pfxccat3a
Step | Hyp | Ref
| Expression |
1 | | simprl 767 |
. . . . . 6
⊢ ((𝑁 ≤ 𝐿 ∧ ((𝐴 ∈ Word 𝑉 ∧ 𝐵 ∈ Word 𝑉) ∧ 𝑁 ∈ (0...(𝐿 + 𝑀)))) → (𝐴 ∈ Word 𝑉 ∧ 𝐵 ∈ Word 𝑉)) |
2 | | elfznn0 13278 |
. . . . . . . . 9
⊢ (𝑁 ∈ (0...(𝐿 + 𝑀)) → 𝑁 ∈
ℕ0) |
3 | 2 | adantl 481 |
. . . . . . . 8
⊢ (((𝐴 ∈ Word 𝑉 ∧ 𝐵 ∈ Word 𝑉) ∧ 𝑁 ∈ (0...(𝐿 + 𝑀))) → 𝑁 ∈
ℕ0) |
4 | 3 | adantl 481 |
. . . . . . 7
⊢ ((𝑁 ≤ 𝐿 ∧ ((𝐴 ∈ Word 𝑉 ∧ 𝐵 ∈ Word 𝑉) ∧ 𝑁 ∈ (0...(𝐿 + 𝑀)))) → 𝑁 ∈
ℕ0) |
5 | | swrdccatin2.l |
. . . . . . . . . . 11
⊢ 𝐿 = (♯‘𝐴) |
6 | | lencl 14164 |
. . . . . . . . . . 11
⊢ (𝐴 ∈ Word 𝑉 → (♯‘𝐴) ∈
ℕ0) |
7 | 5, 6 | eqeltrid 2843 |
. . . . . . . . . 10
⊢ (𝐴 ∈ Word 𝑉 → 𝐿 ∈
ℕ0) |
8 | 7 | adantr 480 |
. . . . . . . . 9
⊢ ((𝐴 ∈ Word 𝑉 ∧ 𝐵 ∈ Word 𝑉) → 𝐿 ∈
ℕ0) |
9 | 8 | adantr 480 |
. . . . . . . 8
⊢ (((𝐴 ∈ Word 𝑉 ∧ 𝐵 ∈ Word 𝑉) ∧ 𝑁 ∈ (0...(𝐿 + 𝑀))) → 𝐿 ∈
ℕ0) |
10 | 9 | adantl 481 |
. . . . . . 7
⊢ ((𝑁 ≤ 𝐿 ∧ ((𝐴 ∈ Word 𝑉 ∧ 𝐵 ∈ Word 𝑉) ∧ 𝑁 ∈ (0...(𝐿 + 𝑀)))) → 𝐿 ∈
ℕ0) |
11 | | simpl 482 |
. . . . . . 7
⊢ ((𝑁 ≤ 𝐿 ∧ ((𝐴 ∈ Word 𝑉 ∧ 𝐵 ∈ Word 𝑉) ∧ 𝑁 ∈ (0...(𝐿 + 𝑀)))) → 𝑁 ≤ 𝐿) |
12 | | elfz2nn0 13276 |
. . . . . . 7
⊢ (𝑁 ∈ (0...𝐿) ↔ (𝑁 ∈ ℕ0 ∧ 𝐿 ∈ ℕ0
∧ 𝑁 ≤ 𝐿)) |
13 | 4, 10, 11, 12 | syl3anbrc 1341 |
. . . . . 6
⊢ ((𝑁 ≤ 𝐿 ∧ ((𝐴 ∈ Word 𝑉 ∧ 𝐵 ∈ Word 𝑉) ∧ 𝑁 ∈ (0...(𝐿 + 𝑀)))) → 𝑁 ∈ (0...𝐿)) |
14 | | df-3an 1087 |
. . . . . 6
⊢ ((𝐴 ∈ Word 𝑉 ∧ 𝐵 ∈ Word 𝑉 ∧ 𝑁 ∈ (0...𝐿)) ↔ ((𝐴 ∈ Word 𝑉 ∧ 𝐵 ∈ Word 𝑉) ∧ 𝑁 ∈ (0...𝐿))) |
15 | 1, 13, 14 | sylanbrc 582 |
. . . . 5
⊢ ((𝑁 ≤ 𝐿 ∧ ((𝐴 ∈ Word 𝑉 ∧ 𝐵 ∈ Word 𝑉) ∧ 𝑁 ∈ (0...(𝐿 + 𝑀)))) → (𝐴 ∈ Word 𝑉 ∧ 𝐵 ∈ Word 𝑉 ∧ 𝑁 ∈ (0...𝐿))) |
16 | 5 | pfxccatpfx1 14377 |
. . . . 5
⊢ ((𝐴 ∈ Word 𝑉 ∧ 𝐵 ∈ Word 𝑉 ∧ 𝑁 ∈ (0...𝐿)) → ((𝐴 ++ 𝐵) prefix 𝑁) = (𝐴 prefix 𝑁)) |
17 | 15, 16 | syl 17 |
. . . 4
⊢ ((𝑁 ≤ 𝐿 ∧ ((𝐴 ∈ Word 𝑉 ∧ 𝐵 ∈ Word 𝑉) ∧ 𝑁 ∈ (0...(𝐿 + 𝑀)))) → ((𝐴 ++ 𝐵) prefix 𝑁) = (𝐴 prefix 𝑁)) |
18 | | iftrue 4462 |
. . . . 5
⊢ (𝑁 ≤ 𝐿 → if(𝑁 ≤ 𝐿, (𝐴 prefix 𝑁), (𝐴 ++ (𝐵 prefix (𝑁 − 𝐿)))) = (𝐴 prefix 𝑁)) |
19 | 18 | adantr 480 |
. . . 4
⊢ ((𝑁 ≤ 𝐿 ∧ ((𝐴 ∈ Word 𝑉 ∧ 𝐵 ∈ Word 𝑉) ∧ 𝑁 ∈ (0...(𝐿 + 𝑀)))) → if(𝑁 ≤ 𝐿, (𝐴 prefix 𝑁), (𝐴 ++ (𝐵 prefix (𝑁 − 𝐿)))) = (𝐴 prefix 𝑁)) |
20 | 17, 19 | eqtr4d 2781 |
. . 3
⊢ ((𝑁 ≤ 𝐿 ∧ ((𝐴 ∈ Word 𝑉 ∧ 𝐵 ∈ Word 𝑉) ∧ 𝑁 ∈ (0...(𝐿 + 𝑀)))) → ((𝐴 ++ 𝐵) prefix 𝑁) = if(𝑁 ≤ 𝐿, (𝐴 prefix 𝑁), (𝐴 ++ (𝐵 prefix (𝑁 − 𝐿))))) |
21 | | simprl 767 |
. . . . . 6
⊢ ((¬
𝑁 ≤ 𝐿 ∧ ((𝐴 ∈ Word 𝑉 ∧ 𝐵 ∈ Word 𝑉) ∧ 𝑁 ∈ (0...(𝐿 + 𝑀)))) → (𝐴 ∈ Word 𝑉 ∧ 𝐵 ∈ Word 𝑉)) |
22 | | elfz2nn0 13276 |
. . . . . . . . 9
⊢ (𝑁 ∈ (0...(𝐿 + 𝑀)) ↔ (𝑁 ∈ ℕ0 ∧ (𝐿 + 𝑀) ∈ ℕ0 ∧ 𝑁 ≤ (𝐿 + 𝑀))) |
23 | 5 | eleq1i 2829 |
. . . . . . . . . . . 12
⊢ (𝐿 ∈ ℕ0
↔ (♯‘𝐴)
∈ ℕ0) |
24 | | nn0ltp1le 12308 |
. . . . . . . . . . . . . . . 16
⊢ ((𝐿 ∈ ℕ0
∧ 𝑁 ∈
ℕ0) → (𝐿 < 𝑁 ↔ (𝐿 + 1) ≤ 𝑁)) |
25 | | nn0re 12172 |
. . . . . . . . . . . . . . . . 17
⊢ (𝐿 ∈ ℕ0
→ 𝐿 ∈
ℝ) |
26 | | nn0re 12172 |
. . . . . . . . . . . . . . . . 17
⊢ (𝑁 ∈ ℕ0
→ 𝑁 ∈
ℝ) |
27 | | ltnle 10985 |
. . . . . . . . . . . . . . . . 17
⊢ ((𝐿 ∈ ℝ ∧ 𝑁 ∈ ℝ) → (𝐿 < 𝑁 ↔ ¬ 𝑁 ≤ 𝐿)) |
28 | 25, 26, 27 | syl2an 595 |
. . . . . . . . . . . . . . . 16
⊢ ((𝐿 ∈ ℕ0
∧ 𝑁 ∈
ℕ0) → (𝐿 < 𝑁 ↔ ¬ 𝑁 ≤ 𝐿)) |
29 | 24, 28 | bitr3d 280 |
. . . . . . . . . . . . . . 15
⊢ ((𝐿 ∈ ℕ0
∧ 𝑁 ∈
ℕ0) → ((𝐿 + 1) ≤ 𝑁 ↔ ¬ 𝑁 ≤ 𝐿)) |
30 | 29 | 3ad2antr1 1186 |
. . . . . . . . . . . . . 14
⊢ ((𝐿 ∈ ℕ0
∧ (𝑁 ∈
ℕ0 ∧ (𝐿 + 𝑀) ∈ ℕ0 ∧ 𝑁 ≤ (𝐿 + 𝑀))) → ((𝐿 + 1) ≤ 𝑁 ↔ ¬ 𝑁 ≤ 𝐿)) |
31 | | simpr3 1194 |
. . . . . . . . . . . . . . . . 17
⊢ ((𝐿 ∈ ℕ0
∧ (𝑁 ∈
ℕ0 ∧ (𝐿 + 𝑀) ∈ ℕ0 ∧ 𝑁 ≤ (𝐿 + 𝑀))) → 𝑁 ≤ (𝐿 + 𝑀)) |
32 | 31 | anim1ci 615 |
. . . . . . . . . . . . . . . 16
⊢ (((𝐿 ∈ ℕ0
∧ (𝑁 ∈
ℕ0 ∧ (𝐿 + 𝑀) ∈ ℕ0 ∧ 𝑁 ≤ (𝐿 + 𝑀))) ∧ (𝐿 + 1) ≤ 𝑁) → ((𝐿 + 1) ≤ 𝑁 ∧ 𝑁 ≤ (𝐿 + 𝑀))) |
33 | | nn0z 12273 |
. . . . . . . . . . . . . . . . . . . 20
⊢ (𝑁 ∈ ℕ0
→ 𝑁 ∈
ℤ) |
34 | 33 | 3ad2ant1 1131 |
. . . . . . . . . . . . . . . . . . 19
⊢ ((𝑁 ∈ ℕ0
∧ (𝐿 + 𝑀) ∈ ℕ0
∧ 𝑁 ≤ (𝐿 + 𝑀)) → 𝑁 ∈ ℤ) |
35 | 34 | adantl 481 |
. . . . . . . . . . . . . . . . . 18
⊢ ((𝐿 ∈ ℕ0
∧ (𝑁 ∈
ℕ0 ∧ (𝐿 + 𝑀) ∈ ℕ0 ∧ 𝑁 ≤ (𝐿 + 𝑀))) → 𝑁 ∈ ℤ) |
36 | 35 | adantr 480 |
. . . . . . . . . . . . . . . . 17
⊢ (((𝐿 ∈ ℕ0
∧ (𝑁 ∈
ℕ0 ∧ (𝐿 + 𝑀) ∈ ℕ0 ∧ 𝑁 ≤ (𝐿 + 𝑀))) ∧ (𝐿 + 1) ≤ 𝑁) → 𝑁 ∈ ℤ) |
37 | | peano2nn0 12203 |
. . . . . . . . . . . . . . . . . . . 20
⊢ (𝐿 ∈ ℕ0
→ (𝐿 + 1) ∈
ℕ0) |
38 | 37 | nn0zd 12353 |
. . . . . . . . . . . . . . . . . . 19
⊢ (𝐿 ∈ ℕ0
→ (𝐿 + 1) ∈
ℤ) |
39 | 38 | adantr 480 |
. . . . . . . . . . . . . . . . . 18
⊢ ((𝐿 ∈ ℕ0
∧ (𝑁 ∈
ℕ0 ∧ (𝐿 + 𝑀) ∈ ℕ0 ∧ 𝑁 ≤ (𝐿 + 𝑀))) → (𝐿 + 1) ∈ ℤ) |
40 | 39 | adantr 480 |
. . . . . . . . . . . . . . . . 17
⊢ (((𝐿 ∈ ℕ0
∧ (𝑁 ∈
ℕ0 ∧ (𝐿 + 𝑀) ∈ ℕ0 ∧ 𝑁 ≤ (𝐿 + 𝑀))) ∧ (𝐿 + 1) ≤ 𝑁) → (𝐿 + 1) ∈ ℤ) |
41 | | nn0z 12273 |
. . . . . . . . . . . . . . . . . . . 20
⊢ ((𝐿 + 𝑀) ∈ ℕ0 → (𝐿 + 𝑀) ∈ ℤ) |
42 | 41 | 3ad2ant2 1132 |
. . . . . . . . . . . . . . . . . . 19
⊢ ((𝑁 ∈ ℕ0
∧ (𝐿 + 𝑀) ∈ ℕ0
∧ 𝑁 ≤ (𝐿 + 𝑀)) → (𝐿 + 𝑀) ∈ ℤ) |
43 | 42 | adantl 481 |
. . . . . . . . . . . . . . . . . 18
⊢ ((𝐿 ∈ ℕ0
∧ (𝑁 ∈
ℕ0 ∧ (𝐿 + 𝑀) ∈ ℕ0 ∧ 𝑁 ≤ (𝐿 + 𝑀))) → (𝐿 + 𝑀) ∈ ℤ) |
44 | 43 | adantr 480 |
. . . . . . . . . . . . . . . . 17
⊢ (((𝐿 ∈ ℕ0
∧ (𝑁 ∈
ℕ0 ∧ (𝐿 + 𝑀) ∈ ℕ0 ∧ 𝑁 ≤ (𝐿 + 𝑀))) ∧ (𝐿 + 1) ≤ 𝑁) → (𝐿 + 𝑀) ∈ ℤ) |
45 | | elfz 13174 |
. . . . . . . . . . . . . . . . 17
⊢ ((𝑁 ∈ ℤ ∧ (𝐿 + 1) ∈ ℤ ∧
(𝐿 + 𝑀) ∈ ℤ) → (𝑁 ∈ ((𝐿 + 1)...(𝐿 + 𝑀)) ↔ ((𝐿 + 1) ≤ 𝑁 ∧ 𝑁 ≤ (𝐿 + 𝑀)))) |
46 | 36, 40, 44, 45 | syl3anc 1369 |
. . . . . . . . . . . . . . . 16
⊢ (((𝐿 ∈ ℕ0
∧ (𝑁 ∈
ℕ0 ∧ (𝐿 + 𝑀) ∈ ℕ0 ∧ 𝑁 ≤ (𝐿 + 𝑀))) ∧ (𝐿 + 1) ≤ 𝑁) → (𝑁 ∈ ((𝐿 + 1)...(𝐿 + 𝑀)) ↔ ((𝐿 + 1) ≤ 𝑁 ∧ 𝑁 ≤ (𝐿 + 𝑀)))) |
47 | 32, 46 | mpbird 256 |
. . . . . . . . . . . . . . 15
⊢ (((𝐿 ∈ ℕ0
∧ (𝑁 ∈
ℕ0 ∧ (𝐿 + 𝑀) ∈ ℕ0 ∧ 𝑁 ≤ (𝐿 + 𝑀))) ∧ (𝐿 + 1) ≤ 𝑁) → 𝑁 ∈ ((𝐿 + 1)...(𝐿 + 𝑀))) |
48 | 47 | ex 412 |
. . . . . . . . . . . . . 14
⊢ ((𝐿 ∈ ℕ0
∧ (𝑁 ∈
ℕ0 ∧ (𝐿 + 𝑀) ∈ ℕ0 ∧ 𝑁 ≤ (𝐿 + 𝑀))) → ((𝐿 + 1) ≤ 𝑁 → 𝑁 ∈ ((𝐿 + 1)...(𝐿 + 𝑀)))) |
49 | 30, 48 | sylbird 259 |
. . . . . . . . . . . . 13
⊢ ((𝐿 ∈ ℕ0
∧ (𝑁 ∈
ℕ0 ∧ (𝐿 + 𝑀) ∈ ℕ0 ∧ 𝑁 ≤ (𝐿 + 𝑀))) → (¬ 𝑁 ≤ 𝐿 → 𝑁 ∈ ((𝐿 + 1)...(𝐿 + 𝑀)))) |
50 | 49 | ex 412 |
. . . . . . . . . . . 12
⊢ (𝐿 ∈ ℕ0
→ ((𝑁 ∈
ℕ0 ∧ (𝐿 + 𝑀) ∈ ℕ0 ∧ 𝑁 ≤ (𝐿 + 𝑀)) → (¬ 𝑁 ≤ 𝐿 → 𝑁 ∈ ((𝐿 + 1)...(𝐿 + 𝑀))))) |
51 | 23, 50 | sylbir 234 |
. . . . . . . . . . 11
⊢
((♯‘𝐴)
∈ ℕ0 → ((𝑁 ∈ ℕ0 ∧ (𝐿 + 𝑀) ∈ ℕ0 ∧ 𝑁 ≤ (𝐿 + 𝑀)) → (¬ 𝑁 ≤ 𝐿 → 𝑁 ∈ ((𝐿 + 1)...(𝐿 + 𝑀))))) |
52 | 6, 51 | syl 17 |
. . . . . . . . . 10
⊢ (𝐴 ∈ Word 𝑉 → ((𝑁 ∈ ℕ0 ∧ (𝐿 + 𝑀) ∈ ℕ0 ∧ 𝑁 ≤ (𝐿 + 𝑀)) → (¬ 𝑁 ≤ 𝐿 → 𝑁 ∈ ((𝐿 + 1)...(𝐿 + 𝑀))))) |
53 | 52 | adantr 480 |
. . . . . . . . 9
⊢ ((𝐴 ∈ Word 𝑉 ∧ 𝐵 ∈ Word 𝑉) → ((𝑁 ∈ ℕ0 ∧ (𝐿 + 𝑀) ∈ ℕ0 ∧ 𝑁 ≤ (𝐿 + 𝑀)) → (¬ 𝑁 ≤ 𝐿 → 𝑁 ∈ ((𝐿 + 1)...(𝐿 + 𝑀))))) |
54 | 22, 53 | syl5bi 241 |
. . . . . . . 8
⊢ ((𝐴 ∈ Word 𝑉 ∧ 𝐵 ∈ Word 𝑉) → (𝑁 ∈ (0...(𝐿 + 𝑀)) → (¬ 𝑁 ≤ 𝐿 → 𝑁 ∈ ((𝐿 + 1)...(𝐿 + 𝑀))))) |
55 | 54 | imp 406 |
. . . . . . 7
⊢ (((𝐴 ∈ Word 𝑉 ∧ 𝐵 ∈ Word 𝑉) ∧ 𝑁 ∈ (0...(𝐿 + 𝑀))) → (¬ 𝑁 ≤ 𝐿 → 𝑁 ∈ ((𝐿 + 1)...(𝐿 + 𝑀)))) |
56 | 55 | impcom 407 |
. . . . . 6
⊢ ((¬
𝑁 ≤ 𝐿 ∧ ((𝐴 ∈ Word 𝑉 ∧ 𝐵 ∈ Word 𝑉) ∧ 𝑁 ∈ (0...(𝐿 + 𝑀)))) → 𝑁 ∈ ((𝐿 + 1)...(𝐿 + 𝑀))) |
57 | | df-3an 1087 |
. . . . . 6
⊢ ((𝐴 ∈ Word 𝑉 ∧ 𝐵 ∈ Word 𝑉 ∧ 𝑁 ∈ ((𝐿 + 1)...(𝐿 + 𝑀))) ↔ ((𝐴 ∈ Word 𝑉 ∧ 𝐵 ∈ Word 𝑉) ∧ 𝑁 ∈ ((𝐿 + 1)...(𝐿 + 𝑀)))) |
58 | 21, 56, 57 | sylanbrc 582 |
. . . . 5
⊢ ((¬
𝑁 ≤ 𝐿 ∧ ((𝐴 ∈ Word 𝑉 ∧ 𝐵 ∈ Word 𝑉) ∧ 𝑁 ∈ (0...(𝐿 + 𝑀)))) → (𝐴 ∈ Word 𝑉 ∧ 𝐵 ∈ Word 𝑉 ∧ 𝑁 ∈ ((𝐿 + 1)...(𝐿 + 𝑀)))) |
59 | | pfxccatpfx2.m |
. . . . . 6
⊢ 𝑀 = (♯‘𝐵) |
60 | 5, 59 | pfxccatpfx2 14378 |
. . . . 5
⊢ ((𝐴 ∈ Word 𝑉 ∧ 𝐵 ∈ Word 𝑉 ∧ 𝑁 ∈ ((𝐿 + 1)...(𝐿 + 𝑀))) → ((𝐴 ++ 𝐵) prefix 𝑁) = (𝐴 ++ (𝐵 prefix (𝑁 − 𝐿)))) |
61 | 58, 60 | syl 17 |
. . . 4
⊢ ((¬
𝑁 ≤ 𝐿 ∧ ((𝐴 ∈ Word 𝑉 ∧ 𝐵 ∈ Word 𝑉) ∧ 𝑁 ∈ (0...(𝐿 + 𝑀)))) → ((𝐴 ++ 𝐵) prefix 𝑁) = (𝐴 ++ (𝐵 prefix (𝑁 − 𝐿)))) |
62 | | iffalse 4465 |
. . . . 5
⊢ (¬
𝑁 ≤ 𝐿 → if(𝑁 ≤ 𝐿, (𝐴 prefix 𝑁), (𝐴 ++ (𝐵 prefix (𝑁 − 𝐿)))) = (𝐴 ++ (𝐵 prefix (𝑁 − 𝐿)))) |
63 | 62 | adantr 480 |
. . . 4
⊢ ((¬
𝑁 ≤ 𝐿 ∧ ((𝐴 ∈ Word 𝑉 ∧ 𝐵 ∈ Word 𝑉) ∧ 𝑁 ∈ (0...(𝐿 + 𝑀)))) → if(𝑁 ≤ 𝐿, (𝐴 prefix 𝑁), (𝐴 ++ (𝐵 prefix (𝑁 − 𝐿)))) = (𝐴 ++ (𝐵 prefix (𝑁 − 𝐿)))) |
64 | 61, 63 | eqtr4d 2781 |
. . 3
⊢ ((¬
𝑁 ≤ 𝐿 ∧ ((𝐴 ∈ Word 𝑉 ∧ 𝐵 ∈ Word 𝑉) ∧ 𝑁 ∈ (0...(𝐿 + 𝑀)))) → ((𝐴 ++ 𝐵) prefix 𝑁) = if(𝑁 ≤ 𝐿, (𝐴 prefix 𝑁), (𝐴 ++ (𝐵 prefix (𝑁 − 𝐿))))) |
65 | 20, 64 | pm2.61ian 808 |
. 2
⊢ (((𝐴 ∈ Word 𝑉 ∧ 𝐵 ∈ Word 𝑉) ∧ 𝑁 ∈ (0...(𝐿 + 𝑀))) → ((𝐴 ++ 𝐵) prefix 𝑁) = if(𝑁 ≤ 𝐿, (𝐴 prefix 𝑁), (𝐴 ++ (𝐵 prefix (𝑁 − 𝐿))))) |
66 | 65 | ex 412 |
1
⊢ ((𝐴 ∈ Word 𝑉 ∧ 𝐵 ∈ Word 𝑉) → (𝑁 ∈ (0...(𝐿 + 𝑀)) → ((𝐴 ++ 𝐵) prefix 𝑁) = if(𝑁 ≤ 𝐿, (𝐴 prefix 𝑁), (𝐴 ++ (𝐵 prefix (𝑁 − 𝐿)))))) |