Numberings of the finitary sentences, and Sigma1 invariance (issue #19A) #
Sigma1 is already defined from the weak layer: hfAmbient takes a plain FinitaryCoding and
supplies enumerates, so every coding has its own coding-relative Sigma1. What a single coding
cannot give is independence — two injective numberings can disagree about which theories are
c.e. This file supplies what does:
FinitaryCoding adequacy, AFinite, and Sigma1 itself -- any language
FinitaryNumbering a *bijective* numbering; no effectiveness on its own
ComputablyEquivalent C C' Sigma1 invariance across numberings -- the actual content
Read the middle line carefully. FinitaryNumbering is structurally a bijective numbering and
nothing more: FinitaryNumbering.ofDenumerable builds one from a bare Denumerable instance, with
no computability evidence whatsoever. It is not intrinsically effective, and the name
deliberately does not claim to be. Invariance holds only when a ComputablyEquivalent witness is
supplied; the numbering alone proves nothing about Sigma1.
The layers do not mix. hfAmbient still takes a plain FinitaryCoding, so numbering data
cannot infect the fragment or theory layers. That refusal is enforced by
hfAmbient_rejects_numbering, a fail_if_success regression — not merely by the positive examples
below, which show only that the weak layer suffices.
The bijectivity simplification #
Surjectivity is required, so every natural is a valid sentence code. Acceptable numberings then
differ by computable permutations of ℕ, which is a change of bookkeeping, not of mathematics:
- invalid-input bookkeeping becomes provably vacuous —
invalid_codes_eq_emptystates it explicitly instead of dropping the obligation; forwardandbackwardbecome mutually inverse total computable permutations, so the image of a code set along one is the preimage along the other (forward_image_eq_backward_preimage), and c.e. transport needs only closure under computable preimage — no dovetailing.
The cost is stated by equiv: a FinitaryNumbering exists exactly when L.Sentence is denumerable.
That is the intended setting — effective Barwise theory is for recursive languages — and languages
outside it keep the weak layer and correctly get no numbering at all.
Main definitions #
CE: genuine computable enumerability,∃ f, Nat.Partrec f ∧ ∀ n, n ∈ S ↔ (f n).Dom.FinitaryNumbering:FinitaryCodingplus surjectivity;decodeis its inverse.FinitaryNumbering.Sigma1: the production-facing Σ-predicate, relative to a numbering.ComputablyEquivalent: the computable translation data (inType, since it is data).AreComputablyEquivalent: itsProp-valued wrapper, an equivalence relation.
Main results #
ComputablyEquivalent.sigma1_iff/AreComputablyEquivalent.sigma1_iff:Sigma1is numbering-independent. This is the property injectivity alone could not give.ComputablyEquivalent.ce_forward_image: c.e. code sets transport along a translation.hfAmbient_rejects_numbering: the layer-separation guard.
Computable enumerability #
Spelled out rather than taken as an existential over an arbitrary W : ℕ → Set ℕ, which would
carry no computability content at all.
A genuinely c.e. set of naturals: the domain of a partial recursive function. By
Nat.Partrec.Code.exists_code these are exactly the domains of Nat.Partrec.Codes, so the
Σ-definition codes of hfAmbient are complete for this notion rather than a modelling
convenience.
Instances For
C.e. sets are closed under computable preimage. With bijective numberings this is all the transport that is needed: image along one translation is preimage along the other.
Bijective numberings #
A bijective numbering of the finitary sentences.
FinitaryCoding plus surjectivity, so every natural is a valid sentence code.
This carries no effectiveness. It is a numbering, not an effective one: ofDenumerable builds
it from a bare Denumerable instance, and nothing here constrains how enc is computed. Sigma1
is already available from the weak FinitaryCoding layer; what a numbering buys is only the ability
to state ComputablyEquivalent, and independence holds only once such a witness is supplied.
- enc_injective : Function.Injective self.enc
- enc_surjective : Function.Surjective self.enc
Every natural is a code. This is the invalid-code bookkeeping simplification, and its content is exactly that
L.Sentenceis denumerable — seeFinitaryNumbering.equiv.
Instances For
The layer is inhabited, exactly when the finitary sentences are denumerable. Without a witness the results below would be conditionally vacuous; with one they are not.
Note what this does not need: no computability hypothesis at all. That is the honest reason the structure is called a numbering rather than an effective coding.
Equations
- FirstOrder.Language.FinitaryNumbering.ofDenumerable L = { enc := ⇑(Denumerable.eqv L.Sentence), enc_injective := ⋯, enc_surjective := ⋯ }
Instances For
What surjectivity costs, made explicit: a numbering is a denumeration of the finitary sentences.
Equations
- C.equiv = Equiv.ofBijective C.enc ⋯
Instances For
The inverse numbering.
Instances For
Every natural is a sentence code.
There are no invalid inputs to bookkeep, so no invalid input can contribute a decoded sentence.
Stated rather than dropped: the obligation is real for a general numbering, and this records exactly which hypothesis retires it.
Ambient sentence decoding is the inverse numbering, transported into Lω₁ω.
The production-facing Σ-predicate, relative to a numbering.
Definitionally the ambient Sigma1 of the underlying weak coding — the numbering adds nothing to
the definition. It exists as a separate name so that consumers state their hypotheses against a
numbering, which is what makes AreComputablyEquivalent.sigma1_iff applicable to them.
Equations
Instances For
Computable equivalence of numberings #
The witness structure lives in Type — forward and backward are data, and a structure with a
data field cannot be Prop. AreComputablyEquivalent is the Prop-valued public relation.
The translation data relating two numberings.
Both translations are total computable functions, because both numberings are onto; the specifications say each sends a code to the code of the same sentence under the other numbering. Mutual inversion is then derived, not assumed.
C-codes toC'-codes.C'-codes back toC-codes.- forward_computable : Computable self.forward
The translation is effective. This is where effectiveness enters — not the numbering.
- backward_computable : Computable self.backward
…and so is its inverse.
forwardrenumbers the sentence, it does not change it.Likewise
backward.
Instances For
Computable equivalence is reflexive.
Equations
- One or more equations did not get rendered due to their size.
Instances For
…symmetric — the two translations simply swap roles.
Equations
Instances For
…and transitive, by composing translations. Computability composes, and the specifications
compose through decode_forward / decode_backward.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Translation preserves sentences #
forward maps every code to a code for the same sentence.
…and so does backward.
C.e. transport and invariance #
The translations are inverse bijections, so pushing a code set forward is the same as pulling it back. This is what lets c.e. transport avoid dovetailing.
C.e. code sets transport along a translation.
A Σ-definition code for C is turned into one for C' by precomposing its partial-recursive
enumeration with backward, then re-coding through Nat.Partrec.Code.exists_code.
Sigma1 does not depend on which numbering was chosen.
This is the property injectivity alone could not give, and the reason the numbering layer exists
separately from FinitaryCoding. Note the hypothesis: the witness E is what carries the
content — a numbering by itself proves nothing here.
The public relation #
ComputablyEquivalent must live in Type because it stores functions. The relation consumers
should quantify over is this Prop-valued wrapper.
Two numberings are computably equivalent when some translation witnesses it.
Equations
Instances For
Sigma1 invariance, in propositional form. The public statement of the whole file.
Layer separation, enforced #
The positive examples show the weak layer suffices for adequacy and A-finiteness. They do not
by themselves prevent numbering data from leaking into those layers, so the actual guard is the
fail_if_success regression: hfAmbient must refuse a FinitaryNumbering.
The guard, stating both halves at once: hfAmbient refuses a numbering directly, and
the forgetful route through .toFinitaryCoding is what works.
The fail_if_success line is the durable form of the separation claim. If hfAmbient were ever
widened to accept numbering data it would start succeeding and this breaks — which the positive
examples above would not detect.