Updates of a function along a list #
Updating a function f at the points g i to the values v i, for the indices i of a list in
order, gives f outside the points g i of the list and v i at them, if g is injective. If
the list contains every index, the result is Function.extend g v f.
Main results #
Function.foldl_update_apply: the value after the updates of a list.Function.foldl_update_eq_extend: updates at all indices giveFunction.extend.
theorem Function.foldl_update_apply {ι : Type u_1} {α : Type u_2} {β : Type u_3} [DecidableEq β] {g : ι → β} (hg : Injective g) (v : ι → α) (s : List ι) (f : β → α) (y : β) :
After the updates at the points g i of the indices i of s, a point of s has the value
that extend gives it, and every other point keeps its value.
theorem Function.foldl_update_eq_extend {ι : Type u_1} {α : Type u_2} {β : Type u_3} [DecidableEq β] {g : ι → β} (hg : Injective g) (v : ι → α) {s : List ι} (hs : ∀ (i : ι), i ∈ s) (f : β → α) :
Updates at the points g i of all indices i, in any order, give Function.extend g v f.