I have been thinking about free algebraic structures. I know the definition by a universal property. But there is a common interpretation that a free structure is one generated by a set of "independent" elements, or elements that are in "no relation" to one another. I have not found a rigorous treatment of this interpretation in the books I have read.
What is a relation between elements of a structure? I understand it's a kind of equation that those elements satisfy, the kind being specific to the kind of structure. $\mathbb Z$ is the free group generated by the one-element set, $\{x_1\}=\{1\}$. There is an equation this set satisfies:
$ x_1=x_1. $
So it's not enough for a set of generators to satisfy any equation in order not to be independent. I know from group theory that a set $X$ of elements of a group $G$ is a basis of a free subgroup of $G$ iff there is no finite product of elements of $X\cup X^{-1},$ without sequences of the form $x_ix_i^{-1}$ and $x_i^{-1}x_i$ in it, such that this product is equal to $1$. I hope this is true at least, as this is not a theorem I have read. But I think this is correct.
There's a lot of equations this definition doesn't take into account. Brackets are not considered, no terms of the form $((x_i^{-1})^{-1})^{-1}$ and the like are allowed. And the right-hand side has to be $1$.
For semigroups, this changes. I have not seen a definition of a "free basis" for semigroups given in these terms but I think it should say what follows. A subset $X$ of a semigroup $S$ is a set of free generators iff the equality of two finite products of elements of $X$ implies the equality of the words over $X$ used to write those products.
So in this case, the right-hand side doesn't have to be $1$ (which doesn't change for monoids, even though $1$ exists in them). But brackets are still not considered.
For magmas, I think the definition should be this.
A subset $X$ of a magma $M$ is a free basis iff no equation is satisfied by its elements with the exception of equating identical (correct) strings of variables and brackets.
With more complex structures like modules, it gets (in a sense) even more complicated (that is more equations are not considered). The definition in this case is that of linear independence, which is the only definition of independence I've encountered.
A great many of equations equations are not considered in this deifnition. The right-hand side has to be $0$; there must at least one coefficient equal to $0$; the same element of the basis may appear only once; the coefficients are just elements of the ring, not sums, products additive inverses of elements of the ring; brackets are not considered.
I would like to know if there is a general definition that would allow me to find out which equations I should consider when I want to define an independent set of elements of some specific type of structure not mentioned above. (I think it's important to reduce the scope of this question to structures whose axioms are identities, unlike fields for example.)