Skip to content

Conversation

miguelmarco
Copy link
Contributor

📚 Description

Fixes #35781

📝 Checklist

  • The title is concise, informative, and self-explanatory.
  • The description explains in detail what this PR is about.
  • I have linked a relevant issue or discussion.
  • I have created tests covering the changes.
  • I have updated the documentation accordingly.

Copy link
Collaborator

@tscrim tscrim left a comment

Choose a reason for hiding this comment

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

Why is the method to return the OS algebra as differential algebra and not just a CGA? It seems like that would be the more natural thing to have as the user could then easily enough add the differential.

@miguelmarco
Copy link
Contributor Author

Why is the method to return the OS algebra as differential algebra and not just a CGA? It seems like that would be the more natural thing to have as the user could then easily enough add the differential.

The OS algebra is the cohomology ring of the complement of the arrangement, so i guess it makes sense to consider it as a differential algebra.

But as you said, since it is so easy to add the differential structure, it is almost equivalent to return it just as gca.

miguelmarco and others added 3 commits June 18, 2023 16:23
Co-authored-by: Travis Scrimshaw <clfrngrown@aol.com>
Co-authored-by: Travis Scrimshaw <clfrngrown@aol.com>
@tscrim
Copy link
Collaborator

tscrim commented Jun 19, 2023

Why is the method to return the OS algebra as differential algebra and not just a CGA? It seems like that would be the more natural thing to have as the user could then easily enough add the differential.

The OS algebra is the cohomology ring of the complement of the arrangement, so i guess it makes sense to consider it as a differential algebra.

Ah, I see. We have modded out by the image in the original chain complex, so the differentials all become 0.

But as you said, since it is so easy to add the differential structure, it is almost equivalent to return it just as gca.

Perhaps we can have both methods, but with the gdca simply calling the gca() and adding the differential structure?

@miguelmarco
Copy link
Contributor Author

Perhaps we can have both methods, but with the gdca simply calling the gca() and adding the differential structure?

Yes, that makes sense.

Copy link
Collaborator

@tscrim tscrim left a comment

Choose a reason for hiding this comment

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

Thanks. Just a few other essentially trivial things.

miguelmarco and others added 5 commits June 19, 2023 23:49
Co-authored-by: Travis Scrimshaw <clfrngrown@aol.com>
Co-authored-by: Travis Scrimshaw <clfrngrown@aol.com>
Co-authored-by: Travis Scrimshaw <clfrngrown@aol.com>
Co-authored-by: Travis Scrimshaw <clfrngrown@aol.com>
@miguelmarco
Copy link
Contributor Author

So, is it ready for positive review?

Copy link
Collaborator

@tscrim tscrim left a comment

Choose a reason for hiding this comment

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

Sorry, just a few more trivial things I noticed while looking at the compiled doc. One formatting thing, and then breaking up the long output lines (might even be a bit better to be slightly shorter per line too; I didn't check closely).

I've approved the PR, so once you push the changes, you can switch the status to positive review.

Comment on lines 2442 to 2445
on the `partial_result` flag.

- ``partial_result`` -- boolean (default: `False`); wether to return
the partial result if the `max_iterations` limit is reached.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
on the `partial_result` flag.
- ``partial_result`` -- boolean (default: `False`); wether to return
the partial result if the `max_iterations` limit is reached.
on the ``partial_result`` flag.
- ``partial_result`` -- boolean (default: ``False``); wether to return
the partial result if the ``max_iterations`` limit is reached

ValueError: could not cover all relations in max iterations in degree 2
sage: S.minimal_model(partial_result=True)
Commutative Differential Graded Algebra morphism:
From: Commutative Differential Graded Algebra with generators ('x1_0', 'x1_1', 'x1_2', 'y1_0', 'y1_1', 'y1_2') in degrees (1, 1, 1, 1, 1, 1) over Rational Field with differential:
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
From: Commutative Differential Graded Algebra with generators ('x1_0', 'x1_1', 'x1_2', 'y1_0', 'y1_1', 'y1_2') in degrees (1, 1, 1, 1, 1, 1) over Rational Field with differential:
From: Commutative Differential Graded Algebra with generators
('x1_0', 'x1_1', 'x1_2', 'y1_0', 'y1_1', 'y1_2') in degrees (1, 1, 1, 1, 1, 1)
over Rational Field with differential:

y1_0 --> x1_0*x1_1 - x1_0*x1_2 + x1_1*x1_2
y1_1 --> x1_0*y1_0 - x1_2*y1_0
y1_2 --> x1_1*y1_0 - x1_2*y1_0
To: Commutative Differential Graded Algebra with generators ('a', 'b', 'c') in degrees (1, 1, 1) with relations [a*b - a*c + b*c] over Rational Field with differential:
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
To: Commutative Differential Graded Algebra with generators ('a', 'b', 'c') in degrees (1, 1, 1) with relations [a*b - a*c + b*c] over Rational Field with differential:
To: Commutative Differential Graded Algebra with generators ('a', 'b', 'c')
in degrees (1, 1, 1) with relations [a*b - a*c + b*c] over Rational Field with differential:

Comment on lines 466 to 468
Graded Commutative Algebra with generators ('e0', 'e1', 'e2', 'e3', 'e4', 'e5', 'e6') in degrees (1, 1, 1, 1, 1, 1, 1) with relations [e1*e2 - e1*e3 + e2*e3, e0*e2 - e0*e4 + e2*e4, e0*e1 - e0*e5 + e1*e5, e3*e4 - e3*e5 + e4*e5, e0*e3 - e0*e6 + e3*e6, e1*e4 - e1*e6 + e4*e6, e2*e5 - e2*e6 + e5*e6] over Rational Field

"""
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
Graded Commutative Algebra with generators ('e0', 'e1', 'e2', 'e3', 'e4', 'e5', 'e6') in degrees (1, 1, 1, 1, 1, 1, 1) with relations [e1*e2 - e1*e3 + e2*e3, e0*e2 - e0*e4 + e2*e4, e0*e1 - e0*e5 + e1*e5, e3*e4 - e3*e5 + e4*e5, e0*e3 - e0*e6 + e3*e6, e1*e4 - e1*e6 + e4*e6, e2*e5 - e2*e6 + e5*e6] over Rational Field
"""
Graded Commutative Algebra with generators ('e0', 'e1', 'e2', 'e3', 'e4', 'e5', 'e6')
in degrees (1, 1, 1, 1, 1, 1, 1) with relations
[e1*e2 - e1*e3 + e2*e3, e0*e2 - e0*e4 + e2*e4, e0*e1 - e0*e5 + e1*e5,
e3*e4 - e3*e5 + e4*e5, e0*e3 - e0*e6 + e3*e6, e1*e4 - e1*e6 + e4*e6,
e2*e5 - e2*e6 + e5*e6] over Rational Field
"""

sage: H = hyperplane_arrangements.braid(3)
sage: O = H.orlik_solomon_algebra(QQ)
sage: O.as_cdga()
Commutative Differential Graded Algebra with generators ('e0', 'e1', 'e2') in degrees (1, 1, 1) with relations [e0*e1 - e0*e2 + e1*e2] over Rational Field with differential:
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
Commutative Differential Graded Algebra with generators ('e0', 'e1', 'e2') in degrees (1, 1, 1) with relations [e0*e1 - e0*e2 + e1*e2] over Rational Field with differential:
Commutative Differential Graded Algebra with generators ('e0', 'e1', 'e2') in degrees
(1, 1, 1) with relations [e0*e1 - e0*e2 + e1*e2] over Rational Field with differential:

@miguelmarco
Copy link
Contributor Author

Sorry, I just realized that the computations where only valid for the case of line arrangements (that is, we only cared about rank 2 relations). I changed the method to add missing relations.

I think it is correct now, but another pair of eyes would help.

@tscrim
Copy link
Collaborator

tscrim commented Jun 23, 2023

Good catch. Is there some way we can easily/quickly test that the result matches, say, (partially) computing the (graded) degrees?

@miguelmarco
Copy link
Contributor Author

We can check if the Betti numbers match the coefficients of the poincare polynomial. For instance:

sage: H = hyperplane_arrangements.Catalan(4,QQ)
sage: O = H.cone().orlik_solomon_algebra(QQ)
sage: B = O.as_cdga()
sage: H.cone().poincare_polynomial()
210*x^4 + 317*x^3 + 125*x^2 + 19*x + 1
sage: [len(B.basis(i)) for i in range(5)]
[1, 19, 125, 317, 210]
sage: H = hyperplane_arrangements.Ish(5,QQ)
sage: O = H.cone().orlik_solomon_algebra(QQ)
sage: B = O.as_gca()
sage: H.cone().poincare_polynomial()
625*x^5 + 1125*x^4 + 650*x^3 + 170*x^2 + 21*x + 1
sage: [len(B.basis(i)) for i in range(6)]
[1, 21, 170, 650, 1125, 625]

@tscrim
Copy link
Collaborator

tscrim commented Jun 23, 2023

If that’s a quick (in the doctest time sense), then can we add that as an additional test? I promise, absolutely last thing. ^^;;

@miguelmarco
Copy link
Contributor Author

If that’s a quick (in the doctest time sense), then can we add that as an additional test? I promise, absolutely last thing. ^^;;

Done

@tscrim
Copy link
Collaborator

tscrim commented Jun 26, 2023

Thank you.

@github-actions
Copy link

Documentation preview for this PR (built with commit 9a1de5e; changes) is ready! 🎉

@vbraun vbraun merged commit ffac6e0 into sagemath:develop Jul 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow minimal model of cdga to return partial results
4 participants