Frozen restatement of the claims of a published paper #
Sen, Maniu & Senellart, ProvSQL: A General System for Keeping Track of the Provenance and Probability of Data, ICDE 2026 links to this library: eight of its definitions and results carry a hyperlink to a declaration page under https://provsql.org/lean-docs/, and the paper as a whole links to the landing page. Those links are in a PDF and cannot be fixed after the fact.
There is one published documentation tree, and it tracks main, so the paper's
links deliberately reach material that has grown beyond the paper. What has to
be guaranteed is therefore narrower, and sharper, than "the docs still match the
paper":
- the anchors still exist – checked by
scripts/check-anchors.sh, which reads theAnchor:lines below; - the declarations they land on still subsume the paper's claims – checked by this file.
This module is what makes the second half mechanical. Each claim the paper makes
is restated here in the paper's own form and proved by applying the library
declaration the paper cites. If the library generalizes – a wider fragment, an
extra hypothesis discharged, a fused operator – the proof still goes through,
which is the right answer: the paper's claim is still there, subsumed. If a
statement is ever weakened, this file stops compiling and lake build fails.
No textual or anchor-level check distinguishes those two cases.
The statements below are therefore frozen: they were fixed when the paper
was published and are never edited to follow the library. Only the proof terms
may be re-plumbed. scripts/release.sh check compares this file against the
hash in scripts/icde2026.sha256, so an edit is a deliberate act that shows up
in a diff rather than a silent drift.
Scope #
Two places where the library and the paper are not literally coextensive, both recorded here rather than papered over:
- The paper's relational algebra has an aggregation former
γ_{i₁,…,i_m}[t₁:f₁,…,t_n:f_n], and its rewriting has a rule (R5) for it.Query, the declaration the paper's grammar links to, is the classical syntax: it carries the operators of RA⁺(∖) plusProvSum, the ⊕-aggregation that rules (R1)–(R4) emit. General aggregation, and the rewriting rule for it, live on the kind-indexed syntax (AggQuery.Gamma, and the bare-grouping rewriting ofProvenance.AggQueryGroupRewriting), which did not exist when the paper was written. This module deliberately does not import those: a frozen file should depend on as little as possible, and what it must pin is what the paper's anchors name. - Accordingly, the rewriting correctness theorem restated below carries the
hypothesis
q.source, the fragment (R1)–(R4) covers.
Anchor: Provenance.html
Semirings with monus #
The paper defines an m-semiring by three equations. In the library the monus is
axiomatized instead by its Galois connection a ⊖ b ≤ c ↔ a ≤ b ⊕ c, which is
strictly stronger: the three equations are theorems. That is exactly the shape
of drift this file is meant to allow – a generalization of the cited
declaration keeps these proofs one-liners.
The paper's m-semiring axiom (i): a ⊕ (b ⊖ a) = b ⊕ (a ⊖ b).
Anchor: Provenance/SemiringWithMonus.html#SemiringWithMonus
Dependency graph
The paper's m-semiring axiom (ii): (a ⊖ b) ⊖ c = a ⊖ (b ⊕ c).
Dependency graph
The paper's m-semiring axiom (iii): a ⊖ a = 𝟘 ⊖ a = 𝟘.
Dependency graph
The paper's δ-semiring axiom (i): δ(𝟘) = 𝟘.
Dependency graph
The paper's δ-semiring axiom (ii): δ(𝟙 ⊕ ⋯ ⊕ 𝟙) = 𝟙, whatever the number
of 𝟙s.
Dependency graph
Why-provenance #
The paper's proposition: for a set X, the structure
(2^(2^X), ∅, {∅}, ∪, ⋓, ∖) is an m-semiring. Exhibiting the instance is only
half of that – the operations have to be the stated ones – so each of the six is
pinned separately.
Why-provenance: 𝟘 is ∅.
Anchor: Provenance/Semirings/Why.html#instSemiringWithMonusWhy
Dependency graph
Dependency graph
Why-provenance: ⊕ is union of families.
Dependency graph
Why-provenance: ⊗ is ⋓, the pairwise union of witnesses.
Dependency graph
Why-provenance: ⊖ is set difference of families.
Dependency graph
Why-provenance is an m-semiring under exactly those operations.
Dependency graph
Annotated databases #
The paper: a K-relation of arity k is a finite multiset of k-tuples each
carrying an annotation from K, and a K-instance over a schema D maps each
relation name R to a K-relation of arity D(R).
A K-relation of arity n is a multiset of n-tuples paired with an
annotation.
Anchor: Provenance/AnnotatedDatabase.html#AnnotatedDatabase
Dependency graph
A K-instance answers a relation name, at an arity, with a K-relation.
Dependency graph
The relational algebra RA_k #
Each clause of the paper's grammar, as the typing rule it is. Each is proved by
exhibiting the corresponding constructor of Query.
Anchor: Provenance/Query.html#Query
Dependency graph
projection: for q ∈ RA_k and terms t₁, …, t_n of max-index ≤ k,
Π_{t₁,…,t_n}(q) ∈ RA_n.
Equations
- Icde2026.raProjection ts q = Π ts q
Instances For
Dependency graph
selection: for q ∈ RA_k and φ a Boolean combination of comparisons
between terms of max-index ≤ k, σ_φ(q) ∈ RA_k.
Equations
- Icde2026.raSelection φ q = σ φ q
Instances For
Dependency graph
cross product: for q₁ ∈ RA_{k₁} and q₂ ∈ RA_{k₂},
q₁ × q₂ ∈ RA_{k₁+k₂}.
Equations
- Icde2026.raProduct q₁ q₂ = q₁ × q₂
Instances For
Dependency graph
multiset sum: for q₁, q₂ ∈ RA_k, q₁ ⊎ q₂ ∈ RA_k.
Equations
- Icde2026.raMultisetSum q₁ q₂ = (q₁ ⊎ q₂)
Instances For
Dependency graph
Dependency graph
multiset difference: for q₁, q₂ ∈ RA_k, q₁ - q₂ ∈ RA_k.
Equations
- Icde2026.raDifference q₁ q₂ = (q₁ - q₂)
Instances For
Dependency graph
join, the paper's syntactic sugar q₁ ⋈_φ q₂ ≝ σ_φ(q₁ × q₂).
Equations
- Icde2026.raJoin φ q₁ q₂ = σ φ (q₁ × q₂)
Instances For
Dependency graph
set union, the paper's syntactic sugar q₁ ∪ q₂ ≝ ε(q₁ ⊎ q₂).
Equations
- Icde2026.raSetUnion q₁ q₂ = ε (q₁ ⊎ q₂)
Instances For
Dependency graph
Plain multiset semantics #
The paper's ⟦·⟧_I, clause by clause.
Anchor: Provenance/Query.html#Query.evaluate
relation: ⟦R⟧_I ≝ I(R).
Dependency graph
projection: ⟦Π_{t₁,…,t_n}(q)⟧_I ≝ {|(t₁(u),…,t_n(u)) | u ∈ ⟦q⟧_I|}.
Dependency graph
selection: ⟦σ_φ(q)⟧_I ≝ {|u | u ∈ ⟦q⟧_I, φ(u)|}.
Dependency graph
cross product: ⟦q₁ × q₂⟧_I ≝ ⟦q₁⟧_I × ⟦q₂⟧_I.
Dependency graph
multiset sum: ⟦q₁ ⊎ q₂⟧_I ≝ ⟦q₁⟧_I ⊎ ⟦q₂⟧_I.
Dependency graph
duplicate elimination: ⟦ε(q)⟧_I maps t to 1 when ⟦q⟧_I(t) > 0
and to 0 otherwise.
Dependency graph
multiset difference: every copy of a tuple occurring at all in ⟦q₂⟧_I
is removed from ⟦q₁⟧_I.
Dependency graph
Semantics over annotated databases #
The paper's ⟪·⟫_Î: the same operators, with ⊕ on multiset sum and duplicate
elimination, ⊗ on cross product, and ⊖ on difference.
Anchor: Provenance/QueryAnnotatedDatabase.html#Query.evaluateAnnotated
relation: ⟪R⟫_Î ≝ Î(R).
Dependency graph
projection: the annotation rides along unchanged.
Dependency graph
selection: the predicate reads the data part only.
Dependency graph
cross product: annotations multiply, α ⊗ β.
Dependency graph
multiset sum: the two annotated relations are added.
Dependency graph
duplicate elimination: the copies of a tuple are collapsed into one,
annotated by the ⊕-sum of their annotations.
Dependency graph
multiset difference: a tuple of the left argument keeps its slot, with
annotation α ⊖ Σβ where Σβ is the ⊕-sum of the annotations of its copies
in the right argument.
Dependency graph
The rewriting rules (R1)–(R4) #
The paper gives five rules; (R5), aggregation, is not part of this classical
rewriting (see Scope above). Each rule below is stated as the equation it is:
applying the rewriting to an operator produces exactly the paper's right-hand
side. The annotation lives in the last column, so a query of arity n rewrites
to one of arity n+1.
Anchor: Provenance/QueryRewriting.html#query.Rewriting
(R1) projection. Π_{t₁,…,t_n}(q) is rewritten to
Π_{t₁,…,t_n,#(k+1)}(q̂): the terms are carried over unchanged and the
annotation column of the rewritten argument is appended.
Dependency graph
(R2) cross product. q₁ × q₂ is rewritten to
Π_{#1,…,#k₁,#(k₁+2),…,#(k₁+k₂+1),#(k₁+1) ⊗ #(k₁+k₂+2)}(q̂₁ × q̂₂): the two
data blocks are kept, the two annotation columns are multiplied.
Dependency graph
(R3) duplicate elimination. ε(q) is rewritten to
γ_{1,…,k}[#(k+1) : ⊕](q̂): group by the data columns and ⊕-sum the
annotation column. This is the rule that makes duplicate elimination the
⊕-gate creator, and ProvSum is its target operator.
Dependency graph
(R4) multiset difference. q₁ - q₂ is rewritten to the multiset sum of
two branches: the tuples of q̂₁ whose data part survives the set difference of
the two data projections, carrying their annotation unchanged; and the tuples of
q̂₁ matched against the ⊕-aggregated q̂₂, carrying α ⊖ Σβ. Both branches
are joins on the k data columns.
Dependency graph
Correctness of the rewriting #
The paper's theorem: let D be a schema, q a query over D, K an
appropriate algebraic structure, Î a K-instance over D, and q̂ the query
obtained by applying the rewriting rules recursively bottom up. Then
⟪q⟫_Î = ⟦q̂⟧_Î.
The equality is between an annotated relation and a plain one, so it is stated
through the encoding that puts the annotation in the last column
(toComposite), which is what "the same relation" means once the rewriting has
moved the annotation into the data.
Anchor: Provenance/QueryRewriting.html#Query.rewriting_valid
⟪q⟫_Î = ⟦q̂⟧_Î, for q in the fragment the rules (R1)–(R4) cover.