Skip to content

Commit

Permalink
Trac #29581: New Algorithm for Characteristic Classes
Browse files Browse the repository at this point in the history
The current algorithm for characteristic forms is comparably slow. The
worst case scenario showed computations times about 1h in dimension
four.

With this ticket, we want to replace the current algorithm and implement
characteristic cohomology classes as sub-ring of the de Rham cohomology
ring (cf. #31691).

The idea is that characteristic (cohomology) classes are generated by
Chern/Pontryagin/Euler classes. The generators can be computed by an
Faddeev-LeVerrier-like algorithm (cf. #30681).

URL: https://trac.sagemath.org/29581
Reported by: gh-mjungmath
Ticket author(s): Michael Jung
Reviewer(s): Travis Scrimshaw, Eric Gourgoulhon
  • Loading branch information
Release Manager committed Oct 10, 2021
2 parents 5cf2b39 + ac5cbbf commit 0580800
Show file tree
Hide file tree
Showing 7 changed files with 1,965 additions and 1,036 deletions.
2 changes: 1 addition & 1 deletion src/doc/en/reference/manifolds/diff_vector_bundle.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ Differentiable Vector Bundles

sage/manifolds/differentiable/bundle_connection

sage/manifolds/differentiable/characteristic_class
sage/manifolds/differentiable/characteristic_cohomology_class
4 changes: 4 additions & 0 deletions src/doc/en/reference/references/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1280,6 +1280,10 @@ REFERENCES:
Coinvariants Quasi-Symétriques*, Electronic Journal of
Combinatorics Vol 12(1) (2005) N16.
.. [Che1944] \S. Chern, *A simple intrinsic proof of the Gauss-Bonnet formula
for closed Riemannian manifolds*, Ann. of Math. (2) 45 (1944),
747–752.
.. [CQ2019] \A. Cassella and C. Quadrelli.
*Right-angled Artin groups and enhanced Koszul properties*.
Preprint, :arxiv:`1907.03824`, (2019).
Expand Down
24 changes: 12 additions & 12 deletions src/sage/manifolds/differentiable/bundle_connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ def __init__(self, vbundle, name, latex_name=None):
"vector bundle")
Mutability.__init__(self)
self._vbundle = vbundle
self._base_space = vbundle.base_space()
self._domain = vbundle.base_space()
self._name = name
if latex_name is None:
self._latex_name = self._name
Expand Down Expand Up @@ -394,7 +394,7 @@ def __eq__(self, other):
return True
if not isinstance(other, BundleConnection):
return False
if other._base_space != self._base_space:
if other._domain != self._domain:
return False
if self._connection_forms == {}:
return False
Expand Down Expand Up @@ -566,7 +566,7 @@ def connection_forms(self, frame=None):
"""
if frame is None:
smodule = self._vbundle.section_module(domain=self._base_space)
smodule = self._vbundle.section_module(domain=self._domain)
frame = smodule.default_frame()
if frame is None:
raise ValueError("a frame must be provided")
Expand Down Expand Up @@ -832,15 +832,15 @@ def add_connection_form(self, i, j, frame=None):
"""
self._require_mutable()
if frame is None:
smodule = self._vbundle.section_module(domain=self._base_space)
smodule = self._vbundle.section_module(domain=self._domain)
frame = smodule.default_frame()
if frame is None:
raise ValueError("a frame must be provided")
# Are the components already known?
if frame not in self._connection_forms:
if frame not in self._vbundle._frames:
raise ValueError("the {} is not".format(frame) +
" a frame on the {}".format(self._base_space))
" a frame on the {}".format(self._domain))
self._connection_forms[frame] = self._new_forms(frame)
self._del_derived() # deletes the derived quantities
return self._connection_forms[frame][(i, j)]
Expand Down Expand Up @@ -967,7 +967,7 @@ def del_other_forms(self, frame=None):
"""
if frame is None:
smodule = self._vbundle.section_module(domain=self._base_space)
smodule = self._vbundle.section_module(domain=self._domain)
frame = smodule.default_frame()
if frame is None:
raise ValueError("a frame must be provided")
Expand Down Expand Up @@ -1023,7 +1023,7 @@ def curvature_form(self, i, j, frame=None):
"""
if frame is None:
smodule = self._vbundle.section_module(domain=self._base_space)
smodule = self._vbundle.section_module(domain=self._domain)
frame = smodule.default_frame()
if frame is None:
raise ValueError("a frame must be provided")
Expand Down Expand Up @@ -1127,13 +1127,13 @@ def __getitem__(self, args):
# extract frame from first index:
vb = self._vbundle
if isinstance(args, (int, Integer, slice)):
smodule = vb.section_module(domain=self._base_space)
smodule = vb.section_module(domain=self._domain)
frame = smodule.default_frame()
elif not isinstance(args[0], (int, Integer, slice)):
frame = args[0]
args = args[1:]
else:
smodule = vb.section_module(domain=self._base_space)
smodule = vb.section_module(domain=self._domain)
frame = smodule.default_frame()
# indexing:
if isinstance(args, slice):
Expand Down Expand Up @@ -1200,13 +1200,13 @@ def __setitem__(self, args, value):
# extract frame from first index:
vb = self._vbundle
if isinstance(args, (int, Integer, slice)):
smodule = vb.section_module(domain=self._base_space)
smodule = vb.section_module(domain=self._domain)
frame = smodule.default_frame()
elif not isinstance(args[0], (int, Integer, slice)):
frame = args[0]
args = args[1:]
else:
smodule = vb.section_module(domain=self._base_space)
smodule = vb.section_module(domain=self._domain)
frame = smodule.default_frame()
# determine indices:
if isinstance(args, slice):
Expand Down Expand Up @@ -1350,7 +1350,7 @@ def display(self, frame=None, vector_frame=None, chart=None,
"""
vb = self._vbundle
if frame is None:
smodule = vb.section_module(domain=self._base_space)
smodule = vb.section_module(domain=self._domain)
frame = smodule.default_frame()
if frame is None:
raise ValueError("a local frame must be provided")
Expand Down
Loading

0 comments on commit 0580800

Please sign in to comment.