Ask Your Question

Ingrid's profile - activity

2024-01-16 05:54:38 +0200 received badge  Famous Question (source)
2023-11-17 10:08:01 +0200 received badge  Notable Question (source)
2023-06-18 12:22:38 +0200 received badge  Notable Question (source)
2022-08-20 06:04:47 +0200 received badge  Popular Question (source)
2022-08-08 10:29:28 +0200 received badge  Popular Question (source)
2022-04-28 07:44:59 +0200 received badge  Notable Question (source)
2021-11-16 07:11:55 +0200 received badge  Popular Question (source)
2021-09-13 11:23:08 +0200 commented question While loops

Thanks Emmanuel, there are some helpful examples there.

2021-09-13 10:14:57 +0200 asked a question While loops

While loops The goal to find the smallest value of a that satisfies the condition below. I realise I could use "if" inst

2021-04-09 13:33:48 +0200 answered a question RecursionError long lists

I have found the problem. Sorry for wasting your time everyone. The lists themselves were not too long. There was a frea

2021-04-09 05:53:19 +0200 asked a question RecursionError long lists

RecursionError long lists I am working with long lists, and getting the error "RecursionError: maximum recursion depth e

2021-04-05 07:54:18 +0200 commented answer simplifying a simplicial set

I am relieved, that sounds much faster than I had expected!! I am fixing up an error I make labelling and enumerating si

2021-04-04 07:08:59 +0200 commented answer simplifying a simplicial set

Thanks very much for your help! My problem is with the large number of 4- and 5- dimensional simplices; there are not ne

2021-04-03 10:21:48 +0200 asked a question simplifying a simplicial set

simplifying a simplicial set The starting point to this question is a simplicial set with a large number of simplices. S

2021-03-26 11:38:00 +0200 commented answer Constructing words or strings using iteration

Thanks Sam

2021-03-26 11:37:45 +0200 marked best answer Constructing words or strings using iteration

It is not allowed to label simplices with numbers or lists, and I want to enter a few thousand simplices. I am therefore trying to do something that naively looks like this:

sage: from sage.homology.simplicial_set import AbstractSimplex, SimplicialSet
sage: for i in range(4):
....:     Word(('v', i)) = AbstractSimplex(0)

I have also tried using strings. Does anyone know how to do this?

2021-03-26 09:42:43 +0200 asked a question Constructing words or strings using iteration

Constructing words or strings using iteration It is not allowed to label simplices with numbers or lists, and I want to

2021-02-25 00:01:07 +0200 received badge  Nice Question (source)
2021-02-24 03:41:48 +0200 commented answer alternative to jupyter notebook?

I haven't got jupyterlab working yet, but yes, I do have thousands of lines. If everything works out, I will want to put the results into a .tex file Long term this definitely sounds like what I need. Thanks.

2021-02-24 03:41:48 +0200 received badge  Commentator
2021-02-24 03:15:27 +0200 commented question alternative to jupyter notebook?

Thanks, saving does help. I have no understanding of this process; why most of my stuff can be saved individually but is not saved when I save the session, or the ipynb file. For the moment, as long as it works. I've started on a newer computer, with more RAM, which also helps with some of the issues. Learning Linux will have to wait until we get IT support :-)

2021-02-23 06:11:34 +0200 asked a question alternative to jupyter notebook?

I have a number of problems using Jupyter notebook, windows 10. When my .ipynb file reaches a certain length, sage basically grinds to a halt, and I need to start a new file. When doing a long calculation, where each bit needs the calculations from the previous part, this isn't practical. Also, when I "save" an .ipynb file, the actual calculations aren't saved, and each file takes about half a day to go through and recalculate everything again. I have about 5 files now, and the power keeps flickering on and off briefly... Also, it happens constantly that sage won't let me type anything in. This can last for up to 10 minutes at a time, and seems to have something to do with the way the file is saved. I haven't even reached the final part of my calculation, which is the part I expect to be the slowest by far. My husband tells me to stop messing around with windows and learn Linux. Any other suggestions? Thanks very much!

2021-02-10 12:37:36 +0200 commented answer cell complexes vs simplicial complexes

Thanks, both of you, for confirming what I was beginning to be afraid of. I don't know how to describe continuous functions in sage, but for all the examples I can think of, the maps can be described as being piecewise linear.

2021-02-09 11:56:32 +0200 received badge  Nice Question (source)
2021-02-09 08:02:06 +0200 commented answer Polyhedra, facets and vertices

Thanks a lot John, I should have realised that.

2021-02-09 06:41:25 +0200 asked a question cell complexes vs simplicial complexes

I have spent several days googling, but am not able to find any basic information for working with cell complexes in sage. I am using windows 10 , sage 9.1 where the help function doesn't work.

What I need to be able to do is to enter a cell complex, add cells, delete cells and subdivide. I already have functions defined that could be used to specify the gluing maps. There seems to be slightly more information available for working with simplicial complexes. If I were to subdivide my cell complex, I would get a simplicial complex; there are no exotic gluing maps. However, because the cells are high dimensional, the number of simplicies is huge after subdivision, and I am not sure I could correctly enter all that information by hand. Any suggestions would be very appreciated! If anyone has a file to share in which they have worked with cell complexes or simplicial complexes, that would also be really helpful to me to learn the syntax.

2021-02-08 04:19:45 +0200 commented answer Polyhedra, facets and vertices

Ah, ok. It would be best if I could share the ipynb file, but I can't put anything on my website without help from someone who speaks Chinese, and everyone is on holiday for the new year celebrations. Cocalc wants a lot of money for me to share files.

P1=Polyhedron(ieqs=Lconstraints, base_ring=QQ)

I've put the list Lconstraints here: https://pastebin.com/Uc8ANHcv

When I enter P1.faces(5).vertices() or P1.faces(5).vertices_list()

I get the error

AttributeError: 'tuple' object has no attribute 'vertices'

Thanks a lot everyone!

2021-02-07 04:24:22 +0200 commented answer Polyhedra, facets and vertices

Is there some way I can upload a file? The list of constraints used to define the polyhedron is too big to fit here.

2021-02-06 12:05:50 +0200 answered a question Polyhedra, facets and vertices

Thanks! When I changed to QQ, the two spurious 6-dimensional faces disappeared.

However, now I get the error message "AttributeError: 'tuple' object has no attribute 'vertices'" for P1.faces(5)[0].vertices() as well as for P1.faces(5)[0].vertices_list()

2021-02-06 10:10:56 +0200 asked a question Polyhedra, facets and vertices

I have a 6-dimensional, convex, compact polyhedron in $\mathbb{R}^{12}$, that I am calling P1. The polyhedron P1 was specified by giving a large number of inequalities. When I enter P1.faces(5) into Sage, I get the following

(A 5-dimensional face of a Polyhedron in RDF^12 defined as the convex hull of 6 vertices,
 A 5-dimensional face of a Polyhedron in RDF^12 defined as the convex hull of 7 vertices,
 A 5-dimensional face of a Polyhedron in RDF^12 defined as the convex hull of 7 vertices,
 A 6-dimensional face of a Polyhedron in RDF^12 defined as the convex hull of 7 vertices,
 A 5-dimensional face of a Polyhedron in RDF^12 defined as the convex hull of 6 vertices,
 A 6-dimensional face of a Polyhedron in RDF^12 defined as the convex hull of 8 vertices,
 ...)

How can there be two 6-dimensional faces, each with a different number of vertices, on the boundary of P1? I have checked that P1 really does have dimension 6.

Also, when I try to find a list of vertices on the boundary of any 5-dimensional face of P1, for example

P1.faces(5)[0].vertices_list()

I get an error message

AttributeError: 'tuple' object has no attribute 'vertices_list'

However, P1.faces(5)[0].vertices() works.

My second question is, how do I get a list of vertices on the boundary of an $n$-dimensional face?

2020-12-08 11:09:49 +0200 commented answer copying lists, embedded multigraphs

Thanks heaps!!!

2020-12-08 11:09:33 +0200 received badge  Scholar (source)
2020-12-08 03:34:24 +0200 asked a question copying lists, embedded multigraphs

I am working with planar, embedded, labelled multigraphs. I am trying to define a function face_modification that modifies the set of faces when an edge of the graph is deleted. I thought that when taking a copy of a list, and altering the copy, the original list would not change. However, when I evaluate the function face_modification below, with Gf=F1, my original list (F1) is being altered, and I can't figure out why or how to prevent it.

Here, G1 is the labelled graph without double edges, Gd is the graph of double edges, Gt is the graph of triple edges, and Gf is a list, the i-th entry of which is a list of labelled edges on the boundary of face i.

def edge_on_faces(j, S, Gf, G1, Gd, Gt):
    variables = ([G1.edges()[i][2] for i in range(len(G1.edges()))] +
                 [Gd.edges()[i][2] for i in range(len(Gd.edges()))] +
                 [Gt.edges()[i][2] for i in range(len(Gt.edges()))])
    if j in range(len(variables)):
        if [str(Gf[n][q][2]) == str(variables[j])
            for n in S for q in range(len(Gf[n]))].count(True) > 0:
            return 1 
        else:
            return 0
    else:
        return 0

def face_modification(i, Gf, G1, Gd, Gt):
    variables = ([G1.edges()[k][2] for k in range(len(G1.edges()))] +
                 [Gd.edges()[k][2] for k in range(len(Gd.edges()))] +
                 [Gt.edges()[k][2] for k in range(len(Gt.edges()))])
    l = [m for m in range(len(Gf)) if edge_on_faces(i, [m], Gf, G1, Gd, Gt)==1]
    # PF: list of two faces in Gf with the ith edge on the boundary
    PF = [Gf.copy()[l[p]] for p in range(len(l))]
    GGf = Gf.copy()
    for m in range(len(PF)):
        GGf.remove(PF[m])
        for k in range(len(PF[m])):
            if str(PF[m][k][2]) == str(variables[i]):
                PF[m].remove(PF[m][k])
            else:
                PF[m] = PF[m]
    if len(PF) == 2:
        B = GGf + [PF[0] + PF[1]]
        return B
    else:
        return 'error'

Thanks a lot for your help!

2020-12-02 15:36:05 +0200 received badge  Student (source)