infix icon indicating copy to clipboard operation
infix copied to clipboard

Possibility of derivation/integrarion rules implementation?

Open vdikan opened this issue 7 years ago • 2 comments

Infix looks sophisticated yet simple. Are there plans or suggestions how to implement basic derivation/integration rules similar to those described in a text-book: https://github.com/norvig/paip-lisp/blob/master/docs/chapter8.md

Can you give a hint where to start?

vdikan avatar Dec 14 '18 20:12 vdikan

No plans to slot that functionality into the infix library, but it looks interesting and I can see how you would use our $= to convert an infix expression into prefix, much like the definition in the book:

(defun infix->prefix (infix-exp)
  "Convert fully parenthesized infix-exp to a prefix expression"
  ;; Don't use this version for non-fully parenthesized exps!

I guess you would need to turn the simplifier (https://github.com/norvig/paip-lisp/blob/master/docs/chapter8.md#82-simplification-rules) into clojure-flavoured lisp as the first point.

However, one thing this library ought to do is to provide a mechanism to convert a prefix expression into infix. You would need that to implement the simplifier, I guess.

rm-hull avatar Dec 14 '18 22:12 rm-hull

Ok, I'll see to it. Thanks!

vdikan avatar Dec 15 '18 20:12 vdikan