Skip to content

Commit 3f8fc7e

Browse files
committed
finish ExtTreeSet and ExtTreeMap lemmas
1 parent 14f9a5c commit 3f8fc7e

File tree

5 files changed

+4567
-10
lines changed

5 files changed

+4567
-10
lines changed

src/Std/Data/ExtDTreeMap/Lemmas.lean

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1648,7 +1648,7 @@ theorem isEmpty_insertMany_list [TransCmp cmp] {l : List (α × β)} :
16481648
exact DTreeMap.Const.isEmpty_insertMany_list
16491649

16501650
@[simp]
1651-
theorem insertMany_list_eq_empty [TransCmp cmp] {l : List (α × β)} :
1651+
theorem insertMany_list_eq_empty_iff [TransCmp cmp] {l : List (α × β)} :
16521652
insertMany t l = ∅ ↔ t = ∅ ∧ l = [] := by
16531653
simp only [← isEmpty_iff, isEmpty_insertMany_list, Bool.and_eq_true, List.isEmpty_iff]
16541654

@@ -1889,7 +1889,7 @@ theorem isEmpty_insertManyIfNewUnit_list [TransCmp cmp] {l : List α} :
18891889
exact DTreeMap.Const.isEmpty_insertManyIfNewUnit_list
18901890

18911891
@[simp]
1892-
theorem insertManyIfNewUnit_list_eq_empty [TransCmp cmp] {l : List α} :
1892+
theorem insertManyIfNewUnit_list_eq_empty_iff [TransCmp cmp] {l : List α} :
18931893
insertManyIfNewUnit t l = ∅ ↔ t = ∅ ∧ l = [] := by
18941894
simp only [← isEmpty_iff, isEmpty_insertManyIfNewUnit_list, Bool.and_eq_true, List.isEmpty_iff]
18951895

@@ -3734,8 +3734,7 @@ theorem contains_maxKey? [TransCmp cmp] {km} :
37343734
t.inductionOn fun _ => DTreeMap.contains_maxKey?
37353735

37363736
theorem maxKey?_mem [TransCmp cmp] {km} :
3737-
(hkm : t.maxKey? = some km) →
3738-
km ∈ t:=
3737+
(hkm : t.maxKey? = some km) → km ∈ t :=
37393738
t.inductionOn fun _ => DTreeMap.maxKey?_mem
37403739

37413740
theorem isSome_maxKey?_of_contains [TransCmp cmp] {k} :
@@ -4324,7 +4323,6 @@ theorem ext_get? [TransCmp cmp] [LawfulEqCmp cmp] {t₁ t₂ : ExtDTreeMap α β
43244323
(h : ∀ k, t₁.get? k = t₂.get? k) : t₁ = t₂ :=
43254324
t₁.inductionOn₂ t₂ (fun _ _ h => sound (.of_forall_get?_eq h)) h
43264325

4327-
@[simp]
43284326
theorem toList_inj [TransCmp cmp] {t₁ t₂ : ExtDTreeMap α β cmp} :
43294327
t₁.toList = t₂.toList ↔ t₁ = t₂ := by
43304328
constructor
@@ -4362,7 +4360,6 @@ theorem ext_mem_unit [TransCmp cmp] [LawfulEqCmp cmp] {t₁ t₂ : ExtDTreeMap
43624360
(h : ∀ k, k ∈ t₁ ↔ k ∈ t₂) : t₁ = t₂ :=
43634361
t₁.inductionOn₂ t₂ (fun _ _ h => sound (.of_forall_mem_unit_iff h)) h
43644362

4365-
@[simp]
43664363
theorem toList_inj [TransCmp cmp] {t₁ t₂ : ExtDTreeMap α β cmp} :
43674364
Const.toList t₁ = Const.toList t₂ ↔ t₁ = t₂ := by
43684365
constructor

src/Std/Data/ExtTreeMap/Basic.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/-
2-
Copyright (c) 2024 Lean FRO, LLC. All rights reserved.
2+
Copyright (c) 2025 Robin Arnez. All rights reserved.
33
Released under Apache 2.0 license as described in the file LICENSE.
4-
Authors: Markus Himmel, Paul Reichert
4+
Authors: Robin Arnez, Markus Himmel, Paul Reichert
55
-/
66
prelude
77
import Std.Data.ExtDTreeMap.Basic

0 commit comments

Comments
 (0)