Effectivizing Lusin’s Theorem #
The paper discusses Turing degrees among other things. Here we formalize Turing reducibility (Degrees of unsolvability).
(Mathlib has a reduce.lean file that can be reconciled with this.)
This file introduces many-one reducibility (mapping reducibility) and proves its basic properties.
We work with a couple of classes of functions:
- mon (which includes both 𝓓₁ and 𝓓ₘ and any monoid of functions)
- mon₁ (which fits 𝓓₁ and 𝓓ₘ but not as general as mon₁)
- monₘ (which includes 𝓓ₘ but not 𝓓₁).
We show over mon₁ that the degrees are not rigid, using complementation.
Over monₘ we show that the degrees form an upper semilattice and has an automorphism that simply swaps ⊥ := ⟦∅⟧ₘ and ⊤ := ⟦ℕ⟧ₘ.
The halting problem K is defined in this context and
its basic degree-theoretic properties established.
The Turing degrees 𝓓ₜ are constructed.
The injective functions can be used in defining 1-degrees, 𝓓₁.
Equations
- injClone = { func := Function.Injective, id := ⋯, comp := ⋯, inl := injClone.proof_1, inr := injClone.proof_2 }
Instances For
Equations
- instFintypeForallFinBool_marginis u n = Pi.fintype
Equations
- instPrimcodableForallFinBool_marginis n = Primcodable.finArrow
Equations
- instPrimcodableForallFinBool_marginis_1 u n = Primcodable.finArrow
Equations
- instPrimcodableForallFinSuccBool_marginis k = Primcodable.finArrow
Equations
- instDenumerableSigmaNatForallFinBool_marginis u = Denumerable.ofEncodableOfInfinite ((n : ℕ) × (Fin (u n) → Bool))
Equations
- instPrimcodableForallFinOfNatNatBool_marginis = Primcodable.finArrow
Equations
- instEncodableForallBool_marginis = Encodable.fintypeArrowOfEncodable
Equations
- instEncodableListBool_marginis = List.encodable
Equations
- instEncodableListFinOfNatNat_marginis = List.encodable
- self: ∀ {A : ℕ →. ℕ}, Partrec_in A A
- zero: ∀ {A : ℕ →. ℕ}, Partrec_in A (pure 0)
- succ: ∀ {A : ℕ →. ℕ}, Partrec_in A ↑Nat.succ
- left: ∀ {A : ℕ →. ℕ}, Partrec_in A fun (n : ℕ) => ↑(some (Nat.unpair n).1)
- right: ∀ {A : ℕ →. ℕ}, Partrec_in A fun (n : ℕ) => ↑(some (Nat.unpair n).2)
- pair: ∀ {A f g : ℕ →. ℕ}, Partrec_in A f → Partrec_in A g → Partrec_in A fun (n : ℕ) => Seq.seq (Nat.pair <$> f n) fun (x : Unit) => g n
- comp: ∀ {A f g : ℕ →. ℕ}, Partrec_in A f → Partrec_in A g → Partrec_in A fun (n : ℕ) => g n >>= f
- prec: ∀ {A f g : ℕ →. ℕ}, Partrec_in A f → Partrec_in A g → Partrec_in A (Nat.unpaired fun (a n : ℕ) => Nat.rec (f a) (fun (y : ℕ) (IH : Part ℕ) => do let i ← IH g (Nat.pair a (Nat.pair y i))) n)
- rfind: ∀ {A f : ℕ →. ℕ}, Partrec_in A f → Partrec_in A fun (a : ℕ) => Nat.rfind fun (n : ℕ) => (fun (m : ℕ) => decide (m = 0)) <$> f (Nat.pair a n)
Instances For
A relativized version of Nat.Partrec.Code.
- self: Nat.Partrec_in.Code
- zero: Nat.Partrec_in.Code
- succ: Nat.Partrec_in.Code
- left: Nat.Partrec_in.Code
- right: Nat.Partrec_in.Code
- pair: Nat.Partrec_in.Code → Nat.Partrec_in.Code → Nat.Partrec_in.Code
- comp: Nat.Partrec_in.Code → Nat.Partrec_in.Code → Nat.Partrec_in.Code
- prec: Nat.Partrec_in.Code → Nat.Partrec_in.Code → Nat.Partrec_in.Code
- rfind': Nat.Partrec_in.Code → Nat.Partrec_in.Code
Instances For
Equations
- Nat.Partrec_in.Code.instInhabited = { default := Nat.Partrec_in.Code.self }
Returns a code for the constant function outputting a particular natural.
Equations
Instances For
A code for the identity function.
Instances For
Given a code c taking a pair as input, returns a code using n as the first argument to c.
Equations
- c.curry n = c.comp ((Nat.Partrec_in.Code.const n).pair Nat.Partrec_in.Code.id)
Instances For
An encoding of a Nat.Partrec.Code as a ℕ.
Equations
- Nat.Partrec_in.Code.self.encodeCode = 0
- Nat.Partrec_in.Code.zero.encodeCode = 1
- Nat.Partrec_in.Code.succ.encodeCode = 2
- Nat.Partrec_in.Code.left.encodeCode = 3
- Nat.Partrec_in.Code.right.encodeCode = 4
- (cf.pair cg).encodeCode = 2 * (2 * Nat.pair cf.encodeCode cg.encodeCode) + 5
- (cf.comp cg).encodeCode = 2 * (2 * Nat.pair cf.encodeCode cg.encodeCode + 1) + 5
- (cf.prec cg).encodeCode = 2 * (2 * Nat.pair cf.encodeCode cg.encodeCode) + 1 + 5
- cf.rfind'.encodeCode = 2 * (2 * cf.encodeCode + 1) + 1 + 5
Instances For
A decoder for Nat.Partrec_in.Code.encodeCode, taking any ℕ to the Nat.Partrec_in.Code it represents.
Equations
- One or more equations did not get rendered due to their size.
- Nat.Partrec_in.Code.ofNatCode 0 = Nat.Partrec_in.Code.self
- Nat.Partrec_in.Code.ofNatCode 1 = Nat.Partrec_in.Code.zero
- Nat.Partrec_in.Code.ofNatCode 2 = Nat.Partrec_in.Code.succ
- Nat.Partrec_in.Code.ofNatCode 3 = Nat.Partrec_in.Code.left
- Nat.Partrec_in.Code.ofNatCode 4 = Nat.Partrec_in.Code.right
Instances For
Equations
- One or more equations did not get rendered due to their size.
Equations
- One or more equations did not get rendered due to their size.
- Nat.Partrec_in.Code.eval A Nat.Partrec_in.Code.self = A
- Nat.Partrec_in.Code.eval A Nat.Partrec_in.Code.zero = pure 0
- Nat.Partrec_in.Code.eval A Nat.Partrec_in.Code.succ = ↑Nat.succ
- Nat.Partrec_in.Code.eval A Nat.Partrec_in.Code.left = ↑fun (n : ℕ) => (Nat.unpair n).1
- Nat.Partrec_in.Code.eval A Nat.Partrec_in.Code.right = ↑fun (n : ℕ) => (Nat.unpair n).2
- Nat.Partrec_in.Code.eval A (cf.pair cg) = fun (n : ℕ) => Seq.seq (Nat.pair <$> Nat.Partrec_in.Code.eval A cf n) fun (x : Unit) => Nat.Partrec_in.Code.eval A cg n
- Nat.Partrec_in.Code.eval A (cf.comp cg) = fun (n : ℕ) => Nat.Partrec_in.Code.eval A cg n >>= Nat.Partrec_in.Code.eval A cf
Instances For
Equations
- Nat.Partrec_in.Code.jump' A e = decide (Nat.Partrec_in.Code.eval A (Denumerable.ofNat Nat.Partrec_in.Code e) 0).Dom
Instances For
Equations
- Nat.Partrec_in.Code.jump A x = Nat.Partrec_in.Code.jump' (fun (x : ℕ) => Part.some (A x).toNat) x
Instances For
Equations
- Nat.Partrec_in.Code.REPred_in A p = Partrec_in A fun (a : ℕ) => Part.assert (p a) fun (x : p a) => 0
Instances For
Equations
- Computable_in f g = Partrec_in ↑g ↑f
Instances For
Equations
- T_reducible A B = Computable_in (fun (k : ℕ) => (A k).toNat) fun (k : ℕ) => (B k).toNat
Instances For
Equations
- «term_≤ₜ_» = Lean.ParserDescr.trailingNode `term_≤ₜ_ 50 51 (Lean.ParserDescr.binary `andthen (Lean.ParserDescr.symbol " ≤ₜ ") (Lean.ParserDescr.cat `term 51))
Instances For
- compu: ∀ {A : ℕ → ℕ} {g : ℕ →. ℕ} {k : ℕ}, Nat.Partrec g → use_bound g k 0
- self: ∀ {A : ℕ → ℕ} {k : ℕ}, use_bound (↑A) k k.succ
- pair: ∀ {A : ℕ → ℕ} {f g : ℕ →. ℕ} {k uf ug : ℕ}, use_bound f k uf → use_bound g k ug → use_bound (fun (n : ℕ) => Seq.seq (Nat.pair <$> f n) fun (x : Unit) => g n) k (max uf ug)
- comp: ∀ {A : ℕ → ℕ} {f g : ℕ →. ℕ} {k uf ug : ℕ} (h : g k ≠ Part.none), use_bound f ((g k).get ⋯) uf → use_bound g k ug → use_bound (fun (n : ℕ) => g n >>= f) k (max uf ug)
Instances For
Equations
- T_equivalent A B = (T_reducible A B ∧ T_reducible B A)
Instances For
The Turing degree 0 contains all computable sets, but by definition it is just the Turing degree of ∅.
Equations
- instZero𝓓ₜ = { zero := ⟦fun (x : ℕ) => false⟧ }
To do calc proofs with m-reducibility we create a Trans instance.
Equations
Equivalent reals have equal upper cones.
Equivalent reals have equal degrees.
T-reducibility is a preorder.
Instances For
𝓓ₜ is a partial order.
The nontrivial computable sets form the T-degree 0.
Equations
- instZero𝓓ₜ_1 = { zero := ⟦fun (x : ℕ) => false⟧ }
Equations
- turing_reducible' A B = Partrec_in B A
Instances For
Make sure ♯ binds stronger than ≤ₘ.
Equations
- «term_⊕__2» = Lean.ParserDescr.trailingNode `term_⊕__2 70 71 (Lean.ParserDescr.binary `andthen (Lean.ParserDescr.symbol " ⊕ ") (Lean.ParserDescr.cat `term 71))
Instances For
- id : self.func id
- inl : self.func inlFun
- inr : self.func inrFun
- ttrefl : self.func fun (n : ℕ) => Encodable.encode ((Denumerable.ofNat ((k : ℕ) × (Fin k.succ → Bool)) n).snd ↑(Denumerable.ofNat ((k : ℕ) × (Fin k.succ → Bool)) n).fst)