Skip to content

Conversation

@MatheMagicianPi
Copy link
Contributor

@MatheMagicianPi MatheMagicianPi commented Jul 13, 2023

Initial implementation of dynamical semigroups

This is part of issue #35954

📝 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.

⌛ Dependencies

@EnderWannabe
Copy link
Contributor

Most of the code looks good. Attached is a text file with mostly documentation changes, as well as an example with a subschemes, which throws an error.
changes.txt

@EnderWannabe
Copy link
Contributor

EnderWannabe commented Jul 18, 2023

Most of the changes look good. I think the change to the call method wasn't quite right - for example, if f is a dynamical semigroup on a projective space P, then f([2,1]) should work, since P([2,1]) doesn't throw an error. Instead of checking if the input is a collection, I would check if it converts to the domain of the dynamical semigroup. If it doesn't, throw an error.

Edit: looks like Counter was imported but not used

- modified __call__ documentation
- removed Counter import
- line break changes on a couple other methods
@EnderWannabe
Copy link
Contributor

A few smaller issues to fix, then we should be good.
fixes.txt

@EnderWannabe
Copy link
Contributor

EnderWannabe commented Jul 27, 2023

The issue with the semigroup being finite is still there. Delete the .Finite() on line 295, but leave the .FinitelyGeneratedAsMagma().

Copy link
Contributor

@EnderWannabe EnderWannabe left a comment

Choose a reason for hiding this comment

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

Looks good to me.

@EnderWannabe
Copy link
Contributor

Update: equality fails for semigroups with repeated generators.

sage: P.<x,y> = PorjectiveSpace(QQ, 1)
sage: f = DynamicalSystem([x^2, y^2])
sage: F = DynamicalSemigroup(f, f)
sage: G = DynamicalSemigroup(f)
sage: F == G
False

@MatheMagicianPi MatheMagicianPi changed the title initial implementation of dynamical semigroups Initial implementation of dynamical semigroups Aug 10, 2023
@EnderWannabe
Copy link
Contributor

LGTM

@github-actions
Copy link

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

vbraun pushed a commit to vbraun/sage that referenced this pull request Aug 23, 2023
sagemathgh-35947: Initial implementation of dynamical semigroups
    
<!-- ^^^^^
Please provide a concise, informative and self-explanatory title.
Don't put issue numbers in there, do this in the PR body below.
For example, instead of "Fixes sagemath#1234" use "Introduce new method to
calculate 1+1"
--> Initial implementation of dynamical semigroups
<!-- Describe your changes here in detail -->
This is part of issue sagemath#35954
<!-- 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.
- [ ] The description explains in detail what this PR is about.
- [x] I have linked a relevant issue or discussion.
- [x] I have created tests covering the changes.
- [x] I have updated the documentation accordingly.

### ⌛ Dependencies

<!-- List all open PRs that this PR logically depends on
- sagemath#12345: short description why this is a dependency
- sagemath#34567: ...
-->

<!-- If you're unsure about any of these, don't hesitate to ask. We're
here to help! -->
    
URL: sagemath#35947
Reported by: Dang Phan
Reviewer(s): Alexander Galarraga
vbraun pushed a commit to vbraun/sage that referenced this pull request Aug 23, 2023
sagemathgh-35988: Implemented five new operations for dynamical semigroups
    
<!-- ^^^^^
Please provide a concise, informative and self-explanatory title.
Don't put issue numbers in there, do this in the PR body below.
For example, instead of "Fixes sagemath#1234" use "Introduce new method to
calculate 1+1"
--> Implemented the following methods for dynamical semigroups:

1. multiply (*) : multiply two dynamical semigroups
2. power (^) : exponentiate a dynamical semigroup
3. nth_iterate : evaluate on a value n times with a dynamical semigroup
4. homogenize : convert affine dynamical semigroups to projective
dynamical semigroups
5. dehomogenize : convert projective dynamical semigroups to affine
dynamical semigroups

<!-- Describe your changes here in detail -->

This is part of issue sagemath#35954

<!-- 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 linked a relevant issue or discussion.
- [x] I have created tests covering the changes.
- [x] I have updated the documentation accordingly.

### ⌛ Dependencies

<!-- List all open PRs that this PR logically depends on
- sagemath#12345: short description why this is a dependency
- sagemath#34567: ...
--> sagemath#35947 : first implementation of dynamical semigroups

<!-- If you're unsure about any of these, don't hesitate to ask. We're
here to help! -->
    
URL: sagemath#35988
Reported by: Dang Phan
Reviewer(s): Alexander Galarraga
vbraun pushed a commit to vbraun/sage that referenced this pull request Aug 27, 2023
sagemathgh-35988: Implemented five new operations for dynamical semigroups
    
<!-- ^^^^^
Please provide a concise, informative and self-explanatory title.
Don't put issue numbers in there, do this in the PR body below.
For example, instead of "Fixes sagemath#1234" use "Introduce new method to
calculate 1+1"
--> Implemented the following methods for dynamical semigroups:

1. multiply (*) : multiply two dynamical semigroups
2. power (^) : exponentiate a dynamical semigroup
3. nth_iterate : evaluate on a value n times with a dynamical semigroup
4. homogenize : convert affine dynamical semigroups to projective
dynamical semigroups
5. dehomogenize : convert projective dynamical semigroups to affine
dynamical semigroups

<!-- Describe your changes here in detail -->

This is part of issue sagemath#35954

<!-- 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 linked a relevant issue or discussion.
- [x] I have created tests covering the changes.
- [x] I have updated the documentation accordingly.

### ⌛ Dependencies

<!-- List all open PRs that this PR logically depends on
- sagemath#12345: short description why this is a dependency
- sagemath#34567: ...
--> sagemath#35947 : first implementation of dynamical semigroups

<!-- If you're unsure about any of these, don't hesitate to ask. We're
here to help! -->
    
URL: sagemath#35988
Reported by: Dang Phan
Reviewer(s): Alexander Galarraga
vbraun pushed a commit to vbraun/sage that referenced this pull request Aug 27, 2023
sagemathgh-36041: Implemented two new methods for dynamical semigroups
    
<!-- ^^^^^
Please provide a concise, informative and self-explanatory title.
Don't put issue numbers in there, do this in the PR body below.
For example, instead of "Fixes sagemath#1234" use "Introduce new method to
calculate 1+1"
-->Implemented `orbit` and `specialization` methods for dynamical
semigroups.
<!-- Describe your changes here in detail -->
The orbit method works like the orbit method in dynamical systems, but
instead the point is evaluated on using a dynamical semigroup.

The specialization method returns a dynamical semigroup defined by the
specialization of the generators.

This is part of issue sagemath#35954
<!-- 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 linked a relevant issue or discussion.
- [x] I have created tests covering the changes.
- [x] I have updated the documentation accordingly.

### ⌛ Dependencies

<!-- List all open PRs that this PR logically depends on
- sagemath#12345: short description why this is a dependency
- sagemath#34567: ...
-->
sagemath#35947
sagemath#35988
<!-- If you're unsure about any of these, don't hesitate to ask. We're
here to help! -->
    
URL: sagemath#36041
Reported by: Dang Phan
Reviewer(s): Alexander Galarraga
@vbraun vbraun merged commit c44c89e into sagemath:develop Aug 27, 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.

4 participants