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

Theorem wrd2ind 13415
Description: Perform induction over the structure of two words of the same length. (Contributed by AV, 23-Jan-2019.)
Hypotheses
Ref Expression
wrd2ind.1 ((𝑥 = ∅ ∧ 𝑤 = ∅) → (𝜑𝜓))
wrd2ind.2 ((𝑥 = 𝑦𝑤 = 𝑢) → (𝜑𝜒))
wrd2ind.3 ((𝑥 = (𝑦 ++ ⟨“𝑧”⟩) ∧ 𝑤 = (𝑢 ++ ⟨“𝑠”⟩)) → (𝜑𝜃))
wrd2ind.4 (𝑥 = 𝐴 → (𝜌𝜏))
wrd2ind.5 (𝑤 = 𝐵 → (𝜑𝜌))
wrd2ind.6 𝜓
wrd2ind.7 (((𝑦 ∈ Word 𝑋𝑧𝑋) ∧ (𝑢 ∈ Word 𝑌𝑠𝑌) ∧ (#‘𝑦) = (#‘𝑢)) → (𝜒𝜃))
Assertion
Ref Expression
wrd2ind ((𝐴 ∈ Word 𝑋𝐵 ∈ Word 𝑌 ∧ (#‘𝐴) = (#‘𝐵)) → 𝜏)
Distinct variable groups:   𝑥,𝑤,𝐴   𝑦,𝑤,𝑧,𝐵,𝑥   𝑢,𝑠,𝑤,𝑥,𝑦,𝑧,𝑋   𝑌,𝑠,𝑢,𝑤,𝑥,𝑦,𝑧   𝜒,𝑤,𝑥   𝜑,𝑠,𝑢,𝑦,𝑧   𝜏,𝑥   𝜃,𝑤,𝑥   𝜌,𝑤
Allowed substitution hints:   𝜑(𝑥,𝑤)   𝜓(𝑥,𝑦,𝑧,𝑤,𝑢,𝑠)   𝜒(𝑦,𝑧,𝑢,𝑠)   𝜃(𝑦,𝑧,𝑢,𝑠)   𝜏(𝑦,𝑧,𝑤,𝑢,𝑠)   𝜌(𝑥,𝑦,𝑧,𝑢,𝑠)   𝐴(𝑦,𝑧,𝑢,𝑠)   𝐵(𝑢,𝑠)

Proof of Theorem wrd2ind
Dummy variables 𝑛 𝑚 are mutually distinct and distinct from all other variables.
StepHypRef Expression
1 lencl 13263 . . . . 5 (𝐴 ∈ Word 𝑋 → (#‘𝐴) ∈ ℕ0)
2 eqeq2 2632 . . . . . . . . 9 (𝑛 = 0 → ((#‘𝑥) = 𝑛 ↔ (#‘𝑥) = 0))
32anbi2d 739 . . . . . . . 8 (𝑛 = 0 → (((#‘𝑥) = (#‘𝑤) ∧ (#‘𝑥) = 𝑛) ↔ ((#‘𝑥) = (#‘𝑤) ∧ (#‘𝑥) = 0)))
43imbi1d 331 . . . . . . 7 (𝑛 = 0 → ((((#‘𝑥) = (#‘𝑤) ∧ (#‘𝑥) = 𝑛) → 𝜑) ↔ (((#‘𝑥) = (#‘𝑤) ∧ (#‘𝑥) = 0) → 𝜑)))
542ralbidv 2983 . . . . . 6 (𝑛 = 0 → (∀𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋(((#‘𝑥) = (#‘𝑤) ∧ (#‘𝑥) = 𝑛) → 𝜑) ↔ ∀𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋(((#‘𝑥) = (#‘𝑤) ∧ (#‘𝑥) = 0) → 𝜑)))
6 eqeq2 2632 . . . . . . . . 9 (𝑛 = 𝑚 → ((#‘𝑥) = 𝑛 ↔ (#‘𝑥) = 𝑚))
76anbi2d 739 . . . . . . . 8 (𝑛 = 𝑚 → (((#‘𝑥) = (#‘𝑤) ∧ (#‘𝑥) = 𝑛) ↔ ((#‘𝑥) = (#‘𝑤) ∧ (#‘𝑥) = 𝑚)))
87imbi1d 331 . . . . . . 7 (𝑛 = 𝑚 → ((((#‘𝑥) = (#‘𝑤) ∧ (#‘𝑥) = 𝑛) → 𝜑) ↔ (((#‘𝑥) = (#‘𝑤) ∧ (#‘𝑥) = 𝑚) → 𝜑)))
982ralbidv 2983 . . . . . 6 (𝑛 = 𝑚 → (∀𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋(((#‘𝑥) = (#‘𝑤) ∧ (#‘𝑥) = 𝑛) → 𝜑) ↔ ∀𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋(((#‘𝑥) = (#‘𝑤) ∧ (#‘𝑥) = 𝑚) → 𝜑)))
10 eqeq2 2632 . . . . . . . . 9 (𝑛 = (𝑚 + 1) → ((#‘𝑥) = 𝑛 ↔ (#‘𝑥) = (𝑚 + 1)))
1110anbi2d 739 . . . . . . . 8 (𝑛 = (𝑚 + 1) → (((#‘𝑥) = (#‘𝑤) ∧ (#‘𝑥) = 𝑛) ↔ ((#‘𝑥) = (#‘𝑤) ∧ (#‘𝑥) = (𝑚 + 1))))
1211imbi1d 331 . . . . . . 7 (𝑛 = (𝑚 + 1) → ((((#‘𝑥) = (#‘𝑤) ∧ (#‘𝑥) = 𝑛) → 𝜑) ↔ (((#‘𝑥) = (#‘𝑤) ∧ (#‘𝑥) = (𝑚 + 1)) → 𝜑)))
13122ralbidv 2983 . . . . . 6 (𝑛 = (𝑚 + 1) → (∀𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋(((#‘𝑥) = (#‘𝑤) ∧ (#‘𝑥) = 𝑛) → 𝜑) ↔ ∀𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋(((#‘𝑥) = (#‘𝑤) ∧ (#‘𝑥) = (𝑚 + 1)) → 𝜑)))
14 eqeq2 2632 . . . . . . . . 9 (𝑛 = (#‘𝐴) → ((#‘𝑥) = 𝑛 ↔ (#‘𝑥) = (#‘𝐴)))
1514anbi2d 739 . . . . . . . 8 (𝑛 = (#‘𝐴) → (((#‘𝑥) = (#‘𝑤) ∧ (#‘𝑥) = 𝑛) ↔ ((#‘𝑥) = (#‘𝑤) ∧ (#‘𝑥) = (#‘𝐴))))
1615imbi1d 331 . . . . . . 7 (𝑛 = (#‘𝐴) → ((((#‘𝑥) = (#‘𝑤) ∧ (#‘𝑥) = 𝑛) → 𝜑) ↔ (((#‘𝑥) = (#‘𝑤) ∧ (#‘𝑥) = (#‘𝐴)) → 𝜑)))
17162ralbidv 2983 . . . . . 6 (𝑛 = (#‘𝐴) → (∀𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋(((#‘𝑥) = (#‘𝑤) ∧ (#‘𝑥) = 𝑛) → 𝜑) ↔ ∀𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋(((#‘𝑥) = (#‘𝑤) ∧ (#‘𝑥) = (#‘𝐴)) → 𝜑)))
18 eqeq1 2625 . . . . . . . . . . . 12 ((#‘𝑥) = 0 → ((#‘𝑥) = (#‘𝑤) ↔ 0 = (#‘𝑤)))
1918adantl 482 . . . . . . . . . . 11 (((𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋) ∧ (#‘𝑥) = 0) → ((#‘𝑥) = (#‘𝑤) ↔ 0 = (#‘𝑤)))
20 eqcom 2628 . . . . . . . . . . . . . . 15 (0 = (#‘𝑤) ↔ (#‘𝑤) = 0)
21 hasheq0 13094 . . . . . . . . . . . . . . 15 (𝑤 ∈ Word 𝑌 → ((#‘𝑤) = 0 ↔ 𝑤 = ∅))
2220, 21syl5bb 272 . . . . . . . . . . . . . 14 (𝑤 ∈ Word 𝑌 → (0 = (#‘𝑤) ↔ 𝑤 = ∅))
23 hasheq0 13094 . . . . . . . . . . . . . . . 16 (𝑥 ∈ Word 𝑋 → ((#‘𝑥) = 0 ↔ 𝑥 = ∅))
24 wrd2ind.6 . . . . . . . . . . . . . . . . . 18 𝜓
25 wrd2ind.1 . . . . . . . . . . . . . . . . . 18 ((𝑥 = ∅ ∧ 𝑤 = ∅) → (𝜑𝜓))
2624, 25mpbiri 248 . . . . . . . . . . . . . . . . 17 ((𝑥 = ∅ ∧ 𝑤 = ∅) → 𝜑)
2726ex 450 . . . . . . . . . . . . . . . 16 (𝑥 = ∅ → (𝑤 = ∅ → 𝜑))
2823, 27syl6bi 243 . . . . . . . . . . . . . . 15 (𝑥 ∈ Word 𝑋 → ((#‘𝑥) = 0 → (𝑤 = ∅ → 𝜑)))
2928com13 88 . . . . . . . . . . . . . 14 (𝑤 = ∅ → ((#‘𝑥) = 0 → (𝑥 ∈ Word 𝑋𝜑)))
3022, 29syl6bi 243 . . . . . . . . . . . . 13 (𝑤 ∈ Word 𝑌 → (0 = (#‘𝑤) → ((#‘𝑥) = 0 → (𝑥 ∈ Word 𝑋𝜑))))
3130com24 95 . . . . . . . . . . . 12 (𝑤 ∈ Word 𝑌 → (𝑥 ∈ Word 𝑋 → ((#‘𝑥) = 0 → (0 = (#‘𝑤) → 𝜑))))
3231imp31 448 . . . . . . . . . . 11 (((𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋) ∧ (#‘𝑥) = 0) → (0 = (#‘𝑤) → 𝜑))
3319, 32sylbid 230 . . . . . . . . . 10 (((𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋) ∧ (#‘𝑥) = 0) → ((#‘𝑥) = (#‘𝑤) → 𝜑))
3433ex 450 . . . . . . . . 9 ((𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋) → ((#‘𝑥) = 0 → ((#‘𝑥) = (#‘𝑤) → 𝜑)))
3534com23 86 . . . . . . . 8 ((𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋) → ((#‘𝑥) = (#‘𝑤) → ((#‘𝑥) = 0 → 𝜑)))
3635impd 447 . . . . . . 7 ((𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋) → (((#‘𝑥) = (#‘𝑤) ∧ (#‘𝑥) = 0) → 𝜑))
3736rgen2 2969 . . . . . 6 𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋(((#‘𝑥) = (#‘𝑤) ∧ (#‘𝑥) = 0) → 𝜑)
38 fveq2 6148 . . . . . . . . . . . . 13 (𝑥 = 𝑦 → (#‘𝑥) = (#‘𝑦))
39 fveq2 6148 . . . . . . . . . . . . 13 (𝑤 = 𝑢 → (#‘𝑤) = (#‘𝑢))
4038, 39eqeqan12d 2637 . . . . . . . . . . . 12 ((𝑥 = 𝑦𝑤 = 𝑢) → ((#‘𝑥) = (#‘𝑤) ↔ (#‘𝑦) = (#‘𝑢)))
4138eqeq1d 2623 . . . . . . . . . . . . 13 (𝑥 = 𝑦 → ((#‘𝑥) = 𝑚 ↔ (#‘𝑦) = 𝑚))
4241adantr 481 . . . . . . . . . . . 12 ((𝑥 = 𝑦𝑤 = 𝑢) → ((#‘𝑥) = 𝑚 ↔ (#‘𝑦) = 𝑚))
4340, 42anbi12d 746 . . . . . . . . . . 11 ((𝑥 = 𝑦𝑤 = 𝑢) → (((#‘𝑥) = (#‘𝑤) ∧ (#‘𝑥) = 𝑚) ↔ ((#‘𝑦) = (#‘𝑢) ∧ (#‘𝑦) = 𝑚)))
44 wrd2ind.2 . . . . . . . . . . 11 ((𝑥 = 𝑦𝑤 = 𝑢) → (𝜑𝜒))
4543, 44imbi12d 334 . . . . . . . . . 10 ((𝑥 = 𝑦𝑤 = 𝑢) → ((((#‘𝑥) = (#‘𝑤) ∧ (#‘𝑥) = 𝑚) → 𝜑) ↔ (((#‘𝑦) = (#‘𝑢) ∧ (#‘𝑦) = 𝑚) → 𝜒)))
4645ancoms 469 . . . . . . . . 9 ((𝑤 = 𝑢𝑥 = 𝑦) → ((((#‘𝑥) = (#‘𝑤) ∧ (#‘𝑥) = 𝑚) → 𝜑) ↔ (((#‘𝑦) = (#‘𝑢) ∧ (#‘𝑦) = 𝑚) → 𝜒)))
4746cbvraldva 3165 . . . . . . . 8 (𝑤 = 𝑢 → (∀𝑥 ∈ Word 𝑋(((#‘𝑥) = (#‘𝑤) ∧ (#‘𝑥) = 𝑚) → 𝜑) ↔ ∀𝑦 ∈ Word 𝑋(((#‘𝑦) = (#‘𝑢) ∧ (#‘𝑦) = 𝑚) → 𝜒)))
4847cbvralv 3159 . . . . . . 7 (∀𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋(((#‘𝑥) = (#‘𝑤) ∧ (#‘𝑥) = 𝑚) → 𝜑) ↔ ∀𝑢 ∈ Word 𝑌𝑦 ∈ Word 𝑋(((#‘𝑦) = (#‘𝑢) ∧ (#‘𝑦) = 𝑚) → 𝜒))
49 swrdcl 13357 . . . . . . . . . . . . . . . . 17 (𝑤 ∈ Word 𝑌 → (𝑤 substr ⟨0, ((#‘𝑤) − 1)⟩) ∈ Word 𝑌)
5049adantr 481 . . . . . . . . . . . . . . . 16 ((𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋) → (𝑤 substr ⟨0, ((#‘𝑤) − 1)⟩) ∈ Word 𝑌)
5150ad2antrl 763 . . . . . . . . . . . . . . 15 ((𝑚 ∈ ℕ0 ∧ ((𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋) ∧ ((#‘𝑥) = (#‘𝑤) ∧ (#‘𝑥) = (𝑚 + 1)))) → (𝑤 substr ⟨0, ((#‘𝑤) − 1)⟩) ∈ Word 𝑌)
52 simprll 801 . . . . . . . . . . . . . . . 16 ((𝑚 ∈ ℕ0 ∧ ((𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋) ∧ ((#‘𝑥) = (#‘𝑤) ∧ (#‘𝑥) = (𝑚 + 1)))) → 𝑤 ∈ Word 𝑌)
53 eqeq1 2625 . . . . . . . . . . . . . . . . . . . . . 22 ((#‘𝑥) = (𝑚 + 1) → ((#‘𝑥) = (#‘𝑤) ↔ (𝑚 + 1) = (#‘𝑤)))
54 nn0p1nn 11276 . . . . . . . . . . . . . . . . . . . . . . 23 (𝑚 ∈ ℕ0 → (𝑚 + 1) ∈ ℕ)
55 eleq1 2686 . . . . . . . . . . . . . . . . . . . . . . . 24 ((#‘𝑤) = (𝑚 + 1) → ((#‘𝑤) ∈ ℕ ↔ (𝑚 + 1) ∈ ℕ))
5655eqcoms 2629 . . . . . . . . . . . . . . . . . . . . . . 23 ((𝑚 + 1) = (#‘𝑤) → ((#‘𝑤) ∈ ℕ ↔ (𝑚 + 1) ∈ ℕ))
5754, 56syl5ibr 236 . . . . . . . . . . . . . . . . . . . . . 22 ((𝑚 + 1) = (#‘𝑤) → (𝑚 ∈ ℕ0 → (#‘𝑤) ∈ ℕ))
5853, 57syl6bi 243 . . . . . . . . . . . . . . . . . . . . 21 ((#‘𝑥) = (𝑚 + 1) → ((#‘𝑥) = (#‘𝑤) → (𝑚 ∈ ℕ0 → (#‘𝑤) ∈ ℕ)))
5958impcom 446 . . . . . . . . . . . . . . . . . . . 20 (((#‘𝑥) = (#‘𝑤) ∧ (#‘𝑥) = (𝑚 + 1)) → (𝑚 ∈ ℕ0 → (#‘𝑤) ∈ ℕ))
6059adantl 482 . . . . . . . . . . . . . . . . . . 19 (((𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋) ∧ ((#‘𝑥) = (#‘𝑤) ∧ (#‘𝑥) = (𝑚 + 1))) → (𝑚 ∈ ℕ0 → (#‘𝑤) ∈ ℕ))
6160impcom 446 . . . . . . . . . . . . . . . . . 18 ((𝑚 ∈ ℕ0 ∧ ((𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋) ∧ ((#‘𝑥) = (#‘𝑤) ∧ (#‘𝑥) = (𝑚 + 1)))) → (#‘𝑤) ∈ ℕ)
6261nnge1d 11007 . . . . . . . . . . . . . . . . 17 ((𝑚 ∈ ℕ0 ∧ ((𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋) ∧ ((#‘𝑥) = (#‘𝑤) ∧ (#‘𝑥) = (𝑚 + 1)))) → 1 ≤ (#‘𝑤))
63 wrdlenge1n0 13279 . . . . . . . . . . . . . . . . . 18 (𝑤 ∈ Word 𝑌 → (𝑤 ≠ ∅ ↔ 1 ≤ (#‘𝑤)))
6452, 63syl 17 . . . . . . . . . . . . . . . . 17 ((𝑚 ∈ ℕ0 ∧ ((𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋) ∧ ((#‘𝑥) = (#‘𝑤) ∧ (#‘𝑥) = (𝑚 + 1)))) → (𝑤 ≠ ∅ ↔ 1 ≤ (#‘𝑤)))
6562, 64mpbird 247 . . . . . . . . . . . . . . . 16 ((𝑚 ∈ ℕ0 ∧ ((𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋) ∧ ((#‘𝑥) = (#‘𝑤) ∧ (#‘𝑥) = (𝑚 + 1)))) → 𝑤 ≠ ∅)
66 lswcl 13294 . . . . . . . . . . . . . . . 16 ((𝑤 ∈ Word 𝑌𝑤 ≠ ∅) → ( lastS ‘𝑤) ∈ 𝑌)
6752, 65, 66syl2anc 692 . . . . . . . . . . . . . . 15 ((𝑚 ∈ ℕ0 ∧ ((𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋) ∧ ((#‘𝑥) = (#‘𝑤) ∧ (#‘𝑥) = (𝑚 + 1)))) → ( lastS ‘𝑤) ∈ 𝑌)
6851, 67jca 554 . . . . . . . . . . . . . 14 ((𝑚 ∈ ℕ0 ∧ ((𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋) ∧ ((#‘𝑥) = (#‘𝑤) ∧ (#‘𝑥) = (𝑚 + 1)))) → ((𝑤 substr ⟨0, ((#‘𝑤) − 1)⟩) ∈ Word 𝑌 ∧ ( lastS ‘𝑤) ∈ 𝑌))
69 swrdcl 13357 . . . . . . . . . . . . . . . 16 (𝑥 ∈ Word 𝑋 → (𝑥 substr ⟨0, ((#‘𝑥) − 1)⟩) ∈ Word 𝑋)
7069adantl 482 . . . . . . . . . . . . . . 15 ((𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋) → (𝑥 substr ⟨0, ((#‘𝑥) − 1)⟩) ∈ Word 𝑋)
7170ad2antrl 763 . . . . . . . . . . . . . 14 ((𝑚 ∈ ℕ0 ∧ ((𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋) ∧ ((#‘𝑥) = (#‘𝑤) ∧ (#‘𝑥) = (𝑚 + 1)))) → (𝑥 substr ⟨0, ((#‘𝑥) − 1)⟩) ∈ Word 𝑋)
72 simprlr 802 . . . . . . . . . . . . . . 15 ((𝑚 ∈ ℕ0 ∧ ((𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋) ∧ ((#‘𝑥) = (#‘𝑤) ∧ (#‘𝑥) = (𝑚 + 1)))) → 𝑥 ∈ Word 𝑋)
73 eleq1 2686 . . . . . . . . . . . . . . . . . . . 20 ((#‘𝑥) = (𝑚 + 1) → ((#‘𝑥) ∈ ℕ ↔ (𝑚 + 1) ∈ ℕ))
7454, 73syl5ibr 236 . . . . . . . . . . . . . . . . . . 19 ((#‘𝑥) = (𝑚 + 1) → (𝑚 ∈ ℕ0 → (#‘𝑥) ∈ ℕ))
7574ad2antll 764 . . . . . . . . . . . . . . . . . 18 (((𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋) ∧ ((#‘𝑥) = (#‘𝑤) ∧ (#‘𝑥) = (𝑚 + 1))) → (𝑚 ∈ ℕ0 → (#‘𝑥) ∈ ℕ))
7675impcom 446 . . . . . . . . . . . . . . . . 17 ((𝑚 ∈ ℕ0 ∧ ((𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋) ∧ ((#‘𝑥) = (#‘𝑤) ∧ (#‘𝑥) = (𝑚 + 1)))) → (#‘𝑥) ∈ ℕ)
7776nnge1d 11007 . . . . . . . . . . . . . . . 16 ((𝑚 ∈ ℕ0 ∧ ((𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋) ∧ ((#‘𝑥) = (#‘𝑤) ∧ (#‘𝑥) = (𝑚 + 1)))) → 1 ≤ (#‘𝑥))
78 wrdlenge1n0 13279 . . . . . . . . . . . . . . . . 17 (𝑥 ∈ Word 𝑋 → (𝑥 ≠ ∅ ↔ 1 ≤ (#‘𝑥)))
7972, 78syl 17 . . . . . . . . . . . . . . . 16 ((𝑚 ∈ ℕ0 ∧ ((𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋) ∧ ((#‘𝑥) = (#‘𝑤) ∧ (#‘𝑥) = (𝑚 + 1)))) → (𝑥 ≠ ∅ ↔ 1 ≤ (#‘𝑥)))
8077, 79mpbird 247 . . . . . . . . . . . . . . 15 ((𝑚 ∈ ℕ0 ∧ ((𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋) ∧ ((#‘𝑥) = (#‘𝑤) ∧ (#‘𝑥) = (𝑚 + 1)))) → 𝑥 ≠ ∅)
81 lswcl 13294 . . . . . . . . . . . . . . 15 ((𝑥 ∈ Word 𝑋𝑥 ≠ ∅) → ( lastS ‘𝑥) ∈ 𝑋)
8272, 80, 81syl2anc 692 . . . . . . . . . . . . . 14 ((𝑚 ∈ ℕ0 ∧ ((𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋) ∧ ((#‘𝑥) = (#‘𝑤) ∧ (#‘𝑥) = (𝑚 + 1)))) → ( lastS ‘𝑥) ∈ 𝑋)
8368, 71, 82jca32 557 . . . . . . . . . . . . 13 ((𝑚 ∈ ℕ0 ∧ ((𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋) ∧ ((#‘𝑥) = (#‘𝑤) ∧ (#‘𝑥) = (𝑚 + 1)))) → (((𝑤 substr ⟨0, ((#‘𝑤) − 1)⟩) ∈ Word 𝑌 ∧ ( lastS ‘𝑤) ∈ 𝑌) ∧ ((𝑥 substr ⟨0, ((#‘𝑥) − 1)⟩) ∈ Word 𝑋 ∧ ( lastS ‘𝑥) ∈ 𝑋)))
8483adantlr 750 . . . . . . . . . . . 12 (((𝑚 ∈ ℕ0 ∧ ∀𝑢 ∈ Word 𝑌𝑦 ∈ Word 𝑋(((#‘𝑦) = (#‘𝑢) ∧ (#‘𝑦) = 𝑚) → 𝜒)) ∧ ((𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋) ∧ ((#‘𝑥) = (#‘𝑤) ∧ (#‘𝑥) = (𝑚 + 1)))) → (((𝑤 substr ⟨0, ((#‘𝑤) − 1)⟩) ∈ Word 𝑌 ∧ ( lastS ‘𝑤) ∈ 𝑌) ∧ ((𝑥 substr ⟨0, ((#‘𝑥) − 1)⟩) ∈ Word 𝑋 ∧ ( lastS ‘𝑥) ∈ 𝑋)))
85 simprl 793 . . . . . . . . . . . . . 14 (((𝑚 ∈ ℕ0 ∧ ∀𝑢 ∈ Word 𝑌𝑦 ∈ Word 𝑋(((#‘𝑦) = (#‘𝑢) ∧ (#‘𝑦) = 𝑚) → 𝜒)) ∧ ((𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋) ∧ ((#‘𝑥) = (#‘𝑤) ∧ (#‘𝑥) = (𝑚 + 1)))) → (𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋))
86 simplr 791 . . . . . . . . . . . . . 14 (((𝑚 ∈ ℕ0 ∧ ∀𝑢 ∈ Word 𝑌𝑦 ∈ Word 𝑋(((#‘𝑦) = (#‘𝑢) ∧ (#‘𝑦) = 𝑚) → 𝜒)) ∧ ((𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋) ∧ ((#‘𝑥) = (#‘𝑤) ∧ (#‘𝑥) = (𝑚 + 1)))) → ∀𝑢 ∈ Word 𝑌𝑦 ∈ Word 𝑋(((#‘𝑦) = (#‘𝑢) ∧ (#‘𝑦) = 𝑚) → 𝜒))
87 simprrl 803 . . . . . . . . . . . . . . . . 17 (((𝑚 ∈ ℕ0 ∧ ∀𝑢 ∈ Word 𝑌𝑦 ∈ Word 𝑋(((#‘𝑦) = (#‘𝑢) ∧ (#‘𝑦) = 𝑚) → 𝜒)) ∧ ((𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋) ∧ ((#‘𝑥) = (#‘𝑤) ∧ (#‘𝑥) = (𝑚 + 1)))) → (#‘𝑥) = (#‘𝑤))
8887oveq1d 6619 . . . . . . . . . . . . . . . 16 (((𝑚 ∈ ℕ0 ∧ ∀𝑢 ∈ Word 𝑌𝑦 ∈ Word 𝑋(((#‘𝑦) = (#‘𝑢) ∧ (#‘𝑦) = 𝑚) → 𝜒)) ∧ ((𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋) ∧ ((#‘𝑥) = (#‘𝑤) ∧ (#‘𝑥) = (𝑚 + 1)))) → ((#‘𝑥) − 1) = ((#‘𝑤) − 1))
89 simprlr 802 . . . . . . . . . . . . . . . . 17 (((𝑚 ∈ ℕ0 ∧ ∀𝑢 ∈ Word 𝑌𝑦 ∈ Word 𝑋(((#‘𝑦) = (#‘𝑢) ∧ (#‘𝑦) = 𝑚) → 𝜒)) ∧ ((𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋) ∧ ((#‘𝑥) = (#‘𝑤) ∧ (#‘𝑥) = (𝑚 + 1)))) → 𝑥 ∈ Word 𝑋)
90 fzossfz 12429 . . . . . . . . . . . . . . . . . 18 (0..^(#‘𝑥)) ⊆ (0...(#‘𝑥))
91 simprrr 804 . . . . . . . . . . . . . . . . . . . 20 (((𝑚 ∈ ℕ0 ∧ ∀𝑢 ∈ Word 𝑌𝑦 ∈ Word 𝑋(((#‘𝑦) = (#‘𝑢) ∧ (#‘𝑦) = 𝑚) → 𝜒)) ∧ ((𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋) ∧ ((#‘𝑥) = (#‘𝑤) ∧ (#‘𝑥) = (𝑚 + 1)))) → (#‘𝑥) = (𝑚 + 1))
9254ad2antrr 761 . . . . . . . . . . . . . . . . . . . 20 (((𝑚 ∈ ℕ0 ∧ ∀𝑢 ∈ Word 𝑌𝑦 ∈ Word 𝑋(((#‘𝑦) = (#‘𝑢) ∧ (#‘𝑦) = 𝑚) → 𝜒)) ∧ ((𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋) ∧ ((#‘𝑥) = (#‘𝑤) ∧ (#‘𝑥) = (𝑚 + 1)))) → (𝑚 + 1) ∈ ℕ)
9391, 92eqeltrd 2698 . . . . . . . . . . . . . . . . . . 19 (((𝑚 ∈ ℕ0 ∧ ∀𝑢 ∈ Word 𝑌𝑦 ∈ Word 𝑋(((#‘𝑦) = (#‘𝑢) ∧ (#‘𝑦) = 𝑚) → 𝜒)) ∧ ((𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋) ∧ ((#‘𝑥) = (#‘𝑤) ∧ (#‘𝑥) = (𝑚 + 1)))) → (#‘𝑥) ∈ ℕ)
94 fzo0end 12501 . . . . . . . . . . . . . . . . . . 19 ((#‘𝑥) ∈ ℕ → ((#‘𝑥) − 1) ∈ (0..^(#‘𝑥)))
9593, 94syl 17 . . . . . . . . . . . . . . . . . 18 (((𝑚 ∈ ℕ0 ∧ ∀𝑢 ∈ Word 𝑌𝑦 ∈ Word 𝑋(((#‘𝑦) = (#‘𝑢) ∧ (#‘𝑦) = 𝑚) → 𝜒)) ∧ ((𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋) ∧ ((#‘𝑥) = (#‘𝑤) ∧ (#‘𝑥) = (𝑚 + 1)))) → ((#‘𝑥) − 1) ∈ (0..^(#‘𝑥)))
9690, 95sseldi 3581 . . . . . . . . . . . . . . . . 17 (((𝑚 ∈ ℕ0 ∧ ∀𝑢 ∈ Word 𝑌𝑦 ∈ Word 𝑋(((#‘𝑦) = (#‘𝑢) ∧ (#‘𝑦) = 𝑚) → 𝜒)) ∧ ((𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋) ∧ ((#‘𝑥) = (#‘𝑤) ∧ (#‘𝑥) = (𝑚 + 1)))) → ((#‘𝑥) − 1) ∈ (0...(#‘𝑥)))
97 swrd0len 13360 . . . . . . . . . . . . . . . . 17 ((𝑥 ∈ Word 𝑋 ∧ ((#‘𝑥) − 1) ∈ (0...(#‘𝑥))) → (#‘(𝑥 substr ⟨0, ((#‘𝑥) − 1)⟩)) = ((#‘𝑥) − 1))
9889, 96, 97syl2anc 692 . . . . . . . . . . . . . . . 16 (((𝑚 ∈ ℕ0 ∧ ∀𝑢 ∈ Word 𝑌𝑦 ∈ Word 𝑋(((#‘𝑦) = (#‘𝑢) ∧ (#‘𝑦) = 𝑚) → 𝜒)) ∧ ((𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋) ∧ ((#‘𝑥) = (#‘𝑤) ∧ (#‘𝑥) = (𝑚 + 1)))) → (#‘(𝑥 substr ⟨0, ((#‘𝑥) − 1)⟩)) = ((#‘𝑥) − 1))
99 simprll 801 . . . . . . . . . . . . . . . . 17 (((𝑚 ∈ ℕ0 ∧ ∀𝑢 ∈ Word 𝑌𝑦 ∈ Word 𝑋(((#‘𝑦) = (#‘𝑢) ∧ (#‘𝑦) = 𝑚) → 𝜒)) ∧ ((𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋) ∧ ((#‘𝑥) = (#‘𝑤) ∧ (#‘𝑥) = (𝑚 + 1)))) → 𝑤 ∈ Word 𝑌)
100 oveq1 6611 . . . . . . . . . . . . . . . . . . . . . 22 ((#‘𝑤) = (#‘𝑥) → ((#‘𝑤) − 1) = ((#‘𝑥) − 1))
101 oveq2 6612 . . . . . . . . . . . . . . . . . . . . . 22 ((#‘𝑤) = (#‘𝑥) → (0...(#‘𝑤)) = (0...(#‘𝑥)))
102100, 101eleq12d 2692 . . . . . . . . . . . . . . . . . . . . 21 ((#‘𝑤) = (#‘𝑥) → (((#‘𝑤) − 1) ∈ (0...(#‘𝑤)) ↔ ((#‘𝑥) − 1) ∈ (0...(#‘𝑥))))
103102eqcoms 2629 . . . . . . . . . . . . . . . . . . . 20 ((#‘𝑥) = (#‘𝑤) → (((#‘𝑤) − 1) ∈ (0...(#‘𝑤)) ↔ ((#‘𝑥) − 1) ∈ (0...(#‘𝑥))))
104103adantr 481 . . . . . . . . . . . . . . . . . . 19 (((#‘𝑥) = (#‘𝑤) ∧ (#‘𝑥) = (𝑚 + 1)) → (((#‘𝑤) − 1) ∈ (0...(#‘𝑤)) ↔ ((#‘𝑥) − 1) ∈ (0...(#‘𝑥))))
105104ad2antll 764 . . . . . . . . . . . . . . . . . 18 (((𝑚 ∈ ℕ0 ∧ ∀𝑢 ∈ Word 𝑌𝑦 ∈ Word 𝑋(((#‘𝑦) = (#‘𝑢) ∧ (#‘𝑦) = 𝑚) → 𝜒)) ∧ ((𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋) ∧ ((#‘𝑥) = (#‘𝑤) ∧ (#‘𝑥) = (𝑚 + 1)))) → (((#‘𝑤) − 1) ∈ (0...(#‘𝑤)) ↔ ((#‘𝑥) − 1) ∈ (0...(#‘𝑥))))
10696, 105mpbird 247 . . . . . . . . . . . . . . . . 17 (((𝑚 ∈ ℕ0 ∧ ∀𝑢 ∈ Word 𝑌𝑦 ∈ Word 𝑋(((#‘𝑦) = (#‘𝑢) ∧ (#‘𝑦) = 𝑚) → 𝜒)) ∧ ((𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋) ∧ ((#‘𝑥) = (#‘𝑤) ∧ (#‘𝑥) = (𝑚 + 1)))) → ((#‘𝑤) − 1) ∈ (0...(#‘𝑤)))
107 swrd0len 13360 . . . . . . . . . . . . . . . . 17 ((𝑤 ∈ Word 𝑌 ∧ ((#‘𝑤) − 1) ∈ (0...(#‘𝑤))) → (#‘(𝑤 substr ⟨0, ((#‘𝑤) − 1)⟩)) = ((#‘𝑤) − 1))
10899, 106, 107syl2anc 692 . . . . . . . . . . . . . . . 16 (((𝑚 ∈ ℕ0 ∧ ∀𝑢 ∈ Word 𝑌𝑦 ∈ Word 𝑋(((#‘𝑦) = (#‘𝑢) ∧ (#‘𝑦) = 𝑚) → 𝜒)) ∧ ((𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋) ∧ ((#‘𝑥) = (#‘𝑤) ∧ (#‘𝑥) = (𝑚 + 1)))) → (#‘(𝑤 substr ⟨0, ((#‘𝑤) − 1)⟩)) = ((#‘𝑤) − 1))
10988, 98, 1083eqtr4d 2665 . . . . . . . . . . . . . . 15 (((𝑚 ∈ ℕ0 ∧ ∀𝑢 ∈ Word 𝑌𝑦 ∈ Word 𝑋(((#‘𝑦) = (#‘𝑢) ∧ (#‘𝑦) = 𝑚) → 𝜒)) ∧ ((𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋) ∧ ((#‘𝑥) = (#‘𝑤) ∧ (#‘𝑥) = (𝑚 + 1)))) → (#‘(𝑥 substr ⟨0, ((#‘𝑥) − 1)⟩)) = (#‘(𝑤 substr ⟨0, ((#‘𝑤) − 1)⟩)))
11091oveq1d 6619 . . . . . . . . . . . . . . . 16 (((𝑚 ∈ ℕ0 ∧ ∀𝑢 ∈ Word 𝑌𝑦 ∈ Word 𝑋(((#‘𝑦) = (#‘𝑢) ∧ (#‘𝑦) = 𝑚) → 𝜒)) ∧ ((𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋) ∧ ((#‘𝑥) = (#‘𝑤) ∧ (#‘𝑥) = (𝑚 + 1)))) → ((#‘𝑥) − 1) = ((𝑚 + 1) − 1))
111 nn0cn 11246 . . . . . . . . . . . . . . . . . 18 (𝑚 ∈ ℕ0𝑚 ∈ ℂ)
112111ad2antrr 761 . . . . . . . . . . . . . . . . 17 (((𝑚 ∈ ℕ0 ∧ ∀𝑢 ∈ Word 𝑌𝑦 ∈ Word 𝑋(((#‘𝑦) = (#‘𝑢) ∧ (#‘𝑦) = 𝑚) → 𝜒)) ∧ ((𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋) ∧ ((#‘𝑥) = (#‘𝑤) ∧ (#‘𝑥) = (𝑚 + 1)))) → 𝑚 ∈ ℂ)
113 ax-1cn 9938 . . . . . . . . . . . . . . . . 17 1 ∈ ℂ
114 pncan 10231 . . . . . . . . . . . . . . . . 17 ((𝑚 ∈ ℂ ∧ 1 ∈ ℂ) → ((𝑚 + 1) − 1) = 𝑚)
115112, 113, 114sylancl 693 . . . . . . . . . . . . . . . 16 (((𝑚 ∈ ℕ0 ∧ ∀𝑢 ∈ Word 𝑌𝑦 ∈ Word 𝑋(((#‘𝑦) = (#‘𝑢) ∧ (#‘𝑦) = 𝑚) → 𝜒)) ∧ ((𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋) ∧ ((#‘𝑥) = (#‘𝑤) ∧ (#‘𝑥) = (𝑚 + 1)))) → ((𝑚 + 1) − 1) = 𝑚)
11698, 110, 1153eqtrd 2659 . . . . . . . . . . . . . . 15 (((𝑚 ∈ ℕ0 ∧ ∀𝑢 ∈ Word 𝑌𝑦 ∈ Word 𝑋(((#‘𝑦) = (#‘𝑢) ∧ (#‘𝑦) = 𝑚) → 𝜒)) ∧ ((𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋) ∧ ((#‘𝑥) = (#‘𝑤) ∧ (#‘𝑥) = (𝑚 + 1)))) → (#‘(𝑥 substr ⟨0, ((#‘𝑥) − 1)⟩)) = 𝑚)
117109, 116jca 554 . . . . . . . . . . . . . 14 (((𝑚 ∈ ℕ0 ∧ ∀𝑢 ∈ Word 𝑌𝑦 ∈ Word 𝑋(((#‘𝑦) = (#‘𝑢) ∧ (#‘𝑦) = 𝑚) → 𝜒)) ∧ ((𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋) ∧ ((#‘𝑥) = (#‘𝑤) ∧ (#‘𝑥) = (𝑚 + 1)))) → ((#‘(𝑥 substr ⟨0, ((#‘𝑥) − 1)⟩)) = (#‘(𝑤 substr ⟨0, ((#‘𝑤) − 1)⟩)) ∧ (#‘(𝑥 substr ⟨0, ((#‘𝑥) − 1)⟩)) = 𝑚))
11870adantr 481 . . . . . . . . . . . . . . . 16 (((𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋) ∧ 𝑢 = (𝑤 substr ⟨0, ((#‘𝑤) − 1)⟩)) → (𝑥 substr ⟨0, ((#‘𝑥) − 1)⟩) ∈ Word 𝑋)
119 fveq2 6148 . . . . . . . . . . . . . . . . . . . . . 22 (𝑦 = (𝑥 substr ⟨0, ((#‘𝑥) − 1)⟩) → (#‘𝑦) = (#‘(𝑥 substr ⟨0, ((#‘𝑥) − 1)⟩)))
120 fveq2 6148 . . . . . . . . . . . . . . . . . . . . . 22 (𝑢 = (𝑤 substr ⟨0, ((#‘𝑤) − 1)⟩) → (#‘𝑢) = (#‘(𝑤 substr ⟨0, ((#‘𝑤) − 1)⟩)))
121119, 120eqeqan12d 2637 . . . . . . . . . . . . . . . . . . . . 21 ((𝑦 = (𝑥 substr ⟨0, ((#‘𝑥) − 1)⟩) ∧ 𝑢 = (𝑤 substr ⟨0, ((#‘𝑤) − 1)⟩)) → ((#‘𝑦) = (#‘𝑢) ↔ (#‘(𝑥 substr ⟨0, ((#‘𝑥) − 1)⟩)) = (#‘(𝑤 substr ⟨0, ((#‘𝑤) − 1)⟩))))
122121expcom 451 . . . . . . . . . . . . . . . . . . . 20 (𝑢 = (𝑤 substr ⟨0, ((#‘𝑤) − 1)⟩) → (𝑦 = (𝑥 substr ⟨0, ((#‘𝑥) − 1)⟩) → ((#‘𝑦) = (#‘𝑢) ↔ (#‘(𝑥 substr ⟨0, ((#‘𝑥) − 1)⟩)) = (#‘(𝑤 substr ⟨0, ((#‘𝑤) − 1)⟩)))))
123122adantl 482 . . . . . . . . . . . . . . . . . . 19 (((𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋) ∧ 𝑢 = (𝑤 substr ⟨0, ((#‘𝑤) − 1)⟩)) → (𝑦 = (𝑥 substr ⟨0, ((#‘𝑥) − 1)⟩) → ((#‘𝑦) = (#‘𝑢) ↔ (#‘(𝑥 substr ⟨0, ((#‘𝑥) − 1)⟩)) = (#‘(𝑤 substr ⟨0, ((#‘𝑤) − 1)⟩)))))
124123imp 445 . . . . . . . . . . . . . . . . . 18 ((((𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋) ∧ 𝑢 = (𝑤 substr ⟨0, ((#‘𝑤) − 1)⟩)) ∧ 𝑦 = (𝑥 substr ⟨0, ((#‘𝑥) − 1)⟩)) → ((#‘𝑦) = (#‘𝑢) ↔ (#‘(𝑥 substr ⟨0, ((#‘𝑥) − 1)⟩)) = (#‘(𝑤 substr ⟨0, ((#‘𝑤) − 1)⟩))))
125119eqeq1d 2623 . . . . . . . . . . . . . . . . . . 19 (𝑦 = (𝑥 substr ⟨0, ((#‘𝑥) − 1)⟩) → ((#‘𝑦) = 𝑚 ↔ (#‘(𝑥 substr ⟨0, ((#‘𝑥) − 1)⟩)) = 𝑚))
126125adantl 482 . . . . . . . . . . . . . . . . . 18 ((((𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋) ∧ 𝑢 = (𝑤 substr ⟨0, ((#‘𝑤) − 1)⟩)) ∧ 𝑦 = (𝑥 substr ⟨0, ((#‘𝑥) − 1)⟩)) → ((#‘𝑦) = 𝑚 ↔ (#‘(𝑥 substr ⟨0, ((#‘𝑥) − 1)⟩)) = 𝑚))
127124, 126anbi12d 746 . . . . . . . . . . . . . . . . 17 ((((𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋) ∧ 𝑢 = (𝑤 substr ⟨0, ((#‘𝑤) − 1)⟩)) ∧ 𝑦 = (𝑥 substr ⟨0, ((#‘𝑥) − 1)⟩)) → (((#‘𝑦) = (#‘𝑢) ∧ (#‘𝑦) = 𝑚) ↔ ((#‘(𝑥 substr ⟨0, ((#‘𝑥) − 1)⟩)) = (#‘(𝑤 substr ⟨0, ((#‘𝑤) − 1)⟩)) ∧ (#‘(𝑥 substr ⟨0, ((#‘𝑥) − 1)⟩)) = 𝑚)))
128 vex 3189 . . . . . . . . . . . . . . . . . . . . 21 𝑦 ∈ V
129 vex 3189 . . . . . . . . . . . . . . . . . . . . 21 𝑢 ∈ V
130128, 129, 44sbc2ie 3487 . . . . . . . . . . . . . . . . . . . 20 ([𝑦 / 𝑥][𝑢 / 𝑤]𝜑𝜒)
131130bicomi 214 . . . . . . . . . . . . . . . . . . 19 (𝜒[𝑦 / 𝑥][𝑢 / 𝑤]𝜑)
132131a1i 11 . . . . . . . . . . . . . . . . . 18 ((((𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋) ∧ 𝑢 = (𝑤 substr ⟨0, ((#‘𝑤) − 1)⟩)) ∧ 𝑦 = (𝑥 substr ⟨0, ((#‘𝑥) − 1)⟩)) → (𝜒[𝑦 / 𝑥][𝑢 / 𝑤]𝜑))
133 simpr 477 . . . . . . . . . . . . . . . . . . 19 ((((𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋) ∧ 𝑢 = (𝑤 substr ⟨0, ((#‘𝑤) − 1)⟩)) ∧ 𝑦 = (𝑥 substr ⟨0, ((#‘𝑥) − 1)⟩)) → 𝑦 = (𝑥 substr ⟨0, ((#‘𝑥) − 1)⟩))
134133sbceq1d 3422 . . . . . . . . . . . . . . . . . 18 ((((𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋) ∧ 𝑢 = (𝑤 substr ⟨0, ((#‘𝑤) − 1)⟩)) ∧ 𝑦 = (𝑥 substr ⟨0, ((#‘𝑥) − 1)⟩)) → ([𝑦 / 𝑥][𝑢 / 𝑤]𝜑[(𝑥 substr ⟨0, ((#‘𝑥) − 1)⟩) / 𝑥][𝑢 / 𝑤]𝜑))
135 dfsbcq 3419 . . . . . . . . . . . . . . . . . . . . 21 (𝑢 = (𝑤 substr ⟨0, ((#‘𝑤) − 1)⟩) → ([𝑢 / 𝑤]𝜑[(𝑤 substr ⟨0, ((#‘𝑤) − 1)⟩) / 𝑤]𝜑))
136135sbcbidv 3472 . . . . . . . . . . . . . . . . . . . 20 (𝑢 = (𝑤 substr ⟨0, ((#‘𝑤) − 1)⟩) → ([(𝑥 substr ⟨0, ((#‘𝑥) − 1)⟩) / 𝑥][𝑢 / 𝑤]𝜑[(𝑥 substr ⟨0, ((#‘𝑥) − 1)⟩) / 𝑥][(𝑤 substr ⟨0, ((#‘𝑤) − 1)⟩) / 𝑤]𝜑))
137136adantl 482 . . . . . . . . . . . . . . . . . . 19 (((𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋) ∧ 𝑢 = (𝑤 substr ⟨0, ((#‘𝑤) − 1)⟩)) → ([(𝑥 substr ⟨0, ((#‘𝑥) − 1)⟩) / 𝑥][𝑢 / 𝑤]𝜑[(𝑥 substr ⟨0, ((#‘𝑥) − 1)⟩) / 𝑥][(𝑤 substr ⟨0, ((#‘𝑤) − 1)⟩) / 𝑤]𝜑))
138137adantr 481 . . . . . . . . . . . . . . . . . 18 ((((𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋) ∧ 𝑢 = (𝑤 substr ⟨0, ((#‘𝑤) − 1)⟩)) ∧ 𝑦 = (𝑥 substr ⟨0, ((#‘𝑥) − 1)⟩)) → ([(𝑥 substr ⟨0, ((#‘𝑥) − 1)⟩) / 𝑥][𝑢 / 𝑤]𝜑[(𝑥 substr ⟨0, ((#‘𝑥) − 1)⟩) / 𝑥][(𝑤 substr ⟨0, ((#‘𝑤) − 1)⟩) / 𝑤]𝜑))
139132, 134, 1383bitrd 294 . . . . . . . . . . . . . . . . 17 ((((𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋) ∧ 𝑢 = (𝑤 substr ⟨0, ((#‘𝑤) − 1)⟩)) ∧ 𝑦 = (𝑥 substr ⟨0, ((#‘𝑥) − 1)⟩)) → (𝜒[(𝑥 substr ⟨0, ((#‘𝑥) − 1)⟩) / 𝑥][(𝑤 substr ⟨0, ((#‘𝑤) − 1)⟩) / 𝑤]𝜑))
140127, 139imbi12d 334 . . . . . . . . . . . . . . . 16 ((((𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋) ∧ 𝑢 = (𝑤 substr ⟨0, ((#‘𝑤) − 1)⟩)) ∧ 𝑦 = (𝑥 substr ⟨0, ((#‘𝑥) − 1)⟩)) → ((((#‘𝑦) = (#‘𝑢) ∧ (#‘𝑦) = 𝑚) → 𝜒) ↔ (((#‘(𝑥 substr ⟨0, ((#‘𝑥) − 1)⟩)) = (#‘(𝑤 substr ⟨0, ((#‘𝑤) − 1)⟩)) ∧ (#‘(𝑥 substr ⟨0, ((#‘𝑥) − 1)⟩)) = 𝑚) → [(𝑥 substr ⟨0, ((#‘𝑥) − 1)⟩) / 𝑥][(𝑤 substr ⟨0, ((#‘𝑤) − 1)⟩) / 𝑤]𝜑)))
141118, 140rspcdv 3298 . . . . . . . . . . . . . . 15 (((𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋) ∧ 𝑢 = (𝑤 substr ⟨0, ((#‘𝑤) − 1)⟩)) → (∀𝑦 ∈ Word 𝑋(((#‘𝑦) = (#‘𝑢) ∧ (#‘𝑦) = 𝑚) → 𝜒) → (((#‘(𝑥 substr ⟨0, ((#‘𝑥) − 1)⟩)) = (#‘(𝑤 substr ⟨0, ((#‘𝑤) − 1)⟩)) ∧ (#‘(𝑥 substr ⟨0, ((#‘𝑥) − 1)⟩)) = 𝑚) → [(𝑥 substr ⟨0, ((#‘𝑥) − 1)⟩) / 𝑥][(𝑤 substr ⟨0, ((#‘𝑤) − 1)⟩) / 𝑤]𝜑)))
14250, 141rspcimdv 3296 . . . . . . . . . . . . . 14 ((𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋) → (∀𝑢 ∈ Word 𝑌𝑦 ∈ Word 𝑋(((#‘𝑦) = (#‘𝑢) ∧ (#‘𝑦) = 𝑚) → 𝜒) → (((#‘(𝑥 substr ⟨0, ((#‘𝑥) − 1)⟩)) = (#‘(𝑤 substr ⟨0, ((#‘𝑤) − 1)⟩)) ∧ (#‘(𝑥 substr ⟨0, ((#‘𝑥) − 1)⟩)) = 𝑚) → [(𝑥 substr ⟨0, ((#‘𝑥) − 1)⟩) / 𝑥][(𝑤 substr ⟨0, ((#‘𝑤) − 1)⟩) / 𝑤]𝜑)))
14385, 86, 117, 142syl3c 66 . . . . . . . . . . . . 13 (((𝑚 ∈ ℕ0 ∧ ∀𝑢 ∈ Word 𝑌𝑦 ∈ Word 𝑋(((#‘𝑦) = (#‘𝑢) ∧ (#‘𝑦) = 𝑚) → 𝜒)) ∧ ((𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋) ∧ ((#‘𝑥) = (#‘𝑤) ∧ (#‘𝑥) = (𝑚 + 1)))) → [(𝑥 substr ⟨0, ((#‘𝑥) − 1)⟩) / 𝑥][(𝑤 substr ⟨0, ((#‘𝑤) − 1)⟩) / 𝑤]𝜑)
144143, 109jca 554 . . . . . . . . . . . 12 (((𝑚 ∈ ℕ0 ∧ ∀𝑢 ∈ Word 𝑌𝑦 ∈ Word 𝑋(((#‘𝑦) = (#‘𝑢) ∧ (#‘𝑦) = 𝑚) → 𝜒)) ∧ ((𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋) ∧ ((#‘𝑥) = (#‘𝑤) ∧ (#‘𝑥) = (𝑚 + 1)))) → ([(𝑥 substr ⟨0, ((#‘𝑥) − 1)⟩) / 𝑥][(𝑤 substr ⟨0, ((#‘𝑤) − 1)⟩) / 𝑤]𝜑 ∧ (#‘(𝑥 substr ⟨0, ((#‘𝑥) − 1)⟩)) = (#‘(𝑤 substr ⟨0, ((#‘𝑤) − 1)⟩))))
145 dfsbcq 3419 . . . . . . . . . . . . . . . 16 (𝑢 = (𝑤 substr ⟨0, ((#‘𝑤) − 1)⟩) → ([𝑢 / 𝑤][𝑦 / 𝑥]𝜑[(𝑤 substr ⟨0, ((#‘𝑤) − 1)⟩) / 𝑤][𝑦 / 𝑥]𝜑))
146 sbccom 3491 . . . . . . . . . . . . . . . 16 ([(𝑤 substr ⟨0, ((#‘𝑤) − 1)⟩) / 𝑤][𝑦 / 𝑥]𝜑[𝑦 / 𝑥][(𝑤 substr ⟨0, ((#‘𝑤) − 1)⟩) / 𝑤]𝜑)
147145, 146syl6bb 276 . . . . . . . . . . . . . . 15 (𝑢 = (𝑤 substr ⟨0, ((#‘𝑤) − 1)⟩) → ([𝑢 / 𝑤][𝑦 / 𝑥]𝜑[𝑦 / 𝑥][(𝑤 substr ⟨0, ((#‘𝑤) − 1)⟩) / 𝑤]𝜑))
148120eqeq2d 2631 . . . . . . . . . . . . . . 15 (𝑢 = (𝑤 substr ⟨0, ((#‘𝑤) − 1)⟩) → ((#‘𝑦) = (#‘𝑢) ↔ (#‘𝑦) = (#‘(𝑤 substr ⟨0, ((#‘𝑤) − 1)⟩))))
149147, 148anbi12d 746 . . . . . . . . . . . . . 14 (𝑢 = (𝑤 substr ⟨0, ((#‘𝑤) − 1)⟩) → (([𝑢 / 𝑤][𝑦 / 𝑥]𝜑 ∧ (#‘𝑦) = (#‘𝑢)) ↔ ([𝑦 / 𝑥][(𝑤 substr ⟨0, ((#‘𝑤) − 1)⟩) / 𝑤]𝜑 ∧ (#‘𝑦) = (#‘(𝑤 substr ⟨0, ((#‘𝑤) − 1)⟩)))))
150 oveq1 6611 . . . . . . . . . . . . . . 15 (𝑢 = (𝑤 substr ⟨0, ((#‘𝑤) − 1)⟩) → (𝑢 ++ ⟨“𝑠”⟩) = ((𝑤 substr ⟨0, ((#‘𝑤) − 1)⟩) ++ ⟨“𝑠”⟩))
151150sbceq1d 3422 . . . . . . . . . . . . . 14 (𝑢 = (𝑤 substr ⟨0, ((#‘𝑤) − 1)⟩) → ([(𝑢 ++ ⟨“𝑠”⟩) / 𝑤][(𝑦 ++ ⟨“𝑧”⟩) / 𝑥]𝜑[((𝑤 substr ⟨0, ((#‘𝑤) − 1)⟩) ++ ⟨“𝑠”⟩) / 𝑤][(𝑦 ++ ⟨“𝑧”⟩) / 𝑥]𝜑))
152149, 151imbi12d 334 . . . . . . . . . . . . 13 (𝑢 = (𝑤 substr ⟨0, ((#‘𝑤) − 1)⟩) → ((([𝑢 / 𝑤][𝑦 / 𝑥]𝜑 ∧ (#‘𝑦) = (#‘𝑢)) → [(𝑢 ++ ⟨“𝑠”⟩) / 𝑤][(𝑦 ++ ⟨“𝑧”⟩) / 𝑥]𝜑) ↔ (([𝑦 / 𝑥][(𝑤 substr ⟨0, ((#‘𝑤) − 1)⟩) / 𝑤]𝜑 ∧ (#‘𝑦) = (#‘(𝑤 substr ⟨0, ((#‘𝑤) − 1)⟩))) → [((𝑤 substr ⟨0, ((#‘𝑤) − 1)⟩) ++ ⟨“𝑠”⟩) / 𝑤][(𝑦 ++ ⟨“𝑧”⟩) / 𝑥]𝜑)))
153 s1eq 13319 . . . . . . . . . . . . . . . . 17 (𝑠 = ( lastS ‘𝑤) → ⟨“𝑠”⟩ = ⟨“( lastS ‘𝑤)”⟩)
154153oveq2d 6620 . . . . . . . . . . . . . . . 16 (𝑠 = ( lastS ‘𝑤) → ((𝑤 substr ⟨0, ((#‘𝑤) − 1)⟩) ++ ⟨“𝑠”⟩) = ((𝑤 substr ⟨0, ((#‘𝑤) − 1)⟩) ++ ⟨“( lastS ‘𝑤)”⟩))
155154sbceq1d 3422 . . . . . . . . . . . . . . 15 (𝑠 = ( lastS ‘𝑤) → ([((𝑤 substr ⟨0, ((#‘𝑤) − 1)⟩) ++ ⟨“𝑠”⟩) / 𝑤][(𝑦 ++ ⟨“𝑧”⟩) / 𝑥]𝜑[((𝑤 substr ⟨0, ((#‘𝑤) − 1)⟩) ++ ⟨“( lastS ‘𝑤)”⟩) / 𝑤][(𝑦 ++ ⟨“𝑧”⟩) / 𝑥]𝜑))
156155imbi2d 330 . . . . . . . . . . . . . 14 (𝑠 = ( lastS ‘𝑤) → ((([𝑦 / 𝑥][(𝑤 substr ⟨0, ((#‘𝑤) − 1)⟩) / 𝑤]𝜑 ∧ (#‘𝑦) = (#‘(𝑤 substr ⟨0, ((#‘𝑤) − 1)⟩))) → [((𝑤 substr ⟨0, ((#‘𝑤) − 1)⟩) ++ ⟨“𝑠”⟩) / 𝑤][(𝑦 ++ ⟨“𝑧”⟩) / 𝑥]𝜑) ↔ (([𝑦 / 𝑥][(𝑤 substr ⟨0, ((#‘𝑤) − 1)⟩) / 𝑤]𝜑 ∧ (#‘𝑦) = (#‘(𝑤 substr ⟨0, ((#‘𝑤) − 1)⟩))) → [((𝑤 substr ⟨0, ((#‘𝑤) − 1)⟩) ++ ⟨“( lastS ‘𝑤)”⟩) / 𝑤][(𝑦 ++ ⟨“𝑧”⟩) / 𝑥]𝜑)))
157 sbccom 3491 . . . . . . . . . . . . . . . 16 ([((𝑤 substr ⟨0, ((#‘𝑤) − 1)⟩) ++ ⟨“( lastS ‘𝑤)”⟩) / 𝑤][(𝑦 ++ ⟨“𝑧”⟩) / 𝑥]𝜑[(𝑦 ++ ⟨“𝑧”⟩) / 𝑥][((𝑤 substr ⟨0, ((#‘𝑤) − 1)⟩) ++ ⟨“( lastS ‘𝑤)”⟩) / 𝑤]𝜑)
158157a1i 11 . . . . . . . . . . . . . . 15 (𝑠 = ( lastS ‘𝑤) → ([((𝑤 substr ⟨0, ((#‘𝑤) − 1)⟩) ++ ⟨“( lastS ‘𝑤)”⟩) / 𝑤][(𝑦 ++ ⟨“𝑧”⟩) / 𝑥]𝜑[(𝑦 ++ ⟨“𝑧”⟩) / 𝑥][((𝑤 substr ⟨0, ((#‘𝑤) − 1)⟩) ++ ⟨“( lastS ‘𝑤)”⟩) / 𝑤]𝜑))
159158imbi2d 330 . . . . . . . . . . . . . 14 (𝑠 = ( lastS ‘𝑤) → ((([𝑦 / 𝑥][(𝑤 substr ⟨0, ((#‘𝑤) − 1)⟩) / 𝑤]𝜑 ∧ (#‘𝑦) = (#‘(𝑤 substr ⟨0, ((#‘𝑤) − 1)⟩))) → [((𝑤 substr ⟨0, ((#‘𝑤) − 1)⟩) ++ ⟨“( lastS ‘𝑤)”⟩) / 𝑤][(𝑦 ++ ⟨“𝑧”⟩) / 𝑥]𝜑) ↔ (([𝑦 / 𝑥][(𝑤 substr ⟨0, ((#‘𝑤) − 1)⟩) / 𝑤]𝜑 ∧ (#‘𝑦) = (#‘(𝑤 substr ⟨0, ((#‘𝑤) − 1)⟩))) → [(𝑦 ++ ⟨“𝑧”⟩) / 𝑥][((𝑤 substr ⟨0, ((#‘𝑤) − 1)⟩) ++ ⟨“( lastS ‘𝑤)”⟩) / 𝑤]𝜑)))
160156, 159bitrd 268 . . . . . . . . . . . . 13 (𝑠 = ( lastS ‘𝑤) → ((([𝑦 / 𝑥][(𝑤 substr ⟨0, ((#‘𝑤) − 1)⟩) / 𝑤]𝜑 ∧ (#‘𝑦) = (#‘(𝑤 substr ⟨0, ((#‘𝑤) − 1)⟩))) → [((𝑤 substr ⟨0, ((#‘𝑤) − 1)⟩) ++ ⟨“𝑠”⟩) / 𝑤][(𝑦 ++ ⟨“𝑧”⟩) / 𝑥]𝜑) ↔ (([𝑦 / 𝑥][(𝑤 substr ⟨0, ((#‘𝑤) − 1)⟩) / 𝑤]𝜑 ∧ (#‘𝑦) = (#‘(𝑤 substr ⟨0, ((#‘𝑤) − 1)⟩))) → [(𝑦 ++ ⟨“𝑧”⟩) / 𝑥][((𝑤 substr ⟨0, ((#‘𝑤) − 1)⟩) ++ ⟨“( lastS ‘𝑤)”⟩) / 𝑤]𝜑)))
161 dfsbcq 3419 . . . . . . . . . . . . . . 15 (𝑦 = (𝑥 substr ⟨0, ((#‘𝑥) − 1)⟩) → ([𝑦 / 𝑥][(𝑤 substr ⟨0, ((#‘𝑤) − 1)⟩) / 𝑤]𝜑[(𝑥 substr ⟨0, ((#‘𝑥) − 1)⟩) / 𝑥][(𝑤 substr ⟨0, ((#‘𝑤) − 1)⟩) / 𝑤]𝜑))
162119eqeq1d 2623 . . . . . . . . . . . . . . 15 (𝑦 = (𝑥 substr ⟨0, ((#‘𝑥) − 1)⟩) → ((#‘𝑦) = (#‘(𝑤 substr ⟨0, ((#‘𝑤) − 1)⟩)) ↔ (#‘(𝑥 substr ⟨0, ((#‘𝑥) − 1)⟩)) = (#‘(𝑤 substr ⟨0, ((#‘𝑤) − 1)⟩))))
163161, 162anbi12d 746 . . . . . . . . . . . . . 14 (𝑦 = (𝑥 substr ⟨0, ((#‘𝑥) − 1)⟩) → (([𝑦 / 𝑥][(𝑤 substr ⟨0, ((#‘𝑤) − 1)⟩) / 𝑤]𝜑 ∧ (#‘𝑦) = (#‘(𝑤 substr ⟨0, ((#‘𝑤) − 1)⟩))) ↔ ([(𝑥 substr ⟨0, ((#‘𝑥) − 1)⟩) / 𝑥][(𝑤 substr ⟨0, ((#‘𝑤) − 1)⟩) / 𝑤]𝜑 ∧ (#‘(𝑥 substr ⟨0, ((#‘𝑥) − 1)⟩)) = (#‘(𝑤 substr ⟨0, ((#‘𝑤) − 1)⟩)))))
164 oveq1 6611 . . . . . . . . . . . . . . 15 (𝑦 = (𝑥 substr ⟨0, ((#‘𝑥) − 1)⟩) → (𝑦 ++ ⟨“𝑧”⟩) = ((𝑥 substr ⟨0, ((#‘𝑥) − 1)⟩) ++ ⟨“𝑧”⟩))
165164sbceq1d 3422 . . . . . . . . . . . . . 14 (𝑦 = (𝑥 substr ⟨0, ((#‘𝑥) − 1)⟩) → ([(𝑦 ++ ⟨“𝑧”⟩) / 𝑥][((𝑤 substr ⟨0, ((#‘𝑤) − 1)⟩) ++ ⟨“( lastS ‘𝑤)”⟩) / 𝑤]𝜑[((𝑥 substr ⟨0, ((#‘𝑥) − 1)⟩) ++ ⟨“𝑧”⟩) / 𝑥][((𝑤 substr ⟨0, ((#‘𝑤) − 1)⟩) ++ ⟨“( lastS ‘𝑤)”⟩) / 𝑤]𝜑))
166163, 165imbi12d 334 . . . . . . . . . . . . 13 (𝑦 = (𝑥 substr ⟨0, ((#‘𝑥) − 1)⟩) → ((([𝑦 / 𝑥][(𝑤 substr ⟨0, ((#‘𝑤) − 1)⟩) / 𝑤]𝜑 ∧ (#‘𝑦) = (#‘(𝑤 substr ⟨0, ((#‘𝑤) − 1)⟩))) → [(𝑦 ++ ⟨“𝑧”⟩) / 𝑥][((𝑤 substr ⟨0, ((#‘𝑤) − 1)⟩) ++ ⟨“( lastS ‘𝑤)”⟩) / 𝑤]𝜑) ↔ (([(𝑥 substr ⟨0, ((#‘𝑥) − 1)⟩) / 𝑥][(𝑤 substr ⟨0, ((#‘𝑤) − 1)⟩) / 𝑤]𝜑 ∧ (#‘(𝑥 substr ⟨0, ((#‘𝑥) − 1)⟩)) = (#‘(𝑤 substr ⟨0, ((#‘𝑤) − 1)⟩))) → [((𝑥 substr ⟨0, ((#‘𝑥) − 1)⟩) ++ ⟨“𝑧”⟩) / 𝑥][((𝑤 substr ⟨0, ((#‘𝑤) − 1)⟩) ++ ⟨“( lastS ‘𝑤)”⟩) / 𝑤]𝜑)))
167 s1eq 13319 . . . . . . . . . . . . . . . 16 (𝑧 = ( lastS ‘𝑥) → ⟨“𝑧”⟩ = ⟨“( lastS ‘𝑥)”⟩)
168167oveq2d 6620 . . . . . . . . . . . . . . 15 (𝑧 = ( lastS ‘𝑥) → ((𝑥 substr ⟨0, ((#‘𝑥) − 1)⟩) ++ ⟨“𝑧”⟩) = ((𝑥 substr ⟨0, ((#‘𝑥) − 1)⟩) ++ ⟨“( lastS ‘𝑥)”⟩))
169168sbceq1d 3422 . . . . . . . . . . . . . 14 (𝑧 = ( lastS ‘𝑥) → ([((𝑥 substr ⟨0, ((#‘𝑥) − 1)⟩) ++ ⟨“𝑧”⟩) / 𝑥][((𝑤 substr ⟨0, ((#‘𝑤) − 1)⟩) ++ ⟨“( lastS ‘𝑤)”⟩) / 𝑤]𝜑[((𝑥 substr ⟨0, ((#‘𝑥) − 1)⟩) ++ ⟨“( lastS ‘𝑥)”⟩) / 𝑥][((𝑤 substr ⟨0, ((#‘𝑤) − 1)⟩) ++ ⟨“( lastS ‘𝑤)”⟩) / 𝑤]𝜑))
170169imbi2d 330 . . . . . . . . . . . . 13 (𝑧 = ( lastS ‘𝑥) → ((([(𝑥 substr ⟨0, ((#‘𝑥) − 1)⟩) / 𝑥][(𝑤 substr ⟨0, ((#‘𝑤) − 1)⟩) / 𝑤]𝜑 ∧ (#‘(𝑥 substr ⟨0, ((#‘𝑥) − 1)⟩)) = (#‘(𝑤 substr ⟨0, ((#‘𝑤) − 1)⟩))) → [((𝑥 substr ⟨0, ((#‘𝑥) − 1)⟩) ++ ⟨“𝑧”⟩) / 𝑥][((𝑤 substr ⟨0, ((#‘𝑤) − 1)⟩) ++ ⟨“( lastS ‘𝑤)”⟩) / 𝑤]𝜑) ↔ (([(𝑥 substr ⟨0, ((#‘𝑥) − 1)⟩) / 𝑥][(𝑤 substr ⟨0, ((#‘𝑤) − 1)⟩) / 𝑤]𝜑 ∧ (#‘(𝑥 substr ⟨0, ((#‘𝑥) − 1)⟩)) = (#‘(𝑤 substr ⟨0, ((#‘𝑤) − 1)⟩))) → [((𝑥 substr ⟨0, ((#‘𝑥) − 1)⟩) ++ ⟨“( lastS ‘𝑥)”⟩) / 𝑥][((𝑤 substr ⟨0, ((#‘𝑤) − 1)⟩) ++ ⟨“( lastS ‘𝑤)”⟩) / 𝑤]𝜑)))
171 simplr 791 . . . . . . . . . . . . . . . . . 18 ((((𝑢 ∈ Word 𝑌𝑠𝑌) ∧ (𝑦 ∈ Word 𝑋𝑧𝑋)) ∧ (#‘𝑦) = (#‘𝑢)) → (𝑦 ∈ Word 𝑋𝑧𝑋))
172 simpll 789 . . . . . . . . . . . . . . . . . 18 ((((𝑢 ∈ Word 𝑌𝑠𝑌) ∧ (𝑦 ∈ Word 𝑋𝑧𝑋)) ∧ (#‘𝑦) = (#‘𝑢)) → (𝑢 ∈ Word 𝑌𝑠𝑌))
173 simpr 477 . . . . . . . . . . . . . . . . . 18 ((((𝑢 ∈ Word 𝑌𝑠𝑌) ∧ (𝑦 ∈ Word 𝑋𝑧𝑋)) ∧ (#‘𝑦) = (#‘𝑢)) → (#‘𝑦) = (#‘𝑢))
174 wrd2ind.7 . . . . . . . . . . . . . . . . . 18 (((𝑦 ∈ Word 𝑋𝑧𝑋) ∧ (𝑢 ∈ Word 𝑌𝑠𝑌) ∧ (#‘𝑦) = (#‘𝑢)) → (𝜒𝜃))
175171, 172, 173, 174syl3anc 1323 . . . . . . . . . . . . . . . . 17 ((((𝑢 ∈ Word 𝑌𝑠𝑌) ∧ (𝑦 ∈ Word 𝑋𝑧𝑋)) ∧ (#‘𝑦) = (#‘𝑢)) → (𝜒𝜃))
17644ancoms 469 . . . . . . . . . . . . . . . . . 18 ((𝑤 = 𝑢𝑥 = 𝑦) → (𝜑𝜒))
177129, 128, 176sbc2ie 3487 . . . . . . . . . . . . . . . . 17 ([𝑢 / 𝑤][𝑦 / 𝑥]𝜑𝜒)
178 ovex 6632 . . . . . . . . . . . . . . . . . 18 (𝑢 ++ ⟨“𝑠”⟩) ∈ V
179 ovex 6632 . . . . . . . . . . . . . . . . . 18 (𝑦 ++ ⟨“𝑧”⟩) ∈ V
180 wrd2ind.3 . . . . . . . . . . . . . . . . . . 19 ((𝑥 = (𝑦 ++ ⟨“𝑧”⟩) ∧ 𝑤 = (𝑢 ++ ⟨“𝑠”⟩)) → (𝜑𝜃))
181180ancoms 469 . . . . . . . . . . . . . . . . . 18 ((𝑤 = (𝑢 ++ ⟨“𝑠”⟩) ∧ 𝑥 = (𝑦 ++ ⟨“𝑧”⟩)) → (𝜑𝜃))
182178, 179, 181sbc2ie 3487 . . . . . . . . . . . . . . . . 17 ([(𝑢 ++ ⟨“𝑠”⟩) / 𝑤][(𝑦 ++ ⟨“𝑧”⟩) / 𝑥]𝜑𝜃)
183175, 177, 1823imtr4g 285 . . . . . . . . . . . . . . . 16 ((((𝑢 ∈ Word 𝑌𝑠𝑌) ∧ (𝑦 ∈ Word 𝑋𝑧𝑋)) ∧ (#‘𝑦) = (#‘𝑢)) → ([𝑢 / 𝑤][𝑦 / 𝑥]𝜑[(𝑢 ++ ⟨“𝑠”⟩) / 𝑤][(𝑦 ++ ⟨“𝑧”⟩) / 𝑥]𝜑))
184183ex 450 . . . . . . . . . . . . . . 15 (((𝑢 ∈ Word 𝑌𝑠𝑌) ∧ (𝑦 ∈ Word 𝑋𝑧𝑋)) → ((#‘𝑦) = (#‘𝑢) → ([𝑢 / 𝑤][𝑦 / 𝑥]𝜑[(𝑢 ++ ⟨“𝑠”⟩) / 𝑤][(𝑦 ++ ⟨“𝑧”⟩) / 𝑥]𝜑)))
185184com23 86 . . . . . . . . . . . . . 14 (((𝑢 ∈ Word 𝑌𝑠𝑌) ∧ (𝑦 ∈ Word 𝑋𝑧𝑋)) → ([𝑢 / 𝑤][𝑦 / 𝑥]𝜑 → ((#‘𝑦) = (#‘𝑢) → [(𝑢 ++ ⟨“𝑠”⟩) / 𝑤][(𝑦 ++ ⟨“𝑧”⟩) / 𝑥]𝜑)))
186185impd 447 . . . . . . . . . . . . 13 (((𝑢 ∈ Word 𝑌𝑠𝑌) ∧ (𝑦 ∈ Word 𝑋𝑧𝑋)) → (([𝑢 / 𝑤][𝑦 / 𝑥]𝜑 ∧ (#‘𝑦) = (#‘𝑢)) → [(𝑢 ++ ⟨“𝑠”⟩) / 𝑤][(𝑦 ++ ⟨“𝑧”⟩) / 𝑥]𝜑))
187152, 160, 166, 170, 186vtocl4ga 3264 . . . . . . . . . . . 12 ((((𝑤 substr ⟨0, ((#‘𝑤) − 1)⟩) ∈ Word 𝑌 ∧ ( lastS ‘𝑤) ∈ 𝑌) ∧ ((𝑥 substr ⟨0, ((#‘𝑥) − 1)⟩) ∈ Word 𝑋 ∧ ( lastS ‘𝑥) ∈ 𝑋)) → (([(𝑥 substr ⟨0, ((#‘𝑥) − 1)⟩) / 𝑥][(𝑤 substr ⟨0, ((#‘𝑤) − 1)⟩) / 𝑤]𝜑 ∧ (#‘(𝑥 substr ⟨0, ((#‘𝑥) − 1)⟩)) = (#‘(𝑤 substr ⟨0, ((#‘𝑤) − 1)⟩))) → [((𝑥 substr ⟨0, ((#‘𝑥) − 1)⟩) ++ ⟨“( lastS ‘𝑥)”⟩) / 𝑥][((𝑤 substr ⟨0, ((#‘𝑤) − 1)⟩) ++ ⟨“( lastS ‘𝑤)”⟩) / 𝑤]𝜑))
18884, 144, 187sylc 65 . . . . . . . . . . 11 (((𝑚 ∈ ℕ0 ∧ ∀𝑢 ∈ Word 𝑌𝑦 ∈ Word 𝑋(((#‘𝑦) = (#‘𝑢) ∧ (#‘𝑦) = 𝑚) → 𝜒)) ∧ ((𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋) ∧ ((#‘𝑥) = (#‘𝑤) ∧ (#‘𝑥) = (𝑚 + 1)))) → [((𝑥 substr ⟨0, ((#‘𝑥) − 1)⟩) ++ ⟨“( lastS ‘𝑥)”⟩) / 𝑥][((𝑤 substr ⟨0, ((#‘𝑤) − 1)⟩) ++ ⟨“( lastS ‘𝑤)”⟩) / 𝑤]𝜑)
189 eqtr2 2641 . . . . . . . . . . . . . . . 16 (((#‘𝑥) = (#‘𝑤) ∧ (#‘𝑥) = (𝑚 + 1)) → (#‘𝑤) = (𝑚 + 1))
190189ad2antll 764 . . . . . . . . . . . . . . 15 (((𝑚 ∈ ℕ0 ∧ ∀𝑢 ∈ Word 𝑌𝑦 ∈ Word 𝑋(((#‘𝑦) = (#‘𝑢) ∧ (#‘𝑦) = 𝑚) → 𝜒)) ∧ ((𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋) ∧ ((#‘𝑥) = (#‘𝑤) ∧ (#‘𝑥) = (𝑚 + 1)))) → (#‘𝑤) = (𝑚 + 1))
191190, 92eqeltrd 2698 . . . . . . . . . . . . . 14 (((𝑚 ∈ ℕ0 ∧ ∀𝑢 ∈ Word 𝑌𝑦 ∈ Word 𝑋(((#‘𝑦) = (#‘𝑢) ∧ (#‘𝑦) = 𝑚) → 𝜒)) ∧ ((𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋) ∧ ((#‘𝑥) = (#‘𝑤) ∧ (#‘𝑥) = (𝑚 + 1)))) → (#‘𝑤) ∈ ℕ)
192 wrdfin 13262 . . . . . . . . . . . . . . . . 17 (𝑤 ∈ Word 𝑌𝑤 ∈ Fin)
193192adantr 481 . . . . . . . . . . . . . . . 16 ((𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋) → 𝑤 ∈ Fin)
194193ad2antrl 763 . . . . . . . . . . . . . . 15 (((𝑚 ∈ ℕ0 ∧ ∀𝑢 ∈ Word 𝑌𝑦 ∈ Word 𝑋(((#‘𝑦) = (#‘𝑢) ∧ (#‘𝑦) = 𝑚) → 𝜒)) ∧ ((𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋) ∧ ((#‘𝑥) = (#‘𝑤) ∧ (#‘𝑥) = (𝑚 + 1)))) → 𝑤 ∈ Fin)
195 hashnncl 13097 . . . . . . . . . . . . . . 15 (𝑤 ∈ Fin → ((#‘𝑤) ∈ ℕ ↔ 𝑤 ≠ ∅))
196194, 195syl 17 . . . . . . . . . . . . . 14 (((𝑚 ∈ ℕ0 ∧ ∀𝑢 ∈ Word 𝑌𝑦 ∈ Word 𝑋(((#‘𝑦) = (#‘𝑢) ∧ (#‘𝑦) = 𝑚) → 𝜒)) ∧ ((𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋) ∧ ((#‘𝑥) = (#‘𝑤) ∧ (#‘𝑥) = (𝑚 + 1)))) → ((#‘𝑤) ∈ ℕ ↔ 𝑤 ≠ ∅))
197191, 196mpbid 222 . . . . . . . . . . . . 13 (((𝑚 ∈ ℕ0 ∧ ∀𝑢 ∈ Word 𝑌𝑦 ∈ Word 𝑋(((#‘𝑦) = (#‘𝑢) ∧ (#‘𝑦) = 𝑚) → 𝜒)) ∧ ((𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋) ∧ ((#‘𝑥) = (#‘𝑤) ∧ (#‘𝑥) = (𝑚 + 1)))) → 𝑤 ≠ ∅)
198 swrdccatwrd 13406 . . . . . . . . . . . . . 14 ((𝑤 ∈ Word 𝑌𝑤 ≠ ∅) → ((𝑤 substr ⟨0, ((#‘𝑤) − 1)⟩) ++ ⟨“( lastS ‘𝑤)”⟩) = 𝑤)
199198eqcomd 2627 . . . . . . . . . . . . 13 ((𝑤 ∈ Word 𝑌𝑤 ≠ ∅) → 𝑤 = ((𝑤 substr ⟨0, ((#‘𝑤) − 1)⟩) ++ ⟨“( lastS ‘𝑤)”⟩))
20099, 197, 199syl2anc 692 . . . . . . . . . . . 12 (((𝑚 ∈ ℕ0 ∧ ∀𝑢 ∈ Word 𝑌𝑦 ∈ Word 𝑋(((#‘𝑦) = (#‘𝑢) ∧ (#‘𝑦) = 𝑚) → 𝜒)) ∧ ((𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋) ∧ ((#‘𝑥) = (#‘𝑤) ∧ (#‘𝑥) = (𝑚 + 1)))) → 𝑤 = ((𝑤 substr ⟨0, ((#‘𝑤) − 1)⟩) ++ ⟨“( lastS ‘𝑤)”⟩))
201 wrdfin 13262 . . . . . . . . . . . . . . . . 17 (𝑥 ∈ Word 𝑋𝑥 ∈ Fin)
202201adantl 482 . . . . . . . . . . . . . . . 16 ((𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋) → 𝑥 ∈ Fin)
203202ad2antrl 763 . . . . . . . . . . . . . . 15 (((𝑚 ∈ ℕ0 ∧ ∀𝑢 ∈ Word 𝑌𝑦 ∈ Word 𝑋(((#‘𝑦) = (#‘𝑢) ∧ (#‘𝑦) = 𝑚) → 𝜒)) ∧ ((𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋) ∧ ((#‘𝑥) = (#‘𝑤) ∧ (#‘𝑥) = (𝑚 + 1)))) → 𝑥 ∈ Fin)
204 hashnncl 13097 . . . . . . . . . . . . . . 15 (𝑥 ∈ Fin → ((#‘𝑥) ∈ ℕ ↔ 𝑥 ≠ ∅))
205203, 204syl 17 . . . . . . . . . . . . . 14 (((𝑚 ∈ ℕ0 ∧ ∀𝑢 ∈ Word 𝑌𝑦 ∈ Word 𝑋(((#‘𝑦) = (#‘𝑢) ∧ (#‘𝑦) = 𝑚) → 𝜒)) ∧ ((𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋) ∧ ((#‘𝑥) = (#‘𝑤) ∧ (#‘𝑥) = (𝑚 + 1)))) → ((#‘𝑥) ∈ ℕ ↔ 𝑥 ≠ ∅))
20693, 205mpbid 222 . . . . . . . . . . . . 13 (((𝑚 ∈ ℕ0 ∧ ∀𝑢 ∈ Word 𝑌𝑦 ∈ Word 𝑋(((#‘𝑦) = (#‘𝑢) ∧ (#‘𝑦) = 𝑚) → 𝜒)) ∧ ((𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋) ∧ ((#‘𝑥) = (#‘𝑤) ∧ (#‘𝑥) = (𝑚 + 1)))) → 𝑥 ≠ ∅)
207 swrdccatwrd 13406 . . . . . . . . . . . . . 14 ((𝑥 ∈ Word 𝑋𝑥 ≠ ∅) → ((𝑥 substr ⟨0, ((#‘𝑥) − 1)⟩) ++ ⟨“( lastS ‘𝑥)”⟩) = 𝑥)
208207eqcomd 2627 . . . . . . . . . . . . 13 ((𝑥 ∈ Word 𝑋𝑥 ≠ ∅) → 𝑥 = ((𝑥 substr ⟨0, ((#‘𝑥) − 1)⟩) ++ ⟨“( lastS ‘𝑥)”⟩))
20989, 206, 208syl2anc 692 . . . . . . . . . . . 12 (((𝑚 ∈ ℕ0 ∧ ∀𝑢 ∈ Word 𝑌𝑦 ∈ Word 𝑋(((#‘𝑦) = (#‘𝑢) ∧ (#‘𝑦) = 𝑚) → 𝜒)) ∧ ((𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋) ∧ ((#‘𝑥) = (#‘𝑤) ∧ (#‘𝑥) = (𝑚 + 1)))) → 𝑥 = ((𝑥 substr ⟨0, ((#‘𝑥) − 1)⟩) ++ ⟨“( lastS ‘𝑥)”⟩))
210 sbceq1a 3428 . . . . . . . . . . . . 13 (𝑤 = ((𝑤 substr ⟨0, ((#‘𝑤) − 1)⟩) ++ ⟨“( lastS ‘𝑤)”⟩) → (𝜑[((𝑤 substr ⟨0, ((#‘𝑤) − 1)⟩) ++ ⟨“( lastS ‘𝑤)”⟩) / 𝑤]𝜑))
211 sbceq1a 3428 . . . . . . . . . . . . 13 (𝑥 = ((𝑥 substr ⟨0, ((#‘𝑥) − 1)⟩) ++ ⟨“( lastS ‘𝑥)”⟩) → ([((𝑤 substr ⟨0, ((#‘𝑤) − 1)⟩) ++ ⟨“( lastS ‘𝑤)”⟩) / 𝑤]𝜑[((𝑥 substr ⟨0, ((#‘𝑥) − 1)⟩) ++ ⟨“( lastS ‘𝑥)”⟩) / 𝑥][((𝑤 substr ⟨0, ((#‘𝑤) − 1)⟩) ++ ⟨“( lastS ‘𝑤)”⟩) / 𝑤]𝜑))
212210, 211sylan9bb 735 . . . . . . . . . . . 12 ((𝑤 = ((𝑤 substr ⟨0, ((#‘𝑤) − 1)⟩) ++ ⟨“( lastS ‘𝑤)”⟩) ∧ 𝑥 = ((𝑥 substr ⟨0, ((#‘𝑥) − 1)⟩) ++ ⟨“( lastS ‘𝑥)”⟩)) → (𝜑[((𝑥 substr ⟨0, ((#‘𝑥) − 1)⟩) ++ ⟨“( lastS ‘𝑥)”⟩) / 𝑥][((𝑤 substr ⟨0, ((#‘𝑤) − 1)⟩) ++ ⟨“( lastS ‘𝑤)”⟩) / 𝑤]𝜑))
213200, 209, 212syl2anc 692 . . . . . . . . . . 11 (((𝑚 ∈ ℕ0 ∧ ∀𝑢 ∈ Word 𝑌𝑦 ∈ Word 𝑋(((#‘𝑦) = (#‘𝑢) ∧ (#‘𝑦) = 𝑚) → 𝜒)) ∧ ((𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋) ∧ ((#‘𝑥) = (#‘𝑤) ∧ (#‘𝑥) = (𝑚 + 1)))) → (𝜑[((𝑥 substr ⟨0, ((#‘𝑥) − 1)⟩) ++ ⟨“( lastS ‘𝑥)”⟩) / 𝑥][((𝑤 substr ⟨0, ((#‘𝑤) − 1)⟩) ++ ⟨“( lastS ‘𝑤)”⟩) / 𝑤]𝜑))
214188, 213mpbird 247 . . . . . . . . . 10 (((𝑚 ∈ ℕ0 ∧ ∀𝑢 ∈ Word 𝑌𝑦 ∈ Word 𝑋(((#‘𝑦) = (#‘𝑢) ∧ (#‘𝑦) = 𝑚) → 𝜒)) ∧ ((𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋) ∧ ((#‘𝑥) = (#‘𝑤) ∧ (#‘𝑥) = (𝑚 + 1)))) → 𝜑)
215214expr 642 . . . . . . . . 9 (((𝑚 ∈ ℕ0 ∧ ∀𝑢 ∈ Word 𝑌𝑦 ∈ Word 𝑋(((#‘𝑦) = (#‘𝑢) ∧ (#‘𝑦) = 𝑚) → 𝜒)) ∧ (𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋)) → (((#‘𝑥) = (#‘𝑤) ∧ (#‘𝑥) = (𝑚 + 1)) → 𝜑))
216215ralrimivva 2965 . . . . . . . 8 ((𝑚 ∈ ℕ0 ∧ ∀𝑢 ∈ Word 𝑌𝑦 ∈ Word 𝑋(((#‘𝑦) = (#‘𝑢) ∧ (#‘𝑦) = 𝑚) → 𝜒)) → ∀𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋(((#‘𝑥) = (#‘𝑤) ∧ (#‘𝑥) = (𝑚 + 1)) → 𝜑))
217216ex 450 . . . . . . 7 (𝑚 ∈ ℕ0 → (∀𝑢 ∈ Word 𝑌𝑦 ∈ Word 𝑋(((#‘𝑦) = (#‘𝑢) ∧ (#‘𝑦) = 𝑚) → 𝜒) → ∀𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋(((#‘𝑥) = (#‘𝑤) ∧ (#‘𝑥) = (𝑚 + 1)) → 𝜑)))
21848, 217syl5bi 232 . . . . . 6 (𝑚 ∈ ℕ0 → (∀𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋(((#‘𝑥) = (#‘𝑤) ∧ (#‘𝑥) = 𝑚) → 𝜑) → ∀𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋(((#‘𝑥) = (#‘𝑤) ∧ (#‘𝑥) = (𝑚 + 1)) → 𝜑)))
2195, 9, 13, 17, 37, 218nn0ind 11416 . . . . 5 ((#‘𝐴) ∈ ℕ0 → ∀𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋(((#‘𝑥) = (#‘𝑤) ∧ (#‘𝑥) = (#‘𝐴)) → 𝜑))
2201, 219syl 17 . . . 4 (𝐴 ∈ Word 𝑋 → ∀𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋(((#‘𝑥) = (#‘𝑤) ∧ (#‘𝑥) = (#‘𝐴)) → 𝜑))
2212203ad2ant1 1080 . . 3 ((𝐴 ∈ Word 𝑋𝐵 ∈ Word 𝑌 ∧ (#‘𝐴) = (#‘𝐵)) → ∀𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋(((#‘𝑥) = (#‘𝑤) ∧ (#‘𝑥) = (#‘𝐴)) → 𝜑))
222 fveq2 6148 . . . . . . . . 9 (𝑤 = 𝐵 → (#‘𝑤) = (#‘𝐵))
223222eqeq2d 2631 . . . . . . . 8 (𝑤 = 𝐵 → ((#‘𝑥) = (#‘𝑤) ↔ (#‘𝑥) = (#‘𝐵)))
224223anbi1d 740 . . . . . . 7 (𝑤 = 𝐵 → (((#‘𝑥) = (#‘𝑤) ∧ (#‘𝑥) = (#‘𝐴)) ↔ ((#‘𝑥) = (#‘𝐵) ∧ (#‘𝑥) = (#‘𝐴))))
225 wrd2ind.5 . . . . . . 7 (𝑤 = 𝐵 → (𝜑𝜌))
226224, 225imbi12d 334 . . . . . 6 (𝑤 = 𝐵 → ((((#‘𝑥) = (#‘𝑤) ∧ (#‘𝑥) = (#‘𝐴)) → 𝜑) ↔ (((#‘𝑥) = (#‘𝐵) ∧ (#‘𝑥) = (#‘𝐴)) → 𝜌)))
227226ralbidv 2980 . . . . 5 (𝑤 = 𝐵 → (∀𝑥 ∈ Word 𝑋(((#‘𝑥) = (#‘𝑤) ∧ (#‘𝑥) = (#‘𝐴)) → 𝜑) ↔ ∀𝑥 ∈ Word 𝑋(((#‘𝑥) = (#‘𝐵) ∧ (#‘𝑥) = (#‘𝐴)) → 𝜌)))
228227rspcv 3291 . . . 4 (𝐵 ∈ Word 𝑌 → (∀𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋(((#‘𝑥) = (#‘𝑤) ∧ (#‘𝑥) = (#‘𝐴)) → 𝜑) → ∀𝑥 ∈ Word 𝑋(((#‘𝑥) = (#‘𝐵) ∧ (#‘𝑥) = (#‘𝐴)) → 𝜌)))
2292283ad2ant2 1081 . . 3 ((𝐴 ∈ Word 𝑋𝐵 ∈ Word 𝑌 ∧ (#‘𝐴) = (#‘𝐵)) → (∀𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋(((#‘𝑥) = (#‘𝑤) ∧ (#‘𝑥) = (#‘𝐴)) → 𝜑) → ∀𝑥 ∈ Word 𝑋(((#‘𝑥) = (#‘𝐵) ∧ (#‘𝑥) = (#‘𝐴)) → 𝜌)))
230221, 229mpd 15 . 2 ((𝐴 ∈ Word 𝑋𝐵 ∈ Word 𝑌 ∧ (#‘𝐴) = (#‘𝐵)) → ∀𝑥 ∈ Word 𝑋(((#‘𝑥) = (#‘𝐵) ∧ (#‘𝑥) = (#‘𝐴)) → 𝜌))
231 eqidd 2622 . 2 ((𝐴 ∈ Word 𝑋𝐵 ∈ Word 𝑌 ∧ (#‘𝐴) = (#‘𝐵)) → (#‘𝐴) = (#‘𝐴))
232 fveq2 6148 . . . . . . . . . . 11 (𝑥 = 𝐴 → (#‘𝑥) = (#‘𝐴))
233232eqeq1d 2623 . . . . . . . . . 10 (𝑥 = 𝐴 → ((#‘𝑥) = (#‘𝐵) ↔ (#‘𝐴) = (#‘𝐵)))
234232eqeq1d 2623 . . . . . . . . . 10 (𝑥 = 𝐴 → ((#‘𝑥) = (#‘𝐴) ↔ (#‘𝐴) = (#‘𝐴)))
235233, 234anbi12d 746 . . . . . . . . 9 (𝑥 = 𝐴 → (((#‘𝑥) = (#‘𝐵) ∧ (#‘𝑥) = (#‘𝐴)) ↔ ((#‘𝐴) = (#‘𝐵) ∧ (#‘𝐴) = (#‘𝐴))))
236 wrd2ind.4 . . . . . . . . 9 (𝑥 = 𝐴 → (𝜌𝜏))
237235, 236imbi12d 334 . . . . . . . 8 (𝑥 = 𝐴 → ((((#‘𝑥) = (#‘𝐵) ∧ (#‘𝑥) = (#‘𝐴)) → 𝜌) ↔ (((#‘𝐴) = (#‘𝐵) ∧ (#‘𝐴) = (#‘𝐴)) → 𝜏)))
238237rspcv 3291 . . . . . . 7 (𝐴 ∈ Word 𝑋 → (∀𝑥 ∈ Word 𝑋(((#‘𝑥) = (#‘𝐵) ∧ (#‘𝑥) = (#‘𝐴)) → 𝜌) → (((#‘𝐴) = (#‘𝐵) ∧ (#‘𝐴) = (#‘𝐴)) → 𝜏)))
239238com23 86 . . . . . 6 (𝐴 ∈ Word 𝑋 → (((#‘𝐴) = (#‘𝐵) ∧ (#‘𝐴) = (#‘𝐴)) → (∀𝑥 ∈ Word 𝑋(((#‘𝑥) = (#‘𝐵) ∧ (#‘𝑥) = (#‘𝐴)) → 𝜌) → 𝜏)))
240239expd 452 . . . . 5 (𝐴 ∈ Word 𝑋 → ((#‘𝐴) = (#‘𝐵) → ((#‘𝐴) = (#‘𝐴) → (∀𝑥 ∈ Word 𝑋(((#‘𝑥) = (#‘𝐵) ∧ (#‘𝑥) = (#‘𝐴)) → 𝜌) → 𝜏))))
241240com34 91 . . . 4 (𝐴 ∈ Word 𝑋 → ((#‘𝐴) = (#‘𝐵) → (∀𝑥 ∈ Word 𝑋(((#‘𝑥) = (#‘𝐵) ∧ (#‘𝑥) = (#‘𝐴)) → 𝜌) → ((#‘𝐴) = (#‘𝐴) → 𝜏))))
242241imp 445 . . 3 ((𝐴 ∈ Word 𝑋 ∧ (#‘𝐴) = (#‘𝐵)) → (∀𝑥 ∈ Word 𝑋(((#‘𝑥) = (#‘𝐵) ∧ (#‘𝑥) = (#‘𝐴)) → 𝜌) → ((#‘𝐴) = (#‘𝐴) → 𝜏)))
2432423adant2 1078 . 2 ((𝐴 ∈ Word 𝑋𝐵 ∈ Word 𝑌 ∧ (#‘𝐴) = (#‘𝐵)) → (∀𝑥 ∈ Word 𝑋(((#‘𝑥) = (#‘𝐵) ∧ (#‘𝑥) = (#‘𝐴)) → 𝜌) → ((#‘𝐴) = (#‘𝐴) → 𝜏)))
244230, 231, 243mp2d 49 1 ((𝐴 ∈ Word 𝑋𝐵 ∈ Word 𝑌 ∧ (#‘𝐴) = (#‘𝐵)) → 𝜏)
Colors of variables: wff setvar class
Syntax hints:  wi 4  wb 196  wa 384  w3a 1036   = wceq 1480  wcel 1987  wne 2790  wral 2907  [wsbc 3417  c0 3891  cop 4154   class class class wbr 4613  cfv 5847  (class class class)co 6604  Fincfn 7899  cc 9878  0cc0 9880  1c1 9881   + caddc 9883  cle 10019  cmin 10210  cn 10964  0cn0 11236  ...cfz 12268  ..^cfzo 12406  #chash 13057  Word cword 13230   lastS clsw 13231   ++ cconcat 13232  ⟨“cs1 13233   substr csubstr 13234
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 1836  ax-6 1885  ax-7 1932  ax-8 1989  ax-9 1996  ax-10 2016  ax-11 2031  ax-12 2044  ax-13 2245  ax-ext 2601  ax-rep 4731  ax-sep 4741  ax-nul 4749  ax-pow 4803  ax-pr 4867  ax-un 6902  ax-cnex 9936  ax-resscn 9937  ax-1cn 9938  ax-icn 9939  ax-addcl 9940  ax-addrcl 9941  ax-mulcl 9942  ax-mulrcl 9943  ax-mulcom 9944  ax-addass 9945  ax-mulass 9946  ax-distr 9947  ax-i2m1 9948  ax-1ne0 9949  ax-1rid 9950  ax-rnegex 9951  ax-rrecex 9952  ax-cnre 9953  ax-pre-lttri 9954  ax-pre-lttrn 9955  ax-pre-ltadd 9956  ax-pre-mulgt0 9957
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 1878  df-eu 2473  df-mo 2474  df-clab 2608  df-cleq 2614  df-clel 2617  df-nfc 2750  df-ne 2791  df-nel 2894  df-ral 2912  df-rex 2913  df-reu 2914  df-rab 2916  df-v 3188  df-sbc 3418  df-csb 3515  df-dif 3558  df-un 3560  df-in 3562  df-ss 3569  df-pss 3571  df-nul 3892  df-if 4059  df-pw 4132  df-sn 4149  df-pr 4151  df-tp 4153  df-op 4155  df-uni 4403  df-int 4441  df-iun 4487  df-br 4614  df-opab 4674  df-mpt 4675  df-tr 4713  df-eprel 4985  df-id 4989  df-po 4995  df-so 4996  df-fr 5033  df-we 5035  df-xp 5080  df-rel 5081  df-cnv 5082  df-co 5083  df-dm 5084  df-rn 5085  df-res 5086  df-ima 5087  df-pred 5639  df-ord 5685  df-on 5686  df-lim 5687  df-suc 5688  df-iota 5810  df-fun 5849  df-fn 5850  df-f 5851  df-f1 5852  df-fo 5853  df-f1o 5854  df-fv 5855  df-riota 6565  df-ov 6607  df-oprab 6608  df-mpt2 6609  df-om 7013  df-1st 7113  df-2nd 7114  df-wrecs 7352  df-recs 7413  df-rdg 7451  df-1o 7505  df-oadd 7509  df-er 7687  df-en 7900  df-dom 7901  df-sdom 7902  df-fin 7903  df-card 8709  df-pnf 10020  df-mnf 10021  df-xr 10022  df-ltxr 10023  df-le 10024  df-sub 10212  df-neg 10213  df-nn 10965  df-n0 11237  df-xnn0 11308  df-z 11322  df-uz 11632  df-fz 12269  df-fzo 12407  df-hash 13058  df-word 13238  df-lsw 13239  df-concat 13240  df-s1 13241  df-substr 13242
This theorem is referenced by:  gsmsymgreq  17773
  Copyright terms: Public domain W3C validator