Changeset 458174a in git for Singular/LIB/fpaprops.lib
 Timestamp:
 May 2, 2018, 10:45:42 AM (6 years ago)
 Branches:
 (u'spielwiese', 'ec94ef7a30b928574c0c3daf41f6804dff5f6b69')
 Children:
 0f987ab443ee33e628ea90f02a2fddfb9d8fa497
 Parents:
 75def9c8a4972706cb710a11c07681ad43676aed2ba25ee7ea3c483c73847576db73cb6464bc67ba
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

Singular/LIB/fpaprops.lib
r2ba25e r458174a 18 18 19 19 PROCEDURES: 20 lpNoetherian(<GB>); check whether A/< GB> is (left/right) noetherian20 lpNoetherian(<GB>); check whether A/<LM(GB)> is (left/right) Noetherian 21 21 lpIsSemiPrime(<GB>); check whether A/<LM(GB)> is semi prime 22 22 lpIsPrime(<GB>); check whether A/<LM(GB)> is prime … … 33 33 "USAGE: lpNoetherian(G); G an ideal in a Letterplace ring 34 34 RETURN: int 35 @* 0 not noetherian 36 @* 1 left noetherian 37 @* 2 right noetherian 38 @* 3 noetherian 39 PURPOSE: Check whether A/<G> is (left/right) noetherian 35 @* 0 not Noetherian 36 @* 1 left Noetherian 37 @* 2 right Noetherian 38 @* 3 Noetherian 39 @* 4 weak Noetherian 40 PURPOSE: Check whether the monomial algebra A/<LM(G)> is (left/right) noetherian 40 41 ASSUME:  basering is a Letterplace ring 41 42 @*  G is a Groebner basis 43 THEORY: lpNoetherian works with the monomial algebra A/<LM(G)>. 44 If it gives an affirmative answer for one of the properties, then it 45 holds for both A/<LM(G)> and A/<G>. However, a negative answer applies 46 only to A/<LM(G)> and not necessarily to A/<G>. 47 NOTE: Weak Noetherian means that twosided ideals in A/<LM(G)> satisfy 48 the acc (ascending chain condition). 42 49 " 43 50 { … … 91 98 intvec visited; 92 99 visited[ncols(UG)] = 0; 93 int inFlag, outFlag ;100 int inFlag, outFlag, inOutFlag; 94 101 for (int v = 1; v <= ncols(UG) && (inFlag + outFlag) != 3; v++) { 95 int inOutFlags = inO rOutCommingEdgeInCycle(UG, v, visited, 0);102 int inOutFlags = inOutCommingEdgesInCycles(UG, v, visited, 0); 96 103 if (inOutFlags == 1) { 97 104 inFlag = 1; 98 105 } 99 106 if (inOutFlags == 2) { 100 outFlag = 2;107 outFlag = 1; 101 108 } 102 109 if (inOutFlags == 3) { 103 110 inFlag = 1; 104 outFlag = 2; 111 outFlag = 1; 112 } 113 if (inOutFlags == 4) { 114 inOutFlag = 1; 115 } 116 if (inOutFlags == 5) { 117 inFlag = 1; 118 inOutFlag = 1; 119 } 120 if (inOutFlags == 6) { 121 outFlag = 1; 122 inOutFlag = 1; 123 } 124 if (inOutFlags == 7) { 125 inFlag = 1; 126 outFlag = 1; 127 inOutFlag = 1; 105 128 } 106 129 kill inOutFlags; 107 130 } kill v; 108 return (3  inFlag  outFlag); 131 int noetherian = 3  1*inFlag  2*outFlag; 132 if (noetherian == 0) { 133 return (4  4*inOutFlag); // weak noetherian 134 } 135 return (noetherian); 109 136 } 110 137 example … … 118 145 } 119 146 120 static proc inO rOutCommingEdgeInCycle(intmat G, int v, intvec visited, intvec path) {147 static proc inOutCommingEdgesInCycles(intmat G, int v, intvec visited, intvec path) { 121 148 // Mark the current vertex as visited 122 149 visited[v] = 1; … … 129 156 } 130 157 131 int inFlag, outFlag ;158 int inFlag, outFlag, inOutFlag; 132 159 133 160 for (int w = 1; w <= ncols(G) && (inFlag + outFlag) != 3; w++) { 134 161 if (G[v,w] == 1) { 135 if (visited[w] == 1) { 136 // new cycle 137 if (v == w) { 162 if (visited[w] == 1) { // new cycle 163 int tmpInFlag; 164 int tmpOutFlag; 165 if (v == w) { // cycle is a loop 138 166 for (int u = 1; u <= ncols(G); u++) { 139 167 if (G[v,u] && u != v) { 140 outFlag = 2; 168 outFlag = 1; 169 tmpOutFlag = 1; 141 170 } 142 171 if (G[u,v] && u != v) { 143 172 inFlag = 1; 173 tmpInFlag = 1; 144 174 } 145 175 } kill u; … … 151 181 if (path[i] != v) { 152 182 if (u != path[i+1]) { // and u is not the next element in the cycle 153 outFlag = 2; 183 outFlag = 1; 184 tmpOutFlag = 1; 154 185 } 155 186 } else { 156 187 if (u != w) { 157 outFlag = 2; 188 outFlag = 1; 189 tmpOutFlag = 1; 158 190 } 159 191 } … … 163 195 if (u != path[i1]) { // and u is not the previous element in the cylce 164 196 inFlag = 1; 197 tmpInFlag = 1; 165 198 } 166 199 } else { 167 200 if (u != v) { 168 201 inFlag = 1; 202 tmpInFlag = 1; 169 203 } 170 204 } … … 176 210 } kill i; 177 211 } 212 if (tmpInFlag > 0 && tmpOutFlag > 0) { 213 // there are both in and outcomming edges in this cycle 214 inOutFlag = 1; 215 } 216 kill tmpInFlag; 217 kill tmpOutFlag; 178 218 } else { 179 int inOutFlags = inO rOutCommingEdgeInCycle(G, w, visited, path);219 int inOutFlags = inOutCommingEdgesInCycles(G, w, visited, path); 180 220 if (inOutFlags == 1) { 181 221 inFlag = 1; 182 222 } 183 223 if (inOutFlags == 2) { 184 outFlag = 2;224 outFlag = 1; 185 225 } 186 226 if (inOutFlags == 3) { 187 227 inFlag = 1; 188 outFlag = 2; 228 outFlag = 1; 229 } 230 if (inOutFlags == 4) { 231 inOutFlag = 1; 232 } 233 if (inOutFlags == 5) { 234 inFlag = 1; 235 inOutFlag = 1; 236 } 237 if (inOutFlags == 6) { 238 outFlag = 1; 239 inOutFlag = 1; 240 } 241 if (inOutFlags == 7) { 242 inFlag = 1; 243 outFlag = 1; 244 inOutFlag = 1; 189 245 } 190 246 kill inOutFlags; … … 193 249 } kill w; 194 250 195 return ( inFlag + outFlag);251 return (1*inFlag + 2*outFlag + 4*inOutFlag); 196 252 } 197 253 … … 202 258 ASSUME:  basering is a Letterplace ring 203 259  G is a Groebner basis 260 THEORY: lpIsSemiPrime works with the monomial algebra A/<LM(G)>. 261 A positive answer holds for both A/<LM(G)> and A/<G>, while 262 a negative answer applies only to A/<LM(G)> and not necessarily to 263 A/<G>. 204 264 " 205 265 { … … 303 363 ASSUME:  basering is a Letterplace ring 304 364  G is a Groebner basis 365 THEORY: lpIsPrime works with the monomial algebra A/<LM(G)>. 366 A positive answer holds for both A/<LM(G)> and A/<G>, while 367 a negative answer applies only to A/<LM(G)> and not necessarily to A/<G>. 305 368 " 306 369 {
Note: See TracChangeset
for help on using the changeset viewer.