lean2/tests/lean/run/809.lean

23 lines
721 B
Text
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import data.finset data.num data.nat data.int algebra.ring
open finset num nat int algebra
check @finset.insert _ _ 1 (@finset.empty )
check '{(1:nat), 2, 3}
check ('{1, 2, 3} : finset )
check ('{1, 2, 3} : finset ) -- finset
check ('{1, 2, 3} : finset ) -- finset
example : finset nat :=
insert 1 (insert 2 (insert 3 empty))
check insert 1 (insert 2 (insert 3 empty)) -- finset num
check (insert 1 (insert 2 (insert 3 empty)) : finset nat)
check (insert (1:nat) (insert (2:nat) (insert (3:nat) empty)))
definition foo_nat (x : finset ) : finset := x
definition foo_int (x : finset ) : finset := x
check foo_nat '{1, 2, 3} -- finset
check foo_int '{1, 2, 3} -- finset