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

Theorem cshw1 13614
 Description: If cyclically shifting a word by 1 position results in the word itself, the word is build of identical symbols. Remark: also "valid" for an empty word! (Contributed by AV, 13-May-2018.) (Revised by AV, 7-Jun-2018.) (Proof shortened by AV, 1-Nov-2018.)
Assertion
Ref Expression
cshw1 ((𝑊 ∈ Word 𝑉 ∧ (𝑊 cyclShift 1) = 𝑊) → ∀𝑖 ∈ (0..^(#‘𝑊))(𝑊𝑖) = (𝑊‘0))
Distinct variable groups:   𝑖,𝑉   𝑖,𝑊

Proof of Theorem cshw1
StepHypRef Expression
1 ral0 4109 . . . 4 𝑖 ∈ ∅ (𝑊𝑖) = (𝑊‘0)
2 oveq2 6698 . . . . . 6 ((#‘𝑊) = 0 → (0..^(#‘𝑊)) = (0..^0))
3 fzo0 12531 . . . . . 6 (0..^0) = ∅
42, 3syl6eq 2701 . . . . 5 ((#‘𝑊) = 0 → (0..^(#‘𝑊)) = ∅)
54raleqdv 3174 . . . 4 ((#‘𝑊) = 0 → (∀𝑖 ∈ (0..^(#‘𝑊))(𝑊𝑖) = (𝑊‘0) ↔ ∀𝑖 ∈ ∅ (𝑊𝑖) = (𝑊‘0)))
61, 5mpbiri 248 . . 3 ((#‘𝑊) = 0 → ∀𝑖 ∈ (0..^(#‘𝑊))(𝑊𝑖) = (𝑊‘0))
76a1d 25 . 2 ((#‘𝑊) = 0 → ((𝑊 ∈ Word 𝑉 ∧ (𝑊 cyclShift 1) = 𝑊) → ∀𝑖 ∈ (0..^(#‘𝑊))(𝑊𝑖) = (𝑊‘0)))
8 simprl 809 . . . . . . . 8 (((¬ (#‘𝑊) = 0 ∧ ¬ (#‘𝑊) = 1) ∧ (𝑊 ∈ Word 𝑉 ∧ (𝑊 cyclShift 1) = 𝑊)) → 𝑊 ∈ Word 𝑉)
9 lencl 13356 . . . . . . . . . . 11 (𝑊 ∈ Word 𝑉 → (#‘𝑊) ∈ ℕ0)
10 1nn0 11346 . . . . . . . . . . . . . 14 1 ∈ ℕ0
1110a1i 11 . . . . . . . . . . . . 13 (((#‘𝑊) ∈ ℕ0 ∧ (¬ (#‘𝑊) = 0 ∧ ¬ (#‘𝑊) = 1)) → 1 ∈ ℕ0)
12 df-ne 2824 . . . . . . . . . . . . . . . 16 ((#‘𝑊) ≠ 0 ↔ ¬ (#‘𝑊) = 0)
13 elnnne0 11344 . . . . . . . . . . . . . . . . 17 ((#‘𝑊) ∈ ℕ ↔ ((#‘𝑊) ∈ ℕ0 ∧ (#‘𝑊) ≠ 0))
1413simplbi2com 656 . . . . . . . . . . . . . . . 16 ((#‘𝑊) ≠ 0 → ((#‘𝑊) ∈ ℕ0 → (#‘𝑊) ∈ ℕ))
1512, 14sylbir 225 . . . . . . . . . . . . . . 15 (¬ (#‘𝑊) = 0 → ((#‘𝑊) ∈ ℕ0 → (#‘𝑊) ∈ ℕ))
1615adantr 480 . . . . . . . . . . . . . 14 ((¬ (#‘𝑊) = 0 ∧ ¬ (#‘𝑊) = 1) → ((#‘𝑊) ∈ ℕ0 → (#‘𝑊) ∈ ℕ))
1716impcom 445 . . . . . . . . . . . . 13 (((#‘𝑊) ∈ ℕ0 ∧ (¬ (#‘𝑊) = 0 ∧ ¬ (#‘𝑊) = 1)) → (#‘𝑊) ∈ ℕ)
18 df-ne 2824 . . . . . . . . . . . . . . . 16 ((#‘𝑊) ≠ 1 ↔ ¬ (#‘𝑊) = 1)
1918biimpri 218 . . . . . . . . . . . . . . 15 (¬ (#‘𝑊) = 1 → (#‘𝑊) ≠ 1)
2019ad2antll 765 . . . . . . . . . . . . . 14 (((#‘𝑊) ∈ ℕ0 ∧ (¬ (#‘𝑊) = 0 ∧ ¬ (#‘𝑊) = 1)) → (#‘𝑊) ≠ 1)
21 nngt1ne1 11085 . . . . . . . . . . . . . . 15 ((#‘𝑊) ∈ ℕ → (1 < (#‘𝑊) ↔ (#‘𝑊) ≠ 1))
2217, 21syl 17 . . . . . . . . . . . . . 14 (((#‘𝑊) ∈ ℕ0 ∧ (¬ (#‘𝑊) = 0 ∧ ¬ (#‘𝑊) = 1)) → (1 < (#‘𝑊) ↔ (#‘𝑊) ≠ 1))
2320, 22mpbird 247 . . . . . . . . . . . . 13 (((#‘𝑊) ∈ ℕ0 ∧ (¬ (#‘𝑊) = 0 ∧ ¬ (#‘𝑊) = 1)) → 1 < (#‘𝑊))
24 elfzo0 12548 . . . . . . . . . . . . 13 (1 ∈ (0..^(#‘𝑊)) ↔ (1 ∈ ℕ0 ∧ (#‘𝑊) ∈ ℕ ∧ 1 < (#‘𝑊)))
2511, 17, 23, 24syl3anbrc 1265 . . . . . . . . . . . 12 (((#‘𝑊) ∈ ℕ0 ∧ (¬ (#‘𝑊) = 0 ∧ ¬ (#‘𝑊) = 1)) → 1 ∈ (0..^(#‘𝑊)))
2625ex 449 . . . . . . . . . . 11 ((#‘𝑊) ∈ ℕ0 → ((¬ (#‘𝑊) = 0 ∧ ¬ (#‘𝑊) = 1) → 1 ∈ (0..^(#‘𝑊))))
279, 26syl 17 . . . . . . . . . 10 (𝑊 ∈ Word 𝑉 → ((¬ (#‘𝑊) = 0 ∧ ¬ (#‘𝑊) = 1) → 1 ∈ (0..^(#‘𝑊))))
2827adantr 480 . . . . . . . . 9 ((𝑊 ∈ Word 𝑉 ∧ (𝑊 cyclShift 1) = 𝑊) → ((¬ (#‘𝑊) = 0 ∧ ¬ (#‘𝑊) = 1) → 1 ∈ (0..^(#‘𝑊))))
2928impcom 445 . . . . . . . 8 (((¬ (#‘𝑊) = 0 ∧ ¬ (#‘𝑊) = 1) ∧ (𝑊 ∈ Word 𝑉 ∧ (𝑊 cyclShift 1) = 𝑊)) → 1 ∈ (0..^(#‘𝑊)))
30 simprr 811 . . . . . . . 8 (((¬ (#‘𝑊) = 0 ∧ ¬ (#‘𝑊) = 1) ∧ (𝑊 ∈ Word 𝑉 ∧ (𝑊 cyclShift 1) = 𝑊)) → (𝑊 cyclShift 1) = 𝑊)
31 lbfzo0 12547 . . . . . . . . . . . . . . . . 17 (0 ∈ (0..^(#‘𝑊)) ↔ (#‘𝑊) ∈ ℕ)
3231biimpri 218 . . . . . . . . . . . . . . . 16 ((#‘𝑊) ∈ ℕ → 0 ∈ (0..^(#‘𝑊)))
3313, 32sylbir 225 . . . . . . . . . . . . . . 15 (((#‘𝑊) ∈ ℕ0 ∧ (#‘𝑊) ≠ 0) → 0 ∈ (0..^(#‘𝑊)))
3433ex 449 . . . . . . . . . . . . . 14 ((#‘𝑊) ∈ ℕ0 → ((#‘𝑊) ≠ 0 → 0 ∈ (0..^(#‘𝑊))))
3512, 34syl5bir 233 . . . . . . . . . . . . 13 ((#‘𝑊) ∈ ℕ0 → (¬ (#‘𝑊) = 0 → 0 ∈ (0..^(#‘𝑊))))
369, 35syl 17 . . . . . . . . . . . 12 (𝑊 ∈ Word 𝑉 → (¬ (#‘𝑊) = 0 → 0 ∈ (0..^(#‘𝑊))))
3736adantr 480 . . . . . . . . . . 11 ((𝑊 ∈ Word 𝑉 ∧ (𝑊 cyclShift 1) = 𝑊) → (¬ (#‘𝑊) = 0 → 0 ∈ (0..^(#‘𝑊))))
3837com12 32 . . . . . . . . . 10 (¬ (#‘𝑊) = 0 → ((𝑊 ∈ Word 𝑉 ∧ (𝑊 cyclShift 1) = 𝑊) → 0 ∈ (0..^(#‘𝑊))))
3938adantr 480 . . . . . . . . 9 ((¬ (#‘𝑊) = 0 ∧ ¬ (#‘𝑊) = 1) → ((𝑊 ∈ Word 𝑉 ∧ (𝑊 cyclShift 1) = 𝑊) → 0 ∈ (0..^(#‘𝑊))))
4039imp 444 . . . . . . . 8 (((¬ (#‘𝑊) = 0 ∧ ¬ (#‘𝑊) = 1) ∧ (𝑊 ∈ Word 𝑉 ∧ (𝑊 cyclShift 1) = 𝑊)) → 0 ∈ (0..^(#‘𝑊)))
41 elfzoelz 12509 . . . . . . . . . 10 (1 ∈ (0..^(#‘𝑊)) → 1 ∈ ℤ)
42 cshweqrep 13613 . . . . . . . . . 10 ((𝑊 ∈ Word 𝑉 ∧ 1 ∈ ℤ) → (((𝑊 cyclShift 1) = 𝑊 ∧ 0 ∈ (0..^(#‘𝑊))) → ∀𝑖 ∈ ℕ0 (𝑊‘0) = (𝑊‘((0 + (𝑖 · 1)) mod (#‘𝑊)))))
4341, 42sylan2 490 . . . . . . . . 9 ((𝑊 ∈ Word 𝑉 ∧ 1 ∈ (0..^(#‘𝑊))) → (((𝑊 cyclShift 1) = 𝑊 ∧ 0 ∈ (0..^(#‘𝑊))) → ∀𝑖 ∈ ℕ0 (𝑊‘0) = (𝑊‘((0 + (𝑖 · 1)) mod (#‘𝑊)))))
4443imp 444 . . . . . . . 8 (((𝑊 ∈ Word 𝑉 ∧ 1 ∈ (0..^(#‘𝑊))) ∧ ((𝑊 cyclShift 1) = 𝑊 ∧ 0 ∈ (0..^(#‘𝑊)))) → ∀𝑖 ∈ ℕ0 (𝑊‘0) = (𝑊‘((0 + (𝑖 · 1)) mod (#‘𝑊))))
458, 29, 30, 40, 44syl22anc 1367 . . . . . . 7 (((¬ (#‘𝑊) = 0 ∧ ¬ (#‘𝑊) = 1) ∧ (𝑊 ∈ Word 𝑉 ∧ (𝑊 cyclShift 1) = 𝑊)) → ∀𝑖 ∈ ℕ0 (𝑊‘0) = (𝑊‘((0 + (𝑖 · 1)) mod (#‘𝑊))))
46 0nn0 11345 . . . . . . . . 9 0 ∈ ℕ0
47 fzossnn0 12538 . . . . . . . . 9 (0 ∈ ℕ0 → (0..^(#‘𝑊)) ⊆ ℕ0)
48 ssralv 3699 . . . . . . . . 9 ((0..^(#‘𝑊)) ⊆ ℕ0 → (∀𝑖 ∈ ℕ0 (𝑊‘0) = (𝑊‘((0 + (𝑖 · 1)) mod (#‘𝑊))) → ∀𝑖 ∈ (0..^(#‘𝑊))(𝑊‘0) = (𝑊‘((0 + (𝑖 · 1)) mod (#‘𝑊)))))
4946, 47, 48mp2b 10 . . . . . . . 8 (∀𝑖 ∈ ℕ0 (𝑊‘0) = (𝑊‘((0 + (𝑖 · 1)) mod (#‘𝑊))) → ∀𝑖 ∈ (0..^(#‘𝑊))(𝑊‘0) = (𝑊‘((0 + (𝑖 · 1)) mod (#‘𝑊))))
50 eqcom 2658 . . . . . . . . . 10 ((𝑊‘0) = (𝑊‘((0 + (𝑖 · 1)) mod (#‘𝑊))) ↔ (𝑊‘((0 + (𝑖 · 1)) mod (#‘𝑊))) = (𝑊‘0))
51 elfzoelz 12509 . . . . . . . . . . . . . . . 16 (𝑖 ∈ (0..^(#‘𝑊)) → 𝑖 ∈ ℤ)
52 zre 11419 . . . . . . . . . . . . . . . . . . 19 (𝑖 ∈ ℤ → 𝑖 ∈ ℝ)
53 ax-1rid 10044 . . . . . . . . . . . . . . . . . . 19 (𝑖 ∈ ℝ → (𝑖 · 1) = 𝑖)
5452, 53syl 17 . . . . . . . . . . . . . . . . . 18 (𝑖 ∈ ℤ → (𝑖 · 1) = 𝑖)
5554oveq2d 6706 . . . . . . . . . . . . . . . . 17 (𝑖 ∈ ℤ → (0 + (𝑖 · 1)) = (0 + 𝑖))
56 zcn 11420 . . . . . . . . . . . . . . . . . 18 (𝑖 ∈ ℤ → 𝑖 ∈ ℂ)
5756addid2d 10275 . . . . . . . . . . . . . . . . 17 (𝑖 ∈ ℤ → (0 + 𝑖) = 𝑖)
5855, 57eqtrd 2685 . . . . . . . . . . . . . . . 16 (𝑖 ∈ ℤ → (0 + (𝑖 · 1)) = 𝑖)
5951, 58syl 17 . . . . . . . . . . . . . . 15 (𝑖 ∈ (0..^(#‘𝑊)) → (0 + (𝑖 · 1)) = 𝑖)
6059oveq1d 6705 . . . . . . . . . . . . . 14 (𝑖 ∈ (0..^(#‘𝑊)) → ((0 + (𝑖 · 1)) mod (#‘𝑊)) = (𝑖 mod (#‘𝑊)))
61 zmodidfzoimp 12740 . . . . . . . . . . . . . 14 (𝑖 ∈ (0..^(#‘𝑊)) → (𝑖 mod (#‘𝑊)) = 𝑖)
6260, 61eqtrd 2685 . . . . . . . . . . . . 13 (𝑖 ∈ (0..^(#‘𝑊)) → ((0 + (𝑖 · 1)) mod (#‘𝑊)) = 𝑖)
6362fveq2d 6233 . . . . . . . . . . . 12 (𝑖 ∈ (0..^(#‘𝑊)) → (𝑊‘((0 + (𝑖 · 1)) mod (#‘𝑊))) = (𝑊𝑖))
6463eqeq1d 2653 . . . . . . . . . . 11 (𝑖 ∈ (0..^(#‘𝑊)) → ((𝑊‘((0 + (𝑖 · 1)) mod (#‘𝑊))) = (𝑊‘0) ↔ (𝑊𝑖) = (𝑊‘0)))
6564biimpd 219 . . . . . . . . . 10 (𝑖 ∈ (0..^(#‘𝑊)) → ((𝑊‘((0 + (𝑖 · 1)) mod (#‘𝑊))) = (𝑊‘0) → (𝑊𝑖) = (𝑊‘0)))
6650, 65syl5bi 232 . . . . . . . . 9 (𝑖 ∈ (0..^(#‘𝑊)) → ((𝑊‘0) = (𝑊‘((0 + (𝑖 · 1)) mod (#‘𝑊))) → (𝑊𝑖) = (𝑊‘0)))
6766ralimia 2979 . . . . . . . 8 (∀𝑖 ∈ (0..^(#‘𝑊))(𝑊‘0) = (𝑊‘((0 + (𝑖 · 1)) mod (#‘𝑊))) → ∀𝑖 ∈ (0..^(#‘𝑊))(𝑊𝑖) = (𝑊‘0))
6849, 67syl 17 . . . . . . 7 (∀𝑖 ∈ ℕ0 (𝑊‘0) = (𝑊‘((0 + (𝑖 · 1)) mod (#‘𝑊))) → ∀𝑖 ∈ (0..^(#‘𝑊))(𝑊𝑖) = (𝑊‘0))
6945, 68syl 17 . . . . . 6 (((¬ (#‘𝑊) = 0 ∧ ¬ (#‘𝑊) = 1) ∧ (𝑊 ∈ Word 𝑉 ∧ (𝑊 cyclShift 1) = 𝑊)) → ∀𝑖 ∈ (0..^(#‘𝑊))(𝑊𝑖) = (𝑊‘0))
7069ex 449 . . . . 5 ((¬ (#‘𝑊) = 0 ∧ ¬ (#‘𝑊) = 1) → ((𝑊 ∈ Word 𝑉 ∧ (𝑊 cyclShift 1) = 𝑊) → ∀𝑖 ∈ (0..^(#‘𝑊))(𝑊𝑖) = (𝑊‘0)))
7170impancom 455 . . . 4 ((¬ (#‘𝑊) = 0 ∧ (𝑊 ∈ Word 𝑉 ∧ (𝑊 cyclShift 1) = 𝑊)) → (¬ (#‘𝑊) = 1 → ∀𝑖 ∈ (0..^(#‘𝑊))(𝑊𝑖) = (𝑊‘0)))
72 eqid 2651 . . . . . 6 (𝑊‘0) = (𝑊‘0)
73 c0ex 10072 . . . . . . 7 0 ∈ V
74 fveq2 6229 . . . . . . . 8 (𝑖 = 0 → (𝑊𝑖) = (𝑊‘0))
7574eqeq1d 2653 . . . . . . 7 (𝑖 = 0 → ((𝑊𝑖) = (𝑊‘0) ↔ (𝑊‘0) = (𝑊‘0)))
7673, 75ralsn 4254 . . . . . 6 (∀𝑖 ∈ {0} (𝑊𝑖) = (𝑊‘0) ↔ (𝑊‘0) = (𝑊‘0))
7772, 76mpbir 221 . . . . 5 𝑖 ∈ {0} (𝑊𝑖) = (𝑊‘0)
78 oveq2 6698 . . . . . . 7 ((#‘𝑊) = 1 → (0..^(#‘𝑊)) = (0..^1))
79 fzo01 12590 . . . . . . 7 (0..^1) = {0}
8078, 79syl6eq 2701 . . . . . 6 ((#‘𝑊) = 1 → (0..^(#‘𝑊)) = {0})
8180raleqdv 3174 . . . . 5 ((#‘𝑊) = 1 → (∀𝑖 ∈ (0..^(#‘𝑊))(𝑊𝑖) = (𝑊‘0) ↔ ∀𝑖 ∈ {0} (𝑊𝑖) = (𝑊‘0)))
8277, 81mpbiri 248 . . . 4 ((#‘𝑊) = 1 → ∀𝑖 ∈ (0..^(#‘𝑊))(𝑊𝑖) = (𝑊‘0))
8371, 82pm2.61d2 172 . . 3 ((¬ (#‘𝑊) = 0 ∧ (𝑊 ∈ Word 𝑉 ∧ (𝑊 cyclShift 1) = 𝑊)) → ∀𝑖 ∈ (0..^(#‘𝑊))(𝑊𝑖) = (𝑊‘0))
8483ex 449 . 2 (¬ (#‘𝑊) = 0 → ((𝑊 ∈ Word 𝑉 ∧ (𝑊 cyclShift 1) = 𝑊) → ∀𝑖 ∈ (0..^(#‘𝑊))(𝑊𝑖) = (𝑊‘0)))
857, 84pm2.61i 176 1 ((𝑊 ∈ Word 𝑉 ∧ (𝑊 cyclShift 1) = 𝑊) → ∀𝑖 ∈ (0..^(#‘𝑊))(𝑊𝑖) = (𝑊‘0))
 Colors of variables: wff setvar class Syntax hints:  ¬ wn 3   → wi 4   ↔ wb 196   ∧ wa 383   = wceq 1523   ∈ wcel 2030   ≠ wne 2823  ∀wral 2941   ⊆ wss 3607  ∅c0 3948  {csn 4210   class class class wbr 4685  ‘cfv 5926  (class class class)co 6690  ℝcr 9973  0cc0 9974  1c1 9975   + caddc 9977   · cmul 9979   < clt 10112  ℕcn 11058  ℕ0cn0 11330  ℤcz 11415  ..^cfzo 12504   mod cmo 12708  #chash 13157  Word cword 13323   cyclShift ccsh 13580 This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1762  ax-4 1777  ax-5 1879  ax-6 1945  ax-7 1981  ax-8 2032  ax-9 2039  ax-10 2059  ax-11 2074  ax-12 2087  ax-13 2282  ax-ext 2631  ax-rep 4804  ax-sep 4814  ax-nul 4822  ax-pow 4873  ax-pr 4936  ax-un 6991  ax-cnex 10030  ax-resscn 10031  ax-1cn 10032  ax-icn 10033  ax-addcl 10034  ax-addrcl 10035  ax-mulcl 10036  ax-mulrcl 10037  ax-mulcom 10038  ax-addass 10039  ax-mulass 10040  ax-distr 10041  ax-i2m1 10042  ax-1ne0 10043  ax-1rid 10044  ax-rnegex 10045  ax-rrecex 10046  ax-cnre 10047  ax-pre-lttri 10048  ax-pre-lttrn 10049  ax-pre-ltadd 10050  ax-pre-mulgt0 10051  ax-pre-sup 10052 This theorem depends on definitions:  df-bi 197  df-or 384  df-an 385  df-3or 1055  df-3an 1056  df-tru 1526  df-ex 1745  df-nf 1750  df-sb 1938  df-eu 2502  df-mo 2503  df-clab 2638  df-cleq 2644  df-clel 2647  df-nfc 2782  df-ne 2824  df-nel 2927  df-ral 2946  df-rex 2947  df-reu 2948  df-rmo 2949  df-rab 2950  df-v 3233  df-sbc 3469  df-csb 3567  df-dif 3610  df-un 3612  df-in 3614  df-ss 3621  df-pss 3623  df-nul 3949  df-if 4120  df-pw 4193  df-sn 4211  df-pr 4213  df-tp 4215  df-op 4217  df-uni 4469  df-int 4508  df-iun 4554  df-br 4686  df-opab 4746  df-mpt 4763  df-tr 4786  df-id 5053  df-eprel 5058  df-po 5064  df-so 5065  df-fr 5102  df-we 5104  df-xp 5149  df-rel 5150  df-cnv 5151  df-co 5152  df-dm 5153  df-rn 5154  df-res 5155  df-ima 5156  df-pred 5718  df-ord 5764  df-on 5765  df-lim 5766  df-suc 5767  df-iota 5889  df-fun 5928  df-fn 5929  df-f 5930  df-f1 5931  df-fo 5932  df-f1o 5933  df-fv 5934  df-riota 6651  df-ov 6693  df-oprab 6694  df-mpt2 6695  df-om 7108  df-1st 7210  df-2nd 7211  df-wrecs 7452  df-recs 7513  df-rdg 7551  df-1o 7605  df-oadd 7609  df-er 7787  df-en 7998  df-dom 7999  df-sdom 8000  df-fin 8001  df-sup 8389  df-inf 8390  df-card 8803  df-pnf 10114  df-mnf 10115  df-xr 10116  df-ltxr 10117  df-le 10118  df-sub 10306  df-neg 10307  df-div 10723  df-nn 11059  df-2 11117  df-n0 11331  df-z 11416  df-uz 11726  df-rp 11871  df-fz 12365  df-fzo 12505  df-fl 12633  df-mod 12709  df-hash 13158  df-word 13331  df-concat 13333  df-substr 13335  df-csh 13581 This theorem is referenced by:  cshw1repsw  13615
 Copyright terms: Public domain W3C validator