Skip to content

generic Nonzero proposal #1175

Open
Open
@mechvel

Description

@mechvel

The master lib of April 28, 2020 has NonZero for Integer, ℚ and maybe for other special domains.

I suggest to generalize this to IsNonzero : Pred Carrier _
and Nonzero = Σ Carrier IsNonzero,

declaring this for arbitrary Semiring. This can be put to Algebra.Properties.Semiring.
Motivation.

  1. IsNonzero "happens" in various semirings.
  2. The Nonzero subset in many semirings (the ones without zero divisors: Nat,Integer, and many
    others) is a monoid by _*_. This sub-monoid is often used, it is an usual construction applied
    to a (semi)ring.

Also I have an impression that they write in literature Nonzero rather than NonZero,
Nonempty rather than NonEmpty.
?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions