Positionwise agreement and dependence for lists #
Two lists agree on a window of positions when their getElem? functions are
Set.EqOn that window. Agreement on Set.Iic j transports truncations
(Set.EqOn.take_eq), and agreement on Set.Ici j transports suffixes
(Set.EqOn.drop_eq). List.DependsOn g K states that g : List α → γ is
determined by the positions in K: equal-length inputs agreeing on K have equal
images — the length-stratified sibling of Function.DependsOn, with the same
congruence form as primary definition and the same factor-through characterization
(List.dependsOn_iff_factorsThrough).
Prefixes agreeing below i have equal i-truncations.
Lists agreeing from i upward have equal i-suffixes.
g is determined by the input positions in K: equal-length inputs agreeing on
K have equal images. The length-stratified sibling of Function.DependsOn.
Equations
- List.DependsOn g K = ∀ ⦃u v : List α⦄, u.length = v.length → Set.EqOn (fun (x : ℕ) => u[x]?) (fun (x : ℕ) => v[x]?) K → g u = g v
Instances For
g is determined at w by the positions in K: any equal-length list agreeing
with w on K has the same image. The pointwise form of List.DependsOn.
Equations
- List.DependsAt g K w = ∀ ⦃v : List α⦄, w.length = v.length → Set.EqOn (fun (x : ℕ) => w[x]?) (fun (x : ℕ) => v[x]?) K → g w = g v
Instances For
g factors through the input's length and its restriction to K.
The pointwise application of window agreement, stated in getElem? form so it
rewrites cleanly.
Agreement on positions up to j transports truncations: h.take_eq for
h : Set.EqOn (u[·]?) (v[·]?) (Set.Iic j).
Agreement on positions from j transports suffixes: h.drop_eq for
h : Set.EqOn (u[·]?) (v[·]?) (Set.Ici j).