Booleans #
This file proves various trivial lemmas about Booleans and their relation to decidable propositions.
Tags #
bool, boolean, Bool, De Morgan
This section contains lemmas about Booleans which were present in core Lean 3. The remainder of this file contains lemmas about Booleans from mathlib 3.
theorem
Bool.and_eq_true_eq_eq_true_and_eq_true
(a b : Bool)
:
((a && b) = true) = (a = true ∧ b = true)
theorem
Bool.or_eq_true_eq_eq_true_or_eq_true
(a b : Bool)
:
((a || b) = true) = (a = true ∨ b = true)
theorem
Bool.and_eq_false_eq_eq_false_or_eq_false
(a b : Bool)
:
((a && b) = false) = (a = false ∨ b = false)
theorem
Bool.or_eq_false_eq_eq_false_and_eq_false
(a b : Bool)
:
((a || b) = false) = (a = false ∧ b = false)
De Morgan's laws for Booleans #
convert a ℕ to a Bool, 0 -> false, everything else -> true
Instances For
@[simp]
Kaminski's Equation
carry x y c is x && y || x && c || y && c.