-
Notifications
You must be signed in to change notification settings - Fork 381
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] - feat(SetTheory/Game/PGame): inserting an option a game #14517
Conversation
PR summary 1e4fe08ef0Import changes for modified filesNo significant changes to the import graph Import changes for all files
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is about as far as I can review this, as someone not that familiar in the area. The style and naming looks good now, thanks. I'll have a quick go at shortening the proofs, but probably someone else should give this the final review to check if any obvious lemmas are missing.
I moved |
/-- The pregame constructed by inserting `x'` as a new left option into x. -/ | ||
def insertLeft (x x' : PGame.{u}) : PGame := | ||
match x with | ||
| mk xl xr xL xR => mk (xl ⊕ PUnit) xr (Sum.elim xL fun _ => x') xR |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any reason to not instead use
| mk xl xr xL xR => mk (xl ⊕ PUnit) xr (Sum.elim xL fun _ => x') xR | |
| mk xl xr xL xR => mk (Option xl) xr (Option.rec x' xL) xR |
or whatever the spelling is that works?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This nicely avoids having any useless _ : Unit
variables floating around
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure about this. First, the proof of insertLeft_numeric
seems to get a little more complicated, since simp
doesn't seem to work very well with Option
values and I have to do an additional layer of constructor
/ rcases
. But also, perhaps more significantly, this wouldn't generalize to the case where we want to insert a whole family xl' -> PGame
, in which case we definitely need a xl ⊕ xl'
. I think we would want to do that later in the development of the theory.
bors merge |
inserting an option into a game Co-authored-by: Eric Wieser <[email protected]>
Pull request successfully merged into master. Build succeeded: |
inserting an option into a game
This PR is split out of #14498. Here, we define the operation of inserting a left or right option into a game, and prove a few standard results about it.