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
9 lines
233 B
Text
9 lines
233 B
Text
--
|
|
namespace foo
|
|
definition subsingleton (A : Type) := ∀⦃a b : A⦄, a = b
|
|
attribute subsingleton [class]
|
|
|
|
attribute [instance]
|
|
protected definition prop.subsingleton (P : Prop) : subsingleton P :=
|
|
λa b, proof_irrel _ _
|
|
end foo
|