An inductive datatype used specifically for the output of the reduce function. The intended
meaning of each constructor is explained in the docstring of the reduce function.
- encounteredBoth {α : Type u} : ReduceResult α
- reducedToEmpty {α : Type u} : ReduceResult α
- reducedToUnit {α : Type u} (l : Sat.Literal α) : ReduceResult α
- reducedToNonunit {α : Type u} : ReduceResult α
Instances For
Typeclass for clauses. An instance [Clause α β] indicates that β is the type of a clause with
variables of type α.
- toList : β → Sat.CNF.Clause α
- ofArray : Array (Sat.Literal α) → Option β
Returns none if the given array contains complementary literals
- empty : β
- unit : Sat.Literal α → β
- isUnit : β → Option (Sat.Literal α)
- negate : β → Sat.CNF.Clause α
- delete : β → Sat.Literal α → β
- contains : β → Sat.Literal α → Bool
- reduce : β → Array Assignment → ReduceResult α
Reduces the clause with respect to the given assignment
Instances
Equations
- Std.Tactic.BVDecide.LRAT.Internal.Clause.instEntailsLiteral = { eval := fun (p : α → Bool) (l : Std.Sat.Literal α) => p l.fst = l.snd }
Equations
Equations
- Std.Tactic.BVDecide.LRAT.Internal.Clause.instEntails = { eval := fun (a : α → Bool) (c : β) => Std.Tactic.BVDecide.LRAT.Internal.Clause.eval a c = true }
The DefaultClause structure is primarily a list of literals. The additional field nodupkey is
included to ensure that not_tautology is provable (which is needed to prove sat_of_insertRup
and sat_of_insertRat in LRAT.Formula.Internal.RupAddSound and LRAT.Formula.Internal.RatAddSound).
The additional field nodup is included to ensure that delete can be implemented by simply calling
erase on the clause field. Without nodup, it would be necessary to iterate through the entire
clause field and erase all instances of the literal to be deleted, since there would potentially
be more than one.
In principle, one could combine nodupkey and nodup to instead have one additional field that
stipulates that ∀ l1 : PosFin numVarsSucc, ∀ l2 : PosFin numVarsSucc, l1.1 ≠ l2.1. This would work
just as well, and the only reason that DefaultClause is structured in this manner is that the
nodup field was only included in a later stage of the verification process when it became clear
that it was needed.
- clause : Sat.CNF.Clause (PosFin numVarsSucc)
- nodup : List.Nodup self.clause
Instances For
Equations
- One or more equations did not get rendered due to their size.
- Std.Tactic.BVDecide.LRAT.Internal.instBEqDefaultClause.beq x✝¹ x✝ = false
Instances For
Equations
- Std.Tactic.BVDecide.LRAT.Internal.instToStringDefaultClause = { toString := fun (c : Std.Tactic.BVDecide.LRAT.Internal.DefaultClause n) => toString (List.reverse c.clause) }
Instances For
Equations
Instances For
Equations
Instances For
Instances For
Equations
Instances For
Equations
- One or more equations did not get rendered due to their size.
- Std.Tactic.BVDecide.LRAT.Internal.DefaultClause.ofArray.folder none l = none
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Instances For
Equations
- c.contains l = List.contains c.clause l
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
The reduce function takes in a clause c and takes in an array of assignments and attempts to
eliminate every literal in the clause that is not compatible with the assignments argument.
- If
reducereturnsencounteredBoth, then this means that theassignmentsarray has abothAssignment and is therefore fundamentally unsatisfiable. - If
reducereturnsreducedToEmpty, then this means that every literal incis incompatible withassignments. In other words, this means that the conjunction ofassignmentsandcis unsatisfiable. - If
reducereturnsreducedToUnit l, then this means that every literal incis incompatible withassignmentsexcept forl. In other words, this means that the conjunction ofassignmentsandcentaill. - If
reducereturnsreducedToNonunit, then this means that there are multiple literals incthat are compatible withassignments. This is a failure condition forconfirmRupHint(inLRAT.Formula.Implementation.lean) which callsreduce.
Equations
Instances For
Equations
- One or more equations did not get rendered due to their size.