789{
790
791
792 int i,
j=0,
k=0,
l,rows,cols,
mr;
796
797
798 *regularity = -1;
800 while ((cols>0)
803 {
804 cols--;
805 }
808 {
811 else
814 }
817 {
819 {
824 }
825 }
826#if 0
828 {
829 WarnS(
"betti-command: Input is not homogeneous!");
831 }
832#endif
833 if (weights==
NULL) weights=
w;
837 #ifdef SHOW_W
839 #endif
843 {
846 }
849 rows = 1;
851 cols++;
852 for (
i=0;
i<cols-1;
i++)
853 {
857 {
859 {
861
862
863 )
864 {
865 WerrorS(
"input not a resolution");
869 }
873 }
874 }
879 }
882 {
884 {
885 if (rows <(*weights)[
j]+1) rows=(-
mr)+(*weights)[
j]+1;
886 }
887 }
888
892 {
894 {
896
897 }
898 }
899 else
900 {
901 (*result)[(-
mr)*cols] =
rkl;
902 if ((!
idIs0(
res[0])) && ((*result)[(-
mr)*cols]==0))
904 }
908 {
911 }
912 else
917 {
918
919 for(
j=0;
j<=rows+
mr;
j++)
920 {
921
923 }
924 }
925 for (
i=0;
i<cols-1;
i++)
926 {
930 {
932 {
934
935
937 }
939 {
941 }
942 }
943
945 {
947 {
948
950 }
952 {
956 {
957
959 }
960 }
961 }
965 for (
j=0;
j<=rows;
j++)
966 {
967
969 }
971 }
972
973
978 {
979 for (
j=1;
j<=rows+
mr+1;
j++)
980 {
981 for (
k=1;
k<=cols;
k++)
982 {
984 }
985 }
986 for (
j=rows+
mr+1;
j<=rows+1;
j++)
987 {
988 for (
k=1;
k<=cols;
k++)
989 {
991 }
992 }
993 }
997 {
1000 {
1003 }
1004 }
1007 {
1009 {
1011 }
1012 }
1016}
static int si_max(const int a, const int b)
void show(int mat=0, int spaces=0) const
void WerrorS(const char *s)
BOOLEAN idTestHomModule(ideal m, ideal Q, intvec *w)
BOOLEAN idIs0(ideal h)
returns true if h is the zero ideal
static BOOLEAN idHomModule(ideal m, ideal Q, intvec **w)
static BOOLEAN length(leftv result, leftv arg)
#define IMATELEM(M, I, J)
#define omFreeSize(addr, size)
void p_SetModDeg(intvec *w, ring r)
static long p_FDeg(const poly p, const ring r)
VAR ring currRing
Widely used global variable which specifies the current polynomial ring for Singular interpreter and ...
#define pGetComp(p)
Component.
void PrintS(const char *s)
long id_RankFreeModule(ideal s, ring lmRing, ring tailRing)
return the maximal component number found in any polynomial in s
int syDetect(ideal id, int index, BOOLEAN homog, int *degrees, int *tocancel)