Skip to content

Instantly share code, notes, and snippets.

Avatar
🦋
git status

Alexander Konovalov alex-konovalov

🦋
git status
View GitHub Profile
@alex-konovalov
alex-konovalov / groupordering.g
Created Oct 22, 2018
Ordering of finite groups by the sum of orders of their elements
View groupordering.g
# Code for https://math.stackexchange.com/q/2933753/
TestOneOrder:=function(n)
# find the smallest example among the groups of order n
local s,i,m,d,x;
# Calculate lists of sums of element orders.
# Avoid using AllSmallGroups(n) which potentially may be very large
s := List([1..NrSmallGroups(n)],i->Sum(List(SmallGroup(n,i),Order)));
if Length(Set(s))=NrSmallGroups(n) then
# Sum of element orders uniquely defines each group
@alex-konovalov
alex-konovalov / jupyter.md
Last active May 23, 2018
Collection of Jupyter-related links
@alex-konovalov
alex-konovalov / ace_examle_colin
Created Jun 15, 2017
input for ace program from the GAP package ACE
View ace_examle_colin
wo: 500000000;
Group Name: U_3(5);
Group Generators: xy;
Group Relators: x^2=(xy)^10, xy^-2xy^2x(yxy^-2xyxy)^2, (x,y^2)^4=y^5;
Subgroup Name: H;
Subgroup Generators: ;
hard;
beg;
@alex-konovalov
alex-konovalov / quine.g
Created Jan 18, 2016
Quine: a GAP program that prints itself
View quine.g
s := [ "Print(\"s := \", s, \";; \");", "for t in s do Print(t); od;" ];;Print("s := ", s, ";;" );for t in s do Print(t); od;
@alex-konovalov
alex-konovalov / gap.plist
Created Nov 21, 2015
GAP syntax highlighting for Smultron
View gap.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>beginCommand</key>
<string></string>
<key>endCommand</key>
<string></string>
<key>beginInstruction</key>
<string></string>
@alex-konovalov
alex-konovalov / GAP.INI
Last active Nov 21, 2015
GAP syntax highlight for PSPad
View GAP.INI
;PSPad user HighLighter definition file by Alexander Konovalov, 2011
;This is my GAP.INI for PSPad (http://www.pspad.com/). To install it,
;find where the GAP.INI file is located in your PsPAD installation
;(likely in the 'Syntax' subdirectory) and replace it by this file.
;Make a backup copy of the old GAP.INI in case you'd like to revert it.
[Settings]
Name=GAP
HTMLGroup=0
FileType=.gi,.gd,.g
CommentString=2
@alex-konovalov
alex-konovalov / colordemo.g
Last active Aug 29, 2015
Demonstration mode for GAP with coloured input and output.
View colordemo.g
ColorDemo := function( file )
#
# This function provides a demonstration mode for GAP. To run a demo,
# read this function GAP and call it as
#
# ColorDemo("demofile.g");
#
# where "demofile.g" is the name of your input file. The input file
# should contain only GAP input (no GAP prompts and no output). If
# you can run the input file by reading it into GAP or pasting it
@alex-konovalov
alex-konovalov / homophony.g
Last active Dec 16, 2015
Homophonic quotients of free groups
View homophony.g
# This file contains the GAP input needed to verify the result of the paper
# Mestre, Jean-François; Schoof, René; Washington, Lawrence; Zagier, Don
# Quotients homophones des groupes libres. (French) [Homophonic quotients of
# free groups] Experiment. Math. 2 (1993), no. 3, 153--155
# (http://eudml.org/doc/233741) with respect to the English language.
F:=FreeGroup("a","b","c","d","e","f","g","h","i","j","k","l","m",
"n","o","p","q","r","s","t","u","v","w","x","y","z");
AssignGeneratorVariables(F);
@alex-konovalov
alex-konovalov / extract_examples.g
Created Sep 8, 2014
GAP script to extract examples from GAPDoc-based package manuals.
View extract_examples.g
###########################################################################
##
## extract_examples.g Alexander Konovalov
##
###########################################################################
# This GAP script extracts examples from package manuals in GAPDoc format
# (http://www.math.rwth-aachen.de/~Frank.Luebeck/GAPDoc/). The output will
# be stored in the 'tst' directory of the package in files 'pkgnameXX.tst'
# (one file per chapter for each chapter that contains examples).