One Hat Cyber Team
Your IP :
216.73.216.80
Server IP :
194.44.31.54
Server :
Linux zen.imath.kiev.ua 4.18.0-553.77.1.el8_10.x86_64 #1 SMP Fri Oct 3 14:30:23 UTC 2025 x86_64
Server Software :
Apache/2.4.37 (Rocky Linux) OpenSSL/1.1.1k
PHP Version :
5.6.40
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
usr
/
share
/
Macaulay2
/
MinimalPrimes
/
View File Name :
PDState.m2
-------------------------------- --- PDState commands ----------- -------------------------------- PDState = new Type of MutableHashTable createPDState = method() createPDState Ideal := I -> ( new PDState from { "OriginalIdeal" => I, "PrimesSoFar" => new MutableHashTable from {}, "IntersectionSoFar" => ideal (1_(ring I)), "isPrimeIdeal" => true, "isPrimaryIdeal" => true, "PrunedViaCodim" => 0 } ) updatePDState = method() updatePDState (PDState,List,ZZ) := (pdState,L,pruned) -> ( -- this function updates the pdState with the new primes in the list L which -- consists of annotated ideals, all of which are known to be prime ansSoFar := pdState#"PrimesSoFar"; pdState#"PrunedViaCodim" = pdState#"PrunedViaCodim" + pruned; for p in L do ( I := ideal p; --pdState#"IntersectionSoFar" = trim intersect(pdState#"IntersectionSoFar", I); c := codim p; --<< endl << " Adding codimension " << c << " prime ideal." << endl; if not ansSoFar#?c then ansSoFar#c = {(p,I)} else ansSoFar#c = append(ansSoFar#c,(p,I)); ); -* -- here we update the isPrime flag if L comes in with more than one -- prime, then the ideal is neither prime nor primary. -- the reason for this is that no single step will produce multiple redundant -- primes. The only possible redundancy occurs when a prime is -- already in pdState and also comes into the list L if #L > 1 then ( pdState#"isPrimeIdeal" = false; pdState#"isPrimaryIdeal" = false; ); *- ) numPrimesInPDState = method() numPrimesInPDState PDState := pdState -> sum apply(pairs (pdState#"PrimesSoFar"), p -> #(p#1)) getPrimesInPDState = method() getPrimesInPDState PDState := pdState -> flatten apply(pairs (pdState#"PrimesSoFar"), p -> (p#1) / last) isRedundantIdeal = method() isRedundantIdeal (AnnotatedIdeal,PDState) := (I,pdState) -> ( -- the reason for this line is that once IndependentSet has been called, then -- I.Ideal no longer reflects the ideal if I.?IndependentSet then return false; primeList := getPrimesInPDState(pdState); -- as of now, all ideals are declared not redundant false -- this commented line takes too long! --any(primeList,p -> isSubset(p,I)) ) flagPrimality = method() flagPrimality(PDState, Boolean) := (pdState, primality) -> (pdState#"isPrime" = primality;)