File tree Expand file tree Collapse file tree 2 files changed +15
-2
lines changed
Expand file tree Collapse file tree 2 files changed +15
-2
lines changed Original file line number Diff line number Diff line change @@ -2754,12 +2754,16 @@ theorem get?_union_of_contains_right_eq_false [LawfulBEq α] (h₁ : m₁.val.WF
27542754 revert contains_eq_false
27552755 simp_to_model [union, get?, contains]
27562756 intro contains_eq_false
2757+ apply List.getValue?_insertSmallerList_of_contains_eq_false
2758+ exact contains_eq_false
27572759
27582760
27592761theorem get_union_of_contains_right_eq_false [LawfulBEq α] (h₁ : m₁.val.WF) (h₂ : m₂.val.WF)
27602762 {k : α} (contains_eq_false : m₂.contains k = false) {h'} :
27612763 (m₁.union m₂).get k h' = m₁.get k (contains_of_contains_union_of_contains_right_eq_false h₁ h₂ h' contains_eq_false) := by
2762- sorry
2764+ revert contains_eq_false
2765+ simp_to_model [union, get]
2766+ intro contains_eq_false
27632767
27642768theorem union_insert_right_equiv_union_insert [EquivBEq α] [LawfulHashable α] {p : (a : α) × β a}
27652769 (h₁ : m₁.val.WF) (h₂ : m₂.val.WF) :
@@ -2842,7 +2846,7 @@ theorem getKeyD_union_of_mem_left_of_contains_right_eq_false [EquivBEq α]
28422846theorem size_union [EquivBEq α] [LawfulHashable α] (h₁ : m₁.val.WF)
28432847 (h₂ : m₂.val.WF) : (∀ (a : α), m₁.contains a → m₂.contains a = false) →
28442848 (m₁.union m₂).1 .size = m₁.1 .size + m₂.1 .size := by
2845- sorry
2849+ simp_to_model [union, size]
28462850
28472851theorem size_left_le_size_union [EquivBEq α] [LawfulHashable α] (h₁ : m₁.val.WF)
28482852 (h₂ : m₂.val.WF) : m₁.1 .size ≤ (m₁.union m₂).1 .size := by
Original file line number Diff line number Diff line change @@ -3218,6 +3218,15 @@ theorem getValue?_insertSmallerList_of_contains_eq_false [BEq α] [PartialEquivB
32183218 case isFalse =>
32193219 simp only [containsKey_eq_contains_map_fst] at not_contains
32203220 simp [getValueCast?_insertList_of_contains_eq_false not_contains]
3221+
3222+ theorem getValue_insertSmallerList_of_contains_eq_false [BEq α] [PartialEquivBEq α] [LawfulBEq α]
3223+ {l toInsert : List ((a : α) × β a)} {k : α}
3224+ (not_contains : containsKey k toInsert = false)
3225+ {p1 : containsKey k (insertSmallerList l toInsert) = true}
3226+ {p2 : containsKey k l = true}:
3227+ getValueCast k (insertSmallerList l toInsert) p1 = getValueCast k l p2 := by
3228+ sorry
3229+
32213230section
32223231
32233232variable {β : Type v}
You can’t perform that action at this time.
0 commit comments