While this submission is a draft, it cannot be used by other submissions.

Probabilistic query evaluation through provenance

Lax392996.ProbabilisticEvaluation · concepts/Lax392996/ProbabilisticEvaluation.lean · lax-392996

proven

Loading review…

Sign in with ORCID

Community review

Flags

Each flag is tied to a public ORCID identity and explains why this concept may be incorrect.

No flags have been submitted.

    Community review

    Flag this concept

    State precisely what appears incorrect. This explanation will be public under your ORCID name.

    No source line selected.

    Natural Language Statement

    Theorem

    For a probability assignment PP on a finite set XX of variables, a source query qq, a B[X]\mathcal{B}[X]-instance I^\hat I and a tuple tt, the marginal probability that tt appears in the answer of qq on a random world of I^\hat I equals the probability of the annotation of tt in the annotated answer ⟨ ⁣⟨q⟩ ⁣⟩I^\langle\!\langle q \rangle\!\rangle_{\hat I}: Pr⁡(t∈q(I^))=Pr⁡(⋁(t,α)∈⟨ ⁣⟨q⟩ ⁣⟩I^α)\Pr(t \in q(\hat I)) = \Pr\big(\bigvee_{(t, \alpha) \in \langle\!\langle q \rangle\!\rangle_{\hat I}} \alpha\big). This is the paper's Theorem 12, the justification of intensional probabilistic query evaluation: evaluate the query once over Boolean-function annotations and take the probability of the resulting function.

    Concept map
    9 concepts
    100%
    Proven claimDefinitionThis conceptRelated conceptA → B: B builds on A
    Evidence

    Each proof establishes this claim relative to its assumptions.

    In the paper

    • page 5 of this submission's paper
    • page 18 of this submission's paper

    Lean source view on GitHub

    1import Lax392996.SemiringsWithMonus
    2import Lax392996.BooleanFunctions
    3import Lax392996.Databases
    4import Lax392996.AnnotatedDatabases
    5import Lax392996.RelationalAlgebra
    6import Lax392996.MultisetSemantics
    7import Lax392996.AnnotatedSemantics
    8import Lax392996.ProbabilisticDatabases
    9
    10/-!
    11---
    12title: Probabilistic query evaluation through provenance
    13type: theorem
    14---
    15For a probability assignment PP on a finite set XX of variables, a source
    16query qq, a B[X]\mathcal{B}[X]-instance I^\hat I and a tuple tt, the
    17marginal probability that tt appears in the answer of qq on a random
    18world of I^\hat I equals the probability of the annotation of tt in the
    19annotated answer ⟨ ⁣⟨q⟩ ⁣⟩I^\langle\!\langle q \rangle\!\rangle_{\hat I}: Pr⁡(t∈q(I^))=Pr⁡(⋁(t,α)∈⟨ ⁣⟨q⟩ ⁣⟩I^α)\Pr(t \in q(\hat I)) = \Pr\big(\bigvee_{(t, \alpha) \in \langle\!\langle q \rangle\!\rangle_{\hat I}} \alpha\big)
    20
    21. This is the paper's Theorem 12,
    22the justification of intensional probabilistic query evaluation: evaluate
    23the query once over Boolean-function annotations and take the probability
    24of the resulting function.
    25-/
    26
    27namespace Lax392996.ProbabilisticEvaluation
    28
    29open Lax392996.SemiringsWithMonus Lax392996.BooleanFunctions Lax392996.Databases
    30open Lax392996.AnnotatedDatabases Lax392996.RelationalAlgebra Lax392996.MultisetSemantics
    31open Lax392996.AnnotatedSemantics Lax392996.ProbabilisticDatabases
    32
    33/-- **Theorem 12.** The marginal probability of a tuple is the probability
    34of its disjunctive annotation in the annotated answer. -/
    35axiom theorem_12 : ∀ {X : Type} [Fintype X] [DecidableEq X] {T : Type} [ValueType T]
    36 (P : ProbAssignment X) {n : ℕ} (q : Query T n) (hq : q.source)
    37 (Î : AnnotatedDatabase T (BoolFunc X)) (t : Tuple T n),
    38 ProbAssignment.marginalProb P q Î t
    39 = ProbAssignment.funcProb P (tupleAnnotation (Query.evaluateAnnotated q hq Î) t)
    40
    41end Lax392996.ProbabilisticEvaluation
    42
    Show Proof

    Discussion

    Ask a question or add context. Endorsements and structured flags are kept in the review panel above.

    Loading discussion…