Another status update. I'm near to complete a fix to ax.boot.
Instead of just producing a simple workaround, I produced something that is in line with my question to Stephen Watt at http://aldor.org/pipermail/aldor-l_aldor.org/2011-December/001328.html i.e. I take the category of the argument and Join it with the category that appears in the "has" expression. I wouldn't need $pretendFlag anymore if there weren't another place where $pretendFlag is used in ax.boot. getDefaultingOps catname == not(name:=hasDefaultPackage catname) => nil $infovec: local := getInfovec name opTable := $infovec.1 $opList:local := nil for i in 0..MAXINDEX opTable repeat op := opTable.i i := i + 1 startIndex := opTable.i stopIndex := i + 1 > MAXINDEX opTable => MAXINDEX getCodeVector() opTable.(i + 2) curIndex := startIndex while curIndex < stopIndex repeat curIndex := get1defaultOp(op,curIndex) $pretendFlag : local := true catops := GETDATABASE(catname, 'OPERATIONALIST) [axFormatDefaultOpSig(op,sig,catops) for opsig in $opList | opsig is [op,sig]] I actually would have liked to replace the flag in this position with my new machinery. Unfortunately, it seems to be impossible. This all has to do with operations in category defaults. Look for example at VectorCategory. It has a default package that looks like this. VectorCategory(R:Type): Category == OneDimensionalArrayAggregate R with ... if R has RadicalCategory and R has Ring then length: % -> R ++ length(v) computes the sqrt(dot(v,v)), i.e. the magnitude magnitude: % -> R ++ magnitude(v) computes the sqrt(dot(v,v)), i.e. the length add ... if R has RadicalCategory and R has Ring then length p == sqrt(dot(p,p)) magnitude p == sqrt(dot(p,p)) But it seems that FriCAS doesn't store the "if R has ... then" conditions. (1) -> )boot name := hasDefaultPackage('VectorCategory) (EVAL-WHEN (EVAL LOAD) (SETQ |name| (|hasDefaultPackage| '| VectorCategory|))) Value = |VectorCategory&| (1) -> )boot GETDATABASE(name, 'CONSTRUCTORMODEMAP) (EVAL-WHEN (EVAL LOAD) (PROG () (RETURN (GETDATABASE |name| 'CONSTRUCTORMODEMAP)))) Value = (((|VectorCategory&| |#1| |#2|) (CATEGORY |domain| (SIGNATURE |magnitude| (|#2| |#1|)) (SIGNATURE |length| (|#2| |#1|)) (SIGNATURE |cross| (|#1| |#1| |#1|)) (SIGNATURE |outerProduct| ((|Matrix| |#2|) |#1| |#1|)) (SIGNATURE |dot| (|#2| |#1| |#1|)) (SIGNATURE * (|#1| |#1| | #2|)) (SIGNATURE * (|#1| |#2| |#1|)) (SIGNATURE * (|#1| (| Integer|) |#1|)) (SIGNATURE - (|#1| |#1| |#1|)) (SIGNATURE - (|#1| |#1|)) (SIGNATURE |zero| (|#1| (|NonNegativeInteger|))) (SIGNATURE + (|#1| |#1| |#1|))) (|VectorCategory| |#2|) (|Type|)) (T |VectorCategory&|)) If that is true, it's not (yet) completely bad since I would simply use the old machinery for this cases (and for the current algebra library that still works). However, the old machinery is inherently wrong (IMHO), since it simply looks at the involved type constructors and pretends their arguments to be of the correct type regardless of the actual stuff that appears in the "has" expression. So, if FriCAS indeed doesn't store the signature as above, I'm out of luck, otherwise please let me know how I can extract the "if" structure of the default package. Thanks in advance. Ralf -- You received this message because you are subscribed to the Google Groups "FriCAS - computer algebra system" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/fricas-devel?hl=en.
