[GAP Forum] A plain set of objects

Levie Bicua lee_bkua at yahoo.com
Tue Feb 24 07:35:40 GMT 2009


Dear forum,
I'm wondering if there is a more efficient way of defining in GAP a simple set of objects without necessarily using the quotation marks for each element of the set. For example I want to define/write in GAP the set S1={ P, Q, RPR, RQPQPQR, RQPRPQR, RQRPRQR, RQRQRQR }. 
 
gap> S1:={P,Q,RPR,RQPQPQR,RQPRPQR,RQRPRQR,RQRQRQR};
Syntax error: literal expected
S1:={P,Q,RPR,RQPQPQR,RQPRPQR,RQRPRQR,RQRQRQR};
^
gap> S1:=["P","Q","RPR","RQPQPQR","RQPRPQR","RQRPRQR","RQRQRQR"];
[ "P", "Q", "RPR", "RQPQPQR", "RQPRPQR", "RQRPRQR", "RQRQRQR" ].
 
Enclosing each element by a quotation mark requires much time especially for a large set. any help? thanks.
 
Levi
 


      


More information about the Forum mailing list