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

Theorem 2cshw 13356
Description: Cyclically shifting a word two times. (Contributed by AV, 7-Apr-2018.) (Revised by AV, 4-Jun-2018.) (Revised by AV, 31-Oct-2018.)
Assertion
Ref Expression
2cshw ((𝑊 ∈ Word 𝑉𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) → ((𝑊 cyclShift 𝑀) cyclShift 𝑁) = (𝑊 cyclShift (𝑀 + 𝑁)))

Proof of Theorem 2cshw
Dummy variable 𝑖 is distinct from all other variables.
StepHypRef Expression
1 cshwlen 13342 . . . . 5 ((𝑊 ∈ Word 𝑉𝑀 ∈ ℤ) → (#‘(𝑊 cyclShift 𝑀)) = (#‘𝑊))
213adant3 1073 . . . 4 ((𝑊 ∈ Word 𝑉𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) → (#‘(𝑊 cyclShift 𝑀)) = (#‘𝑊))
3 cshwcl 13341 . . . . . . 7 (𝑊 ∈ Word 𝑉 → (𝑊 cyclShift 𝑀) ∈ Word 𝑉)
43anim1i 589 . . . . . 6 ((𝑊 ∈ Word 𝑉𝑁 ∈ ℤ) → ((𝑊 cyclShift 𝑀) ∈ Word 𝑉𝑁 ∈ ℤ))
543adant2 1072 . . . . 5 ((𝑊 ∈ Word 𝑉𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) → ((𝑊 cyclShift 𝑀) ∈ Word 𝑉𝑁 ∈ ℤ))
6 cshwlen 13342 . . . . 5 (((𝑊 cyclShift 𝑀) ∈ Word 𝑉𝑁 ∈ ℤ) → (#‘((𝑊 cyclShift 𝑀) cyclShift 𝑁)) = (#‘(𝑊 cyclShift 𝑀)))
75, 6syl 17 . . . 4 ((𝑊 ∈ Word 𝑉𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) → (#‘((𝑊 cyclShift 𝑀) cyclShift 𝑁)) = (#‘(𝑊 cyclShift 𝑀)))
8 simp1 1053 . . . . . 6 ((𝑊 ∈ Word 𝑉𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) → 𝑊 ∈ Word 𝑉)
9 zaddcl 11250 . . . . . . 7 ((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) → (𝑀 + 𝑁) ∈ ℤ)
1093adant1 1071 . . . . . 6 ((𝑊 ∈ Word 𝑉𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) → (𝑀 + 𝑁) ∈ ℤ)
118, 10jca 552 . . . . 5 ((𝑊 ∈ Word 𝑉𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) → (𝑊 ∈ Word 𝑉 ∧ (𝑀 + 𝑁) ∈ ℤ))
12 cshwlen 13342 . . . . 5 ((𝑊 ∈ Word 𝑉 ∧ (𝑀 + 𝑁) ∈ ℤ) → (#‘(𝑊 cyclShift (𝑀 + 𝑁))) = (#‘𝑊))
1311, 12syl 17 . . . 4 ((𝑊 ∈ Word 𝑉𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) → (#‘(𝑊 cyclShift (𝑀 + 𝑁))) = (#‘𝑊))
142, 7, 133eqtr4d 2653 . . 3 ((𝑊 ∈ Word 𝑉𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) → (#‘((𝑊 cyclShift 𝑀) cyclShift 𝑁)) = (#‘(𝑊 cyclShift (𝑀 + 𝑁))))
157, 2eqtrd 2643 . . . . . . 7 ((𝑊 ∈ Word 𝑉𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) → (#‘((𝑊 cyclShift 𝑀) cyclShift 𝑁)) = (#‘𝑊))
1615oveq2d 6543 . . . . . 6 ((𝑊 ∈ Word 𝑉𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) → (0..^(#‘((𝑊 cyclShift 𝑀) cyclShift 𝑁))) = (0..^(#‘𝑊)))
1716eleq2d 2672 . . . . 5 ((𝑊 ∈ Word 𝑉𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) → (𝑖 ∈ (0..^(#‘((𝑊 cyclShift 𝑀) cyclShift 𝑁))) ↔ 𝑖 ∈ (0..^(#‘𝑊))))
1833ad2ant1 1074 . . . . . . . . 9 ((𝑊 ∈ Word 𝑉𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) → (𝑊 cyclShift 𝑀) ∈ Word 𝑉)
1918adantr 479 . . . . . . . 8 (((𝑊 ∈ Word 𝑉𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) ∧ 𝑖 ∈ (0..^(#‘𝑊))) → (𝑊 cyclShift 𝑀) ∈ Word 𝑉)
20 simp3 1055 . . . . . . . . 9 ((𝑊 ∈ Word 𝑉𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) → 𝑁 ∈ ℤ)
2120adantr 479 . . . . . . . 8 (((𝑊 ∈ Word 𝑉𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) ∧ 𝑖 ∈ (0..^(#‘𝑊))) → 𝑁 ∈ ℤ)
222eqcomd 2615 . . . . . . . . . . 11 ((𝑊 ∈ Word 𝑉𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) → (#‘𝑊) = (#‘(𝑊 cyclShift 𝑀)))
2322oveq2d 6543 . . . . . . . . . 10 ((𝑊 ∈ Word 𝑉𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) → (0..^(#‘𝑊)) = (0..^(#‘(𝑊 cyclShift 𝑀))))
2423eleq2d 2672 . . . . . . . . 9 ((𝑊 ∈ Word 𝑉𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) → (𝑖 ∈ (0..^(#‘𝑊)) ↔ 𝑖 ∈ (0..^(#‘(𝑊 cyclShift 𝑀)))))
2524biimpa 499 . . . . . . . 8 (((𝑊 ∈ Word 𝑉𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) ∧ 𝑖 ∈ (0..^(#‘𝑊))) → 𝑖 ∈ (0..^(#‘(𝑊 cyclShift 𝑀))))
26 cshwidxmod 13346 . . . . . . . 8 (((𝑊 cyclShift 𝑀) ∈ Word 𝑉𝑁 ∈ ℤ ∧ 𝑖 ∈ (0..^(#‘(𝑊 cyclShift 𝑀)))) → (((𝑊 cyclShift 𝑀) cyclShift 𝑁)‘𝑖) = ((𝑊 cyclShift 𝑀)‘((𝑖 + 𝑁) mod (#‘(𝑊 cyclShift 𝑀)))))
2719, 21, 25, 26syl3anc 1317 . . . . . . 7 (((𝑊 ∈ Word 𝑉𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) ∧ 𝑖 ∈ (0..^(#‘𝑊))) → (((𝑊 cyclShift 𝑀) cyclShift 𝑁)‘𝑖) = ((𝑊 cyclShift 𝑀)‘((𝑖 + 𝑁) mod (#‘(𝑊 cyclShift 𝑀)))))
288adantr 479 . . . . . . . 8 (((𝑊 ∈ Word 𝑉𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) ∧ 𝑖 ∈ (0..^(#‘𝑊))) → 𝑊 ∈ Word 𝑉)
29 simpl2 1057 . . . . . . . 8 (((𝑊 ∈ Word 𝑉𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) ∧ 𝑖 ∈ (0..^(#‘𝑊))) → 𝑀 ∈ ℤ)
30 elfzo0 12331 . . . . . . . . . . . 12 (𝑖 ∈ (0..^(#‘𝑊)) ↔ (𝑖 ∈ ℕ0 ∧ (#‘𝑊) ∈ ℕ ∧ 𝑖 < (#‘𝑊)))
31 nn0z 11233 . . . . . . . . . . . . . . . . 17 (𝑖 ∈ ℕ0𝑖 ∈ ℤ)
3231ad2antrr 757 . . . . . . . . . . . . . . . 16 (((𝑖 ∈ ℕ0 ∧ (#‘𝑊) ∈ ℕ) ∧ (𝑊 ∈ Word 𝑉𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ)) → 𝑖 ∈ ℤ)
3320adantl 480 . . . . . . . . . . . . . . . 16 (((𝑖 ∈ ℕ0 ∧ (#‘𝑊) ∈ ℕ) ∧ (𝑊 ∈ Word 𝑉𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ)) → 𝑁 ∈ ℤ)
3432, 33zaddcld 11318 . . . . . . . . . . . . . . 15 (((𝑖 ∈ ℕ0 ∧ (#‘𝑊) ∈ ℕ) ∧ (𝑊 ∈ Word 𝑉𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ)) → (𝑖 + 𝑁) ∈ ℤ)
35 simpr 475 . . . . . . . . . . . . . . . 16 ((𝑖 ∈ ℕ0 ∧ (#‘𝑊) ∈ ℕ) → (#‘𝑊) ∈ ℕ)
3635adantr 479 . . . . . . . . . . . . . . 15 (((𝑖 ∈ ℕ0 ∧ (#‘𝑊) ∈ ℕ) ∧ (𝑊 ∈ Word 𝑉𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ)) → (#‘𝑊) ∈ ℕ)
3734, 36jca 552 . . . . . . . . . . . . . 14 (((𝑖 ∈ ℕ0 ∧ (#‘𝑊) ∈ ℕ) ∧ (𝑊 ∈ Word 𝑉𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ)) → ((𝑖 + 𝑁) ∈ ℤ ∧ (#‘𝑊) ∈ ℕ))
3837ex 448 . . . . . . . . . . . . 13 ((𝑖 ∈ ℕ0 ∧ (#‘𝑊) ∈ ℕ) → ((𝑊 ∈ Word 𝑉𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) → ((𝑖 + 𝑁) ∈ ℤ ∧ (#‘𝑊) ∈ ℕ)))
39383adant3 1073 . . . . . . . . . . . 12 ((𝑖 ∈ ℕ0 ∧ (#‘𝑊) ∈ ℕ ∧ 𝑖 < (#‘𝑊)) → ((𝑊 ∈ Word 𝑉𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) → ((𝑖 + 𝑁) ∈ ℤ ∧ (#‘𝑊) ∈ ℕ)))
4030, 39sylbi 205 . . . . . . . . . . 11 (𝑖 ∈ (0..^(#‘𝑊)) → ((𝑊 ∈ Word 𝑉𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) → ((𝑖 + 𝑁) ∈ ℤ ∧ (#‘𝑊) ∈ ℕ)))
4140impcom 444 . . . . . . . . . 10 (((𝑊 ∈ Word 𝑉𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) ∧ 𝑖 ∈ (0..^(#‘𝑊))) → ((𝑖 + 𝑁) ∈ ℤ ∧ (#‘𝑊) ∈ ℕ))
42 zmodfzo 12510 . . . . . . . . . 10 (((𝑖 + 𝑁) ∈ ℤ ∧ (#‘𝑊) ∈ ℕ) → ((𝑖 + 𝑁) mod (#‘𝑊)) ∈ (0..^(#‘𝑊)))
4341, 42syl 17 . . . . . . . . 9 (((𝑊 ∈ Word 𝑉𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) ∧ 𝑖 ∈ (0..^(#‘𝑊))) → ((𝑖 + 𝑁) mod (#‘𝑊)) ∈ (0..^(#‘𝑊)))
442oveq2d 6543 . . . . . . . . . . 11 ((𝑊 ∈ Word 𝑉𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) → ((𝑖 + 𝑁) mod (#‘(𝑊 cyclShift 𝑀))) = ((𝑖 + 𝑁) mod (#‘𝑊)))
4544eleq1d 2671 . . . . . . . . . 10 ((𝑊 ∈ Word 𝑉𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) → (((𝑖 + 𝑁) mod (#‘(𝑊 cyclShift 𝑀))) ∈ (0..^(#‘𝑊)) ↔ ((𝑖 + 𝑁) mod (#‘𝑊)) ∈ (0..^(#‘𝑊))))
4645adantr 479 . . . . . . . . 9 (((𝑊 ∈ Word 𝑉𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) ∧ 𝑖 ∈ (0..^(#‘𝑊))) → (((𝑖 + 𝑁) mod (#‘(𝑊 cyclShift 𝑀))) ∈ (0..^(#‘𝑊)) ↔ ((𝑖 + 𝑁) mod (#‘𝑊)) ∈ (0..^(#‘𝑊))))
4743, 46mpbird 245 . . . . . . . 8 (((𝑊 ∈ Word 𝑉𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) ∧ 𝑖 ∈ (0..^(#‘𝑊))) → ((𝑖 + 𝑁) mod (#‘(𝑊 cyclShift 𝑀))) ∈ (0..^(#‘𝑊)))
48 cshwidxmod 13346 . . . . . . . 8 ((𝑊 ∈ Word 𝑉𝑀 ∈ ℤ ∧ ((𝑖 + 𝑁) mod (#‘(𝑊 cyclShift 𝑀))) ∈ (0..^(#‘𝑊))) → ((𝑊 cyclShift 𝑀)‘((𝑖 + 𝑁) mod (#‘(𝑊 cyclShift 𝑀)))) = (𝑊‘((((𝑖 + 𝑁) mod (#‘(𝑊 cyclShift 𝑀))) + 𝑀) mod (#‘𝑊))))
4928, 29, 47, 48syl3anc 1317 . . . . . . 7 (((𝑊 ∈ Word 𝑉𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) ∧ 𝑖 ∈ (0..^(#‘𝑊))) → ((𝑊 cyclShift 𝑀)‘((𝑖 + 𝑁) mod (#‘(𝑊 cyclShift 𝑀)))) = (𝑊‘((((𝑖 + 𝑁) mod (#‘(𝑊 cyclShift 𝑀))) + 𝑀) mod (#‘𝑊))))
50 nn0re 11148 . . . . . . . . . . . . . . . . . . 19 (𝑖 ∈ ℕ0𝑖 ∈ ℝ)
5150ad2antrr 757 . . . . . . . . . . . . . . . . . 18 (((𝑖 ∈ ℕ0 ∧ (#‘𝑊) ∈ ℕ) ∧ (𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ)) → 𝑖 ∈ ℝ)
52 zre 11214 . . . . . . . . . . . . . . . . . . 19 (𝑁 ∈ ℤ → 𝑁 ∈ ℝ)
5352ad2antll 760 . . . . . . . . . . . . . . . . . 18 (((𝑖 ∈ ℕ0 ∧ (#‘𝑊) ∈ ℕ) ∧ (𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ)) → 𝑁 ∈ ℝ)
5451, 53readdcld 9925 . . . . . . . . . . . . . . . . 17 (((𝑖 ∈ ℕ0 ∧ (#‘𝑊) ∈ ℕ) ∧ (𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ)) → (𝑖 + 𝑁) ∈ ℝ)
55 zre 11214 . . . . . . . . . . . . . . . . . 18 (𝑀 ∈ ℤ → 𝑀 ∈ ℝ)
5655ad2antrl 759 . . . . . . . . . . . . . . . . 17 (((𝑖 ∈ ℕ0 ∧ (#‘𝑊) ∈ ℕ) ∧ (𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ)) → 𝑀 ∈ ℝ)
57 nnrp 11674 . . . . . . . . . . . . . . . . . . 19 ((#‘𝑊) ∈ ℕ → (#‘𝑊) ∈ ℝ+)
5857adantl 480 . . . . . . . . . . . . . . . . . 18 ((𝑖 ∈ ℕ0 ∧ (#‘𝑊) ∈ ℕ) → (#‘𝑊) ∈ ℝ+)
5958adantr 479 . . . . . . . . . . . . . . . . 17 (((𝑖 ∈ ℕ0 ∧ (#‘𝑊) ∈ ℕ) ∧ (𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ)) → (#‘𝑊) ∈ ℝ+)
60 modaddmod 12526 . . . . . . . . . . . . . . . . 17 (((𝑖 + 𝑁) ∈ ℝ ∧ 𝑀 ∈ ℝ ∧ (#‘𝑊) ∈ ℝ+) → ((((𝑖 + 𝑁) mod (#‘𝑊)) + 𝑀) mod (#‘𝑊)) = (((𝑖 + 𝑁) + 𝑀) mod (#‘𝑊)))
6154, 56, 59, 60syl3anc 1317 . . . . . . . . . . . . . . . 16 (((𝑖 ∈ ℕ0 ∧ (#‘𝑊) ∈ ℕ) ∧ (𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ)) → ((((𝑖 + 𝑁) mod (#‘𝑊)) + 𝑀) mod (#‘𝑊)) = (((𝑖 + 𝑁) + 𝑀) mod (#‘𝑊)))
62 nn0cn 11149 . . . . . . . . . . . . . . . . . . . 20 (𝑖 ∈ ℕ0𝑖 ∈ ℂ)
6362ad2antrr 757 . . . . . . . . . . . . . . . . . . 19 (((𝑖 ∈ ℕ0 ∧ (#‘𝑊) ∈ ℕ) ∧ (𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ)) → 𝑖 ∈ ℂ)
64 zcn 11215 . . . . . . . . . . . . . . . . . . . 20 (𝑀 ∈ ℤ → 𝑀 ∈ ℂ)
6564ad2antrl 759 . . . . . . . . . . . . . . . . . . 19 (((𝑖 ∈ ℕ0 ∧ (#‘𝑊) ∈ ℕ) ∧ (𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ)) → 𝑀 ∈ ℂ)
66 zcn 11215 . . . . . . . . . . . . . . . . . . . 20 (𝑁 ∈ ℤ → 𝑁 ∈ ℂ)
6766ad2antll 760 . . . . . . . . . . . . . . . . . . 19 (((𝑖 ∈ ℕ0 ∧ (#‘𝑊) ∈ ℕ) ∧ (𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ)) → 𝑁 ∈ ℂ)
68 add32r 10106 . . . . . . . . . . . . . . . . . . 19 ((𝑖 ∈ ℂ ∧ 𝑀 ∈ ℂ ∧ 𝑁 ∈ ℂ) → (𝑖 + (𝑀 + 𝑁)) = ((𝑖 + 𝑁) + 𝑀))
6963, 65, 67, 68syl3anc 1317 . . . . . . . . . . . . . . . . . 18 (((𝑖 ∈ ℕ0 ∧ (#‘𝑊) ∈ ℕ) ∧ (𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ)) → (𝑖 + (𝑀 + 𝑁)) = ((𝑖 + 𝑁) + 𝑀))
7069eqcomd 2615 . . . . . . . . . . . . . . . . 17 (((𝑖 ∈ ℕ0 ∧ (#‘𝑊) ∈ ℕ) ∧ (𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ)) → ((𝑖 + 𝑁) + 𝑀) = (𝑖 + (𝑀 + 𝑁)))
7170oveq1d 6542 . . . . . . . . . . . . . . . 16 (((𝑖 ∈ ℕ0 ∧ (#‘𝑊) ∈ ℕ) ∧ (𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ)) → (((𝑖 + 𝑁) + 𝑀) mod (#‘𝑊)) = ((𝑖 + (𝑀 + 𝑁)) mod (#‘𝑊)))
7261, 71eqtrd 2643 . . . . . . . . . . . . . . 15 (((𝑖 ∈ ℕ0 ∧ (#‘𝑊) ∈ ℕ) ∧ (𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ)) → ((((𝑖 + 𝑁) mod (#‘𝑊)) + 𝑀) mod (#‘𝑊)) = ((𝑖 + (𝑀 + 𝑁)) mod (#‘𝑊)))
7372ex 448 . . . . . . . . . . . . . 14 ((𝑖 ∈ ℕ0 ∧ (#‘𝑊) ∈ ℕ) → ((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) → ((((𝑖 + 𝑁) mod (#‘𝑊)) + 𝑀) mod (#‘𝑊)) = ((𝑖 + (𝑀 + 𝑁)) mod (#‘𝑊))))
74733adant3 1073 . . . . . . . . . . . . 13 ((𝑖 ∈ ℕ0 ∧ (#‘𝑊) ∈ ℕ ∧ 𝑖 < (#‘𝑊)) → ((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) → ((((𝑖 + 𝑁) mod (#‘𝑊)) + 𝑀) mod (#‘𝑊)) = ((𝑖 + (𝑀 + 𝑁)) mod (#‘𝑊))))
7530, 74sylbi 205 . . . . . . . . . . . 12 (𝑖 ∈ (0..^(#‘𝑊)) → ((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) → ((((𝑖 + 𝑁) mod (#‘𝑊)) + 𝑀) mod (#‘𝑊)) = ((𝑖 + (𝑀 + 𝑁)) mod (#‘𝑊))))
7675com12 32 . . . . . . . . . . 11 ((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) → (𝑖 ∈ (0..^(#‘𝑊)) → ((((𝑖 + 𝑁) mod (#‘𝑊)) + 𝑀) mod (#‘𝑊)) = ((𝑖 + (𝑀 + 𝑁)) mod (#‘𝑊))))
77763adant1 1071 . . . . . . . . . 10 ((𝑊 ∈ Word 𝑉𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) → (𝑖 ∈ (0..^(#‘𝑊)) → ((((𝑖 + 𝑁) mod (#‘𝑊)) + 𝑀) mod (#‘𝑊)) = ((𝑖 + (𝑀 + 𝑁)) mod (#‘𝑊))))
7877imp 443 . . . . . . . . 9 (((𝑊 ∈ Word 𝑉𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) ∧ 𝑖 ∈ (0..^(#‘𝑊))) → ((((𝑖 + 𝑁) mod (#‘𝑊)) + 𝑀) mod (#‘𝑊)) = ((𝑖 + (𝑀 + 𝑁)) mod (#‘𝑊)))
7978fveq2d 6092 . . . . . . . 8 (((𝑊 ∈ Word 𝑉𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) ∧ 𝑖 ∈ (0..^(#‘𝑊))) → (𝑊‘((((𝑖 + 𝑁) mod (#‘𝑊)) + 𝑀) mod (#‘𝑊))) = (𝑊‘((𝑖 + (𝑀 + 𝑁)) mod (#‘𝑊))))
802adantr 479 . . . . . . . . . . . 12 (((𝑊 ∈ Word 𝑉𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) ∧ 𝑖 ∈ (0..^(#‘𝑊))) → (#‘(𝑊 cyclShift 𝑀)) = (#‘𝑊))
8180oveq2d 6543 . . . . . . . . . . 11 (((𝑊 ∈ Word 𝑉𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) ∧ 𝑖 ∈ (0..^(#‘𝑊))) → ((𝑖 + 𝑁) mod (#‘(𝑊 cyclShift 𝑀))) = ((𝑖 + 𝑁) mod (#‘𝑊)))
8281oveq1d 6542 . . . . . . . . . 10 (((𝑊 ∈ Word 𝑉𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) ∧ 𝑖 ∈ (0..^(#‘𝑊))) → (((𝑖 + 𝑁) mod (#‘(𝑊 cyclShift 𝑀))) + 𝑀) = (((𝑖 + 𝑁) mod (#‘𝑊)) + 𝑀))
8382oveq1d 6542 . . . . . . . . 9 (((𝑊 ∈ Word 𝑉𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) ∧ 𝑖 ∈ (0..^(#‘𝑊))) → ((((𝑖 + 𝑁) mod (#‘(𝑊 cyclShift 𝑀))) + 𝑀) mod (#‘𝑊)) = ((((𝑖 + 𝑁) mod (#‘𝑊)) + 𝑀) mod (#‘𝑊)))
8483fveq2d 6092 . . . . . . . 8 (((𝑊 ∈ Word 𝑉𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) ∧ 𝑖 ∈ (0..^(#‘𝑊))) → (𝑊‘((((𝑖 + 𝑁) mod (#‘(𝑊 cyclShift 𝑀))) + 𝑀) mod (#‘𝑊))) = (𝑊‘((((𝑖 + 𝑁) mod (#‘𝑊)) + 𝑀) mod (#‘𝑊))))
8510adantr 479 . . . . . . . . 9 (((𝑊 ∈ Word 𝑉𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) ∧ 𝑖 ∈ (0..^(#‘𝑊))) → (𝑀 + 𝑁) ∈ ℤ)
86 simpr 475 . . . . . . . . 9 (((𝑊 ∈ Word 𝑉𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) ∧ 𝑖 ∈ (0..^(#‘𝑊))) → 𝑖 ∈ (0..^(#‘𝑊)))
87 cshwidxmod 13346 . . . . . . . . 9 ((𝑊 ∈ Word 𝑉 ∧ (𝑀 + 𝑁) ∈ ℤ ∧ 𝑖 ∈ (0..^(#‘𝑊))) → ((𝑊 cyclShift (𝑀 + 𝑁))‘𝑖) = (𝑊‘((𝑖 + (𝑀 + 𝑁)) mod (#‘𝑊))))
8828, 85, 86, 87syl3anc 1317 . . . . . . . 8 (((𝑊 ∈ Word 𝑉𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) ∧ 𝑖 ∈ (0..^(#‘𝑊))) → ((𝑊 cyclShift (𝑀 + 𝑁))‘𝑖) = (𝑊‘((𝑖 + (𝑀 + 𝑁)) mod (#‘𝑊))))
8979, 84, 883eqtr4d 2653 . . . . . . 7 (((𝑊 ∈ Word 𝑉𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) ∧ 𝑖 ∈ (0..^(#‘𝑊))) → (𝑊‘((((𝑖 + 𝑁) mod (#‘(𝑊 cyclShift 𝑀))) + 𝑀) mod (#‘𝑊))) = ((𝑊 cyclShift (𝑀 + 𝑁))‘𝑖))
9027, 49, 893eqtrd 2647 . . . . . 6 (((𝑊 ∈ Word 𝑉𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) ∧ 𝑖 ∈ (0..^(#‘𝑊))) → (((𝑊 cyclShift 𝑀) cyclShift 𝑁)‘𝑖) = ((𝑊 cyclShift (𝑀 + 𝑁))‘𝑖))
9190ex 448 . . . . 5 ((𝑊 ∈ Word 𝑉𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) → (𝑖 ∈ (0..^(#‘𝑊)) → (((𝑊 cyclShift 𝑀) cyclShift 𝑁)‘𝑖) = ((𝑊 cyclShift (𝑀 + 𝑁))‘𝑖)))
9217, 91sylbid 228 . . . 4 ((𝑊 ∈ Word 𝑉𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) → (𝑖 ∈ (0..^(#‘((𝑊 cyclShift 𝑀) cyclShift 𝑁))) → (((𝑊 cyclShift 𝑀) cyclShift 𝑁)‘𝑖) = ((𝑊 cyclShift (𝑀 + 𝑁))‘𝑖)))
9392ralrimiv 2947 . . 3 ((𝑊 ∈ Word 𝑉𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) → ∀𝑖 ∈ (0..^(#‘((𝑊 cyclShift 𝑀) cyclShift 𝑁)))(((𝑊 cyclShift 𝑀) cyclShift 𝑁)‘𝑖) = ((𝑊 cyclShift (𝑀 + 𝑁))‘𝑖))
9414, 93jca 552 . 2 ((𝑊 ∈ Word 𝑉𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) → ((#‘((𝑊 cyclShift 𝑀) cyclShift 𝑁)) = (#‘(𝑊 cyclShift (𝑀 + 𝑁))) ∧ ∀𝑖 ∈ (0..^(#‘((𝑊 cyclShift 𝑀) cyclShift 𝑁)))(((𝑊 cyclShift 𝑀) cyclShift 𝑁)‘𝑖) = ((𝑊 cyclShift (𝑀 + 𝑁))‘𝑖)))
95 cshwcl 13341 . . . . . 6 ((𝑊 cyclShift 𝑀) ∈ Word 𝑉 → ((𝑊 cyclShift 𝑀) cyclShift 𝑁) ∈ Word 𝑉)
963, 95syl 17 . . . . 5 (𝑊 ∈ Word 𝑉 → ((𝑊 cyclShift 𝑀) cyclShift 𝑁) ∈ Word 𝑉)
97 cshwcl 13341 . . . . 5 (𝑊 ∈ Word 𝑉 → (𝑊 cyclShift (𝑀 + 𝑁)) ∈ Word 𝑉)
9896, 97jca 552 . . . 4 (𝑊 ∈ Word 𝑉 → (((𝑊 cyclShift 𝑀) cyclShift 𝑁) ∈ Word 𝑉 ∧ (𝑊 cyclShift (𝑀 + 𝑁)) ∈ Word 𝑉))
99983ad2ant1 1074 . . 3 ((𝑊 ∈ Word 𝑉𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) → (((𝑊 cyclShift 𝑀) cyclShift 𝑁) ∈ Word 𝑉 ∧ (𝑊 cyclShift (𝑀 + 𝑁)) ∈ Word 𝑉))
100 eqwrd 13147 . . 3 ((((𝑊 cyclShift 𝑀) cyclShift 𝑁) ∈ Word 𝑉 ∧ (𝑊 cyclShift (𝑀 + 𝑁)) ∈ Word 𝑉) → (((𝑊 cyclShift 𝑀) cyclShift 𝑁) = (𝑊 cyclShift (𝑀 + 𝑁)) ↔ ((#‘((𝑊 cyclShift 𝑀) cyclShift 𝑁)) = (#‘(𝑊 cyclShift (𝑀 + 𝑁))) ∧ ∀𝑖 ∈ (0..^(#‘((𝑊 cyclShift 𝑀) cyclShift 𝑁)))(((𝑊 cyclShift 𝑀) cyclShift 𝑁)‘𝑖) = ((𝑊 cyclShift (𝑀 + 𝑁))‘𝑖))))
10199, 100syl 17 . 2 ((𝑊 ∈ Word 𝑉𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) → (((𝑊 cyclShift 𝑀) cyclShift 𝑁) = (𝑊 cyclShift (𝑀 + 𝑁)) ↔ ((#‘((𝑊 cyclShift 𝑀) cyclShift 𝑁)) = (#‘(𝑊 cyclShift (𝑀 + 𝑁))) ∧ ∀𝑖 ∈ (0..^(#‘((𝑊 cyclShift 𝑀) cyclShift 𝑁)))(((𝑊 cyclShift 𝑀) cyclShift 𝑁)‘𝑖) = ((𝑊 cyclShift (𝑀 + 𝑁))‘𝑖))))
10294, 101mpbird 245 1 ((𝑊 ∈ Word 𝑉𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) → ((𝑊 cyclShift 𝑀) cyclShift 𝑁) = (𝑊 cyclShift (𝑀 + 𝑁)))
Colors of variables: wff setvar class
Syntax hints:  wi 4  wb 194  wa 382  w3a 1030   = wceq 1474  wcel 1976  wral 2895   class class class wbr 4577  cfv 5790  (class class class)co 6527  cc 9790  cr 9791  0cc0 9792   + caddc 9795   < clt 9930  cn 10867  0cn0 11139  cz 11210  +crp 11664  ..^cfzo 12289   mod cmo 12485  #chash 12934  Word cword 13092   cyclShift ccsh 13331
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1712  ax-4 1727  ax-5 1826  ax-6 1874  ax-7 1921  ax-8 1978  ax-9 1985  ax-10 2005  ax-11 2020  ax-12 2033  ax-13 2233  ax-ext 2589  ax-rep 4693  ax-sep 4703  ax-nul 4712  ax-pow 4764  ax-pr 4828  ax-un 6824  ax-cnex 9848  ax-resscn 9849  ax-1cn 9850  ax-icn 9851  ax-addcl 9852  ax-addrcl 9853  ax-mulcl 9854  ax-mulrcl 9855  ax-mulcom 9856  ax-addass 9857  ax-mulass 9858  ax-distr 9859  ax-i2m1 9860  ax-1ne0 9861  ax-1rid 9862  ax-rnegex 9863  ax-rrecex 9864  ax-cnre 9865  ax-pre-lttri 9866  ax-pre-lttrn 9867  ax-pre-ltadd 9868  ax-pre-mulgt0 9869  ax-pre-sup 9870
This theorem depends on definitions:  df-bi 195  df-or 383  df-an 384  df-3or 1031  df-3an 1032  df-tru 1477  df-ex 1695  df-nf 1700  df-sb 1867  df-eu 2461  df-mo 2462  df-clab 2596  df-cleq 2602  df-clel 2605  df-nfc 2739  df-ne 2781  df-nel 2782  df-ral 2900  df-rex 2901  df-reu 2902  df-rmo 2903  df-rab 2904  df-v 3174  df-sbc 3402  df-csb 3499  df-dif 3542  df-un 3544  df-in 3546  df-ss 3553  df-pss 3555  df-nul 3874  df-if 4036  df-pw 4109  df-sn 4125  df-pr 4127  df-tp 4129  df-op 4131  df-uni 4367  df-int 4405  df-iun 4451  df-br 4578  df-opab 4638  df-mpt 4639  df-tr 4675  df-eprel 4939  df-id 4943  df-po 4949  df-so 4950  df-fr 4987  df-we 4989  df-xp 5034  df-rel 5035  df-cnv 5036  df-co 5037  df-dm 5038  df-rn 5039  df-res 5040  df-ima 5041  df-pred 5583  df-ord 5629  df-on 5630  df-lim 5631  df-suc 5632  df-iota 5754  df-fun 5792  df-fn 5793  df-f 5794  df-f1 5795  df-fo 5796  df-f1o 5797  df-fv 5798  df-riota 6489  df-ov 6530  df-oprab 6531  df-mpt2 6532  df-om 6935  df-1st 7036  df-2nd 7037  df-wrecs 7271  df-recs 7332  df-rdg 7370  df-1o 7424  df-oadd 7428  df-er 7606  df-en 7819  df-dom 7820  df-sdom 7821  df-fin 7822  df-sup 8208  df-inf 8209  df-card 8625  df-pnf 9932  df-mnf 9933  df-xr 9934  df-ltxr 9935  df-le 9936  df-sub 10119  df-neg 10120  df-div 10534  df-nn 10868  df-2 10926  df-n0 11140  df-z 11211  df-uz 11520  df-rp 11665  df-fz 12153  df-fzo 12290  df-fl 12410  df-mod 12486  df-hash 12935  df-word 13100  df-concat 13102  df-substr 13104  df-csh 13332
This theorem is referenced by:  2cshwid  13357  2cshwcom  13359  cshweqdif2  13362  2cshwcshw  13368  cshwcshid  13370  cshwcsh2id  13371  cshwshashlem2  15587
  Copyright terms: Public domain W3C validator