-
Notifications
You must be signed in to change notification settings - Fork 298
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(set_theory/{pgame, surreal}): add left_distrib_equiv
and right_distrib_equiv
for pgames
#7440
Conversation
@[refl] theorem le_refl : ∀ x : game, x ≤ x := | ||
theorem le_refl : ∀ x : game, x ≤ x := | ||
by { rintro ⟨x⟩, apply pgame.le_refl } | ||
@[trans] theorem le_trans : ∀ x y z : game, x ≤ y → y ≤ z → x ≤ z := | ||
theorem le_trans : ∀ x y z : game, x ≤ y → y ≤ z → x ≤ z := |
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.
Does the linter reject these now?
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.
The issue is not with the linter. There are type check errors in the calc
mode proofs and refl
proofs. Lean tries to use game.le_trans
where it should be using pgame.le_trans
.
Similarly, for refl
.
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.
There's an error here:
mathlib/src/set_theory/surreal.lean
Line 389 in 41674ba
calc w + y ≤ move_left x ix + y : add_le_add_right hix |
and one here:
mathlib/src/set_theory/surreal.lean
Line 531 in 41674ba
le_refl := by { rintros ⟨_⟩, refl }, |
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 worries me quite a bit - I don't see why lean at any point thinks these two are interchangeable
theorem game.le_trans (x y z : game) : x ≤ y → y ≤ z → x ≤ z
theorem pgame.le_trans {x y z : pgame} : x ≤ y → y ≤ z → x ≤ z
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.
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.
Thanks for finding this! This thread is unresolved though :(
Is there any workaround for this?
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 wonder if there is some way to assign "priorities" to trans
and refl
...
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.
Priorities wouldn't help, theproblem is that the refl
tactic says "find me the refl lemma for has_le.le
", not "find me the refl lemma for @has_le.le pgame
".
Your choice to remove them was sensible here - but I'd recommend perhaps going further and either in this PR or a follow-up, removing all the refl and trans attributes about le and lt, and adding them back locally using local attribute [trans] pgame.le_trans
etc (along with a link to that thread!).
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 tried this, but it breaks all the calc
proofs (and there are lots of them) in surreal.lean
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.
Several calc
proofs are about numeric
so can't be moved to pgame.lean
@apurvnakade, can you summarise the new results by providing a |
Either way, this is looking good to me and hopefully we can merge shortly. |
There is still a missing |
Right now, it is not possible to define |
bors merge |
…t_distrib_equiv` for pgames (#7440) and several other auxiliary lemmas. [Zulip thread](https://leanprover.zulipchat.com/#narrow/stream/116395-maths/topic/Surreal.20numbers)
Pull request successfully merged into master. Build succeeded: |
left_distrib_equiv
and right_distrib_equiv
for pgamesleft_distrib_equiv
and right_distrib_equiv
for pgames
and several other auxiliary lemmas.
Zulip thread