1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
use ;
/// Ring
///
/// # Definition
///
/// 1. $\mathbb{R}$ is an abelian group under addition, meaning that:
/// - $(a + b) + c = a + (b + c), \forall a, b, c \in \mathbb{R} $ (that is,
/// + is associative)
/// - $a + b = b + a , \forall a, b \in \mathbb{R}$ (that is, + is
/// commutative).
/// - There is an element 0 in $\mathbb{R}$ such that $a + 0 = a, \forall a
/// \in \mathbb{R} $ (that is, 0 is the additive identity)
/// - For each a in $\mathbb{R}$ there exists −a in $\mathbb{R}$ such that
/// $a + (−a) = 0$ (that is, −a is the additive inverse of a)
/// 2. $\mathbb{R}$ is a monoid under multiplication, meaning that:
/// - $(a * b) * c = a * (b * c), \forall a, b, c \in \mathbb{R}$ (that is, *
/// is associative)
/// - There is an element 1 in R such that $a · 1 = a \wedge 1 · a = a, \forall
/// a \in \mathbb{R}$ (that is, 1 is the multiplicative
/// identity)
/// 3. Multiplication is distributive with respect to addition, meaning that:
/// - $a * (b + c) = (a * b) + (a * c), \forall a, b, c \in \mathbb{R}$ (left
/// distributivity)
/// - $(b + c) * a = (b * a) + (c * a), \forall a, b, c \in \mathbb{R}$ (right
/// distributivity)
///
/// <https://en.wikipedia.org/wiki/Ring_(mathematics)>
impl_ring!;
impl_commutative_ring!;