{ localUrl: '../page/algebraic_monoid.html', arbitalUrl: 'https://arbital.com/p/algebraic_monoid', rawJsonUrl: '../raw/3h3.json', likeableId: '2652', likeableType: 'page', myLikeValue: '0', likeCount: '1', dislikeCount: '0', likeScore: '1', individualLikes: [ 'JaimeSevillaMolina' ], pageId: 'algebraic_monoid', edit: '7', editSummary: '', prevEdit: '6', currentEdit: '7', wasPublished: 'true', type: 'wiki', title: 'Monoid', clickbait: '', textLength: '3466', alias: 'algebraic_monoid', externalUrl: '', sortChildrenBy: 'likes', hasVote: 'false', voteType: '', votesAnonymous: 'false', editCreatorId: 'PatrickStevens', editCreatedAt: '2016-06-15 11:21:48', pageCreatorId: 'NateSoares', pageCreatedAt: '2016-05-09 06:55:47', seeDomainId: '0', editDomainId: 'AlexeiAndreev', submitToDomainId: '0', isAutosave: 'false', isSnapshot: 'false', isLiveEdit: 'true', isMinorEdit: 'false', indirectTeacher: 'false', todoCount: '0', isEditorComment: 'false', isApprovedComment: 'true', isResolved: 'false', snapshotText: '', anchorContext: '', anchorText: '', anchorOffset: '0', mergedInto: '', isDeleted: 'false', viewCount: '81', text: 'A monoid $M$ is a pair $(X, \\diamond)$ where $X$ is a [set_theory_set set] and $\\diamond$ is an [associative_function associative] binary [3h7 operator] with an identity. $\\diamond$ is often interpreted as concatenation; data structures that support concatenation and have an "empty element" (such as lists, strings, and the natural numbers under addition) are examples of monoids.\n\n Monoids are [3gx algebraic structures]. We write $x \\diamond y$ for the application of $\\diamond$ to $x, y \\in X$, which must be defined. $x \\diamond y$ is commonly abbreviated $xy$ when $\\diamond$ can be inferred from context. The monoid axioms (which govern the behavior of $\\diamond$) are as follows.\n\n1. (Closure) For all $x, y$ in $X$, $xy$ is also in $X$.\n1. (Associativity) For all $x, y, z$ in $X$, $x(yz) = (xy)z$.\n2. (Identity) There is an $e$ in $X$ such that, for all $x$ in $X$, $xe = ex = x.$\n\nThe axiom of closure says that $x \\diamond y \\in X$, i.e. that combining two elements of $X$ using $\\diamond$ yields another element of $X$. In other words, $X$ is [3gy closed] under $\\diamond$.\n\nThe axiom of associativity says that $\\diamond$ is an [3h4 associative] operation, which justifies omitting parenthesis when describing the application of $\\diamond$ to many elements in sequence..\n\nThe axiom of identity says that there is some element $e$ in $X$ that $\\diamond$ treats as "empty": If you apply $\\diamond$ to $e$ and $x$, then $\\diamond$ simply returns $x$. The identity is unique: Given two elements $e$ and $z$ that satisfy the axiom of identity, we have $ze = e = ez = z.$ Thus, we can speak of "the identity" $e$ of $M$. $e$ is often written $1$ or $1_M$.\n\n%%%knows-requisite([4c7]):\nEquivalently, a monoid is a category with exactly one object.\n%%%\n\nMonoids are [algebraic_semigroup semigroups] equipped with an identity. [3gd Groups] are monoids with inverses. For more on how monoids relate to other [algerbraic_structure algebraic structures], refer to the [algebraic_structure_tree tree of algebraic structures].\n\n# Notation\n\nGiven a monoid $M = (X, \\diamond)$, we say "$X$ forms a monoid under $\\diamond$." For example, the set of finite bitstrings forms a monoid under concatenation: The set of finite bitstrings is closed under concatenation; concatenation is an associative operation; and the empty bitstring is a finite bitstring that acts like an identity under concatenation. \n\n$X$ is called the [3gz underlying set] of $M$, and $\\diamond$ is called the _monoid operation_. $x \\diamond y$ is usually abbreviated $xy$. $M$ is generally allowed to substitute for $X$ when discussing the monoid. For example, we say that the elements $x, y \\in X$ are "in $M$," and sometimes write "$x, y \\in M$" or talk about the "elements of $M$."\n\n# Examples\n\nBitstrings form a monoid under concatenation, with the empty string as the identity.\n\nThe set of finite lists of elements drawn from $Y$ (for any set $Y$) form a monoid under concatenation, with the empty list as the identity.\n\nThe natural numbers [45h $\\mathbb N$] form a monid under addition, with $0$ as the identity.\n\nMonoids have found some use in functional programming languages such as [https://en.wikipedia.org/wiki/Haskell_(programming_language) Haskell] and [https://en.wikipedia.org/wiki/Scala_(programming_language) Scala], where they are used to generalize over data types in which values can be "combined" (by some operation $\\diamond$) and which include an "empty" value (the identity).\n', metaText: '', isTextLoaded: 'true', isSubscribedToDiscussion: 'false', isSubscribedToUser: 'false', isSubscribedAsMaintainer: 'false', discussionSubscriberCount: '1', maintainerCount: '1', userSubscriberCount: '0', lastVisit: '', hasDraft: 'false', votes: [], voteSummary: 'null', muVoteSummary: '0', voteScaling: '0', currentUserVote: '-2', voteCount: '0', lockedVoteType: '', maxEditEver: '0', redLinkCount: '0', lockedBy: '', lockedUntil: '', nextPageId: '', prevPageId: '', usedAsMastery: 'false', proposalEditNum: '0', permissions: { edit: { has: 'false', reason: 'You don't have domain permission to edit this page' }, proposeEdit: { has: 'true', reason: '' }, delete: { has: 'false', reason: 'You don't have domain permission to delete this page' }, comment: { has: 'false', reason: 'You can't comment in this domain because you are not a member' }, proposeComment: { has: 'true', reason: '' } }, summaries: {}, creatorIds: [ 'NateSoares', 'PatrickStevens' ], childIds: [], parentIds: [ 'algebraic_structure' ], commentIds: [], questionIds: [], tagIds: [ 'needs_clickbait_meta_tag' ], relatedIds: [], markIds: [], explanations: [], learnMore: [], requirements: [], subjects: [], lenses: [], lensParentId: '', pathPages: [], learnMoreTaughtMap: {}, learnMoreCoveredMap: {}, learnMoreRequiredMap: {}, editHistory: {}, domainSubmissions: {}, answers: [], answerCount: '0', commentCount: '0', newCommentCount: '0', linkedMarkCount: '0', changeLogs: [ { likeableId: '0', likeableType: 'changeLog', myLikeValue: '0', likeCount: '0', dislikeCount: '0', likeScore: '0', individualLikes: [], id: '17129', pageId: 'algebraic_monoid', userId: 'EricBruylant', edit: '0', type: 'newTag', createdAt: '2016-07-19 02:08:00', auxPageId: 'needs_clickbait_meta_tag', oldSettingsValue: '', newSettingsValue: '' }, { likeableId: '0', likeableType: 'changeLog', myLikeValue: '0', likeCount: '0', dislikeCount: '0', likeScore: '0', individualLikes: [], id: '13022', pageId: 'algebraic_monoid', userId: 'PatrickStevens', edit: '7', type: 'newEdit', createdAt: '2016-06-15 11:21:48', auxPageId: '', oldSettingsValue: '', newSettingsValue: '' }, { likeableId: '0', likeableType: 'changeLog', myLikeValue: '0', likeCount: '0', dislikeCount: '0', likeScore: '0', individualLikes: [], id: '12627', pageId: 'algebraic_monoid', userId: 'PatrickStevens', edit: '6', type: 'newEdit', createdAt: '2016-06-14 12:29:01', auxPageId: '', oldSettingsValue: '', newSettingsValue: '' }, { likeableId: '0', likeableType: 'changeLog', myLikeValue: '0', likeCount: '0', dislikeCount: '0', likeScore: '0', individualLikes: [], id: '12336', pageId: 'algebraic_monoid', userId: 'NateSoares', edit: '5', type: 'newEdit', createdAt: '2016-06-10 16:43:41', auxPageId: '', oldSettingsValue: '', newSettingsValue: '' }, { likeableId: '0', likeableType: 'changeLog', myLikeValue: '0', likeCount: '0', dislikeCount: '0', likeScore: '0', individualLikes: [], id: '9936', pageId: 'algebraic_monoid', userId: 'NateSoares', edit: '3', type: 'newEdit', createdAt: '2016-05-10 23:32:55', auxPageId: '', oldSettingsValue: '', newSettingsValue: '' }, { likeableId: '0', likeableType: 'changeLog', myLikeValue: '0', likeCount: '0', dislikeCount: '0', likeScore: '0', individualLikes: [], id: '9934', pageId: 'algebraic_monoid', userId: 'NateSoares', edit: '2', type: 'newEdit', createdAt: '2016-05-10 23:28:45', auxPageId: '', oldSettingsValue: '', newSettingsValue: '' }, { likeableId: '0', likeableType: 'changeLog', myLikeValue: '0', likeCount: '0', dislikeCount: '0', likeScore: '0', individualLikes: [], id: '9710', pageId: 'algebraic_monoid', userId: 'NateSoares', edit: '1', type: 'newEdit', createdAt: '2016-05-09 06:55:47', auxPageId: '', oldSettingsValue: '', newSettingsValue: '' }, { likeableId: '0', likeableType: 'changeLog', myLikeValue: '0', likeCount: '0', dislikeCount: '0', likeScore: '0', individualLikes: [], id: '9707', pageId: 'algebraic_monoid', userId: 'NateSoares', edit: '0', type: 'newParent', createdAt: '2016-05-09 06:25:58', auxPageId: 'algebraic_structure', oldSettingsValue: '', newSettingsValue: '' } ], feedSubmissions: [], searchStrings: {}, hasChildren: 'false', hasParents: 'true', redAliases: {}, improvementTagIds: [], nonMetaTagIds: [], todos: [], slowDownMap: 'null', speedUpMap: 'null', arcPageIds: 'null', contentRequests: { lessTechnical: { likeableId: '3410', likeableType: 'contentRequest', myLikeValue: '0', likeCount: '1', dislikeCount: '0', likeScore: '1', individualLikes: [], id: '54', pageId: 'algebraic_monoid', requestType: 'lessTechnical', createdAt: '2016-08-19 01:16:05' } } }