Skip to content

OperationLaws

OperationLaws = object

Defined in: structure.ts:7

The laws an operation satisfies. TypeScript cannot express associativity or commutativity in a type, so an interface claiming them enforces nothing. Stating them as data makes the claim inspectable at runtime and checkable by the property tests in laws.ts.

readonly associative: boolean

Defined in: structure.ts:9

(a ∘ b) ∘ c = a ∘ (b ∘ c).


readonly commutative: boolean

Defined in: structure.ts:12

a ∘ b = b ∘ a.


readonly identity: boolean

Defined in: structure.ts:15

An element e with e ∘ a = a ∘ e = a exists.


readonly inverses: boolean

Defined in: structure.ts:18

Every element (every non-zero element, for a field) has an inverse.