Characteristic Classes - Implement Vector Bundles?

161 views
Skip to first unread message

Michael Jung

unread,
May 2, 2019, 7:12:43 AM5/2/19
to sage-devel
Hey there,
for the next step of implementing characteristic classes, I'd like to implement abstract vector bundles.

1) Do you agree?
2) How would you proceed in doing so? It seems like it's not an easy task at all (at least if you wish having all functionalities).

I mean, for characteristic classes, you only need abstract local frames. Maybe, I can start with that and leave other functionalities open for later? And if yes, how can you manage that?

Thanks for your help!

Best regards,
Michael

Eric Gourgoulhon

unread,
May 3, 2019, 5:24:57 AM5/3/19
to sage-devel
Hi,


Le jeudi 2 mai 2019 13:12:43 UTC+2, Michael Jung a écrit :
Hey there,
for the next step of implementing characteristic classes, I'd like to implement abstract vector bundles.

1) Do you agree?

Having vector bundles would be nice! But what do you mean by *abstract* vector bundle?

2) How would you proceed in doing so? It seems like it's not an easy task at all (at least if you wish having all functionalities).

I mean, for characteristic classes, you only need abstract local frames. Maybe, I can start with that and leave other functionalities open for later? And if yes, how can you manage that?

As a general rule, it is indeed better to introduce things step by step, in a sequence of tickets, instead of a single big ticket.

Best wishes,

Eric.

Michael Jung

unread,
May 3, 2019, 4:39:49 PM5/3/19
to sage-...@googlegroups.com
Hello,
> Having vector bundles would be nice! But what do you mean by
> *abstract* vector bundle?
Ah. I meant vector bundles without specifying any maps. But since
changes of frames/coordinates and continuations are convenient to have,
this seems unavoidable. Where would you start if you'd program a vector
bundle?
> As a general rule, it is indeed better to introduce things step by
> step, in a sequence of tickets, instead of a single big ticket.

Then, it would be better to start with the tangent bundle, to introduce
the algorithm and concepts first.

Best regards,
Michael


---
Diese E-Mail wurde von Avast Antivirus-Software auf Viren geprüft.
https://www.avast.com/antivirus

Michael Jung

unread,
May 14, 2019, 1:34:51 PM5/14/19
to sage-devel
Unfortunately, I noticed that the algorithm of computing the determinant of MixedForm elements doesn't work for matrices of dimension higher than 3 since MixedFormAlgebra isin general not a field.

So, is it useful to create a new matrix class for this kind of purpose? If so, how is the matrix implementation structured in sagemath? I couldn't find any helpful documentation.

And furthermore, what would be an appropriate efficient algorithm to compute the determinant? Is it possible to use parallel processing, and if so, how?

Best regards
Michael

Travis Scrimshaw

unread,
May 14, 2019, 7:56:43 PM5/14/19
to sage-devel
I think a lot of the matrix code is assumed to work over commutative rings, but there is no assumption on them being fields. The MixedFormAlgebra is not commutative, correct? If so, I think the best thing is to implement what you need (i.e., the determinant) as a separate function for now. Otherwise, you should mark it in Algebras(R).Commutative() and you should be able to just use the generic matrix class and its determinant in Sage.

sage: R.<x,y,z> = QQ[]
sage
: Q = R.quotient([x^2*y-x,y^2-z,z^2-2*x*y-x-y-z])
sage
: M = matrix([[Q(R.random_element()) for _ in range(3)] for _ in range(3)])
sage
: M
[ -35/2*ybar*zbar + 1/2*zbar^2 - 1/2*xbar - 1/2*ybar + 1/2*zbar                     xbar*zbar + 3*zbar^2 - 1/3*ybar + 2/3*zbar -13*xbar^2 - 3*xbar*zbar - 1/2*ybar*zbar - 5*zbar^2 - 1/2*xbar]
[                   1/2*zbar^2 + 1/2*xbar - 3/2*ybar + 9/2*zbar                                  8*xbar*zbar + 2*zbar^2 - 1/38                                       2*xbar^2 - zbar^2 + ybar]
[      -1/6*ybar*zbar + 43/41*zbar^2 - xbar - ybar - zbar + 5/2              83/414*zbar^2 + 1/46*xbar + 1/46*ybar + 1/46*zbar               -27/2*zbar^2 + 191/14*xbar + 13*ybar + 25/2*zbar]
sage
: M.det()
8984729371/2006704*zbar^3 + 8060049989/2257542*xbar^2 + 14983126743/2006704*xbar*zbar - 78071057467/18060336*ybar*zbar + 2763514553/785232*zbar^2 + 648366185/125419*xbar - 23760880219/3010056*ybar - 573699071/73416*zbar
sage
: type(M)
<type 'sage.matrix.matrix_generic_dense.Matrix_generic_dense'>

Best,
Travis

Michael Jung

unread,
May 15, 2019, 7:51:01 AM5/15/19
to sage-devel
Actually, I get the error:

---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
<ipython-input-10-6078cc2f8a98> in <module>()
----> 1 det = matrix.determinant(); show(det)

/home/michi/GitProjects/sage/local/lib/python2.7/site-packages/sage/matrix/matrix2.pyx in sage.matrix.matrix2.Matrix.determinant (build/cythonized/sage/matrix/matrix2.c:15032)()
   1675         if algorithm is None:
   1676             try:
-> 1677                 R_is_field_attempt = R.is_field()
   1678             except NotImplementedError:
   1679                 R_is_field_attempt = False

/home/michi/GitProjects/sage/local/lib/python2.7/site-packages/sage/structure/category_object.pyx in sage.structure.category_object.CategoryObject.__getattr__ (build/cythonized/sage/structure/category_object.c:6865)()
    832             AttributeError: 'PrimeNumbers_with_category' object has no attribute 'sadfasdf'
    833         """
--> 834         return self.getattr_from_category(name)
    835
    836     cdef getattr_from_category(self, name):

/home/michi/GitProjects/sage/local/lib/python2.7/site-packages/sage/structure/category_object.pyx in sage.structure.category_object.CategoryObject.getattr_from_category (build/cythonized/sage/structure/category_object.c:7028)()
    847                 cls = self._category.parent_class
    848
--> 849             attr = getattr_from_other_class(self, cls, name)
    850             self.__cached_methods[name] = attr
    851             return attr

/home/michi/GitProjects/sage/local/lib/python2.7/site-packages/sage/cpython/getattr.pyx in sage.cpython.getattr.getattr_from_other_class (build/cythonized/sage/cpython/getattr.c:2540)()
    387         dummy_error_message.cls = type(self)
    388         dummy_error_message.name = name
--> 389         raise AttributeError(dummy_error_message)
    390     cdef PyObject* attr = instance_getattr(cls, name)
    391     if attr is NULL:

AttributeError: 'MixedFormAlgebra_with_category' object has no attribute 'is_field'

However, the interesting part for me is the commutative subalgebra of even mixed forms which I could certainly implement. But I am not sure whether this will work due to the error message above...

Travis Scrimshaw

unread,
May 15, 2019, 8:48:59 AM5/15/19
to sage-devel

However, the interesting part for me is the commutative subalgebra of even mixed forms which I could certainly implement. But I am not sure whether this will work due to the error message above...

The error message indicates what you need to do: implement an is_field() method that returns False.

Best,
Travis

Michael Jung

unread,
May 18, 2019, 10:50:10 AM5/18/19
to sage-...@googlegroups.com

Damn it, I feel so stupid! :D Thanks, this did the job. :)

--
You received this message because you are subscribed to a topic in the Google Groups "sage-devel" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/sage-devel/xhTN8O4qDdQ/unsubscribe.
To unsubscribe from this group and all its topics, send an email to sage-devel+...@googlegroups.com.
To post to this group, send email to sage-...@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
To view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/8ca550d5-5b8f-47c2-ab0e-a8104854afb5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Virenfrei. www.avast.com

Michael Jung

unread,
Jun 6, 2019, 10:08:38 AM6/6/19
to sage-devel
How can I delete the actual branch on trac and create a new one?

And: How do I merge properly to the recent beta version?

I am sorry, it seems I'm too stupid for git trac.

Dima Pasechnik

unread,
Jun 6, 2019, 11:13:53 AM6/6/19
to sage-devel


On Thu, 6 Jun 2019 15:08 Michael Jung, <mic...@uni-potsdam.de> wrote:
How can I delete the actual branch on trac and create a new one?

this can be done with the usual git commands - google for git delete remote branch



And: How do I merge properly to the recent beta version?

a proper way would be to do git rebase
git merge might be easier.

suppose your remote, pointed at git trac server, is called trac
(check the output of 
git remote -v
)
git fetch trac develop

will fetch the latest remote branch

git rebase trac/develop 

will apply all your changes in the local branch on top of the current beta.

resp.

git merge trac/develop 

will apply the current beta changes over your branch.

I am sorry, it seems I'm too stupid for git trac.

--
You received this message because you are subscribed to the Google Groups "sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+...@googlegroups.com.

To post to this group, send email to sage-...@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
Reply all
Reply to author
Forward
0 new messages