“Implementing” (with big scare quotes) algebraic structures by essentially implementing what appear to be “interfaces” (or traits or type classes or ...) might give you a brief “aha!” about what an abstract algebraic structure is on the surface, but won’t give much insight or practical use beyond that. Critically, one of the many hugely lacking aspects in this approach to implementing these structures in a language like Rust (or Haskell or ...) is that one needs to prove that these interfaces satisfy the axiomatic laws of the structure.
I maintain a library that allows one to compute with groups of permutations. The entire library—thousands of lines of fiddly code—is dedicated to one and only one algebraic structure (the group) on one and only one kind of object (the permutation). Countless papers have been written about just this combination, and should give you some appreciation for the depth of this subject. Slapping on a “identity” and “mul” implementation to a “Permutation” object doesn’t do justice.
I find something relatively simple like a monoid already tremendously useful for practical software engineering tasks like some aggregation.
> Critically, one of the many hugely lacking aspects in this approach to implementing these structures in a language like Rust (or Haskell or ...) is that one needs to prove that these interfaces satisfy the axiomatic laws of the structure.
Typically these libraries (alga for rust, spire for scala) come with laws that allow at least checking if the properties hold using property based testing. I find this very useful. See for example https://github.com/typelevel/spire/tree/master/laws/src/main...
All either of these does is change the balance an infinitesimal amount between what you do know about the structure and the vast, staggering amount of things you don't know about the structure. Getting paralysed by that vast, staggering amount out there doesn't help anyone. Instead, take tiny nibbles and build confidence—and if your implementation in a programming language of an algebraic structure helps you to do the proofs, or even just helps you realise when the structure might be appropriate in a programming task, then real progress has been made, no matter how much you still don't know.
For starters, what book would you recommend? Cheers!
If you’re already pretty serious about math (i.e., you already write proofs; maybe you took an analysis class), then I recommend Artin’s Algebra.
If you really want tons of practice and a Stewart’s Calculus-like book, then Dummit and Foote.