-
Notifications
You must be signed in to change notification settings - Fork 3
/
Affine.gi
123 lines (82 loc) · 2.65 KB
/
Affine.gi
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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
# SPDX-License-Identifier: GPL-2.0-or-later
# ZariskiFrames: (Co)frames/Locales of Zariski closed/open subsets of affine, projective, or toric varieties
#
# Implementations
#
##
InstallMethod( ListOfReducedMorphismsOfUnderlyingCategory,
"for an object in a Zariski frame or coframe of an affine variety",
[ IsObjectInZariskiFrameOrCoframeOfAnAffineVariety ],
function( A )
local L;
L := ListOfMorphismsOfRank1RangeOfUnderlyingCategory( A );
L := List( L, UnderlyingMatrix );
L := List( L, RadicalSubobjectOp );
L := List( L, AsMorphismInCategoryOfRows );
L := DuplicateFreeList( L );
L := MaximalObjects( L, {a,b} -> IsLiftable( b, a ) );
A!.ListOfMorphismsOfRank1RangeOfUnderlyingCategory := L;
return L;
end );
##
InstallMethod( DistinguishedQuasiAffineSet,
"for two lists and a homalg ring",
[ IsList, IsList, IsHomalgRing ],
function( eqs, ineqs, R )
eqs := HomalgMatrix( eqs, Length( eqs ), 1, R );
eqs := ClosedSubsetOfSpec( eqs );
ineqs := List( ineqs, ClosedSubsetOfSpec );
ineqs := List( ineqs,
function( s )
local d;
d := eqs - s;
SetPreDistinguishedSubtrahend( d, s );
return d;
end );
if ineqs = [ ] then
return eqs;
fi;
return CallFuncList( AsMultipleDifference, ineqs );
end );
##
InstallMethod( DistinguishedQuasiAffineSet,
"for two lists",
[ IsList, IsList ],
function( eqs, ineqs )
local R;
if not eqs = [ ] then
R := HomalgRing( eqs[1] );
elif not ineqs = [ ] then
R := HomalgRing( ineqs[1] );
else
Error( "unable to figure out the ring since both input lists are empty\n" );
fi;
return DistinguishedQuasiAffineSet( eqs, ineqs, R );
end );
##
InstallMethod( DistinguishedQuasiAffineSet,
"for two lists, a homalg ring, and an object",
[ IsList, IsList, IsHomalgRing, IsObject ],
function( eqs, ineqs, R, obj )
local V;
V := DistinguishedQuasiAffineSet( eqs, ineqs, R );
SetParametrizedObject( V, obj );
return V;
end );
##
InstallMethod( DistinguishedQuasiAffineSet,
"for two lists and an object",
[ IsList, IsList, IsObject ],
function( eqs, ineqs, obj )
local V;
V := DistinguishedQuasiAffineSet( eqs, ineqs );
SetParametrizedObject( V, obj );
return V;
end );
##
InstallMethod( DistinguishedQuasiAffineSet,
"for a list",
[ IsList ],
function( eqs_ineqs )
return CallFuncList( DistinguishedQuasiAffineSet, eqs_ineqs );
end );