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

Theorem 2cshwcshw 14519
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 13352 . . . . . . . . . . . . . . . . . 18 ((𝐾 ∈ (0...𝑁) ∧ 𝑚 ∈ (0...𝑁) ∧ ¬ 𝐾𝑚) → ((𝑚 + 𝑁) − 𝐾) ∈ (0...𝑁))
213exp 1117 . . . . . . . . . . . . . . . . 17 (𝐾 ∈ (0...𝑁) → (𝑚 ∈ (0...𝑁) → (¬ 𝐾𝑚 → ((𝑚 + 𝑁) − 𝐾) ∈ (0...𝑁))))
32ad2antrr 722 . . . . . . . . . . . . . . . 16 (((𝐾 ∈ (0...𝑁) ∧ (𝑌 ∈ Word 𝑉 ∧ (♯‘𝑌) = 𝑁)) ∧ 𝑋 = (𝑌 cyclShift 𝐾)) → (𝑚 ∈ (0...𝑁) → (¬ 𝐾𝑚 → ((𝑚 + 𝑁) − 𝐾) ∈ (0...𝑁))))
43imp 406 . . . . . . . . . . . . . . 15 ((((𝐾 ∈ (0...𝑁) ∧ (𝑌 ∈ Word 𝑉 ∧ (♯‘𝑌) = 𝑁)) ∧ 𝑋 = (𝑌 cyclShift 𝐾)) ∧ 𝑚 ∈ (0...𝑁)) → (¬ 𝐾𝑚 → ((𝑚 + 𝑁) − 𝐾) ∈ (0...𝑁)))
54adantr 480 . . . . . . . . . . . . . 14 (((((𝐾 ∈ (0...𝑁) ∧ (𝑌 ∈ Word 𝑉 ∧ (♯‘𝑌) = 𝑁)) ∧ 𝑋 = (𝑌 cyclShift 𝐾)) ∧ 𝑚 ∈ (0...𝑁)) ∧ 𝑍 = (𝑌 cyclShift 𝑚)) → (¬ 𝐾𝑚 → ((𝑚 + 𝑁) − 𝐾) ∈ (0...𝑁)))
65com12 32 . . . . . . . . . . . . 13 𝐾𝑚 → (((((𝐾 ∈ (0...𝑁) ∧ (𝑌 ∈ Word 𝑉 ∧ (♯‘𝑌) = 𝑁)) ∧ 𝑋 = (𝑌 cyclShift 𝐾)) ∧ 𝑚 ∈ (0...𝑁)) ∧ 𝑍 = (𝑌 cyclShift 𝑚)) → ((𝑚 + 𝑁) − 𝐾) ∈ (0...𝑁)))
76adantl 481 . . . . . . . . . . . 12 ((¬ 𝑚 = 0 ∧ ¬ 𝐾𝑚) → (((((𝐾 ∈ (0...𝑁) ∧ (𝑌 ∈ Word 𝑉 ∧ (♯‘𝑌) = 𝑁)) ∧ 𝑋 = (𝑌 cyclShift 𝐾)) ∧ 𝑚 ∈ (0...𝑁)) ∧ 𝑍 = (𝑌 cyclShift 𝑚)) → ((𝑚 + 𝑁) − 𝐾) ∈ (0...𝑁)))
87imp 406 . . . . . . . . . . 11 (((¬ 𝑚 = 0 ∧ ¬ 𝐾𝑚) ∧ ((((𝐾 ∈ (0...𝑁) ∧ (𝑌 ∈ Word 𝑉 ∧ (♯‘𝑌) = 𝑁)) ∧ 𝑋 = (𝑌 cyclShift 𝐾)) ∧ 𝑚 ∈ (0...𝑁)) ∧ 𝑍 = (𝑌 cyclShift 𝑚))) → ((𝑚 + 𝑁) − 𝐾) ∈ (0...𝑁))
9 simprl 767 . . . . . . . . . . . . . . . . . . . . . . . 24 ((𝐾 ∈ (0...𝑁) ∧ (𝑌 ∈ Word 𝑉 ∧ (♯‘𝑌) = 𝑁)) → 𝑌 ∈ Word 𝑉)
109ad2antrr 722 . . . . . . . . . . . . . . . . . . . . . . 23 ((((𝐾 ∈ (0...𝑁) ∧ (𝑌 ∈ Word 𝑉 ∧ (♯‘𝑌) = 𝑁)) ∧ (¬ 𝑚 = 0 ∧ ¬ 𝐾𝑚)) ∧ 𝑚 ∈ (0...𝑁)) → 𝑌 ∈ Word 𝑉)
11 elfzelz 13238 . . . . . . . . . . . . . . . . . . . . . . . . 25 (𝐾 ∈ (0...𝑁) → 𝐾 ∈ ℤ)
1211adantr 480 . . . . . . . . . . . . . . . . . . . . . . . 24 ((𝐾 ∈ (0...𝑁) ∧ (𝑌 ∈ Word 𝑉 ∧ (♯‘𝑌) = 𝑁)) → 𝐾 ∈ ℤ)
1312ad2antrr 722 . . . . . . . . . . . . . . . . . . . . . . 23 ((((𝐾 ∈ (0...𝑁) ∧ (𝑌 ∈ Word 𝑉 ∧ (♯‘𝑌) = 𝑁)) ∧ (¬ 𝑚 = 0 ∧ ¬ 𝐾𝑚)) ∧ 𝑚 ∈ (0...𝑁)) → 𝐾 ∈ ℤ)
14 elfz2 13228 . . . . . . . . . . . . . . . . . . . . . . . . . 26 (𝐾 ∈ (0...𝑁) ↔ ((0 ∈ ℤ ∧ 𝑁 ∈ ℤ ∧ 𝐾 ∈ ℤ) ∧ (0 ≤ 𝐾𝐾𝑁)))
15 zaddcl 12343 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 ((𝑚 ∈ ℤ ∧ 𝑁 ∈ ℤ) → (𝑚 + 𝑁) ∈ ℤ)
1615adantrr 713 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 ((𝑚 ∈ ℤ ∧ (𝑁 ∈ ℤ ∧ 𝐾 ∈ ℤ)) → (𝑚 + 𝑁) ∈ ℤ)
17 simprr 769 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 ((𝑚 ∈ ℤ ∧ (𝑁 ∈ ℤ ∧ 𝐾 ∈ ℤ)) → 𝐾 ∈ ℤ)
1816, 17zsubcld 12413 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 ((𝑚 ∈ ℤ ∧ (𝑁 ∈ ℤ ∧ 𝐾 ∈ ℤ)) → ((𝑚 + 𝑁) − 𝐾) ∈ ℤ)
1918ex 412 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 (𝑚 ∈ ℤ → ((𝑁 ∈ ℤ ∧ 𝐾 ∈ ℤ) → ((𝑚 + 𝑁) − 𝐾) ∈ ℤ))
20 elfzelz 13238 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 (𝑚 ∈ (0...𝑁) → 𝑚 ∈ ℤ)
2119, 20syl11 33 . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 ((𝑁 ∈ ℤ ∧ 𝐾 ∈ ℤ) → (𝑚 ∈ (0...𝑁) → ((𝑚 + 𝑁) − 𝐾) ∈ ℤ))
22213adant1 1128 . . . . . . . . . . . . . . . . . . . . . . . . . . 27 ((0 ∈ ℤ ∧ 𝑁 ∈ ℤ ∧ 𝐾 ∈ ℤ) → (𝑚 ∈ (0...𝑁) → ((𝑚 + 𝑁) − 𝐾) ∈ ℤ))
2322adantr 480 . . . . . . . . . . . . . . . . . . . . . . . . . 26 (((0 ∈ ℤ ∧ 𝑁 ∈ ℤ ∧ 𝐾 ∈ ℤ) ∧ (0 ≤ 𝐾𝐾𝑁)) → (𝑚 ∈ (0...𝑁) → ((𝑚 + 𝑁) − 𝐾) ∈ ℤ))
2414, 23sylbi 216 . . . . . . . . . . . . . . . . . . . . . . . . 25 (𝐾 ∈ (0...𝑁) → (𝑚 ∈ (0...𝑁) → ((𝑚 + 𝑁) − 𝐾) ∈ ℤ))
2524ad2antrr 722 . . . . . . . . . . . . . . . . . . . . . . . 24 (((𝐾 ∈ (0...𝑁) ∧ (𝑌 ∈ Word 𝑉 ∧ (♯‘𝑌) = 𝑁)) ∧ (¬ 𝑚 = 0 ∧ ¬ 𝐾𝑚)) → (𝑚 ∈ (0...𝑁) → ((𝑚 + 𝑁) − 𝐾) ∈ ℤ))
2625imp 406 . . . . . . . . . . . . . . . . . . . . . . 23 ((((𝐾 ∈ (0...𝑁) ∧ (𝑌 ∈ Word 𝑉 ∧ (♯‘𝑌) = 𝑁)) ∧ (¬ 𝑚 = 0 ∧ ¬ 𝐾𝑚)) ∧ 𝑚 ∈ (0...𝑁)) → ((𝑚 + 𝑁) − 𝐾) ∈ ℤ)
27 2cshw 14507 . . . . . . . . . . . . . . . . . . . . . . 23 ((𝑌 ∈ Word 𝑉𝐾 ∈ ℤ ∧ ((𝑚 + 𝑁) − 𝐾) ∈ ℤ) → ((𝑌 cyclShift 𝐾) cyclShift ((𝑚 + 𝑁) − 𝐾)) = (𝑌 cyclShift (𝐾 + ((𝑚 + 𝑁) − 𝐾))))
2810, 13, 26, 27syl3anc 1369 . . . . . . . . . . . . . . . . . . . . . 22 ((((𝐾 ∈ (0...𝑁) ∧ (𝑌 ∈ Word 𝑉 ∧ (♯‘𝑌) = 𝑁)) ∧ (¬ 𝑚 = 0 ∧ ¬ 𝐾𝑚)) ∧ 𝑚 ∈ (0...𝑁)) → ((𝑌 cyclShift 𝐾) cyclShift ((𝑚 + 𝑁) − 𝐾)) = (𝑌 cyclShift (𝐾 + ((𝑚 + 𝑁) − 𝐾))))
2917, 18zaddcld 12412 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 ((𝑚 ∈ ℤ ∧ (𝑁 ∈ ℤ ∧ 𝐾 ∈ ℤ)) → (𝐾 + ((𝑚 + 𝑁) − 𝐾)) ∈ ℤ)
3029ex 412 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 (𝑚 ∈ ℤ → ((𝑁 ∈ ℤ ∧ 𝐾 ∈ ℤ) → (𝐾 + ((𝑚 + 𝑁) − 𝐾)) ∈ ℤ))
3130, 20syl11 33 . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 ((𝑁 ∈ ℤ ∧ 𝐾 ∈ ℤ) → (𝑚 ∈ (0...𝑁) → (𝐾 + ((𝑚 + 𝑁) − 𝐾)) ∈ ℤ))
32313adant1 1128 . . . . . . . . . . . . . . . . . . . . . . . . . . 27 ((0 ∈ ℤ ∧ 𝑁 ∈ ℤ ∧ 𝐾 ∈ ℤ) → (𝑚 ∈ (0...𝑁) → (𝐾 + ((𝑚 + 𝑁) − 𝐾)) ∈ ℤ))
3332adantr 480 . . . . . . . . . . . . . . . . . . . . . . . . . 26 (((0 ∈ ℤ ∧ 𝑁 ∈ ℤ ∧ 𝐾 ∈ ℤ) ∧ (0 ≤ 𝐾𝐾𝑁)) → (𝑚 ∈ (0...𝑁) → (𝐾 + ((𝑚 + 𝑁) − 𝐾)) ∈ ℤ))
3414, 33sylbi 216 . . . . . . . . . . . . . . . . . . . . . . . . 25 (𝐾 ∈ (0...𝑁) → (𝑚 ∈ (0...𝑁) → (𝐾 + ((𝑚 + 𝑁) − 𝐾)) ∈ ℤ))
3534ad2antrr 722 . . . . . . . . . . . . . . . . . . . . . . . 24 (((𝐾 ∈ (0...𝑁) ∧ (𝑌 ∈ Word 𝑉 ∧ (♯‘𝑌) = 𝑁)) ∧ (¬ 𝑚 = 0 ∧ ¬ 𝐾𝑚)) → (𝑚 ∈ (0...𝑁) → (𝐾 + ((𝑚 + 𝑁) − 𝐾)) ∈ ℤ))
3635imp 406 . . . . . . . . . . . . . . . . . . . . . . 23 ((((𝐾 ∈ (0...𝑁) ∧ (𝑌 ∈ Word 𝑉 ∧ (♯‘𝑌) = 𝑁)) ∧ (¬ 𝑚 = 0 ∧ ¬ 𝐾𝑚)) ∧ 𝑚 ∈ (0...𝑁)) → (𝐾 + ((𝑚 + 𝑁) − 𝐾)) ∈ ℤ)
37 cshwsublen 14490 . . . . . . . . . . . . . . . . . . . . . . 23 ((𝑌 ∈ Word 𝑉 ∧ (𝐾 + ((𝑚 + 𝑁) − 𝐾)) ∈ ℤ) → (𝑌 cyclShift (𝐾 + ((𝑚 + 𝑁) − 𝐾))) = (𝑌 cyclShift ((𝐾 + ((𝑚 + 𝑁) − 𝐾)) − (♯‘𝑌))))
3810, 36, 37syl2anc 583 . . . . . . . . . . . . . . . . . . . . . 22 ((((𝐾 ∈ (0...𝑁) ∧ (𝑌 ∈ Word 𝑉 ∧ (♯‘𝑌) = 𝑁)) ∧ (¬ 𝑚 = 0 ∧ ¬ 𝐾𝑚)) ∧ 𝑚 ∈ (0...𝑁)) → (𝑌 cyclShift (𝐾 + ((𝑚 + 𝑁) − 𝐾))) = (𝑌 cyclShift ((𝐾 + ((𝑚 + 𝑁) − 𝐾)) − (♯‘𝑌))))
3928, 38eqtrd 2779 . . . . . . . . . . . . . . . . . . . . 21 ((((𝐾 ∈ (0...𝑁) ∧ (𝑌 ∈ Word 𝑉 ∧ (♯‘𝑌) = 𝑁)) ∧ (¬ 𝑚 = 0 ∧ ¬ 𝐾𝑚)) ∧ 𝑚 ∈ (0...𝑁)) → ((𝑌 cyclShift 𝐾) cyclShift ((𝑚 + 𝑁) − 𝐾)) = (𝑌 cyclShift ((𝐾 + ((𝑚 + 𝑁) − 𝐾)) − (♯‘𝑌))))
40 elfz2nn0 13329 . . . . . . . . . . . . . . . . . . . . . . . . . . 27 (𝐾 ∈ (0...𝑁) ↔ (𝐾 ∈ ℕ0𝑁 ∈ ℕ0𝐾𝑁))
41 nn0cn 12226 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 (𝑚 ∈ ℕ0𝑚 ∈ ℂ)
42 nn0cn 12226 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 (𝐾 ∈ ℕ0𝐾 ∈ ℂ)
43 nn0cn 12226 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 (𝑁 ∈ ℕ0𝑁 ∈ ℂ)
4442, 43anim12i 612 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 ((𝐾 ∈ ℕ0𝑁 ∈ ℕ0) → (𝐾 ∈ ℂ ∧ 𝑁 ∈ ℂ))
45 simprl 767 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 ((𝑚 ∈ ℂ ∧ (𝐾 ∈ ℂ ∧ 𝑁 ∈ ℂ)) → 𝐾 ∈ ℂ)
46 addcl 10937 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 ((𝑚 ∈ ℂ ∧ 𝑁 ∈ ℂ) → (𝑚 + 𝑁) ∈ ℂ)
4746adantrl 712 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 ((𝑚 ∈ ℂ ∧ (𝐾 ∈ ℂ ∧ 𝑁 ∈ ℂ)) → (𝑚 + 𝑁) ∈ ℂ)
4845, 47pncan3d 11318 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 ((𝑚 ∈ ℂ ∧ (𝐾 ∈ ℂ ∧ 𝑁 ∈ ℂ)) → (𝐾 + ((𝑚 + 𝑁) − 𝐾)) = (𝑚 + 𝑁))
4948oveq1d 7283 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 ((𝑚 ∈ ℂ ∧ (𝐾 ∈ ℂ ∧ 𝑁 ∈ ℂ)) → ((𝐾 + ((𝑚 + 𝑁) − 𝐾)) − 𝑁) = ((𝑚 + 𝑁) − 𝑁))
50 pncan 11210 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 ((𝑚 ∈ ℂ ∧ 𝑁 ∈ ℂ) → ((𝑚 + 𝑁) − 𝑁) = 𝑚)
5150adantrl 712 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 ((𝑚 ∈ ℂ ∧ (𝐾 ∈ ℂ ∧ 𝑁 ∈ ℂ)) → ((𝑚 + 𝑁) − 𝑁) = 𝑚)
5249, 51eqtrd 2779 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 ((𝑚 ∈ ℂ ∧ (𝐾 ∈ ℂ ∧ 𝑁 ∈ ℂ)) → ((𝐾 + ((𝑚 + 𝑁) − 𝐾)) − 𝑁) = 𝑚)
5341, 44, 52syl2an 595 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 ((𝑚 ∈ ℕ0 ∧ (𝐾 ∈ ℕ0𝑁 ∈ ℕ0)) → ((𝐾 + ((𝑚 + 𝑁) − 𝐾)) − 𝑁) = 𝑚)
5453ex 412 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 (𝑚 ∈ ℕ0 → ((𝐾 ∈ ℕ0𝑁 ∈ ℕ0) → ((𝐾 + ((𝑚 + 𝑁) − 𝐾)) − 𝑁) = 𝑚))
55 elfznn0 13331 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 (𝑚 ∈ (0...𝑁) → 𝑚 ∈ ℕ0)
5654, 55syl11 33 . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 ((𝐾 ∈ ℕ0𝑁 ∈ ℕ0) → (𝑚 ∈ (0...𝑁) → ((𝐾 + ((𝑚 + 𝑁) − 𝐾)) − 𝑁) = 𝑚))
57563adant3 1130 . . . . . . . . . . . . . . . . . . . . . . . . . . 27 ((𝐾 ∈ ℕ0𝑁 ∈ ℕ0𝐾𝑁) → (𝑚 ∈ (0...𝑁) → ((𝐾 + ((𝑚 + 𝑁) − 𝐾)) − 𝑁) = 𝑚))
5840, 57sylbi 216 . . . . . . . . . . . . . . . . . . . . . . . . . 26 (𝐾 ∈ (0...𝑁) → (𝑚 ∈ (0...𝑁) → ((𝐾 + ((𝑚 + 𝑁) − 𝐾)) − 𝑁) = 𝑚))
5958adantr 480 . . . . . . . . . . . . . . . . . . . . . . . . 25 ((𝐾 ∈ (0...𝑁) ∧ (𝑌 ∈ Word 𝑉 ∧ (♯‘𝑌) = 𝑁)) → (𝑚 ∈ (0...𝑁) → ((𝐾 + ((𝑚 + 𝑁) − 𝐾)) − 𝑁) = 𝑚))
60 oveq2 7276 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 ((♯‘𝑌) = 𝑁 → ((𝐾 + ((𝑚 + 𝑁) − 𝐾)) − (♯‘𝑌)) = ((𝐾 + ((𝑚 + 𝑁) − 𝐾)) − 𝑁))
6160eqeq1d 2741 . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 ((♯‘𝑌) = 𝑁 → (((𝐾 + ((𝑚 + 𝑁) − 𝐾)) − (♯‘𝑌)) = 𝑚 ↔ ((𝐾 + ((𝑚 + 𝑁) − 𝐾)) − 𝑁) = 𝑚))
6261imbi2d 340 . . . . . . . . . . . . . . . . . . . . . . . . . . 27 ((♯‘𝑌) = 𝑁 → ((𝑚 ∈ (0...𝑁) → ((𝐾 + ((𝑚 + 𝑁) − 𝐾)) − (♯‘𝑌)) = 𝑚) ↔ (𝑚 ∈ (0...𝑁) → ((𝐾 + ((𝑚 + 𝑁) − 𝐾)) − 𝑁) = 𝑚)))
6362adantl 481 . . . . . . . . . . . . . . . . . . . . . . . . . 26 ((𝑌 ∈ Word 𝑉 ∧ (♯‘𝑌) = 𝑁) → ((𝑚 ∈ (0...𝑁) → ((𝐾 + ((𝑚 + 𝑁) − 𝐾)) − (♯‘𝑌)) = 𝑚) ↔ (𝑚 ∈ (0...𝑁) → ((𝐾 + ((𝑚 + 𝑁) − 𝐾)) − 𝑁) = 𝑚)))
6463adantl 481 . . . . . . . . . . . . . . . . . . . . . . . . 25 ((𝐾 ∈ (0...𝑁) ∧ (𝑌 ∈ Word 𝑉 ∧ (♯‘𝑌) = 𝑁)) → ((𝑚 ∈ (0...𝑁) → ((𝐾 + ((𝑚 + 𝑁) − 𝐾)) − (♯‘𝑌)) = 𝑚) ↔ (𝑚 ∈ (0...𝑁) → ((𝐾 + ((𝑚 + 𝑁) − 𝐾)) − 𝑁) = 𝑚)))
6559, 64mpbird 256 . . . . . . . . . . . . . . . . . . . . . . . 24 ((𝐾 ∈ (0...𝑁) ∧ (𝑌 ∈ Word 𝑉 ∧ (♯‘𝑌) = 𝑁)) → (𝑚 ∈ (0...𝑁) → ((𝐾 + ((𝑚 + 𝑁) − 𝐾)) − (♯‘𝑌)) = 𝑚))
6665adantr 480 . . . . . . . . . . . . . . . . . . . . . . 23 (((𝐾 ∈ (0...𝑁) ∧ (𝑌 ∈ Word 𝑉 ∧ (♯‘𝑌) = 𝑁)) ∧ (¬ 𝑚 = 0 ∧ ¬ 𝐾𝑚)) → (𝑚 ∈ (0...𝑁) → ((𝐾 + ((𝑚 + 𝑁) − 𝐾)) − (♯‘𝑌)) = 𝑚))
6766imp 406 . . . . . . . . . . . . . . . . . . . . . 22 ((((𝐾 ∈ (0...𝑁) ∧ (𝑌 ∈ Word 𝑉 ∧ (♯‘𝑌) = 𝑁)) ∧ (¬ 𝑚 = 0 ∧ ¬ 𝐾𝑚)) ∧ 𝑚 ∈ (0...𝑁)) → ((𝐾 + ((𝑚 + 𝑁) − 𝐾)) − (♯‘𝑌)) = 𝑚)
6867oveq2d 7284 . . . . . . . . . . . . . . . . . . . . 21 ((((𝐾 ∈ (0...𝑁) ∧ (𝑌 ∈ Word 𝑉 ∧ (♯‘𝑌) = 𝑁)) ∧ (¬ 𝑚 = 0 ∧ ¬ 𝐾𝑚)) ∧ 𝑚 ∈ (0...𝑁)) → (𝑌 cyclShift ((𝐾 + ((𝑚 + 𝑁) − 𝐾)) − (♯‘𝑌))) = (𝑌 cyclShift 𝑚))
6939, 68eqtr2d 2780 . . . . . . . . . . . . . . . . . . . 20 ((((𝐾 ∈ (0...𝑁) ∧ (𝑌 ∈ Word 𝑉 ∧ (♯‘𝑌) = 𝑁)) ∧ (¬ 𝑚 = 0 ∧ ¬ 𝐾𝑚)) ∧ 𝑚 ∈ (0...𝑁)) → (𝑌 cyclShift 𝑚) = ((𝑌 cyclShift 𝐾) cyclShift ((𝑚 + 𝑁) − 𝐾)))
7069adantr 480 . . . . . . . . . . . . . . . . . . 19 (((((𝐾 ∈ (0...𝑁) ∧ (𝑌 ∈ Word 𝑉 ∧ (♯‘𝑌) = 𝑁)) ∧ (¬ 𝑚 = 0 ∧ ¬ 𝐾𝑚)) ∧ 𝑚 ∈ (0...𝑁)) ∧ 𝑋 = (𝑌 cyclShift 𝐾)) → (𝑌 cyclShift 𝑚) = ((𝑌 cyclShift 𝐾) cyclShift ((𝑚 + 𝑁) − 𝐾)))
71 oveq1 7275 . . . . . . . . . . . . . . . . . . . 20 (𝑋 = (𝑌 cyclShift 𝐾) → (𝑋 cyclShift ((𝑚 + 𝑁) − 𝐾)) = ((𝑌 cyclShift 𝐾) cyclShift ((𝑚 + 𝑁) − 𝐾)))
7271adantl 481 . . . . . . . . . . . . . . . . . . 19 (((((𝐾 ∈ (0...𝑁) ∧ (𝑌 ∈ Word 𝑉 ∧ (♯‘𝑌) = 𝑁)) ∧ (¬ 𝑚 = 0 ∧ ¬ 𝐾𝑚)) ∧ 𝑚 ∈ (0...𝑁)) ∧ 𝑋 = (𝑌 cyclShift 𝐾)) → (𝑋 cyclShift ((𝑚 + 𝑁) − 𝐾)) = ((𝑌 cyclShift 𝐾) cyclShift ((𝑚 + 𝑁) − 𝐾)))
7370, 72eqtr4d 2782 . . . . . . . . . . . . . . . . . 18 (((((𝐾 ∈ (0...𝑁) ∧ (𝑌 ∈ Word 𝑉 ∧ (♯‘𝑌) = 𝑁)) ∧ (¬ 𝑚 = 0 ∧ ¬ 𝐾𝑚)) ∧ 𝑚 ∈ (0...𝑁)) ∧ 𝑋 = (𝑌 cyclShift 𝐾)) → (𝑌 cyclShift 𝑚) = (𝑋 cyclShift ((𝑚 + 𝑁) − 𝐾)))
7473exp41 434 . . . . . . . . . . . . . . . . 17 ((𝐾 ∈ (0...𝑁) ∧ (𝑌 ∈ Word 𝑉 ∧ (♯‘𝑌) = 𝑁)) → ((¬ 𝑚 = 0 ∧ ¬ 𝐾𝑚) → (𝑚 ∈ (0...𝑁) → (𝑋 = (𝑌 cyclShift 𝐾) → (𝑌 cyclShift 𝑚) = (𝑋 cyclShift ((𝑚 + 𝑁) − 𝐾))))))
7574com24 95 . . . . . . . . . . . . . . . 16 ((𝐾 ∈ (0...𝑁) ∧ (𝑌 ∈ Word 𝑉 ∧ (♯‘𝑌) = 𝑁)) → (𝑋 = (𝑌 cyclShift 𝐾) → (𝑚 ∈ (0...𝑁) → ((¬ 𝑚 = 0 ∧ ¬ 𝐾𝑚) → (𝑌 cyclShift 𝑚) = (𝑋 cyclShift ((𝑚 + 𝑁) − 𝐾))))))
7675imp41 425 . . . . . . . . . . . . . . 15 (((((𝐾 ∈ (0...𝑁) ∧ (𝑌 ∈ Word 𝑉 ∧ (♯‘𝑌) = 𝑁)) ∧ 𝑋 = (𝑌 cyclShift 𝐾)) ∧ 𝑚 ∈ (0...𝑁)) ∧ (¬ 𝑚 = 0 ∧ ¬ 𝐾𝑚)) → (𝑌 cyclShift 𝑚) = (𝑋 cyclShift ((𝑚 + 𝑁) − 𝐾)))
7776eqeq2d 2750 . . . . . . . . . . . . . 14 (((((𝐾 ∈ (0...𝑁) ∧ (𝑌 ∈ Word 𝑉 ∧ (♯‘𝑌) = 𝑁)) ∧ 𝑋 = (𝑌 cyclShift 𝐾)) ∧ 𝑚 ∈ (0...𝑁)) ∧ (¬ 𝑚 = 0 ∧ ¬ 𝐾𝑚)) → (𝑍 = (𝑌 cyclShift 𝑚) ↔ 𝑍 = (𝑋 cyclShift ((𝑚 + 𝑁) − 𝐾))))
7877biimpd 228 . . . . . . . . . . . . 13 (((((𝐾 ∈ (0...𝑁) ∧ (𝑌 ∈ Word 𝑉 ∧ (♯‘𝑌) = 𝑁)) ∧ 𝑋 = (𝑌 cyclShift 𝐾)) ∧ 𝑚 ∈ (0...𝑁)) ∧ (¬ 𝑚 = 0 ∧ ¬ 𝐾𝑚)) → (𝑍 = (𝑌 cyclShift 𝑚) → 𝑍 = (𝑋 cyclShift ((𝑚 + 𝑁) − 𝐾))))
7978impancom 451 . . . . . . . . . . . 12 (((((𝐾 ∈ (0...𝑁) ∧ (𝑌 ∈ Word 𝑉 ∧ (♯‘𝑌) = 𝑁)) ∧ 𝑋 = (𝑌 cyclShift 𝐾)) ∧ 𝑚 ∈ (0...𝑁)) ∧ 𝑍 = (𝑌 cyclShift 𝑚)) → ((¬ 𝑚 = 0 ∧ ¬ 𝐾𝑚) → 𝑍 = (𝑋 cyclShift ((𝑚 + 𝑁) − 𝐾))))
8079impcom 407 . . . . . . . . . . 11 (((¬ 𝑚 = 0 ∧ ¬ 𝐾𝑚) ∧ ((((𝐾 ∈ (0...𝑁) ∧ (𝑌 ∈ Word 𝑉 ∧ (♯‘𝑌) = 𝑁)) ∧ 𝑋 = (𝑌 cyclShift 𝐾)) ∧ 𝑚 ∈ (0...𝑁)) ∧ 𝑍 = (𝑌 cyclShift 𝑚))) → 𝑍 = (𝑋 cyclShift ((𝑚 + 𝑁) − 𝐾)))
81 oveq2 7276 . . . . . . . . . . . 12 (𝑛 = ((𝑚 + 𝑁) − 𝐾) → (𝑋 cyclShift 𝑛) = (𝑋 cyclShift ((𝑚 + 𝑁) − 𝐾)))
8281rspceeqv 3575 . . . . . . . . . . 11 ((((𝑚 + 𝑁) − 𝐾) ∈ (0...𝑁) ∧ 𝑍 = (𝑋 cyclShift ((𝑚 + 𝑁) − 𝐾))) → ∃𝑛 ∈ (0...𝑁)𝑍 = (𝑋 cyclShift 𝑛))
838, 80, 82syl2anc 583 . . . . . . . . . 10 (((¬ 𝑚 = 0 ∧ ¬ 𝐾𝑚) ∧ ((((𝐾 ∈ (0...𝑁) ∧ (𝑌 ∈ Word 𝑉 ∧ (♯‘𝑌) = 𝑁)) ∧ 𝑋 = (𝑌 cyclShift 𝐾)) ∧ 𝑚 ∈ (0...𝑁)) ∧ 𝑍 = (𝑌 cyclShift 𝑚))) → ∃𝑛 ∈ (0...𝑁)𝑍 = (𝑋 cyclShift 𝑛))
8483exp31 419 . . . . . . . . 9 𝑚 = 0 → (¬ 𝐾𝑚 → (((((𝐾 ∈ (0...𝑁) ∧ (𝑌 ∈ Word 𝑉 ∧ (♯‘𝑌) = 𝑁)) ∧ 𝑋 = (𝑌 cyclShift 𝐾)) ∧ 𝑚 ∈ (0...𝑁)) ∧ 𝑍 = (𝑌 cyclShift 𝑚)) → ∃𝑛 ∈ (0...𝑁)𝑍 = (𝑋 cyclShift 𝑛))))
85 oveq2 7276 . . . . . . . . . . . . . . 15 (𝑚 = 0 → (𝑌 cyclShift 𝑚) = (𝑌 cyclShift 0))
8685eqeq2d 2750 . . . . . . . . . . . . . 14 (𝑚 = 0 → (𝑍 = (𝑌 cyclShift 𝑚) ↔ 𝑍 = (𝑌 cyclShift 0)))
87 cshw0 14488 . . . . . . . . . . . . . . . . . . . . 21 (𝑌 ∈ Word 𝑉 → (𝑌 cyclShift 0) = 𝑌)
8887adantr 480 . . . . . . . . . . . . . . . . . . . 20 ((𝑌 ∈ Word 𝑉 ∧ (♯‘𝑌) = 𝑁) → (𝑌 cyclShift 0) = 𝑌)
8988eqeq2d 2750 . . . . . . . . . . . . . . . . . . 19 ((𝑌 ∈ Word 𝑉 ∧ (♯‘𝑌) = 𝑁) → (𝑍 = (𝑌 cyclShift 0) ↔ 𝑍 = 𝑌))
90 fznn0sub2 13345 . . . . . . . . . . . . . . . . . . . . . . . . . . 27 (𝐾 ∈ (0...𝑁) → (𝑁𝐾) ∈ (0...𝑁))
9190adantl 481 . . . . . . . . . . . . . . . . . . . . . . . . . 26 (((𝑌 ∈ Word 𝑉 ∧ (♯‘𝑌) = 𝑁) ∧ 𝐾 ∈ (0...𝑁)) → (𝑁𝐾) ∈ (0...𝑁))
92 oveq1 7275 . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 ((♯‘𝑌) = 𝑁 → ((♯‘𝑌) − 𝐾) = (𝑁𝐾))
9392eleq1d 2824 . . . . . . . . . . . . . . . . . . . . . . . . . . 27 ((♯‘𝑌) = 𝑁 → (((♯‘𝑌) − 𝐾) ∈ (0...𝑁) ↔ (𝑁𝐾) ∈ (0...𝑁)))
9493ad2antlr 723 . . . . . . . . . . . . . . . . . . . . . . . . . 26 (((𝑌 ∈ Word 𝑉 ∧ (♯‘𝑌) = 𝑁) ∧ 𝐾 ∈ (0...𝑁)) → (((♯‘𝑌) − 𝐾) ∈ (0...𝑁) ↔ (𝑁𝐾) ∈ (0...𝑁)))
9591, 94mpbird 256 . . . . . . . . . . . . . . . . . . . . . . . . 25 (((𝑌 ∈ Word 𝑉 ∧ (♯‘𝑌) = 𝑁) ∧ 𝐾 ∈ (0...𝑁)) → ((♯‘𝑌) − 𝐾) ∈ (0...𝑁))
9695adantr 480 . . . . . . . . . . . . . . . . . . . . . . . 24 ((((𝑌 ∈ Word 𝑉 ∧ (♯‘𝑌) = 𝑁) ∧ 𝐾 ∈ (0...𝑁)) ∧ 𝑋 = (𝑌 cyclShift 𝐾)) → ((♯‘𝑌) − 𝐾) ∈ (0...𝑁))
97 oveq1 7275 . . . . . . . . . . . . . . . . . . . . . . . . . 26 (𝑋 = (𝑌 cyclShift 𝐾) → (𝑋 cyclShift ((♯‘𝑌) − 𝐾)) = ((𝑌 cyclShift 𝐾) cyclShift ((♯‘𝑌) − 𝐾)))
98 simpl 482 . . . . . . . . . . . . . . . . . . . . . . . . . . 27 ((𝑌 ∈ Word 𝑉 ∧ (♯‘𝑌) = 𝑁) → 𝑌 ∈ Word 𝑉)
99 2cshwid 14508 . . . . . . . . . . . . . . . . . . . . . . . . . . 27 ((𝑌 ∈ Word 𝑉𝐾 ∈ ℤ) → ((𝑌 cyclShift 𝐾) cyclShift ((♯‘𝑌) − 𝐾)) = 𝑌)
10098, 11, 99syl2an 595 . . . . . . . . . . . . . . . . . . . . . . . . . 26 (((𝑌 ∈ Word 𝑉 ∧ (♯‘𝑌) = 𝑁) ∧ 𝐾 ∈ (0...𝑁)) → ((𝑌 cyclShift 𝐾) cyclShift ((♯‘𝑌) − 𝐾)) = 𝑌)
10197, 100sylan9eqr 2801 . . . . . . . . . . . . . . . . . . . . . . . . 25 ((((𝑌 ∈ Word 𝑉 ∧ (♯‘𝑌) = 𝑁) ∧ 𝐾 ∈ (0...𝑁)) ∧ 𝑋 = (𝑌 cyclShift 𝐾)) → (𝑋 cyclShift ((♯‘𝑌) − 𝐾)) = 𝑌)
102101eqcomd 2745 . . . . . . . . . . . . . . . . . . . . . . . 24 ((((𝑌 ∈ Word 𝑉 ∧ (♯‘𝑌) = 𝑁) ∧ 𝐾 ∈ (0...𝑁)) ∧ 𝑋 = (𝑌 cyclShift 𝐾)) → 𝑌 = (𝑋 cyclShift ((♯‘𝑌) − 𝐾)))
103 oveq2 7276 . . . . . . . . . . . . . . . . . . . . . . . . 25 (𝑛 = ((♯‘𝑌) − 𝐾) → (𝑋 cyclShift 𝑛) = (𝑋 cyclShift ((♯‘𝑌) − 𝐾)))
104103rspceeqv 3575 . . . . . . . . . . . . . . . . . . . . . . . 24 ((((♯‘𝑌) − 𝐾) ∈ (0...𝑁) ∧ 𝑌 = (𝑋 cyclShift ((♯‘𝑌) − 𝐾))) → ∃𝑛 ∈ (0...𝑁)𝑌 = (𝑋 cyclShift 𝑛))
10596, 102, 104syl2anc 583 . . . . . . . . . . . . . . . . . . . . . . 23 ((((𝑌 ∈ Word 𝑉 ∧ (♯‘𝑌) = 𝑁) ∧ 𝐾 ∈ (0...𝑁)) ∧ 𝑋 = (𝑌 cyclShift 𝐾)) → ∃𝑛 ∈ (0...𝑁)𝑌 = (𝑋 cyclShift 𝑛))
106105adantr 480 . . . . . . . . . . . . . . . . . . . . . 22 (((((𝑌 ∈ Word 𝑉 ∧ (♯‘𝑌) = 𝑁) ∧ 𝐾 ∈ (0...𝑁)) ∧ 𝑋 = (𝑌 cyclShift 𝐾)) ∧ 𝑍 = 𝑌) → ∃𝑛 ∈ (0...𝑁)𝑌 = (𝑋 cyclShift 𝑛))
107 eqeq1 2743 . . . . . . . . . . . . . . . . . . . . . . . 24 (𝑍 = 𝑌 → (𝑍 = (𝑋 cyclShift 𝑛) ↔ 𝑌 = (𝑋 cyclShift 𝑛)))
108107rexbidv 3227 . . . . . . . . . . . . . . . . . . . . . . 23 (𝑍 = 𝑌 → (∃𝑛 ∈ (0...𝑁)𝑍 = (𝑋 cyclShift 𝑛) ↔ ∃𝑛 ∈ (0...𝑁)𝑌 = (𝑋 cyclShift 𝑛)))
109108adantl 481 . . . . . . . . . . . . . . . . . . . . . 22 (((((𝑌 ∈ Word 𝑉 ∧ (♯‘𝑌) = 𝑁) ∧ 𝐾 ∈ (0...𝑁)) ∧ 𝑋 = (𝑌 cyclShift 𝐾)) ∧ 𝑍 = 𝑌) → (∃𝑛 ∈ (0...𝑁)𝑍 = (𝑋 cyclShift 𝑛) ↔ ∃𝑛 ∈ (0...𝑁)𝑌 = (𝑋 cyclShift 𝑛)))
110106, 109mpbird 256 . . . . . . . . . . . . . . . . . . . . 21 (((((𝑌 ∈ Word 𝑉 ∧ (♯‘𝑌) = 𝑁) ∧ 𝐾 ∈ (0...𝑁)) ∧ 𝑋 = (𝑌 cyclShift 𝐾)) ∧ 𝑍 = 𝑌) → ∃𝑛 ∈ (0...𝑁)𝑍 = (𝑋 cyclShift 𝑛))
111110exp41 434 . . . . . . . . . . . . . . . . . . . 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 407 . . . . . . . . . . . . . . . 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 252 . . . . . . . . . . . . 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 425 . . . . . . . . . 10 (((((𝐾 ∈ (0...𝑁) ∧ (𝑌 ∈ Word 𝑉 ∧ (♯‘𝑌) = 𝑁)) ∧ 𝑋 = (𝑌 cyclShift 𝐾)) ∧ 𝑚 ∈ (0...𝑁)) ∧ 𝑍 = (𝑌 cyclShift 𝑚)) → (𝑚 = 0 → ∃𝑛 ∈ (0...𝑁)𝑍 = (𝑋 cyclShift 𝑛)))
122121com12 32 . . . . . . . . 9 (𝑚 = 0 → (((((𝐾 ∈ (0...𝑁) ∧ (𝑌 ∈ Word 𝑉 ∧ (♯‘𝑌) = 𝑁)) ∧ 𝑋 = (𝑌 cyclShift 𝐾)) ∧ 𝑚 ∈ (0...𝑁)) ∧ 𝑍 = (𝑌 cyclShift 𝑚)) → ∃𝑛 ∈ (0...𝑁)𝑍 = (𝑋 cyclShift 𝑛)))
123 difelfzle 13351 . . . . . . . . . . . . . . . 16 ((𝐾 ∈ (0...𝑁) ∧ 𝑚 ∈ (0...𝑁) ∧ 𝐾𝑚) → (𝑚𝐾) ∈ (0...𝑁))
1241233exp 1117 . . . . . . . . . . . . . . 15 (𝐾 ∈ (0...𝑁) → (𝑚 ∈ (0...𝑁) → (𝐾𝑚 → (𝑚𝐾) ∈ (0...𝑁))))
125124ad2antrr 722 . . . . . . . . . . . . . 14 (((𝐾 ∈ (0...𝑁) ∧ (𝑌 ∈ Word 𝑉 ∧ (♯‘𝑌) = 𝑁)) ∧ 𝑋 = (𝑌 cyclShift 𝐾)) → (𝑚 ∈ (0...𝑁) → (𝐾𝑚 → (𝑚𝐾) ∈ (0...𝑁))))
126125imp 406 . . . . . . . . . . . . 13 ((((𝐾 ∈ (0...𝑁) ∧ (𝑌 ∈ Word 𝑉 ∧ (♯‘𝑌) = 𝑁)) ∧ 𝑋 = (𝑌 cyclShift 𝐾)) ∧ 𝑚 ∈ (0...𝑁)) → (𝐾𝑚 → (𝑚𝐾) ∈ (0...𝑁)))
127126adantr 480 . . . . . . . . . . . 12 (((((𝐾 ∈ (0...𝑁) ∧ (𝑌 ∈ Word 𝑉 ∧ (♯‘𝑌) = 𝑁)) ∧ 𝑋 = (𝑌 cyclShift 𝐾)) ∧ 𝑚 ∈ (0...𝑁)) ∧ 𝑍 = (𝑌 cyclShift 𝑚)) → (𝐾𝑚 → (𝑚𝐾) ∈ (0...𝑁)))
128127impcom 407 . . . . . . . . . . 11 ((𝐾𝑚 ∧ ((((𝐾 ∈ (0...𝑁) ∧ (𝑌 ∈ Word 𝑉 ∧ (♯‘𝑌) = 𝑁)) ∧ 𝑋 = (𝑌 cyclShift 𝐾)) ∧ 𝑚 ∈ (0...𝑁)) ∧ 𝑍 = (𝑌 cyclShift 𝑚))) → (𝑚𝐾) ∈ (0...𝑁))
1299ad2antrr 722 . . . . . . . . . . . . . . . . . . . . . . 23 ((((𝐾 ∈ (0...𝑁) ∧ (𝑌 ∈ Word 𝑉 ∧ (♯‘𝑌) = 𝑁)) ∧ 𝐾𝑚) ∧ 𝑚 ∈ (0...𝑁)) → 𝑌 ∈ Word 𝑉)
13012ad2antrr 722 . . . . . . . . . . . . . . . . . . . . . . 23 ((((𝐾 ∈ (0...𝑁) ∧ (𝑌 ∈ Word 𝑉 ∧ (♯‘𝑌) = 𝑁)) ∧ 𝐾𝑚) ∧ 𝑚 ∈ (0...𝑁)) → 𝐾 ∈ ℤ)
131 zsubcl 12345 . . . . . . . . . . . . . . . . . . . . . . . . . . 27 ((𝑚 ∈ ℤ ∧ 𝐾 ∈ ℤ) → (𝑚𝐾) ∈ ℤ)
132131ex 412 . . . . . . . . . . . . . . . . . . . . . . . . . 26 (𝑚 ∈ ℤ → (𝐾 ∈ ℤ → (𝑚𝐾) ∈ ℤ))
13320, 11, 132syl2imc 41 . . . . . . . . . . . . . . . . . . . . . . . . 25 (𝐾 ∈ (0...𝑁) → (𝑚 ∈ (0...𝑁) → (𝑚𝐾) ∈ ℤ))
134133ad2antrr 722 . . . . . . . . . . . . . . . . . . . . . . . 24 (((𝐾 ∈ (0...𝑁) ∧ (𝑌 ∈ Word 𝑉 ∧ (♯‘𝑌) = 𝑁)) ∧ 𝐾𝑚) → (𝑚 ∈ (0...𝑁) → (𝑚𝐾) ∈ ℤ))
135134imp 406 . . . . . . . . . . . . . . . . . . . . . . 23 ((((𝐾 ∈ (0...𝑁) ∧ (𝑌 ∈ Word 𝑉 ∧ (♯‘𝑌) = 𝑁)) ∧ 𝐾𝑚) ∧ 𝑚 ∈ (0...𝑁)) → (𝑚𝐾) ∈ ℤ)
136 2cshw 14507 . . . . . . . . . . . . . . . . . . . . . . 23 ((𝑌 ∈ Word 𝑉𝐾 ∈ ℤ ∧ (𝑚𝐾) ∈ ℤ) → ((𝑌 cyclShift 𝐾) cyclShift (𝑚𝐾)) = (𝑌 cyclShift (𝐾 + (𝑚𝐾))))
137129, 130, 135, 136syl3anc 1369 . . . . . . . . . . . . . . . . . . . . . 22 ((((𝐾 ∈ (0...𝑁) ∧ (𝑌 ∈ Word 𝑉 ∧ (♯‘𝑌) = 𝑁)) ∧ 𝐾𝑚) ∧ 𝑚 ∈ (0...𝑁)) → ((𝑌 cyclShift 𝐾) cyclShift (𝑚𝐾)) = (𝑌 cyclShift (𝐾 + (𝑚𝐾))))
138 zcn 12307 . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 (𝐾 ∈ ℤ → 𝐾 ∈ ℂ)
13920zcnd 12409 . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 (𝑚 ∈ (0...𝑁) → 𝑚 ∈ ℂ)
140 pncan3 11212 . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 ((𝐾 ∈ ℂ ∧ 𝑚 ∈ ℂ) → (𝐾 + (𝑚𝐾)) = 𝑚)
141138, 139, 140syl2anr 596 . . . . . . . . . . . . . . . . . . . . . . . . . . 27 ((𝑚 ∈ (0...𝑁) ∧ 𝐾 ∈ ℤ) → (𝐾 + (𝑚𝐾)) = 𝑚)
142141ex 412 . . . . . . . . . . . . . . . . . . . . . . . . . 26 (𝑚 ∈ (0...𝑁) → (𝐾 ∈ ℤ → (𝐾 + (𝑚𝐾)) = 𝑚))
14311, 142syl5com 31 . . . . . . . . . . . . . . . . . . . . . . . . 25 (𝐾 ∈ (0...𝑁) → (𝑚 ∈ (0...𝑁) → (𝐾 + (𝑚𝐾)) = 𝑚))
144143ad2antrr 722 . . . . . . . . . . . . . . . . . . . . . . . 24 (((𝐾 ∈ (0...𝑁) ∧ (𝑌 ∈ Word 𝑉 ∧ (♯‘𝑌) = 𝑁)) ∧ 𝐾𝑚) → (𝑚 ∈ (0...𝑁) → (𝐾 + (𝑚𝐾)) = 𝑚))
145144imp 406 . . . . . . . . . . . . . . . . . . . . . . 23 ((((𝐾 ∈ (0...𝑁) ∧ (𝑌 ∈ Word 𝑉 ∧ (♯‘𝑌) = 𝑁)) ∧ 𝐾𝑚) ∧ 𝑚 ∈ (0...𝑁)) → (𝐾 + (𝑚𝐾)) = 𝑚)
146145oveq2d 7284 . . . . . . . . . . . . . . . . . . . . . 22 ((((𝐾 ∈ (0...𝑁) ∧ (𝑌 ∈ Word 𝑉 ∧ (♯‘𝑌) = 𝑁)) ∧ 𝐾𝑚) ∧ 𝑚 ∈ (0...𝑁)) → (𝑌 cyclShift (𝐾 + (𝑚𝐾))) = (𝑌 cyclShift 𝑚))
147137, 146eqtr2d 2780 . . . . . . . . . . . . . . . . . . . . 21 ((((𝐾 ∈ (0...𝑁) ∧ (𝑌 ∈ Word 𝑉 ∧ (♯‘𝑌) = 𝑁)) ∧ 𝐾𝑚) ∧ 𝑚 ∈ (0...𝑁)) → (𝑌 cyclShift 𝑚) = ((𝑌 cyclShift 𝐾) cyclShift (𝑚𝐾)))
148147adantr 480 . . . . . . . . . . . . . . . . . . . 20 (((((𝐾 ∈ (0...𝑁) ∧ (𝑌 ∈ Word 𝑉 ∧ (♯‘𝑌) = 𝑁)) ∧ 𝐾𝑚) ∧ 𝑚 ∈ (0...𝑁)) ∧ 𝑋 = (𝑌 cyclShift 𝐾)) → (𝑌 cyclShift 𝑚) = ((𝑌 cyclShift 𝐾) cyclShift (𝑚𝐾)))
149 oveq1 7275 . . . . . . . . . . . . . . . . . . . . . 22 (𝑋 = (𝑌 cyclShift 𝐾) → (𝑋 cyclShift (𝑚𝐾)) = ((𝑌 cyclShift 𝐾) cyclShift (𝑚𝐾)))
150149eqeq2d 2750 . . . . . . . . . . . . . . . . . . . . 21 (𝑋 = (𝑌 cyclShift 𝐾) → ((𝑌 cyclShift 𝑚) = (𝑋 cyclShift (𝑚𝐾)) ↔ (𝑌 cyclShift 𝑚) = ((𝑌 cyclShift 𝐾) cyclShift (𝑚𝐾))))
151150adantl 481 . . . . . . . . . . . . . . . . . . . 20 (((((𝐾 ∈ (0...𝑁) ∧ (𝑌 ∈ Word 𝑉 ∧ (♯‘𝑌) = 𝑁)) ∧ 𝐾𝑚) ∧ 𝑚 ∈ (0...𝑁)) ∧ 𝑋 = (𝑌 cyclShift 𝐾)) → ((𝑌 cyclShift 𝑚) = (𝑋 cyclShift (𝑚𝐾)) ↔ (𝑌 cyclShift 𝑚) = ((𝑌 cyclShift 𝐾) cyclShift (𝑚𝐾))))
152148, 151mpbird 256 . . . . . . . . . . . . . . . . . . 19 (((((𝐾 ∈ (0...𝑁) ∧ (𝑌 ∈ Word 𝑉 ∧ (♯‘𝑌) = 𝑁)) ∧ 𝐾𝑚) ∧ 𝑚 ∈ (0...𝑁)) ∧ 𝑋 = (𝑌 cyclShift 𝐾)) → (𝑌 cyclShift 𝑚) = (𝑋 cyclShift (𝑚𝐾)))
153152eqeq2d 2750 . . . . . . . . . . . . . . . . . 18 (((((𝐾 ∈ (0...𝑁) ∧ (𝑌 ∈ Word 𝑉 ∧ (♯‘𝑌) = 𝑁)) ∧ 𝐾𝑚) ∧ 𝑚 ∈ (0...𝑁)) ∧ 𝑋 = (𝑌 cyclShift 𝐾)) → (𝑍 = (𝑌 cyclShift 𝑚) ↔ 𝑍 = (𝑋 cyclShift (𝑚𝐾))))
154153biimpd 228 . . . . . . . . . . . . . . . . 17 (((((𝐾 ∈ (0...𝑁) ∧ (𝑌 ∈ Word 𝑉 ∧ (♯‘𝑌) = 𝑁)) ∧ 𝐾𝑚) ∧ 𝑚 ∈ (0...𝑁)) ∧ 𝑋 = (𝑌 cyclShift 𝐾)) → (𝑍 = (𝑌 cyclShift 𝑚) → 𝑍 = (𝑋 cyclShift (𝑚𝐾))))
155154exp41 434 . . . . . . . . . . . . . . . 16 ((𝐾 ∈ (0...𝑁) ∧ (𝑌 ∈ Word 𝑉 ∧ (♯‘𝑌) = 𝑁)) → (𝐾𝑚 → (𝑚 ∈ (0...𝑁) → (𝑋 = (𝑌 cyclShift 𝐾) → (𝑍 = (𝑌 cyclShift 𝑚) → 𝑍 = (𝑋 cyclShift (𝑚𝐾)))))))
156155com24 95 . . . . . . . . . . . . . . 15 ((𝐾 ∈ (0...𝑁) ∧ (𝑌 ∈ Word 𝑉 ∧ (♯‘𝑌) = 𝑁)) → (𝑋 = (𝑌 cyclShift 𝐾) → (𝑚 ∈ (0...𝑁) → (𝐾𝑚 → (𝑍 = (𝑌 cyclShift 𝑚) → 𝑍 = (𝑋 cyclShift (𝑚𝐾)))))))
157156imp31 417 . . . . . . . . . . . . . 14 ((((𝐾 ∈ (0...𝑁) ∧ (𝑌 ∈ Word 𝑉 ∧ (♯‘𝑌) = 𝑁)) ∧ 𝑋 = (𝑌 cyclShift 𝐾)) ∧ 𝑚 ∈ (0...𝑁)) → (𝐾𝑚 → (𝑍 = (𝑌 cyclShift 𝑚) → 𝑍 = (𝑋 cyclShift (𝑚𝐾)))))
158157com23 86 . . . . . . . . . . . . 13 ((((𝐾 ∈ (0...𝑁) ∧ (𝑌 ∈ Word 𝑉 ∧ (♯‘𝑌) = 𝑁)) ∧ 𝑋 = (𝑌 cyclShift 𝐾)) ∧ 𝑚 ∈ (0...𝑁)) → (𝑍 = (𝑌 cyclShift 𝑚) → (𝐾𝑚𝑍 = (𝑋 cyclShift (𝑚𝐾)))))
159158imp 406 . . . . . . . . . . . 12 (((((𝐾 ∈ (0...𝑁) ∧ (𝑌 ∈ Word 𝑉 ∧ (♯‘𝑌) = 𝑁)) ∧ 𝑋 = (𝑌 cyclShift 𝐾)) ∧ 𝑚 ∈ (0...𝑁)) ∧ 𝑍 = (𝑌 cyclShift 𝑚)) → (𝐾𝑚𝑍 = (𝑋 cyclShift (𝑚𝐾))))
160159impcom 407 . . . . . . . . . . 11 ((𝐾𝑚 ∧ ((((𝐾 ∈ (0...𝑁) ∧ (𝑌 ∈ Word 𝑉 ∧ (♯‘𝑌) = 𝑁)) ∧ 𝑋 = (𝑌 cyclShift 𝐾)) ∧ 𝑚 ∈ (0...𝑁)) ∧ 𝑍 = (𝑌 cyclShift 𝑚))) → 𝑍 = (𝑋 cyclShift (𝑚𝐾)))
161 oveq2 7276 . . . . . . . . . . . 12 (𝑛 = (𝑚𝐾) → (𝑋 cyclShift 𝑛) = (𝑋 cyclShift (𝑚𝐾)))
162161rspceeqv 3575 . . . . . . . . . . 11 (((𝑚𝐾) ∈ (0...𝑁) ∧ 𝑍 = (𝑋 cyclShift (𝑚𝐾))) → ∃𝑛 ∈ (0...𝑁)𝑍 = (𝑋 cyclShift 𝑛))
163128, 160, 162syl2anc 583 . . . . . . . . . 10 ((𝐾𝑚 ∧ ((((𝐾 ∈ (0...𝑁) ∧ (𝑌 ∈ Word 𝑉 ∧ (♯‘𝑌) = 𝑁)) ∧ 𝑋 = (𝑌 cyclShift 𝐾)) ∧ 𝑚 ∈ (0...𝑁)) ∧ 𝑍 = (𝑌 cyclShift 𝑚))) → ∃𝑛 ∈ (0...𝑁)𝑍 = (𝑋 cyclShift 𝑛))
164163ex 412 . . . . . . . . 9 (𝐾𝑚 → (((((𝐾 ∈ (0...𝑁) ∧ (𝑌 ∈ Word 𝑉 ∧ (♯‘𝑌) = 𝑁)) ∧ 𝑋 = (𝑌 cyclShift 𝐾)) ∧ 𝑚 ∈ (0...𝑁)) ∧ 𝑍 = (𝑌 cyclShift 𝑚)) → ∃𝑛 ∈ (0...𝑁)𝑍 = (𝑋 cyclShift 𝑛)))
16584, 122, 164pm2.61ii 183 . . . . . . . 8 (((((𝐾 ∈ (0...𝑁) ∧ (𝑌 ∈ Word 𝑉 ∧ (♯‘𝑌) = 𝑁)) ∧ 𝑋 = (𝑌 cyclShift 𝐾)) ∧ 𝑚 ∈ (0...𝑁)) ∧ 𝑍 = (𝑌 cyclShift 𝑚)) → ∃𝑛 ∈ (0...𝑁)𝑍 = (𝑋 cyclShift 𝑛))
166165rexlimdva2 3217 . . . . . . 7 (((𝐾 ∈ (0...𝑁) ∧ (𝑌 ∈ Word 𝑉 ∧ (♯‘𝑌) = 𝑁)) ∧ 𝑋 = (𝑌 cyclShift 𝐾)) → (∃𝑚 ∈ (0...𝑁)𝑍 = (𝑌 cyclShift 𝑚) → ∃𝑛 ∈ (0...𝑁)𝑍 = (𝑋 cyclShift 𝑛)))
167166ex 412 . . . . . 6 ((𝐾 ∈ (0...𝑁) ∧ (𝑌 ∈ Word 𝑉 ∧ (♯‘𝑌) = 𝑁)) → (𝑋 = (𝑌 cyclShift 𝐾) → (∃𝑚 ∈ (0...𝑁)𝑍 = (𝑌 cyclShift 𝑚) → ∃𝑛 ∈ (0...𝑁)𝑍 = (𝑋 cyclShift 𝑛))))
168167com23 86 . . . . 5 ((𝐾 ∈ (0...𝑁) ∧ (𝑌 ∈ Word 𝑉 ∧ (♯‘𝑌) = 𝑁)) → (∃𝑚 ∈ (0...𝑁)𝑍 = (𝑌 cyclShift 𝑚) → (𝑋 = (𝑌 cyclShift 𝐾) → ∃𝑛 ∈ (0...𝑁)𝑍 = (𝑋 cyclShift 𝑛))))
169168ex 412 . . . 4 (𝐾 ∈ (0...𝑁) → ((𝑌 ∈ Word 𝑉 ∧ (♯‘𝑌) = 𝑁) → (∃𝑚 ∈ (0...𝑁)𝑍 = (𝑌 cyclShift 𝑚) → (𝑋 = (𝑌 cyclShift 𝐾) → ∃𝑛 ∈ (0...𝑁)𝑍 = (𝑋 cyclShift 𝑛)))))
170169com24 95 . . 3 (𝐾 ∈ (0...𝑁) → (𝑋 = (𝑌 cyclShift 𝐾) → (∃𝑚 ∈ (0...𝑁)𝑍 = (𝑌 cyclShift 𝑚) → ((𝑌 ∈ Word 𝑉 ∧ (♯‘𝑌) = 𝑁) → ∃𝑛 ∈ (0...𝑁)𝑍 = (𝑋 cyclShift 𝑛)))))
1711703imp 1109 . 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 395  w3a 1085   = wceq 1541  wcel 2109  wrex 3066   class class class wbr 5078  cfv 6430  (class class class)co 7268  cc 10853  0cc0 10855   + caddc 10858  cle 10994  cmin 11188  0cn0 12216  cz 12302  ...cfz 13221  chash 14025  Word cword 14198   cyclShift ccsh 14482
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1801  ax-4 1815  ax-5 1916  ax-6 1974  ax-7 2014  ax-8 2111  ax-9 2119  ax-10 2140  ax-11 2157  ax-12 2174  ax-ext 2710  ax-rep 5213  ax-sep 5226  ax-nul 5233  ax-pow 5291  ax-pr 5355  ax-un 7579  ax-cnex 10911  ax-resscn 10912  ax-1cn 10913  ax-icn 10914  ax-addcl 10915  ax-addrcl 10916  ax-mulcl 10917  ax-mulrcl 10918  ax-mulcom 10919  ax-addass 10920  ax-mulass 10921  ax-distr 10922  ax-i2m1 10923  ax-1ne0 10924  ax-1rid 10925  ax-rnegex 10926  ax-rrecex 10927  ax-cnre 10928  ax-pre-lttri 10929  ax-pre-lttrn 10930  ax-pre-ltadd 10931  ax-pre-mulgt0 10932  ax-pre-sup 10933
This theorem depends on definitions:  df-bi 206  df-an 396  df-or 844  df-3or 1086  df-3an 1087  df-tru 1544  df-fal 1554  df-ex 1786  df-nf 1790  df-sb 2071  df-mo 2541  df-eu 2570  df-clab 2717  df-cleq 2731  df-clel 2817  df-nfc 2890  df-ne 2945  df-nel 3051  df-ral 3070  df-rex 3071  df-reu 3072  df-rmo 3073  df-rab 3074  df-v 3432  df-sbc 3720  df-csb 3837  df-dif 3894  df-un 3896  df-in 3898  df-ss 3908  df-pss 3910  df-nul 4262  df-if 4465  df-pw 4540  df-sn 4567  df-pr 4569  df-tp 4571  df-op 4573  df-uni 4845  df-int 4885  df-iun 4931  df-br 5079  df-opab 5141  df-mpt 5162  df-tr 5196  df-id 5488  df-eprel 5494  df-po 5502  df-so 5503  df-fr 5543  df-we 5545  df-xp 5594  df-rel 5595  df-cnv 5596  df-co 5597  df-dm 5598  df-rn 5599  df-res 5600  df-ima 5601  df-pred 6199  df-ord 6266  df-on 6267  df-lim 6268  df-suc 6269  df-iota 6388  df-fun 6432  df-fn 6433  df-f 6434  df-f1 6435  df-fo 6436  df-f1o 6437  df-fv 6438  df-riota 7225  df-ov 7271  df-oprab 7272  df-mpo 7273  df-om 7701  df-1st 7817  df-2nd 7818  df-frecs 8081  df-wrecs 8112  df-recs 8186  df-rdg 8225  df-1o 8281  df-er 8472  df-en 8708  df-dom 8709  df-sdom 8710  df-fin 8711  df-sup 9162  df-inf 9163  df-card 9681  df-pnf 10995  df-mnf 10996  df-xr 10997  df-ltxr 10998  df-le 10999  df-sub 11190  df-neg 11191  df-div 11616  df-nn 11957  df-2 12019  df-n0 12217  df-z 12303  df-uz 12565  df-rp 12713  df-fz 13222  df-fzo 13365  df-fl 13493  df-mod 13571  df-hash 14026  df-word 14199  df-concat 14255  df-substr 14335  df-pfx 14365  df-csh 14483
This theorem is referenced by:  eleclclwwlknlem1  28403
  Copyright terms: Public domain W3C validator