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

Theorem swrdccatin1 13276
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 6531 . . . . . . 7 ((#‘𝐴) = 0 → (0...(#‘𝐴)) = (0...0))
21eleq2d 2668 . . . . . 6 ((#‘𝐴) = 0 → (𝑁 ∈ (0...(#‘𝐴)) ↔ 𝑁 ∈ (0...0)))
3 elfz1eq 12174 . . . . . . 7 (𝑁 ∈ (0...0) → 𝑁 = 0)
4 elfz1eq 12174 . . . . . . . . 9 (𝑀 ∈ (0...0) → 𝑀 = 0)
5 swrd00 13212 . . . . . . . . . . 11 ((𝐴 ++ 𝐵) substr ⟨0, 0⟩) = ∅
6 swrd00 13212 . . . . . . . . . . 11 (𝐴 substr ⟨0, 0⟩) = ∅
75, 6eqtr4i 2630 . . . . . . . . . 10 ((𝐴 ++ 𝐵) substr ⟨0, 0⟩) = (𝐴 substr ⟨0, 0⟩)
8 opeq1 4330 . . . . . . . . . . 11 (𝑀 = 0 → ⟨𝑀, 0⟩ = ⟨0, 0⟩)
98oveq2d 6539 . . . . . . . . . 10 (𝑀 = 0 → ((𝐴 ++ 𝐵) substr ⟨𝑀, 0⟩) = ((𝐴 ++ 𝐵) substr ⟨0, 0⟩))
108oveq2d 6539 . . . . . . . . . 10 (𝑀 = 0 → (𝐴 substr ⟨𝑀, 0⟩) = (𝐴 substr ⟨0, 0⟩))
117, 9, 103eqtr4a 2665 . . . . . . . . 9 (𝑀 = 0 → ((𝐴 ++ 𝐵) substr ⟨𝑀, 0⟩) = (𝐴 substr ⟨𝑀, 0⟩))
124, 11syl 17 . . . . . . . 8 (𝑀 ∈ (0...0) → ((𝐴 ++ 𝐵) substr ⟨𝑀, 0⟩) = (𝐴 substr ⟨𝑀, 0⟩))
13 oveq2 6531 . . . . . . . . . 10 (𝑁 = 0 → (0...𝑁) = (0...0))
1413eleq2d 2668 . . . . . . . . 9 (𝑁 = 0 → (𝑀 ∈ (0...𝑁) ↔ 𝑀 ∈ (0...0)))
15 opeq2 4331 . . . . . . . . . . 11 (𝑁 = 0 → ⟨𝑀, 𝑁⟩ = ⟨𝑀, 0⟩)
1615oveq2d 6539 . . . . . . . . . 10 (𝑁 = 0 → ((𝐴 ++ 𝐵) substr ⟨𝑀, 𝑁⟩) = ((𝐴 ++ 𝐵) substr ⟨𝑀, 0⟩))
1715oveq2d 6539 . . . . . . . . . 10 (𝑁 = 0 → (𝐴 substr ⟨𝑀, 𝑁⟩) = (𝐴 substr ⟨𝑀, 0⟩))
1816, 17eqeq12d 2620 . . . . . . . . 9 (𝑁 = 0 → (((𝐴 ++ 𝐵) substr ⟨𝑀, 𝑁⟩) = (𝐴 substr ⟨𝑀, 𝑁⟩) ↔ ((𝐴 ++ 𝐵) substr ⟨𝑀, 0⟩) = (𝐴 substr ⟨𝑀, 0⟩)))
1914, 18imbi12d 332 . . . . . . . 8 (𝑁 = 0 → ((𝑀 ∈ (0...𝑁) → ((𝐴 ++ 𝐵) substr ⟨𝑀, 𝑁⟩) = (𝐴 substr ⟨𝑀, 𝑁⟩)) ↔ (𝑀 ∈ (0...0) → ((𝐴 ++ 𝐵) substr ⟨𝑀, 0⟩) = (𝐴 substr ⟨𝑀, 0⟩))))
2012, 19mpbiri 246 . . . . . . 7 (𝑁 = 0 → (𝑀 ∈ (0...𝑁) → ((𝐴 ++ 𝐵) substr ⟨𝑀, 𝑁⟩) = (𝐴 substr ⟨𝑀, 𝑁⟩)))
213, 20syl 17 . . . . . 6 (𝑁 ∈ (0...0) → (𝑀 ∈ (0...𝑁) → ((𝐴 ++ 𝐵) substr ⟨𝑀, 𝑁⟩) = (𝐴 substr ⟨𝑀, 𝑁⟩)))
222, 21syl6bi 241 . . . . 5 ((#‘𝐴) = 0 → (𝑁 ∈ (0...(#‘𝐴)) → (𝑀 ∈ (0...𝑁) → ((𝐴 ++ 𝐵) substr ⟨𝑀, 𝑁⟩) = (𝐴 substr ⟨𝑀, 𝑁⟩))))
2322com23 83 . . . 4 ((#‘𝐴) = 0 → (𝑀 ∈ (0...𝑁) → (𝑁 ∈ (0...(#‘𝐴)) → ((𝐴 ++ 𝐵) substr ⟨𝑀, 𝑁⟩) = (𝐴 substr ⟨𝑀, 𝑁⟩))))
2423impd 445 . . 3 ((#‘𝐴) = 0 → ((𝑀 ∈ (0...𝑁) ∧ 𝑁 ∈ (0...(#‘𝐴))) → ((𝐴 ++ 𝐵) substr ⟨𝑀, 𝑁⟩) = (𝐴 substr ⟨𝑀, 𝑁⟩)))
2524a1d 25 . 2 ((#‘𝐴) = 0 → ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉) → ((𝑀 ∈ (0...𝑁) ∧ 𝑁 ∈ (0...(#‘𝐴))) → ((𝐴 ++ 𝐵) substr ⟨𝑀, 𝑁⟩) = (𝐴 substr ⟨𝑀, 𝑁⟩))))
26 ccatcl 13154 . . . . . . . 8 ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉) → (𝐴 ++ 𝐵) ∈ Word 𝑉)
2726adantl 480 . . . . . . 7 ((¬ (#‘𝐴) = 0 ∧ (𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉)) → (𝐴 ++ 𝐵) ∈ Word 𝑉)
2827adantr 479 . . . . . 6 (((¬ (#‘𝐴) = 0 ∧ (𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉)) ∧ (𝑀 ∈ (0...𝑁) ∧ 𝑁 ∈ (0...(#‘𝐴)))) → (𝐴 ++ 𝐵) ∈ Word 𝑉)
29 simprl 789 . . . . . 6 (((¬ (#‘𝐴) = 0 ∧ (𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉)) ∧ (𝑀 ∈ (0...𝑁) ∧ 𝑁 ∈ (0...(#‘𝐴)))) → 𝑀 ∈ (0...𝑁))
30 elfzelfzccat 13159 . . . . . . . . . 10 ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉) → (𝑁 ∈ (0...(#‘𝐴)) → 𝑁 ∈ (0...(#‘(𝐴 ++ 𝐵)))))
3130adantl 480 . . . . . . . . 9 ((¬ (#‘𝐴) = 0 ∧ (𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉)) → (𝑁 ∈ (0...(#‘𝐴)) → 𝑁 ∈ (0...(#‘(𝐴 ++ 𝐵)))))
3231com12 32 . . . . . . . 8 (𝑁 ∈ (0...(#‘𝐴)) → ((¬ (#‘𝐴) = 0 ∧ (𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉)) → 𝑁 ∈ (0...(#‘(𝐴 ++ 𝐵)))))
3332adantl 480 . . . . . . 7 ((𝑀 ∈ (0...𝑁) ∧ 𝑁 ∈ (0...(#‘𝐴))) → ((¬ (#‘𝐴) = 0 ∧ (𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉)) → 𝑁 ∈ (0...(#‘(𝐴 ++ 𝐵)))))
3433impcom 444 . . . . . 6 (((¬ (#‘𝐴) = 0 ∧ (𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉)) ∧ (𝑀 ∈ (0...𝑁) ∧ 𝑁 ∈ (0...(#‘𝐴)))) → 𝑁 ∈ (0...(#‘(𝐴 ++ 𝐵))))
35 swrdvalfn 13220 . . . . . 6 (((𝐴 ++ 𝐵) ∈ Word 𝑉𝑀 ∈ (0...𝑁) ∧ 𝑁 ∈ (0...(#‘(𝐴 ++ 𝐵)))) → ((𝐴 ++ 𝐵) substr ⟨𝑀, 𝑁⟩) Fn (0..^(𝑁𝑀)))
3628, 29, 34, 35syl3anc 1317 . . . . 5 (((¬ (#‘𝐴) = 0 ∧ (𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉)) ∧ (𝑀 ∈ (0...𝑁) ∧ 𝑁 ∈ (0...(#‘𝐴)))) → ((𝐴 ++ 𝐵) substr ⟨𝑀, 𝑁⟩) Fn (0..^(𝑁𝑀)))
37 3anass 1034 . . . . . . . . 9 ((𝐴 ∈ Word 𝑉𝑀 ∈ (0...𝑁) ∧ 𝑁 ∈ (0...(#‘𝐴))) ↔ (𝐴 ∈ Word 𝑉 ∧ (𝑀 ∈ (0...𝑁) ∧ 𝑁 ∈ (0...(#‘𝐴)))))
3837simplbi2 652 . . . . . . . 8 (𝐴 ∈ Word 𝑉 → ((𝑀 ∈ (0...𝑁) ∧ 𝑁 ∈ (0...(#‘𝐴))) → (𝐴 ∈ Word 𝑉𝑀 ∈ (0...𝑁) ∧ 𝑁 ∈ (0...(#‘𝐴)))))
3938ad2antrl 759 . . . . . . 7 ((¬ (#‘𝐴) = 0 ∧ (𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉)) → ((𝑀 ∈ (0...𝑁) ∧ 𝑁 ∈ (0...(#‘𝐴))) → (𝐴 ∈ Word 𝑉𝑀 ∈ (0...𝑁) ∧ 𝑁 ∈ (0...(#‘𝐴)))))
4039imp 443 . . . . . 6 (((¬ (#‘𝐴) = 0 ∧ (𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉)) ∧ (𝑀 ∈ (0...𝑁) ∧ 𝑁 ∈ (0...(#‘𝐴)))) → (𝐴 ∈ Word 𝑉𝑀 ∈ (0...𝑁) ∧ 𝑁 ∈ (0...(#‘𝐴))))
41 swrdvalfn 13220 . . . . . 6 ((𝐴 ∈ Word 𝑉𝑀 ∈ (0...𝑁) ∧ 𝑁 ∈ (0...(#‘𝐴))) → (𝐴 substr ⟨𝑀, 𝑁⟩) Fn (0..^(𝑁𝑀)))
4240, 41syl 17 . . . . 5 (((¬ (#‘𝐴) = 0 ∧ (𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉)) ∧ (𝑀 ∈ (0...𝑁) ∧ 𝑁 ∈ (0...(#‘𝐴)))) → (𝐴 substr ⟨𝑀, 𝑁⟩) Fn (0..^(𝑁𝑀)))
43 simprl 789 . . . . . . . 8 ((¬ (#‘𝐴) = 0 ∧ (𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉)) → 𝐴 ∈ Word 𝑉)
4443ad2antrr 757 . . . . . . 7 ((((¬ (#‘𝐴) = 0 ∧ (𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉)) ∧ (𝑀 ∈ (0...𝑁) ∧ 𝑁 ∈ (0...(#‘𝐴)))) ∧ 𝑘 ∈ (0..^(𝑁𝑀))) → 𝐴 ∈ Word 𝑉)
45 simprr 791 . . . . . . . 8 ((¬ (#‘𝐴) = 0 ∧ (𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉)) → 𝐵 ∈ Word 𝑉)
4645ad2antrr 757 . . . . . . 7 ((((¬ (#‘𝐴) = 0 ∧ (𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉)) ∧ (𝑀 ∈ (0...𝑁) ∧ 𝑁 ∈ (0...(#‘𝐴)))) ∧ 𝑘 ∈ (0..^(𝑁𝑀))) → 𝐵 ∈ Word 𝑉)
47 elfzo0 12327 . . . . . . . . . 10 (𝑘 ∈ (0..^(𝑁𝑀)) ↔ (𝑘 ∈ ℕ0 ∧ (𝑁𝑀) ∈ ℕ ∧ 𝑘 < (𝑁𝑀)))
48 elfz2nn0 12251 . . . . . . . . . . . . . 14 (𝑀 ∈ (0...𝑁) ↔ (𝑀 ∈ ℕ0𝑁 ∈ ℕ0𝑀𝑁))
49 nn0addcl 11171 . . . . . . . . . . . . . . . 16 ((𝑘 ∈ ℕ0𝑀 ∈ ℕ0) → (𝑘 + 𝑀) ∈ ℕ0)
5049expcom 449 . . . . . . . . . . . . . . 15 (𝑀 ∈ ℕ0 → (𝑘 ∈ ℕ0 → (𝑘 + 𝑀) ∈ ℕ0))
51503ad2ant1 1074 . . . . . . . . . . . . . 14 ((𝑀 ∈ ℕ0𝑁 ∈ ℕ0𝑀𝑁) → (𝑘 ∈ ℕ0 → (𝑘 + 𝑀) ∈ ℕ0))
5248, 51sylbi 205 . . . . . . . . . . . . 13 (𝑀 ∈ (0...𝑁) → (𝑘 ∈ ℕ0 → (𝑘 + 𝑀) ∈ ℕ0))
5352ad2antrl 759 . . . . . . . . . . . 12 (((¬ (#‘𝐴) = 0 ∧ (𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉)) ∧ (𝑀 ∈ (0...𝑁) ∧ 𝑁 ∈ (0...(#‘𝐴)))) → (𝑘 ∈ ℕ0 → (𝑘 + 𝑀) ∈ ℕ0))
5453com12 32 . . . . . . . . . . 11 (𝑘 ∈ ℕ0 → (((¬ (#‘𝐴) = 0 ∧ (𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉)) ∧ (𝑀 ∈ (0...𝑁) ∧ 𝑁 ∈ (0...(#‘𝐴)))) → (𝑘 + 𝑀) ∈ ℕ0))
55543ad2ant1 1074 . . . . . . . . . 10 ((𝑘 ∈ ℕ0 ∧ (𝑁𝑀) ∈ ℕ ∧ 𝑘 < (𝑁𝑀)) → (((¬ (#‘𝐴) = 0 ∧ (𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉)) ∧ (𝑀 ∈ (0...𝑁) ∧ 𝑁 ∈ (0...(#‘𝐴)))) → (𝑘 + 𝑀) ∈ ℕ0))
5647, 55sylbi 205 . . . . . . . . 9 (𝑘 ∈ (0..^(𝑁𝑀)) → (((¬ (#‘𝐴) = 0 ∧ (𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉)) ∧ (𝑀 ∈ (0...𝑁) ∧ 𝑁 ∈ (0...(#‘𝐴)))) → (𝑘 + 𝑀) ∈ ℕ0))
5756impcom 444 . . . . . . . 8 ((((¬ (#‘𝐴) = 0 ∧ (𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉)) ∧ (𝑀 ∈ (0...𝑁) ∧ 𝑁 ∈ (0...(#‘𝐴)))) ∧ 𝑘 ∈ (0..^(𝑁𝑀))) → (𝑘 + 𝑀) ∈ ℕ0)
58 lencl 13121 . . . . . . . . . . . 12 (𝐴 ∈ Word 𝑉 → (#‘𝐴) ∈ ℕ0)
59 df-ne 2777 . . . . . . . . . . . . 13 ((#‘𝐴) ≠ 0 ↔ ¬ (#‘𝐴) = 0)
60 elnnne0 11149 . . . . . . . . . . . . . 14 ((#‘𝐴) ∈ ℕ ↔ ((#‘𝐴) ∈ ℕ0 ∧ (#‘𝐴) ≠ 0))
6160simplbi2 652 . . . . . . . . . . . . 13 ((#‘𝐴) ∈ ℕ0 → ((#‘𝐴) ≠ 0 → (#‘𝐴) ∈ ℕ))
6259, 61syl5bir 231 . . . . . . . . . . . 12 ((#‘𝐴) ∈ ℕ0 → (¬ (#‘𝐴) = 0 → (#‘𝐴) ∈ ℕ))
6358, 62syl 17 . . . . . . . . . . 11 (𝐴 ∈ Word 𝑉 → (¬ (#‘𝐴) = 0 → (#‘𝐴) ∈ ℕ))
6463adantr 479 . . . . . . . . . 10 ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉) → (¬ (#‘𝐴) = 0 → (#‘𝐴) ∈ ℕ))
6564impcom 444 . . . . . . . . 9 ((¬ (#‘𝐴) = 0 ∧ (𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉)) → (#‘𝐴) ∈ ℕ)
6665ad2antrr 757 . . . . . . . 8 ((((¬ (#‘𝐴) = 0 ∧ (𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉)) ∧ (𝑀 ∈ (0...𝑁) ∧ 𝑁 ∈ (0...(#‘𝐴)))) ∧ 𝑘 ∈ (0..^(𝑁𝑀))) → (#‘𝐴) ∈ ℕ)
67 elfz2nn0 12251 . . . . . . . . . . . . . . . 16 (𝑁 ∈ (0...(#‘𝐴)) ↔ (𝑁 ∈ ℕ0 ∧ (#‘𝐴) ∈ ℕ0𝑁 ≤ (#‘𝐴)))
68 nn0re 11144 . . . . . . . . . . . . . . . . . . . . . . . . . 26 (𝑘 ∈ ℕ0𝑘 ∈ ℝ)
6968ad2antrl 759 . . . . . . . . . . . . . . . . . . . . . . . . 25 (((𝑁 ∈ ℕ0 ∧ (#‘𝐴) ∈ ℕ0) ∧ (𝑘 ∈ ℕ0𝑀 ∈ ℕ0)) → 𝑘 ∈ ℝ)
70 nn0re 11144 . . . . . . . . . . . . . . . . . . . . . . . . . . 27 (𝑀 ∈ ℕ0𝑀 ∈ ℝ)
7170adantl 480 . . . . . . . . . . . . . . . . . . . . . . . . . 26 ((𝑘 ∈ ℕ0𝑀 ∈ ℕ0) → 𝑀 ∈ ℝ)
7271adantl 480 . . . . . . . . . . . . . . . . . . . . . . . . 25 (((𝑁 ∈ ℕ0 ∧ (#‘𝐴) ∈ ℕ0) ∧ (𝑘 ∈ ℕ0𝑀 ∈ ℕ0)) → 𝑀 ∈ ℝ)
73 nn0re 11144 . . . . . . . . . . . . . . . . . . . . . . . . . 26 (𝑁 ∈ ℕ0𝑁 ∈ ℝ)
7473ad2antrr 757 . . . . . . . . . . . . . . . . . . . . . . . . 25 (((𝑁 ∈ ℕ0 ∧ (#‘𝐴) ∈ ℕ0) ∧ (𝑘 ∈ ℕ0𝑀 ∈ ℕ0)) → 𝑁 ∈ ℝ)
7569, 72, 74ltaddsubd 10472 . . . . . . . . . . . . . . . . . . . . . . . 24 (((𝑁 ∈ ℕ0 ∧ (#‘𝐴) ∈ ℕ0) ∧ (𝑘 ∈ ℕ0𝑀 ∈ ℕ0)) → ((𝑘 + 𝑀) < 𝑁𝑘 < (𝑁𝑀)))
76 nn0re 11144 . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 ((𝑘 + 𝑀) ∈ ℕ0 → (𝑘 + 𝑀) ∈ ℝ)
7749, 76syl 17 . . . . . . . . . . . . . . . . . . . . . . . . . . 27 ((𝑘 ∈ ℕ0𝑀 ∈ ℕ0) → (𝑘 + 𝑀) ∈ ℝ)
7877adantl 480 . . . . . . . . . . . . . . . . . . . . . . . . . 26 (((𝑁 ∈ ℕ0 ∧ (#‘𝐴) ∈ ℕ0) ∧ (𝑘 ∈ ℕ0𝑀 ∈ ℕ0)) → (𝑘 + 𝑀) ∈ ℝ)
79 nn0re 11144 . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 ((#‘𝐴) ∈ ℕ0 → (#‘𝐴) ∈ ℝ)
8079adantl 480 . . . . . . . . . . . . . . . . . . . . . . . . . . 27 ((𝑁 ∈ ℕ0 ∧ (#‘𝐴) ∈ ℕ0) → (#‘𝐴) ∈ ℝ)
8180adantr 479 . . . . . . . . . . . . . . . . . . . . . . . . . 26 (((𝑁 ∈ ℕ0 ∧ (#‘𝐴) ∈ ℕ0) ∧ (𝑘 ∈ ℕ0𝑀 ∈ ℕ0)) → (#‘𝐴) ∈ ℝ)
82 ltletr 9976 . . . . . . . . . . . . . . . . . . . . . . . . . 26 (((𝑘 + 𝑀) ∈ ℝ ∧ 𝑁 ∈ ℝ ∧ (#‘𝐴) ∈ ℝ) → (((𝑘 + 𝑀) < 𝑁𝑁 ≤ (#‘𝐴)) → (𝑘 + 𝑀) < (#‘𝐴)))
8378, 74, 81, 82syl3anc 1317 . . . . . . . . . . . . . . . . . . . . . . . . 25 (((𝑁 ∈ ℕ0 ∧ (#‘𝐴) ∈ ℕ0) ∧ (𝑘 ∈ ℕ0𝑀 ∈ ℕ0)) → (((𝑘 + 𝑀) < 𝑁𝑁 ≤ (#‘𝐴)) → (𝑘 + 𝑀) < (#‘𝐴)))
8483expd 450 . . . . . . . . . . . . . . . . . . . . . . . 24 (((𝑁 ∈ ℕ0 ∧ (#‘𝐴) ∈ ℕ0) ∧ (𝑘 ∈ ℕ0𝑀 ∈ ℕ0)) → ((𝑘 + 𝑀) < 𝑁 → (𝑁 ≤ (#‘𝐴) → (𝑘 + 𝑀) < (#‘𝐴))))
8575, 84sylbird 248 . . . . . . . . . . . . . . . . . . . . . . 23 (((𝑁 ∈ ℕ0 ∧ (#‘𝐴) ∈ ℕ0) ∧ (𝑘 ∈ ℕ0𝑀 ∈ ℕ0)) → (𝑘 < (𝑁𝑀) → (𝑁 ≤ (#‘𝐴) → (𝑘 + 𝑀) < (#‘𝐴))))
8685ex 448 . . . . . . . . . . . . . . . . . . . . . 22 ((𝑁 ∈ ℕ0 ∧ (#‘𝐴) ∈ ℕ0) → ((𝑘 ∈ ℕ0𝑀 ∈ ℕ0) → (𝑘 < (𝑁𝑀) → (𝑁 ≤ (#‘𝐴) → (𝑘 + 𝑀) < (#‘𝐴)))))
8786com24 92 . . . . . . . . . . . . . . . . . . . . 21 ((𝑁 ∈ ℕ0 ∧ (#‘𝐴) ∈ ℕ0) → (𝑁 ≤ (#‘𝐴) → (𝑘 < (𝑁𝑀) → ((𝑘 ∈ ℕ0𝑀 ∈ ℕ0) → (𝑘 + 𝑀) < (#‘𝐴)))))
88873impia 1252 . . . . . . . . . . . . . . . . . . . 20 ((𝑁 ∈ ℕ0 ∧ (#‘𝐴) ∈ ℕ0𝑁 ≤ (#‘𝐴)) → (𝑘 < (𝑁𝑀) → ((𝑘 ∈ ℕ0𝑀 ∈ ℕ0) → (𝑘 + 𝑀) < (#‘𝐴))))
8988com13 85 . . . . . . . . . . . . . . . . . . 19 ((𝑘 ∈ ℕ0𝑀 ∈ ℕ0) → (𝑘 < (𝑁𝑀) → ((𝑁 ∈ ℕ0 ∧ (#‘𝐴) ∈ ℕ0𝑁 ≤ (#‘𝐴)) → (𝑘 + 𝑀) < (#‘𝐴))))
9089impancom 454 . . . . . . . . . . . . . . . . . 18 ((𝑘 ∈ ℕ0𝑘 < (𝑁𝑀)) → (𝑀 ∈ ℕ0 → ((𝑁 ∈ ℕ0 ∧ (#‘𝐴) ∈ ℕ0𝑁 ≤ (#‘𝐴)) → (𝑘 + 𝑀) < (#‘𝐴))))
91903adant2 1072 . . . . . . . . . . . . . . . . 17 ((𝑘 ∈ ℕ0 ∧ (𝑁𝑀) ∈ ℕ ∧ 𝑘 < (𝑁𝑀)) → (𝑀 ∈ ℕ0 → ((𝑁 ∈ ℕ0 ∧ (#‘𝐴) ∈ ℕ0𝑁 ≤ (#‘𝐴)) → (𝑘 + 𝑀) < (#‘𝐴))))
9291com13 85 . . . . . . . . . . . . . . . 16 ((𝑁 ∈ ℕ0 ∧ (#‘𝐴) ∈ ℕ0𝑁 ≤ (#‘𝐴)) → (𝑀 ∈ ℕ0 → ((𝑘 ∈ ℕ0 ∧ (𝑁𝑀) ∈ ℕ ∧ 𝑘 < (𝑁𝑀)) → (𝑘 + 𝑀) < (#‘𝐴))))
9367, 92sylbi 205 . . . . . . . . . . . . . . 15 (𝑁 ∈ (0...(#‘𝐴)) → (𝑀 ∈ ℕ0 → ((𝑘 ∈ ℕ0 ∧ (𝑁𝑀) ∈ ℕ ∧ 𝑘 < (𝑁𝑀)) → (𝑘 + 𝑀) < (#‘𝐴))))
9493com12 32 . . . . . . . . . . . . . 14 (𝑀 ∈ ℕ0 → (𝑁 ∈ (0...(#‘𝐴)) → ((𝑘 ∈ ℕ0 ∧ (𝑁𝑀) ∈ ℕ ∧ 𝑘 < (𝑁𝑀)) → (𝑘 + 𝑀) < (#‘𝐴))))
95943ad2ant1 1074 . . . . . . . . . . . . 13 ((𝑀 ∈ ℕ0𝑁 ∈ ℕ0𝑀𝑁) → (𝑁 ∈ (0...(#‘𝐴)) → ((𝑘 ∈ ℕ0 ∧ (𝑁𝑀) ∈ ℕ ∧ 𝑘 < (𝑁𝑀)) → (𝑘 + 𝑀) < (#‘𝐴))))
9648, 95sylbi 205 . . . . . . . . . . . 12 (𝑀 ∈ (0...𝑁) → (𝑁 ∈ (0...(#‘𝐴)) → ((𝑘 ∈ ℕ0 ∧ (𝑁𝑀) ∈ ℕ ∧ 𝑘 < (𝑁𝑀)) → (𝑘 + 𝑀) < (#‘𝐴))))
9796a1i 11 . . . . . . . . . . 11 ((¬ (#‘𝐴) = 0 ∧ (𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉)) → (𝑀 ∈ (0...𝑁) → (𝑁 ∈ (0...(#‘𝐴)) → ((𝑘 ∈ ℕ0 ∧ (𝑁𝑀) ∈ ℕ ∧ 𝑘 < (𝑁𝑀)) → (𝑘 + 𝑀) < (#‘𝐴)))))
9897imp32 447 . . . . . . . . . 10 (((¬ (#‘𝐴) = 0 ∧ (𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉)) ∧ (𝑀 ∈ (0...𝑁) ∧ 𝑁 ∈ (0...(#‘𝐴)))) → ((𝑘 ∈ ℕ0 ∧ (𝑁𝑀) ∈ ℕ ∧ 𝑘 < (𝑁𝑀)) → (𝑘 + 𝑀) < (#‘𝐴)))
9947, 98syl5bi 230 . . . . . . . . 9 (((¬ (#‘𝐴) = 0 ∧ (𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉)) ∧ (𝑀 ∈ (0...𝑁) ∧ 𝑁 ∈ (0...(#‘𝐴)))) → (𝑘 ∈ (0..^(𝑁𝑀)) → (𝑘 + 𝑀) < (#‘𝐴)))
10099imp 443 . . . . . . . 8 ((((¬ (#‘𝐴) = 0 ∧ (𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉)) ∧ (𝑀 ∈ (0...𝑁) ∧ 𝑁 ∈ (0...(#‘𝐴)))) ∧ 𝑘 ∈ (0..^(𝑁𝑀))) → (𝑘 + 𝑀) < (#‘𝐴))
101 elfzo0 12327 . . . . . . . 8 ((𝑘 + 𝑀) ∈ (0..^(#‘𝐴)) ↔ ((𝑘 + 𝑀) ∈ ℕ0 ∧ (#‘𝐴) ∈ ℕ ∧ (𝑘 + 𝑀) < (#‘𝐴)))
10257, 66, 100, 101syl3anbrc 1238 . . . . . . 7 ((((¬ (#‘𝐴) = 0 ∧ (𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉)) ∧ (𝑀 ∈ (0...𝑁) ∧ 𝑁 ∈ (0...(#‘𝐴)))) ∧ 𝑘 ∈ (0..^(𝑁𝑀))) → (𝑘 + 𝑀) ∈ (0..^(#‘𝐴)))
103 ccatval1 13156 . . . . . . 7 ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉 ∧ (𝑘 + 𝑀) ∈ (0..^(#‘𝐴))) → ((𝐴 ++ 𝐵)‘(𝑘 + 𝑀)) = (𝐴‘(𝑘 + 𝑀)))
10444, 46, 102, 103syl3anc 1317 . . . . . 6 ((((¬ (#‘𝐴) = 0 ∧ (𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉)) ∧ (𝑀 ∈ (0...𝑁) ∧ 𝑁 ∈ (0...(#‘𝐴)))) ∧ 𝑘 ∈ (0..^(𝑁𝑀))) → ((𝐴 ++ 𝐵)‘(𝑘 + 𝑀)) = (𝐴‘(𝑘 + 𝑀)))
10527ad2antrr 757 . . . . . . . 8 ((((¬ (#‘𝐴) = 0 ∧ (𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉)) ∧ (𝑀 ∈ (0...𝑁) ∧ 𝑁 ∈ (0...(#‘𝐴)))) ∧ 𝑘 ∈ (0..^(𝑁𝑀))) → (𝐴 ++ 𝐵) ∈ Word 𝑉)
10629adantr 479 . . . . . . . 8 ((((¬ (#‘𝐴) = 0 ∧ (𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉)) ∧ (𝑀 ∈ (0...𝑁) ∧ 𝑁 ∈ (0...(#‘𝐴)))) ∧ 𝑘 ∈ (0..^(𝑁𝑀))) → 𝑀 ∈ (0...𝑁))
10734adantr 479 . . . . . . . 8 ((((¬ (#‘𝐴) = 0 ∧ (𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉)) ∧ (𝑀 ∈ (0...𝑁) ∧ 𝑁 ∈ (0...(#‘𝐴)))) ∧ 𝑘 ∈ (0..^(𝑁𝑀))) → 𝑁 ∈ (0...(#‘(𝐴 ++ 𝐵))))
108105, 106, 1073jca 1234 . . . . . . 7 ((((¬ (#‘𝐴) = 0 ∧ (𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉)) ∧ (𝑀 ∈ (0...𝑁) ∧ 𝑁 ∈ (0...(#‘𝐴)))) ∧ 𝑘 ∈ (0..^(𝑁𝑀))) → ((𝐴 ++ 𝐵) ∈ Word 𝑉𝑀 ∈ (0...𝑁) ∧ 𝑁 ∈ (0...(#‘(𝐴 ++ 𝐵)))))
109 swrdfv 13218 . . . . . . 7 ((((𝐴 ++ 𝐵) ∈ Word 𝑉𝑀 ∈ (0...𝑁) ∧ 𝑁 ∈ (0...(#‘(𝐴 ++ 𝐵)))) ∧ 𝑘 ∈ (0..^(𝑁𝑀))) → (((𝐴 ++ 𝐵) substr ⟨𝑀, 𝑁⟩)‘𝑘) = ((𝐴 ++ 𝐵)‘(𝑘 + 𝑀)))
110108, 109sylancom 697 . . . . . 6 ((((¬ (#‘𝐴) = 0 ∧ (𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉)) ∧ (𝑀 ∈ (0...𝑁) ∧ 𝑁 ∈ (0...(#‘𝐴)))) ∧ 𝑘 ∈ (0..^(𝑁𝑀))) → (((𝐴 ++ 𝐵) substr ⟨𝑀, 𝑁⟩)‘𝑘) = ((𝐴 ++ 𝐵)‘(𝑘 + 𝑀)))
111 swrdfv 13218 . . . . . . 7 (((𝐴 ∈ Word 𝑉𝑀 ∈ (0...𝑁) ∧ 𝑁 ∈ (0...(#‘𝐴))) ∧ 𝑘 ∈ (0..^(𝑁𝑀))) → ((𝐴 substr ⟨𝑀, 𝑁⟩)‘𝑘) = (𝐴‘(𝑘 + 𝑀)))
11240, 111sylan 486 . . . . . 6 ((((¬ (#‘𝐴) = 0 ∧ (𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉)) ∧ (𝑀 ∈ (0...𝑁) ∧ 𝑁 ∈ (0...(#‘𝐴)))) ∧ 𝑘 ∈ (0..^(𝑁𝑀))) → ((𝐴 substr ⟨𝑀, 𝑁⟩)‘𝑘) = (𝐴‘(𝑘 + 𝑀)))
113104, 110, 1123eqtr4d 2649 . . . . 5 ((((¬ (#‘𝐴) = 0 ∧ (𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉)) ∧ (𝑀 ∈ (0...𝑁) ∧ 𝑁 ∈ (0...(#‘𝐴)))) ∧ 𝑘 ∈ (0..^(𝑁𝑀))) → (((𝐴 ++ 𝐵) substr ⟨𝑀, 𝑁⟩)‘𝑘) = ((𝐴 substr ⟨𝑀, 𝑁⟩)‘𝑘))
11436, 42, 113eqfnfvd 6203 . . . 4 (((¬ (#‘𝐴) = 0 ∧ (𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉)) ∧ (𝑀 ∈ (0...𝑁) ∧ 𝑁 ∈ (0...(#‘𝐴)))) → ((𝐴 ++ 𝐵) substr ⟨𝑀, 𝑁⟩) = (𝐴 substr ⟨𝑀, 𝑁⟩))
115114ex 448 . . 3 ((¬ (#‘𝐴) = 0 ∧ (𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉)) → ((𝑀 ∈ (0...𝑁) ∧ 𝑁 ∈ (0...(#‘𝐴))) → ((𝐴 ++ 𝐵) substr ⟨𝑀, 𝑁⟩) = (𝐴 substr ⟨𝑀, 𝑁⟩)))
116115ex 448 . 2 (¬ (#‘𝐴) = 0 → ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉) → ((𝑀 ∈ (0...𝑁) ∧ 𝑁 ∈ (0...(#‘𝐴))) → ((𝐴 ++ 𝐵) substr ⟨𝑀, 𝑁⟩) = (𝐴 substr ⟨𝑀, 𝑁⟩))))
11725, 116pm2.61i 174 1 ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉) → ((𝑀 ∈ (0...𝑁) ∧ 𝑁 ∈ (0...(#‘𝐴))) → ((𝐴 ++ 𝐵) substr ⟨𝑀, 𝑁⟩) = (𝐴 substr ⟨𝑀, 𝑁⟩)))
Colors of variables: wff setvar class
Syntax hints:  ¬ wn 3  wi 4  wa 382  w3a 1030   = wceq 1474  wcel 1975  wne 2775  c0 3869  cop 4126   class class class wbr 4573   Fn wfn 5781  cfv 5786  (class class class)co 6523  cr 9787  0cc0 9788   + caddc 9791   < clt 9926  cle 9927  cmin 10113  cn 10863  0cn0 11135  ...cfz 12148  ..^cfzo 12285  #chash 12930  Word cword 13088   ++ cconcat 13090   substr csubstr 13092
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1711  ax-4 1726  ax-5 1825  ax-6 1873  ax-7 1920  ax-8 1977  ax-9 1984  ax-10 2004  ax-11 2019  ax-12 2031  ax-13 2228  ax-ext 2585  ax-rep 4689  ax-sep 4699  ax-nul 4708  ax-pow 4760  ax-pr 4824  ax-un 6820  ax-cnex 9844  ax-resscn 9845  ax-1cn 9846  ax-icn 9847  ax-addcl 9848  ax-addrcl 9849  ax-mulcl 9850  ax-mulrcl 9851  ax-mulcom 9852  ax-addass 9853  ax-mulass 9854  ax-distr 9855  ax-i2m1 9856  ax-1ne0 9857  ax-1rid 9858  ax-rnegex 9859  ax-rrecex 9860  ax-cnre 9861  ax-pre-lttri 9862  ax-pre-lttrn 9863  ax-pre-ltadd 9864  ax-pre-mulgt0 9865
This theorem depends on definitions:  df-bi 195  df-or 383  df-an 384  df-3or 1031  df-3an 1032  df-tru 1477  df-ex 1695  df-nf 1700  df-sb 1866  df-eu 2457  df-mo 2458  df-clab 2592  df-cleq 2598  df-clel 2601  df-nfc 2735  df-ne 2777  df-nel 2778  df-ral 2896  df-rex 2897  df-reu 2898  df-rab 2900  df-v 3170  df-sbc 3398  df-csb 3495  df-dif 3538  df-un 3540  df-in 3542  df-ss 3549  df-pss 3551  df-nul 3870  df-if 4032  df-pw 4105  df-sn 4121  df-pr 4123  df-tp 4125  df-op 4127  df-uni 4363  df-int 4401  df-iun 4447  df-br 4574  df-opab 4634  df-mpt 4635  df-tr 4671  df-eprel 4935  df-id 4939  df-po 4945  df-so 4946  df-fr 4983  df-we 4985  df-xp 5030  df-rel 5031  df-cnv 5032  df-co 5033  df-dm 5034  df-rn 5035  df-res 5036  df-ima 5037  df-pred 5579  df-ord 5625  df-on 5626  df-lim 5627  df-suc 5628  df-iota 5750  df-fun 5788  df-fn 5789  df-f 5790  df-f1 5791  df-fo 5792  df-f1o 5793  df-fv 5794  df-riota 6485  df-ov 6526  df-oprab 6527  df-mpt2 6528  df-om 6931  df-1st 7032  df-2nd 7033  df-wrecs 7267  df-recs 7328  df-rdg 7366  df-1o 7420  df-oadd 7424  df-er 7602  df-en 7815  df-dom 7816  df-sdom 7817  df-fin 7818  df-card 8621  df-pnf 9928  df-mnf 9929  df-xr 9930  df-ltxr 9931  df-le 9932  df-sub 10115  df-neg 10116  df-nn 10864  df-n0 11136  df-z 11207  df-uz 11516  df-fz 12149  df-fzo 12286  df-hash 12931  df-word 13096  df-concat 13098  df-substr 13100
This theorem is referenced by:  swrdccat3  13285  swrdccatin1d  13292  pfxccat3  40090  pfxccatpfx1  40091
  Copyright terms: Public domain W3C validator