forked from gap-packages/fr
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathread.g
94 lines (84 loc) · 3.36 KB
/
read.g
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
#############################################################################
##
#W read.g Laurent Bartholdi
##
#Y Copyright (C) 2006-2016, Laurent Bartholdi
##
#############################################################################
##
## This file reads the implementations, and in principle could be reloaded
## during a GAP session.
#############################################################################
#############################################################################
##
#R Read the install files.
##
ReadPackage("fr", "gap/helpers.gi");
ReadPackage("fr", "gap/perlist.gi");
ReadPackage("fr", "gap/frmachine.gi");
ReadPackage("fr", "gap/frelement.gi");
ReadPackage("fr", "gap/mealy.gi");
ReadPackage("fr", "gap/group.gi");
ReadPackage("fr", "gap/vhgroup.gi");
ReadPackage("fr", "gap/vector.gi");
ReadPackage("fr", "gap/linear.gi");
ReadPackage("fr", "gap/algebra.gi");
ReadPackage("fr", "gap/bisets.gi");
ReadPackage("fr", "gap/examples.gi");
ReadPackage("fr", "gap/cp.gi");
#############################################################################
#############################################################################
##
#X install shortcuts
##
INSTALL@ := function()
CallFuncList(function(arg)
local s;
for s in arg do
if IsBoundGlobal(s) then
Info(InfoFR,2,Concatenation("Removing cybersquatter `",s,"'"));
if IsReadOnlyGlobal(s) then MakeReadWriteGlobal(s); fi;
UnbindGlobal(s);
fi;
od;
end, ["Nucleus","Decomposition"]);
DeclareOperation("Nucleus", [IsFRSemigroup]);
InstallMethod(Nucleus, [IsFRSemigroup], NucleusOfFRSemigroup);
DeclareOperation("Nucleus", [IsFRMachine]);
InstallMethod(Nucleus, "(FR) for an FR machine", [IsFRMachine], NucleusOfFRMachine);
DeclareOperation("Decomposition", [IsFRMachine]);
InstallMethod(Decomposition, "(FR) for an FR element", [IsFRElement], DecompositionOfFRElement);
end;
#############################################################################
DeclareAttribute("Alphabet", IsFRObject);
DeclareAttribute("Alphabet", IsFRSemigroup);
DeclareAttribute("Alphabet", IsFRAlgebra);
InstallMethod(Alphabet, [IsFRObject], AlphabetOfFRObject);
InstallMethod(Alphabet, [IsFRSemigroup], AlphabetOfFRSemigroup);
InstallMethod(Alphabet, [IsFRAlgebra], AlphabetOfFRAlgebra);
if IsBound(Nucleus) and FLAG2_FILTER(Nucleus)=0 then
DeclareOperation("Nucleus", [IsFRMachine]);
DeclareOperation("Nucleus", [IsFRSemigroup]);
else
DeclareAttribute("Nucleus", IsFRMachine);
DeclareAttribute("Nucleus", IsFRSemigroup);
fi;
InstallMethod(Nucleus, [IsFRMachine], NucleusOfFRMachine);
InstallMethod(Nucleus, [IsFRSemigroup], NucleusOfFRSemigroup);
if IsBound(Decomposition) and FLAG2_FILTER(Decomposition)=0 then
DeclareOperation("Decomposition", [IsFRElement]);
else
DeclareAttribute("Decomposition", IsFRElement);
fi;
InstallMethod(Decomposition, [IsFRElement], DecompositionOfFRElement);
while not IsEmpty(POSTHOOK@fr) do Remove(POSTHOOK@fr)(); od;
Unbind(POSTHOOK@fr);
if IsBound(IO_Pickle) then
ReadPackage("fr","gap/pickle.g");
else
if not IsBound(IO_PkgThingsToRead) then
IO_PkgThingsToRead := [];
fi;
Add(IO_PkgThingsToRead, ["fr","gap/pickle.g"]);
fi;
#E read.g . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ends here