-
Notifications
You must be signed in to change notification settings - Fork 295
refactor(group_theory/perm/basic): Redefine pow
in terms of iterate
#18077
Conversation
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.
Can you do the same thing for function.End
? module.End
etc would be good too, but as those aren't "simpler" than perm
they can wait to a follow-up.
Did you consider changing the defeq of |
I remember lengthy discussions about why |
Done |
That would be great to have in the commit message if yo ucan find it
Why not? Does too much stuff depend on the current definition? |
Yes exactly. Many proofs rely on the current defeq. Here is the discussion: https://leanprover.zulipchat.com/#narrow/stream/113488-general/topic/.60nat.2Eiterate.60.20vs.20.60stream.2Eiterate.60 |
Well, I guess not that many in the end 😄 |
I realized on Zulip that it wouldn't help at all; this relies on function application commuting with recursors definitionally, which it does not. |
Can we compromise on adding a |
Note that if we go forward with this refactor, the |
Could we abandon this as a mathlib3 PR, and make any desired changes after the port? |
I don't know. This is pretty short, self-contained and ready. |
Is this fixable? |
Isn't the fix exactly what my TODO says, but for |
No, it isn't. |
Before,
equiv.perm
inherited the defaultpow
. This changes it to a custom one usingfunction.iterate
.Unfortunately, this changes the defeq as
function.iterate
is left recursive whilenpow_rec
is right recursive. See Zulip: https://leanprover.zulipchat.com/#narrow/stream/113488-general/topic/.60nat.2Eiterate.60.20vs.20.60stream.2Eiterate.60Match leanprover-community/mathlib4#1388