blob: 206afbdf22db848cfd29a33e0f0c3f581c5762fe [file]
/-
Copyright (c) 2024 Lean FRO, LLC. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Henrik Böving
-/
module
prelude
public import Std.Tactic.BVDecide.LRAT.Internal.Checker
@[expose] public section
/-!
This module contains the implementation of the LRAT checker as well as a proof that the given
CNF is unsat if the checker succeeds.
-/
open Std.Sat
namespace Std.Tactic.BVDecide
namespace LRAT
/--
Check whether `lratProof` is a valid LRAT certificate for the unsatisfiability of `cnf`.
-/
def check (lratProof : Array IntAction) (cnf : CNF Nat) : Bool :=
Internal.check lratProof cnf
/--
If the `check` functions succeeds on `lratProof` and `cnf` then the `cnf` is unsatisfiable.
-/
theorem check_sound (lratProof : Array IntAction) (cnf : CNF Nat) :
check lratProof cnf → cnf.Unsat := by
unfold check
exact Internal.unsat_of_check
end LRAT
end Std.Tactic.BVDecide