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

Theorem scshwfzeqfzo 13618
Description: For a nonempty word the sets of shifted words, expressd by a finite interval of integers or by a half-open integer range are identical. (Contributed by Alexander van der Vekens, 15-Jun-2018.)
Assertion
Ref Expression
scshwfzeqfzo ((𝑋 ∈ Word 𝑉𝑋 ≠ ∅ ∧ 𝑁 = (#‘𝑋)) → {𝑦 ∈ Word 𝑉 ∣ ∃𝑛 ∈ (0...𝑁)𝑦 = (𝑋 cyclShift 𝑛)} = {𝑦 ∈ Word 𝑉 ∣ ∃𝑛 ∈ (0..^𝑁)𝑦 = (𝑋 cyclShift 𝑛)})
Distinct variable groups:   𝑛,𝑁,𝑦   𝑛,𝑉,𝑦   𝑛,𝑋,𝑦

Proof of Theorem scshwfzeqfzo
StepHypRef Expression
1 lencl 13356 . . . . . . . . . . . 12 (𝑋 ∈ Word 𝑉 → (#‘𝑋) ∈ ℕ0)
2 elnn0uz 11763 . . . . . . . . . . . 12 ((#‘𝑋) ∈ ℕ0 ↔ (#‘𝑋) ∈ (ℤ‘0))
31, 2sylib 208 . . . . . . . . . . 11 (𝑋 ∈ Word 𝑉 → (#‘𝑋) ∈ (ℤ‘0))
43adantr 480 . . . . . . . . . 10 ((𝑋 ∈ Word 𝑉𝑁 = (#‘𝑋)) → (#‘𝑋) ∈ (ℤ‘0))
5 eleq1 2718 . . . . . . . . . . 11 (𝑁 = (#‘𝑋) → (𝑁 ∈ (ℤ‘0) ↔ (#‘𝑋) ∈ (ℤ‘0)))
65adantl 481 . . . . . . . . . 10 ((𝑋 ∈ Word 𝑉𝑁 = (#‘𝑋)) → (𝑁 ∈ (ℤ‘0) ↔ (#‘𝑋) ∈ (ℤ‘0)))
74, 6mpbird 247 . . . . . . . . 9 ((𝑋 ∈ Word 𝑉𝑁 = (#‘𝑋)) → 𝑁 ∈ (ℤ‘0))
873adant2 1100 . . . . . . . 8 ((𝑋 ∈ Word 𝑉𝑋 ≠ ∅ ∧ 𝑁 = (#‘𝑋)) → 𝑁 ∈ (ℤ‘0))
98adantr 480 . . . . . . 7 (((𝑋 ∈ Word 𝑉𝑋 ≠ ∅ ∧ 𝑁 = (#‘𝑋)) ∧ 𝑦 ∈ Word 𝑉) → 𝑁 ∈ (ℤ‘0))
10 fzisfzounsn 12620 . . . . . . 7 (𝑁 ∈ (ℤ‘0) → (0...𝑁) = ((0..^𝑁) ∪ {𝑁}))
119, 10syl 17 . . . . . 6 (((𝑋 ∈ Word 𝑉𝑋 ≠ ∅ ∧ 𝑁 = (#‘𝑋)) ∧ 𝑦 ∈ Word 𝑉) → (0...𝑁) = ((0..^𝑁) ∪ {𝑁}))
1211rexeqdv 3175 . . . . 5 (((𝑋 ∈ Word 𝑉𝑋 ≠ ∅ ∧ 𝑁 = (#‘𝑋)) ∧ 𝑦 ∈ Word 𝑉) → (∃𝑛 ∈ (0...𝑁)𝑦 = (𝑋 cyclShift 𝑛) ↔ ∃𝑛 ∈ ((0..^𝑁) ∪ {𝑁})𝑦 = (𝑋 cyclShift 𝑛)))
13 rexun 3826 . . . . 5 (∃𝑛 ∈ ((0..^𝑁) ∪ {𝑁})𝑦 = (𝑋 cyclShift 𝑛) ↔ (∃𝑛 ∈ (0..^𝑁)𝑦 = (𝑋 cyclShift 𝑛) ∨ ∃𝑛 ∈ {𝑁}𝑦 = (𝑋 cyclShift 𝑛)))
1412, 13syl6bb 276 . . . 4 (((𝑋 ∈ Word 𝑉𝑋 ≠ ∅ ∧ 𝑁 = (#‘𝑋)) ∧ 𝑦 ∈ Word 𝑉) → (∃𝑛 ∈ (0...𝑁)𝑦 = (𝑋 cyclShift 𝑛) ↔ (∃𝑛 ∈ (0..^𝑁)𝑦 = (𝑋 cyclShift 𝑛) ∨ ∃𝑛 ∈ {𝑁}𝑦 = (𝑋 cyclShift 𝑛))))
15 ax-1 6 . . . . . 6 (∃𝑛 ∈ (0..^𝑁)𝑦 = (𝑋 cyclShift 𝑛) → (((𝑋 ∈ Word 𝑉𝑋 ≠ ∅ ∧ 𝑁 = (#‘𝑋)) ∧ 𝑦 ∈ Word 𝑉) → ∃𝑛 ∈ (0..^𝑁)𝑦 = (𝑋 cyclShift 𝑛)))
16 fvex 6239 . . . . . . . . . . . 12 (#‘𝑋) ∈ V
17 eleq1 2718 . . . . . . . . . . . 12 (𝑁 = (#‘𝑋) → (𝑁 ∈ V ↔ (#‘𝑋) ∈ V))
1816, 17mpbiri 248 . . . . . . . . . . 11 (𝑁 = (#‘𝑋) → 𝑁 ∈ V)
19 oveq2 6698 . . . . . . . . . . . . 13 (𝑛 = 𝑁 → (𝑋 cyclShift 𝑛) = (𝑋 cyclShift 𝑁))
2019eqeq2d 2661 . . . . . . . . . . . 12 (𝑛 = 𝑁 → (𝑦 = (𝑋 cyclShift 𝑛) ↔ 𝑦 = (𝑋 cyclShift 𝑁)))
2120rexsng 4251 . . . . . . . . . . 11 (𝑁 ∈ V → (∃𝑛 ∈ {𝑁}𝑦 = (𝑋 cyclShift 𝑛) ↔ 𝑦 = (𝑋 cyclShift 𝑁)))
2218, 21syl 17 . . . . . . . . . 10 (𝑁 = (#‘𝑋) → (∃𝑛 ∈ {𝑁}𝑦 = (𝑋 cyclShift 𝑛) ↔ 𝑦 = (𝑋 cyclShift 𝑁)))
23223ad2ant3 1104 . . . . . . . . 9 ((𝑋 ∈ Word 𝑉𝑋 ≠ ∅ ∧ 𝑁 = (#‘𝑋)) → (∃𝑛 ∈ {𝑁}𝑦 = (𝑋 cyclShift 𝑛) ↔ 𝑦 = (𝑋 cyclShift 𝑁)))
2423adantr 480 . . . . . . . 8 (((𝑋 ∈ Word 𝑉𝑋 ≠ ∅ ∧ 𝑁 = (#‘𝑋)) ∧ 𝑦 ∈ Word 𝑉) → (∃𝑛 ∈ {𝑁}𝑦 = (𝑋 cyclShift 𝑛) ↔ 𝑦 = (𝑋 cyclShift 𝑁)))
25 oveq2 6698 . . . . . . . . . . . . 13 (𝑁 = (#‘𝑋) → (𝑋 cyclShift 𝑁) = (𝑋 cyclShift (#‘𝑋)))
26253ad2ant3 1104 . . . . . . . . . . . 12 ((𝑋 ∈ Word 𝑉𝑋 ≠ ∅ ∧ 𝑁 = (#‘𝑋)) → (𝑋 cyclShift 𝑁) = (𝑋 cyclShift (#‘𝑋)))
27 cshwn 13589 . . . . . . . . . . . . 13 (𝑋 ∈ Word 𝑉 → (𝑋 cyclShift (#‘𝑋)) = 𝑋)
28273ad2ant1 1102 . . . . . . . . . . . 12 ((𝑋 ∈ Word 𝑉𝑋 ≠ ∅ ∧ 𝑁 = (#‘𝑋)) → (𝑋 cyclShift (#‘𝑋)) = 𝑋)
2926, 28eqtrd 2685 . . . . . . . . . . 11 ((𝑋 ∈ Word 𝑉𝑋 ≠ ∅ ∧ 𝑁 = (#‘𝑋)) → (𝑋 cyclShift 𝑁) = 𝑋)
3029eqeq2d 2661 . . . . . . . . . 10 ((𝑋 ∈ Word 𝑉𝑋 ≠ ∅ ∧ 𝑁 = (#‘𝑋)) → (𝑦 = (𝑋 cyclShift 𝑁) ↔ 𝑦 = 𝑋))
3130adantr 480 . . . . . . . . 9 (((𝑋 ∈ Word 𝑉𝑋 ≠ ∅ ∧ 𝑁 = (#‘𝑋)) ∧ 𝑦 ∈ Word 𝑉) → (𝑦 = (𝑋 cyclShift 𝑁) ↔ 𝑦 = 𝑋))
32 cshw0 13586 . . . . . . . . . . . . . . 15 (𝑋 ∈ Word 𝑉 → (𝑋 cyclShift 0) = 𝑋)
33323ad2ant1 1102 . . . . . . . . . . . . . 14 ((𝑋 ∈ Word 𝑉𝑋 ≠ ∅ ∧ 𝑁 = (#‘𝑋)) → (𝑋 cyclShift 0) = 𝑋)
34 lennncl 13357 . . . . . . . . . . . . . . . . . 18 ((𝑋 ∈ Word 𝑉𝑋 ≠ ∅) → (#‘𝑋) ∈ ℕ)
35343adant3 1101 . . . . . . . . . . . . . . . . 17 ((𝑋 ∈ Word 𝑉𝑋 ≠ ∅ ∧ 𝑁 = (#‘𝑋)) → (#‘𝑋) ∈ ℕ)
36 eleq1 2718 . . . . . . . . . . . . . . . . . 18 (𝑁 = (#‘𝑋) → (𝑁 ∈ ℕ ↔ (#‘𝑋) ∈ ℕ))
37363ad2ant3 1104 . . . . . . . . . . . . . . . . 17 ((𝑋 ∈ Word 𝑉𝑋 ≠ ∅ ∧ 𝑁 = (#‘𝑋)) → (𝑁 ∈ ℕ ↔ (#‘𝑋) ∈ ℕ))
3835, 37mpbird 247 . . . . . . . . . . . . . . . 16 ((𝑋 ∈ Word 𝑉𝑋 ≠ ∅ ∧ 𝑁 = (#‘𝑋)) → 𝑁 ∈ ℕ)
39 lbfzo0 12547 . . . . . . . . . . . . . . . 16 (0 ∈ (0..^𝑁) ↔ 𝑁 ∈ ℕ)
4038, 39sylibr 224 . . . . . . . . . . . . . . 15 ((𝑋 ∈ Word 𝑉𝑋 ≠ ∅ ∧ 𝑁 = (#‘𝑋)) → 0 ∈ (0..^𝑁))
41 oveq2 6698 . . . . . . . . . . . . . . . . . . . 20 (0 = 𝑛 → (𝑋 cyclShift 0) = (𝑋 cyclShift 𝑛))
4241eqeq1d 2653 . . . . . . . . . . . . . . . . . . 19 (0 = 𝑛 → ((𝑋 cyclShift 0) = 𝑋 ↔ (𝑋 cyclShift 𝑛) = 𝑋))
4342eqcoms 2659 . . . . . . . . . . . . . . . . . 18 (𝑛 = 0 → ((𝑋 cyclShift 0) = 𝑋 ↔ (𝑋 cyclShift 𝑛) = 𝑋))
44 eqcom 2658 . . . . . . . . . . . . . . . . . 18 ((𝑋 cyclShift 𝑛) = 𝑋𝑋 = (𝑋 cyclShift 𝑛))
4543, 44syl6bb 276 . . . . . . . . . . . . . . . . 17 (𝑛 = 0 → ((𝑋 cyclShift 0) = 𝑋𝑋 = (𝑋 cyclShift 𝑛)))
4645adantl 481 . . . . . . . . . . . . . . . 16 (((𝑋 ∈ Word 𝑉𝑋 ≠ ∅ ∧ 𝑁 = (#‘𝑋)) ∧ 𝑛 = 0) → ((𝑋 cyclShift 0) = 𝑋𝑋 = (𝑋 cyclShift 𝑛)))
4746biimpd 219 . . . . . . . . . . . . . . 15 (((𝑋 ∈ Word 𝑉𝑋 ≠ ∅ ∧ 𝑁 = (#‘𝑋)) ∧ 𝑛 = 0) → ((𝑋 cyclShift 0) = 𝑋𝑋 = (𝑋 cyclShift 𝑛)))
4840, 47rspcimedv 3342 . . . . . . . . . . . . . 14 ((𝑋 ∈ Word 𝑉𝑋 ≠ ∅ ∧ 𝑁 = (#‘𝑋)) → ((𝑋 cyclShift 0) = 𝑋 → ∃𝑛 ∈ (0..^𝑁)𝑋 = (𝑋 cyclShift 𝑛)))
4933, 48mpd 15 . . . . . . . . . . . . 13 ((𝑋 ∈ Word 𝑉𝑋 ≠ ∅ ∧ 𝑁 = (#‘𝑋)) → ∃𝑛 ∈ (0..^𝑁)𝑋 = (𝑋 cyclShift 𝑛))
5049adantr 480 . . . . . . . . . . . 12 (((𝑋 ∈ Word 𝑉𝑋 ≠ ∅ ∧ 𝑁 = (#‘𝑋)) ∧ 𝑦 ∈ Word 𝑉) → ∃𝑛 ∈ (0..^𝑁)𝑋 = (𝑋 cyclShift 𝑛))
5150adantr 480 . . . . . . . . . . 11 ((((𝑋 ∈ Word 𝑉𝑋 ≠ ∅ ∧ 𝑁 = (#‘𝑋)) ∧ 𝑦 ∈ Word 𝑉) ∧ 𝑦 = 𝑋) → ∃𝑛 ∈ (0..^𝑁)𝑋 = (𝑋 cyclShift 𝑛))
52 eqeq1 2655 . . . . . . . . . . . . 13 (𝑦 = 𝑋 → (𝑦 = (𝑋 cyclShift 𝑛) ↔ 𝑋 = (𝑋 cyclShift 𝑛)))
5352adantl 481 . . . . . . . . . . . 12 ((((𝑋 ∈ Word 𝑉𝑋 ≠ ∅ ∧ 𝑁 = (#‘𝑋)) ∧ 𝑦 ∈ Word 𝑉) ∧ 𝑦 = 𝑋) → (𝑦 = (𝑋 cyclShift 𝑛) ↔ 𝑋 = (𝑋 cyclShift 𝑛)))
5453rexbidv 3081 . . . . . . . . . . 11 ((((𝑋 ∈ Word 𝑉𝑋 ≠ ∅ ∧ 𝑁 = (#‘𝑋)) ∧ 𝑦 ∈ Word 𝑉) ∧ 𝑦 = 𝑋) → (∃𝑛 ∈ (0..^𝑁)𝑦 = (𝑋 cyclShift 𝑛) ↔ ∃𝑛 ∈ (0..^𝑁)𝑋 = (𝑋 cyclShift 𝑛)))
5551, 54mpbird 247 . . . . . . . . . 10 ((((𝑋 ∈ Word 𝑉𝑋 ≠ ∅ ∧ 𝑁 = (#‘𝑋)) ∧ 𝑦 ∈ Word 𝑉) ∧ 𝑦 = 𝑋) → ∃𝑛 ∈ (0..^𝑁)𝑦 = (𝑋 cyclShift 𝑛))
5655ex 449 . . . . . . . . 9 (((𝑋 ∈ Word 𝑉𝑋 ≠ ∅ ∧ 𝑁 = (#‘𝑋)) ∧ 𝑦 ∈ Word 𝑉) → (𝑦 = 𝑋 → ∃𝑛 ∈ (0..^𝑁)𝑦 = (𝑋 cyclShift 𝑛)))
5731, 56sylbid 230 . . . . . . . 8 (((𝑋 ∈ Word 𝑉𝑋 ≠ ∅ ∧ 𝑁 = (#‘𝑋)) ∧ 𝑦 ∈ Word 𝑉) → (𝑦 = (𝑋 cyclShift 𝑁) → ∃𝑛 ∈ (0..^𝑁)𝑦 = (𝑋 cyclShift 𝑛)))
5824, 57sylbid 230 . . . . . . 7 (((𝑋 ∈ Word 𝑉𝑋 ≠ ∅ ∧ 𝑁 = (#‘𝑋)) ∧ 𝑦 ∈ Word 𝑉) → (∃𝑛 ∈ {𝑁}𝑦 = (𝑋 cyclShift 𝑛) → ∃𝑛 ∈ (0..^𝑁)𝑦 = (𝑋 cyclShift 𝑛)))
5958com12 32 . . . . . 6 (∃𝑛 ∈ {𝑁}𝑦 = (𝑋 cyclShift 𝑛) → (((𝑋 ∈ Word 𝑉𝑋 ≠ ∅ ∧ 𝑁 = (#‘𝑋)) ∧ 𝑦 ∈ Word 𝑉) → ∃𝑛 ∈ (0..^𝑁)𝑦 = (𝑋 cyclShift 𝑛)))
6015, 59jaoi 393 . . . . 5 ((∃𝑛 ∈ (0..^𝑁)𝑦 = (𝑋 cyclShift 𝑛) ∨ ∃𝑛 ∈ {𝑁}𝑦 = (𝑋 cyclShift 𝑛)) → (((𝑋 ∈ Word 𝑉𝑋 ≠ ∅ ∧ 𝑁 = (#‘𝑋)) ∧ 𝑦 ∈ Word 𝑉) → ∃𝑛 ∈ (0..^𝑁)𝑦 = (𝑋 cyclShift 𝑛)))
6160com12 32 . . . 4 (((𝑋 ∈ Word 𝑉𝑋 ≠ ∅ ∧ 𝑁 = (#‘𝑋)) ∧ 𝑦 ∈ Word 𝑉) → ((∃𝑛 ∈ (0..^𝑁)𝑦 = (𝑋 cyclShift 𝑛) ∨ ∃𝑛 ∈ {𝑁}𝑦 = (𝑋 cyclShift 𝑛)) → ∃𝑛 ∈ (0..^𝑁)𝑦 = (𝑋 cyclShift 𝑛)))
6214, 61sylbid 230 . . 3 (((𝑋 ∈ Word 𝑉𝑋 ≠ ∅ ∧ 𝑁 = (#‘𝑋)) ∧ 𝑦 ∈ Word 𝑉) → (∃𝑛 ∈ (0...𝑁)𝑦 = (𝑋 cyclShift 𝑛) → ∃𝑛 ∈ (0..^𝑁)𝑦 = (𝑋 cyclShift 𝑛)))
63 fzossfz 12527 . . . 4 (0..^𝑁) ⊆ (0...𝑁)
64 ssrexv 3700 . . . 4 ((0..^𝑁) ⊆ (0...𝑁) → (∃𝑛 ∈ (0..^𝑁)𝑦 = (𝑋 cyclShift 𝑛) → ∃𝑛 ∈ (0...𝑁)𝑦 = (𝑋 cyclShift 𝑛)))
6563, 64mp1i 13 . . 3 (((𝑋 ∈ Word 𝑉𝑋 ≠ ∅ ∧ 𝑁 = (#‘𝑋)) ∧ 𝑦 ∈ Word 𝑉) → (∃𝑛 ∈ (0..^𝑁)𝑦 = (𝑋 cyclShift 𝑛) → ∃𝑛 ∈ (0...𝑁)𝑦 = (𝑋 cyclShift 𝑛)))
6662, 65impbid 202 . 2 (((𝑋 ∈ Word 𝑉𝑋 ≠ ∅ ∧ 𝑁 = (#‘𝑋)) ∧ 𝑦 ∈ Word 𝑉) → (∃𝑛 ∈ (0...𝑁)𝑦 = (𝑋 cyclShift 𝑛) ↔ ∃𝑛 ∈ (0..^𝑁)𝑦 = (𝑋 cyclShift 𝑛)))
6766rabbidva 3219 1 ((𝑋 ∈ Word 𝑉𝑋 ≠ ∅ ∧ 𝑁 = (#‘𝑋)) → {𝑦 ∈ Word 𝑉 ∣ ∃𝑛 ∈ (0...𝑁)𝑦 = (𝑋 cyclShift 𝑛)} = {𝑦 ∈ Word 𝑉 ∣ ∃𝑛 ∈ (0..^𝑁)𝑦 = (𝑋 cyclShift 𝑛)})
Colors of variables: wff setvar class
Syntax hints:  wi 4  wb 196  wo 382  wa 383  w3a 1054   = wceq 1523  wcel 2030  wne 2823  wrex 2942  {crab 2945  Vcvv 3231  cun 3605  wss 3607  c0 3948  {csn 4210  cfv 5926  (class class class)co 6690  0cc0 9974  cn 11058  0cn0 11330  cuz 11725  ...cfz 12364  ..^cfzo 12504  #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-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:  hashecclwwlkn1  27041  umgrhashecclwwlk  27042
  Copyright terms: Public domain W3C validator