Update for finite functions #
This module defines the update operation for finite functions, that is, the equivalent of
Function.update for FinFun.
def Cslib.FinFun.update {β : Type u_1} {α : Type u_2} [Zero β] [DecidableEq α] [DecidableEqZero β] (f : FinFun α β) (a : α) (b : β) :
FinFun α β
FinFun equivalent of Function.update.
Equations
Instances For
@[simp]
theorem Cslib.FinFun.update_coe {β : Type u_2} {α : Type u_1} [Zero β] [DecidableEq α] [DecidableEqZero β] {a : α} {b : β} (f : FinFun α β) :
FinFun.update is consistent with Function.update.
theorem Cslib.FinFun.update_apply {β : Type u_2} {α : Type u_1} [Zero β] [DecidableEq α] [DecidableEqZero β] {a' : α} {b : β} {a : α} (f : FinFun α β) :
Conditional characterisation of the functional interface of FinFun.update.
@[simp]
theorem Cslib.FinFun.update_idem {β : Type u_2} {α : Type u_1} [Zero β] [DecidableEq α] [DecidableEqZero β] {a : α} {b b' : β} (f : FinFun α β) :
Updating a finite function on the same key is the same as doing the last update.
theorem Cslib.FinFun.update_comm {β : Type u_2} {α : Type u_1} [Zero β] [DecidableEq α] [DecidableEqZero β] {a a' : α} {b b' : β} (f : FinFun α β) (h : a ≠ a') :
Updates on different keys commute.
theorem Cslib.FinFun.update_self {β : Type u_2} {α : Type u_1} [Zero β] [DecidableEq α] [DecidableEqZero β] {a : α} (f : FinFun α β) :
Updates that do not change mappings are redundant.
theorem Cslib.FinFun.update_support_subseteq {β : Type u_2} {α : Type u_1} [Zero β] [DecidableEq α] [DecidableEqZero β] {a : α} {b : β} (f : FinFun α β) :
Updating a function never grows its support more than adding the key.