Skip to content

Explore further improving instance search for NonZero instances #1565

Open
@MatthewDaggitt

Description

@MatthewDaggitt

Now that it looks very likely we're going to use instance arguments for resolving NonZero proofs we should explore whether it's possible and/or desirable to automatically create derived instances to further improve the user's experience:

Candidates:

  • NonZero m → NonZero n → NonZero (m * n)
  • NonZero m → NonZero n → NonZero (m / n)
  • NonZero p → NonZero (1/ p)
  • NonZero m → NonZero (gcd m n)
  • NonZero n → NonZero (gcd m n)
  • NonZero m → NonZero (m ^ n)
  • NonZero n → NonZero (s ◃ n)

(the latter two are an example of where one might get multiple instances for the same proof and where irrelevance would be useful)

A list of proofs that would benefit from these:

  • Data.Nat.LCM - all of it
  • Data.Rational.Unnormalised.Properties - *-cancelˡ-/ *-cancelʳ-/ 1/-involutive-≡ 1/-involutive
  • Data.Rational.Normalised.Properties - normalize-coprime, ↥-normalize, ↧-normalize, normalize-cong, normalize-nonNeg, normalize-pos, normalize-injective-≃, 0/n≡0
  • Data.Integer.Properties - *-cancelʳ-≡
  • Data.Integer.Divisibility.Signed - ∣ᵤ⇒∣
  • System.Clock - show

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions