Langlib

Langlib.Classes.Recursive.Decidability.Membership

Recursive membership via promised decider codes #

The raw codes in this file are Mathlib's Nat.Partrec.Code. Their universal evaluator is partial on arbitrary codes. A code is a Valid decider when that evaluator halts on every encoded word; on such codes, evalBool uniformly decides membership in language.

This is the promise-problem formulation of uniform membership for the class of recursive languages. It does not assert that the set of total program codes is decidable (it is not), nor does it package those codes as a Primcodable subtype.

Main results #

Run a raw partial-recursive code on the encoding of a word and interpret an odd natural-number result as true and an even result as false.

Equations
Instances For

    The semantic promise that a raw program code halts on every encoded word.

    Equations
    Instances For

      The language denoted by a raw decider code: precisely the words on which its Boolean evaluation returns true. This is meaningful for every raw code, although only Valid codes are promised to decide it totally.

      Equations
      Instances For

        The universal Boolean evaluator is partial recursive jointly in the raw code and the input word.

        evalBool is a uniform membership decider on the promise that its raw code is valid.

        Raw decider-code membership is uniformly recursively enumerable, even away from the totality promise: simulate the program and return exactly when its Boolean result is true. This is the effectivity condition preventing language from hiding noncomputable information in the decoding map.

        A language has a computable membership predicate exactly when it is denoted by some valid raw partial-recursive decider code.

        Over finite computably encoded alphabets, valid always-halting Boolean decider codes denote exactly the recursive languages.

        Membership for recursive languages is uniformly computable from an encoded always-halting decider and a word.

        Raw program syntax is Primcodable; Valid is the semantic promise that the program halts on every encoded word. The universal evaluator is partial-recursive on all raw codes and total/correct on valid codes, while the valid codes denote exactly all recursive languages.