← Latest papers
💻 computer science

Automating Boundary Filling in Cubical Type Theories

This paper presents an experimental Haskell solver that automates the construction of cubes with specified boundaries in cubical type theory by employing heuristics for contortion solving via poset maps and constraint satisfaction programming for Kan solving, thereby addressing the complex combinatorics of higher-dimensional equational reasoning.

Original authors: Maximilian Doré, Evan Cavallo, Anders Mörtberg

Published 2026-06-15
📖 5 min read🧠 Deep dive

Original authors: Maximilian Doré, Evan Cavallo, Anders Mörtberg

Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer

Imagine you are trying to build a complex 3D sculpture out of clay, but you are only allowed to use specific tools and rules. This is the world of Cubical Type Theory, a way for computers to do advanced mathematics. In this world, mathematical "paths" (like proving two things are equal) are treated as physical lines, and proving more complex equalities is like building squares, cubes, and even higher-dimensional shapes.

The problem is that building these shapes by hand is incredibly tedious. You have to figure out exactly how to stretch, twist, and paste different pieces of clay together to make the edges match perfectly. If you make a tiny mistake in the geometry, the whole proof collapses.

This paper introduces a robotic assistant (a computer program) designed to do this heavy lifting for you. Here is how it works, broken down into simple concepts:

1. The Two Main Tools: "Twisting" and "Pasting"

To build a shape, the robot uses two main strategies:

  • Twisting (Contortion): Imagine you have a flat square piece of clay. You can stretch it, squish it, or fold it to make it fit a new shape without tearing it. In the paper's language, this is called contortion.

    • The Analogy: Think of a flexible rubber sheet. If you need to turn a square into a triangle, you just stretch the corners. The robot is very good at figuring out how to stretch a known shape to fit a new boundary.
    • The Catch: Sometimes, the shape you need is too weird to be made just by stretching. You can't stretch a square into a donut without cutting it.
  • Pasting (Kan Filling): When stretching isn't enough, you have to build a new piece of clay from scratch to fill a gap. Imagine you have a box with five sides made of clay, but the top is open. The robot's job is to invent a "lid" that fits perfectly and seals the box.

    • The Analogy: This is like being given an open cardboard box and asked to design a lid that closes it perfectly, even though you don't know exactly what the inside looks like yet.
    • The Catch: This is much harder. There are infinite ways to make a lid, and finding the right one is like finding a needle in a haystack. In fact, the paper proves that for some very complex shapes, it is mathematically impossible to write a program that can always find the right lid (this is called "undecidable").

2. The Robot's Strategy: Smart Guessing

Since finding the perfect "lid" (Kan filling) is so hard, the robot uses a clever two-step strategy:

  • Step 1: The "Stretch" Check: First, it tries to see if the shape can be solved just by stretching (contortion). The paper shows that for the most complex types of stretching, the number of possibilities is so huge that a computer would take billions of years to check them all one by one.

    • The Solution: The robot uses a "map" (called a Poset Map) to group similar stretches together. Instead of checking every single possibility, it checks the "neighborhoods" of possibilities. If a stretch doesn't fit, it eliminates the whole neighborhood at once. This makes the robot incredibly fast at solving stretching problems.
  • Step 2: The "Lid" Hunt: If stretching fails, the robot switches to building lids (Kan filling). Since there are too many ways to build a lid, it treats the problem like a puzzle (a Constraint Satisfaction Problem).

    • The Analogy: Imagine you are trying to build a 3D structure where every piece must click into place. The robot sets up a checklist of rules (e.g., "The left side must match the right side," "The top must be flat"). It then uses a solver to find a combination of pieces that satisfies all the rules simultaneously. It builds the solution layer by layer, starting with simple shapes and only adding complex "nested" pieces if absolutely necessary.

3. What the Robot Actually Does

The authors built this robot in a programming language called Haskell. They tested it on real mathematical problems that researchers often face, such as:

  • The Eckmann-Hilton Argument: A famous proof in topology that shows how two ways of combining loops are actually the same. In the paper, this is visualized as a 3D cube. The robot successfully built this cube automatically in a fraction of a second.
  • Path Associativity: Proving that the order in which you combine paths doesn't matter (like (A+B)+C=A+(B+C)(A+B)+C = A+(B+C)).

4. The Bottom Line

The paper claims that while we cannot build a robot that solves every possible mathematical shape (because some are mathematically impossible to solve), we can build a robot that solves the vast majority of the "boring" and "routine" shapes that mathematicians encounter every day.

By automating the tedious geometry of stretching and pasting, this tool frees up human mathematicians to focus on the big ideas rather than getting stuck on the details of how to fit the clay pieces together. It turns a hours-long manual puzzle into a split-second computer calculation.

Drowning in papers in your field?

Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.

Try Digest →