Skip to content

Commit

Permalink
Fixed issue where point_on_variety would fail to obtain a good set of…
Browse files Browse the repository at this point in the history
… orthogonal directions to the variety when the directions were not explicitly provided, thus causing an assertion error. Instead of taking the simplest codim generators as directions, now take the simplest codim independent generators, thus guaranteeing the automatic selection will succeed.
  • Loading branch information
GDeLaurentis committed Feb 26, 2024
1 parent 1abbedb commit 4cc34ec
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion syngular/variety.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,11 @@ def point_on_variety(self, field, base_point={}, directions=[], valuations=tuple

# handle directions, i.e. the generators of the sub-ideal of maximal codimension
if directions == []:
directions = sorted(self.generators, key=lambda x: len(x))[:self.codim]
for poly in sorted(self.generators, key=lambda x: len(x)):
if Ideal(self.ring, directions + [poly, ]).codim > Ideal(self.ring, directions).codim:
directions += [poly, ]
if len(directions) == self.codim:
break
assert Ideal(self.ring, directions).codim == self.codim
# extra directions in qring
if isinstance(self.ring, QuotientRing):
Expand Down

0 comments on commit 4cc34ec

Please sign in to comment.