Skip to content

Instantly share code, notes, and snippets.

View olexandr-konovalov's full-sized avatar
🦋
git status

Olexandr Konovalov olexandr-konovalov

🦋
git status
View GitHub Profile
@olexandr-konovalov
olexandr-konovalov / extract_examples.g
Created September 8, 2014 14:37
GAP script to extract examples from GAPDoc-based package manuals.
###########################################################################
##
## 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).
@olexandr-konovalov
olexandr-konovalov / homophony.g
Last active December 16, 2015 04:48
Homophonic quotients of free groups
# 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);
@olexandr-konovalov
olexandr-konovalov / colordemo.g
Last active August 29, 2015 14:18
Demonstration mode for GAP with coloured input and output.
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
@olexandr-konovalov
olexandr-konovalov / GAP.INI
Last active November 21, 2015 00:18
GAP syntax highlight for PSPad
;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
@olexandr-konovalov
olexandr-konovalov / gap.plist
Created November 21, 2015 00:22
GAP syntax highlighting for Smultron
<?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>
@olexandr-konovalov
olexandr-konovalov / quine.g
Created January 18, 2016 21:25
Quine: a GAP program that prints itself
s := [ "Print(\"s := \", s, \";; \");", "for t in s do Print(t); od;" ];;Print("s := ", s, ";;" );for t in s do Print(t); od;
@olexandr-konovalov
olexandr-konovalov / ace_examle_colin
Created June 15, 2017 09:33
input for ace program from the GAP package ACE
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;
@olexandr-konovalov
olexandr-konovalov / jupyter.md
Last active May 23, 2018 09:04
Collection of Jupyter-related links
@olexandr-konovalov
olexandr-konovalov / groupordering.g
Created October 22, 2018 23:01
Ordering of finite groups by the sum of orders of their elements
# 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