Index: kernel/f5gb.h
===================================================================
--- kernel/f5gb.h	(revision 3416969e382fb0856af464a56a0166cee9709057)
+++ kernel/f5gb.h	(revision ab76b4b0df4a9c7834ee87f4b78d6bb55b53c887)
@@ -43,5 +43,5 @@
 ==================================================
 */
-LList* F5inc(int i, poly f_i, LList* gPrev,LList* reducers, ideal gbPrev, poly ONE, LTagList* lTag, RList* rules, RTagList* rTag,int termination);
+LList* F5inc(int i, poly f_i, LList* gPrev,LList* reducers, ideal gbPrev, poly ONE, LTagList* lTag, RList* rules, RTagList* rTag, int plus ,int termination);
 
 /*
@@ -55,5 +55,19 @@
 ================================================================
 */
-void criticalPair(LList* gPrev, CListOld* critPairs, LTagList* lTag, RTagList* rTag, RList* RuleOlds);
+void criticalPair(LList* gPrev, CListOld* critPairs, LTagList* lTag, RTagList* rTag, RList* RuleOlds, PList* rejectedGBList, int plus);
+
+
+bool checkDGB(LList* gPrev);
+
+
+/*
+ * Arris Check if we are finished after the current degree step:
+ * Checks all remaining critical pairs, i.e. those of higher degree,
+ * by the two Buchberger criteria.
+ * return value: 0, if all remaining critical pairs are deleted by 
+ *                  Buchberger's criteria
+ *               1, otherwise
+ */
+bool arrisCheck(CNode* first,LNode* firstGCurr, long arrisdeg); 
 
 /*
@@ -66,5 +80,5 @@
 ================================================================
 */
-void criticalPair2(LList* gPrev, CListOld* critPairs, LTagList* lTag, RTagList* rTag, RList* RuleOlds);
+void criticalPair2(LList* gPrev, CListOld* critPairs, LTagList* lTag, RTagList* rTag, RList* RuleOlds, PList* rejectedGBList);
 
 /*
@@ -90,9 +104,14 @@
 
 /*
+ * check for useful pairs in the given subset of critical pairs
+ */
+int computeUsefulMinDeg(CNode* first);
+
+/*
 ==================================
 Computation of S-Polynomials in F5
 ==================================
 */
-inline void computeSPols(CNode* first, RTagList* rTag, RList* RuleOlds, LList* sPolyList);
+inline void computeSPols(CNode* first, RTagList* rTag, RList* RuleOlds, LList* sPolyList, PList* rejectedGBList);
 
 /*
@@ -102,5 +121,5 @@
 */
 inline void reduction(LList* sPolyList, CListOld* critPairs, LList* gPrev, RList* RuleOlds, LTagList* lTag, RTagList* rTag,
-                 ideal gbPrev);
+                 ideal gbPrev, PList* rejectedGBList, int plus);
 
 /*
@@ -109,5 +128,5 @@
 ========================================================================
 */
-inline void newReduction(LList* sPolyList, CListOld* critPairs, LList* gPrev, LList* reducers, RList* rules, LTagList* lTag, RTagList* rTag, ideal gbPrev, int termination);
+inline void newReduction(LList* sPolyList, CListOld* critPairs, LList* gPrev, LList* reducers, RList* rules, LTagList* lTag, RTagList* rTag, ideal gbPrev, int termination, PList* rejectedGBList, int plus);
 
 /*!
@@ -123,5 +142,5 @@
  * ================================================================================
  */
-void findReducers(LNode* l, LList* sPolyList, ideal gbPrev, LList* gPrev, LList* reducers, CListOld* critPairs, RList* rules, LTagList* lTag, RTagList* rTag, int termination); 
+void findReducers(LNode* l, LList* sPolyList, ideal gbPrev, LList* gPrev, LList* reducers, CListOld* critPairs, RList* rules, LTagList* lTag, RTagList* rTag, int termination, PList* rejectedGBList, int plus); 
 
 /*
@@ -131,5 +150,5 @@
 =====================================================================================
 */
-inline void topReduction(LNode* l, LList* sPolyList, LList* gPrev, CListOld* critPairs, RList* RuleOlds, LTagList* lTag, RTagList* rTag, ideal gbPrev); 
+inline void topReduction(LNode* l, LList* sPolyList, LList* gPrev, CListOld* critPairs, RList* RuleOlds, LTagList* lTag, RTagList* rTag, ideal gbPrev, PList* rejectedGBList, int plus); 
 
 /*
@@ -154,5 +173,5 @@
 ======================================
 */
-ideal F5main(ideal i, ring r, int opt, int termination);
+ideal F5main(ideal i, ring r, int opt, int plus, int termination);
 
 #endif
