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 41734
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 41711 . . . . . 6 (𝑆 ∈ Word 𝐴 → (𝑆 prefix 𝑌) ∈ Word 𝐴)
213ad2ant1 1102 . . . . 5 ((𝑆 ∈ Word 𝐴𝑌 ∈ (0...𝑍) ∧ 𝑍 ∈ (0...(#‘𝑆))) → (𝑆 prefix 𝑌) ∈ Word 𝐴)
3 swrdcl 13464 . . . . . 6 (𝑆 ∈ Word 𝐴 → (𝑆 substr ⟨𝑌, 𝑍⟩) ∈ Word 𝐴)
433ad2ant1 1102 . . . . 5 ((𝑆 ∈ Word 𝐴𝑌 ∈ (0...𝑍) ∧ 𝑍 ∈ (0...(#‘𝑆))) → (𝑆 substr ⟨𝑌, 𝑍⟩) ∈ Word 𝐴)
5 ccatcl 13392 . . . . 5 (((𝑆 prefix 𝑌) ∈ Word 𝐴 ∧ (𝑆 substr ⟨𝑌, 𝑍⟩) ∈ Word 𝐴) → ((𝑆 prefix 𝑌) ++ (𝑆 substr ⟨𝑌, 𝑍⟩)) ∈ Word 𝐴)
62, 4, 5syl2anc 694 . . . 4 ((𝑆 ∈ Word 𝐴𝑌 ∈ (0...𝑍) ∧ 𝑍 ∈ (0...(#‘𝑆))) → ((𝑆 prefix 𝑌) ++ (𝑆 substr ⟨𝑌, 𝑍⟩)) ∈ Word 𝐴)
7 wrdf 13342 . . . 4 (((𝑆 prefix 𝑌) ++ (𝑆 substr ⟨𝑌, 𝑍⟩)) ∈ Word 𝐴 → ((𝑆 prefix 𝑌) ++ (𝑆 substr ⟨𝑌, 𝑍⟩)):(0..^(#‘((𝑆 prefix 𝑌) ++ (𝑆 substr ⟨𝑌, 𝑍⟩))))⟶𝐴)
8 ffn 6083 . . . 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 13393 . . . . . . 7 (((𝑆 prefix 𝑌) ∈ Word 𝐴 ∧ (𝑆 substr ⟨𝑌, 𝑍⟩) ∈ Word 𝐴) → (#‘((𝑆 prefix 𝑌) ++ (𝑆 substr ⟨𝑌, 𝑍⟩))) = ((#‘(𝑆 prefix 𝑌)) + (#‘(𝑆 substr ⟨𝑌, 𝑍⟩))))
112, 4, 10syl2anc 694 . . . . . 6 ((𝑆 ∈ Word 𝐴𝑌 ∈ (0...𝑍) ∧ 𝑍 ∈ (0...(#‘𝑆))) → (#‘((𝑆 prefix 𝑌) ++ (𝑆 substr ⟨𝑌, 𝑍⟩))) = ((#‘(𝑆 prefix 𝑌)) + (#‘(𝑆 substr ⟨𝑌, 𝑍⟩))))
12 simp1 1081 . . . . . . . . 9 ((𝑆 ∈ Word 𝐴𝑌 ∈ (0...𝑍) ∧ 𝑍 ∈ (0...(#‘𝑆))) → 𝑆 ∈ Word 𝐴)
13 fzass4 12417 . . . . . . . . . . . 12 ((𝑌 ∈ (0...(#‘𝑆)) ∧ 𝑍 ∈ (𝑌...(#‘𝑆))) ↔ (𝑌 ∈ (0...𝑍) ∧ 𝑍 ∈ (0...(#‘𝑆))))
1413biimpri 218 . . . . . . . . . . 11 ((𝑌 ∈ (0...𝑍) ∧ 𝑍 ∈ (0...(#‘𝑆))) → (𝑌 ∈ (0...(#‘𝑆)) ∧ 𝑍 ∈ (𝑌...(#‘𝑆))))
1514simpld 474 . . . . . . . . . 10 ((𝑌 ∈ (0...𝑍) ∧ 𝑍 ∈ (0...(#‘𝑆))) → 𝑌 ∈ (0...(#‘𝑆)))
16153adant1 1099 . . . . . . . . 9 ((𝑆 ∈ Word 𝐴𝑌 ∈ (0...𝑍) ∧ 𝑍 ∈ (0...(#‘𝑆))) → 𝑌 ∈ (0...(#‘𝑆)))
17 pfxlen 41716 . . . . . . . . 9 ((𝑆 ∈ Word 𝐴𝑌 ∈ (0...(#‘𝑆))) → (#‘(𝑆 prefix 𝑌)) = 𝑌)
1812, 16, 17syl2anc 694 . . . . . . . 8 ((𝑆 ∈ Word 𝐴𝑌 ∈ (0...𝑍) ∧ 𝑍 ∈ (0...(#‘𝑆))) → (#‘(𝑆 prefix 𝑌)) = 𝑌)
19 swrdlen 13468 . . . . . . . 8 ((𝑆 ∈ Word 𝐴𝑌 ∈ (0...𝑍) ∧ 𝑍 ∈ (0...(#‘𝑆))) → (#‘(𝑆 substr ⟨𝑌, 𝑍⟩)) = (𝑍𝑌))
2018, 19oveq12d 6708 . . . . . . 7 ((𝑆 ∈ Word 𝐴𝑌 ∈ (0...𝑍) ∧ 𝑍 ∈ (0...(#‘𝑆))) → ((#‘(𝑆 prefix 𝑌)) + (#‘(𝑆 substr ⟨𝑌, 𝑍⟩))) = (𝑌 + (𝑍𝑌)))
21 elfzelz 12380 . . . . . . . . . . 11 (𝑌 ∈ (0...𝑍) → 𝑌 ∈ ℤ)
2221ad2antrl 764 . . . . . . . . . 10 ((𝑆 ∈ Word 𝐴 ∧ (𝑌 ∈ (0...𝑍) ∧ 𝑍 ∈ (0...(#‘𝑆)))) → 𝑌 ∈ ℤ)
2322zcnd 11521 . . . . . . . . 9 ((𝑆 ∈ Word 𝐴 ∧ (𝑌 ∈ (0...𝑍) ∧ 𝑍 ∈ (0...(#‘𝑆)))) → 𝑌 ∈ ℂ)
24233impb 1279 . . . . . . . 8 ((𝑆 ∈ Word 𝐴𝑌 ∈ (0...𝑍) ∧ 𝑍 ∈ (0...(#‘𝑆))) → 𝑌 ∈ ℂ)
25 elfzelz 12380 . . . . . . . . . . 11 (𝑍 ∈ (0...(#‘𝑆)) → 𝑍 ∈ ℤ)
2625ad2antll 765 . . . . . . . . . 10 ((𝑆 ∈ Word 𝐴 ∧ (𝑌 ∈ (0...𝑍) ∧ 𝑍 ∈ (0...(#‘𝑆)))) → 𝑍 ∈ ℤ)
2726zcnd 11521 . . . . . . . . 9 ((𝑆 ∈ Word 𝐴 ∧ (𝑌 ∈ (0...𝑍) ∧ 𝑍 ∈ (0...(#‘𝑆)))) → 𝑍 ∈ ℂ)
28273impb 1279 . . . . . . . 8 ((𝑆 ∈ Word 𝐴𝑌 ∈ (0...𝑍) ∧ 𝑍 ∈ (0...(#‘𝑆))) → 𝑍 ∈ ℂ)
2924, 28pncan3d 10433 . . . . . . 7 ((𝑆 ∈ Word 𝐴𝑌 ∈ (0...𝑍) ∧ 𝑍 ∈ (0...(#‘𝑆))) → (𝑌 + (𝑍𝑌)) = 𝑍)
3020, 29eqtrd 2685 . . . . . 6 ((𝑆 ∈ Word 𝐴𝑌 ∈ (0...𝑍) ∧ 𝑍 ∈ (0...(#‘𝑆))) → ((#‘(𝑆 prefix 𝑌)) + (#‘(𝑆 substr ⟨𝑌, 𝑍⟩))) = 𝑍)
3111, 30eqtrd 2685 . . . . 5 ((𝑆 ∈ Word 𝐴𝑌 ∈ (0...𝑍) ∧ 𝑍 ∈ (0...(#‘𝑆))) → (#‘((𝑆 prefix 𝑌) ++ (𝑆 substr ⟨𝑌, 𝑍⟩))) = 𝑍)
3231oveq2d 6706 . . . 4 ((𝑆 ∈ Word 𝐴𝑌 ∈ (0...𝑍) ∧ 𝑍 ∈ (0...(#‘𝑆))) → (0..^(#‘((𝑆 prefix 𝑌) ++ (𝑆 substr ⟨𝑌, 𝑍⟩)))) = (0..^𝑍))
3332fneq2d 6020 . . 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 41715 . . 3 ((𝑆 ∈ Word 𝐴𝑍 ∈ (0...(#‘𝑆))) → (𝑆 prefix 𝑍) Fn (0..^𝑍))
36353adant2 1100 . 2 ((𝑆 ∈ Word 𝐴𝑌 ∈ (0...𝑍) ∧ 𝑍 ∈ (0...(#‘𝑆))) → (𝑆 prefix 𝑍) Fn (0..^𝑍))
37 simpr 476 . . . . 5 (((𝑆 ∈ Word 𝐴𝑌 ∈ (0...𝑍) ∧ 𝑍 ∈ (0...(#‘𝑆))) ∧ 𝑥 ∈ (0..^𝑍)) → 𝑥 ∈ (0..^𝑍))
38213ad2ant2 1103 . . . . . 6 ((𝑆 ∈ Word 𝐴𝑌 ∈ (0...𝑍) ∧ 𝑍 ∈ (0...(#‘𝑆))) → 𝑌 ∈ ℤ)
3938adantr 480 . . . . 5 (((𝑆 ∈ Word 𝐴𝑌 ∈ (0...𝑍) ∧ 𝑍 ∈ (0...(#‘𝑆))) ∧ 𝑥 ∈ (0..^𝑍)) → 𝑌 ∈ ℤ)
40 fzospliti 12539 . . . . 5 ((𝑥 ∈ (0..^𝑍) ∧ 𝑌 ∈ ℤ) → (𝑥 ∈ (0..^𝑌) ∨ 𝑥 ∈ (𝑌..^𝑍)))
4137, 39, 40syl2anc 694 . . . 4 (((𝑆 ∈ Word 𝐴𝑌 ∈ (0...𝑍) ∧ 𝑍 ∈ (0...(#‘𝑆))) ∧ 𝑥 ∈ (0..^𝑍)) → (𝑥 ∈ (0..^𝑌) ∨ 𝑥 ∈ (𝑌..^𝑍)))
422adantr 480 . . . . . . 7 (((𝑆 ∈ Word 𝐴𝑌 ∈ (0...𝑍) ∧ 𝑍 ∈ (0...(#‘𝑆))) ∧ 𝑥 ∈ (0..^𝑌)) → (𝑆 prefix 𝑌) ∈ Word 𝐴)
434adantr 480 . . . . . . 7 (((𝑆 ∈ Word 𝐴𝑌 ∈ (0...𝑍) ∧ 𝑍 ∈ (0...(#‘𝑆))) ∧ 𝑥 ∈ (0..^𝑌)) → (𝑆 substr ⟨𝑌, 𝑍⟩) ∈ Word 𝐴)
4418oveq2d 6706 . . . . . . . . 9 ((𝑆 ∈ Word 𝐴𝑌 ∈ (0...𝑍) ∧ 𝑍 ∈ (0...(#‘𝑆))) → (0..^(#‘(𝑆 prefix 𝑌))) = (0..^𝑌))
4544eleq2d 2716 . . . . . . . 8 ((𝑆 ∈ Word 𝐴𝑌 ∈ (0...𝑍) ∧ 𝑍 ∈ (0...(#‘𝑆))) → (𝑥 ∈ (0..^(#‘(𝑆 prefix 𝑌))) ↔ 𝑥 ∈ (0..^𝑌)))
4645biimpar 501 . . . . . . 7 (((𝑆 ∈ Word 𝐴𝑌 ∈ (0...𝑍) ∧ 𝑍 ∈ (0...(#‘𝑆))) ∧ 𝑥 ∈ (0..^𝑌)) → 𝑥 ∈ (0..^(#‘(𝑆 prefix 𝑌))))
47 ccatval1 13395 . . . . . . 7 (((𝑆 prefix 𝑌) ∈ Word 𝐴 ∧ (𝑆 substr ⟨𝑌, 𝑍⟩) ∈ Word 𝐴𝑥 ∈ (0..^(#‘(𝑆 prefix 𝑌)))) → (((𝑆 prefix 𝑌) ++ (𝑆 substr ⟨𝑌, 𝑍⟩))‘𝑥) = ((𝑆 prefix 𝑌)‘𝑥))
4842, 43, 46, 47syl3anc 1366 . . . . . 6 (((𝑆 ∈ Word 𝐴𝑌 ∈ (0...𝑍) ∧ 𝑍 ∈ (0...(#‘𝑆))) ∧ 𝑥 ∈ (0..^𝑌)) → (((𝑆 prefix 𝑌) ++ (𝑆 substr ⟨𝑌, 𝑍⟩))‘𝑥) = ((𝑆 prefix 𝑌)‘𝑥))
4912adantr 480 . . . . . . 7 (((𝑆 ∈ Word 𝐴𝑌 ∈ (0...𝑍) ∧ 𝑍 ∈ (0...(#‘𝑆))) ∧ 𝑥 ∈ (0..^𝑌)) → 𝑆 ∈ Word 𝐴)
5016adantr 480 . . . . . . 7 (((𝑆 ∈ Word 𝐴𝑌 ∈ (0...𝑍) ∧ 𝑍 ∈ (0...(#‘𝑆))) ∧ 𝑥 ∈ (0..^𝑌)) → 𝑌 ∈ (0...(#‘𝑆)))
51 simpr 476 . . . . . . 7 (((𝑆 ∈ Word 𝐴𝑌 ∈ (0...𝑍) ∧ 𝑍 ∈ (0...(#‘𝑆))) ∧ 𝑥 ∈ (0..^𝑌)) → 𝑥 ∈ (0..^𝑌))
52 pfxfv 41724 . . . . . . 7 ((𝑆 ∈ Word 𝐴𝑌 ∈ (0...(#‘𝑆)) ∧ 𝑥 ∈ (0..^𝑌)) → ((𝑆 prefix 𝑌)‘𝑥) = (𝑆𝑥))
5349, 50, 51, 52syl3anc 1366 . . . . . 6 (((𝑆 ∈ Word 𝐴𝑌 ∈ (0...𝑍) ∧ 𝑍 ∈ (0...(#‘𝑆))) ∧ 𝑥 ∈ (0..^𝑌)) → ((𝑆 prefix 𝑌)‘𝑥) = (𝑆𝑥))
5448, 53eqtrd 2685 . . . . 5 (((𝑆 ∈ Word 𝐴𝑌 ∈ (0...𝑍) ∧ 𝑍 ∈ (0...(#‘𝑆))) ∧ 𝑥 ∈ (0..^𝑌)) → (((𝑆 prefix 𝑌) ++ (𝑆 substr ⟨𝑌, 𝑍⟩))‘𝑥) = (𝑆𝑥))
552adantr 480 . . . . . . 7 (((𝑆 ∈ Word 𝐴𝑌 ∈ (0...𝑍) ∧ 𝑍 ∈ (0...(#‘𝑆))) ∧ 𝑥 ∈ (𝑌..^𝑍)) → (𝑆 prefix 𝑌) ∈ Word 𝐴)
564adantr 480 . . . . . . 7 (((𝑆 ∈ Word 𝐴𝑌 ∈ (0...𝑍) ∧ 𝑍 ∈ (0...(#‘𝑆))) ∧ 𝑥 ∈ (𝑌..^𝑍)) → (𝑆 substr ⟨𝑌, 𝑍⟩) ∈ Word 𝐴)
5718, 30oveq12d 6708 . . . . . . . . 9 ((𝑆 ∈ Word 𝐴𝑌 ∈ (0...𝑍) ∧ 𝑍 ∈ (0...(#‘𝑆))) → ((#‘(𝑆 prefix 𝑌))..^((#‘(𝑆 prefix 𝑌)) + (#‘(𝑆 substr ⟨𝑌, 𝑍⟩)))) = (𝑌..^𝑍))
5857eleq2d 2716 . . . . . . . 8 ((𝑆 ∈ Word 𝐴𝑌 ∈ (0...𝑍) ∧ 𝑍 ∈ (0...(#‘𝑆))) → (𝑥 ∈ ((#‘(𝑆 prefix 𝑌))..^((#‘(𝑆 prefix 𝑌)) + (#‘(𝑆 substr ⟨𝑌, 𝑍⟩)))) ↔ 𝑥 ∈ (𝑌..^𝑍)))
5958biimpar 501 . . . . . . 7 (((𝑆 ∈ Word 𝐴𝑌 ∈ (0...𝑍) ∧ 𝑍 ∈ (0...(#‘𝑆))) ∧ 𝑥 ∈ (𝑌..^𝑍)) → 𝑥 ∈ ((#‘(𝑆 prefix 𝑌))..^((#‘(𝑆 prefix 𝑌)) + (#‘(𝑆 substr ⟨𝑌, 𝑍⟩)))))
60 ccatval2 13396 . . . . . . 7 (((𝑆 prefix 𝑌) ∈ Word 𝐴 ∧ (𝑆 substr ⟨𝑌, 𝑍⟩) ∈ Word 𝐴𝑥 ∈ ((#‘(𝑆 prefix 𝑌))..^((#‘(𝑆 prefix 𝑌)) + (#‘(𝑆 substr ⟨𝑌, 𝑍⟩))))) → (((𝑆 prefix 𝑌) ++ (𝑆 substr ⟨𝑌, 𝑍⟩))‘𝑥) = ((𝑆 substr ⟨𝑌, 𝑍⟩)‘(𝑥 − (#‘(𝑆 prefix 𝑌)))))
6155, 56, 59, 60syl3anc 1366 . . . . . 6 (((𝑆 ∈ Word 𝐴𝑌 ∈ (0...𝑍) ∧ 𝑍 ∈ (0...(#‘𝑆))) ∧ 𝑥 ∈ (𝑌..^𝑍)) → (((𝑆 prefix 𝑌) ++ (𝑆 substr ⟨𝑌, 𝑍⟩))‘𝑥) = ((𝑆 substr ⟨𝑌, 𝑍⟩)‘(𝑥 − (#‘(𝑆 prefix 𝑌)))))
6218oveq2d 6706 . . . . . . . . 9 ((𝑆 ∈ Word 𝐴𝑌 ∈ (0...𝑍) ∧ 𝑍 ∈ (0...(#‘𝑆))) → (𝑥 − (#‘(𝑆 prefix 𝑌))) = (𝑥𝑌))
6362adantr 480 . . . . . . . 8 (((𝑆 ∈ Word 𝐴𝑌 ∈ (0...𝑍) ∧ 𝑍 ∈ (0...(#‘𝑆))) ∧ 𝑥 ∈ (𝑌..^𝑍)) → (𝑥 − (#‘(𝑆 prefix 𝑌))) = (𝑥𝑌))
6438anim1i 591 . . . . . . . . . . 11 (((𝑆 ∈ Word 𝐴𝑌 ∈ (0...𝑍) ∧ 𝑍 ∈ (0...(#‘𝑆))) ∧ 𝑥 ∈ (𝑌..^𝑍)) → (𝑌 ∈ ℤ ∧ 𝑥 ∈ (𝑌..^𝑍)))
6564ancomd 466 . . . . . . . . . 10 (((𝑆 ∈ Word 𝐴𝑌 ∈ (0...𝑍) ∧ 𝑍 ∈ (0...(#‘𝑆))) ∧ 𝑥 ∈ (𝑌..^𝑍)) → (𝑥 ∈ (𝑌..^𝑍) ∧ 𝑌 ∈ ℤ))
66 fzosubel 12566 . . . . . . . . . 10 ((𝑥 ∈ (𝑌..^𝑍) ∧ 𝑌 ∈ ℤ) → (𝑥𝑌) ∈ ((𝑌𝑌)..^(𝑍𝑌)))
6765, 66syl 17 . . . . . . . . 9 (((𝑆 ∈ Word 𝐴𝑌 ∈ (0...𝑍) ∧ 𝑍 ∈ (0...(#‘𝑆))) ∧ 𝑥 ∈ (𝑌..^𝑍)) → (𝑥𝑌) ∈ ((𝑌𝑌)..^(𝑍𝑌)))
6821zcnd 11521 . . . . . . . . . . . . . . 15 (𝑌 ∈ (0...𝑍) → 𝑌 ∈ ℂ)
6968subidd 10418 . . . . . . . . . . . . . 14 (𝑌 ∈ (0...𝑍) → (𝑌𝑌) = 0)
7069eqcomd 2657 . . . . . . . . . . . . 13 (𝑌 ∈ (0...𝑍) → 0 = (𝑌𝑌))
71703ad2ant2 1103 . . . . . . . . . . . 12 ((𝑆 ∈ Word 𝐴𝑌 ∈ (0...𝑍) ∧ 𝑍 ∈ (0...(#‘𝑆))) → 0 = (𝑌𝑌))
7271oveq1d 6705 . . . . . . . . . . 11 ((𝑆 ∈ Word 𝐴𝑌 ∈ (0...𝑍) ∧ 𝑍 ∈ (0...(#‘𝑆))) → (0..^(𝑍𝑌)) = ((𝑌𝑌)..^(𝑍𝑌)))
7372eleq2d 2716 . . . . . . . . . 10 ((𝑆 ∈ Word 𝐴𝑌 ∈ (0...𝑍) ∧ 𝑍 ∈ (0...(#‘𝑆))) → ((𝑥𝑌) ∈ (0..^(𝑍𝑌)) ↔ (𝑥𝑌) ∈ ((𝑌𝑌)..^(𝑍𝑌))))
7473adantr 480 . . . . . . . . 9 (((𝑆 ∈ Word 𝐴𝑌 ∈ (0...𝑍) ∧ 𝑍 ∈ (0...(#‘𝑆))) ∧ 𝑥 ∈ (𝑌..^𝑍)) → ((𝑥𝑌) ∈ (0..^(𝑍𝑌)) ↔ (𝑥𝑌) ∈ ((𝑌𝑌)..^(𝑍𝑌))))
7567, 74mpbird 247 . . . . . . . 8 (((𝑆 ∈ Word 𝐴𝑌 ∈ (0...𝑍) ∧ 𝑍 ∈ (0...(#‘𝑆))) ∧ 𝑥 ∈ (𝑌..^𝑍)) → (𝑥𝑌) ∈ (0..^(𝑍𝑌)))
7663, 75eqeltrd 2730 . . . . . . 7 (((𝑆 ∈ Word 𝐴𝑌 ∈ (0...𝑍) ∧ 𝑍 ∈ (0...(#‘𝑆))) ∧ 𝑥 ∈ (𝑌..^𝑍)) → (𝑥 − (#‘(𝑆 prefix 𝑌))) ∈ (0..^(𝑍𝑌)))
77 swrdfv 13469 . . . . . . 7 (((𝑆 ∈ Word 𝐴𝑌 ∈ (0...𝑍) ∧ 𝑍 ∈ (0...(#‘𝑆))) ∧ (𝑥 − (#‘(𝑆 prefix 𝑌))) ∈ (0..^(𝑍𝑌))) → ((𝑆 substr ⟨𝑌, 𝑍⟩)‘(𝑥 − (#‘(𝑆 prefix 𝑌)))) = (𝑆‘((𝑥 − (#‘(𝑆 prefix 𝑌))) + 𝑌)))
7876, 77syldan 486 . . . . . 6 (((𝑆 ∈ Word 𝐴𝑌 ∈ (0...𝑍) ∧ 𝑍 ∈ (0...(#‘𝑆))) ∧ 𝑥 ∈ (𝑌..^𝑍)) → ((𝑆 substr ⟨𝑌, 𝑍⟩)‘(𝑥 − (#‘(𝑆 prefix 𝑌)))) = (𝑆‘((𝑥 − (#‘(𝑆 prefix 𝑌))) + 𝑌)))
7963oveq1d 6705 . . . . . . . 8 (((𝑆 ∈ Word 𝐴𝑌 ∈ (0...𝑍) ∧ 𝑍 ∈ (0...(#‘𝑆))) ∧ 𝑥 ∈ (𝑌..^𝑍)) → ((𝑥 − (#‘(𝑆 prefix 𝑌))) + 𝑌) = ((𝑥𝑌) + 𝑌))
80 elfzoelz 12509 . . . . . . . . . . 11 (𝑥 ∈ (𝑌..^𝑍) → 𝑥 ∈ ℤ)
8180zcnd 11521 . . . . . . . . . 10 (𝑥 ∈ (𝑌..^𝑍) → 𝑥 ∈ ℂ)
8281adantl 481 . . . . . . . . 9 (((𝑆 ∈ Word 𝐴𝑌 ∈ (0...𝑍) ∧ 𝑍 ∈ (0...(#‘𝑆))) ∧ 𝑥 ∈ (𝑌..^𝑍)) → 𝑥 ∈ ℂ)
8324adantr 480 . . . . . . . . 9 (((𝑆 ∈ Word 𝐴𝑌 ∈ (0...𝑍) ∧ 𝑍 ∈ (0...(#‘𝑆))) ∧ 𝑥 ∈ (𝑌..^𝑍)) → 𝑌 ∈ ℂ)
8482, 83npcand 10434 . . . . . . . 8 (((𝑆 ∈ Word 𝐴𝑌 ∈ (0...𝑍) ∧ 𝑍 ∈ (0...(#‘𝑆))) ∧ 𝑥 ∈ (𝑌..^𝑍)) → ((𝑥𝑌) + 𝑌) = 𝑥)
8579, 84eqtrd 2685 . . . . . . 7 (((𝑆 ∈ Word 𝐴𝑌 ∈ (0...𝑍) ∧ 𝑍 ∈ (0...(#‘𝑆))) ∧ 𝑥 ∈ (𝑌..^𝑍)) → ((𝑥 − (#‘(𝑆 prefix 𝑌))) + 𝑌) = 𝑥)
8685fveq2d 6233 . . . . . 6 (((𝑆 ∈ Word 𝐴𝑌 ∈ (0...𝑍) ∧ 𝑍 ∈ (0...(#‘𝑆))) ∧ 𝑥 ∈ (𝑌..^𝑍)) → (𝑆‘((𝑥 − (#‘(𝑆 prefix 𝑌))) + 𝑌)) = (𝑆𝑥))
8761, 78, 863eqtrd 2689 . . . . 5 (((𝑆 ∈ Word 𝐴𝑌 ∈ (0...𝑍) ∧ 𝑍 ∈ (0...(#‘𝑆))) ∧ 𝑥 ∈ (𝑌..^𝑍)) → (((𝑆 prefix 𝑌) ++ (𝑆 substr ⟨𝑌, 𝑍⟩))‘𝑥) = (𝑆𝑥))
8854, 87jaodan 843 . . . 4 (((𝑆 ∈ Word 𝐴𝑌 ∈ (0...𝑍) ∧ 𝑍 ∈ (0...(#‘𝑆))) ∧ (𝑥 ∈ (0..^𝑌) ∨ 𝑥 ∈ (𝑌..^𝑍))) → (((𝑆 prefix 𝑌) ++ (𝑆 substr ⟨𝑌, 𝑍⟩))‘𝑥) = (𝑆𝑥))
8941, 88syldan 486 . . 3 (((𝑆 ∈ Word 𝐴𝑌 ∈ (0...𝑍) ∧ 𝑍 ∈ (0...(#‘𝑆))) ∧ 𝑥 ∈ (0..^𝑍)) → (((𝑆 prefix 𝑌) ++ (𝑆 substr ⟨𝑌, 𝑍⟩))‘𝑥) = (𝑆𝑥))
9012adantr 480 . . . 4 (((𝑆 ∈ Word 𝐴𝑌 ∈ (0...𝑍) ∧ 𝑍 ∈ (0...(#‘𝑆))) ∧ 𝑥 ∈ (0..^𝑍)) → 𝑆 ∈ Word 𝐴)
91 simpl3 1086 . . . 4 (((𝑆 ∈ Word 𝐴𝑌 ∈ (0...𝑍) ∧ 𝑍 ∈ (0...(#‘𝑆))) ∧ 𝑥 ∈ (0..^𝑍)) → 𝑍 ∈ (0...(#‘𝑆)))
92 pfxfv 41724 . . . 4 ((𝑆 ∈ Word 𝐴𝑍 ∈ (0...(#‘𝑆)) ∧ 𝑥 ∈ (0..^𝑍)) → ((𝑆 prefix 𝑍)‘𝑥) = (𝑆𝑥))
9390, 91, 37, 92syl3anc 1366 . . 3 (((𝑆 ∈ Word 𝐴𝑌 ∈ (0...𝑍) ∧ 𝑍 ∈ (0...(#‘𝑆))) ∧ 𝑥 ∈ (0..^𝑍)) → ((𝑆 prefix 𝑍)‘𝑥) = (𝑆𝑥))
9489, 93eqtr4d 2688 . 2 (((𝑆 ∈ Word 𝐴𝑌 ∈ (0...𝑍) ∧ 𝑍 ∈ (0...(#‘𝑆))) ∧ 𝑥 ∈ (0..^𝑍)) → (((𝑆 prefix 𝑌) ++ (𝑆 substr ⟨𝑌, 𝑍⟩))‘𝑥) = ((𝑆 prefix 𝑍)‘𝑥))
9534, 36, 94eqfnfvd 6354 1 ((𝑆 ∈ Word 𝐴𝑌 ∈ (0...𝑍) ∧ 𝑍 ∈ (0...(#‘𝑆))) → ((𝑆 prefix 𝑌) ++ (𝑆 substr ⟨𝑌, 𝑍⟩)) = (𝑆 prefix 𝑍))
Colors of variables: wff setvar class
Syntax hints:  wi 4  wb 196  wo 382  wa 383  w3a 1054   = wceq 1523  wcel 2030  cop 4216   Fn wfn 5921  wf 5922  cfv 5926  (class class class)co 6690  cc 9972  0cc0 9974   + caddc 9977  cmin 10304  cz 11415  ...cfz 12364  ..^cfzo 12504  #chash 13157  Word cword 13323   ++ cconcat 13325   substr csubstr 13327   prefix cpfx 41706
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  df-pfx 41707
This theorem is referenced by:  pfxcctswrd  41742
  Copyright terms: Public domain W3C validator