Documentation

CslibFrontier.Computability.Complexity.Reduction.Isomorphism.SchroederBernstein

Polynomial-time Cantor–Schröder–Bernstein #

Berman and Hartmanis proved a polynomial-time analogue of the Cantor–Schröder–Bernstein theorem Berman and Hartmanis: if A ≤ B and B ≤ A via one-one, length-increasing reductions with polynomial-time left inverses, then A and B are polynomial-time isomorphic.

Construction #

Let f : α → β and g : β → α be the two reductions, with polynomial-time left inverses f' : β → α and g' : α → β. Starting from a : α, walk backwards through the alternating chain of preimages a ← g' a ← f' (g' a) ← ⋯, at each step checking whether the current element lies in the range of g (resp. f) by testing g (g' x) = x (resp. f (f' y) = y). Because both reductions strictly increase encoded length, each double step strictly decreases (encA x).length, so the walk stops after at most (encA a).length double steps. If it stops on the α side, map a to f a, otherwise to g' a. The walk runs in polynomial time via the library's iteration combinator, and the resulting map is a bijection whose inverse is the same construction with the roles of the two sides exchanged.

Source and adaptations #

The source version is the 1975 Cornell technical report Berman and Hartmanis, §III, Theorem 1 (printed pp. 7–10). Locators in this file refer to that report; the numbering of the 1977 journal version Berman and Hartmanis has not been checked.

The report works with languages of strings, and an invertible reduction there has a polynomial-time computable partial inverse, defined on the range of the reduction. Here instances are elements of arbitrary types α, β with injective encodings into List Bool, length means encoded length, and each reduction has a total polynomial-time left inverse. The construction combines the left inverse with the forward-image test g (g' x) = x (resp. f (f' y) = y): on the range of g the left inverse computes the preimage, and the test decides whether the input lies in that range. Together they do the work of the report's partial inverse. Injectivity of f and g is not assumed separately; it follows from the left inverses.

Main results #

References #

The walk as a polynomial-time loop #

theorem Cslib.Complexity.polyTime_schroeder_bernstein {α β : Type} {encA : α ↪ List Bool} {encB : β ↪ List Bool} {f : α → β} {f' g : β → α} {g' : α → β} (pf : Turing.MultiTapeTM.ComputableInPolyTime f encA encB) (pf' : Turing.MultiTapeTM.ComputableInPolyTime f' encB encA) (pg : Turing.MultiTapeTM.ComputableInPolyTime g encB encA) (pg' : Turing.MultiTapeTM.ComputableInPolyTime g' encA encB) (hff : Function.LeftInverse f' f) (hgg : Function.LeftInverse g' g) (hf : ∀ (a : α), (encA a).length < (encB (f a)).length) (hg : ∀ (b : β), (encB b).length < (encA (g b)).length) :
∃ (e : α ≃ β), (Turing.MultiTapeTM.ComputableInPolyTime (⇑e) encA encB ∧ Turing.MultiTapeTM.ComputableInPolyTime (⇑e.symm) encB encA) ∧ ∀ (a : α), e a = f a ∨ g (e a) = a

Polynomial-time Cantor–Schröder–Bernstein, the bijection behind Berman and Hartmanis, §III, Theorem 1, stated without reference to languages.

If f : α → β and g : β → α are polynomial-time computable, strictly increase encoded length, and have polynomial-time left inverses f' and g', then there is an equivalence e : α ≃ β such that e and e.symm are polynomial-time computable and every e a is either f a or a g-preimage of a. The bijection is decided by walking the alternating chain of preimages backwards; length-increase bounds the walk by the input length. The total left inverses and the forward-image tests replace the report's partial inverses (see the module docstring).

Berman–Hartmanis isomorphism theorem (Berman and Hartmanis, §III, Theorem 1): if A ≤₁,ᵢₗ B and B ≤₁,ᵢₗ A, that is, each reduces to the other by a length-increasing one-one reduction with a polynomial-time left inverse, then A ≅ᵖ B.