‣ ExploreGroup ( group[, options] ) | ( function ) |
Returns: one of two things, documented below
If evaluated in a Jupyter Notebook, the result of this function, when rendered by that notebook, will run JavaScript code that imports into the output cell an instance of a page from the Group Explorer 3 web app for visualizing groups (using an iframe
). How the group is displayed depends on the value of the second parameter, as documented below.
If evaluated in the GAP REPL, this function will open a new tab or window in the user's default browser, showing the page from the Group Explorer 3 web app described above.
Note that there are convenience functions defined below that call this one; the user can choose which style is their preference.
The group
parameter should be a GAP group object.
The options
parameter is optional. If present, it should be a GAP record with the following attributes, each of which is optional.
tool
- a tool from among the three supported by Group Explorer: multiplication tables, Cayley graphs, and cycle graphs. This parameter is a string, and it can be any string equal to one of those three tool names, with case and spacing ignored. For example, "mult" or "cayley" or "cycle" are acceptable values. If this option is not provided, it defaults to Cayley graph.
representations
- a list of lists of strings. If we call the value of this parameter V
then each entry V[i]
is a representation for the group, by which we mean that for every j
in [1..Size(group)]
, V[i][j]
is a string representation of the group element Elements(group)[j]
.
Alternately, if one would like to use a function to compute these representations, simply replace the list of lists with a GAP function, and this routine will create a single representation by evaluating that function on each element of the group. For example, you can use rec(representations:=PrintString)
. The default representation, if this is not provided, is that Elements(group)[j]
is represented as j
.
Each element name can be MathML code, and it will be rendered as such. If it is not valid XML, it will be treated instead as plain text and rendered as such.
name
- a string to be used as the name of the group, in the header of the page to be displayed. If not provided, it defaults to ViewString(group)
.
This, too, can be MathML code, and it will be rendered as such. If it is not valid XML, it will be treated instead as plain text and rendered as such.
subset
- a subset or subgroup of group
(as a GAP list, set, or Subgroup
object) to be highlighted in the resulting visualization
element
- an element of group
, to be highlighted in the resulting visualization. This is simply a shortcut for subset := [ element ]
.
orbit
- an element of group
, whose orbit should be highlighted in the resulting visualization. This is simply a shortcut highlighting the element itself in one color and the rest of its orbit in another color, using a partition of a subset of the group under the hood.
partition
- this can have several types of values, but in each case it makes the visualization highlight each part of the partition with a different color. The types of values this can have, each with its associated meaning, follow. Note that this need not be a partition of the entire group; it may be a partition of a subset of the group.
If partition
is a list of lists of elements of group
, then it is already a partition of (a portion of) group
and will be respected.
If partition
is a subgroup of group
, then it will be converted into a partition by invoking GAP's CosetDecomposition
function.
If partition
is an equivalence relation (that is, it passes GAP's IsEquivalenceRelation
test) then it will be converted into a partition by applying GAP's EquivalenceRelationPartition
function. No check is done to ensure the domain of the relation is a subset of group
; the caller should ensure this.
normalizer
- a subgroup of group
, this option highlights the normalizer of the given subgroup, giving each coset of the given subgroup (that lies within the normalizer) a different color.
arrows
- this option pertains only when the type of visualization to display is a Cayley graph. In that case, this option specifies exactly which elements of the group are to be represented by arrows among group elements. If this is not specified, Group Explorer chooses a minimal set sufficient to connect the diagram. This option is irrelevant for cycle graphs and multiplication tables. When provided, it should be a list of group elements. It is possible to specify too few elements, so that the resulting diagram is disconnected. It is also possible to specify so many elements that the resulting diagram is too cluttered to see anything clearly.
elements
- this option pertains only when the type of visualization to display is a multiplication table. In that case, this option specifies the order in which the group's elements appear across the top row and down the left column of the table. This list must include all elements of the group, and must begin with the identity.
organize
- this option pertains only when the type of visualization to display is a multiplication table. In that case, its value must be a subgroup, and it will order the list of elements on the top row and left column of the table to begin with that subgroup and then be followed by its cosets. This option will override elements
, so do not bother to specify both.
Other options may be added here later.
This routine works by delegating to the CreateVisualization
function in the JupyterViz package, asking it to invoke the visualization scripts in viz-tool-group-explorer.js
, installed by this package.
‣ ExploreGroupHomomorphism ( homomorphism[, options] ) | ( function ) |
Returns: one of two things, documented below
If evaluated in a Jupyter Notebook, the result of this function, when rendered by that notebook, will run JavaScript code that imports into the output cell an instance of a page from the Group Explorer 3 web app for visualizing group homomorphisms (using an iframe
). How the homomorphism is displayed depends on the value of the second parameter, as documented below.
If evaluated in the GAP REPL, this function will open a new tab or window in the user's default browser, showing the page from the Group Explorer 3 web app described above.
Throughout the rest of the documentation below, I will use the term "domain" to refer to what GAP calls the Source
of the homomorphism and the term "codomain" to refer to what GAP calls the Range
of the homomorphism.
The homomorphism
parameter should be a GAP group homomorphism, created by a function like GroupHomomorphismByFunction
, for example.
The options
parameter is optional. If present, it should be a GAP record with the following attributes, each of which is optional.
homname
- the name to use for the homomorphism in the resulting visualization. Must be a string if provided, and defaults to the string "f" if not provided.
tool1
- functions exactly like the tool
parameter from ExploreGroup
(3.1-1), but applies only to the domain group of the given homomorphism.
tool2
- functions exactly like the tool
parameter from ExploreGroup
(3.1-1), but applies only to the codomain group of the given homomorphism.
representations
- functions exactly like the representations
parameter from ExploreGroup
(3.1-1), but applies only to the domain group of the given homomorphism.
representations2
- functions exactly like the representations
parameter from ExploreGroup
(3.1-1), but applies only to the codomain group of the given homomorphism.
name
- functions exactly like the name
parameter from ExploreGroup
(3.1-1), but applies only to the domain group of the given homomorphism.
name2
- functions exactly like the name
parameter from ExploreGroup
(3.1-1), but applies only to the codomain group of the given homomorphism.
subset
- functions exactly like the subset
parameter from ExploreGroup
(3.1-1), but applies in two ways. First, it highlights the subset in the domain of the group homomorphism. Then it also highlights the image of that subset in the codomain of the group homomorphism. However, if the collection you pass is a subset of the codomain and not the domain, or is a Subgroup
object whose parent is the codomain, then the subset will be highlighted in the codomain and its preimage highlighted in the domain.
element
- functions exactly like the element
parameter from ExploreGroup
(3.1-1), but applies only to the domain group of the given homomorphism.
element2
- functions exactly like the element2
parameter from ExploreGroup
(3.1-1), but applies only to the codomain group of the given homomorphism.
orbit
- functions exactly like the orbit
parameter from ExploreGroup
(3.1-1), but applies only to the domain group of the given homomorphism.
orbit2
- functions exactly like the orbit2
parameter from ExploreGroup
(3.1-1), but applies only to the codomain group of the given homomorphism.
partition
- functions exactly like the partition
parameter from ExploreGroup
(3.1-1), but applies only to the domain of the group homomorphism. It will not be pushed through the homomorphism, because there is no well-defined codomain partition to be created by such a procedure.
partition2
- functions exactly like the partition
parameter from ExploreGroup
(3.1-1), but applies only to the codomain of the group homomorphism. If no partition of the domain is provided, this will be converted to a permutation of the domain as well by computing pre-images of each part of the partition.
normalizer2
- functions exactly like the normalizer2
parameter from ExploreGroup
(3.1-1), but applies only to the codomain group of the given homomorphism.
elements
- functions exactly like the elements
parameter from ExploreGroup
(3.1-1), but applies only to the domain group of the given homomorphism. As in the ExploreGroup
(3.1-1) case, this is irrelevant unless the codomain group is being displayed using a multiplication table.
elements2
- functions exactly like the elements2
parameter from ExploreGroup
(3.1-1), but applies only to the codomain group of the given homomorphism. As in the ExploreGroup
(3.1-1) case, this is irrelevant unless the codomain group is being displayed using a multiplication table.
organize
- functions exactly like the organize
parameter from ExploreGroup
(3.1-1), but applies only to the domain group of the given homomorphism. As in the ExploreGroup
(3.1-1) case, this is irrelevant unless the codomain group is being displayed using a multiplication table.
organize2
- functions exactly like the organize2
parameter from ExploreGroup
(3.1-1), but applies only to the codomain group of the given homomorphism. As in the ExploreGroup
(3.1-1) case, this is irrelevant unless the codomain group is being displayed using a multiplication table.
arrows
- functions exactly like the arrows
parameter from ExploreGroup
(3.1-1), but applies only to the domain group of the given homomorphism. As in the ExploreGroup
(3.1-1) case, this is irrelevant unless the domain group is being displayed using a Cayley graph.
arrows2
- functions exactly like the arrows
parameter from ExploreGroup
(3.1-1), but applies only to the codomain group of the given homomorphism. As in the ExploreGroup
(3.1-1) case, this is irrelevant unless the codomain group is being displayed using a Cayley graph.
Other options may be added here later.
This routine works by delegating to the CreateVisualization
function in the JupyterViz package, asking it to invoke the visualization scripts in viz-tool-group-explorer.js
, installed by this package.
‣ ExploreMultiplicationTable ( group[, options] ) | ( function ) |
Returns: one of two things, as in ExploreGroup
(3.1-1)
This is a convenience function that invokes ExploreGroup
(3.1-1), passing the appropriate tool option to ensure that the resulting visualization is a multiplication table.
‣ ExploreCayleyDiagram ( group[, options] ) | ( function ) |
Returns: one of two things, as in ExploreGroup
(3.1-1)
This is a convenience function that invokes ExploreGroup
(3.1-1), passing the appropriate tool option to ensure that the resulting visualization is a Cayley graph.
This package also defines the synonym ExploreCayleyGraph
for this function, because there are two common terms for the same concept.
‣ ExploreCycleDiagram ( group[, options] ) | ( function ) |
Returns: one of two things, as in ExploreGroup
(3.1-1)
This is a convenience function that invokes ExploreGroup
(3.1-1), passing the appropriate tool option to ensure that the resulting visualization is a cycle graph.
This package also defines the synonym ExploreCycleGraph
for this function, because there are two common terms for the same concept.
Clients of this package should not need to call functions in this section; they are used internally by the package, and are documented for the sake of completeness, and for anyone who maintains the package in the future.
‣ GPEX_MakeMultTable ( group ) | ( function ) |
Returns: a list of lists of natural numbers, representing the group as a multiplication table
This function internally converts any group into the format just described, which is convertible into JSON for passing to Group Explorer. This way, regardless of whether the group in question exists in Group Explorer's library, or what name it is stored under, the correct group structure is communicated.
The user of this package should not need to call this function. It is used internally by ExploreGroup
(3.1-1) to create the JSON data it passes to Group Explorer for visualization.
‣ GPEX_SubsetIndices ( subset, group ) | ( function ) |
Returns: a list of natural numbers
This function internally converts any subset of a group into a list of indices into its parent group. The indices will match those used by GPEX_MakeMultTable
(3.2-1), so that if the list is passed to Group Explorer, it can be interpreted as the correct subset by Group Explorer.
The user of this package should not need to call this function. It is used internally by ExploreGroup
(3.1-1) to create the JSON data it passes to Group Explorer for visualization, in the case when a subset is indicated as one of the options passed to that function.
‣ GPEX_PartitionIndexLists ( partition, group ) | ( function ) |
Returns: a list of lists of natural numbers
This function internally converts any partition of a group into a list of lists of indices into the group. The indices will match those used by GPEX_MakeMultTable
(3.2-1), so that if the return value is passed to Group Explorer, it can be interpreted as a partition of the group by Group Explorer.
The user of this package should not need to call this function. It is used internally by ExploreGroup
(3.1-1) to create the JSON data it passes to Group Explorer for visualization, in the case when a partition is indicated as one of the options passed to that function.
generated by GAPDoc2HTML