sed -Ei 's/^(\s*)((private |protected )?(noncomputable )?(abbreviation|definition|meta_definition|theorem|lemma|proposition|corollary)\s+\S+\s*)((\s*\[(\S+(\s+[0-9]+)*|priority.*)\])+)\s*/\1attribute \6\n\1\2/' library/**/*.lean tests/**/*.lean sed -Ei 's/\s+$//' library/**/*.lean # remove trailing whitespace
19 lines
445 B
Text
19 lines
445 B
Text
prelude
|
|
|
|
attribute [reducible]
|
|
definition id₁ {A : Type} (a : A) := a
|
|
attribute [reducible]
|
|
definition id₂ {A : Type} (a : A) := a
|
|
|
|
attribute [irreducible]
|
|
definition id₅ {A : Type} (a : A) := a
|
|
attribute [irreducible]
|
|
definition id₆ {A : Type} (a : A) := a
|
|
|
|
attribute [reducible]
|
|
definition pr {A B : Type} (a : A) (b : B) := a
|
|
definition pr2 {A B : Type} (a : A) (b : B) := a
|
|
|
|
print [reducible]
|
|
print "-----------"
|
|
print [irreducible]
|