> > Just a little suggestion: return an iterable rather than an iterator: > > sage: for sol in WS.solutions(): print sol > > This gives a conceptual meaning to the result of WS.solutions(): it > models the set of all solutions of the system of equations. Otherwise > it is just a computational gadget (an iterator). Further features > could then be added later on (e.g. counting the solutions, or building > a generating series for it, or ...). Or maybe one would want WS to > model directly the set of solutions to the system of equations? >
Good idea. I will keep this in mind. > > Now, Nicolas (Thi ry) suggested to use the interface of Sage that > > deals with symbolic calculus and which would redirect the equation to > > the words equations solver: > > > sage: symbolic_word("u,v") > > sage: solve( u * v == phi(u * v) ) > > > I'm not very familiar with symbolic calculus in Sage, so I can't say > > if it's compatible with what I intend to do. Any suggestion? Nicolas: > > did I understand you clearly in the other discussion? > I guess I would have to add symbolic morphisms as well: sage: symbolic_word("u,v") sage: symbolic_word_morphism("phi") sage: solve( u * v == phi(u * v) ) > Yes. Not that I am not familiar with symbolic calculus either, so I > can't judge on the difficulty. But it would be nice from a user > perspective. Also, I am not sure if one can reuse something from > SymbolicRing, or whether one should just instead implement symbolic > words and arithmetic on them. And just tell "solve" that if its input > is made of equations on symbolic words, then it should call the word > solver. > This sounds good. I will also take a look at SymbolicRing just in case. Alex -- You received this message because you are subscribed to the Google Groups "sage-combinat-devel" group. To post to this group, send email to sage-combinat-devel@googlegroups.com. To unsubscribe from this group, send email to sage-combinat-devel+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sage-combinat-devel?hl=en.