Skip to content

[ refactor ] Data.Nat.Properties to enforce definitional proof-irrelevance of (in)equational hypotheses where possible #2941

@jamesmckinna

Description

@jamesmckinna

#2939 is yet another refactoring for one special case (plus knock-ons), but we should probably try to go through and systematically strengthen lemmas to take definitionally proof-irrelevant arguments of the form m ≤ n etc. where possible.

Issues:

  • probably v3.0/breaking for such a large-scale overhaul?
  • a lot of this (unfortunately; you live and learn ;-)) involves reverting changes previously made by me to insist on pattern matching on such proofs, even where unnecessary (and expensive: see comments on Why we should revert stdlib to --without-K instead of using --cubical-compatible #2792 about suppressing noUnsupportedIndexedMatch warnings)
  • knock-on cost in eg. need for eta-expansion to ensure irrelevant arguments are consumed by functions presuming relevance
  • @JacquesCarette 's comment about the pattern of matching-on-implicits which seems to be the only sensible way to do this
  • codifying the change as a style-guide policy?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions