Zulip Chat Archive

Stream: general

Topic: Should regression be in mathlib or in cslib?


Alisson Matheus Silva (Feb 27 2026 at 22:40):

Hi everyone,
I’m starting to formalize some machine learning algorithms (e.g., linear regression) in Lean and I’m wondering: should these go in mathlib or cslib?mathlib seems natural for the mathematical foundations (e.g., closed-form solutions, statistical properties, optimization). cslib seems better for algorithmic aspects (e.g., implementations, numerical methods, complexity).
But where do we draw the line? For example, least squares regression is both a mathematical object and a core ML algorithm. Should we split the formalization, or is there a preferred home for these in the Lean ecosystem?
I'd love to hear your thoughts and any relevant examples or conventions. Here's a PR I opened: https://github.com/leanprover/cslib/pull/375


Last updated: Feb 28 2026 at 14:05 UTC