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

Theorem wrd2ind 13679
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 13513 . . . . 5 (𝐴 ∈ Word 𝑋 → (♯‘𝐴) ∈ ℕ0)
2 eqeq2 2782 . . . . . . . . 9 (𝑛 = 0 → ((♯‘𝑥) = 𝑛 ↔ (♯‘𝑥) = 0))
32anbi2d 614 . . . . . . . 8 (𝑛 = 0 → (((♯‘𝑥) = (♯‘𝑤) ∧ (♯‘𝑥) = 𝑛) ↔ ((♯‘𝑥) = (♯‘𝑤) ∧ (♯‘𝑥) = 0)))
43imbi1d 330 . . . . . . 7 (𝑛 = 0 → ((((♯‘𝑥) = (♯‘𝑤) ∧ (♯‘𝑥) = 𝑛) → 𝜑) ↔ (((♯‘𝑥) = (♯‘𝑤) ∧ (♯‘𝑥) = 0) → 𝜑)))
542ralbidv 3138 . . . . . 6 (𝑛 = 0 → (∀𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋(((♯‘𝑥) = (♯‘𝑤) ∧ (♯‘𝑥) = 𝑛) → 𝜑) ↔ ∀𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋(((♯‘𝑥) = (♯‘𝑤) ∧ (♯‘𝑥) = 0) → 𝜑)))
6 eqeq2 2782 . . . . . . . . 9 (𝑛 = 𝑚 → ((♯‘𝑥) = 𝑛 ↔ (♯‘𝑥) = 𝑚))
76anbi2d 614 . . . . . . . 8 (𝑛 = 𝑚 → (((♯‘𝑥) = (♯‘𝑤) ∧ (♯‘𝑥) = 𝑛) ↔ ((♯‘𝑥) = (♯‘𝑤) ∧ (♯‘𝑥) = 𝑚)))
87imbi1d 330 . . . . . . 7 (𝑛 = 𝑚 → ((((♯‘𝑥) = (♯‘𝑤) ∧ (♯‘𝑥) = 𝑛) → 𝜑) ↔ (((♯‘𝑥) = (♯‘𝑤) ∧ (♯‘𝑥) = 𝑚) → 𝜑)))
982ralbidv 3138 . . . . . 6 (𝑛 = 𝑚 → (∀𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋(((♯‘𝑥) = (♯‘𝑤) ∧ (♯‘𝑥) = 𝑛) → 𝜑) ↔ ∀𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋(((♯‘𝑥) = (♯‘𝑤) ∧ (♯‘𝑥) = 𝑚) → 𝜑)))
10 eqeq2 2782 . . . . . . . . 9 (𝑛 = (𝑚 + 1) → ((♯‘𝑥) = 𝑛 ↔ (♯‘𝑥) = (𝑚 + 1)))
1110anbi2d 614 . . . . . . . 8 (𝑛 = (𝑚 + 1) → (((♯‘𝑥) = (♯‘𝑤) ∧ (♯‘𝑥) = 𝑛) ↔ ((♯‘𝑥) = (♯‘𝑤) ∧ (♯‘𝑥) = (𝑚 + 1))))
1211imbi1d 330 . . . . . . 7 (𝑛 = (𝑚 + 1) → ((((♯‘𝑥) = (♯‘𝑤) ∧ (♯‘𝑥) = 𝑛) → 𝜑) ↔ (((♯‘𝑥) = (♯‘𝑤) ∧ (♯‘𝑥) = (𝑚 + 1)) → 𝜑)))
13122ralbidv 3138 . . . . . 6 (𝑛 = (𝑚 + 1) → (∀𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋(((♯‘𝑥) = (♯‘𝑤) ∧ (♯‘𝑥) = 𝑛) → 𝜑) ↔ ∀𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋(((♯‘𝑥) = (♯‘𝑤) ∧ (♯‘𝑥) = (𝑚 + 1)) → 𝜑)))
14 eqeq2 2782 . . . . . . . . 9 (𝑛 = (♯‘𝐴) → ((♯‘𝑥) = 𝑛 ↔ (♯‘𝑥) = (♯‘𝐴)))
1514anbi2d 614 . . . . . . . 8 (𝑛 = (♯‘𝐴) → (((♯‘𝑥) = (♯‘𝑤) ∧ (♯‘𝑥) = 𝑛) ↔ ((♯‘𝑥) = (♯‘𝑤) ∧ (♯‘𝑥) = (♯‘𝐴))))
1615imbi1d 330 . . . . . . 7 (𝑛 = (♯‘𝐴) → ((((♯‘𝑥) = (♯‘𝑤) ∧ (♯‘𝑥) = 𝑛) → 𝜑) ↔ (((♯‘𝑥) = (♯‘𝑤) ∧ (♯‘𝑥) = (♯‘𝐴)) → 𝜑)))
17162ralbidv 3138 . . . . . 6 (𝑛 = (♯‘𝐴) → (∀𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋(((♯‘𝑥) = (♯‘𝑤) ∧ (♯‘𝑥) = 𝑛) → 𝜑) ↔ ∀𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋(((♯‘𝑥) = (♯‘𝑤) ∧ (♯‘𝑥) = (♯‘𝐴)) → 𝜑)))
18 eqeq1 2775 . . . . . . . . . . . 12 ((♯‘𝑥) = 0 → ((♯‘𝑥) = (♯‘𝑤) ↔ 0 = (♯‘𝑤)))
1918adantl 467 . . . . . . . . . . 11 (((𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋) ∧ (♯‘𝑥) = 0) → ((♯‘𝑥) = (♯‘𝑤) ↔ 0 = (♯‘𝑤)))
20 eqcom 2778 . . . . . . . . . . . . . . 15 (0 = (♯‘𝑤) ↔ (♯‘𝑤) = 0)
21 hasheq0 13349 . . . . . . . . . . . . . . 15 (𝑤 ∈ Word 𝑌 → ((♯‘𝑤) = 0 ↔ 𝑤 = ∅))
2220, 21syl5bb 272 . . . . . . . . . . . . . 14 (𝑤 ∈ Word 𝑌 → (0 = (♯‘𝑤) ↔ 𝑤 = ∅))
23 hasheq0 13349 . . . . . . . . . . . . . . . 16 (𝑥 ∈ Word 𝑋 → ((♯‘𝑥) = 0 ↔ 𝑥 = ∅))
24 wrd2ind.6 . . . . . . . . . . . . . . . . . 18 𝜓
25 wrd2ind.1 . . . . . . . . . . . . . . . . . 18 ((𝑥 = ∅ ∧ 𝑤 = ∅) → (𝜑𝜓))
2624, 25mpbiri 248 . . . . . . . . . . . . . . . . 17 ((𝑥 = ∅ ∧ 𝑤 = ∅) → 𝜑)
2726ex 397 . . . . . . . . . . . . . . . 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 404 . . . . . . . . . . 11 (((𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋) ∧ (♯‘𝑥) = 0) → (0 = (♯‘𝑤) → 𝜑))
3319, 32sylbid 230 . . . . . . . . . 10 (((𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋) ∧ (♯‘𝑥) = 0) → ((♯‘𝑥) = (♯‘𝑤) → 𝜑))
3433ex 397 . . . . . . . . 9 ((𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋) → ((♯‘𝑥) = 0 → ((♯‘𝑥) = (♯‘𝑤) → 𝜑)))
3534com23 86 . . . . . . . 8 ((𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋) → ((♯‘𝑥) = (♯‘𝑤) → ((♯‘𝑥) = 0 → 𝜑)))
3635impd 396 . . . . . . 7 ((𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋) → (((♯‘𝑥) = (♯‘𝑤) ∧ (♯‘𝑥) = 0) → 𝜑))
3736rgen2 3124 . . . . . 6 𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋(((♯‘𝑥) = (♯‘𝑤) ∧ (♯‘𝑥) = 0) → 𝜑)
38 fveq2 6330 . . . . . . . . . . . . 13 (𝑥 = 𝑦 → (♯‘𝑥) = (♯‘𝑦))
39 fveq2 6330 . . . . . . . . . . . . 13 (𝑤 = 𝑢 → (♯‘𝑤) = (♯‘𝑢))
4038, 39eqeqan12d 2787 . . . . . . . . . . . 12 ((𝑥 = 𝑦𝑤 = 𝑢) → ((♯‘𝑥) = (♯‘𝑤) ↔ (♯‘𝑦) = (♯‘𝑢)))
4138eqeq1d 2773 . . . . . . . . . . . . 13 (𝑥 = 𝑦 → ((♯‘𝑥) = 𝑚 ↔ (♯‘𝑦) = 𝑚))
4241adantr 466 . . . . . . . . . . . 12 ((𝑥 = 𝑦𝑤 = 𝑢) → ((♯‘𝑥) = 𝑚 ↔ (♯‘𝑦) = 𝑚))
4340, 42anbi12d 616 . . . . . . . . . . 11 ((𝑥 = 𝑦𝑤 = 𝑢) → (((♯‘𝑥) = (♯‘𝑤) ∧ (♯‘𝑥) = 𝑚) ↔ ((♯‘𝑦) = (♯‘𝑢) ∧ (♯‘𝑦) = 𝑚)))
44 wrd2ind.2 . . . . . . . . . . 11 ((𝑥 = 𝑦𝑤 = 𝑢) → (𝜑𝜒))
4543, 44imbi12d 333 . . . . . . . . . 10 ((𝑥 = 𝑦𝑤 = 𝑢) → ((((♯‘𝑥) = (♯‘𝑤) ∧ (♯‘𝑥) = 𝑚) → 𝜑) ↔ (((♯‘𝑦) = (♯‘𝑢) ∧ (♯‘𝑦) = 𝑚) → 𝜒)))
4645ancoms 446 . . . . . . . . 9 ((𝑤 = 𝑢𝑥 = 𝑦) → ((((♯‘𝑥) = (♯‘𝑤) ∧ (♯‘𝑥) = 𝑚) → 𝜑) ↔ (((♯‘𝑦) = (♯‘𝑢) ∧ (♯‘𝑦) = 𝑚) → 𝜒)))
4746cbvraldva 3326 . . . . . . . 8 (𝑤 = 𝑢 → (∀𝑥 ∈ Word 𝑋(((♯‘𝑥) = (♯‘𝑤) ∧ (♯‘𝑥) = 𝑚) → 𝜑) ↔ ∀𝑦 ∈ Word 𝑋(((♯‘𝑦) = (♯‘𝑢) ∧ (♯‘𝑦) = 𝑚) → 𝜒)))
4847cbvralv 3320 . . . . . . 7 (∀𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋(((♯‘𝑥) = (♯‘𝑤) ∧ (♯‘𝑥) = 𝑚) → 𝜑) ↔ ∀𝑢 ∈ Word 𝑌𝑦 ∈ Word 𝑋(((♯‘𝑦) = (♯‘𝑢) ∧ (♯‘𝑦) = 𝑚) → 𝜒))
49 swrdcl 13620 . . . . . . . . . . . . . . . . 17 (𝑤 ∈ Word 𝑌 → (𝑤 substr ⟨0, ((♯‘𝑤) − 1)⟩) ∈ Word 𝑌)
5049adantr 466 . . . . . . . . . . . . . . . 16 ((𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋) → (𝑤 substr ⟨0, ((♯‘𝑤) − 1)⟩) ∈ Word 𝑌)
5150ad2antrl 707 . . . . . . . . . . . . . . 15 ((𝑚 ∈ ℕ0 ∧ ((𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋) ∧ ((♯‘𝑥) = (♯‘𝑤) ∧ (♯‘𝑥) = (𝑚 + 1)))) → (𝑤 substr ⟨0, ((♯‘𝑤) − 1)⟩) ∈ Word 𝑌)
52 simprll 764 . . . . . . . . . . . . . . . 16 ((𝑚 ∈ ℕ0 ∧ ((𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋) ∧ ((♯‘𝑥) = (♯‘𝑤) ∧ (♯‘𝑥) = (𝑚 + 1)))) → 𝑤 ∈ Word 𝑌)
53 eqeq1 2775 . . . . . . . . . . . . . . . . . . . . . 22 ((♯‘𝑥) = (𝑚 + 1) → ((♯‘𝑥) = (♯‘𝑤) ↔ (𝑚 + 1) = (♯‘𝑤)))
54 nn0p1nn 11532 . . . . . . . . . . . . . . . . . . . . . . 23 (𝑚 ∈ ℕ0 → (𝑚 + 1) ∈ ℕ)
55 eleq1 2838 . . . . . . . . . . . . . . . . . . . . . . . 24 ((♯‘𝑤) = (𝑚 + 1) → ((♯‘𝑤) ∈ ℕ ↔ (𝑚 + 1) ∈ ℕ))
5655eqcoms 2779 . . . . . . . . . . . . . . . . . . . . . . 23 ((𝑚 + 1) = (♯‘𝑤) → ((♯‘𝑤) ∈ ℕ ↔ (𝑚 + 1) ∈ ℕ))
5754, 56syl5ibr 236 . . . . . . . . . . . . . . . . . . . . . 22 ((𝑚 + 1) = (♯‘𝑤) → (𝑚 ∈ ℕ0 → (♯‘𝑤) ∈ ℕ))
5853, 57syl6bi 243 . . . . . . . . . . . . . . . . . . . . 21 ((♯‘𝑥) = (𝑚 + 1) → ((♯‘𝑥) = (♯‘𝑤) → (𝑚 ∈ ℕ0 → (♯‘𝑤) ∈ ℕ)))
5958impcom 394 . . . . . . . . . . . . . . . . . . . 20 (((♯‘𝑥) = (♯‘𝑤) ∧ (♯‘𝑥) = (𝑚 + 1)) → (𝑚 ∈ ℕ0 → (♯‘𝑤) ∈ ℕ))
6059adantl 467 . . . . . . . . . . . . . . . . . . 19 (((𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋) ∧ ((♯‘𝑥) = (♯‘𝑤) ∧ (♯‘𝑥) = (𝑚 + 1))) → (𝑚 ∈ ℕ0 → (♯‘𝑤) ∈ ℕ))
6160impcom 394 . . . . . . . . . . . . . . . . . 18 ((𝑚 ∈ ℕ0 ∧ ((𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋) ∧ ((♯‘𝑥) = (♯‘𝑤) ∧ (♯‘𝑥) = (𝑚 + 1)))) → (♯‘𝑤) ∈ ℕ)
6261nnge1d 11263 . . . . . . . . . . . . . . . . 17 ((𝑚 ∈ ℕ0 ∧ ((𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋) ∧ ((♯‘𝑥) = (♯‘𝑤) ∧ (♯‘𝑥) = (𝑚 + 1)))) → 1 ≤ (♯‘𝑤))
63 wrdlenge1n0 13529 . . . . . . . . . . . . . . . . . 18 (𝑤 ∈ Word 𝑌 → (𝑤 ≠ ∅ ↔ 1 ≤ (♯‘𝑤)))
6452, 63syl 17 . . . . . . . . . . . . . . . . 17 ((𝑚 ∈ ℕ0 ∧ ((𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋) ∧ ((♯‘𝑥) = (♯‘𝑤) ∧ (♯‘𝑥) = (𝑚 + 1)))) → (𝑤 ≠ ∅ ↔ 1 ≤ (♯‘𝑤)))
6562, 64mpbird 247 . . . . . . . . . . . . . . . 16 ((𝑚 ∈ ℕ0 ∧ ((𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋) ∧ ((♯‘𝑥) = (♯‘𝑤) ∧ (♯‘𝑥) = (𝑚 + 1)))) → 𝑤 ≠ ∅)
66 lswcl 13545 . . . . . . . . . . . . . . . 16 ((𝑤 ∈ Word 𝑌𝑤 ≠ ∅) → (lastS‘𝑤) ∈ 𝑌)
6752, 65, 66syl2anc 573 . . . . . . . . . . . . . . 15 ((𝑚 ∈ ℕ0 ∧ ((𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋) ∧ ((♯‘𝑥) = (♯‘𝑤) ∧ (♯‘𝑥) = (𝑚 + 1)))) → (lastS‘𝑤) ∈ 𝑌)
6851, 67jca 501 . . . . . . . . . . . . . 14 ((𝑚 ∈ ℕ0 ∧ ((𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋) ∧ ((♯‘𝑥) = (♯‘𝑤) ∧ (♯‘𝑥) = (𝑚 + 1)))) → ((𝑤 substr ⟨0, ((♯‘𝑤) − 1)⟩) ∈ Word 𝑌 ∧ (lastS‘𝑤) ∈ 𝑌))
69 swrdcl 13620 . . . . . . . . . . . . . . . 16 (𝑥 ∈ Word 𝑋 → (𝑥 substr ⟨0, ((♯‘𝑥) − 1)⟩) ∈ Word 𝑋)
7069adantl 467 . . . . . . . . . . . . . . 15 ((𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋) → (𝑥 substr ⟨0, ((♯‘𝑥) − 1)⟩) ∈ Word 𝑋)
7170ad2antrl 707 . . . . . . . . . . . . . 14 ((𝑚 ∈ ℕ0 ∧ ((𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋) ∧ ((♯‘𝑥) = (♯‘𝑤) ∧ (♯‘𝑥) = (𝑚 + 1)))) → (𝑥 substr ⟨0, ((♯‘𝑥) − 1)⟩) ∈ Word 𝑋)
72 simprlr 765 . . . . . . . . . . . . . . 15 ((𝑚 ∈ ℕ0 ∧ ((𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋) ∧ ((♯‘𝑥) = (♯‘𝑤) ∧ (♯‘𝑥) = (𝑚 + 1)))) → 𝑥 ∈ Word 𝑋)
73 eleq1 2838 . . . . . . . . . . . . . . . . . . . 20 ((♯‘𝑥) = (𝑚 + 1) → ((♯‘𝑥) ∈ ℕ ↔ (𝑚 + 1) ∈ ℕ))
7454, 73syl5ibr 236 . . . . . . . . . . . . . . . . . . 19 ((♯‘𝑥) = (𝑚 + 1) → (𝑚 ∈ ℕ0 → (♯‘𝑥) ∈ ℕ))
7574ad2antll 708 . . . . . . . . . . . . . . . . . 18 (((𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋) ∧ ((♯‘𝑥) = (♯‘𝑤) ∧ (♯‘𝑥) = (𝑚 + 1))) → (𝑚 ∈ ℕ0 → (♯‘𝑥) ∈ ℕ))
7675impcom 394 . . . . . . . . . . . . . . . . 17 ((𝑚 ∈ ℕ0 ∧ ((𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋) ∧ ((♯‘𝑥) = (♯‘𝑤) ∧ (♯‘𝑥) = (𝑚 + 1)))) → (♯‘𝑥) ∈ ℕ)
7776nnge1d 11263 . . . . . . . . . . . . . . . 16 ((𝑚 ∈ ℕ0 ∧ ((𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋) ∧ ((♯‘𝑥) = (♯‘𝑤) ∧ (♯‘𝑥) = (𝑚 + 1)))) → 1 ≤ (♯‘𝑥))
78 wrdlenge1n0 13529 . . . . . . . . . . . . . . . . 17 (𝑥 ∈ Word 𝑋 → (𝑥 ≠ ∅ ↔ 1 ≤ (♯‘𝑥)))
7972, 78syl 17 . . . . . . . . . . . . . . . 16 ((𝑚 ∈ ℕ0 ∧ ((𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋) ∧ ((♯‘𝑥) = (♯‘𝑤) ∧ (♯‘𝑥) = (𝑚 + 1)))) → (𝑥 ≠ ∅ ↔ 1 ≤ (♯‘𝑥)))
8077, 79mpbird 247 . . . . . . . . . . . . . . 15 ((𝑚 ∈ ℕ0 ∧ ((𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋) ∧ ((♯‘𝑥) = (♯‘𝑤) ∧ (♯‘𝑥) = (𝑚 + 1)))) → 𝑥 ≠ ∅)
81 lswcl 13545 . . . . . . . . . . . . . . 15 ((𝑥 ∈ Word 𝑋𝑥 ≠ ∅) → (lastS‘𝑥) ∈ 𝑋)
8272, 80, 81syl2anc 573 . . . . . . . . . . . . . 14 ((𝑚 ∈ ℕ0 ∧ ((𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋) ∧ ((♯‘𝑥) = (♯‘𝑤) ∧ (♯‘𝑥) = (𝑚 + 1)))) → (lastS‘𝑥) ∈ 𝑋)
8368, 71, 82jca32 505 . . . . . . . . . . . . 13 ((𝑚 ∈ ℕ0 ∧ ((𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋) ∧ ((♯‘𝑥) = (♯‘𝑤) ∧ (♯‘𝑥) = (𝑚 + 1)))) → (((𝑤 substr ⟨0, ((♯‘𝑤) − 1)⟩) ∈ Word 𝑌 ∧ (lastS‘𝑤) ∈ 𝑌) ∧ ((𝑥 substr ⟨0, ((♯‘𝑥) − 1)⟩) ∈ Word 𝑋 ∧ (lastS‘𝑥) ∈ 𝑋)))
8483adantlr 694 . . . . . . . . . . . 12 (((𝑚 ∈ ℕ0 ∧ ∀𝑢 ∈ Word 𝑌𝑦 ∈ Word 𝑋(((♯‘𝑦) = (♯‘𝑢) ∧ (♯‘𝑦) = 𝑚) → 𝜒)) ∧ ((𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋) ∧ ((♯‘𝑥) = (♯‘𝑤) ∧ (♯‘𝑥) = (𝑚 + 1)))) → (((𝑤 substr ⟨0, ((♯‘𝑤) − 1)⟩) ∈ Word 𝑌 ∧ (lastS‘𝑤) ∈ 𝑌) ∧ ((𝑥 substr ⟨0, ((♯‘𝑥) − 1)⟩) ∈ Word 𝑋 ∧ (lastS‘𝑥) ∈ 𝑋)))
85 simprl 754 . . . . . . . . . . . . . 14 (((𝑚 ∈ ℕ0 ∧ ∀𝑢 ∈ Word 𝑌𝑦 ∈ Word 𝑋(((♯‘𝑦) = (♯‘𝑢) ∧ (♯‘𝑦) = 𝑚) → 𝜒)) ∧ ((𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋) ∧ ((♯‘𝑥) = (♯‘𝑤) ∧ (♯‘𝑥) = (𝑚 + 1)))) → (𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋))
86 simplr 752 . . . . . . . . . . . . . 14 (((𝑚 ∈ ℕ0 ∧ ∀𝑢 ∈ Word 𝑌𝑦 ∈ Word 𝑋(((♯‘𝑦) = (♯‘𝑢) ∧ (♯‘𝑦) = 𝑚) → 𝜒)) ∧ ((𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋) ∧ ((♯‘𝑥) = (♯‘𝑤) ∧ (♯‘𝑥) = (𝑚 + 1)))) → ∀𝑢 ∈ Word 𝑌𝑦 ∈ Word 𝑋(((♯‘𝑦) = (♯‘𝑢) ∧ (♯‘𝑦) = 𝑚) → 𝜒))
87 simprrl 766 . . . . . . . . . . . . . . . . 17 (((𝑚 ∈ ℕ0 ∧ ∀𝑢 ∈ Word 𝑌𝑦 ∈ Word 𝑋(((♯‘𝑦) = (♯‘𝑢) ∧ (♯‘𝑦) = 𝑚) → 𝜒)) ∧ ((𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋) ∧ ((♯‘𝑥) = (♯‘𝑤) ∧ (♯‘𝑥) = (𝑚 + 1)))) → (♯‘𝑥) = (♯‘𝑤))
8887oveq1d 6806 . . . . . . . . . . . . . . . 16 (((𝑚 ∈ ℕ0 ∧ ∀𝑢 ∈ Word 𝑌𝑦 ∈ Word 𝑋(((♯‘𝑦) = (♯‘𝑢) ∧ (♯‘𝑦) = 𝑚) → 𝜒)) ∧ ((𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋) ∧ ((♯‘𝑥) = (♯‘𝑤) ∧ (♯‘𝑥) = (𝑚 + 1)))) → ((♯‘𝑥) − 1) = ((♯‘𝑤) − 1))
89 simprlr 765 . . . . . . . . . . . . . . . . 17 (((𝑚 ∈ ℕ0 ∧ ∀𝑢 ∈ Word 𝑌𝑦 ∈ Word 𝑋(((♯‘𝑦) = (♯‘𝑢) ∧ (♯‘𝑦) = 𝑚) → 𝜒)) ∧ ((𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋) ∧ ((♯‘𝑥) = (♯‘𝑤) ∧ (♯‘𝑥) = (𝑚 + 1)))) → 𝑥 ∈ Word 𝑋)
90 fzossfz 12689 . . . . . . . . . . . . . . . . . 18 (0..^(♯‘𝑥)) ⊆ (0...(♯‘𝑥))
91 simprrr 767 . . . . . . . . . . . . . . . . . . . 20 (((𝑚 ∈ ℕ0 ∧ ∀𝑢 ∈ Word 𝑌𝑦 ∈ Word 𝑋(((♯‘𝑦) = (♯‘𝑢) ∧ (♯‘𝑦) = 𝑚) → 𝜒)) ∧ ((𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋) ∧ ((♯‘𝑥) = (♯‘𝑤) ∧ (♯‘𝑥) = (𝑚 + 1)))) → (♯‘𝑥) = (𝑚 + 1))
9254ad2antrr 705 . . . . . . . . . . . . . . . . . . . 20 (((𝑚 ∈ ℕ0 ∧ ∀𝑢 ∈ Word 𝑌𝑦 ∈ Word 𝑋(((♯‘𝑦) = (♯‘𝑢) ∧ (♯‘𝑦) = 𝑚) → 𝜒)) ∧ ((𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋) ∧ ((♯‘𝑥) = (♯‘𝑤) ∧ (♯‘𝑥) = (𝑚 + 1)))) → (𝑚 + 1) ∈ ℕ)
9391, 92eqeltrd 2850 . . . . . . . . . . . . . . . . . . 19 (((𝑚 ∈ ℕ0 ∧ ∀𝑢 ∈ Word 𝑌𝑦 ∈ Word 𝑋(((♯‘𝑦) = (♯‘𝑢) ∧ (♯‘𝑦) = 𝑚) → 𝜒)) ∧ ((𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋) ∧ ((♯‘𝑥) = (♯‘𝑤) ∧ (♯‘𝑥) = (𝑚 + 1)))) → (♯‘𝑥) ∈ ℕ)
94 fzo0end 12761 . . . . . . . . . . . . . . . . . . 19 ((♯‘𝑥) ∈ ℕ → ((♯‘𝑥) − 1) ∈ (0..^(♯‘𝑥)))
9593, 94syl 17 . . . . . . . . . . . . . . . . . 18 (((𝑚 ∈ ℕ0 ∧ ∀𝑢 ∈ Word 𝑌𝑦 ∈ Word 𝑋(((♯‘𝑦) = (♯‘𝑢) ∧ (♯‘𝑦) = 𝑚) → 𝜒)) ∧ ((𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋) ∧ ((♯‘𝑥) = (♯‘𝑤) ∧ (♯‘𝑥) = (𝑚 + 1)))) → ((♯‘𝑥) − 1) ∈ (0..^(♯‘𝑥)))
9690, 95sseldi 3750 . . . . . . . . . . . . . . . . 17 (((𝑚 ∈ ℕ0 ∧ ∀𝑢 ∈ Word 𝑌𝑦 ∈ Word 𝑋(((♯‘𝑦) = (♯‘𝑢) ∧ (♯‘𝑦) = 𝑚) → 𝜒)) ∧ ((𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋) ∧ ((♯‘𝑥) = (♯‘𝑤) ∧ (♯‘𝑥) = (𝑚 + 1)))) → ((♯‘𝑥) − 1) ∈ (0...(♯‘𝑥)))
97 swrd0len 13623 . . . . . . . . . . . . . . . . 17 ((𝑥 ∈ Word 𝑋 ∧ ((♯‘𝑥) − 1) ∈ (0...(♯‘𝑥))) → (♯‘(𝑥 substr ⟨0, ((♯‘𝑥) − 1)⟩)) = ((♯‘𝑥) − 1))
9889, 96, 97syl2anc 573 . . . . . . . . . . . . . . . 16 (((𝑚 ∈ ℕ0 ∧ ∀𝑢 ∈ Word 𝑌𝑦 ∈ Word 𝑋(((♯‘𝑦) = (♯‘𝑢) ∧ (♯‘𝑦) = 𝑚) → 𝜒)) ∧ ((𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋) ∧ ((♯‘𝑥) = (♯‘𝑤) ∧ (♯‘𝑥) = (𝑚 + 1)))) → (♯‘(𝑥 substr ⟨0, ((♯‘𝑥) − 1)⟩)) = ((♯‘𝑥) − 1))
99 simprll 764 . . . . . . . . . . . . . . . . 17 (((𝑚 ∈ ℕ0 ∧ ∀𝑢 ∈ Word 𝑌𝑦 ∈ Word 𝑋(((♯‘𝑦) = (♯‘𝑢) ∧ (♯‘𝑦) = 𝑚) → 𝜒)) ∧ ((𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋) ∧ ((♯‘𝑥) = (♯‘𝑤) ∧ (♯‘𝑥) = (𝑚 + 1)))) → 𝑤 ∈ Word 𝑌)
100 oveq1 6798 . . . . . . . . . . . . . . . . . . . . . 22 ((♯‘𝑤) = (♯‘𝑥) → ((♯‘𝑤) − 1) = ((♯‘𝑥) − 1))
101 oveq2 6799 . . . . . . . . . . . . . . . . . . . . . 22 ((♯‘𝑤) = (♯‘𝑥) → (0...(♯‘𝑤)) = (0...(♯‘𝑥)))
102100, 101eleq12d 2844 . . . . . . . . . . . . . . . . . . . . 21 ((♯‘𝑤) = (♯‘𝑥) → (((♯‘𝑤) − 1) ∈ (0...(♯‘𝑤)) ↔ ((♯‘𝑥) − 1) ∈ (0...(♯‘𝑥))))
103102eqcoms 2779 . . . . . . . . . . . . . . . . . . . 20 ((♯‘𝑥) = (♯‘𝑤) → (((♯‘𝑤) − 1) ∈ (0...(♯‘𝑤)) ↔ ((♯‘𝑥) − 1) ∈ (0...(♯‘𝑥))))
104103adantr 466 . . . . . . . . . . . . . . . . . . 19 (((♯‘𝑥) = (♯‘𝑤) ∧ (♯‘𝑥) = (𝑚 + 1)) → (((♯‘𝑤) − 1) ∈ (0...(♯‘𝑤)) ↔ ((♯‘𝑥) − 1) ∈ (0...(♯‘𝑥))))
105104ad2antll 708 . . . . . . . . . . . . . . . . . 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 13623 . . . . . . . . . . . . . . . . 17 ((𝑤 ∈ Word 𝑌 ∧ ((♯‘𝑤) − 1) ∈ (0...(♯‘𝑤))) → (♯‘(𝑤 substr ⟨0, ((♯‘𝑤) − 1)⟩)) = ((♯‘𝑤) − 1))
10899, 106, 107syl2anc 573 . . . . . . . . . . . . . . . 16 (((𝑚 ∈ ℕ0 ∧ ∀𝑢 ∈ Word 𝑌𝑦 ∈ Word 𝑋(((♯‘𝑦) = (♯‘𝑢) ∧ (♯‘𝑦) = 𝑚) → 𝜒)) ∧ ((𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋) ∧ ((♯‘𝑥) = (♯‘𝑤) ∧ (♯‘𝑥) = (𝑚 + 1)))) → (♯‘(𝑤 substr ⟨0, ((♯‘𝑤) − 1)⟩)) = ((♯‘𝑤) − 1))
10988, 98, 1083eqtr4d 2815 . . . . . . . . . . . . . . 15 (((𝑚 ∈ ℕ0 ∧ ∀𝑢 ∈ Word 𝑌𝑦 ∈ Word 𝑋(((♯‘𝑦) = (♯‘𝑢) ∧ (♯‘𝑦) = 𝑚) → 𝜒)) ∧ ((𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋) ∧ ((♯‘𝑥) = (♯‘𝑤) ∧ (♯‘𝑥) = (𝑚 + 1)))) → (♯‘(𝑥 substr ⟨0, ((♯‘𝑥) − 1)⟩)) = (♯‘(𝑤 substr ⟨0, ((♯‘𝑤) − 1)⟩)))
11091oveq1d 6806 . . . . . . . . . . . . . . . 16 (((𝑚 ∈ ℕ0 ∧ ∀𝑢 ∈ Word 𝑌𝑦 ∈ Word 𝑋(((♯‘𝑦) = (♯‘𝑢) ∧ (♯‘𝑦) = 𝑚) → 𝜒)) ∧ ((𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋) ∧ ((♯‘𝑥) = (♯‘𝑤) ∧ (♯‘𝑥) = (𝑚 + 1)))) → ((♯‘𝑥) − 1) = ((𝑚 + 1) − 1))
111 nn0cn 11502 . . . . . . . . . . . . . . . . . 18 (𝑚 ∈ ℕ0𝑚 ∈ ℂ)
112111ad2antrr 705 . . . . . . . . . . . . . . . . 17 (((𝑚 ∈ ℕ0 ∧ ∀𝑢 ∈ Word 𝑌𝑦 ∈ Word 𝑋(((♯‘𝑦) = (♯‘𝑢) ∧ (♯‘𝑦) = 𝑚) → 𝜒)) ∧ ((𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋) ∧ ((♯‘𝑥) = (♯‘𝑤) ∧ (♯‘𝑥) = (𝑚 + 1)))) → 𝑚 ∈ ℂ)
113 ax-1cn 10194 . . . . . . . . . . . . . . . . 17 1 ∈ ℂ
114 pncan 10487 . . . . . . . . . . . . . . . . 17 ((𝑚 ∈ ℂ ∧ 1 ∈ ℂ) → ((𝑚 + 1) − 1) = 𝑚)
115112, 113, 114sylancl 574 . . . . . . . . . . . . . . . 16 (((𝑚 ∈ ℕ0 ∧ ∀𝑢 ∈ Word 𝑌𝑦 ∈ Word 𝑋(((♯‘𝑦) = (♯‘𝑢) ∧ (♯‘𝑦) = 𝑚) → 𝜒)) ∧ ((𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋) ∧ ((♯‘𝑥) = (♯‘𝑤) ∧ (♯‘𝑥) = (𝑚 + 1)))) → ((𝑚 + 1) − 1) = 𝑚)
11698, 110, 1153eqtrd 2809 . . . . . . . . . . . . . . 15 (((𝑚 ∈ ℕ0 ∧ ∀𝑢 ∈ Word 𝑌𝑦 ∈ Word 𝑋(((♯‘𝑦) = (♯‘𝑢) ∧ (♯‘𝑦) = 𝑚) → 𝜒)) ∧ ((𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋) ∧ ((♯‘𝑥) = (♯‘𝑤) ∧ (♯‘𝑥) = (𝑚 + 1)))) → (♯‘(𝑥 substr ⟨0, ((♯‘𝑥) − 1)⟩)) = 𝑚)
117109, 116jca 501 . . . . . . . . . . . . . 14 (((𝑚 ∈ ℕ0 ∧ ∀𝑢 ∈ Word 𝑌𝑦 ∈ Word 𝑋(((♯‘𝑦) = (♯‘𝑢) ∧ (♯‘𝑦) = 𝑚) → 𝜒)) ∧ ((𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋) ∧ ((♯‘𝑥) = (♯‘𝑤) ∧ (♯‘𝑥) = (𝑚 + 1)))) → ((♯‘(𝑥 substr ⟨0, ((♯‘𝑥) − 1)⟩)) = (♯‘(𝑤 substr ⟨0, ((♯‘𝑤) − 1)⟩)) ∧ (♯‘(𝑥 substr ⟨0, ((♯‘𝑥) − 1)⟩)) = 𝑚))
11870adantr 466 . . . . . . . . . . . . . . . 16 (((𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋) ∧ 𝑢 = (𝑤 substr ⟨0, ((♯‘𝑤) − 1)⟩)) → (𝑥 substr ⟨0, ((♯‘𝑥) − 1)⟩) ∈ Word 𝑋)
119 fveq2 6330 . . . . . . . . . . . . . . . . . . . . . 22 (𝑦 = (𝑥 substr ⟨0, ((♯‘𝑥) − 1)⟩) → (♯‘𝑦) = (♯‘(𝑥 substr ⟨0, ((♯‘𝑥) − 1)⟩)))
120 fveq2 6330 . . . . . . . . . . . . . . . . . . . . . 22 (𝑢 = (𝑤 substr ⟨0, ((♯‘𝑤) − 1)⟩) → (♯‘𝑢) = (♯‘(𝑤 substr ⟨0, ((♯‘𝑤) − 1)⟩)))
121119, 120eqeqan12d 2787 . . . . . . . . . . . . . . . . . . . . 21 ((𝑦 = (𝑥 substr ⟨0, ((♯‘𝑥) − 1)⟩) ∧ 𝑢 = (𝑤 substr ⟨0, ((♯‘𝑤) − 1)⟩)) → ((♯‘𝑦) = (♯‘𝑢) ↔ (♯‘(𝑥 substr ⟨0, ((♯‘𝑥) − 1)⟩)) = (♯‘(𝑤 substr ⟨0, ((♯‘𝑤) − 1)⟩))))
122121expcom 398 . . . . . . . . . . . . . . . . . . . 20 (𝑢 = (𝑤 substr ⟨0, ((♯‘𝑤) − 1)⟩) → (𝑦 = (𝑥 substr ⟨0, ((♯‘𝑥) − 1)⟩) → ((♯‘𝑦) = (♯‘𝑢) ↔ (♯‘(𝑥 substr ⟨0, ((♯‘𝑥) − 1)⟩)) = (♯‘(𝑤 substr ⟨0, ((♯‘𝑤) − 1)⟩)))))
123122adantl 467 . . . . . . . . . . . . . . . . . . 19 (((𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋) ∧ 𝑢 = (𝑤 substr ⟨0, ((♯‘𝑤) − 1)⟩)) → (𝑦 = (𝑥 substr ⟨0, ((♯‘𝑥) − 1)⟩) → ((♯‘𝑦) = (♯‘𝑢) ↔ (♯‘(𝑥 substr ⟨0, ((♯‘𝑥) − 1)⟩)) = (♯‘(𝑤 substr ⟨0, ((♯‘𝑤) − 1)⟩)))))
124123imp 393 . . . . . . . . . . . . . . . . . 18 ((((𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋) ∧ 𝑢 = (𝑤 substr ⟨0, ((♯‘𝑤) − 1)⟩)) ∧ 𝑦 = (𝑥 substr ⟨0, ((♯‘𝑥) − 1)⟩)) → ((♯‘𝑦) = (♯‘𝑢) ↔ (♯‘(𝑥 substr ⟨0, ((♯‘𝑥) − 1)⟩)) = (♯‘(𝑤 substr ⟨0, ((♯‘𝑤) − 1)⟩))))
125119eqeq1d 2773 . . . . . . . . . . . . . . . . . . 19 (𝑦 = (𝑥 substr ⟨0, ((♯‘𝑥) − 1)⟩) → ((♯‘𝑦) = 𝑚 ↔ (♯‘(𝑥 substr ⟨0, ((♯‘𝑥) − 1)⟩)) = 𝑚))
126125adantl 467 . . . . . . . . . . . . . . . . . 18 ((((𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋) ∧ 𝑢 = (𝑤 substr ⟨0, ((♯‘𝑤) − 1)⟩)) ∧ 𝑦 = (𝑥 substr ⟨0, ((♯‘𝑥) − 1)⟩)) → ((♯‘𝑦) = 𝑚 ↔ (♯‘(𝑥 substr ⟨0, ((♯‘𝑥) − 1)⟩)) = 𝑚))
127124, 126anbi12d 616 . . . . . . . . . . . . . . . . 17 ((((𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋) ∧ 𝑢 = (𝑤 substr ⟨0, ((♯‘𝑤) − 1)⟩)) ∧ 𝑦 = (𝑥 substr ⟨0, ((♯‘𝑥) − 1)⟩)) → (((♯‘𝑦) = (♯‘𝑢) ∧ (♯‘𝑦) = 𝑚) ↔ ((♯‘(𝑥 substr ⟨0, ((♯‘𝑥) − 1)⟩)) = (♯‘(𝑤 substr ⟨0, ((♯‘𝑤) − 1)⟩)) ∧ (♯‘(𝑥 substr ⟨0, ((♯‘𝑥) − 1)⟩)) = 𝑚)))
128 vex 3354 . . . . . . . . . . . . . . . . . . . . 21 𝑦 ∈ V
129 vex 3354 . . . . . . . . . . . . . . . . . . . . 21 𝑢 ∈ V
130128, 129, 44sbc2ie 3655 . . . . . . . . . . . . . . . . . . . 20 ([𝑦 / 𝑥][𝑢 / 𝑤]𝜑𝜒)
131130bicomi 214 . . . . . . . . . . . . . . . . . . 19 (𝜒[𝑦 / 𝑥][𝑢 / 𝑤]𝜑)
132131a1i 11 . . . . . . . . . . . . . . . . . 18 ((((𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋) ∧ 𝑢 = (𝑤 substr ⟨0, ((♯‘𝑤) − 1)⟩)) ∧ 𝑦 = (𝑥 substr ⟨0, ((♯‘𝑥) − 1)⟩)) → (𝜒[𝑦 / 𝑥][𝑢 / 𝑤]𝜑))
133 simpr 471 . . . . . . . . . . . . . . . . . . 19 ((((𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋) ∧ 𝑢 = (𝑤 substr ⟨0, ((♯‘𝑤) − 1)⟩)) ∧ 𝑦 = (𝑥 substr ⟨0, ((♯‘𝑥) − 1)⟩)) → 𝑦 = (𝑥 substr ⟨0, ((♯‘𝑥) − 1)⟩))
134133sbceq1d 3592 . . . . . . . . . . . . . . . . . 18 ((((𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋) ∧ 𝑢 = (𝑤 substr ⟨0, ((♯‘𝑤) − 1)⟩)) ∧ 𝑦 = (𝑥 substr ⟨0, ((♯‘𝑥) − 1)⟩)) → ([𝑦 / 𝑥][𝑢 / 𝑤]𝜑[(𝑥 substr ⟨0, ((♯‘𝑥) − 1)⟩) / 𝑥][𝑢 / 𝑤]𝜑))
135 dfsbcq 3589 . . . . . . . . . . . . . . . . . . . . 21 (𝑢 = (𝑤 substr ⟨0, ((♯‘𝑤) − 1)⟩) → ([𝑢 / 𝑤]𝜑[(𝑤 substr ⟨0, ((♯‘𝑤) − 1)⟩) / 𝑤]𝜑))
136135sbcbidv 3642 . . . . . . . . . . . . . . . . . . . 20 (𝑢 = (𝑤 substr ⟨0, ((♯‘𝑤) − 1)⟩) → ([(𝑥 substr ⟨0, ((♯‘𝑥) − 1)⟩) / 𝑥][𝑢 / 𝑤]𝜑[(𝑥 substr ⟨0, ((♯‘𝑥) − 1)⟩) / 𝑥][(𝑤 substr ⟨0, ((♯‘𝑤) − 1)⟩) / 𝑤]𝜑))
137136adantl 467 . . . . . . . . . . . . . . . . . . 19 (((𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋) ∧ 𝑢 = (𝑤 substr ⟨0, ((♯‘𝑤) − 1)⟩)) → ([(𝑥 substr ⟨0, ((♯‘𝑥) − 1)⟩) / 𝑥][𝑢 / 𝑤]𝜑[(𝑥 substr ⟨0, ((♯‘𝑥) − 1)⟩) / 𝑥][(𝑤 substr ⟨0, ((♯‘𝑤) − 1)⟩) / 𝑤]𝜑))
138137adantr 466 . . . . . . . . . . . . . . . . . 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 3463 . . . . . . . . . . . . . . 15 (((𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋) ∧ 𝑢 = (𝑤 substr ⟨0, ((♯‘𝑤) − 1)⟩)) → (∀𝑦 ∈ Word 𝑋(((♯‘𝑦) = (♯‘𝑢) ∧ (♯‘𝑦) = 𝑚) → 𝜒) → (((♯‘(𝑥 substr ⟨0, ((♯‘𝑥) − 1)⟩)) = (♯‘(𝑤 substr ⟨0, ((♯‘𝑤) − 1)⟩)) ∧ (♯‘(𝑥 substr ⟨0, ((♯‘𝑥) − 1)⟩)) = 𝑚) → [(𝑥 substr ⟨0, ((♯‘𝑥) − 1)⟩) / 𝑥][(𝑤 substr ⟨0, ((♯‘𝑤) − 1)⟩) / 𝑤]𝜑)))
14250, 141rspcimdv 3461 . . . . . . . . . . . . . 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 501 . . . . . . . . . . . 12 (((𝑚 ∈ ℕ0 ∧ ∀𝑢 ∈ Word 𝑌𝑦 ∈ Word 𝑋(((♯‘𝑦) = (♯‘𝑢) ∧ (♯‘𝑦) = 𝑚) → 𝜒)) ∧ ((𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋) ∧ ((♯‘𝑥) = (♯‘𝑤) ∧ (♯‘𝑥) = (𝑚 + 1)))) → ([(𝑥 substr ⟨0, ((♯‘𝑥) − 1)⟩) / 𝑥][(𝑤 substr ⟨0, ((♯‘𝑤) − 1)⟩) / 𝑤]𝜑 ∧ (♯‘(𝑥 substr ⟨0, ((♯‘𝑥) − 1)⟩)) = (♯‘(𝑤 substr ⟨0, ((♯‘𝑤) − 1)⟩))))
145 dfsbcq 3589 . . . . . . . . . . . . . . . 16 (𝑢 = (𝑤 substr ⟨0, ((♯‘𝑤) − 1)⟩) → ([𝑢 / 𝑤][𝑦 / 𝑥]𝜑[(𝑤 substr ⟨0, ((♯‘𝑤) − 1)⟩) / 𝑤][𝑦 / 𝑥]𝜑))
146 sbccom 3659 . . . . . . . . . . . . . . . 16 ([(𝑤 substr ⟨0, ((♯‘𝑤) − 1)⟩) / 𝑤][𝑦 / 𝑥]𝜑[𝑦 / 𝑥][(𝑤 substr ⟨0, ((♯‘𝑤) − 1)⟩) / 𝑤]𝜑)
147145, 146syl6bb 276 . . . . . . . . . . . . . . 15 (𝑢 = (𝑤 substr ⟨0, ((♯‘𝑤) − 1)⟩) → ([𝑢 / 𝑤][𝑦 / 𝑥]𝜑[𝑦 / 𝑥][(𝑤 substr ⟨0, ((♯‘𝑤) − 1)⟩) / 𝑤]𝜑))
148120eqeq2d 2781 . . . . . . . . . . . . . . 15 (𝑢 = (𝑤 substr ⟨0, ((♯‘𝑤) − 1)⟩) → ((♯‘𝑦) = (♯‘𝑢) ↔ (♯‘𝑦) = (♯‘(𝑤 substr ⟨0, ((♯‘𝑤) − 1)⟩))))
149147, 148anbi12d 616 . . . . . . . . . . . . . 14 (𝑢 = (𝑤 substr ⟨0, ((♯‘𝑤) − 1)⟩) → (([𝑢 / 𝑤][𝑦 / 𝑥]𝜑 ∧ (♯‘𝑦) = (♯‘𝑢)) ↔ ([𝑦 / 𝑥][(𝑤 substr ⟨0, ((♯‘𝑤) − 1)⟩) / 𝑤]𝜑 ∧ (♯‘𝑦) = (♯‘(𝑤 substr ⟨0, ((♯‘𝑤) − 1)⟩)))))
150 oveq1 6798 . . . . . . . . . . . . . . 15 (𝑢 = (𝑤 substr ⟨0, ((♯‘𝑤) − 1)⟩) → (𝑢 ++ ⟨“𝑠”⟩) = ((𝑤 substr ⟨0, ((♯‘𝑤) − 1)⟩) ++ ⟨“𝑠”⟩))
151150sbceq1d 3592 . . . . . . . . . . . . . 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 13573 . . . . . . . . . . . . . . . . 17 (𝑠 = (lastS‘𝑤) → ⟨“𝑠”⟩ = ⟨“(lastS‘𝑤)”⟩)
154153oveq2d 6807 . . . . . . . . . . . . . . . 16 (𝑠 = (lastS‘𝑤) → ((𝑤 substr ⟨0, ((♯‘𝑤) − 1)⟩) ++ ⟨“𝑠”⟩) = ((𝑤 substr ⟨0, ((♯‘𝑤) − 1)⟩) ++ ⟨“(lastS‘𝑤)”⟩))
155154sbceq1d 3592 . . . . . . . . . . . . . . 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 3659 . . . . . . . . . . . . . . . 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 3589 . . . . . . . . . . . . . . 15 (𝑦 = (𝑥 substr ⟨0, ((♯‘𝑥) − 1)⟩) → ([𝑦 / 𝑥][(𝑤 substr ⟨0, ((♯‘𝑤) − 1)⟩) / 𝑤]𝜑[(𝑥 substr ⟨0, ((♯‘𝑥) − 1)⟩) / 𝑥][(𝑤 substr ⟨0, ((♯‘𝑤) − 1)⟩) / 𝑤]𝜑))
162119eqeq1d 2773 . . . . . . . . . . . . . . 15 (𝑦 = (𝑥 substr ⟨0, ((♯‘𝑥) − 1)⟩) → ((♯‘𝑦) = (♯‘(𝑤 substr ⟨0, ((♯‘𝑤) − 1)⟩)) ↔ (♯‘(𝑥 substr ⟨0, ((♯‘𝑥) − 1)⟩)) = (♯‘(𝑤 substr ⟨0, ((♯‘𝑤) − 1)⟩))))
163161, 162anbi12d 616 . . . . . . . . . . . . . 14 (𝑦 = (𝑥 substr ⟨0, ((♯‘𝑥) − 1)⟩) → (([𝑦 / 𝑥][(𝑤 substr ⟨0, ((♯‘𝑤) − 1)⟩) / 𝑤]𝜑 ∧ (♯‘𝑦) = (♯‘(𝑤 substr ⟨0, ((♯‘𝑤) − 1)⟩))) ↔ ([(𝑥 substr ⟨0, ((♯‘𝑥) − 1)⟩) / 𝑥][(𝑤 substr ⟨0, ((♯‘𝑤) − 1)⟩) / 𝑤]𝜑 ∧ (♯‘(𝑥 substr ⟨0, ((♯‘𝑥) − 1)⟩)) = (♯‘(𝑤 substr ⟨0, ((♯‘𝑤) − 1)⟩)))))
164 oveq1 6798 . . . . . . . . . . . . . . 15 (𝑦 = (𝑥 substr ⟨0, ((♯‘𝑥) − 1)⟩) → (𝑦 ++ ⟨“𝑧”⟩) = ((𝑥 substr ⟨0, ((♯‘𝑥) − 1)⟩) ++ ⟨“𝑧”⟩))
165164sbceq1d 3592 . . . . . . . . . . . . . 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 13573 . . . . . . . . . . . . . . . 16 (𝑧 = (lastS‘𝑥) → ⟨“𝑧”⟩ = ⟨“(lastS‘𝑥)”⟩)
168167oveq2d 6807 . . . . . . . . . . . . . . 15 (𝑧 = (lastS‘𝑥) → ((𝑥 substr ⟨0, ((♯‘𝑥) − 1)⟩) ++ ⟨“𝑧”⟩) = ((𝑥 substr ⟨0, ((♯‘𝑥) − 1)⟩) ++ ⟨“(lastS‘𝑥)”⟩))
169168sbceq1d 3592 . . . . . . . . . . . . . 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 752 . . . . . . . . . . . . . . . . . 18 ((((𝑢 ∈ Word 𝑌𝑠𝑌) ∧ (𝑦 ∈ Word 𝑋𝑧𝑋)) ∧ (♯‘𝑦) = (♯‘𝑢)) → (𝑦 ∈ Word 𝑋𝑧𝑋))
172 simpll 750 . . . . . . . . . . . . . . . . . 18 ((((𝑢 ∈ Word 𝑌𝑠𝑌) ∧ (𝑦 ∈ Word 𝑋𝑧𝑋)) ∧ (♯‘𝑦) = (♯‘𝑢)) → (𝑢 ∈ Word 𝑌𝑠𝑌))
173 simpr 471 . . . . . . . . . . . . . . . . . 18 ((((𝑢 ∈ Word 𝑌𝑠𝑌) ∧ (𝑦 ∈ Word 𝑋𝑧𝑋)) ∧ (♯‘𝑦) = (♯‘𝑢)) → (♯‘𝑦) = (♯‘𝑢))
174 wrd2ind.7 . . . . . . . . . . . . . . . . . 18 (((𝑦 ∈ Word 𝑋𝑧𝑋) ∧ (𝑢 ∈ Word 𝑌𝑠𝑌) ∧ (♯‘𝑦) = (♯‘𝑢)) → (𝜒𝜃))
175171, 172, 173, 174syl3anc 1476 . . . . . . . . . . . . . . . . 17 ((((𝑢 ∈ Word 𝑌𝑠𝑌) ∧ (𝑦 ∈ Word 𝑋𝑧𝑋)) ∧ (♯‘𝑦) = (♯‘𝑢)) → (𝜒𝜃))
17644ancoms 446 . . . . . . . . . . . . . . . . . 18 ((𝑤 = 𝑢𝑥 = 𝑦) → (𝜑𝜒))
177129, 128, 176sbc2ie 3655 . . . . . . . . . . . . . . . . 17 ([𝑢 / 𝑤][𝑦 / 𝑥]𝜑𝜒)
178 ovex 6821 . . . . . . . . . . . . . . . . . 18 (𝑢 ++ ⟨“𝑠”⟩) ∈ V
179 ovex 6821 . . . . . . . . . . . . . . . . . 18 (𝑦 ++ ⟨“𝑧”⟩) ∈ V
180 wrd2ind.3 . . . . . . . . . . . . . . . . . . 19 ((𝑥 = (𝑦 ++ ⟨“𝑧”⟩) ∧ 𝑤 = (𝑢 ++ ⟨“𝑠”⟩)) → (𝜑𝜃))
181180ancoms 446 . . . . . . . . . . . . . . . . . 18 ((𝑤 = (𝑢 ++ ⟨“𝑠”⟩) ∧ 𝑥 = (𝑦 ++ ⟨“𝑧”⟩)) → (𝜑𝜃))
182178, 179, 181sbc2ie 3655 . . . . . . . . . . . . . . . . 17 ([(𝑢 ++ ⟨“𝑠”⟩) / 𝑤][(𝑦 ++ ⟨“𝑧”⟩) / 𝑥]𝜑𝜃)
183175, 177, 1823imtr4g 285 . . . . . . . . . . . . . . . 16 ((((𝑢 ∈ Word 𝑌𝑠𝑌) ∧ (𝑦 ∈ Word 𝑋𝑧𝑋)) ∧ (♯‘𝑦) = (♯‘𝑢)) → ([𝑢 / 𝑤][𝑦 / 𝑥]𝜑[(𝑢 ++ ⟨“𝑠”⟩) / 𝑤][(𝑦 ++ ⟨“𝑧”⟩) / 𝑥]𝜑))
184183ex 397 . . . . . . . . . . . . . . 15 (((𝑢 ∈ Word 𝑌𝑠𝑌) ∧ (𝑦 ∈ Word 𝑋𝑧𝑋)) → ((♯‘𝑦) = (♯‘𝑢) → ([𝑢 / 𝑤][𝑦 / 𝑥]𝜑[(𝑢 ++ ⟨“𝑠”⟩) / 𝑤][(𝑦 ++ ⟨“𝑧”⟩) / 𝑥]𝜑)))
185184com23 86 . . . . . . . . . . . . . 14 (((𝑢 ∈ Word 𝑌𝑠𝑌) ∧ (𝑦 ∈ Word 𝑋𝑧𝑋)) → ([𝑢 / 𝑤][𝑦 / 𝑥]𝜑 → ((♯‘𝑦) = (♯‘𝑢) → [(𝑢 ++ ⟨“𝑠”⟩) / 𝑤][(𝑦 ++ ⟨“𝑧”⟩) / 𝑥]𝜑)))
186185impd 396 . . . . . . . . . . . . 13 (((𝑢 ∈ Word 𝑌𝑠𝑌) ∧ (𝑦 ∈ Word 𝑋𝑧𝑋)) → (([𝑢 / 𝑤][𝑦 / 𝑥]𝜑 ∧ (♯‘𝑦) = (♯‘𝑢)) → [(𝑢 ++ ⟨“𝑠”⟩) / 𝑤][(𝑦 ++ ⟨“𝑧”⟩) / 𝑥]𝜑))
187152, 160, 166, 170, 186vtocl4ga 3429 . . . . . . . . . . . 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 2791 . . . . . . . . . . . . . . . 16 (((♯‘𝑥) = (♯‘𝑤) ∧ (♯‘𝑥) = (𝑚 + 1)) → (♯‘𝑤) = (𝑚 + 1))
190189ad2antll 708 . . . . . . . . . . . . . . 15 (((𝑚 ∈ ℕ0 ∧ ∀𝑢 ∈ Word 𝑌𝑦 ∈ Word 𝑋(((♯‘𝑦) = (♯‘𝑢) ∧ (♯‘𝑦) = 𝑚) → 𝜒)) ∧ ((𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋) ∧ ((♯‘𝑥) = (♯‘𝑤) ∧ (♯‘𝑥) = (𝑚 + 1)))) → (♯‘𝑤) = (𝑚 + 1))
191190, 92eqeltrd 2850 . . . . . . . . . . . . . 14 (((𝑚 ∈ ℕ0 ∧ ∀𝑢 ∈ Word 𝑌𝑦 ∈ Word 𝑋(((♯‘𝑦) = (♯‘𝑢) ∧ (♯‘𝑦) = 𝑚) → 𝜒)) ∧ ((𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋) ∧ ((♯‘𝑥) = (♯‘𝑤) ∧ (♯‘𝑥) = (𝑚 + 1)))) → (♯‘𝑤) ∈ ℕ)
192 wrdfin 13512 . . . . . . . . . . . . . . . . 17 (𝑤 ∈ Word 𝑌𝑤 ∈ Fin)
193192adantr 466 . . . . . . . . . . . . . . . 16 ((𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋) → 𝑤 ∈ Fin)
194193ad2antrl 707 . . . . . . . . . . . . . . 15 (((𝑚 ∈ ℕ0 ∧ ∀𝑢 ∈ Word 𝑌𝑦 ∈ Word 𝑋(((♯‘𝑦) = (♯‘𝑢) ∧ (♯‘𝑦) = 𝑚) → 𝜒)) ∧ ((𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋) ∧ ((♯‘𝑥) = (♯‘𝑤) ∧ (♯‘𝑥) = (𝑚 + 1)))) → 𝑤 ∈ Fin)
195 hashnncl 13352 . . . . . . . . . . . . . . 15 (𝑤 ∈ Fin → ((♯‘𝑤) ∈ ℕ ↔ 𝑤 ≠ ∅))
196194, 195syl 17 . . . . . . . . . . . . . 14 (((𝑚 ∈ ℕ0 ∧ ∀𝑢 ∈ Word 𝑌𝑦 ∈ Word 𝑋(((♯‘𝑦) = (♯‘𝑢) ∧ (♯‘𝑦) = 𝑚) → 𝜒)) ∧ ((𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋) ∧ ((♯‘𝑥) = (♯‘𝑤) ∧ (♯‘𝑥) = (𝑚 + 1)))) → ((♯‘𝑤) ∈ ℕ ↔ 𝑤 ≠ ∅))
197191, 196mpbid 222 . . . . . . . . . . . . 13 (((𝑚 ∈ ℕ0 ∧ ∀𝑢 ∈ Word 𝑌𝑦 ∈ Word 𝑋(((♯‘𝑦) = (♯‘𝑢) ∧ (♯‘𝑦) = 𝑚) → 𝜒)) ∧ ((𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋) ∧ ((♯‘𝑥) = (♯‘𝑤) ∧ (♯‘𝑥) = (𝑚 + 1)))) → 𝑤 ≠ ∅)
198 swrdccatwrd 13670 . . . . . . . . . . . . . 14 ((𝑤 ∈ Word 𝑌𝑤 ≠ ∅) → ((𝑤 substr ⟨0, ((♯‘𝑤) − 1)⟩) ++ ⟨“(lastS‘𝑤)”⟩) = 𝑤)
199198eqcomd 2777 . . . . . . . . . . . . 13 ((𝑤 ∈ Word 𝑌𝑤 ≠ ∅) → 𝑤 = ((𝑤 substr ⟨0, ((♯‘𝑤) − 1)⟩) ++ ⟨“(lastS‘𝑤)”⟩))
20099, 197, 199syl2anc 573 . . . . . . . . . . . 12 (((𝑚 ∈ ℕ0 ∧ ∀𝑢 ∈ Word 𝑌𝑦 ∈ Word 𝑋(((♯‘𝑦) = (♯‘𝑢) ∧ (♯‘𝑦) = 𝑚) → 𝜒)) ∧ ((𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋) ∧ ((♯‘𝑥) = (♯‘𝑤) ∧ (♯‘𝑥) = (𝑚 + 1)))) → 𝑤 = ((𝑤 substr ⟨0, ((♯‘𝑤) − 1)⟩) ++ ⟨“(lastS‘𝑤)”⟩))
201 wrdfin 13512 . . . . . . . . . . . . . . . . 17 (𝑥 ∈ Word 𝑋𝑥 ∈ Fin)
202201adantl 467 . . . . . . . . . . . . . . . 16 ((𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋) → 𝑥 ∈ Fin)
203202ad2antrl 707 . . . . . . . . . . . . . . 15 (((𝑚 ∈ ℕ0 ∧ ∀𝑢 ∈ Word 𝑌𝑦 ∈ Word 𝑋(((♯‘𝑦) = (♯‘𝑢) ∧ (♯‘𝑦) = 𝑚) → 𝜒)) ∧ ((𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋) ∧ ((♯‘𝑥) = (♯‘𝑤) ∧ (♯‘𝑥) = (𝑚 + 1)))) → 𝑥 ∈ Fin)
204 hashnncl 13352 . . . . . . . . . . . . . . 15 (𝑥 ∈ Fin → ((♯‘𝑥) ∈ ℕ ↔ 𝑥 ≠ ∅))
205203, 204syl 17 . . . . . . . . . . . . . 14 (((𝑚 ∈ ℕ0 ∧ ∀𝑢 ∈ Word 𝑌𝑦 ∈ Word 𝑋(((♯‘𝑦) = (♯‘𝑢) ∧ (♯‘𝑦) = 𝑚) → 𝜒)) ∧ ((𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋) ∧ ((♯‘𝑥) = (♯‘𝑤) ∧ (♯‘𝑥) = (𝑚 + 1)))) → ((♯‘𝑥) ∈ ℕ ↔ 𝑥 ≠ ∅))
20693, 205mpbid 222 . . . . . . . . . . . . 13 (((𝑚 ∈ ℕ0 ∧ ∀𝑢 ∈ Word 𝑌𝑦 ∈ Word 𝑋(((♯‘𝑦) = (♯‘𝑢) ∧ (♯‘𝑦) = 𝑚) → 𝜒)) ∧ ((𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋) ∧ ((♯‘𝑥) = (♯‘𝑤) ∧ (♯‘𝑥) = (𝑚 + 1)))) → 𝑥 ≠ ∅)
207 swrdccatwrd 13670 . . . . . . . . . . . . . 14 ((𝑥 ∈ Word 𝑋𝑥 ≠ ∅) → ((𝑥 substr ⟨0, ((♯‘𝑥) − 1)⟩) ++ ⟨“(lastS‘𝑥)”⟩) = 𝑥)
208207eqcomd 2777 . . . . . . . . . . . . 13 ((𝑥 ∈ Word 𝑋𝑥 ≠ ∅) → 𝑥 = ((𝑥 substr ⟨0, ((♯‘𝑥) − 1)⟩) ++ ⟨“(lastS‘𝑥)”⟩))
20989, 206, 208syl2anc 573 . . . . . . . . . . . 12 (((𝑚 ∈ ℕ0 ∧ ∀𝑢 ∈ Word 𝑌𝑦 ∈ Word 𝑋(((♯‘𝑦) = (♯‘𝑢) ∧ (♯‘𝑦) = 𝑚) → 𝜒)) ∧ ((𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋) ∧ ((♯‘𝑥) = (♯‘𝑤) ∧ (♯‘𝑥) = (𝑚 + 1)))) → 𝑥 = ((𝑥 substr ⟨0, ((♯‘𝑥) − 1)⟩) ++ ⟨“(lastS‘𝑥)”⟩))
210 sbceq1a 3598 . . . . . . . . . . . . 13 (𝑤 = ((𝑤 substr ⟨0, ((♯‘𝑤) − 1)⟩) ++ ⟨“(lastS‘𝑤)”⟩) → (𝜑[((𝑤 substr ⟨0, ((♯‘𝑤) − 1)⟩) ++ ⟨“(lastS‘𝑤)”⟩) / 𝑤]𝜑))
211 sbceq1a 3598 . . . . . . . . . . . . 13 (𝑥 = ((𝑥 substr ⟨0, ((♯‘𝑥) − 1)⟩) ++ ⟨“(lastS‘𝑥)”⟩) → ([((𝑤 substr ⟨0, ((♯‘𝑤) − 1)⟩) ++ ⟨“(lastS‘𝑤)”⟩) / 𝑤]𝜑[((𝑥 substr ⟨0, ((♯‘𝑥) − 1)⟩) ++ ⟨“(lastS‘𝑥)”⟩) / 𝑥][((𝑤 substr ⟨0, ((♯‘𝑤) − 1)⟩) ++ ⟨“(lastS‘𝑤)”⟩) / 𝑤]𝜑))
212210, 211sylan9bb 499 . . . . . . . . . . . 12 ((𝑤 = ((𝑤 substr ⟨0, ((♯‘𝑤) − 1)⟩) ++ ⟨“(lastS‘𝑤)”⟩) ∧ 𝑥 = ((𝑥 substr ⟨0, ((♯‘𝑥) − 1)⟩) ++ ⟨“(lastS‘𝑥)”⟩)) → (𝜑[((𝑥 substr ⟨0, ((♯‘𝑥) − 1)⟩) ++ ⟨“(lastS‘𝑥)”⟩) / 𝑥][((𝑤 substr ⟨0, ((♯‘𝑤) − 1)⟩) ++ ⟨“(lastS‘𝑤)”⟩) / 𝑤]𝜑))
213200, 209, 212syl2anc 573 . . . . . . . . . . 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 444 . . . . . . . . 9 (((𝑚 ∈ ℕ0 ∧ ∀𝑢 ∈ Word 𝑌𝑦 ∈ Word 𝑋(((♯‘𝑦) = (♯‘𝑢) ∧ (♯‘𝑦) = 𝑚) → 𝜒)) ∧ (𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋)) → (((♯‘𝑥) = (♯‘𝑤) ∧ (♯‘𝑥) = (𝑚 + 1)) → 𝜑))
216215ralrimivva 3120 . . . . . . . 8 ((𝑚 ∈ ℕ0 ∧ ∀𝑢 ∈ Word 𝑌𝑦 ∈ Word 𝑋(((♯‘𝑦) = (♯‘𝑢) ∧ (♯‘𝑦) = 𝑚) → 𝜒)) → ∀𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋(((♯‘𝑥) = (♯‘𝑤) ∧ (♯‘𝑥) = (𝑚 + 1)) → 𝜑))
217216ex 397 . . . . . . 7 (𝑚 ∈ ℕ0 → (∀𝑢 ∈ Word 𝑌𝑦 ∈ Word 𝑋(((♯‘𝑦) = (♯‘𝑢) ∧ (♯‘𝑦) = 𝑚) → 𝜒) → ∀𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋(((♯‘𝑥) = (♯‘𝑤) ∧ (♯‘𝑥) = (𝑚 + 1)) → 𝜑)))
21848, 217syl5bi 232 . . . . . 6 (𝑚 ∈ ℕ0 → (∀𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋(((♯‘𝑥) = (♯‘𝑤) ∧ (♯‘𝑥) = 𝑚) → 𝜑) → ∀𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋(((♯‘𝑥) = (♯‘𝑤) ∧ (♯‘𝑥) = (𝑚 + 1)) → 𝜑)))
2195, 9, 13, 17, 37, 218nn0ind 11672 . . . . 5 ((♯‘𝐴) ∈ ℕ0 → ∀𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋(((♯‘𝑥) = (♯‘𝑤) ∧ (♯‘𝑥) = (♯‘𝐴)) → 𝜑))
2201, 219syl 17 . . . 4 (𝐴 ∈ Word 𝑋 → ∀𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋(((♯‘𝑥) = (♯‘𝑤) ∧ (♯‘𝑥) = (♯‘𝐴)) → 𝜑))
2212203ad2ant1 1127 . . 3 ((𝐴 ∈ Word 𝑋𝐵 ∈ Word 𝑌 ∧ (♯‘𝐴) = (♯‘𝐵)) → ∀𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋(((♯‘𝑥) = (♯‘𝑤) ∧ (♯‘𝑥) = (♯‘𝐴)) → 𝜑))
222 fveq2 6330 . . . . . . . . 9 (𝑤 = 𝐵 → (♯‘𝑤) = (♯‘𝐵))
223222eqeq2d 2781 . . . . . . . 8 (𝑤 = 𝐵 → ((♯‘𝑥) = (♯‘𝑤) ↔ (♯‘𝑥) = (♯‘𝐵)))
224223anbi1d 615 . . . . . . 7 (𝑤 = 𝐵 → (((♯‘𝑥) = (♯‘𝑤) ∧ (♯‘𝑥) = (♯‘𝐴)) ↔ ((♯‘𝑥) = (♯‘𝐵) ∧ (♯‘𝑥) = (♯‘𝐴))))
225 wrd2ind.5 . . . . . . 7 (𝑤 = 𝐵 → (𝜑𝜌))
226224, 225imbi12d 333 . . . . . 6 (𝑤 = 𝐵 → ((((♯‘𝑥) = (♯‘𝑤) ∧ (♯‘𝑥) = (♯‘𝐴)) → 𝜑) ↔ (((♯‘𝑥) = (♯‘𝐵) ∧ (♯‘𝑥) = (♯‘𝐴)) → 𝜌)))
227226ralbidv 3135 . . . . 5 (𝑤 = 𝐵 → (∀𝑥 ∈ Word 𝑋(((♯‘𝑥) = (♯‘𝑤) ∧ (♯‘𝑥) = (♯‘𝐴)) → 𝜑) ↔ ∀𝑥 ∈ Word 𝑋(((♯‘𝑥) = (♯‘𝐵) ∧ (♯‘𝑥) = (♯‘𝐴)) → 𝜌)))
228227rspcv 3456 . . . 4 (𝐵 ∈ Word 𝑌 → (∀𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋(((♯‘𝑥) = (♯‘𝑤) ∧ (♯‘𝑥) = (♯‘𝐴)) → 𝜑) → ∀𝑥 ∈ Word 𝑋(((♯‘𝑥) = (♯‘𝐵) ∧ (♯‘𝑥) = (♯‘𝐴)) → 𝜌)))
2292283ad2ant2 1128 . . 3 ((𝐴 ∈ Word 𝑋𝐵 ∈ Word 𝑌 ∧ (♯‘𝐴) = (♯‘𝐵)) → (∀𝑤 ∈ Word 𝑌𝑥 ∈ Word 𝑋(((♯‘𝑥) = (♯‘𝑤) ∧ (♯‘𝑥) = (♯‘𝐴)) → 𝜑) → ∀𝑥 ∈ Word 𝑋(((♯‘𝑥) = (♯‘𝐵) ∧ (♯‘𝑥) = (♯‘𝐴)) → 𝜌)))
230221, 229mpd 15 . 2 ((𝐴 ∈ Word 𝑋𝐵 ∈ Word 𝑌 ∧ (♯‘𝐴) = (♯‘𝐵)) → ∀𝑥 ∈ Word 𝑋(((♯‘𝑥) = (♯‘𝐵) ∧ (♯‘𝑥) = (♯‘𝐴)) → 𝜌))
231 eqidd 2772 . 2 ((𝐴 ∈ Word 𝑋𝐵 ∈ Word 𝑌 ∧ (♯‘𝐴) = (♯‘𝐵)) → (♯‘𝐴) = (♯‘𝐴))
232 fveq2 6330 . . . . . . . . . . 11 (𝑥 = 𝐴 → (♯‘𝑥) = (♯‘𝐴))
233232eqeq1d 2773 . . . . . . . . . 10 (𝑥 = 𝐴 → ((♯‘𝑥) = (♯‘𝐵) ↔ (♯‘𝐴) = (♯‘𝐵)))
234232eqeq1d 2773 . . . . . . . . . 10 (𝑥 = 𝐴 → ((♯‘𝑥) = (♯‘𝐴) ↔ (♯‘𝐴) = (♯‘𝐴)))
235233, 234anbi12d 616 . . . . . . . . 9 (𝑥 = 𝐴 → (((♯‘𝑥) = (♯‘𝐵) ∧ (♯‘𝑥) = (♯‘𝐴)) ↔ ((♯‘𝐴) = (♯‘𝐵) ∧ (♯‘𝐴) = (♯‘𝐴))))
236 wrd2ind.4 . . . . . . . . 9 (𝑥 = 𝐴 → (𝜌𝜏))
237235, 236imbi12d 333 . . . . . . . 8 (𝑥 = 𝐴 → ((((♯‘𝑥) = (♯‘𝐵) ∧ (♯‘𝑥) = (♯‘𝐴)) → 𝜌) ↔ (((♯‘𝐴) = (♯‘𝐵) ∧ (♯‘𝐴) = (♯‘𝐴)) → 𝜏)))
238237rspcv 3456 . . . . . . 7 (𝐴 ∈ Word 𝑋 → (∀𝑥 ∈ Word 𝑋(((♯‘𝑥) = (♯‘𝐵) ∧ (♯‘𝑥) = (♯‘𝐴)) → 𝜌) → (((♯‘𝐴) = (♯‘𝐵) ∧ (♯‘𝐴) = (♯‘𝐴)) → 𝜏)))
239238com23 86 . . . . . 6 (𝐴 ∈ Word 𝑋 → (((♯‘𝐴) = (♯‘𝐵) ∧ (♯‘𝐴) = (♯‘𝐴)) → (∀𝑥 ∈ Word 𝑋(((♯‘𝑥) = (♯‘𝐵) ∧ (♯‘𝑥) = (♯‘𝐴)) → 𝜌) → 𝜏)))
240239expd 400 . . . . 5 (𝐴 ∈ Word 𝑋 → ((♯‘𝐴) = (♯‘𝐵) → ((♯‘𝐴) = (♯‘𝐴) → (∀𝑥 ∈ Word 𝑋(((♯‘𝑥) = (♯‘𝐵) ∧ (♯‘𝑥) = (♯‘𝐴)) → 𝜌) → 𝜏))))
241240com34 91 . . . 4 (𝐴 ∈ Word 𝑋 → ((♯‘𝐴) = (♯‘𝐵) → (∀𝑥 ∈ Word 𝑋(((♯‘𝑥) = (♯‘𝐵) ∧ (♯‘𝑥) = (♯‘𝐴)) → 𝜌) → ((♯‘𝐴) = (♯‘𝐴) → 𝜏))))
242241imp 393 . . 3 ((𝐴 ∈ Word 𝑋 ∧ (♯‘𝐴) = (♯‘𝐵)) → (∀𝑥 ∈ Word 𝑋(((♯‘𝑥) = (♯‘𝐵) ∧ (♯‘𝑥) = (♯‘𝐴)) → 𝜌) → ((♯‘𝐴) = (♯‘𝐴) → 𝜏)))
2432423adant2 1125 . 2 ((𝐴 ∈ Word 𝑋𝐵 ∈ Word 𝑌 ∧ (♯‘𝐴) = (♯‘𝐵)) → (∀𝑥 ∈ Word 𝑋(((♯‘𝑥) = (♯‘𝐵) ∧ (♯‘𝑥) = (♯‘𝐴)) → 𝜌) → ((♯‘𝐴) = (♯‘𝐴) → 𝜏)))
244230, 231, 243mp2d 49 1 ((𝐴 ∈ Word 𝑋𝐵 ∈ Word 𝑌 ∧ (♯‘𝐴) = (♯‘𝐵)) → 𝜏)
Colors of variables: wff setvar class
Syntax hints:  wi 4  wb 196  wa 382  w3a 1071   = wceq 1631  wcel 2145  wne 2943  wral 3061  [wsbc 3587  c0 4063  cop 4322   class class class wbr 4786  cfv 6029  (class class class)co 6791  Fincfn 8107  cc 10134  0cc0 10136  1c1 10137   + caddc 10139  cle 10275  cmin 10466  cn 11220  0cn0 11492  ...cfz 12526  ..^cfzo 12666  chash 13314  Word cword 13480  lastSclsw 13481   ++ cconcat 13482  ⟨“cs1 13483   substr csubstr 13484
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1870  ax-4 1885  ax-5 1991  ax-6 2057  ax-7 2093  ax-8 2147  ax-9 2154  ax-10 2174  ax-11 2190  ax-12 2203  ax-13 2408  ax-ext 2751  ax-rep 4904  ax-sep 4915  ax-nul 4923  ax-pow 4974  ax-pr 5034  ax-un 7094  ax-cnex 10192  ax-resscn 10193  ax-1cn 10194  ax-icn 10195  ax-addcl 10196  ax-addrcl 10197  ax-mulcl 10198  ax-mulrcl 10199  ax-mulcom 10200  ax-addass 10201  ax-mulass 10202  ax-distr 10203  ax-i2m1 10204  ax-1ne0 10205  ax-1rid 10206  ax-rnegex 10207  ax-rrecex 10208  ax-cnre 10209  ax-pre-lttri 10210  ax-pre-lttrn 10211  ax-pre-ltadd 10212  ax-pre-mulgt0 10213
This theorem depends on definitions:  df-bi 197  df-an 383  df-or 837  df-3or 1072  df-3an 1073  df-tru 1634  df-ex 1853  df-nf 1858  df-sb 2050  df-eu 2622  df-mo 2623  df-clab 2758  df-cleq 2764  df-clel 2767  df-nfc 2902  df-ne 2944  df-nel 3047  df-ral 3066  df-rex 3067  df-reu 3068  df-rab 3070  df-v 3353  df-sbc 3588  df-csb 3683  df-dif 3726  df-un 3728  df-in 3730  df-ss 3737  df-pss 3739  df-nul 4064  df-if 4226  df-pw 4299  df-sn 4317  df-pr 4319  df-tp 4321  df-op 4323  df-uni 4575  df-int 4612  df-iun 4656  df-br 4787  df-opab 4847  df-mpt 4864  df-tr 4887  df-id 5157  df-eprel 5162  df-po 5170  df-so 5171  df-fr 5208  df-we 5210  df-xp 5255  df-rel 5256  df-cnv 5257  df-co 5258  df-dm 5259  df-rn 5260  df-res 5261  df-ima 5262  df-pred 5821  df-ord 5867  df-on 5868  df-lim 5869  df-suc 5870  df-iota 5992  df-fun 6031  df-fn 6032  df-f 6033  df-f1 6034  df-fo 6035  df-f1o 6036  df-fv 6037  df-riota 6752  df-ov 6794  df-oprab 6795  df-mpt2 6796  df-om 7211  df-1st 7313  df-2nd 7314  df-wrecs 7557  df-recs 7619  df-rdg 7657  df-1o 7711  df-oadd 7715  df-er 7894  df-en 8108  df-dom 8109  df-sdom 8110  df-fin 8111  df-card 8963  df-pnf 10276  df-mnf 10277  df-xr 10278  df-ltxr 10279  df-le 10280  df-sub 10468  df-neg 10469  df-nn 11221  df-n0 11493  df-xnn0 11564  df-z 11578  df-uz 11887  df-fz 12527  df-fzo 12667  df-hash 13315  df-word 13488  df-lsw 13489  df-concat 13490  df-s1 13491  df-substr 13492
This theorem is referenced by:  gsmsymgreq  18052
  Copyright terms: Public domain W3C validator