Permalink
Browse files

Provide a bit more context

  • Loading branch information...
johnkerl committed Oct 1, 2012
1 parent 5abbef5 commit b4ed6b9b6a8614c1b60bae79739ac24ae5ba1d8c
Showing with 86 additions and 26 deletions.
  1. +2 −0 T_gm.py
  2. +3 −2 T_tm.py
  3. +2 −0 anc_gm.py
  4. +2 −0 ani_gm.py
  5. +2 −0 cgpalg_dense_tm.py
  6. +2 −0 cgpalg_tm.py
  7. +2 −2 cl2_tm.py
  8. +4 −4 cl2m_tm.py
  9. +2 −3 dih_tm.py
  10. +2 −0 dn_gm.py
  11. +2 −0 f2poly_tm.py
  12. +4 −0 f2polymod_tm.py
  13. +2 −3 genquat_tm.py
  14. +2 −0 gint_tm.py
  15. +6 −2 ispec_tm.py
  16. +2 −0 metacyc_gm.py
  17. +3 −2 metacyc_tm.py
  18. +2 −0 mod_tm.py
  19. +2 −0 modadd_gm.py
  20. +2 −0 modadd_tm.py
  21. +3 −0 modmul_gm.py
  22. +3 −0 modmul_tm.py
  23. +2 −0 pauli_gm.py
  24. +2 −0 pauli_tm.py
  25. +3 −3 pmtc_tm.py
  26. +2 −2 pmti_tm.py
  27. +2 −0 qn_gm.py
  28. +2 −0 quatu_gm.py
  29. +2 −0 quatu_tm.py
  30. +2 −0 snc_gm.py
  31. +2 −0 sni_gm.py
  32. +5 −3 spec_tm.py
  33. +3 −0 v4_gm.py
  34. +3 −0 v4_tm.py
View
@@ -8,6 +8,8 @@
# 2007-05-31
# ================================================================
+# Group module for the T group.
+
import T_tm
def get_elements_str(params_string):
View
@@ -10,8 +10,9 @@
import re
-# The T group (the third nonabelian group of order 12, other than A4 and D6)
-# may be thought of as Z3 semidirect Z4, where Z4 acts on Z3 by inversion.
+# Type module for the T group (the third nonabelian group of order 12, other
+# than A4 and D6). It may be thought of as Z3 semidirect Z4, where Z4 acts on
+# Z3 by inversion.
#
# (ai, aj)(bi, bj) = (ai aj(bi), aj bj)
#
View
@@ -8,6 +8,8 @@
# 2007-05-31
# ================================================================
+# Group module for alternating permutations A_n, using cycle-decomposition I/O.
+
import pmtc_tm
import sackint
View
@@ -8,6 +8,8 @@
# 2007-05-31
# ================================================================
+# Group module for alternating permutations A_n, using image-map I/O.
+
import pmti_tm
import sackint
View
@@ -13,6 +13,8 @@
import copy
# ================================================================
+# Type module for complex group algebras CG, with dense storage.
+#
# Initial attempt at complex group algebras CG for small finite groups G. This
# could, conceivably, be generalized to FG (for arbitrary user-specified
# fields) or RG (for arbitrary user-specified rings).
View
@@ -13,6 +13,8 @@
import copy
# ================================================================
+# Type module for complex group algebras CG, with sparse storage.
+#
# Initial attempt at complex group algebras CG for small finite groups G. This
# could, conceivably, be generalized to FG (for arbitrary user-specified
# fields) or RG (for arbitrary user-specified rings).
View
@@ -9,9 +9,9 @@
# ================================================================
import re
-import copy # xxx temp
+import copy
-# The Clifford group with (hard-coded) Simon's quadratic form.
+# Type module for the Clifford group with (hard-coded) Simon's quadratic form.
# See Simon's text.
#
# alpha eA beta eB = alpha beta chi(A, B) e{A xor B}.
View
@@ -9,16 +9,16 @@
# ================================================================
import re
-import copy # xxx temp
+import copy
-# The Clifford group with (hard-coded) negative of Simon's quadratic form.
-# See Simon's text.
+# Type module for the Clifford group with (hard-coded) negative of Simon's
+# quadratic form. See Simon's text.
#
# alpha eA beta eB = alpha beta chi(A, B) e{A xor B}.
# But also with ei^2 = -1.
# A and B are multi-indices; alpha and beta are signs.
#
-# Explanaiton of chi(A, B) is by example:
+# Explanation of chi(A, B) is by example:
#
# * a = e2 e3 e6 e7; b = e1 e3 e5 e6.
# * a*b = e2 e3 e6 e7 | e1 e3 e5 e6. Then sort:
View
@@ -8,12 +8,11 @@
# 2007-05-31
# ================================================================
+# Type module for the dihedral group on n vertices.
+
import re
class dih_t:
- #rot = 0
- #flip = 0
- #n = 0
def __init__(self, argrot, argflip, argn):
self.n = argn
View
@@ -8,6 +8,8 @@
# 2007-05-31
# ================================================================
+# Group module for the dihedral group on n vertices.
+
import dih_tm
def get_elements_str(params_string):
View
@@ -8,6 +8,8 @@
# 2008-11-14
# ================================================================
+# Type module for F2[x]: polynomials with coefficients in the finite field F2.
+
import sys
import re
import copy
View
@@ -8,6 +8,10 @@
# 2008-11-14
# ================================================================
+# Type module for R=F2[x]/<f(x)>. F2[x] is polynomials with coefficients in
+# the finite field F2. If f is irreducible then R is a finite field of
+# order 2^n where n = deg(f).
+
import sys
import re
import copy
View
@@ -8,6 +8,8 @@
# 2007-05-31
# ================================================================
+# Type module for generalized quaternions.
+
# Presentation:
# < a, b | a^2n = 1, b^2 = a^n, ab = ba^-1 >
#
@@ -47,9 +49,6 @@
import re
class genquat_t:
- #i = 0
- #j = 0
- #n = 0
def __init__(self, argi, argj, argn):
argi %= argn + argn;
View
@@ -8,6 +8,8 @@
# 2007-05-31
# ================================================================
+# Type module for Gaussian integers (m+ni for integer m,n).
+
import re
import copy
View
@@ -8,6 +8,9 @@
# 2007-05-31
# ================================================================
+# Type module for an arbitrary user-defined group which is specified entirely
+# by its Cayley table.
+
import re
import copy
import ispec_tbl
@@ -65,8 +68,9 @@ def install_table(table):
n = len(table)
# Populate the inv table.
- # I am being crass here. I'm assuming the Cayley table is good before I start.
- # The good news is that the is-group functions don't use the inv table.
+ # I am being crass here. I'm assuming the Cayley table is good before I
+ # start. The good news is that the is-group functions don't use the inv
+ # table.
G = []
for i in range(0, n):
G.append(ispec_t(i))
View
@@ -8,6 +8,8 @@
# 2007-05-31
# ================================================================
+# Group module for the dihedral group parameterized by m and n.
+
import metacyc_tm
def get_elements_str(params_string):
View
@@ -8,6 +8,8 @@
# 2007-05-31
# ================================================================
+# Type module for the metacyclic group parameterized by m and n.
+
import re
import sackint
@@ -88,7 +90,6 @@
# ----------------------------------------------------------------
-
# ================================================================
# Auxiliary function:
# Second component of return value is t.
@@ -110,7 +111,7 @@ def __init__(self, i, j, p, q, t):
print "Got p =", p, "q =", q, "t =", t
raise RuntimeError
- # xxx jrk 2006-11-28 allow trivial homomorphisms.
+ # xxx jrk 2006-11-28: allow trivial homomorphisms.
#if ((t % p) == 1):
# print "metacyc: t must not be 1 mod p"
# print "Got p =", p, "q =", q, "t =", t
View
@@ -8,6 +8,8 @@
# 2007-05-31
# ================================================================
+# Type module for the ring of integers mod n.
+
import sys
import re
import copy
View
@@ -8,6 +8,8 @@
# 2007-05-31
# ================================================================
+# Group module for the group of integers mod n with addition.
+
import modadd_tm
def get_elements_str_aux(mod_array):
View
@@ -8,6 +8,8 @@
# 2007-05-31
# ================================================================
+# Type module for the group of integers mod n with addition.
+
import sys
import re
import copy
View
@@ -12,6 +12,9 @@
import modadd_gm
import sackint
+# Type module for the group of integers relatively prime to n, with
+# multiplication. Or, direct product of several such.
+
# ----------------------------------------------------------------
# Example:
# Mods = 4,5
View
@@ -8,6 +8,9 @@
# 2007-05-31
# ================================================================
+# Type module for the group of integers relatively prime to n, with
+# multiplication.
+
import re
import copy
View
@@ -8,6 +8,8 @@
# 2007-05-31
# ================================================================
+# Group module for the Pauli matrices.
+
import pauli_tm
import sackgrp
View
@@ -8,6 +8,8 @@
# 2007-05-31
# ================================================================
+# Type module for the group of Pauli matrices.
+
import re
# sigmax = 0 1
View
@@ -7,9 +7,9 @@
# kerl.john.r@gmail.com
# 2007-05-31
# ================================================================
-#
-# Permutations with cycle-decomposition I/O.
-#
+
+# Type module for permutations with cycle-decomposition I/O.
+
# Python arrays are zero-up. Permutations are almost universally taken
# to be on the set {1, 2, 3, ..., n}. So, elements[0] is always 0;
# elements[1] through elements[n] are images.
View
@@ -8,14 +8,14 @@
# 2007-05-31
# ================================================================
+# Type module for permutations with image-map I/O.
+
import re
import copy
import random
import sackint
import uniqc_m
-# Permutations with image-map I/O.
-
class pmti_t:
# Python arrays are zero-up. Permutations are almost universally taken
View
@@ -8,6 +8,8 @@
# 2007-05-31
# ================================================================
+# Group module for the generalized quaternion group.
+
import genquat_tm
def get_elements_str(params_string):
View
@@ -8,6 +8,8 @@
# 2007-05-31
# ================================================================
+# Group module for the quaternion unit group.
+
import quatu_tm
def get_elements_str(params_string):
View
@@ -8,6 +8,8 @@
# 2007-05-31
# ================================================================
+# Type module for the quaternion unit group.
+
import re
quatu_mul_table = [
View
@@ -8,6 +8,8 @@
# 2007-05-31
# ================================================================
+# Group module for permutation group S_n, with cycle-decomposition I/O.
+
import pmtc_tm
import sackint
View
@@ -8,6 +8,8 @@
# 2007-05-31
# ================================================================
+# Group module for permutation group S_n, with image-map I/O.
+
import pmti_tm
import sackint
View
@@ -88,7 +88,8 @@ def install_table(cayley_table_with_names):
# I should do some checking on the cayley_table_with_names -- the user
# might have given me input which is non-square, or even ragged.
- # Fill it with zeroes, so the matrix has the correct size and may be indexed.
+ # Fill it with zeroes, so the matrix has the correct size and may be
+ # indexed.
row = [1] * n
for i in range(0, n):
spec_tables.mul_table.append(copy.copy(row))
@@ -99,8 +100,9 @@ def install_table(cayley_table_with_names):
spec_tables.mul_table[i][j] = name_to_index_or_die(cayley_table_with_names[i][j], spec_tables.name_table)
# Populate the inv table.
- # I am being crass here. I'm assuming the Cayley table is good before I start.
- # The good news is that the is-group functions don't use the inv table.
+ # I am being crass here. I'm assuming the Cayley table is good before I
+ # start. The good news is that the is-group functions don't use the inv
+ # table.
G = []
for i in range(0, n):
G.append(spec_t(i))
View
@@ -8,6 +8,9 @@
# 2007-05-31
# ================================================================
+# Group module for the Klein-4 group ("Viergruppe" in German, hence the
+# traditional "V4").
+
import v4_tm
def get_elements_str(params_string):
Oops, something went wrong.

0 comments on commit b4ed6b9

Please sign in to comment.