Database
SeQLean: Verifying SQL queries using Lean
arXiv cs.DB0 views
arXiv:2611.33181v1 Announce Type: cross Abstract: We present SeQLean, a system that uses formal verification in Lean to increase the accuracy of translation from natural language to SQL. This is based on modelling SQL in Lean via relational algebras. Since we do not have a translation known to be correct, we cannot directly prove correctness. Instead, we use proof challenges: tests of internal consistency that are unlikely to be satisfied by an incorrect translation. The simplest proof challenge is based on generating two translations of the same natural language query into SQL, ideally with one being optimized for performance and the other for understandability. If two translations are equivalent, they must give the same answer for every database. This can be checked using proof automation in Lean. Using Lean allows us to have essentially arbitrary properties as proof challenges, and also check these (including equivalence) taking into account known properties of the underlying database system. Even for equivalence queries of an arithmetic nature, we show that Lean can be more powerful than traditional tools due to the availability of Mathlib theorems. A JSON API over HTTP allows the verifier to be integrated into agentic frameworks.
Source:https://arxiv.org/abs/2611.33181PreviousCache Replacement in Direct-Access Cloud OLAP-An Experimental Comparison and Practical GuidanceNextFirst-Class Relationships as a Representation Threshold: Identity, Time, Confidence, and Causation
Related posts
I Built an Education App: Here’s What I Learned About Scalability
0dev.to Discuss
Travel Agency Booking Portals: Building Scalable B2B/B2C Platforms for the Modern Traveler
0dev.to Productivity
Retail ERP & POS Software: Why Off-the-Shelf Solutions Fail Growing Businesses in MENA
0dev.to Productivity

KEFCore: Apache Kafka provider for Entity Framework Core
0dev.to C#
SQLite in the terminal: query a CSV file in 5 minutes (and the text-number trap)
0dev.to Tutorial
From DBA to Founder: What I Learned Building a Product for My Own Problem
0dev.to Career