ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Mon, 05 Apr 2021 18:23:30 +0200simplifying a simplicial sethttps://ask.sagemath.org/question/56477/simplifying-a-simplicial-set/The starting point to this question is a simplicial set with a large number of simplices. Sage is still computing exactly how many, but in dimension 4 there are more than 100,000 simplices. Is there a command similar to X.shrink_simplicial_complex(K), but for which the input is already a simplicial set? I am fairly certain this simplicial set description of a cell complex can be described much, much more efficiently. I would like to be able to compute homology and cohomology, but my guess is that this won't be feasible unless I can first simplify.Sat, 03 Apr 2021 10:21:48 +0200https://ask.sagemath.org/question/56477/simplifying-a-simplicial-set/Answer by John Palmieri for <p>The starting point to this question is a simplicial set with a large number of simplices. Sage is still computing exactly how many, but in dimension 4 there are more than 100,000 simplices. Is there a command similar to X.shrink_simplicial_complex(K), but for which the input is already a simplicial set? I am fairly certain this simplicial set description of a cell complex can be described much, much more efficiently. I would like to be able to compute homology and cohomology, but my guess is that this won't be feasible unless I can first simplify.</p>
https://ask.sagemath.org/question/56477/simplifying-a-simplicial-set/?answer=56485#post-id-56485The `reduce` method is the only one available, and that just collapses a spanning tree to a point, so it only affects 0- and 1-simplices. Maybe the optional Sage package `kenzo` and its simplicial set implementation provides something; see https://doc.sagemath.org/html/en/reference/interfaces/sage/interfaces/kenzo.html.Sat, 03 Apr 2021 23:43:42 +0200https://ask.sagemath.org/question/56477/simplifying-a-simplicial-set/?answer=56485#post-id-56485Comment by John Palmieri for <p>The <code>reduce</code> method is the only one available, and that just collapses a spanning tree to a point, so it only affects 0- and 1-simplices. Maybe the optional Sage package <code>kenzo</code>and its simplicial set implementation provides something; see <a href="https://doc.sagemath.org/html/en/reference/interfaces/sage/interfaces/kenzo.html">https://doc.sagemath.org/html/en/refe...</a>.</p>
https://ask.sagemath.org/question/56477/simplifying-a-simplicial-set/?comment=56507#post-id-56507I didn't compute over Z. The answer over Q was correct. Sage's rationals and integers should work to arbitrary precision or whatever the term is — there shouldn't be any rounding errors.Mon, 05 Apr 2021 18:23:30 +0200https://ask.sagemath.org/question/56477/simplifying-a-simplicial-set/?comment=56507#post-id-56507Comment by Ingrid for <p>The <code>reduce</code> method is the only one available, and that just collapses a spanning tree to a point, so it only affects 0- and 1-simplices. Maybe the optional Sage package <code>kenzo</code>and its simplicial set implementation provides something; see <a href="https://doc.sagemath.org/html/en/reference/interfaces/sage/interfaces/kenzo.html">https://doc.sagemath.org/html/en/refe...</a>.</p>
https://ask.sagemath.org/question/56477/simplifying-a-simplicial-set/?comment=56500#post-id-56500I am relieved, that sounds much faster than I had expected!! I am fixing up an error I make labelling and enumerating simplices. Once that is sorted I will be able to experiment. Updating the dictionary that defines the simplicial set might be what takes longest. When computing in Q or Z, did you get any bogus terms due to rounding errors?Mon, 05 Apr 2021 07:54:18 +0200https://ask.sagemath.org/question/56477/simplifying-a-simplicial-set/?comment=56500#post-id-56500Comment by John Palmieri for <p>The <code>reduce</code> method is the only one available, and that just collapses a spanning tree to a point, so it only affects 0- and 1-simplices. Maybe the optional Sage package <code>kenzo</code>and its simplicial set implementation provides something; see <a href="https://doc.sagemath.org/html/en/reference/interfaces/sage/interfaces/kenzo.html">https://doc.sagemath.org/html/en/refe...</a>.</p>
https://ask.sagemath.org/question/56477/simplifying-a-simplicial-set/?comment=56498#post-id-56498Warning: it took over 90 minutes with rational coefficients. Finite fields seem to be much faster: under 2 minutes for fields of size 2, 3, 17, 137.Mon, 05 Apr 2021 04:18:24 +0200https://ask.sagemath.org/question/56477/simplifying-a-simplicial-set/?comment=56498#post-id-56498Comment by John Palmieri for <p>The <code>reduce</code> method is the only one available, and that just collapses a spanning tree to a point, so it only affects 0- and 1-simplices. Maybe the optional Sage package <code>kenzo</code>and its simplicial set implementation provides something; see <a href="https://doc.sagemath.org/html/en/reference/interfaces/sage/interfaces/kenzo.html">https://doc.sagemath.org/html/en/refe...</a>.</p>
https://ask.sagemath.org/question/56477/simplifying-a-simplicial-set/?comment=56496#post-id-56496Computations over a field (Q or Fp) will be faster than over Z, but I don't know if it will be enough to make a difference. Can you try with some smaller examples to see how long the computations actually take? I tried with a simplicial set with f-vector `[1, 0, 11, 166, 1621, 9000, 29175, 56070, 62790, 37800, 9450]`, and it took about 2 minutes to compute the mod 2 homology. Rational homology takes longer, and presumably integral homology even longer, but I haven't gotten to that yet.Mon, 05 Apr 2021 00:16:56 +0200https://ask.sagemath.org/question/56477/simplifying-a-simplicial-set/?comment=56496#post-id-56496Comment by Ingrid for <p>The <code>reduce</code> method is the only one available, and that just collapses a spanning tree to a point, so it only affects 0- and 1-simplices. Maybe the optional Sage package <code>kenzo</code>and its simplicial set implementation provides something; see <a href="https://doc.sagemath.org/html/en/reference/interfaces/sage/interfaces/kenzo.html">https://doc.sagemath.org/html/en/refe...</a>.</p>
https://ask.sagemath.org/question/56477/simplifying-a-simplicial-set/?comment=56487#post-id-56487Thanks very much for your help! My problem is with the large number of 4- and 5- dimensional simplices; there are not nearly so many lower dimensional simplices. Suppose I added extra vertices to get a simplicial complex. If I took a dual, is there some way of getting around the fact that the resulting "polytopal complex" isn't implemented yet in sage? I would want to find a maximal spanning tree in the dual, and collapse that.
One way or the other, I can reduce the number of simplices by some multiplicative factor. Do you have an estimate of the maximal size of a simplicial set for which sage can realistically compute homology and cohomology? I could imagine allowing the computer to run for months, but not years. Would it help to calculate in Fp, and take limits?Sun, 04 Apr 2021 07:08:59 +0200https://ask.sagemath.org/question/56477/simplifying-a-simplicial-set/?comment=56487#post-id-56487Comment by John Palmieri for <p>The <code>reduce</code> method is the only one available, and that just collapses a spanning tree to a point, so it only affects 0- and 1-simplices. Maybe the optional Sage package <code>kenzo</code>and its simplicial set implementation provides something; see <a href="https://doc.sagemath.org/html/en/reference/interfaces/sage/interfaces/kenzo.html">https://doc.sagemath.org/html/en/refe...</a>.</p>
https://ask.sagemath.org/question/56477/simplifying-a-simplicial-set/?comment=56486#post-id-56486You could try to reproduce `shrink_simplicial_complex` by hand: try to identify a large contractible subcomplex and then take the quotient. How you identify that subcomplex will depend on the simplicial set you're working with.Sun, 04 Apr 2021 00:55:29 +0200https://ask.sagemath.org/question/56477/simplifying-a-simplicial-set/?comment=56486#post-id-56486