Multiple-inheritance hazards in dependently-typed algebraic hierarchies
Eric Wieser

TL;DR
This paper examines the hazards of multiple inheritance in dependently-typed algebraic hierarchies within theorem provers, highlighting issues with typeclass resolution paths and proposing solutions like kernel support for $ta$-reduction.
Contribution
It provides a detailed analysis of multiple inheritance issues in dependently-typed hierarchies and compares implementation strategies, proposing solutions to improve typeclass management.
Findings
Identifies hazards of multiple inheritance in dependently-typed hierarchies.
Analyzes how different implementation approaches affect judgmental equality.
Proposes kernel support for $ta$-reduction to address identified issues.
Abstract
Abstract algebra provides a large hierarchy of properties that a collection of objects can satisfy, such as forming an abelian group or a semiring. These classifications can arranged into a broad and typically acyclic directed graph. This graph perspective encodes naturally in the typeclass system of theorem provers such as Lean, where nodes can be represented as structures (or records) containing the requisite axioms. This design inevitably needs some form of multiple inheritance; a ring is both a semiring and an abelian group. In the presence of dependently-typed typeclasses that themselves consume typeclasses as type-parameters, such as a vector space typeclass which assumes the presence of an existing additive structure, the implementation details of structure multiple inheritance matter. The type of the outer typeclass is influenced by the path taken to resolve the typeclasses it…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsLogic, programming, and type systems · Software Engineering Research · Formal Methods in Verification
