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

[Merged by Bors] - refactor(set_theory/game/*): Fix bad notation < on (pre-)games #13963

Closed
wants to merge 43 commits into from

Conversation

vihdzp
Copy link
Collaborator

@vihdzp vihdzp commented May 5, 2022

Our current definition for < on pre-games is, in the wider mathematical literature, referred to as (less or fuzzy to). Conversely, what's usually referred to by < coincides with the relation we get from preorder pgame (which the current API avoids using at all).

We rename < to , and add the basic API for both the new < and relations. This allows us to define new instances on pgame and game that we couldn't before. We also take the opportunity to add some basic API on the fuzzy relation .

See the Zulip discussion.


Note that the file winner.lean now consists entirely of one-line statements. I'll propose its deletion in an upcoming PR.

Open in Gitpod

@vihdzp vihdzp added the awaiting-review The author would like community review of the PR label May 5, 2022
@vihdzp vihdzp requested review from semorrison and digama0 May 5, 2022 02:35
@vihdzp vihdzp changed the title refactor(set_theory/game/*): Fix incorrect definition of < refactor(set_theory/game/*): Fix incorrect definition of < on (pre-)games May 5, 2022
@alreadydone
Copy link
Collaborator

alreadydone commented May 5, 2022

Seems you didn't exhibit a preorder instance on pgame and use antisymmetrization to define game? Is that planned for a future PR?

@vihdzp
Copy link
Collaborator Author

vihdzp commented May 5, 2022

I did make an preorder pgame instance, it's on line 349 of pgame.lean. Using antisymmetrization to define game is PR #13917 (which I'll put on pause, since it almost surely conflicts with this).

@vihdzp
Copy link
Collaborator Author

vihdzp commented May 5, 2022

Note: I moved a lot of theorems around on pgame.lean in order to be able to define the preorder as quickly as possible. I also removed a few mk lemmas that were made entirely redundant by their non-mk counterparts.

@semorrison
Copy link
Collaborator

Great, if CI passes you can ask bors to merge it.

bors d+

@bors
Copy link

bors bot commented May 14, 2022

✌️ vihdzp can now approve this pull request. To approve and merge a pull request, simply reply with bors r+. More detailed instructions are available here.

@github-actions github-actions bot added delegated The PR author may merge after reviewing final suggestions. and removed awaiting-review The author would like community review of the PR labels May 14, 2022
Copy link
Collaborator

@alreadydone alreadydone left a comment

Choose a reason for hiding this comment

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

The PR looks good in general; the added lemmas all seem to be an integral part of the refactoring. However it's a big diff so I have quite a few comments.

There are several reordering of code that I don't quite understand (doesn't seem to golf anything, so it seems to me that they make the diff unnecessarily large.

I believe I marked all lemmas that are removed instead of replaced by the corresponding ones under the new notation. I think it's a good idea to keep them in general.

src/set_theory/surreal/basic.lean Show resolved Hide resolved
src/set_theory/surreal/basic.lean Show resolved Hide resolved
src/set_theory/surreal/basic.lean Show resolved Hide resolved
src/set_theory/game/short.lean Outdated Show resolved Hide resolved
src/set_theory/game/pgame.lean Show resolved Hide resolved
src/set_theory/game/pgame.lean Outdated Show resolved Hide resolved
src/set_theory/game/pgame.lean Outdated Show resolved Hide resolved
src/set_theory/game/pgame.lean Outdated Show resolved Hide resolved
src/set_theory/game/pgame.lean Outdated Show resolved Hide resolved
src/set_theory/game/basic.lean Show resolved Hide resolved
src/set_theory/game/pgame.lean Outdated Show resolved Hide resolved
@vihdzp
Copy link
Collaborator Author

vihdzp commented May 15, 2022

bors r+

bors bot pushed a commit that referenced this pull request May 15, 2022
)

Our current definition for `<` on pre-games is, in the wider mathematical literature, referred to as `⧏` (less or fuzzy to). Conversely, what's usually referred to by `<` coincides with the relation we get from `preorder pgame` (which the current API avoids using at all).

We rename `<` to `⧏`, and add the basic API for both the new `<` and `⧏` relations. This allows us to define new instances on `pgame` and `game` that we couldn't before. We also take the opportunity to add some basic API on the fuzzy relation `∥`.

See the [Zulip discussion](https://leanprover.zulipchat.com/#narrow/stream/116395-maths/topic/Surreal.20numbers/near/281094687).
@bors
Copy link

bors bot commented May 15, 2022

Pull request successfully merged into master.

Build succeeded:

@bors bors bot changed the title refactor(set_theory/game/*): Fix bad notation < on (pre-)games [Merged by Bors] - refactor(set_theory/game/*): Fix bad notation < on (pre-)games May 15, 2022
@bors bors bot closed this May 15, 2022
@bors bors bot deleted the fix_lt branch May 15, 2022 02:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
delegated The PR author may merge after reviewing final suggestions.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants