Why-provenance m-semiring Why[X] #
This file defines the Why provenance semiring Why α = Set (Set α).
Elements are sets of subsets of α (representing sets of witnesses). Addition
is union of families, and multiplication is pairwise union of witnesses.
Why α is idempotent but not absorptive when α is nonempty. It also
does not satisfy left-distributivity of multiplication over monus, contradicting
a claim in Amsterdamer, Deutch & Tannen, On the limitations of provenance for
queries with differences, Table on p. 4.
References #
Dependency graph
Equations
- instCoeWhySet = { coe := Why.carrier }
Dependency graph
Dependency graph
Dependency graph
Equations
Instances For
Dependency graph
Equations
- One or more equations did not get rendered due to their size.
Dependency graph
Why-provenance is a semiring with monus: ∖ is set difference on the outer
level, 2^(2^X) ordered by inclusion.
Named explicitly, and not to be renamed: this name is published as a link target in Sen, Maniu & Senellart, ProvSQL: A General System for Keeping Track of the Provenance and Probability of Data, ICDE 2026.
Equations
- One or more equations did not get rendered due to their size.
Dependency graph
Equations
- instCommSemiringWithMonusWhy = { toSemiringWithMonus := instSemiringWithMonusWhy, mul_comm := ⋯ }
Dependency graph
Dependency graph
Dependency graph
Why α has characteristic 0 in the CharP sense: it is idempotent and
nontrivial (⟨∅⟩ ≠ ⟨{∅}⟩), so every positive natural-number cast equals 1.
Dependency graph
Dependency graph
On Why[X] with a non-empty variable set, the identity is not an admissible
δ: delta_absorb at a = 𝟙 is absorptivity, which Why[X] lacks. This is why
the instance takes the support indicator rather than ProvSQL's historical
witness-preserving Why::delta.
Dependency graph
In Why[X], as long as X is non-empty, times is not distributive over monus. Note that this contradicts Amsterdamer, Deutch & Tannen, On the limitations of provenance for queries with differences, table page 4, which claims this semiring satisfies axiom A13.
Dependency graph
There is no semiring homomorphism from BoolFunc Y to Why α (with α
inhabited) sending the variables to arbitrary values: Why α is not
absorptive (Why.not_absorptive), which contradicts var i + 1 = 1 in
BoolFunc Y.
Dependency graph
The =-comparison correspondence fails in Why[X]. For a
three-tuple group with occurrence annotations t₁, t₂, t₃, the fused
HAVING (COUNT(*) = 2) predicate provenance is
(t₁ ⊗ t₂) ⊗ (𝟙 ⊖ t₃) ⊕ (t₁ ⊗ t₃) ⊗ (𝟙 ⊖ t₂) ⊕ (t₂ ⊗ t₃) ⊗ (𝟙 ⊖ t₁),
while the join-based rewriting Q₂^{≥2} − Q₂^{≥3} annotates the key with
((t₁ ⊗ t₂) ⊕ (t₁ ⊗ t₃) ⊕ (t₂ ⊗ t₃)) ⊖ (t₁ ⊗ t₂ ⊗ t₃). In Why[X] –
idempotent, but without distributivity of ⊗ over ⊖
(Why.not_mul_sub_left_distributive) – the two disagree: with
t₁ = t₂ = t₃ = ⟨{{a}}⟩ for any witness a, every product equals
⟨{{a}}⟩ and every factor 𝟙 ⊖ tᵢ equals 𝟙 (as ∅ ∉ {{a}}), so the
fused side keeps the witness, ⟨{{a}}⟩, while on the join side the
difference of the two ≥-chains cancels it:
⟨{{a}}⟩ ⊖ ⟨{{a}}⟩ = 𝟘.