diff --git a/HowToUpdateHap.txt b/HowToUpdateHap.txt deleted file mode 100644 index e5f4b9c8..00000000 --- a/HowToUpdateHap.txt +++ /dev/null @@ -1,39 +0,0 @@ -Change Test:=testquick.g, date and version in PackageInfo.g - -Change ~/Hap/date - -Change ~/Hap/version - -Run ./updateAll.sh - -Fix Undocumented.xml - -Run clean in ~/Hap/doc and in ~/Hap/doc/tutorial - -git clone https://github.com/gap-packages/hap.git - -cp -r pkg/Hap1.30/* hap - -rm hap/HowToUpdateHap.txt THIS SEEMS TO BE IMPORTANT - -diff -r pkg/Hap1.30/ hap/ - -cd hap and then - - git add . - git commit -m "message" - git push origin master [with username grahamknockillaree and passwd MumWon] - - git clone --branch gh-pages https://github.com/gap-packages/hap.git - -Rename the gh-pages directory from whatever it is called to gh-pages - -Populate gh-pages/doc gh-pages/tutorial gh-pages/www with most recent files (xml, html files, etc.) - -Make sure you have the latest Release Tools and then from within hap type - -../ReleaseTools/release-gap-package --token ghp_whateverthetokenis - -For some reason it may be necessary to perform the last command as root. - -That's it. diff --git a/PackageInfo.g b/PackageInfo.g index 8fcbae35..c355191a 100644 --- a/PackageInfo.g +++ b/PackageInfo.g @@ -8,8 +8,8 @@ SetPackageInfo( rec( PackageName := "HAP", Subtitle := "Homological Algebra Programming", - Version := "1.61", - Date := "02/01/2024", + Version := "1.62", + Date := "01/02/2024", License := "GPL-2.0-or-later", SourceRepository := rec( @@ -107,8 +107,8 @@ AvailabilityTest := ReturnTrue, BannerString := Concatenation( "Loading HAP ", String( ~.Version ), " ...\n" ), -#TestFile := "tst/testquick.g", -TestFile := "tst/testall.g", +TestFile := "tst/testquick.g", +#TestFile := "tst/testall.g", Keywords := [ "homology", "cohomology", "resolution", "homotopy group", "module of identities", "CW complex", "simplicial complex", "cubical complex", "permutahedral complex", "knots", "nonabelian tensor", "nonabelian exterior", "covering space" ] diff --git a/README.md b/README.md index 6bde485c..d5799fad 100644 --- a/README.md +++ b/README.md @@ -32,12 +32,12 @@ Please send your bug reports to graham.ellis(at)nuigalway.ie . On a Linux machine with GAP (and optionally Polymake) installed, the HAP library can be loaded as follows: -* First download the file hap1.61.tar.gz to the subdirectory "pkg/" of GAP. (If +* First download the file hap1.62.tar.gz to the subdirectory "pkg/" of GAP. (If you don't have access to this, then create a directory "pkg" in your home directory and download the file there.) -* Change to directory "pkg/" and type "gunzip hap1.61.tar.gz" followed by -"tar -xvf hap1.61.tar" . +* Change to directory "pkg/" and type "gunzip hap1.62.tar.gz" followed by +"tar -xvf hap1.62.tar" . * Start GAP. (If you have created "pkg" in your home directory then start GAP with the command "gap -l 'path/homedir;' " where path/homedir is the path to @@ -46,12 +46,12 @@ your home directory.) * In GAP type " LoadPackage("HAP"); " . * Help on HAP can be found on the HAP home page (a version of which is -included in directory "pkg/Hap1.61/www" of this distribution). +included in directory "pkg/Hap1.62/www" of this distribution). * Performance can be significantly improved by using a compiled version of the HAP library. A compiled version can be created by the following steps. -1. Change to the directory "pkg/Hap1.61/" . +1. Change to the directory "pkg/Hap1.62/" . 2. Edit the file "compile" so that: PKGDIR is equal to the path to the directory "pkg" where your GAP packages are stored; GACDIR is equal to the path to the directory where the GAP compiler "gac" is stored. @@ -60,4 +60,4 @@ path to the directory where the GAP compiler "gac" is stored. The next time HAP is loaded a compiled version will be loaded. * Should you want to return to an uncompiled version, change to the directory -"pkg/Hap1.61/" and type "./uncompile". +"pkg/Hap1.62/" and type "./uncompile". diff --git a/date b/date index b1b02fe2..9d860c7d 100644 --- a/date +++ b/date @@ -1 +1 @@ -02 Jan 2024 +01 Feb 2024 diff --git a/doc/Test.xml b/doc/Test.xml index ea415b74..279a3b9a 100644 --- a/doc/Test.xml +++ b/doc/Test.xml @@ -509,6 +509,7 @@ IndeterminateDegrees
IndeterminatesOfGradedAlgebraPresentation
IndeterminatesOfPolynomial
+InitialObject
InnerAutomorphismGroupQuandle
InnerAutomorphismGroupQuandleAsPerm
InverseRingHomomorphism
@@ -535,6 +536,7 @@ SourcePolynomialRing
SourceRelations
StarGraph
+TerminalObject
TermsOfPolynomial
UnivariateMonomialsOfMonomial
CoefficientsRing
diff --git a/doc/Undocumented.xml b/doc/Undocumented.xml index 31c085ef..348456cd 100644 --- a/doc/Undocumented.xml +++ b/doc/Undocumented.xml @@ -149,6 +149,8 @@
ChainMapOfRegularCWMap    Examples:

+ChevalleyEilenbergComplexOfModule    Examples:
+
ChildRestart    Examples:

ClosureCWCell    Examples:
@@ -378,6 +380,9 @@
FiltrationTermOfRegularCWComplex    Examples:

+FiltrationTerms    Examples: ../tutorial/chap5.html1  +
+
FirstHomologyCoveringCokernels    Examples: ../tutorial/chap3.html1 , ../www/SideLinks/About/aboutCoverinSpaces.html2 
@@ -742,8 +747,9 @@ IdentifyKnot    Examples: ../tutorial/chap6.html1 

-IdentityAmongRelators    Examples: ../www/SideLinks/About/aboutPeriodic.html1 , -../www/SideLinks/About/aboutTopology.html2  +IdentityAmongRelators    Examples: ../tutorial/chap6.html1 , +../www/SideLinks/About/aboutPeriodic.html2 , +../www/SideLinks/About/aboutTopology.html3 

ImageOfGOuterGroupHomomorphism    Examples: ../tutorial/chap7.html1 , @@ -1004,7 +1010,8 @@ PoincareCubeCWComplexNS    Examples: ../tutorial/chap4.html1 

-PoincareDodecahedronCWComplex    Examples: ../tutorial/chap4.html1  +PoincareDodecahedronCWComplex    Examples: ../tutorial/chap4.html1 , +../tutorial/chap11.html2 

PoincareOctahedronCWComplex    Examples: ../tutorial/chap4.html1  @@ -1386,28 +1393,27 @@ ZigZagContractedPureComplex    Examples: ../www/SideLinks/About/aboutPeripheral.html1 

-Sq    Examples: ../tutorial/chap8.html1 , -../tutorial/chap11.html2 , -../www/SideLinks/About/aboutArtinGroups.html3 , -../www/SideLinks/About/aboutModPRings.html4 , -../www/SideLinks/About/aboutAspherical.html5 , -../www/SideLinks/About/aboutNonabelian.html6 , -../www/SideLinks/About/aboutQuandles2.html7 , -../www/SideLinks/About/aboutKnots.html8 , -../www/SideLinks/About/aboutTensorSquare.html9 , -../www/SideLinks/About/aboutKnotsQuandles.html10  +Sq    Examples: ../tutorial/chap5.html1 , +../tutorial/chap8.html2 , +../tutorial/chap11.html3 , +../www/SideLinks/About/aboutArtinGroups.html4 , +../www/SideLinks/About/aboutModPRings.html5 , +../www/SideLinks/About/aboutAspherical.html6 , +../www/SideLinks/About/aboutNonabelian.html7 , +../www/SideLinks/About/aboutQuandles2.html8 , +../www/SideLinks/About/aboutKnots.html9 , +../www/SideLinks/About/aboutTensorSquare.html10 , +../www/SideLinks/About/aboutKnotsQuandles.html11 

Category_Of_Groups    Examples: ../www/SideLinks/About/aboutAbelianCategories.html1 

-HAP_knot_census    Examples:
-
-PathComponentOfSimplicialComplex    Examples:
+PreImagesElmNC    Examples:

-ResolutionSL2ZInvertedInteger    Examples:
+PreImagesNC    Examples:

-ViewGraph    Examples:
+PreImagesSetNC    Examples:

AsFpGroup    Examples:

@@ -1462,6 +1468,9 @@
ExcisedPair    Examples:

+ExpandedComplex    Examples: ../tutorial/chap5.html1  +
+
FilteredRegularCWComplex    Examples: ../tutorial/chap5.html1 

@@ -1549,7 +1558,8 @@
PureComplexMeet    Examples:

-PureComplexRandomCell    Examples:
+PureComplexRandomCell    Examples: ../tutorial/chap5.html1  +

PureComplexSubcomplex    Examples:

@@ -1618,16 +1628,17 @@ Sphere    Examples: ../tutorial/chap1.html1 

-Sq    Examples: ../tutorial/chap8.html1 , -../tutorial/chap11.html2 , -../www/SideLinks/About/aboutArtinGroups.html3 , -../www/SideLinks/About/aboutModPRings.html4 , -../www/SideLinks/About/aboutAspherical.html5 , -../www/SideLinks/About/aboutNonabelian.html6 , -../www/SideLinks/About/aboutQuandles2.html7 , -../www/SideLinks/About/aboutKnots.html8 , -../www/SideLinks/About/aboutTensorSquare.html9 , -../www/SideLinks/About/aboutKnotsQuandles.html10  +Sq    Examples: ../tutorial/chap5.html1 , +../tutorial/chap8.html2 , +../tutorial/chap11.html3 , +../www/SideLinks/About/aboutArtinGroups.html4 , +../www/SideLinks/About/aboutModPRings.html5 , +../www/SideLinks/About/aboutAspherical.html6 , +../www/SideLinks/About/aboutNonabelian.html7 , +../www/SideLinks/About/aboutQuandles2.html8 , +../www/SideLinks/About/aboutKnots.html9 , +../www/SideLinks/About/aboutTensorSquare.html10 , +../www/SideLinks/About/aboutKnotsQuandles.html11 

Standard2Cocycle    Examples:
@@ -2828,40 +2839,41 @@ Int    Examples: ../tutorial/chap1.html1 , ../tutorial/chap3.html2 , ../tutorial/chap4.html3 , -../tutorial/chap7.html4 , -../tutorial/chap8.html5 , -../tutorial/chap10.html6 , -../tutorial/chap11.html7 , -../www/SideLinks/About/aboutArithmetic.html8 , -../www/SideLinks/About/aboutArtinGroups.html9 , -../www/SideLinks/About/aboutAspherical.html10 , -../www/SideLinks/About/aboutBogomolov.html11 , -../www/SideLinks/About/aboutParallel.html12 , -../www/SideLinks/About/aboutPerformance.html13 , -../www/SideLinks/About/aboutCocycles.html14 , -../www/SideLinks/About/aboutCohomologyRings.html15 , -../www/SideLinks/About/aboutPersistent.html16 , -../www/SideLinks/About/aboutPoincareSeries.html17 , -../www/SideLinks/About/aboutCoveringSpaces.html18 , -../www/SideLinks/About/aboutCoverinSpaces.html19 , -../www/SideLinks/About/aboutPolytopes.html20 , -../www/SideLinks/About/aboutCoxeter.html21 , -../www/SideLinks/About/aboutCrossedMods.html22 , -../www/SideLinks/About/aboutRosenbergerMonster.html23 , -../www/SideLinks/About/aboutDavisComplex.html24 , -../www/SideLinks/About/aboutSchurMultiplier.html25 , -../www/SideLinks/About/aboutDefinitions.html26 , -../www/SideLinks/About/aboutSimplicialGroups.html27 , -../www/SideLinks/About/aboutExtensions.html28 , -../www/SideLinks/About/aboutSpaceGroup.html29 , -../www/SideLinks/About/aboutFunctorial.html30 , -../www/SideLinks/About/aboutGraphsOfGroups.html31 , -../www/SideLinks/About/aboutTDA.html32 , -../www/SideLinks/About/aboutIntro.html33 , -../www/SideLinks/About/aboutTensorSquare.html34 , -../www/SideLinks/About/aboutTorAndExt.html35 , -../www/SideLinks/About/aboutLie.html36 , -../www/SideLinks/About/aboutTwistedCoefficients.html37  +../tutorial/chap5.html4 , +../tutorial/chap7.html5 , +../tutorial/chap8.html6 , +../tutorial/chap10.html7 , +../tutorial/chap11.html8 , +../www/SideLinks/About/aboutArithmetic.html9 , +../www/SideLinks/About/aboutArtinGroups.html10 , +../www/SideLinks/About/aboutAspherical.html11 , +../www/SideLinks/About/aboutBogomolov.html12 , +../www/SideLinks/About/aboutParallel.html13 , +../www/SideLinks/About/aboutPerformance.html14 , +../www/SideLinks/About/aboutCocycles.html15 , +../www/SideLinks/About/aboutCohomologyRings.html16 , +../www/SideLinks/About/aboutPersistent.html17 , +../www/SideLinks/About/aboutPoincareSeries.html18 , +../www/SideLinks/About/aboutCoveringSpaces.html19 , +../www/SideLinks/About/aboutCoverinSpaces.html20 , +../www/SideLinks/About/aboutPolytopes.html21 , +../www/SideLinks/About/aboutCoxeter.html22 , +../www/SideLinks/About/aboutCrossedMods.html23 , +../www/SideLinks/About/aboutRosenbergerMonster.html24 , +../www/SideLinks/About/aboutDavisComplex.html25 , +../www/SideLinks/About/aboutSchurMultiplier.html26 , +../www/SideLinks/About/aboutDefinitions.html27 , +../www/SideLinks/About/aboutSimplicialGroups.html28 , +../www/SideLinks/About/aboutExtensions.html29 , +../www/SideLinks/About/aboutSpaceGroup.html30 , +../www/SideLinks/About/aboutFunctorial.html31 , +../www/SideLinks/About/aboutGraphsOfGroups.html32 , +../www/SideLinks/About/aboutTDA.html33 , +../www/SideLinks/About/aboutIntro.html34 , +../www/SideLinks/About/aboutTensorSquare.html35 , +../www/SideLinks/About/aboutTorAndExt.html36 , +../www/SideLinks/About/aboutLie.html37 , +../www/SideLinks/About/aboutTwistedCoefficients.html38 

InverseMutable    Examples:
@@ -3082,7 +3094,8 @@
PureComplexMeet    Examples:

-PureComplexRandomCell    Examples:
+PureComplexRandomCell    Examples: ../tutorial/chap5.html1  +

PureComplexSubcomplex    Examples:

@@ -3178,16 +3191,17 @@
SparseChainComplexOfPair    Examples:

-Sq    Examples: ../tutorial/chap8.html1 , -../tutorial/chap11.html2 , -../www/SideLinks/About/aboutArtinGroups.html3 , -../www/SideLinks/About/aboutModPRings.html4 , -../www/SideLinks/About/aboutAspherical.html5 , -../www/SideLinks/About/aboutNonabelian.html6 , -../www/SideLinks/About/aboutQuandles2.html7 , -../www/SideLinks/About/aboutKnots.html8 , -../www/SideLinks/About/aboutTensorSquare.html9 , -../www/SideLinks/About/aboutKnotsQuandles.html10  +Sq    Examples: ../tutorial/chap5.html1 , +../tutorial/chap8.html2 , +../tutorial/chap11.html3 , +../www/SideLinks/About/aboutArtinGroups.html4 , +../www/SideLinks/About/aboutModPRings.html5 , +../www/SideLinks/About/aboutAspherical.html6 , +../www/SideLinks/About/aboutNonabelian.html7 , +../www/SideLinks/About/aboutQuandles2.html8 , +../www/SideLinks/About/aboutKnots.html9 , +../www/SideLinks/About/aboutTensorSquare.html10 , +../www/SideLinks/About/aboutKnotsQuandles.html11 

Standard2Cocycle    Examples:
@@ -4955,6 +4969,18 @@
Embedding    Examples:

+ExpandedComplex    Examples: ../tutorial/chap5.html1  +
+
+ExpandedComplex    Examples: ../tutorial/chap5.html1  +
+
+ExpandedComplex    Examples: ../tutorial/chap5.html1  +
+
+ExpandedComplex    Examples: ../tutorial/chap5.html1  +
+
GDerivedSubgroup    Examples:

Generators    Examples: ../tutorial/chap1.html1 , @@ -5168,7 +5194,8 @@
PureComplexMeet    Examples:

-PureComplexRandomCell    Examples:
+PureComplexRandomCell    Examples: ../tutorial/chap5.html1  +

PureComplexSubcomplex    Examples:

@@ -5824,6 +5851,12 @@ ../www/SideLinks/About/aboutTwistedCoefficients.html39 

+PathComponentOfSimplicialComplex    Examples:
+
+ResolutionSL2ZInvertedInteger    Examples:
+
+ViewGraph    Examples:
+
InfoHAPprime    Examples:

ASY_PATH    Examples:
diff --git a/doc/newCW.xml b/doc/newCW.xml index 8decd396..bf73d06e 100644 --- a/doc/newCW.xml +++ b/doc/newCW.xml @@ -9,5 +9,5 @@

Inputs a regular CW-complex Y and returns the cellular chain complex of Y.

Examples: ../tutorial/chap1.html1 , ../tutorial/chap10.html2  -

Inputs a regular CW-complex Y and, optionally, the number of some 0-cell. It returns the fundamental group of Y based at the 0-cell n. The group is returned as a finitely presented group. If n is not specified then it is set n=1. The algorithm requires a discrete vector field on Y. If Y does not initially have a discrete vector field then one is constructed.

Examples: ../tutorial/chap1.html1 , ../tutorial/chap2.html2 , ../tutorial/chap3.html3 , ../tutorial/chap4.html4 , ../tutorial/chap5.html5 , ../www/SideLinks/About/aboutLinks.html6 , ../www/SideLinks/About/aboutPeripheral.html7 , ../www/SideLinks/About/aboutCoveringSpaces.html8 , ../www/SideLinks/About/aboutCoverinSpaces.html9 , ../www/SideLinks/About/aboutQuandles.html10 , ../www/SideLinks/About/aboutRandomComplexes.html11 , ../www/SideLinks/About/aboutKnots.html12  +

Inputs a regular CW-complex Y and, optionally, the number of some 0-cell. It returns the fundamental group of Y based at the 0-cell n. The group is returned as a finitely presented group. If n is not specified then it is set n=1. The algorithm requires a discrete vector field on Y. If Y does not initially have a discrete vector field then one is constructed.

Examples: ../tutorial/chap1.html1 , ../tutorial/chap2.html2 , ../tutorial/chap3.html3 , ../tutorial/chap4.html4 , ../tutorial/chap5.html5 , ../tutorial/chap11.html6 , ../www/SideLinks/About/aboutLinks.html7 , ../www/SideLinks/About/aboutPeripheral.html8 , ../www/SideLinks/About/aboutCoveringSpaces.html9 , ../www/SideLinks/About/aboutCoverinSpaces.html10 , ../www/SideLinks/About/aboutQuandles.html11 , ../www/SideLinks/About/aboutRandomComplexes.html12 , ../www/SideLinks/About/aboutKnots.html13  \ No newline at end of file diff --git a/doc/newCategories.xml b/doc/newCategories.xml index 30ac38c4..d326b55a 100644 --- a/doc/newCategories.xml +++ b/doc/newCategories.xml @@ -17,6 +17,10 @@

Inputs an object X in some category, and returns the arrow from X to the terminal object in the category.

Examples: ../www/SideLinks/About/aboutAbelianCategories.html1  +

Inputs the name of a category and returns true or false depending on whether the category has an initial object.

Examples: ../www/SideLinks/About/aboutAbelianCategories.html1  + +

Inputs the name of a category and returns true or false depending on whether the category has a terminal object.

Examples: +

Inputs an arrow f in some category, and returns its source.

Examples: ../tutorial/chap2.html1 , ../tutorial/chap4.html2 , ../tutorial/chap7.html3 , ../tutorial/chap8.html4 , ../www/SideLinks/About/aboutAbelianCategories.html5 , ../www/SideLinks/About/aboutNonabelian.html6 , ../www/SideLinks/About/aboutCoefficientSequence.html7 , ../www/SideLinks/About/aboutCoveringSpaces.html8 , ../www/SideLinks/About/aboutCoverinSpaces.html9 , ../www/SideLinks/About/aboutFunctorial.html10 , ../www/SideLinks/About/aboutLieCovers.html11 

Inputs an arrow f in some category, and returns its target.

Examples: ../tutorial/chap1.html1 , ../tutorial/chap2.html2 , ../tutorial/chap7.html3 , ../tutorial/chap8.html4 , ../www/SideLinks/About/aboutAbelianCategories.html5 , ../www/SideLinks/About/aboutCoefficientSequence.html6 , ../www/SideLinks/About/aboutCoveringSpaces.html7 , ../www/SideLinks/About/aboutCoverinSpaces.html8  diff --git a/doc/newChainComplexes.xml b/doc/newChainComplexes.xml index 8665c856..e74db989 100644 --- a/doc/newChainComplexes.xml +++ b/doc/newChainComplexes.xml @@ -3,7 +3,7 @@

Inputs a pure cubical complex or cubical complex T and contractible subcomplex S. It returns the quotient C(T)/C(S) of cellular chain complexes.

Examples: ../tutorial/chap10.html1 , ../www/SideLinks/About/aboutCubical.html2  -

Inputs either a Lie algebra X=A (over the ring of integers Z or over a field K) or a homomorphism of Lie algebras X=(f:A \longrightarrow B), together with a positive integer n. It returns either the first n terms of the Chevalley-Eilenberg chain complex C(A), or the induced map of Chevalley-Eilenberg complexes C(f):C(A) \longrightarrow C(B).

(The homology of the Chevalley-Eilenberg complex C(A) is by definition the homology of the Lie algebra A with trivial coefficients in Z or K).

This function was written by Pablo Fernandez Ascariz

Examples: +

Inputs either a Lie algebra X=A (over the ring of integers Z or over a field K) or a homomorphism of Lie algebras X=(f:A \longrightarrow B), together with a positive integer n. It returns either the first n terms of the Chevalley-Eilenberg chain complex C(A), or the induced map of Chevalley-Eilenberg complexes C(f):C(A) \longrightarrow C(B).

(The homology of the Chevalley-Eilenberg complex C(A) is by definition the homology of the Lie algebra A with trivial coefficients in Z or K).

This function was written by Pablo Fernandez Ascariz

Examples: ../tutorial/chap7.html1 

Inputs either a Lie or Leibniz algebra X=A (over the ring of integers Z or over a field K) or a homomorphism of Lie or Leibniz algebras X=(f:A \longrightarrow B), together with a positive integer n. It returns either the first n terms of the Leibniz chain complex C(A), or the induced map of Leibniz complexes C(f):C(A) \longrightarrow C(B).

(The Leibniz complex C(A) was defined by J.-L.Loday. Its homology is by definition the Leibniz homology of the algebra A).

This function was written by Pablo Fernandez Ascariz

Examples: diff --git a/doc/newCubical.xml b/doc/newCubical.xml index d34a685a..d7e01055 100644 --- a/doc/newCubical.xml +++ b/doc/newCubical.xml @@ -13,7 +13,7 @@

Inputs two pure cubical complexes with common dimension and array size. It returns the difference S-T. (An entry in the binary array of the difference has value 1 if and only if the corresponding entry in the binary array of S is 1 and the corresponding entry in the binary array of T is 0.)

Examples: ../www/SideLinks/About/aboutTDA.html1 , ../www/SideLinks/About/aboutKnots.html2  -

Reads an image file str (= "file.png", "file.eps", "file.bmp" etc) and an integer n between 0 and 765. It returns a 2-dimensional pure cubical complex based on the black/white version of the image determined by the threshold n.

Examples: ../tutorial/chap10.html1 , ../www/SideLinks/About/aboutPersistent.html2 , ../www/SideLinks/About/aboutCubical.html3 , ../www/SideLinks/About/aboutTDA.html4  +

Reads an image file str (= "file.png", "file.eps", "file.bmp" etc) and an integer n between 0 and 765. It returns a 2-dimensional pure cubical complex based on the black/white version of the image determined by the threshold n.

Examples: ../tutorial/chap5.html1 , ../tutorial/chap10.html2 , ../www/SideLinks/About/aboutPersistent.html3 , ../www/SideLinks/About/aboutCubical.html4 , ../www/SideLinks/About/aboutTDA.html5 

Reads an image file str (= "file.png", "file.eps", "file.bmp" etc) containing a knot or link diagram, and optionally a positive integer n. The integer n should be a little larger than the line thickness in the link diagram, and if not provided then n is set equal to 10. The function tries to output the corresponding knot or link as a 3-dimensional pure cubical complex. Ideally the link diagram should be produced with line thickness 6 in Xfig, and the under-crossing spaces should not be too large or too small or too near one another. The function does not always succeed: it applies several checks, and if one of these checks fails then the function returns "fail".

Examples: ../www/SideLinks/About/aboutLinks.html1  @@ -67,7 +67,7 @@

Inputs a pure cubical complex T together with a pure cubical subcomplex S. It returns a pure cubical subcomplex H of T which contains S and is maximal with respect to the property that it is homotopy equivalent to S.

Examples: -

Inputs a pure cubical complex T together with a pure cubical subcomplex S. It returns a pure cubical subcomplex H of T which contains S and is minimal with respect to the property that it is homotopy equivalent to T.

Examples: +

Inputs a pure cubical complex T together with a pure cubical subcomplex S. It returns a pure cubical subcomplex H of T which contains S and is minimal with respect to the property that it is homotopy equivalent to T.

Examples: ../tutorial/chap5.html1 

Inputs a pure cubical complex T and returns its boundary as a pure cubical complex. The boundary consists of all cubes which have one or more facets that lie in just the one cube.

Examples: ../www/SideLinks/About/aboutTDA.html1  @@ -95,7 +95,7 @@

Inputs a string containing the path to an image file, together with a positive integer n. It returns a filtered pure cubical complex of filtration length n.

Examples: ../tutorial/chap5.html1  -

Inputs a filtered pure cubical complex M and returns the complement as a filtered pure cubical complex.

Examples: +

Inputs a filtered pure cubical complex M and returns the complement as a filtered pure cubical complex.

Examples: ../tutorial/chap5.html1 

Inputs a filtered pure cubical complex M and a non-negative integer n. It returns the degree n persistent homology of M with rational coefficients.

Examples: \ No newline at end of file diff --git a/doc/newNewCellComplexes.xml b/doc/newNewCellComplexes.xml index d77be8ef..980e67de 100644 --- a/doc/newNewCellComplexes.xml +++ b/doc/newNewCellComplexes.xml @@ -9,7 +9,7 @@

Inputs integers n, k and returns the k-th prime knot on n crossings as a pure permutahedral complex (if this prime knot exists).

Inputs a list L describing an arc presentation for a knot or link and returns the knot or link as a pure permutahedral complex.

Examples: ../tutorial/chap1.html1 , ../tutorial/chap10.html2  -

Inputs a binary array A and returns the pure permutahedral complex represented by A.

Examples: ../tutorial/chap2.html1 , ../www/SideLinks/About/aboutPeripheral.html2 , ../www/SideLinks/About/aboutCubical.html3  +

Inputs a binary array A and returns the pure permutahedral complex represented by A.

Examples: ../tutorial/chap2.html1 , ../tutorial/chap5.html2 , ../www/SideLinks/About/aboutPeripheral.html3 , ../www/SideLinks/About/aboutCubical.html4 

Inputs a finite group G and a list L of elements in G.It returns the Cayley graph of the group generated by L.

Examples: @@ -29,7 +29,7 @@

Reads a CSV file identified by a string str such as "file.pdb" or "path/file.pdb" and returns a 3-dimensional pure cubical complex K. Each line of the file should contain the coordinates of a point in \mathbb R^3 and the complex K should represent a knot determined by the sequence of points, though the latter is not guaranteed. A useful check in this direction is to test that K has the homotopy type of a circle.

If the test fails then try the function again with an integer r \ge 2 entered as the optional second argument. The integer determines the resolution with which the knot is constructed.

The function can also read in a list L of strings identifying CSV files for several knots. In this case a list R of integer resolutions can also be entered. The lists L and R must be of equal length.

Examples: ../tutorial/chap2.html1  -

Reads an image file identified by a string str such as "file.bmp", "file.eps", "file.jpg", "path/file.png" etc., together with an integer t between 0 and 765. It returns a 2-dimensional pure cubical complex corresponding to a black/white version of the image determined by the threshold t. The 2-cells of the pure cubical complex correspond to pixels with RGB value R+G+B \le t.

Examples: ../tutorial/chap10.html1 , ../www/SideLinks/About/aboutPersistent.html2 , ../www/SideLinks/About/aboutCubical.html3 , ../www/SideLinks/About/aboutTDA.html4  +

Reads an image file identified by a string str such as "file.bmp", "file.eps", "file.jpg", "path/file.png" etc., together with an integer t between 0 and 765. It returns a 2-dimensional pure cubical complex corresponding to a black/white version of the image determined by the threshold t. The 2-cells of the pure cubical complex correspond to pixels with RGB value R+G+B \le t.

Examples: ../tutorial/chap5.html1 , ../tutorial/chap10.html2 , ../www/SideLinks/About/aboutPersistent.html3 , ../www/SideLinks/About/aboutCubical.html4 , ../www/SideLinks/About/aboutTDA.html5 

Reads an image file identified by a string str such as "file.bmp", "file.eps", "file.jpg", "path/file.png" etc., together with a positive integer n. It returns a 2-dimensional filtered pure cubical complex of filtration length n. The kth term in the filtration is a pure cubical complex corresponding to a black/white version of the image determined by the threshold t_k=k \times 765/n . The 2-cells of the kth term correspond to pixels with RGB value R+G+B \le t_k.

Examples: ../tutorial/chap5.html1  @@ -95,17 +95,17 @@

Inputs a simplicial, pure cubical or pure permutahedral complex K together with an integer 1 \le n \le \beta_0(K). The n-th path component of K is returned.

Examples: ../tutorial/chap5.html1 , ../www/SideLinks/About/aboutQuandles.html2 , ../www/SideLinks/About/aboutTDA.html3  -

Inputs a d-dimensional pure cubical or pure permutahedral complex M and returns a d-dimensional complex consisting of the closure of those d-cells whose boundaries contains some cell with coboundary of size less than the maximal possible size.

Examples: +

Inputs a d-dimensional pure cubical or pure permutahedral complex M and returns a d-dimensional complex consisting of the closure of those d-cells whose boundaries contains some cell with coboundary of size less than the maximal possible size.

Examples: ../tutorial/chap5.html1 

Inputs a pure cubical complex or a pure permutahedral complex and returns its complement.

Examples: ../tutorial/chap1.html1 , ../tutorial/chap2.html2 , ../tutorial/chap3.html3 , ../tutorial/chap5.html4 , ../tutorial/chap10.html5 , ../www/SideLinks/About/aboutCoveringSpaces.html6 , ../www/SideLinks/About/aboutCoverinSpaces.html7  -

Inputs two pure cubical complexes or two pure permutahedral complexes and returns the difference M - N.

Examples: +

Inputs two pure cubical complexes or two pure permutahedral complexes and returns the difference M - N.

Examples: ../tutorial/chap5.html1 

Inputs two pure cubical complexes or two pure permutahedral complexes and returns their intersection.

Examples:

Inputs a pure cubical complex or a pure permutahedral complex and returns the a thickened complex.

Examples: ../tutorial/chap5.html1  -

Inputs two pure cubical complexes or two pure permutahedral complexes and returns their union.

Examples: +

Inputs two pure cubical complexes or two pure permutahedral complexes and returns their union.

Examples: ../tutorial/chap5.html1 

Inputs a regular CW-complex or a pure permutahedral complex K and returns a homeomorphic complex with possibly fewer cells and certainly no more cells.

Inputs a free \mathbb ZG-resolution R of \mathbb Z and returns a \mathbb ZG-resolution S with potentially fewer free generators.

Inputs a chain complex C of free abelian groups and returns a chain homotopic chain complex D with potentially fewer free generators.

Examples: ../tutorial/chap1.html1 , ../tutorial/chap3.html2 , ../tutorial/chap4.html3 , ../tutorial/chap11.html4 , ../www/SideLinks/About/aboutCoveringSpaces.html5 , ../www/SideLinks/About/aboutCoverinSpaces.html6  @@ -119,7 +119,7 @@

Inputs a regular CW-complex Y and a weight function w\colon Y\rightarrow \mathbb Z, and returns the Euler integral \int_Y w\, d\chi .

Examples: -

Inputs a regular CW, simplicial, pure cubical or pure permutahedral complex K and returns the fundamental group.

Inputs a regular CW complex K and the number n of some zero cell. It returns the fundamental group of K based at the n-th zero cell.

Inputs a regular CW map F and returns the induced homomorphism of fundamental groups. If the number of some zero cell in the domain of F is entered as an optional second variable then the fundamental group is based at this zero cell.

Examples: ../tutorial/chap1.html1 , ../tutorial/chap2.html2 , ../tutorial/chap3.html3 , ../tutorial/chap4.html4 , ../tutorial/chap5.html5 , ../www/SideLinks/About/aboutLinks.html6 , ../www/SideLinks/About/aboutPeripheral.html7 , ../www/SideLinks/About/aboutCoveringSpaces.html8 , ../www/SideLinks/About/aboutCoverinSpaces.html9 , ../www/SideLinks/About/aboutQuandles.html10 , ../www/SideLinks/About/aboutRandomComplexes.html11 , ../www/SideLinks/About/aboutKnots.html12  +

Inputs a regular CW, simplicial, pure cubical or pure permutahedral complex K and returns the fundamental group.

Inputs a regular CW complex K and the number n of some zero cell. It returns the fundamental group of K based at the n-th zero cell.

Inputs a regular CW map F and returns the induced homomorphism of fundamental groups. If the number of some zero cell in the domain of F is entered as an optional second variable then the fundamental group is based at this zero cell.

Examples: ../tutorial/chap1.html1 , ../tutorial/chap2.html2 , ../tutorial/chap3.html3 , ../tutorial/chap4.html4 , ../tutorial/chap5.html5 , ../tutorial/chap11.html6 , ../www/SideLinks/About/aboutLinks.html7 , ../www/SideLinks/About/aboutPeripheral.html8 , ../www/SideLinks/About/aboutCoveringSpaces.html9 , ../www/SideLinks/About/aboutCoverinSpaces.html10 , ../www/SideLinks/About/aboutQuandles.html11 , ../www/SideLinks/About/aboutRandomComplexes.html12 , ../www/SideLinks/About/aboutKnots.html13 

Inputs a G-equivariant regular CW complex Y and returns the group G.

Examples: ../tutorial/chap1.html1  @@ -169,7 +169,7 @@

Inputs a finite group G and a list L of elements in G.It displays the Cayley graph of the group generated by L where edge colours correspond to generators.

Examples: -

Displays a graph G; a 2- or 3-dimensional pure cubical complex M; a 3-dimensional pure permutahedral complex M.

Examples: ../tutorial/chap1.html1 , ../tutorial/chap2.html2 , ../tutorial/chap4.html3 , ../tutorial/chap5.html4 , ../tutorial/chap7.html5 , ../tutorial/chap9.html6 , ../tutorial/chap10.html7 , ../tutorial/chap11.html8 , ../www/SideLinks/About/aboutMetrics.html9 , ../www/SideLinks/About/aboutArtinGroups.html10 , ../www/SideLinks/About/aboutNoncrossing.html11 , ../www/SideLinks/About/aboutPeriodic.html12 , ../www/SideLinks/About/aboutPersistent.html13 , ../www/SideLinks/About/aboutPolytopes.html14 , ../www/SideLinks/About/aboutQuandles2.html15 , ../www/SideLinks/About/aboutQuandles.html16 , ../www/SideLinks/About/aboutSuperperfect.html17 , ../www/SideLinks/About/aboutGraphsOfGroups.html18 , ../www/SideLinks/About/aboutIntro.html19 , ../www/SideLinks/About/aboutKnotsQuandles.html20 , ../www/SideLinks/About/aboutTopology.html21  +

Displays a graph G; a 2- or 3-dimensional pure cubical complex M; a 3-dimensional pure permutahedral complex M.

Examples: ../tutorial/chap1.html1 , ../tutorial/chap2.html2 , ../tutorial/chap4.html3 , ../tutorial/chap5.html4 , ../tutorial/chap6.html5 , ../tutorial/chap7.html6 , ../tutorial/chap9.html7 , ../tutorial/chap10.html8 , ../tutorial/chap11.html9 , ../www/SideLinks/About/aboutMetrics.html10 , ../www/SideLinks/About/aboutArtinGroups.html11 , ../www/SideLinks/About/aboutNoncrossing.html12 , ../www/SideLinks/About/aboutPeriodic.html13 , ../www/SideLinks/About/aboutPersistent.html14 , ../www/SideLinks/About/aboutPolytopes.html15 , ../www/SideLinks/About/aboutQuandles2.html16 , ../www/SideLinks/About/aboutQuandles.html17 , ../www/SideLinks/About/aboutSuperperfect.html18 , ../www/SideLinks/About/aboutGraphsOfGroups.html19 , ../www/SideLinks/About/aboutIntro.html20 , ../www/SideLinks/About/aboutKnotsQuandles.html21 , ../www/SideLinks/About/aboutTopology.html22 

Displays a 3-dimensional pure cubical knot K=PureCubicalKnot(L) in the form of an arc presentation.

Examples: diff --git a/doc/newNewResolutions.xml b/doc/newNewResolutions.xml index 0eda03bb..93802311 100644 --- a/doc/newNewResolutions.xml +++ b/doc/newNewResolutions.xml @@ -9,7 +9,7 @@

Inputs a finite group G and an integer k \ge 1. It returns k+1 terms of a free ZG-resolution of \mathbb Z.

Examples: ../tutorial/chap6.html1 , ../tutorial/chap7.html2 , ../tutorial/chap8.html3 , ../tutorial/chap10.html4 , ../tutorial/chap11.html5 , ../www/SideLinks/About/aboutParallel.html6 , ../www/SideLinks/About/aboutPerformance.html7 , ../www/SideLinks/About/aboutCocycles.html8 , ../www/SideLinks/About/aboutPeriodic.html9 , ../www/SideLinks/About/aboutCohomologyRings.html10 , ../www/SideLinks/About/aboutPoincareSeries.html11 , ../www/SideLinks/About/aboutCrossedMods.html12 , ../www/SideLinks/About/aboutDefinitions.html13 , ../www/SideLinks/About/aboutSimplicialGroups.html14 , ../www/SideLinks/About/aboutExtensions.html15 , ../www/SideLinks/About/aboutSpaceGroup.html16 , ../www/SideLinks/About/aboutFunctorial.html17 , ../www/SideLinks/About/aboutGouter.html18 , ../www/SideLinks/About/aboutTopology.html19 , ../www/SideLinks/About/aboutTwistedCoefficients.html20  -

Inputs a nilpotent group G (which can be infinite) and an integer k \ge 1. It returns k+1 terms of a free \mathbb ZG-resolution of \mathbb Z.

Examples: ../tutorial/chap11.html1 , ../www/SideLinks/About/aboutCohomologyRings.html2 , ../www/SideLinks/About/aboutRosenbergerMonster.html3 , ../www/SideLinks/About/aboutExtensions.html4  +

Inputs a nilpotent group G (which can be infinite) and an integer k \ge 1. It returns k+1 terms of a free \mathbb ZG-resolution of \mathbb Z.

Examples: ../tutorial/chap6.html1 , ../tutorial/chap11.html2 , ../www/SideLinks/About/aboutCohomologyRings.html3 , ../www/SideLinks/About/aboutRosenbergerMonster.html4 , ../www/SideLinks/About/aboutExtensions.html5 

Inputs a a list L consisting of a chain $1=N_1 \le N_2 \le \cdots \le N_n =G of normal subgroups of G, together with an integer k \ge 1. It returns k+1 terms of a free ZG-resolution of \mathbb Z.

Examples: ../tutorial/chap10.html1 , ../tutorial/chap11.html2 , ../www/SideLinks/About/aboutModPRings.html3 , ../www/SideLinks/About/aboutPerformance.html4 , ../www/SideLinks/About/aboutPersistent.html5 , ../www/SideLinks/About/aboutRosenbergerMonster.html6 , ../www/SideLinks/About/aboutExtensions.html7  diff --git a/doc/newPresentations.xml b/doc/newPresentations.xml index 1c2ec3f7..035e7329 100644 --- a/doc/newPresentations.xml +++ b/doc/newPresentations.xml @@ -1,11 +1,11 @@ Generators and relators of groups

 

Inputs a finite group G together with a subset X of G. It displays the corresponding Cayley graph as a .gif file. It uses the Mozilla web browser as a default to view the diagram. An alternative browser can be set using a second argument str="mozilla".

The argument G can also be a finite set of elements in a (possibly infinite) group containing X. The edges of the graph are coloured according to which element of X they are labelled by. The list X corresponds to the list of colours [blue, red, green, yellow, brown, black] in that order.

This function requires Graphviz software.

Examples: -

Inputs a free ZG-resolution R and an integer n. It displays the boundary R!.boundary(3,n) as a tessellation of a sphere. It displays the tessellation as a .gif file and uses the Mozilla web browser as a default display mechanism. An alternative browser can be set using the second argument str="mozilla". (The resolution R should be reduced and, preferably, in dimension 1 it should correspond to a Cayley graph for G. )

This function uses GraphViz software.

Examples: ../www/SideLinks/About/aboutPeriodic.html1 , ../www/SideLinks/About/aboutTopology.html2  +

Inputs a free ZG-resolution R and an integer n. It displays the boundary R!.boundary(3,n) as a tessellation of a sphere. It displays the tessellation as a .gif file and uses the Mozilla web browser as a default display mechanism. An alternative browser can be set using the second argument str="mozilla". (The resolution R should be reduced and, preferably, in dimension 1 it should correspond to a Cayley graph for G. )

This function uses GraphViz software.

Examples: ../tutorial/chap6.html1 , ../www/SideLinks/About/aboutPeriodic.html2 , ../www/SideLinks/About/aboutTopology.html3 

Inputs a free group F and a set R of words in F. It performs a test on the 2-dimensional CW-space K associated to this presentation for the group G=F/&tlt;R&tgt;^F.

The function returns "true" if K has trivial second homotopy group. In this case it prints: Presentation is aspherical.

Otherwise it returns "fail" and prints: Presentation is NOT piece-wise Euclidean non-positively curved. (In this case K may or may not have trivial second homotopy group. But it is NOT possible to impose a metric on K which restricts to a Euclidean metric on each 2-cell.)

The function uses Polymake software.

Examples: ../tutorial/chap3.html1 , ../tutorial/chap6.html2 , ../www/SideLinks/About/aboutAspherical.html3 , ../www/SideLinks/About/aboutIntro.html4  -

Inputs at least two terms of a reduced ZG-resolution R and returns a record P with components P.freeGroup is a free group F, P.relators is a list S of words in F, P.gens is a list of positive integers such that the i-th generator of the presentation corresponds to the group element R!.elts[P[i]] . where G is isomorphic to F modulo the normal closure of S. This presentation for G corresponds to the 2-skeleton of the classifying CW-space from which R was constructed. The resolution R requires no contracting homotopy.

Examples: ../www/SideLinks/About/aboutPolytopes.html1 , ../www/SideLinks/About/aboutSpaceGroup.html2 , ../www/SideLinks/About/aboutTopology.html3  +

Inputs at least two terms of a reduced ZG-resolution R and returns a record P with components P.freeGroup is a free group F, P.relators is a list S of words in F, P.gens is a list of positive integers such that the i-th generator of the presentation corresponds to the group element R!.elts[P[i]] . where G is isomorphic to F modulo the normal closure of S. This presentation for G corresponds to the 2-skeleton of the classifying CW-space from which R was constructed. The resolution R requires no contracting homotopy.

Examples: ../tutorial/chap6.html1 , ../www/SideLinks/About/aboutPolytopes.html2 , ../www/SideLinks/About/aboutSpaceGroup.html3 , ../www/SideLinks/About/aboutTopology.html4 

Inputs an abelian group G and returns a generating set [x_1, \ldots ,x_n] where no pair of generators have coprime orders.

Examples:

\ No newline at end of file diff --git a/doc/newResolutions.xml b/doc/newResolutions.xml index 948d1578..2b05e4e9 100644 --- a/doc/newResolutions.xml +++ b/doc/newResolutions.xml @@ -37,7 +37,7 @@

Inputs a graph of groups D and a positive integer n. It returns n terms of a free ZG-resolution for the fundamental group G of D.

An optional third argument L=[R_1 , \ldots , R_t] can be used to list (in any order) free resolutions for some/all of the vertex and edge groups in D. If for some vertex or edge group no resolution is listed in L then the function ResolutionFiniteGroup() will be used to try to construct the resolution.

The ZG-resolution is usually not reduced. i.e. it has more than one generator in dimension 0.

The contracting homotopy on the ZG-resolution has not yet been implemented! Furthermore, the group G is currently returned only as a finitely presented group (without any method for solving the word problem).

Examples: ../tutorial/chap7.html1 , ../tutorial/chap11.html2 , ../www/SideLinks/About/aboutGraphsOfGroups.html3  -

Inputs a nilpotent group G and positive integer n. It returns n terms of a free ZG-resolution. The resolution is computed using a divide-and-conquer technique involving the lower central series.

This function can be applied to infinite groups G. For finite groups the function ResolutionNormalSeries() probably gives better results.

If an optional third argument str is set equal to "TestFiniteness" then the groups N and G will be tested to see if they are finite. If they are finite then some speed saving routines will be invoked.

The contracting homotopy on the ZE-resolution has not yet been fully implemented for infinite groups.

Examples: ../tutorial/chap11.html1 , ../www/SideLinks/About/aboutCohomologyRings.html2 , ../www/SideLinks/About/aboutRosenbergerMonster.html3 , ../www/SideLinks/About/aboutExtensions.html4  +

Inputs a nilpotent group G and positive integer n. It returns n terms of a free ZG-resolution. The resolution is computed using a divide-and-conquer technique involving the lower central series.

This function can be applied to infinite groups G. For finite groups the function ResolutionNormalSeries() probably gives better results.

If an optional third argument str is set equal to "TestFiniteness" then the groups N and G will be tested to see if they are finite. If they are finite then some speed saving routines will be invoked.

The contracting homotopy on the ZE-resolution has not yet been fully implemented for infinite groups.

Examples: ../tutorial/chap6.html1 , ../tutorial/chap11.html2 , ../www/SideLinks/About/aboutCohomologyRings.html3 , ../www/SideLinks/About/aboutRosenbergerMonster.html4 , ../www/SideLinks/About/aboutExtensions.html5 

Inputs a positive integer n and a list L = [L_1 , ..., L_k] of normal subgroups L_i of a finite group G satisfying G = L_1 &tgt; L2 &tgt; \ldots &tgt; L_k. Alternatively, L = [gensL_1, ... gensL_k] can be a list of generating sets for the L_i (and these particular generators will be used in the construction of resolutions). It returns a ZG-resolution by repeatedly using the function ResolutionFiniteExtension().

The function has an optional third argument which, if set equal to true, invokes tietze reductions in the construction of resolutions.

The function has an optional fourth argument which, if set equal to p &tgt; 0, produces a resolution which is only valid for mod p calculations.

Examples: ../tutorial/chap10.html1 , ../tutorial/chap11.html2 , ../www/SideLinks/About/aboutModPRings.html3 , ../www/SideLinks/About/aboutPerformance.html4 , ../www/SideLinks/About/aboutPersistent.html5 , ../www/SideLinks/About/aboutRosenbergerMonster.html6 , ../www/SideLinks/About/aboutExtensions.html7  diff --git a/tutorial/images/1v2x.png b/gh-files/1v2x.png similarity index 100% rename from tutorial/images/1v2x.png rename to gh-files/1v2x.png diff --git a/tutorial/images/1v2xcubical.png b/gh-files/1v2xcubical.png similarity index 100% rename from tutorial/images/1v2xcubical.png rename to gh-files/1v2xcubical.png diff --git a/init.old b/init.old new file mode 100644 index 00000000..45561dac --- /dev/null +++ b/init.old @@ -0,0 +1,15 @@ +############################################################################# +## +## init.g HAP library Graham Ellis +## +############################################################################ + +if not IsBound(HapGlobalDeclarationsAreAlreadyLoaded) then +ReadPackage("HAP","lib/hap.gd"); +HapGlobalDeclarationsAreAlreadyLoaded:=true; +MakeReadOnlyGlobal("HapGlobalDeclarationsAreAlreadyLoaded"); +fi; + +ReadPackage("HAP","/lib/externalSoftware.gap"); + + diff --git a/lib/LieAlgebras/chev.gi b/lib/LieAlgebras/chev.gi new file mode 100644 index 00000000..15fd1216 --- /dev/null +++ b/lib/LieAlgebras/chev.gi @@ -0,0 +1,233 @@ + + + +################################################################### +################################################################### +InstallGlobalFunction(ChevalleyEilenbergComplexOfModule, +function(V,s) + +local A,Sctab,B,BasV,Dim,n,i,d,j,Boundary,BD,BDI,bound,r,Comb,ITT,TTI,ONE,Charact, + dimV, pair2int, int2pair, action, BoundaryRec; + +dimV:=Dimension(V); #This is the dimension of the module V +A:=V!.LeftActingAlgebra; #A is the Lie algebra +B:=Basis(A); +BasV:=Basis(V); +Sctab:=StructureConstantsTable(B); +d:=Length(B); #d = dimension of the Lie algebra A +Comb:=List([1..s],n->Combinations([1..d],n)); #The graded generators of C_n(A) +BoundaryRec:=List([0..s],i->[]); +################################################################# + +# We'll try to use n for the degree of a chain complex. +# Let C_n(A) be the vector space of rank=Binomial(d,n) where the Lie algebra +# A has dimension d. +# Let -(x)- denote tensor product over ground field. +# Let c_p(x)v_q be the generator of C(n)=C_n(A)(x)V where c_p is +# the p-th basis element of C_n(A) and v_q is the q-th basis element of V. +# Comb[n][j] corresponds to j-th generator of C_n(A) + +ONE:=One(A!.LeftActingDomain); +################################################################ +Charact:=function(M) +if not IsFinite(M!.LeftActingDomain) then + if Name(M!.LeftActingDomain)=Name(Integers) then + return 0; + fi; + if Name(M!.LeftActingDomain)=Name(Rationals) then + return -(1/2); + fi; +else + return Characteristic(M!.LeftActingDomain); +fi; +end; +################################################################ + + +############################################################### +ITT:=function(n,j); +return StructuralCopy(Comb[n][j]); +end; +############################################################### + +############################################################### +TTI:=function(c); +return Position(Comb[Length(c)],SSortedList(c)); +end; +############################################################### + +################################################################ +Dim:=function(n); +if n>s or n<0 then return 0; else +return Binomial( d, n )*dimV; fi; +end; +############################################################### + +####################################### +pair2int:=function(m,k); +return dimV*(m-1)+k; +end; +####################################### + +####################################### +int2pair:=function(kk) +local m,k; +k:= kk mod dimV; + if k=0 then k:=dimV; + m:=Int(kk/dimV); + return [m,k]; + fi; +m:=1+Int(kk/dimV); +return [m,k]; +end; +####################################### + +####################################### +action:=function(a,v) +local m, w, i, j, x, z; +m:=Length(v)/dimV; +w:=[]; +for i in [0..m-1] do +x:=Zero(V); +for j in [1..dimV] do +z:=v[i*dimV+j]; +if z<>0 then +x:=x + z*BasV[j]; +fi; +od; +x:=a*x; +x:=Coefficients(BasV,x); +Append(w,x); +od; + +return w; +end; +####################################### + +############################################################### +BDI:=function(n,i,j) +local bound, Q, pos; + +if n>s then + return [0]*ONE; +fi; +if j>Binomial(d,n) then + return [0]*ONE; +fi; + +if n=1 then return [1]; fi; +bound:=List([1..Binomial(d,n-1)], i->0); +Q:=ITT(n,j); +Remove(Q,i); +pos:=Position(Comb[n-1],Q); +if IsOddInt(i) then +bound[pos]:=-1; +else +bound[pos]:=1; +fi; +return bound; +end; +############################################################### + +############################################################### +BD:=function(n,j) +#Boundary returns the image of the j-th generator under the map +#D:C_n(A)-->C_{n-1}(A) in the Chevalley-Eilenberg complex with trivial +#coefficients + +local bound,a,b,x,p,q,R,m,Q; + +if n>s then + return [0]*ONE; +fi; +if j>Binomial(d,n) then + return [0]*ONE; +fi; + +bound:=List([1..Binomial(d,n-1)], i->0); +Q:=ITT(n,j); + +for a in [1..n-1] do +for b in [a+1..n] do + p:=Length(Sctab[Q[a]][Q[b]][1]); + for m in [1..p] do + R:=StructuralCopy(Q); + Add(R,Sctab[Q[a]][Q[b]][1][m],1); + Remove(R,a+1); + Remove(R,b); + if IsSSortedList(SortedList(R))=true then + q:=Position(SortedList(R),R[1]); + bound[TTI(R)]:=bound[TTI(R)]+(-1)^(a+b+q-1)*Sctab[Q[a]][Q[b]][2][m]; + fi; + od; +od; +od; + +return bound; + +end; +############################################################# + +############################################################# +Boundary:=function(n,kk) +local bound, bnd, vec2, x, m, k, i, j, vec,Q; + +# We'll implement the boundary map +# C_n(A) (x) V ---> C_{n-1}(A) (x) V +# c_p (x) v_q |--> sum_i( x_i . DI(i)(c_p) (x) v_q ) + D(c_p (x) v_q) +# where DI and D are defined above. This function returns the image of +# the kk-th generator of C_n(A) (x) V under the boundary map. + +if IsBound(BoundaryRec[n+1][AbsInt(kk)]) then +if kk>0 then return BoundaryRec[n+1][kk]; +else +return -BoundaryRec[n+1][kk]; +fi; +fi; + +bound:=List([1..Dim(n-1)],i->0); + +x:=int2pair(kk); +k:=x[2]; +m:=x[1]; +bnd:=BD(n,m); +for j in [1..Length(bnd)] do +x:=pair2int(j,k); +bound[x]:=bnd[j]; +od; + +Q:=ITT(n,m); + +for i in [1..n] do +vec:=BDI(n,i,m); +vec2:=0*bound; +for j in [1..Length(vec)] do +if not vec[j]=0 then +x:=pair2int(j,k); +vec2[x]:=vec2[x]+vec[j]; +vec2:=action(B[Q[i]],vec2); +fi; +od; +bound:=bound+vec2; +od; + +BoundaryRec[n+1][AbsInt(kk)]:= bound*ONE; +if kk>0 then return BoundaryRec[n+1][kk]; +else +return -BoundaryRec[n+1][kk]; +fi; +end; +############################################################# + + +return Objectify(HapChainComplex,rec(dimension:=Dim, + boundary:=Boundary, + properties:= + [["length",s], + ["type","chainComplex"], + ["characteristic",Charact(A)]])); +end); +############################################################# +############################################################# + + diff --git a/lib/LieAlgebras/chevalleyEilenberg.gi b/lib/LieAlgebras/chevalleyEilenberg.gi index f92cea12..62d8c20c 100644 --- a/lib/LieAlgebras/chevalleyEilenberg.gi +++ b/lib/LieAlgebras/chevalleyEilenberg.gi @@ -211,6 +211,9 @@ end; #if IsLieAlgebra(L)=true then if IsLeftModule(L)=true then + if IsBound(L!.LeftActingAlgebra) then + return ChevalleyEilenbergComplexOfModule(L,x); + fi; return ChevalleyComplex(L,x); else if IsLeftModuleHomomorphism(L) then return ChevalleyMap(L,x); diff --git a/lib/Operations/hapOps.gi b/lib/Operations/hapOps.gi index 36729da5..4cba5b79 100644 --- a/lib/Operations/hapOps.gi +++ b/lib/Operations/hapOps.gi @@ -816,6 +816,71 @@ end); ########################################################## ########################################################## +########################################################## +########################################################## +InstallOtherMethod(ExpandedComplex, +"Homotopy expanded pure cubical complex", +[IsHapPureCubicalComplex,IsHapPureCubicalComplex], +function(M,S) +local A; + +A:=HomotopyEquivalentLargerSubArray(S!.binaryArray,M!.binaryArray); +return PureCubicalComplex(A);; +end); +########################################################## +########################################################## + +########################################################## +########################################################## +InstallOtherMethod(ExpandedComplex, +"Homotopy expanded pure peermutahedral complex", +[IsHapPurePermutahedralComplex,IsHapPurePermutahedralComplex], +function(M,S) +local A; + +A:=HomotopyEquivalentLargerSubPermArray(S!.binaryArray,M!.binaryArray); +return PurePermutahedralComplex(A);; +end); +########################################################## +########################################################## + + + +########################################################## +########################################################## +InstallOtherMethod(ExpandedComplex, +"Homotopy expanded pure cubical complex", +[IsHapPureCubicalComplex], +function(M) +local A,S; + +S:=0*M!.binaryArray; +S:=S+1; +A:=HomotopyEquivalentLargerSubArray(S,M!.binaryArray); +return PureCubicalComplex(A);; +end); +########################################################## +########################################################## + +########################################################## +########################################################## +InstallOtherMethod(ExpandedComplex, +"Homotopy expanded pure permutahedral complex", +[IsHapPurePermutahedralComplex], +function(M) +local A,S; + +S:=0*M!.binaryArray; +S:=S+1; +A:=HomotopyEquivalentLargerSubPermArray(S,M!.binaryArray); +return PurePermutahedralComplex(A);; +end); +########################################################## +########################################################## + + + + ########################################################## ########################################################## InstallOtherMethod(ContractedComplex, diff --git a/lib/Perturbations/dutour.gi b/lib/Perturbations/dutour.gi index ce23bc57..44a81484 100644 --- a/lib/Perturbations/dutour.gi +++ b/lib/Perturbations/dutour.gi @@ -41,8 +41,8 @@ TransMat:=function(x); return x; end; fi; -#if bool = false then -if false then +if bool = false then +#if false then Print("G-complexes are implemented for the following groups only: \n\n"); lstMathieu:=" SL(2,Z) , SL(3,Z) , PGL(3,Z[i]) , PGL(3,Eisenstein_Integers) , PSL(4,Z) , Sp(4,Z) , \n\n PSL(4,Z)_b , PSL(4,Z)_c , PSL(4,Z)_d \n"; diff --git a/lib/PolyComplexes/filteredCubical.gi b/lib/PolyComplexes/filteredCubical.gi index c4f1823d..cf8a5fff 100644 --- a/lib/PolyComplexes/filteredCubical.gi +++ b/lib/PolyComplexes/filteredCubical.gi @@ -226,7 +226,8 @@ function(file,N) local A, B, C, F, i, j, D; #D:=Int(3*255/N); A:=ReadImageAsPureCubicalComplex(file,"matrix"); -D:=Int((7/10)*Maximum(Flat(A))/N); +#D:=Int((7/10)*Maximum(Flat(A))/N); +D:=1+Int(Maximum(Flat(A))/N); for i in [1..Length(A)] do for j in [1..Length(A[1])] do A[i][j]:=1+Int(A[i][j]/D); @@ -671,3 +672,43 @@ end); +################################################ +################################################ +InstallGlobalFunction(FiltrationTerms, +function(F,L) +local C, A, B, D, fn, ln, i, j, l; + +C:=1*F!.binaryArray; +A:=F!.filtration; +l:=Length(L); + +D:=[[1..L[1]]]; +for i in [2..l] do +Add(D,[1+L[i-1]..L[i]]); +od; +ln:=[1..Length(D)]; +l:=l+1; + +fn:=function(n) +local pos; +pos:=PositionProperty(ln,i-> n in D[i]); +if IsInt(pos) then return pos; fi; +return l; +end; + +B:=0*A;; +for i in [1..Length(B)] do +for j in [1..Length(B[1])] do +B[i][j]:=fn(A[i][j]); +od; +od; + +return Objectify(HapFilteredPureCubicalComplex, + rec(binaryArray:=C, + filtration:=B, + properties:=F!.properties)); + +end); +################################################ +################################################ + diff --git a/lib/PolyComplexes/prog.old b/lib/PolyComplexes/prog.old new file mode 100755 index 00000000..eb1235ff --- /dev/null +++ b/lib/PolyComplexes/prog.old @@ -0,0 +1,18 @@ +#!/usr/bin/perl +# +# Program to convert image text files to GAP matrices. + +($file) = @ARGV; +#$file = '/tmp/im.txt'; # Name the file + +open(INFO, $file); # Open the file +my $line = ; +@parts = split /(:|,)/, $line; +print("HAPAAA:=[\n ",$parts[2],",",$parts[4],","); +while() # Read it into an array +{ +@parts = split m!(,|:|\(|\))!, $_; +print("[",1+$parts[0],",",1+$parts[2],",",$parts[6]+$parts[8]+$parts[10],"],"); +}; # Print the array +print($my,"0];\n"); +close(INFO); diff --git a/lib/PolyComplexes/pureCubicalComplexes.gi b/lib/PolyComplexes/pureCubicalComplexes.gi index 2f4a9a87..122e9144 100644 --- a/lib/PolyComplexes/pureCubicalComplexes.gi +++ b/lib/PolyComplexes/pureCubicalComplexes.gi @@ -322,6 +322,7 @@ A:=[]; for i in [1..B[1]] do A[i]:=List([1..B[2]],a->0); od; + for x in B{[3..Length(B)-1]} do A[x[1]][x[2]]:=x[3]; od; diff --git a/lib/hap.gd b/lib/hap.gd index 575a6e56..7ed477ee 100644 --- a/lib/hap.gd +++ b/lib/hap.gd @@ -417,6 +417,7 @@ DeclareGlobalFunction("ConjugatedResolution"); ## LIE ALGEBRAS ##################################################### DeclareGlobalFunction("ChevalleyEilenbergComplex"); +DeclareGlobalFunction("ChevalleyEilenbergComplexOfModule"); DeclareGlobalFunction("IsLieAlgebraHomomorphism"); DeclareGlobalFunction("LieAlgebraHomology"); DeclareGlobalFunction("LowerCentralSeriesLieAlgebra"); @@ -501,6 +502,7 @@ DeclareAttribute("EulerCharacteristic",IsHapPureCubicalComplex); DeclareAttribute("EulerCharacteristic",IsHapCubicalComplex); DeclareAttribute("EulerCharacteristic",IsHapSimplicialComplex); DeclareOperation("ContractedComplex",[IsObject]);#doc +DeclareOperation("ExpandedComplex",[IsObject]); DeclareGlobalFunction("ReadImageAsPureCubicalComplex");#doc DeclareGlobalFunction("ReadImageAsFilteredPureCubicalComplex");#doc DeclareGlobalFunction("ReadLinkImageAsPureCubicalComplex"); @@ -631,6 +633,7 @@ DeclareGlobalFunction("ThickeningFiltration");#doc DeclareOperation("ConcentricFiltration",[IsHapPureCubicalComplex,IsInt]);#doc DeclareGlobalFunction("Dendrogram"); DeclareOperation("FiltrationTerm",[IsHapPureCubicalComplex,IsInt]); +DeclareGlobalFunction("FiltrationTerms"); DeclareGlobalFunction("FiltrationTermOfPureCubicalComplex"); DeclareGlobalFunction("FiltrationTermOfRegularCWComplex"); DeclareGlobalFunction("FiltrationTermOfGraph"); diff --git a/read.g b/read.g index ccd670b2..81451884 100644 --- a/read.g +++ b/read.g @@ -334,6 +334,7 @@ ReadPackageHap("lib/Resolutions/cayley.gi"); ################### Lie Algebras ################################### ReadPackageHap("lib/LieAlgebras/chevalleyEilenberg.gi"); +ReadPackageHap("lib/LieAlgebras/chev.gi"); ReadPackageHap("lib/LieAlgebras/isLieHom.gi"); ReadPackageHap("lib/LieAlgebras/groupToLie.gi"); ReadPackageHap("lib/LieAlgebras/leibniz.gi"); diff --git a/tutorial/HapTutorial.xml b/tutorial/HapTutorial.xml index d02d2dc4..dfa06c36 100644 --- a/tutorial/HapTutorial.xml +++ b/tutorial/HapTutorial.xml @@ -6,8 +6,8 @@ -A short HAP tutorial -(../www/SideLinks/About/aboutContents.htmlA more comprehensive tutorial is available here
+A newer HAP tutorial +(../www/SideLinks/About/aboutContents.htmlAn older tutorial is available here
and
https://global.oup.com/academic/product/an-invitation-to-computational-homotopy-9780198832980A related book is available here
and
diff --git a/tutorial/images/1V2X.jpg b/tutorial/images/1V2X.jpg deleted file mode 100644 index b610ed82..00000000 Binary files a/tutorial/images/1V2X.jpg and /dev/null differ diff --git a/tutorial/images/3096.jpg b/tutorial/images/3096.jpg new file mode 100644 index 00000000..ecd066e6 Binary files /dev/null and b/tutorial/images/3096.jpg differ diff --git a/tutorial/images/3096b.jpg b/tutorial/images/3096b.jpg new file mode 100644 index 00000000..3b69b352 Binary files /dev/null and b/tutorial/images/3096b.jpg differ diff --git a/tutorial/images/3096final.png b/tutorial/images/3096final.png new file mode 100644 index 00000000..9e4ee17f Binary files /dev/null and b/tutorial/images/3096final.png differ diff --git a/tutorial/images/3096points.png b/tutorial/images/3096points.png new file mode 100644 index 00000000..35ce5643 Binary files /dev/null and b/tutorial/images/3096points.png differ diff --git a/tutorial/images/bccircularGradient.png b/tutorial/images/bccircularGradient.png new file mode 100644 index 00000000..505b87e4 Binary files /dev/null and b/tutorial/images/bccircularGradient.png differ diff --git a/tutorial/images/circularGradient.png b/tutorial/images/circularGradient.png new file mode 100644 index 00000000..345e9830 Binary files /dev/null and b/tutorial/images/circularGradient.png differ diff --git a/tutorial/images/circularGradientSeg.png b/tutorial/images/circularGradientSeg.png new file mode 100644 index 00000000..2b39c33e Binary files /dev/null and b/tutorial/images/circularGradientSeg.png differ diff --git a/tutorial/images/closedcontours.png b/tutorial/images/closedcontours.png new file mode 100644 index 00000000..e30605c0 Binary files /dev/null and b/tutorial/images/closedcontours.png differ diff --git a/tutorial/images/coinsbettizero.gif b/tutorial/images/coinsbettizero.gif index 6d8cd858..ae7c1ed4 100644 Binary files a/tutorial/images/coinsbettizero.gif and b/tutorial/images/coinsbettizero.gif differ diff --git a/tutorial/images/contours.png b/tutorial/images/contours.png new file mode 100644 index 00000000..c163afe1 Binary files /dev/null and b/tutorial/images/contours.png differ diff --git a/tutorial/images/cubicaltorusgens.png b/tutorial/images/cubicaltorusgens.png new file mode 100644 index 00000000..783f3624 Binary files /dev/null and b/tutorial/images/cubicaltorusgens.png differ diff --git a/tutorial/images/data.png b/tutorial/images/data.png new file mode 100644 index 00000000..01f073b9 Binary files /dev/null and b/tutorial/images/data.png differ diff --git a/tutorial/images/imbar0.gif b/tutorial/images/imbar0.gif index 4a8613cc..fd14ba8c 100644 Binary files a/tutorial/images/imbar0.gif and b/tutorial/images/imbar0.gif differ diff --git a/tutorial/images/imbar1.gif b/tutorial/images/imbar1.gif index a85859e2..e74ab330 100644 Binary files a/tutorial/images/imbar1.gif and b/tutorial/images/imbar1.gif differ diff --git a/tutorial/images/refinedbc.gif b/tutorial/images/refinedbc.gif new file mode 100644 index 00000000..7b0cae10 Binary files /dev/null and b/tutorial/images/refinedbc.gif differ diff --git a/tutorial/images/refinedbc0.gif b/tutorial/images/refinedbc0.gif new file mode 100644 index 00000000..8df5c9f2 Binary files /dev/null and b/tutorial/images/refinedbc0.gif differ diff --git a/tutorial/images/syzfab.gif b/tutorial/images/syzfab.gif new file mode 100644 index 00000000..519ac3d9 Binary files /dev/null and b/tutorial/images/syzfab.gif differ diff --git a/tutorial/images/syznil.gif b/tutorial/images/syznil.gif new file mode 100644 index 00000000..8fbbf6d0 Binary files /dev/null and b/tutorial/images/syznil.gif differ diff --git a/tutorial/mybib.xml b/tutorial/mybib.xml index 58a1212a..e6a60f9d 100644 --- a/tutorial/mybib.xml +++ b/tutorial/mybib.xml @@ -53,6 +53,40 @@ 2015
+ + + + DavidCoeurjolly +BertrandKerautret + Jacques-OlivierLachaud + + +Extraction of Connected Region Boundary in +Multidimensional Images + + Image Processing On Line + + 2014 + + + + + +D.Martin +C.Fowlkes +D.Tal +J.Malik + + + A Database of Human Segmented Natural Images and its + Application to Evaluating Segmentation Algorithms and + Measuring Ecological Statistics + +Proc. 8th Int'l Conf. Computer Vision, 2, pp 416--423 + +2001 + + diff --git a/tutorial/tutex/14.2a.txt b/tutorial/tutex/14.2a.txt index ee324020..294c406b 100644 --- a/tutorial/tutex/14.2a.txt +++ b/tutorial/tutex/14.2a.txt @@ -1,3 +1,4 @@ +gap> F:=FreeGroup(2);;D:=F/[F.1^2,F.1*F.2*F.1^-1*F.2^-2];; gap> R:=ResolutionSmallGroup(D,15);; gap> Size(R); [ 4, 7, 8, 6, 4, 8, 8, 6, 4, 8, 8, 6, 4, 8, 8 ] diff --git a/tutorial/tutex/14.2c.txt b/tutorial/tutex/14.2c.txt new file mode 100644 index 00000000..47799da8 --- /dev/null +++ b/tutorial/tutex/14.2c.txt @@ -0,0 +1,16 @@ +gap> Y:=PoincareDodecahedronCWComplex( +> [[1,2,3,4,5],[6,7,8,9,10]], +> [[1,11,16,12,2],[19,9,8,18,14]], +> [[2,12,17,13,3],[20,10,9,19,15]], +> [[3,13,18,14,4],[16,6,10,20,11]], +> [[4,14,19,15,5],[17,7,6,16,12]], +> [[5,15,20,11,1],[18,8,7,17,13]]);; +gap> G:=FundamentalGroup(Y); +<fp group on the generators [ f1, f2 ]> +gap> RelatorsOfFpGroup(G); +[ f2^-1*f1^-1*f2*f1^-1*f2^-1*f1, f2^-1*f1*f2^2*f1*f2^-1*f1^-1 ] +gap> StructureDescription(G); +"SL(2,5)" +gap> R:=ResolutionSmallGroup(G,3);; +gap> List([0..3],R!.dimension); +[ 1, 2, 2, 1 ] diff --git a/tutorial/tutex/4.17.txt b/tutorial/tutex/4.17.txt new file mode 100644 index 00000000..1e45bc54 --- /dev/null +++ b/tutorial/tutex/4.17.txt @@ -0,0 +1,11 @@ +gap> file:=Filename(DirectoriesPackageLibrary("HAP"),"../tutorial/images/circularGradient.png");; +gap> L:=[];; +gap> for n in [1..15] do +> M:=ReadImageAsPureCubicalComplex(file,n*30000); +> M:=PureComplexBoundary(M);; +> Add(L,M); +> od;; +gap> C:=L[1];; +gap> for n in [2..Length(L)] do C:=PureComplexUnion(C,L[n]); od; +gap> Display(C); +gap> Display(ContractedComplex(C)); diff --git a/tutorial/tutex/4.18.txt b/tutorial/tutex/4.18.txt new file mode 100644 index 00000000..d8b8a6ab --- /dev/null +++ b/tutorial/tutex/4.18.txt @@ -0,0 +1,3 @@ +gap> F:=ReadImageAsFilteredPureCubicalComplex(file,20);; +gap> P:=PersistentBettiNumbersAlt(F,1);; +gap> BarCodeCompactDisplay(P); diff --git a/tutorial/tutex/4.19.txt b/tutorial/tutex/4.19.txt new file mode 100644 index 00000000..6d9ec710 --- /dev/null +++ b/tutorial/tutex/4.19.txt @@ -0,0 +1,18 @@ +gap> file:=Filename(DirectoriesPackageLibrary("HAP"),"../tutorial/images/circularGradient.png");; +gap> F:=ReadImageAsFilteredPureCubicalComplex(file,20);; +gap> FF:=ComplementOfFilteredPureCubicalComplex(F); + +gap> W:=(FiltrationTerm(FF,3)); +gap> for n in [4..23] do +> L:=[];; +> for i in [1..PathComponentOfPureComplex(W,0)] do +> P:=PathComponentOfPureComplex(W,i);; +> Q:=ThickeningFiltration(P,150,FiltrationTerm(FF,n));; +> Add(L,Q);; +> od;; +> W:=Basins(L); +> od; + +gap> C:=PureComplexComplement(W);; +gap> T:=PureComplexThickened(C);; C:=ContractedComplex(T,C);; +gap> Display(C); diff --git a/tutorial/tutex/4.5.txt b/tutorial/tutex/4.5.txt index 35f76c03..6955ea27 100644 --- a/tutorial/tutex/4.5.txt +++ b/tutorial/tutex/4.5.txt @@ -1,5 +1,5 @@ gap> file:=HapFile("image1.3.2.png");; -gap> F:=ReadImageAsFilteredPureCubicalComplex(file,20); +gap> F:=ReadImageAsFilteredPureCubicalComplex(file,40); Filtered pure cubical complex of dimension 2. gap> P:=PersistentBettiNumbers(F,0);; gap> BarCodeCompactDisplay(P); diff --git a/tutorial/tutex/4.6a.txt b/tutorial/tutex/4.6a.txt index e3513764..23782c97 100644 --- a/tutorial/tutex/4.6a.txt +++ b/tutorial/tutex/4.6a.txt @@ -1,8 +1,8 @@ -gap> Y:=FiltrationTerm(F,4); +gap> F:=ReadImageAsFilteredPureCubicalComplex(file,500);; +gap> Y:=FiltrationTerm(F,64); Pure cubical complex of dimension 2. gap> BettiNumber(Y,0); 20 gap> BettiNumber(Y,1); 14 gap> Display(Y); - diff --git a/tutorial/tutex/4.6b.txt b/tutorial/tutex/4.6b.txt index 24f31050..4dcda845 100644 --- a/tutorial/tutex/4.6b.txt +++ b/tutorial/tutex/4.6b.txt @@ -1,5 +1,5 @@ -gap> F:=ReadImageAsFilteredPureCubicalComplex("my_coins.png",30);; -gap> M:=FiltrationTerm(F,21);; #Chosen after viewing degree 0 barcode for F +gap> F:=ReadImageAsFilteredPureCubicalComplex("my_coins.png",40);; +gap> M:=FiltrationTerm(F,24);; #Chosen after viewing degree 0 barcode for F gap> M:=PureComplexThickened(M);; gap> M:=PureComplexThickened(M);; gap> C:=PureComplexComplement(M);; diff --git a/tutorial/tutex/4.6d.txt b/tutorial/tutex/4.6d.txt new file mode 100644 index 00000000..14ef04de --- /dev/null +++ b/tutorial/tutex/4.6d.txt @@ -0,0 +1,7 @@ +gap> F:=ReadImageAsFilteredPureCubicalComplex(file,500);; +gap> L:=[20,60,61,62,63,64,65,66,67,68,69,70];; +gap> T:=FiltrationTerms(F,L);; +gap> P0:=PersistentBettiNumbers(T,0);; +gap> BarCodeCompactDisplay(P0); +gap> P1:=PersistentBettiNumbers(T,1);; +gap> BarCodeCompactDisplay(P1); diff --git a/tutorial/tutex/4.6g.txt b/tutorial/tutex/4.6g.txt new file mode 100644 index 00000000..7ad526b6 --- /dev/null +++ b/tutorial/tutex/4.6g.txt @@ -0,0 +1,27 @@ +gap> file:=Filename(DirectoriesPackageLibrary("HAP"),"../tutorial/images/3096b.jpg");; +gap> F:=ReadImageAsFilteredPureCubicalComplex(file,30);; +gap> F:=ComplementOfFilteredPureCubicalComplex(F);; +gap> M:=FiltrationTerm(F,27);; #Thickening chosen based on degree 0 barcode +gap> Display(M);; +gap> P:=List([1..BettiNumber(M,0)],n->PathComponentOfPureComplex(M,n));; +gap> P:=Filtered(P,m->Size(m)>10);; +gap> M:=P[1];; +gap> for m in P do +> M:=PureComplexUnion(M,m);; +> od; +gap> T:=ThickeningFiltration(M,50);; +gap> BettiNumber(FiltrationTerm(T,11),0); +1 +gap> BettiNumber(FiltrationTerm(T,11),1); +1 +gap> BettiNumber(FiltrationTerm(T,12),1); +0 +gap> #Confirmation that 11-th filtration term has one hole and the 12-th term is contractible. +gap> C:=FiltrationTerm(T,11);; +gap> for n in Reversed([1..10]) do +> C:=ContractedComplex(C,FiltrationTerm(T,n)); +> od; +gap> C:=PureComplexBoundary(PureComplexThickened(C));; +gap> H:=HomotopyEquivalentMinimalPureCubicalSubcomplex(FiltrationTerm(T,12),C);; +gap> B:=ContractedComplex(PureComplexBoundary(H));; +gap> Display(B); diff --git a/tutorial/tutex/4.7c.txt b/tutorial/tutex/4.7c.txt new file mode 100644 index 00000000..b0ca1a70 --- /dev/null +++ b/tutorial/tutex/4.7c.txt @@ -0,0 +1,16 @@ +gap> Y2:=FiltrationTerm(F,10);; +gap> for t in Reversed([1..9]) do +> Y2:=ContractedComplex(Y2,FiltrationTerm(F,t)); +> od; +gap> Y2:=ContractedComplex(Y2);; + +gap> Size(FiltrationTerm(F,10)); +918881 +gap> Size(Y2); +61618 + +gap> Y1:=PureComplexDifference(Y2,PureComplexRandomCell(Y2));; +gap> Y1:=ContractedComplex(Y1);; +gap> Size(Y1); +474 +gap> Display(Y1); diff --git a/tutorial/tutex/5.13.txt b/tutorial/tutex/5.13.txt new file mode 100644 index 00000000..407b695c --- /dev/null +++ b/tutorial/tutex/5.13.txt @@ -0,0 +1,9 @@ +gap> n:=3;;c:=1;; +gap> G:=Image(NqEpimorphismNilpotentQuotient(FreeGroup(n),c));; +gap> R:=ResolutionNilpotentGroup(G,4);; +gap> P:=PresentationOfResolution(R);; +gap> P.freeGroup; +<free group on the generators [ x, y, z ]> +gap> P.relators; +[ y^-1*x^-1*y*x, z^-1*x^-1*z*x, z^-1*y^-1*z*y ] +gap> IdentityAmongRelatorsDisplay(R,1); diff --git a/tutorial/tutex/5.14.txt b/tutorial/tutex/5.14.txt new file mode 100644 index 00000000..008019f9 --- /dev/null +++ b/tutorial/tutex/5.14.txt @@ -0,0 +1,9 @@ +gap> n:=2;;c:=2;; +gap> G:=Image(NqEpimorphismNilpotentQuotient(FreeGroup(n),c));; +gap> R:=ResolutionNilpotentGroup(G,4);; +gap> P:=PresentationOfResolution(R);; +gap> P.freeGroup; +<free group on the generators [ x, y, z ]> +gap> P.relators; +[ z*x*y*x^-1*y^-1, z*x*z^-1*x^-1, z*y*z^-1*y^-1 ] +gap> IdentityAmongRelatorsDisplay(R,1); diff --git a/tutorial/tutex/6.31.txt b/tutorial/tutex/6.31.txt new file mode 100644 index 00000000..c9d8a281 --- /dev/null +++ b/tutorial/tutex/6.31.txt @@ -0,0 +1,9 @@ +gap> M:=FullMatrixAlgebra(Rationals,4);; +gap> A:=LieAlgebra(M);; +gap> V:=AdjointModule(A);; +gap> C:=ChevalleyEilenbergComplex(V,17);; +gap> List([0..17],C!.dimension); +[ 16, 256, 1920, 8960, 29120, 69888, 128128, 183040, 205920, 183040, 128128, + 69888, 29120, 8960, 1920, 256, 16, 0 ] +gap> Homology(C,4); +1 diff --git a/tutorial/tutorialGroupCohomology.xml b/tutorial/tutorialGroupCohomology.xml index fe112af7..51332dc7 100644 --- a/tutorial/tutorialGroupCohomology.xml +++ b/tutorial/tutorialGroupCohomology.xml @@ -1,4 +1,4 @@ -Cohomology of groups +Cohomology of groups (and Lie Algebras)

Finite groups Naive homology computation for a very small group @@ -612,5 +612,17 @@ that the Poincare series <#Include SYSTEM "tutex/6.28.txt"> +
+ +
Homology of a Lie algebra with coefficients in a module + + Let A be the Lie algebra constructed from the associative algebra M^{4\times 4}(\mathbb Q) of all 4\times 4 rational matrices. Let V be its adjoint module (with underlying vector space of dimension 16 and + equal to that of A). The following commands compute H_{4}(A,V) = \mathbb Q. + + +<#Include SYSTEM "tutex/6.31.txt"> + + +

Note that the eighth term C_{8}(V) in the Chevalley-Eilenberg complex C_\ast(V) is a vector space of dimension 205920 and so it will take longer to compute the homology in degree 8.

diff --git a/tutorial/tutorialGroupTheoretic.xml b/tutorial/tutorialGroupTheoretic.xml index 2ffe5811..3492dcbc 100644 --- a/tutorial/tutorialGroupTheoretic.xml +++ b/tutorial/tutorialGroupTheoretic.xml @@ -53,6 +53,65 @@ establish that the 2-complex associated to the group presentation < <#Include SYSTEM "tutex/5.3.txt"> + +
Group presentations and homotopical syzygies + Free resolutons for a group G are constructed in HAP + as the cellular chain complex R_\ast=C_\ast(\tilde X) of the universal cover of some + CW-complex X=K(G,1). The 2-skeleton of + X gives rise to a free presentation for the group G. + This presentation depends on a choice of maximal tree in the 1-skeleton of X in cases where X has more than one 0-cell. The attaching maps of + 3-cells in X can be regarded as + homotopical syzygies or van Kampen diagrams over the group presentation whose boundaries spell the trivial word. + +

The following example constructs four terms of + a resolution for the free abelian group G on n=3 generators, and then extracts the group presentation + from the resolution as well as the unique homotopical syzygy. The syzygy is visualized in terms of its graph of edges, + directed edges being coloured according to the corresponding + group generator. (In this example the CW-complex \tilde X is regular, but in cases where it is not the visualization may be a quotient of the 1-skeleton of the syzygy.) + +<#Include SYSTEM "tutex/5.13.txt"> + + +

+<img src="images/syzfab.gif" align="center" height="160" alt="Homotopical syzygy for the free abelian group on three generators"/> + + +

+ This homotopical syzygy represents a relationship between the three relators [x,y], [x,z] and [y,z] where [x,y]=xyx^{-1}y^{-1}. The syzygy can be thought of as a geometric relationship between commutators corresponding to the well-known Hall-Witt identity: +

[\ [x,y],\ {^yz}\ ]\ \ [\ [y,z],\ {^zx}\ ]\ \ [\ [z,x],\ {^xy}\ ]\ \ =\ \ 1\ \ . + +

The homotopical syzygy is special since in this example the edge directions and labels can be understood as specifying three homeomorphisms + between pairs of faces. Viewing the syzygy as the boundary of the 3-ball, by using the homeomorphisms to identify the faces in each face pair we obtain a quotient CW-complex M + involving one vertex, three edges, three 2-cells and one 3-cell. The cell structure on the quotient exists because, + under the restrictions of homomorphisms to the edges, any cycle of edges retricts to the identity map on any given edge. The following + result tells us that M is in fact a closed oriented compact 3-manifold. + +

Theorem. [Seifert u. Threlfall, Topologie, p.208] Let S^2 denote the boundary + of the 3-ball B^3 and suppose + that the sphere S^2 is given a regular CW-structure in which the faces are partitioned into a collection of face pairs. Suppose that for each face pair there is an orientation reversing homeomorphism between the two faces that sends edges to edges and vertices + to vertices. Suppose that by using these homeomorphisms to identity face pairs we obtain a (not necessarily regular) CW-structure on the quotient M. Then M is a closed compact orientable manifold if and only if its Euler characteristic is \chi(M)=0. + +

The next commands construct a presentation and associated unique homotopical syzygy for the free nilpotent group of class c=2 on n=2 generators. + + +<#Include SYSTEM "tutex/5.14.txt"> + + + +

+<img src="images/syznil.gif" align="center" height="160" alt="Homotopical syzygy for the free nilpotent group of class two on two generators"/> + + +

The syzygy represents the following relationship between commutators (in a free group). +

[\ [x^{-1},y][x,y]\ ,\ [y,x][y^{-1},x]y^{-1}\ ]\ [\ [y,x][y^{-1},x]\ + , \ x^{-1} \ ] \ \ =\ \ 1 + + +

+ Again, using the theorem of Seifert and Threlfall we see that the free nilpotent group of class two on two generators arises as + the fundamental group of a closed compact orientable 3-manifold + M. +

Bogomolov multiplier diff --git a/tutorial/tutorialResolutions.xml b/tutorial/tutorialResolutions.xml index e89b35b7..0b125b61 100644 --- a/tutorial/tutorialResolutions.xml +++ b/tutorial/tutorialResolutions.xml @@ -23,11 +23,11 @@ resolution. <#Include SYSTEM "tutex/14.2.txt"> The suspicion that this resolution R_\ast -is periodic of period 4 can be verified by +is periodic of period 4 can be confirmed by constructing the chain complex C_\ast=R_\ast\otimes_{\mathbb Z}\mathbb ZG and verifying that boundary matrices repeat with period 4.

A second example of a periodic resolution, for the Dihedral group -D_{2k+1}=\langle x, y\ |\ x^2= xy^kx^{-1}y^{-k-1}\rangle of order 2k+2 in the case k=1, is constructed and verified for periodicity in the next example. +D_{2k+1}=\langle x, y\ |\ x^2= xy^kx^{-1}y^{-k-1} = 1\rangle of order 2k+2 in the case k=1, is constructed and verified for periodicity in the next example. <#Include SYSTEM "tutex/14.2a.txt"> @@ -46,6 +46,13 @@ A slightly different periodic resolution for D_{2k+1} has been obtain mor <#Include SYSTEM "tutex/14.2b.txt"> +

The performance of the + function ResolutionSmallGroup(G,n) is very sensistive to the choice of presentation for the input group G. If G + is an fp-group then the defining presentation for G is used. If G + is a permutaion group or finite matrix group then GAP functions are invoked to find a presentation for G. The following commands use a geometrically derived presentation for SL(2,5) as input in order to obtain the first few terms of a periodic resolution for this group of period 4. + +<#Include SYSTEM "tutex/14.2c.txt"> +

diff --git a/tutorial/tutorialTDA.xml b/tutorial/tutorialTDA.xml index e53c9996..4aad3f27 100644 --- a/tutorial/tutorialTDA.xml +++ b/tutorial/tutorialTDA.xml @@ -12,6 +12,8 @@ filtration of length 100 on the first two dimensions of the assotiated cl <img src="images/bar0.png" align="center" height="60" alt="degree 0 barcode"/> +

The first 54 terms in the filtration each have 74 path components -- one for each point in the sample. During the next 9 filtration terms the number of path components reduces, meaning that sample points begin to coalesce due to the + formation of edges in the simplicial complexes. Then, two path components persist over an interval of 18 filtration terms, before they eventually coalesce.

The next commands display the resulting degree 1 persistent homology as a barcode. @@ -22,7 +24,8 @@ The next commands display the resulting degree 1 persistent homology as a <img src="images/bar1.png" align="center" height="120" alt="degree 1 bar code"/> -

The following command displays the 1 skeleton of the simplicial complex arizing as the 65-th term in the filtration on the clique complex. +

Interpreting short bars as noise, we see for instance that + the 65th term in the filtration could be regarded as noiseless and belonging to a "stable interval" in the filtration with regards to first and second homology functors. The following command displays (up to homotopy) the 1 skeleton of the simplicial complex arizing as the 65-th term in the filtration on the clique complex. <#Include SYSTEM "tutex/4.3.txt"> @@ -30,13 +33,13 @@ The next commands display the resulting degree 1 persistent homology as a <img src="images/twocircles.png" align="center" height="300" alt="1-skeleton"/> -

These computations suuggest that the dataset contains two persistent +

These computations suggest that the dataset contains two persistent path components (or clusters), and that each path component is in some sense periodic. The final command displays one possible representation of the data as points on two circles. Background to the data -

Each point in the dataset was an image consisting of 732\times 761 pixels. This point was regarded as a vector in \mathbb R^{732\times 761} and the matrix D was constructed using the Euclidean metric. The images were the following: +

Each point in the dataset was an image consisting of 732\times 761 pixels. This point was regarded as a vector in \mathbb R^{557052}=\mathbb R^{732\times 761} and the matrix D was constructed using the Euclidean metric. The images were the following:

<img src="images/letters.png" align="center" height="220" alt="letters"/> @@ -47,7 +50,7 @@ path components (or clusters), and that each path component is in some sense per

Mapper clustering

The following example reads in a set S of vectors of rational numbers. It uses the Euclidean distance d(u,v) between vectors. It fixes -some vector $u_0\in S$ and uses the associated + some vector u_0\in S and uses the associated function f\colon D\rightarrow [0,b] \subset \mathbb R, v\mapsto d(u_0,v). In addition, it uses an open cover of the interval [0,b] consisting of 100 uniformly distributed overlapping open subintervals of radius r=29. It also uses a simple clustering algorithm implemented in the function cluster. @@ -57,7 +60,7 @@ produce a simplicial complex M which is intended to be a representation of the data. The complex M is 1-dimensional and the final command uses GraphViz software to visualize the graph. The nodes of this simplicial -complex are "buckets" containing data points. A data point may reside in several buckets. The number of points in the bucket determines the size of the node. Two nodes are connected by an edge when their end-point nodes contain common data points. +complex are "buckets" containing data points. A data point may reside in several buckets. The number of points in the bucket determines the size of the node. Two nodes are connected by an edge when they contain common data points. <#Include SYSTEM "tutex/4.4.txt"> @@ -76,6 +79,57 @@ complex are "buckets" containing data points. A data point may reside in several

+
Some tools for handling pure complexes + A CW-complex X is said to be pure if all of its top-dimensional cells have a common dimension. There are instances where such + a space X provides a convenient ambient space whose subspaces can be used to model experimental data. For instance, the plane X=\mathbb R^2 admits a pure regular CW-structure whose 2-cells are + open unit squares with integer coordinate vertices. An alternative, and sometimes preferrable, pure regular CW-structure on \mathbb R^2 is one where the 2-cells are all reguar hexagons with sides of unit length. Any digital image can be thresholded to produce a black-white + image and this black-white image can naturally be regared as a finite pure cellular subcomplex of either of the two proposed CW-structures on \mathbb R^2. + Analogously, thresholding can be used to represent 3-dimensional greyscale images as finite pure cellular subspaces + of cubical or permutahedral CW-structures on \mathbb R^3, and to represent RGB colour photographs as + analogous subcomplexes of \mathbb R^5. + +

In this section we list a few functions for performing basic operations on n-dimensional + pure cubical and pure permutahedral finite subcomplexes M of X=R^n. We refer to M simply as a pure complex. In subsequent sections we demonstrate how these few functions on pure complexes allow for in-depth analysis of experimental data. + +

(Aside. The basic operations could equally well be implemented for other CW-decompositions of X=\mathbb R^n such as the regular CW-decompositions arising as the tessellations by a fundamental domain of a Bieberbach group (=torsion free crytallographic group). Moreover, the basic operations could also be implemented for + other manifolds such as an n-torus X=S^1\times S^1 \times \cdots \times S^1 or n-sphere X=S^n or for X the universal cover of some interesting hyperbolic 3-manifold. An example use of the ambient manifold X=S^1\times S^1\times S^1 could be for the construction of a cellular subspace recording the time of day, day of week and week of the year of crimes committed in a population.) + +

Basic operations returning pure complexes. ( Function descriptions available ../doc/chap1_mj.html#X7FD50DF6782F00A0here.) + + + PureCubicalComplex(binary array) + PurePermutahedralComplex(binary array) + ReadImageAsPureCubicalComplex(file,threshold) + + ReadImageSquenceAsPureCubicalComplex(file,threshold) + + PureComplexBoundary(M) + + PureComplexComplement(M) + PureComplexRandomCell(M) + + PureComplexThickened(M) + ContractedComplex(M, optional subcomplex of M) + ExpandedComplex(M, optional supercomplex of M) + + + PureComplexUnion(M,N) + + PureComplexIntersection(M,N) + + PureComplexDifference(M,N) + + FiltrationTerm(F,n) + + +

Basic operations returning filtered pure complexes. + + PureComplexThickeningFiltration(M,length) + + ReadImageAsFilteredPureCubicalComplex(file,length) + + +

Digital image analysis and persistent homology

The following example reads in a digital image as a filtered @@ -98,20 +152,39 @@ The filtration is obtained by thresholding at a sequence of uniformly spaced val

The 20 persistent bars in the -degree 0 barcode suggest that the image has 20 objects. The degree 1 barcode suggests that 14 (or possibly 17) of these objects have holes in them. +degree 0 barcode suggest that the image has 20 objects. The degree 1 barcode suggests that there are 14 (or possibly 17) holes in these 20 objects. Naive example of image segmentation by automatic thresholding Assuming that short bars and isolated points in the barcodes represent noise while long bars represent essential features, a "noiseless" representation of the image should correspond to a term in the filtration corresponding to - a column in the barcode incident with all long bars but incident with no short bars or isolated points. The following commands confirm that the 4th term in the filtration is such a term and display this term as a binary image. + a column in the barcode incident with all the long bars but incident with no short bars or isolated points. There is no noiseless term in the above filtration of length 40. However (in conjunction with the next subsection) the following commands confirm that the 64th term in the filtration of length 500 is such a term and display this term as a binary image. <#Include SYSTEM "tutex/4.6a.txt"> + <img src="images/binaryimage.png" align="center" height="400" alt="binary image"/> +Refining the filtration + The first filtration for the image has 40 terms. One may wish to investigate a filtration with more terms, say 500 terms, with a view to analysing, say, + those 1-cycles that are born by term 25 of the filtration and + that die between terms 50 and 60. The following commands produce the relevant barcode showing that there is precisely one such 1-cycle. + + +<#Include SYSTEM "tutex/4.6d.txt"> + + +

\beta_0:

+<img src="images/refinedbc0.gif" align="center" height="100" alt="bar code"/> +

+ \beta_1:

+ <img src="images/refinedbc.gif" align="center" height="200" alt="bar code"/> + + + + Background to the data

The following image was used in the example. @@ -129,10 +202,10 @@ degree 0 barcode suggest that the image has 20 objects. The degree

we can load the image as a filtered pure cubical complex F -of filtration length 30 say, and observe the degree zero persistent - Betti numbers to establish that the 21-st term or so of F +of filtration length 40 say, and observe the degree zero persistent + Betti numbers to establish that the 28-th term or so of F seems to be 'noise free' in degree zero. We can then set M equal to - the 21-st term of F and thicken M a couple of + the 28-th term of F and thicken M a couple of times say to remove any tiny holes it may have. We can then construct the complement C of M. Then we can construct a 'neighbourhood thickening' filtration @@ -148,10 +221,10 @@ of filtration length 30 say, and observe the degree zero persistent

- The pure cubical complex M has the correct number of path - components, namely 25, but its path components are very much subsets of the regions in the image corresponding to coins. The complex M can be thickened repeatedly, subject to no two path components being allowed to merge, in order to obtain a + The pure cubical complex W:=PureComplexComplement(FiltrationTerm(T,25)) has the correct number of path + components, namely 25, but its path components are very much subsets of the regions in the image corresponding to coins. The complex W can be thickened repeatedly, subject to no two path components being allowed to merge, in order to obtain a more realistic image segmentation with path components corresponding more closely to coins. This is done in the follow commands which use a makeshift - function Basins(L) available tutex/basins.ghere . The commands essentially implement the standard watershed segmentation algorithm but do so by using the language of filtered pure cubical complexes. + function Basins(L) available tutex/basins.ghere . The commands essentially implement a standard watershed segmentation algorithm but do so by using the language of filtered pure cubical complexes. <#Include SYSTEM "tutex/4.6c.txt"> @@ -162,6 +235,100 @@ of filtration length 30 say, and observe the degree zero persistent

+ +
A third example of digital image segmentation + + The following image is number 3096 in the + https://www2.eecs.berkeley.edu/Research/Projects/CS/vision/bsds/ + BSDS500 database of images + + . + +

+ <img src="images/3096.jpg" align="center" height="200" alt="image 3096 from BSDS500"/> + + +

A common first step in segmenting such an image is to appropriately threshold the corresponding gradient image. + +

+ <img src="images/3096b.jpg" align="center" height="200" alt="gradient image"/> + + <img src="images/3096points.png" align="center" height="200" alt="thresholded gradient image"/> + +

+The following commands use the thresholded gradient image to produce an outline of the aeroplane. The outline is a pure cubical complex with one path component and with first Betti number equal to 1. + + +<#Include SYSTEM "tutex/4.6g.txt"> + + + <img src="images/3096final.png" align="center" height="200" alt="outline of aeroplane"/> + + + +

+ +
Naive example of digital image contour extraction + + The following greyscale image is available from the http://www.ipol.im/pub/art/2014/74/FrechetAndConnectedCompDemo.tgzonline appendix to the paper . + +

+ <img src="images/circularGradient.png" align="center" height="250" alt="circular gradient image"/> + + +

The following commands produce a picture of contours from this image based on greyscale values. They also produce a picture of just the closed contours (the non-closed contours having been homotopy collapsed to points). + + +<#Include SYSTEM "tutex/4.17.txt"> + + + Contours from the above greyscale image: +

+ <img src="images/contours.png" align="center" height="250" alt="contours image"/> + +

+ + Closed contours from the above greyscale image: +

+ + <img src="images/closedcontours.png" align="center" height="250" alt="closedcontours image"/> + + +

Very similar results are obtained when applied to the file circularGradientNoise.png, containing noise, available + from + the http://www.ipol.im/pub/art/2014/74/FrechetAndConnectedCompDemo.tgzonline appendix to the paper . + +

The number of distinct "light sources" in the image can be read from the countours. Alternatively, this number can be read directly from the barcode produced by the following commands. + + +<#Include SYSTEM "tutex/4.18.txt"> + + +

+ <img src="images/bccircularGradient.png" align="center" height="250" alt="closedcontours image"/> + +

The seventeen bars in the barcode correspond to seventeen light sources. The length of a bar is a measure of the "persistence" of the corresponding light source. A long bar may initially represent a cluster of several + lights whose members may eventually be distinguished from each other + as new bars (or persistent homology classes) are created. + +

Here the command PersistentBettiNumbersAlt has been used. This command is explained in the following section. + +

The follwowing commands use a watershed method to partition the digital image into regions, one region per light source. + A makeshift + function Basins(L), available tutex/basins.ghere , is called. + (The efficiency of + the example could be easily improved. For simplicity + it uses generic commands which, in principle, can be applied to cubical or permutarhedral complexes of higher dimensions.) + + + +<#Include SYSTEM "tutex/4.19.txt"> + + +

+ <img src="images/circularGradientSeg.png" align="center" height="250" alt="segmented image"/> + +

Alternative approaches to computing persistent homology From any sequence X_0 \subset X_1 \subset X_2 \subset \cdots \subset X_T of cellular spaces @@ -192,9 +359,15 @@ can be computed and the persistent homology can be derived from these homology h

As an illustration we consider a synthetic data set S consisting of 3527 - points sampled, with errors, from an `unknown' manifold M in \mathbb R^3. From such a data set one can associate + points sampled, with errors, from an `unknown' manifold M in \mathbb R^3. + From such a data set one can associate a 3-dimensional - cubical complex X_0 consisting of one unit cube centred on each (suitably scaled) data point. + cubical complex X_0 consisting of one unit cube centred on each (suitably scaled) data point. A visualization of X_0 is shown below. + + +

+<img src="images/data.png" align="center" height="300" alt="data cloud"/> +

Given a pure cubical complex X_s we construct X_{s+1} =X_s \cup \{\overline e^3_\lambda\}_{\lambda\in \Lambda} by adding to X_s each closed unit cube \overline e^3_\lambda in @@ -227,6 +400,26 @@ can be computed and the persistent homology can be derived from these homology h <#Include SYSTEM "tutex/4.7b.txt"> + + +Explicit homology generators + + It could be desirable to obtain explicit representatives of the persistent homology generators that "persist" through a + significant sequence of filtration terms. There are two such generators in degree 1 and one such generator in degree 2. The explicit representatives in degree n could consist of an inclusion of + pure cubical complexes Y_n \subset X_{10} for which the incuced homology + homomorphism H_n(Y_n,\mathbb Z) \rightarrow H_n(X_{10},\mathbb Z) is an isomorphism, and for which Y_n is minimal in the sense that its homotopy type changes if any one or more of its top dimensional cells are removed. + Ideally the space Y_n should be "close to the original dataset" X_0. + The following commands first construct an explicit degree 2 homology generator representative + Y_2\subset X_{10} where Y_2 is homotopy equivalent to X_{10}. + They then construct an explicit degree 1 homology generators representative + Y_1\subset X_{10} where Y_1 is homotopy equivalent to a wedge of two circles. + The final command displays the homology generators representative Y_1. + +<#Include SYSTEM "tutex/4.7c.txt"> + +

+<img src="images/cubicaltorusgens.png" align="center" height="200" alt="first homology generators"/> +

@@ -246,9 +439,10 @@ can be computed and the persistent homology can be derived from these homology h

<img src="images/1v2x.gif" align="center" height="500" alt="a protein backbone"/> - +

The next command reads in the pdb file for the T.thermophilus 1V2X protein and represents it as a 3-dimensional pure cubical complex K. A resolution of r=5 is chosen and this results in a representation as a subcomplex K of an ambient rectangular box of volume equal to 184\times 186\times 294 unit cubes. The complex K should have the homotopy type of a circle and the protein backbone is a 1-dimenional curve that should lie in K. The final command displays K. @@ -259,7 +453,7 @@ can be computed and the persistent homology can be derived from these homology h <img src="images/1v2xcubical.gif" align="center" height="500" alt="pure cubical complex representing a protein backbone"/> diff --git a/version b/version index 4213d88d..0a03ace4 100644 --- a/version +++ b/version @@ -1 +1 @@ -1.61 +1.62 diff --git a/www/SideLinks/About/aboutAbelianCategories.html b/www/SideLinks/About/aboutAbelianCategories.html index 551c3b87..3ec6607a 100644 --- a/www/SideLinks/About/aboutAbelianCategories.html +++ b/www/SideLinks/About/aboutAbelianCategories.html @@ -241,6 +241,12 @@

 Our GAP implementation

gap> #The last line is essentially a commutative diagram. The
gap> #line before it is a diagram which does not commute.

+gap> #Suppose that we need to know if PHI belongs to a category
+gap> #in which there is an initial object.
+
+gap> HasInitialObject(CategoryName(PHI));
+true
+
gap> #Suppose we need to know if some power of the endomorphism PHI
gap> #is equal to the identity

diff --git a/www/SideLinks/About/aboutPersistent.html b/www/SideLinks/About/aboutPersistent.html index 3949993b..582713f4 100644 --- a/www/SideLinks/About/aboutPersistent.html +++ b/www/SideLinks/About/aboutPersistent.html @@ -330,7 +330,7 @@ consider the digital photo.


+ style="width: 499px; height: 376px;" alt="" src="../../../tst/examples/image1.3.2.png">

The 20 longish lines in the following barcode for the degree 0 persistent homology correspond to the 20 objects in the photo. The 14 @@ -347,7 +347,7 @@ gap> -F:=ReadImageAsFilteredCubicalComplex("nb.png",20);
+F:=ReadImageAsFilteredCubicalComplex("image1.3.2.png",20);
Filtered pure cubical complex of dimension 2.

gap> P0:=PersistentHomologyOfFilteredCubicalComplex(F,0);;
diff --git a/www/SideLinks/About/nb.png b/www/SideLinks/About/nb.png deleted file mode 100644 index d22ebbba..00000000 Binary files a/www/SideLinks/About/nb.png and /dev/null differ diff --git a/www/download/downloadContent.html b/www/download/downloadContent.html index c88bf9a3..ed860234 100644 --- a/www/download/downloadContent.html +++ b/www/download/downloadContent.html @@ -19,23 +19,23 @@

Download Instructions

  • First download the file hap1.61.tar.gz + href="https://github.com/gap-packages/hap/releases/download/v1.62/hap-1.62.tar.gz">hap1.62.tar.gz which contains the most recent development version of HAP to the subdirectory "pkg/" of GAP. If you don't have access to this subdirectory, then create a directory "pkg" in your home directory and download the file there. (If you'd prefer to download the most recent development version of HAP then download the file  hap1.61-dev.tar.gz + href="https://github.com/gap-packages/hap/releases/download/v1.47/hap-1.47.tar.gz">hap1.62-dev.tar.gz instead.)
  • Change to directory "pkg/" and type "gunzip -hap1.61.tar.gz" +hap1.62.tar.gz" followed by "tar --xvf hap1.61.tar" .
  • +-xvf hap1.62.tar" .
  • Start GAP. (If you have created "pkg" in your home @@ -51,7 +51,7 @@

    Download Instructions

  • Help on HAP can be found on the HAP home page (a version of which is included in directory -"pkg/Hap1.61/www" of the distribution).
  • +"pkg/Hap1.62/www" of the distribution).
  • A few of HAP's (optional) functions rely on Polymake @@ -67,7 +67,7 @@

    Download Instructions

  • Performance can be improved by using a compiled version of the HAP library. The following steps will produce a compiled version.
    -(1) Change to the directory "pkg/Hap1.61/" .
    +(1) Change to the directory "pkg/Hap1.62/" .
    (2) Edit the file "compile" so that: PKGDIR is equal to the path to the
    directory "pkg" where your GAP packages are stored; GACDIR is equal to the
    @@ -78,7 +78,7 @@

    Download Instructions

    • Should you want to return to an uncompiled version, change to the directory
      -"pkg/Hap1.61/" and type "./uncompile".
    • +"pkg/Hap1.62/" and type "./uncompile".
diff --git a/www/home/content.html b/www/home/content.html index 7df15d52..79a8bdb7 100644 --- a/www/home/content.html +++ b/www/home/content.html @@ -15,8 +15,8 @@ algebra library for use with the GAP computer algebra system, and is still under development. The current version hap1.61.tar.gz was released on -02 Jan 2024.

+ href="https://github.com/gap-packages/hap/releases/download/v1.62/hap-1.62.tar.gz">hap1.62.tar.gz was released on +01 Feb 2024.

diff --git a/www/home/hap.pdf b/www/home/hap.pdf index 8f0a386e..d6f25155 100644 Binary files a/www/home/hap.pdf and b/www/home/hap.pdf differ