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

#P and NP

Lax366625.SharpPAndNP · concepts/Lax366625/SharpPAndNP.lean · lax-366625

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

    A decision problem is in NP if and only if it agrees, on nonempty finite structures, with the support of some counting problem of #P: NP is the class of the supports of #P. The support of a parsimoniously #P-hard counting problem is NP-hard, and if such a support is in PTIME, then NP is contained in PTIME. So a counting problem whose support is easy, such as counting the models of a DNF formula, is not parsimoniously #P-hard unless NP ⊆ PTIME.

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

    This concept declares 3 statements. Each proof establishes one of them relative to its assumptions.

    1 mem_NP_iff_exists_sharpP_support proven

    2 NP_hard_support_of_sharpP_parsimoniousHard proven

    3 NP_subset_PTIME_of_sharpP_parsimoniousHard proven

    Lean source view on GitHub

    1import Lax904597.Problems
    2import Lax904597.Interpretations
    3import Lax904597.Relativized
    4import Lax904597.SecondOrder
    5import Lax904597.Classes
    6import Lax904597.Sat
    7import Lax904597.Machines
    8import Lax535992.HornSat
    9import Lax535992.CircuitValue
    10import Lax535992.DeterministicMachines
    11import Lax535992.ClassPTIME
    12import Lax366625.CountingProblems
    13import Lax366625.CountingClasses
    14import Lax366625.WitnessCounting
    15import Lax366625.SecondOrderCounting
    16import Lax366625.QuantitativeLogic
    17import Lax366625.CountingSat
    18import Lax366625.MachineNumbers
    19import Lax366625.CountingRuns
    20import Lax366625.NumberedCircuits
    21import Lax366625.HornNumbers
    22
    23/-!
    24---
    25title: #P and NP
    26type: theorem
    27---
    28A decision problem is in NP if and only if it agrees, on nonempty finite
    29structures, with the support of some counting problem of #P: NP is the class
    30of the supports of #P. The support of a parsimoniously #P-hard counting
    31problem is NP-hard, and if such a support is in PTIME, then NP is contained
    32in PTIME. So a counting problem whose support is easy, such as counting the
    33models of a DNF formula, is not parsimoniously #P-hard unless NP ⊆ PTIME.
    34-/
    35
    36namespace Lax366625.SharpPAndNP
    37
    38open FirstOrder FirstOrder.Language
    39open Lax904597.Problems Lax904597.Interpretations Lax904597.Relativized Lax904597.SecondOrder
    40open Lax904597.Classes Lax904597.Sat Lax904597.Machines
    41open Lax535992.ClassPTIME
    42open Lax366625.CountingProblems Lax366625.CountingClasses Lax366625.WitnessCounting
    43open Lax366625.SecondOrderCounting
    44open Lax366625.QuantitativeLogic Lax366625.CountingSat Lax366625.MachineNumbers
    45open Lax366625.CountingRuns
    46open Lax366625.NumberedCircuits Lax366625.HornNumbers
    47
    48/-- NP is the class of the supports of #P. -/
    49axiom mem_NP_iff_exists_sharpP_support :
    50 ∀ {L : Language.{0, 0}} [L.IsRelational] (P : DecisionProblem L),
    51 NP.Mem P ↔ ∃ C : CountingProblem L, SharpP.Mem C ∧
    52 ∀ (A : Type) [L.Structure A] [Finite A] [Nonempty A], C.support A ↔ P A
    53
    54/-- The support of a parsimoniously #P-hard problem is NP-hard. -/
    55axiom NP_hard_support_of_sharpP_parsimoniousHard :
    56 ∀ {L : Language.{0, 0}} [L.IsRelational] {C : CountingProblem L},
    57 SharpP.ParsimoniousHard C → NP.Hard C.support
    58
    59/-- A parsimoniously #P-hard problem with support in PTIME gives NP ⊆ PTIME. -/
    60axiom NP_subset_PTIME_of_sharpP_parsimoniousHard :
    61 ∀ {L : Language.{0, 0}} [L.IsRelational] {C : CountingProblem L},
    62 SharpP.ParsimoniousHard C → PTIME.Mem C.support →
    63 ∀ {L' : Language.{0, 0}} [L'.IsRelational] (P : DecisionProblem L'), NP.Mem P → PTIME.Mem P
    64
    65end Lax366625.SharpPAndNP
    66
    Show ProofShow ProofShow Proof

    Discussion

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

    Loading discussion…