# Implementing algebraic structures in code

There are quite a few computer algebra systems: MAGMA, Singular, Maple, Macaulay2 are just a few that come to mind. I've been interested in how these programs implement structures such as fields, rings, and what not. More precisely, I'm not interested in exactly how the code was implement in the language to create an industry-level product--that is probably a bit overwhelming as the source code is probably huge and a lot of optimizations were implemented.

When searching for the answer on google I've mainly found some research articles about implementing algorithms in JAS (Java Algebra System) and some blog posts/slides:

I've linked them as they seem informative, but not quite comprehensive enough. I was wondering if there are any textbooks/comprehensive (at least more so than what I linked) resources regarding the subject? I only want to implement some structures/algorithms for fun and to learn, not to create any industry-level software.

At this moment I'm mostly looking to work with polynomial rings over $\mathbb{R}$ and $\mathbb{C}$ and generally don't mind limiting myself to infinite/algebraically closed fields. I want to eventually implement various grobner basis algorithms and some of their applications. Thanks!