Skip to content

Weaken coprimality#18

Merged
giannipetrella merged 45 commits intomainfrom
weaken-coprimality
Mar 6, 2026
Merged

Weaken coprimality#18
giannipetrella merged 45 commits intomainfrom
weaken-coprimality

Conversation

@giannipetrella
Copy link
Copy Markdown
Member

No description provided.

@giannipetrella
Copy link
Copy Markdown
Member Author

This weakens the requirement of theta-coprimality to the requirement of theta being general, that is, semistablity and stability being equivalent notions.

This is currently checked via all_luna_types.

  • various performance improvements.

src/Chow.jl Outdated
)
out = R(0)
for sigma in W
Oscar.add!(out, out, sign_product(sigma) * permute(f, sigma))
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this where addmul! could be useful for more in-place computations?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needs to be tested - it is not so immediate because sign_product(sigma) is an Int, maybe the implementation of addmul! does not like that so much. Also, the sign could be integrated in the permute(f, sigma) function, since it already knows sigma, potentially saving one extra allocation.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's an Int, but is it really simply a sign? Then maybe doing add! or sub! is an even better idea.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point, yes. Yes, it is just the sign of the permutation sigma of the variables...

This was introducing a lot of overhead in the computation e.g. of chern classes.

Ex: `point_class(M; unsafe=true)` of the 11-points on P1 moduli problem goes from 15 seconds to 2.
This was apparently introducing some coercion overhead
Despite the naming convention it does not perform the subtraction in place.
Reduces allocations by ~1%
This enables large computations, analogously to the caching of `all_hn_types`
instead of theta-coprimality we just require theta to be in general position, i.e., semistability and stability must coincide
@giannipetrella giannipetrella merged commit 0aeba5e into main Mar 6, 2026
3 checks passed
@giannipetrella giannipetrella deleted the weaken-coprimality branch March 6, 2026 16:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants