Documentation

CslibFrontier.Algorithms.WordRAM.TwoSAT.Layout

Scratch register layout and encoded-clause memory invariants #

Internal layout definitions, register-disjointness tactic macros, and ClauseMemAt readback lemmas for the Word-RAM 2-SAT solver.

@[reducible, inline]

Constant 2.

@[reducible, inline]

Variable count G.n.

@[reducible, inline]

Clause count G.φ.length.

Discharge register inequality goals on Fin 28.

Rewrite register reads past non-overlapping register/memory updates.

Normalize memory reads across Data.set and Data.write.

Base address of the DFS scratch layout right after the output buffer.

Contiguous clause-encoding readback invariant starting at address p.

theorem Cslib.Algorithms.WordRAM.TwoSAT.clauseMemAt_cons {n : ℕ} {mem : ℕ → ℕ} {p : ℕ} {c : Logic.PL.Clause (Fin n)} {cs : Logic.PL.CNF (Fin n)} (h : ClauseMemAt mem p (c :: cs)) :
mem p = List.length c ∧ (∀ (i : ℕ) (hi : i < List.length c), mem (p + 1 + i) = ClauseCode.litCodeBy Fin.val c[i]) ∧ ClauseMemAt mem (p + 1 + List.length c) cs