File tree Expand file tree Collapse file tree 1 file changed +14
-1
lines changed
src/sage/geometry/hyperplane_arrangement Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -3472,7 +3472,20 @@ def is_free(self, algorithm='singular') -> bool:
34723472 if algorithm == "singular" :
34733473 # TODO: Implement this using libSingular
34743474 mres = self .defining_polynomial ().jacobian_ideal ()._singular_ ().mres (0 )
3475- return len (mres ) <= 2
3475+ # Newer versions of Singular include a trailing zero module (R^0).
3476+ # Check if the last element is trivial and exclude it from the count.
3477+ resolution_length = len (mres )
3478+ if resolution_length > 0 :
3479+ try :
3480+ sing = mres .parent ()
3481+ last_elem = mres [resolution_length ]
3482+ # Check if this element is the zero module using size()
3483+ size_val = int (sing .eval (f"size({ last_elem .name ()} )" ))
3484+ if size_val == 0 : # Trailing zero module
3485+ resolution_length -= 1
3486+ except :
3487+ pass
3488+ return resolution_length <= 2
34763489 elif algorithm == "BC" :
34773490 return self .derivation_module_free_chain () is not None
34783491 else :
You can’t perform that action at this time.
0 commit comments