This module contains the definition of a generic boolean substructure for SMT problems with
BoolExpr
. For verification purposes BoolExpr.Sat
and BoolExpr.Unsat
are provided.
- and: Std.Tactic.BVDecide.Gate
- xor: Std.Tactic.BVDecide.Gate
- beq: Std.Tactic.BVDecide.Gate
- imp: Std.Tactic.BVDecide.Gate
Instances For
Equations
- Std.Tactic.BVDecide.Gate.and.toString = "&&"
- Std.Tactic.BVDecide.Gate.xor.toString = "^^"
- Std.Tactic.BVDecide.Gate.beq.toString = "=="
- Std.Tactic.BVDecide.Gate.imp.toString = "->"
Instances For
Equations
- Std.Tactic.BVDecide.Gate.and.eval = fun (x1 x2 : Bool) => x1 && x2
- Std.Tactic.BVDecide.Gate.xor.eval = fun (x1 x2 : Bool) => x1 ^^ x2
- Std.Tactic.BVDecide.Gate.beq.eval = fun (x1 x2 : Bool) => x1 == x2
- Std.Tactic.BVDecide.Gate.imp.eval = fun (x1 x2 : Bool) => decide (x1 = true → x2 = true)
Instances For
- literal: {α : Type} → α → Std.Tactic.BVDecide.BoolExpr α
- const: {α : Type} → Bool → Std.Tactic.BVDecide.BoolExpr α
- not: {α : Type} → Std.Tactic.BVDecide.BoolExpr α → Std.Tactic.BVDecide.BoolExpr α
- gate: {α : Type} → Std.Tactic.BVDecide.Gate → Std.Tactic.BVDecide.BoolExpr α → Std.Tactic.BVDecide.BoolExpr α → Std.Tactic.BVDecide.BoolExpr α
- ite: {α : Type} → Std.Tactic.BVDecide.BoolExpr α → Std.Tactic.BVDecide.BoolExpr α → Std.Tactic.BVDecide.BoolExpr α → Std.Tactic.BVDecide.BoolExpr α
Instances For
Equations
- (Std.Tactic.BVDecide.BoolExpr.literal a).toString = toString a
- (Std.Tactic.BVDecide.BoolExpr.const b).toString = toString b
- x_1.not.toString = "!" ++ x_1.toString
- (Std.Tactic.BVDecide.BoolExpr.gate g x_1 y).toString = "(" ++ x_1.toString ++ " " ++ g.toString ++ " " ++ y.toString ++ ")"
- (d.ite l r).toString = "(if " ++ d.toString ++ " " ++ l.toString ++ " " ++ r.toString ++ ")"
Instances For
Equations
- Std.Tactic.BVDecide.BoolExpr.instToString = { toString := Std.Tactic.BVDecide.BoolExpr.toString }
Equations
- Std.Tactic.BVDecide.BoolExpr.eval a (Std.Tactic.BVDecide.BoolExpr.literal a_1) = a a_1
- Std.Tactic.BVDecide.BoolExpr.eval a (Std.Tactic.BVDecide.BoolExpr.const b) = b
- Std.Tactic.BVDecide.BoolExpr.eval a x_1.not = !Std.Tactic.BVDecide.BoolExpr.eval a x_1
- Std.Tactic.BVDecide.BoolExpr.eval a (Std.Tactic.BVDecide.BoolExpr.gate g x_1 y) = g.eval (Std.Tactic.BVDecide.BoolExpr.eval a x_1) (Std.Tactic.BVDecide.BoolExpr.eval a y)
- Std.Tactic.BVDecide.BoolExpr.eval a (d.ite l r) = if Std.Tactic.BVDecide.BoolExpr.eval a d = true then Std.Tactic.BVDecide.BoolExpr.eval a l else Std.Tactic.BVDecide.BoolExpr.eval a r
Instances For
@[simp]
@[simp]
@[simp]
theorem
Std.Tactic.BVDecide.BoolExpr.eval_not
{α✝ : Type}
{a : α✝ → Bool}
{x : Std.Tactic.BVDecide.BoolExpr α✝}
:
@[simp]
theorem
Std.Tactic.BVDecide.BoolExpr.eval_gate
{α✝ : Type}
{a : α✝ → Bool}
{g : Std.Tactic.BVDecide.Gate}
{x y : Std.Tactic.BVDecide.BoolExpr α✝}
:
@[simp]
theorem
Std.Tactic.BVDecide.BoolExpr.eval_ite
{α✝ : Type}
{a : α✝ → Bool}
{d l r : Std.Tactic.BVDecide.BoolExpr α✝}
:
Std.Tactic.BVDecide.BoolExpr.eval a (d.ite l r) = if Std.Tactic.BVDecide.BoolExpr.eval a d = true then Std.Tactic.BVDecide.BoolExpr.eval a l
else Std.Tactic.BVDecide.BoolExpr.eval a r
def
Std.Tactic.BVDecide.BoolExpr.Sat
{α : Type}
(a : α → Bool)
(x : Std.Tactic.BVDecide.BoolExpr α)
:
Equations
Instances For
Equations
- x.Unsat = ∀ (f : α → Bool), Std.Tactic.BVDecide.BoolExpr.eval f x = false
Instances For
theorem
Std.Tactic.BVDecide.BoolExpr.sat_and
{α : Type}
{x y : Std.Tactic.BVDecide.BoolExpr α}
{a : α → Bool}
(hx : Std.Tactic.BVDecide.BoolExpr.Sat a x)
(hy : Std.Tactic.BVDecide.BoolExpr.Sat a y)
: