Proof of Theorem pfxccat3a
Step | Hyp | Ref
| Expression |
1 | | simprl 768 |
. . . . . 6
⊢ ((𝑁 ≤ 𝐿 ∧ ((𝐴 ∈ Word 𝑉 ∧ 𝐵 ∈ Word 𝑉) ∧ 𝑁 ∈ (0...(𝐿 + 𝑀)))) → (𝐴 ∈ Word 𝑉 ∧ 𝐵 ∈ Word 𝑉)) |
2 | | elfznn0 13349 |
. . . . . . . . 9
⊢ (𝑁 ∈ (0...(𝐿 + 𝑀)) → 𝑁 ∈
ℕ0) |
3 | 2 | adantl 482 |
. . . . . . . 8
⊢ (((𝐴 ∈ Word 𝑉 ∧ 𝐵 ∈ Word 𝑉) ∧ 𝑁 ∈ (0...(𝐿 + 𝑀))) → 𝑁 ∈
ℕ0) |
4 | 3 | adantl 482 |
. . . . . . 7
⊢ ((𝑁 ≤ 𝐿 ∧ ((𝐴 ∈ Word 𝑉 ∧ 𝐵 ∈ Word 𝑉) ∧ 𝑁 ∈ (0...(𝐿 + 𝑀)))) → 𝑁 ∈
ℕ0) |
5 | | swrdccatin2.l |
. . . . . . . . . . 11
⊢ 𝐿 = (♯‘𝐴) |
6 | | lencl 14236 |
. . . . . . . . . . 11
⊢ (𝐴 ∈ Word 𝑉 → (♯‘𝐴) ∈
ℕ0) |
7 | 5, 6 | eqeltrid 2843 |
. . . . . . . . . 10
⊢ (𝐴 ∈ Word 𝑉 → 𝐿 ∈
ℕ0) |
8 | 7 | adantr 481 |
. . . . . . . . 9
⊢ ((𝐴 ∈ Word 𝑉 ∧ 𝐵 ∈ Word 𝑉) → 𝐿 ∈
ℕ0) |
9 | 8 | adantr 481 |
. . . . . . . 8
⊢ (((𝐴 ∈ Word 𝑉 ∧ 𝐵 ∈ Word 𝑉) ∧ 𝑁 ∈ (0...(𝐿 + 𝑀))) → 𝐿 ∈
ℕ0) |
10 | 9 | adantl 482 |
. . . . . . 7
⊢ ((𝑁 ≤ 𝐿 ∧ ((𝐴 ∈ Word 𝑉 ∧ 𝐵 ∈ Word 𝑉) ∧ 𝑁 ∈ (0...(𝐿 + 𝑀)))) → 𝐿 ∈
ℕ0) |
11 | | simpl 483 |
. . . . . . 7
⊢ ((𝑁 ≤ 𝐿 ∧ ((𝐴 ∈ Word 𝑉 ∧ 𝐵 ∈ Word 𝑉) ∧ 𝑁 ∈ (0...(𝐿 + 𝑀)))) → 𝑁 ≤ 𝐿) |
12 | | elfz2nn0 13347 |
. . . . . . 7
⊢ (𝑁 ∈ (0...𝐿) ↔ (𝑁 ∈ ℕ0 ∧ 𝐿 ∈ ℕ0
∧ 𝑁 ≤ 𝐿)) |
13 | 4, 10, 11, 12 | syl3anbrc 1342 |
. . . . . 6
⊢ ((𝑁 ≤ 𝐿 ∧ ((𝐴 ∈ Word 𝑉 ∧ 𝐵 ∈ Word 𝑉) ∧ 𝑁 ∈ (0...(𝐿 + 𝑀)))) → 𝑁 ∈ (0...𝐿)) |
14 | | df-3an 1088 |
. . . . . 6
⊢ ((𝐴 ∈ Word 𝑉 ∧ 𝐵 ∈ Word 𝑉 ∧ 𝑁 ∈ (0...𝐿)) ↔ ((𝐴 ∈ Word 𝑉 ∧ 𝐵 ∈ Word 𝑉) ∧ 𝑁 ∈ (0...𝐿))) |
15 | 1, 13, 14 | sylanbrc 583 |
. . . . 5
⊢ ((𝑁 ≤ 𝐿 ∧ ((𝐴 ∈ Word 𝑉 ∧ 𝐵 ∈ Word 𝑉) ∧ 𝑁 ∈ (0...(𝐿 + 𝑀)))) → (𝐴 ∈ Word 𝑉 ∧ 𝐵 ∈ Word 𝑉 ∧ 𝑁 ∈ (0...𝐿))) |
16 | 5 | pfxccatpfx1 14449 |
. . . . 5
⊢ ((𝐴 ∈ Word 𝑉 ∧ 𝐵 ∈ Word 𝑉 ∧ 𝑁 ∈ (0...𝐿)) → ((𝐴 ++ 𝐵) prefix 𝑁) = (𝐴 prefix 𝑁)) |
17 | 15, 16 | syl 17 |
. . . 4
⊢ ((𝑁 ≤ 𝐿 ∧ ((𝐴 ∈ Word 𝑉 ∧ 𝐵 ∈ Word 𝑉) ∧ 𝑁 ∈ (0...(𝐿 + 𝑀)))) → ((𝐴 ++ 𝐵) prefix 𝑁) = (𝐴 prefix 𝑁)) |
18 | | iftrue 4465 |
. . . . 5
⊢ (𝑁 ≤ 𝐿 → if(𝑁 ≤ 𝐿, (𝐴 prefix 𝑁), (𝐴 ++ (𝐵 prefix (𝑁 − 𝐿)))) = (𝐴 prefix 𝑁)) |
19 | 18 | adantr 481 |
. . . 4
⊢ ((𝑁 ≤ 𝐿 ∧ ((𝐴 ∈ Word 𝑉 ∧ 𝐵 ∈ Word 𝑉) ∧ 𝑁 ∈ (0...(𝐿 + 𝑀)))) → if(𝑁 ≤ 𝐿, (𝐴 prefix 𝑁), (𝐴 ++ (𝐵 prefix (𝑁 − 𝐿)))) = (𝐴 prefix 𝑁)) |
20 | 17, 19 | eqtr4d 2781 |
. . 3
⊢ ((𝑁 ≤ 𝐿 ∧ ((𝐴 ∈ Word 𝑉 ∧ 𝐵 ∈ Word 𝑉) ∧ 𝑁 ∈ (0...(𝐿 + 𝑀)))) → ((𝐴 ++ 𝐵) prefix 𝑁) = if(𝑁 ≤ 𝐿, (𝐴 prefix 𝑁), (𝐴 ++ (𝐵 prefix (𝑁 − 𝐿))))) |
21 | | simprl 768 |
. . . . . 6
⊢ ((¬
𝑁 ≤ 𝐿 ∧ ((𝐴 ∈ Word 𝑉 ∧ 𝐵 ∈ Word 𝑉) ∧ 𝑁 ∈ (0...(𝐿 + 𝑀)))) → (𝐴 ∈ Word 𝑉 ∧ 𝐵 ∈ Word 𝑉)) |
22 | | elfz2nn0 13347 |
. . . . . . . . 9
⊢ (𝑁 ∈ (0...(𝐿 + 𝑀)) ↔ (𝑁 ∈ ℕ0 ∧ (𝐿 + 𝑀) ∈ ℕ0 ∧ 𝑁 ≤ (𝐿 + 𝑀))) |
23 | 5 | eleq1i 2829 |
. . . . . . . . . . . 12
⊢ (𝐿 ∈ ℕ0
↔ (♯‘𝐴)
∈ ℕ0) |
24 | | nn0ltp1le 12378 |
. . . . . . . . . . . . . . . 16
⊢ ((𝐿 ∈ ℕ0
∧ 𝑁 ∈
ℕ0) → (𝐿 < 𝑁 ↔ (𝐿 + 1) ≤ 𝑁)) |
25 | | nn0re 12242 |
. . . . . . . . . . . . . . . . 17
⊢ (𝐿 ∈ ℕ0
→ 𝐿 ∈
ℝ) |
26 | | nn0re 12242 |
. . . . . . . . . . . . . . . . 17
⊢ (𝑁 ∈ ℕ0
→ 𝑁 ∈
ℝ) |
27 | | ltnle 11054 |
. . . . . . . . . . . . . . . . 17
⊢ ((𝐿 ∈ ℝ ∧ 𝑁 ∈ ℝ) → (𝐿 < 𝑁 ↔ ¬ 𝑁 ≤ 𝐿)) |
28 | 25, 26, 27 | syl2an 596 |
. . . . . . . . . . . . . . . 16
⊢ ((𝐿 ∈ ℕ0
∧ 𝑁 ∈
ℕ0) → (𝐿 < 𝑁 ↔ ¬ 𝑁 ≤ 𝐿)) |
29 | 24, 28 | bitr3d 280 |
. . . . . . . . . . . . . . 15
⊢ ((𝐿 ∈ ℕ0
∧ 𝑁 ∈
ℕ0) → ((𝐿 + 1) ≤ 𝑁 ↔ ¬ 𝑁 ≤ 𝐿)) |
30 | 29 | 3ad2antr1 1187 |
. . . . . . . . . . . . . 14
⊢ ((𝐿 ∈ ℕ0
∧ (𝑁 ∈
ℕ0 ∧ (𝐿 + 𝑀) ∈ ℕ0 ∧ 𝑁 ≤ (𝐿 + 𝑀))) → ((𝐿 + 1) ≤ 𝑁 ↔ ¬ 𝑁 ≤ 𝐿)) |
31 | | simpr3 1195 |
. . . . . . . . . . . . . . . . 17
⊢ ((𝐿 ∈ ℕ0
∧ (𝑁 ∈
ℕ0 ∧ (𝐿 + 𝑀) ∈ ℕ0 ∧ 𝑁 ≤ (𝐿 + 𝑀))) → 𝑁 ≤ (𝐿 + 𝑀)) |
32 | 31 | anim1ci 616 |
. . . . . . . . . . . . . . . 16
⊢ (((𝐿 ∈ ℕ0
∧ (𝑁 ∈
ℕ0 ∧ (𝐿 + 𝑀) ∈ ℕ0 ∧ 𝑁 ≤ (𝐿 + 𝑀))) ∧ (𝐿 + 1) ≤ 𝑁) → ((𝐿 + 1) ≤ 𝑁 ∧ 𝑁 ≤ (𝐿 + 𝑀))) |
33 | | nn0z 12343 |
. . . . . . . . . . . . . . . . . . . 20
⊢ (𝑁 ∈ ℕ0
→ 𝑁 ∈
ℤ) |
34 | 33 | 3ad2ant1 1132 |
. . . . . . . . . . . . . . . . . . 19
⊢ ((𝑁 ∈ ℕ0
∧ (𝐿 + 𝑀) ∈ ℕ0
∧ 𝑁 ≤ (𝐿 + 𝑀)) → 𝑁 ∈ ℤ) |
35 | 34 | adantl 482 |
. . . . . . . . . . . . . . . . . 18
⊢ ((𝐿 ∈ ℕ0
∧ (𝑁 ∈
ℕ0 ∧ (𝐿 + 𝑀) ∈ ℕ0 ∧ 𝑁 ≤ (𝐿 + 𝑀))) → 𝑁 ∈ ℤ) |
36 | 35 | adantr 481 |
. . . . . . . . . . . . . . . . 17
⊢ (((𝐿 ∈ ℕ0
∧ (𝑁 ∈
ℕ0 ∧ (𝐿 + 𝑀) ∈ ℕ0 ∧ 𝑁 ≤ (𝐿 + 𝑀))) ∧ (𝐿 + 1) ≤ 𝑁) → 𝑁 ∈ ℤ) |
37 | | peano2nn0 12273 |
. . . . . . . . . . . . . . . . . . . 20
⊢ (𝐿 ∈ ℕ0
→ (𝐿 + 1) ∈
ℕ0) |
38 | 37 | nn0zd 12424 |
. . . . . . . . . . . . . . . . . . 19
⊢ (𝐿 ∈ ℕ0
→ (𝐿 + 1) ∈
ℤ) |
39 | 38 | adantr 481 |
. . . . . . . . . . . . . . . . . 18
⊢ ((𝐿 ∈ ℕ0
∧ (𝑁 ∈
ℕ0 ∧ (𝐿 + 𝑀) ∈ ℕ0 ∧ 𝑁 ≤ (𝐿 + 𝑀))) → (𝐿 + 1) ∈ ℤ) |
40 | 39 | adantr 481 |
. . . . . . . . . . . . . . . . 17
⊢ (((𝐿 ∈ ℕ0
∧ (𝑁 ∈
ℕ0 ∧ (𝐿 + 𝑀) ∈ ℕ0 ∧ 𝑁 ≤ (𝐿 + 𝑀))) ∧ (𝐿 + 1) ≤ 𝑁) → (𝐿 + 1) ∈ ℤ) |
41 | | nn0z 12343 |
. . . . . . . . . . . . . . . . . . . 20
⊢ ((𝐿 + 𝑀) ∈ ℕ0 → (𝐿 + 𝑀) ∈ ℤ) |
42 | 41 | 3ad2ant2 1133 |
. . . . . . . . . . . . . . . . . . 19
⊢ ((𝑁 ∈ ℕ0
∧ (𝐿 + 𝑀) ∈ ℕ0
∧ 𝑁 ≤ (𝐿 + 𝑀)) → (𝐿 + 𝑀) ∈ ℤ) |
43 | 42 | adantl 482 |
. . . . . . . . . . . . . . . . . 18
⊢ ((𝐿 ∈ ℕ0
∧ (𝑁 ∈
ℕ0 ∧ (𝐿 + 𝑀) ∈ ℕ0 ∧ 𝑁 ≤ (𝐿 + 𝑀))) → (𝐿 + 𝑀) ∈ ℤ) |
44 | 43 | adantr 481 |
. . . . . . . . . . . . . . . . 17
⊢ (((𝐿 ∈ ℕ0
∧ (𝑁 ∈
ℕ0 ∧ (𝐿 + 𝑀) ∈ ℕ0 ∧ 𝑁 ≤ (𝐿 + 𝑀))) ∧ (𝐿 + 1) ≤ 𝑁) → (𝐿 + 𝑀) ∈ ℤ) |
45 | | elfz 13245 |
. . . . . . . . . . . . . . . . 17
⊢ ((𝑁 ∈ ℤ ∧ (𝐿 + 1) ∈ ℤ ∧
(𝐿 + 𝑀) ∈ ℤ) → (𝑁 ∈ ((𝐿 + 1)...(𝐿 + 𝑀)) ↔ ((𝐿 + 1) ≤ 𝑁 ∧ 𝑁 ≤ (𝐿 + 𝑀)))) |
46 | 36, 40, 44, 45 | syl3anc 1370 |
. . . . . . . . . . . . . . . 16
⊢ (((𝐿 ∈ ℕ0
∧ (𝑁 ∈
ℕ0 ∧ (𝐿 + 𝑀) ∈ ℕ0 ∧ 𝑁 ≤ (𝐿 + 𝑀))) ∧ (𝐿 + 1) ≤ 𝑁) → (𝑁 ∈ ((𝐿 + 1)...(𝐿 + 𝑀)) ↔ ((𝐿 + 1) ≤ 𝑁 ∧ 𝑁 ≤ (𝐿 + 𝑀)))) |
47 | 32, 46 | mpbird 256 |
. . . . . . . . . . . . . . 15
⊢ (((𝐿 ∈ ℕ0
∧ (𝑁 ∈
ℕ0 ∧ (𝐿 + 𝑀) ∈ ℕ0 ∧ 𝑁 ≤ (𝐿 + 𝑀))) ∧ (𝐿 + 1) ≤ 𝑁) → 𝑁 ∈ ((𝐿 + 1)...(𝐿 + 𝑀))) |
48 | 47 | ex 413 |
. . . . . . . . . . . . . 14
⊢ ((𝐿 ∈ ℕ0
∧ (𝑁 ∈
ℕ0 ∧ (𝐿 + 𝑀) ∈ ℕ0 ∧ 𝑁 ≤ (𝐿 + 𝑀))) → ((𝐿 + 1) ≤ 𝑁 → 𝑁 ∈ ((𝐿 + 1)...(𝐿 + 𝑀)))) |
49 | 30, 48 | sylbird 259 |
. . . . . . . . . . . . 13
⊢ ((𝐿 ∈ ℕ0
∧ (𝑁 ∈
ℕ0 ∧ (𝐿 + 𝑀) ∈ ℕ0 ∧ 𝑁 ≤ (𝐿 + 𝑀))) → (¬ 𝑁 ≤ 𝐿 → 𝑁 ∈ ((𝐿 + 1)...(𝐿 + 𝑀)))) |
50 | 49 | ex 413 |
. . . . . . . . . . . 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 481 |
. . . . . . . . 9
⊢ ((𝐴 ∈ Word 𝑉 ∧ 𝐵 ∈ Word 𝑉) → ((𝑁 ∈ ℕ0 ∧ (𝐿 + 𝑀) ∈ ℕ0 ∧ 𝑁 ≤ (𝐿 + 𝑀)) → (¬ 𝑁 ≤ 𝐿 → 𝑁 ∈ ((𝐿 + 1)...(𝐿 + 𝑀))))) |
54 | 22, 53 | syl5bi 241 |
. . . . . . . 8
⊢ ((𝐴 ∈ Word 𝑉 ∧ 𝐵 ∈ Word 𝑉) → (𝑁 ∈ (0...(𝐿 + 𝑀)) → (¬ 𝑁 ≤ 𝐿 → 𝑁 ∈ ((𝐿 + 1)...(𝐿 + 𝑀))))) |
55 | 54 | imp 407 |
. . . . . . 7
⊢ (((𝐴 ∈ Word 𝑉 ∧ 𝐵 ∈ Word 𝑉) ∧ 𝑁 ∈ (0...(𝐿 + 𝑀))) → (¬ 𝑁 ≤ 𝐿 → 𝑁 ∈ ((𝐿 + 1)...(𝐿 + 𝑀)))) |
56 | 55 | impcom 408 |
. . . . . 6
⊢ ((¬
𝑁 ≤ 𝐿 ∧ ((𝐴 ∈ Word 𝑉 ∧ 𝐵 ∈ Word 𝑉) ∧ 𝑁 ∈ (0...(𝐿 + 𝑀)))) → 𝑁 ∈ ((𝐿 + 1)...(𝐿 + 𝑀))) |
57 | | df-3an 1088 |
. . . . . 6
⊢ ((𝐴 ∈ Word 𝑉 ∧ 𝐵 ∈ Word 𝑉 ∧ 𝑁 ∈ ((𝐿 + 1)...(𝐿 + 𝑀))) ↔ ((𝐴 ∈ Word 𝑉 ∧ 𝐵 ∈ Word 𝑉) ∧ 𝑁 ∈ ((𝐿 + 1)...(𝐿 + 𝑀)))) |
58 | 21, 56, 57 | sylanbrc 583 |
. . . . 5
⊢ ((¬
𝑁 ≤ 𝐿 ∧ ((𝐴 ∈ Word 𝑉 ∧ 𝐵 ∈ Word 𝑉) ∧ 𝑁 ∈ (0...(𝐿 + 𝑀)))) → (𝐴 ∈ Word 𝑉 ∧ 𝐵 ∈ Word 𝑉 ∧ 𝑁 ∈ ((𝐿 + 1)...(𝐿 + 𝑀)))) |
59 | | pfxccatpfx2.m |
. . . . . 6
⊢ 𝑀 = (♯‘𝐵) |
60 | 5, 59 | pfxccatpfx2 14450 |
. . . . 5
⊢ ((𝐴 ∈ Word 𝑉 ∧ 𝐵 ∈ Word 𝑉 ∧ 𝑁 ∈ ((𝐿 + 1)...(𝐿 + 𝑀))) → ((𝐴 ++ 𝐵) prefix 𝑁) = (𝐴 ++ (𝐵 prefix (𝑁 − 𝐿)))) |
61 | 58, 60 | syl 17 |
. . . 4
⊢ ((¬
𝑁 ≤ 𝐿 ∧ ((𝐴 ∈ Word 𝑉 ∧ 𝐵 ∈ Word 𝑉) ∧ 𝑁 ∈ (0...(𝐿 + 𝑀)))) → ((𝐴 ++ 𝐵) prefix 𝑁) = (𝐴 ++ (𝐵 prefix (𝑁 − 𝐿)))) |
62 | | iffalse 4468 |
. . . . 5
⊢ (¬
𝑁 ≤ 𝐿 → if(𝑁 ≤ 𝐿, (𝐴 prefix 𝑁), (𝐴 ++ (𝐵 prefix (𝑁 − 𝐿)))) = (𝐴 ++ (𝐵 prefix (𝑁 − 𝐿)))) |
63 | 62 | adantr 481 |
. . . 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 809 |
. 2
⊢ (((𝐴 ∈ Word 𝑉 ∧ 𝐵 ∈ Word 𝑉) ∧ 𝑁 ∈ (0...(𝐿 + 𝑀))) → ((𝐴 ++ 𝐵) prefix 𝑁) = if(𝑁 ≤ 𝐿, (𝐴 prefix 𝑁), (𝐴 ++ (𝐵 prefix (𝑁 − 𝐿))))) |
66 | 65 | ex 413 |
1
⊢ ((𝐴 ∈ Word 𝑉 ∧ 𝐵 ∈ Word 𝑉) → (𝑁 ∈ (0...(𝐿 + 𝑀)) → ((𝐴 ++ 𝐵) prefix 𝑁) = if(𝑁 ≤ 𝐿, (𝐴 prefix 𝑁), (𝐴 ++ (𝐵 prefix (𝑁 − 𝐿)))))) |