-
Couldn't load subscription status.
- Fork 259
[ refactor ] make n≢i : n ≢ toℕ i argument to lower₁ irrelevant
#2783
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
base: master
Are you sure you want to change the base?
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.
Modulo my comment on whether we even need those extra 2 lemmas, I'm now happy with this.
|
Revisiting this, I'm happy to badge this as |
PR #2748 made me rethink whether
Data.Fin.Base.lower₁is fit-for-purpose (as an inverse toinject₁), or could instead be deprecated in favour of the newData.Fin.Base.lower...This PR doesn't entirely solve that issue, but does prove the two definitions extensionally equal on their domains, as a consequence, perhaps more importantly, of weakening the type of
lower₁so that its precondition is made irrelevant.Two (possibly more downstream) knock-on consequences:
lemmaavoided in favour of [ refactor ] weaken type oflower₁-¬0≢0 : ∀ {ℓ} {A : Set ℓ} → .(0 ≢ 0) → Aencapsulates a repeated pattern of (¬-recompute) reasoning, which ideally would be madeprivate, but is needed in bothBaseandProperties... so, reluctantly, has been added;Relation.Nullary.Negation.Core.contradiction-irr#2785 on which this PR is nowblocked.lower₁could/should be simplified by delegation to those forlower...?i ≢ jargument toData.Fin.Base.punchOutirrelevant #2790Data.Fin.Base.punchOutand its properties could similarly be weakened by making itsi≢j : i ≢ jargument irrelevant! What else might be susceptible to this kind of refactoring?NB. As observed/observable in
README.Data.Fin.Relation.Unary.Top, we can actually avoid having any uses oflower₁in the library, sodeprecationseems possible/desirable #2786UPDATED: no longer
blockedon #2785 .