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

Theorem swrdccatin1 13529
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 6698 . . . . . . 7 ((#‘𝐴) = 0 → (0...(#‘𝐴)) = (0...0))
21eleq2d 2716 . . . . . 6 ((#‘𝐴) = 0 → (𝑁 ∈ (0...(#‘𝐴)) ↔ 𝑁 ∈ (0...0)))
3 elfz1eq 12390 . . . . . . 7 (𝑁 ∈ (0...0) → 𝑁 = 0)
4 elfz1eq 12390 . . . . . . . . 9 (𝑀 ∈ (0...0) → 𝑀 = 0)
5 swrd00 13463 . . . . . . . . . . 11 ((𝐴 ++ 𝐵) substr ⟨0, 0⟩) = ∅
6 swrd00 13463 . . . . . . . . . . 11 (𝐴 substr ⟨0, 0⟩) = ∅
75, 6eqtr4i 2676 . . . . . . . . . 10 ((𝐴 ++ 𝐵) substr ⟨0, 0⟩) = (𝐴 substr ⟨0, 0⟩)
8 opeq1 4433 . . . . . . . . . . 11 (𝑀 = 0 → ⟨𝑀, 0⟩ = ⟨0, 0⟩)
98oveq2d 6706 . . . . . . . . . 10 (𝑀 = 0 → ((𝐴 ++ 𝐵) substr ⟨𝑀, 0⟩) = ((𝐴 ++ 𝐵) substr ⟨0, 0⟩))
108oveq2d 6706 . . . . . . . . . 10 (𝑀 = 0 → (𝐴 substr ⟨𝑀, 0⟩) = (𝐴 substr ⟨0, 0⟩))
117, 9, 103eqtr4a 2711 . . . . . . . . 9 (𝑀 = 0 → ((𝐴 ++ 𝐵) substr ⟨𝑀, 0⟩) = (𝐴 substr ⟨𝑀, 0⟩))
124, 11syl 17 . . . . . . . 8 (𝑀 ∈ (0...0) → ((𝐴 ++ 𝐵) substr ⟨𝑀, 0⟩) = (𝐴 substr ⟨𝑀, 0⟩))
13 oveq2 6698 . . . . . . . . . 10 (𝑁 = 0 → (0...𝑁) = (0...0))
1413eleq2d 2716 . . . . . . . . 9 (𝑁 = 0 → (𝑀 ∈ (0...𝑁) ↔ 𝑀 ∈ (0...0)))
15 opeq2 4434 . . . . . . . . . . 11 (𝑁 = 0 → ⟨𝑀, 𝑁⟩ = ⟨𝑀, 0⟩)
1615oveq2d 6706 . . . . . . . . . 10 (𝑁 = 0 → ((𝐴 ++ 𝐵) substr ⟨𝑀, 𝑁⟩) = ((𝐴 ++ 𝐵) substr ⟨𝑀, 0⟩))
1715oveq2d 6706 . . . . . . . . . 10 (𝑁 = 0 → (𝐴 substr ⟨𝑀, 𝑁⟩) = (𝐴 substr ⟨𝑀, 0⟩))
1816, 17eqeq12d 2666 . . . . . . . . 9 (𝑁 = 0 → (((𝐴 ++ 𝐵) substr ⟨𝑀, 𝑁⟩) = (𝐴 substr ⟨𝑀, 𝑁⟩) ↔ ((𝐴 ++ 𝐵) substr ⟨𝑀, 0⟩) = (𝐴 substr ⟨𝑀, 0⟩)))
1914, 18imbi12d 333 . . . . . . . 8 (𝑁 = 0 → ((𝑀 ∈ (0...𝑁) → ((𝐴 ++ 𝐵) substr ⟨𝑀, 𝑁⟩) = (𝐴 substr ⟨𝑀, 𝑁⟩)) ↔ (𝑀 ∈ (0...0) → ((𝐴 ++ 𝐵) substr ⟨𝑀, 0⟩) = (𝐴 substr ⟨𝑀, 0⟩))))
2012, 19mpbiri 248 . . . . . . 7 (𝑁 = 0 → (𝑀 ∈ (0...𝑁) → ((𝐴 ++ 𝐵) substr ⟨𝑀, 𝑁⟩) = (𝐴 substr ⟨𝑀, 𝑁⟩)))
213, 20syl 17 . . . . . 6 (𝑁 ∈ (0...0) → (𝑀 ∈ (0...𝑁) → ((𝐴 ++ 𝐵) substr ⟨𝑀, 𝑁⟩) = (𝐴 substr ⟨𝑀, 𝑁⟩)))
222, 21syl6bi 243 . . . . 5 ((#‘𝐴) = 0 → (𝑁 ∈ (0...(#‘𝐴)) → (𝑀 ∈ (0...𝑁) → ((𝐴 ++ 𝐵) substr ⟨𝑀, 𝑁⟩) = (𝐴 substr ⟨𝑀, 𝑁⟩))))
2322com23 86 . . . 4 ((#‘𝐴) = 0 → (𝑀 ∈ (0...𝑁) → (𝑁 ∈ (0...(#‘𝐴)) → ((𝐴 ++ 𝐵) substr ⟨𝑀, 𝑁⟩) = (𝐴 substr ⟨𝑀, 𝑁⟩))))
2423impd 446 . . 3 ((#‘𝐴) = 0 → ((𝑀 ∈ (0...𝑁) ∧ 𝑁 ∈ (0...(#‘𝐴))) → ((𝐴 ++ 𝐵) substr ⟨𝑀, 𝑁⟩) = (𝐴 substr ⟨𝑀, 𝑁⟩)))
2524a1d 25 . 2 ((#‘𝐴) = 0 → ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉) → ((𝑀 ∈ (0...𝑁) ∧ 𝑁 ∈ (0...(#‘𝐴))) → ((𝐴 ++ 𝐵) substr ⟨𝑀, 𝑁⟩) = (𝐴 substr ⟨𝑀, 𝑁⟩))))
26 ccatcl 13392 . . . . . . . 8 ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉) → (𝐴 ++ 𝐵) ∈ Word 𝑉)
2726adantl 481 . . . . . . 7 ((¬ (#‘𝐴) = 0 ∧ (𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉)) → (𝐴 ++ 𝐵) ∈ Word 𝑉)
2827adantr 480 . . . . . 6 (((¬ (#‘𝐴) = 0 ∧ (𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉)) ∧ (𝑀 ∈ (0...𝑁) ∧ 𝑁 ∈ (0...(#‘𝐴)))) → (𝐴 ++ 𝐵) ∈ Word 𝑉)
29 simprl 809 . . . . . 6 (((¬ (#‘𝐴) = 0 ∧ (𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉)) ∧ (𝑀 ∈ (0...𝑁) ∧ 𝑁 ∈ (0...(#‘𝐴)))) → 𝑀 ∈ (0...𝑁))
30 elfzelfzccat 13398 . . . . . . . . . 10 ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉) → (𝑁 ∈ (0...(#‘𝐴)) → 𝑁 ∈ (0...(#‘(𝐴 ++ 𝐵)))))
3130adantl 481 . . . . . . . . 9 ((¬ (#‘𝐴) = 0 ∧ (𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉)) → (𝑁 ∈ (0...(#‘𝐴)) → 𝑁 ∈ (0...(#‘(𝐴 ++ 𝐵)))))
3231com12 32 . . . . . . . 8 (𝑁 ∈ (0...(#‘𝐴)) → ((¬ (#‘𝐴) = 0 ∧ (𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉)) → 𝑁 ∈ (0...(#‘(𝐴 ++ 𝐵)))))
3332adantl 481 . . . . . . 7 ((𝑀 ∈ (0...𝑁) ∧ 𝑁 ∈ (0...(#‘𝐴))) → ((¬ (#‘𝐴) = 0 ∧ (𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉)) → 𝑁 ∈ (0...(#‘(𝐴 ++ 𝐵)))))
3433impcom 445 . . . . . 6 (((¬ (#‘𝐴) = 0 ∧ (𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉)) ∧ (𝑀 ∈ (0...𝑁) ∧ 𝑁 ∈ (0...(#‘𝐴)))) → 𝑁 ∈ (0...(#‘(𝐴 ++ 𝐵))))
35 swrdvalfn 13472 . . . . . 6 (((𝐴 ++ 𝐵) ∈ Word 𝑉𝑀 ∈ (0...𝑁) ∧ 𝑁 ∈ (0...(#‘(𝐴 ++ 𝐵)))) → ((𝐴 ++ 𝐵) substr ⟨𝑀, 𝑁⟩) Fn (0..^(𝑁𝑀)))
3628, 29, 34, 35syl3anc 1366 . . . . 5 (((¬ (#‘𝐴) = 0 ∧ (𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉)) ∧ (𝑀 ∈ (0...𝑁) ∧ 𝑁 ∈ (0...(#‘𝐴)))) → ((𝐴 ++ 𝐵) substr ⟨𝑀, 𝑁⟩) Fn (0..^(𝑁𝑀)))
37 3anass 1059 . . . . . . . . 9 ((𝐴 ∈ Word 𝑉𝑀 ∈ (0...𝑁) ∧ 𝑁 ∈ (0...(#‘𝐴))) ↔ (𝐴 ∈ Word 𝑉 ∧ (𝑀 ∈ (0...𝑁) ∧ 𝑁 ∈ (0...(#‘𝐴)))))
3837simplbi2 654 . . . . . . . 8 (𝐴 ∈ Word 𝑉 → ((𝑀 ∈ (0...𝑁) ∧ 𝑁 ∈ (0...(#‘𝐴))) → (𝐴 ∈ Word 𝑉𝑀 ∈ (0...𝑁) ∧ 𝑁 ∈ (0...(#‘𝐴)))))
3938ad2antrl 764 . . . . . . 7 ((¬ (#‘𝐴) = 0 ∧ (𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉)) → ((𝑀 ∈ (0...𝑁) ∧ 𝑁 ∈ (0...(#‘𝐴))) → (𝐴 ∈ Word 𝑉𝑀 ∈ (0...𝑁) ∧ 𝑁 ∈ (0...(#‘𝐴)))))
4039imp 444 . . . . . 6 (((¬ (#‘𝐴) = 0 ∧ (𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉)) ∧ (𝑀 ∈ (0...𝑁) ∧ 𝑁 ∈ (0...(#‘𝐴)))) → (𝐴 ∈ Word 𝑉𝑀 ∈ (0...𝑁) ∧ 𝑁 ∈ (0...(#‘𝐴))))
41 swrdvalfn 13472 . . . . . 6 ((𝐴 ∈ Word 𝑉𝑀 ∈ (0...𝑁) ∧ 𝑁 ∈ (0...(#‘𝐴))) → (𝐴 substr ⟨𝑀, 𝑁⟩) Fn (0..^(𝑁𝑀)))
4240, 41syl 17 . . . . 5 (((¬ (#‘𝐴) = 0 ∧ (𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉)) ∧ (𝑀 ∈ (0...𝑁) ∧ 𝑁 ∈ (0...(#‘𝐴)))) → (𝐴 substr ⟨𝑀, 𝑁⟩) Fn (0..^(𝑁𝑀)))
43 simprl 809 . . . . . . . 8 ((¬ (#‘𝐴) = 0 ∧ (𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉)) → 𝐴 ∈ Word 𝑉)
4443ad2antrr 762 . . . . . . 7 ((((¬ (#‘𝐴) = 0 ∧ (𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉)) ∧ (𝑀 ∈ (0...𝑁) ∧ 𝑁 ∈ (0...(#‘𝐴)))) ∧ 𝑘 ∈ (0..^(𝑁𝑀))) → 𝐴 ∈ Word 𝑉)
45 simprr 811 . . . . . . . 8 ((¬ (#‘𝐴) = 0 ∧ (𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉)) → 𝐵 ∈ Word 𝑉)
4645ad2antrr 762 . . . . . . 7 ((((¬ (#‘𝐴) = 0 ∧ (𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉)) ∧ (𝑀 ∈ (0...𝑁) ∧ 𝑁 ∈ (0...(#‘𝐴)))) ∧ 𝑘 ∈ (0..^(𝑁𝑀))) → 𝐵 ∈ Word 𝑉)
47 elfzo0 12548 . . . . . . . . . 10 (𝑘 ∈ (0..^(𝑁𝑀)) ↔ (𝑘 ∈ ℕ0 ∧ (𝑁𝑀) ∈ ℕ ∧ 𝑘 < (𝑁𝑀)))
48 elfz2nn0 12469 . . . . . . . . . . . . . 14 (𝑀 ∈ (0...𝑁) ↔ (𝑀 ∈ ℕ0𝑁 ∈ ℕ0𝑀𝑁))
49 nn0addcl 11366 . . . . . . . . . . . . . . . 16 ((𝑘 ∈ ℕ0𝑀 ∈ ℕ0) → (𝑘 + 𝑀) ∈ ℕ0)
5049expcom 450 . . . . . . . . . . . . . . 15 (𝑀 ∈ ℕ0 → (𝑘 ∈ ℕ0 → (𝑘 + 𝑀) ∈ ℕ0))
51503ad2ant1 1102 . . . . . . . . . . . . . 14 ((𝑀 ∈ ℕ0𝑁 ∈ ℕ0𝑀𝑁) → (𝑘 ∈ ℕ0 → (𝑘 + 𝑀) ∈ ℕ0))
5248, 51sylbi 207 . . . . . . . . . . . . 13 (𝑀 ∈ (0...𝑁) → (𝑘 ∈ ℕ0 → (𝑘 + 𝑀) ∈ ℕ0))
5352ad2antrl 764 . . . . . . . . . . . 12 (((¬ (#‘𝐴) = 0 ∧ (𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉)) ∧ (𝑀 ∈ (0...𝑁) ∧ 𝑁 ∈ (0...(#‘𝐴)))) → (𝑘 ∈ ℕ0 → (𝑘 + 𝑀) ∈ ℕ0))
5453com12 32 . . . . . . . . . . 11 (𝑘 ∈ ℕ0 → (((¬ (#‘𝐴) = 0 ∧ (𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉)) ∧ (𝑀 ∈ (0...𝑁) ∧ 𝑁 ∈ (0...(#‘𝐴)))) → (𝑘 + 𝑀) ∈ ℕ0))
55543ad2ant1 1102 . . . . . . . . . 10 ((𝑘 ∈ ℕ0 ∧ (𝑁𝑀) ∈ ℕ ∧ 𝑘 < (𝑁𝑀)) → (((¬ (#‘𝐴) = 0 ∧ (𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉)) ∧ (𝑀 ∈ (0...𝑁) ∧ 𝑁 ∈ (0...(#‘𝐴)))) → (𝑘 + 𝑀) ∈ ℕ0))
5647, 55sylbi 207 . . . . . . . . 9 (𝑘 ∈ (0..^(𝑁𝑀)) → (((¬ (#‘𝐴) = 0 ∧ (𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉)) ∧ (𝑀 ∈ (0...𝑁) ∧ 𝑁 ∈ (0...(#‘𝐴)))) → (𝑘 + 𝑀) ∈ ℕ0))
5756impcom 445 . . . . . . . 8 ((((¬ (#‘𝐴) = 0 ∧ (𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉)) ∧ (𝑀 ∈ (0...𝑁) ∧ 𝑁 ∈ (0...(#‘𝐴)))) ∧ 𝑘 ∈ (0..^(𝑁𝑀))) → (𝑘 + 𝑀) ∈ ℕ0)
58 lencl 13356 . . . . . . . . . . . 12 (𝐴 ∈ Word 𝑉 → (#‘𝐴) ∈ ℕ0)
59 df-ne 2824 . . . . . . . . . . . . 13 ((#‘𝐴) ≠ 0 ↔ ¬ (#‘𝐴) = 0)
60 elnnne0 11344 . . . . . . . . . . . . . 14 ((#‘𝐴) ∈ ℕ ↔ ((#‘𝐴) ∈ ℕ0 ∧ (#‘𝐴) ≠ 0))
6160simplbi2 654 . . . . . . . . . . . . 13 ((#‘𝐴) ∈ ℕ0 → ((#‘𝐴) ≠ 0 → (#‘𝐴) ∈ ℕ))
6259, 61syl5bir 233 . . . . . . . . . . . 12 ((#‘𝐴) ∈ ℕ0 → (¬ (#‘𝐴) = 0 → (#‘𝐴) ∈ ℕ))
6358, 62syl 17 . . . . . . . . . . 11 (𝐴 ∈ Word 𝑉 → (¬ (#‘𝐴) = 0 → (#‘𝐴) ∈ ℕ))
6463adantr 480 . . . . . . . . . 10 ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉) → (¬ (#‘𝐴) = 0 → (#‘𝐴) ∈ ℕ))
6564impcom 445 . . . . . . . . 9 ((¬ (#‘𝐴) = 0 ∧ (𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉)) → (#‘𝐴) ∈ ℕ)
6665ad2antrr 762 . . . . . . . 8 ((((¬ (#‘𝐴) = 0 ∧ (𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉)) ∧ (𝑀 ∈ (0...𝑁) ∧ 𝑁 ∈ (0...(#‘𝐴)))) ∧ 𝑘 ∈ (0..^(𝑁𝑀))) → (#‘𝐴) ∈ ℕ)
67 elfz2nn0 12469 . . . . . . . . . . . . . . . 16 (𝑁 ∈ (0...(#‘𝐴)) ↔ (𝑁 ∈ ℕ0 ∧ (#‘𝐴) ∈ ℕ0𝑁 ≤ (#‘𝐴)))
68 nn0re 11339 . . . . . . . . . . . . . . . . . . . . . . . . . 26 (𝑘 ∈ ℕ0𝑘 ∈ ℝ)
6968ad2antrl 764 . . . . . . . . . . . . . . . . . . . . . . . . 25 (((𝑁 ∈ ℕ0 ∧ (#‘𝐴) ∈ ℕ0) ∧ (𝑘 ∈ ℕ0𝑀 ∈ ℕ0)) → 𝑘 ∈ ℝ)
70 nn0re 11339 . . . . . . . . . . . . . . . . . . . . . . . . . . 27 (𝑀 ∈ ℕ0𝑀 ∈ ℝ)
7170adantl 481 . . . . . . . . . . . . . . . . . . . . . . . . . 26 ((𝑘 ∈ ℕ0𝑀 ∈ ℕ0) → 𝑀 ∈ ℝ)
7271adantl 481 . . . . . . . . . . . . . . . . . . . . . . . . 25 (((𝑁 ∈ ℕ0 ∧ (#‘𝐴) ∈ ℕ0) ∧ (𝑘 ∈ ℕ0𝑀 ∈ ℕ0)) → 𝑀 ∈ ℝ)
73 nn0re 11339 . . . . . . . . . . . . . . . . . . . . . . . . . 26 (𝑁 ∈ ℕ0𝑁 ∈ ℝ)
7473ad2antrr 762 . . . . . . . . . . . . . . . . . . . . . . . . 25 (((𝑁 ∈ ℕ0 ∧ (#‘𝐴) ∈ ℕ0) ∧ (𝑘 ∈ ℕ0𝑀 ∈ ℕ0)) → 𝑁 ∈ ℝ)
7569, 72, 74ltaddsubd 10665 . . . . . . . . . . . . . . . . . . . . . . . 24 (((𝑁 ∈ ℕ0 ∧ (#‘𝐴) ∈ ℕ0) ∧ (𝑘 ∈ ℕ0𝑀 ∈ ℕ0)) → ((𝑘 + 𝑀) < 𝑁𝑘 < (𝑁𝑀)))
76 nn0re 11339 . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 ((𝑘 + 𝑀) ∈ ℕ0 → (𝑘 + 𝑀) ∈ ℝ)
7749, 76syl 17 . . . . . . . . . . . . . . . . . . . . . . . . . . 27 ((𝑘 ∈ ℕ0𝑀 ∈ ℕ0) → (𝑘 + 𝑀) ∈ ℝ)
7877adantl 481 . . . . . . . . . . . . . . . . . . . . . . . . . 26 (((𝑁 ∈ ℕ0 ∧ (#‘𝐴) ∈ ℕ0) ∧ (𝑘 ∈ ℕ0𝑀 ∈ ℕ0)) → (𝑘 + 𝑀) ∈ ℝ)
79 nn0re 11339 . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 ((#‘𝐴) ∈ ℕ0 → (#‘𝐴) ∈ ℝ)
8079adantl 481 . . . . . . . . . . . . . . . . . . . . . . . . . . 27 ((𝑁 ∈ ℕ0 ∧ (#‘𝐴) ∈ ℕ0) → (#‘𝐴) ∈ ℝ)
8180adantr 480 . . . . . . . . . . . . . . . . . . . . . . . . . 26 (((𝑁 ∈ ℕ0 ∧ (#‘𝐴) ∈ ℕ0) ∧ (𝑘 ∈ ℕ0𝑀 ∈ ℕ0)) → (#‘𝐴) ∈ ℝ)
82 ltletr 10167 . . . . . . . . . . . . . . . . . . . . . . . . . 26 (((𝑘 + 𝑀) ∈ ℝ ∧ 𝑁 ∈ ℝ ∧ (#‘𝐴) ∈ ℝ) → (((𝑘 + 𝑀) < 𝑁𝑁 ≤ (#‘𝐴)) → (𝑘 + 𝑀) < (#‘𝐴)))
8378, 74, 81, 82syl3anc 1366 . . . . . . . . . . . . . . . . . . . . . . . . 25 (((𝑁 ∈ ℕ0 ∧ (#‘𝐴) ∈ ℕ0) ∧ (𝑘 ∈ ℕ0𝑀 ∈ ℕ0)) → (((𝑘 + 𝑀) < 𝑁𝑁 ≤ (#‘𝐴)) → (𝑘 + 𝑀) < (#‘𝐴)))
8483expd 451 . . . . . . . . . . . . . . . . . . . . . . . 24 (((𝑁 ∈ ℕ0 ∧ (#‘𝐴) ∈ ℕ0) ∧ (𝑘 ∈ ℕ0𝑀 ∈ ℕ0)) → ((𝑘 + 𝑀) < 𝑁 → (𝑁 ≤ (#‘𝐴) → (𝑘 + 𝑀) < (#‘𝐴))))
8575, 84sylbird 250 . . . . . . . . . . . . . . . . . . . . . . 23 (((𝑁 ∈ ℕ0 ∧ (#‘𝐴) ∈ ℕ0) ∧ (𝑘 ∈ ℕ0𝑀 ∈ ℕ0)) → (𝑘 < (𝑁𝑀) → (𝑁 ≤ (#‘𝐴) → (𝑘 + 𝑀) < (#‘𝐴))))
8685ex 449 . . . . . . . . . . . . . . . . . . . . . 22 ((𝑁 ∈ ℕ0 ∧ (#‘𝐴) ∈ ℕ0) → ((𝑘 ∈ ℕ0𝑀 ∈ ℕ0) → (𝑘 < (𝑁𝑀) → (𝑁 ≤ (#‘𝐴) → (𝑘 + 𝑀) < (#‘𝐴)))))
8786com24 95 . . . . . . . . . . . . . . . . . . . . 21 ((𝑁 ∈ ℕ0 ∧ (#‘𝐴) ∈ ℕ0) → (𝑁 ≤ (#‘𝐴) → (𝑘 < (𝑁𝑀) → ((𝑘 ∈ ℕ0𝑀 ∈ ℕ0) → (𝑘 + 𝑀) < (#‘𝐴)))))
88873impia 1280 . . . . . . . . . . . . . . . . . . . 20 ((𝑁 ∈ ℕ0 ∧ (#‘𝐴) ∈ ℕ0𝑁 ≤ (#‘𝐴)) → (𝑘 < (𝑁𝑀) → ((𝑘 ∈ ℕ0𝑀 ∈ ℕ0) → (𝑘 + 𝑀) < (#‘𝐴))))
8988com13 88 . . . . . . . . . . . . . . . . . . 19 ((𝑘 ∈ ℕ0𝑀 ∈ ℕ0) → (𝑘 < (𝑁𝑀) → ((𝑁 ∈ ℕ0 ∧ (#‘𝐴) ∈ ℕ0𝑁 ≤ (#‘𝐴)) → (𝑘 + 𝑀) < (#‘𝐴))))
9089impancom 455 . . . . . . . . . . . . . . . . . 18 ((𝑘 ∈ ℕ0𝑘 < (𝑁𝑀)) → (𝑀 ∈ ℕ0 → ((𝑁 ∈ ℕ0 ∧ (#‘𝐴) ∈ ℕ0𝑁 ≤ (#‘𝐴)) → (𝑘 + 𝑀) < (#‘𝐴))))
91903adant2 1100 . . . . . . . . . . . . . . . . 17 ((𝑘 ∈ ℕ0 ∧ (𝑁𝑀) ∈ ℕ ∧ 𝑘 < (𝑁𝑀)) → (𝑀 ∈ ℕ0 → ((𝑁 ∈ ℕ0 ∧ (#‘𝐴) ∈ ℕ0𝑁 ≤ (#‘𝐴)) → (𝑘 + 𝑀) < (#‘𝐴))))
9291com13 88 . . . . . . . . . . . . . . . 16 ((𝑁 ∈ ℕ0 ∧ (#‘𝐴) ∈ ℕ0𝑁 ≤ (#‘𝐴)) → (𝑀 ∈ ℕ0 → ((𝑘 ∈ ℕ0 ∧ (𝑁𝑀) ∈ ℕ ∧ 𝑘 < (𝑁𝑀)) → (𝑘 + 𝑀) < (#‘𝐴))))
9367, 92sylbi 207 . . . . . . . . . . . . . . 15 (𝑁 ∈ (0...(#‘𝐴)) → (𝑀 ∈ ℕ0 → ((𝑘 ∈ ℕ0 ∧ (𝑁𝑀) ∈ ℕ ∧ 𝑘 < (𝑁𝑀)) → (𝑘 + 𝑀) < (#‘𝐴))))
9493com12 32 . . . . . . . . . . . . . 14 (𝑀 ∈ ℕ0 → (𝑁 ∈ (0...(#‘𝐴)) → ((𝑘 ∈ ℕ0 ∧ (𝑁𝑀) ∈ ℕ ∧ 𝑘 < (𝑁𝑀)) → (𝑘 + 𝑀) < (#‘𝐴))))
95943ad2ant1 1102 . . . . . . . . . . . . 13 ((𝑀 ∈ ℕ0𝑁 ∈ ℕ0𝑀𝑁) → (𝑁 ∈ (0...(#‘𝐴)) → ((𝑘 ∈ ℕ0 ∧ (𝑁𝑀) ∈ ℕ ∧ 𝑘 < (𝑁𝑀)) → (𝑘 + 𝑀) < (#‘𝐴))))
9648, 95sylbi 207 . . . . . . . . . . . 12 (𝑀 ∈ (0...𝑁) → (𝑁 ∈ (0...(#‘𝐴)) → ((𝑘 ∈ ℕ0 ∧ (𝑁𝑀) ∈ ℕ ∧ 𝑘 < (𝑁𝑀)) → (𝑘 + 𝑀) < (#‘𝐴))))
9796a1i 11 . . . . . . . . . . 11 ((¬ (#‘𝐴) = 0 ∧ (𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉)) → (𝑀 ∈ (0...𝑁) → (𝑁 ∈ (0...(#‘𝐴)) → ((𝑘 ∈ ℕ0 ∧ (𝑁𝑀) ∈ ℕ ∧ 𝑘 < (𝑁𝑀)) → (𝑘 + 𝑀) < (#‘𝐴)))))
9897imp32 448 . . . . . . . . . 10 (((¬ (#‘𝐴) = 0 ∧ (𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉)) ∧ (𝑀 ∈ (0...𝑁) ∧ 𝑁 ∈ (0...(#‘𝐴)))) → ((𝑘 ∈ ℕ0 ∧ (𝑁𝑀) ∈ ℕ ∧ 𝑘 < (𝑁𝑀)) → (𝑘 + 𝑀) < (#‘𝐴)))
9947, 98syl5bi 232 . . . . . . . . 9 (((¬ (#‘𝐴) = 0 ∧ (𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉)) ∧ (𝑀 ∈ (0...𝑁) ∧ 𝑁 ∈ (0...(#‘𝐴)))) → (𝑘 ∈ (0..^(𝑁𝑀)) → (𝑘 + 𝑀) < (#‘𝐴)))
10099imp 444 . . . . . . . 8 ((((¬ (#‘𝐴) = 0 ∧ (𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉)) ∧ (𝑀 ∈ (0...𝑁) ∧ 𝑁 ∈ (0...(#‘𝐴)))) ∧ 𝑘 ∈ (0..^(𝑁𝑀))) → (𝑘 + 𝑀) < (#‘𝐴))
101 elfzo0 12548 . . . . . . . 8 ((𝑘 + 𝑀) ∈ (0..^(#‘𝐴)) ↔ ((𝑘 + 𝑀) ∈ ℕ0 ∧ (#‘𝐴) ∈ ℕ ∧ (𝑘 + 𝑀) < (#‘𝐴)))
10257, 66, 100, 101syl3anbrc 1265 . . . . . . 7 ((((¬ (#‘𝐴) = 0 ∧ (𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉)) ∧ (𝑀 ∈ (0...𝑁) ∧ 𝑁 ∈ (0...(#‘𝐴)))) ∧ 𝑘 ∈ (0..^(𝑁𝑀))) → (𝑘 + 𝑀) ∈ (0..^(#‘𝐴)))
103 ccatval1 13395 . . . . . . 7 ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉 ∧ (𝑘 + 𝑀) ∈ (0..^(#‘𝐴))) → ((𝐴 ++ 𝐵)‘(𝑘 + 𝑀)) = (𝐴‘(𝑘 + 𝑀)))
10444, 46, 102, 103syl3anc 1366 . . . . . 6 ((((¬ (#‘𝐴) = 0 ∧ (𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉)) ∧ (𝑀 ∈ (0...𝑁) ∧ 𝑁 ∈ (0...(#‘𝐴)))) ∧ 𝑘 ∈ (0..^(𝑁𝑀))) → ((𝐴 ++ 𝐵)‘(𝑘 + 𝑀)) = (𝐴‘(𝑘 + 𝑀)))
10527ad2antrr 762 . . . . . . . 8 ((((¬ (#‘𝐴) = 0 ∧ (𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉)) ∧ (𝑀 ∈ (0...𝑁) ∧ 𝑁 ∈ (0...(#‘𝐴)))) ∧ 𝑘 ∈ (0..^(𝑁𝑀))) → (𝐴 ++ 𝐵) ∈ Word 𝑉)
10629adantr 480 . . . . . . . 8 ((((¬ (#‘𝐴) = 0 ∧ (𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉)) ∧ (𝑀 ∈ (0...𝑁) ∧ 𝑁 ∈ (0...(#‘𝐴)))) ∧ 𝑘 ∈ (0..^(𝑁𝑀))) → 𝑀 ∈ (0...𝑁))
10734adantr 480 . . . . . . . 8 ((((¬ (#‘𝐴) = 0 ∧ (𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉)) ∧ (𝑀 ∈ (0...𝑁) ∧ 𝑁 ∈ (0...(#‘𝐴)))) ∧ 𝑘 ∈ (0..^(𝑁𝑀))) → 𝑁 ∈ (0...(#‘(𝐴 ++ 𝐵))))
108105, 106, 1073jca 1261 . . . . . . 7 ((((¬ (#‘𝐴) = 0 ∧ (𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉)) ∧ (𝑀 ∈ (0...𝑁) ∧ 𝑁 ∈ (0...(#‘𝐴)))) ∧ 𝑘 ∈ (0..^(𝑁𝑀))) → ((𝐴 ++ 𝐵) ∈ Word 𝑉𝑀 ∈ (0...𝑁) ∧ 𝑁 ∈ (0...(#‘(𝐴 ++ 𝐵)))))
109 swrdfv 13469 . . . . . . 7 ((((𝐴 ++ 𝐵) ∈ Word 𝑉𝑀 ∈ (0...𝑁) ∧ 𝑁 ∈ (0...(#‘(𝐴 ++ 𝐵)))) ∧ 𝑘 ∈ (0..^(𝑁𝑀))) → (((𝐴 ++ 𝐵) substr ⟨𝑀, 𝑁⟩)‘𝑘) = ((𝐴 ++ 𝐵)‘(𝑘 + 𝑀)))
110108, 109sylancom 702 . . . . . 6 ((((¬ (#‘𝐴) = 0 ∧ (𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉)) ∧ (𝑀 ∈ (0...𝑁) ∧ 𝑁 ∈ (0...(#‘𝐴)))) ∧ 𝑘 ∈ (0..^(𝑁𝑀))) → (((𝐴 ++ 𝐵) substr ⟨𝑀, 𝑁⟩)‘𝑘) = ((𝐴 ++ 𝐵)‘(𝑘 + 𝑀)))
111 swrdfv 13469 . . . . . . 7 (((𝐴 ∈ Word 𝑉𝑀 ∈ (0...𝑁) ∧ 𝑁 ∈ (0...(#‘𝐴))) ∧ 𝑘 ∈ (0..^(𝑁𝑀))) → ((𝐴 substr ⟨𝑀, 𝑁⟩)‘𝑘) = (𝐴‘(𝑘 + 𝑀)))
11240, 111sylan 487 . . . . . 6 ((((¬ (#‘𝐴) = 0 ∧ (𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉)) ∧ (𝑀 ∈ (0...𝑁) ∧ 𝑁 ∈ (0...(#‘𝐴)))) ∧ 𝑘 ∈ (0..^(𝑁𝑀))) → ((𝐴 substr ⟨𝑀, 𝑁⟩)‘𝑘) = (𝐴‘(𝑘 + 𝑀)))
113104, 110, 1123eqtr4d 2695 . . . . 5 ((((¬ (#‘𝐴) = 0 ∧ (𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉)) ∧ (𝑀 ∈ (0...𝑁) ∧ 𝑁 ∈ (0...(#‘𝐴)))) ∧ 𝑘 ∈ (0..^(𝑁𝑀))) → (((𝐴 ++ 𝐵) substr ⟨𝑀, 𝑁⟩)‘𝑘) = ((𝐴 substr ⟨𝑀, 𝑁⟩)‘𝑘))
11436, 42, 113eqfnfvd 6354 . . . 4 (((¬ (#‘𝐴) = 0 ∧ (𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉)) ∧ (𝑀 ∈ (0...𝑁) ∧ 𝑁 ∈ (0...(#‘𝐴)))) → ((𝐴 ++ 𝐵) substr ⟨𝑀, 𝑁⟩) = (𝐴 substr ⟨𝑀, 𝑁⟩))
115114ex 449 . . 3 ((¬ (#‘𝐴) = 0 ∧ (𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉)) → ((𝑀 ∈ (0...𝑁) ∧ 𝑁 ∈ (0...(#‘𝐴))) → ((𝐴 ++ 𝐵) substr ⟨𝑀, 𝑁⟩) = (𝐴 substr ⟨𝑀, 𝑁⟩)))
116115ex 449 . 2 (¬ (#‘𝐴) = 0 → ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉) → ((𝑀 ∈ (0...𝑁) ∧ 𝑁 ∈ (0...(#‘𝐴))) → ((𝐴 ++ 𝐵) substr ⟨𝑀, 𝑁⟩) = (𝐴 substr ⟨𝑀, 𝑁⟩))))
11725, 116pm2.61i 176 1 ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉) → ((𝑀 ∈ (0...𝑁) ∧ 𝑁 ∈ (0...(#‘𝐴))) → ((𝐴 ++ 𝐵) substr ⟨𝑀, 𝑁⟩) = (𝐴 substr ⟨𝑀, 𝑁⟩)))
Colors of variables: wff setvar class
Syntax hints:  ¬ wn 3  wi 4  wa 383  w3a 1054   = wceq 1523  wcel 2030  wne 2823  c0 3948  cop 4216   class class class wbr 4685   Fn wfn 5921  cfv 5926  (class class class)co 6690  cr 9973  0cc0 9974   + caddc 9977   < clt 10112  cle 10113  cmin 10304  cn 11058  0cn0 11330  ...cfz 12364  ..^cfzo 12504  #chash 13157  Word cword 13323   ++ cconcat 13325   substr csubstr 13327
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1762  ax-4 1777  ax-5 1879  ax-6 1945  ax-7 1981  ax-8 2032  ax-9 2039  ax-10 2059  ax-11 2074  ax-12 2087  ax-13 2282  ax-ext 2631  ax-rep 4804  ax-sep 4814  ax-nul 4822  ax-pow 4873  ax-pr 4936  ax-un 6991  ax-cnex 10030  ax-resscn 10031  ax-1cn 10032  ax-icn 10033  ax-addcl 10034  ax-addrcl 10035  ax-mulcl 10036  ax-mulrcl 10037  ax-mulcom 10038  ax-addass 10039  ax-mulass 10040  ax-distr 10041  ax-i2m1 10042  ax-1ne0 10043  ax-1rid 10044  ax-rnegex 10045  ax-rrecex 10046  ax-cnre 10047  ax-pre-lttri 10048  ax-pre-lttrn 10049  ax-pre-ltadd 10050  ax-pre-mulgt0 10051
This theorem depends on definitions:  df-bi 197  df-or 384  df-an 385  df-3or 1055  df-3an 1056  df-tru 1526  df-ex 1745  df-nf 1750  df-sb 1938  df-eu 2502  df-mo 2503  df-clab 2638  df-cleq 2644  df-clel 2647  df-nfc 2782  df-ne 2824  df-nel 2927  df-ral 2946  df-rex 2947  df-reu 2948  df-rab 2950  df-v 3233  df-sbc 3469  df-csb 3567  df-dif 3610  df-un 3612  df-in 3614  df-ss 3621  df-pss 3623  df-nul 3949  df-if 4120  df-pw 4193  df-sn 4211  df-pr 4213  df-tp 4215  df-op 4217  df-uni 4469  df-int 4508  df-iun 4554  df-br 4686  df-opab 4746  df-mpt 4763  df-tr 4786  df-id 5053  df-eprel 5058  df-po 5064  df-so 5065  df-fr 5102  df-we 5104  df-xp 5149  df-rel 5150  df-cnv 5151  df-co 5152  df-dm 5153  df-rn 5154  df-res 5155  df-ima 5156  df-pred 5718  df-ord 5764  df-on 5765  df-lim 5766  df-suc 5767  df-iota 5889  df-fun 5928  df-fn 5929  df-f 5930  df-f1 5931  df-fo 5932  df-f1o 5933  df-fv 5934  df-riota 6651  df-ov 6693  df-oprab 6694  df-mpt2 6695  df-om 7108  df-1st 7210  df-2nd 7211  df-wrecs 7452  df-recs 7513  df-rdg 7551  df-1o 7605  df-oadd 7609  df-er 7787  df-en 7998  df-dom 7999  df-sdom 8000  df-fin 8001  df-card 8803  df-pnf 10114  df-mnf 10115  df-xr 10116  df-ltxr 10117  df-le 10118  df-sub 10306  df-neg 10307  df-nn 11059  df-n0 11331  df-z 11416  df-uz 11726  df-fz 12365  df-fzo 12505  df-hash 13158  df-word 13331  df-concat 13333  df-substr 13335
This theorem is referenced by:  swrdccat3  13538  swrdccatin1d  13545  pfxccat3  41751  pfxccatpfx1  41752
  Copyright terms: Public domain W3C validator