Strong reducibility and degrees. #
THIS FILE IS SYNCHRONIZED WITH MATHLIB4. Any changes to this file require a corresponding PR to mathlib4.
This file defines the notions of computable many-one reduction and one-one reduction between sets, and shows that the corresponding degrees form a semilattice.
Notations #
This file uses the local notation ⊕'
for sum.elim
to denote the disjoint union of two degrees.
References #
Tags #
computability, reducibility, reduction
p
is many-one reducible to q
if there is a computable function translating questions about p
to questions about q
.
p
is one-one reducible to q
if there is an injective computable function translating questions
about p
to questions about q
.
p
and q
are many-one equivalent if each one is many-one reducible to the other.
Equations
- many_one_equiv p q = (p ≤₀ q ∧ q ≤₀ p)
p
and q
are one-one equivalent if each one is one-one reducible to the other.
Equations
- one_one_equiv p q = (p ≤₁ q ∧ q ≤₁ p)
a computable bijection
Equations
- e.computable = (computable ⇑e ∧ computable ⇑(e.symm))
Computable and injective mapping of predicates to sets of natural numbers.
Equations
- to_nat p = {n : ℕ | p ((encodable.decode α n).get_or_else inhabited.default)}
A many-one degree is an equivalence class of sets up to many-one equivalence.
Equations
- many_one_degree = quotient {r := many_one_equiv (primcodable.of_denumerable ℕ), iseqv := many_one_degree._proof_1}
Instances for many_one_degree
The many-one degree of a set on a primcodable type.
Equations
Lifts a function on sets of natural numbers to many-one degrees.
Equations
- d.lift_on f h = quotient.lift_on' d f h
Lifts a binary function on sets of natural numbers to many-one degrees.
Equations
For many-one degrees d₁
and d₂
, d₁ ≤ d₂
if the sets in d₁
are many-one reducible to the
sets in d₂
.
Equations
- many_one_degree.has_le = {le := λ (d₁ d₂ : many_one_degree), d₁.lift_on₂ d₂ many_one_reducible many_one_degree.has_le._proof_1}
Equations
- many_one_degree.partial_order = {le := has_le.le many_one_degree.has_le, lt := preorder.lt._default has_le.le, le_refl := le_refl, le_trans := many_one_degree.partial_order._proof_1, lt_iff_le_not_le := many_one_degree.partial_order._proof_2, le_antisymm := many_one_degree.partial_order._proof_3}
The join of two degrees, induced by the disjoint union of two underlying sets.
Equations
- many_one_degree.has_add = {add := λ (d₁ d₂ : many_one_degree), d₁.lift_on₂ d₂ (λ (a b : set ℕ), many_one_degree.of (sum.elim a b)) many_one_degree.has_add._proof_1}
Equations
- many_one_degree.semilattice_sup = {sup := has_add.add many_one_degree.has_add, le := partial_order.le many_one_degree.partial_order, lt := partial_order.lt many_one_degree.partial_order, le_refl := _, le_trans := _, lt_iff_le_not_le := _, le_antisymm := _, le_sup_left := many_one_degree.le_add_left, le_sup_right := many_one_degree.le_add_right, sup_le := many_one_degree.semilattice_sup._proof_1}