Logs: liberachat/#haskell
| 2025-10-14 13:03:45 | → | inline joins (~inlinE@ip-178-202-059-161.um47.pools.vodafone-ip.de) |
| 2025-10-14 13:05:42 | × | kuribas quits (~user@2a02-1810-2825-6000-b5ac-98ee-b19a-ab1f.ip6.access.telenet.be) (Ping timeout: 256 seconds) |
| 2025-10-14 13:07:37 | × | CiaoSen quits (~Jura@2a02:8071:64e1:da0:5a47:caff:fe78:33db) (Ping timeout: 244 seconds) |
| 2025-10-14 13:14:49 | → | luna___ joins (~luna@fedora/bittin) |
| 2025-10-14 13:15:49 | → | Googulator6 joins (~Googulato@2a01-036d-0106-03fa-dc7a-fb6e-71bb-aaf0.pool6.digikabel.hu) |
| 2025-10-14 13:16:13 | × | Googulator quits (~Googulato@2a01-036d-0106-03fa-dc7a-fb6e-71bb-aaf0.pool6.digikabel.hu) (Quit: Client closed) |
| 2025-10-14 13:17:36 | × | inline quits (~inlinE@ip-178-202-059-161.um47.pools.vodafone-ip.de) (Ping timeout: 256 seconds) |
| 2025-10-14 13:17:53 | → | inline joins (~inlinE@ip-178-202-059-142.um47.pools.vodafone-ip.de) |
| 2025-10-14 13:25:59 | → | bitdex joins (~bitdex@gateway/tor-sasl/bitdex) |
| 2025-10-14 13:28:44 | <ski> | tomsmeding : i guess saying "polynomial" implies that the monoid is the free (commutative) monoid (hm, for "formal polynomial", would that be cofree monoid ?) |
| 2025-10-14 13:30:07 | × | bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Remote host closed the connection) |
| 2025-10-14 13:30:45 | → | bitdex joins (~bitdex@gateway/tor-sasl/bitdex) |
| 2025-10-14 13:44:10 | <tomsmeding> | ski: well, the article does say that the polynomials are formal ("set of formal sums") |
| 2025-10-14 13:44:33 | <tomsmeding> | so whether the elements of G do something with each other is not relevant for how many elements rae in R[G], it seems |
| 2025-10-14 13:44:58 | <tomsmeding> | if the sums weren't formal, this would be a module, would it not? |
| 2025-10-14 13:45:00 | → | ystael joins (~ystael@user/ystael) |
| 2025-10-14 13:45:50 | <tomsmeding> | (I guess it would be a "monoid module") |
| 2025-10-14 13:50:20 | <ski> | "More formally, `R[G]' is the free `R'-module on the set `G', endowed with `R'-linear multiplication defined on the base elements by `g·h := gh', where the left-hand side is understood as the multiplication in `R[G]' and the right-hand side is understood in `G'." |
| 2025-10-14 13:51:30 | <ski> | "so whether the elements of G do something with each other is not relevant for how many elements rae in R[G], it seems" -- it affects multiplication of them, yea |
| 2025-10-14 13:51:33 | × | weary-traveler quits (~user@user/user363627) (Remote host closed the connection) |
| 2025-10-14 13:53:47 | <ski> | instead of combining monomials like `x * y^2' and `x^3 * z' into `x^4 * y^2 * z', amounting to bag/multiset merging (multiplication in the free commutative monoid), you get a not-necessarily-injective multiplication in the monoid |
| 2025-10-14 13:56:59 | <ski> | (and yea, i was reminded of this, by the talk about `Monoid (Map k v)'. if we ignore the multiplication (and subtraction/negation) in the monoid ring, then `k' corresponds to the set of indeterminates (generators) in the "polynomials", and `v' corresponds to the monoid of coefficients) |
| 2025-10-14 13:58:08 | <tomsmeding> | ski: "not-necessarily-injective" -- ah! right |
| 2025-10-14 13:59:36 | <tomsmeding> | thanks :) |
| 2025-10-14 14:01:19 | <ski> | the "formal" here means that when we write a (finite) sum of products of monoid elements and associated coefficients, this is just a suggestive notation for having a function from the monoid elements to the coefficients, with "finite support" (meaning only finitely many monoid elements map to non-zero coefficients) |
| 2025-10-14 14:02:33 | <ski> | (iirc, in some rings, (ordinary) polynomials can be distinct (having distinct coefficients), while still having the same value at each possible input (being extensionally equal, the corresponding functions to the polynomials being equal)) |
| 2025-10-14 14:02:37 | × | fp quits (~Thunderbi@2001:708:20:1406::10c5) (Ping timeout: 246 seconds) |
| 2025-10-14 14:05:05 | <tomsmeding> | polynomials on Z/2Z have a bunch of such "redundancies" |
| 2025-10-14 14:06:11 | <tomsmeding> | but yeah I see where my understanding went wrong: I wasn't properly thinking about the fact that this R[G] is supposed to be a _ring_, and what the multiplication operation ought to do |
| 2025-10-14 14:06:35 | <tomsmeding> | then the structure of the monoid suddenly comes into play |
| 2025-10-14 14:07:18 | × | inline quits (~inlinE@ip-178-202-059-142.um47.pools.vodafone-ip.de) (Ping timeout: 252 seconds) |
| 2025-10-14 14:07:48 | → | inline joins (~inlinE@ip-178-202-059-161.um47.pools.vodafone-ip.de) |
| 2025-10-14 14:08:42 | × | MelodyOwO quits (~MelodyOwO@user/MelodyOwO) (Quit: Leaving.) |
| 2025-10-14 14:09:35 | <ski> | (oh, and when i said "formal polynomial", above, i had "formal power series in mind" .. so wondering whether that would involve a cofree, rather than free, monoid. cf. how direct sum (categorical coproduct) and direct product (categorical product) for *commutative* groups (as well as monoids) coincide, for a *finite* family of groups (or monoids), but are distinct for an infinite family. difference is that |
| 2025-10-14 14:09:41 | <ski> | the direct sum case involves a function, with *finite support*, from the family indices to elements of the corresponding groups (monoids), while for direct product, it's arbitrary such functions. for arbitrary (not necessarily commutative/abelian) groups (monoids), though, the categorical coproduct case (called "free product") becomes a larger object. `g_0 * h * g_1' is no longer equal to `(g_0 * g_1) * h', |
| 2025-10-14 14:09:47 | <ski> | so you can no longer keep track of a single element per group (monoid)) |
| 2025-10-14 14:10:58 | <ski> | now .. is there a use case for wanting to multiply `Map k v's, given `Monoid k' ? |
| 2025-10-14 14:12:21 | <tomsmeding> | feels a bit far-fetched to me, not least because the result "invents new keys" that were not there in the original |
| 2025-10-14 14:12:30 | <tomsmeding> | *originals |
| 2025-10-14 14:12:57 | <ski> | yea .. it kinda has a "tensor feel" |
| 2025-10-14 14:13:25 | <ski> | wanting all combinations of the keys in one map, with the keys in the other map |
| 2025-10-14 14:13:30 | <tomsmeding> | yes, the other problem is that the maps get very big this way |
| 2025-10-14 14:13:42 | <ski> | right |
| 2025-10-14 14:13:43 | <tomsmeding> | that's not usually what you want in practice |
| 2025-10-14 14:14:01 | <ski> | unless the key monoid is highly non-injective, i guess |
| 2025-10-14 14:14:29 | <ski> | like, the keys are lists, bags, or sets ? |
| 2025-10-14 14:14:50 | <tomsmeding> | aren't those free and thus very injective? |
| 2025-10-14 14:14:57 | <ski> | or `Sum a' or `Product a' |
| 2025-10-14 14:15:12 | <tomsmeding> | even with Sum/Product the maps still grow quadratically |
| 2025-10-14 14:15:31 | <ski> | mm, right, scratch the "lists" |
| 2025-10-14 14:16:15 | ← | luna___ parts (~luna@fedora/bittin) () |
| 2025-10-14 14:16:19 | <ski> | ((finite) bags are free *commutative* monoids. (finite) sets are free *commutative* *idempotent* monoids) |
| 2025-10-14 14:16:23 | <tomsmeding> | furthermore, for this to be useful as an abstraction, I'd expect the operation to be used more than, say, once in a program |
| 2025-10-14 14:16:46 | <tomsmeding> | something which makes a datastructure grow quadratically in size is not something you use very often |
| 2025-10-14 14:16:47 | <ski> | yes |
| 2025-10-14 14:17:08 | <tomsmeding> | yes I know that bags/sets are not quite free |
| 2025-10-14 14:17:29 | <tomsmeding> | hm, I guess subsets of a very small universe set could have the required very-non-injective property |
| 2025-10-14 14:17:29 | <ski> | it might be useful to want a (lower approximation to) division, wrt this multiplication |
| 2025-10-14 14:17:43 | × | inline quits (~inlinE@ip-178-202-059-161.um47.pools.vodafone-ip.de) (Remote host closed the connection) |
| 2025-10-14 14:17:58 | <ski> | like, how in relational algebra, division of relations is useful to express queries of the form "for all ..., ..." |
| 2025-10-14 14:20:03 | <ski> | hmm .. `Map (k0,k1) v -> Map k0 v -> Map k1 v' would be a similar operation |
| 2025-10-14 14:20:32 | <ski> | "bags/sets are not quite free" -- they are free, just not free *plain* monoids |
| 2025-10-14 14:21:02 | tomsmeding | has to go, sorry |
| 2025-10-14 14:22:36 | <ski> | ("free" is relative to the target category (monoids, commutative monoids, commutative idempotent monoids, ..), and also to the source category (sets, monoids, ..). "free commutative monoid on a monoid" means we force multiplication to be commutative, generally causing a lot of previously distinct elements to now be identified with each other. the "abelianization" of a monoid) |
| 2025-10-14 14:22:49 | <ski> | no worries. was fun to ponder a bit |
| 2025-10-14 14:24:21 | × | Beowulf quits (florian@2a01:4f9:3b:2d56::2) (Quit: = "") |
| 2025-10-14 14:24:58 | → | mochie joins (~mochie@user/mochie) |
| 2025-10-14 14:27:04 | → | Unicorn_Princess joins (~Unicorn_P@user/Unicorn-Princess/x-3540542) |
| 2025-10-14 14:29:48 | → | Beowulf joins (florian@2a01:4f9:3b:2d56::2) |
| 2025-10-14 14:35:36 | × | Googulator6 quits (~Googulato@2a01-036d-0106-03fa-dc7a-fb6e-71bb-aaf0.pool6.digikabel.hu) (Quit: Client closed) |
| 2025-10-14 14:35:38 | → | Googulator18 joins (~Googulato@2a01-036d-0106-03fa-dc7a-fb6e-71bb-aaf0.pool6.digikabel.hu) |
| 2025-10-14 14:38:55 | × | trickard_ quits (~trickard@cpe-54-98-47-163.wireline.com.au) (Read error: Connection reset by peer) |
| 2025-10-14 14:39:08 | → | trickard_ joins (~trickard@cpe-54-98-47-163.wireline.com.au) |
| 2025-10-14 14:41:44 | × | jreicher quits (~user@user/jreicher) (Ping timeout: 260 seconds) |
| 2025-10-14 14:47:26 | → | Square3 joins (~Square@user/square) |
| 2025-10-14 15:02:47 | → | Zemy_ joins (~Zemy@2600:100c:b0a0:3fd9:78c1:9aff:fe21:5d9e) |
| 2025-10-14 15:03:57 | × | infinity0 quits (~infinity0@pwned.gg) (Ping timeout: 250 seconds) |
| 2025-10-14 15:05:15 | × | mreh quits (~matthew@host86-146-25-125.range86-146.btcentralplus.com) (Ping timeout: 256 seconds) |
| 2025-10-14 15:06:24 | × | Zemy quits (~Zemy@syn-076-184-041-021.res.spectrum.com) (Ping timeout: 256 seconds) |
| 2025-10-14 15:06:27 | × | gustrb quits (~gustrb@191.243.134.87) (Ping timeout: 244 seconds) |
| 2025-10-14 15:09:48 | × | dhil quits (~dhil@5.151.29.137) (Remote host closed the connection) |
| 2025-10-14 15:10:13 | → | inline joins (~inlinE@ip-178-202-059-161.um47.pools.vodafone-ip.de) |
| 2025-10-14 15:13:55 | → | mreh joins (~matthew@host86-146-25-125.range86-146.btcentralplus.com) |
| 2025-10-14 15:15:35 | → | Zemy joins (~Zemy@12.218.191.128) |
| 2025-10-14 15:16:54 | × | bitterx quits (~marko@user/bitterx) (Quit: bitterx) |
| 2025-10-14 15:18:42 | × | Zemy_ quits (~Zemy@2600:100c:b0a0:3fd9:78c1:9aff:fe21:5d9e) (Ping timeout: 260 seconds) |
| 2025-10-14 15:20:43 | → | Tri joins (~tnguyen@69.74.159.34) |
| 2025-10-14 15:21:57 | <Tri> | I'm a haskell beginner, I've written a small program. Could someone review my code please? Thank you https://paste.tomsmeding.com/2dnXN2fo |
| 2025-10-14 15:24:56 | → | infinity0 joins (~infinity0@pwned.gg) |
| 2025-10-14 15:25:45 | <int-e> | > groupBy (==) [1,2,1] |
| 2025-10-14 15:25:47 | <lambdabot> | error: |
| 2025-10-14 15:25:47 | <lambdabot> | Ambiguous occurrence ‘groupBy’ |
| 2025-10-14 15:25:47 | <lambdabot> | It could refer to |
| 2025-10-14 15:25:56 | <int-e> | @undefine |
| 2025-10-14 15:25:56 | <lambdabot> | Undefined. |
| 2025-10-14 15:25:58 | <int-e> | > groupBy (==) [1,2,1] |
| 2025-10-14 15:26:00 | <lambdabot> | [[1],[2],[1]] |
| 2025-10-14 15:26:41 | <int-e> | (also, shouldn't most of this work be done in SQL instead...) |
| 2025-10-14 15:27:54 | <Tri> | I never think about it, but I prefer to not use SQL |
| 2025-10-14 15:28:01 | → | Shark8 joins (~Shark8@c-174-56-102-109.hsd1.nm.comcast.net) |
All times are in UTC.