Soundness of a fuel-bounded checked constraint solver
ProvedNishtAbel2024.checked_solver_soundLet be a size context, a finite list of size constraints, a finite list of tracked variables, and a fuel bound. Write for the checked wrapper around the existing constraint solver. For every flexible substitution ,
Coherence means that the substitution fixes every rigid variable, maps every variable to a well-formed size expression in , and satisfies every constraint using the current formalization's normalization of right-hand bounds. This gives a sound acceptance criterion for the candidate computed by the existing solver.
The wrapper is incomplete: returning no candidate can reflect insufficient fuel or an incomplete comparison search and does not imply unsatisfiability. The theorem does not certify separate raw function-call bounds, establish completeness or correctness of the original Algorithm 1, or prove termination of a program.
Formalization Note. This is an auxiliary construction for the current Lean model, not the thesis's full Theorem 14.
import Definitions.Def_NishtAbel2024_CheckedConstraintSolver
namespace NishtAbel2024
theorem checked_solver_sound :
∀ (fuel : Nat) (Ψ : SizeCtx) (C : List SizeConstraint) (T : List SizeVar) (φ : FlexSubst),
CheckedConstraintSolver.checkedSolve fuel Ψ C T = some φ → CoherentSubst Ψ C φ := by
sorry
end NishtAbel2024