Tag Archives: monoid

Counting inversions with monoidal sparks

Time for me to reveal the example I had in mind that led to the generalization in my previous post. Thanks for all the interesting comments: it seems like there are some interesting connections to be explored (e.g. to the … Continue reading

Posted in math | Tagged , , , , , , , , | 8 Comments

Monoidal sparks

While at ICFP in St. Louis this past week, I discovered an interesting construction on monoids that no one I talked to (including Kenny Foner and Edward Kmett) seemed to have heard of or thought about before. In this post I’ll … Continue reading

Posted in math | Tagged , , , , | 27 Comments

New Haskell Symposium paper on “twisted functors”

Satvik Chauhan, Piyush Kurur and I have a new paper which will appear at the 2016 Haskell Symposium in Japan: How to Twist Pointers without Breaking Them Although pointer manipulations are used as a primary motivating example, at heart the … Continue reading

Posted in haskell, writing | Tagged , , , , , , , , , | 6 Comments

A strange representation of Z6

On my other blog I am writing about a proof of the Lucas-Lehmer test, and today in the course of working up some examples I stumbled across this little gem. Let be a monoid, and let denote the subset of … Continue reading

Posted in math | Tagged , , , | 11 Comments

Themes on Streams

> {-# LANGUAGE DeriveFunctor, FlexibleInstances #-} Recall that a stream is a countably infinite sequence of values: > data Stream a = a :> Stream a > deriving (Functor, Show) > > sHead (a :> _) = a > sTail … Continue reading

Posted in haskell, math | Tagged , , , , , | 3 Comments

Monoids for Maybe

The other day I had two lists of monoidal values that I wanted to combine in a certain way, and I realized it was an instance of this more general pattern: > {-# LANGUAGE GeneralizedNewtypeDeriving #-} > import Data.Monoid > … Continue reading

Posted in haskell | Tagged , , , | 8 Comments

Collecting attributes

I’m proceeding with the redesign of my diagrams library slowly but surely. I don’t have a lot of time to work on it, hence the “slowly”. But progress is being made. It’s still very much in the design phase, which … Continue reading

Posted in haskell, projects | Tagged , , , , | 56 Comments

Collecting unstructured information with the monoid of partial knowledge

In my last post, I described what I’m calling the “monoid of partial knowledge”, a way of creating a monoid over sets of elements from a preorder, which is a generalization of the familiar monoid over a set with a … Continue reading

Posted in haskell, math | Tagged , , | 4 Comments

An interesting monoid

The other day I was just sort of letting my mind wander, and I came up with an interesting monoid, which I’m calling the “monoid of partial knowledge”. So I thought I’d write about it here, partly just because it’s … Continue reading

Posted in math | Tagged , , | 3 Comments