Mescal
Loading...
Searching...
No Matches
monoid_sub.h
1#ifndef _MONOID_SUB_H_
2#define _MONOID_SUB_H_
3
4/* ____ _ _ */
5/* / ___| _ _| |__ ___ ___ _ __ ___ (_) __ _ _ __ ___ _ _ _ __ ___ */
6/* \___ \| | | | '_ \/ __|/ _ \ '_ ` _ \| |/ _` | '__/ _ \| | | | '_ \/ __| */
7/* ___) | |_| | |_) \__ \ __/ | | | | | | (_| | | | (_) | |_| | |_) \__ \ */
8/* |____/ \__,_|_.__/|___/\___|_| |_| |_|_|\__, |_| \___/ \__,_| .__/|___/ */
9/* |___/ |_| */
10
11#include "monoid.h"
12#include "tools.h"
13#include <stdbool.h>
14#include <stdio.h>
15#include <stdlib.h>
16
21typedef enum {
22 LV_REG,
23 LV_GREG,
24 LV_FULL,
25} sub_level;
26
35typedef struct {
36 sub_level level;
38 uint size;
39
43 uint neut;
44 uint* idem_list;
45 uint nb_idems;
46 bool* idem_array;
48} subsemi;
49
50/******************************/
51/* Manipulating subsemigroups */
52/******************************/
53
61subsemi* init_subsemi(morphism*
62);
63
64
65
66
75void compute_maps_subsemi(subsemi*
76);
77
82void compute_idems_subsemi(subsemi*
83);
84
90uint* compute_jord_subsemi(subsemi*
91);
92
93
103void compute_jrel_subsemi(subsemi*,
104 uint*
105);
106
107
115void delete_subsemi(subsemi*
116);
117
126dequeue* restrict_list_to_subsemi(subsemi*,
127 dequeue*
128);
129
130
131
132
133
144void green_compute_sub(subsemi*
145);
146
157void green_compute_sub_reg(subsemi*
158);
159
160
161
162
163#endif // _MONOID_SUB_H_
Implementation of morphisms into finite monoids.
Type used to represent a dequeue of unsigned integers.
Definition type_dequeue.h:26
Type used to represent the Green relations of a finite monoid.
Definition monoid.h:69
The type used to represent a morphism into a finite monoid.
Definition monoid.h:91
Type used to represent a subsemigroup and its Green relations.
Definition monoid_sub.h:35
uint neut
Index of the neutral element in the subsemigroup.
Definition monoid_sub.h:43
uint * mono_to_sub
Array of Booleans indexed by the elements of the original monoid. Maps each elements to the orrepsond...
Definition monoid_sub.h:42
green * rels
The Green relations of the subsemigroup.
Definition monoid_sub.h:47
uint nb_idems
Number of idempotents in the subsemigroup.
Definition monoid_sub.h:45
uint * idem_list
List of all idempotents.
Definition monoid_sub.h:44
morphism * original
The original morphism.
Definition monoid_sub.h:37
bool * mono_in_sub
Array of Booleans indexed by the elements of the original monoid. Marks the elements inside the subse...
Definition monoid_sub.h:41
uint size
Size of the subsemigroup (or the number of regular elements if full is false).
Definition monoid_sub.h:38
uint * sub_to_mono
Array indexed by the elements of the subsemgroup. Maps each one to the corresponding element in the o...
Definition monoid_sub.h:40
bool * idem_array
Array of Booleans indexed by the elements of the subsemgroup. Marks the idempotents.
Definition monoid_sub.h:46
sub_level level
Level of computation.
Definition monoid_sub.h:36