# Aaron Gotwalt

> [Blog](/blog/) / [Projects](/projects/) / [Work](/work/) | [llms.txt](/llms.txt)

---

## Bazel rules for Lean 4

Date: 2026-12-02

Open-sourcing rules_lean4, the Bazel ruleset we wrote for Lean 4 at Positivesum.

---

At [Positivesum](https://www.positivesum.ai) we write models of our software in [Lean](https://lean-lang.org) and prove them correct. The models generate golden tests: contracts that our implementations in other languages have to pass.

Lean sits in the middle of our build, beside everything else, so we wanted [Bazel](https://bazel.build) to build it. [rules_lean4](https://github.com/positivesum-ai/rules_lean4) is the ruleset we wrote for that, and it's now in the Bazel Central Registry as [`positivesum_rules_lean4`](https://registry.bazel.build/modules/positivesum_rules_lean4).

Lean and [Mathlib](https://github.com/leanprover-community/mathlib4) have carried a lot of our early work; this is something back.
