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

16987: remove dups in Intersection at instantiation #16988

Merged
merged 2 commits into from
Jun 7, 2019
Merged

Conversation

smichr
Copy link
Member

@smichr smichr commented Jun 7, 2019

References to other Issues or PRs

Fixes #16987 without fully addressing the fact that a different wrong value is being returned from Intersection({1}, {x}). The value of {1} is being returned by simplify_intersection. (But this is only true if x is also 1.)

Brief description of what is fixed or changed

Intersection simplification depends on the presence of duplicates as shown in the issue. In addition, there is some indeterminancy in the processing because the arguments are not sorted.

This PR fixes both those issue.

Other comments

Release Notes

  • sets
    • processing of arguments of an intersection is more canonical

@sympy-bot
Copy link

sympy-bot commented Jun 7, 2019

Hi, I am the SymPy bot (v147). I'm here to help you write a release notes entry. Please read the guide on how to write release notes.

Your release notes are in good order.

Here is what the release notes will look like:

  • sets
    • processing of arguments of an intersection is more canonical (#16988 by @smichr)

This will be added to https://github.com/sympy/sympy/wiki/Release-Notes-for-1.5.

Note: This comment will be updated with the latest check if you edit the pull request. You need to reload the page to see it.

Click here to see the pull request description that was parsed.

<!-- Your title above should be a short description of what
was changed. Do not include the issue number in the title. -->

#### References to other Issues or PRs
<!-- If this pull request fixes an issue, write "Fixes #NNNN" in that exact
format, e.g. "Fixes #1234". See
https://github.com/blog/1506-closing-issues-via-pull-requests . Please also
write a comment on that issue linking back to this pull request once it is
open. -->

Fixes #16987 without fully addressing the fact that a different wrong value is being returned from `Intersection({1}, {x})`. The value of `{1}` is being returned by `simplify_intersection`. (But this is only true if `x` is also `1`.)

#### Brief description of what is fixed or changed

Intersection simplification depends on the presence of duplicates as shown in the issue. In addition, there is some indeterminancy in the processing because the arguments are not sorted.

This PR fixes both those issue.

#### Other comments


#### Release Notes

<!-- Write the release notes for this release below. See
https://github.com/sympy/sympy/wiki/Writing-Release-Notes for more information
on how to write release notes. The bot will check your release notes
automatically to see if they are formatted correctly. -->

<!-- BEGIN RELEASE NOTES -->
- sets
    - processing of arguments of an intersection is more canonical
<!-- END RELEASE NOTES -->

Update

The release notes on the wiki have been updated.

@oscargus oscargus added the sets label Jun 7, 2019
@smichr smichr merged commit 8f4999d into sympy:master Jun 7, 2019
@smichr smichr deleted the set branch June 7, 2019 22:44
@codecov
Copy link

codecov bot commented Jun 7, 2019

Codecov Report

Merging #16988 into master will increase coverage by 0.013%.
The diff coverage is 100%.

@@              Coverage Diff              @@
##            master    #16988       +/-   ##
=============================================
+ Coverage   73.956%   73.969%   +0.013%     
=============================================
  Files          620       620               
  Lines       160517    160517               
  Branches     37656     37656               
=============================================
+ Hits        118713    118734       +21     
+ Misses       36327     36299       -28     
- Partials      5477      5484        +7

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Intersection should remove duplicates
3 participants