All Downloads are FREE. Search and download functionalities are using the official Maven repository.

poly.algebra.HasBottom.scala Maven / Gradle / Ivy

package poly.algebra

import poly.algebra.factory._
import poly.algebra.specgroup._

/**
 * Represents the existence of a minimum `bottom` element.
 *
 * An instance of this typeclass should satisfy the following axiom:
 *  - $lawBottom
 * @define lawBottom '''Bottom element''': ∀''a''∈X, ''a'' >= bot.
 * @author Tongfei Chen
 * @since 0.2.5
 */
trait HasBottom[@sp(fdilb) +X] {
  /** The minimum `bot` element of this type. */
  def bot: X

  def asIdentityWithBot: HasIdentity[X] = new HasIdentity[X] {
    def id: X = bot
  }

}

object HasBottom extends ImplicitGetter[HasBottom]




© 2015 - 2024 Weber Informatics LLC | Privacy Policy