6 ms·
The https://en.wikipedia.org/w/index.php?title=Algebraic_structure&oldid=898454436132 https://en.wikipedia.org/w/index.php?title=Algebraic_structu... link in fo
by tom_mellior 7y ago
The https://en.wikipedia.org/w/index.php?title=Algebraic_structure&oldid=898454436132 https://en.wikipedia.org/w/index.php?title=Algebraic_structu... link in footnote 1 is broken, it takes me to a page saying 'The revision #898454436132 of the page named "Algebraic structure" does not exist.'.
As for the quoted definition, I agree that if this is your first exposure to abstract algebra, you'll need a moment to unpack the sentence, follow some links, and especially, read on. But that's not just Wikipedia; the blog post also takes considerably more than one sentence to explain what it is trying to say. You can't explain everything in one sentence.
For whatever it's worth, as a data point relating to a recent discussion on whether a university CS education makes you a better programmer or not: We literally started learning about algebraic structures in the first math class on the first morning of the first year of university. If you're going to program in a setting where algebraic structures (or data types!) are relevant, this university knowledge will help.
Finally, this blog looks very nice visually, but the "broken typewriter" font effect makes the code examples much too hard to read. It would be great if the ribbon in that typewriter could be replaced.
- pbhowmic 7y agoI second the comment on the site design. Very beautiful indeed. In fact, I just spent some time looking at the css/scss files.
- jordigh 7y agoI think Wikipedia is wrong here. I never knew that anyone referred to any generic set with operations as an "algebra". That's a magma! An algebra has much more structure than any generic set with operations. Does this really happen? Do people really say generic "algebra" for any set with operations? (And as an aside, I don't like the "abstract algebra" monicker. It sounds so immature and undergraddy. There isn't an ordinary algebra and an abstract algebra. It's all just algebra.)
- gue5t 7y agoWhat structure does an algebra require to merit the name? I've been confused by examples such as the "algebra of a monad", which as I understand it arises from adding an "unwrap" operation in addition to monadic "return" and "join". Most of the references to this only ever refer to specific cases such as an algebra over a monad or an algebra over a functor or a division algebra, etc., and I haven't seen anyone be clear about what makes something an algebra.
- jordigh 7y agoI would expect an algebra to be at least a ring, i.e. an algebra over a field, a vector space with a bilinear product. If you just say plain algebra, I think matrices and vectors or similar. Most of the structures called algebras (e.g. boolean algebras) have at least two operations and these operations frequently interact via distributivity or something like that. Other examples are ring-like, like a sigma algebra in measure theory. I've never really encountered anyone saying "algebra" for a generic algebraic structure. I think with this definition Cohn was trying to start a trend that didn't catch on.
- matt-noonan 7y agoThere are two different notions of algebra in common usage. One is the definition you gave (vector space with a bilinear product, as in Lie algebras, Clifford algebras, etc). The other definition, as used in the blog, comes from universal algebra. https://en.m.wikipedia.org/wiki/Universal_algebra https://en.m.wikipedia.org/wiki/Universal_algebra Which one(s) you have been exposed to just depends on which mathematical subcultures you’ve interacted with.
- jordigh 7y agoOkay, thanks. Mathematics Wikipedia is sometimes very biased towards certain points of view (usually more undergraddy, as evidenced by its insistence with the "abstract algebra" term), so I think it's being a bit too pushy with its "algebra" definition here. I've edited the term to say that this usage of "algebra" is a universal algebra thing.
- tom_mellior 7y ago> I never knew that anyone referred to any generic set with operations as an "algebra". That's a magma! If I have a structure S with an associative operation, and another structure G with an associative operation and a neutral element, I will say that S and G are different algebras, not "different magmas". Others looking at S or G will not ask "oh, what kind of magma do you have there", they will ask what kind of algebra. So... Yes, these are both (special cases of) magmas, but the general term used for them is "algebra" or "algebraic structure". Don't you agree?
- jordigh 7y agoBut you added extra structure: associativity. Cohn's definition doesn't. It just says "set with operations" (well, finitary operations, but that's kind of always implicit in the definition of "operation"). So you're saying people shorten the phrase "algebraic structure" to "algebra"; this hasn't been my experience.
- tom_mellior 7y ago> But you added extra structure: associativity. Of course I added extra structure since I wanted to make a point about different kinds of algebraic structures which are all subsumed by the term "algebraic structure" or "algebra". And it's only possible to distinguish kinds of algebraic structures by differences in structure. But adding extra structure in one example doesn't mean that I somehow exclude magmas from the definition. Here is the example again, extended to be include a component with no extra structure: If I have a structure M with no structure but an operation, a structure S with an associative operation, and another structure G with an associative operation and a neutral element, I will say that M and S and G are different algebras, not "different magmas". Others looking at M or S or G will not ask "oh, what kind of magma do you have there", they will ask what kind of algebra. Of course this extension by M doesn't change anything about the validity of the example. Magmas are just as included in the term "algebraic structure" as semigroups, groups, rings, and fields are. > So you're saying people shorten the phrase "algebraic structure" to "algebra"; this hasn't been my experience. <shrug> It has been mine. Wikipedia has lots of uses of the phrase "the algebra of": https://en.wikipedia.org/w/index.php?search=%22the+algebra+of%22&title=Special%3ASearch&go=Go&ns0=1 https://en.wikipedia.org/w/index.php?search=%22the+algebra+o..., always meaning something like "the algebraic structure of set X with operations f, g, and h".
- smadge 7y agoA magma is a set with one binary operation. There can be any number of operations in an algebra, with any arity. For example, one of the simplest algebras has one unary operation. You can specify additional structure of an algebra beyond just the operations using axioms. Universal algebra is where I first learned this idea.
- tel 7y agoAlgebra is pretty overloaded. In the context of the study of "abstract algebra" the term takes on the more generic representation. You can also see it being defined in places like Lawvere Theories and F-Algebras. It's a context-dependent thing.
- jordigh 7y agoOkay, given this, I'm going to rewrite Wikipedia to say "in universal algebra", to disambiguate the context in which it's quoting Cohn.
- JadeNB 7y ago> I never knew that anyone referred to any generic set with operations as an "algebra". That's a magma! An algebra has much more structure than any generic set with operations. I think this comes from competing definitions of the term 'algebra'. There's what, for want of anything better than the terrible term, I'll call the 'algebraist's algebra', which is (at least) a ring that is compatibly a module over some other ring; and there's what, as smadge (https://news.ycombinator.com/item?id=21443587 https://news.ycombinator.com/item?id=21443587) mentions, could be called the 'universal algebraist's algebra', which is a model for a certain signature, of which the algebraist's algebra is just one special case. EDIT: I see that matt_noonan (https://news.ycombinator.com/item?id=21443892 https://news.ycombinator.com/item?id=21443892) made this point several hours ago, but I leave this post in case the links below are convincing. For sources maybe more authoritative than Wikipedia, you might consult Springer's Encyclopedia of Mathematics (https://www.encyclopediaofmath.org/index.php/Variety_of_universal_algebras https://www.encyclopediaofmath.org/index.php/Variety_of_univ...) or the nLab (https://ncatlab.org/nlab/show/universal+algebra https://ncatlab.org/nlab/show/universal+algebra).
- kccqzy 7y agoUnfortunately terms are a bit overloaded. When some people say algebra they might mean algebra over a field. A field alone adds a lot of structure to your set and is powerful enough to define vectors on. Algebra over a field adds even more. But that is different from an algebraic structure. An algebraic structure is just some set with some operations and laws. It can be magmas, monoids, groups etc. And abstract algebra is also a necessary term to differentiate from "ordinary" algebra that is taught in middle schools and high schools, where algebra only means using letters to substitute numbers. It's unfortunate.
- QuinnWilton 7y ago> For whatever it's worth, as a data point relating to a recent discussion on whether a university CS education makes you a better programmer or not: We literally started learning about algebraic structures in the first math class on the first morning of the first year of university. My problem with this argument is that this isn't a universal experience. I went to Waterloo, arguably one of the best CS schools in Canada, and the CS program didn't even cover algebraic structures. I learned about them, because I spent all my electives taking extra math classes, but the vast majority of my classmates never needed to learn any math beyond basic combinatorics and some introductory complexity analysis. I believe that these topics are incredibly important, but I'm not convinced that a college degree is a reliable way to be exposed to them. If your school covers this stuff, great! But at least in my experience, I think it's disingenuous to act like all computer science programs will.
- joe_the_user 7y agoI have an MA in math and I was somewhat exposed to category theory and algebraic structures in my time at the university. I find knowing math generally is useful for programming but I haven't found it useful for understanding functional programming in particular. I think functional programming uses category theory in a different fashion than even fairly advanced mathematics; Breaking Hungerford's Algebra text, in the chapter on Category Theory, he writes, "A significant part of the elementary theory of categories is the attempt to generalize as many concepts as possible from well-known categories (for example, sets or modules) to arbitrary categories". Which is a rather different approach than building programs. Which is to say that for most mathematics, categories are tools for generalization or for providing a firmer foundation for existing mathematical structures. For understands monads as used by FP, the description as "little languages" seemed the best - it's way of not having side effects by using functions to incrementally construct output instead of doing output in the middle of computation.
- codebje 7y agoMuch of software design is about composition, which is where category theory shines, just at the most shallow levels. If I dream up a way to tackle a problem, have I made a category? If I have two modules, can I compose them into one, is there an initial or final module, is composition associative? If there's some underlying structure, what's the free module based on it? Those questions can help make more durable designs.