@@ -298,6 +298,9 @@ theorem getElem?_congr [TransCmp cmp] {a b : α} (hab : cmp a b = .eq) :
298298theorem toList_insert_perm [BEq α] [TransCmp cmp] [LawfulBEqCmp cmp] {k : α} {v : β} :
299299 (t.insert k v).toList.Perm (⟨k, v⟩ :: t.toList.filter (¬k == ·.1 )) := DTreeMap.Const.toList_insert_perm
300300
301+ theorem toArray_insert_perm [BEq α] [TransCmp cmp] [LawfulBEqCmp cmp] {k : α} {v : β} :
302+ (t.insert k v).toArray.Perm ((t.toArray.filter (¬k == ·.1 )).push ⟨k, v⟩) := DTreeMap.Const.toArray_insert_perm
303+
301304theorem keys_insertIfNew_perm {t : TreeMap α Unit cmp} [BEq α] [TransCmp cmp] [LawfulBEqCmp cmp] {k : α} :
302305 (t.insertIfNew k ()).keys.Perm (if k ∈ t then t.keys else k :: t.keys) :=
303306 DTreeMap.keys_insertIfNew_perm
@@ -839,6 +842,7 @@ theorem mem_keys [LawfulEqCmp cmp] [TransCmp cmp] {k : α} :
839842 k ∈ t.keys ↔ k ∈ t :=
840843 DTreeMap.mem_keys
841844
845+ @ [simp, grind =]
842846theorem mem_keysArray [LawfulEqCmp cmp] [TransCmp cmp] {k : α} :
843847 k ∈ t.keysArray ↔ k ∈ t :=
844848 DTreeMap.mem_keysArray
@@ -4569,6 +4573,7 @@ theorem toList_filterMap {f : (a : α) → β → Option γ} :
45694573 t.toList.filterMap (fun p => (f p.1 p.2 ).map (fun x => (p.1 , x))) :=
45704574 DTreeMap.Const.toList_filterMap
45714575
4576+ @ [simp, grind =]
45724577theorem toArray_filterMap {f : α → β → Option γ} :
45734578 (t.filterMap f).toArray =
45744579 t.toArray.filterMap (fun p => (f p.1 p.2 ).map (fun x => (p.1 , x))) :=
@@ -4741,6 +4746,7 @@ theorem toList_filter {f : α → β → Bool} :
47414746 (t.filter f).toList = t.toList.filter (fun p => f p.1 p.2 ) :=
47424747 DTreeMap.Const.toList_filter
47434748
4749+ @ [simp, grind =]
47444750theorem toArray_filter {f : α → β → Bool} :
47454751 (t.filter f).toArray = t.toArray.filter (fun p => f p.1 p.2 ) :=
47464752 DTreeMap.Const.toArray_filter
@@ -4936,6 +4942,7 @@ theorem toList_map {f : α → β → γ} :
49364942 (t.map f).toList = t.toList.map (fun p => (p.1 , f p.1 p.2 )) :=
49374943 DTreeMap.Const.toList_map
49384944
4945+ @ [simp, grind =]
49394946theorem toArray_map {f : α → β → γ} :
49404947 (t.map f).toArray = t.toArray.map (fun p => (p.1 , f p.1 p.2 )) :=
49414948 DTreeMap.Const.toArray_map
0 commit comments