Documentation

Mt.Utils.List

theorem Mt.Utils.List.get_in {T : Type u} (l : List T) (idx : Fin (List.length l)) :
List.get l idx l
theorem Mt.Utils.List.get_of_set {T : Type u} (l : List T) (idx : Nat) (a : T) (isLt : idx < List.length (List.set l idx a)) :
List.get (List.set l idx a) { val := idx, isLt := isLt } = a
theorem Mt.Utils.List.erase_subset {T : Type u} {a : T} (l : List T) (idx : Nat) :
a List.eraseIdx l idxa l
theorem Mt.Utils.List.set_subset {T : Type u} {a : T} (l : List T) (idx : Nat) (new_value : T) :
a List.set l idx new_valuea = new_value a l
theorem Mt.Utils.List.index_exists {T : Type u} {a : T} (l : List T) :
a li, List.get l i = a
theorem Mt.Utils.List.erase_set {T : Type u} (l : List T) (idx : Nat) (new_value : T) :
List.eraseIdx (List.set l idx new_value) idx = List.eraseIdx l idx
theorem Mt.Utils.List.eq_of_in_map {U : Type u} {V : Type u} {f : UV} {l : List U} {v : V} :
v List.map f lu, u l v = f u
theorem Mt.Utils.List.get_congr {T : Type u} {l : List T} {l' : List T} (idx : Fin (List.length l)) (eq : l = l') :
theorem Mt.Utils.List.get_congr' {T : Type u} {l : List T} {l' : List T} {i : Fin (List.length l)} {j : Fin (List.length l')} (l_eq : l = l') (i_eq : i.val = j.val) :
theorem Mt.Utils.List.get_of_map {U : Type u} {V : Type u} {f : UV} {l : List U} {idx : Fin (List.length (List.map f l))} :
theorem Mt.Utils.List.set_map_commutes {U : Type u} {V : Type u} (f : UV) (l : List U) (idx : Nat) (new_val : U) :
List.map f (List.set l idx new_val) = List.set (List.map f l) idx (f new_val)
theorem Mt.Utils.List.erase_map_commutes {U : Type u} {V : Type u} (f : UV) (l : List U) (idx : Nat) :