GAP: Alternate function to create finitely presented Coxeter monoid of a given Coxeter matrix

 

CoxeterMonoid:=function(D)
# takes lists of relations of the form ["x",m,"y"] where x,y are generators and n is pos. int.
    local gens, rels, i, j, k, fm, f, n;
    gens := [];
    rels := [];

    # Collect generators from input D
    for i in D do
        Add(gens, i[1]);
        Add(gens, i[3]);
    od;
    
    gens := Set(gens);  # Ensure gens contains unique elements
    fm := FreeMonoid(gens);
    
    # Construct relations based on triples in input D
    for i in D do
        j := Position(gens, i[1]);
        k := Position(gens, i[3]);
	n:=Int((i[2])/2);

        # Add matrix relations
	if n=i[2]/2 then
        	Add(rels, [(fm.(k) * fm.(j))^(n), (fm.(j) * fm.(k))^(n)]);
	else
		Add(rels, [(fm.(k) * fm.(j))^(n)*fm.(k), (fm.(j) * fm.(k))^(n)*fm.(j)]);
	fi;

	# Add idempotence relations
	Add(rels, [fm.(j)^2,fm.(j)]);
	Add(rels, [fm.(k)^2,fm.(k)]);
	
    od;
    rels:=Set(rels);

    # Define finitely presented monoid with relations
    f := fm / rels;
    return f;
end;

Comments

Popular posts from this blog

GAP: Function to create Origami monoid of given finitely presented monoid with all idempotent generators

GAP: Function to iterate through Coxeter monoids to test which produce a finite Origami monoid