Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Retrieve more information of fundamental groups of plane curves #36768

Merged
merged 148 commits into from
May 2, 2024

Conversation

enriqueartal
Copy link
Contributor

The goal of this PR is to add some features to the computation of fundamental groups of complements of the plane curves introduced in Sagemath by @miguelmarco and his optional package sirocco. It also corrects a bug introduced in #35376 and cleans some code.

We add the following information: given a tuple of curves we retrieve the information of meridians of each curve as words in the fundamental group, and also of the strands of the braid monodromy. We also add the possibility of excluding the vertical lines from the computation of braid monodromy (as far as there is no vertical asymptote) which makes its computation faster.

To achieve this goal we introduce new classes AffinePlaneCurveArrangements and ProjectivePlaneCurveArrangements. For now, they serve only to compute the fundamental groups with the meridian information (and braid monodromy and strand information for the affine curves) but more methods may be constructed in the future. The structure of these classes follows the one of HyperplaneArrangements, with one difference, the order is important. This is why we also introduce the class of OrderedHyperplaneArrangements, where the fundamental group is computed. We have also introduce a new method for hyperplane arrangements, jhyperplane_section, in order to compute the fundamental group also for hyperplane arrangements and not only for line arrangements.

These are the main changes:

  • schemes/curves/affine_curve.py
    • Introducion of some auxiliary new methods: has_vertical_asymptote, is_vertical_line
    • Small update of fundamental_group
  • schemes/curves/projective_curve.py. Some trivial cases were not considered in fundamental_group.
  • schemes/curves/plane_curve_arrangement.py. New file with the new classes.
  • schemes/curves/zariski_vankampen.py
    • For consistency some lists are converted into tuples.
    • Some functions take a new keyword to take into account the option of eliminating the vertical lines for the computation of the braid monodromy.
    • In braid_in_segment, correction of the bug introduced in the previous PR (the parameters must be in the number field embedded in QQbar).
    • The function geometric_basis has been changed for designed and to cover some cases where the former one failed.
    • A new function vertical_lines_in_braidmon to isolate vertical lines if needed.
    • The function braid_monodromy has been cleaned and now it takes into account the strand information.
  • geometry/hyperplane_arrangement/arrangement.py
    • Introducion of the class of OrderedHyperplaneArrangements. The hyperplanes are not sorted in this class and the introduction order is respected. It forces to update some methods.
    • Five new methods for this new class: hyperplane_section, affine_fundamental_group, affine_meridians, projective_fundamental_group, and projective_meridians.

📝 Checklist

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

@vbraun
Copy link
Member

vbraun commented Apr 13, 2024

merge conflict

@vbraun
Copy link
Member

vbraun commented Apr 13, 2024

merge conflict

@enriqueartal
Copy link
Contributor Author

@vbraun: Commit enriqueartal@8bb020e solves the merge conflict but I am not sure if it is in the correct way.

@enriqueartal
Copy link
Contributor Author

@tscrim @miguelmarco I repaired the merge conflicts due to the addition of new classes and the changes in all.py files but I would prefer someone more experienced checks the changes in order to avoid more conflicts.

@tscrim
Copy link
Collaborator

tscrim commented Apr 15, 2024

Almost okay. You need to remove the (lazy) imports from all__sagemath_polyhedra.py (now the all.py files seem to have been split and made significantly more complicated…).

@enriqueartal
Copy link
Contributor Author

I did not touch all__sagemath_polyhedra.py; is it enough to put there the class OrderedHyperplaneArrangements and remove the new all_py in hyperplane_arrangement? Since I do not understand this change, I wonder how sirocco is affected.

@enriqueartal
Copy link
Contributor Author

Finally I simplified all.py in the folder hyperplane_arrangement and I added the new class in all__sagemath_polyhedra.py
If you find it right I may take out the 🏷️s: needs work

@tscrim
Copy link
Collaborator

tscrim commented Apr 16, 2024

This is probably “better,” thanks.

vbraun pushed a commit to vbraun/sage that referenced this pull request Apr 18, 2024
…plane curves

    
The goal of this PR is to add some features to the computation of
fundamental groups of complements of the plane curves introduced in
``Sagemath``  by @miguelmarco and his optional package ``sirocco``. It
also corrects a bug introduced in
sagemath#35376 and cleans some code.

We add the following information: given a tuple of curves we retrieve
the information of meridians of each curve as words in the fundamental
group, and also of the strands of the braid monodromy. We also add the
possibility of excluding the vertical lines from the computation of
braid monodromy (as far as there is no vertical asymptote) which makes
its computation faster.

To achieve this goal we introduce new classes
`AffinePlaneCurveArrangements` and `ProjectivePlaneCurveArrangements`.
For now, they serve only to compute the fundamental groups with the
meridian information (and braid monodromy and strand information for the
affine curves) but more methods may be constructed in the future. The
structure of these classes follows the one of `HyperplaneArrangements`,
with one difference, the order is important. This is why we also
introduce the class of `OrderedHyperplaneArrangements`, where the
fundamental group is computed. We have also introduce a new method for
hyperplane arrangements, `jhyperplane_section`, in order to compute the
fundamental group also for hyperplane arrangements and not only for line
arrangements.

These are the main changes:

- schemes/curves/affine_curve.py
     - Introducion of  some auxiliary new methods:
`has_vertical_asymptote`, `is_vertical_line`
     - Small update of `fundamental_group`
- schemes/curves/projective_curve.py. Some trivial cases were not
considered in `fundamental_group`.
- schemes/curves/plane_curve_arrangement.py. New file with the new
classes.
- schemes/curves/zariski_vankampen.py
    - For consistency some lists are converted into tuples.
    - Some functions take a new keyword to take into account the option
of eliminating the vertical lines for the computation of the braid
monodromy.
    - In `braid_in_segment`, correction of the bug introduced in the
previous PR (the parameters must be in the number field embedded in
`QQbar`).
    - The function `geometric_basis` has been changed for designed and
to cover some cases where the former one failed.
    - A new function `vertical_lines_in_braidmon` to isolate vertical
lines if needed.
    - The function `braid_monodromy` has been cleaned and now it takes
into account the strand information.
    -
- geometry/hyperplane_arrangement/arrangement.py
     - Introducion of the class of `OrderedHyperplaneArrangements`. The
hyperplanes are not sorted in this class and the introduction order is
respected. It forces to update some methods.
     - Five new methods for this new class: `hyperplane_section`,
`affine_fundamental_group`, `affine_meridians`,
`projective_fundamental_group`, and `projective_meridians`.



<!-- Why is this change required? What problem does it solve? -->
<!-- If this PR resolves an open issue, please link to it here. For
example "Fixes sagemath#12345". -->
<!-- If your change requires a documentation PR, please link it
appropriately. -->

### 📝 Checklist

<!-- Put an `x` in all the boxes that apply. -->
<!-- If your change requires a documentation PR, please link it
appropriately -->
<!-- If you're unsure about any of these, don't hesitate to ask. We're
here to help! -->
<!-- Feel free to remove irrelevant items. -->

- [X] The title is concise, informative, and self-explanatory.
- [X] The description explains in detail what this PR is about.
- [X] I have created tests covering the changes.
- [X] I have updated the documentation accordingly.
    
URL: sagemath#36768
Reported by: Enrique Manuel Artal Bartolo
Reviewer(s): Enrique Manuel Artal Bartolo, Frédéric Chapoton, Travis Scrimshaw
vbraun pushed a commit to vbraun/sage that referenced this pull request Apr 20, 2024
…plane curves

    
The goal of this PR is to add some features to the computation of
fundamental groups of complements of the plane curves introduced in
``Sagemath``  by @miguelmarco and his optional package ``sirocco``. It
also corrects a bug introduced in
sagemath#35376 and cleans some code.

We add the following information: given a tuple of curves we retrieve
the information of meridians of each curve as words in the fundamental
group, and also of the strands of the braid monodromy. We also add the
possibility of excluding the vertical lines from the computation of
braid monodromy (as far as there is no vertical asymptote) which makes
its computation faster.

To achieve this goal we introduce new classes
`AffinePlaneCurveArrangements` and `ProjectivePlaneCurveArrangements`.
For now, they serve only to compute the fundamental groups with the
meridian information (and braid monodromy and strand information for the
affine curves) but more methods may be constructed in the future. The
structure of these classes follows the one of `HyperplaneArrangements`,
with one difference, the order is important. This is why we also
introduce the class of `OrderedHyperplaneArrangements`, where the
fundamental group is computed. We have also introduce a new method for
hyperplane arrangements, `jhyperplane_section`, in order to compute the
fundamental group also for hyperplane arrangements and not only for line
arrangements.

These are the main changes:

- schemes/curves/affine_curve.py
     - Introducion of  some auxiliary new methods:
`has_vertical_asymptote`, `is_vertical_line`
     - Small update of `fundamental_group`
- schemes/curves/projective_curve.py. Some trivial cases were not
considered in `fundamental_group`.
- schemes/curves/plane_curve_arrangement.py. New file with the new
classes.
- schemes/curves/zariski_vankampen.py
    - For consistency some lists are converted into tuples.
    - Some functions take a new keyword to take into account the option
of eliminating the vertical lines for the computation of the braid
monodromy.
    - In `braid_in_segment`, correction of the bug introduced in the
previous PR (the parameters must be in the number field embedded in
`QQbar`).
    - The function `geometric_basis` has been changed for designed and
to cover some cases where the former one failed.
    - A new function `vertical_lines_in_braidmon` to isolate vertical
lines if needed.
    - The function `braid_monodromy` has been cleaned and now it takes
into account the strand information.
    -
- geometry/hyperplane_arrangement/arrangement.py
     - Introducion of the class of `OrderedHyperplaneArrangements`. The
hyperplanes are not sorted in this class and the introduction order is
respected. It forces to update some methods.
     - Five new methods for this new class: `hyperplane_section`,
`affine_fundamental_group`, `affine_meridians`,
`projective_fundamental_group`, and `projective_meridians`.



<!-- Why is this change required? What problem does it solve? -->
<!-- If this PR resolves an open issue, please link to it here. For
example "Fixes sagemath#12345". -->
<!-- If your change requires a documentation PR, please link it
appropriately. -->

### 📝 Checklist

<!-- Put an `x` in all the boxes that apply. -->
<!-- If your change requires a documentation PR, please link it
appropriately -->
<!-- If you're unsure about any of these, don't hesitate to ask. We're
here to help! -->
<!-- Feel free to remove irrelevant items. -->

- [X] The title is concise, informative, and self-explanatory.
- [X] The description explains in detail what this PR is about.
- [X] I have created tests covering the changes.
- [X] I have updated the documentation accordingly.
    
URL: sagemath#36768
Reported by: Enrique Manuel Artal Bartolo
Reviewer(s): Enrique Manuel Artal Bartolo, Frédéric Chapoton, Travis Scrimshaw
@vbraun
Copy link
Member

vbraun commented Apr 24, 2024

merge conflict

@enriqueartal
Copy link
Contributor Author

@vbraun I reverted the all.py with new classes to try to avoid conflicts.

@tscrim
Copy link
Collaborator

tscrim commented Apr 28, 2024

@enriqueartal Do you think it would be possible (and reasonable) to squash at least the commits down? It would help keep the history a bit more clean for future debugging purposes. It's okay to leave it be if it's too much trouble.

@enriqueartal
Copy link
Contributor Author

@enriqueartal Do you think it would be possible (and reasonable) to squash at least the commits down? It would help keep the history a bit more clean for future debugging purposes. It's okay to leave it be if it's too much trouble.

I agree with you, 148 are too much and plenty of them are only typos. What would be the best way?

@tscrim
Copy link
Collaborator

tscrim commented Apr 28, 2024

I would first do a rebase on develop (this should get rid of any merge commit) and then an interactive rebase to squash some of the commits down. Although the first step might be annoying having to deal with conflicts (again).

@enriqueartal
Copy link
Contributor Author

I will try tomorrow with some help

vbraun pushed a commit to vbraun/sage that referenced this pull request Apr 28, 2024
…plane curves

    
The goal of this PR is to add some features to the computation of
fundamental groups of complements of the plane curves introduced in
``Sagemath``  by @miguelmarco and his optional package ``sirocco``. It
also corrects a bug introduced in
sagemath#35376 and cleans some code.

We add the following information: given a tuple of curves we retrieve
the information of meridians of each curve as words in the fundamental
group, and also of the strands of the braid monodromy. We also add the
possibility of excluding the vertical lines from the computation of
braid monodromy (as far as there is no vertical asymptote) which makes
its computation faster.

To achieve this goal we introduce new classes
`AffinePlaneCurveArrangements` and `ProjectivePlaneCurveArrangements`.
For now, they serve only to compute the fundamental groups with the
meridian information (and braid monodromy and strand information for the
affine curves) but more methods may be constructed in the future. The
structure of these classes follows the one of `HyperplaneArrangements`,
with one difference, the order is important. This is why we also
introduce the class of `OrderedHyperplaneArrangements`, where the
fundamental group is computed. We have also introduce a new method for
hyperplane arrangements, `jhyperplane_section`, in order to compute the
fundamental group also for hyperplane arrangements and not only for line
arrangements.

These are the main changes:

- schemes/curves/affine_curve.py
     - Introducion of  some auxiliary new methods:
`has_vertical_asymptote`, `is_vertical_line`
     - Small update of `fundamental_group`
- schemes/curves/projective_curve.py. Some trivial cases were not
considered in `fundamental_group`.
- schemes/curves/plane_curve_arrangement.py. New file with the new
classes.
- schemes/curves/zariski_vankampen.py
    - For consistency some lists are converted into tuples.
    - Some functions take a new keyword to take into account the option
of eliminating the vertical lines for the computation of the braid
monodromy.
    - In `braid_in_segment`, correction of the bug introduced in the
previous PR (the parameters must be in the number field embedded in
`QQbar`).
    - The function `geometric_basis` has been changed for designed and
to cover some cases where the former one failed.
    - A new function `vertical_lines_in_braidmon` to isolate vertical
lines if needed.
    - The function `braid_monodromy` has been cleaned and now it takes
into account the strand information.
    -
- geometry/hyperplane_arrangement/arrangement.py
     - Introducion of the class of `OrderedHyperplaneArrangements`. The
hyperplanes are not sorted in this class and the introduction order is
respected. It forces to update some methods.
     - Five new methods for this new class: `hyperplane_section`,
`affine_fundamental_group`, `affine_meridians`,
`projective_fundamental_group`, and `projective_meridians`.



<!-- Why is this change required? What problem does it solve? -->
<!-- If this PR resolves an open issue, please link to it here. For
example "Fixes sagemath#12345". -->
<!-- If your change requires a documentation PR, please link it
appropriately. -->

### 📝 Checklist

<!-- Put an `x` in all the boxes that apply. -->
<!-- If your change requires a documentation PR, please link it
appropriately -->
<!-- If you're unsure about any of these, don't hesitate to ask. We're
here to help! -->
<!-- Feel free to remove irrelevant items. -->

- [X] The title is concise, informative, and self-explanatory.
- [X] The description explains in detail what this PR is about.
- [X] I have created tests covering the changes.
- [X] I have updated the documentation accordingly.
    
URL: sagemath#36768
Reported by: Enrique Manuel Artal Bartolo
Reviewer(s): Enrique Manuel Artal Bartolo, Frédéric Chapoton, Travis Scrimshaw
@enriqueartal
Copy link
Contributor Author

This week is quite complicated and I am afraid to do not squash the commits correctly.

@tscrim
Copy link
Collaborator

tscrim commented Apr 29, 2024

You can push a copy of this branch as a backup (and use as a comparison with git diff). As long as you end up with the same diff, then everything else will be okay.

@vbraun vbraun merged commit 23ba3d8 into sagemath:develop May 2, 2024
11 of 12 checks passed
@mkoeppe mkoeppe added this to the sage-10.4 milestone May 2, 2024
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.

None yet

5 participants