Hello,

I have been playing with CCR (asked recently here by a physicist).
It is a hypergroup like object and I tried the following:
Define multiplication from the basis into FreeModule(basis)
and then extend it linearly.
However I keep getting the following error when compiling the attached file
(a simplified version). What is expected to be an ordered set here?
------------------------------------------------------------------------
   initializing NRLIB CCRA for CCRAlgebra 
   compiling into NRLIB CCRA 
   compiling exported * : ($,$) -> $
****** comp fails at level 1 with expression: ******
error in function * 

($)
****** level 1  ******
$x:= $
$m:= (OrderedSet)
$f:=
((((|res1| #) (|y1| # #) (|x1| # #) (|last| #) ...)))

   >> Apparent user error:
   Cannot coerce $ 
      of mode (Algebra R) 
      to mode (OrderedSet) 
------------------------------------------------------------------------

best regards,
Franz

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

)abbrev category HGB HGBasis
++ blabla
HGBasis(R:CommutativeRing):Category == OrderedSet with
        _*:(%,%)-> FreeModule(R,%)

)abbrev domain CCRB CCRBasis
++ blabla
CCRBasis(R:CommutativeRing):HGBasis(R) == Symbol add
    (x:%,y:%):FreeModule(R,%) == monomial(1,x)
    
)abbrev domain CCRA CCRAlgebra
++ blabla
CCRAlgebra(R:CommutativeRing):Algebra(R) == FreeModule(R,CCRBasis(R)) add
    Rep:= FreeModule(R,CCRBasis(R))
    x,y:%
    x1,y1:Record(k:CCRBasis(R),c:R)
    
    x * y == 
         for x1 in listOfTerms (x::Rep) repeat
             for y1 in listOfTerms (y::Rep) repeat
                 res1:% := (x1 k * y1 k)
                 res:=  (x1 c * y1 c)*res1 + res
         res

Reply via email to