Finite Groups

From Esolang
Jump to: navigation, search

Finite Groups is language with a mathematical-looking syntax. Its data types are lists of elements of finite groups. The supported groups are cyclic groups, dihedral groups, symmetric groups, alternating groups, dicyclic groups, and cartesian products of groups. As permutations can be applied, it's also a functional language.

Computational class

Finite Groups programs always halt.

Examples

Hello world

"Hello world!\n"

rot13

let a = "abcdefghijklmABCDEFGHIJKLMnopqrstuvwxyzNOPQRSTUVWXYZ"
    r : Ca = "n"
    i : Ca,i = i
in  Sa→rai

touppercase

let t = !"01"
    f = tt
    a = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
    u : C[a] = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
    l : C[a] = "abcdefghijklmnopqrstuvwxyz"
    m = S["01"*a->C[f*u,t*u,f*l,t*l]]
    i : C[a,i] = i
in  (m(f*i))P

quaternions

let q = Dic["1-"]
    c : C[q] = "-"
    i : Dic["1-"] = cc
    j : Dic["1-"] = cccc
    k = ij
in  k

External resources