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

Theorem wrdind 13522
Description: Perform induction over the structure of a word. (Contributed by Mario Carneiro, 27-Sep-2015.) (Revised by Mario Carneiro, 26-Feb-2016.)
Hypotheses
Ref Expression
wrdind.1 (𝑥 = ∅ → (𝜑𝜓))
wrdind.2 (𝑥 = 𝑦 → (𝜑𝜒))
wrdind.3 (𝑥 = (𝑦 ++ ⟨“𝑧”⟩) → (𝜑𝜃))
wrdind.4 (𝑥 = 𝐴 → (𝜑𝜏))
wrdind.5 𝜓
wrdind.6 ((𝑦 ∈ Word 𝐵𝑧𝐵) → (𝜒𝜃))
Assertion
Ref Expression
wrdind (𝐴 ∈ Word 𝐵𝜏)
Distinct variable groups:   𝑥,𝐴   𝑥,𝑦,𝑧,𝐵   𝜒,𝑥   𝜑,𝑦,𝑧   𝜏,𝑥   𝜃,𝑥
Allowed substitution hints:   𝜑(𝑥)   𝜓(𝑥,𝑦,𝑧)   𝜒(𝑦,𝑧)   𝜃(𝑦,𝑧)   𝜏(𝑦,𝑧)   𝐴(𝑦,𝑧)

Proof of Theorem wrdind
Dummy variables 𝑛 𝑚 are mutually distinct and distinct from all other variables.
StepHypRef Expression
1 lencl 13356 . . 3 (𝐴 ∈ Word 𝐵 → (#‘𝐴) ∈ ℕ0)
2 eqeq2 2662 . . . . . 6 (𝑛 = 0 → ((#‘𝑥) = 𝑛 ↔ (#‘𝑥) = 0))
32imbi1d 330 . . . . 5 (𝑛 = 0 → (((#‘𝑥) = 𝑛𝜑) ↔ ((#‘𝑥) = 0 → 𝜑)))
43ralbidv 3015 . . . 4 (𝑛 = 0 → (∀𝑥 ∈ Word 𝐵((#‘𝑥) = 𝑛𝜑) ↔ ∀𝑥 ∈ Word 𝐵((#‘𝑥) = 0 → 𝜑)))
5 eqeq2 2662 . . . . . 6 (𝑛 = 𝑚 → ((#‘𝑥) = 𝑛 ↔ (#‘𝑥) = 𝑚))
65imbi1d 330 . . . . 5 (𝑛 = 𝑚 → (((#‘𝑥) = 𝑛𝜑) ↔ ((#‘𝑥) = 𝑚𝜑)))
76ralbidv 3015 . . . 4 (𝑛 = 𝑚 → (∀𝑥 ∈ Word 𝐵((#‘𝑥) = 𝑛𝜑) ↔ ∀𝑥 ∈ Word 𝐵((#‘𝑥) = 𝑚𝜑)))
8 eqeq2 2662 . . . . . 6 (𝑛 = (𝑚 + 1) → ((#‘𝑥) = 𝑛 ↔ (#‘𝑥) = (𝑚 + 1)))
98imbi1d 330 . . . . 5 (𝑛 = (𝑚 + 1) → (((#‘𝑥) = 𝑛𝜑) ↔ ((#‘𝑥) = (𝑚 + 1) → 𝜑)))
109ralbidv 3015 . . . 4 (𝑛 = (𝑚 + 1) → (∀𝑥 ∈ Word 𝐵((#‘𝑥) = 𝑛𝜑) ↔ ∀𝑥 ∈ Word 𝐵((#‘𝑥) = (𝑚 + 1) → 𝜑)))
11 eqeq2 2662 . . . . . 6 (𝑛 = (#‘𝐴) → ((#‘𝑥) = 𝑛 ↔ (#‘𝑥) = (#‘𝐴)))
1211imbi1d 330 . . . . 5 (𝑛 = (#‘𝐴) → (((#‘𝑥) = 𝑛𝜑) ↔ ((#‘𝑥) = (#‘𝐴) → 𝜑)))
1312ralbidv 3015 . . . 4 (𝑛 = (#‘𝐴) → (∀𝑥 ∈ Word 𝐵((#‘𝑥) = 𝑛𝜑) ↔ ∀𝑥 ∈ Word 𝐵((#‘𝑥) = (#‘𝐴) → 𝜑)))
14 hasheq0 13192 . . . . . 6 (𝑥 ∈ Word 𝐵 → ((#‘𝑥) = 0 ↔ 𝑥 = ∅))
15 wrdind.5 . . . . . . 7 𝜓
16 wrdind.1 . . . . . . 7 (𝑥 = ∅ → (𝜑𝜓))
1715, 16mpbiri 248 . . . . . 6 (𝑥 = ∅ → 𝜑)
1814, 17syl6bi 243 . . . . 5 (𝑥 ∈ Word 𝐵 → ((#‘𝑥) = 0 → 𝜑))
1918rgen 2951 . . . 4 𝑥 ∈ Word 𝐵((#‘𝑥) = 0 → 𝜑)
20 fveq2 6229 . . . . . . . 8 (𝑥 = 𝑦 → (#‘𝑥) = (#‘𝑦))
2120eqeq1d 2653 . . . . . . 7 (𝑥 = 𝑦 → ((#‘𝑥) = 𝑚 ↔ (#‘𝑦) = 𝑚))
22 wrdind.2 . . . . . . 7 (𝑥 = 𝑦 → (𝜑𝜒))
2321, 22imbi12d 333 . . . . . 6 (𝑥 = 𝑦 → (((#‘𝑥) = 𝑚𝜑) ↔ ((#‘𝑦) = 𝑚𝜒)))
2423cbvralv 3201 . . . . 5 (∀𝑥 ∈ Word 𝐵((#‘𝑥) = 𝑚𝜑) ↔ ∀𝑦 ∈ Word 𝐵((#‘𝑦) = 𝑚𝜒))
25 swrdcl 13464 . . . . . . . . . . . 12 (𝑥 ∈ Word 𝐵 → (𝑥 substr ⟨0, ((#‘𝑥) − 1)⟩) ∈ Word 𝐵)
2625ad2antrl 764 . . . . . . . . . . 11 (((𝑚 ∈ ℕ0 ∧ ∀𝑦 ∈ Word 𝐵((#‘𝑦) = 𝑚𝜒)) ∧ (𝑥 ∈ Word 𝐵 ∧ (#‘𝑥) = (𝑚 + 1))) → (𝑥 substr ⟨0, ((#‘𝑥) − 1)⟩) ∈ Word 𝐵)
27 simplr 807 . . . . . . . . . . 11 (((𝑚 ∈ ℕ0 ∧ ∀𝑦 ∈ Word 𝐵((#‘𝑦) = 𝑚𝜒)) ∧ (𝑥 ∈ Word 𝐵 ∧ (#‘𝑥) = (𝑚 + 1))) → ∀𝑦 ∈ Word 𝐵((#‘𝑦) = 𝑚𝜒))
28 simprl 809 . . . . . . . . . . . . 13 (((𝑚 ∈ ℕ0 ∧ ∀𝑦 ∈ Word 𝐵((#‘𝑦) = 𝑚𝜒)) ∧ (𝑥 ∈ Word 𝐵 ∧ (#‘𝑥) = (𝑚 + 1))) → 𝑥 ∈ Word 𝐵)
29 fzossfz 12527 . . . . . . . . . . . . . 14 (0..^(#‘𝑥)) ⊆ (0...(#‘𝑥))
30 simprr 811 . . . . . . . . . . . . . . . 16 (((𝑚 ∈ ℕ0 ∧ ∀𝑦 ∈ Word 𝐵((#‘𝑦) = 𝑚𝜒)) ∧ (𝑥 ∈ Word 𝐵 ∧ (#‘𝑥) = (𝑚 + 1))) → (#‘𝑥) = (𝑚 + 1))
31 nn0p1nn 11370 . . . . . . . . . . . . . . . . 17 (𝑚 ∈ ℕ0 → (𝑚 + 1) ∈ ℕ)
3231ad2antrr 762 . . . . . . . . . . . . . . . 16 (((𝑚 ∈ ℕ0 ∧ ∀𝑦 ∈ Word 𝐵((#‘𝑦) = 𝑚𝜒)) ∧ (𝑥 ∈ Word 𝐵 ∧ (#‘𝑥) = (𝑚 + 1))) → (𝑚 + 1) ∈ ℕ)
3330, 32eqeltrd 2730 . . . . . . . . . . . . . . 15 (((𝑚 ∈ ℕ0 ∧ ∀𝑦 ∈ Word 𝐵((#‘𝑦) = 𝑚𝜒)) ∧ (𝑥 ∈ Word 𝐵 ∧ (#‘𝑥) = (𝑚 + 1))) → (#‘𝑥) ∈ ℕ)
34 fzo0end 12600 . . . . . . . . . . . . . . 15 ((#‘𝑥) ∈ ℕ → ((#‘𝑥) − 1) ∈ (0..^(#‘𝑥)))
3533, 34syl 17 . . . . . . . . . . . . . 14 (((𝑚 ∈ ℕ0 ∧ ∀𝑦 ∈ Word 𝐵((#‘𝑦) = 𝑚𝜒)) ∧ (𝑥 ∈ Word 𝐵 ∧ (#‘𝑥) = (𝑚 + 1))) → ((#‘𝑥) − 1) ∈ (0..^(#‘𝑥)))
3629, 35sseldi 3634 . . . . . . . . . . . . 13 (((𝑚 ∈ ℕ0 ∧ ∀𝑦 ∈ Word 𝐵((#‘𝑦) = 𝑚𝜒)) ∧ (𝑥 ∈ Word 𝐵 ∧ (#‘𝑥) = (𝑚 + 1))) → ((#‘𝑥) − 1) ∈ (0...(#‘𝑥)))
37 swrd0len 13467 . . . . . . . . . . . . 13 ((𝑥 ∈ Word 𝐵 ∧ ((#‘𝑥) − 1) ∈ (0...(#‘𝑥))) → (#‘(𝑥 substr ⟨0, ((#‘𝑥) − 1)⟩)) = ((#‘𝑥) − 1))
3828, 36, 37syl2anc 694 . . . . . . . . . . . 12 (((𝑚 ∈ ℕ0 ∧ ∀𝑦 ∈ Word 𝐵((#‘𝑦) = 𝑚𝜒)) ∧ (𝑥 ∈ Word 𝐵 ∧ (#‘𝑥) = (𝑚 + 1))) → (#‘(𝑥 substr ⟨0, ((#‘𝑥) − 1)⟩)) = ((#‘𝑥) − 1))
3930oveq1d 6705 . . . . . . . . . . . 12 (((𝑚 ∈ ℕ0 ∧ ∀𝑦 ∈ Word 𝐵((#‘𝑦) = 𝑚𝜒)) ∧ (𝑥 ∈ Word 𝐵 ∧ (#‘𝑥) = (𝑚 + 1))) → ((#‘𝑥) − 1) = ((𝑚 + 1) − 1))
40 nn0cn 11340 . . . . . . . . . . . . . 14 (𝑚 ∈ ℕ0𝑚 ∈ ℂ)
4140ad2antrr 762 . . . . . . . . . . . . 13 (((𝑚 ∈ ℕ0 ∧ ∀𝑦 ∈ Word 𝐵((#‘𝑦) = 𝑚𝜒)) ∧ (𝑥 ∈ Word 𝐵 ∧ (#‘𝑥) = (𝑚 + 1))) → 𝑚 ∈ ℂ)
42 ax-1cn 10032 . . . . . . . . . . . . 13 1 ∈ ℂ
43 pncan 10325 . . . . . . . . . . . . 13 ((𝑚 ∈ ℂ ∧ 1 ∈ ℂ) → ((𝑚 + 1) − 1) = 𝑚)
4441, 42, 43sylancl 695 . . . . . . . . . . . 12 (((𝑚 ∈ ℕ0 ∧ ∀𝑦 ∈ Word 𝐵((#‘𝑦) = 𝑚𝜒)) ∧ (𝑥 ∈ Word 𝐵 ∧ (#‘𝑥) = (𝑚 + 1))) → ((𝑚 + 1) − 1) = 𝑚)
4538, 39, 443eqtrd 2689 . . . . . . . . . . 11 (((𝑚 ∈ ℕ0 ∧ ∀𝑦 ∈ Word 𝐵((#‘𝑦) = 𝑚𝜒)) ∧ (𝑥 ∈ Word 𝐵 ∧ (#‘𝑥) = (𝑚 + 1))) → (#‘(𝑥 substr ⟨0, ((#‘𝑥) − 1)⟩)) = 𝑚)
46 fveq2 6229 . . . . . . . . . . . . . 14 (𝑦 = (𝑥 substr ⟨0, ((#‘𝑥) − 1)⟩) → (#‘𝑦) = (#‘(𝑥 substr ⟨0, ((#‘𝑥) − 1)⟩)))
4746eqeq1d 2653 . . . . . . . . . . . . 13 (𝑦 = (𝑥 substr ⟨0, ((#‘𝑥) − 1)⟩) → ((#‘𝑦) = 𝑚 ↔ (#‘(𝑥 substr ⟨0, ((#‘𝑥) − 1)⟩)) = 𝑚))
48 vex 3234 . . . . . . . . . . . . . . 15 𝑦 ∈ V
4948, 22sbcie 3503 . . . . . . . . . . . . . 14 ([𝑦 / 𝑥]𝜑𝜒)
50 dfsbcq 3470 . . . . . . . . . . . . . 14 (𝑦 = (𝑥 substr ⟨0, ((#‘𝑥) − 1)⟩) → ([𝑦 / 𝑥]𝜑[(𝑥 substr ⟨0, ((#‘𝑥) − 1)⟩) / 𝑥]𝜑))
5149, 50syl5bbr 274 . . . . . . . . . . . . 13 (𝑦 = (𝑥 substr ⟨0, ((#‘𝑥) − 1)⟩) → (𝜒[(𝑥 substr ⟨0, ((#‘𝑥) − 1)⟩) / 𝑥]𝜑))
5247, 51imbi12d 333 . . . . . . . . . . . 12 (𝑦 = (𝑥 substr ⟨0, ((#‘𝑥) − 1)⟩) → (((#‘𝑦) = 𝑚𝜒) ↔ ((#‘(𝑥 substr ⟨0, ((#‘𝑥) − 1)⟩)) = 𝑚[(𝑥 substr ⟨0, ((#‘𝑥) − 1)⟩) / 𝑥]𝜑)))
5352rspcv 3336 . . . . . . . . . . 11 ((𝑥 substr ⟨0, ((#‘𝑥) − 1)⟩) ∈ Word 𝐵 → (∀𝑦 ∈ Word 𝐵((#‘𝑦) = 𝑚𝜒) → ((#‘(𝑥 substr ⟨0, ((#‘𝑥) − 1)⟩)) = 𝑚[(𝑥 substr ⟨0, ((#‘𝑥) − 1)⟩) / 𝑥]𝜑)))
5426, 27, 45, 53syl3c 66 . . . . . . . . . 10 (((𝑚 ∈ ℕ0 ∧ ∀𝑦 ∈ Word 𝐵((#‘𝑦) = 𝑚𝜒)) ∧ (𝑥 ∈ Word 𝐵 ∧ (#‘𝑥) = (𝑚 + 1))) → [(𝑥 substr ⟨0, ((#‘𝑥) − 1)⟩) / 𝑥]𝜑)
5533nnge1d 11101 . . . . . . . . . . . . 13 (((𝑚 ∈ ℕ0 ∧ ∀𝑦 ∈ Word 𝐵((#‘𝑦) = 𝑚𝜒)) ∧ (𝑥 ∈ Word 𝐵 ∧ (#‘𝑥) = (𝑚 + 1))) → 1 ≤ (#‘𝑥))
56 wrdlenge1n0 13372 . . . . . . . . . . . . . 14 (𝑥 ∈ Word 𝐵 → (𝑥 ≠ ∅ ↔ 1 ≤ (#‘𝑥)))
5756ad2antrl 764 . . . . . . . . . . . . 13 (((𝑚 ∈ ℕ0 ∧ ∀𝑦 ∈ Word 𝐵((#‘𝑦) = 𝑚𝜒)) ∧ (𝑥 ∈ Word 𝐵 ∧ (#‘𝑥) = (𝑚 + 1))) → (𝑥 ≠ ∅ ↔ 1 ≤ (#‘𝑥)))
5855, 57mpbird 247 . . . . . . . . . . . 12 (((𝑚 ∈ ℕ0 ∧ ∀𝑦 ∈ Word 𝐵((#‘𝑦) = 𝑚𝜒)) ∧ (𝑥 ∈ Word 𝐵 ∧ (#‘𝑥) = (𝑚 + 1))) → 𝑥 ≠ ∅)
59 lswcl 13388 . . . . . . . . . . . 12 ((𝑥 ∈ Word 𝐵𝑥 ≠ ∅) → ( lastS ‘𝑥) ∈ 𝐵)
6028, 58, 59syl2anc 694 . . . . . . . . . . 11 (((𝑚 ∈ ℕ0 ∧ ∀𝑦 ∈ Word 𝐵((#‘𝑦) = 𝑚𝜒)) ∧ (𝑥 ∈ Word 𝐵 ∧ (#‘𝑥) = (𝑚 + 1))) → ( lastS ‘𝑥) ∈ 𝐵)
61 oveq1 6697 . . . . . . . . . . . . . 14 (𝑦 = (𝑥 substr ⟨0, ((#‘𝑥) − 1)⟩) → (𝑦 ++ ⟨“𝑧”⟩) = ((𝑥 substr ⟨0, ((#‘𝑥) − 1)⟩) ++ ⟨“𝑧”⟩))
6261sbceq1d 3473 . . . . . . . . . . . . 13 (𝑦 = (𝑥 substr ⟨0, ((#‘𝑥) − 1)⟩) → ([(𝑦 ++ ⟨“𝑧”⟩) / 𝑥]𝜑[((𝑥 substr ⟨0, ((#‘𝑥) − 1)⟩) ++ ⟨“𝑧”⟩) / 𝑥]𝜑))
6350, 62imbi12d 333 . . . . . . . . . . . 12 (𝑦 = (𝑥 substr ⟨0, ((#‘𝑥) − 1)⟩) → (([𝑦 / 𝑥]𝜑[(𝑦 ++ ⟨“𝑧”⟩) / 𝑥]𝜑) ↔ ([(𝑥 substr ⟨0, ((#‘𝑥) − 1)⟩) / 𝑥]𝜑[((𝑥 substr ⟨0, ((#‘𝑥) − 1)⟩) ++ ⟨“𝑧”⟩) / 𝑥]𝜑)))
64 s1eq 13416 . . . . . . . . . . . . . . 15 (𝑧 = ( lastS ‘𝑥) → ⟨“𝑧”⟩ = ⟨“( lastS ‘𝑥)”⟩)
6564oveq2d 6706 . . . . . . . . . . . . . 14 (𝑧 = ( lastS ‘𝑥) → ((𝑥 substr ⟨0, ((#‘𝑥) − 1)⟩) ++ ⟨“𝑧”⟩) = ((𝑥 substr ⟨0, ((#‘𝑥) − 1)⟩) ++ ⟨“( lastS ‘𝑥)”⟩))
6665sbceq1d 3473 . . . . . . . . . . . . 13 (𝑧 = ( lastS ‘𝑥) → ([((𝑥 substr ⟨0, ((#‘𝑥) − 1)⟩) ++ ⟨“𝑧”⟩) / 𝑥]𝜑[((𝑥 substr ⟨0, ((#‘𝑥) − 1)⟩) ++ ⟨“( lastS ‘𝑥)”⟩) / 𝑥]𝜑))
6766imbi2d 329 . . . . . . . . . . . 12 (𝑧 = ( lastS ‘𝑥) → (([(𝑥 substr ⟨0, ((#‘𝑥) − 1)⟩) / 𝑥]𝜑[((𝑥 substr ⟨0, ((#‘𝑥) − 1)⟩) ++ ⟨“𝑧”⟩) / 𝑥]𝜑) ↔ ([(𝑥 substr ⟨0, ((#‘𝑥) − 1)⟩) / 𝑥]𝜑[((𝑥 substr ⟨0, ((#‘𝑥) − 1)⟩) ++ ⟨“( lastS ‘𝑥)”⟩) / 𝑥]𝜑)))
68 wrdind.6 . . . . . . . . . . . . 13 ((𝑦 ∈ Word 𝐵𝑧𝐵) → (𝜒𝜃))
69 ovex 6718 . . . . . . . . . . . . . 14 (𝑦 ++ ⟨“𝑧”⟩) ∈ V
70 wrdind.3 . . . . . . . . . . . . . 14 (𝑥 = (𝑦 ++ ⟨“𝑧”⟩) → (𝜑𝜃))
7169, 70sbcie 3503 . . . . . . . . . . . . 13 ([(𝑦 ++ ⟨“𝑧”⟩) / 𝑥]𝜑𝜃)
7268, 49, 713imtr4g 285 . . . . . . . . . . . 12 ((𝑦 ∈ Word 𝐵𝑧𝐵) → ([𝑦 / 𝑥]𝜑[(𝑦 ++ ⟨“𝑧”⟩) / 𝑥]𝜑))
7363, 67, 72vtocl2ga 3305 . . . . . . . . . . 11 (((𝑥 substr ⟨0, ((#‘𝑥) − 1)⟩) ∈ Word 𝐵 ∧ ( lastS ‘𝑥) ∈ 𝐵) → ([(𝑥 substr ⟨0, ((#‘𝑥) − 1)⟩) / 𝑥]𝜑[((𝑥 substr ⟨0, ((#‘𝑥) − 1)⟩) ++ ⟨“( lastS ‘𝑥)”⟩) / 𝑥]𝜑))
7426, 60, 73syl2anc 694 . . . . . . . . . 10 (((𝑚 ∈ ℕ0 ∧ ∀𝑦 ∈ Word 𝐵((#‘𝑦) = 𝑚𝜒)) ∧ (𝑥 ∈ Word 𝐵 ∧ (#‘𝑥) = (𝑚 + 1))) → ([(𝑥 substr ⟨0, ((#‘𝑥) − 1)⟩) / 𝑥]𝜑[((𝑥 substr ⟨0, ((#‘𝑥) − 1)⟩) ++ ⟨“( lastS ‘𝑥)”⟩) / 𝑥]𝜑))
7554, 74mpd 15 . . . . . . . . 9 (((𝑚 ∈ ℕ0 ∧ ∀𝑦 ∈ Word 𝐵((#‘𝑦) = 𝑚𝜒)) ∧ (𝑥 ∈ Word 𝐵 ∧ (#‘𝑥) = (𝑚 + 1))) → [((𝑥 substr ⟨0, ((#‘𝑥) − 1)⟩) ++ ⟨“( lastS ‘𝑥)”⟩) / 𝑥]𝜑)
76 wrdfin 13355 . . . . . . . . . . . . . 14 (𝑥 ∈ Word 𝐵𝑥 ∈ Fin)
7776ad2antrl 764 . . . . . . . . . . . . 13 (((𝑚 ∈ ℕ0 ∧ ∀𝑦 ∈ Word 𝐵((#‘𝑦) = 𝑚𝜒)) ∧ (𝑥 ∈ Word 𝐵 ∧ (#‘𝑥) = (𝑚 + 1))) → 𝑥 ∈ Fin)
78 hashnncl 13195 . . . . . . . . . . . . 13 (𝑥 ∈ Fin → ((#‘𝑥) ∈ ℕ ↔ 𝑥 ≠ ∅))
7977, 78syl 17 . . . . . . . . . . . 12 (((𝑚 ∈ ℕ0 ∧ ∀𝑦 ∈ Word 𝐵((#‘𝑦) = 𝑚𝜒)) ∧ (𝑥 ∈ Word 𝐵 ∧ (#‘𝑥) = (𝑚 + 1))) → ((#‘𝑥) ∈ ℕ ↔ 𝑥 ≠ ∅))
8033, 79mpbid 222 . . . . . . . . . . 11 (((𝑚 ∈ ℕ0 ∧ ∀𝑦 ∈ Word 𝐵((#‘𝑦) = 𝑚𝜒)) ∧ (𝑥 ∈ Word 𝐵 ∧ (#‘𝑥) = (𝑚 + 1))) → 𝑥 ≠ ∅)
81 swrdccatwrd 13514 . . . . . . . . . . . 12 ((𝑥 ∈ Word 𝐵𝑥 ≠ ∅) → ((𝑥 substr ⟨0, ((#‘𝑥) − 1)⟩) ++ ⟨“( lastS ‘𝑥)”⟩) = 𝑥)
8281eqcomd 2657 . . . . . . . . . . 11 ((𝑥 ∈ Word 𝐵𝑥 ≠ ∅) → 𝑥 = ((𝑥 substr ⟨0, ((#‘𝑥) − 1)⟩) ++ ⟨“( lastS ‘𝑥)”⟩))
8328, 80, 82syl2anc 694 . . . . . . . . . 10 (((𝑚 ∈ ℕ0 ∧ ∀𝑦 ∈ Word 𝐵((#‘𝑦) = 𝑚𝜒)) ∧ (𝑥 ∈ Word 𝐵 ∧ (#‘𝑥) = (𝑚 + 1))) → 𝑥 = ((𝑥 substr ⟨0, ((#‘𝑥) − 1)⟩) ++ ⟨“( lastS ‘𝑥)”⟩))
84 sbceq1a 3479 . . . . . . . . . 10 (𝑥 = ((𝑥 substr ⟨0, ((#‘𝑥) − 1)⟩) ++ ⟨“( lastS ‘𝑥)”⟩) → (𝜑[((𝑥 substr ⟨0, ((#‘𝑥) − 1)⟩) ++ ⟨“( lastS ‘𝑥)”⟩) / 𝑥]𝜑))
8583, 84syl 17 . . . . . . . . 9 (((𝑚 ∈ ℕ0 ∧ ∀𝑦 ∈ Word 𝐵((#‘𝑦) = 𝑚𝜒)) ∧ (𝑥 ∈ Word 𝐵 ∧ (#‘𝑥) = (𝑚 + 1))) → (𝜑[((𝑥 substr ⟨0, ((#‘𝑥) − 1)⟩) ++ ⟨“( lastS ‘𝑥)”⟩) / 𝑥]𝜑))
8675, 85mpbird 247 . . . . . . . 8 (((𝑚 ∈ ℕ0 ∧ ∀𝑦 ∈ Word 𝐵((#‘𝑦) = 𝑚𝜒)) ∧ (𝑥 ∈ Word 𝐵 ∧ (#‘𝑥) = (𝑚 + 1))) → 𝜑)
8786expr 642 . . . . . . 7 (((𝑚 ∈ ℕ0 ∧ ∀𝑦 ∈ Word 𝐵((#‘𝑦) = 𝑚𝜒)) ∧ 𝑥 ∈ Word 𝐵) → ((#‘𝑥) = (𝑚 + 1) → 𝜑))
8887ralrimiva 2995 . . . . . 6 ((𝑚 ∈ ℕ0 ∧ ∀𝑦 ∈ Word 𝐵((#‘𝑦) = 𝑚𝜒)) → ∀𝑥 ∈ Word 𝐵((#‘𝑥) = (𝑚 + 1) → 𝜑))
8988ex 449 . . . . 5 (𝑚 ∈ ℕ0 → (∀𝑦 ∈ Word 𝐵((#‘𝑦) = 𝑚𝜒) → ∀𝑥 ∈ Word 𝐵((#‘𝑥) = (𝑚 + 1) → 𝜑)))
9024, 89syl5bi 232 . . . 4 (𝑚 ∈ ℕ0 → (∀𝑥 ∈ Word 𝐵((#‘𝑥) = 𝑚𝜑) → ∀𝑥 ∈ Word 𝐵((#‘𝑥) = (𝑚 + 1) → 𝜑)))
914, 7, 10, 13, 19, 90nn0ind 11510 . . 3 ((#‘𝐴) ∈ ℕ0 → ∀𝑥 ∈ Word 𝐵((#‘𝑥) = (#‘𝐴) → 𝜑))
921, 91syl 17 . 2 (𝐴 ∈ Word 𝐵 → ∀𝑥 ∈ Word 𝐵((#‘𝑥) = (#‘𝐴) → 𝜑))
93 eqidd 2652 . 2 (𝐴 ∈ Word 𝐵 → (#‘𝐴) = (#‘𝐴))
94 fveq2 6229 . . . . 5 (𝑥 = 𝐴 → (#‘𝑥) = (#‘𝐴))
9594eqeq1d 2653 . . . 4 (𝑥 = 𝐴 → ((#‘𝑥) = (#‘𝐴) ↔ (#‘𝐴) = (#‘𝐴)))
96 wrdind.4 . . . 4 (𝑥 = 𝐴 → (𝜑𝜏))
9795, 96imbi12d 333 . . 3 (𝑥 = 𝐴 → (((#‘𝑥) = (#‘𝐴) → 𝜑) ↔ ((#‘𝐴) = (#‘𝐴) → 𝜏)))
9897rspcv 3336 . 2 (𝐴 ∈ Word 𝐵 → (∀𝑥 ∈ Word 𝐵((#‘𝑥) = (#‘𝐴) → 𝜑) → ((#‘𝐴) = (#‘𝐴) → 𝜏)))
9992, 93, 98mp2d 49 1 (𝐴 ∈ Word 𝐵𝜏)
Colors of variables: wff setvar class
Syntax hints:  wi 4  wb 196  wa 383   = wceq 1523  wcel 2030  wne 2823  wral 2941  [wsbc 3468  c0 3948  cop 4216   class class class wbr 4685  cfv 5926  (class class class)co 6690  Fincfn 7997  cc 9972  0cc0 9974  1c1 9975   + caddc 9977  cle 10113  cmin 10304  cn 11058  0cn0 11330  ...cfz 12364  ..^cfzo 12504  #chash 13157  Word cword 13323   lastS clsw 13324   ++ cconcat 13325  ⟨“cs1 13326   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-xnn0 11402  df-z 11416  df-uz 11726  df-fz 12365  df-fzo 12505  df-hash 13158  df-word 13331  df-lsw 13332  df-concat 13333  df-s1 13334  df-substr 13335
This theorem is referenced by:  frmdgsum  17446  gsumwrev  17842  gsmsymgrfix  17894  efginvrel2  18186  signstfvneq0  30777  signstfvc  30779  mrsubvrs  31545
  Copyright terms: Public domain W3C validator