I have a set of matrices $A_1,\ldots,A_n$. Let $\mathcal{A} = \{A_i\}$.
What are some simple conditions under which for any sequence of indices between $1$ and $n$, $a_1,\ldots,a_m$, the product
$$\prod_{k=1}^m A_{a_k}$$
uniquely determines the sequence of indices?
This is clearly related to the idea of free product in group theory. Following my question here: https://math.stackexchange.com/questions/823194/under-what-conditions-a-product-of-matrices-is-the-identity-matrix-more-complic I took a look at de la Harpe's book (Topics in Geometric Group Theory), but did not find a satisfying answer (reading the chapter about free product, chapter 2).
The main issue is that I am not sure how to reduce this set of matrices into a free product. According to the book, the free product is created by taking disjoint union of elements of a family of groups. The construction is not clear for my case.
I was also advised to look at the Ping-Pong lemma (or the Table-Tennis lemma), and that one seems not very related either, especially since it talks about a free product generated by only two disjoint groups. If we take each $A_i$ to be the generating element of a group, and take the disjoint union of all of these groups, then the Table-Tennis lemma is way too simple.
I get the sense that if we think of a product by a matrix as taking us a step in some space, then the requirement is that there can't be a case for which $A_i = \prod_{j=1}^k A_{b_j}$ for some sequence of indices $b_1,\ldots,b_k$ which is not just $i$. But that's only a necessary condition? (and it is too close to the condition that no sequence of products equals to another sequence of products, which is both necessary, sufficient and makes the question trivial.)