Shifting sequences
Content created by Fredrik Bakke and Louis Wasserman.
Created on 2025-08-30.
Last modified on 2025-10-31.
module lists.shifting-sequences where
Idea
Given a sequence f : ℕ → A and an element a : A we
define a
right shift operation¶
shift-ℕ a f : ℕ → A by
shift-ℕ a f zero-ℕ := a
shift-ℕ a f (succ-ℕ n) := f n.
We think of this operation as moving every element to the right, and padding
with the value a.
Definition
shift-ℕ : {l : Level} {A : UU l} (a : A) (f : ℕ → A) → ℕ → A shift-ℕ a f zero-ℕ = a shift-ℕ a f (succ-ℕ n) = f n
Recent changes
- 2025-10-31. Fredrik Bakke. chore: Concepts in
lists(#1654). - 2025-08-30. Louis Wasserman and Fredrik Bakke. Move sequences to
listsnamespace (#1476).