Documentation

Auto.Lib.BoolExtra

theorem Auto.Bool.beq_true {a : Bool} :
(a == true) = a
theorem Auto.Bool.not_beq_swap {a b : Bool} :
(!a == b) = (a == !b)
theorem Auto.Bool.and_eq_false (a b : Bool) :
((a && b) = false) = (a = false b = false)
theorem Auto.Bool.or_eq_false (a b : Bool) :
((a || b) = false) = (a = false b = false)
theorem Auto.Bool.and_comm {a b : Bool} :
(a && b) = (b && a)
theorem Auto.Bool.or_comm {a b : Bool} :
(a || b) = (b || a)
noncomputable def Auto.Bool.ofProp (c : Prop) :
Equations
Instances For
    theorem Auto.Bool.ite_eq_true {α : Sort u_1} (p : Prop) [inst : Decidable p] (a b : α) :
    p → (if p then a else b) = a
    theorem Auto.Bool.ite_eq_false {α : Sort u_1} (p : Prop) [inst : Decidable p] (a b : α) :
    ¬p → (if p then a else b) = b
    theorem Auto.Bool.dite_eq_true {α : Sort u_1} (p : Prop) [inst : Decidable p] (a : pα) (b : ¬pα) (proof : p) :
    dite p a b = a proof
    theorem Auto.Bool.dite_eq_false {α : Sort u_1} (p : Prop) [inst : Decidable p] (a : pα) (b : ¬pα) (proof : ¬p) :
    dite p a b = b proof
    noncomputable def Auto.Bool.ite' {α : Sort u} (p : Prop) (x y : α) :
    α

    Similar to ite, but does not have complicated dependent types

    Equations
    Instances For
      theorem Auto.Bool.ite_simp :
      @ite = fun (α : Sort u) (p : Prop) (x : Decidable p) => ite' p

      Invoke rw at the beginning of auto

      theorem Auto.Bool.ite'_eq_true {α : Sort u_1} (p : Prop) (a b : α) :
      pite' p a b = a
      theorem Auto.Bool.ite'_eq_false {α : Sort u_1} (p : Prop) (a b : α) :
      ¬pite' p a b = b
      theorem Auto.Bool.cond_simp :
      @cond = fun (α : Type u) (b : Bool) => ite' (b = true)

      Invoke rw at the beginning of auto

      theorem Auto.Bool.decide_simp :
      decide = fun (p : Prop) (x : Decidable p) => ofProp p

      Invoke rw at the beginning of auto

      theorem Auto.Bool.ite_comm {p : Prop} {α : Sort u_1} {β : Sort u_2} [inst : Decidable p] {x y : α} (f : αβ) :
      f (if p then x else y) = if p then f x else f y
      theorem Auto.Bool.ite'_comm {α : Sort u_1} {β : Sort u_2} {p : Prop} {x y : α} (f : αβ) :
      f (ite' p x y) = ite' p (f x) (f y)