/**************************************** * Computer Algebra System SINGULAR * ****************************************/ /* $Id: f5gb.h,v 1.18 2009-01-29 17:59:30 ederc Exp $ */ /* * ABSTRACT: f5gb interface */ #ifndef F5_HEADER #define F5_HEADER #ifdef HAVE_F5 #include "lpolynomial.h" #include "f5lists.h" /* ====================================================== sort polynomials in ideal i by decreasing total degree ====================================================== */ void qsort_degree(poly* left, poly* right); /* ============================================== generating the list lp of ideal generators and test if 1 is in lp(return 1) or not(return 0) ============================================== */ void generate_input_list(LPoly* lp, ideal id, poly one); /* ================================================== computes incrementally gbs of subsets of the input gb{f_m} -> gb{f_m,f_(m-1)} -> gb{f_m,...,f_1} ================================================== */ LList* F5inc(int* i, poly* f_i, LList* gPrev, poly* ONE, RList* rules, LTagList* lTag); /* ================================================================ computes a list of critical pairs for the next reduction process first element in gPrev is always the newest element which must build critical pairs with all other elements in gPrev ================================================================ */ CList* criticalPair(LList* gPrev, CList* critPairs, RList* rules, LTagList* lTag); /* ======================================== Criterion 1, i.e. Faugere's F5 Criterion ======================================== */ bool criterion1(poly* t, LNode* l, LTagList* lTag); /* ===================================== Criterion 2, i.e. Rewritten Criterion ===================================== */ bool criterion2(poly* t, LNode* l, RList* rules); /* ====================================== main function of our f5 implementation ====================================== */ ideal F5main(ideal i, ring r); #endif #endif