Cubical Agda Formalizes Topos Causal Models for Machine-Checked Inference

Karen Sargsyan· July 20, 2026 View original

Summary

This research presents the first machine-checked formalization of topos causal models using Cubical Agda, building on verified probability monads and do-calculus. It formalizes interventions, proves sheaf gluing, and repairs a gap in Lawvere-Tierney axioms, enhancing the reliability of causal inference.

This paper introduces a groundbreaking machine-checked formalization of topos causal models, leveraging Cubical Agda. The work builds upon existing verified frameworks for probability and do-calculus, providing a robust foundation for causal inference. Key contributions include the formalization of interventions as characteristic maps, a proof of sheaf gluing for independent mechanisms, and a detailed machine-check of the internal language's Kripke-Joyal forcing clauses. A significant finding involves identifying and rectifying a gap in the standard Lawvere-Tierney axioms, which previously failed to enforce a closure operator. With this correction, the framework demonstrates that interventions and Pearl's causal rules remain stable across various topologies. This stability is crucial for understanding the transportability of counterfactuals across different regimes. Furthermore, the research extends the program by incorporating a machine-checked contextuality obstruction, revealing scenarios where locally consistent data cannot form a coherent global model. The entire development is axiom-free and type-checks safely, using rational numbers for concrete discharge, focusing on the presheaf fragment of the topos.

Why it matters

This research provides a more rigorous and reliable foundation for causal inference, which is critical for developing trustworthy AI systems that can reason about cause and effect. Professionals building or deploying AI models in sensitive domains can leverage these formal methods for increased confidence in their systems' causal reasoning capabilities.

How to implement this in your domain

  1. 1Explore formal verification tools like Cubical Agda for critical AI components.
  2. 2Consult with experts in category theory and formal methods to understand applications in causal AI.
  3. 3Integrate principles of machine-checked causal inference into AI system design.
  4. 4Develop internal guidelines for validating causal claims in AI models using formal methods.

Who benefits

HealthcareFinanceAutonomous SystemsDrug Discovery

Key takeaways

  • Formalizing causal models with tools like Cubical Agda enhances reliability.
  • The research identifies and fixes a gap in foundational causal inference axioms.
  • Machine-checked methods can improve the trustworthiness of AI's causal reasoning.
  • Contextuality obstructions highlight limits of local data consistency for global models.

Original post by Karen Sargsyan

"arXiv:2607.15629v1 Announce Type: cross Abstract: Topos causal models recast causal inference inside a topos: a causal world is a presheaf, an intervention is a characteristic map into the subobject classifier, and reasoning is carried out in the intuitionistic internal language.…"

View on X

Originally posted by Karen Sargsyan on X · view source

Want to go deeper?

Turn these trends into skills with Learnijoy's hands-on AI & tech courses.

Explore courses