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

Theorem wrdind 13647
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 13481 . . 3 (𝐴 ∈ Word 𝐵 → (♯‘𝐴) ∈ ℕ0)
2 eqeq2 2759 . . . . . 6 (𝑛 = 0 → ((♯‘𝑥) = 𝑛 ↔ (♯‘𝑥) = 0))
32imbi1d 330 . . . . 5 (𝑛 = 0 → (((♯‘𝑥) = 𝑛𝜑) ↔ ((♯‘𝑥) = 0 → 𝜑)))
43ralbidv 3112 . . . 4 (𝑛 = 0 → (∀𝑥 ∈ Word 𝐵((♯‘𝑥) = 𝑛𝜑) ↔ ∀𝑥 ∈ Word 𝐵((♯‘𝑥) = 0 → 𝜑)))
5 eqeq2 2759 . . . . . 6 (𝑛 = 𝑚 → ((♯‘𝑥) = 𝑛 ↔ (♯‘𝑥) = 𝑚))
65imbi1d 330 . . . . 5 (𝑛 = 𝑚 → (((♯‘𝑥) = 𝑛𝜑) ↔ ((♯‘𝑥) = 𝑚𝜑)))
76ralbidv 3112 . . . 4 (𝑛 = 𝑚 → (∀𝑥 ∈ Word 𝐵((♯‘𝑥) = 𝑛𝜑) ↔ ∀𝑥 ∈ Word 𝐵((♯‘𝑥) = 𝑚𝜑)))
8 eqeq2 2759 . . . . . 6 (𝑛 = (𝑚 + 1) → ((♯‘𝑥) = 𝑛 ↔ (♯‘𝑥) = (𝑚 + 1)))
98imbi1d 330 . . . . 5 (𝑛 = (𝑚 + 1) → (((♯‘𝑥) = 𝑛𝜑) ↔ ((♯‘𝑥) = (𝑚 + 1) → 𝜑)))
109ralbidv 3112 . . . 4 (𝑛 = (𝑚 + 1) → (∀𝑥 ∈ Word 𝐵((♯‘𝑥) = 𝑛𝜑) ↔ ∀𝑥 ∈ Word 𝐵((♯‘𝑥) = (𝑚 + 1) → 𝜑)))
11 eqeq2 2759 . . . . . 6 (𝑛 = (♯‘𝐴) → ((♯‘𝑥) = 𝑛 ↔ (♯‘𝑥) = (♯‘𝐴)))
1211imbi1d 330 . . . . 5 (𝑛 = (♯‘𝐴) → (((♯‘𝑥) = 𝑛𝜑) ↔ ((♯‘𝑥) = (♯‘𝐴) → 𝜑)))
1312ralbidv 3112 . . . 4 (𝑛 = (♯‘𝐴) → (∀𝑥 ∈ Word 𝐵((♯‘𝑥) = 𝑛𝜑) ↔ ∀𝑥 ∈ Word 𝐵((♯‘𝑥) = (♯‘𝐴) → 𝜑)))
14 hasheq0 13317 . . . . . 6 (𝑥 ∈ Word 𝐵 → ((♯‘𝑥) = 0 ↔ 𝑥 = ∅))
15 wrdind.5 . . . . . . 7 𝜓
16 wrdind.1 . . . . . . 7 (𝑥 = ∅ → (𝜑𝜓))
1715, 16mpbiri 248 . . . . . 6 (𝑥 = ∅ → 𝜑)
1814, 17syl6bi 243 . . . . 5 (𝑥 ∈ Word 𝐵 → ((♯‘𝑥) = 0 → 𝜑))
1918rgen 3048 . . . 4 𝑥 ∈ Word 𝐵((♯‘𝑥) = 0 → 𝜑)
20 fveq2 6340 . . . . . . . 8 (𝑥 = 𝑦 → (♯‘𝑥) = (♯‘𝑦))
2120eqeq1d 2750 . . . . . . 7 (𝑥 = 𝑦 → ((♯‘𝑥) = 𝑚 ↔ (♯‘𝑦) = 𝑚))
22 wrdind.2 . . . . . . 7 (𝑥 = 𝑦 → (𝜑𝜒))
2321, 22imbi12d 333 . . . . . 6 (𝑥 = 𝑦 → (((♯‘𝑥) = 𝑚𝜑) ↔ ((♯‘𝑦) = 𝑚𝜒)))
2423cbvralv 3298 . . . . 5 (∀𝑥 ∈ Word 𝐵((♯‘𝑥) = 𝑚𝜑) ↔ ∀𝑦 ∈ Word 𝐵((♯‘𝑦) = 𝑚𝜒))
25 swrdcl 13589 . . . . . . . . . . . 12 (𝑥 ∈ Word 𝐵 → (𝑥 substr ⟨0, ((♯‘𝑥) − 1)⟩) ∈ Word 𝐵)
2625ad2antrl 766 . . . . . . . . . . 11 (((𝑚 ∈ ℕ0 ∧ ∀𝑦 ∈ Word 𝐵((♯‘𝑦) = 𝑚𝜒)) ∧ (𝑥 ∈ Word 𝐵 ∧ (♯‘𝑥) = (𝑚 + 1))) → (𝑥 substr ⟨0, ((♯‘𝑥) − 1)⟩) ∈ Word 𝐵)
27 simplr 809 . . . . . . . . . . 11 (((𝑚 ∈ ℕ0 ∧ ∀𝑦 ∈ Word 𝐵((♯‘𝑦) = 𝑚𝜒)) ∧ (𝑥 ∈ Word 𝐵 ∧ (♯‘𝑥) = (𝑚 + 1))) → ∀𝑦 ∈ Word 𝐵((♯‘𝑦) = 𝑚𝜒))
28 simprl 811 . . . . . . . . . . . . 13 (((𝑚 ∈ ℕ0 ∧ ∀𝑦 ∈ Word 𝐵((♯‘𝑦) = 𝑚𝜒)) ∧ (𝑥 ∈ Word 𝐵 ∧ (♯‘𝑥) = (𝑚 + 1))) → 𝑥 ∈ Word 𝐵)
29 fzossfz 12653 . . . . . . . . . . . . . 14 (0..^(♯‘𝑥)) ⊆ (0...(♯‘𝑥))
30 simprr 813 . . . . . . . . . . . . . . . 16 (((𝑚 ∈ ℕ0 ∧ ∀𝑦 ∈ Word 𝐵((♯‘𝑦) = 𝑚𝜒)) ∧ (𝑥 ∈ Word 𝐵 ∧ (♯‘𝑥) = (𝑚 + 1))) → (♯‘𝑥) = (𝑚 + 1))
31 nn0p1nn 11495 . . . . . . . . . . . . . . . . 17 (𝑚 ∈ ℕ0 → (𝑚 + 1) ∈ ℕ)
3231ad2antrr 764 . . . . . . . . . . . . . . . 16 (((𝑚 ∈ ℕ0 ∧ ∀𝑦 ∈ Word 𝐵((♯‘𝑦) = 𝑚𝜒)) ∧ (𝑥 ∈ Word 𝐵 ∧ (♯‘𝑥) = (𝑚 + 1))) → (𝑚 + 1) ∈ ℕ)
3330, 32eqeltrd 2827 . . . . . . . . . . . . . . 15 (((𝑚 ∈ ℕ0 ∧ ∀𝑦 ∈ Word 𝐵((♯‘𝑦) = 𝑚𝜒)) ∧ (𝑥 ∈ Word 𝐵 ∧ (♯‘𝑥) = (𝑚 + 1))) → (♯‘𝑥) ∈ ℕ)
34 fzo0end 12725 . . . . . . . . . . . . . . 15 ((♯‘𝑥) ∈ ℕ → ((♯‘𝑥) − 1) ∈ (0..^(♯‘𝑥)))
3533, 34syl 17 . . . . . . . . . . . . . 14 (((𝑚 ∈ ℕ0 ∧ ∀𝑦 ∈ Word 𝐵((♯‘𝑦) = 𝑚𝜒)) ∧ (𝑥 ∈ Word 𝐵 ∧ (♯‘𝑥) = (𝑚 + 1))) → ((♯‘𝑥) − 1) ∈ (0..^(♯‘𝑥)))
3629, 35sseldi 3730 . . . . . . . . . . . . 13 (((𝑚 ∈ ℕ0 ∧ ∀𝑦 ∈ Word 𝐵((♯‘𝑦) = 𝑚𝜒)) ∧ (𝑥 ∈ Word 𝐵 ∧ (♯‘𝑥) = (𝑚 + 1))) → ((♯‘𝑥) − 1) ∈ (0...(♯‘𝑥)))
37 swrd0len 13592 . . . . . . . . . . . . 13 ((𝑥 ∈ Word 𝐵 ∧ ((♯‘𝑥) − 1) ∈ (0...(♯‘𝑥))) → (♯‘(𝑥 substr ⟨0, ((♯‘𝑥) − 1)⟩)) = ((♯‘𝑥) − 1))
3828, 36, 37syl2anc 696 . . . . . . . . . . . 12 (((𝑚 ∈ ℕ0 ∧ ∀𝑦 ∈ Word 𝐵((♯‘𝑦) = 𝑚𝜒)) ∧ (𝑥 ∈ Word 𝐵 ∧ (♯‘𝑥) = (𝑚 + 1))) → (♯‘(𝑥 substr ⟨0, ((♯‘𝑥) − 1)⟩)) = ((♯‘𝑥) − 1))
3930oveq1d 6816 . . . . . . . . . . . 12 (((𝑚 ∈ ℕ0 ∧ ∀𝑦 ∈ Word 𝐵((♯‘𝑦) = 𝑚𝜒)) ∧ (𝑥 ∈ Word 𝐵 ∧ (♯‘𝑥) = (𝑚 + 1))) → ((♯‘𝑥) − 1) = ((𝑚 + 1) − 1))
40 nn0cn 11465 . . . . . . . . . . . . . 14 (𝑚 ∈ ℕ0𝑚 ∈ ℂ)
4140ad2antrr 764 . . . . . . . . . . . . 13 (((𝑚 ∈ ℕ0 ∧ ∀𝑦 ∈ Word 𝐵((♯‘𝑦) = 𝑚𝜒)) ∧ (𝑥 ∈ Word 𝐵 ∧ (♯‘𝑥) = (𝑚 + 1))) → 𝑚 ∈ ℂ)
42 ax-1cn 10157 . . . . . . . . . . . . 13 1 ∈ ℂ
43 pncan 10450 . . . . . . . . . . . . 13 ((𝑚 ∈ ℂ ∧ 1 ∈ ℂ) → ((𝑚 + 1) − 1) = 𝑚)
4441, 42, 43sylancl 697 . . . . . . . . . . . 12 (((𝑚 ∈ ℕ0 ∧ ∀𝑦 ∈ Word 𝐵((♯‘𝑦) = 𝑚𝜒)) ∧ (𝑥 ∈ Word 𝐵 ∧ (♯‘𝑥) = (𝑚 + 1))) → ((𝑚 + 1) − 1) = 𝑚)
4538, 39, 443eqtrd 2786 . . . . . . . . . . 11 (((𝑚 ∈ ℕ0 ∧ ∀𝑦 ∈ Word 𝐵((♯‘𝑦) = 𝑚𝜒)) ∧ (𝑥 ∈ Word 𝐵 ∧ (♯‘𝑥) = (𝑚 + 1))) → (♯‘(𝑥 substr ⟨0, ((♯‘𝑥) − 1)⟩)) = 𝑚)
46 fveq2 6340 . . . . . . . . . . . . . 14 (𝑦 = (𝑥 substr ⟨0, ((♯‘𝑥) − 1)⟩) → (♯‘𝑦) = (♯‘(𝑥 substr ⟨0, ((♯‘𝑥) − 1)⟩)))
4746eqeq1d 2750 . . . . . . . . . . . . 13 (𝑦 = (𝑥 substr ⟨0, ((♯‘𝑥) − 1)⟩) → ((♯‘𝑦) = 𝑚 ↔ (♯‘(𝑥 substr ⟨0, ((♯‘𝑥) − 1)⟩)) = 𝑚))
48 vex 3331 . . . . . . . . . . . . . . 15 𝑦 ∈ V
4948, 22sbcie 3599 . . . . . . . . . . . . . 14 ([𝑦 / 𝑥]𝜑𝜒)
50 dfsbcq 3566 . . . . . . . . . . . . . 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 3433 . . . . . . . . . . 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 11226 . . . . . . . . . . . . 13 (((𝑚 ∈ ℕ0 ∧ ∀𝑦 ∈ Word 𝐵((♯‘𝑦) = 𝑚𝜒)) ∧ (𝑥 ∈ Word 𝐵 ∧ (♯‘𝑥) = (𝑚 + 1))) → 1 ≤ (♯‘𝑥))
56 wrdlenge1n0 13497 . . . . . . . . . . . . . 14 (𝑥 ∈ Word 𝐵 → (𝑥 ≠ ∅ ↔ 1 ≤ (♯‘𝑥)))
5756ad2antrl 766 . . . . . . . . . . . . 13 (((𝑚 ∈ ℕ0 ∧ ∀𝑦 ∈ Word 𝐵((♯‘𝑦) = 𝑚𝜒)) ∧ (𝑥 ∈ Word 𝐵 ∧ (♯‘𝑥) = (𝑚 + 1))) → (𝑥 ≠ ∅ ↔ 1 ≤ (♯‘𝑥)))
5855, 57mpbird 247 . . . . . . . . . . . 12 (((𝑚 ∈ ℕ0 ∧ ∀𝑦 ∈ Word 𝐵((♯‘𝑦) = 𝑚𝜒)) ∧ (𝑥 ∈ Word 𝐵 ∧ (♯‘𝑥) = (𝑚 + 1))) → 𝑥 ≠ ∅)
59 lswcl 13513 . . . . . . . . . . . 12 ((𝑥 ∈ Word 𝐵𝑥 ≠ ∅) → ( lastS ‘𝑥) ∈ 𝐵)
6028, 58, 59syl2anc 696 . . . . . . . . . . 11 (((𝑚 ∈ ℕ0 ∧ ∀𝑦 ∈ Word 𝐵((♯‘𝑦) = 𝑚𝜒)) ∧ (𝑥 ∈ Word 𝐵 ∧ (♯‘𝑥) = (𝑚 + 1))) → ( lastS ‘𝑥) ∈ 𝐵)
61 oveq1 6808 . . . . . . . . . . . . . 14 (𝑦 = (𝑥 substr ⟨0, ((♯‘𝑥) − 1)⟩) → (𝑦 ++ ⟨“𝑧”⟩) = ((𝑥 substr ⟨0, ((♯‘𝑥) − 1)⟩) ++ ⟨“𝑧”⟩))
6261sbceq1d 3569 . . . . . . . . . . . . 13 (𝑦 = (𝑥 substr ⟨0, ((♯‘𝑥) − 1)⟩) → ([(𝑦 ++ ⟨“𝑧”⟩) / 𝑥]𝜑[((𝑥 substr ⟨0, ((♯‘𝑥) − 1)⟩) ++ ⟨“𝑧”⟩) / 𝑥]𝜑))
6350, 62imbi12d 333 . . . . . . . . . . . 12 (𝑦 = (𝑥 substr ⟨0, ((♯‘𝑥) − 1)⟩) → (([𝑦 / 𝑥]𝜑[(𝑦 ++ ⟨“𝑧”⟩) / 𝑥]𝜑) ↔ ([(𝑥 substr ⟨0, ((♯‘𝑥) − 1)⟩) / 𝑥]𝜑[((𝑥 substr ⟨0, ((♯‘𝑥) − 1)⟩) ++ ⟨“𝑧”⟩) / 𝑥]𝜑)))
64 s1eq 13541 . . . . . . . . . . . . . . 15 (𝑧 = ( lastS ‘𝑥) → ⟨“𝑧”⟩ = ⟨“( lastS ‘𝑥)”⟩)
6564oveq2d 6817 . . . . . . . . . . . . . 14 (𝑧 = ( lastS ‘𝑥) → ((𝑥 substr ⟨0, ((♯‘𝑥) − 1)⟩) ++ ⟨“𝑧”⟩) = ((𝑥 substr ⟨0, ((♯‘𝑥) − 1)⟩) ++ ⟨“( lastS ‘𝑥)”⟩))
6665sbceq1d 3569 . . . . . . . . . . . . 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 6829 . . . . . . . . . . . . . 14 (𝑦 ++ ⟨“𝑧”⟩) ∈ V
70 wrdind.3 . . . . . . . . . . . . . 14 (𝑥 = (𝑦 ++ ⟨“𝑧”⟩) → (𝜑𝜃))
7169, 70sbcie 3599 . . . . . . . . . . . . 13 ([(𝑦 ++ ⟨“𝑧”⟩) / 𝑥]𝜑𝜃)
7268, 49, 713imtr4g 285 . . . . . . . . . . . 12 ((𝑦 ∈ Word 𝐵𝑧𝐵) → ([𝑦 / 𝑥]𝜑[(𝑦 ++ ⟨“𝑧”⟩) / 𝑥]𝜑))
7363, 67, 72vtocl2ga 3402 . . . . . . . . . . 11 (((𝑥 substr ⟨0, ((♯‘𝑥) − 1)⟩) ∈ Word 𝐵 ∧ ( lastS ‘𝑥) ∈ 𝐵) → ([(𝑥 substr ⟨0, ((♯‘𝑥) − 1)⟩) / 𝑥]𝜑[((𝑥 substr ⟨0, ((♯‘𝑥) − 1)⟩) ++ ⟨“( lastS ‘𝑥)”⟩) / 𝑥]𝜑))
7426, 60, 73syl2anc 696 . . . . . . . . . 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 13480 . . . . . . . . . . . . . 14 (𝑥 ∈ Word 𝐵𝑥 ∈ Fin)
7776ad2antrl 766 . . . . . . . . . . . . 13 (((𝑚 ∈ ℕ0 ∧ ∀𝑦 ∈ Word 𝐵((♯‘𝑦) = 𝑚𝜒)) ∧ (𝑥 ∈ Word 𝐵 ∧ (♯‘𝑥) = (𝑚 + 1))) → 𝑥 ∈ Fin)
78 hashnncl 13320 . . . . . . . . . . . . 13 (𝑥 ∈ Fin → ((♯‘𝑥) ∈ ℕ ↔ 𝑥 ≠ ∅))
7977, 78syl 17 . . . . . . . . . . . 12 (((𝑚 ∈ ℕ0 ∧ ∀𝑦 ∈ Word 𝐵((♯‘𝑦) = 𝑚𝜒)) ∧ (𝑥 ∈ Word 𝐵 ∧ (♯‘𝑥) = (𝑚 + 1))) → ((♯‘𝑥) ∈ ℕ ↔ 𝑥 ≠ ∅))
8033, 79mpbid 222 . . . . . . . . . . 11 (((𝑚 ∈ ℕ0 ∧ ∀𝑦 ∈ Word 𝐵((♯‘𝑦) = 𝑚𝜒)) ∧ (𝑥 ∈ Word 𝐵 ∧ (♯‘𝑥) = (𝑚 + 1))) → 𝑥 ≠ ∅)
81 swrdccatwrd 13639 . . . . . . . . . . . 12 ((𝑥 ∈ Word 𝐵𝑥 ≠ ∅) → ((𝑥 substr ⟨0, ((♯‘𝑥) − 1)⟩) ++ ⟨“( lastS ‘𝑥)”⟩) = 𝑥)
8281eqcomd 2754 . . . . . . . . . . 11 ((𝑥 ∈ Word 𝐵𝑥 ≠ ∅) → 𝑥 = ((𝑥 substr ⟨0, ((♯‘𝑥) − 1)⟩) ++ ⟨“( lastS ‘𝑥)”⟩))
8328, 80, 82syl2anc 696 . . . . . . . . . 10 (((𝑚 ∈ ℕ0 ∧ ∀𝑦 ∈ Word 𝐵((♯‘𝑦) = 𝑚𝜒)) ∧ (𝑥 ∈ Word 𝐵 ∧ (♯‘𝑥) = (𝑚 + 1))) → 𝑥 = ((𝑥 substr ⟨0, ((♯‘𝑥) − 1)⟩) ++ ⟨“( lastS ‘𝑥)”⟩))
84 sbceq1a 3575 . . . . . . . . . 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 644 . . . . . . 7 (((𝑚 ∈ ℕ0 ∧ ∀𝑦 ∈ Word 𝐵((♯‘𝑦) = 𝑚𝜒)) ∧ 𝑥 ∈ Word 𝐵) → ((♯‘𝑥) = (𝑚 + 1) → 𝜑))
8887ralrimiva 3092 . . . . . 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 11635 . . 3 ((♯‘𝐴) ∈ ℕ0 → ∀𝑥 ∈ Word 𝐵((♯‘𝑥) = (♯‘𝐴) → 𝜑))
921, 91syl 17 . 2 (𝐴 ∈ Word 𝐵 → ∀𝑥 ∈ Word 𝐵((♯‘𝑥) = (♯‘𝐴) → 𝜑))
93 eqidd 2749 . 2 (𝐴 ∈ Word 𝐵 → (♯‘𝐴) = (♯‘𝐴))
94 fveq2 6340 . . . . 5 (𝑥 = 𝐴 → (♯‘𝑥) = (♯‘𝐴))
9594eqeq1d 2750 . . . 4 (𝑥 = 𝐴 → ((♯‘𝑥) = (♯‘𝐴) ↔ (♯‘𝐴) = (♯‘𝐴)))
96 wrdind.4 . . . 4 (𝑥 = 𝐴 → (𝜑𝜏))
9795, 96imbi12d 333 . . 3 (𝑥 = 𝐴 → (((♯‘𝑥) = (♯‘𝐴) → 𝜑) ↔ ((♯‘𝐴) = (♯‘𝐴) → 𝜏)))
9897rspcv 3433 . 2 (𝐴 ∈ Word 𝐵 → (∀𝑥 ∈ Word 𝐵((♯‘𝑥) = (♯‘𝐴) → 𝜑) → ((♯‘𝐴) = (♯‘𝐴) → 𝜏)))
9992, 93, 98mp2d 49 1 (𝐴 ∈ Word 𝐵𝜏)
Colors of variables: wff setvar class
Syntax hints:  wi 4  wb 196  wa 383   = wceq 1620  wcel 2127  wne 2920  wral 3038  [wsbc 3564  c0 4046  cop 4315   class class class wbr 4792  cfv 6037  (class class class)co 6801  Fincfn 8109  cc 10097  0cc0 10099  1c1 10100   + caddc 10102  cle 10238  cmin 10429  cn 11183  0cn0 11455  ...cfz 12490  ..^cfzo 12630  chash 13282  Word cword 13448   lastS clsw 13449   ++ cconcat 13450  ⟨“cs1 13451   substr csubstr 13452
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1859  ax-4 1874  ax-5 1976  ax-6 2042  ax-7 2078  ax-8 2129  ax-9 2136  ax-10 2156  ax-11 2171  ax-12 2184  ax-13 2379  ax-ext 2728  ax-rep 4911  ax-sep 4921  ax-nul 4929  ax-pow 4980  ax-pr 5043  ax-un 7102  ax-cnex 10155  ax-resscn 10156  ax-1cn 10157  ax-icn 10158  ax-addcl 10159  ax-addrcl 10160  ax-mulcl 10161  ax-mulrcl 10162  ax-mulcom 10163  ax-addass 10164  ax-mulass 10165  ax-distr 10166  ax-i2m1 10167  ax-1ne0 10168  ax-1rid 10169  ax-rnegex 10170  ax-rrecex 10171  ax-cnre 10172  ax-pre-lttri 10173  ax-pre-lttrn 10174  ax-pre-ltadd 10175  ax-pre-mulgt0 10176
This theorem depends on definitions:  df-bi 197  df-or 384  df-an 385  df-3or 1073  df-3an 1074  df-tru 1623  df-ex 1842  df-nf 1847  df-sb 2035  df-eu 2599  df-mo 2600  df-clab 2735  df-cleq 2741  df-clel 2744  df-nfc 2879  df-ne 2921  df-nel 3024  df-ral 3043  df-rex 3044  df-reu 3045  df-rab 3047  df-v 3330  df-sbc 3565  df-csb 3663  df-dif 3706  df-un 3708  df-in 3710  df-ss 3717  df-pss 3719  df-nul 4047  df-if 4219  df-pw 4292  df-sn 4310  df-pr 4312  df-tp 4314  df-op 4316  df-uni 4577  df-int 4616  df-iun 4662  df-br 4793  df-opab 4853  df-mpt 4870  df-tr 4893  df-id 5162  df-eprel 5167  df-po 5175  df-so 5176  df-fr 5213  df-we 5215  df-xp 5260  df-rel 5261  df-cnv 5262  df-co 5263  df-dm 5264  df-rn 5265  df-res 5266  df-ima 5267  df-pred 5829  df-ord 5875  df-on 5876  df-lim 5877  df-suc 5878  df-iota 6000  df-fun 6039  df-fn 6040  df-f 6041  df-f1 6042  df-fo 6043  df-f1o 6044  df-fv 6045  df-riota 6762  df-ov 6804  df-oprab 6805  df-mpt2 6806  df-om 7219  df-1st 7321  df-2nd 7322  df-wrecs 7564  df-recs 7625  df-rdg 7663  df-1o 7717  df-oadd 7721  df-er 7899  df-en 8110  df-dom 8111  df-sdom 8112  df-fin 8113  df-card 8926  df-pnf 10239  df-mnf 10240  df-xr 10241  df-ltxr 10242  df-le 10243  df-sub 10431  df-neg 10432  df-nn 11184  df-n0 11456  df-xnn0 11527  df-z 11541  df-uz 11851  df-fz 12491  df-fzo 12631  df-hash 13283  df-word 13456  df-lsw 13457  df-concat 13458  df-s1 13459  df-substr 13460
This theorem is referenced by:  frmdgsum  17571  gsumwrev  17967  gsmsymgrfix  18019  efginvrel2  18311  signstfvneq0  30929  signstfvc  30931  mrsubvrs  31697
  Copyright terms: Public domain W3C validator