Documentation

Provenance.SemiringWithMonus

Semirings with monus #

This file defines semirings with monus and introduces their main properties.

Many semirings relevant for provenance can be equipped with a monus - operator, resulting in what is called a semiring with monus, or m-semiring. This is standard in semiring theory [Ame84] and was introduced in the setting of provenance semirings by Geerts and Poggi [GP10].

References #

Definition of a SemiringWithMonus #

A SemiringWithMonus is a naturally ordered semiring with a monus operation that is compatible with the natural order. We do not require the semiring to be necessarily commutative.

Instances

    Main properties #

    theorem monus_smallest {α : Type} [K : SemiringWithMonus α] (a b : α) :
    a b + (a - b) ∀ (c : α), a b + ca - b c

    In a SemiringWithMonus, a - b is the smallest element c satisfying a ≤ b + c.

    theorem monus_self {α : Type} [K : SemiringWithMonus α] (a : α) :
    a - a = 0

    In a SemiringWithMonus, a - a = 0.

    theorem zero_monus {α : Type} [K : SemiringWithMonus α] (a : α) :
    0 - a = 0

    In a SemiringWithMonus, 0 - a = 0.

    theorem add_monus {α : Type} [K : SemiringWithMonus α] (a b : α) :
    a + (b - a) = b + (a - b)

    In a SemiringWithMonus, a + (b -a) = b + (a - b).

    theorem monus_add {α : Type} [K : SemiringWithMonus α] (a b c : α) :
    a - (b + c) = a - b - c

    In a SemiringWithMonus, monus is left-distributive over plus.

    Additional properties #

    The following properties do not always hold in an arbitrary m-semiring.

    @[reducible, inline]
    abbrev idempotent (α : Type u_1) [Semiring α] :

    A Semiring is idempotent if a + a = a.

    Equations
    Instances For
      @[reducible, inline]
      abbrev absorptive (α : Type u_1) [Semiring α] :

      A Semiring is absorptive (also called 0-closed or 0-bounded) if 1 + a = a.

      Equations
      Instances For
        @[reducible, inline]

        We define left-distributivity of times over monus in a SemiringWithMonus.

        Equations
        Instances For
          theorem idempotent_of_absorptive {α : Type u_1} [K : Semiring α] :

          Absorptivity implies idempotence

          theorem le_iff_add_eq {α : Type} [K : SemiringWithMonus α] (h : idempotent α) (a b : α) :
          a b a + b = b

          In an idempotent SemiringWithMonus, a ≤ b iff a + b = b.

          theorem plus_is_join {α : Type} [K : SemiringWithMonus α] (h : idempotent α) (a b : α) :
          (a a + b b a + b) ∀ (u : α), a u b ua + b u

          In an idempotent SemiringWithMonus, plus is the join of the semilattice

          theorem idempotent_of_add_monus {α : Type} [K : SemiringWithMonus α] (h : ∀ (a b c : α), a + b - c = a - c + (b - c)) :

          In a SemiringWithMonus, right-distributivity of monus over plus implies idempotence.

          theorem add_monus_of_idempotent {α : Type} [K : SemiringWithMonus α] (h : idempotent α) (a b c : α) :
          a + b - c = a - c + (b - c)

          In a SemiringWithMonus, idempotence implies right-distributivity of monus over plus.

          theorem idempotent_iff_add_monus {α : Type} [SemiringWithMonus α] :
          idempotent α ∀ (a b c : α), a + b - c = a - c + (b - c)

          A SemiringWithMonus is idempotent iff monus is right-distributive over plus.

          theorem monus_le {α : Type} [SemiringWithMonus α] (a b : α) :
          a - b a
          theorem le_plus_monus {α : Type} [SemiringWithMonus α] (a b : α) :
          a b + (a - b)

          Homomorphisms of SemiringWithMonuss #

          class SemiringWithMonusHom (α β : Type) [SemiringWithMonus α] [SemiringWithMonus β] extends α →+* β :

          Definition of a homomorphism of SemiringWithMonuss

          Instances
            Equations

            If ν is an injective m-semiring homomorphism from α to β, and β is idempotent, so is α.

            If ν is an m-semiring homomorphism from α onto β, and α is idempotent, so is β.

            If ν is an injective m-semiring homomorphism from α to β, and β has left-distributivity of times over monus, so has α.

            If ν is an m-semiring homomorphism from α onto β, and α has left-distributivity of times over monus, so has β.

            Miscellaneous #

            class HasAltLinearOrder (α : Type u) :
            Instances