{"id":"arxiv:2606.20121","kind":"preprint","title":"BARReL: a modern backend for Atelier B in Lean","authors":["Ghilain Bergeron","Vincent Trélat"],"author_count":2,"year":2026,"published":"2026-06-18","venue":null,"cited_by":null,"doi":null,"arxiv_id":"2606.20121","nct_id":null,"source_url":"https://arxiv.org/abs/2606.20121","archive_url":"https://space-kitty.com/papers/arxiv:2606.20121","updated":"2026-10-20","pmid":null,"pmcid":null,"openalex_id":null,"pdf_url":"https://arxiv.org/pdf/2606.20121","abstract":"BARReL is a Lean 4 library bridging Atelier B, an industrial tool for the B method, and the Lean proof assistant by enabling users to conduct their formal B developments---up to machine refinement and implementation---interactively inside Lean, while retaining standard B syntax. B partial operators are encoded with explicit well-definedness conditions, using Lean's dependent types to enforce a well-definedness discipline by construction. That is, proof obligations and proof steps cannot silently rely on ill-typed or ill-defined instantiations. BARReL also provides basic automation for discharging these conditions. The implementation is written entirely using Lean metaprogramming and is designed to be modular: extending the supported B fragment typically requires only adding new syntax and encoding clauses. We compare the resulting workflow with Atelier B on a B refinement development and examine the checks required during interactive proof through two examples.","abstract_license":"CC0-1.0 (arXiv descriptive metadata)","license":null,"is_open_access":false,"retracted":false,"peer_reviewed":false,"categories":["cs.LO"],"details":null,"provenance":"arxiv","attribution":"Abstract: arXiv descriptive metadata (CC0). Thank you to arXiv for use of its open access interoperability. This service was not reviewed or approved by, nor does it necessarily express or reflect the policies or opinions of, arXiv.","topics":[],"cited_in_dossiers":[]}