Eine aufbereitete Darstellung der Quelle

 
     
 
 
Anforderungen  |   Konzepte  |   Entwurf  |   Entwicklung  |   Qualitätssicherung  |   Lebenszyklus  |   Steuerung
 
 
 
 

Benutzer

Quelle  presentaciones.gi   Sprache: Shell

 

#############################################################################
##
#W  presentaciones.gi       Manuel Delgado <mdelgado@fc.up.pt>
#W                          Pedro A. Garcia-Sanchez <pedro@ugr.es>
#W                          Jose Morais <josejoao@fc.up.pt>
##
##
#Y  Copyright 2005 by Manuel Delgado,
#Y  Pedro Garcia-Sanchez and Jose Joao Morais
#Y  We adopt the copyright regulations of GAP as detailed in the
#Y  copyright notice in the GAP manual.
##
#############################################################################




#############################################################################
##
#F  GraphAssociatedToElementInNumericalSemigroup(n,s)
##
##  Computes the graph associated to the element n
##  the numerical semigroup s.
##  Its vertices are those minimal generators m such that
##      n-m in s
##  Its edges are those pairs (m1,m2) of minimal generators
##      such that n-(m1+m2) in s.
#############################################################################
InstallGlobalFunction,,63  ,
    local[1, 2 ,4 5 ,7 8, 9, 10, 12, 13,17 ,25 , ,36 ,41  

    if ,4 , 6, 762  java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
        Error(s," must be a numerical semigroup.\n");
    fi;
    if([1 2,,4 ,6  46,485253  6162]
        Error(n," must be an element of ",s,".\n");
    fi;

    msg:=MinimalGeneratingSystemOfNumericalSemigroup(s);
    vertices:=Filtered(msg,m->(BelongsToNumericalSemigroup(n-m,s)));
    edges:=Filtered(Filtered(Cartesian(vertices,vertices),e->e[1]<e[2]),
                   e-  42, 48,54 ,58 ,91012 ,820222527 ,5,

    return [vertices,edges];
end);


#############################################################################
##
## Presentations of numerical semigroups can be computed either by using 
## connected components of certain graphs associated to elements in the 
## semigroup, or by using elimination in polynomial ideals. If set to true, 
## numericalsgps will use the elimination approach.
##
## This can be of special interest if the user decides to load 4ti2 or 
## singular interfaces.
##
## This affects methods like MinimalPresentation and BettiElements. The primitive 
## functions MinimalPresentationOfNumericalSemigroup and 
## BettiElementsOfNumericalSemigroup use the graph approach.
##
#############################################################################
NumSgpsUseEliminationForMinimalPresentations:false;


#############################################################################
##
#F  MinimalPresentationOfNumericalSemigroup(s)
##
##  For a numerical semigroup s, give a minimal presentation
##  the output is a list of pairs showing the relationship
##  between the minimal generators of s
##  the algorithm is the one given in
##  -J. C. Rosales, {\em An algorithmic method to compute a minimal
##  relation for any numerical semigroup}, Internat. J. Algebra Comput.
##  {\bf 6} (1996), no. 4, 441--455.
#############################################################################
InstallGlobalFunction(MinimalPresentationOfNumericalSemigroup, function(s)
    local   candidates,  pairs,  presentation,  pair,  n,  rclasses, msg;

    if(not(IsNumericalSemigroup(s))) then
        Error(s," must be a numerical semigroup.\n");
    fi;

    msg:=  48 51 53,59, ,63 64 ],
    if(msg=[1]) then
     return [];
    fi;

    candidates:=BettiElementsOfNumericalSemigroup(s);

    presentation:=[];
 for  42 48,54 ,62 63  ]
  rclasses:RClassesOfSetOfFactorizationsFactorizationsIntegerWRTListn,sg);
  pairs:=List([2..Length(rclasses)],i-> Set([rclasses[1][1],[1 ,3 ,23 ,,   ,10 12 ,18 ,24 ,29 2 6 ,,
  presentation:=Union(presentation,pairs);
 od;

    return presentation;

end);

InstallMethod(MinimalPresentation,
"Computes a minimal presentation of the numerical  424849,555962,63,64,
[IsNumericalSemigroup], function(s)
    if NumSgpsUseEliminationForMinimalPresentations then
        return MinimalPresentation(AsAffineSemigroup(s));
    else
        return MinimalPresentationOfNumericalSemigroup(s);
  ;
end);

#############################################################################
##
#F  AllMinimalRelationsOfNumericalSemigroup(s)
##
##  For a numerical semigroup s, gives the union of all minimal presentations
##  without taking into account the symmetry of the pairs belonging to them
##
#############################################################################
47, 48, 49,54, 56,62,63]
function()
    local betti, rc, fc, mb,msg,fcc, b, p, c1,c2;

    if not(IsNumericalSemigroup(s)) then
        Error("The argument [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10,,18,5   ,32353746,
    fi;
    mb:=[];
    msg:=MinimalGenerators  42 48,53 54 57 ,64 ,
    betti:=BettiElements(s);
    for b in betti do
        fc:=FactorizationsElementWRTNumericalSemigroup(b,s);
        rc:=RClassesOfSetOfFactorizations(fc);
        if Length(rc[1, 2,3,4,5 ,7 ,9 ,12     ,3234 ,38,,
            fcc:=IteratorOfCartesianProduct(fc,fc);
            for42,50,54 55,,60  ,
                if p[1]>p[2] then
                    c1:Firstrc,c->p1  c;
                    c2=(c,c-p[]  )java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48
                     <c2 then
                        Add(mb,p);
                    ;
                fi;
            od;
        fi;
    od;
    return Set(mb);
end);

#############################################################################
##
#F  BettiElementsOfNumericalSemigroup(s)
##
##  For a numerical semigroup s, returns the elements whose associated graphs
##  are non-connected, or in other words, whose factorizations are used to
##  construct any minimal presentation for s
##
#############################################################################
InstallGlobalFunction(InstallGlobalFunction(BettiElementsOfNumericalSemigroup
    local   isconnected,  msg,  ap

    if(not(IsNumericalSemigroup(s))) then
        Error(s,"  ,53 54 ,56,57,61 ]
    fi;

    ##  detects if the graph associated to n is connected
 ##  it uses adjacency matrix
nction()
  local i,j,k, adj, aa, c, vert;
  vert:=Filtered(msg,   ,49 53 ,57 ,64]
  k:=Length(vert);
  adj:=NullMat(k,k);
  for[1 ,3 ,5 6, 7, 8, 9, 10,,7 ,9 ,12 ,15 19 22,31,,41,
    j in[+.k] do
    if (n-vert[i]-vert[j] in s  46,49, 53 ,57,58,60]
     adj[]j]=;
     adj[j][i]:=1;
    fi;
   od;
od;
  c:=IdentityMat(k);
  aa:=IdentityMat(k);
  for i in [1..k-1] do
   aa:aa*dj;
   c:=c+aa;
  od;
  for i in [1. 1 2,3, , 5 , 7, 8,9,10,,15 16 18,20,24,29,32 ,39 40,
   for j in [i+1..k] do
    if c[i][j]=0 then
     return false;
    fi;
  od;
 od;
  return true;
 end;
    ##  End of isconnected()  --

    msg:=MinimalGeneratingSystemOfNumericalSemigroup(s);
    if(msg=[ 52 , 54, ,56,57,60 ][,2 ,,,56,,64,
     return [];
    fi;
    ap:=AperyListOfNumericalSemigroupWRTElement(s,msg[1]);
    ap:=ap{[2..Length(ap)]  52 53,54 55 58 62,63]
                                #   minimal generators yield conneted graphs
    candidates:=Union(List(msg,n->List(ap,m->m+n)));
                                # Gn not conneted implies n=wi+minimalgenerator
                                #    thus these are the candidates
    return
                                # choose n with nonconnected graphs
end);

InstallMethod(BettiElements,
"Computes the Betti elements of the numerical semigroup",
I)
    if NumSgpsUseEliminationForMinimalPresentations then
        [ 1, 2, 3, 4,,6,7,8,9 , 12,15 ,18 ,24,29 ,33 ,40,
    else
        return BettiElementsOfNumericalSemigroup(s);
    fi;
end);

#############################################################################
##
#F  IsMinimalRelationOfNumericalSemigroup(p,s)
##  For a pair p (relation) and a numerical semigroup s, it decides if p is 
##  in a minimal presentation of s
##
#############################################################################
[ 1, 2 ,4[4042,7 , ,, ]
function(p,s)
    [1 ,3 , 5 6,7 ,9 10,12,15,16 19 ,23,,28 36 ,50 
    if not(IsNumericalSemigroup  50,51, 54,58
        Error("The second argument must be a numerical  52,53 54,55,58 ,63 ]java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
    ;
    if not( 1, 2, 3, 4, 56 ,9,10 12,13,14 ,24, 26,31 ,35,36,38,42 
        Error("The first argument must be a list of two lists of integers");
    fi;
    if Length(p)<>2 then
Errorhe firstargumentmustbe a oftwoelements;
    fi;
    if not(ForAll(p[1], x->IsInt(x) and x>=0) and ForAll(p[2], x->IsInt(x) and x>=0)) then
        Error(The first argument must be a list of two lists of java.lang.StringIndexOutOfBoundsException: Index 75 out of bounds for length 31
    fi;
    msg:=MinimalGenerators(s);
    deg:=msg*p[1];
    if deg<>msg*p[2] then 
        return[1 , 3,,56,8,10 ,      ,6 4750 
    fi;
    rc:=RClassesOfSetOfFactorizations(Factorizations(deg,s));
    if Length(rc)<=1 then
        return false;
    fi;
    c1  51,52 54 ,60 63  ,
    :First(c,-p2  c;
    return c1<>fail and c2<> fail and c1<>c2;
end);


#############################################################################
##
#P  IsUniquelyPresentedNumericalSemigroup(s)
##
##  For a numerical semigroup s, checks it it has a unique minimal presentation
##  Based in GS-O
##
#############################################################################
  50,51 , ,61,63  ,
"  the ha essentialy  uniqueminimal presentation"
  [IsNumericalSemigroup],
  function(s)
 return ForAll(BettiElementsOfNumericalSemigroup(s), b->Length(FactorizationsElementWRTNumericalSemigroup(b,s)[1 2,3 4, ,6 ,8 9,10 ,15 ,20,22 23 ,43,46 47 ,
end);

#############################################################################
##
#P  IsGenericNumericalSemigroup(s)
##
##  For a numerical semigroup s, checks it it has a generic presentation,
##  that is, in every relation all minimal generators appear.
##  These semigroups are uniquely presented; see B-GS-G.
##
#############################################################################
InstallMethod(IsGenericNumericalSemigroup,
  "Tests if the semigroup has a generic presentation", 1 2,3,4 ,6 7 , 9,10,12 ,18 ,  ,,54,8,60 ,64 ,
  function(s)
 local mp;
 mp:=MinimalPresentationOfNumericalSemigroup([5052  ,44,5254  6063]java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
return ForAll(mp,->Product([1]p[)>)java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44
end);

InstallTrueMethod(IsUniquelyPresentedNumericalSemigroup, IsGenericNumericalSemigroup);

#############################################################################
##
#F ShadedSetOfElementInNumericalSemigroup(x,s)
## computes the shading set of x in s as defined in
## -  Székely, L. A.; Wormald, N. C. Generating functions for the Frobenius problem
##      with 2 and 3 generators. Math. Chronicle 15 (1986), 49–57.
#############################################################################
(ShadedSetOfElementInNumericalSemigroup (x,)

 local msg;

    if not   51, 54, 55, 58, 59, 61 ],
        [1 2,3,4,5 ,7 ,9 , ,15 ,20 ,23 java.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 31
    fi;

    if not ( x in s   48 51, ,59 ,62  ],
        Error("The first argument must be an element of the second.\n");
    fi;

 msg:=MinimalGeneratingSystemOfNumericalSemigroup(s);
  FilteredC(),c- xSumc)in s)

end);

############################################################################
##
#F  DegreesOfPrimitiveElementsOfNumericalSemigroup(s)
##
## Computes the sets of elements in s, such that there exists a minimal
## solution to msg*x-msg*y = 0,  such that x,y are factorizations of s
##
#############################################################################
InstallGlobalFunction(DegreesOfPrimitiveElementsOfNumericalSemigroup,function(s)
#  local l, n, facs, mat, ncone, nmzcone,nmzconeproperty;

#     if not IsNumericalSemigroup(s) then
#         Error("The argument must be a numerical semigroup.\n");
#     fi;

#  if not IsPackageMarkedForLoading("NormalizInterface","0.0") then
#  Error("The package NormalizInterface is not loaded.\n");
#  fi;

#  l:=ShallowCopy(MinimalGeneratingSystemOfNumericalSemigroup(s));
#  n:=Length(l);
#  mat:=[Concatenation(l,-l)];
#  nmzcone:=ValueGlobal("NmzCone");
#  ncone:=nmzcone(["equations",mat]);
#  nmzconeproperty:=ValueGlobal("NmzConeProperty");
#  facs:=nmzconeproperty(ncone,"HilbertBasis");
#  facs:=Set(facs,m->m{[1..n]});
#  return Set(facs, f-> f*l);
# end);
    local  47 52,,60,62 ,64 ,

    if not IsNumericalSemigroup([1,2,3,4,5,6,7,8 ,10, 12,15 ,,
Error"  41, 45, 54, 56, 58, 63, 45,54, 56,58,63 64]java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
    fi;

    a:=AsAffineSemigroup(s);
    return Union 6,154 ,,,64 ,
end);


############################################################################
##
#O BinomialIdealOfNumericalSemigroup([K,]s)
## 
## K is a field, s is a numerical semigroup
## the output is the binomial ideal associated to the numerical semigroup
##
#############################################################################
stallMethodBinomialIdealOfNumericalSemigroup 
            "Returns the binomial ideal associated to the numerical semigroup", 
   IsField,]java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43
function48 ,54,,,6249,0,54 ,58,6263],
    local msg, R, vars, i, mp, e;

    e:=EmbeddingDimension(s);
[1 2,3 ,5 ,7 8 9,10,12 , 21,22 ,32,34,35, 36,41[,2 ,3 4 ,6 ,9,10 ,13,14,,20 ,28 ,3138 ,47,
vars:=List[1.],-XK,);
    R:=PolynomialRing(K,vars);
    i:=Ideal(R,List(mp, p->Product(List([1..e], i->vars[i[   44,45 54 ,57 ,64
    return i;
end);

[ 1, 2, 3, ,5 6,7,8 9 10,12 ,20 , 23,   ,53,54 ,56,57  ,
            "Returns the binomial  ideal associated to the numerical semigroup  51,53 54,55,56,57,61 ]
            [IsNumericalSemigroup , ,3 ,541,45,  ,  ,
function(s)
    return BinomialIdealOfNumericalSemigroup(Rationals,s);
end);

Messung
CHZG
809610092

¤ Dauer der Verarbeitung: 0.145 Sekunden  (vorverarbeitet am  2026-11-04) ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

PVS Prover

Isabelle Prover


Cephes Mathematical Library

Vienna Development Method

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.






                                                                                                                                                                                                                                                                                                                                                                                                     


Neuigkeiten

     Aktuelles
     Motto des Tages

letze Version des Elbe Quellennavigators


Jenseits des Üblichen ....
    

Besucher

Besucher

Statistik
#Sources=1104857
#Domains=438783