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

Theorem ccatpfx 13743
Description: Concatenating a prefix with an adjacent subword makes a longer prefix. (Contributed by AV, 7-May-2020.)
Assertion
Ref Expression
ccatpfx ((𝑆 ∈ Word 𝐴𝑌 ∈ (0...𝑍) ∧ 𝑍 ∈ (0...(♯‘𝑆))) → ((𝑆 prefix 𝑌) ++ (𝑆 substr ⟨𝑌, 𝑍⟩)) = (𝑆 prefix 𝑍))

Proof of Theorem ccatpfx
Dummy variable 𝑥 is distinct from all other variables.
StepHypRef Expression
1 pfxcl 13719 . . . . . 6 (𝑆 ∈ Word 𝐴 → (𝑆 prefix 𝑌) ∈ Word 𝐴)
213ad2ant1 1164 . . . . 5 ((𝑆 ∈ Word 𝐴𝑌 ∈ (0...𝑍) ∧ 𝑍 ∈ (0...(♯‘𝑆))) → (𝑆 prefix 𝑌) ∈ Word 𝐴)
3 swrdcl 13668 . . . . . 6 (𝑆 ∈ Word 𝐴 → (𝑆 substr ⟨𝑌, 𝑍⟩) ∈ Word 𝐴)
433ad2ant1 1164 . . . . 5 ((𝑆 ∈ Word 𝐴𝑌 ∈ (0...𝑍) ∧ 𝑍 ∈ (0...(♯‘𝑆))) → (𝑆 substr ⟨𝑌, 𝑍⟩) ∈ Word 𝐴)
5 ccatcl 13593 . . . . 5 (((𝑆 prefix 𝑌) ∈ Word 𝐴 ∧ (𝑆 substr ⟨𝑌, 𝑍⟩) ∈ Word 𝐴) → ((𝑆 prefix 𝑌) ++ (𝑆 substr ⟨𝑌, 𝑍⟩)) ∈ Word 𝐴)
62, 4, 5syl2anc 580 . . . 4 ((𝑆 ∈ Word 𝐴𝑌 ∈ (0...𝑍) ∧ 𝑍 ∈ (0...(♯‘𝑆))) → ((𝑆 prefix 𝑌) ++ (𝑆 substr ⟨𝑌, 𝑍⟩)) ∈ Word 𝐴)
7 wrdf 13538 . . . 4 (((𝑆 prefix 𝑌) ++ (𝑆 substr ⟨𝑌, 𝑍⟩)) ∈ Word 𝐴 → ((𝑆 prefix 𝑌) ++ (𝑆 substr ⟨𝑌, 𝑍⟩)):(0..^(♯‘((𝑆 prefix 𝑌) ++ (𝑆 substr ⟨𝑌, 𝑍⟩))))⟶𝐴)
8 ffn 6257 . . . 4 (((𝑆 prefix 𝑌) ++ (𝑆 substr ⟨𝑌, 𝑍⟩)):(0..^(♯‘((𝑆 prefix 𝑌) ++ (𝑆 substr ⟨𝑌, 𝑍⟩))))⟶𝐴 → ((𝑆 prefix 𝑌) ++ (𝑆 substr ⟨𝑌, 𝑍⟩)) Fn (0..^(♯‘((𝑆 prefix 𝑌) ++ (𝑆 substr ⟨𝑌, 𝑍⟩)))))
96, 7, 83syl 18 . . 3 ((𝑆 ∈ Word 𝐴𝑌 ∈ (0...𝑍) ∧ 𝑍 ∈ (0...(♯‘𝑆))) → ((𝑆 prefix 𝑌) ++ (𝑆 substr ⟨𝑌, 𝑍⟩)) Fn (0..^(♯‘((𝑆 prefix 𝑌) ++ (𝑆 substr ⟨𝑌, 𝑍⟩)))))
10 ccatlen 13594 . . . . . . 7 (((𝑆 prefix 𝑌) ∈ Word 𝐴 ∧ (𝑆 substr ⟨𝑌, 𝑍⟩) ∈ Word 𝐴) → (♯‘((𝑆 prefix 𝑌) ++ (𝑆 substr ⟨𝑌, 𝑍⟩))) = ((♯‘(𝑆 prefix 𝑌)) + (♯‘(𝑆 substr ⟨𝑌, 𝑍⟩))))
112, 4, 10syl2anc 580 . . . . . 6 ((𝑆 ∈ Word 𝐴𝑌 ∈ (0...𝑍) ∧ 𝑍 ∈ (0...(♯‘𝑆))) → (♯‘((𝑆 prefix 𝑌) ++ (𝑆 substr ⟨𝑌, 𝑍⟩))) = ((♯‘(𝑆 prefix 𝑌)) + (♯‘(𝑆 substr ⟨𝑌, 𝑍⟩))))
12 simp1 1167 . . . . . . . . 9 ((𝑆 ∈ Word 𝐴𝑌 ∈ (0...𝑍) ∧ 𝑍 ∈ (0...(♯‘𝑆))) → 𝑆 ∈ Word 𝐴)
13 fzass4 12632 . . . . . . . . . . . 12 ((𝑌 ∈ (0...(♯‘𝑆)) ∧ 𝑍 ∈ (𝑌...(♯‘𝑆))) ↔ (𝑌 ∈ (0...𝑍) ∧ 𝑍 ∈ (0...(♯‘𝑆))))
1413biimpri 220 . . . . . . . . . . 11 ((𝑌 ∈ (0...𝑍) ∧ 𝑍 ∈ (0...(♯‘𝑆))) → (𝑌 ∈ (0...(♯‘𝑆)) ∧ 𝑍 ∈ (𝑌...(♯‘𝑆))))
1514simpld 489 . . . . . . . . . 10 ((𝑌 ∈ (0...𝑍) ∧ 𝑍 ∈ (0...(♯‘𝑆))) → 𝑌 ∈ (0...(♯‘𝑆)))
16153adant1 1161 . . . . . . . . 9 ((𝑆 ∈ Word 𝐴𝑌 ∈ (0...𝑍) ∧ 𝑍 ∈ (0...(♯‘𝑆))) → 𝑌 ∈ (0...(♯‘𝑆)))
17 pfxlen 13725 . . . . . . . . 9 ((𝑆 ∈ Word 𝐴𝑌 ∈ (0...(♯‘𝑆))) → (♯‘(𝑆 prefix 𝑌)) = 𝑌)
1812, 16, 17syl2anc 580 . . . . . . . 8 ((𝑆 ∈ Word 𝐴𝑌 ∈ (0...𝑍) ∧ 𝑍 ∈ (0...(♯‘𝑆))) → (♯‘(𝑆 prefix 𝑌)) = 𝑌)
19 swrdlen 13672 . . . . . . . 8 ((𝑆 ∈ Word 𝐴𝑌 ∈ (0...𝑍) ∧ 𝑍 ∈ (0...(♯‘𝑆))) → (♯‘(𝑆 substr ⟨𝑌, 𝑍⟩)) = (𝑍𝑌))
2018, 19oveq12d 6897 . . . . . . 7 ((𝑆 ∈ Word 𝐴𝑌 ∈ (0...𝑍) ∧ 𝑍 ∈ (0...(♯‘𝑆))) → ((♯‘(𝑆 prefix 𝑌)) + (♯‘(𝑆 substr ⟨𝑌, 𝑍⟩))) = (𝑌 + (𝑍𝑌)))
21 elfzelz 12595 . . . . . . . . . . 11 (𝑌 ∈ (0...𝑍) → 𝑌 ∈ ℤ)
2221ad2antrl 720 . . . . . . . . . 10 ((𝑆 ∈ Word 𝐴 ∧ (𝑌 ∈ (0...𝑍) ∧ 𝑍 ∈ (0...(♯‘𝑆)))) → 𝑌 ∈ ℤ)
2322zcnd 11772 . . . . . . . . 9 ((𝑆 ∈ Word 𝐴 ∧ (𝑌 ∈ (0...𝑍) ∧ 𝑍 ∈ (0...(♯‘𝑆)))) → 𝑌 ∈ ℂ)
24233impb 1144 . . . . . . . 8 ((𝑆 ∈ Word 𝐴𝑌 ∈ (0...𝑍) ∧ 𝑍 ∈ (0...(♯‘𝑆))) → 𝑌 ∈ ℂ)
25 elfzelz 12595 . . . . . . . . . . 11 (𝑍 ∈ (0...(♯‘𝑆)) → 𝑍 ∈ ℤ)
2625ad2antll 721 . . . . . . . . . 10 ((𝑆 ∈ Word 𝐴 ∧ (𝑌 ∈ (0...𝑍) ∧ 𝑍 ∈ (0...(♯‘𝑆)))) → 𝑍 ∈ ℤ)
2726zcnd 11772 . . . . . . . . 9 ((𝑆 ∈ Word 𝐴 ∧ (𝑌 ∈ (0...𝑍) ∧ 𝑍 ∈ (0...(♯‘𝑆)))) → 𝑍 ∈ ℂ)
28273impb 1144 . . . . . . . 8 ((𝑆 ∈ Word 𝐴𝑌 ∈ (0...𝑍) ∧ 𝑍 ∈ (0...(♯‘𝑆))) → 𝑍 ∈ ℂ)
2924, 28pncan3d 10688 . . . . . . 7 ((𝑆 ∈ Word 𝐴𝑌 ∈ (0...𝑍) ∧ 𝑍 ∈ (0...(♯‘𝑆))) → (𝑌 + (𝑍𝑌)) = 𝑍)
3020, 29eqtrd 2834 . . . . . 6 ((𝑆 ∈ Word 𝐴𝑌 ∈ (0...𝑍) ∧ 𝑍 ∈ (0...(♯‘𝑆))) → ((♯‘(𝑆 prefix 𝑌)) + (♯‘(𝑆 substr ⟨𝑌, 𝑍⟩))) = 𝑍)
3111, 30eqtrd 2834 . . . . 5 ((𝑆 ∈ Word 𝐴𝑌 ∈ (0...𝑍) ∧ 𝑍 ∈ (0...(♯‘𝑆))) → (♯‘((𝑆 prefix 𝑌) ++ (𝑆 substr ⟨𝑌, 𝑍⟩))) = 𝑍)
3231oveq2d 6895 . . . 4 ((𝑆 ∈ Word 𝐴𝑌 ∈ (0...𝑍) ∧ 𝑍 ∈ (0...(♯‘𝑆))) → (0..^(♯‘((𝑆 prefix 𝑌) ++ (𝑆 substr ⟨𝑌, 𝑍⟩)))) = (0..^𝑍))
3332fneq2d 6194 . . 3 ((𝑆 ∈ Word 𝐴𝑌 ∈ (0...𝑍) ∧ 𝑍 ∈ (0...(♯‘𝑆))) → (((𝑆 prefix 𝑌) ++ (𝑆 substr ⟨𝑌, 𝑍⟩)) Fn (0..^(♯‘((𝑆 prefix 𝑌) ++ (𝑆 substr ⟨𝑌, 𝑍⟩)))) ↔ ((𝑆 prefix 𝑌) ++ (𝑆 substr ⟨𝑌, 𝑍⟩)) Fn (0..^𝑍)))
349, 33mpbid 224 . 2 ((𝑆 ∈ Word 𝐴𝑌 ∈ (0...𝑍) ∧ 𝑍 ∈ (0...(♯‘𝑆))) → ((𝑆 prefix 𝑌) ++ (𝑆 substr ⟨𝑌, 𝑍⟩)) Fn (0..^𝑍))
35 pfxfn 13723 . . 3 ((𝑆 ∈ Word 𝐴𝑍 ∈ (0...(♯‘𝑆))) → (𝑆 prefix 𝑍) Fn (0..^𝑍))
36353adant2 1162 . 2 ((𝑆 ∈ Word 𝐴𝑌 ∈ (0...𝑍) ∧ 𝑍 ∈ (0...(♯‘𝑆))) → (𝑆 prefix 𝑍) Fn (0..^𝑍))
37 simpr 478 . . . . 5 (((𝑆 ∈ Word 𝐴𝑌 ∈ (0...𝑍) ∧ 𝑍 ∈ (0...(♯‘𝑆))) ∧ 𝑥 ∈ (0..^𝑍)) → 𝑥 ∈ (0..^𝑍))
38213ad2ant2 1165 . . . . . 6 ((𝑆 ∈ Word 𝐴𝑌 ∈ (0...𝑍) ∧ 𝑍 ∈ (0...(♯‘𝑆))) → 𝑌 ∈ ℤ)
3938adantr 473 . . . . 5 (((𝑆 ∈ Word 𝐴𝑌 ∈ (0...𝑍) ∧ 𝑍 ∈ (0...(♯‘𝑆))) ∧ 𝑥 ∈ (0..^𝑍)) → 𝑌 ∈ ℤ)
40 fzospliti 12754 . . . . 5 ((𝑥 ∈ (0..^𝑍) ∧ 𝑌 ∈ ℤ) → (𝑥 ∈ (0..^𝑌) ∨ 𝑥 ∈ (𝑌..^𝑍)))
4137, 39, 40syl2anc 580 . . . 4 (((𝑆 ∈ Word 𝐴𝑌 ∈ (0...𝑍) ∧ 𝑍 ∈ (0...(♯‘𝑆))) ∧ 𝑥 ∈ (0..^𝑍)) → (𝑥 ∈ (0..^𝑌) ∨ 𝑥 ∈ (𝑌..^𝑍)))
422adantr 473 . . . . . . 7 (((𝑆 ∈ Word 𝐴𝑌 ∈ (0...𝑍) ∧ 𝑍 ∈ (0...(♯‘𝑆))) ∧ 𝑥 ∈ (0..^𝑌)) → (𝑆 prefix 𝑌) ∈ Word 𝐴)
434adantr 473 . . . . . . 7 (((𝑆 ∈ Word 𝐴𝑌 ∈ (0...𝑍) ∧ 𝑍 ∈ (0...(♯‘𝑆))) ∧ 𝑥 ∈ (0..^𝑌)) → (𝑆 substr ⟨𝑌, 𝑍⟩) ∈ Word 𝐴)
4418oveq2d 6895 . . . . . . . . 9 ((𝑆 ∈ Word 𝐴𝑌 ∈ (0...𝑍) ∧ 𝑍 ∈ (0...(♯‘𝑆))) → (0..^(♯‘(𝑆 prefix 𝑌))) = (0..^𝑌))
4544eleq2d 2865 . . . . . . . 8 ((𝑆 ∈ Word 𝐴𝑌 ∈ (0...𝑍) ∧ 𝑍 ∈ (0...(♯‘𝑆))) → (𝑥 ∈ (0..^(♯‘(𝑆 prefix 𝑌))) ↔ 𝑥 ∈ (0..^𝑌)))
4645biimpar 470 . . . . . . 7 (((𝑆 ∈ Word 𝐴𝑌 ∈ (0...𝑍) ∧ 𝑍 ∈ (0...(♯‘𝑆))) ∧ 𝑥 ∈ (0..^𝑌)) → 𝑥 ∈ (0..^(♯‘(𝑆 prefix 𝑌))))
47 ccatval1 13596 . . . . . . 7 (((𝑆 prefix 𝑌) ∈ Word 𝐴 ∧ (𝑆 substr ⟨𝑌, 𝑍⟩) ∈ Word 𝐴𝑥 ∈ (0..^(♯‘(𝑆 prefix 𝑌)))) → (((𝑆 prefix 𝑌) ++ (𝑆 substr ⟨𝑌, 𝑍⟩))‘𝑥) = ((𝑆 prefix 𝑌)‘𝑥))
4842, 43, 46, 47syl3anc 1491 . . . . . 6 (((𝑆 ∈ Word 𝐴𝑌 ∈ (0...𝑍) ∧ 𝑍 ∈ (0...(♯‘𝑆))) ∧ 𝑥 ∈ (0..^𝑌)) → (((𝑆 prefix 𝑌) ++ (𝑆 substr ⟨𝑌, 𝑍⟩))‘𝑥) = ((𝑆 prefix 𝑌)‘𝑥))
4912adantr 473 . . . . . . 7 (((𝑆 ∈ Word 𝐴𝑌 ∈ (0...𝑍) ∧ 𝑍 ∈ (0...(♯‘𝑆))) ∧ 𝑥 ∈ (0..^𝑌)) → 𝑆 ∈ Word 𝐴)
5016adantr 473 . . . . . . 7 (((𝑆 ∈ Word 𝐴𝑌 ∈ (0...𝑍) ∧ 𝑍 ∈ (0...(♯‘𝑆))) ∧ 𝑥 ∈ (0..^𝑌)) → 𝑌 ∈ (0...(♯‘𝑆)))
51 simpr 478 . . . . . . 7 (((𝑆 ∈ Word 𝐴𝑌 ∈ (0...𝑍) ∧ 𝑍 ∈ (0...(♯‘𝑆))) ∧ 𝑥 ∈ (0..^𝑌)) → 𝑥 ∈ (0..^𝑌))
52 pfxfv 13724 . . . . . . 7 ((𝑆 ∈ Word 𝐴𝑌 ∈ (0...(♯‘𝑆)) ∧ 𝑥 ∈ (0..^𝑌)) → ((𝑆 prefix 𝑌)‘𝑥) = (𝑆𝑥))
5349, 50, 51, 52syl3anc 1491 . . . . . 6 (((𝑆 ∈ Word 𝐴𝑌 ∈ (0...𝑍) ∧ 𝑍 ∈ (0...(♯‘𝑆))) ∧ 𝑥 ∈ (0..^𝑌)) → ((𝑆 prefix 𝑌)‘𝑥) = (𝑆𝑥))
5448, 53eqtrd 2834 . . . . 5 (((𝑆 ∈ Word 𝐴𝑌 ∈ (0...𝑍) ∧ 𝑍 ∈ (0...(♯‘𝑆))) ∧ 𝑥 ∈ (0..^𝑌)) → (((𝑆 prefix 𝑌) ++ (𝑆 substr ⟨𝑌, 𝑍⟩))‘𝑥) = (𝑆𝑥))
552adantr 473 . . . . . . 7 (((𝑆 ∈ Word 𝐴𝑌 ∈ (0...𝑍) ∧ 𝑍 ∈ (0...(♯‘𝑆))) ∧ 𝑥 ∈ (𝑌..^𝑍)) → (𝑆 prefix 𝑌) ∈ Word 𝐴)
564adantr 473 . . . . . . 7 (((𝑆 ∈ Word 𝐴𝑌 ∈ (0...𝑍) ∧ 𝑍 ∈ (0...(♯‘𝑆))) ∧ 𝑥 ∈ (𝑌..^𝑍)) → (𝑆 substr ⟨𝑌, 𝑍⟩) ∈ Word 𝐴)
5718, 30oveq12d 6897 . . . . . . . . 9 ((𝑆 ∈ Word 𝐴𝑌 ∈ (0...𝑍) ∧ 𝑍 ∈ (0...(♯‘𝑆))) → ((♯‘(𝑆 prefix 𝑌))..^((♯‘(𝑆 prefix 𝑌)) + (♯‘(𝑆 substr ⟨𝑌, 𝑍⟩)))) = (𝑌..^𝑍))
5857eleq2d 2865 . . . . . . . 8 ((𝑆 ∈ Word 𝐴𝑌 ∈ (0...𝑍) ∧ 𝑍 ∈ (0...(♯‘𝑆))) → (𝑥 ∈ ((♯‘(𝑆 prefix 𝑌))..^((♯‘(𝑆 prefix 𝑌)) + (♯‘(𝑆 substr ⟨𝑌, 𝑍⟩)))) ↔ 𝑥 ∈ (𝑌..^𝑍)))
5958biimpar 470 . . . . . . 7 (((𝑆 ∈ Word 𝐴𝑌 ∈ (0...𝑍) ∧ 𝑍 ∈ (0...(♯‘𝑆))) ∧ 𝑥 ∈ (𝑌..^𝑍)) → 𝑥 ∈ ((♯‘(𝑆 prefix 𝑌))..^((♯‘(𝑆 prefix 𝑌)) + (♯‘(𝑆 substr ⟨𝑌, 𝑍⟩)))))
60 ccatval2 13597 . . . . . . 7 (((𝑆 prefix 𝑌) ∈ Word 𝐴 ∧ (𝑆 substr ⟨𝑌, 𝑍⟩) ∈ Word 𝐴𝑥 ∈ ((♯‘(𝑆 prefix 𝑌))..^((♯‘(𝑆 prefix 𝑌)) + (♯‘(𝑆 substr ⟨𝑌, 𝑍⟩))))) → (((𝑆 prefix 𝑌) ++ (𝑆 substr ⟨𝑌, 𝑍⟩))‘𝑥) = ((𝑆 substr ⟨𝑌, 𝑍⟩)‘(𝑥 − (♯‘(𝑆 prefix 𝑌)))))
6155, 56, 59, 60syl3anc 1491 . . . . . 6 (((𝑆 ∈ Word 𝐴𝑌 ∈ (0...𝑍) ∧ 𝑍 ∈ (0...(♯‘𝑆))) ∧ 𝑥 ∈ (𝑌..^𝑍)) → (((𝑆 prefix 𝑌) ++ (𝑆 substr ⟨𝑌, 𝑍⟩))‘𝑥) = ((𝑆 substr ⟨𝑌, 𝑍⟩)‘(𝑥 − (♯‘(𝑆 prefix 𝑌)))))
6218oveq2d 6895 . . . . . . . . 9 ((𝑆 ∈ Word 𝐴𝑌 ∈ (0...𝑍) ∧ 𝑍 ∈ (0...(♯‘𝑆))) → (𝑥 − (♯‘(𝑆 prefix 𝑌))) = (𝑥𝑌))
6362adantr 473 . . . . . . . 8 (((𝑆 ∈ Word 𝐴𝑌 ∈ (0...𝑍) ∧ 𝑍 ∈ (0...(♯‘𝑆))) ∧ 𝑥 ∈ (𝑌..^𝑍)) → (𝑥 − (♯‘(𝑆 prefix 𝑌))) = (𝑥𝑌))
6438anim1i 609 . . . . . . . . . . 11 (((𝑆 ∈ Word 𝐴𝑌 ∈ (0...𝑍) ∧ 𝑍 ∈ (0...(♯‘𝑆))) ∧ 𝑥 ∈ (𝑌..^𝑍)) → (𝑌 ∈ ℤ ∧ 𝑥 ∈ (𝑌..^𝑍)))
6564ancomd 454 . . . . . . . . . 10 (((𝑆 ∈ Word 𝐴𝑌 ∈ (0...𝑍) ∧ 𝑍 ∈ (0...(♯‘𝑆))) ∧ 𝑥 ∈ (𝑌..^𝑍)) → (𝑥 ∈ (𝑌..^𝑍) ∧ 𝑌 ∈ ℤ))
66 fzosubel 12781 . . . . . . . . . 10 ((𝑥 ∈ (𝑌..^𝑍) ∧ 𝑌 ∈ ℤ) → (𝑥𝑌) ∈ ((𝑌𝑌)..^(𝑍𝑌)))
6765, 66syl 17 . . . . . . . . 9 (((𝑆 ∈ Word 𝐴𝑌 ∈ (0...𝑍) ∧ 𝑍 ∈ (0...(♯‘𝑆))) ∧ 𝑥 ∈ (𝑌..^𝑍)) → (𝑥𝑌) ∈ ((𝑌𝑌)..^(𝑍𝑌)))
6821zcnd 11772 . . . . . . . . . . . . . . 15 (𝑌 ∈ (0...𝑍) → 𝑌 ∈ ℂ)
6968subidd 10673 . . . . . . . . . . . . . 14 (𝑌 ∈ (0...𝑍) → (𝑌𝑌) = 0)
7069eqcomd 2806 . . . . . . . . . . . . 13 (𝑌 ∈ (0...𝑍) → 0 = (𝑌𝑌))
71703ad2ant2 1165 . . . . . . . . . . . 12 ((𝑆 ∈ Word 𝐴𝑌 ∈ (0...𝑍) ∧ 𝑍 ∈ (0...(♯‘𝑆))) → 0 = (𝑌𝑌))
7271oveq1d 6894 . . . . . . . . . . 11 ((𝑆 ∈ Word 𝐴𝑌 ∈ (0...𝑍) ∧ 𝑍 ∈ (0...(♯‘𝑆))) → (0..^(𝑍𝑌)) = ((𝑌𝑌)..^(𝑍𝑌)))
7372eleq2d 2865 . . . . . . . . . 10 ((𝑆 ∈ Word 𝐴𝑌 ∈ (0...𝑍) ∧ 𝑍 ∈ (0...(♯‘𝑆))) → ((𝑥𝑌) ∈ (0..^(𝑍𝑌)) ↔ (𝑥𝑌) ∈ ((𝑌𝑌)..^(𝑍𝑌))))
7473adantr 473 . . . . . . . . 9 (((𝑆 ∈ Word 𝐴𝑌 ∈ (0...𝑍) ∧ 𝑍 ∈ (0...(♯‘𝑆))) ∧ 𝑥 ∈ (𝑌..^𝑍)) → ((𝑥𝑌) ∈ (0..^(𝑍𝑌)) ↔ (𝑥𝑌) ∈ ((𝑌𝑌)..^(𝑍𝑌))))
7567, 74mpbird 249 . . . . . . . 8 (((𝑆 ∈ Word 𝐴𝑌 ∈ (0...𝑍) ∧ 𝑍 ∈ (0...(♯‘𝑆))) ∧ 𝑥 ∈ (𝑌..^𝑍)) → (𝑥𝑌) ∈ (0..^(𝑍𝑌)))
7663, 75eqeltrd 2879 . . . . . . 7 (((𝑆 ∈ Word 𝐴𝑌 ∈ (0...𝑍) ∧ 𝑍 ∈ (0...(♯‘𝑆))) ∧ 𝑥 ∈ (𝑌..^𝑍)) → (𝑥 − (♯‘(𝑆 prefix 𝑌))) ∈ (0..^(𝑍𝑌)))
77 swrdfv 13673 . . . . . . 7 (((𝑆 ∈ Word 𝐴𝑌 ∈ (0...𝑍) ∧ 𝑍 ∈ (0...(♯‘𝑆))) ∧ (𝑥 − (♯‘(𝑆 prefix 𝑌))) ∈ (0..^(𝑍𝑌))) → ((𝑆 substr ⟨𝑌, 𝑍⟩)‘(𝑥 − (♯‘(𝑆 prefix 𝑌)))) = (𝑆‘((𝑥 − (♯‘(𝑆 prefix 𝑌))) + 𝑌)))
7876, 77syldan 586 . . . . . 6 (((𝑆 ∈ Word 𝐴𝑌 ∈ (0...𝑍) ∧ 𝑍 ∈ (0...(♯‘𝑆))) ∧ 𝑥 ∈ (𝑌..^𝑍)) → ((𝑆 substr ⟨𝑌, 𝑍⟩)‘(𝑥 − (♯‘(𝑆 prefix 𝑌)))) = (𝑆‘((𝑥 − (♯‘(𝑆 prefix 𝑌))) + 𝑌)))
7963oveq1d 6894 . . . . . . . 8 (((𝑆 ∈ Word 𝐴𝑌 ∈ (0...𝑍) ∧ 𝑍 ∈ (0...(♯‘𝑆))) ∧ 𝑥 ∈ (𝑌..^𝑍)) → ((𝑥 − (♯‘(𝑆 prefix 𝑌))) + 𝑌) = ((𝑥𝑌) + 𝑌))
80 elfzoelz 12724 . . . . . . . . . . 11 (𝑥 ∈ (𝑌..^𝑍) → 𝑥 ∈ ℤ)
8180zcnd 11772 . . . . . . . . . 10 (𝑥 ∈ (𝑌..^𝑍) → 𝑥 ∈ ℂ)
8281adantl 474 . . . . . . . . 9 (((𝑆 ∈ Word 𝐴𝑌 ∈ (0...𝑍) ∧ 𝑍 ∈ (0...(♯‘𝑆))) ∧ 𝑥 ∈ (𝑌..^𝑍)) → 𝑥 ∈ ℂ)
8324adantr 473 . . . . . . . . 9 (((𝑆 ∈ Word 𝐴𝑌 ∈ (0...𝑍) ∧ 𝑍 ∈ (0...(♯‘𝑆))) ∧ 𝑥 ∈ (𝑌..^𝑍)) → 𝑌 ∈ ℂ)
8482, 83npcand 10689 . . . . . . . 8 (((𝑆 ∈ Word 𝐴𝑌 ∈ (0...𝑍) ∧ 𝑍 ∈ (0...(♯‘𝑆))) ∧ 𝑥 ∈ (𝑌..^𝑍)) → ((𝑥𝑌) + 𝑌) = 𝑥)
8579, 84eqtrd 2834 . . . . . . 7 (((𝑆 ∈ Word 𝐴𝑌 ∈ (0...𝑍) ∧ 𝑍 ∈ (0...(♯‘𝑆))) ∧ 𝑥 ∈ (𝑌..^𝑍)) → ((𝑥 − (♯‘(𝑆 prefix 𝑌))) + 𝑌) = 𝑥)
8685fveq2d 6416 . . . . . 6 (((𝑆 ∈ Word 𝐴𝑌 ∈ (0...𝑍) ∧ 𝑍 ∈ (0...(♯‘𝑆))) ∧ 𝑥 ∈ (𝑌..^𝑍)) → (𝑆‘((𝑥 − (♯‘(𝑆 prefix 𝑌))) + 𝑌)) = (𝑆𝑥))
8761, 78, 863eqtrd 2838 . . . . 5 (((𝑆 ∈ Word 𝐴𝑌 ∈ (0...𝑍) ∧ 𝑍 ∈ (0...(♯‘𝑆))) ∧ 𝑥 ∈ (𝑌..^𝑍)) → (((𝑆 prefix 𝑌) ++ (𝑆 substr ⟨𝑌, 𝑍⟩))‘𝑥) = (𝑆𝑥))
8854, 87jaodan 981 . . . 4 (((𝑆 ∈ Word 𝐴𝑌 ∈ (0...𝑍) ∧ 𝑍 ∈ (0...(♯‘𝑆))) ∧ (𝑥 ∈ (0..^𝑌) ∨ 𝑥 ∈ (𝑌..^𝑍))) → (((𝑆 prefix 𝑌) ++ (𝑆 substr ⟨𝑌, 𝑍⟩))‘𝑥) = (𝑆𝑥))
8941, 88syldan 586 . . 3 (((𝑆 ∈ Word 𝐴𝑌 ∈ (0...𝑍) ∧ 𝑍 ∈ (0...(♯‘𝑆))) ∧ 𝑥 ∈ (0..^𝑍)) → (((𝑆 prefix 𝑌) ++ (𝑆 substr ⟨𝑌, 𝑍⟩))‘𝑥) = (𝑆𝑥))
9012adantr 473 . . . 4 (((𝑆 ∈ Word 𝐴𝑌 ∈ (0...𝑍) ∧ 𝑍 ∈ (0...(♯‘𝑆))) ∧ 𝑥 ∈ (0..^𝑍)) → 𝑆 ∈ Word 𝐴)
91 simpl3 1247 . . . 4 (((𝑆 ∈ Word 𝐴𝑌 ∈ (0...𝑍) ∧ 𝑍 ∈ (0...(♯‘𝑆))) ∧ 𝑥 ∈ (0..^𝑍)) → 𝑍 ∈ (0...(♯‘𝑆)))
92 pfxfv 13724 . . . 4 ((𝑆 ∈ Word 𝐴𝑍 ∈ (0...(♯‘𝑆)) ∧ 𝑥 ∈ (0..^𝑍)) → ((𝑆 prefix 𝑍)‘𝑥) = (𝑆𝑥))
9390, 91, 37, 92syl3anc 1491 . . 3 (((𝑆 ∈ Word 𝐴𝑌 ∈ (0...𝑍) ∧ 𝑍 ∈ (0...(♯‘𝑆))) ∧ 𝑥 ∈ (0..^𝑍)) → ((𝑆 prefix 𝑍)‘𝑥) = (𝑆𝑥))
9489, 93eqtr4d 2837 . 2 (((𝑆 ∈ Word 𝐴𝑌 ∈ (0...𝑍) ∧ 𝑍 ∈ (0...(♯‘𝑆))) ∧ 𝑥 ∈ (0..^𝑍)) → (((𝑆 prefix 𝑌) ++ (𝑆 substr ⟨𝑌, 𝑍⟩))‘𝑥) = ((𝑆 prefix 𝑍)‘𝑥))
9534, 36, 94eqfnfvd 6541 1 ((𝑆 ∈ Word 𝐴𝑌 ∈ (0...𝑍) ∧ 𝑍 ∈ (0...(♯‘𝑆))) → ((𝑆 prefix 𝑌) ++ (𝑆 substr ⟨𝑌, 𝑍⟩)) = (𝑆 prefix 𝑍))
Colors of variables: wff setvar class
Syntax hints:  wi 4  wb 198  wa 385  wo 874  w3a 1108   = wceq 1653  wcel 2157  cop 4375   Fn wfn 6097  wf 6098  cfv 6102  (class class class)co 6879  cc 10223  0cc0 10225   + caddc 10228  cmin 10557  cz 11665  ...cfz 12579  ..^cfzo 12719  chash 13369  Word cword 13533   ++ cconcat 13589   substr csubstr 13663   prefix cpfx 13712
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1891  ax-4 1905  ax-5 2006  ax-6 2072  ax-7 2107  ax-8 2159  ax-9 2166  ax-10 2185  ax-11 2200  ax-12 2213  ax-13 2378  ax-ext 2778  ax-rep 4965  ax-sep 4976  ax-nul 4984  ax-pow 5036  ax-pr 5098  ax-un 7184  ax-cnex 10281  ax-resscn 10282  ax-1cn 10283  ax-icn 10284  ax-addcl 10285  ax-addrcl 10286  ax-mulcl 10287  ax-mulrcl 10288  ax-mulcom 10289  ax-addass 10290  ax-mulass 10291  ax-distr 10292  ax-i2m1 10293  ax-1ne0 10294  ax-1rid 10295  ax-rnegex 10296  ax-rrecex 10297  ax-cnre 10298  ax-pre-lttri 10299  ax-pre-lttrn 10300  ax-pre-ltadd 10301  ax-pre-mulgt0 10302
This theorem depends on definitions:  df-bi 199  df-an 386  df-or 875  df-3or 1109  df-3an 1110  df-tru 1657  df-ex 1876  df-nf 1880  df-sb 2065  df-mo 2592  df-eu 2610  df-clab 2787  df-cleq 2793  df-clel 2796  df-nfc 2931  df-ne 2973  df-nel 3076  df-ral 3095  df-rex 3096  df-reu 3097  df-rab 3099  df-v 3388  df-sbc 3635  df-csb 3730  df-dif 3773  df-un 3775  df-in 3777  df-ss 3784  df-pss 3786  df-nul 4117  df-if 4279  df-pw 4352  df-sn 4370  df-pr 4372  df-tp 4374  df-op 4376  df-uni 4630  df-int 4669  df-iun 4713  df-br 4845  df-opab 4907  df-mpt 4924  df-tr 4947  df-id 5221  df-eprel 5226  df-po 5234  df-so 5235  df-fr 5272  df-we 5274  df-xp 5319  df-rel 5320  df-cnv 5321  df-co 5322  df-dm 5323  df-rn 5324  df-res 5325  df-ima 5326  df-pred 5899  df-ord 5945  df-on 5946  df-lim 5947  df-suc 5948  df-iota 6065  df-fun 6104  df-fn 6105  df-f 6106  df-f1 6107  df-fo 6108  df-f1o 6109  df-fv 6110  df-riota 6840  df-ov 6882  df-oprab 6883  df-mpt2 6884  df-om 7301  df-1st 7402  df-2nd 7403  df-wrecs 7646  df-recs 7708  df-rdg 7746  df-1o 7800  df-oadd 7804  df-er 7983  df-en 8197  df-dom 8198  df-sdom 8199  df-fin 8200  df-card 9052  df-pnf 10366  df-mnf 10367  df-xr 10368  df-ltxr 10369  df-le 10370  df-sub 10559  df-neg 10560  df-nn 11314  df-n0 11580  df-z 11666  df-uz 11930  df-fz 12580  df-fzo 12720  df-hash 13370  df-word 13534  df-concat 13590  df-substr 13664  df-pfx 13713
This theorem is referenced by:  pfxcctswrd  13756  wrdeqs1cat  13772  splid  13827  splval2  13835  efgredleme  18469  efgredlemc  18471  efgcpbllemb  18482  frgpuplem  18499  wrdsplex  31134
  Copyright terms: Public domain W3C validator