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

Theorem 2cshwcshw 14583
Description: If a word is a cyclically shifted word, and a second word is the result of cyclically shifting the same word, then the second word is the result of cyclically shifting the first word. (Contributed by AV, 11-May-2018.) (Revised by AV, 12-Jun-2018.) (Proof shortened by AV, 3-Nov-2018.)
Assertion
Ref Expression
2cshwcshw ((𝑌 ∈ Word 𝑉 ∧ (♯‘𝑌) = 𝑁) → ((𝐾 ∈ (0...𝑁) ∧ 𝑋 = (𝑌 cyclShift 𝐾) ∧ ∃𝑚 ∈ (0...𝑁)𝑍 = (𝑌 cyclShift 𝑚)) → ∃𝑛 ∈ (0...𝑁)𝑍 = (𝑋 cyclShift 𝑛)))
Distinct variable groups:   𝑚,𝑛,𝐾   𝑚,𝑁,𝑛   𝑚,𝑉,𝑛   𝑚,𝑋,𝑛   𝑚,𝑌,𝑛   𝑚,𝑍,𝑛

Proof of Theorem 2cshwcshw
StepHypRef Expression
1 difelfznle 13416 . . . . . . . . . . . . . . . . . 18 ((𝐾 ∈ (0...𝑁) ∧ 𝑚 ∈ (0...𝑁) ∧ ¬ 𝐾𝑚) → ((𝑚 + 𝑁) − 𝐾) ∈ (0...𝑁))
213exp 1119 . . . . . . . . . . . . . . . . 17 (𝐾 ∈ (0...𝑁) → (𝑚 ∈ (0...𝑁) → (¬ 𝐾𝑚 → ((𝑚 + 𝑁) − 𝐾) ∈ (0...𝑁))))
32ad2antrr 724 . . . . . . . . . . . . . . . 16 (((𝐾 ∈ (0...𝑁) ∧ (𝑌 ∈ Word 𝑉 ∧ (♯‘𝑌) = 𝑁)) ∧ 𝑋 = (𝑌 cyclShift 𝐾)) → (𝑚 ∈ (0...𝑁) → (¬ 𝐾𝑚 → ((𝑚 + 𝑁) − 𝐾) ∈ (0...𝑁))))
43imp 408 . . . . . . . . . . . . . . 15 ((((𝐾 ∈ (0...𝑁) ∧ (𝑌 ∈ Word 𝑉 ∧ (♯‘𝑌) = 𝑁)) ∧ 𝑋 = (𝑌 cyclShift 𝐾)) ∧ 𝑚 ∈ (0...𝑁)) → (¬ 𝐾𝑚 → ((𝑚 + 𝑁) − 𝐾) ∈ (0...𝑁)))
54adantr 482 . . . . . . . . . . . . . 14 (((((𝐾 ∈ (0...𝑁) ∧ (𝑌 ∈ Word 𝑉 ∧ (♯‘𝑌) = 𝑁)) ∧ 𝑋 = (𝑌 cyclShift 𝐾)) ∧ 𝑚 ∈ (0...𝑁)) ∧ 𝑍 = (𝑌 cyclShift 𝑚)) → (¬ 𝐾𝑚 → ((𝑚 + 𝑁) − 𝐾) ∈ (0...𝑁)))
65com12 32 . . . . . . . . . . . . 13 𝐾𝑚 → (((((𝐾 ∈ (0...𝑁) ∧ (𝑌 ∈ Word 𝑉 ∧ (♯‘𝑌) = 𝑁)) ∧ 𝑋 = (𝑌 cyclShift 𝐾)) ∧ 𝑚 ∈ (0...𝑁)) ∧ 𝑍 = (𝑌 cyclShift 𝑚)) → ((𝑚 + 𝑁) − 𝐾) ∈ (0...𝑁)))
76adantl 483 . . . . . . . . . . . 12 ((¬ 𝑚 = 0 ∧ ¬ 𝐾𝑚) → (((((𝐾 ∈ (0...𝑁) ∧ (𝑌 ∈ Word 𝑉 ∧ (♯‘𝑌) = 𝑁)) ∧ 𝑋 = (𝑌 cyclShift 𝐾)) ∧ 𝑚 ∈ (0...𝑁)) ∧ 𝑍 = (𝑌 cyclShift 𝑚)) → ((𝑚 + 𝑁) − 𝐾) ∈ (0...𝑁)))
87imp 408 . . . . . . . . . . 11 (((¬ 𝑚 = 0 ∧ ¬ 𝐾𝑚) ∧ ((((𝐾 ∈ (0...𝑁) ∧ (𝑌 ∈ Word 𝑉 ∧ (♯‘𝑌) = 𝑁)) ∧ 𝑋 = (𝑌 cyclShift 𝐾)) ∧ 𝑚 ∈ (0...𝑁)) ∧ 𝑍 = (𝑌 cyclShift 𝑚))) → ((𝑚 + 𝑁) − 𝐾) ∈ (0...𝑁))
9 simprl 769 . . . . . . . . . . . . . . . . . . . . . . . 24 ((𝐾 ∈ (0...𝑁) ∧ (𝑌 ∈ Word 𝑉 ∧ (♯‘𝑌) = 𝑁)) → 𝑌 ∈ Word 𝑉)
109ad2antrr 724 . . . . . . . . . . . . . . . . . . . . . . 23 ((((𝐾 ∈ (0...𝑁) ∧ (𝑌 ∈ Word 𝑉 ∧ (♯‘𝑌) = 𝑁)) ∧ (¬ 𝑚 = 0 ∧ ¬ 𝐾𝑚)) ∧ 𝑚 ∈ (0...𝑁)) → 𝑌 ∈ Word 𝑉)
11 elfzelz 13302 . . . . . . . . . . . . . . . . . . . . . . . . 25 (𝐾 ∈ (0...𝑁) → 𝐾 ∈ ℤ)
1211adantr 482 . . . . . . . . . . . . . . . . . . . . . . . 24 ((𝐾 ∈ (0...𝑁) ∧ (𝑌 ∈ Word 𝑉 ∧ (♯‘𝑌) = 𝑁)) → 𝐾 ∈ ℤ)
1312ad2antrr 724 . . . . . . . . . . . . . . . . . . . . . . 23 ((((𝐾 ∈ (0...𝑁) ∧ (𝑌 ∈ Word 𝑉 ∧ (♯‘𝑌) = 𝑁)) ∧ (¬ 𝑚 = 0 ∧ ¬ 𝐾𝑚)) ∧ 𝑚 ∈ (0...𝑁)) → 𝐾 ∈ ℤ)
14 elfz2 13292 . . . . . . . . . . . . . . . . . . . . . . . . . 26 (𝐾 ∈ (0...𝑁) ↔ ((0 ∈ ℤ ∧ 𝑁 ∈ ℤ ∧ 𝐾 ∈ ℤ) ∧ (0 ≤ 𝐾𝐾𝑁)))
15 zaddcl 12406 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 ((𝑚 ∈ ℤ ∧ 𝑁 ∈ ℤ) → (𝑚 + 𝑁) ∈ ℤ)
1615adantrr 715 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 ((𝑚 ∈ ℤ ∧ (𝑁 ∈ ℤ ∧ 𝐾 ∈ ℤ)) → (𝑚 + 𝑁) ∈ ℤ)
17 simprr 771 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 ((𝑚 ∈ ℤ ∧ (𝑁 ∈ ℤ ∧ 𝐾 ∈ ℤ)) → 𝐾 ∈ ℤ)
1816, 17zsubcld 12477 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 ((𝑚 ∈ ℤ ∧ (𝑁 ∈ ℤ ∧ 𝐾 ∈ ℤ)) → ((𝑚 + 𝑁) − 𝐾) ∈ ℤ)
1918ex 414 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 (𝑚 ∈ ℤ → ((𝑁 ∈ ℤ ∧ 𝐾 ∈ ℤ) → ((𝑚 + 𝑁) − 𝐾) ∈ ℤ))
20 elfzelz 13302 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 (𝑚 ∈ (0...𝑁) → 𝑚 ∈ ℤ)
2119, 20syl11 33 . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 ((𝑁 ∈ ℤ ∧ 𝐾 ∈ ℤ) → (𝑚 ∈ (0...𝑁) → ((𝑚 + 𝑁) − 𝐾) ∈ ℤ))
22213adant1 1130 . . . . . . . . . . . . . . . . . . . . . . . . . . 27 ((0 ∈ ℤ ∧ 𝑁 ∈ ℤ ∧ 𝐾 ∈ ℤ) → (𝑚 ∈ (0...𝑁) → ((𝑚 + 𝑁) − 𝐾) ∈ ℤ))
2322adantr 482 . . . . . . . . . . . . . . . . . . . . . . . . . 26 (((0 ∈ ℤ ∧ 𝑁 ∈ ℤ ∧ 𝐾 ∈ ℤ) ∧ (0 ≤ 𝐾𝐾𝑁)) → (𝑚 ∈ (0...𝑁) → ((𝑚 + 𝑁) − 𝐾) ∈ ℤ))
2414, 23sylbi 216 . . . . . . . . . . . . . . . . . . . . . . . . 25 (𝐾 ∈ (0...𝑁) → (𝑚 ∈ (0...𝑁) → ((𝑚 + 𝑁) − 𝐾) ∈ ℤ))
2524ad2antrr 724 . . . . . . . . . . . . . . . . . . . . . . . 24 (((𝐾 ∈ (0...𝑁) ∧ (𝑌 ∈ Word 𝑉 ∧ (♯‘𝑌) = 𝑁)) ∧ (¬ 𝑚 = 0 ∧ ¬ 𝐾𝑚)) → (𝑚 ∈ (0...𝑁) → ((𝑚 + 𝑁) − 𝐾) ∈ ℤ))
2625imp 408 . . . . . . . . . . . . . . . . . . . . . . 23 ((((𝐾 ∈ (0...𝑁) ∧ (𝑌 ∈ Word 𝑉 ∧ (♯‘𝑌) = 𝑁)) ∧ (¬ 𝑚 = 0 ∧ ¬ 𝐾𝑚)) ∧ 𝑚 ∈ (0...𝑁)) → ((𝑚 + 𝑁) − 𝐾) ∈ ℤ)
27 2cshw 14571 . . . . . . . . . . . . . . . . . . . . . . 23 ((𝑌 ∈ Word 𝑉𝐾 ∈ ℤ ∧ ((𝑚 + 𝑁) − 𝐾) ∈ ℤ) → ((𝑌 cyclShift 𝐾) cyclShift ((𝑚 + 𝑁) − 𝐾)) = (𝑌 cyclShift (𝐾 + ((𝑚 + 𝑁) − 𝐾))))
2810, 13, 26, 27syl3anc 1371 . . . . . . . . . . . . . . . . . . . . . 22 ((((𝐾 ∈ (0...𝑁) ∧ (𝑌 ∈ Word 𝑉 ∧ (♯‘𝑌) = 𝑁)) ∧ (¬ 𝑚 = 0 ∧ ¬ 𝐾𝑚)) ∧ 𝑚 ∈ (0...𝑁)) → ((𝑌 cyclShift 𝐾) cyclShift ((𝑚 + 𝑁) − 𝐾)) = (𝑌 cyclShift (𝐾 + ((𝑚 + 𝑁) − 𝐾))))
2917, 18zaddcld 12476 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 ((𝑚 ∈ ℤ ∧ (𝑁 ∈ ℤ ∧ 𝐾 ∈ ℤ)) → (𝐾 + ((𝑚 + 𝑁) − 𝐾)) ∈ ℤ)
3029ex 414 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 (𝑚 ∈ ℤ → ((𝑁 ∈ ℤ ∧ 𝐾 ∈ ℤ) → (𝐾 + ((𝑚 + 𝑁) − 𝐾)) ∈ ℤ))
3130, 20syl11 33 . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 ((𝑁 ∈ ℤ ∧ 𝐾 ∈ ℤ) → (𝑚 ∈ (0...𝑁) → (𝐾 + ((𝑚 + 𝑁) − 𝐾)) ∈ ℤ))
32313adant1 1130 . . . . . . . . . . . . . . . . . . . . . . . . . . 27 ((0 ∈ ℤ ∧ 𝑁 ∈ ℤ ∧ 𝐾 ∈ ℤ) → (𝑚 ∈ (0...𝑁) → (𝐾 + ((𝑚 + 𝑁) − 𝐾)) ∈ ℤ))
3332adantr 482 . . . . . . . . . . . . . . . . . . . . . . . . . 26 (((0 ∈ ℤ ∧ 𝑁 ∈ ℤ ∧ 𝐾 ∈ ℤ) ∧ (0 ≤ 𝐾𝐾𝑁)) → (𝑚 ∈ (0...𝑁) → (𝐾 + ((𝑚 + 𝑁) − 𝐾)) ∈ ℤ))
3414, 33sylbi 216 . . . . . . . . . . . . . . . . . . . . . . . . 25 (𝐾 ∈ (0...𝑁) → (𝑚 ∈ (0...𝑁) → (𝐾 + ((𝑚 + 𝑁) − 𝐾)) ∈ ℤ))
3534ad2antrr 724 . . . . . . . . . . . . . . . . . . . . . . . 24 (((𝐾 ∈ (0...𝑁) ∧ (𝑌 ∈ Word 𝑉 ∧ (♯‘𝑌) = 𝑁)) ∧ (¬ 𝑚 = 0 ∧ ¬ 𝐾𝑚)) → (𝑚 ∈ (0...𝑁) → (𝐾 + ((𝑚 + 𝑁) − 𝐾)) ∈ ℤ))
3635imp 408 . . . . . . . . . . . . . . . . . . . . . . 23 ((((𝐾 ∈ (0...𝑁) ∧ (𝑌 ∈ Word 𝑉 ∧ (♯‘𝑌) = 𝑁)) ∧ (¬ 𝑚 = 0 ∧ ¬ 𝐾𝑚)) ∧ 𝑚 ∈ (0...𝑁)) → (𝐾 + ((𝑚 + 𝑁) − 𝐾)) ∈ ℤ)
37 cshwsublen 14554 . . . . . . . . . . . . . . . . . . . . . . 23 ((𝑌 ∈ Word 𝑉 ∧ (𝐾 + ((𝑚 + 𝑁) − 𝐾)) ∈ ℤ) → (𝑌 cyclShift (𝐾 + ((𝑚 + 𝑁) − 𝐾))) = (𝑌 cyclShift ((𝐾 + ((𝑚 + 𝑁) − 𝐾)) − (♯‘𝑌))))
3810, 36, 37syl2anc 585 . . . . . . . . . . . . . . . . . . . . . 22 ((((𝐾 ∈ (0...𝑁) ∧ (𝑌 ∈ Word 𝑉 ∧ (♯‘𝑌) = 𝑁)) ∧ (¬ 𝑚 = 0 ∧ ¬ 𝐾𝑚)) ∧ 𝑚 ∈ (0...𝑁)) → (𝑌 cyclShift (𝐾 + ((𝑚 + 𝑁) − 𝐾))) = (𝑌 cyclShift ((𝐾 + ((𝑚 + 𝑁) − 𝐾)) − (♯‘𝑌))))
3928, 38eqtrd 2776 . . . . . . . . . . . . . . . . . . . . 21 ((((𝐾 ∈ (0...𝑁) ∧ (𝑌 ∈ Word 𝑉 ∧ (♯‘𝑌) = 𝑁)) ∧ (¬ 𝑚 = 0 ∧ ¬ 𝐾𝑚)) ∧ 𝑚 ∈ (0...𝑁)) → ((𝑌 cyclShift 𝐾) cyclShift ((𝑚 + 𝑁) − 𝐾)) = (𝑌 cyclShift ((𝐾 + ((𝑚 + 𝑁) − 𝐾)) − (♯‘𝑌))))
40 elfz2nn0 13393 . . . . . . . . . . . . . . . . . . . . . . . . . . 27 (𝐾 ∈ (0...𝑁) ↔ (𝐾 ∈ ℕ0𝑁 ∈ ℕ0𝐾𝑁))
41 nn0cn 12289 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 (𝑚 ∈ ℕ0𝑚 ∈ ℂ)
42 nn0cn 12289 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 (𝐾 ∈ ℕ0𝐾 ∈ ℂ)
43 nn0cn 12289 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 (𝑁 ∈ ℕ0𝑁 ∈ ℂ)
4442, 43anim12i 614 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 ((𝐾 ∈ ℕ0𝑁 ∈ ℕ0) → (𝐾 ∈ ℂ ∧ 𝑁 ∈ ℂ))
45 simprl 769 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 ((𝑚 ∈ ℂ ∧ (𝐾 ∈ ℂ ∧ 𝑁 ∈ ℂ)) → 𝐾 ∈ ℂ)
46 addcl 10999 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 ((𝑚 ∈ ℂ ∧ 𝑁 ∈ ℂ) → (𝑚 + 𝑁) ∈ ℂ)
4746adantrl 714 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 ((𝑚 ∈ ℂ ∧ (𝐾 ∈ ℂ ∧ 𝑁 ∈ ℂ)) → (𝑚 + 𝑁) ∈ ℂ)
4845, 47pncan3d 11381 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 ((𝑚 ∈ ℂ ∧ (𝐾 ∈ ℂ ∧ 𝑁 ∈ ℂ)) → (𝐾 + ((𝑚 + 𝑁) − 𝐾)) = (𝑚 + 𝑁))
4948oveq1d 7322 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 ((𝑚 ∈ ℂ ∧ (𝐾 ∈ ℂ ∧ 𝑁 ∈ ℂ)) → ((𝐾 + ((𝑚 + 𝑁) − 𝐾)) − 𝑁) = ((𝑚 + 𝑁) − 𝑁))
50 pncan 11273 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 ((𝑚 ∈ ℂ ∧ 𝑁 ∈ ℂ) → ((𝑚 + 𝑁) − 𝑁) = 𝑚)
5150adantrl 714 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 ((𝑚 ∈ ℂ ∧ (𝐾 ∈ ℂ ∧ 𝑁 ∈ ℂ)) → ((𝑚 + 𝑁) − 𝑁) = 𝑚)
5249, 51eqtrd 2776 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 ((𝑚 ∈ ℂ ∧ (𝐾 ∈ ℂ ∧ 𝑁 ∈ ℂ)) → ((𝐾 + ((𝑚 + 𝑁) − 𝐾)) − 𝑁) = 𝑚)
5341, 44, 52syl2an 597 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 ((𝑚 ∈ ℕ0 ∧ (𝐾 ∈ ℕ0𝑁 ∈ ℕ0)) → ((𝐾 + ((𝑚 + 𝑁) − 𝐾)) − 𝑁) = 𝑚)
5453ex 414 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 (𝑚 ∈ ℕ0 → ((𝐾 ∈ ℕ0𝑁 ∈ ℕ0) → ((𝐾 + ((𝑚 + 𝑁) − 𝐾)) − 𝑁) = 𝑚))
55 elfznn0 13395 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 (𝑚 ∈ (0...𝑁) → 𝑚 ∈ ℕ0)
5654, 55syl11 33 . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 ((𝐾 ∈ ℕ0𝑁 ∈ ℕ0) → (𝑚 ∈ (0...𝑁) → ((𝐾 + ((𝑚 + 𝑁) − 𝐾)) − 𝑁) = 𝑚))
57563adant3 1132 . . . . . . . . . . . . . . . . . . . . . . . . . . 27 ((𝐾 ∈ ℕ0𝑁 ∈ ℕ0𝐾𝑁) → (𝑚 ∈ (0...𝑁) → ((𝐾 + ((𝑚 + 𝑁) − 𝐾)) − 𝑁) = 𝑚))
5840, 57sylbi 216 . . . . . . . . . . . . . . . . . . . . . . . . . 26 (𝐾 ∈ (0...𝑁) → (𝑚 ∈ (0...𝑁) → ((𝐾 + ((𝑚 + 𝑁) − 𝐾)) − 𝑁) = 𝑚))
5958adantr 482 . . . . . . . . . . . . . . . . . . . . . . . . 25 ((𝐾 ∈ (0...𝑁) ∧ (𝑌 ∈ Word 𝑉 ∧ (♯‘𝑌) = 𝑁)) → (𝑚 ∈ (0...𝑁) → ((𝐾 + ((𝑚 + 𝑁) − 𝐾)) − 𝑁) = 𝑚))
60 oveq2 7315 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 ((♯‘𝑌) = 𝑁 → ((𝐾 + ((𝑚 + 𝑁) − 𝐾)) − (♯‘𝑌)) = ((𝐾 + ((𝑚 + 𝑁) − 𝐾)) − 𝑁))
6160eqeq1d 2738 . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 ((♯‘𝑌) = 𝑁 → (((𝐾 + ((𝑚 + 𝑁) − 𝐾)) − (♯‘𝑌)) = 𝑚 ↔ ((𝐾 + ((𝑚 + 𝑁) − 𝐾)) − 𝑁) = 𝑚))
6261imbi2d 341 . . . . . . . . . . . . . . . . . . . . . . . . . . 27 ((♯‘𝑌) = 𝑁 → ((𝑚 ∈ (0...𝑁) → ((𝐾 + ((𝑚 + 𝑁) − 𝐾)) − (♯‘𝑌)) = 𝑚) ↔ (𝑚 ∈ (0...𝑁) → ((𝐾 + ((𝑚 + 𝑁) − 𝐾)) − 𝑁) = 𝑚)))
6362adantl 483 . . . . . . . . . . . . . . . . . . . . . . . . . 26 ((𝑌 ∈ Word 𝑉 ∧ (♯‘𝑌) = 𝑁) → ((𝑚 ∈ (0...𝑁) → ((𝐾 + ((𝑚 + 𝑁) − 𝐾)) − (♯‘𝑌)) = 𝑚) ↔ (𝑚 ∈ (0...𝑁) → ((𝐾 + ((𝑚 + 𝑁) − 𝐾)) − 𝑁) = 𝑚)))
6463adantl 483 . . . . . . . . . . . . . . . . . . . . . . . . 25 ((𝐾 ∈ (0...𝑁) ∧ (𝑌 ∈ Word 𝑉 ∧ (♯‘𝑌) = 𝑁)) → ((𝑚 ∈ (0...𝑁) → ((𝐾 + ((𝑚 + 𝑁) − 𝐾)) − (♯‘𝑌)) = 𝑚) ↔ (𝑚 ∈ (0...𝑁) → ((𝐾 + ((𝑚 + 𝑁) − 𝐾)) − 𝑁) = 𝑚)))
6559, 64mpbird 257 . . . . . . . . . . . . . . . . . . . . . . . 24 ((𝐾 ∈ (0...𝑁) ∧ (𝑌 ∈ Word 𝑉 ∧ (♯‘𝑌) = 𝑁)) → (𝑚 ∈ (0...𝑁) → ((𝐾 + ((𝑚 + 𝑁) − 𝐾)) − (♯‘𝑌)) = 𝑚))
6665adantr 482 . . . . . . . . . . . . . . . . . . . . . . 23 (((𝐾 ∈ (0...𝑁) ∧ (𝑌 ∈ Word 𝑉 ∧ (♯‘𝑌) = 𝑁)) ∧ (¬ 𝑚 = 0 ∧ ¬ 𝐾𝑚)) → (𝑚 ∈ (0...𝑁) → ((𝐾 + ((𝑚 + 𝑁) − 𝐾)) − (♯‘𝑌)) = 𝑚))
6766imp 408 . . . . . . . . . . . . . . . . . . . . . 22 ((((𝐾 ∈ (0...𝑁) ∧ (𝑌 ∈ Word 𝑉 ∧ (♯‘𝑌) = 𝑁)) ∧ (¬ 𝑚 = 0 ∧ ¬ 𝐾𝑚)) ∧ 𝑚 ∈ (0...𝑁)) → ((𝐾 + ((𝑚 + 𝑁) − 𝐾)) − (♯‘𝑌)) = 𝑚)
6867oveq2d 7323 . . . . . . . . . . . . . . . . . . . . 21 ((((𝐾 ∈ (0...𝑁) ∧ (𝑌 ∈ Word 𝑉 ∧ (♯‘𝑌) = 𝑁)) ∧ (¬ 𝑚 = 0 ∧ ¬ 𝐾𝑚)) ∧ 𝑚 ∈ (0...𝑁)) → (𝑌 cyclShift ((𝐾 + ((𝑚 + 𝑁) − 𝐾)) − (♯‘𝑌))) = (𝑌 cyclShift 𝑚))
6939, 68eqtr2d 2777 . . . . . . . . . . . . . . . . . . . 20 ((((𝐾 ∈ (0...𝑁) ∧ (𝑌 ∈ Word 𝑉 ∧ (♯‘𝑌) = 𝑁)) ∧ (¬ 𝑚 = 0 ∧ ¬ 𝐾𝑚)) ∧ 𝑚 ∈ (0...𝑁)) → (𝑌 cyclShift 𝑚) = ((𝑌 cyclShift 𝐾) cyclShift ((𝑚 + 𝑁) − 𝐾)))
7069adantr 482 . . . . . . . . . . . . . . . . . . 19 (((((𝐾 ∈ (0...𝑁) ∧ (𝑌 ∈ Word 𝑉 ∧ (♯‘𝑌) = 𝑁)) ∧ (¬ 𝑚 = 0 ∧ ¬ 𝐾𝑚)) ∧ 𝑚 ∈ (0...𝑁)) ∧ 𝑋 = (𝑌 cyclShift 𝐾)) → (𝑌 cyclShift 𝑚) = ((𝑌 cyclShift 𝐾) cyclShift ((𝑚 + 𝑁) − 𝐾)))
71 oveq1 7314 . . . . . . . . . . . . . . . . . . . 20 (𝑋 = (𝑌 cyclShift 𝐾) → (𝑋 cyclShift ((𝑚 + 𝑁) − 𝐾)) = ((𝑌 cyclShift 𝐾) cyclShift ((𝑚 + 𝑁) − 𝐾)))
7271adantl 483 . . . . . . . . . . . . . . . . . . 19 (((((𝐾 ∈ (0...𝑁) ∧ (𝑌 ∈ Word 𝑉 ∧ (♯‘𝑌) = 𝑁)) ∧ (¬ 𝑚 = 0 ∧ ¬ 𝐾𝑚)) ∧ 𝑚 ∈ (0...𝑁)) ∧ 𝑋 = (𝑌 cyclShift 𝐾)) → (𝑋 cyclShift ((𝑚 + 𝑁) − 𝐾)) = ((𝑌 cyclShift 𝐾) cyclShift ((𝑚 + 𝑁) − 𝐾)))
7370, 72eqtr4d 2779 . . . . . . . . . . . . . . . . . 18 (((((𝐾 ∈ (0...𝑁) ∧ (𝑌 ∈ Word 𝑉 ∧ (♯‘𝑌) = 𝑁)) ∧ (¬ 𝑚 = 0 ∧ ¬ 𝐾𝑚)) ∧ 𝑚 ∈ (0...𝑁)) ∧ 𝑋 = (𝑌 cyclShift 𝐾)) → (𝑌 cyclShift 𝑚) = (𝑋 cyclShift ((𝑚 + 𝑁) − 𝐾)))
7473exp41 436 . . . . . . . . . . . . . . . . 17 ((𝐾 ∈ (0...𝑁) ∧ (𝑌 ∈ Word 𝑉 ∧ (♯‘𝑌) = 𝑁)) → ((¬ 𝑚 = 0 ∧ ¬ 𝐾𝑚) → (𝑚 ∈ (0...𝑁) → (𝑋 = (𝑌 cyclShift 𝐾) → (𝑌 cyclShift 𝑚) = (𝑋 cyclShift ((𝑚 + 𝑁) − 𝐾))))))
7574com24 95 . . . . . . . . . . . . . . . 16 ((𝐾 ∈ (0...𝑁) ∧ (𝑌 ∈ Word 𝑉 ∧ (♯‘𝑌) = 𝑁)) → (𝑋 = (𝑌 cyclShift 𝐾) → (𝑚 ∈ (0...𝑁) → ((¬ 𝑚 = 0 ∧ ¬ 𝐾𝑚) → (𝑌 cyclShift 𝑚) = (𝑋 cyclShift ((𝑚 + 𝑁) − 𝐾))))))
7675imp41 427 . . . . . . . . . . . . . . 15 (((((𝐾 ∈ (0...𝑁) ∧ (𝑌 ∈ Word 𝑉 ∧ (♯‘𝑌) = 𝑁)) ∧ 𝑋 = (𝑌 cyclShift 𝐾)) ∧ 𝑚 ∈ (0...𝑁)) ∧ (¬ 𝑚 = 0 ∧ ¬ 𝐾𝑚)) → (𝑌 cyclShift 𝑚) = (𝑋 cyclShift ((𝑚 + 𝑁) − 𝐾)))
7776eqeq2d 2747 . . . . . . . . . . . . . 14 (((((𝐾 ∈ (0...𝑁) ∧ (𝑌 ∈ Word 𝑉 ∧ (♯‘𝑌) = 𝑁)) ∧ 𝑋 = (𝑌 cyclShift 𝐾)) ∧ 𝑚 ∈ (0...𝑁)) ∧ (¬ 𝑚 = 0 ∧ ¬ 𝐾𝑚)) → (𝑍 = (𝑌 cyclShift 𝑚) ↔ 𝑍 = (𝑋 cyclShift ((𝑚 + 𝑁) − 𝐾))))
7877biimpd 228 . . . . . . . . . . . . 13 (((((𝐾 ∈ (0...𝑁) ∧ (𝑌 ∈ Word 𝑉 ∧ (♯‘𝑌) = 𝑁)) ∧ 𝑋 = (𝑌 cyclShift 𝐾)) ∧ 𝑚 ∈ (0...𝑁)) ∧ (¬ 𝑚 = 0 ∧ ¬ 𝐾𝑚)) → (𝑍 = (𝑌 cyclShift 𝑚) → 𝑍 = (𝑋 cyclShift ((𝑚 + 𝑁) − 𝐾))))
7978impancom 453 . . . . . . . . . . . 12 (((((𝐾 ∈ (0...𝑁) ∧ (𝑌 ∈ Word 𝑉 ∧ (♯‘𝑌) = 𝑁)) ∧ 𝑋 = (𝑌 cyclShift 𝐾)) ∧ 𝑚 ∈ (0...𝑁)) ∧ 𝑍 = (𝑌 cyclShift 𝑚)) → ((¬ 𝑚 = 0 ∧ ¬ 𝐾𝑚) → 𝑍 = (𝑋 cyclShift ((𝑚 + 𝑁) − 𝐾))))
8079impcom 409 . . . . . . . . . . 11 (((¬ 𝑚 = 0 ∧ ¬ 𝐾𝑚) ∧ ((((𝐾 ∈ (0...𝑁) ∧ (𝑌 ∈ Word 𝑉 ∧ (♯‘𝑌) = 𝑁)) ∧ 𝑋 = (𝑌 cyclShift 𝐾)) ∧ 𝑚 ∈ (0...𝑁)) ∧ 𝑍 = (𝑌 cyclShift 𝑚))) → 𝑍 = (𝑋 cyclShift ((𝑚 + 𝑁) − 𝐾)))
81 oveq2 7315 . . . . . . . . . . . 12 (𝑛 = ((𝑚 + 𝑁) − 𝐾) → (𝑋 cyclShift 𝑛) = (𝑋 cyclShift ((𝑚 + 𝑁) − 𝐾)))
8281rspceeqv 3580 . . . . . . . . . . 11 ((((𝑚 + 𝑁) − 𝐾) ∈ (0...𝑁) ∧ 𝑍 = (𝑋 cyclShift ((𝑚 + 𝑁) − 𝐾))) → ∃𝑛 ∈ (0...𝑁)𝑍 = (𝑋 cyclShift 𝑛))
838, 80, 82syl2anc 585 . . . . . . . . . 10 (((¬ 𝑚 = 0 ∧ ¬ 𝐾𝑚) ∧ ((((𝐾 ∈ (0...𝑁) ∧ (𝑌 ∈ Word 𝑉 ∧ (♯‘𝑌) = 𝑁)) ∧ 𝑋 = (𝑌 cyclShift 𝐾)) ∧ 𝑚 ∈ (0...𝑁)) ∧ 𝑍 = (𝑌 cyclShift 𝑚))) → ∃𝑛 ∈ (0...𝑁)𝑍 = (𝑋 cyclShift 𝑛))
8483exp31 421 . . . . . . . . 9 𝑚 = 0 → (¬ 𝐾𝑚 → (((((𝐾 ∈ (0...𝑁) ∧ (𝑌 ∈ Word 𝑉 ∧ (♯‘𝑌) = 𝑁)) ∧ 𝑋 = (𝑌 cyclShift 𝐾)) ∧ 𝑚 ∈ (0...𝑁)) ∧ 𝑍 = (𝑌 cyclShift 𝑚)) → ∃𝑛 ∈ (0...𝑁)𝑍 = (𝑋 cyclShift 𝑛))))
85 oveq2 7315 . . . . . . . . . . . . . . 15 (𝑚 = 0 → (𝑌 cyclShift 𝑚) = (𝑌 cyclShift 0))
8685eqeq2d 2747 . . . . . . . . . . . . . 14 (𝑚 = 0 → (𝑍 = (𝑌 cyclShift 𝑚) ↔ 𝑍 = (𝑌 cyclShift 0)))
87 cshw0 14552 . . . . . . . . . . . . . . . . . . . . 21 (𝑌 ∈ Word 𝑉 → (𝑌 cyclShift 0) = 𝑌)
8887adantr 482 . . . . . . . . . . . . . . . . . . . 20 ((𝑌 ∈ Word 𝑉 ∧ (♯‘𝑌) = 𝑁) → (𝑌 cyclShift 0) = 𝑌)
8988eqeq2d 2747 . . . . . . . . . . . . . . . . . . 19 ((𝑌 ∈ Word 𝑉 ∧ (♯‘𝑌) = 𝑁) → (𝑍 = (𝑌 cyclShift 0) ↔ 𝑍 = 𝑌))
90 fznn0sub2 13409 . . . . . . . . . . . . . . . . . . . . . . . . . . 27 (𝐾 ∈ (0...𝑁) → (𝑁𝐾) ∈ (0...𝑁))
9190adantl 483 . . . . . . . . . . . . . . . . . . . . . . . . . 26 (((𝑌 ∈ Word 𝑉 ∧ (♯‘𝑌) = 𝑁) ∧ 𝐾 ∈ (0...𝑁)) → (𝑁𝐾) ∈ (0...𝑁))
92 oveq1 7314 . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 ((♯‘𝑌) = 𝑁 → ((♯‘𝑌) − 𝐾) = (𝑁𝐾))
9392eleq1d 2821 . . . . . . . . . . . . . . . . . . . . . . . . . . 27 ((♯‘𝑌) = 𝑁 → (((♯‘𝑌) − 𝐾) ∈ (0...𝑁) ↔ (𝑁𝐾) ∈ (0...𝑁)))
9493ad2antlr 725 . . . . . . . . . . . . . . . . . . . . . . . . . 26 (((𝑌 ∈ Word 𝑉 ∧ (♯‘𝑌) = 𝑁) ∧ 𝐾 ∈ (0...𝑁)) → (((♯‘𝑌) − 𝐾) ∈ (0...𝑁) ↔ (𝑁𝐾) ∈ (0...𝑁)))
9591, 94mpbird 257 . . . . . . . . . . . . . . . . . . . . . . . . 25 (((𝑌 ∈ Word 𝑉 ∧ (♯‘𝑌) = 𝑁) ∧ 𝐾 ∈ (0...𝑁)) → ((♯‘𝑌) − 𝐾) ∈ (0...𝑁))
9695adantr 482 . . . . . . . . . . . . . . . . . . . . . . . 24 ((((𝑌 ∈ Word 𝑉 ∧ (♯‘𝑌) = 𝑁) ∧ 𝐾 ∈ (0...𝑁)) ∧ 𝑋 = (𝑌 cyclShift 𝐾)) → ((♯‘𝑌) − 𝐾) ∈ (0...𝑁))
97 oveq1 7314 . . . . . . . . . . . . . . . . . . . . . . . . . 26 (𝑋 = (𝑌 cyclShift 𝐾) → (𝑋 cyclShift ((♯‘𝑌) − 𝐾)) = ((𝑌 cyclShift 𝐾) cyclShift ((♯‘𝑌) − 𝐾)))
98 simpl 484 . . . . . . . . . . . . . . . . . . . . . . . . . . 27 ((𝑌 ∈ Word 𝑉 ∧ (♯‘𝑌) = 𝑁) → 𝑌 ∈ Word 𝑉)
99 2cshwid 14572 . . . . . . . . . . . . . . . . . . . . . . . . . . 27 ((𝑌 ∈ Word 𝑉𝐾 ∈ ℤ) → ((𝑌 cyclShift 𝐾) cyclShift ((♯‘𝑌) − 𝐾)) = 𝑌)
10098, 11, 99syl2an 597 . . . . . . . . . . . . . . . . . . . . . . . . . 26 (((𝑌 ∈ Word 𝑉 ∧ (♯‘𝑌) = 𝑁) ∧ 𝐾 ∈ (0...𝑁)) → ((𝑌 cyclShift 𝐾) cyclShift ((♯‘𝑌) − 𝐾)) = 𝑌)
10197, 100sylan9eqr 2798 . . . . . . . . . . . . . . . . . . . . . . . . 25 ((((𝑌 ∈ Word 𝑉 ∧ (♯‘𝑌) = 𝑁) ∧ 𝐾 ∈ (0...𝑁)) ∧ 𝑋 = (𝑌 cyclShift 𝐾)) → (𝑋 cyclShift ((♯‘𝑌) − 𝐾)) = 𝑌)
102101eqcomd 2742 . . . . . . . . . . . . . . . . . . . . . . . 24 ((((𝑌 ∈ Word 𝑉 ∧ (♯‘𝑌) = 𝑁) ∧ 𝐾 ∈ (0...𝑁)) ∧ 𝑋 = (𝑌 cyclShift 𝐾)) → 𝑌 = (𝑋 cyclShift ((♯‘𝑌) − 𝐾)))
103 oveq2 7315 . . . . . . . . . . . . . . . . . . . . . . . . 25 (𝑛 = ((♯‘𝑌) − 𝐾) → (𝑋 cyclShift 𝑛) = (𝑋 cyclShift ((♯‘𝑌) − 𝐾)))
104103rspceeqv 3580 . . . . . . . . . . . . . . . . . . . . . . . 24 ((((♯‘𝑌) − 𝐾) ∈ (0...𝑁) ∧ 𝑌 = (𝑋 cyclShift ((♯‘𝑌) − 𝐾))) → ∃𝑛 ∈ (0...𝑁)𝑌 = (𝑋 cyclShift 𝑛))
10596, 102, 104syl2anc 585 . . . . . . . . . . . . . . . . . . . . . . 23 ((((𝑌 ∈ Word 𝑉 ∧ (♯‘𝑌) = 𝑁) ∧ 𝐾 ∈ (0...𝑁)) ∧ 𝑋 = (𝑌 cyclShift 𝐾)) → ∃𝑛 ∈ (0...𝑁)𝑌 = (𝑋 cyclShift 𝑛))
106105adantr 482 . . . . . . . . . . . . . . . . . . . . . 22 (((((𝑌 ∈ Word 𝑉 ∧ (♯‘𝑌) = 𝑁) ∧ 𝐾 ∈ (0...𝑁)) ∧ 𝑋 = (𝑌 cyclShift 𝐾)) ∧ 𝑍 = 𝑌) → ∃𝑛 ∈ (0...𝑁)𝑌 = (𝑋 cyclShift 𝑛))
107 eqeq1 2740 . . . . . . . . . . . . . . . . . . . . . . . 24 (𝑍 = 𝑌 → (𝑍 = (𝑋 cyclShift 𝑛) ↔ 𝑌 = (𝑋 cyclShift 𝑛)))
108107rexbidv 3172 . . . . . . . . . . . . . . . . . . . . . . 23 (𝑍 = 𝑌 → (∃𝑛 ∈ (0...𝑁)𝑍 = (𝑋 cyclShift 𝑛) ↔ ∃𝑛 ∈ (0...𝑁)𝑌 = (𝑋 cyclShift 𝑛)))
109108adantl 483 . . . . . . . . . . . . . . . . . . . . . 22 (((((𝑌 ∈ Word 𝑉 ∧ (♯‘𝑌) = 𝑁) ∧ 𝐾 ∈ (0...𝑁)) ∧ 𝑋 = (𝑌 cyclShift 𝐾)) ∧ 𝑍 = 𝑌) → (∃𝑛 ∈ (0...𝑁)𝑍 = (𝑋 cyclShift 𝑛) ↔ ∃𝑛 ∈ (0...𝑁)𝑌 = (𝑋 cyclShift 𝑛)))
110106, 109mpbird 257 . . . . . . . . . . . . . . . . . . . . 21 (((((𝑌 ∈ Word 𝑉 ∧ (♯‘𝑌) = 𝑁) ∧ 𝐾 ∈ (0...𝑁)) ∧ 𝑋 = (𝑌 cyclShift 𝐾)) ∧ 𝑍 = 𝑌) → ∃𝑛 ∈ (0...𝑁)𝑍 = (𝑋 cyclShift 𝑛))
111110exp41 436 . . . . . . . . . . . . . . . . . . . 20 ((𝑌 ∈ Word 𝑉 ∧ (♯‘𝑌) = 𝑁) → (𝐾 ∈ (0...𝑁) → (𝑋 = (𝑌 cyclShift 𝐾) → (𝑍 = 𝑌 → ∃𝑛 ∈ (0...𝑁)𝑍 = (𝑋 cyclShift 𝑛)))))
112111com24 95 . . . . . . . . . . . . . . . . . . 19 ((𝑌 ∈ Word 𝑉 ∧ (♯‘𝑌) = 𝑁) → (𝑍 = 𝑌 → (𝑋 = (𝑌 cyclShift 𝐾) → (𝐾 ∈ (0...𝑁) → ∃𝑛 ∈ (0...𝑁)𝑍 = (𝑋 cyclShift 𝑛)))))
11389, 112sylbid 239 . . . . . . . . . . . . . . . . . 18 ((𝑌 ∈ Word 𝑉 ∧ (♯‘𝑌) = 𝑁) → (𝑍 = (𝑌 cyclShift 0) → (𝑋 = (𝑌 cyclShift 𝐾) → (𝐾 ∈ (0...𝑁) → ∃𝑛 ∈ (0...𝑁)𝑍 = (𝑋 cyclShift 𝑛)))))
114113com24 95 . . . . . . . . . . . . . . . . 17 ((𝑌 ∈ Word 𝑉 ∧ (♯‘𝑌) = 𝑁) → (𝐾 ∈ (0...𝑁) → (𝑋 = (𝑌 cyclShift 𝐾) → (𝑍 = (𝑌 cyclShift 0) → ∃𝑛 ∈ (0...𝑁)𝑍 = (𝑋 cyclShift 𝑛)))))
115114impcom 409 . . . . . . . . . . . . . . . 16 ((𝐾 ∈ (0...𝑁) ∧ (𝑌 ∈ Word 𝑉 ∧ (♯‘𝑌) = 𝑁)) → (𝑋 = (𝑌 cyclShift 𝐾) → (𝑍 = (𝑌 cyclShift 0) → ∃𝑛 ∈ (0...𝑁)𝑍 = (𝑋 cyclShift 𝑛))))
116115com13 88 . . . . . . . . . . . . . . 15 (𝑍 = (𝑌 cyclShift 0) → (𝑋 = (𝑌 cyclShift 𝐾) → ((𝐾 ∈ (0...𝑁) ∧ (𝑌 ∈ Word 𝑉 ∧ (♯‘𝑌) = 𝑁)) → ∃𝑛 ∈ (0...𝑁)𝑍 = (𝑋 cyclShift 𝑛))))
117116a1d 25 . . . . . . . . . . . . . 14 (𝑍 = (𝑌 cyclShift 0) → (𝑚 ∈ (0...𝑁) → (𝑋 = (𝑌 cyclShift 𝐾) → ((𝐾 ∈ (0...𝑁) ∧ (𝑌 ∈ Word 𝑉 ∧ (♯‘𝑌) = 𝑁)) → ∃𝑛 ∈ (0...𝑁)𝑍 = (𝑋 cyclShift 𝑛)))))
11886, 117syl6bi 253 . . . . . . . . . . . . 13 (𝑚 = 0 → (𝑍 = (𝑌 cyclShift 𝑚) → (𝑚 ∈ (0...𝑁) → (𝑋 = (𝑌 cyclShift 𝐾) → ((𝐾 ∈ (0...𝑁) ∧ (𝑌 ∈ Word 𝑉 ∧ (♯‘𝑌) = 𝑁)) → ∃𝑛 ∈ (0...𝑁)𝑍 = (𝑋 cyclShift 𝑛))))))
119118com24 95 . . . . . . . . . . . 12 (𝑚 = 0 → (𝑋 = (𝑌 cyclShift 𝐾) → (𝑚 ∈ (0...𝑁) → (𝑍 = (𝑌 cyclShift 𝑚) → ((𝐾 ∈ (0...𝑁) ∧ (𝑌 ∈ Word 𝑉 ∧ (♯‘𝑌) = 𝑁)) → ∃𝑛 ∈ (0...𝑁)𝑍 = (𝑋 cyclShift 𝑛))))))
120119com15 101 . . . . . . . . . . 11 ((𝐾 ∈ (0...𝑁) ∧ (𝑌 ∈ Word 𝑉 ∧ (♯‘𝑌) = 𝑁)) → (𝑋 = (𝑌 cyclShift 𝐾) → (𝑚 ∈ (0...𝑁) → (𝑍 = (𝑌 cyclShift 𝑚) → (𝑚 = 0 → ∃𝑛 ∈ (0...𝑁)𝑍 = (𝑋 cyclShift 𝑛))))))
121120imp41 427 . . . . . . . . . 10 (((((𝐾 ∈ (0...𝑁) ∧ (𝑌 ∈ Word 𝑉 ∧ (♯‘𝑌) = 𝑁)) ∧ 𝑋 = (𝑌 cyclShift 𝐾)) ∧ 𝑚 ∈ (0...𝑁)) ∧ 𝑍 = (𝑌 cyclShift 𝑚)) → (𝑚 = 0 → ∃𝑛 ∈ (0...𝑁)𝑍 = (𝑋 cyclShift 𝑛)))
122121com12 32 . . . . . . . . 9 (𝑚 = 0 → (((((𝐾 ∈ (0...𝑁) ∧ (𝑌 ∈ Word 𝑉 ∧ (♯‘𝑌) = 𝑁)) ∧ 𝑋 = (𝑌 cyclShift 𝐾)) ∧ 𝑚 ∈ (0...𝑁)) ∧ 𝑍 = (𝑌 cyclShift 𝑚)) → ∃𝑛 ∈ (0...𝑁)𝑍 = (𝑋 cyclShift 𝑛)))
123 difelfzle 13415 . . . . . . . . . . . . . . . 16 ((𝐾 ∈ (0...𝑁) ∧ 𝑚 ∈ (0...𝑁) ∧ 𝐾𝑚) → (𝑚𝐾) ∈ (0...𝑁))
1241233exp 1119 . . . . . . . . . . . . . . 15 (𝐾 ∈ (0...𝑁) → (𝑚 ∈ (0...𝑁) → (𝐾𝑚 → (𝑚𝐾) ∈ (0...𝑁))))
125124ad2antrr 724 . . . . . . . . . . . . . 14 (((𝐾 ∈ (0...𝑁) ∧ (𝑌 ∈ Word 𝑉 ∧ (♯‘𝑌) = 𝑁)) ∧ 𝑋 = (𝑌 cyclShift 𝐾)) → (𝑚 ∈ (0...𝑁) → (𝐾𝑚 → (𝑚𝐾) ∈ (0...𝑁))))
126125imp 408 . . . . . . . . . . . . 13 ((((𝐾 ∈ (0...𝑁) ∧ (𝑌 ∈ Word 𝑉 ∧ (♯‘𝑌) = 𝑁)) ∧ 𝑋 = (𝑌 cyclShift 𝐾)) ∧ 𝑚 ∈ (0...𝑁)) → (𝐾𝑚 → (𝑚𝐾) ∈ (0...𝑁)))
127126adantr 482 . . . . . . . . . . . 12 (((((𝐾 ∈ (0...𝑁) ∧ (𝑌 ∈ Word 𝑉 ∧ (♯‘𝑌) = 𝑁)) ∧ 𝑋 = (𝑌 cyclShift 𝐾)) ∧ 𝑚 ∈ (0...𝑁)) ∧ 𝑍 = (𝑌 cyclShift 𝑚)) → (𝐾𝑚 → (𝑚𝐾) ∈ (0...𝑁)))
128127impcom 409 . . . . . . . . . . 11 ((𝐾𝑚 ∧ ((((𝐾 ∈ (0...𝑁) ∧ (𝑌 ∈ Word 𝑉 ∧ (♯‘𝑌) = 𝑁)) ∧ 𝑋 = (𝑌 cyclShift 𝐾)) ∧ 𝑚 ∈ (0...𝑁)) ∧ 𝑍 = (𝑌 cyclShift 𝑚))) → (𝑚𝐾) ∈ (0...𝑁))
1299ad2antrr 724 . . . . . . . . . . . . . . . . . . . . . . 23 ((((𝐾 ∈ (0...𝑁) ∧ (𝑌 ∈ Word 𝑉 ∧ (♯‘𝑌) = 𝑁)) ∧ 𝐾𝑚) ∧ 𝑚 ∈ (0...𝑁)) → 𝑌 ∈ Word 𝑉)
13012ad2antrr 724 . . . . . . . . . . . . . . . . . . . . . . 23 ((((𝐾 ∈ (0...𝑁) ∧ (𝑌 ∈ Word 𝑉 ∧ (♯‘𝑌) = 𝑁)) ∧ 𝐾𝑚) ∧ 𝑚 ∈ (0...𝑁)) → 𝐾 ∈ ℤ)
131 zsubcl 12408 . . . . . . . . . . . . . . . . . . . . . . . . . . 27 ((𝑚 ∈ ℤ ∧ 𝐾 ∈ ℤ) → (𝑚𝐾) ∈ ℤ)
132131ex 414 . . . . . . . . . . . . . . . . . . . . . . . . . 26 (𝑚 ∈ ℤ → (𝐾 ∈ ℤ → (𝑚𝐾) ∈ ℤ))
13320, 11, 132syl2imc 41 . . . . . . . . . . . . . . . . . . . . . . . . 25 (𝐾 ∈ (0...𝑁) → (𝑚 ∈ (0...𝑁) → (𝑚𝐾) ∈ ℤ))
134133ad2antrr 724 . . . . . . . . . . . . . . . . . . . . . . . 24 (((𝐾 ∈ (0...𝑁) ∧ (𝑌 ∈ Word 𝑉 ∧ (♯‘𝑌) = 𝑁)) ∧ 𝐾𝑚) → (𝑚 ∈ (0...𝑁) → (𝑚𝐾) ∈ ℤ))
135134imp 408 . . . . . . . . . . . . . . . . . . . . . . 23 ((((𝐾 ∈ (0...𝑁) ∧ (𝑌 ∈ Word 𝑉 ∧ (♯‘𝑌) = 𝑁)) ∧ 𝐾𝑚) ∧ 𝑚 ∈ (0...𝑁)) → (𝑚𝐾) ∈ ℤ)
136 2cshw 14571 . . . . . . . . . . . . . . . . . . . . . . 23 ((𝑌 ∈ Word 𝑉𝐾 ∈ ℤ ∧ (𝑚𝐾) ∈ ℤ) → ((𝑌 cyclShift 𝐾) cyclShift (𝑚𝐾)) = (𝑌 cyclShift (𝐾 + (𝑚𝐾))))
137129, 130, 135, 136syl3anc 1371 . . . . . . . . . . . . . . . . . . . . . 22 ((((𝐾 ∈ (0...𝑁) ∧ (𝑌 ∈ Word 𝑉 ∧ (♯‘𝑌) = 𝑁)) ∧ 𝐾𝑚) ∧ 𝑚 ∈ (0...𝑁)) → ((𝑌 cyclShift 𝐾) cyclShift (𝑚𝐾)) = (𝑌 cyclShift (𝐾 + (𝑚𝐾))))
138 zcn 12370 . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 (𝐾 ∈ ℤ → 𝐾 ∈ ℂ)
13920zcnd 12473 . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 (𝑚 ∈ (0...𝑁) → 𝑚 ∈ ℂ)
140 pncan3 11275 . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 ((𝐾 ∈ ℂ ∧ 𝑚 ∈ ℂ) → (𝐾 + (𝑚𝐾)) = 𝑚)
141138, 139, 140syl2anr 598 . . . . . . . . . . . . . . . . . . . . . . . . . . 27 ((𝑚 ∈ (0...𝑁) ∧ 𝐾 ∈ ℤ) → (𝐾 + (𝑚𝐾)) = 𝑚)
142141ex 414 . . . . . . . . . . . . . . . . . . . . . . . . . 26 (𝑚 ∈ (0...𝑁) → (𝐾 ∈ ℤ → (𝐾 + (𝑚𝐾)) = 𝑚))
14311, 142syl5com 31 . . . . . . . . . . . . . . . . . . . . . . . . 25 (𝐾 ∈ (0...𝑁) → (𝑚 ∈ (0...𝑁) → (𝐾 + (𝑚𝐾)) = 𝑚))
144143ad2antrr 724 . . . . . . . . . . . . . . . . . . . . . . . 24 (((𝐾 ∈ (0...𝑁) ∧ (𝑌 ∈ Word 𝑉 ∧ (♯‘𝑌) = 𝑁)) ∧ 𝐾𝑚) → (𝑚 ∈ (0...𝑁) → (𝐾 + (𝑚𝐾)) = 𝑚))
145144imp 408 . . . . . . . . . . . . . . . . . . . . . . 23 ((((𝐾 ∈ (0...𝑁) ∧ (𝑌 ∈ Word 𝑉 ∧ (♯‘𝑌) = 𝑁)) ∧ 𝐾𝑚) ∧ 𝑚 ∈ (0...𝑁)) → (𝐾 + (𝑚𝐾)) = 𝑚)
146145oveq2d 7323 . . . . . . . . . . . . . . . . . . . . . 22 ((((𝐾 ∈ (0...𝑁) ∧ (𝑌 ∈ Word 𝑉 ∧ (♯‘𝑌) = 𝑁)) ∧ 𝐾𝑚) ∧ 𝑚 ∈ (0...𝑁)) → (𝑌 cyclShift (𝐾 + (𝑚𝐾))) = (𝑌 cyclShift 𝑚))
147137, 146eqtr2d 2777 . . . . . . . . . . . . . . . . . . . . 21 ((((𝐾 ∈ (0...𝑁) ∧ (𝑌 ∈ Word 𝑉 ∧ (♯‘𝑌) = 𝑁)) ∧ 𝐾𝑚) ∧ 𝑚 ∈ (0...𝑁)) → (𝑌 cyclShift 𝑚) = ((𝑌 cyclShift 𝐾) cyclShift (𝑚𝐾)))
148147adantr 482 . . . . . . . . . . . . . . . . . . . 20 (((((𝐾 ∈ (0...𝑁) ∧ (𝑌 ∈ Word 𝑉 ∧ (♯‘𝑌) = 𝑁)) ∧ 𝐾𝑚) ∧ 𝑚 ∈ (0...𝑁)) ∧ 𝑋 = (𝑌 cyclShift 𝐾)) → (𝑌 cyclShift 𝑚) = ((𝑌 cyclShift 𝐾) cyclShift (𝑚𝐾)))
149 oveq1 7314 . . . . . . . . . . . . . . . . . . . . . 22 (𝑋 = (𝑌 cyclShift 𝐾) → (𝑋 cyclShift (𝑚𝐾)) = ((𝑌 cyclShift 𝐾) cyclShift (𝑚𝐾)))
150149eqeq2d 2747 . . . . . . . . . . . . . . . . . . . . 21 (𝑋 = (𝑌 cyclShift 𝐾) → ((𝑌 cyclShift 𝑚) = (𝑋 cyclShift (𝑚𝐾)) ↔ (𝑌 cyclShift 𝑚) = ((𝑌 cyclShift 𝐾) cyclShift (𝑚𝐾))))
151150adantl 483 . . . . . . . . . . . . . . . . . . . 20 (((((𝐾 ∈ (0...𝑁) ∧ (𝑌 ∈ Word 𝑉 ∧ (♯‘𝑌) = 𝑁)) ∧ 𝐾𝑚) ∧ 𝑚 ∈ (0...𝑁)) ∧ 𝑋 = (𝑌 cyclShift 𝐾)) → ((𝑌 cyclShift 𝑚) = (𝑋 cyclShift (𝑚𝐾)) ↔ (𝑌 cyclShift 𝑚) = ((𝑌 cyclShift 𝐾) cyclShift (𝑚𝐾))))
152148, 151mpbird 257 . . . . . . . . . . . . . . . . . . 19 (((((𝐾 ∈ (0...𝑁) ∧ (𝑌 ∈ Word 𝑉 ∧ (♯‘𝑌) = 𝑁)) ∧ 𝐾𝑚) ∧ 𝑚 ∈ (0...𝑁)) ∧ 𝑋 = (𝑌 cyclShift 𝐾)) → (𝑌 cyclShift 𝑚) = (𝑋 cyclShift (𝑚𝐾)))
153152eqeq2d 2747 . . . . . . . . . . . . . . . . . 18 (((((𝐾 ∈ (0...𝑁) ∧ (𝑌 ∈ Word 𝑉 ∧ (♯‘𝑌) = 𝑁)) ∧ 𝐾𝑚) ∧ 𝑚 ∈ (0...𝑁)) ∧ 𝑋 = (𝑌 cyclShift 𝐾)) → (𝑍 = (𝑌 cyclShift 𝑚) ↔ 𝑍 = (𝑋 cyclShift (𝑚𝐾))))
154153biimpd 228 . . . . . . . . . . . . . . . . 17 (((((𝐾 ∈ (0...𝑁) ∧ (𝑌 ∈ Word 𝑉 ∧ (♯‘𝑌) = 𝑁)) ∧ 𝐾𝑚) ∧ 𝑚 ∈ (0...𝑁)) ∧ 𝑋 = (𝑌 cyclShift 𝐾)) → (𝑍 = (𝑌 cyclShift 𝑚) → 𝑍 = (𝑋 cyclShift (𝑚𝐾))))
155154exp41 436 . . . . . . . . . . . . . . . 16 ((𝐾 ∈ (0...𝑁) ∧ (𝑌 ∈ Word 𝑉 ∧ (♯‘𝑌) = 𝑁)) → (𝐾𝑚 → (𝑚 ∈ (0...𝑁) → (𝑋 = (𝑌 cyclShift 𝐾) → (𝑍 = (𝑌 cyclShift 𝑚) → 𝑍 = (𝑋 cyclShift (𝑚𝐾)))))))
156155com24 95 . . . . . . . . . . . . . . 15 ((𝐾 ∈ (0...𝑁) ∧ (𝑌 ∈ Word 𝑉 ∧ (♯‘𝑌) = 𝑁)) → (𝑋 = (𝑌 cyclShift 𝐾) → (𝑚 ∈ (0...𝑁) → (𝐾𝑚 → (𝑍 = (𝑌 cyclShift 𝑚) → 𝑍 = (𝑋 cyclShift (𝑚𝐾)))))))
157156imp31 419 . . . . . . . . . . . . . 14 ((((𝐾 ∈ (0...𝑁) ∧ (𝑌 ∈ Word 𝑉 ∧ (♯‘𝑌) = 𝑁)) ∧ 𝑋 = (𝑌 cyclShift 𝐾)) ∧ 𝑚 ∈ (0...𝑁)) → (𝐾𝑚 → (𝑍 = (𝑌 cyclShift 𝑚) → 𝑍 = (𝑋 cyclShift (𝑚𝐾)))))
158157com23 86 . . . . . . . . . . . . 13 ((((𝐾 ∈ (0...𝑁) ∧ (𝑌 ∈ Word 𝑉 ∧ (♯‘𝑌) = 𝑁)) ∧ 𝑋 = (𝑌 cyclShift 𝐾)) ∧ 𝑚 ∈ (0...𝑁)) → (𝑍 = (𝑌 cyclShift 𝑚) → (𝐾𝑚𝑍 = (𝑋 cyclShift (𝑚𝐾)))))
159158imp 408 . . . . . . . . . . . 12 (((((𝐾 ∈ (0...𝑁) ∧ (𝑌 ∈ Word 𝑉 ∧ (♯‘𝑌) = 𝑁)) ∧ 𝑋 = (𝑌 cyclShift 𝐾)) ∧ 𝑚 ∈ (0...𝑁)) ∧ 𝑍 = (𝑌 cyclShift 𝑚)) → (𝐾𝑚𝑍 = (𝑋 cyclShift (𝑚𝐾))))
160159impcom 409 . . . . . . . . . . 11 ((𝐾𝑚 ∧ ((((𝐾 ∈ (0...𝑁) ∧ (𝑌 ∈ Word 𝑉 ∧ (♯‘𝑌) = 𝑁)) ∧ 𝑋 = (𝑌 cyclShift 𝐾)) ∧ 𝑚 ∈ (0...𝑁)) ∧ 𝑍 = (𝑌 cyclShift 𝑚))) → 𝑍 = (𝑋 cyclShift (𝑚𝐾)))
161 oveq2 7315 . . . . . . . . . . . 12 (𝑛 = (𝑚𝐾) → (𝑋 cyclShift 𝑛) = (𝑋 cyclShift (𝑚𝐾)))
162161rspceeqv 3580 . . . . . . . . . . 11 (((𝑚𝐾) ∈ (0...𝑁) ∧ 𝑍 = (𝑋 cyclShift (𝑚𝐾))) → ∃𝑛 ∈ (0...𝑁)𝑍 = (𝑋 cyclShift 𝑛))
163128, 160, 162syl2anc 585 . . . . . . . . . 10 ((𝐾𝑚 ∧ ((((𝐾 ∈ (0...𝑁) ∧ (𝑌 ∈ Word 𝑉 ∧ (♯‘𝑌) = 𝑁)) ∧ 𝑋 = (𝑌 cyclShift 𝐾)) ∧ 𝑚 ∈ (0...𝑁)) ∧ 𝑍 = (𝑌 cyclShift 𝑚))) → ∃𝑛 ∈ (0...𝑁)𝑍 = (𝑋 cyclShift 𝑛))
164163ex 414 . . . . . . . . 9 (𝐾𝑚 → (((((𝐾 ∈ (0...𝑁) ∧ (𝑌 ∈ Word 𝑉 ∧ (♯‘𝑌) = 𝑁)) ∧ 𝑋 = (𝑌 cyclShift 𝐾)) ∧ 𝑚 ∈ (0...𝑁)) ∧ 𝑍 = (𝑌 cyclShift 𝑚)) → ∃𝑛 ∈ (0...𝑁)𝑍 = (𝑋 cyclShift 𝑛)))
16584, 122, 164pm2.61ii 183 . . . . . . . 8 (((((𝐾 ∈ (0...𝑁) ∧ (𝑌 ∈ Word 𝑉 ∧ (♯‘𝑌) = 𝑁)) ∧ 𝑋 = (𝑌 cyclShift 𝐾)) ∧ 𝑚 ∈ (0...𝑁)) ∧ 𝑍 = (𝑌 cyclShift 𝑚)) → ∃𝑛 ∈ (0...𝑁)𝑍 = (𝑋 cyclShift 𝑛))
166165rexlimdva2 3151 . . . . . . 7 (((𝐾 ∈ (0...𝑁) ∧ (𝑌 ∈ Word 𝑉 ∧ (♯‘𝑌) = 𝑁)) ∧ 𝑋 = (𝑌 cyclShift 𝐾)) → (∃𝑚 ∈ (0...𝑁)𝑍 = (𝑌 cyclShift 𝑚) → ∃𝑛 ∈ (0...𝑁)𝑍 = (𝑋 cyclShift 𝑛)))
167166ex 414 . . . . . 6 ((𝐾 ∈ (0...𝑁) ∧ (𝑌 ∈ Word 𝑉 ∧ (♯‘𝑌) = 𝑁)) → (𝑋 = (𝑌 cyclShift 𝐾) → (∃𝑚 ∈ (0...𝑁)𝑍 = (𝑌 cyclShift 𝑚) → ∃𝑛 ∈ (0...𝑁)𝑍 = (𝑋 cyclShift 𝑛))))
168167com23 86 . . . . 5 ((𝐾 ∈ (0...𝑁) ∧ (𝑌 ∈ Word 𝑉 ∧ (♯‘𝑌) = 𝑁)) → (∃𝑚 ∈ (0...𝑁)𝑍 = (𝑌 cyclShift 𝑚) → (𝑋 = (𝑌 cyclShift 𝐾) → ∃𝑛 ∈ (0...𝑁)𝑍 = (𝑋 cyclShift 𝑛))))
169168ex 414 . . . 4 (𝐾 ∈ (0...𝑁) → ((𝑌 ∈ Word 𝑉 ∧ (♯‘𝑌) = 𝑁) → (∃𝑚 ∈ (0...𝑁)𝑍 = (𝑌 cyclShift 𝑚) → (𝑋 = (𝑌 cyclShift 𝐾) → ∃𝑛 ∈ (0...𝑁)𝑍 = (𝑋 cyclShift 𝑛)))))
170169com24 95 . . 3 (𝐾 ∈ (0...𝑁) → (𝑋 = (𝑌 cyclShift 𝐾) → (∃𝑚 ∈ (0...𝑁)𝑍 = (𝑌 cyclShift 𝑚) → ((𝑌 ∈ Word 𝑉 ∧ (♯‘𝑌) = 𝑁) → ∃𝑛 ∈ (0...𝑁)𝑍 = (𝑋 cyclShift 𝑛)))))
1711703imp 1111 . 2 ((𝐾 ∈ (0...𝑁) ∧ 𝑋 = (𝑌 cyclShift 𝐾) ∧ ∃𝑚 ∈ (0...𝑁)𝑍 = (𝑌 cyclShift 𝑚)) → ((𝑌 ∈ Word 𝑉 ∧ (♯‘𝑌) = 𝑁) → ∃𝑛 ∈ (0...𝑁)𝑍 = (𝑋 cyclShift 𝑛)))
172171com12 32 1 ((𝑌 ∈ Word 𝑉 ∧ (♯‘𝑌) = 𝑁) → ((𝐾 ∈ (0...𝑁) ∧ 𝑋 = (𝑌 cyclShift 𝐾) ∧ ∃𝑚 ∈ (0...𝑁)𝑍 = (𝑌 cyclShift 𝑚)) → ∃𝑛 ∈ (0...𝑁)𝑍 = (𝑋 cyclShift 𝑛)))
Colors of variables: wff setvar class
Syntax hints:  ¬ wn 3  wi 4  wb 205  wa 397  w3a 1087   = wceq 1539  wcel 2104  wrex 3071   class class class wbr 5081  cfv 6458  (class class class)co 7307  cc 10915  0cc0 10917   + caddc 10920  cle 11056  cmin 11251  0cn0 12279  cz 12365  ...cfz 13285  chash 14090  Word cword 14262   cyclShift ccsh 14546
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1795  ax-4 1809  ax-5 1911  ax-6 1969  ax-7 2009  ax-8 2106  ax-9 2114  ax-10 2135  ax-11 2152  ax-12 2169  ax-ext 2707  ax-rep 5218  ax-sep 5232  ax-nul 5239  ax-pow 5297  ax-pr 5361  ax-un 7620  ax-cnex 10973  ax-resscn 10974  ax-1cn 10975  ax-icn 10976  ax-addcl 10977  ax-addrcl 10978  ax-mulcl 10979  ax-mulrcl 10980  ax-mulcom 10981  ax-addass 10982  ax-mulass 10983  ax-distr 10984  ax-i2m1 10985  ax-1ne0 10986  ax-1rid 10987  ax-rnegex 10988  ax-rrecex 10989  ax-cnre 10990  ax-pre-lttri 10991  ax-pre-lttrn 10992  ax-pre-ltadd 10993  ax-pre-mulgt0 10994  ax-pre-sup 10995
This theorem depends on definitions:  df-bi 206  df-an 398  df-or 846  df-3or 1088  df-3an 1089  df-tru 1542  df-fal 1552  df-ex 1780  df-nf 1784  df-sb 2066  df-mo 2538  df-eu 2567  df-clab 2714  df-cleq 2728  df-clel 2814  df-nfc 2887  df-ne 2942  df-nel 3048  df-ral 3063  df-rex 3072  df-rmo 3285  df-reu 3286  df-rab 3287  df-v 3439  df-sbc 3722  df-csb 3838  df-dif 3895  df-un 3897  df-in 3899  df-ss 3909  df-pss 3911  df-nul 4263  df-if 4466  df-pw 4541  df-sn 4566  df-pr 4568  df-op 4572  df-uni 4845  df-int 4887  df-iun 4933  df-br 5082  df-opab 5144  df-mpt 5165  df-tr 5199  df-id 5500  df-eprel 5506  df-po 5514  df-so 5515  df-fr 5555  df-we 5557  df-xp 5606  df-rel 5607  df-cnv 5608  df-co 5609  df-dm 5610  df-rn 5611  df-res 5612  df-ima 5613  df-pred 6217  df-ord 6284  df-on 6285  df-lim 6286  df-suc 6287  df-iota 6410  df-fun 6460  df-fn 6461  df-f 6462  df-f1 6463  df-fo 6464  df-f1o 6465  df-fv 6466  df-riota 7264  df-ov 7310  df-oprab 7311  df-mpo 7312  df-om 7745  df-1st 7863  df-2nd 7864  df-frecs 8128  df-wrecs 8159  df-recs 8233  df-rdg 8272  df-1o 8328  df-er 8529  df-en 8765  df-dom 8766  df-sdom 8767  df-fin 8768  df-sup 9245  df-inf 9246  df-card 9741  df-pnf 11057  df-mnf 11058  df-xr 11059  df-ltxr 11060  df-le 11061  df-sub 11253  df-neg 11254  df-div 11679  df-nn 12020  df-2 12082  df-n0 12280  df-z 12366  df-uz 12629  df-rp 12777  df-fz 13286  df-fzo 13429  df-fl 13558  df-mod 13636  df-hash 14091  df-word 14263  df-concat 14319  df-substr 14399  df-pfx 14429  df-csh 14547
This theorem is referenced by:  eleclclwwlknlem1  28469
  Copyright terms: Public domain W3C validator