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

Theorem swrdccatin1 14314
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 7239 . . . . . 6 ((♯‘𝐴) = 0 → (0...(♯‘𝐴)) = (0...0))
21eleq2d 2824 . . . . 5 ((♯‘𝐴) = 0 → (𝑁 ∈ (0...(♯‘𝐴)) ↔ 𝑁 ∈ (0...0)))
3 elfz1eq 13147 . . . . . 6 (𝑁 ∈ (0...0) → 𝑁 = 0)
4 elfz1eq 13147 . . . . . . . 8 (𝑀 ∈ (0...0) → 𝑀 = 0)
5 swrd00 14233 . . . . . . . . . 10 ((𝐴 ++ 𝐵) substr ⟨0, 0⟩) = ∅
6 swrd00 14233 . . . . . . . . . 10 (𝐴 substr ⟨0, 0⟩) = ∅
75, 6eqtr4i 2769 . . . . . . . . 9 ((𝐴 ++ 𝐵) substr ⟨0, 0⟩) = (𝐴 substr ⟨0, 0⟩)
8 opeq1 4798 . . . . . . . . . 10 (𝑀 = 0 → ⟨𝑀, 0⟩ = ⟨0, 0⟩)
98oveq2d 7247 . . . . . . . . 9 (𝑀 = 0 → ((𝐴 ++ 𝐵) substr ⟨𝑀, 0⟩) = ((𝐴 ++ 𝐵) substr ⟨0, 0⟩))
108oveq2d 7247 . . . . . . . . 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 7239 . . . . . . . . 9 (𝑁 = 0 → (0...𝑁) = (0...0))
1413eleq2d 2824 . . . . . . . 8 (𝑁 = 0 → (𝑀 ∈ (0...𝑁) ↔ 𝑀 ∈ (0...0)))
15 opeq2 4799 . . . . . . . . . 10 (𝑁 = 0 → ⟨𝑀, 𝑁⟩ = ⟨𝑀, 0⟩)
1615oveq2d 7247 . . . . . . . . 9 (𝑁 = 0 → ((𝐴 ++ 𝐵) substr ⟨𝑀, 𝑁⟩) = ((𝐴 ++ 𝐵) substr ⟨𝑀, 0⟩))
1715oveq2d 7247 . . . . . . . . 9 (𝑁 = 0 → (𝐴 substr ⟨𝑀, 𝑁⟩) = (𝐴 substr ⟨𝑀, 0⟩))
1816, 17eqeq12d 2754 . . . . . . . 8 (𝑁 = 0 → (((𝐴 ++ 𝐵) substr ⟨𝑀, 𝑁⟩) = (𝐴 substr ⟨𝑀, 𝑁⟩) ↔ ((𝐴 ++ 𝐵) substr ⟨𝑀, 0⟩) = (𝐴 substr ⟨𝑀, 0⟩)))
1914, 18imbi12d 348 . . . . . . 7 (𝑁 = 0 → ((𝑀 ∈ (0...𝑁) → ((𝐴 ++ 𝐵) substr ⟨𝑀, 𝑁⟩) = (𝐴 substr ⟨𝑀, 𝑁⟩)) ↔ (𝑀 ∈ (0...0) → ((𝐴 ++ 𝐵) substr ⟨𝑀, 0⟩) = (𝐴 substr ⟨𝑀, 0⟩))))
2012, 19mpbiri 261 . . . . . 6 (𝑁 = 0 → (𝑀 ∈ (0...𝑁) → ((𝐴 ++ 𝐵) substr ⟨𝑀, 𝑁⟩) = (𝐴 substr ⟨𝑀, 𝑁⟩)))
213, 20syl 17 . . . . 5 (𝑁 ∈ (0...0) → (𝑀 ∈ (0...𝑁) → ((𝐴 ++ 𝐵) substr ⟨𝑀, 𝑁⟩) = (𝐴 substr ⟨𝑀, 𝑁⟩)))
222, 21syl6bi 256 . . . 4 ((♯‘𝐴) = 0 → (𝑁 ∈ (0...(♯‘𝐴)) → (𝑀 ∈ (0...𝑁) → ((𝐴 ++ 𝐵) substr ⟨𝑀, 𝑁⟩) = (𝐴 substr ⟨𝑀, 𝑁⟩))))
2322impcomd 415 . . 3 ((♯‘𝐴) = 0 → ((𝑀 ∈ (0...𝑁) ∧ 𝑁 ∈ (0...(♯‘𝐴))) → ((𝐴 ++ 𝐵) substr ⟨𝑀, 𝑁⟩) = (𝐴 substr ⟨𝑀, 𝑁⟩)))
2423adantl 485 . 2 (((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉) ∧ (♯‘𝐴) = 0) → ((𝑀 ∈ (0...𝑁) ∧ 𝑁 ∈ (0...(♯‘𝐴))) → ((𝐴 ++ 𝐵) substr ⟨𝑀, 𝑁⟩) = (𝐴 substr ⟨𝑀, 𝑁⟩)))
25 ccatcl 14153 . . . . . 6 ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉) → (𝐴 ++ 𝐵) ∈ Word 𝑉)
2625ad2antrr 726 . . . . 5 ((((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉) ∧ (♯‘𝐴) ≠ 0) ∧ (𝑀 ∈ (0...𝑁) ∧ 𝑁 ∈ (0...(♯‘𝐴)))) → (𝐴 ++ 𝐵) ∈ Word 𝑉)
27 simprl 771 . . . . 5 ((((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉) ∧ (♯‘𝐴) ≠ 0) ∧ (𝑀 ∈ (0...𝑁) ∧ 𝑁 ∈ (0...(♯‘𝐴)))) → 𝑀 ∈ (0...𝑁))
28 elfzelfzccat 14161 . . . . . . 7 ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉) → (𝑁 ∈ (0...(♯‘𝐴)) → 𝑁 ∈ (0...(♯‘(𝐴 ++ 𝐵)))))
2928imp 410 . . . . . 6 (((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉) ∧ 𝑁 ∈ (0...(♯‘𝐴))) → 𝑁 ∈ (0...(♯‘(𝐴 ++ 𝐵))))
3029ad2ant2rl 749 . . . . 5 ((((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉) ∧ (♯‘𝐴) ≠ 0) ∧ (𝑀 ∈ (0...𝑁) ∧ 𝑁 ∈ (0...(♯‘𝐴)))) → 𝑁 ∈ (0...(♯‘(𝐴 ++ 𝐵))))
31 swrdvalfn 14240 . . . . 5 (((𝐴 ++ 𝐵) ∈ Word 𝑉𝑀 ∈ (0...𝑁) ∧ 𝑁 ∈ (0...(♯‘(𝐴 ++ 𝐵)))) → ((𝐴 ++ 𝐵) substr ⟨𝑀, 𝑁⟩) Fn (0..^(𝑁𝑀)))
3226, 27, 30, 31syl3anc 1373 . . . 4 ((((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉) ∧ (♯‘𝐴) ≠ 0) ∧ (𝑀 ∈ (0...𝑁) ∧ 𝑁 ∈ (0...(♯‘𝐴)))) → ((𝐴 ++ 𝐵) substr ⟨𝑀, 𝑁⟩) Fn (0..^(𝑁𝑀)))
33 3anass 1097 . . . . . . . 8 ((𝐴 ∈ Word 𝑉𝑀 ∈ (0...𝑁) ∧ 𝑁 ∈ (0...(♯‘𝐴))) ↔ (𝐴 ∈ Word 𝑉 ∧ (𝑀 ∈ (0...𝑁) ∧ 𝑁 ∈ (0...(♯‘𝐴)))))
3433simplbi2 504 . . . . . . 7 (𝐴 ∈ Word 𝑉 → ((𝑀 ∈ (0...𝑁) ∧ 𝑁 ∈ (0...(♯‘𝐴))) → (𝐴 ∈ Word 𝑉𝑀 ∈ (0...𝑁) ∧ 𝑁 ∈ (0...(♯‘𝐴)))))
3534ad2antrr 726 . . . . . 6 (((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉) ∧ (♯‘𝐴) ≠ 0) → ((𝑀 ∈ (0...𝑁) ∧ 𝑁 ∈ (0...(♯‘𝐴))) → (𝐴 ∈ Word 𝑉𝑀 ∈ (0...𝑁) ∧ 𝑁 ∈ (0...(♯‘𝐴)))))
3635imp 410 . . . . 5 ((((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉) ∧ (♯‘𝐴) ≠ 0) ∧ (𝑀 ∈ (0...𝑁) ∧ 𝑁 ∈ (0...(♯‘𝐴)))) → (𝐴 ∈ Word 𝑉𝑀 ∈ (0...𝑁) ∧ 𝑁 ∈ (0...(♯‘𝐴))))
37 swrdvalfn 14240 . . . . 5 ((𝐴 ∈ Word 𝑉𝑀 ∈ (0...𝑁) ∧ 𝑁 ∈ (0...(♯‘𝐴))) → (𝐴 substr ⟨𝑀, 𝑁⟩) Fn (0..^(𝑁𝑀)))
3836, 37syl 17 . . . 4 ((((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉) ∧ (♯‘𝐴) ≠ 0) ∧ (𝑀 ∈ (0...𝑁) ∧ 𝑁 ∈ (0...(♯‘𝐴)))) → (𝐴 substr ⟨𝑀, 𝑁⟩) Fn (0..^(𝑁𝑀)))
39 simp-4l 783 . . . . . 6 (((((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉) ∧ (♯‘𝐴) ≠ 0) ∧ (𝑀 ∈ (0...𝑁) ∧ 𝑁 ∈ (0...(♯‘𝐴)))) ∧ 𝑘 ∈ (0..^(𝑁𝑀))) → 𝐴 ∈ Word 𝑉)
40 simp-4r 784 . . . . . 6 (((((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉) ∧ (♯‘𝐴) ≠ 0) ∧ (𝑀 ∈ (0...𝑁) ∧ 𝑁 ∈ (0...(♯‘𝐴)))) ∧ 𝑘 ∈ (0..^(𝑁𝑀))) → 𝐵 ∈ Word 𝑉)
41 elfznn0 13229 . . . . . . . . . 10 (𝑀 ∈ (0...𝑁) → 𝑀 ∈ ℕ0)
42 nn0addcl 12149 . . . . . . . . . . 11 ((𝑘 ∈ ℕ0𝑀 ∈ ℕ0) → (𝑘 + 𝑀) ∈ ℕ0)
4342expcom 417 . . . . . . . . . 10 (𝑀 ∈ ℕ0 → (𝑘 ∈ ℕ0 → (𝑘 + 𝑀) ∈ ℕ0))
4441, 43syl 17 . . . . . . . . 9 (𝑀 ∈ (0...𝑁) → (𝑘 ∈ ℕ0 → (𝑘 + 𝑀) ∈ ℕ0))
4544ad2antrl 728 . . . . . . . 8 ((((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉) ∧ (♯‘𝐴) ≠ 0) ∧ (𝑀 ∈ (0...𝑁) ∧ 𝑁 ∈ (0...(♯‘𝐴)))) → (𝑘 ∈ ℕ0 → (𝑘 + 𝑀) ∈ ℕ0))
46 elfzonn0 13311 . . . . . . . 8 (𝑘 ∈ (0..^(𝑁𝑀)) → 𝑘 ∈ ℕ0)
4745, 46impel 509 . . . . . . 7 (((((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉) ∧ (♯‘𝐴) ≠ 0) ∧ (𝑀 ∈ (0...𝑁) ∧ 𝑁 ∈ (0...(♯‘𝐴)))) ∧ 𝑘 ∈ (0..^(𝑁𝑀))) → (𝑘 + 𝑀) ∈ ℕ0)
48 lencl 14112 . . . . . . . . . . 11 (𝐴 ∈ Word 𝑉 → (♯‘𝐴) ∈ ℕ0)
49 elnnne0 12128 . . . . . . . . . . . 12 ((♯‘𝐴) ∈ ℕ ↔ ((♯‘𝐴) ∈ ℕ0 ∧ (♯‘𝐴) ≠ 0))
5049simplbi2 504 . . . . . . . . . . 11 ((♯‘𝐴) ∈ ℕ0 → ((♯‘𝐴) ≠ 0 → (♯‘𝐴) ∈ ℕ))
5148, 50syl 17 . . . . . . . . . 10 (𝐴 ∈ Word 𝑉 → ((♯‘𝐴) ≠ 0 → (♯‘𝐴) ∈ ℕ))
5251adantr 484 . . . . . . . . 9 ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉) → ((♯‘𝐴) ≠ 0 → (♯‘𝐴) ∈ ℕ))
5352imp 410 . . . . . . . 8 (((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉) ∧ (♯‘𝐴) ≠ 0) → (♯‘𝐴) ∈ ℕ)
5453ad2antrr 726 . . . . . . 7 (((((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉) ∧ (♯‘𝐴) ≠ 0) ∧ (𝑀 ∈ (0...𝑁) ∧ 𝑁 ∈ (0...(♯‘𝐴)))) ∧ 𝑘 ∈ (0..^(𝑁𝑀))) → (♯‘𝐴) ∈ ℕ)
55 elfzo0 13307 . . . . . . . . 9 (𝑘 ∈ (0..^(𝑁𝑀)) ↔ (𝑘 ∈ ℕ0 ∧ (𝑁𝑀) ∈ ℕ ∧ 𝑘 < (𝑁𝑀)))
56 elfz2nn0 13227 . . . . . . . . . . . 12 (𝑁 ∈ (0...(♯‘𝐴)) ↔ (𝑁 ∈ ℕ0 ∧ (♯‘𝐴) ∈ ℕ0𝑁 ≤ (♯‘𝐴)))
57 nn0re 12123 . . . . . . . . . . . . . . . . . . . . . 22 (𝑘 ∈ ℕ0𝑘 ∈ ℝ)
5857ad2antrl 728 . . . . . . . . . . . . . . . . . . . . 21 (((𝑁 ∈ ℕ0 ∧ (♯‘𝐴) ∈ ℕ0) ∧ (𝑘 ∈ ℕ0𝑀 ∈ ℕ0)) → 𝑘 ∈ ℝ)
59 nn0re 12123 . . . . . . . . . . . . . . . . . . . . . 22 (𝑀 ∈ ℕ0𝑀 ∈ ℝ)
6059ad2antll 729 . . . . . . . . . . . . . . . . . . . . 21 (((𝑁 ∈ ℕ0 ∧ (♯‘𝐴) ∈ ℕ0) ∧ (𝑘 ∈ ℕ0𝑀 ∈ ℕ0)) → 𝑀 ∈ ℝ)
61 nn0re 12123 . . . . . . . . . . . . . . . . . . . . . 22 (𝑁 ∈ ℕ0𝑁 ∈ ℝ)
6261ad2antrr 726 . . . . . . . . . . . . . . . . . . . . 21 (((𝑁 ∈ ℕ0 ∧ (♯‘𝐴) ∈ ℕ0) ∧ (𝑘 ∈ ℕ0𝑀 ∈ ℕ0)) → 𝑁 ∈ ℝ)
6358, 60, 62ltaddsubd 11456 . . . . . . . . . . . . . . . . . . . 20 (((𝑁 ∈ ℕ0 ∧ (♯‘𝐴) ∈ ℕ0) ∧ (𝑘 ∈ ℕ0𝑀 ∈ ℕ0)) → ((𝑘 + 𝑀) < 𝑁𝑘 < (𝑁𝑀)))
64 nn0readdcl 12180 . . . . . . . . . . . . . . . . . . . . . . 23 ((𝑘 ∈ ℕ0𝑀 ∈ ℕ0) → (𝑘 + 𝑀) ∈ ℝ)
6564adantl 485 . . . . . . . . . . . . . . . . . . . . . 22 (((𝑁 ∈ ℕ0 ∧ (♯‘𝐴) ∈ ℕ0) ∧ (𝑘 ∈ ℕ0𝑀 ∈ ℕ0)) → (𝑘 + 𝑀) ∈ ℝ)
66 nn0re 12123 . . . . . . . . . . . . . . . . . . . . . . 23 ((♯‘𝐴) ∈ ℕ0 → (♯‘𝐴) ∈ ℝ)
6766ad2antlr 727 . . . . . . . . . . . . . . . . . . . . . 22 (((𝑁 ∈ ℕ0 ∧ (♯‘𝐴) ∈ ℕ0) ∧ (𝑘 ∈ ℕ0𝑀 ∈ ℕ0)) → (♯‘𝐴) ∈ ℝ)
68 ltletr 10948 . . . . . . . . . . . . . . . . . . . . . 22 (((𝑘 + 𝑀) ∈ ℝ ∧ 𝑁 ∈ ℝ ∧ (♯‘𝐴) ∈ ℝ) → (((𝑘 + 𝑀) < 𝑁𝑁 ≤ (♯‘𝐴)) → (𝑘 + 𝑀) < (♯‘𝐴)))
6965, 62, 67, 68syl3anc 1373 . . . . . . . . . . . . . . . . . . . . 21 (((𝑁 ∈ ℕ0 ∧ (♯‘𝐴) ∈ ℕ0) ∧ (𝑘 ∈ ℕ0𝑀 ∈ ℕ0)) → (((𝑘 + 𝑀) < 𝑁𝑁 ≤ (♯‘𝐴)) → (𝑘 + 𝑀) < (♯‘𝐴)))
7069expd 419 . . . . . . . . . . . . . . . . . . . 20 (((𝑁 ∈ ℕ0 ∧ (♯‘𝐴) ∈ ℕ0) ∧ (𝑘 ∈ ℕ0𝑀 ∈ ℕ0)) → ((𝑘 + 𝑀) < 𝑁 → (𝑁 ≤ (♯‘𝐴) → (𝑘 + 𝑀) < (♯‘𝐴))))
7163, 70sylbird 263 . . . . . . . . . . . . . . . . . . 19 (((𝑁 ∈ ℕ0 ∧ (♯‘𝐴) ∈ ℕ0) ∧ (𝑘 ∈ ℕ0𝑀 ∈ ℕ0)) → (𝑘 < (𝑁𝑀) → (𝑁 ≤ (♯‘𝐴) → (𝑘 + 𝑀) < (♯‘𝐴))))
7271ex 416 . . . . . . . . . . . . . . . . . 18 ((𝑁 ∈ ℕ0 ∧ (♯‘𝐴) ∈ ℕ0) → ((𝑘 ∈ ℕ0𝑀 ∈ ℕ0) → (𝑘 < (𝑁𝑀) → (𝑁 ≤ (♯‘𝐴) → (𝑘 + 𝑀) < (♯‘𝐴)))))
7372com24 95 . . . . . . . . . . . . . . . . 17 ((𝑁 ∈ ℕ0 ∧ (♯‘𝐴) ∈ ℕ0) → (𝑁 ≤ (♯‘𝐴) → (𝑘 < (𝑁𝑀) → ((𝑘 ∈ ℕ0𝑀 ∈ ℕ0) → (𝑘 + 𝑀) < (♯‘𝐴)))))
74733impia 1119 . . . . . . . . . . . . . . . 16 ((𝑁 ∈ ℕ0 ∧ (♯‘𝐴) ∈ ℕ0𝑁 ≤ (♯‘𝐴)) → (𝑘 < (𝑁𝑀) → ((𝑘 ∈ ℕ0𝑀 ∈ ℕ0) → (𝑘 + 𝑀) < (♯‘𝐴))))
7574com13 88 . . . . . . . . . . . . . . 15 ((𝑘 ∈ ℕ0𝑀 ∈ ℕ0) → (𝑘 < (𝑁𝑀) → ((𝑁 ∈ ℕ0 ∧ (♯‘𝐴) ∈ ℕ0𝑁 ≤ (♯‘𝐴)) → (𝑘 + 𝑀) < (♯‘𝐴))))
7675impancom 455 . . . . . . . . . . . . . 14 ((𝑘 ∈ ℕ0𝑘 < (𝑁𝑀)) → (𝑀 ∈ ℕ0 → ((𝑁 ∈ ℕ0 ∧ (♯‘𝐴) ∈ ℕ0𝑁 ≤ (♯‘𝐴)) → (𝑘 + 𝑀) < (♯‘𝐴))))
77763adant2 1133 . . . . . . . . . . . . 13 ((𝑘 ∈ ℕ0 ∧ (𝑁𝑀) ∈ ℕ ∧ 𝑘 < (𝑁𝑀)) → (𝑀 ∈ ℕ0 → ((𝑁 ∈ ℕ0 ∧ (♯‘𝐴) ∈ ℕ0𝑁 ≤ (♯‘𝐴)) → (𝑘 + 𝑀) < (♯‘𝐴))))
7877com13 88 . . . . . . . . . . . 12 ((𝑁 ∈ ℕ0 ∧ (♯‘𝐴) ∈ ℕ0𝑁 ≤ (♯‘𝐴)) → (𝑀 ∈ ℕ0 → ((𝑘 ∈ ℕ0 ∧ (𝑁𝑀) ∈ ℕ ∧ 𝑘 < (𝑁𝑀)) → (𝑘 + 𝑀) < (♯‘𝐴))))
7956, 78sylbi 220 . . . . . . . . . . 11 (𝑁 ∈ (0...(♯‘𝐴)) → (𝑀 ∈ ℕ0 → ((𝑘 ∈ ℕ0 ∧ (𝑁𝑀) ∈ ℕ ∧ 𝑘 < (𝑁𝑀)) → (𝑘 + 𝑀) < (♯‘𝐴))))
8041, 79mpan9 510 . . . . . . . . . 10 ((𝑀 ∈ (0...𝑁) ∧ 𝑁 ∈ (0...(♯‘𝐴))) → ((𝑘 ∈ ℕ0 ∧ (𝑁𝑀) ∈ ℕ ∧ 𝑘 < (𝑁𝑀)) → (𝑘 + 𝑀) < (♯‘𝐴)))
8180adantl 485 . . . . . . . . 9 ((((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉) ∧ (♯‘𝐴) ≠ 0) ∧ (𝑀 ∈ (0...𝑁) ∧ 𝑁 ∈ (0...(♯‘𝐴)))) → ((𝑘 ∈ ℕ0 ∧ (𝑁𝑀) ∈ ℕ ∧ 𝑘 < (𝑁𝑀)) → (𝑘 + 𝑀) < (♯‘𝐴)))
8255, 81syl5bi 245 . . . . . . . 8 ((((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉) ∧ (♯‘𝐴) ≠ 0) ∧ (𝑀 ∈ (0...𝑁) ∧ 𝑁 ∈ (0...(♯‘𝐴)))) → (𝑘 ∈ (0..^(𝑁𝑀)) → (𝑘 + 𝑀) < (♯‘𝐴)))
8382imp 410 . . . . . . 7 (((((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉) ∧ (♯‘𝐴) ≠ 0) ∧ (𝑀 ∈ (0...𝑁) ∧ 𝑁 ∈ (0...(♯‘𝐴)))) ∧ 𝑘 ∈ (0..^(𝑁𝑀))) → (𝑘 + 𝑀) < (♯‘𝐴))
84 elfzo0 13307 . . . . . . 7 ((𝑘 + 𝑀) ∈ (0..^(♯‘𝐴)) ↔ ((𝑘 + 𝑀) ∈ ℕ0 ∧ (♯‘𝐴) ∈ ℕ ∧ (𝑘 + 𝑀) < (♯‘𝐴)))
8547, 54, 83, 84syl3anbrc 1345 . . . . . 6 (((((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉) ∧ (♯‘𝐴) ≠ 0) ∧ (𝑀 ∈ (0...𝑁) ∧ 𝑁 ∈ (0...(♯‘𝐴)))) ∧ 𝑘 ∈ (0..^(𝑁𝑀))) → (𝑘 + 𝑀) ∈ (0..^(♯‘𝐴)))
86 ccatval1 14157 . . . . . 6 ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉 ∧ (𝑘 + 𝑀) ∈ (0..^(♯‘𝐴))) → ((𝐴 ++ 𝐵)‘(𝑘 + 𝑀)) = (𝐴‘(𝑘 + 𝑀)))
8739, 40, 85, 86syl3anc 1373 . . . . 5 (((((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉) ∧ (♯‘𝐴) ≠ 0) ∧ (𝑀 ∈ (0...𝑁) ∧ 𝑁 ∈ (0...(♯‘𝐴)))) ∧ 𝑘 ∈ (0..^(𝑁𝑀))) → ((𝐴 ++ 𝐵)‘(𝑘 + 𝑀)) = (𝐴‘(𝑘 + 𝑀)))
8825ad5ant12 756 . . . . . 6 (((((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉) ∧ (♯‘𝐴) ≠ 0) ∧ (𝑀 ∈ (0...𝑁) ∧ 𝑁 ∈ (0...(♯‘𝐴)))) ∧ 𝑘 ∈ (0..^(𝑁𝑀))) → (𝐴 ++ 𝐵) ∈ Word 𝑉)
89 simplrl 777 . . . . . 6 (((((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉) ∧ (♯‘𝐴) ≠ 0) ∧ (𝑀 ∈ (0...𝑁) ∧ 𝑁 ∈ (0...(♯‘𝐴)))) ∧ 𝑘 ∈ (0..^(𝑁𝑀))) → 𝑀 ∈ (0...𝑁))
9030adantr 484 . . . . . 6 (((((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉) ∧ (♯‘𝐴) ≠ 0) ∧ (𝑀 ∈ (0...𝑁) ∧ 𝑁 ∈ (0...(♯‘𝐴)))) ∧ 𝑘 ∈ (0..^(𝑁𝑀))) → 𝑁 ∈ (0...(♯‘(𝐴 ++ 𝐵))))
91 simpr 488 . . . . . 6 (((((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉) ∧ (♯‘𝐴) ≠ 0) ∧ (𝑀 ∈ (0...𝑁) ∧ 𝑁 ∈ (0...(♯‘𝐴)))) ∧ 𝑘 ∈ (0..^(𝑁𝑀))) → 𝑘 ∈ (0..^(𝑁𝑀)))
92 swrdfv 14237 . . . . . 6 ((((𝐴 ++ 𝐵) ∈ Word 𝑉𝑀 ∈ (0...𝑁) ∧ 𝑁 ∈ (0...(♯‘(𝐴 ++ 𝐵)))) ∧ 𝑘 ∈ (0..^(𝑁𝑀))) → (((𝐴 ++ 𝐵) substr ⟨𝑀, 𝑁⟩)‘𝑘) = ((𝐴 ++ 𝐵)‘(𝑘 + 𝑀)))
9388, 89, 90, 91, 92syl31anc 1375 . . . . 5 (((((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉) ∧ (♯‘𝐴) ≠ 0) ∧ (𝑀 ∈ (0...𝑁) ∧ 𝑁 ∈ (0...(♯‘𝐴)))) ∧ 𝑘 ∈ (0..^(𝑁𝑀))) → (((𝐴 ++ 𝐵) substr ⟨𝑀, 𝑁⟩)‘𝑘) = ((𝐴 ++ 𝐵)‘(𝑘 + 𝑀)))
94 swrdfv 14237 . . . . . 6 (((𝐴 ∈ Word 𝑉𝑀 ∈ (0...𝑁) ∧ 𝑁 ∈ (0...(♯‘𝐴))) ∧ 𝑘 ∈ (0..^(𝑁𝑀))) → ((𝐴 substr ⟨𝑀, 𝑁⟩)‘𝑘) = (𝐴‘(𝑘 + 𝑀)))
9536, 94sylan 583 . . . . 5 (((((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉) ∧ (♯‘𝐴) ≠ 0) ∧ (𝑀 ∈ (0...𝑁) ∧ 𝑁 ∈ (0...(♯‘𝐴)))) ∧ 𝑘 ∈ (0..^(𝑁𝑀))) → ((𝐴 substr ⟨𝑀, 𝑁⟩)‘𝑘) = (𝐴‘(𝑘 + 𝑀)))
9687, 93, 953eqtr4d 2788 . . . 4 (((((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉) ∧ (♯‘𝐴) ≠ 0) ∧ (𝑀 ∈ (0...𝑁) ∧ 𝑁 ∈ (0...(♯‘𝐴)))) ∧ 𝑘 ∈ (0..^(𝑁𝑀))) → (((𝐴 ++ 𝐵) substr ⟨𝑀, 𝑁⟩)‘𝑘) = ((𝐴 substr ⟨𝑀, 𝑁⟩)‘𝑘))
9732, 38, 96eqfnfvd 6873 . . 3 ((((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉) ∧ (♯‘𝐴) ≠ 0) ∧ (𝑀 ∈ (0...𝑁) ∧ 𝑁 ∈ (0...(♯‘𝐴)))) → ((𝐴 ++ 𝐵) substr ⟨𝑀, 𝑁⟩) = (𝐴 substr ⟨𝑀, 𝑁⟩))
9897ex 416 . 2 (((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉) ∧ (♯‘𝐴) ≠ 0) → ((𝑀 ∈ (0...𝑁) ∧ 𝑁 ∈ (0...(♯‘𝐴))) → ((𝐴 ++ 𝐵) substr ⟨𝑀, 𝑁⟩) = (𝐴 substr ⟨𝑀, 𝑁⟩)))
9924, 98pm2.61dane 3030 1 ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉) → ((𝑀 ∈ (0...𝑁) ∧ 𝑁 ∈ (0...(♯‘𝐴))) → ((𝐴 ++ 𝐵) substr ⟨𝑀, 𝑁⟩) = (𝐴 substr ⟨𝑀, 𝑁⟩)))
Colors of variables: wff setvar class
Syntax hints:  wi 4  wa 399  w3a 1089   = wceq 1543  wcel 2111  wne 2941  c0 4251  cop 4561   class class class wbr 5067   Fn wfn 6392  cfv 6397  (class class class)co 7231  cr 10752  0cc0 10753   + caddc 10756   < clt 10891  cle 10892  cmin 11086  cn 11854  0cn0 12114  ...cfz 13119  ..^cfzo 13262  chash 13920  Word cword 14093   ++ cconcat 14149   substr csubstr 14229
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1803  ax-4 1817  ax-5 1918  ax-6 1976  ax-7 2016  ax-8 2113  ax-9 2121  ax-10 2142  ax-11 2159  ax-12 2176  ax-ext 2709  ax-rep 5193  ax-sep 5206  ax-nul 5213  ax-pow 5272  ax-pr 5336  ax-un 7541  ax-cnex 10809  ax-resscn 10810  ax-1cn 10811  ax-icn 10812  ax-addcl 10813  ax-addrcl 10814  ax-mulcl 10815  ax-mulrcl 10816  ax-mulcom 10817  ax-addass 10818  ax-mulass 10819  ax-distr 10820  ax-i2m1 10821  ax-1ne0 10822  ax-1rid 10823  ax-rnegex 10824  ax-rrecex 10825  ax-cnre 10826  ax-pre-lttri 10827  ax-pre-lttrn 10828  ax-pre-ltadd 10829  ax-pre-mulgt0 10830
This theorem depends on definitions:  df-bi 210  df-an 400  df-or 848  df-3or 1090  df-3an 1091  df-tru 1546  df-fal 1556  df-ex 1788  df-nf 1792  df-sb 2072  df-mo 2540  df-eu 2569  df-clab 2716  df-cleq 2730  df-clel 2817  df-nfc 2887  df-ne 2942  df-nel 3048  df-ral 3067  df-rex 3068  df-reu 3069  df-rab 3071  df-v 3422  df-sbc 3709  df-csb 3826  df-dif 3883  df-un 3885  df-in 3887  df-ss 3897  df-pss 3899  df-nul 4252  df-if 4454  df-pw 4529  df-sn 4556  df-pr 4558  df-tp 4560  df-op 4562  df-uni 4834  df-int 4874  df-iun 4920  df-br 5068  df-opab 5130  df-mpt 5150  df-tr 5176  df-id 5469  df-eprel 5474  df-po 5482  df-so 5483  df-fr 5523  df-we 5525  df-xp 5571  df-rel 5572  df-cnv 5573  df-co 5574  df-dm 5575  df-rn 5576  df-res 5577  df-ima 5578  df-pred 6175  df-ord 6233  df-on 6234  df-lim 6235  df-suc 6236  df-iota 6355  df-fun 6399  df-fn 6400  df-f 6401  df-f1 6402  df-fo 6403  df-f1o 6404  df-fv 6405  df-riota 7188  df-ov 7234  df-oprab 7235  df-mpo 7236  df-om 7663  df-1st 7779  df-2nd 7780  df-wrecs 8067  df-recs 8128  df-rdg 8166  df-1o 8222  df-er 8411  df-en 8647  df-dom 8648  df-sdom 8649  df-fin 8650  df-card 9579  df-pnf 10893  df-mnf 10894  df-xr 10895  df-ltxr 10896  df-le 10897  df-sub 11088  df-neg 11089  df-nn 11855  df-n0 12115  df-z 12201  df-uz 12463  df-fz 13120  df-fzo 13263  df-hash 13921  df-word 14094  df-concat 14150  df-substr 14230
This theorem is referenced by:  pfxccat3  14323  pfxccatpfx1  14325  swrdccatin1d  14332
  Copyright terms: Public domain W3C validator