← Back to Pull requests

feat(Computability): define oracle computability and Turing degrees #20219

Closed
unknown closed this pull request without merging on Dec 28, 2024 21:52 UTC
View on GitHub
unknown unknown commented on Dec 24, 2024 08:34 UTC
Author

Some initial definitions introducing a model of oracle computability via partial recursive functions, define Turing reducibility and equivalence, and prove that Turing equivalence is an equivalence relation. Define the type of Turing degrees as equivalence classes under Turing equivalence. This PR includes:

  • RecursiveIn g f: An inductive definition representing that a partial function f is recursive in oracle g.

  • turing_reducible: A relation defining Turing reducibility between partial functions.

  • turing_equivalent: A relation defining Turing equivalence between partial functions.

  • TuringDegree: The type of Turing degrees, defined as equivalence classes under turing_equivalent.

  • A proof that TuringDegree is a partial order when reducibility is lifted to degrees
  • Implementation Notes

    The type RecursiveIn g f is inductively defined to include basic functions such as zero, succ, projections, and the oracle g, and is closed under pairing, composition, primitive recursion, and μ-recursion. The join operation combines two partial functions by mapping even and odd numbers to the respective functions.

    Notation

  • f ≤ᵀ g: f is Turing reducible to g.

  • f ≡ᵀ g: f is Turing equivalent to g.

  • f ⊔ g: The join of partial functions f and g.
  • In Progress


    The work here is just the basic definitions for the theory being developed. Some current in-progress work involves proving the upper-semilattice structure of Turing degrees, proving the existence of a _relativized_ universal partial recursive function, and proving properties of the jump operator.

    References

    [Carneiro2018] Carneiro, Mario. Formalizing Computability Theory via Partial Recursive Functions. arXiv preprint arXiv:1810.08380, 2018.
    [Odifreddi1989] Odifreddi, Piergiorgio. Classical Recursion Theory: The Theory of Functions and Sets of Natural Numbers, Vol. I. Springer-Verlag, 1989.
    [Soare1987] Soare, Robert I. Recursively Enumerable Sets and Degrees. Springer-Verlag, 1987.
    [Gu2015] Gu, Yi-Zhi. Turing Degrees. Institute for Advanced Study, 2015.

    Tags

    Computability, Oracle, Turing Degrees, Reducibility, Equivalence Relation

    Diff: 277 lines (+207 / -70) across 3 files Reviewer: tannerduve Review duration: 6557m
    All Vouch review confidence checks passed
    Residual risk 0.16 = Change Risk (0.40) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.40 · 277 lines diff across 3 files
    0.40
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    60%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.337
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #20219"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 39.6% (MEDIUM) · Higher = larger blast radius
    39.6%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 60.5% · Lower = rushed or shallow review
    60.5%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 15.6% · Safe to merge
    15.6%