CoCoA:HowTo:Use Modular Numbers: Difference between revisions
From ApCoCoAWiki
mNo edit summary |
mNo edit summary |
||
Line 1: | Line 1: | ||
== Modular Numbers == | == Modular Numbers == | ||
=== Question === | === Question === | ||
What's wrong in this? | |||
Use R::=Z/(5)[x]; | Use R::=Z/(5)[x]; | ||
5x+2y; | 5x+2y; | ||
2y | 2y | ||
------------------------------- | |||
5=0; | 5=0; | ||
FALSE | FALSE | ||
------------------------------- | |||
Moreover this throws an error | |||
Use R::=Z/(5); | Use R::=Z/(5); | ||
=== Answer === | === Answer === | ||
Type(5); | Type(5); |
Revision as of 14:41, 29 November 2005
Modular Numbers
Question
What's wrong in this?
Use R::=Z/(5)[x]; 5x+2y; 2y
5=0; FALSE
Moreover this throws an error
Use R::=Z/(5);
Answer
Type(5);
INT
5 e' un intero, e gli interi non dipendono dall'anello corrente (puoi immaginarti cosa succederebbe a un ciclo For?)
per vedere 5 come modulare devi fare:
5 % 5;
0 % 5
(analogo al C) oppure immergerlo nell'anello di polinomi
Use R::=Z/(5)[x]; Poly(5);
0