Many-one reductions by a class of maps #
Most reductions of complexity theory have one shape: a map f of an admissible kind sends the
instances of A to instances of B, preserving membership. Here the admissible maps are an
arbitrary predicate Good on functions, and ManyOneReducibleBy Good A B says that such a map
exists. Polynomial-time and logarithmic-space reductions of encoded problems, and first-order
reductions of ordered queries, are instances. The map-parametric kernel and its laws live in
Complexity.Computability.Reduction.ManyOne, publicly re-exported here; only class-level helpers
are defined in this module.
Reflexivity and transitivity are not assumed: they follow from closure of the admissible maps
under the identity and composition (ManyOneReducibleBy.refl, ManyOneReducibleBy.trans), which
holds for the machine-defined classes but has to be proved separately for others. A change of
representation transfers reductions when each admissible map is simulated, through partial
decodings, by an admissible map of representations (ManyOneReducibleBy.lift).
A class of problems is given, as elsewhere in the library, by a set of problems for every type of
instances and every encoding of them as bit strings. Since admissibility of a map generally
depends on the encodings, hardness is stated for a reducibility R enc A B indexed by the encoding
enc of the source instances, such as ManyOneReducibleBy (Good enc) A B: B is hard for a class
𝒞 (HardUnder R 𝒞 B) when every problem A in 𝒞, with any encoding enc, has R enc A B,
and complete (CompleteUnder R 𝒞 encB B) when it also belongs to 𝒞. Polynomial-time and
logspace hardness and completeness are instances, whose unfoldings mention their own named
reducibilities.
Mathlib's ManyOneReducible (Mathlib/Computability/Reduce.lean) is the computable reducibility
on Primcodable types, the instance of this shape for computable maps; it is not reused here.
Main definitions #
Cslib.Complexity.ManyOneReducibleBy: many-one reducibility by admissible maps.Cslib.Complexity.HardUnder,Cslib.Complexity.CompleteUnder: hardness and completeness for a class under a reducibility.
Main results #
Cslib.Complexity.ManyOneReducibleBy.refl,Cslib.Complexity.ManyOneReducibleBy.trans: reflexivity and transitivity from identity and composition closure.Cslib.Complexity.ManyOneReducibleBy.mono: more admissible maps give more reductions.Cslib.Complexity.ManyOneReducibleBy.compl,Cslib.Complexity.ManyOneReducibleBy.mem_compl: reductions between complements and closure of complement classes.Cslib.Complexity.compl_union_mem,Cslib.Complexity.compl_inter_mem,Cslib.Complexity.exists_forall_mem_compl_iff: De Morgan and existential complement-class helpers.Cslib.Complexity.ManyOneReducibleBy.lift: transfer along partial decodings.Cslib.Complexity.HardUnder.trans: hardness transfers along reductions.Cslib.Complexity.HardUnder.mono,Cslib.Complexity.CompleteUnder.mono: a weaker reducibility preserves hardness and completeness.Cslib.Complexity.HardUnder.compl,Cslib.Complexity.CompleteUnder.compl: complements of hard and complete problems.
References #
- S. Arora, B. Barak, Computational Complexity: A Modern Approach, Definition 2.7.
Complement-class helpers #
Negating the pointwise membership condition in an existential class characterization gives
the characterization of the complement class {A | Aᶜ ∈ C}.
Hardness and completeness #
B is hard for the class 𝒞 under the reducibility R: every problem in 𝒞, with any
encoding enc of its instances, reduces to B, in that R enc A B.
The type of instances is a strict-implicit argument, inferred from enc when a hardness proof is
applied. An ordinary implicit argument would be instantiated as soon as a hardness proof is
produced, for example by h.trans r, so that its type would no longer be a hardness statement
and (h.trans r).trans r' would not elaborate.
Instances For
B is complete for the class 𝒞 under the reducibility R: it is in 𝒞, with the encoding
encB, and is 𝒞-hard under R.
Instances For
A weaker reducibility preserves hardness.
Hardness transfers along a reduction S B C that composes with R-reductions to B into
R'-reductions to C.
A weaker reducibility preserves completeness.
If R relates complements and the complement of every problem in 𝒟 is in 𝒞, the
complement of a 𝒞-hard problem is 𝒟-hard.
If R relates complements and the problems in 𝒟 are exactly the complements of the
problems in 𝒞, the complement of a 𝒞-complete problem is 𝒟-complete.