lean4-htt/tests/lean_before_refactoring/run/prio_overloading.lean
Sebastian Ullrich fd2c42a8bf chore(library, tests): switch to new attribute declaration syntax
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
2016-08-12 15:36:12 -07:00

20 lines
537 B
Text

import algebra.group data.real
open nat
attribute [instance] [priority 2]
definition foo1 : inhabited nat := inhabited.mk 10
attribute [instance] [priority 1]
definition foo2 : inhabited nat := inhabited.mk 10
open algebra
attribute [instance] [priority 1]
definition foo3 : inhabited nat := inhabited.mk 10
attribute [unfold 2 3]
definition foo4 (a b c : nat) := a + b + c
attribute [recursor 4]
definition natrec {C : nat → Type} (H₁ : C 0) (H₂ : Π (n : nat), C n → C (succ n)) (n : nat) : C n :=
nat.rec_on n H₁ H₂