Documentation

InfinitaryLogic.Admissible.Ambient

The ambient presentation: the definability layer (issue #19A) #

The top of the presentation tower. One ambient Element type carries all codes; the four kinds — family, theory, sentence, Σ-definition — are subdomains of it and may overlap. In the HF instance every code is a natural number, so they overlap totally.

FamilyPresentation     Element, IsFamilyCode, Index, DecodesFamily      -- Admissible/Family.lean
        ↑
TheoryPresentation     + Mem, IsSentenceCode, decodeSentence            -- Admissible/Theory.lean
                       + derived IsTheoryCode / decodeTheory / AFinite
        ↑
AmbientPresentation    + IsDefinitionCode, enumerates                   -- this file
                       + derived Sigma1

Each layer is a separate file and each is imported by the next, so the syntax layer cannot reach the theory layer and the theory layer cannot reach definability — not by convention, by types and imports. scripts/check_family_cone.lean and scripts/check_theory_cone.lean pin both.

Why one carrier #

Separate code sorts and a shared ambient type are inter-translatable (subtypes one way, Sum the other), so this is not a question of expressiveness. Two things decide it.

KP closure discriminates. Pairing and union are operations on elements; they do not respect the kind subdomains — the pair of a sentence code and a definition code is an element and typically has no kind at all. One carrier states such laws directly; separate sorts must route every closure law through Sum.

The kinds are roles, not sorts. The same codes — the elements of A — serve the family, theory, sentence and Σ-definition roles; only the thing named differs.

Sigma1 is derived #

Because a Σ-definition code carries a set of sentence codes and the theory it defines is their decoded image, functionality holds by construction — Sigma1.unique is h ▸ h'. There is no extensionality law to discharge even though a sentence may have many codes.

Main definitions #

Main results #

structure FirstOrder.Language.AmbientPresentation (L : Language) extends L.TheoryPresentation :
Type (max (max (max u (uIndex + 1)) v) (w + 1))

The ambient presentation. The theory view plus the Σ-definition kind.

enumerates returns a set of sentence codes, never a set of sentences — that is what makes Sigma1 functional for free.

Instances For
    @[reducible, inline]

    The Σ-definition-code subdomain.

    Equations
    Instances For

      The theory a Σ-definition code defines: the decoded image of the sentence codes it enumerates.

      Equations
      Instances For

        A-c.e., from the presentation's own coding data rather than an opaque predicate.

        Equations
        Instances For
          theorem FirstOrder.Language.AmbientPresentation.Sigma1.unique {L : Language} {A : L.AmbientPresentation} {d : A.DefinitionCode} {T T' : L.Theoryω} (h : A.theoryOf d = T) (h' : A.theoryOf d = T') :
          T = T'

          Functionality is free — the theory is an image, not a relation.

          Σ-definable theories cannot escape the decoded range.

          Containment for the Σ-layer, derived. This is what lets a presentation-relative compactness wrapper discharge the T ⊆ P hypothesis internally, using the presentation's own Sigma1 rather than a free parameter.

          The compactness interface #

          Both come from the presentation's own definition codes, rather than from a bare external Sigma1 predicate carrying no representation data.

          A-c.e.: the theory is Σ₁-on-A.

          Not an arbitrary Prop on a set: unfolding it produces a definition code, which is what makes subset_of_adequate available at all.

          Equations
          Instances For

            The shape of a Barwise-style compactness statement over a permitted sentence set P.

            T ⊆ P stays a genuine hypothesis. It is not removed: subset_of_adequate yields it only once an adequacy equation identifies the decoded range with P, and a presentation need not be adequate for the P a caller has in mind. compactFor_of_adequate below is the wrapper that discharges it where adequacy is available.

            Both premises enter as hypotheses, so no instance can claim this shape while secretly projecting a compactness field — there is none to read.

            Equations
            Instances For

              The assembly theorem. A consumer holding compactness and adequacy never supplies containment: it follows from Σ-definability, because a definition code enumerates sentence codes and those decode into the fragment and nowhere else.

              This is the payoff of Sigma1 carrying coding data rather than being a bare predicate: a bare Prop on a set carries nothing from which containment could be derived.

              KP closure, with specification laws #

              structure FirstOrder.Language.AmbientPresentation.WithKP (L : Language) extends L.AmbientPresentation :
              Type (max (max (max u (uIndex + 1)) v) (w + 1))

              Pairing and union, stated meaningfully.

              The earlier sketch carried only totality — pair_total : ∀ a b, ∃ c, Pair a b c — which is satisfied by Pair := fun _ _ _ => True on any inhabited carrier. Totality is not pairing. Here each operation is pinned by a specification law against Mem, so the fields cannot be discharged trivially.

              Only pairing and union appear. The full KP schema is deliberately not attempted: the #19A source audit must first identify which closure and absoluteness laws later proofs actually consume.

              Instances For