Skip to content

Commit 77ff30a

Browse files
committed
chore: remove outdated library_note2 usage (leanprover-community#33868)
Mathlib's custom version of library notes is now implemented in Batteries, so we don't need the duplicate `library_note2` command. This PR does a search and replace turning `library_note2` into `library_note`. The syntax remains the same, so search and replace is all that is needed. Co-authored-by: Anne C.A. Baanen <vierkantor@vierkantor.com>
1 parent 072036b commit 77ff30a

File tree

25 files changed

+33
-33
lines changed

25 files changed

+33
-33
lines changed

Archive/Imo/Imo2019Q2.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ as `(2 : ℤ) • ∡ _ _ _ = (2 : ℤ) • ∡ _ _ _`.
3434
-/
3535

3636

37-
library_note2 «IMO geometry formalization conventions» /--
37+
library_note «IMO geometry formalization conventions» /--
3838
We apply the following conventions for formalizing IMO geometry problems. A problem is assumed
3939
to take place in the plane unless that is clearly not intended, so it is not required to prove
4040
that the points are coplanar (whether or not that in fact follows from the other conditions).

Mathlib/Algebra/BigOperators/Group/Finset/Defs.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ theorem prod_val [CommMonoid M] (s : Finset M) : s.1.prod = s.prod id := by
7979

8080
end Finset
8181

82-
library_note2 «operator precedence of big operators» /--
82+
library_note «operator precedence of big operators» /--
8383
There is no established mathematical convention
8484
for the operator precedence of big operators like `∏` and `∑`.
8585
We will have to make a choice.

Mathlib/Algebra/Category/Ring/Limits.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ the underlying types are just the limits in the category of types.
2222

2323

2424
-- We use the following trick a lot of times in this file.
25-
library_note2 «change elaboration strategy with `by apply`» /--
25+
library_note «change elaboration strategy with `by apply`» /--
2626
Some definitions may be extremely slow to elaborate, when the target type to be constructed
2727
is complicated and when the type of the term given in the definition is also complicated and does
2828
not obviously match the target type. In this case, instead of just giving the term, prefixing it

Mathlib/Algebra/Group/Action/Defs.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ export AddSemigroupAction (add_vadd)
153153
export SMulCommClass (smul_comm)
154154
export VAddCommClass (vadd_comm)
155155

156-
library_note2 «bundled maps over different rings» /--
156+
library_note «bundled maps over different rings» /--
157157
Frequently, we find ourselves wanting to express a bilinear map `M →ₗ[R] N →ₗ[R] P` or an
158158
equivalence between maps `(M →ₗ[R] N) ≃ₗ[R] (M' →ₗ[R] N')` where the maps have an associated ring
159159
`R`. Unfortunately, using definitions like these requires that `R` satisfy `CommSemiring R`, and

Mathlib/Algebra/Group/Conj.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ theorem map_surjective {f : α →* β} (hf : Function.Surjective f) :
168168
obtain ⟨a, rfl⟩ := hf b
169169
exact ⟨ConjClasses.mk a, rfl⟩
170170

171-
library_note2 «slow-failing instance priority» /--
171+
library_note «slow-failing instance priority» /--
172172
Certain instances trigger further searches when they are considered as candidate instances;
173173
these instances should be assigned a priority lower than the default of 1000 (for example, 900).
174174

Mathlib/Algebra/Group/Defs.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ end CommMagma
266266
@[ext]
267267
class LeftCancelSemigroup (G : Type u) extends Semigroup G, IsLeftCancelMul G
268268

269-
library_note2 «lower cancel priority» /--
269+
library_note «lower cancel priority» /--
270270
We lower the priority of inheriting from cancellative structures.
271271
This attempts to avoid expensive checks involving bundling and unbundling with the `IsDomain` class.
272272
since `IsDomain` already depends on `Semiring`, we can synthesize that one first.
@@ -402,7 +402,7 @@ include hn ha
402402

403403
end
404404

405-
library_note2 «forgetful inheritance» /--
405+
library_note «forgetful inheritance» /--
406406
Suppose that one can put two mathematical structures on a type, a rich one `R` and a poor one
407407
`P`, and that one can deduce the poor structure from the rich structure through a map `F` (called a
408408
forgetful functor) (think `R = MetricSpace` and `P = TopologicalSpace`). A possible

Mathlib/Algebra/Group/Hom/Defs.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ instance OneHom.funLike : FunLike (OneHom M N) M N where
197197
instance OneHom.oneHomClass : OneHomClass (OneHom M N) M N where
198198
map_one := OneHom.map_one'
199199

200-
library_note2 «hom simp lemma priority»
200+
library_note «hom simp lemma priority»
201201
/--
202202
The hom class hierarchy allows for a single lemma, such as `map_one`, to apply to a large variety
203203
of morphism types, so long as they have an instance of `OneHomClass`. For example, this applies to

Mathlib/Algebra/Group/Pointwise/Set/Basic.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ pointwise subtraction
5353

5454
assert_not_exists Set.iUnion MulAction MonoidWithZero IsOrderedMonoid
5555

56-
library_note2 «pointwise nat action» /--
56+
library_note «pointwise nat action» /--
5757
Pointwise monoids (`Set`, `Finset`, `Filter`) have derived pointwise actions of the form
5858
`SMul α β → SMul α (Set β)`. When `α` is `ℕ` or `ℤ`, this action conflicts with the
5959
nat or int action coming from `Set β` being a `Monoid` or `DivInvMonoid`. For example,

Mathlib/Algebra/Group/Submonoid/Operations.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -619,7 +619,7 @@ variable {F : Type*} [FunLike F M N] [mc : MonoidHomClass F M N]
619619

620620
open Submonoid
621621

622-
library_note2 «range copy pattern» /--
622+
library_note «range copy pattern» /--
623623
For many categories (monoids, modules, rings, ...) the set-theoretic image of a morphism `f` is
624624
a subobject of the codomain. When this is the case, it is useful to define the range of a morphism
625625
in such a way that the underlying carrier set of the range subobject is definitionally

Mathlib/Algebra/HierarchyDesign.lean

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ TODO: Add sections about interactions with topological typeclasses, and order ty
2222
@[expose] public section
2323

2424

25-
library_note2 «the algebraic hierarchy» /-- # The algebraic hierarchy
25+
library_note «the algebraic hierarchy» /-- # The algebraic hierarchy
2626
2727
In any theorem proving environment,
2828
there are difficult decisions surrounding the design of the "algebraic hierarchy".
@@ -189,7 +189,7 @@ Hopefully this document makes it easy to assemble this list.
189189
Another alternative to a TODO list in the doc-strings is adding Github issues.
190190
-/
191191
192-
library_note2 «reducible non-instances» /--
192+
library_note «reducible non-instances» /--
193193
Some definitions that define objects of a class cannot be instances, because they have an
194194
explicit argument that does not occur in the conclusion. An example is `Preorder.lift` that has a
195195
function `f : α → β` as an explicit argument to lift a preorder on `β` to a preorder on `α`.
@@ -206,7 +206,7 @@ sometimes comes from `Units.Preorder` and sometimes from `Units.PartialOrder`.
206206
Therefore, `Preorder.lift` and `PartialOrder.lift` are marked `@[reducible]`.
207207
-/
208208
209-
library_note2 «implicit instance arguments» /--
209+
library_note «implicit instance arguments» /--
210210
There are places where typeclass arguments are specified with implicit `{}` brackets instead of
211211
the usual `[]` brackets. This is done when the instances can be inferred because they are implicit
212212
arguments to the type of one of the other arguments. There are several reasons for doing so.
@@ -226,7 +226,7 @@ abelian groups, but terms `A : ModuleCat ℤ` come with two (propeq) `Module ℤ
226226
one from being `ℤ`-modules, and one from being abelian groups.
227227
-/
228228
229-
library_note2 «lower instance priority» /--
229+
library_note «lower instance priority» /--
230230
Certain instances always apply during type-class resolution. For example, the instance
231231
`AddCommGroup.toAddGroup {α} [AddCommGroup α] : AddGroup α` applies to all type-class
232232
resolution problems of the form `AddGroup _`, and type-class inference will then do an
@@ -243,7 +243,7 @@ Therefore, if we create an instance that always applies, we set the priority of
243243
100 (or something similar, which is below the default value of 1000).
244244
-/
245245
246-
library_note2 «instance argument order» /--
246+
library_note «instance argument order» /--
247247
When type class inference applies an instance, it attempts to solve the sub-goals from left to
248248
right (it used to be from right to left in lean 3). For example in
249249
```

0 commit comments

Comments
 (0)