NP is a complexity class
Lax904597.NPClass · concepts/Lax904597/NPClass.lean · lax-904597
No public endorsements yet.
Loading review…
Sign in with ORCIDNatural Language Statement
Theorem
The library this submission comes from makes closure under reductions part of the definition of a complexity class; these are the closure facts for NP, and for cofinal hardness in general. Membership in NP travels backward along first-order and ordered first-order reductions and depends only on the finite instances of a problem. Cofinal hardness, for any membership predicate, travels forward along first-order, ordered and relativized ordered reductions and depends only on finite instances.
Finally, cofinal hardness is the usual notion: is cofinally hard for a collection exactly when every problem of the collection reduces to .
Concept map
Evidence
This concept declares 8 statements. Each proof establishes one of them relative to its assumptions.
1 cofinalHard_congr proven
2 cofinalHard_iff proven
3 cofinalHard_of_foReduction proven
4 cofinalHard_of_orderedReduction proven
5 cofinalHard_of_relOrderedReduction proven
6 NP_mem_congr_finite proven
7 NP_mem_of_foReduction proven
8 NP_mem_of_orderedReduction proven
Lean source view on GitHub
| 1 | import Lax904597.Classes |
| 2 | |
| 3 | /-! |
| 4 | --- |
| 5 | title: NP is a complexity class |
| 6 | type: theorem |
| 7 | --- |
| 8 | The library this submission comes from makes closure under reductions part |
| 9 | of the definition of a complexity class; these are the closure facts for |
| 10 | NP, and for cofinal hardness in general. Membership in NP travels backward |
| 11 | along first-order and ordered first-order reductions and depends only on |
| 12 | the finite instances of a problem. Cofinal hardness, for any membership |
| 13 | predicate, travels forward along first-order, ordered and relativized |
| 14 | ordered reductions and depends only on finite instances. |
| 15 | |
| 16 | Finally, cofinal hardness is the usual notion: is cofinally hard for a |
| 17 | collection exactly when every problem of the collection reduces to . |
| 18 | -/ |
| 19 | |
| 20 | namespace Lax904597.NPClass |
| 21 | |
| 22 | open FirstOrder FirstOrder.Language |
| 23 | open Lax904597.Problems Lax904597.Interpretations Lax904597.Relativized Lax904597.SecondOrder |
| 24 | Lax904597.Classes |
| 25 | |
| 26 | /-- Membership in NP travels backward along first-order reductions. -/ |
| 27 | axiom NP_mem_of_foReduction : ∀ {L L' : Language.{0, 0}} [L.IsRelational] [L'.IsRelational] |
| 28 | {P : DecisionProblem L} {Q : DecisionProblem L'}, FOReduction P Q → NP.Mem Q → NP.Mem P |
| 29 | |
| 30 | /-- Membership in NP travels backward along ordered first-order reductions. -/ |
| 31 | axiom NP_mem_of_orderedReduction : ∀ {L L' : Language.{0, 0}} [L.IsRelational] [L'.IsRelational] |
| 32 | {P : DecisionProblem L} {Q : DecisionProblem L'}, OrderedFOReduction P Q → NP.Mem Q → NP.Mem P |
| 33 | |
| 34 | /-- Membership in NP depends only on the finite instances of a problem. -/ |
| 35 | axiom NP_mem_congr_finite : ∀ {L : Language.{0, 0}} [L.IsRelational] {P Q : DecisionProblem L}, |
| 36 | (∀ (A : Type) [L.Structure A] [Finite A], P A ↔ Q A) → (NP.Mem P ↔ NP.Mem Q) |
| 37 | |
| 38 | /-- Cofinal hardness travels forward along first-order reductions. -/ |
| 39 | axiom cofinalHard_of_foReduction : |
| 40 | ∀ {Mem : ∀ {L₀ : Language.{0, 0}} [L₀.IsRelational], DecisionProblem L₀ → Prop} |
| 41 | {L₁ L₂ : Language.{0, 0}} [L₁.IsRelational] [L₂.IsRelational] |
| 42 | {P : DecisionProblem L₁} {Q : DecisionProblem L₂}, |
| 43 | FOReduction P Q → CofinalHard Mem P → CofinalHard Mem Q |
| 44 | |
| 45 | /-- Cofinal hardness travels forward along ordered first-order reductions. -/ |
| 46 | axiom cofinalHard_of_orderedReduction : |
| 47 | ∀ {Mem : ∀ {L₀ : Language.{0, 0}} [L₀.IsRelational], DecisionProblem L₀ → Prop} |
| 48 | {L₁ L₂ : Language.{0, 0}} [L₁.IsRelational] [L₂.IsRelational] |
| 49 | {P : DecisionProblem L₁} {Q : DecisionProblem L₂}, |
| 50 | OrderedFOReduction P Q → CofinalHard Mem P → CofinalHard Mem Q |
| 51 | |
| 52 | /-- Cofinal hardness travels forward along relativized ordered first-order |
| 53 | reductions. -/ |
| 54 | axiom cofinalHard_of_relOrderedReduction : |
| 55 | ∀ {Mem : ∀ {L₀ : Language.{0, 0}} [L₀.IsRelational], DecisionProblem L₀ → Prop} |
| 56 | {L₁ L₂ : Language.{0, 0}} [L₁.IsRelational] [L₂.IsRelational] |
| 57 | {P : DecisionProblem L₁} {Q : DecisionProblem L₂}, |
| 58 | RelOrderedFOReduction P Q → CofinalHard Mem P → CofinalHard Mem Q |
| 59 | |
| 60 | /-- Cofinal hardness depends only on the finite instances of a problem. -/ |
| 61 | axiom cofinalHard_congr : |
| 62 | ∀ {Mem : ∀ {L₀ : Language.{0, 0}} [L₀.IsRelational], DecisionProblem L₀ → Prop} |
| 63 | {L₁ : Language.{0, 0}} [L₁.IsRelational] {P P' : DecisionProblem L₁}, |
| 64 | (∀ (A : Type) [L₁.Structure A] [Finite A], P A ↔ P' A) → |
| 65 | CofinalHard Mem P → CofinalHard Mem P' |
| 66 | |
| 67 | /-- Over a relational vocabulary, cofinal hardness is the usual notion: every |
| 68 | problem of the collection reduces to `P`. -/ |
| 69 | axiom cofinalHard_iff : ∀ {L : Language.{0, 0}} [L.IsRelational] |
| 70 | (Mem : ∀ {L₀ : Language.{0, 0}} [L₀.IsRelational], DecisionProblem L₀ → Prop) |
| 71 | (P : DecisionProblem L), |
| 72 | CofinalHard Mem P ↔ |
| 73 | ∀ {L'' : Language.{0, 0}} [L''.IsRelational] (Q : DecisionProblem L''), |
| 74 | Mem Q → Nonempty (RelOrderedFOReduction Q P) |
| 75 | |
| 76 | end Lax904597.NPClass |
| 77 |
Discussion
Ask a question or add context. Endorsements and structured flags are kept in the review panel above.
0 comments