File: Mathlib/Data/Bool/Basic.lean

full_name: Bool.true_eq_false_eq_False
code: theorem true_eq_false_eq_False : ¬true = false 
goal: ¬true = false

full_name: Bool.false_eq_true_eq_False
code: theorem false_eq_true_eq_False : ¬false = true 
goal: ¬false = true

full_name: Bool.eq_false_eq_not_eq_true
code: theorem eq_false_eq_not_eq_true (b : Bool) : (¬b = true) = (b = false) 
goal: (¬b = true) = (b = false)

full_name: Bool.eq_true_eq_not_eq_false
code: theorem eq_true_eq_not_eq_false (b : Bool) : (¬b = false) = (b = true) 
goal: (¬b = false) = (b = true)

full_name: Bool.eq_false_of_not_eq_true
code: theorem eq_false_of_not_eq_true {b : Bool} : ¬b = true → b = false 
goal: ¬b = true → b = false

full_name: Bool.eq_true_of_not_eq_false
code: theorem eq_true_of_not_eq_false {b : Bool} : ¬b = false → b = true 
goal: ¬b = false → b = true

full_name: Bool.and_eq_true_eq_eq_true_and_eq_true
code: theorem and_eq_true_eq_eq_true_and_eq_true (a b : Bool) :
    ((a && b) = true) = (a = true ∧ b = true) 
goal: ((a && b) = true) = (a = true ∧ b = true)

full_name: Bool.or_eq_true_eq_eq_true_or_eq_true
code: theorem or_eq_true_eq_eq_true_or_eq_true (a b : Bool) :
    ((a || b) = true) = (a = true ∨ b = true) 
goal: ((a || b) = true) = (a = true ∨ b = true)

full_name: Bool.not_eq_true_eq_eq_false
code: theorem not_eq_true_eq_eq_false (a : Bool) : (not a = true) = (a = false) 
goal: ((!a) = true) = (a = false)

full_name: Bool.and_eq_false_eq_eq_false_or_eq_false
code: theorem and_eq_false_eq_eq_false_or_eq_false (a b : Bool) :
    ((a && b) = false) = (a = false ∨ b = false) 
goal: ((a && b) = false) = (a = false ∨ b = false)

full_name: Bool.or_eq_false_eq_eq_false_and_eq_false
code: theorem or_eq_false_eq_eq_false_and_eq_false (a b : Bool) :
    ((a || b) = false) = (a = false ∧ b = false) 
goal: ((a || b) = false) = (a = false ∧ b = false)

full_name: Bool.not_eq_false_eq_eq_true
code: theorem not_eq_false_eq_eq_true (a : Bool) : (not a = false) = (a = true) 
goal: ((!a) = false) = (a = true)

full_name: Bool.coe_false
code: theorem coe_false : ↑false = False 
goal: (false = true) = False

full_name: Bool.coe_true
code: theorem coe_true : ↑true = True 
goal: (true = true) = True

full_name: Bool.coe_sort_false
code: theorem coe_sort_false : (false : Prop) = False 
goal: (false = true) = False

full_name: Bool.coe_sort_true
code: theorem coe_sort_true : (true : Prop) = True 
goal: (true = true) = True

full_name: Bool.decide_iff
code: theorem decide_iff (p : Prop) [d : Decidable p] : decide p = true ↔ p 
goal: decide p = true ↔ p

full_name: Bool.decide_true
code: theorem decide_true {p : Prop} [Decidable p] : p → decide p 
goal: p → decide p = true

full_name: Bool.of_decide_true
code: theorem of_decide_true {p : Prop} [Decidable p] : decide p → p 
goal: decide p = true → p

full_name: Bool.bool_iff_false
code: theorem bool_iff_false {b : Bool} : ¬b ↔ b = false 
goal: ¬b = true ↔ b = false

full_name: Bool.bool_eq_false
code: theorem bool_eq_false {b : Bool} : ¬b → b = false 
goal: ¬b = true → b = false

full_name: Bool.decide_false_iff
code: theorem decide_false_iff (p : Prop) {_ : Decidable p} : decide p = false ↔ ¬p 
goal: ∀ {x : Decidable p}, decide p = false ↔ ¬p

full_name: Bool.decide_false
code: theorem decide_false {p : Prop} [Decidable p] : ¬p → decide p = false 
goal: ¬p → decide p = false

full_name: Bool.of_decide_false
code: theorem of_decide_false {p : Prop} [Decidable p] : decide p = false → ¬p 
goal: decide p = false → ¬p

full_name: Bool.decide_congr
code: theorem decide_congr {p q : Prop} [Decidable p] [Decidable q] (h : p ↔ q) : decide p = decide q 
goal: decide p = decide q

full_name: Bool.coe_xor_iff
code: theorem coe_xor_iff (a b : Bool) : xor a b ↔ Xor' (a = true) (b = true) 
goal: xor a b = true ↔ Xor' (a = true) (b = true)

full_name: Bool.dichotomy
code: theorem dichotomy (b : Bool) : b = false ∨ b = true 
goal: b = false ∨ b = true

full_name: Bool.forall_bool'
code: theorem forall_bool' {p : Bool → Prop} (b : Bool) : (∀ x, p x) ↔ p b ∧ p !b 
goal: (∀ (x : Bool), p x) ↔ p b ∧ p !b

full_name: Bool.forall_bool
code: @[simp]
theorem forall_bool {p : Bool → Prop} : (∀ b, p b) ↔ p false ∧ p true 
goal: (∀ (b : Bool), p b) ↔ p false ∧ p true

full_name: Bool.exists_bool'
code: theorem exists_bool' {p : Bool → Prop} (b : Bool) : (∃ x, p x) ↔ p b ∨ p !b 
goal: (∃ x, p x) ↔ p b ∨ p !b

full_name: Bool.exists_bool
code: @[simp]
theorem exists_bool {p : Bool → Prop} : (∃ b, p b) ↔ p false ∨ p true 
goal: (∃ b, p b) ↔ p false ∨ p true

full_name: Bool.not_ne_id
code: theorem not_ne_id : not ≠ id 
goal: not ≠ id

full_name: Bool.or_inl
code: theorem or_inl {a b : Bool} (H : a) : a || b 
goal: (a || b) = true

full_name: Bool.or_inr
code: theorem or_inr {a b : Bool} (H : b) : a || b 
goal: (a || b) = true

full_name: Bool.and_elim_left
code: theorem and_elim_left : ∀ {a b : Bool}, a && b → a 
goal: (a && b) = true → a = true

full_name: Bool.and_intro
code: theorem and_intro : ∀ {a b : Bool}, a → b → a && b 
goal: a = true → b = true → (a && b) = true

full_name: Bool.and_elim_right
code: theorem and_elim_right : ∀ {a b : Bool}, a && b → b 
goal: (a && b) = true → b = true

full_name: Bool.eq_not_iff
code: lemma eq_not_iff : ∀ {a b : Bool}, a = !b ↔ a ≠ b 
goal: a = !b ↔ a ≠ b

full_name: Bool.not_eq_iff
code: lemma not_eq_iff : ∀ {a b : Bool}, !a = b ↔ a ≠ b 
goal: (!decide (a = b)) = true ↔ a ≠ b

full_name: Bool.ne_not
code: theorem ne_not {a b : Bool} : a ≠ !b ↔ a = b 
goal: a ≠ !b ↔ a = b

full_name: Bool.not_ne_self
code: lemma not_ne_self : ∀ b : Bool, (!b) ≠ b 
goal: (!b) ≠ b

full_name: Bool.self_ne_not
code: lemma self_ne_not : ∀ b : Bool, b ≠ !b 
goal: b ≠ !b

full_name: Bool.eq_or_eq_not
code: lemma eq_or_eq_not : ∀ a b, a = b ∨ a = !b 
goal: a = b ∨ a = !b

full_name: Bool.not_iff_not
code: theorem not_iff_not : ∀ {b : Bool}, !b ↔ ¬b 
goal: (!b) = true ↔ ¬b = true

full_name: Bool.eq_true_of_not_eq_false'
code: theorem eq_true_of_not_eq_false' {a : Bool} : !a = false → a = true 
goal: (!decide (a = false)) = true → a = true

full_name: Bool.eq_false_of_not_eq_true'
code: theorem eq_false_of_not_eq_true' {a : Bool} : !a = true → a = false 
goal: (!decide (a = true)) = true → a = false

full_name: Bool.bne_eq_xor
code: theorem bne_eq_xor : bne = xor 
goal: bne = xor

full_name: Bool.xor_iff_ne
code: theorem xor_iff_ne : ∀ {x y : Bool}, xor x y = true ↔ x ≠ y 
goal: xor x y = true ↔ x ≠ y

full_name: Bool.linearOrder
code: instance linearOrder : LinearOrder Bool 
goal: LinearOrder Bool

full_name: Bool.lt_iff
code: theorem lt_iff : ∀ {x y : Bool}, x < y ↔ x = false ∧ y = true 
goal: x < y ↔ x = false ∧ y = true

full_name: Bool.false_lt_true
code: @[simp]
theorem false_lt_true : false < true 
goal: false < true

full_name: Bool.le_iff_imp
code: theorem le_iff_imp : ∀ {x y : Bool}, x ≤ y ↔ x → y 
goal: x ≤ y ↔ x = true → y = true

full_name: Bool.and_le_left
code: theorem and_le_left : ∀ x y : Bool, (x && y) ≤ x 
goal: (x && y) ≤ x

full_name: Bool.and_le_right
code: theorem and_le_right : ∀ x y : Bool, (x && y) ≤ y 
goal: (x && y) ≤ y

full_name: Bool.le_and
code: theorem le_and : ∀ {x y z : Bool}, x ≤ y → x ≤ z → x ≤ (y && z) 
goal: x ≤ y → x ≤ z → x ≤ (y && z)

full_name: Bool.left_le_or
code: theorem left_le_or : ∀ x y : Bool, x ≤ (x || y) 
goal: x ≤ (x || y)

full_name: Bool.right_le_or
code: theorem right_le_or : ∀ x y : Bool, y ≤ (x || y) 
goal: y ≤ (x || y)

full_name: Bool.or_le
code: theorem or_le : ∀ {x y z}, x ≤ z → y ≤ z → (x || y) ≤ z 
goal: x ≤ z → y ≤ z → (x || y) ≤ z

full_name: Bool.ofNat
code: /-- convert a `ℕ` to a `Bool`, `0 -> false`, everything else -> `true` -/
def ofNat (n : Nat) : Bool 
goal: Bool

full_name: Bool.toNat_beq_zero
code: @[simp] lemma toNat_beq_zero (b : Bool) : (b.toNat == 0) = !b 
goal: (b.toNat == 0) = !b

full_name: Bool.toNat_bne_zero
code: @[simp] lemma toNat_bne_zero (b : Bool) : (b.toNat != 0) =  b 
goal: (b.toNat != 0) = b

full_name: Bool.toNat_beq_one
code: @[simp] lemma toNat_beq_one  (b : Bool) : (b.toNat == 1) =  b 
goal: (b.toNat == 1) = b

full_name: Bool.toNat_bne_one
code: @[simp] lemma toNat_bne_one  (b : Bool) : (b.toNat != 1) = !b 
goal: (b.toNat != 1) = !b

full_name: Bool.ofNat_le_ofNat
code: theorem ofNat_le_ofNat {n m : Nat} (h : n ≤ m) : ofNat n ≤ ofNat m 
goal: Bool.ofNat n ≤ Bool.ofNat m

full_name: Bool.toNat_le_toNat
code: theorem toNat_le_toNat {b₀ b₁ : Bool} (h : b₀ ≤ b₁) : toNat b₀ ≤ toNat b₁ 
goal: b₀.toNat ≤ b₁.toNat

full_name: Bool.ofNat_toNat
code: theorem ofNat_toNat (b : Bool) : ofNat (toNat b) = b 
goal: Bool.ofNat b.toNat = b

full_name: Bool.injective_iff
code: @[simp]
theorem injective_iff {α : Sort*} {f : Bool → α} : Function.Injective f ↔ f false ≠ f true 
goal: Function.Injective f ↔ f false ≠ f true

full_name: Bool.apply_apply_apply
code: /-- **Kaminski's Equation** -/
theorem apply_apply_apply (f : Bool → Bool) (x : Bool) : f (f (f x)) = f x 
goal: f (f (f x)) = f x

full_name: Bool.xor3
code: /-- `xor3 x y c` is `((x XOR y) XOR c)`. -/
protected def xor3 (x y c : Bool) 
goal: Bool

full_name: Bool.carry
code: /-- `carry x y c` is `x && y || x && c || y && c`. -/
protected def carry (x y c : Bool) 
goal: Bool