Yes of course! this set of rules is only to test the functionality of the rule based translator expresso will take an input into a normal form. (the transformation itself can be a set of rules) In the normal form I will order the symbols alphabetically before the symbols and try to mimimize the difference between the same variables. The exact form of the normalized expression is also a design choice. For limited set of expressions there are canonical ( same representation <=> same value) standart forms, but expresso aims to be general. Even for polynomials you could say (3x * 4y) * (5 - 3x + z) should be factored out, but what about (x + y)^100 I think it is good to 'normalize' every expression entered to a agree able normal form but not doing to much that would work against other use cases but let the transformation to the modules which build upon the core expresso functionality.
another thing to mimimize the amount of rules is a better syntax for them. For now many rules are dublicates and differ only on which argument they are applied. This is needed because it will support variadic expressions (the code now only likes (op ag1 ag2)) so I will write syntax to make it easy to say for example if any argument to * is 0 => 0 if there are multiple occurences of a variable with + concat them ... I think this addresses the issue you meant in your first post what do you mean by entropy based calculation ? something like the heuristic to contract the same variable as much as possible ? On Wed, May 29, 2013 at 7:20 PM, Alan Thompson <thompson2...@gmail.com>wrote: > Perhaps alphabetize the symbols to break the loop? It seems that > something is needed or you'll get a combinatorical explosion of rules! > > Also, you need some system to say writing (* 3 x) is preferable to (+ x x > x) and the like. I have had good luck using an entropy based calculation > for scoring such options in the past. Is there any way to incorporate such > a score in the rule system? > > Alan > > > On Wed, May 29, 2013 at 10:02 AM, Maik Schünemann < > maikschuenem...@gmail.com> wrote: > >> Hi Alan. >> Yes I looked at Mathematica even read a paper about its internal >> implementation and that it is at its core basically a rewrite system! >> (I also mentioned that in my proposal) >> this commutative rule would cause an infinite loop because x and y match >> to anything. So the result of applying the rule will be given to the rule >> and on and on ... >> This is a hard thing for rule based systems. >> but I plan to have generic rules classes of operations. >> >> Thanks for your feedback >> >> >> On Wed, May 29, 2013 at 6:21 PM, Alan Thompson <thompson2...@gmail.com>wrote: >> >>> Hi - This looks great! Did you look at Mathematica at all? They have >>> been doing symbolic algebra for many years, and you might get some ideas >>> there. >>> >>> Also, I noticed that you don't have any commutative rules listed, eg: >>> >>> (rule ['+ x y] :=> ['+ y x]) >>> >>> Wouldn't this reduce some of the duplication in your rules example? >>> Good luck! >>> Alan Thompson >>> >>> >>> On Wed, May 29, 2013 at 8:29 AM, David Nolen <dnolen.li...@gmail.com>wrote: >>> >>>> A very cool of use of core.logic, look forward to seeing where it goes >>>> :) >>>> >>>> >>>> On Wed, May 29, 2013 at 11:10 AM, Maik Schünemann < >>>> maikschuenem...@gmail.com> wrote: >>>> >>>>> Hello, >>>>> I am glad to announce that my proposal got accepted for google summer >>>>> of code. >>>>> I am doing the algebraic expression project idea which could lay the >>>>> foundation for a clojure CAS System by providing a library to manipulate >>>>> expressions syntactically >>>>> and also solving equations and optimizing them for evaluation on top >>>>> of core.matrix. >>>>> >>>>> I have created a blog post in which I explained it in more detail and >>>>> also the design decisions I have to make in the beginning, such as how to >>>>> represent an expression, >>>>> a rule, how to deal with core.logic ... >>>>> http://kimavcrp.blogspot.de/201blog >>>>> post3/05/gsoc-project-algebraic-expressions-pre.html<http://kimavcrp.blogspot.de/2013/05/gsoc-project-algebraic-expressions-pre.html> >>>>> >>>>> Please comment if you have feedback or feature request or have a >>>>> concrete use case for what you would want to use it. The more feedback I >>>>> get the better I can make the >>>>> library. >>>>> >>>>> >>>>> -- >>>>> -- >>>>> You received this message because you are subscribed to the Google >>>>> Groups "Clojure" group. >>>>> To post to this group, send email to clojure@googlegroups.com >>>>> Note that posts from new members are moderated - please be patient >>>>> with your first post. >>>>> To unsubscribe from this group, send email to >>>>> clojure+unsubscr...@googlegroups.com >>>>> For more options, visit this group at >>>>> http://groups.google.com/group/clojure?hl=en >>>>> --- >>>>> You received this message because you are subscribed to the Google >>>>> Groups "Clojure" group. >>>>> To unsubscribe from this group and stop receiving emails from it, send >>>>> an email to clojure+unsubscr...@googlegroups.com. >>>>> For more options, visit https://groups.google.com/groups/opt_out. >>>>> >>>>> >>>>> >>>> >>>> -- >>>> -- >>>> You received this message because you are subscribed to the Google >>>> Groups "Clojure" group. >>>> To post to this group, send email to clojure@googlegroups.com >>>> Note that posts from new members are moderated - please be patient with >>>> your first post. >>>> To unsubscribe from this group, send email to >>>> clojure+unsubscr...@googlegroups.com >>>> For more options, visit this group at >>>> http://groups.google.com/group/clojure?hl=en >>>> --- >>>> You received this message because you are subscribed to the Google >>>> Groups "Clojure" group. >>>> To unsubscribe from this group and stop receiving emails from it, send >>>> an email to clojure+unsubscr...@googlegroups.com. >>>> For more options, visit https://groups.google.com/groups/opt_out. >>>> >>>> >>>> >>> >>> -- >>> -- >>> You received this message because you are subscribed to the Google >>> Groups "Clojure" group. >>> To post to this group, send email to clojure@googlegroups.com >>> Note that posts from new members are moderated - please be patient with >>> your first post. >>> To unsubscribe from this group, send email to >>> clojure+unsubscr...@googlegroups.com >>> For more options, visit this group at >>> http://groups.google.com/group/clojure?hl=en >>> --- >>> You received this message because you are subscribed to the Google >>> Groups "Clojure" group. >>> To unsubscribe from this group and stop receiving emails from it, send >>> an email to clojure+unsubscr...@googlegroups.com. >>> For more options, visit https://groups.google.com/groups/opt_out. >>> >>> >>> >> >> -- >> -- >> You received this message because you are subscribed to the Google >> Groups "Clojure" group. >> To post to this group, send email to clojure@googlegroups.com >> Note that posts from new members are moderated - please be patient with >> your first post. >> To unsubscribe from this group, send email to >> clojure+unsubscr...@googlegroups.com >> For more options, visit this group at >> http://groups.google.com/group/clojure?hl=en >> --- >> You received this message because you are subscribed to the Google Groups >> "Clojure" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to clojure+unsubscr...@googlegroups.com. >> For more options, visit https://groups.google.com/groups/opt_out. >> >> >> > > -- > -- > You received this message because you are subscribed to the Google > Groups "Clojure" group. > To post to this group, send email to clojure@googlegroups.com > Note that posts from new members are moderated - please be patient with > your first post. > To unsubscribe from this group, send email to > clojure+unsubscr...@googlegroups.com > For more options, visit this group at > http://groups.google.com/group/clojure?hl=en > --- > You received this message because you are subscribed to the Google Groups > "Clojure" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to clojure+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/groups/opt_out. > > > -- -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.