File tree Expand file tree Collapse file tree 10 files changed +24
-24
lines changed
Expand file tree Collapse file tree 10 files changed +24
-24
lines changed Original file line number Diff line number Diff line change @@ -22,8 +22,8 @@ This allows the documentation of core Lean features to be visible without import
2222are defined in. This is only useful during bootstrapping and should not be used outside of
2323the Lean source code.
2424-/
25- @[builtin_init, builtin_doc]
26- private def initFn :=
25+ @[builtin_doc]
26+ builtin_initialize
2727 registerBuiltinAttribute {
2828 name := `builtin_doc
2929 descr := "make the docs and location of this declaration available as a builtin"
Original file line number Diff line number Diff line change @@ -14,8 +14,8 @@ Uses documentation from a specified declaration.
1414
1515`@[inherit_doc decl]` is used to inherit the documentation from the declaration `decl`.
1616-/
17- @[builtin_init, builtin_doc]
18- private def init :=
17+ @[builtin_doc]
18+ builtin_initialize
1919 registerBuiltinAttribute {
2020 name := `inherit_doc
2121 descr := "inherit documentation from a specified declaration"
Original file line number Diff line number Diff line change @@ -32,8 +32,8 @@ Makes the bodies of definitions available to importing modules.
3232This only has an effect if both the module the definition is defined in and the importing module
3333have the module system enabled.
3434-/
35- @[builtin_init, builtin_doc]
36- private def init :=
35+ @[builtin_doc]
36+ builtin_initialize
3737 registerBuiltinAttribute {
3838 name := `expose
3939 descr := "(module system) Make bodies of definitions available to importing modules."
@@ -49,8 +49,8 @@ be exposed in a section tagged `@[expose]`
4949This only has an effect if both the module the definition is defined in and the importing module
5050have the module system enabled.
5151-/
52- @[builtin_init, builtin_doc]
53- private def init2 :=
52+ @[builtin_doc]
53+ builtin_initialize
5454 registerBuiltinAttribute {
5555 name := `no_expose
5656 descr := "(module system) Negate previous `[expose]` attribute."
Original file line number Diff line number Diff line change @@ -36,8 +36,8 @@ Monotonicity theorems should have `Lean.Order.monotone ...` as a conclusion. The
3636`monotonicity` tactic (scoped in the `Lean.Order` namespace) to automatically prove monotonicity
3737for functions defined using `partial_fixpoint`.
3838-/
39- @[builtin_init, builtin_doc]
40- private def init := registerBuiltinAttribute {
39+ @[builtin_doc]
40+ builtin_initialize registerBuiltinAttribute {
4141 name := `partial_fixpoint_monotone
4242 descr := "monotonicity theorem"
4343 add := fun decl _ kind => MetaM.run' do
Original file line number Diff line number Diff line change @@ -2100,8 +2100,8 @@ builtin_initialize builtinIncrementalElabs : IO.Ref NameSet ← IO.mkRef {}
21002100def addBuiltinIncrementalElab (decl : Name) : IO Unit := do
21012101 builtinIncrementalElabs.modify fun s => s.insert decl
21022102
2103- @[builtin_init, inherit_doc incrementalAttr, builtin_doc]
2104- private def init :=
2103+ @[inherit_doc incrementalAttr, builtin_doc]
2104+ builtin_initialize
21052105 registerBuiltinAttribute {
21062106 name := `builtin_incremental
21072107 descr := s! "(builtin) { incrementalAttr.attr.descr} "
Original file line number Diff line number Diff line change @@ -242,8 +242,8 @@ in particular for `opaque` instances.
242242To assign priorities to instances, `@[instance prio]` can be used (where `prio` is a priority).
243243This corresponds to the `instance (priority := prio)` notation.
244244-/
245- @[builtin_init, builtin_doc]
246- private def init :=
245+ @[builtin_doc]
246+ builtin_initialize
247247 registerBuiltinAttribute {
248248 name := `instance
249249 descr := "type class instance"
Original file line number Diff line number Diff line change @@ -209,8 +209,8 @@ example (x : Three) (p : Three → Prop) : p x := by
209209
210210`@[cases_eliminator]` works similarly for the `cases` tactic.
211211-/
212- @[builtin_init, builtin_doc]
213- private def init : IO Unit :=
212+ @[builtin_doc]
213+ builtin_initialize
214214 registerBuiltinAttribute {
215215 name := `induction_eliminator
216216 descr := "custom `rec`-like eliminator for the `induction` tactic"
@@ -249,8 +249,8 @@ example (x : Three) (p : Three → Prop) : p x := by
249249
250250`@[induction_eliminator]` works similarly for the `induction` tactic.
251251-/
252- @[builtin_init, builtin_doc]
253- private def init2 : IO Unit :=
252+ @[builtin_doc]
253+ builtin_initialize
254254 registerBuiltinAttribute {
255255 name := `cases_eliminator
256256 descr := "custom `casesOn`-like eliminator for the `cases` tactic"
Original file line number Diff line number Diff line change @@ -35,8 +35,8 @@ A reflexivity lemma should have the conclusion `r x x` where `r` is an arbitrary
3535It is not possible to tag reflexivity lemmas for `=` using this attribute. These are handled as a
3636special case in the `rfl` tactic.
3737-/
38- @[builtin_init, builtin_doc]
39- private def initFn := registerBuiltinAttribute {
38+ @[builtin_doc]
39+ builtin_initialize registerBuiltinAttribute {
4040 name := `refl
4141 descr := "reflexivity relation"
4242 add := fun decl _ kind => MetaM.run' do
Original file line number Diff line number Diff line change @@ -136,8 +136,8 @@ theorem Option.pbind_congr
136136 ...
137137```
138138-/
139- @[builtin_init, builtin_doc]
140- private def init :=
139+ @[builtin_doc]
140+ builtin_initialize
141141 registerBuiltinAttribute {
142142 name := `congr
143143 descr := "congruence theorem"
Original file line number Diff line number Diff line change @@ -31,8 +31,8 @@ Tags symmetry lemmas to be used by the `symm` tactic.
3131
3232A symmetry lemma should be of the form `r x y → r y x` where `r` is an arbitrary relation.
3333-/
34- @[builtin_init, builtin_doc]
35- private def initFn := registerBuiltinAttribute {
34+ @[builtin_doc]
35+ builtin_initialize registerBuiltinAttribute {
3636 name := `symm
3737 descr := "symmetric relation"
3838 add := fun decl _ kind => MetaM.run' do
You can’t perform that action at this time.
0 commit comments