Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Is there a command in SAGE which is equivalent to GAP's "shallowcopy" ?

Dear SAGE forum,

I'd like to ask the following question:

Is there an equivalent in SAGE of GAP's "shallowcopy" ?

I'd like to associate to two times the same group two different character tables.

In GAP it is possible to do it as follows:

G:=AlternatingGroup(5);
H:=ShallowCopy(G);
ct_G:=CharacterTable(G);

and to then construct a different character table for H.

When I try to do this in SAGE, I always get the error message that G (!) already has a character table, although I wanted to assign a different (as far as the ordering of the rows and columns are concerned) character table to H (!)

I would be grateful for any help.

Thanks in advance.

Is there a command in SAGE which is equivalent to GAP's "shallowcopy" ?

Dear SAGE forum,

I'd like to ask the following question:

Is there an equivalent in SAGE of GAP's "shallowcopy" ?

I'd like to associate to two times the same group two different character tables.

In GAP it is possible to do it as follows:

G:=AlternatingGroup(5);
H:=ShallowCopy(G);
ct_G:=CharacterTable(G);

and to then construct a different character table for H.

When I try to do this in SAGE, I always get the error message that G (!) already has a character table, although I wanted to assign a different (as far as the ordering of the rows and columns are concerned) character table to H (!)

I would be grateful for any help.

Thanks in advance.

Is there a command in SAGE which is equivalent to GAP's "shallowcopy" "ShallowCopy" ?

Dear SAGE forum,

I'd like to ask the following question:

Is there an equivalent in SAGE of GAP's "shallowcopy" ?

I'd like to associate to two times the same group two different character tables.

In GAP it is possible to do it as follows:

G:=AlternatingGroup(5);
H:=ShallowCopy(G);
ct_G:=CharacterTable(G);

and to then construct a different character table for H.

When I try to do this in SAGE, I always get the error message that G (!) already has a character table, although I wanted to assign a different (as far as the ordering of the rows and columns are concerned) character table to H (!)

EDIT (20.11.2019):

Here is part of my sage code:

HHHH=gap.Image(iso)
GGGG=gap.ShallowCopy(gap.Image(iso))

# Hier Einschub: CTBL wie in CTBLLib (falls vorhanden) wird nun gemacht:
gap.LoadPackage('"ctbllib"')

def CTBL_Breuer_fert(X):
  StrDescr = gap.StructureDescription(X)
  if gap.IsString(gap.StructureDescription(X)):
    StrDescr = gap.StructureDescription(X)
    CTBL_Breuer = gap.CharacterTable(StrDescr)
    CTBL_Breuer_fertig = gap.CharacterTableWithStoredGroup(X,CTBL_Breuer)
  else:
    CTBL_Breuer_fertig = gap.CharacterTable(X)
  return(CTBL_Breuer_fertig)


CTBL_Breuer_fertig = CTBL_Breuer_fert(HHHH)


# Hier Ende des Einschubs


ccl = [gap.ConjugacyClass(GGGG,x) for x in MAGMA_ccls_GG_for_GAP]

gap.SetConjugacyClasses(GGGG,ccl)
gap.SetUnderlyingGroup(tbl,GGGG)
gap.SetConjugacyClasses(tbl,ccl)
bij=[1..len(ccl)]

MyRecordFile = open("GAP_Record.txt",'w')
print >> MyRecordFile, "bij:=",
print >> MyRecordFile, bij,
print >> MyRecordFile, ";"
print >> MyRecordFile, "myrecfunct:=function()"
print >> MyRecordFile, "local RECOR;"
print >> MyRecordFile, "RECOR:=rec(bijection:=bij);"
print >> MyRecordFile, "return RECOR;"
print >> MyRecordFile, "end;"
MyRecordFile.close()

gap.Read('"GAP_Record.txt"')
recor=gap.myrecfunct()
gap.CompatibleConjugacyClasses(GGGG,ccl,tbl,recor)
CTBL=gap.CharacterTableWithStoredGroup(GGGG,tbl,recor)

After this last line (with CTBL=...) the error occurs. When I delete the lines between "# Hier Einschub..." and "# Hier Ende des Einschubs ", then the code works.

I would be grateful for any help.

Thanks in advance.

click to hide/show revision 4
retagged

Is there a command in SAGE which is equivalent to GAP's "ShallowCopy" ?

Dear SAGE forum,

I'd like to ask the following question:

Is there an equivalent in SAGE of GAP's "shallowcopy" ?

I'd like to associate to two times the same group two different character tables.

In GAP it is possible to do it as follows:

G:=AlternatingGroup(5);
H:=ShallowCopy(G);
ct_G:=CharacterTable(G);

and to then construct a different character table for H.

When I try to do this in SAGE, I always get the error message that G (!) already has a character table, although I wanted to assign a different (as far as the ordering of the rows and columns are concerned) character table to H (!)

EDIT (20.11.2019):

Here is part of my sage code:

HHHH=gap.Image(iso)
GGGG=gap.ShallowCopy(gap.Image(iso))

# Hier Einschub: CTBL wie in CTBLLib (falls vorhanden) wird nun gemacht:
gap.LoadPackage('"ctbllib"')

def CTBL_Breuer_fert(X):
  StrDescr = gap.StructureDescription(X)
  if gap.IsString(gap.StructureDescription(X)):
    StrDescr = gap.StructureDescription(X)
    CTBL_Breuer = gap.CharacterTable(StrDescr)
    CTBL_Breuer_fertig = gap.CharacterTableWithStoredGroup(X,CTBL_Breuer)
  else:
    CTBL_Breuer_fertig = gap.CharacterTable(X)
  return(CTBL_Breuer_fertig)


CTBL_Breuer_fertig = CTBL_Breuer_fert(HHHH)


# Hier Ende des Einschubs


ccl = [gap.ConjugacyClass(GGGG,x) for x in MAGMA_ccls_GG_for_GAP]

gap.SetConjugacyClasses(GGGG,ccl)
gap.SetUnderlyingGroup(tbl,GGGG)
gap.SetConjugacyClasses(tbl,ccl)
bij=[1..len(ccl)]

MyRecordFile = open("GAP_Record.txt",'w')
print >> MyRecordFile, "bij:=",
print >> MyRecordFile, bij,
print >> MyRecordFile, ";"
print >> MyRecordFile, "myrecfunct:=function()"
print >> MyRecordFile, "local RECOR;"
print >> MyRecordFile, "RECOR:=rec(bijection:=bij);"
print >> MyRecordFile, "return RECOR;"
print >> MyRecordFile, "end;"
MyRecordFile.close()

gap.Read('"GAP_Record.txt"')
recor=gap.myrecfunct()
gap.CompatibleConjugacyClasses(GGGG,ccl,tbl,recor)
CTBL=gap.CharacterTableWithStoredGroup(GGGG,tbl,recor)

After this last line (with CTBL=...) the error occurs. When I delete the lines between "# Hier Einschub..." and "# Hier Ende des Einschubs ", then the code works.

I would be grateful for any help.

Thanks in advance.