#P and NP
Lax366625.SharpPAndNP · concepts/Lax366625/SharpPAndNP.lean · lax-366625
No public endorsements yet.
Loading review…
Sign in with ORCIDNatural 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
Evidence
Lean source view on GitHub
| 1 | import Lax904597.Problems |
| 2 | import Lax904597.Interpretations |
| 3 | import Lax904597.Relativized |
| 4 | import Lax904597.SecondOrder |
| 5 | import Lax904597.Classes |
| 6 | import Lax904597.Sat |
| 7 | import Lax904597.Machines |
| 8 | import Lax535992.HornSat |
| 9 | import Lax535992.CircuitValue |
| 10 | import Lax535992.DeterministicMachines |
| 11 | import Lax535992.ClassPTIME |
| 12 | import Lax366625.CountingProblems |
| 13 | import Lax366625.CountingClasses |
| 14 | import Lax366625.WitnessCounting |
| 15 | import Lax366625.SecondOrderCounting |
| 16 | import Lax366625.QuantitativeLogic |
| 17 | import Lax366625.CountingSat |
| 18 | import Lax366625.MachineNumbers |
| 19 | import Lax366625.CountingRuns |
| 20 | import Lax366625.NumberedCircuits |
| 21 | import Lax366625.HornNumbers |
| 22 | |
| 23 | /-! |
| 24 | --- |
| 25 | title: #P and NP |
| 26 | type: theorem |
| 27 | --- |
| 28 | A decision problem is in NP if and only if it agrees, on nonempty finite |
| 29 | structures, with the support of some counting problem of #P: NP is the class |
| 30 | of the supports of #P. The support of a parsimoniously #P-hard counting |
| 31 | problem is NP-hard, and if such a support is in PTIME, then NP is contained |
| 32 | in PTIME. So a counting problem whose support is easy, such as counting the |
| 33 | models of a DNF formula, is not parsimoniously #P-hard unless NP ⊆ PTIME. |
| 34 | -/ |
| 35 | |
| 36 | namespace Lax366625.SharpPAndNP |
| 37 | |
| 38 | open FirstOrder FirstOrder.Language |
| 39 | open Lax904597.Problems Lax904597.Interpretations Lax904597.Relativized Lax904597.SecondOrder |
| 40 | open Lax904597.Classes Lax904597.Sat Lax904597.Machines |
| 41 | open Lax535992.ClassPTIME |
| 42 | open Lax366625.CountingProblems Lax366625.CountingClasses Lax366625.WitnessCounting |
| 43 | open Lax366625.SecondOrderCounting |
| 44 | open Lax366625.QuantitativeLogic Lax366625.CountingSat Lax366625.MachineNumbers |
| 45 | open Lax366625.CountingRuns |
| 46 | open Lax366625.NumberedCircuits Lax366625.HornNumbers |
| 47 | |
| 48 | /-- NP is the class of the supports of #P. -/ |
| 49 | axiom 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. -/ |
| 55 | axiom 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. -/ |
| 60 | axiom 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 | |
| 65 | end Lax366625.SharpPAndNP |
| 66 |
Builds on
Lax366625.CountingClassesLax366625.CountingProblemsLax366625.CountingRunsLax366625.CountingSatLax366625.HornNumbersLax366625.MachineNumbersLax366625.NumberedCircuitsLax366625.QuantitativeLogicLax366625.SecondOrderCountingLax366625.WitnessCountingLax535992.CircuitValueLax535992.ClassPTIMELax535992.DeterministicMachinesLax535992.HornSatLax904597.ClassesLax904597.InterpretationsLax904597.MachinesLax904597.ProblemsLax904597.RelativizedLax904597.SatLax904597.SecondOrder
Used by
none
From Mathlib
none
Discussion
Ask a question or add context. Endorsements and structured flags are kept in the review panel above.
0 comments