CoCoA:Using

From ApCoCoAWiki
Revision as of 10:02, 24 October 2007 by XMLBot (talk | contribs) (pushing XML rev. 1.46, again)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Using

perform commands in non-active ring

Description

Suppose S is the current ring and R is another ring, then

<verbatim>

 Using R Do
   C;
 EndUsing;

</verbatim> is equivalent to <verbatim>

 Use R;
 C;
 Use S;

</verbatim>

Example

  Use S ::= Q[x,y];          -- the current ring is S
  R ::= Q[a,b,c];            -- another ring
  Using R Do Indets(); EndUsing;
[a, b, c]
-------------------------------

Note: Using Q[a,b] Do ... EndUsing; will produce an error: you need to name the polynomial ring.

Syntax

Using R Do C EndUsing

where R is the identifier for a ring and C is a sequence of commands.

Accessing Other Rings

Use

   <type>ring</type>