← Latest papers
💻 computer science

A Foundation for Differentiable Logics using Dependent Type Theory

This paper presents a unified formalization of differentiable and fuzzy logics within the Rocq proof assistant using dependent type theory, systematically comparing their analytic, algebraic, and proof-theoretic properties by interpreting them via residuated lattices, formalizing necessary calculus tools like L'Hôpital's rule, and establishing sound sequent calculi for both existing and new logical systems.

Original authors: Reynald Affeldt, Alessandro Bruni, Ekaterina Komendantskaya, Natalia Ślusarz, Kathrin Stark

Published 2026-03-02
📖 5 min read🧠 Deep dive

Original authors: Reynald Affeldt, Alessandro Bruni, Ekaterina Komendantskaya, Natalia Ślusarz, Kathrin Stark

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 teach a robot to drive a car. You want the robot to be safe, but you also want it to learn from its mistakes. In the world of Artificial Intelligence (AI), we use Neural Networks (the robot's "brain") to learn. To teach them, we use a "scorecard" called a Loss Function. If the robot makes a mistake, the score goes up; if it does well, the score goes down. The robot tries to minimize this score to get better.

However, sometimes we want the robot to follow specific rules, like "Always stop at a red light" or "Never drive faster than 30 mph." This is where Differentiable Logics come in. They are a special kind of math that turns logical rules (like "If red, then stop") into a scorecard the robot can understand and optimize.

The Problem: A Tower of Babel

For a long time, researchers have been inventing different versions of these "rule-to-score" translators.

  • Some teams use Fuzzy Logics (old-school math from the 1920s that handles "maybe" and "sort of").
  • Other teams use Machine Learning Logics (newer math designed specifically for AI training).

The problem? They all speak different languages.

  • One team says "True" is the number 1.
  • Another says "True" is 0.
  • One uses a specific type of "AND" operation, while another uses a different one.
  • Some rules work perfectly for algebra, but break when you try to do calculus (the math of change and speed). Others work great for calculus but make no sense algebraically.

It's like trying to build a house where the bricks from the foundation are made of wood, the walls are made of glass, and the roof is made of water. They don't fit together, and you can't be sure the house will stand.

The Solution: A Universal Translator

This paper is like building a Universal Translator and a Master Blueprint for all these different logic systems. The authors used a powerful tool called Rocq (a digital proof assistant, think of it as a super-strict math referee) to translate every different logic system into a single, unified language.

Here is what they did, using some creative analogies:

1. The Algebraic Lens (The Lego Structure)

Imagine logic systems as sets of Lego blocks.

  • Fuzzy Logics are like a set of Legos that snap together perfectly in a specific way (called a Residuated Lattice). They are sturdy and well-understood.
  • New AI Logics were like a pile of random blocks that didn't seem to snap together.
  • The Paper's Discovery: The authors showed that some of the new AI blocks can actually snap together if you look at them from the right angle. They proved that a specific version of the new logic (called STL∞) is just as sturdy as the old Lego sets. However, they also found that if you try to make the blocks snap together perfectly (algebraically), they lose their ability to slide smoothly (calculus-wise). It's a trade-off: you can't have a block that is both perfectly rigid and perfectly slippery at the same time.

2. The Analytic Lens (The Smooth Slide)

In machine learning, the robot needs to "slide" down a hill to find the best solution. This requires the math to be smooth (differentiable).

  • Some old logic rules were like jagged rocks; if the robot tried to slide on them, it would get stuck.
  • The authors checked which rules allowed for a smooth slide. They discovered that some new rules (like DL2) are very smooth, while others (like the old Gödel logic) are too jagged.
  • The Big Win: They had to invent a new mathematical tool (a formal proof of L'Hôpital's Rule, a famous calculus trick) to prove that a complex new logic (STL) was actually smooth enough for the robot to use. It's like proving that a bumpy road is actually smooth enough for a race car if you look at it from a specific distance.

3. The Proof-Theoretic Lens (The Rulebook)

Every logic needs a rulebook (a Sequent Calculus) to ensure that if you start with true premises, you end up with a true conclusion.

  • The old fuzzy logics had excellent, well-written rulebooks.
  • The new AI logics were playing by the rules of the road without a written rulebook.
  • The Paper's Contribution: The authors wrote the first official rulebooks for the new AI logics (DL2 and STL∞). They proved that these new rulebooks are "sound," meaning they won't lead the robot into a logical trap.

Why Does This Matter?

Imagine you are a city planner.

  • Before this paper: You had different architects using different blueprints. One said "The wall must be 10 feet high," another said "The wall must be 3 meters high," and a third said "The wall must be 'very tall'." You couldn't build a safe building because the measurements didn't match.
  • After this paper: You have a single, unified blueprint. You can now compare the architects. You can say, "Hey, Architect A's design is great for stability, but Architect B's design is better for speed."

The Takeaway

This paper is a massive step toward Safe AI.
By putting all these different logic systems into one "sandbox" (the Rocq proof assistant), the authors:

  1. Found errors in previous research (like finding a crack in a bridge before anyone drove over it).
  2. Created a common language so mathematicians and AI engineers can finally talk to each other.
  3. Built new tools (like the new rulebooks) that allow us to train AI to follow complex rules safely.

In short, they took a chaotic zoo of different mathematical ideas, organized them into a neat library, and gave us the keys to build smarter, safer, and more reliable AI systems.

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 →