Forums before death by AOL, social media and spammers... "We can't have nice things"
|    sci.math.symbolic    |    Symbolic algebra discussion    |    10,432 messages    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
|    Message 9,448 of 10,432    |
|    oldk1331@gmail.com to asetof...@gmail.com    |
|    Re: [Axiom] define a rule    |
|    05 Jun 17 03:28:52    |
   
   On Monday, June 5, 2017 at 2:08:23 PM UTC+8, asetof...@gmail.com wrote:   
   > Thank you,   
   > Ok i should use rule('j*'j==1)   
   > but it is possible to use   
   > rule(('j)^n==('j)^(n-2))   
   > with n in INT n>=2 instead   
   > How to specify n is a [generic variable number] INT and has to be >=2, in a   
   rule?   
   >   
   > I say that because that formula it seems the right one for simplify   
   > every expression contained"j"   
   > even j*j*j*j. j^3 ecc   
   > but   
   > if n<0 there is a problem, i think code enter in a loop...   
      
   I think this is what you want:   
      
   f(j,n)==if(1 = n rem 2) then j else 1   
   r:=rule(j^n==f(j,n))   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   
|
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
(c) 1994, bbs@darkrealms.ca