CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In

Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.

| Download

GAP 4.8.9 installation with standard packages -- copy to your CoCalc project to get it

Views: 418346
#############################################################################
####
##
#W  doGrp.g             ACE Research Example                      Greg Gamble
##
##  Provides  a  generic  way  of  trying  some  easy  applications  of   the
##  pgrelfind.g functions.
##
#Y  Copyright (C) 2001  Centre for Discrete Mathematics and Computing
#Y                      Department of Computer Science & Electrical Eng.
#Y                      University of Queensland, Australia.
##

ACEResExample := rec(filename := "doGrp.g", print := false);
if IsBound(IsACEResExampleOK) and IsACEResExampleOK() then
  Print(
    "# IsACEResExampleOK() sets ACEResExample.grp     from options grp, n\n",
    "#                          ACEResExample.newgens from option  newgens\n");
  if ACEResExample.newgens <> fail then
    ACEResExample.G :=
        ACE_PRINT_AND_EVAL(
            "ACEResExample.G",
            JoinStringsWithSeparator(
                     ["TranslatePresentation([a, b],",
                      "ACEResExample.grp.rels,",
                      "ACEResExample.grp.sgens,",
                      "ACEResExample.newgens)"],
                     "\n                                              ")
            );
    ACEResExample.Gn :=
        ACE_PRINT_AND_EVAL(
            "ACEResExample.Gn",
            JoinStringsWithSeparator(
                     ["PGRelFind(ACEResExample.G.fgens,",
                      "ACEResExample.G.rels,",
                      "ACEResExample.G.sgens)"],
                     "\n                                   ")
            );
  else
    ACEResExample.G :=
        ACE_PRINT_AND_EVAL(
            "ACEResExample.G",
            JoinStringsWithSeparator(
                     ["PGRelFind([a, b],",
                      "ACEResExample.grp.rels,",
                      "ACEResExample.grp.sgens)"],
                     "\n                                  ")
            );
  fi;
elif ACEResExample.print then
## Begin
# IsACEResExampleOK() sets ACEResExample.grp     from options grp, n
#                          ACEResExample.newgens from option  newgens
if ACEResExample.newgens <> fail then
  ACEResExample.G := TranslatePresentation([a, b],
                                           ACEResExample.grp.rels,
                                           ACEResExample.grp.sgens,
                                           ACEResExample.newgens);
  ACEResExample.Gn := PGRelFind(ACEResExample.G.fgens,
                                ACEResExample.G.rels,
                                ACEResExample.G.sgens);
else
  ACEResExample.G := PGRelFind([a, b],
                               ACEResExample.grp.rels,
                               ACEResExample.grp.sgens);
fi;
## End
elif not IsBound(IsACEResExampleOK) then
  Print("Error, ACEReadResearchExample: functions and variables undefined.\n",
        "Please type: 'ACEReadResearchExample();'\n",
        "and try again.\n");
fi;

#E  doGrp.g . . . . . . . . . . . . . . . . . . . . . . . . . . . . ends here