Documentation

LeanPool.InfinitaryLogic.Admissible.Family

The family layer (issues #18, #19A) #

The honest replacement for closure under arbitrary external ℕ-indexed families. A fragment may only be asked to contain the conjunctions and disjunctions that the admissible set itself names.

This file is the syntax boundary. It defines the minimal data a coded family needs and nothing else — no theory decoding, no Sigma1, no definition codes, no KP, no numbering. Those are not merely absent by convention: they are defined in files that import this one, so CodedFamily cannot reach them even in principle. scripts/check_family_cone.lean pins that permanently.

Three details are load-bearing and each was validated against the HF instance before being fixed:

  1. decode lands in the structure's own arity — no independent arity field can drift.
  2. The enumeration is supplied by the presentation (indexEncodable), keyed on the code, not found by instance search; the syntax a coded family builds therefore depends on the code.
  3. IsFamilyCode is a certificate, absorbed into the code subtype rather than carried as a separate hypothesis. Without it any code with any decoding would build a coded family, and "HF has no primitive coded families" would be unstatable.

decodes_unique makes decoding code-determined, which is what the extensionality API below rests on.

Main definitions #

structure FirstOrder.Language.FamilyPresentation (L : Language) :
Type (max (max (max u (uCode + 1)) (uIndex + 1)) v)

The family view of a presentation. The only data the syntax layer may consult.

Phrased ambient-style: one Element carrier with IsFamilyCode carving out the subdomain of codes naming infinitary families. The certificate lives in the code subtype rather than in a separate hypothesis, so decodes_unique is unconditional here while remaining vacuous for any presentation whose IsFamilyCode is empty.

Instances For
    @[reducible, inline]

    The family-code subdomain.

    Equations
    Instances For
      structure FirstOrder.Language.CodedFamily {L : Language} (P : L.FamilyPresentation) (n : ) :
      Type (max (max (max u uCode) uIndex) v)

      A coded family: a certified code, its decoded family, and the law tying the two together.

      The certificate is no longer a separate field — it is carried by code, which lives in the IsFamilyCode subdomain. CodedFamily.infinitary recovers it.

      Instances For

        The infinitary certificate, recovered from the code's subdomain membership. Kept as a named accessor because "HF has no coded families" is proved by contradicting exactly this.

        The conjunction a coded family names. The encoding is the presentation's, installed locally, so the resulting syntax depends on the code rather than on ambient instance search.

        Equations
        Instances For

          Acceptance gates #

          Extensionality #

          Functionality (decodes_unique) is what makes a coded family determined by its code. Everything below is a consequence.

          theorem FirstOrder.Language.CodedFamily.ext {L : Language} {P : L.FamilyPresentation} {n : } {F G : CodedFamily P n} (h : F.code = G.code) :
          F = G

          Extensionality: a coded family is its code. The decoding law is a Prop, and the decoding is determined by the code, so nothing else can differ.

          The HF family view #

          HF names no infinitary family, so its family layer is determined by IsFamilyCode := False and everything else is vacuous. Defined here, at the family layer, so the syntax consumers of HF depend on nothing else — in particular not on a full presentation carrying theory decoding or Sigma1.

          Element := ℕ matches the ambient HF instance, so (hfAmbient C).toFamilyPresentation is this presentation definitionally (hfAmbient_toFamilyPresentation).

          The HF family view. No code names an infinitary family; the remaining fields are discharged by the empty code subdomain.

          Equations
          • One or more equations did not get rendered due to their size.
          Instances For