|
View:
New views
7 Messages
—
Rating Filter:
Alert me
|
|
|
|
|
|
|
|
|
Re: Re: [Axiom-mail] finding source codeBertfried,
I think it's great to have this quick introduction - especially when it also references what is currently implemented in Axiom and what might be done in the future. I hope that we can eventually have a tutorial including actual Axiom code. If you start to develop something like that I would be very glad to help add it to the axiom-wiki.newsynthesis.org web site! On Fri, Oct 30, 2009 at 8:26 AM, Bertfried Fauser wrote: > Hi Martin, > >> So yes, I am interested, but I don't know how much I could do. > > OK, I got this disclaimer, anybody states it :-)) > >> As I say, I don't have a rigorous mathematical background, > > No worries, most things with Clifford algebras are easy. > > Clifford and Grassmann bases: > > Mathematically its sound to start with the Grassmann algebra, you have > the following ingrediences: > > V an n-dim vector space > /\ : V x V ... x V --> /\^n V the unital, associative antisymmetric > exterior product or Grassmann or wedge product (all sysnonyms) > > ... Although I think your somewhat more formal approach is very important in the context of Axiom, you might also be interested in the more applied approach presented by John Browne here: http://sites.google.com/site/grassmannalgebra/bookandpackageversions "This Grassmann algebra project has been a part-time project dating from my doctoral thesis in the area in 1978. In October 2001 I published an incomplete book draft "Grassmann Algebra: Exploring applications of extended vector algebra with Mathematica" on my university home page. The computations in this draft were done with early versions of Mathematica and draft versions of the GrassmannAlgebra package. ..." John also makes his Mathematica code available online. It would be great to have this kind of package available in Axiom. Regards, Bill Page. _______________________________________________ Axiom-developer mailing list Axiom-developer@... http://lists.nongnu.org/mailman/listinfo/axiom-developer |
|
|
Clifford Algebra RequirementsBertfried,
In addition to the limitations of the current Clifford algebra implementation, that you explained, there also seem (to my untrained eye) to be performance issues. Also I wanted to get a feel for the general Axiom design methodology by picking a specific issue. The current implementation seems to calculate the product of terms every time it is required when a multiplication is called. From a performance point of view it would seem much more efficient to calculate a multiplication table in the constructor which would make individual multiplications much faster. The original author also had this thought as the following comment is in the code: -- The ei*ej products could instead be precomputed in -- a (2**n)**2 multiplication table. The entries in such a table (in the general Grassman case) would be quite complicated. Not just a single type but perhaps a sum of types with algebraic number multipliers. I think, if I were designing such a system using a conventional object oriented program then, I would create a class for the multiplication table and also a class for individual table entries. I don't know if that's how things are done in Axiom? I don't know enough about the mathematics but is seems to me that classes (domains) such as mutiplicationTable and multipicationTableEntry might have wider application for implementing other algebras? Here I am really going to show up the gaps in my mathematical education but, could these things link back to more fundamental structures, for example could there be an inheritance hierarchy like: ring field field which is a compound type compound type which can be defined by a multiplication table. clifford (Grassman) algebra Is there someone who defines the overall structure of Axiom at this level? What do you think would be the best approach to this? Martin _______________________________________________ Axiom-developer mailing list Axiom-developer@... http://lists.nongnu.org/mailman/listinfo/axiom-developer |
|
|
Re: Clifford Algebra RequirementsMartin Baker wrote:
> Bertfried, > > In addition to the limitations of the current Clifford algebra implementation, > that you explained, there also seem (to my untrained eye) to be performance > issues. Also I wanted to get a feel for the general Axiom design methodology > by picking a specific issue. > > The current implementation seems to calculate the product of terms every time > it is required when a multiplication is called. From a performance point of > view it would seem much more efficient to calculate a multiplication table in > the constructor which would make individual multiplications much faster. The > original author also had this thought as the following comment is in the code: > > -- The ei*ej products could instead be precomputed in > -- a (2**n)**2 multiplication table. > > The entries in such a table (in the general Grassman case) would be quite > complicated. Not just a single type but perhaps a sum of types with algebraic > number multipliers. > > I think, if I were designing such a system using a conventional object > oriented program then, I would create a class for the multiplication table and > also a class for individual table entries. I don't know if that's how things > are done in Axiom? > > I don't know enough about the mathematics but is seems to me that classes > (domains) such as mutiplicationTable and multipicationTableEntry might have > wider application for implementing other algebras? > > Here I am really going to show up the gaps in my mathematical education but, > could these things link back to more fundamental structures, for example could > there be an inheritance hierarchy like: > > ring > field > field which is a compound type > compound type which can be defined by a multiplication table. > clifford (Grassman) algebra > > Is there someone who defines the overall structure of Axiom at this level? > > What do you think would be the best approach to this? > > Martin > > > _______________________________________________ > Axiom-developer mailing list > Axiom-developer@... > http://lists.nongnu.org/mailman/listinfo/axiom-developer > > Structurally, Axiom rests on the categories which define the behavior which is expected from domains which belong to the categories. For instance, everything that belongs to SetCategory has to implement equality. Domains implement the methods required by the categories as well as methods particular to themselves. Thus, it would seem that you would define a category "field defined by multiplication table" which could defines expected methods by all members (e.g. tableLookup(element,element)) The Grassman algebra domain would be a member of the category and thus would be expected to implement such a method. Alternatively you could create a category "field with cached results" that required a "cacheLookup(element,element)". The design is flexible. However, there should be a strong mathematical basis for the choice of category structure. That said, there is the "computational mathematics" issue that some ideas are implied purely by performance rather than mathematical. A graph of the category hierarchy is at: http://axiom-developer.org/axiom-website/bookvol10.2full.html This is one of the more challenging aspects of Axiom so don't feel intimidated by the task. Feel free to ask more questions. I downloaded the Grassman Algebra book and have finished the first two chapters. I looked at Grassman a couple years ago while I was busy documenting the Quaternions. Tim _______________________________________________ Axiom-developer mailing list Axiom-developer@... http://lists.nongnu.org/mailman/listinfo/axiom-developer |
|
|
Re: Clifford Algebra RequirementsDear Martin,
I am surely not the person to aks for general AXIOM(TM) designs, since I am a novice on that either > The current implementation seems to calculate the product of terms every time > it is required when a multiplication is called. From a performance point of > view it would seem much more efficient to calculate a multiplication table This will work for very small diemnions. In my maple Clifford package (with Rafal Ablamowicz) we tried to do that, and we were not able to compute the multiplication tables for dim V > 8, since they become _very_ huge. A partial solution is to cache the results of such multiplications and to read results from the cache if present. There si currently a discussion going of on teh FriCAS (AXIOM(TM) fork) developers list how to do this properly. It seems that only certain data structures can be cached and that one has to translate user data structure possibyl into a Lisp expression which can be hashed. This is surely nothing a novce user (as I feel to be) would like to crank. > -- The ei*ej products could instead be precomputed in > -- a (2**n)**2 multiplication table. In principle yes, but if you have different bases, tha means also to store the multipication table for each basis, which might soon become a problem. Anyhow the first step is to _have_ a valid function which produces such a table, then one can think of hashing. > The entries in such a table (in the general Grassman case) would be quite > complicated. Not just a single type but perhaps a sum of types with algebraic > number multipliers. That seems actually not to be a big issue, If we hash the product of two basis elements, (Vector Integer, Vector Integer) the rsult is alway of type CLQ := Type: CliffordAlgebra(2,Fraction(Integer),[[1,0],[0,1]]) <<CliffordAlgebra(dimension:Integer, Field, QuadraticForm)>> so a table (Index,Index) -> CLQ would do the trick, I guess. > oriented program then, I would create a class for the multiplication table and > also a class for individual table entries. I don't know if that's how things > are done in Axiom? The table entries are from the domain CLQ, and there is a type Table(key,value) in AXIOM. > I don't know enough about the mathematics but is seems to me that classes > (domains) such as mutiplicationTable and multipicationTableEntry might have > wider application for implementing other algebras? What one would need from the outset is a graedFreeModule(Ring,Basis) V to model the Grassmann algebra. The Clifford algebra is (a sub alegbra of) the endormiphism algebra of that, hence lives in the tensor product V (x) V^* A general clifford elment is hence representet (inefficiently) by a sum of such tensors. > could these things link back to more fundamental structures, for example could > there be an inheritance hierarchy like: > > ring > field > field which is a compound type > compound type which can be defined by a multiplication table. > clifford (Grassman) algebra Indeed such hierarchies exist in AXIOM. However, one possibly needs even modules over skew fields and I do not know if such things are implemented. Complex Clifford algebra: CL(n) has two cases n even and n odd Real Clifford algebra. CL(p,q) has 8 cases where the base ring of the representation is in IL whre IL={ reals, complex, quaternions, reals(+)reals, quaternios(+)quaternions} If you would allow Clifford algebras to be build over, say finite fields, or the integers, I am not even sure there is a general classification result available. Quadratic forms (dim 2) with integral coefficients are classified by automorphic forms..... > Is there someone who defines the overall structure of Axiom at this level? Tim has sent you the link to the graph of AXIOM types, sacry isn't it? But a grep on the sources sometimes points you to peices of code where you can just see how other people made use of that. > What do you think would be the best approach to this? The first step would be to implement a solid version of the Grassmann Hopf algebra. (Hopf is automatic, i.e. in a mathematical sense 'universal'). After one can define a GrassmannH Hopf algebra (even better and very much desirable Grassmann super Hopf algebra, i.e a Grassmann algebra over a Z_2 graded module) one is ready to implement the Clifford product (either using the Rota Stein Hopf algebra method, used in Clifford with great effect) or the Chevalley recursive definition (which is much slower for symbolic quadratic forms, which I want to be able to use either). So one would need to design an AXIOM(TM) category of the type GrassmanSuperHopfAlegbra == ?? where ?? has to be a gradedSuperModule(withBasis)(Ring,OrderedSet) or such.... but I am not a category/domain specialist.... I am currently porting my SchurFkt package to AXIOM(TM) (FriCAS style) and hope to improve my knowledge thereby to be able to implement such a GrassmannSuperHopfAlgebraWithBasis after that enterprise... Sorry for being unspecific, but that's due to my limited knowledge Ciao BF. -- % PD Dr Bertfried Fauser % Research Fellow, School of Computer Science, Univ. of Birmingham % Honorary Associate, University of Tasmania % Privat Docent: University of Konstanz, Physics Dept <http://www.uni-konstanz.de> % contact |-> URL : http://clifford.physik.uni-konstanz.de/~fauser/ % Phone : +49 1520 9874517 _______________________________________________ Axiom-developer mailing list Axiom-developer@... http://lists.nongnu.org/mailman/listinfo/axiom-developer |
|
|
Re: Clifford Algebra RequirementsThank you very much to the very helpful replies to my earlier messages, they
give me a much clearer idea of the issues and complexities involved. I have been re-reading your messages to try to understand how to generate the multiplication rules from the quadratic form (as well as trying to understand Axiom in general). I'm afraid that the Rota Stein Hopf algebra method and the Chevalley recursive definition go over my head, at the moment, so I am unsure how to proceed. The only approach I could think of is to further impinge on your patience by writing down what I think I understand and then hoping that you will give me some hints about how I can take it forward and understand it better. Flavours of algebra being discussed ----------------------------------- We are discussing algebras under the banner of Clifford algebra but there are different flavours of this: * Grassman Algebra - vectors square to zero (exterior product '^'). * Clifford Algebra with Clifford bases - vector bases square to scalar value, usually +1 or -1 (equivalent to Grassman bases where quadratic form from diagonal matrix). * Clifford Algebra with Grassman bases - vectors square to scalar value, bases can be rotated, specified by quadratic form (tensor product V (x) V^*). * Geometric Algebra - Hestenes terminology (widely used) for Clifford Algebra (over reals) used in geometric context. In all cases pure vectors and pure bivectors anticommute. Since the Grassman algebra underpins the other Algebras, as the exterior product, it makes the terminology very messy. It is hard to see a naming convention that won't be confusing. Most books on the subject use 'Geometric Algebra' and 'Clifford Algebra' is the second most popular. The book by John Browne, mentioned by Bill Page seems to put everything under the category of Grassman Algebra? The John Browne book also seems to have a different terminology. It seems to use 'reciprocal bases' to do things in a tensor like way. It seems to derive all product types from the exterior and interior (defined as the dual of exterior) products. It seems to have a 'metric palette' which is a square matrix for each grade. For instance the metric palette for 2D vectors is: grade 0: [1] grade 1: [[g(1,1),g(1,2)],[g(1,2),g(2,2)]] grade 2: [ -g(1,2)^2 + g(1,1)g(2,2)] Current Implementation ---------------------- The current implementation in Axiom implements Clifford Algebra with Clifford bases, however the constructor uses a quadratic form so implementation could be upgraded to Grassman bases without changing the external interface (although I guess it would slow it down a lot). Although a better solution is to create GrassmanSuperHopfAlegbra from graedFreeModule(Ring,Basis) or GrassmannSuperHopfAlgebraWithBasis which is what Bertfried is working on. Getting back to the current implementation, taking an example based on 2D vectors and creating quadratic form from: a 0 0 c The multiplication table could be generated from these rules: <e1, e2 | e1*e1=a, e2*e2=c, e1*e2= -e2*e1> (and e1*e2 = e1^e2) The current implementation generates table terms every time they are used when * operation is called (the table is not generated when a Clifford type is defined or instantiated: performance issue). The way that this is calculated in the code is not really documented but as far as I can work out these rules are implemented by representing bases as non negative integers (NNI) representing a binary value where a bit position is an individual vector base, for example e1^e2 would be 00000011. These represent words, the words for each operand are effectively concatenated and the rules are applied to reduce to a valid base. This is done to determine the scalar (sign) as the basis type could have been found from the exclusive-or of the binary values. This is all done using specific code in the addMonomProd procedure rather than using any rule mechanism built into Axiom. Change required --------------- Grassman bases are required for many important applications such as modelling conformal space. So how can we generate the multiplication table from any quadratic form? a b b c Originally I thought this would have to be done by rotating the bases to make this diagonal, then apply method above, then rotate back by the same amount. However Bertfried has pointed out that this is not necessary and the table can be generated directly. I am trying to work out do this and Bertfried hinted that this can be worked out from the square of the vector. So since the vector squares to a scalar: a*e1**2 + b*e1*e2 + b*e2*e1 + c*e2**2 = scalar so if we take an example: 0 1 1 0 we get e1*e2 + e2*e1 = scalar I can't work out to get any further, I think the rules would be something like this (but I can't work out how to get there): <e1, e2 | e1*e1=0, e2*e2=0, e1*e2= -1+e1^e2, e2*e1= -1-e1^e2> (so e1*e2 is not e1^e2) I can't even work out an extremely simple case, more powerful mathematics is required, so I need an introduction to the Rota Stein Hopf algebra method and the Chevalley recursive definition. Any help appreciated. Martin _______________________________________________ Axiom-developer mailing list Axiom-developer@... http://lists.nongnu.org/mailman/listinfo/axiom-developer |
| Free embeddable forum powered by Nabble | Forum Help |