Set oracles and the Turing join #
Mathlib's TuringReducible compares partial functions ℕ →. ℕ. A set of naturals is used as an
oracle through its characteristic function: A.oracle is the total partial function with values
A.indicator 1, answering 1 on A and 0 off it. Turing reducibility of sets is Turing
reducibility of these oracles.
The Turing join f.turingJoin g of two partial functions answers f on even inputs and g on
odd inputs, and records the side in the parity of its output. It is the least upper bound of f and
g for Turing reducibility, which makes Mathlib's TuringDegree a join-semilattice. For sets, the
parity join A.turingJoin B = {2 * x | x ∈ A} ∪ {2 * x + 1 | x ∈ B} has an oracle Turing
equivalent to the Turing join of the two oracles, so it is the least upper bound of A and B
among sets, and its degree is the supremum of their degrees.
Main definitions #
Set.oracle: the characteristic function of a set of naturals, as an oracle.PFun.turingJoin: the Turing join of two partial functionsℕ →. ℕ.Set.turingJoin: the parity join of two sets of naturals.- The
SemilatticeSupinstance onTuringDegree, whose supremum is induced by the Turing join.
Main results #
ManyOneReducible.turingReducible_oracle: a many-one reduction of sets gives a Turing reduction of their oracles.TuringReducible.turingJoin_left,TuringReducible.turingJoin_right,PFun.turingJoin_turingReducible_iff: the Turing join is the least upper bound for Turing reducibility.Set.oracle_turingJoin_turingEquivalent: the oracle of the parity join of two sets is Turing equivalent to the Turing join of their oracles.Set.oracle_turingJoin_turingReducible_iff: the parity join is the least upper bound of two sets for Turing reducibility.TuringDegree.toAntisymmetrization_oracle_turingJoin: the degree of the parity join of two sets is the supremum of their degrees.Set.partrec_oracle_iff: partial computability of a set oracle is equivalent to computability of membership.Set.turingReducible_empty_iff: reducibility to the empty oracle characterizes computable sets.Set.union_turingReducible: if two sets reduce to an oracle, so does their union.
References #
- R. I. Soare, Recursively Enumerable Sets and Degrees, Springer, 1987, Chapters III.1 and III.2.
- The Turing join of partial functions, coding both its input and its output by parity, its
least-upper-bound lemmas and the
SemilatticeSupinstance onTuringDegreefollow Tanner Duve's Mathlib pull request 37062.
The order on degrees represented by partial functions is Turing reducibility.
A set's characteristic function is computable in its own oracle.
A set oracle is partial computable exactly when membership in the set is computable.
The empty set oracle is Turing reducible to every partial function.
A set is Turing reducible to the empty oracle exactly when its membership is computable.
If A and B are Turing reducible to an oracle g, so is A ∪ B: take the maximum of the
two answers.
The Turing join of partial functions #
A partial function is Turing reducible to its Turing join with any other: query the join at
2 * n and halve the answer.
A partial function is Turing reducible to the Turing join of any other with it: query the join
at 2 * n + 1 and halve the answer.
The Turing join of two partial functions reducible to h is reducible to h: on input n,
run the reduction of f or of g at n.div2 according to the parity of n.
The Turing join is the least upper bound for Turing reducibility: it is reducible to h
exactly when both of its sides are.
The Turing join is monotone for Turing reducibility in both arguments.
The Turing join respects Turing equivalence in both arguments.
Turing degrees form a join-semilattice #
Turing degrees form a join-semilattice: the supremum of the degrees of f and g is the degree
of their Turing join.
The supremum of the degrees of f and g is the degree of their Turing join.
The parity join of sets #
An even number 2 * n lies in the parity join of A and B exactly when n ∈ A.
The oracle of the parity join of two sets is Turing equivalent to the Turing join of their oracles.
The oracle of A is Turing reducible to the oracle of the parity join of A and B.
The oracle of B is Turing reducible to the oracle of the parity join of A and B.
The degree of the parity join of two sets is the supremum of their degrees.