lean4-htt/tests/lean_before_refactoring/run/679b.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

25 lines
450 B
Text

import data.finset
open bool nat list finset
attribute [class]
definition fset (A : Type) := finset A
attribute [instance]
definition fin_nat : fset nat :=
to_finset [0]
attribute [instance]
definition fin_bool : fset bool :=
to_finset [tt, ff]
definition tst (A : Type) [s : fset A] : finset A :=
s
example : tst nat = to_finset [0] :=
rfl
example : tst bool = to_finset [ff, tt] :=
dec_trivial
example : tst bool = to_finset [tt, ff] :=
rfl