2014-08-25 02:58:48 +00:00
|
|
|
import logic
|
2014-09-03 23:00:38 +00:00
|
|
|
open bool
|
2014-07-30 22:04:44 +00:00
|
|
|
|
2014-10-02 23:20:52 +00:00
|
|
|
constant list : Type.{1}
|
|
|
|
constant nil : list
|
|
|
|
constant cons : bool → list → list
|
2014-07-30 22:04:44 +00:00
|
|
|
|
|
|
|
infixr `::`:65 := cons
|
|
|
|
notation `[` l:(foldr `,` (h t, cons h t) nil `]`) := l
|
|
|
|
|
|
|
|
check []
|
|
|
|
check [tt]
|
|
|
|
check [tt, ff]
|
|
|
|
check [tt, ff, ff]
|
|
|
|
check tt :: ff :: [tt, ff, ff]
|
|
|
|
check tt :: []
|
2014-10-02 23:20:52 +00:00
|
|
|
constants a b c : bool
|
2014-07-30 22:04:44 +00:00
|
|
|
check a :: b :: nil
|
|
|
|
check [a, b]
|
|
|
|
check [a, b, c]
|
|
|
|
check []
|