This module implements the LRAT trimming algorithm described in section 4 of "Faster LRAT Checking Than Solving with CaDiCaL" (https://drops.dagstuhl.de/storage/00lipics/lipics-vol271-sat2023/LIPIcs.SAT.2023.21/LIPIcs.SAT.2023.21.pdf).
- used : Lean.RBMap Nat Unit compare
The set of used proof step ids.
- mapped : Std.HashMap Nat Nat
A mapping from old proof step ids to new ones. Used such that the proof remains a sequence without gaps.
Instances For
@[reducible, inline]
Equations
Instances For
partial def
Lean.Elab.Tactic.BVDecide.LRAT.trim.M.findInitialId
(proof : Array Std.Tactic.BVDecide.LRAT.IntAction)
(curr : optParam Nat 0)
:
def
Lean.Elab.Tactic.BVDecide.LRAT.trim.M.findEmptyId
(proof : Array Std.Tactic.BVDecide.LRAT.IntAction)
:
Equations
- One or more equations did not get rendered due to their size.
Instances For
def
Lean.Elab.Tactic.BVDecide.LRAT.trim.M.run
{α : Type}
(proof : Array Std.Tactic.BVDecide.LRAT.IntAction)
(x : Lean.Elab.Tactic.BVDecide.LRAT.trim.M α)
:
Equations
- One or more equations did not get rendered due to their size.
Instances For
@[inline]
Equations
- Lean.Elab.Tactic.BVDecide.LRAT.trim.M.getInitialId = do let ctx ← read pure ctx.initialId
Instances For
@[inline]
Equations
- Lean.Elab.Tactic.BVDecide.LRAT.trim.M.getEmptyId = do let ctx ← read pure ctx.addEmptyId
Instances For
@[inline]
Equations
- Lean.Elab.Tactic.BVDecide.LRAT.trim.M.getProofStep id = do let ctx ← read pure ctx.proof[id]?
Instances For
@[inline]
Equations
- Lean.Elab.Tactic.BVDecide.LRAT.trim.M.isUsed id = do let s ← get pure (s.used.contains id)
Instances For
@[inline]
Equations
- One or more equations did not get rendered due to their size.
Instances For
@[inline]
Equations
- Lean.Elab.Tactic.BVDecide.LRAT.trim.M.getUsedSet = do let s ← get pure s.used
Instances For
Equations
- Lean.Elab.Tactic.BVDecide.LRAT.trim.M.registerIdMap oldId newId = modify fun (s : Lean.Elab.Tactic.BVDecide.LRAT.trim.State) => { used := s.used, mapped := s.mapped.insert oldId newId }
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
@[inline]
Equations
- Lean.Elab.Tactic.BVDecide.LRAT.trim.M.mapStep.mapIdent ident = do let s ← get pure (s.mapped[ident]?.getD ident)
Instances For
Perform a use-def analysis of LRAT proof steps, starting at the empty clause and working its way up with DFS.
Equations
Instances For
Map the set of used proof steps to a new LRAT proof that has no holes in the sequence of proof identifiers.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Trim the LRAT proof
by removing all steps that are not used in reaching the empty clause
conclusion.