Users' Mathboxes Mathbox for Alexander van der Vekens < Previous   Next >
Nearby theorems
Mirrors  >  Home  >  MPE Home  >  Th. List  >   Mathboxes  >  ccatpfx Structured version   Visualization version   GIF version

Theorem ccatpfx 40696
Description: Joining 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 40673 . . . . . 6 (𝑆 ∈ Word 𝐴 → (𝑆 prefix 𝑌) ∈ Word 𝐴)
213ad2ant1 1080 . . . . 5 ((𝑆 ∈ Word 𝐴𝑌 ∈ (0...𝑍) ∧ 𝑍 ∈ (0...(#‘𝑆))) → (𝑆 prefix 𝑌) ∈ Word 𝐴)
3 swrdcl 13352 . . . . . 6 (𝑆 ∈ Word 𝐴 → (𝑆 substr ⟨𝑌, 𝑍⟩) ∈ Word 𝐴)
433ad2ant1 1080 . . . . 5 ((𝑆 ∈ Word 𝐴𝑌 ∈ (0...𝑍) ∧ 𝑍 ∈ (0...(#‘𝑆))) → (𝑆 substr ⟨𝑌, 𝑍⟩) ∈ Word 𝐴)
5 ccatcl 13293 . . . . 5 (((𝑆 prefix 𝑌) ∈ Word 𝐴 ∧ (𝑆 substr ⟨𝑌, 𝑍⟩) ∈ Word 𝐴) → ((𝑆 prefix 𝑌) ++ (𝑆 substr ⟨𝑌, 𝑍⟩)) ∈ Word 𝐴)
62, 4, 5syl2anc 692 . . . 4 ((𝑆 ∈ Word 𝐴𝑌 ∈ (0...𝑍) ∧ 𝑍 ∈ (0...(#‘𝑆))) → ((𝑆 prefix 𝑌) ++ (𝑆 substr ⟨𝑌, 𝑍⟩)) ∈ Word 𝐴)
7 wrdf 13244 . . . 4 (((𝑆 prefix 𝑌) ++ (𝑆 substr ⟨𝑌, 𝑍⟩)) ∈ Word 𝐴 → ((𝑆 prefix 𝑌) ++ (𝑆 substr ⟨𝑌, 𝑍⟩)):(0..^(#‘((𝑆 prefix 𝑌) ++ (𝑆 substr ⟨𝑌, 𝑍⟩))))⟶𝐴)
8 ffn 6004 . . . 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 13294 . . . . . . 7 (((𝑆 prefix 𝑌) ∈ Word 𝐴 ∧ (𝑆 substr ⟨𝑌, 𝑍⟩) ∈ Word 𝐴) → (#‘((𝑆 prefix 𝑌) ++ (𝑆 substr ⟨𝑌, 𝑍⟩))) = ((#‘(𝑆 prefix 𝑌)) + (#‘(𝑆 substr ⟨𝑌, 𝑍⟩))))
112, 4, 10syl2anc 692 . . . . . 6 ((𝑆 ∈ Word 𝐴𝑌 ∈ (0...𝑍) ∧ 𝑍 ∈ (0...(#‘𝑆))) → (#‘((𝑆 prefix 𝑌) ++ (𝑆 substr ⟨𝑌, 𝑍⟩))) = ((#‘(𝑆 prefix 𝑌)) + (#‘(𝑆 substr ⟨𝑌, 𝑍⟩))))
12 simp1 1059 . . . . . . . . 9 ((𝑆 ∈ Word 𝐴𝑌 ∈ (0...𝑍) ∧ 𝑍 ∈ (0...(#‘𝑆))) → 𝑆 ∈ Word 𝐴)
13 fzass4 12318 . . . . . . . . . . . 12 ((𝑌 ∈ (0...(#‘𝑆)) ∧ 𝑍 ∈ (𝑌...(#‘𝑆))) ↔ (𝑌 ∈ (0...𝑍) ∧ 𝑍 ∈ (0...(#‘𝑆))))
1413biimpri 218 . . . . . . . . . . 11 ((𝑌 ∈ (0...𝑍) ∧ 𝑍 ∈ (0...(#‘𝑆))) → (𝑌 ∈ (0...(#‘𝑆)) ∧ 𝑍 ∈ (𝑌...(#‘𝑆))))
1514simpld 475 . . . . . . . . . 10 ((𝑌 ∈ (0...𝑍) ∧ 𝑍 ∈ (0...(#‘𝑆))) → 𝑌 ∈ (0...(#‘𝑆)))
16153adant1 1077 . . . . . . . . 9 ((𝑆 ∈ Word 𝐴𝑌 ∈ (0...𝑍) ∧ 𝑍 ∈ (0...(#‘𝑆))) → 𝑌 ∈ (0...(#‘𝑆)))
17 pfxlen 40678 . . . . . . . . 9 ((𝑆 ∈ Word 𝐴𝑌 ∈ (0...(#‘𝑆))) → (#‘(𝑆 prefix 𝑌)) = 𝑌)
1812, 16, 17syl2anc 692 . . . . . . . 8 ((𝑆 ∈ Word 𝐴𝑌 ∈ (0...𝑍) ∧ 𝑍 ∈ (0...(#‘𝑆))) → (#‘(𝑆 prefix 𝑌)) = 𝑌)
19 swrdlen 13356 . . . . . . . 8 ((𝑆 ∈ Word 𝐴𝑌 ∈ (0...𝑍) ∧ 𝑍 ∈ (0...(#‘𝑆))) → (#‘(𝑆 substr ⟨𝑌, 𝑍⟩)) = (𝑍𝑌))
2018, 19oveq12d 6623 . . . . . . 7 ((𝑆 ∈ Word 𝐴𝑌 ∈ (0...𝑍) ∧ 𝑍 ∈ (0...(#‘𝑆))) → ((#‘(𝑆 prefix 𝑌)) + (#‘(𝑆 substr ⟨𝑌, 𝑍⟩))) = (𝑌 + (𝑍𝑌)))
21 elfzelz 12281 . . . . . . . . . . 11 (𝑌 ∈ (0...𝑍) → 𝑌 ∈ ℤ)
2221ad2antrl 763 . . . . . . . . . 10 ((𝑆 ∈ Word 𝐴 ∧ (𝑌 ∈ (0...𝑍) ∧ 𝑍 ∈ (0...(#‘𝑆)))) → 𝑌 ∈ ℤ)
2322zcnd 11427 . . . . . . . . 9 ((𝑆 ∈ Word 𝐴 ∧ (𝑌 ∈ (0...𝑍) ∧ 𝑍 ∈ (0...(#‘𝑆)))) → 𝑌 ∈ ℂ)
24233impb 1257 . . . . . . . 8 ((𝑆 ∈ Word 𝐴𝑌 ∈ (0...𝑍) ∧ 𝑍 ∈ (0...(#‘𝑆))) → 𝑌 ∈ ℂ)
25 elfzelz 12281 . . . . . . . . . . 11 (𝑍 ∈ (0...(#‘𝑆)) → 𝑍 ∈ ℤ)
2625ad2antll 764 . . . . . . . . . 10 ((𝑆 ∈ Word 𝐴 ∧ (𝑌 ∈ (0...𝑍) ∧ 𝑍 ∈ (0...(#‘𝑆)))) → 𝑍 ∈ ℤ)
2726zcnd 11427 . . . . . . . . 9 ((𝑆 ∈ Word 𝐴 ∧ (𝑌 ∈ (0...𝑍) ∧ 𝑍 ∈ (0...(#‘𝑆)))) → 𝑍 ∈ ℂ)
28273impb 1257 . . . . . . . 8 ((𝑆 ∈ Word 𝐴𝑌 ∈ (0...𝑍) ∧ 𝑍 ∈ (0...(#‘𝑆))) → 𝑍 ∈ ℂ)
2924, 28pncan3d 10340 . . . . . . 7 ((𝑆 ∈ Word 𝐴𝑌 ∈ (0...𝑍) ∧ 𝑍 ∈ (0...(#‘𝑆))) → (𝑌 + (𝑍𝑌)) = 𝑍)
3020, 29eqtrd 2660 . . . . . 6 ((𝑆 ∈ Word 𝐴𝑌 ∈ (0...𝑍) ∧ 𝑍 ∈ (0...(#‘𝑆))) → ((#‘(𝑆 prefix 𝑌)) + (#‘(𝑆 substr ⟨𝑌, 𝑍⟩))) = 𝑍)
3111, 30eqtrd 2660 . . . . 5 ((𝑆 ∈ Word 𝐴𝑌 ∈ (0...𝑍) ∧ 𝑍 ∈ (0...(#‘𝑆))) → (#‘((𝑆 prefix 𝑌) ++ (𝑆 substr ⟨𝑌, 𝑍⟩))) = 𝑍)
3231oveq2d 6621 . . . 4 ((𝑆 ∈ Word 𝐴𝑌 ∈ (0...𝑍) ∧ 𝑍 ∈ (0...(#‘𝑆))) → (0..^(#‘((𝑆 prefix 𝑌) ++ (𝑆 substr ⟨𝑌, 𝑍⟩)))) = (0..^𝑍))
3332fneq2d 5942 . . 3 ((𝑆 ∈ Word 𝐴𝑌 ∈ (0...𝑍) ∧ 𝑍 ∈ (0...(#‘𝑆))) → (((𝑆 prefix 𝑌) ++ (𝑆 substr ⟨𝑌, 𝑍⟩)) Fn (0..^(#‘((𝑆 prefix 𝑌) ++ (𝑆 substr ⟨𝑌, 𝑍⟩)))) ↔ ((𝑆 prefix 𝑌) ++ (𝑆 substr ⟨𝑌, 𝑍⟩)) Fn (0..^𝑍)))
349, 33mpbid 222 . 2 ((𝑆 ∈ Word 𝐴𝑌 ∈ (0...𝑍) ∧ 𝑍 ∈ (0...(#‘𝑆))) → ((𝑆 prefix 𝑌) ++ (𝑆 substr ⟨𝑌, 𝑍⟩)) Fn (0..^𝑍))
35 pfxfn 40677 . . 3 ((𝑆 ∈ Word 𝐴𝑍 ∈ (0...(#‘𝑆))) → (𝑆 prefix 𝑍) Fn (0..^𝑍))
36353adant2 1078 . 2 ((𝑆 ∈ Word 𝐴𝑌 ∈ (0...𝑍) ∧ 𝑍 ∈ (0...(#‘𝑆))) → (𝑆 prefix 𝑍) Fn (0..^𝑍))
37 simpr 477 . . . . 5 (((𝑆 ∈ Word 𝐴𝑌 ∈ (0...𝑍) ∧ 𝑍 ∈ (0...(#‘𝑆))) ∧ 𝑥 ∈ (0..^𝑍)) → 𝑥 ∈ (0..^𝑍))
38213ad2ant2 1081 . . . . . 6 ((𝑆 ∈ Word 𝐴𝑌 ∈ (0...𝑍) ∧ 𝑍 ∈ (0...(#‘𝑆))) → 𝑌 ∈ ℤ)
3938adantr 481 . . . . 5 (((𝑆 ∈ Word 𝐴𝑌 ∈ (0...𝑍) ∧ 𝑍 ∈ (0...(#‘𝑆))) ∧ 𝑥 ∈ (0..^𝑍)) → 𝑌 ∈ ℤ)
40 fzospliti 12438 . . . . 5 ((𝑥 ∈ (0..^𝑍) ∧ 𝑌 ∈ ℤ) → (𝑥 ∈ (0..^𝑌) ∨ 𝑥 ∈ (𝑌..^𝑍)))
4137, 39, 40syl2anc 692 . . . 4 (((𝑆 ∈ Word 𝐴𝑌 ∈ (0...𝑍) ∧ 𝑍 ∈ (0...(#‘𝑆))) ∧ 𝑥 ∈ (0..^𝑍)) → (𝑥 ∈ (0..^𝑌) ∨ 𝑥 ∈ (𝑌..^𝑍)))
422adantr 481 . . . . . . 7 (((𝑆 ∈ Word 𝐴𝑌 ∈ (0...𝑍) ∧ 𝑍 ∈ (0...(#‘𝑆))) ∧ 𝑥 ∈ (0..^𝑌)) → (𝑆 prefix 𝑌) ∈ Word 𝐴)
434adantr 481 . . . . . . 7 (((𝑆 ∈ Word 𝐴𝑌 ∈ (0...𝑍) ∧ 𝑍 ∈ (0...(#‘𝑆))) ∧ 𝑥 ∈ (0..^𝑌)) → (𝑆 substr ⟨𝑌, 𝑍⟩) ∈ Word 𝐴)
4418oveq2d 6621 . . . . . . . . 9 ((𝑆 ∈ Word 𝐴𝑌 ∈ (0...𝑍) ∧ 𝑍 ∈ (0...(#‘𝑆))) → (0..^(#‘(𝑆 prefix 𝑌))) = (0..^𝑌))
4544eleq2d 2689 . . . . . . . 8 ((𝑆 ∈ Word 𝐴𝑌 ∈ (0...𝑍) ∧ 𝑍 ∈ (0...(#‘𝑆))) → (𝑥 ∈ (0..^(#‘(𝑆 prefix 𝑌))) ↔ 𝑥 ∈ (0..^𝑌)))
4645biimpar 502 . . . . . . 7 (((𝑆 ∈ Word 𝐴𝑌 ∈ (0...𝑍) ∧ 𝑍 ∈ (0...(#‘𝑆))) ∧ 𝑥 ∈ (0..^𝑌)) → 𝑥 ∈ (0..^(#‘(𝑆 prefix 𝑌))))
47 ccatval1 13295 . . . . . . 7 (((𝑆 prefix 𝑌) ∈ Word 𝐴 ∧ (𝑆 substr ⟨𝑌, 𝑍⟩) ∈ Word 𝐴𝑥 ∈ (0..^(#‘(𝑆 prefix 𝑌)))) → (((𝑆 prefix 𝑌) ++ (𝑆 substr ⟨𝑌, 𝑍⟩))‘𝑥) = ((𝑆 prefix 𝑌)‘𝑥))
4842, 43, 46, 47syl3anc 1323 . . . . . 6 (((𝑆 ∈ Word 𝐴𝑌 ∈ (0...𝑍) ∧ 𝑍 ∈ (0...(#‘𝑆))) ∧ 𝑥 ∈ (0..^𝑌)) → (((𝑆 prefix 𝑌) ++ (𝑆 substr ⟨𝑌, 𝑍⟩))‘𝑥) = ((𝑆 prefix 𝑌)‘𝑥))
4912adantr 481 . . . . . . 7 (((𝑆 ∈ Word 𝐴𝑌 ∈ (0...𝑍) ∧ 𝑍 ∈ (0...(#‘𝑆))) ∧ 𝑥 ∈ (0..^𝑌)) → 𝑆 ∈ Word 𝐴)
5016adantr 481 . . . . . . 7 (((𝑆 ∈ Word 𝐴𝑌 ∈ (0...𝑍) ∧ 𝑍 ∈ (0...(#‘𝑆))) ∧ 𝑥 ∈ (0..^𝑌)) → 𝑌 ∈ (0...(#‘𝑆)))
51 simpr 477 . . . . . . 7 (((𝑆 ∈ Word 𝐴𝑌 ∈ (0...𝑍) ∧ 𝑍 ∈ (0...(#‘𝑆))) ∧ 𝑥 ∈ (0..^𝑌)) → 𝑥 ∈ (0..^𝑌))
52 pfxfv 40686 . . . . . . 7 ((𝑆 ∈ Word 𝐴𝑌 ∈ (0...(#‘𝑆)) ∧ 𝑥 ∈ (0..^𝑌)) → ((𝑆 prefix 𝑌)‘𝑥) = (𝑆𝑥))
5349, 50, 51, 52syl3anc 1323 . . . . . 6 (((𝑆 ∈ Word 𝐴𝑌 ∈ (0...𝑍) ∧ 𝑍 ∈ (0...(#‘𝑆))) ∧ 𝑥 ∈ (0..^𝑌)) → ((𝑆 prefix 𝑌)‘𝑥) = (𝑆𝑥))
5448, 53eqtrd 2660 . . . . 5 (((𝑆 ∈ Word 𝐴𝑌 ∈ (0...𝑍) ∧ 𝑍 ∈ (0...(#‘𝑆))) ∧ 𝑥 ∈ (0..^𝑌)) → (((𝑆 prefix 𝑌) ++ (𝑆 substr ⟨𝑌, 𝑍⟩))‘𝑥) = (𝑆𝑥))
552adantr 481 . . . . . . 7 (((𝑆 ∈ Word 𝐴𝑌 ∈ (0...𝑍) ∧ 𝑍 ∈ (0...(#‘𝑆))) ∧ 𝑥 ∈ (𝑌..^𝑍)) → (𝑆 prefix 𝑌) ∈ Word 𝐴)
564adantr 481 . . . . . . 7 (((𝑆 ∈ Word 𝐴𝑌 ∈ (0...𝑍) ∧ 𝑍 ∈ (0...(#‘𝑆))) ∧ 𝑥 ∈ (𝑌..^𝑍)) → (𝑆 substr ⟨𝑌, 𝑍⟩) ∈ Word 𝐴)
5718, 30oveq12d 6623 . . . . . . . . 9 ((𝑆 ∈ Word 𝐴𝑌 ∈ (0...𝑍) ∧ 𝑍 ∈ (0...(#‘𝑆))) → ((#‘(𝑆 prefix 𝑌))..^((#‘(𝑆 prefix 𝑌)) + (#‘(𝑆 substr ⟨𝑌, 𝑍⟩)))) = (𝑌..^𝑍))
5857eleq2d 2689 . . . . . . . 8 ((𝑆 ∈ Word 𝐴𝑌 ∈ (0...𝑍) ∧ 𝑍 ∈ (0...(#‘𝑆))) → (𝑥 ∈ ((#‘(𝑆 prefix 𝑌))..^((#‘(𝑆 prefix 𝑌)) + (#‘(𝑆 substr ⟨𝑌, 𝑍⟩)))) ↔ 𝑥 ∈ (𝑌..^𝑍)))
5958biimpar 502 . . . . . . 7 (((𝑆 ∈ Word 𝐴𝑌 ∈ (0...𝑍) ∧ 𝑍 ∈ (0...(#‘𝑆))) ∧ 𝑥 ∈ (𝑌..^𝑍)) → 𝑥 ∈ ((#‘(𝑆 prefix 𝑌))..^((#‘(𝑆 prefix 𝑌)) + (#‘(𝑆 substr ⟨𝑌, 𝑍⟩)))))
60 ccatval2 13296 . . . . . . 7 (((𝑆 prefix 𝑌) ∈ Word 𝐴 ∧ (𝑆 substr ⟨𝑌, 𝑍⟩) ∈ Word 𝐴𝑥 ∈ ((#‘(𝑆 prefix 𝑌))..^((#‘(𝑆 prefix 𝑌)) + (#‘(𝑆 substr ⟨𝑌, 𝑍⟩))))) → (((𝑆 prefix 𝑌) ++ (𝑆 substr ⟨𝑌, 𝑍⟩))‘𝑥) = ((𝑆 substr ⟨𝑌, 𝑍⟩)‘(𝑥 − (#‘(𝑆 prefix 𝑌)))))
6155, 56, 59, 60syl3anc 1323 . . . . . 6 (((𝑆 ∈ Word 𝐴𝑌 ∈ (0...𝑍) ∧ 𝑍 ∈ (0...(#‘𝑆))) ∧ 𝑥 ∈ (𝑌..^𝑍)) → (((𝑆 prefix 𝑌) ++ (𝑆 substr ⟨𝑌, 𝑍⟩))‘𝑥) = ((𝑆 substr ⟨𝑌, 𝑍⟩)‘(𝑥 − (#‘(𝑆 prefix 𝑌)))))
6218oveq2d 6621 . . . . . . . . 9 ((𝑆 ∈ Word 𝐴𝑌 ∈ (0...𝑍) ∧ 𝑍 ∈ (0...(#‘𝑆))) → (𝑥 − (#‘(𝑆 prefix 𝑌))) = (𝑥𝑌))
6362adantr 481 . . . . . . . 8 (((𝑆 ∈ Word 𝐴𝑌 ∈ (0...𝑍) ∧ 𝑍 ∈ (0...(#‘𝑆))) ∧ 𝑥 ∈ (𝑌..^𝑍)) → (𝑥 − (#‘(𝑆 prefix 𝑌))) = (𝑥𝑌))
6438anim1i 591 . . . . . . . . . . 11 (((𝑆 ∈ Word 𝐴𝑌 ∈ (0...𝑍) ∧ 𝑍 ∈ (0...(#‘𝑆))) ∧ 𝑥 ∈ (𝑌..^𝑍)) → (𝑌 ∈ ℤ ∧ 𝑥 ∈ (𝑌..^𝑍)))
6564ancomd 467 . . . . . . . . . 10 (((𝑆 ∈ Word 𝐴𝑌 ∈ (0...𝑍) ∧ 𝑍 ∈ (0...(#‘𝑆))) ∧ 𝑥 ∈ (𝑌..^𝑍)) → (𝑥 ∈ (𝑌..^𝑍) ∧ 𝑌 ∈ ℤ))
66 fzosubel 12464 . . . . . . . . . 10 ((𝑥 ∈ (𝑌..^𝑍) ∧ 𝑌 ∈ ℤ) → (𝑥𝑌) ∈ ((𝑌𝑌)..^(𝑍𝑌)))
6765, 66syl 17 . . . . . . . . 9 (((𝑆 ∈ Word 𝐴𝑌 ∈ (0...𝑍) ∧ 𝑍 ∈ (0...(#‘𝑆))) ∧ 𝑥 ∈ (𝑌..^𝑍)) → (𝑥𝑌) ∈ ((𝑌𝑌)..^(𝑍𝑌)))
6821zcnd 11427 . . . . . . . . . . . . . . 15 (𝑌 ∈ (0...𝑍) → 𝑌 ∈ ℂ)
6968subidd 10325 . . . . . . . . . . . . . 14 (𝑌 ∈ (0...𝑍) → (𝑌𝑌) = 0)
7069eqcomd 2632 . . . . . . . . . . . . 13 (𝑌 ∈ (0...𝑍) → 0 = (𝑌𝑌))
71703ad2ant2 1081 . . . . . . . . . . . 12 ((𝑆 ∈ Word 𝐴𝑌 ∈ (0...𝑍) ∧ 𝑍 ∈ (0...(#‘𝑆))) → 0 = (𝑌𝑌))
7271oveq1d 6620 . . . . . . . . . . 11 ((𝑆 ∈ Word 𝐴𝑌 ∈ (0...𝑍) ∧ 𝑍 ∈ (0...(#‘𝑆))) → (0..^(𝑍𝑌)) = ((𝑌𝑌)..^(𝑍𝑌)))
7372eleq2d 2689 . . . . . . . . . 10 ((𝑆 ∈ Word 𝐴𝑌 ∈ (0...𝑍) ∧ 𝑍 ∈ (0...(#‘𝑆))) → ((𝑥𝑌) ∈ (0..^(𝑍𝑌)) ↔ (𝑥𝑌) ∈ ((𝑌𝑌)..^(𝑍𝑌))))
7473adantr 481 . . . . . . . . 9 (((𝑆 ∈ Word 𝐴𝑌 ∈ (0...𝑍) ∧ 𝑍 ∈ (0...(#‘𝑆))) ∧ 𝑥 ∈ (𝑌..^𝑍)) → ((𝑥𝑌) ∈ (0..^(𝑍𝑌)) ↔ (𝑥𝑌) ∈ ((𝑌𝑌)..^(𝑍𝑌))))
7567, 74mpbird 247 . . . . . . . 8 (((𝑆 ∈ Word 𝐴𝑌 ∈ (0...𝑍) ∧ 𝑍 ∈ (0...(#‘𝑆))) ∧ 𝑥 ∈ (𝑌..^𝑍)) → (𝑥𝑌) ∈ (0..^(𝑍𝑌)))
7663, 75eqeltrd 2704 . . . . . . 7 (((𝑆 ∈ Word 𝐴𝑌 ∈ (0...𝑍) ∧ 𝑍 ∈ (0...(#‘𝑆))) ∧ 𝑥 ∈ (𝑌..^𝑍)) → (𝑥 − (#‘(𝑆 prefix 𝑌))) ∈ (0..^(𝑍𝑌)))
77 swrdfv 13357 . . . . . . 7 (((𝑆 ∈ Word 𝐴𝑌 ∈ (0...𝑍) ∧ 𝑍 ∈ (0...(#‘𝑆))) ∧ (𝑥 − (#‘(𝑆 prefix 𝑌))) ∈ (0..^(𝑍𝑌))) → ((𝑆 substr ⟨𝑌, 𝑍⟩)‘(𝑥 − (#‘(𝑆 prefix 𝑌)))) = (𝑆‘((𝑥 − (#‘(𝑆 prefix 𝑌))) + 𝑌)))
7876, 77syldan 487 . . . . . 6 (((𝑆 ∈ Word 𝐴𝑌 ∈ (0...𝑍) ∧ 𝑍 ∈ (0...(#‘𝑆))) ∧ 𝑥 ∈ (𝑌..^𝑍)) → ((𝑆 substr ⟨𝑌, 𝑍⟩)‘(𝑥 − (#‘(𝑆 prefix 𝑌)))) = (𝑆‘((𝑥 − (#‘(𝑆 prefix 𝑌))) + 𝑌)))
7963oveq1d 6620 . . . . . . . 8 (((𝑆 ∈ Word 𝐴𝑌 ∈ (0...𝑍) ∧ 𝑍 ∈ (0...(#‘𝑆))) ∧ 𝑥 ∈ (𝑌..^𝑍)) → ((𝑥 − (#‘(𝑆 prefix 𝑌))) + 𝑌) = ((𝑥𝑌) + 𝑌))
80 elfzoelz 12408 . . . . . . . . . . 11 (𝑥 ∈ (𝑌..^𝑍) → 𝑥 ∈ ℤ)
8180zcnd 11427 . . . . . . . . . 10 (𝑥 ∈ (𝑌..^𝑍) → 𝑥 ∈ ℂ)
8281adantl 482 . . . . . . . . 9 (((𝑆 ∈ Word 𝐴𝑌 ∈ (0...𝑍) ∧ 𝑍 ∈ (0...(#‘𝑆))) ∧ 𝑥 ∈ (𝑌..^𝑍)) → 𝑥 ∈ ℂ)
8324adantr 481 . . . . . . . . 9 (((𝑆 ∈ Word 𝐴𝑌 ∈ (0...𝑍) ∧ 𝑍 ∈ (0...(#‘𝑆))) ∧ 𝑥 ∈ (𝑌..^𝑍)) → 𝑌 ∈ ℂ)
8482, 83npcand 10341 . . . . . . . 8 (((𝑆 ∈ Word 𝐴𝑌 ∈ (0...𝑍) ∧ 𝑍 ∈ (0...(#‘𝑆))) ∧ 𝑥 ∈ (𝑌..^𝑍)) → ((𝑥𝑌) + 𝑌) = 𝑥)
8579, 84eqtrd 2660 . . . . . . 7 (((𝑆 ∈ Word 𝐴𝑌 ∈ (0...𝑍) ∧ 𝑍 ∈ (0...(#‘𝑆))) ∧ 𝑥 ∈ (𝑌..^𝑍)) → ((𝑥 − (#‘(𝑆 prefix 𝑌))) + 𝑌) = 𝑥)
8685fveq2d 6154 . . . . . 6 (((𝑆 ∈ Word 𝐴𝑌 ∈ (0...𝑍) ∧ 𝑍 ∈ (0...(#‘𝑆))) ∧ 𝑥 ∈ (𝑌..^𝑍)) → (𝑆‘((𝑥 − (#‘(𝑆 prefix 𝑌))) + 𝑌)) = (𝑆𝑥))
8761, 78, 863eqtrd 2664 . . . . 5 (((𝑆 ∈ Word 𝐴𝑌 ∈ (0...𝑍) ∧ 𝑍 ∈ (0...(#‘𝑆))) ∧ 𝑥 ∈ (𝑌..^𝑍)) → (((𝑆 prefix 𝑌) ++ (𝑆 substr ⟨𝑌, 𝑍⟩))‘𝑥) = (𝑆𝑥))
8854, 87jaodan 825 . . . 4 (((𝑆 ∈ Word 𝐴𝑌 ∈ (0...𝑍) ∧ 𝑍 ∈ (0...(#‘𝑆))) ∧ (𝑥 ∈ (0..^𝑌) ∨ 𝑥 ∈ (𝑌..^𝑍))) → (((𝑆 prefix 𝑌) ++ (𝑆 substr ⟨𝑌, 𝑍⟩))‘𝑥) = (𝑆𝑥))
8941, 88syldan 487 . . 3 (((𝑆 ∈ Word 𝐴𝑌 ∈ (0...𝑍) ∧ 𝑍 ∈ (0...(#‘𝑆))) ∧ 𝑥 ∈ (0..^𝑍)) → (((𝑆 prefix 𝑌) ++ (𝑆 substr ⟨𝑌, 𝑍⟩))‘𝑥) = (𝑆𝑥))
9012adantr 481 . . . 4 (((𝑆 ∈ Word 𝐴𝑌 ∈ (0...𝑍) ∧ 𝑍 ∈ (0...(#‘𝑆))) ∧ 𝑥 ∈ (0..^𝑍)) → 𝑆 ∈ Word 𝐴)
91 simpl3 1064 . . . 4 (((𝑆 ∈ Word 𝐴𝑌 ∈ (0...𝑍) ∧ 𝑍 ∈ (0...(#‘𝑆))) ∧ 𝑥 ∈ (0..^𝑍)) → 𝑍 ∈ (0...(#‘𝑆)))
92 pfxfv 40686 . . . 4 ((𝑆 ∈ Word 𝐴𝑍 ∈ (0...(#‘𝑆)) ∧ 𝑥 ∈ (0..^𝑍)) → ((𝑆 prefix 𝑍)‘𝑥) = (𝑆𝑥))
9390, 91, 37, 92syl3anc 1323 . . 3 (((𝑆 ∈ Word 𝐴𝑌 ∈ (0...𝑍) ∧ 𝑍 ∈ (0...(#‘𝑆))) ∧ 𝑥 ∈ (0..^𝑍)) → ((𝑆 prefix 𝑍)‘𝑥) = (𝑆𝑥))
9489, 93eqtr4d 2663 . 2 (((𝑆 ∈ Word 𝐴𝑌 ∈ (0...𝑍) ∧ 𝑍 ∈ (0...(#‘𝑆))) ∧ 𝑥 ∈ (0..^𝑍)) → (((𝑆 prefix 𝑌) ++ (𝑆 substr ⟨𝑌, 𝑍⟩))‘𝑥) = ((𝑆 prefix 𝑍)‘𝑥))
9534, 36, 94eqfnfvd 6271 1 ((𝑆 ∈ Word 𝐴𝑌 ∈ (0...𝑍) ∧ 𝑍 ∈ (0...(#‘𝑆))) → ((𝑆 prefix 𝑌) ++ (𝑆 substr ⟨𝑌, 𝑍⟩)) = (𝑆 prefix 𝑍))
Colors of variables: wff setvar class
Syntax hints:  wi 4  wb 196  wo 383  wa 384  w3a 1036   = wceq 1480  wcel 1992  cop 4159   Fn wfn 5845  wf 5846  cfv 5850  (class class class)co 6605  cc 9879  0cc0 9881   + caddc 9884  cmin 10211  cz 11322  ...cfz 12265  ..^cfzo 12403  #chash 13054  Word cword 13225   ++ cconcat 13227   substr csubstr 13229   prefix cpfx 40668
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1719  ax-4 1734  ax-5 1841  ax-6 1890  ax-7 1937  ax-8 1994  ax-9 2001  ax-10 2021  ax-11 2036  ax-12 2049  ax-13 2250  ax-ext 2606  ax-rep 4736  ax-sep 4746  ax-nul 4754  ax-pow 4808  ax-pr 4872  ax-un 6903  ax-cnex 9937  ax-resscn 9938  ax-1cn 9939  ax-icn 9940  ax-addcl 9941  ax-addrcl 9942  ax-mulcl 9943  ax-mulrcl 9944  ax-mulcom 9945  ax-addass 9946  ax-mulass 9947  ax-distr 9948  ax-i2m1 9949  ax-1ne0 9950  ax-1rid 9951  ax-rnegex 9952  ax-rrecex 9953  ax-cnre 9954  ax-pre-lttri 9955  ax-pre-lttrn 9956  ax-pre-ltadd 9957  ax-pre-mulgt0 9958
This theorem depends on definitions:  df-bi 197  df-or 385  df-an 386  df-3or 1037  df-3an 1038  df-tru 1483  df-ex 1702  df-nf 1707  df-sb 1883  df-eu 2478  df-mo 2479  df-clab 2613  df-cleq 2619  df-clel 2622  df-nfc 2756  df-ne 2797  df-nel 2900  df-ral 2917  df-rex 2918  df-reu 2919  df-rab 2921  df-v 3193  df-sbc 3423  df-csb 3520  df-dif 3563  df-un 3565  df-in 3567  df-ss 3574  df-pss 3576  df-nul 3897  df-if 4064  df-pw 4137  df-sn 4154  df-pr 4156  df-tp 4158  df-op 4160  df-uni 4408  df-int 4446  df-iun 4492  df-br 4619  df-opab 4679  df-mpt 4680  df-tr 4718  df-eprel 4990  df-id 4994  df-po 5000  df-so 5001  df-fr 5038  df-we 5040  df-xp 5085  df-rel 5086  df-cnv 5087  df-co 5088  df-dm 5089  df-rn 5090  df-res 5091  df-ima 5092  df-pred 5642  df-ord 5688  df-on 5689  df-lim 5690  df-suc 5691  df-iota 5813  df-fun 5852  df-fn 5853  df-f 5854  df-f1 5855  df-fo 5856  df-f1o 5857  df-fv 5858  df-riota 6566  df-ov 6608  df-oprab 6609  df-mpt2 6610  df-om 7014  df-1st 7116  df-2nd 7117  df-wrecs 7353  df-recs 7414  df-rdg 7452  df-1o 7506  df-oadd 7510  df-er 7688  df-en 7901  df-dom 7902  df-sdom 7903  df-fin 7904  df-card 8710  df-pnf 10021  df-mnf 10022  df-xr 10023  df-ltxr 10024  df-le 10025  df-sub 10213  df-neg 10214  df-nn 10966  df-n0 11238  df-z 11323  df-uz 11632  df-fz 12266  df-fzo 12404  df-hash 13055  df-word 13233  df-concat 13235  df-substr 13237  df-pfx 40669
This theorem is referenced by:  pfxcctswrd  40704
  Copyright terms: Public domain W3C validator