axiom-mail
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Axiom-mail] A question about Axiom capabilities, Fwd: [fricas-devel


From: Martin Baker
Subject: Re: [Axiom-mail] A question about Axiom capabilities, Fwd: [fricas-devel] Abstract Vector Algebra
Date: Sat, 30 Mar 2013 17:25:45 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130307 Thunderbird/17.0.4

On 30/03/13 12:01, Ralf Hemmecke wrote:
> Unless you specify what solver you intend to write, it's probably an
> unsolvable task to write a general solver that works for all types of
> algebras.
>
> Ralf

Agreed, but I was thinking more about doing it on a per-domain basis and building up gradually.

So we start with a very simple algebra that we want to create a equation solver for, for example we might want to create an algebra domain based on this category:

MyAlgebra() : Category with
  myOp1 : ($,$) -> $
  myOp2 : ($) -> $

Then create an expression holder that is specific to that algebra:

MyAlgebraExpression() : Exports == Implementation where
  Implementation == add
  Rep := Union(_
         literalTerm : MyAlgebra, _
         variableTerm : Symbol, _
         myOp1Term : Record(left: $, right: $), _
         myOp2Term : $_
         )
  bind : (Symbol,MyAlgebra,$) -> $
  canonicalForm : $ -> $
  decomposeMyOp1 : $ -> ($,$)
  decomposeMyOp2 : $ -> ($)

Then create an equation solver that is also specific to that algebra:

MyAlgebraEquation() : Exports == Implementation where
  Implementation == add
  Rep := Record(left: MyAlgebraExpression, right: MyAlgebraExpression)
  solveFor : (Symbol,$) -> MyAlgebraExpression

This would require 3 domains for every algebra that we wanted to be able to solve but why not have some separate common rule interpreter code. So MyAlgebraEquation domain would consist mostly of a set of substitution rules for that particular algebra?

Martin




reply via email to

[Prev in Thread] Current Thread [Next in Thread]