Martin Baker wrote: > > bugs now fixed. > > I have updated my groupPresentation.spad and algebraictopology.spad > files to fix the bug with homotopy of cubical complexes. The simplicial > and cubical examples now give the same results as shown below.
Good. > If anyone would like to try the code it is in usual place: > > https://github.com/martinbaker/multivector/blob/master/logic.spad > https://github.com/martinbaker/multivector/blob/master/graph.spad > https://github.com/martinbaker/multivector/blob/master/groupPresentation.spad > https://github.com/martinbaker/multivector/blob/master/algebraictopology.spad There were spelling fixes a probably also some other fixes to graph.spad in the trunk, but your version apparently does not contain them. You put URL-s into the files and apparently the ones you use now are different than old version. Since there are many trival differences I stopped looking at graph.spad -- first you should decide which changes you want. I looked a bit at groupPresentation.spad. I must say that I do not like "equality" there: normally in math one can replace equal by equal, but "=" from GroupPresentation returns true for quite different groups. The comment is misleading: if you really mean isomorphism, then the groups may be isomorphic even if "=" returns false. And of course the groups may fail to be isomorphic when it returns true. Also, for group presentations we would rather use "identity mapping on generators extends to isomorphism" than plain isomorphism. I also looked at 'genName'. Using character codes here is bad style: it would be much better to use indexing into a string to produce letters. Your comment says that you want to skip over 'e' (to reserve it as unit), but you also skip over 'g'. Your code returns 'e' even if the 'suffix' is nonzero, but IIUC you should produce letter with suffic in such case. Loop at the beginning is doing division with remainder, we have a function for this. Something like (suffix, i) := divide(abs(i2), 25) should do. Since you skip over one letter the correct divisor is 25. Concerning 'removeGen2': the standard idiom with list processing is to build list in reverse order, than reverse it. Like: -- local function to remove generator 'val' from relations removeGen2(rels1:List(List(Integer)),val:NNI):List(List(Integer)) == rels2:List(List(Integer)) := empty$List(List(Integer)) for rule in rels1 repeat rule2 := remove(val::Integer,rule) rule2 := remove(-val,rule2) rels2 := cons(rule2, rels2) reverse!(rels2) Or using list processing: removeGen2(rels1:List(List(Integer)),val:NNI):List(List(Integer)) == [remove(-val, remove(val::Integer,rule)) for rule in rels1] -- Waldek Hebisch -- You received this message because you are subscribed to the Google Groups "FriCAS - computer algebra system" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/fricas-devel. For more options, visit https://groups.google.com/d/optout.
