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
18 lines
284 B
Text
18 lines
284 B
Text
constant f : nat → nat → nat
|
|
constant g : nat → nat → nat
|
|
attribute g [no_pattern]
|
|
|
|
namespace foo
|
|
|
|
attribute [forward]
|
|
definition lemma1 {a b : nat} : f a b = g a b :=
|
|
sorry
|
|
|
|
end foo
|
|
|
|
print foo.lemma1
|
|
open foo
|
|
print foo.lemma1
|
|
attribute foo.lemma1 [forward]
|
|
|
|
print foo.lemma1
|