,
Nysret Musliu
Creative Commons Attribution 4.0 International license
The performance of constraint models strongly depends on the formulation used. Redundant constraints, which are logically implied by the model, can strengthen propagation and speed up solving, but finding effective ones requires substantial expertise. Recent work has shown that Large Language Models (LLMs) can generate performance-improving constraints for MiniZinc models. However, such approaches offer no soundness guarantees and the generated constraints may exclude optimal solutions or render instances infeasible. We present a pipeline that combines LLM-based constraint generation with empirical evaluation and formal verification. At its core is a novel formalization of a supported MiniZinc subset for verifying redundancy of a constraint schema over all instances by translating MiniZinc models to Lean 4 theorems. We handle MiniZinc’s partial semantics by requiring the base model to be safe and separately proving that the proposed constraint is well-defined for all instances and solutions of the base model. We evaluate the approach on three constraint optimization problems from the literature, starting from published expert-crafted models. The augmented models show a clear improvement on one problem, improved MiniZinc Challenge scores with metric trade-offs on another, and small but non-significant changes on the third.
@InProceedings{danzinger_et_al:LIPIcs.CP.2026.17,
author = {Danzinger, Philipp and Musliu, Nysret},
title = {{From LLM Suggestions to Lean Proofs: Verified Redundant Constraints for MiniZinc}},
booktitle = {32nd International Conference on Principles and Practice of Constraint Programming (CP 2026)},
pages = {17:1--17:19},
series = {Leibniz International Proceedings in Informatics (LIPIcs)},
ISBN = {978-3-95977-432-1},
ISSN = {1868-8969},
year = {2026},
volume = {379},
editor = {Beldiceanu, Nicolas},
publisher = {Schloss Dagstuhl -- Leibniz-Zentrum f{\"u}r Informatik},
address = {Dagstuhl, Germany},
URL = {https://drops.dagstuhl.de/entities/document/10.4230/LIPIcs.CP.2026.17},
URN = {urn:nbn:de:0030-drops-266504},
doi = {10.4230/LIPIcs.CP.2026.17},
annote = {Keywords: Redundant constraints, constraint programming, MiniZinc, formal verification, Lean 4, large language models, automated theorem proving}
}
archived version
archived version