MPE Home Metamath Proof Explorer < Previous   Next >
Nearby theorems
Mirrors  >  Home  >  MPE Home  >  Th. List  >  swrdccatin1 Structured version   Visualization version   GIF version

Theorem swrdccatin1 14366
Description: The subword of a concatenation of two words within the first of the concatenated words. (Contributed by Alexander van der Vekens, 28-Mar-2018.)
Assertion
Ref Expression
swrdccatin1 ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉) → ((𝑀 ∈ (0...𝑁) ∧ 𝑁 ∈ (0...(♯‘𝐴))) → ((𝐴 ++ 𝐵) substr ⟨𝑀, 𝑁⟩) = (𝐴 substr ⟨𝑀, 𝑁⟩)))

Proof of Theorem swrdccatin1
Dummy variable 𝑘 is distinct from all other variables.
StepHypRef Expression
1 oveq2 7263 . . . . . 6 ((♯‘𝐴) = 0 → (0...(♯‘𝐴)) = (0...0))
21eleq2d 2824 . . . . 5 ((♯‘𝐴) = 0 → (𝑁 ∈ (0...(♯‘𝐴)) ↔ 𝑁 ∈ (0...0)))
3 elfz1eq 13196 . . . . . 6 (𝑁 ∈ (0...0) → 𝑁 = 0)
4 elfz1eq 13196 . . . . . . . 8 (𝑀 ∈ (0...0) → 𝑀 = 0)
5 swrd00 14285 . . . . . . . . . 10 ((𝐴 ++ 𝐵) substr ⟨0, 0⟩) = ∅
6 swrd00 14285 . . . . . . . . . 10 (𝐴 substr ⟨0, 0⟩) = ∅
75, 6eqtr4i 2769 . . . . . . . . 9 ((𝐴 ++ 𝐵) substr ⟨0, 0⟩) = (𝐴 substr ⟨0, 0⟩)
8 opeq1 4801 . . . . . . . . . 10 (𝑀 = 0 → ⟨𝑀, 0⟩ = ⟨0, 0⟩)
98oveq2d 7271 . . . . . . . . 9 (𝑀 = 0 → ((𝐴 ++ 𝐵) substr ⟨𝑀, 0⟩) = ((𝐴 ++ 𝐵) substr ⟨0, 0⟩))
108oveq2d 7271 . . . . . . . . 9 (𝑀 = 0 → (𝐴 substr ⟨𝑀, 0⟩) = (𝐴 substr ⟨0, 0⟩))
117, 9, 103eqtr4a 2805 . . . . . . . 8 (𝑀 = 0 → ((𝐴 ++ 𝐵) substr ⟨𝑀, 0⟩) = (𝐴 substr ⟨𝑀, 0⟩))
124, 11syl 17 . . . . . . 7 (𝑀 ∈ (0...0) → ((𝐴 ++ 𝐵) substr ⟨𝑀, 0⟩) = (𝐴 substr ⟨𝑀, 0⟩))
13 oveq2 7263 . . . . . . . . 9 (𝑁 = 0 → (0...𝑁) = (0...0))
1413eleq2d 2824 . . . . . . . 8 (𝑁 = 0 → (𝑀 ∈ (0...𝑁) ↔ 𝑀 ∈ (0...0)))
15 opeq2 4802 . . . . . . . . . 10 (𝑁 = 0 → ⟨𝑀, 𝑁⟩ = ⟨𝑀, 0⟩)
1615oveq2d 7271 . . . . . . . . 9 (𝑁 = 0 → ((𝐴 ++ 𝐵) substr ⟨𝑀, 𝑁⟩) = ((𝐴 ++ 𝐵) substr ⟨𝑀, 0⟩))
1715oveq2d 7271 . . . . . . . . 9 (𝑁 = 0 → (𝐴 substr ⟨𝑀, 𝑁⟩) = (𝐴 substr ⟨𝑀, 0⟩))
1816, 17eqeq12d 2754 . . . . . . . 8 (𝑁 = 0 → (((𝐴 ++ 𝐵) substr ⟨𝑀, 𝑁⟩) = (𝐴 substr ⟨𝑀, 𝑁⟩) ↔ ((𝐴 ++ 𝐵) substr ⟨𝑀, 0⟩) = (𝐴 substr ⟨𝑀, 0⟩)))
1914, 18imbi12d 344 . . . . . . 7 (𝑁 = 0 → ((𝑀 ∈ (0...𝑁) → ((𝐴 ++ 𝐵) substr ⟨𝑀, 𝑁⟩) = (𝐴 substr ⟨𝑀, 𝑁⟩)) ↔ (𝑀 ∈ (0...0) → ((𝐴 ++ 𝐵) substr ⟨𝑀, 0⟩) = (𝐴 substr ⟨𝑀, 0⟩))))
2012, 19mpbiri 257 . . . . . 6 (𝑁 = 0 → (𝑀 ∈ (0...𝑁) → ((𝐴 ++ 𝐵) substr ⟨𝑀, 𝑁⟩) = (𝐴 substr ⟨𝑀, 𝑁⟩)))
213, 20syl 17 . . . . 5 (𝑁 ∈ (0...0) → (𝑀 ∈ (0...𝑁) → ((𝐴 ++ 𝐵) substr ⟨𝑀, 𝑁⟩) = (𝐴 substr ⟨𝑀, 𝑁⟩)))
222, 21syl6bi 252 . . . 4 ((♯‘𝐴) = 0 → (𝑁 ∈ (0...(♯‘𝐴)) → (𝑀 ∈ (0...𝑁) → ((𝐴 ++ 𝐵) substr ⟨𝑀, 𝑁⟩) = (𝐴 substr ⟨𝑀, 𝑁⟩))))
2322impcomd 411 . . 3 ((♯‘𝐴) = 0 → ((𝑀 ∈ (0...𝑁) ∧ 𝑁 ∈ (0...(♯‘𝐴))) → ((𝐴 ++ 𝐵) substr ⟨𝑀, 𝑁⟩) = (𝐴 substr ⟨𝑀, 𝑁⟩)))
2423adantl 481 . 2 (((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉) ∧ (♯‘𝐴) = 0) → ((𝑀 ∈ (0...𝑁) ∧ 𝑁 ∈ (0...(♯‘𝐴))) → ((𝐴 ++ 𝐵) substr ⟨𝑀, 𝑁⟩) = (𝐴 substr ⟨𝑀, 𝑁⟩)))
25 ccatcl 14205 . . . . . 6 ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉) → (𝐴 ++ 𝐵) ∈ Word 𝑉)
2625ad2antrr 722 . . . . 5 ((((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉) ∧ (♯‘𝐴) ≠ 0) ∧ (𝑀 ∈ (0...𝑁) ∧ 𝑁 ∈ (0...(♯‘𝐴)))) → (𝐴 ++ 𝐵) ∈ Word 𝑉)
27 simprl 767 . . . . 5 ((((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉) ∧ (♯‘𝐴) ≠ 0) ∧ (𝑀 ∈ (0...𝑁) ∧ 𝑁 ∈ (0...(♯‘𝐴)))) → 𝑀 ∈ (0...𝑁))
28 elfzelfzccat 14213 . . . . . . 7 ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉) → (𝑁 ∈ (0...(♯‘𝐴)) → 𝑁 ∈ (0...(♯‘(𝐴 ++ 𝐵)))))
2928imp 406 . . . . . 6 (((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉) ∧ 𝑁 ∈ (0...(♯‘𝐴))) → 𝑁 ∈ (0...(♯‘(𝐴 ++ 𝐵))))
3029ad2ant2rl 745 . . . . 5 ((((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉) ∧ (♯‘𝐴) ≠ 0) ∧ (𝑀 ∈ (0...𝑁) ∧ 𝑁 ∈ (0...(♯‘𝐴)))) → 𝑁 ∈ (0...(♯‘(𝐴 ++ 𝐵))))
31 swrdvalfn 14292 . . . . 5 (((𝐴 ++ 𝐵) ∈ Word 𝑉𝑀 ∈ (0...𝑁) ∧ 𝑁 ∈ (0...(♯‘(𝐴 ++ 𝐵)))) → ((𝐴 ++ 𝐵) substr ⟨𝑀, 𝑁⟩) Fn (0..^(𝑁𝑀)))
3226, 27, 30, 31syl3anc 1369 . . . 4 ((((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉) ∧ (♯‘𝐴) ≠ 0) ∧ (𝑀 ∈ (0...𝑁) ∧ 𝑁 ∈ (0...(♯‘𝐴)))) → ((𝐴 ++ 𝐵) substr ⟨𝑀, 𝑁⟩) Fn (0..^(𝑁𝑀)))
33 3anass 1093 . . . . . . . 8 ((𝐴 ∈ Word 𝑉𝑀 ∈ (0...𝑁) ∧ 𝑁 ∈ (0...(♯‘𝐴))) ↔ (𝐴 ∈ Word 𝑉 ∧ (𝑀 ∈ (0...𝑁) ∧ 𝑁 ∈ (0...(♯‘𝐴)))))
3433simplbi2 500 . . . . . . 7 (𝐴 ∈ Word 𝑉 → ((𝑀 ∈ (0...𝑁) ∧ 𝑁 ∈ (0...(♯‘𝐴))) → (𝐴 ∈ Word 𝑉𝑀 ∈ (0...𝑁) ∧ 𝑁 ∈ (0...(♯‘𝐴)))))
3534ad2antrr 722 . . . . . 6 (((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉) ∧ (♯‘𝐴) ≠ 0) → ((𝑀 ∈ (0...𝑁) ∧ 𝑁 ∈ (0...(♯‘𝐴))) → (𝐴 ∈ Word 𝑉𝑀 ∈ (0...𝑁) ∧ 𝑁 ∈ (0...(♯‘𝐴)))))
3635imp 406 . . . . 5 ((((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉) ∧ (♯‘𝐴) ≠ 0) ∧ (𝑀 ∈ (0...𝑁) ∧ 𝑁 ∈ (0...(♯‘𝐴)))) → (𝐴 ∈ Word 𝑉𝑀 ∈ (0...𝑁) ∧ 𝑁 ∈ (0...(♯‘𝐴))))
37 swrdvalfn 14292 . . . . 5 ((𝐴 ∈ Word 𝑉𝑀 ∈ (0...𝑁) ∧ 𝑁 ∈ (0...(♯‘𝐴))) → (𝐴 substr ⟨𝑀, 𝑁⟩) Fn (0..^(𝑁𝑀)))
3836, 37syl 17 . . . 4 ((((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉) ∧ (♯‘𝐴) ≠ 0) ∧ (𝑀 ∈ (0...𝑁) ∧ 𝑁 ∈ (0...(♯‘𝐴)))) → (𝐴 substr ⟨𝑀, 𝑁⟩) Fn (0..^(𝑁𝑀)))
39 simp-4l 779 . . . . . 6 (((((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉) ∧ (♯‘𝐴) ≠ 0) ∧ (𝑀 ∈ (0...𝑁) ∧ 𝑁 ∈ (0...(♯‘𝐴)))) ∧ 𝑘 ∈ (0..^(𝑁𝑀))) → 𝐴 ∈ Word 𝑉)
40 simp-4r 780 . . . . . 6 (((((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉) ∧ (♯‘𝐴) ≠ 0) ∧ (𝑀 ∈ (0...𝑁) ∧ 𝑁 ∈ (0...(♯‘𝐴)))) ∧ 𝑘 ∈ (0..^(𝑁𝑀))) → 𝐵 ∈ Word 𝑉)
41 elfznn0 13278 . . . . . . . . . 10 (𝑀 ∈ (0...𝑁) → 𝑀 ∈ ℕ0)
42 nn0addcl 12198 . . . . . . . . . . 11 ((𝑘 ∈ ℕ0𝑀 ∈ ℕ0) → (𝑘 + 𝑀) ∈ ℕ0)
4342expcom 413 . . . . . . . . . 10 (𝑀 ∈ ℕ0 → (𝑘 ∈ ℕ0 → (𝑘 + 𝑀) ∈ ℕ0))
4441, 43syl 17 . . . . . . . . 9 (𝑀 ∈ (0...𝑁) → (𝑘 ∈ ℕ0 → (𝑘 + 𝑀) ∈ ℕ0))
4544ad2antrl 724 . . . . . . . 8 ((((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉) ∧ (♯‘𝐴) ≠ 0) ∧ (𝑀 ∈ (0...𝑁) ∧ 𝑁 ∈ (0...(♯‘𝐴)))) → (𝑘 ∈ ℕ0 → (𝑘 + 𝑀) ∈ ℕ0))
46 elfzonn0 13360 . . . . . . . 8 (𝑘 ∈ (0..^(𝑁𝑀)) → 𝑘 ∈ ℕ0)
4745, 46impel 505 . . . . . . 7 (((((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉) ∧ (♯‘𝐴) ≠ 0) ∧ (𝑀 ∈ (0...𝑁) ∧ 𝑁 ∈ (0...(♯‘𝐴)))) ∧ 𝑘 ∈ (0..^(𝑁𝑀))) → (𝑘 + 𝑀) ∈ ℕ0)
48 lencl 14164 . . . . . . . . . . 11 (𝐴 ∈ Word 𝑉 → (♯‘𝐴) ∈ ℕ0)
49 elnnne0 12177 . . . . . . . . . . . 12 ((♯‘𝐴) ∈ ℕ ↔ ((♯‘𝐴) ∈ ℕ0 ∧ (♯‘𝐴) ≠ 0))
5049simplbi2 500 . . . . . . . . . . 11 ((♯‘𝐴) ∈ ℕ0 → ((♯‘𝐴) ≠ 0 → (♯‘𝐴) ∈ ℕ))
5148, 50syl 17 . . . . . . . . . 10 (𝐴 ∈ Word 𝑉 → ((♯‘𝐴) ≠ 0 → (♯‘𝐴) ∈ ℕ))
5251adantr 480 . . . . . . . . 9 ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉) → ((♯‘𝐴) ≠ 0 → (♯‘𝐴) ∈ ℕ))
5352imp 406 . . . . . . . 8 (((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉) ∧ (♯‘𝐴) ≠ 0) → (♯‘𝐴) ∈ ℕ)
5453ad2antrr 722 . . . . . . 7 (((((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉) ∧ (♯‘𝐴) ≠ 0) ∧ (𝑀 ∈ (0...𝑁) ∧ 𝑁 ∈ (0...(♯‘𝐴)))) ∧ 𝑘 ∈ (0..^(𝑁𝑀))) → (♯‘𝐴) ∈ ℕ)
55 elfzo0 13356 . . . . . . . . 9 (𝑘 ∈ (0..^(𝑁𝑀)) ↔ (𝑘 ∈ ℕ0 ∧ (𝑁𝑀) ∈ ℕ ∧ 𝑘 < (𝑁𝑀)))
56 elfz2nn0 13276 . . . . . . . . . . . 12 (𝑁 ∈ (0...(♯‘𝐴)) ↔ (𝑁 ∈ ℕ0 ∧ (♯‘𝐴) ∈ ℕ0𝑁 ≤ (♯‘𝐴)))
57 nn0re 12172 . . . . . . . . . . . . . . . . . . . . . 22 (𝑘 ∈ ℕ0𝑘 ∈ ℝ)
5857ad2antrl 724 . . . . . . . . . . . . . . . . . . . . 21 (((𝑁 ∈ ℕ0 ∧ (♯‘𝐴) ∈ ℕ0) ∧ (𝑘 ∈ ℕ0𝑀 ∈ ℕ0)) → 𝑘 ∈ ℝ)
59 nn0re 12172 . . . . . . . . . . . . . . . . . . . . . 22 (𝑀 ∈ ℕ0𝑀 ∈ ℝ)
6059ad2antll 725 . . . . . . . . . . . . . . . . . . . . 21 (((𝑁 ∈ ℕ0 ∧ (♯‘𝐴) ∈ ℕ0) ∧ (𝑘 ∈ ℕ0𝑀 ∈ ℕ0)) → 𝑀 ∈ ℝ)
61 nn0re 12172 . . . . . . . . . . . . . . . . . . . . . 22 (𝑁 ∈ ℕ0𝑁 ∈ ℝ)
6261ad2antrr 722 . . . . . . . . . . . . . . . . . . . . 21 (((𝑁 ∈ ℕ0 ∧ (♯‘𝐴) ∈ ℕ0) ∧ (𝑘 ∈ ℕ0𝑀 ∈ ℕ0)) → 𝑁 ∈ ℝ)
6358, 60, 62ltaddsubd 11505 . . . . . . . . . . . . . . . . . . . 20 (((𝑁 ∈ ℕ0 ∧ (♯‘𝐴) ∈ ℕ0) ∧ (𝑘 ∈ ℕ0𝑀 ∈ ℕ0)) → ((𝑘 + 𝑀) < 𝑁𝑘 < (𝑁𝑀)))
64 nn0readdcl 12229 . . . . . . . . . . . . . . . . . . . . . . 23 ((𝑘 ∈ ℕ0𝑀 ∈ ℕ0) → (𝑘 + 𝑀) ∈ ℝ)
6564adantl 481 . . . . . . . . . . . . . . . . . . . . . 22 (((𝑁 ∈ ℕ0 ∧ (♯‘𝐴) ∈ ℕ0) ∧ (𝑘 ∈ ℕ0𝑀 ∈ ℕ0)) → (𝑘 + 𝑀) ∈ ℝ)
66 nn0re 12172 . . . . . . . . . . . . . . . . . . . . . . 23 ((♯‘𝐴) ∈ ℕ0 → (♯‘𝐴) ∈ ℝ)
6766ad2antlr 723 . . . . . . . . . . . . . . . . . . . . . 22 (((𝑁 ∈ ℕ0 ∧ (♯‘𝐴) ∈ ℕ0) ∧ (𝑘 ∈ ℕ0𝑀 ∈ ℕ0)) → (♯‘𝐴) ∈ ℝ)
68 ltletr 10997 . . . . . . . . . . . . . . . . . . . . . 22 (((𝑘 + 𝑀) ∈ ℝ ∧ 𝑁 ∈ ℝ ∧ (♯‘𝐴) ∈ ℝ) → (((𝑘 + 𝑀) < 𝑁𝑁 ≤ (♯‘𝐴)) → (𝑘 + 𝑀) < (♯‘𝐴)))
6965, 62, 67, 68syl3anc 1369 . . . . . . . . . . . . . . . . . . . . 21 (((𝑁 ∈ ℕ0 ∧ (♯‘𝐴) ∈ ℕ0) ∧ (𝑘 ∈ ℕ0𝑀 ∈ ℕ0)) → (((𝑘 + 𝑀) < 𝑁𝑁 ≤ (♯‘𝐴)) → (𝑘 + 𝑀) < (♯‘𝐴)))
7069expd 415 . . . . . . . . . . . . . . . . . . . 20 (((𝑁 ∈ ℕ0 ∧ (♯‘𝐴) ∈ ℕ0) ∧ (𝑘 ∈ ℕ0𝑀 ∈ ℕ0)) → ((𝑘 + 𝑀) < 𝑁 → (𝑁 ≤ (♯‘𝐴) → (𝑘 + 𝑀) < (♯‘𝐴))))
7163, 70sylbird 259 . . . . . . . . . . . . . . . . . . 19 (((𝑁 ∈ ℕ0 ∧ (♯‘𝐴) ∈ ℕ0) ∧ (𝑘 ∈ ℕ0𝑀 ∈ ℕ0)) → (𝑘 < (𝑁𝑀) → (𝑁 ≤ (♯‘𝐴) → (𝑘 + 𝑀) < (♯‘𝐴))))
7271ex 412 . . . . . . . . . . . . . . . . . 18 ((𝑁 ∈ ℕ0 ∧ (♯‘𝐴) ∈ ℕ0) → ((𝑘 ∈ ℕ0𝑀 ∈ ℕ0) → (𝑘 < (𝑁𝑀) → (𝑁 ≤ (♯‘𝐴) → (𝑘 + 𝑀) < (♯‘𝐴)))))
7372com24 95 . . . . . . . . . . . . . . . . 17 ((𝑁 ∈ ℕ0 ∧ (♯‘𝐴) ∈ ℕ0) → (𝑁 ≤ (♯‘𝐴) → (𝑘 < (𝑁𝑀) → ((𝑘 ∈ ℕ0𝑀 ∈ ℕ0) → (𝑘 + 𝑀) < (♯‘𝐴)))))
74733impia 1115 . . . . . . . . . . . . . . . 16 ((𝑁 ∈ ℕ0 ∧ (♯‘𝐴) ∈ ℕ0𝑁 ≤ (♯‘𝐴)) → (𝑘 < (𝑁𝑀) → ((𝑘 ∈ ℕ0𝑀 ∈ ℕ0) → (𝑘 + 𝑀) < (♯‘𝐴))))
7574com13 88 . . . . . . . . . . . . . . 15 ((𝑘 ∈ ℕ0𝑀 ∈ ℕ0) → (𝑘 < (𝑁𝑀) → ((𝑁 ∈ ℕ0 ∧ (♯‘𝐴) ∈ ℕ0𝑁 ≤ (♯‘𝐴)) → (𝑘 + 𝑀) < (♯‘𝐴))))
7675impancom 451 . . . . . . . . . . . . . 14 ((𝑘 ∈ ℕ0𝑘 < (𝑁𝑀)) → (𝑀 ∈ ℕ0 → ((𝑁 ∈ ℕ0 ∧ (♯‘𝐴) ∈ ℕ0𝑁 ≤ (♯‘𝐴)) → (𝑘 + 𝑀) < (♯‘𝐴))))
77763adant2 1129 . . . . . . . . . . . . 13 ((𝑘 ∈ ℕ0 ∧ (𝑁𝑀) ∈ ℕ ∧ 𝑘 < (𝑁𝑀)) → (𝑀 ∈ ℕ0 → ((𝑁 ∈ ℕ0 ∧ (♯‘𝐴) ∈ ℕ0𝑁 ≤ (♯‘𝐴)) → (𝑘 + 𝑀) < (♯‘𝐴))))
7877com13 88 . . . . . . . . . . . 12 ((𝑁 ∈ ℕ0 ∧ (♯‘𝐴) ∈ ℕ0𝑁 ≤ (♯‘𝐴)) → (𝑀 ∈ ℕ0 → ((𝑘 ∈ ℕ0 ∧ (𝑁𝑀) ∈ ℕ ∧ 𝑘 < (𝑁𝑀)) → (𝑘 + 𝑀) < (♯‘𝐴))))
7956, 78sylbi 216 . . . . . . . . . . 11 (𝑁 ∈ (0...(♯‘𝐴)) → (𝑀 ∈ ℕ0 → ((𝑘 ∈ ℕ0 ∧ (𝑁𝑀) ∈ ℕ ∧ 𝑘 < (𝑁𝑀)) → (𝑘 + 𝑀) < (♯‘𝐴))))
8041, 79mpan9 506 . . . . . . . . . 10 ((𝑀 ∈ (0...𝑁) ∧ 𝑁 ∈ (0...(♯‘𝐴))) → ((𝑘 ∈ ℕ0 ∧ (𝑁𝑀) ∈ ℕ ∧ 𝑘 < (𝑁𝑀)) → (𝑘 + 𝑀) < (♯‘𝐴)))
8180adantl 481 . . . . . . . . 9 ((((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉) ∧ (♯‘𝐴) ≠ 0) ∧ (𝑀 ∈ (0...𝑁) ∧ 𝑁 ∈ (0...(♯‘𝐴)))) → ((𝑘 ∈ ℕ0 ∧ (𝑁𝑀) ∈ ℕ ∧ 𝑘 < (𝑁𝑀)) → (𝑘 + 𝑀) < (♯‘𝐴)))
8255, 81syl5bi 241 . . . . . . . 8 ((((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉) ∧ (♯‘𝐴) ≠ 0) ∧ (𝑀 ∈ (0...𝑁) ∧ 𝑁 ∈ (0...(♯‘𝐴)))) → (𝑘 ∈ (0..^(𝑁𝑀)) → (𝑘 + 𝑀) < (♯‘𝐴)))
8382imp 406 . . . . . . 7 (((((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉) ∧ (♯‘𝐴) ≠ 0) ∧ (𝑀 ∈ (0...𝑁) ∧ 𝑁 ∈ (0...(♯‘𝐴)))) ∧ 𝑘 ∈ (0..^(𝑁𝑀))) → (𝑘 + 𝑀) < (♯‘𝐴))
84 elfzo0 13356 . . . . . . 7 ((𝑘 + 𝑀) ∈ (0..^(♯‘𝐴)) ↔ ((𝑘 + 𝑀) ∈ ℕ0 ∧ (♯‘𝐴) ∈ ℕ ∧ (𝑘 + 𝑀) < (♯‘𝐴)))
8547, 54, 83, 84syl3anbrc 1341 . . . . . 6 (((((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉) ∧ (♯‘𝐴) ≠ 0) ∧ (𝑀 ∈ (0...𝑁) ∧ 𝑁 ∈ (0...(♯‘𝐴)))) ∧ 𝑘 ∈ (0..^(𝑁𝑀))) → (𝑘 + 𝑀) ∈ (0..^(♯‘𝐴)))
86 ccatval1 14209 . . . . . 6 ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉 ∧ (𝑘 + 𝑀) ∈ (0..^(♯‘𝐴))) → ((𝐴 ++ 𝐵)‘(𝑘 + 𝑀)) = (𝐴‘(𝑘 + 𝑀)))
8739, 40, 85, 86syl3anc 1369 . . . . 5 (((((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉) ∧ (♯‘𝐴) ≠ 0) ∧ (𝑀 ∈ (0...𝑁) ∧ 𝑁 ∈ (0...(♯‘𝐴)))) ∧ 𝑘 ∈ (0..^(𝑁𝑀))) → ((𝐴 ++ 𝐵)‘(𝑘 + 𝑀)) = (𝐴‘(𝑘 + 𝑀)))
8825ad5ant12 752 . . . . . 6 (((((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉) ∧ (♯‘𝐴) ≠ 0) ∧ (𝑀 ∈ (0...𝑁) ∧ 𝑁 ∈ (0...(♯‘𝐴)))) ∧ 𝑘 ∈ (0..^(𝑁𝑀))) → (𝐴 ++ 𝐵) ∈ Word 𝑉)
89 simplrl 773 . . . . . 6 (((((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉) ∧ (♯‘𝐴) ≠ 0) ∧ (𝑀 ∈ (0...𝑁) ∧ 𝑁 ∈ (0...(♯‘𝐴)))) ∧ 𝑘 ∈ (0..^(𝑁𝑀))) → 𝑀 ∈ (0...𝑁))
9030adantr 480 . . . . . 6 (((((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉) ∧ (♯‘𝐴) ≠ 0) ∧ (𝑀 ∈ (0...𝑁) ∧ 𝑁 ∈ (0...(♯‘𝐴)))) ∧ 𝑘 ∈ (0..^(𝑁𝑀))) → 𝑁 ∈ (0...(♯‘(𝐴 ++ 𝐵))))
91 simpr 484 . . . . . 6 (((((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉) ∧ (♯‘𝐴) ≠ 0) ∧ (𝑀 ∈ (0...𝑁) ∧ 𝑁 ∈ (0...(♯‘𝐴)))) ∧ 𝑘 ∈ (0..^(𝑁𝑀))) → 𝑘 ∈ (0..^(𝑁𝑀)))
92 swrdfv 14289 . . . . . 6 ((((𝐴 ++ 𝐵) ∈ Word 𝑉𝑀 ∈ (0...𝑁) ∧ 𝑁 ∈ (0...(♯‘(𝐴 ++ 𝐵)))) ∧ 𝑘 ∈ (0..^(𝑁𝑀))) → (((𝐴 ++ 𝐵) substr ⟨𝑀, 𝑁⟩)‘𝑘) = ((𝐴 ++ 𝐵)‘(𝑘 + 𝑀)))
9388, 89, 90, 91, 92syl31anc 1371 . . . . 5 (((((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉) ∧ (♯‘𝐴) ≠ 0) ∧ (𝑀 ∈ (0...𝑁) ∧ 𝑁 ∈ (0...(♯‘𝐴)))) ∧ 𝑘 ∈ (0..^(𝑁𝑀))) → (((𝐴 ++ 𝐵) substr ⟨𝑀, 𝑁⟩)‘𝑘) = ((𝐴 ++ 𝐵)‘(𝑘 + 𝑀)))
94 swrdfv 14289 . . . . . 6 (((𝐴 ∈ Word 𝑉𝑀 ∈ (0...𝑁) ∧ 𝑁 ∈ (0...(♯‘𝐴))) ∧ 𝑘 ∈ (0..^(𝑁𝑀))) → ((𝐴 substr ⟨𝑀, 𝑁⟩)‘𝑘) = (𝐴‘(𝑘 + 𝑀)))
9536, 94sylan 579 . . . . 5 (((((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉) ∧ (♯‘𝐴) ≠ 0) ∧ (𝑀 ∈ (0...𝑁) ∧ 𝑁 ∈ (0...(♯‘𝐴)))) ∧ 𝑘 ∈ (0..^(𝑁𝑀))) → ((𝐴 substr ⟨𝑀, 𝑁⟩)‘𝑘) = (𝐴‘(𝑘 + 𝑀)))
9687, 93, 953eqtr4d 2788 . . . 4 (((((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉) ∧ (♯‘𝐴) ≠ 0) ∧ (𝑀 ∈ (0...𝑁) ∧ 𝑁 ∈ (0...(♯‘𝐴)))) ∧ 𝑘 ∈ (0..^(𝑁𝑀))) → (((𝐴 ++ 𝐵) substr ⟨𝑀, 𝑁⟩)‘𝑘) = ((𝐴 substr ⟨𝑀, 𝑁⟩)‘𝑘))
9732, 38, 96eqfnfvd 6894 . . 3 ((((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉) ∧ (♯‘𝐴) ≠ 0) ∧ (𝑀 ∈ (0...𝑁) ∧ 𝑁 ∈ (0...(♯‘𝐴)))) → ((𝐴 ++ 𝐵) substr ⟨𝑀, 𝑁⟩) = (𝐴 substr ⟨𝑀, 𝑁⟩))
9897ex 412 . 2 (((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉) ∧ (♯‘𝐴) ≠ 0) → ((𝑀 ∈ (0...𝑁) ∧ 𝑁 ∈ (0...(♯‘𝐴))) → ((𝐴 ++ 𝐵) substr ⟨𝑀, 𝑁⟩) = (𝐴 substr ⟨𝑀, 𝑁⟩)))
9924, 98pm2.61dane 3031 1 ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉) → ((𝑀 ∈ (0...𝑁) ∧ 𝑁 ∈ (0...(♯‘𝐴))) → ((𝐴 ++ 𝐵) substr ⟨𝑀, 𝑁⟩) = (𝐴 substr ⟨𝑀, 𝑁⟩)))
Colors of variables: wff setvar class
Syntax hints:  wi 4  wa 395  w3a 1085   = wceq 1539  wcel 2108  wne 2942  c0 4253  cop 4564   class class class wbr 5070   Fn wfn 6413  cfv 6418  (class class class)co 7255  cr 10801  0cc0 10802   + caddc 10805   < clt 10940  cle 10941  cmin 11135  cn 11903  0cn0 12163  ...cfz 13168  ..^cfzo 13311  chash 13972  Word cword 14145   ++ cconcat 14201   substr csubstr 14281
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1799  ax-4 1813  ax-5 1914  ax-6 1972  ax-7 2012  ax-8 2110  ax-9 2118  ax-10 2139  ax-11 2156  ax-12 2173  ax-ext 2709  ax-rep 5205  ax-sep 5218  ax-nul 5225  ax-pow 5283  ax-pr 5347  ax-un 7566  ax-cnex 10858  ax-resscn 10859  ax-1cn 10860  ax-icn 10861  ax-addcl 10862  ax-addrcl 10863  ax-mulcl 10864  ax-mulrcl 10865  ax-mulcom 10866  ax-addass 10867  ax-mulass 10868  ax-distr 10869  ax-i2m1 10870  ax-1ne0 10871  ax-1rid 10872  ax-rnegex 10873  ax-rrecex 10874  ax-cnre 10875  ax-pre-lttri 10876  ax-pre-lttrn 10877  ax-pre-ltadd 10878  ax-pre-mulgt0 10879
This theorem depends on definitions:  df-bi 206  df-an 396  df-or 844  df-3or 1086  df-3an 1087  df-tru 1542  df-fal 1552  df-ex 1784  df-nf 1788  df-sb 2069  df-mo 2540  df-eu 2569  df-clab 2716  df-cleq 2730  df-clel 2817  df-nfc 2888  df-ne 2943  df-nel 3049  df-ral 3068  df-rex 3069  df-reu 3070  df-rab 3072  df-v 3424  df-sbc 3712  df-csb 3829  df-dif 3886  df-un 3888  df-in 3890  df-ss 3900  df-pss 3902  df-nul 4254  df-if 4457  df-pw 4532  df-sn 4559  df-pr 4561  df-tp 4563  df-op 4565  df-uni 4837  df-int 4877  df-iun 4923  df-br 5071  df-opab 5133  df-mpt 5154  df-tr 5188  df-id 5480  df-eprel 5486  df-po 5494  df-so 5495  df-fr 5535  df-we 5537  df-xp 5586  df-rel 5587  df-cnv 5588  df-co 5589  df-dm 5590  df-rn 5591  df-res 5592  df-ima 5593  df-pred 6191  df-ord 6254  df-on 6255  df-lim 6256  df-suc 6257  df-iota 6376  df-fun 6420  df-fn 6421  df-f 6422  df-f1 6423  df-fo 6424  df-f1o 6425  df-fv 6426  df-riota 7212  df-ov 7258  df-oprab 7259  df-mpo 7260  df-om 7688  df-1st 7804  df-2nd 7805  df-frecs 8068  df-wrecs 8099  df-recs 8173  df-rdg 8212  df-1o 8267  df-er 8456  df-en 8692  df-dom 8693  df-sdom 8694  df-fin 8695  df-card 9628  df-pnf 10942  df-mnf 10943  df-xr 10944  df-ltxr 10945  df-le 10946  df-sub 11137  df-neg 11138  df-nn 11904  df-n0 12164  df-z 12250  df-uz 12512  df-fz 13169  df-fzo 13312  df-hash 13973  df-word 14146  df-concat 14202  df-substr 14282
This theorem is referenced by:  pfxccat3  14375  pfxccatpfx1  14377  swrdccatin1d  14384
  Copyright terms: Public domain W3C validator