Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion src/sage/geometry/hyperplane_arrangement/arrangement.py
Original file line number Diff line number Diff line change
Expand Up @@ -3472,7 +3472,17 @@ def is_free(self, algorithm='singular') -> bool:
if algorithm == "singular":
# TODO: Implement this using libSingular
mres = self.defining_polynomial().jacobian_ideal()._singular_().mres(0)
return len(mres) <= 2
# Newer versions of Singular include a trailing zero module (R^0).
# Check if the last element is trivial and exclude it from the count.
resolution_length = len(mres)
if resolution_length > 0:
sing = mres.parent()
last_elem = mres[resolution_length]
# Check if this element is the zero module using size()
size_val = sing.size(last_elem)
if size_val == 0: # Trailing zero module
resolution_length -= 1
return resolution_length <= 2
elif algorithm == "BC":
return self.derivation_module_free_chain() is not None
else:
Expand Down
Loading