Skip to content

Commit d7e2e40

Browse files
committed
docs
1 parent 46e2d04 commit d7e2e40

File tree

11 files changed

+35
-13
lines changed

11 files changed

+35
-13
lines changed

src/Std/Data/DTreeMap/Lemmas.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import Std.Data.DTreeMap.AdditionalOperations
1111
/-!
1212
# Dependent tree map lemmas
1313
14-
This file contains lemmas about `Std.Data.DTreeMap`. Most of the lemmas require
14+
This file contains lemmas about `Std.DTreeMap`. Most of the lemmas require
1515
`TransCmp cmp` for the comparison function `cmp`.
1616
-/
1717

src/Std/Data/ExtDTreeMap/Basic.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ Internally, the tree maps are represented as size-bounded trees, a type of self-
5959
search tree with efficient order statistic lookups.
6060
6161
In contrast to regular dependent tree maps, `Std.ExtDTreeMap` offers several extensionality lemmas
62-
and therefore has more lemmas about equality of tree maps This doesn't affect the amount of
62+
and therefore has more lemmas about equality of tree maps. This doesn't affect the amount of
6363
supported functions though: `Std.ExtDTreeMap` supports all operations from `Std.DTreeMap`.
6464
6565
In order to use most functions, a `TransCmp` instance is required. This is necessary to make sure

src/Std/Data/ExtDTreeMap/Lemmas.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import Std.Data.ExtDTreeMap.Basic
99
/-!
1010
# Extensional dependent tree map lemmas
1111
12-
This file contains lemmas about `Std.Data.ExtDTreeMap`.
12+
This file contains lemmas about `Std.ExtDTreeMap`.
1313
-/
1414

1515
set_option linter.missingDocs true

src/Std/Data/ExtTreeMap/Basic.lean

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ variable {α : Type u} {β : Type v} {γ : Type w} {cmp : α → α → Ordering
2828
namespace Std
2929

3030
/--
31-
Tree maps.
31+
Extensional tree maps.
3232
3333
A tree map stores an assignment of keys to values. It depends on a comparator function that
3434
defines an ordering on the keys and provides efficient order-dependent queries, such as retrieval
@@ -51,6 +51,14 @@ To avoid expensive copies, users should make sure that the tree map is used line
5151
Internally, the tree maps are represented as size-bounded trees, a type of self-balancing binary
5252
search tree with efficient order statistic lookups.
5353
54+
In contrast to regular tree maps, `Std.ExtTreeMap` offers several extensionality lemmas
55+
and therefore has more lemmas about equality of tree maps. This doesn't affect the amount of
56+
supported functions though: `Std.ExtTreeMap` supports all operations from `Std.TreeMap`.
57+
58+
In order to use most functions, a `TransCmp` instance is required. This is necessary to make sure
59+
that the functions are congruent, i.e. equivalent tree maps as parameters produce equivalent return
60+
values.
61+
5462
These tree maps contain a bundled well-formedness invariant, which means that they cannot
5563
be used in nested inductive types. For these use cases, `Std.TreeMap.Raw` and
5664
`Std.TreeMap.Raw.WF` unbundle the invariant from the tree map. When in doubt, prefer

src/Std/Data/ExtTreeMap/Lemmas.lean

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@ import Std.Data.ExtTreeMap.Basic
1010
/-!
1111
# Extensional tree map lemmas
1212
13-
This file contains lemmas about `Std.Data.ExtTreeMap`. Most of the lemmas require
14-
`TransCmp cmp` for the comparison function `cmp`.
13+
This file contains lemmas about `Std.ExtTreeMap`.
1514
-/
1615

1716
set_option linter.missingDocs true

src/Std/Data/ExtTreeSet/Basic.lean

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ variable {α : Type u} {cmp : α → α → Ordering}
2828
namespace Std
2929

3030
/--
31-
Tree sets.
31+
Extensional tree sets.
3232
3333
A tree set stores elements of a certain type in a certain order. It depends on a comparator function
3434
that defines an ordering on the keys and provides efficient order-dependent queries, such as
@@ -50,6 +50,14 @@ To avoid expensive copies, users should make sure that the tree set is used line
5050
Internally, the tree sets are represented as size-bounded trees, a type of self-balancing binary
5151
search tree with efficient order statistic lookups.
5252
53+
In contrast to regular dependent tree maps, `Std.ExtTreeSet` offers several extensionality lemmas
54+
and therefore has more lemmas about equality of tree sets. This doesn't affect the amount of
55+
supported functions though: `Std.ExtTreeSet` supports all operations from `Std.TreeMap`.
56+
57+
In order to use most functions, a `TransCmp` instance is required. This is necessary to make sure
58+
that the functions are congruent, i.e. equivalent tree sets as parameters produce equivalent return
59+
values.
60+
5361
These tree sets contain a bundled well-formedness invariant, which means that they cannot
5462
be used in nested inductive types. For these use cases, `Std.TreeSet.Raw` and
5563
`Std.TreeSet.Raw.WF` unbundle the invariant from the tree set. When in doubt, prefer

src/Std/Data/ExtTreeSet/Lemmas.lean

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@ import Std.Data.ExtTreeSet.Basic
1010
/-!
1111
# Tree set lemmas
1212
13-
This file contains lemmas about `Std.Data.ExtTreeSet`. Most of the lemmas require
14-
`TransCmp cmp` for the comparison function `cmp`.
13+
This file contains lemmas about `Std.ExtTreeSet`.
1514
-/
1615

1716
set_option linter.missingDocs true

src/Std/Data/TreeMap/Basic.lean

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Lemmas about the operations on `Std.TreeMap` will be available in the
1515
module `Std.Data.TreeMap.Lemmas`.
1616
1717
See the module `Std.Data.TreeMap.Raw.Basic` for a variant of this type which is safe to use in
18-
nested inductive types.
18+
nested inductive types and `Std.Data.ExtTreeMap.Basic` for a variant with extensionality.
1919
-/
2020

2121
set_option autoImplicit false
@@ -51,6 +51,10 @@ To avoid expensive copies, users should make sure that the tree map is used line
5151
Internally, the tree maps are represented as size-bounded trees, a type of self-balancing binary
5252
search tree with efficient order statistic lookups.
5353
54+
For use in proofs, the type `Std.ExtTreeMap` of extensional tree maps should be preferred. This
55+
type comes with several extensionality lemmas and provides the same functions but requires a
56+
`TransCmp` instance to work with.
57+
5458
These tree maps contain a bundled well-formedness invariant, which means that they cannot
5559
be used in nested inductive types. For these use cases, `Std.TreeMap.Raw` and
5660
`Std.TreeMap.Raw.WF` unbundle the invariant from the tree map. When in doubt, prefer

src/Std/Data/TreeMap/Lemmas.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import Std.Data.TreeMap.AdditionalOperations
1111
/-!
1212
# Tree map lemmas
1313
14-
This file contains lemmas about `Std.Data.TreeMap`. Most of the lemmas require
14+
This file contains lemmas about `Std.TreeMap`. Most of the lemmas require
1515
`TransCmp cmp` for the comparison function `cmp`.
1616
-/
1717

src/Std/Data/TreeSet/Basic.lean

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Lemmas about the operations on `Std.Data.TreeSet` will be available in the
1515
module `Std.Data.TreeSet.Lemmas`.
1616
1717
See the module `Std.Data.TreeSet.Raw.Basic` for a variant of this type which is safe to use in
18-
nested inductive types.
18+
nested inductive types and `Std.Data.ExtTreeSet.Basic` for a variant with extensionality.
1919
-/
2020

2121
set_option autoImplicit false
@@ -50,6 +50,10 @@ To avoid expensive copies, users should make sure that the tree set is used line
5050
Internally, the tree sets are represented as size-bounded trees, a type of self-balancing binary
5151
search tree with efficient order statistic lookups.
5252
53+
For use in proofs, the type `Std.ExtTreeSet` of extensional tree sets should be preferred. This
54+
type comes with several extensionality lemmas and provides the same functions but requires a
55+
`TransCmp` instance to work with.
56+
5357
These tree sets contain a bundled well-formedness invariant, which means that they cannot
5458
be used in nested inductive types. For these use cases, `Std.TreeSet.Raw` and
5559
`Std.TreeSet.Raw.WF` unbundle the invariant from the tree set. When in doubt, prefer

0 commit comments

Comments
 (0)