There is a newer version of the record available.

Published August 18, 2026 | Version v1.1.0

provenance-lean: Database Provenance in Lean 4

Authors/Creators

  • 1. DI ENS, ENS-PSL, CNRS, Inria, Paris, France

Description

A Lean 4 formalization of database provenance in the semiring framework of Green, Karvounarakis and Tannen. It defines semirings with monus and twelve concrete provenance semirings, an annotated relational algebra with difference and aggregation, and the provenance-aware query rewriting implemented by the ProvSQL extension to PostgreSQL, whose correctness it proves. A kind-indexed general query syntax makes the scope restrictions on aggregate results a matter of static typing, and carries the rewriting of grouping and HAVING together with its compositional closure. Further results cover the possible-worlds reading of Boolean-function annotations and probabilistic query evaluation, provenance circuits and their Tseitin encoding, adequacy of the annotated semantics against the plain one, HAVING provenance with its enumeration algorithms, and the NP-completeness of non-zero HAVING SUM provenance in data complexity. The development is sorry-free.

Notes

If you use provenance-lean in academic work, please cite it using the metadata in this file. Cite the version DOI of the tag you used rather than the concept DOI, so that the citation names a specific state of the code.

Files

PierreSenellart/provenance-lean-v1.1.0.zip

Files (407.9 kB)

Name Size
md5:b41fc0b61c3f3859604492b9fb9efca5
407.9 kB Preview Download

Additional details

Related works