Conjunctive query containment is NP-complete

Lax420092.ContainmentNPComplete · concepts/Lax420092/ContainmentNPComplete.lean · lax-420092

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

    Boolean conjunctive query containment is NP-complete in the sense of the NP core: it reduces to evaluation by the Chandra–Merlin theorem, evaluating the right query in the canonical database of the left one, and evaluation reduces to it, a database being a variable-free query. This is the containment half of Chandra and Merlin (1977).

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

    Lean source view on GitHub

    1import Lax904597.Problems
    2import Lax904597.Interpretations
    3import Lax904597.Classes
    4import Lax799700.Problems
    5import Lax420092.QueryDatabases
    6import Lax420092.Evaluation
    7import Lax420092.QueryPairs
    8import Lax420092.PackagedInstances
    9
    10/-!
    11---
    12title: Conjunctive query containment is NP-complete
    13type: theorem
    14---
    15Boolean conjunctive query containment is NP-complete in the sense of the NP
    16core: it reduces to evaluation by the Chandra–Merlin theorem, evaluating the
    17right query in the canonical database of the left one, and evaluation
    18reduces to it, a database being a variable-free query. This is the
    19containment half of Chandra and Merlin (1977).
    20-/
    21
    22namespace Lax420092.ContainmentNPComplete
    23
    24open FirstOrder FirstOrder.Language
    25open Lax904597.Problems Lax904597.Interpretations Lax904597.Classes Lax799700.Problems
    26open Lax420092.QueryDatabases Lax420092.Evaluation Lax420092.QueryPairs Lax420092.PackagedInstances
    27
    28/-- CQContainment is NP-complete. -/
    29axiom cqContainment_NP_complete : NP.Complete CQContainment
    30
    31end Lax420092.ContainmentNPComplete
    32
    Show Proof

    Discussion

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

    Loading discussion…