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

Theorem wrd2ind 13523
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 13356 . . . . 5 (𝐴 ∈ Word 𝑋 → (#‘𝐴) ∈ ℕ0)
2 eqeq2 2662 . . . . . . . . 9 (𝑛 = 0 → ((#‘𝑥) = 𝑛 ↔ (#‘𝑥) = 0))
32anbi2d 740 . . . . . . . 8 (𝑛 = 0 → (((#‘𝑥) = (#‘𝑤) ∧ (#‘𝑥) = 𝑛) ↔ ((#‘𝑥) = (#‘𝑤) ∧ (#‘𝑥) = 0)))
43imbi1d 330 . . . . . . 7 (𝑛 = 0 → ((((#‘𝑥) = (#‘𝑤) ∧ (#‘𝑥) = 𝑛) → 𝜑) ↔ (((#‘𝑥) = (#‘𝑤) ∧ (#‘𝑥) = 0) → 𝜑)))
542ralbidv 3018 . . . . . 6 (𝑛 = 0 → (∀𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋(((#‘𝑥) = (#‘𝑤) ∧ (#‘𝑥) = 𝑛) → 𝜑) ↔ ∀𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋(((#‘𝑥) = (#‘𝑤) ∧ (#‘𝑥) = 0) → 𝜑)))
6 eqeq2 2662 . . . . . . . . 9 (𝑛 = 𝑚 → ((#‘𝑥) = 𝑛 ↔ (#‘𝑥) = 𝑚))
76anbi2d 740 . . . . . . . 8 (𝑛 = 𝑚 → (((#‘𝑥) = (#‘𝑤) ∧ (#‘𝑥) = 𝑛) ↔ ((#‘𝑥) = (#‘𝑤) ∧ (#‘𝑥) = 𝑚)))
87imbi1d 330 . . . . . . 7 (𝑛 = 𝑚 → ((((#‘𝑥) = (#‘𝑤) ∧ (#‘𝑥) = 𝑛) → 𝜑) ↔ (((#‘𝑥) = (#‘𝑤) ∧ (#‘𝑥) = 𝑚) → 𝜑)))
982ralbidv 3018 . . . . . 6 (𝑛 = 𝑚 → (∀𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋(((#‘𝑥) = (#‘𝑤) ∧ (#‘𝑥) = 𝑛) → 𝜑) ↔ ∀𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋(((#‘𝑥) = (#‘𝑤) ∧ (#‘𝑥) = 𝑚) → 𝜑)))
10 eqeq2 2662 . . . . . . . . 9 (𝑛 = (𝑚 + 1) → ((#‘𝑥) = 𝑛 ↔ (#‘𝑥) = (𝑚 + 1)))
1110anbi2d 740 . . . . . . . 8 (𝑛 = (𝑚 + 1) → (((#‘𝑥) = (#‘𝑤) ∧ (#‘𝑥) = 𝑛) ↔ ((#‘𝑥) = (#‘𝑤) ∧ (#‘𝑥) = (𝑚 + 1))))
1211imbi1d 330 . . . . . . 7 (𝑛 = (𝑚 + 1) → ((((#‘𝑥) = (#‘𝑤) ∧ (#‘𝑥) = 𝑛) → 𝜑) ↔ (((#‘𝑥) = (#‘𝑤) ∧ (#‘𝑥) = (𝑚 + 1)) → 𝜑)))
13122ralbidv 3018 . . . . . 6 (𝑛 = (𝑚 + 1) → (∀𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋(((#‘𝑥) = (#‘𝑤) ∧ (#‘𝑥) = 𝑛) → 𝜑) ↔ ∀𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋(((#‘𝑥) = (#‘𝑤) ∧ (#‘𝑥) = (𝑚 + 1)) → 𝜑)))
14 eqeq2 2662 . . . . . . . . 9 (𝑛 = (#‘𝐴) → ((#‘𝑥) = 𝑛 ↔ (#‘𝑥) = (#‘𝐴)))
1514anbi2d 740 . . . . . . . 8 (𝑛 = (#‘𝐴) → (((#‘𝑥) = (#‘𝑤) ∧ (#‘𝑥) = 𝑛) ↔ ((#‘𝑥) = (#‘𝑤) ∧ (#‘𝑥) = (#‘𝐴))))
1615imbi1d 330 . . . . . . 7 (𝑛 = (#‘𝐴) → ((((#‘𝑥) = (#‘𝑤) ∧ (#‘𝑥) = 𝑛) → 𝜑) ↔ (((#‘𝑥) = (#‘𝑤) ∧ (#‘𝑥) = (#‘𝐴)) → 𝜑)))
17162ralbidv 3018 . . . . . 6 (𝑛 = (#‘𝐴) → (∀𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋(((#‘𝑥) = (#‘𝑤) ∧ (#‘𝑥) = 𝑛) → 𝜑) ↔ ∀𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋(((#‘𝑥) = (#‘𝑤) ∧ (#‘𝑥) = (#‘𝐴)) → 𝜑)))
18 eqeq1 2655 . . . . . . . . . . . 12 ((#‘𝑥) = 0 → ((#‘𝑥) = (#‘𝑤) ↔ 0 = (#‘𝑤)))
1918adantl 481 . . . . . . . . . . 11 (((𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋) ∧ (#‘𝑥) = 0) → ((#‘𝑥) = (#‘𝑤) ↔ 0 = (#‘𝑤)))
20 eqcom 2658 . . . . . . . . . . . . . . 15 (0 = (#‘𝑤) ↔ (#‘𝑤) = 0)
21 hasheq0 13192 . . . . . . . . . . . . . . 15 (𝑤 ∈ Word 𝑌 → ((#‘𝑤) = 0 ↔ 𝑤 = ∅))
2220, 21syl5bb 272 . . . . . . . . . . . . . 14 (𝑤 ∈ Word 𝑌 → (0 = (#‘𝑤) ↔ 𝑤 = ∅))
23 hasheq0 13192 . . . . . . . . . . . . . . . 16 (𝑥 ∈ Word 𝑋 → ((#‘𝑥) = 0 ↔ 𝑥 = ∅))
24 wrd2ind.6 . . . . . . . . . . . . . . . . . 18 𝜓
25 wrd2ind.1 . . . . . . . . . . . . . . . . . 18 ((𝑥 = ∅ ∧ 𝑤 = ∅) → (𝜑𝜓))
2624, 25mpbiri 248 . . . . . . . . . . . . . . . . 17 ((𝑥 = ∅ ∧ 𝑤 = ∅) → 𝜑)
2726ex 449 . . . . . . . . . . . . . . . 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 447 . . . . . . . . . . 11 (((𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋) ∧ (#‘𝑥) = 0) → (0 = (#‘𝑤) → 𝜑))
3319, 32sylbid 230 . . . . . . . . . 10 (((𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋) ∧ (#‘𝑥) = 0) → ((#‘𝑥) = (#‘𝑤) → 𝜑))
3433ex 449 . . . . . . . . 9 ((𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋) → ((#‘𝑥) = 0 → ((#‘𝑥) = (#‘𝑤) → 𝜑)))
3534com23 86 . . . . . . . 8 ((𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋) → ((#‘𝑥) = (#‘𝑤) → ((#‘𝑥) = 0 → 𝜑)))
3635impd 446 . . . . . . 7 ((𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋) → (((#‘𝑥) = (#‘𝑤) ∧ (#‘𝑥) = 0) → 𝜑))
3736rgen2 3004 . . . . . 6 𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋(((#‘𝑥) = (#‘𝑤) ∧ (#‘𝑥) = 0) → 𝜑)
38 fveq2 6229 . . . . . . . . . . . . 13 (𝑥 = 𝑦 → (#‘𝑥) = (#‘𝑦))
39 fveq2 6229 . . . . . . . . . . . . 13 (𝑤 = 𝑢 → (#‘𝑤) = (#‘𝑢))
4038, 39eqeqan12d 2667 . . . . . . . . . . . 12 ((𝑥 = 𝑦𝑤 = 𝑢) → ((#‘𝑥) = (#‘𝑤) ↔ (#‘𝑦) = (#‘𝑢)))
4138eqeq1d 2653 . . . . . . . . . . . . 13 (𝑥 = 𝑦 → ((#‘𝑥) = 𝑚 ↔ (#‘𝑦) = 𝑚))
4241adantr 480 . . . . . . . . . . . 12 ((𝑥 = 𝑦𝑤 = 𝑢) → ((#‘𝑥) = 𝑚 ↔ (#‘𝑦) = 𝑚))
4340, 42anbi12d 747 . . . . . . . . . . 11 ((𝑥 = 𝑦𝑤 = 𝑢) → (((#‘𝑥) = (#‘𝑤) ∧ (#‘𝑥) = 𝑚) ↔ ((#‘𝑦) = (#‘𝑢) ∧ (#‘𝑦) = 𝑚)))
44 wrd2ind.2 . . . . . . . . . . 11 ((𝑥 = 𝑦𝑤 = 𝑢) → (𝜑𝜒))
4543, 44imbi12d 333 . . . . . . . . . 10 ((𝑥 = 𝑦𝑤 = 𝑢) → ((((#‘𝑥) = (#‘𝑤) ∧ (#‘𝑥) = 𝑚) → 𝜑) ↔ (((#‘𝑦) = (#‘𝑢) ∧ (#‘𝑦) = 𝑚) → 𝜒)))
4645ancoms 468 . . . . . . . . 9 ((𝑤 = 𝑢𝑥 = 𝑦) → ((((#‘𝑥) = (#‘𝑤) ∧ (#‘𝑥) = 𝑚) → 𝜑) ↔ (((#‘𝑦) = (#‘𝑢) ∧ (#‘𝑦) = 𝑚) → 𝜒)))
4746cbvraldva 3207 . . . . . . . 8 (𝑤 = 𝑢 → (∀𝑥 ∈ Word 𝑋(((#‘𝑥) = (#‘𝑤) ∧ (#‘𝑥) = 𝑚) → 𝜑) ↔ ∀𝑦 ∈ Word 𝑋(((#‘𝑦) = (#‘𝑢) ∧ (#‘𝑦) = 𝑚) → 𝜒)))
4847cbvralv 3201 . . . . . . 7 (∀𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋(((#‘𝑥) = (#‘𝑤) ∧ (#‘𝑥) = 𝑚) → 𝜑) ↔ ∀𝑢 ∈ Word 𝑌𝑦 ∈ Word 𝑋(((#‘𝑦) = (#‘𝑢) ∧ (#‘𝑦) = 𝑚) → 𝜒))
49 swrdcl 13464 . . . . . . . . . . . . . . . . 17 (𝑤 ∈ Word 𝑌 → (𝑤 substr ⟨0, ((#‘𝑤) − 1)⟩) ∈ Word 𝑌)
5049adantr 480 . . . . . . . . . . . . . . . 16 ((𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋) → (𝑤 substr ⟨0, ((#‘𝑤) − 1)⟩) ∈ Word 𝑌)
5150ad2antrl 764 . . . . . . . . . . . . . . 15 ((𝑚 ∈ ℕ0 ∧ ((𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋) ∧ ((#‘𝑥) = (#‘𝑤) ∧ (#‘𝑥) = (𝑚 + 1)))) → (𝑤 substr ⟨0, ((#‘𝑤) − 1)⟩) ∈ Word 𝑌)
52 simprll 819 . . . . . . . . . . . . . . . 16 ((𝑚 ∈ ℕ0 ∧ ((𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋) ∧ ((#‘𝑥) = (#‘𝑤) ∧ (#‘𝑥) = (𝑚 + 1)))) → 𝑤 ∈ Word 𝑌)
53 eqeq1 2655 . . . . . . . . . . . . . . . . . . . . . 22 ((#‘𝑥) = (𝑚 + 1) → ((#‘𝑥) = (#‘𝑤) ↔ (𝑚 + 1) = (#‘𝑤)))
54 nn0p1nn 11370 . . . . . . . . . . . . . . . . . . . . . . 23 (𝑚 ∈ ℕ0 → (𝑚 + 1) ∈ ℕ)
55 eleq1 2718 . . . . . . . . . . . . . . . . . . . . . . . 24 ((#‘𝑤) = (𝑚 + 1) → ((#‘𝑤) ∈ ℕ ↔ (𝑚 + 1) ∈ ℕ))
5655eqcoms 2659 . . . . . . . . . . . . . . . . . . . . . . 23 ((𝑚 + 1) = (#‘𝑤) → ((#‘𝑤) ∈ ℕ ↔ (𝑚 + 1) ∈ ℕ))
5754, 56syl5ibr 236 . . . . . . . . . . . . . . . . . . . . . 22 ((𝑚 + 1) = (#‘𝑤) → (𝑚 ∈ ℕ0 → (#‘𝑤) ∈ ℕ))
5853, 57syl6bi 243 . . . . . . . . . . . . . . . . . . . . 21 ((#‘𝑥) = (𝑚 + 1) → ((#‘𝑥) = (#‘𝑤) → (𝑚 ∈ ℕ0 → (#‘𝑤) ∈ ℕ)))
5958impcom 445 . . . . . . . . . . . . . . . . . . . 20 (((#‘𝑥) = (#‘𝑤) ∧ (#‘𝑥) = (𝑚 + 1)) → (𝑚 ∈ ℕ0 → (#‘𝑤) ∈ ℕ))
6059adantl 481 . . . . . . . . . . . . . . . . . . 19 (((𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋) ∧ ((#‘𝑥) = (#‘𝑤) ∧ (#‘𝑥) = (𝑚 + 1))) → (𝑚 ∈ ℕ0 → (#‘𝑤) ∈ ℕ))
6160impcom 445 . . . . . . . . . . . . . . . . . 18 ((𝑚 ∈ ℕ0 ∧ ((𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋) ∧ ((#‘𝑥) = (#‘𝑤) ∧ (#‘𝑥) = (𝑚 + 1)))) → (#‘𝑤) ∈ ℕ)
6261nnge1d 11101 . . . . . . . . . . . . . . . . 17 ((𝑚 ∈ ℕ0 ∧ ((𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋) ∧ ((#‘𝑥) = (#‘𝑤) ∧ (#‘𝑥) = (𝑚 + 1)))) → 1 ≤ (#‘𝑤))
63 wrdlenge1n0 13372 . . . . . . . . . . . . . . . . . 18 (𝑤 ∈ Word 𝑌 → (𝑤 ≠ ∅ ↔ 1 ≤ (#‘𝑤)))
6452, 63syl 17 . . . . . . . . . . . . . . . . 17 ((𝑚 ∈ ℕ0 ∧ ((𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋) ∧ ((#‘𝑥) = (#‘𝑤) ∧ (#‘𝑥) = (𝑚 + 1)))) → (𝑤 ≠ ∅ ↔ 1 ≤ (#‘𝑤)))
6562, 64mpbird 247 . . . . . . . . . . . . . . . 16 ((𝑚 ∈ ℕ0 ∧ ((𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋) ∧ ((#‘𝑥) = (#‘𝑤) ∧ (#‘𝑥) = (𝑚 + 1)))) → 𝑤 ≠ ∅)
66 lswcl 13388 . . . . . . . . . . . . . . . 16 ((𝑤 ∈ Word 𝑌𝑤 ≠ ∅) → ( lastS ‘𝑤) ∈ 𝑌)
6752, 65, 66syl2anc 694 . . . . . . . . . . . . . . 15 ((𝑚 ∈ ℕ0 ∧ ((𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋) ∧ ((#‘𝑥) = (#‘𝑤) ∧ (#‘𝑥) = (𝑚 + 1)))) → ( lastS ‘𝑤) ∈ 𝑌)
6851, 67jca 553 . . . . . . . . . . . . . 14 ((𝑚 ∈ ℕ0 ∧ ((𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋) ∧ ((#‘𝑥) = (#‘𝑤) ∧ (#‘𝑥) = (𝑚 + 1)))) → ((𝑤 substr ⟨0, ((#‘𝑤) − 1)⟩) ∈ Word 𝑌 ∧ ( lastS ‘𝑤) ∈ 𝑌))
69 swrdcl 13464 . . . . . . . . . . . . . . . 16 (𝑥 ∈ Word 𝑋 → (𝑥 substr ⟨0, ((#‘𝑥) − 1)⟩) ∈ Word 𝑋)
7069adantl 481 . . . . . . . . . . . . . . 15 ((𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋) → (𝑥 substr ⟨0, ((#‘𝑥) − 1)⟩) ∈ Word 𝑋)
7170ad2antrl 764 . . . . . . . . . . . . . 14 ((𝑚 ∈ ℕ0 ∧ ((𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋) ∧ ((#‘𝑥) = (#‘𝑤) ∧ (#‘𝑥) = (𝑚 + 1)))) → (𝑥 substr ⟨0, ((#‘𝑥) − 1)⟩) ∈ Word 𝑋)
72 simprlr 820 . . . . . . . . . . . . . . 15 ((𝑚 ∈ ℕ0 ∧ ((𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋) ∧ ((#‘𝑥) = (#‘𝑤) ∧ (#‘𝑥) = (𝑚 + 1)))) → 𝑥 ∈ Word 𝑋)
73 eleq1 2718 . . . . . . . . . . . . . . . . . . . 20 ((#‘𝑥) = (𝑚 + 1) → ((#‘𝑥) ∈ ℕ ↔ (𝑚 + 1) ∈ ℕ))
7454, 73syl5ibr 236 . . . . . . . . . . . . . . . . . . 19 ((#‘𝑥) = (𝑚 + 1) → (𝑚 ∈ ℕ0 → (#‘𝑥) ∈ ℕ))
7574ad2antll 765 . . . . . . . . . . . . . . . . . 18 (((𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋) ∧ ((#‘𝑥) = (#‘𝑤) ∧ (#‘𝑥) = (𝑚 + 1))) → (𝑚 ∈ ℕ0 → (#‘𝑥) ∈ ℕ))
7675impcom 445 . . . . . . . . . . . . . . . . 17 ((𝑚 ∈ ℕ0 ∧ ((𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋) ∧ ((#‘𝑥) = (#‘𝑤) ∧ (#‘𝑥) = (𝑚 + 1)))) → (#‘𝑥) ∈ ℕ)
7776nnge1d 11101 . . . . . . . . . . . . . . . 16 ((𝑚 ∈ ℕ0 ∧ ((𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋) ∧ ((#‘𝑥) = (#‘𝑤) ∧ (#‘𝑥) = (𝑚 + 1)))) → 1 ≤ (#‘𝑥))
78 wrdlenge1n0 13372 . . . . . . . . . . . . . . . . 17 (𝑥 ∈ Word 𝑋 → (𝑥 ≠ ∅ ↔ 1 ≤ (#‘𝑥)))
7972, 78syl 17 . . . . . . . . . . . . . . . 16 ((𝑚 ∈ ℕ0 ∧ ((𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋) ∧ ((#‘𝑥) = (#‘𝑤) ∧ (#‘𝑥) = (𝑚 + 1)))) → (𝑥 ≠ ∅ ↔ 1 ≤ (#‘𝑥)))
8077, 79mpbird 247 . . . . . . . . . . . . . . 15 ((𝑚 ∈ ℕ0 ∧ ((𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋) ∧ ((#‘𝑥) = (#‘𝑤) ∧ (#‘𝑥) = (𝑚 + 1)))) → 𝑥 ≠ ∅)
81 lswcl 13388 . . . . . . . . . . . . . . 15 ((𝑥 ∈ Word 𝑋𝑥 ≠ ∅) → ( lastS ‘𝑥) ∈ 𝑋)
8272, 80, 81syl2anc 694 . . . . . . . . . . . . . 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 751 . . . . . . . . . . . 12 (((𝑚 ∈ ℕ0 ∧ ∀𝑢 ∈ Word 𝑌𝑦 ∈ Word 𝑋(((#‘𝑦) = (#‘𝑢) ∧ (#‘𝑦) = 𝑚) → 𝜒)) ∧ ((𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋) ∧ ((#‘𝑥) = (#‘𝑤) ∧ (#‘𝑥) = (𝑚 + 1)))) → (((𝑤 substr ⟨0, ((#‘𝑤) − 1)⟩) ∈ Word 𝑌 ∧ ( lastS ‘𝑤) ∈ 𝑌) ∧ ((𝑥 substr ⟨0, ((#‘𝑥) − 1)⟩) ∈ Word 𝑋 ∧ ( lastS ‘𝑥) ∈ 𝑋)))
85 simprl 809 . . . . . . . . . . . . . 14 (((𝑚 ∈ ℕ0 ∧ ∀𝑢 ∈ Word 𝑌𝑦 ∈ Word 𝑋(((#‘𝑦) = (#‘𝑢) ∧ (#‘𝑦) = 𝑚) → 𝜒)) ∧ ((𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋) ∧ ((#‘𝑥) = (#‘𝑤) ∧ (#‘𝑥) = (𝑚 + 1)))) → (𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋))
86 simplr 807 . . . . . . . . . . . . . 14 (((𝑚 ∈ ℕ0 ∧ ∀𝑢 ∈ Word 𝑌𝑦 ∈ Word 𝑋(((#‘𝑦) = (#‘𝑢) ∧ (#‘𝑦) = 𝑚) → 𝜒)) ∧ ((𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋) ∧ ((#‘𝑥) = (#‘𝑤) ∧ (#‘𝑥) = (𝑚 + 1)))) → ∀𝑢 ∈ Word 𝑌𝑦 ∈ Word 𝑋(((#‘𝑦) = (#‘𝑢) ∧ (#‘𝑦) = 𝑚) → 𝜒))
87 simprrl 821 . . . . . . . . . . . . . . . . 17 (((𝑚 ∈ ℕ0 ∧ ∀𝑢 ∈ Word 𝑌𝑦 ∈ Word 𝑋(((#‘𝑦) = (#‘𝑢) ∧ (#‘𝑦) = 𝑚) → 𝜒)) ∧ ((𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋) ∧ ((#‘𝑥) = (#‘𝑤) ∧ (#‘𝑥) = (𝑚 + 1)))) → (#‘𝑥) = (#‘𝑤))
8887oveq1d 6705 . . . . . . . . . . . . . . . 16 (((𝑚 ∈ ℕ0 ∧ ∀𝑢 ∈ Word 𝑌𝑦 ∈ Word 𝑋(((#‘𝑦) = (#‘𝑢) ∧ (#‘𝑦) = 𝑚) → 𝜒)) ∧ ((𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋) ∧ ((#‘𝑥) = (#‘𝑤) ∧ (#‘𝑥) = (𝑚 + 1)))) → ((#‘𝑥) − 1) = ((#‘𝑤) − 1))
89 simprlr 820 . . . . . . . . . . . . . . . . 17 (((𝑚 ∈ ℕ0 ∧ ∀𝑢 ∈ Word 𝑌𝑦 ∈ Word 𝑋(((#‘𝑦) = (#‘𝑢) ∧ (#‘𝑦) = 𝑚) → 𝜒)) ∧ ((𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋) ∧ ((#‘𝑥) = (#‘𝑤) ∧ (#‘𝑥) = (𝑚 + 1)))) → 𝑥 ∈ Word 𝑋)
90 fzossfz 12527 . . . . . . . . . . . . . . . . . 18 (0..^(#‘𝑥)) ⊆ (0...(#‘𝑥))
91 simprrr 822 . . . . . . . . . . . . . . . . . . . 20 (((𝑚 ∈ ℕ0 ∧ ∀𝑢 ∈ Word 𝑌𝑦 ∈ Word 𝑋(((#‘𝑦) = (#‘𝑢) ∧ (#‘𝑦) = 𝑚) → 𝜒)) ∧ ((𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋) ∧ ((#‘𝑥) = (#‘𝑤) ∧ (#‘𝑥) = (𝑚 + 1)))) → (#‘𝑥) = (𝑚 + 1))
9254ad2antrr 762 . . . . . . . . . . . . . . . . . . . 20 (((𝑚 ∈ ℕ0 ∧ ∀𝑢 ∈ Word 𝑌𝑦 ∈ Word 𝑋(((#‘𝑦) = (#‘𝑢) ∧ (#‘𝑦) = 𝑚) → 𝜒)) ∧ ((𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋) ∧ ((#‘𝑥) = (#‘𝑤) ∧ (#‘𝑥) = (𝑚 + 1)))) → (𝑚 + 1) ∈ ℕ)
9391, 92eqeltrd 2730 . . . . . . . . . . . . . . . . . . 19 (((𝑚 ∈ ℕ0 ∧ ∀𝑢 ∈ Word 𝑌𝑦 ∈ Word 𝑋(((#‘𝑦) = (#‘𝑢) ∧ (#‘𝑦) = 𝑚) → 𝜒)) ∧ ((𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋) ∧ ((#‘𝑥) = (#‘𝑤) ∧ (#‘𝑥) = (𝑚 + 1)))) → (#‘𝑥) ∈ ℕ)
94 fzo0end 12600 . . . . . . . . . . . . . . . . . . 19 ((#‘𝑥) ∈ ℕ → ((#‘𝑥) − 1) ∈ (0..^(#‘𝑥)))
9593, 94syl 17 . . . . . . . . . . . . . . . . . 18 (((𝑚 ∈ ℕ0 ∧ ∀𝑢 ∈ Word 𝑌𝑦 ∈ Word 𝑋(((#‘𝑦) = (#‘𝑢) ∧ (#‘𝑦) = 𝑚) → 𝜒)) ∧ ((𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋) ∧ ((#‘𝑥) = (#‘𝑤) ∧ (#‘𝑥) = (𝑚 + 1)))) → ((#‘𝑥) − 1) ∈ (0..^(#‘𝑥)))
9690, 95sseldi 3634 . . . . . . . . . . . . . . . . 17 (((𝑚 ∈ ℕ0 ∧ ∀𝑢 ∈ Word 𝑌𝑦 ∈ Word 𝑋(((#‘𝑦) = (#‘𝑢) ∧ (#‘𝑦) = 𝑚) → 𝜒)) ∧ ((𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋) ∧ ((#‘𝑥) = (#‘𝑤) ∧ (#‘𝑥) = (𝑚 + 1)))) → ((#‘𝑥) − 1) ∈ (0...(#‘𝑥)))
97 swrd0len 13467 . . . . . . . . . . . . . . . . 17 ((𝑥 ∈ Word 𝑋 ∧ ((#‘𝑥) − 1) ∈ (0...(#‘𝑥))) → (#‘(𝑥 substr ⟨0, ((#‘𝑥) − 1)⟩)) = ((#‘𝑥) − 1))
9889, 96, 97syl2anc 694 . . . . . . . . . . . . . . . 16 (((𝑚 ∈ ℕ0 ∧ ∀𝑢 ∈ Word 𝑌𝑦 ∈ Word 𝑋(((#‘𝑦) = (#‘𝑢) ∧ (#‘𝑦) = 𝑚) → 𝜒)) ∧ ((𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋) ∧ ((#‘𝑥) = (#‘𝑤) ∧ (#‘𝑥) = (𝑚 + 1)))) → (#‘(𝑥 substr ⟨0, ((#‘𝑥) − 1)⟩)) = ((#‘𝑥) − 1))
99 simprll 819 . . . . . . . . . . . . . . . . 17 (((𝑚 ∈ ℕ0 ∧ ∀𝑢 ∈ Word 𝑌𝑦 ∈ Word 𝑋(((#‘𝑦) = (#‘𝑢) ∧ (#‘𝑦) = 𝑚) → 𝜒)) ∧ ((𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋) ∧ ((#‘𝑥) = (#‘𝑤) ∧ (#‘𝑥) = (𝑚 + 1)))) → 𝑤 ∈ Word 𝑌)
100 oveq1 6697 . . . . . . . . . . . . . . . . . . . . . 22 ((#‘𝑤) = (#‘𝑥) → ((#‘𝑤) − 1) = ((#‘𝑥) − 1))
101 oveq2 6698 . . . . . . . . . . . . . . . . . . . . . 22 ((#‘𝑤) = (#‘𝑥) → (0...(#‘𝑤)) = (0...(#‘𝑥)))
102100, 101eleq12d 2724 . . . . . . . . . . . . . . . . . . . . 21 ((#‘𝑤) = (#‘𝑥) → (((#‘𝑤) − 1) ∈ (0...(#‘𝑤)) ↔ ((#‘𝑥) − 1) ∈ (0...(#‘𝑥))))
103102eqcoms 2659 . . . . . . . . . . . . . . . . . . . 20 ((#‘𝑥) = (#‘𝑤) → (((#‘𝑤) − 1) ∈ (0...(#‘𝑤)) ↔ ((#‘𝑥) − 1) ∈ (0...(#‘𝑥))))
104103adantr 480 . . . . . . . . . . . . . . . . . . 19 (((#‘𝑥) = (#‘𝑤) ∧ (#‘𝑥) = (𝑚 + 1)) → (((#‘𝑤) − 1) ∈ (0...(#‘𝑤)) ↔ ((#‘𝑥) − 1) ∈ (0...(#‘𝑥))))
105104ad2antll 765 . . . . . . . . . . . . . . . . . 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 13467 . . . . . . . . . . . . . . . . 17 ((𝑤 ∈ Word 𝑌 ∧ ((#‘𝑤) − 1) ∈ (0...(#‘𝑤))) → (#‘(𝑤 substr ⟨0, ((#‘𝑤) − 1)⟩)) = ((#‘𝑤) − 1))
10899, 106, 107syl2anc 694 . . . . . . . . . . . . . . . 16 (((𝑚 ∈ ℕ0 ∧ ∀𝑢 ∈ Word 𝑌𝑦 ∈ Word 𝑋(((#‘𝑦) = (#‘𝑢) ∧ (#‘𝑦) = 𝑚) → 𝜒)) ∧ ((𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋) ∧ ((#‘𝑥) = (#‘𝑤) ∧ (#‘𝑥) = (𝑚 + 1)))) → (#‘(𝑤 substr ⟨0, ((#‘𝑤) − 1)⟩)) = ((#‘𝑤) − 1))
10988, 98, 1083eqtr4d 2695 . . . . . . . . . . . . . . 15 (((𝑚 ∈ ℕ0 ∧ ∀𝑢 ∈ Word 𝑌𝑦 ∈ Word 𝑋(((#‘𝑦) = (#‘𝑢) ∧ (#‘𝑦) = 𝑚) → 𝜒)) ∧ ((𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋) ∧ ((#‘𝑥) = (#‘𝑤) ∧ (#‘𝑥) = (𝑚 + 1)))) → (#‘(𝑥 substr ⟨0, ((#‘𝑥) − 1)⟩)) = (#‘(𝑤 substr ⟨0, ((#‘𝑤) − 1)⟩)))
11091oveq1d 6705 . . . . . . . . . . . . . . . 16 (((𝑚 ∈ ℕ0 ∧ ∀𝑢 ∈ Word 𝑌𝑦 ∈ Word 𝑋(((#‘𝑦) = (#‘𝑢) ∧ (#‘𝑦) = 𝑚) → 𝜒)) ∧ ((𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋) ∧ ((#‘𝑥) = (#‘𝑤) ∧ (#‘𝑥) = (𝑚 + 1)))) → ((#‘𝑥) − 1) = ((𝑚 + 1) − 1))
111 nn0cn 11340 . . . . . . . . . . . . . . . . . 18 (𝑚 ∈ ℕ0𝑚 ∈ ℂ)
112111ad2antrr 762 . . . . . . . . . . . . . . . . 17 (((𝑚 ∈ ℕ0 ∧ ∀𝑢 ∈ Word 𝑌𝑦 ∈ Word 𝑋(((#‘𝑦) = (#‘𝑢) ∧ (#‘𝑦) = 𝑚) → 𝜒)) ∧ ((𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋) ∧ ((#‘𝑥) = (#‘𝑤) ∧ (#‘𝑥) = (𝑚 + 1)))) → 𝑚 ∈ ℂ)
113 ax-1cn 10032 . . . . . . . . . . . . . . . . 17 1 ∈ ℂ
114 pncan 10325 . . . . . . . . . . . . . . . . 17 ((𝑚 ∈ ℂ ∧ 1 ∈ ℂ) → ((𝑚 + 1) − 1) = 𝑚)
115112, 113, 114sylancl 695 . . . . . . . . . . . . . . . 16 (((𝑚 ∈ ℕ0 ∧ ∀𝑢 ∈ Word 𝑌𝑦 ∈ Word 𝑋(((#‘𝑦) = (#‘𝑢) ∧ (#‘𝑦) = 𝑚) → 𝜒)) ∧ ((𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋) ∧ ((#‘𝑥) = (#‘𝑤) ∧ (#‘𝑥) = (𝑚 + 1)))) → ((𝑚 + 1) − 1) = 𝑚)
11698, 110, 1153eqtrd 2689 . . . . . . . . . . . . . . 15 (((𝑚 ∈ ℕ0 ∧ ∀𝑢 ∈ Word 𝑌𝑦 ∈ Word 𝑋(((#‘𝑦) = (#‘𝑢) ∧ (#‘𝑦) = 𝑚) → 𝜒)) ∧ ((𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋) ∧ ((#‘𝑥) = (#‘𝑤) ∧ (#‘𝑥) = (𝑚 + 1)))) → (#‘(𝑥 substr ⟨0, ((#‘𝑥) − 1)⟩)) = 𝑚)
117109, 116jca 553 . . . . . . . . . . . . . 14 (((𝑚 ∈ ℕ0 ∧ ∀𝑢 ∈ Word 𝑌𝑦 ∈ Word 𝑋(((#‘𝑦) = (#‘𝑢) ∧ (#‘𝑦) = 𝑚) → 𝜒)) ∧ ((𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋) ∧ ((#‘𝑥) = (#‘𝑤) ∧ (#‘𝑥) = (𝑚 + 1)))) → ((#‘(𝑥 substr ⟨0, ((#‘𝑥) − 1)⟩)) = (#‘(𝑤 substr ⟨0, ((#‘𝑤) − 1)⟩)) ∧ (#‘(𝑥 substr ⟨0, ((#‘𝑥) − 1)⟩)) = 𝑚))
11870adantr 480 . . . . . . . . . . . . . . . 16 (((𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋) ∧ 𝑢 = (𝑤 substr ⟨0, ((#‘𝑤) − 1)⟩)) → (𝑥 substr ⟨0, ((#‘𝑥) − 1)⟩) ∈ Word 𝑋)
119 fveq2 6229 . . . . . . . . . . . . . . . . . . . . . 22 (𝑦 = (𝑥 substr ⟨0, ((#‘𝑥) − 1)⟩) → (#‘𝑦) = (#‘(𝑥 substr ⟨0, ((#‘𝑥) − 1)⟩)))
120 fveq2 6229 . . . . . . . . . . . . . . . . . . . . . 22 (𝑢 = (𝑤 substr ⟨0, ((#‘𝑤) − 1)⟩) → (#‘𝑢) = (#‘(𝑤 substr ⟨0, ((#‘𝑤) − 1)⟩)))
121119, 120eqeqan12d 2667 . . . . . . . . . . . . . . . . . . . . 21 ((𝑦 = (𝑥 substr ⟨0, ((#‘𝑥) − 1)⟩) ∧ 𝑢 = (𝑤 substr ⟨0, ((#‘𝑤) − 1)⟩)) → ((#‘𝑦) = (#‘𝑢) ↔ (#‘(𝑥 substr ⟨0, ((#‘𝑥) − 1)⟩)) = (#‘(𝑤 substr ⟨0, ((#‘𝑤) − 1)⟩))))
122121expcom 450 . . . . . . . . . . . . . . . . . . . 20 (𝑢 = (𝑤 substr ⟨0, ((#‘𝑤) − 1)⟩) → (𝑦 = (𝑥 substr ⟨0, ((#‘𝑥) − 1)⟩) → ((#‘𝑦) = (#‘𝑢) ↔ (#‘(𝑥 substr ⟨0, ((#‘𝑥) − 1)⟩)) = (#‘(𝑤 substr ⟨0, ((#‘𝑤) − 1)⟩)))))
123122adantl 481 . . . . . . . . . . . . . . . . . . 19 (((𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋) ∧ 𝑢 = (𝑤 substr ⟨0, ((#‘𝑤) − 1)⟩)) → (𝑦 = (𝑥 substr ⟨0, ((#‘𝑥) − 1)⟩) → ((#‘𝑦) = (#‘𝑢) ↔ (#‘(𝑥 substr ⟨0, ((#‘𝑥) − 1)⟩)) = (#‘(𝑤 substr ⟨0, ((#‘𝑤) − 1)⟩)))))
124123imp 444 . . . . . . . . . . . . . . . . . 18 ((((𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋) ∧ 𝑢 = (𝑤 substr ⟨0, ((#‘𝑤) − 1)⟩)) ∧ 𝑦 = (𝑥 substr ⟨0, ((#‘𝑥) − 1)⟩)) → ((#‘𝑦) = (#‘𝑢) ↔ (#‘(𝑥 substr ⟨0, ((#‘𝑥) − 1)⟩)) = (#‘(𝑤 substr ⟨0, ((#‘𝑤) − 1)⟩))))
125119eqeq1d 2653 . . . . . . . . . . . . . . . . . . 19 (𝑦 = (𝑥 substr ⟨0, ((#‘𝑥) − 1)⟩) → ((#‘𝑦) = 𝑚 ↔ (#‘(𝑥 substr ⟨0, ((#‘𝑥) − 1)⟩)) = 𝑚))
126125adantl 481 . . . . . . . . . . . . . . . . . 18 ((((𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋) ∧ 𝑢 = (𝑤 substr ⟨0, ((#‘𝑤) − 1)⟩)) ∧ 𝑦 = (𝑥 substr ⟨0, ((#‘𝑥) − 1)⟩)) → ((#‘𝑦) = 𝑚 ↔ (#‘(𝑥 substr ⟨0, ((#‘𝑥) − 1)⟩)) = 𝑚))
127124, 126anbi12d 747 . . . . . . . . . . . . . . . . 17 ((((𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋) ∧ 𝑢 = (𝑤 substr ⟨0, ((#‘𝑤) − 1)⟩)) ∧ 𝑦 = (𝑥 substr ⟨0, ((#‘𝑥) − 1)⟩)) → (((#‘𝑦) = (#‘𝑢) ∧ (#‘𝑦) = 𝑚) ↔ ((#‘(𝑥 substr ⟨0, ((#‘𝑥) − 1)⟩)) = (#‘(𝑤 substr ⟨0, ((#‘𝑤) − 1)⟩)) ∧ (#‘(𝑥 substr ⟨0, ((#‘𝑥) − 1)⟩)) = 𝑚)))
128 vex 3234 . . . . . . . . . . . . . . . . . . . . 21 𝑦 ∈ V
129 vex 3234 . . . . . . . . . . . . . . . . . . . . 21 𝑢 ∈ V
130128, 129, 44sbc2ie 3538 . . . . . . . . . . . . . . . . . . . 20 ([𝑦 / 𝑥][𝑢 / 𝑤]𝜑𝜒)
131130bicomi 214 . . . . . . . . . . . . . . . . . . 19 (𝜒[𝑦 / 𝑥][𝑢 / 𝑤]𝜑)
132131a1i 11 . . . . . . . . . . . . . . . . . 18 ((((𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋) ∧ 𝑢 = (𝑤 substr ⟨0, ((#‘𝑤) − 1)⟩)) ∧ 𝑦 = (𝑥 substr ⟨0, ((#‘𝑥) − 1)⟩)) → (𝜒[𝑦 / 𝑥][𝑢 / 𝑤]𝜑))
133 simpr 476 . . . . . . . . . . . . . . . . . . 19 ((((𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋) ∧ 𝑢 = (𝑤 substr ⟨0, ((#‘𝑤) − 1)⟩)) ∧ 𝑦 = (𝑥 substr ⟨0, ((#‘𝑥) − 1)⟩)) → 𝑦 = (𝑥 substr ⟨0, ((#‘𝑥) − 1)⟩))
134133sbceq1d 3473 . . . . . . . . . . . . . . . . . 18 ((((𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋) ∧ 𝑢 = (𝑤 substr ⟨0, ((#‘𝑤) − 1)⟩)) ∧ 𝑦 = (𝑥 substr ⟨0, ((#‘𝑥) − 1)⟩)) → ([𝑦 / 𝑥][𝑢 / 𝑤]𝜑[(𝑥 substr ⟨0, ((#‘𝑥) − 1)⟩) / 𝑥][𝑢 / 𝑤]𝜑))
135 dfsbcq 3470 . . . . . . . . . . . . . . . . . . . . 21 (𝑢 = (𝑤 substr ⟨0, ((#‘𝑤) − 1)⟩) → ([𝑢 / 𝑤]𝜑[(𝑤 substr ⟨0, ((#‘𝑤) − 1)⟩) / 𝑤]𝜑))
136135sbcbidv 3523 . . . . . . . . . . . . . . . . . . . 20 (𝑢 = (𝑤 substr ⟨0, ((#‘𝑤) − 1)⟩) → ([(𝑥 substr ⟨0, ((#‘𝑥) − 1)⟩) / 𝑥][𝑢 / 𝑤]𝜑[(𝑥 substr ⟨0, ((#‘𝑥) − 1)⟩) / 𝑥][(𝑤 substr ⟨0, ((#‘𝑤) − 1)⟩) / 𝑤]𝜑))
137136adantl 481 . . . . . . . . . . . . . . . . . . 19 (((𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋) ∧ 𝑢 = (𝑤 substr ⟨0, ((#‘𝑤) − 1)⟩)) → ([(𝑥 substr ⟨0, ((#‘𝑥) − 1)⟩) / 𝑥][𝑢 / 𝑤]𝜑[(𝑥 substr ⟨0, ((#‘𝑥) − 1)⟩) / 𝑥][(𝑤 substr ⟨0, ((#‘𝑤) − 1)⟩) / 𝑤]𝜑))
138137adantr 480 . . . . . . . . . . . . . . . . . 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 333 . . . . . . . . . . . . . . . 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 3343 . . . . . . . . . . . . . . 15 (((𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋) ∧ 𝑢 = (𝑤 substr ⟨0, ((#‘𝑤) − 1)⟩)) → (∀𝑦 ∈ Word 𝑋(((#‘𝑦) = (#‘𝑢) ∧ (#‘𝑦) = 𝑚) → 𝜒) → (((#‘(𝑥 substr ⟨0, ((#‘𝑥) − 1)⟩)) = (#‘(𝑤 substr ⟨0, ((#‘𝑤) − 1)⟩)) ∧ (#‘(𝑥 substr ⟨0, ((#‘𝑥) − 1)⟩)) = 𝑚) → [(𝑥 substr ⟨0, ((#‘𝑥) − 1)⟩) / 𝑥][(𝑤 substr ⟨0, ((#‘𝑤) − 1)⟩) / 𝑤]𝜑)))
14250, 141rspcimdv 3341 . . . . . . . . . . . . . 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 553 . . . . . . . . . . . 12 (((𝑚 ∈ ℕ0 ∧ ∀𝑢 ∈ Word 𝑌𝑦 ∈ Word 𝑋(((#‘𝑦) = (#‘𝑢) ∧ (#‘𝑦) = 𝑚) → 𝜒)) ∧ ((𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋) ∧ ((#‘𝑥) = (#‘𝑤) ∧ (#‘𝑥) = (𝑚 + 1)))) → ([(𝑥 substr ⟨0, ((#‘𝑥) − 1)⟩) / 𝑥][(𝑤 substr ⟨0, ((#‘𝑤) − 1)⟩) / 𝑤]𝜑 ∧ (#‘(𝑥 substr ⟨0, ((#‘𝑥) − 1)⟩)) = (#‘(𝑤 substr ⟨0, ((#‘𝑤) − 1)⟩))))
145 dfsbcq 3470 . . . . . . . . . . . . . . . 16 (𝑢 = (𝑤 substr ⟨0, ((#‘𝑤) − 1)⟩) → ([𝑢 / 𝑤][𝑦 / 𝑥]𝜑[(𝑤 substr ⟨0, ((#‘𝑤) − 1)⟩) / 𝑤][𝑦 / 𝑥]𝜑))
146 sbccom 3542 . . . . . . . . . . . . . . . 16 ([(𝑤 substr ⟨0, ((#‘𝑤) − 1)⟩) / 𝑤][𝑦 / 𝑥]𝜑[𝑦 / 𝑥][(𝑤 substr ⟨0, ((#‘𝑤) − 1)⟩) / 𝑤]𝜑)
147145, 146syl6bb 276 . . . . . . . . . . . . . . 15 (𝑢 = (𝑤 substr ⟨0, ((#‘𝑤) − 1)⟩) → ([𝑢 / 𝑤][𝑦 / 𝑥]𝜑[𝑦 / 𝑥][(𝑤 substr ⟨0, ((#‘𝑤) − 1)⟩) / 𝑤]𝜑))
148120eqeq2d 2661 . . . . . . . . . . . . . . 15 (𝑢 = (𝑤 substr ⟨0, ((#‘𝑤) − 1)⟩) → ((#‘𝑦) = (#‘𝑢) ↔ (#‘𝑦) = (#‘(𝑤 substr ⟨0, ((#‘𝑤) − 1)⟩))))
149147, 148anbi12d 747 . . . . . . . . . . . . . 14 (𝑢 = (𝑤 substr ⟨0, ((#‘𝑤) − 1)⟩) → (([𝑢 / 𝑤][𝑦 / 𝑥]𝜑 ∧ (#‘𝑦) = (#‘𝑢)) ↔ ([𝑦 / 𝑥][(𝑤 substr ⟨0, ((#‘𝑤) − 1)⟩) / 𝑤]𝜑 ∧ (#‘𝑦) = (#‘(𝑤 substr ⟨0, ((#‘𝑤) − 1)⟩)))))
150 oveq1 6697 . . . . . . . . . . . . . . 15 (𝑢 = (𝑤 substr ⟨0, ((#‘𝑤) − 1)⟩) → (𝑢 ++ ⟨“𝑠”⟩) = ((𝑤 substr ⟨0, ((#‘𝑤) − 1)⟩) ++ ⟨“𝑠”⟩))
151150sbceq1d 3473 . . . . . . . . . . . . . 14 (𝑢 = (𝑤 substr ⟨0, ((#‘𝑤) − 1)⟩) → ([(𝑢 ++ ⟨“𝑠”⟩) / 𝑤][(𝑦 ++ ⟨“𝑧”⟩) / 𝑥]𝜑[((𝑤 substr ⟨0, ((#‘𝑤) − 1)⟩) ++ ⟨“𝑠”⟩) / 𝑤][(𝑦 ++ ⟨“𝑧”⟩) / 𝑥]𝜑))
152149, 151imbi12d 333 . . . . . . . . . . . . 13 (𝑢 = (𝑤 substr ⟨0, ((#‘𝑤) − 1)⟩) → ((([𝑢 / 𝑤][𝑦 / 𝑥]𝜑 ∧ (#‘𝑦) = (#‘𝑢)) → [(𝑢 ++ ⟨“𝑠”⟩) / 𝑤][(𝑦 ++ ⟨“𝑧”⟩) / 𝑥]𝜑) ↔ (([𝑦 / 𝑥][(𝑤 substr ⟨0, ((#‘𝑤) − 1)⟩) / 𝑤]𝜑 ∧ (#‘𝑦) = (#‘(𝑤 substr ⟨0, ((#‘𝑤) − 1)⟩))) → [((𝑤 substr ⟨0, ((#‘𝑤) − 1)⟩) ++ ⟨“𝑠”⟩) / 𝑤][(𝑦 ++ ⟨“𝑧”⟩) / 𝑥]𝜑)))
153 s1eq 13416 . . . . . . . . . . . . . . . . 17 (𝑠 = ( lastS ‘𝑤) → ⟨“𝑠”⟩ = ⟨“( lastS ‘𝑤)”⟩)
154153oveq2d 6706 . . . . . . . . . . . . . . . 16 (𝑠 = ( lastS ‘𝑤) → ((𝑤 substr ⟨0, ((#‘𝑤) − 1)⟩) ++ ⟨“𝑠”⟩) = ((𝑤 substr ⟨0, ((#‘𝑤) − 1)⟩) ++ ⟨“( lastS ‘𝑤)”⟩))
155154sbceq1d 3473 . . . . . . . . . . . . . . 15 (𝑠 = ( lastS ‘𝑤) → ([((𝑤 substr ⟨0, ((#‘𝑤) − 1)⟩) ++ ⟨“𝑠”⟩) / 𝑤][(𝑦 ++ ⟨“𝑧”⟩) / 𝑥]𝜑[((𝑤 substr ⟨0, ((#‘𝑤) − 1)⟩) ++ ⟨“( lastS ‘𝑤)”⟩) / 𝑤][(𝑦 ++ ⟨“𝑧”⟩) / 𝑥]𝜑))
156155imbi2d 329 . . . . . . . . . . . . . 14 (𝑠 = ( lastS ‘𝑤) → ((([𝑦 / 𝑥][(𝑤 substr ⟨0, ((#‘𝑤) − 1)⟩) / 𝑤]𝜑 ∧ (#‘𝑦) = (#‘(𝑤 substr ⟨0, ((#‘𝑤) − 1)⟩))) → [((𝑤 substr ⟨0, ((#‘𝑤) − 1)⟩) ++ ⟨“𝑠”⟩) / 𝑤][(𝑦 ++ ⟨“𝑧”⟩) / 𝑥]𝜑) ↔ (([𝑦 / 𝑥][(𝑤 substr ⟨0, ((#‘𝑤) − 1)⟩) / 𝑤]𝜑 ∧ (#‘𝑦) = (#‘(𝑤 substr ⟨0, ((#‘𝑤) − 1)⟩))) → [((𝑤 substr ⟨0, ((#‘𝑤) − 1)⟩) ++ ⟨“( lastS ‘𝑤)”⟩) / 𝑤][(𝑦 ++ ⟨“𝑧”⟩) / 𝑥]𝜑)))
157 sbccom 3542 . . . . . . . . . . . . . . . 16 ([((𝑤 substr ⟨0, ((#‘𝑤) − 1)⟩) ++ ⟨“( lastS ‘𝑤)”⟩) / 𝑤][(𝑦 ++ ⟨“𝑧”⟩) / 𝑥]𝜑[(𝑦 ++ ⟨“𝑧”⟩) / 𝑥][((𝑤 substr ⟨0, ((#‘𝑤) − 1)⟩) ++ ⟨“( lastS ‘𝑤)”⟩) / 𝑤]𝜑)
158157a1i 11 . . . . . . . . . . . . . . 15 (𝑠 = ( lastS ‘𝑤) → ([((𝑤 substr ⟨0, ((#‘𝑤) − 1)⟩) ++ ⟨“( lastS ‘𝑤)”⟩) / 𝑤][(𝑦 ++ ⟨“𝑧”⟩) / 𝑥]𝜑[(𝑦 ++ ⟨“𝑧”⟩) / 𝑥][((𝑤 substr ⟨0, ((#‘𝑤) − 1)⟩) ++ ⟨“( lastS ‘𝑤)”⟩) / 𝑤]𝜑))
159158imbi2d 329 . . . . . . . . . . . . . 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 3470 . . . . . . . . . . . . . . 15 (𝑦 = (𝑥 substr ⟨0, ((#‘𝑥) − 1)⟩) → ([𝑦 / 𝑥][(𝑤 substr ⟨0, ((#‘𝑤) − 1)⟩) / 𝑤]𝜑[(𝑥 substr ⟨0, ((#‘𝑥) − 1)⟩) / 𝑥][(𝑤 substr ⟨0, ((#‘𝑤) − 1)⟩) / 𝑤]𝜑))
162119eqeq1d 2653 . . . . . . . . . . . . . . 15 (𝑦 = (𝑥 substr ⟨0, ((#‘𝑥) − 1)⟩) → ((#‘𝑦) = (#‘(𝑤 substr ⟨0, ((#‘𝑤) − 1)⟩)) ↔ (#‘(𝑥 substr ⟨0, ((#‘𝑥) − 1)⟩)) = (#‘(𝑤 substr ⟨0, ((#‘𝑤) − 1)⟩))))
163161, 162anbi12d 747 . . . . . . . . . . . . . 14 (𝑦 = (𝑥 substr ⟨0, ((#‘𝑥) − 1)⟩) → (([𝑦 / 𝑥][(𝑤 substr ⟨0, ((#‘𝑤) − 1)⟩) / 𝑤]𝜑 ∧ (#‘𝑦) = (#‘(𝑤 substr ⟨0, ((#‘𝑤) − 1)⟩))) ↔ ([(𝑥 substr ⟨0, ((#‘𝑥) − 1)⟩) / 𝑥][(𝑤 substr ⟨0, ((#‘𝑤) − 1)⟩) / 𝑤]𝜑 ∧ (#‘(𝑥 substr ⟨0, ((#‘𝑥) − 1)⟩)) = (#‘(𝑤 substr ⟨0, ((#‘𝑤) − 1)⟩)))))
164 oveq1 6697 . . . . . . . . . . . . . . 15 (𝑦 = (𝑥 substr ⟨0, ((#‘𝑥) − 1)⟩) → (𝑦 ++ ⟨“𝑧”⟩) = ((𝑥 substr ⟨0, ((#‘𝑥) − 1)⟩) ++ ⟨“𝑧”⟩))
165164sbceq1d 3473 . . . . . . . . . . . . . 14 (𝑦 = (𝑥 substr ⟨0, ((#‘𝑥) − 1)⟩) → ([(𝑦 ++ ⟨“𝑧”⟩) / 𝑥][((𝑤 substr ⟨0, ((#‘𝑤) − 1)⟩) ++ ⟨“( lastS ‘𝑤)”⟩) / 𝑤]𝜑[((𝑥 substr ⟨0, ((#‘𝑥) − 1)⟩) ++ ⟨“𝑧”⟩) / 𝑥][((𝑤 substr ⟨0, ((#‘𝑤) − 1)⟩) ++ ⟨“( lastS ‘𝑤)”⟩) / 𝑤]𝜑))
166163, 165imbi12d 333 . . . . . . . . . . . . 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 13416 . . . . . . . . . . . . . . . 16 (𝑧 = ( lastS ‘𝑥) → ⟨“𝑧”⟩ = ⟨“( lastS ‘𝑥)”⟩)
168167oveq2d 6706 . . . . . . . . . . . . . . 15 (𝑧 = ( lastS ‘𝑥) → ((𝑥 substr ⟨0, ((#‘𝑥) − 1)⟩) ++ ⟨“𝑧”⟩) = ((𝑥 substr ⟨0, ((#‘𝑥) − 1)⟩) ++ ⟨“( lastS ‘𝑥)”⟩))
169168sbceq1d 3473 . . . . . . . . . . . . . 14 (𝑧 = ( lastS ‘𝑥) → ([((𝑥 substr ⟨0, ((#‘𝑥) − 1)⟩) ++ ⟨“𝑧”⟩) / 𝑥][((𝑤 substr ⟨0, ((#‘𝑤) − 1)⟩) ++ ⟨“( lastS ‘𝑤)”⟩) / 𝑤]𝜑[((𝑥 substr ⟨0, ((#‘𝑥) − 1)⟩) ++ ⟨“( lastS ‘𝑥)”⟩) / 𝑥][((𝑤 substr ⟨0, ((#‘𝑤) − 1)⟩) ++ ⟨“( lastS ‘𝑤)”⟩) / 𝑤]𝜑))
170169imbi2d 329 . . . . . . . . . . . . 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 807 . . . . . . . . . . . . . . . . . 18 ((((𝑢 ∈ Word 𝑌𝑠𝑌) ∧ (𝑦 ∈ Word 𝑋𝑧𝑋)) ∧ (#‘𝑦) = (#‘𝑢)) → (𝑦 ∈ Word 𝑋𝑧𝑋))
172 simpll 805 . . . . . . . . . . . . . . . . . 18 ((((𝑢 ∈ Word 𝑌𝑠𝑌) ∧ (𝑦 ∈ Word 𝑋𝑧𝑋)) ∧ (#‘𝑦) = (#‘𝑢)) → (𝑢 ∈ Word 𝑌𝑠𝑌))
173 simpr 476 . . . . . . . . . . . . . . . . . 18 ((((𝑢 ∈ Word 𝑌𝑠𝑌) ∧ (𝑦 ∈ Word 𝑋𝑧𝑋)) ∧ (#‘𝑦) = (#‘𝑢)) → (#‘𝑦) = (#‘𝑢))
174 wrd2ind.7 . . . . . . . . . . . . . . . . . 18 (((𝑦 ∈ Word 𝑋𝑧𝑋) ∧ (𝑢 ∈ Word 𝑌𝑠𝑌) ∧ (#‘𝑦) = (#‘𝑢)) → (𝜒𝜃))
175171, 172, 173, 174syl3anc 1366 . . . . . . . . . . . . . . . . 17 ((((𝑢 ∈ Word 𝑌𝑠𝑌) ∧ (𝑦 ∈ Word 𝑋𝑧𝑋)) ∧ (#‘𝑦) = (#‘𝑢)) → (𝜒𝜃))
17644ancoms 468 . . . . . . . . . . . . . . . . . 18 ((𝑤 = 𝑢𝑥 = 𝑦) → (𝜑𝜒))
177129, 128, 176sbc2ie 3538 . . . . . . . . . . . . . . . . 17 ([𝑢 / 𝑤][𝑦 / 𝑥]𝜑𝜒)
178 ovex 6718 . . . . . . . . . . . . . . . . . 18 (𝑢 ++ ⟨“𝑠”⟩) ∈ V
179 ovex 6718 . . . . . . . . . . . . . . . . . 18 (𝑦 ++ ⟨“𝑧”⟩) ∈ V
180 wrd2ind.3 . . . . . . . . . . . . . . . . . . 19 ((𝑥 = (𝑦 ++ ⟨“𝑧”⟩) ∧ 𝑤 = (𝑢 ++ ⟨“𝑠”⟩)) → (𝜑𝜃))
181180ancoms 468 . . . . . . . . . . . . . . . . . 18 ((𝑤 = (𝑢 ++ ⟨“𝑠”⟩) ∧ 𝑥 = (𝑦 ++ ⟨“𝑧”⟩)) → (𝜑𝜃))
182178, 179, 181sbc2ie 3538 . . . . . . . . . . . . . . . . 17 ([(𝑢 ++ ⟨“𝑠”⟩) / 𝑤][(𝑦 ++ ⟨“𝑧”⟩) / 𝑥]𝜑𝜃)
183175, 177, 1823imtr4g 285 . . . . . . . . . . . . . . . 16 ((((𝑢 ∈ Word 𝑌𝑠𝑌) ∧ (𝑦 ∈ Word 𝑋𝑧𝑋)) ∧ (#‘𝑦) = (#‘𝑢)) → ([𝑢 / 𝑤][𝑦 / 𝑥]𝜑[(𝑢 ++ ⟨“𝑠”⟩) / 𝑤][(𝑦 ++ ⟨“𝑧”⟩) / 𝑥]𝜑))
184183ex 449 . . . . . . . . . . . . . . 15 (((𝑢 ∈ Word 𝑌𝑠𝑌) ∧ (𝑦 ∈ Word 𝑋𝑧𝑋)) → ((#‘𝑦) = (#‘𝑢) → ([𝑢 / 𝑤][𝑦 / 𝑥]𝜑[(𝑢 ++ ⟨“𝑠”⟩) / 𝑤][(𝑦 ++ ⟨“𝑧”⟩) / 𝑥]𝜑)))
185184com23 86 . . . . . . . . . . . . . 14 (((𝑢 ∈ Word 𝑌𝑠𝑌) ∧ (𝑦 ∈ Word 𝑋𝑧𝑋)) → ([𝑢 / 𝑤][𝑦 / 𝑥]𝜑 → ((#‘𝑦) = (#‘𝑢) → [(𝑢 ++ ⟨“𝑠”⟩) / 𝑤][(𝑦 ++ ⟨“𝑧”⟩) / 𝑥]𝜑)))
186185impd 446 . . . . . . . . . . . . 13 (((𝑢 ∈ Word 𝑌𝑠𝑌) ∧ (𝑦 ∈ Word 𝑋𝑧𝑋)) → (([𝑢 / 𝑤][𝑦 / 𝑥]𝜑 ∧ (#‘𝑦) = (#‘𝑢)) → [(𝑢 ++ ⟨“𝑠”⟩) / 𝑤][(𝑦 ++ ⟨“𝑧”⟩) / 𝑥]𝜑))
187152, 160, 166, 170, 186vtocl4ga 3309 . . . . . . . . . . . 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 2671 . . . . . . . . . . . . . . . 16 (((#‘𝑥) = (#‘𝑤) ∧ (#‘𝑥) = (𝑚 + 1)) → (#‘𝑤) = (𝑚 + 1))
190189ad2antll 765 . . . . . . . . . . . . . . 15 (((𝑚 ∈ ℕ0 ∧ ∀𝑢 ∈ Word 𝑌𝑦 ∈ Word 𝑋(((#‘𝑦) = (#‘𝑢) ∧ (#‘𝑦) = 𝑚) → 𝜒)) ∧ ((𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋) ∧ ((#‘𝑥) = (#‘𝑤) ∧ (#‘𝑥) = (𝑚 + 1)))) → (#‘𝑤) = (𝑚 + 1))
191190, 92eqeltrd 2730 . . . . . . . . . . . . . 14 (((𝑚 ∈ ℕ0 ∧ ∀𝑢 ∈ Word 𝑌𝑦 ∈ Word 𝑋(((#‘𝑦) = (#‘𝑢) ∧ (#‘𝑦) = 𝑚) → 𝜒)) ∧ ((𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋) ∧ ((#‘𝑥) = (#‘𝑤) ∧ (#‘𝑥) = (𝑚 + 1)))) → (#‘𝑤) ∈ ℕ)
192 wrdfin 13355 . . . . . . . . . . . . . . . . 17 (𝑤 ∈ Word 𝑌𝑤 ∈ Fin)
193192adantr 480 . . . . . . . . . . . . . . . 16 ((𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋) → 𝑤 ∈ Fin)
194193ad2antrl 764 . . . . . . . . . . . . . . 15 (((𝑚 ∈ ℕ0 ∧ ∀𝑢 ∈ Word 𝑌𝑦 ∈ Word 𝑋(((#‘𝑦) = (#‘𝑢) ∧ (#‘𝑦) = 𝑚) → 𝜒)) ∧ ((𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋) ∧ ((#‘𝑥) = (#‘𝑤) ∧ (#‘𝑥) = (𝑚 + 1)))) → 𝑤 ∈ Fin)
195 hashnncl 13195 . . . . . . . . . . . . . . 15 (𝑤 ∈ Fin → ((#‘𝑤) ∈ ℕ ↔ 𝑤 ≠ ∅))
196194, 195syl 17 . . . . . . . . . . . . . 14 (((𝑚 ∈ ℕ0 ∧ ∀𝑢 ∈ Word 𝑌𝑦 ∈ Word 𝑋(((#‘𝑦) = (#‘𝑢) ∧ (#‘𝑦) = 𝑚) → 𝜒)) ∧ ((𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋) ∧ ((#‘𝑥) = (#‘𝑤) ∧ (#‘𝑥) = (𝑚 + 1)))) → ((#‘𝑤) ∈ ℕ ↔ 𝑤 ≠ ∅))
197191, 196mpbid 222 . . . . . . . . . . . . 13 (((𝑚 ∈ ℕ0 ∧ ∀𝑢 ∈ Word 𝑌𝑦 ∈ Word 𝑋(((#‘𝑦) = (#‘𝑢) ∧ (#‘𝑦) = 𝑚) → 𝜒)) ∧ ((𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋) ∧ ((#‘𝑥) = (#‘𝑤) ∧ (#‘𝑥) = (𝑚 + 1)))) → 𝑤 ≠ ∅)
198 swrdccatwrd 13514 . . . . . . . . . . . . . 14 ((𝑤 ∈ Word 𝑌𝑤 ≠ ∅) → ((𝑤 substr ⟨0, ((#‘𝑤) − 1)⟩) ++ ⟨“( lastS ‘𝑤)”⟩) = 𝑤)
199198eqcomd 2657 . . . . . . . . . . . . 13 ((𝑤 ∈ Word 𝑌𝑤 ≠ ∅) → 𝑤 = ((𝑤 substr ⟨0, ((#‘𝑤) − 1)⟩) ++ ⟨“( lastS ‘𝑤)”⟩))
20099, 197, 199syl2anc 694 . . . . . . . . . . . 12 (((𝑚 ∈ ℕ0 ∧ ∀𝑢 ∈ Word 𝑌𝑦 ∈ Word 𝑋(((#‘𝑦) = (#‘𝑢) ∧ (#‘𝑦) = 𝑚) → 𝜒)) ∧ ((𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋) ∧ ((#‘𝑥) = (#‘𝑤) ∧ (#‘𝑥) = (𝑚 + 1)))) → 𝑤 = ((𝑤 substr ⟨0, ((#‘𝑤) − 1)⟩) ++ ⟨“( lastS ‘𝑤)”⟩))
201 wrdfin 13355 . . . . . . . . . . . . . . . . 17 (𝑥 ∈ Word 𝑋𝑥 ∈ Fin)
202201adantl 481 . . . . . . . . . . . . . . . 16 ((𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋) → 𝑥 ∈ Fin)
203202ad2antrl 764 . . . . . . . . . . . . . . 15 (((𝑚 ∈ ℕ0 ∧ ∀𝑢 ∈ Word 𝑌𝑦 ∈ Word 𝑋(((#‘𝑦) = (#‘𝑢) ∧ (#‘𝑦) = 𝑚) → 𝜒)) ∧ ((𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋) ∧ ((#‘𝑥) = (#‘𝑤) ∧ (#‘𝑥) = (𝑚 + 1)))) → 𝑥 ∈ Fin)
204 hashnncl 13195 . . . . . . . . . . . . . . 15 (𝑥 ∈ Fin → ((#‘𝑥) ∈ ℕ ↔ 𝑥 ≠ ∅))
205203, 204syl 17 . . . . . . . . . . . . . 14 (((𝑚 ∈ ℕ0 ∧ ∀𝑢 ∈ Word 𝑌𝑦 ∈ Word 𝑋(((#‘𝑦) = (#‘𝑢) ∧ (#‘𝑦) = 𝑚) → 𝜒)) ∧ ((𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋) ∧ ((#‘𝑥) = (#‘𝑤) ∧ (#‘𝑥) = (𝑚 + 1)))) → ((#‘𝑥) ∈ ℕ ↔ 𝑥 ≠ ∅))
20693, 205mpbid 222 . . . . . . . . . . . . 13 (((𝑚 ∈ ℕ0 ∧ ∀𝑢 ∈ Word 𝑌𝑦 ∈ Word 𝑋(((#‘𝑦) = (#‘𝑢) ∧ (#‘𝑦) = 𝑚) → 𝜒)) ∧ ((𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋) ∧ ((#‘𝑥) = (#‘𝑤) ∧ (#‘𝑥) = (𝑚 + 1)))) → 𝑥 ≠ ∅)
207 swrdccatwrd 13514 . . . . . . . . . . . . . 14 ((𝑥 ∈ Word 𝑋𝑥 ≠ ∅) → ((𝑥 substr ⟨0, ((#‘𝑥) − 1)⟩) ++ ⟨“( lastS ‘𝑥)”⟩) = 𝑥)
208207eqcomd 2657 . . . . . . . . . . . . 13 ((𝑥 ∈ Word 𝑋𝑥 ≠ ∅) → 𝑥 = ((𝑥 substr ⟨0, ((#‘𝑥) − 1)⟩) ++ ⟨“( lastS ‘𝑥)”⟩))
20989, 206, 208syl2anc 694 . . . . . . . . . . . 12 (((𝑚 ∈ ℕ0 ∧ ∀𝑢 ∈ Word 𝑌𝑦 ∈ Word 𝑋(((#‘𝑦) = (#‘𝑢) ∧ (#‘𝑦) = 𝑚) → 𝜒)) ∧ ((𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋) ∧ ((#‘𝑥) = (#‘𝑤) ∧ (#‘𝑥) = (𝑚 + 1)))) → 𝑥 = ((𝑥 substr ⟨0, ((#‘𝑥) − 1)⟩) ++ ⟨“( lastS ‘𝑥)”⟩))
210 sbceq1a 3479 . . . . . . . . . . . . 13 (𝑤 = ((𝑤 substr ⟨0, ((#‘𝑤) − 1)⟩) ++ ⟨“( lastS ‘𝑤)”⟩) → (𝜑[((𝑤 substr ⟨0, ((#‘𝑤) − 1)⟩) ++ ⟨“( lastS ‘𝑤)”⟩) / 𝑤]𝜑))
211 sbceq1a 3479 . . . . . . . . . . . . 13 (𝑥 = ((𝑥 substr ⟨0, ((#‘𝑥) − 1)⟩) ++ ⟨“( lastS ‘𝑥)”⟩) → ([((𝑤 substr ⟨0, ((#‘𝑤) − 1)⟩) ++ ⟨“( lastS ‘𝑤)”⟩) / 𝑤]𝜑[((𝑥 substr ⟨0, ((#‘𝑥) − 1)⟩) ++ ⟨“( lastS ‘𝑥)”⟩) / 𝑥][((𝑤 substr ⟨0, ((#‘𝑤) − 1)⟩) ++ ⟨“( lastS ‘𝑤)”⟩) / 𝑤]𝜑))
212210, 211sylan9bb 736 . . . . . . . . . . . 12 ((𝑤 = ((𝑤 substr ⟨0, ((#‘𝑤) − 1)⟩) ++ ⟨“( lastS ‘𝑤)”⟩) ∧ 𝑥 = ((𝑥 substr ⟨0, ((#‘𝑥) − 1)⟩) ++ ⟨“( lastS ‘𝑥)”⟩)) → (𝜑[((𝑥 substr ⟨0, ((#‘𝑥) − 1)⟩) ++ ⟨“( lastS ‘𝑥)”⟩) / 𝑥][((𝑤 substr ⟨0, ((#‘𝑤) − 1)⟩) ++ ⟨“( lastS ‘𝑤)”⟩) / 𝑤]𝜑))
213200, 209, 212syl2anc 694 . . . . . . . . . . 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 3000 . . . . . . . 8 ((𝑚 ∈ ℕ0 ∧ ∀𝑢 ∈ Word 𝑌𝑦 ∈ Word 𝑋(((#‘𝑦) = (#‘𝑢) ∧ (#‘𝑦) = 𝑚) → 𝜒)) → ∀𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋(((#‘𝑥) = (#‘𝑤) ∧ (#‘𝑥) = (𝑚 + 1)) → 𝜑))
217216ex 449 . . . . . . 7 (𝑚 ∈ ℕ0 → (∀𝑢 ∈ Word 𝑌𝑦 ∈ Word 𝑋(((#‘𝑦) = (#‘𝑢) ∧ (#‘𝑦) = 𝑚) → 𝜒) → ∀𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋(((#‘𝑥) = (#‘𝑤) ∧ (#‘𝑥) = (𝑚 + 1)) → 𝜑)))
21848, 217syl5bi 232 . . . . . 6 (𝑚 ∈ ℕ0 → (∀𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋(((#‘𝑥) = (#‘𝑤) ∧ (#‘𝑥) = 𝑚) → 𝜑) → ∀𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋(((#‘𝑥) = (#‘𝑤) ∧ (#‘𝑥) = (𝑚 + 1)) → 𝜑)))
2195, 9, 13, 17, 37, 218nn0ind 11510 . . . . 5 ((#‘𝐴) ∈ ℕ0 → ∀𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋(((#‘𝑥) = (#‘𝑤) ∧ (#‘𝑥) = (#‘𝐴)) → 𝜑))
2201, 219syl 17 . . . 4 (𝐴 ∈ Word 𝑋 → ∀𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋(((#‘𝑥) = (#‘𝑤) ∧ (#‘𝑥) = (#‘𝐴)) → 𝜑))
2212203ad2ant1 1102 . . 3 ((𝐴 ∈ Word 𝑋𝐵 ∈ Word 𝑌 ∧ (#‘𝐴) = (#‘𝐵)) → ∀𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋(((#‘𝑥) = (#‘𝑤) ∧ (#‘𝑥) = (#‘𝐴)) → 𝜑))
222 fveq2 6229 . . . . . . . . 9 (𝑤 = 𝐵 → (#‘𝑤) = (#‘𝐵))
223222eqeq2d 2661 . . . . . . . 8 (𝑤 = 𝐵 → ((#‘𝑥) = (#‘𝑤) ↔ (#‘𝑥) = (#‘𝐵)))
224223anbi1d 741 . . . . . . 7 (𝑤 = 𝐵 → (((#‘𝑥) = (#‘𝑤) ∧ (#‘𝑥) = (#‘𝐴)) ↔ ((#‘𝑥) = (#‘𝐵) ∧ (#‘𝑥) = (#‘𝐴))))
225 wrd2ind.5 . . . . . . 7 (𝑤 = 𝐵 → (𝜑𝜌))
226224, 225imbi12d 333 . . . . . 6 (𝑤 = 𝐵 → ((((#‘𝑥) = (#‘𝑤) ∧ (#‘𝑥) = (#‘𝐴)) → 𝜑) ↔ (((#‘𝑥) = (#‘𝐵) ∧ (#‘𝑥) = (#‘𝐴)) → 𝜌)))
227226ralbidv 3015 . . . . 5 (𝑤 = 𝐵 → (∀𝑥 ∈ Word 𝑋(((#‘𝑥) = (#‘𝑤) ∧ (#‘𝑥) = (#‘𝐴)) → 𝜑) ↔ ∀𝑥 ∈ Word 𝑋(((#‘𝑥) = (#‘𝐵) ∧ (#‘𝑥) = (#‘𝐴)) → 𝜌)))
228227rspcv 3336 . . . 4 (𝐵 ∈ Word 𝑌 → (∀𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋(((#‘𝑥) = (#‘𝑤) ∧ (#‘𝑥) = (#‘𝐴)) → 𝜑) → ∀𝑥 ∈ Word 𝑋(((#‘𝑥) = (#‘𝐵) ∧ (#‘𝑥) = (#‘𝐴)) → 𝜌)))
2292283ad2ant2 1103 . . 3 ((𝐴 ∈ Word 𝑋𝐵 ∈ Word 𝑌 ∧ (#‘𝐴) = (#‘𝐵)) → (∀𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋(((#‘𝑥) = (#‘𝑤) ∧ (#‘𝑥) = (#‘𝐴)) → 𝜑) → ∀𝑥 ∈ Word 𝑋(((#‘𝑥) = (#‘𝐵) ∧ (#‘𝑥) = (#‘𝐴)) → 𝜌)))
230221, 229mpd 15 . 2 ((𝐴 ∈ Word 𝑋𝐵 ∈ Word 𝑌 ∧ (#‘𝐴) = (#‘𝐵)) → ∀𝑥 ∈ Word 𝑋(((#‘𝑥) = (#‘𝐵) ∧ (#‘𝑥) = (#‘𝐴)) → 𝜌))
231 eqidd 2652 . 2 ((𝐴 ∈ Word 𝑋𝐵 ∈ Word 𝑌 ∧ (#‘𝐴) = (#‘𝐵)) → (#‘𝐴) = (#‘𝐴))
232 fveq2 6229 . . . . . . . . . . 11 (𝑥 = 𝐴 → (#‘𝑥) = (#‘𝐴))
233232eqeq1d 2653 . . . . . . . . . 10 (𝑥 = 𝐴 → ((#‘𝑥) = (#‘𝐵) ↔ (#‘𝐴) = (#‘𝐵)))
234232eqeq1d 2653 . . . . . . . . . 10 (𝑥 = 𝐴 → ((#‘𝑥) = (#‘𝐴) ↔ (#‘𝐴) = (#‘𝐴)))
235233, 234anbi12d 747 . . . . . . . . 9 (𝑥 = 𝐴 → (((#‘𝑥) = (#‘𝐵) ∧ (#‘𝑥) = (#‘𝐴)) ↔ ((#‘𝐴) = (#‘𝐵) ∧ (#‘𝐴) = (#‘𝐴))))
236 wrd2ind.4 . . . . . . . . 9 (𝑥 = 𝐴 → (𝜌𝜏))
237235, 236imbi12d 333 . . . . . . . 8 (𝑥 = 𝐴 → ((((#‘𝑥) = (#‘𝐵) ∧ (#‘𝑥) = (#‘𝐴)) → 𝜌) ↔ (((#‘𝐴) = (#‘𝐵) ∧ (#‘𝐴) = (#‘𝐴)) → 𝜏)))
238237rspcv 3336 . . . . . . 7 (𝐴 ∈ Word 𝑋 → (∀𝑥 ∈ Word 𝑋(((#‘𝑥) = (#‘𝐵) ∧ (#‘𝑥) = (#‘𝐴)) → 𝜌) → (((#‘𝐴) = (#‘𝐵) ∧ (#‘𝐴) = (#‘𝐴)) → 𝜏)))
239238com23 86 . . . . . 6 (𝐴 ∈ Word 𝑋 → (((#‘𝐴) = (#‘𝐵) ∧ (#‘𝐴) = (#‘𝐴)) → (∀𝑥 ∈ Word 𝑋(((#‘𝑥) = (#‘𝐵) ∧ (#‘𝑥) = (#‘𝐴)) → 𝜌) → 𝜏)))
240239expd 451 . . . . 5 (𝐴 ∈ Word 𝑋 → ((#‘𝐴) = (#‘𝐵) → ((#‘𝐴) = (#‘𝐴) → (∀𝑥 ∈ Word 𝑋(((#‘𝑥) = (#‘𝐵) ∧ (#‘𝑥) = (#‘𝐴)) → 𝜌) → 𝜏))))
241240com34 91 . . . 4 (𝐴 ∈ Word 𝑋 → ((#‘𝐴) = (#‘𝐵) → (∀𝑥 ∈ Word 𝑋(((#‘𝑥) = (#‘𝐵) ∧ (#‘𝑥) = (#‘𝐴)) → 𝜌) → ((#‘𝐴) = (#‘𝐴) → 𝜏))))
242241imp 444 . . 3 ((𝐴 ∈ Word 𝑋 ∧ (#‘𝐴) = (#‘𝐵)) → (∀𝑥 ∈ Word 𝑋(((#‘𝑥) = (#‘𝐵) ∧ (#‘𝑥) = (#‘𝐴)) → 𝜌) → ((#‘𝐴) = (#‘𝐴) → 𝜏)))
2432423adant2 1100 . 2 ((𝐴 ∈ Word 𝑋𝐵 ∈ Word 𝑌 ∧ (#‘𝐴) = (#‘𝐵)) → (∀𝑥 ∈ Word 𝑋(((#‘𝑥) = (#‘𝐵) ∧ (#‘𝑥) = (#‘𝐴)) → 𝜌) → ((#‘𝐴) = (#‘𝐴) → 𝜏)))
244230, 231, 243mp2d 49 1 ((𝐴 ∈ Word 𝑋𝐵 ∈ Word 𝑌 ∧ (#‘𝐴) = (#‘𝐵)) → 𝜏)
Colors of variables: wff setvar class
Syntax hints:  wi 4  wb 196  wa 383  w3a 1054   = 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:  gsmsymgreq  17898
  Copyright terms: Public domain W3C validator