# freemonoid.xyz

### Info

it is a personal site.

uses Python static site builder and is hosted on freemonoid.xyz via netlify. Math is rendered via MathJax.

### How to into webdev?

I started by reading the raw html of my friends websites or random internet people I thought were cool. Eventually I started hosting a page on neocities where I wrote the html from scratch. I also made a portfolio on Github Pages in html, just a simple index.html and used “Deploy static content to Pages” instead of normal “pages build and deployment” which seems to run jekyll and takes longer.)

I used Jekyll for a while, and it is good, it is used by many people for their portfolios and etc. But I found myself spending too much time learning how to use it… and I realized that I could just write a static site generator by myself using the magic of pandoc. So, that is what I do now: I have some folders with markdowns (like the one I am writing in now) and a Python script that loops through that, converts to html using pandoc, saves to a ./static/ folder, and then deploys al that to Netlify.

• more here

• photos page

### why free monoid?

why free monoid? Just because I think they are cool.. For example, a discrete-time dynamical system: you have a set X of states and function f : X → X which updates the state. Any initial state x0 ∈ X has a trajectory {x0, x1, x2, ⋯} given by xt = ft(x0) = f(f(⋯(f(x0))⋯)) (f is applied t times). It obeys fs + t(x0) = fs(ft(x0)) which is derived from the fact that the set of natural numbers ℕ = {0, 1, 2, ⋯} along with the operation of addition forms a monoid. And not just any monoid - is a special because it is the free monoid on 1 generator.

How free monoid works is suppose you have a set S = {x, y, z} of “symbols”. The free monoid on S (aka the free monoid generated by x, y, z) consists of all the “words” (finite lists) you can make out of x, y, z. So you have [x, x], [x, y], [y, x], [x, x, x], [x, x, x, x], the empty list [], etc. any lists of any length. Since it is a monoid, you can add two lists by concatenating them: [x, y] + [y, z] = [x, y, y, z] for example.

Returning to the case of 1 generator, suppose S contains just one symbol, S = {x}. Then the free monoid on S consists of S *  = {[], [x], [x, x], [x, x, x], [x, x, x, x], ⋯} which you may realize are just the natural numbers in disguise! If we label the list containing n xs by [x]n then we have [x]m + n = [x]m[x]n and [x]0 = []. This shows S* and are isomorphic as monoids (in fact the map n ↦ [x]n is the isomorphism).

In the language of category theory, there is a functor F : Set → Mon from the category of sets to the category of monoids called the free monoid functor. Being a functor, if A and B are two sets with the same cardinality (same size) then F(A) is isomorphic to F(B). So, we can reference a set by its cardinality without ambiguity. Particularly, F(1) ≅ ℕ. Also, for any sets X and S, the actions of F(S) on X are in one-to-one correspondence with maps S → (X → X). This is why earlier we could specify an action of on X by choosing some point 1 → (X → X), i.e. some function f : X → X.

In computer science these are called transition systems and are apparently typically defines in terms of a graph where each vertex represents a state of the system, and each vertex has a labelled set of outgoing edges going to other states. With non-determinism, you already have plenty of interesting problems, such as speedrunning: suppose my initial state is x0 ∈ X and I have a target state x* ∈ X - what sequence of actions will get me there quickest?