Booleans #
This file proves various trivial lemmas about booleans and their relation to decidable propositions.
Tags #
bool, boolean, Bool, De Morgan
De Morgan's laws for booleans #
Equations
- Bool.linearOrder = LinearOrder.mk Bool.linearOrder.proof_5 (id (id (id inferInstance))) inferInstance decidableLTOfDecidableLE
convert a Bool
to a ℕ
, false -> 0
, true -> 1
Equations
- Bool.toNat b = bif b then 1 else 0
Instances For
convert a ℕ
to a Bool
, 0 -> false
, everything else -> true
Equations
- Bool.ofNat n = decide (n ≠ 0)
Instances For
@[simp]