-
Notifications
You must be signed in to change notification settings - Fork 316
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
refactor: migrate to dependent induction lemmas #17543
base: master
Are you sure you want to change the base?
Conversation
j-loreaux
commented
Oct 8, 2024
PR summary 309fd33d76Import changes for modified filesNo significant changes to the import graph Import changes for all files
|
--induction hx using closure_induction with | ||
--| mem z hz => induction hy using closure_induction with | ||
--| mem _ h => exact mem _ hz _ h | ||
--| mul _ _ _ _ h₁ h₂ => exact mul_right _ _ _ _ _ (subset_closure hz) h₁ h₂ |
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 curious if you can drop the (subset_closure hz)
here; I think it can be found by unification?
(mul_left : ∀ x hx y hy z hz , p x z hx hz → p y z hy hz → p (x * y) z (mul_mem hx hy) hz) | ||
(mul_right : ∀ x hx y hy z hz , p z x hz hx → p z y hz hy → p z (x * y) hz (mul_mem hx hy)) |
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.
(mul_left : ∀ x hx y hy z hz , p x z hx hz → p y z hy hz → p (x * y) z (mul_mem hx hy) hz) | |
(mul_right : ∀ x hx y hy z hz , p z x hz hx → p z y hz hy → p z (x * y) hz (mul_mem hx hy)) | |
(mul_left : ∀ x hx y hy z hz, p x z hx hz → p y z hy hz → p (x * y) z (mul_mem hx hy) hz) | |
(mul_right : ∀ x hx y hy z hz, p z x hz hx → p z y hz hy → p z (x * y) hz (mul_mem hx hy)) |
It's great that we add these dependent induction lemmas, but I think it's sometimes nice to also have access to the non-dependent ones, since they're sometimes easier to work with. For example, when it's necessary to specify the motive to a dependent induction in the case where the application is not dependent, you often end up with things looking syntactically really confusing. I'd personally slightly prefer keeping the old ones around, under other names. But if it turns out that adjusting mathlib to your change is easy enough, then it's probably fine... |
You should never have to specify the motive explicitly though? Usually when you do, this is because:
|