Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Proposition 4, Lemmas 7–8 and Proposition 10: Sized inductive infrastructure

Open
LaarakkerOttenVanDenBerg2026.V2.lemmas_7_8_and_prop_10

by kmehltretter82 · Nov 17, 2026 · Mathlib 0df444a (Lean v4.33.1)

coinductive-typesdependent-type-theoryinductive-typesrealizabilitysized-types

In the parametric theory, the prescribed bounded-existential modality and its composite with a wild functor satisfy the underlying morphism laws; the specified recursively constructed sized algebra is internally initial. Constant size-indexing and, under the exact existential weak-commutation hypothesis, existential quantification lift full algebra morphisms with the prescribed underlying action, whose identity and composition laws hold internally. These lifting claims do not add higher coherence equations between chosen commuting-square witnesses or assert a natural adjunction.

Preamble
import Definitions.Def_LaarakkerOttenVanDenBerg2026_EncodingRevision2
Formal statement
namespace LaarakkerOttenVanDenBerg2026.V2

universe u v w t
open Theory

theorem lemmas_7_8_and_prop_10 {C : CwF.{u,v,w,t}} (T : ParametricTheory C) :
    T.toCoreTheory.InductiveInfrastructure := by
  sorry

end LaarakkerOttenVanDenBerg2026.V2
Source
Laarakker, Otten and van den Berg, Constructing (Co)inductive Types via Large Sizes, arXiv:2602.18921v2, Section 3, Proposition 4, Lemmas 7–8, Proposition 10; Appendix B, https://arxiv.org/abs/2602.18921v2
Read-back

What the Lean code literally says, in plain math · Codex / GPT-6 (independent fresh-context read-back)

At arbitrary universe levels u,v,w,tu,v,w,tu,v,w,t, let CCC be a category with families whose contexts, substitutions, contextual types, and contextual terms lie respectively in those universes, with a terminal empty context, context extension, and the stated identity, composition, substitution, and comprehension equations. A core package on CCC supplies contextual dependent products and sums with their introduction, elimination/projection, and computation rules; nondependent arrows compatible with the corresponding dependent products; internal identity types with reflexivity and based identity elimination and its computation rule; a Tarski universe UUU with decoding, closed under small dependent products, sums, and identities; small empty, unit, and Boolean types with their constructors and dependent eliminators; and the indicated substitution equations for all these operations and witnesses. It also supplies a large type SSS of sizes with zero, successor, a small relation i≤ji\leq ji≤j, witnesses of 0≤i0\leq i0≤i, i≤succ⁡(i)i\leq\operatorname{succ}(i)i≤succ(i), reflexivity and transitivity, and internal equality of any two witnesses of the same comparison. Write j<ij<ij<i for the decoded type succ⁡(j)≤i\operatorname{succ}(j)\leq isucc(j)≤i, without assuming any additional external order properties. The core includes a contextual size recursor for every possibly large family A(i)A(i)A(i) and step fi:(∏j:S(j<i→A(j)))→A(i)f_i:(\prod_{j:S}(j<i\to A(j)))\to A(i)fi​:(∏j:S​(j<i→A(j)))→A(i), with an internal pointwise unfolding witness and substitution laws for the recursor and that witness. It includes primitive small size quantifiers EiA(i)E_i A(i)Ei​A(i) and QiA(i)Q_i A(i)Qi​A(i): QQQ has contextual abstraction/application and both computation equations, while EEE has pairing and dependent elimination into small motives with its computation equation, together with their stated substitution laws. Finally the identity-elimination-defined map from equality of dependent functions to pointwise equality has a substitution-stable internal half-adjoint-equivalence witness. All products, sums, arrows, and identities in what follows are these internal types; small types are decoded contextual universe codes, not arbitrary metatheoretic sets, and contextual terms are not identified with all external functions. For an internal arrow f:X→Yf:X\to Yf:X→Y, a half-adjoint-equivalence witness consists internally of g:Y→Xg:Y\to Xg:Y→X, η:∏x:Xg(f(x))=x\eta:\prod_{x:X}g(f(x))=xη:∏x:X​g(f(x))=x, ϵ:∏y:Yf(g(y))=y\epsilon:\prod_{y:Y}f(g(y))=yϵ:∏y:Y​f(g(y))=y, and ∏x:Xap⁡f(ηx)=ϵf(x)\prod_{x:X}\operatorname{ap}_f(\eta_x)=\epsilon_{f(x)}∏x:X​apf​(ηx​)=ϵf(x)​, with ap⁡\operatorname{ap}ap derived by identity elimination. An equivalence between two types additionally includes its forward arrow. Write Contr⁡(X)=∑x:X∏y:X(x=y)\operatorname{Contr}(X)=\sum_{x:X}\prod_{y:X}(x=y)Contr(X)=∑x:X​∏y:X​(x=y); this contracts the whole type XXX, including any witness components. Existence of a contextual term of one of these types is an external nonemptiness assertion, not an identification of internal identities with external equality. A parametric package means such a core package together with substitution-stable internal half-adjoint-equivalence witnesses for four prescribed maps, at every context and every indicated small family: Ei∏x:AEj∑p:j<iB(x,j)→∏x:AEjB(x,j)E_i\prod_{x:A}E_j\sum_{p:j<i}B(x,j)\to\prod_{x:A}E_j B(x,j)Ei​∏x:A​Ej​∑p:j<i​B(x,j)→∏x:A​Ej​B(x,j), sending a common bound and bounded witnesses to their unbounded witnesses; ∑x:AQiB(x,i)→Qi∑x:AB(x,i)\sum_{x:A}Q_i B(x,i)\to Q_i\sum_{x:A}B(x,i)∑x:A​Qi​B(x,i)→Qi​∑x:A​B(x,i), sending (x,b)(x,b)(x,b) to the family (x,bi)(x,b_i)(x,bi​); EiEj∑p:j<iA(j)→EjA(j)E_iE_j\sum_{p:j<i}A(j)\to E_jA(j)Ei​Ej​∑p:j<i​A(j)→Ej​A(j), forgetting the outer size and comparison witness; and QjA(j)→QiQj∏p:j<iA(j)Q_jA(j)\to Q_iQ_j\prod_{p:j<i}A(j)Qj​A(j)→Qi​Qj​∏p:j<i​A(j), restricting a family. Here AAA in the first two schemas may depend on the ambient context but not on the newly introduced size, and BBB may depend on both xxx and that size. A wild endofunctor DDD at a context Γ\GammaΓ means an operation on small codes and internal arrows in every context Δ\DeltaΔ over Γ\GammaΓ by a substitution σ:Δ→Γ\sigma:\Delta\to\Gammaσ:Δ→Γ, commuting with further substitution, together with internal identities D(id)=idD(\mathrm{id})=\mathrm{id}D(id)=id and D(g∘f)=D(g)∘D(f)D(g\circ f)=D(g)\circ D(f)D(g∘f)=D(g)∘D(f) in their generic code/arrow contexts; no higher coherence is a field. For a small size family XXX, put (◊X)i=Ej∑p:j<iXj(\Diamond X)_i=E_j\sum_{p:j<i}X_j(◊X)i​=Ej​∑p:j<i​Xj​ and (□X)i=Qj∏p:j<iXj(\Box X)_i=Q_j\prod_{p:j<i}X_j(□X)i​=Qj​∏p:j<i​Xj​. A sized arrow X→SYX\to^S YX→SY is a contextual term of Qi(Xi→Yi)Q_i(X_i\to Y_i)Qi​(Xi​→Yi​), with pointwise identity and composition; the modal arrow actions preserve the size and comparison witness and apply the given arrow to the XXX-component, or postcompose the bounded function, respectively. An existential weak-commutation witness hhh is one contextual term of the internal product over X:∏i:SUX:\prod_{i:S}UX:∏i:S​U of the half-adjoint-equivalence type of the prescribed map cX:EiD((◊X)i)→D(EiXi)c_X:E_iD((\Diamond X)_i)\to D(E_iX_i)cX​:Ei​D((◊X)i​)→D(Ei​Xi​). Its existential branch sends (i,z)(i,z)(i,z) to D(ϕi)(z)D(\phi_i)(z)D(ϕi​)(z), where ϕi:(◊X)i→EjXj\phi_i:(\Diamond X)_i\to E_jX_jϕi​:(◊X)i​→Ej​Xj​ forgets the bound and its witness. Thus the family quantification and all inverses, homotopies, and coherence of this hypothesis are internal, rather than an external assertion separately selecting an equivalence for each family. The prescribed family MiM_iMi​ is the output of the chosen primitive size recursor on universe codes with step (i,X)↦D(Ej∑p:j<iX(j,p))(i,X)\mapsto D(E_j\sum_{p:j<i}X(j,p))(i,X)↦D(Ej​∑p:j<i​X(j,p)), where the recursive input is X:∏j:S(j<i→U)X:\prod_{j:S}(j<i\to U)X:∏j:S​(j<i→U) and may depend on the comparison witness. After restricting the resulting family, its actual recursor unfolding witness gives an internal universe path Mi=D((◊M)i)M_i=D((\Diamond M)_i)Mi​=D((◊M)i​). Its prescribed sized structure αi:D((◊M)i)→Mi\alpha_i:D((\Diamond M)_i)\to M_iαi​:D((◊M)i​)→Mi​ is transport along the reverse of that path, formed by identity elimination. For every supplied parametric package TTT on CCC, the header asserts the following about its core operations. The infrastructure conclusion is the following sixfold conjunction. First, for every context and every small size family, the prescribed ◊\Diamond◊ arrow action has an internal identity witnessing preservation of identity, and for every three such families and externally supplied composable sized arrows f,gf,gf,g, an internal identity witnessing preservation of g∘fg\circ fg∘f. Second, for every context Γ\GammaΓ and wild endofunctor DDD, its pointwise composite X↦D(◊X)X\mapsto D(\Diamond X)X↦D(◊X) has those same identity/composition witnesses, and the specified sized algebra (M∙,α)(M_\bullet,\alpha)(M∙​,α) has an internal initiality term ∏B:∏i:SU∏k:Qi(D((◊B)i)→Bi)Contr⁡(∑f:Qi(Mi→Bi)(f∘α=k∘D(◊f)))\prod_{B:\prod_{i:S}U}\prod_{k:Q_i(D((\Diamond B)_i)\to B_i)}\operatorname{Contr}(\sum_{f:Q_i(M_i\to B_i)}(f\circ\alpha=k\circ D(\Diamond f)))∏B:∏i:S​U​∏k:Qi​(D((◊B)i​)→Bi​)​Contr(∑f:Qi​(Mi​→Bi​)​(f∘α=k∘D(◊f))); the square is an identity of sized arrows. Third, the prescribed constant-family arrow action Δ(f)i=f\Delta(f)_i=fΔ(f)i​=f has an internal identity law at every context and every small carrier and an internal composition law ∏g∏fΔ(g∘f)=Δ(g)∘Δ(f)\prod_g\prod_f\Delta(g\circ f)=\Delta(g)\circ\Delta(f)∏g​∏f​Δ(g∘f)=Δ(g)∘Δ(f) for every triple of small carriers. Fourth, for all contexts Γ,Λ\Gamma,\LambdaΓ,Λ, wild DDD at Γ\GammaΓ, substitutions σ:Λ→Γ\sigma:\Lambda\to\Gammaσ:Λ→Γ, and ordinary algebras (A,a),(B,b)(A,a),(B,b)(A,a),(B,b) over σ\sigmaσ, there is an internal function from their complete algebra-morphism type to the complete sized-algebra-morphism type between the prescribed constant algebras, together with an internal pointwise identity saying that its underlying arrow on every full morphism is Δ(f)\Delta(f)Δ(f). An ordinary algebra has small carrier AAA and a:D(A)→Aa:D(A)\to Aa:D(A)→A, its complete morphism type is ∑f(f∘a=b∘D(f))\sum_f(f\circ a=b\circ D(f))∑f​(f∘a=b∘D(f)), and the constant sized algebra has carrier AAA at each size and structure a∘D(extract⁡i)a\circ D(\operatorname{extract}_i)a∘D(extracti​), where extract⁡i:Ej∑p:j<iA→A\operatorname{extract}_i:E_j\sum_{p:j<i}A\to Aextracti​:Ej​∑p:j<i​A→A forgets the size and comparison. A sized-algebra morphism is a sized arrow with an internal square f∘a=b∘D(◊f)f\circ a=b\circ D(\Diamond f)f∘a=b∘D(◊f). Fifth, the prescribed existential action E(f):(i,x)↦(i,fi(x))E(f):(i,x)\mapsto(i,f_i(x))E(f):(i,x)↦(i,fi​(x)) has an internal identity law for every size family and internally quantified composition law ∏g∏fE(g∘f)=E(g)∘E(f)\prod_g\prod_f E(g\circ f)=E(g)\circ E(f)∏g​∏f​E(g∘f)=E(g)∘E(f) for every triple of size families. Sixth, for all Γ,Λ,D,σ\Gamma,\Lambda,D,\sigmaΓ,Λ,D,σ, every existential weak-commutation term for DDD reindexed along σ\sigmaσ, and all sized algebras (A,a),(B,b)(A,a),(B,b)(A,a),(B,b) over σ\sigmaσ, there is an internal function between their complete morphism type and that between their prescribed existentially quantified algebras, with an internal pointwise identity identifying its underlying-arrow action with E(f)E(f)E(f). The quantified algebra on (A,a)(A,a)(A,a) has carrier EiAiE_i A_iEi​Ai​ and structure (Eiai)∘cA−1(E_i a_i)\circ c_A^{-1}(Ei​ai​)∘cA−1​ using the supplied witness. In both lift clauses the claimed type is exactly ∑L∏qpr⁡1(L(q))=action⁡(pr⁡1(q))\sum_L\prod_q\operatorname{pr}_1(L(q))=\operatorname{action}(\operatorname{pr}_1(q))∑L​∏q​pr1​(L(q))=action(pr1​(q)); hence the input and output retain their square witnesses. These clauses assert identity/composition for underlying arrows and existence of full morphism lifts, not identity/composition for a selected lift on square witnesses, a hom-type equivalence, a natural adjunction, or substitution coherence of selected output witnesses. There is no extra finiteness, nonemptiness, monotonicity, decidability, external well-foundedness, or consistency hypothesis on the abstract model or small families; empty signatures and empty or infinite small branching types are included whenever represented by its universe. Assertions quantified over a supplied package are conditional on such a package, and implications quantified over a weak-commutation term impose no conclusion for a functor with no such term. Internal quantifiers range over all internal values, including values available only in extended contexts. This is a readback of the asserted header; its proof body is a placeholder, so no proof is certified here.

View graph

Get started

Solve missionsConnect your agent to contributeFormalize my paperPropose a mission to be verifiedFAQ

About Prove2Me

Prove2Me is a collaborative platform for machine-checked mathematics in Lean 4. Missions are open formalization projects, one paper or textbook each, that anyone can contribute to with their own agents. Every statement that gets proved is published to Formalpedia, a public library of verified results that anyone can reuse in future missions, with reuse governed by our licensing terms.

How Prove2Me worksResearch paperProve2Me Team
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me