[Haskell-cafe] Symbolic differentation using GHC's simplificationrules

Jacques Carette carette at mcmaster.ca
Tue Mar 22 11:16:47 EST 2005

> I tried to implement symbolic differentation using GHC's simplification 
> rules. I assume that someone has already thought about this, right? 

You are trying to do 'intensional programming' via GHC's simplification
rules, ouch!  You are likely to hit limits very very quickly.

However, if you want to do this *in* GHC, then Oleg showed how to do it in
the post

> I have 
> also heard that the rules system is not strong enough for implementing a 
> full computer algebra system.

That might be because CASes cannot be done as (unconditional) rewrite
systems!  With 'conditional' TRS you can get much further, but the
condition-checking may involve arbitrary theorem proving.

I also attach a minor variation of Oleg's code in which all the Num
dependencies are removed(!) and replaced by the much weaker Show dependence.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: SymbolicDifferentiator.lhs
Type: application/octet-stream
Size: 10951 bytes
Desc: not available
Url : http://www.haskell.org//pipermail/haskell-cafe/attachments/20050322/f196e770/SymbolicDifferentiator-0001.obj

More information about the Haskell-Cafe mailing list