1767{
1768 int i,
j,jj,
k=0,index=0,rk_arg;
1769 int crit_comp,t_comp,next_deg,old_tl;
1770 ideal temp=
NULL,old_ideal,old_repr;
1772 poly next_gen;
1774
1780
1782
1785 if (origR!=syzstr->
syRing)
1787 else
1789 if (rk_arg==0)
1790 {
1792 }
1794#ifdef WITH_SORT
1795 if (temp->m[0]!=
NULL)
1796 {
1797 int md;
1801 {
1803 if (jj>maxdeg) maxdeg = jj;
1804 }
1805 while (!
idIs0(temp))
1806 {
1807 md = maxdeg;
1809 {
1810 if (temp->m[
j]!=
NULL)
1811 {
1813 if (jj<md) md = jj;
1814 }
1815 }
1817 {
1819 {
1820 temp1->m[
k] = temp->m[
j];
1823 }
1824 }
1825 }
1827 temp = temp1;
1829 }
1830#endif
1831#ifdef USE_REGULARITY
1832 int last_generator=
IDELEMS(temp)-1;
1833 while ((last_generator>=0) && (temp->m[last_generator]==
NULL))
1834 last_generator--;
1835#endif
1839 syzstr->
Tl =
new intvec(*length+1);
1842 ideal new_generators=
idInit(1,si_max(rk_arg,1));
1843 ideal temp_gens,old_std;
1845 if (rk_arg>1) syzstr->
res[0]->rank = rk_arg;
1847
1850 {
1851 if (temp->m[
i]!=
NULL)
1852 {
1853 new_generators->m[0] =
kNF(syzstr->
res[0],
currRing->qideal,temp->m[
i]);
1854 if (!
nIsOne(pGetCoeff(new_generators->m[0])))
1855 pNorm(new_generators->m[0]);
1856 next_deg = p_FDeg(new_generators->m[0],
currRing);
1857 next_gen =
pCopy(new_generators->m[0]);
1858 }
1859 if (!
idIs0(new_generators))
1860 {
1861 index = 0;
1862 while (index<=*length)
1863 {
1864 if (index==0)
1865 {
1868 old_tl = (*syzstr->
Tl)[0];
1870 }
1871 t_comp = (*syzstr->
Tl)[index];
1872 if (index==0) crit_comp = t_comp;
1873 temp_gens =
syAppendSyz(new_generators,syzstr, index,crit_comp,totake);
1874 crit_comp = t_comp;
1875 if (index==0)
1876 {
1878#ifndef ONLY_STD
1879 if (isRegular)
1881 totake);
1882#ifdef USE_REGULARITY
1883 if ((index==0) && (!isRegular) && (
i==last_generator))
1884 {
1885
1887 int len=0,reg=0;
1894 delete dummy;
1897 {
1899 }
1904 }
1905#endif
1906#endif
1911 {
1912 if (isRegular)
1914 else
1915 PrintS(
"\n not regular\n");
1916 }
1919 if (isRegular)
1920 {
1922 break;
1923 }
1924 }
1926 new_generators = temp_gens;
1927#ifdef ONLY_STD
1928 break;
1929#endif
1930 if (
idIs0(new_generators))
break;
1931 index++;
1932 }
1933 if (!
idIs0(new_generators))
1934 {
1936 {
1937 if (new_generators->m[
j]!=
NULL)
1938 {
1940 new_generators->m[
j] =
NULL;
1941 }
1942 }
1943 }
1944 }
1946 }
1951 index = 0;
1954 index = 0;
1955 while ((index<=*length) && (syzstr->
fullres[index]!=
NULL))
1956 {
1957#ifdef SHOW_RESULT
1958 Print(
"The %d-th syzygy-module is now:\n",index);
1962
1963
1964
1965
1966
1967
1968 if (!
idIs0(totake[index]))
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981#endif
1982 if (!
idIs0(totake[index]))
1983 {
1985 {
1986 if (totake[index]->
m[
i]!=
NULL)
1987 {
1993 {
1995 totake[index]->m[
i] = syzstr->
fullres[index]->m[
j];
1997 }
1998 else
1999 {
2000 PrintS(
"Da ist was faul!!!\n");
2001 Print(
"Aber: Regularitaet %d, Grad %ld\n",
2003 }
2004 }
2005 }
2007 syzstr->
fullres[index] = totake[index];
2008 }
2009#ifdef SHOW_RESULT
2011#endif
2012 index++;
2013 }
2015 index = 0;
2017 {
2019 index++;
2020 }
2021 if (origR!=syzstr->
syRing)
2022 {
2024 index = 0;
2025 while ((index<=*length) && (syzstr->
fullres[index]!=
NULL))
2026 {
2028 index++;
2029 }
2030 }
2037
2038
2039
2040
2041 return syzstr;
2042}
poly initial(const poly p, const ring r, const gfan::ZVector &w)
Returns the initial form of p with respect to w.
poly kNF(ideal F, ideal Q, poly p, int syzComp, int lazyReduce)
ideal idrMoveR(ideal &id, ring src_r, ring dest_r)
ideal idrCopyR(ideal id, ring src_r, ring dest_r)
ideal idrMoveR_NoSort(ideal &id, ring src_r, ring dest_r)
ring rAssure_C_dp(const ring r)
void idShow(const ideal id, const ring lmRing, const ring tailRing, const int debugPrint)
void id_Shift(ideal M, int s, const ring r)
static ideal syAppendSyz(ideal new_generators, syStrategy syzstr, int index, int crit_comp, resolvente totake)
static void syCreateRegularExtension(syStrategy syzstr, ideal old_ideal, ideal old_repr, int old_tl, poly next_generator, resolvente totake)
void syReorder_Kosz(syStrategy syzstr)
static BOOLEAN syIsRegular(ideal old_ideal, ideal new_ideal, int deg)
resolvente sySchreyerResolvente(ideal arg, int maxlength, int *length, BOOLEAN isMonomial=FALSE, BOOLEAN notReplace=FALSE)