In my opinion, the best way to learn about abstract algebraic structures is to sit down with a book and write some proofs. That’s the purpose of these structures, to provide a minimal language for describing the behavior of mathematical objects for the purpose of exposition or proof. For example, prove that given any element g of a finite group G that there exists a positive integer k such that g^k is the identity element.<p>“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.<p>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.