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:
decodelands in the structure's own arity — no independent arity field can drift.- 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. IsFamilyCodeis 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 #
FamilyPresentation: ambientElement, theIsFamilyCodesubdomain, and the decoding data.CodedFamily,codedIInf,codedISup.
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.
- Element : Type uCode
The elements of
A. The certificate that an element names a genuinely infinitary family. This is the predicate that is empty for HF, and the sole source of that emptiness.
The index type a code names. Comes from the code, never fixed at
ℕ.A code-determined enumeration. Data, not a side condition: the
iInfconstructor is ℕ-indexed, so a family cannot be turned into syntax without one.- DecodesFamily (n : ℕ) (c : { e : self.Element // self.IsFamilyCode e }) : (self.Index c → L.BoundedFormulaω Empty n) → Prop
The decoding law: which family a code denotes.
- decodes_unique {n : ℕ} {c : { e : self.Element // self.IsFamilyCode e }} {f g : self.Index c → L.BoundedFormulaω Empty n} : self.DecodesFamily n c f → self.DecodesFamily n c g → f = g
Functionality. A family code determines its family. Without this,
DecodesFamilyis an arbitraryPropand one code may admit many decodings, sodecoded_by_codewould constrain nothing andcodedIInfwould not be a function of the code.
Instances For
The family-code subdomain.
Equations
- P.FamilyCode = { e : P.Element // P.IsFamilyCode e }
Instances For
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.
- code : P.FamilyCode
The certified family code.
- decode : P.Index self.code → L.BoundedFormulaω Empty n
The formula family decoded from
code. - decoded_by_code : P.DecodesFamily n self.code self.decode
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
The disjunction a coded family names.
Equations
Instances For
Acceptance gates #
Extensionality #
Functionality (decodes_unique) is what makes a coded family determined by its code. Everything
below is a consequence.
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.