Module: Algebra::Group

Includes:
Monoid
Included in:
AbelianGroup
Defined in:
lib/y_support/abstract_algebra.rb

Overview

A group is a monoid with additive inverse.

additive inversion: #additive_inverse

Instance Method Summary collapse

Methods included from Monoid

#+, included

Instance Method Details

#-(subtrahend) ⇒ Object



49
# File 'lib/y_support/abstract_algebra.rb', line 49

def - subtrahend; add subtrahend.additive_inverse end

#-@Object



48
# File 'lib/y_support/abstract_algebra.rb', line 48

def -@; additive_inverse end