Ohana trees, linear approximation and multi-types for the λλI-calculus: No variable gets left behind or forgotten!

This paper introduces a novel equational theory for the λ\lambdaI-calculus based on "Ohana trees" that track hidden or infinite variables, establishes a commutation theorem between these trees and Taylor expansions, and provides a corresponding non-idempotent relational denotational model to capture this refined notion of equality.

Rémy Cerda, Giulio Manzonetto, Alexis Saurin

Published 2026-03-05
📖 6 min read🧠 Deep dive

Here is an explanation of the paper "Ohana Trees, Linear Approximation and Multi-Types for the λI-Calculus" using simple language and creative analogies.

The Big Picture: The "No One Left Behind" Rule

Imagine the world of computer science as a giant kitchen where chefs (programmers) write recipes (code) to make dishes (results). In this specific kitchen, there is a strict rule: You cannot throw away any ingredients.

This is the λ\lambdaI-calculus. In normal cooking (the standard λ\lambda-calculus), if a recipe says "Take a carrot, chop it, and throw it away," that's fine. But in the λ\lambdaI-calculus, every ingredient you pick up must be used in the final dish. You can't erase anything.

For decades, scientists tried to understand how these recipes behave. They used a tool called a Böhm Tree, which is like a map showing the final dish a recipe produces. However, this map had a flaw: sometimes, a recipe would keep an ingredient "in the oven" forever, or hide it behind a wall of nonsense. The map would show the final dish, but it would forget that specific ingredient was ever there.

The Problem: If two recipes use different ingredients but end up looking the same on the map, the map says they are identical. But in the λ\lambdaI-kitchen, they are not identical because one recipe held onto an ingredient the other didn't. The old maps were "leaving variables behind."

The Solution: The authors introduce Ohana Trees. The name comes from the famous quote in the movie Lilo & Stitch: "Ohana means family. Family means nobody gets left behind or forgotten."

1. What is an Ohana Tree?

Think of an Ohana Tree as a super-detailed family tree for a computer program.

  • The Old Map (Böhm Tree): If a program runs forever or gets stuck, the map just draws a black box labeled "Mystery." It forgets what variables were inside that box.
  • The New Map (Ohana Tree): If a program gets stuck or runs forever, the Ohana Tree draws the black box, but it labels it with a list of every single ingredient that was inside.

The Analogy:
Imagine you are watching a magician pull a rabbit out of a hat.

  • Böhm Tree: "Here is a rabbit." (It doesn't care if the rabbit was wearing a hat, or if the magician was holding a carrot in his other hand).
  • Ohana Tree: "Here is a rabbit. Also, note that the magician was holding a carrot, and the rabbit was wearing a blue hat." Even if the carrot never gets used in the trick, the Ohana Tree remembers it.

This ensures that if two programs have different "ghost ingredients" (variables that were never erased but also never used), the Ohana Tree can tell them apart.

2. The Taylor Expansion: The "Recipe Breakdown"

To prove that their new maps are accurate, the authors used a technique called Taylor Expansion (borrowed from math, but applied to code).

The Analogy:
Imagine you have a complex cake recipe.

  • Standard approach: You just look at the finished cake.
  • Taylor Expansion approach: You break the recipe down into its tiniest possible parts. You list every single egg, every grain of sugar, and every drop of vanilla. You treat them as individual "resources" that cannot be duplicated or thrown away.

The authors created a special version of this for the λ\lambdaI-kitchen. They call it a "Resource Calculus with Memory."

  • If a recipe tries to use an ingredient but doesn't have enough, the system throws an "exception" (like a kitchen alarm).
  • If a recipe tries to throw away an ingredient, the system catches it and writes it down in a "Memory Log."

They proved a Commutation Theorem:

If you take a program, break it down into its tiny resource parts (Taylor Expansion), and then put it back together, you get the exact same result as if you took the program, drew its Ohana Tree, and then broke that tree down.

This is a huge deal. It means the Ohana Tree isn't just a pretty picture; it is mathematically equivalent to the deepest, most detailed analysis of the code's resources.

3. The "Type System": The Security Guard

Finally, the authors built a Type System (a set of rules to check if code is valid) that acts like a security guard.

The Analogy:
Imagine a bouncer at a club.

  • Old Bouncers: They check if you have a ticket (is the code valid?).
  • The New Bouncer (Multi-Type System): This bouncer checks your ticket, but also checks who you brought with you.

In this system, every variable has a "guest list." When a function (a chef) calls for an ingredient, the bouncer checks:

  1. Did you use the ingredient?
  2. If you didn't use it, did you write down exactly who it was in the guest list (the "Memory" environment)?

If the guest list matches the Ohana Tree, the code is approved. If the code tries to hide a variable, the bouncer catches it. This proves that the Ohana Tree logic is solid and consistent.

Why Does This Matter?

  1. Fairness: In computer science, we want to know exactly what a program does. If a program "forgets" a variable, we might think two programs are the same when they aren't. Ohana Trees ensure no variable is ever forgotten, even if it's just sitting in the background.
  2. New Tools: This gives scientists a new way to analyze code that follows the "no erasing" rule. It connects three different ways of looking at code:
    • Trees (The visual map).
    • Resources (The ingredient breakdown).
    • Types (The security check).
  3. Future Proofing: The authors show that this method could eventually be applied to all computer programs, not just the strict "no erasing" ones. They are laying the groundwork for a future where we can track every single piece of data in a program, no matter how complex.

Summary

The authors invented a new way to map computer programs called Ohana Trees. These maps are special because they remember every single variable a program touches, even if that variable is never actually used or is hidden in an infinite loop. They proved this works by breaking programs down into tiny "resource" pieces and building a security system to check them. The result is a more honest, complete, and accurate way to understand how computer programs behave.

The core message: In the world of code, nobody gets left behind.