2014-12-05 23:47:04 +00:00
|
|
|
/-
|
|
|
|
Copyright (c) 2014 Microsoft Corporation. All rights reserved.
|
|
|
|
Released under Apache 2.0 license as described in the file LICENSE.
|
2015-02-21 00:30:32 +00:00
|
|
|
|
|
|
|
Module: init.bool
|
2015-02-28 00:02:18 +00:00
|
|
|
Authors: Leonardo de Moura
|
2014-12-05 23:47:04 +00:00
|
|
|
-/
|
2015-02-26 18:19:54 +00:00
|
|
|
|
2014-12-05 23:47:04 +00:00
|
|
|
prelude
|
|
|
|
import init.datatypes init.reserved_notation
|
|
|
|
|
|
|
|
namespace bool
|
|
|
|
definition cond {A : Type} (b : bool) (t e : A) :=
|
2015-02-11 20:49:27 +00:00
|
|
|
bool.rec_on b e t
|
2014-12-05 23:47:04 +00:00
|
|
|
|
|
|
|
definition bor (a b : bool) :=
|
2015-02-11 20:49:27 +00:00
|
|
|
bool.rec_on a (bool.rec_on b ff tt) tt
|
2014-12-05 23:47:04 +00:00
|
|
|
|
|
|
|
notation a || b := bor a b
|
|
|
|
|
|
|
|
definition band (a b : bool) :=
|
2015-02-11 20:49:27 +00:00
|
|
|
bool.rec_on a ff (bool.rec_on b ff tt)
|
2014-12-05 23:47:04 +00:00
|
|
|
|
|
|
|
notation a && b := band a b
|
|
|
|
|
|
|
|
definition bnot (a : bool) :=
|
2015-02-11 20:49:27 +00:00
|
|
|
bool.rec_on a tt ff
|
2014-12-05 23:47:04 +00:00
|
|
|
end bool
|