magma1 http://www.openmath.org/cd/magma1.ocd 2004-10-03 2003-10-03 1 0 experimental alg1 arith1 fns1 fns2 logic1 nums1 quant1 relation1 set1 setname1 Basic functions for magma theory Initiated by Arjeh M. Cohen 2003-10-03 declare_magma This symbol is a constructor for magmas. It takes two arguments in the following order: a set to specify the elements in the magma and a binary operation to specify the magma operation. The binary operation should act on elements of the set and return an element of the set. A magma is closed under its operation. This example represents the magma which has as elements all integers, and the magma operation is addition of the square of the first argument to the second. 2 is_commutative The unary boolean function whose value is true iff the argument is a commutative magma. If is_commutative(G) then for all a,b in carrier(G) a*b = b*a is_associative The unary boolean function whose value is true iff the argument is an associative magma. If is_associative(G) then for all a,b in carrier(G) (a*b) * c = a*(b*c) is_submagma The binary boolean function whose value is true iff the second argument is a submagma of the first. If is_submagma(G,H) then H is a set of elements of G and H is closed under multiplication. carrier This symbol represents a unary function, whose argument should be a magma G (for instance constructed by declare_magma). When applied to G, its value should be the set of elements of a magma. The carrier of declare_magma(G,*) is G. is_identity This symbols represents a binary boolean function, whose arguments should be a magma and an element of the element set of the magma. When applied to the arguments M and x, it returns true if the element x is an identity of the magma M, that is, x*y = y* x = y for all elements y of M. multiplication This symbol represents a unary function, whose argument should be a magma G. It returns the map sending pairs of elements of G to their products. The multiplication of declare_magma(G,*) is *. free_magma This symbol represents a binary function. The argument is a list or a set. When evaluated on such an argument, the function represents the free magma generated by the entries of the list or set. The free magma on the letters a, b: submagma This symbol is a constructor symbol with two arguments. The first argument is a magma M, the second a list or set, D, of elements of M. When applied to M and D, it denotes the submagma of M generated by D. This example represents the submagma of the multiplicative magma of the nonzero reals generated by the constants Pi and E: left_divides This symbol is a ternary function. Its first argument should be a magma M and the second and third arguments should be elements of M. When applied to M, a, and b, it denotes the fact that a is a left_divisor of b in M. This means that there is v in M such that av=b. right_divides This symbol is a ternary function. Its first argument should be a magma M and the second and third arguments should be elements of M. When applied to M, a, and b, it denotes the fact that a is a right_divisor of b in M. This means that there is v in M such that va = b. left_expression This symbol is a binary function. Its first argument should be a magma M, the second argument a list L of elements of M When applied to M and L, it denotes the left product (L[1] * ( ... (L[n-1] * L[n]) ... )) of all elements in the list L. 1 32 6 right_expression This symbol is a binary function. Its first argument should be a magma M, the second argument a list L of elements of M When applied to M and L, it denotes the right product (( ... (L[1] * L[2]) * ... ) * L[n]) of all elements in the list L. 1 32 6