> On Jan 16, 2017, at 3:25 AM, Xiaodi Wu via swift-evolution
> <[email protected]> wrote:
>
> Unless I'm mistaken, after removing division, models of SignedArithmetic
> would have the mathematical properties of a ring. For every element a in ring
> R, there must exist an additive inverse -a in R such that a + (-a) = 0.
> Models of Arithmetic alone would not necessarily have that property.
Closure under the arithmetic operations is a sticky point for all the finite
integer models vs. the actual ring axioms. No finite [non-modulo] integer type
is closed, because of overflow. Similarly, additive inverses don’t exist for
the most negative value of a signed type, or for any non-zero value of an
unsigned type. The obvious way around this is to say that types conforming to
Arithmetic model a subset of a ring that need not be closed under the
operations.
– Steve
_______________________________________________
swift-evolution mailing list
[email protected]
https://lists.swift.org/mailman/listinfo/swift-evolution