Flattening subtyping by eta expansion

📅 2024-12-26
📈 Citations: 0
✨ Influential: 0
📄 PDF
🤖 AI Summary
Deep subtyping—where subtyping judgments require complex, nested derivations—compromises both theoretical tractability and practical understandability in type systems. Method: This paper proposes a systematic replacement of deep subtyping inference with η-expansion as a foundational design principle. Building on Barendregt et al. (1983), we recast η-expansion as a universal paradigm for type design and integrate it with intersection types and a precisely defined subtyping relation to construct a shallow subtyping system. Contribution/Results: We formally prove that, under η-expansion, the shallow system is expressively and decidably equivalent to its deep counterpart; all key lemmas are complete and all derivations are mechanically verifiable. Our approach reduces type-checking complexity significantly, enhances formal verifiability, and improves engineering applicability. It establishes a novel, principled paradigm for type system design that reconciles high expressive power with conceptual simplicity and syntactic clarity.

Technology Category

Constraint Satisfaction and Optimization: Satisfiability Modulo TheoriesKnowledge Representation and Reasoning: Computational Complexity of ReasoningCognitive Modeling & Cognitive Systems: Conceptual Inference and Reasoning

Application Category

Systems and Infrastructure for Web, Mobile and WoT: Experiences and lessons learnt from Web-based algorithms and system deploymentsUser Modeling, Personalization and Recommendation: User privacy protection in personalized systemsGraph Algorithms and Modeling for the Web: Representation, reconstruction, and subgraph or motif discovery in Web-related graphs
📝 Abstract
To design type systems that use subtyping, we have to make tradeoffs. Deep subtyping is more expressive than shallow subtyping, because deep subtyping compares the entire structure of types. However, shallow subtyping is easier to reason about. By eta-expanding source programs, we can get the effect of deep subtyping with less of its complexity. An early paper on filter models (Barendregt et al. 1983) examined two similar intersection type systems. The first included a subsumption rule that used a rich subtyping relation, including multiple rules for the top type and a distributivity rule. Their second type system dropped the subsumption rule, but added a rule that allowed a term to be eta-expanded before typing it. This rule in their second type system compensated for the lack of subsumption: where their first type system used subtyping to manipulate intersections deep inside types, their second type system used introduction and elimination rules directly on the subterms created by eta-expansion. Viewed as a computation, their proof of completeness for the second (shallow) system performs eta-expansion. Thus, we can regard their proof as inventing the application of eta-expansion to avoid deep subtyping. This paper serves as a tutorial on using eta-expansion to obviate deep subtyping, puts the invention of the technique by Barendregt et al. (1983) into context, gives a complete proof of the relevant lemma, and discusses how the technique can be used in type system design.
Problem

Research questions and friction points this paper is trying to address.

Subtyping
Type Systems
Complexity Reduction
Innovation

Methods, ideas, or system contributions that make the work stand out.

Eta Expansion
Subtype System Simplification
Deep Subtyping Complexity Reduction
🔎 Similar Papers
No similar papers found.
💼 Related Jobs
No related jobs found.
Queen's University