Skip to content

Commit 86fa982

Browse files
authored
Merge pull request #506 from Seasawher/auto-update-branch
2 parents 07c2dcf + 0c5edfc commit 86fa982

File tree

6 files changed

+612
-1212
lines changed

6 files changed

+612
-1212
lines changed

docs/attributes.md

Lines changed: 45 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Attributes
22

3-
Mathlib version: `9e574589c15b3b233d3223f1b35871a798cc2748`
3+
Mathlib version: `f8b9dcc5a5bc008436dc0a61b9a17be4d520d7ea`
44

55
## Std.Internal.tree_tac
66
simp theorems used by internal DTreeMap lemmas
@@ -164,9 +164,6 @@ syntax and don't have access to the expression tree.
164164
## bitvec_to_nat
165165
simp lemmas converting `BitVec` goals to `Nat` goals
166166

167-
## boolToPropSimps
168-
simp lemmas converting boolean expressions in terms of `decide` into propositional statements
169-
170167
## bool_to_prop
171168
simp lemmas converting boolean expressions in terms of `decide` into propositional statements
172169

@@ -257,6 +254,9 @@ the Lean source code.
257254
## builtin_doc_code_block
258255
docstring code block expander
259256

257+
## builtin_doc_code_block_suggestions
258+
builtin docstring code block suggestion provider
259+
260260
## builtin_doc_code_suggestions
261261
docstring code element suggestion provider
262262

@@ -276,6 +276,9 @@ Registers a formatter for a parser.
276276
`@[formatter k]` registers a declaration of type `Lean.PrettyPrinter.Formatter` to be used for
277277
formatting syntax of kind `k`.
278278

279+
## builtin_grind_tactic
280+
(builtin) grind elaborator
281+
279282
## builtin_incremental
280283
(builtin) Marks an elaborator (tactic or command, currently) as supporting incremental elaboration. For unmarked elaborators, the corresponding snapshot bundle field in the elaboration context is unset so as to prevent accidental, incorrect reuse.
281284
Marks an elaborator (tactic or command, currently) as supporting incremental elaboration.
@@ -395,9 +398,6 @@ Registers a widget module. Its type must implement `Lean.Widget.ToModule`.
395398
## bv_normalize_proc
396399
simprocs used by bv_normalize
397400

398-
## bv_toNat
399-
simp lemmas converting `BitVec` goals to `Nat` goals, for the `bv_omega` preprocessor
400-
401401
## cases_eliminator
402402
custom `casesOn`-like eliminator for the `cases` tactic
403403
Registers a custom eliminator for the `cases` tactic.
@@ -587,6 +587,9 @@ special casing. If the term is an `Expr.mdata` with a single key `k`, `mdata.k`
587587
## doc_code_block
588588
docstring code block expander
589589

590+
## doc_code_block_suggestions
591+
docstring code block suggestion provider
592+
590593
## doc_code_suggestions
591594
docstring code element suggestion provider
592595

@@ -691,8 +694,6 @@ type. This may prevent the elaborator from incorrectly inferring implicit argume
691694

692695
## eqns
693696
Overrides the equation lemmas for a declaration to the provided list
694-
Similar to `registerParametricAttribute` except that attributes do not
695-
have to be assigned in the same file as the declaration.
696697

697698
## export
698699
name to be used by code generators
@@ -733,7 +734,6 @@ have the module system enabled.
733734
734735
## expr_presenter
735736
Register an Expr presenter. It must have the type `ProofWidgets.ExprPresenter`.
736-
Register an Expr presenter. It must have the type `ProofWidgets.ExprPresenter`.
737737
738738
## ext
739739
Marks a theorem as an extensionality theorem
@@ -804,22 +804,47 @@ types where we did not generate them imediatelly (due to `set_option genCtorIdx
804804
using respectively the left-hand side, the right-hand side, or both sides of the theorem.When applied to a function, `[grind =]` automatically annotates the equational theorems associated with that function.When applied to a theorem `[grind ←]` will instantiate the theorem whenever it encounters the conclusion of the theorem
805805
(that is, it will use the theorem for backwards reasoning).When applied to a theorem `[grind →]` will instantiate the theorem whenever it encounters sufficiently many of the propositional hypotheses
806806
(that is, it will use the theorem for forwards reasoning).The attribute `[grind]` by itself will effectively try `[grind ←]` (if the conclusion is sufficient for instantiation) and then `[grind →]`.The `grind` tactic utilizes annotated theorems to add instances of matching patterns into the local context during proof search.For example, if a theorem `@[grind =] theorem foo_idempotent : foo (foo x) = foo x` is annotated,`grind` will add an instance of this theorem to the local context whenever it encounters the pattern `foo (foo x)`.
807-
Auxiliary function for registering `grind` and `grind?` attributes.
808-
The `grind?` is an alias for `grind` which displays patterns using `logInfo`.
807+
Auxiliary function for registering `grind`, `grind!`, `grind?`, and `grind!?` attributes.
808+
`grind!` is like `grind` but selects minimal indexable subterms.
809+
The `grind?` and `grind!?` are aliases for `grind` and `grind!` which displays patterns using `logInfo`.
810+
It is just a convenience for users.
811+
812+
## grind!
813+
The `[grind!]` attribute is used to annotate declarations, but selecting minimal indexable subterms.When applied to an equational theorem, `[grind =]`, `[grind =_]`, or `[grind _=_]`will mark the theorem for use in heuristic instantiations by the `grind` tactic,
814+
using respectively the left-hand side, the right-hand side, or both sides of the theorem.When applied to a function, `[grind =]` automatically annotates the equational theorems associated with that function.When applied to a theorem `[grind ←]` will instantiate the theorem whenever it encounters the conclusion of the theorem
815+
(that is, it will use the theorem for backwards reasoning).When applied to a theorem `[grind →]` will instantiate the theorem whenever it encounters sufficiently many of the propositional hypotheses
816+
(that is, it will use the theorem for forwards reasoning).The attribute `[grind]` by itself will effectively try `[grind ←]` (if the conclusion is sufficient for instantiation) and then `[grind →]`.The `grind` tactic utilizes annotated theorems to add instances of matching patterns into the local context during proof search.For example, if a theorem `@[grind =] theorem foo_idempotent : foo (foo x) = foo x` is annotated,`grind` will add an instance of this theorem to the local context whenever it encounters the pattern `foo (foo x)`.
817+
Auxiliary function for registering `grind`, `grind!`, `grind?`, and `grind!?` attributes.
818+
`grind!` is like `grind` but selects minimal indexable subterms.
819+
The `grind?` and `grind!?` are aliases for `grind` and `grind!` which displays patterns using `logInfo`.
820+
It is just a convenience for users.
821+
822+
## grind!?
823+
The `[grind!?]` attribute is identical to the `[grind!]` attribute, but displays inferred pattern information.When applied to an equational theorem, `[grind =]`, `[grind =_]`, or `[grind _=_]`will mark the theorem for use in heuristic instantiations by the `grind` tactic,
824+
using respectively the left-hand side, the right-hand side, or both sides of the theorem.When applied to a function, `[grind =]` automatically annotates the equational theorems associated with that function.When applied to a theorem `[grind ←]` will instantiate the theorem whenever it encounters the conclusion of the theorem
825+
(that is, it will use the theorem for backwards reasoning).When applied to a theorem `[grind →]` will instantiate the theorem whenever it encounters sufficiently many of the propositional hypotheses
826+
(that is, it will use the theorem for forwards reasoning).The attribute `[grind]` by itself will effectively try `[grind ←]` (if the conclusion is sufficient for instantiation) and then `[grind →]`.The `grind` tactic utilizes annotated theorems to add instances of matching patterns into the local context during proof search.For example, if a theorem `@[grind =] theorem foo_idempotent : foo (foo x) = foo x` is annotated,`grind` will add an instance of this theorem to the local context whenever it encounters the pattern `foo (foo x)`.
827+
Auxiliary function for registering `grind`, `grind!`, `grind?`, and `grind!?` attributes.
828+
`grind!` is like `grind` but selects minimal indexable subterms.
829+
The `grind?` and `grind!?` are aliases for `grind` and `grind!` which displays patterns using `logInfo`.
809830
It is just a convenience for users.
810831
811832
## grind?
812833
The `[grind?]` attribute is identical to the `[grind]` attribute, but displays inferred pattern information.When applied to an equational theorem, `[grind =]`, `[grind =_]`, or `[grind _=_]`will mark the theorem for use in heuristic instantiations by the `grind` tactic,
813834
using respectively the left-hand side, the right-hand side, or both sides of the theorem.When applied to a function, `[grind =]` automatically annotates the equational theorems associated with that function.When applied to a theorem `[grind ←]` will instantiate the theorem whenever it encounters the conclusion of the theorem
814835
(that is, it will use the theorem for backwards reasoning).When applied to a theorem `[grind →]` will instantiate the theorem whenever it encounters sufficiently many of the propositional hypotheses
815836
(that is, it will use the theorem for forwards reasoning).The attribute `[grind]` by itself will effectively try `[grind ←]` (if the conclusion is sufficient for instantiation) and then `[grind →]`.The `grind` tactic utilizes annotated theorems to add instances of matching patterns into the local context during proof search.For example, if a theorem `@[grind =] theorem foo_idempotent : foo (foo x) = foo x` is annotated,`grind` will add an instance of this theorem to the local context whenever it encounters the pattern `foo (foo x)`.
816-
Auxiliary function for registering `grind` and `grind?` attributes.
817-
The `grind?` is an alias for `grind` which displays patterns using `logInfo`.
837+
Auxiliary function for registering `grind`, `grind!`, `grind?`, and `grind!?` attributes.
838+
`grind!` is like `grind` but selects minimal indexable subterms.
839+
The `grind?` and `grind!?` are aliases for `grind` and `grind!` which displays patterns using `logInfo`.
818840
It is just a convenience for users.
819841
820842
## grindPropagatorBuiltinAttr
821843
Builtin `grind` propagator procedure
822844
845+
## grind_tactic
846+
grind elaborator
847+
823848
## higherOrder
824849
From a lemma of the shape `∀ x, f (g x) = h x` derive an auxiliary lemma of the
825850
form `f ∘ g = h` for reasoning about higher-order functions.
@@ -1053,6 +1078,12 @@ def isYellow (color : String) : Bool :=
10531078
| _ => false
10541079
```
10551080

1081+
## method_specs
1082+
generate method specification theorems
1083+
1084+
## method_specs_simp
1085+
simp lemma used to post-process the theorem created by `@[method_specs]`.
1086+
10561087
## mfld_simps
10571088
The simpset `mfld_simps` records several simp lemmas that are
10581089
especially useful in manifolds. It is a subset of the whole set of simp lemmas, but it makes it
@@ -1127,10 +1158,6 @@ relations on its domain and range, and possibly with side conditions.
11271158

11281159
## multigoal
11291160
this tactic acts on multiple goals
1130-
The `multigoal` attribute keeps track of tactics that operate on multiple goals,
1131-
meaning that `tac` acts differently from `focus tac`. This is used by the
1132-
'unnecessary `<;>`' linter to prevent false positives where `tac <;> tac'` cannot
1133-
be replaced by `(tac; tac')` because the latter would expose `tac` to a different set of goals.
11341161

11351162
## mvcgen_simp
11361163
simp theorems internally used by `mvcgen`
@@ -1180,7 +1207,6 @@ Changes the inlining behavior. This attribute comes in several variants:
11801207

11811208
## nolint
11821209
Do not report this declaration in any of the tests of `#lint`
1183-
Defines the user attribute `nolint` for skipping `#lint`
11841210

11851211
## nontriviality
11861212
The `@[nontriviality]` simp set is used by the `nontriviality` tactic to automatically
@@ -1348,10 +1374,6 @@ special case in the `rfl` tactic.
13481374

13491375
## server_rpc_method_cancellable
13501376
Like `server_rpc_method`, but requests for this method can be cancelled. The method should check for that using `IO.checkCanceled`. Cancellable methods are invoked differently from JavaScript: see `callCancellable` in `cancellable.ts`.
1351-
Like `server_rpc_method`, but requests for this method can be cancelled.
1352-
The method should check for that using `IO.checkCanceled`.
1353-
Cancellable methods are invoked differently from JavaScript:
1354-
see `callCancellable` in `cancellable.ts`.
13551377

13561378
## seval
13571379
symbolic evaluator theorem
@@ -1450,23 +1472,15 @@ directly.
14501472

14511473
## to_additive_change_numeral
14521474
Auxiliary attribute for `to_additive` that stores functions that have numerals as argument.
1453-
Similar to `registerParametricAttribute` except that attributes do not
1454-
have to be assigned in the same file as the declaration.
14551475

14561476
## to_additive_dont_translate
14571477
Auxiliary attribute for `to_additive` stating that the operations on this type should not be translated.
1458-
Similar to `registerParametricAttribute` except that attributes do not
1459-
have to be assigned in the same file as the declaration.
14601478

14611479
## to_additive_ignore_args
14621480
Auxiliary attribute for `to_additive` stating that certain arguments are not additivized.
1463-
Similar to `registerParametricAttribute` except that attributes do not
1464-
have to be assigned in the same file as the declaration.
14651481

14661482
## to_additive_relevant_arg
14671483
Auxiliary attribute for `to_additive` stating which arguments are the types with a multiplicative structure.
1468-
Similar to `registerParametricAttribute` except that attributes do not
1469-
have to be assigned in the same file as the declaration.
14701484

14711485
## to_app
14721486

0 commit comments

Comments
 (0)