/* Generated by Cython 3.0.11 */

#ifndef PY_SSIZE_T_CLEAN
#define PY_SSIZE_T_CLEAN
#endif /* PY_SSIZE_T_CLEAN */
#if defined(CYTHON_LIMITED_API) && 0
  #ifndef Py_LIMITED_API
    #if CYTHON_LIMITED_API+0 > 0x03030000
      #define Py_LIMITED_API CYTHON_LIMITED_API
    #else
      #define Py_LIMITED_API 0x03030000
    #endif
  #endif
#endif

#include "Python.h"

    #if PY_MAJOR_VERSION >= 3
      #define __Pyx_PyFloat_FromString(obj)  PyFloat_FromString(obj)
    #else
      #define __Pyx_PyFloat_FromString(obj)  PyFloat_FromString(obj, NULL)
    #endif
    

    #if PY_MAJOR_VERSION <= 2
    #define PyDict_GetItemWithError _PyDict_GetItemWithError
    #endif
    

    #if (PY_VERSION_HEX < 0x030700b1 || (CYTHON_COMPILING_IN_PYPY && PYPY_VERSION_NUM < 0x07030600)) && !defined(PyContextVar_Get)
    #define PyContextVar_Get(var, d, v)         ((d) ?             ((void)(var), Py_INCREF(d), (v)[0] = (d), 0) :             ((v)[0] = NULL, 0)         )
    #endif
    
#ifndef Py_PYTHON_H
    #error Python headers needed to compile C extensions, please install development version of Python.
#elif PY_VERSION_HEX < 0x02070000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03030000)
    #error Cython requires Python 2.7+ or Python 3.3+.
#else
#if defined(CYTHON_LIMITED_API) && CYTHON_LIMITED_API
#define __PYX_EXTRA_ABI_MODULE_NAME "limited"
#else
#define __PYX_EXTRA_ABI_MODULE_NAME ""
#endif
#define CYTHON_ABI "3_0_11" __PYX_EXTRA_ABI_MODULE_NAME
#define __PYX_ABI_MODULE_NAME "_cython_" CYTHON_ABI
#define __PYX_TYPE_MODULE_PREFIX __PYX_ABI_MODULE_NAME "."
#define CYTHON_HEX_VERSION 0x03000BF0
#define CYTHON_FUTURE_DIVISION 1
#include <stddef.h>
#ifndef offsetof
  #define offsetof(type, member) ( (size_t) & ((type*)0) -> member )
#endif
#if !defined(_WIN32) && !defined(WIN32) && !defined(MS_WINDOWS)
  #ifndef __stdcall
    #define __stdcall
  #endif
  #ifndef __cdecl
    #define __cdecl
  #endif
  #ifndef __fastcall
    #define __fastcall
  #endif
#endif
#ifndef DL_IMPORT
  #define DL_IMPORT(t) t
#endif
#ifndef DL_EXPORT
  #define DL_EXPORT(t) t
#endif
#define __PYX_COMMA ,
#ifndef HAVE_LONG_LONG
  #define HAVE_LONG_LONG
#endif
#ifndef PY_LONG_LONG
  #define PY_LONG_LONG LONG_LONG
#endif
#ifndef Py_HUGE_VAL
  #define Py_HUGE_VAL HUGE_VAL
#endif
#define __PYX_LIMITED_VERSION_HEX PY_VERSION_HEX
#if defined(GRAALVM_PYTHON)
  /* For very preliminary testing purposes. Most variables are set the same as PyPy.
     The existence of this section does not imply that anything works or is even tested */
  #define CYTHON_COMPILING_IN_PYPY 0
  #define CYTHON_COMPILING_IN_CPYTHON 0
  #define CYTHON_COMPILING_IN_LIMITED_API 0
  #define CYTHON_COMPILING_IN_GRAAL 1
  #define CYTHON_COMPILING_IN_NOGIL 0
  #undef CYTHON_USE_TYPE_SLOTS
  #define CYTHON_USE_TYPE_SLOTS 0
  #undef CYTHON_USE_TYPE_SPECS
  #define CYTHON_USE_TYPE_SPECS 0
  #undef CYTHON_USE_PYTYPE_LOOKUP
  #define CYTHON_USE_PYTYPE_LOOKUP 0
  #if PY_VERSION_HEX < 0x03050000
    #undef CYTHON_USE_ASYNC_SLOTS
    #define CYTHON_USE_ASYNC_SLOTS 0
  #elif !defined(CYTHON_USE_ASYNC_SLOTS)
    #define CYTHON_USE_ASYNC_SLOTS 1
  #endif
  #undef CYTHON_USE_PYLIST_INTERNALS
  #define CYTHON_USE_PYLIST_INTERNALS 0
  #undef CYTHON_USE_UNICODE_INTERNALS
  #define CYTHON_USE_UNICODE_INTERNALS 0
  #undef CYTHON_USE_UNICODE_WRITER
  #define CYTHON_USE_UNICODE_WRITER 0
  #undef CYTHON_USE_PYLONG_INTERNALS
  #define CYTHON_USE_PYLONG_INTERNALS 0
  #undef CYTHON_AVOID_BORROWED_REFS
  #define CYTHON_AVOID_BORROWED_REFS 1
  #undef CYTHON_ASSUME_SAFE_MACROS
  #define CYTHON_ASSUME_SAFE_MACROS 0
  #undef CYTHON_UNPACK_METHODS
  #define CYTHON_UNPACK_METHODS 0
  #undef CYTHON_FAST_THREAD_STATE
  #define CYTHON_FAST_THREAD_STATE 0
  #undef CYTHON_FAST_GIL
  #define CYTHON_FAST_GIL 0
  #undef CYTHON_METH_FASTCALL
  #define CYTHON_METH_FASTCALL 0
  #undef CYTHON_FAST_PYCALL
  #define CYTHON_FAST_PYCALL 0
  #ifndef CYTHON_PEP487_INIT_SUBCLASS
    #define CYTHON_PEP487_INIT_SUBCLASS (PY_MAJOR_VERSION >= 3)
  #endif
  #undef CYTHON_PEP489_MULTI_PHASE_INIT
  #define CYTHON_PEP489_MULTI_PHASE_INIT 1
  #undef CYTHON_USE_MODULE_STATE
  #define CYTHON_USE_MODULE_STATE 0
  #undef CYTHON_USE_TP_FINALIZE
  #define CYTHON_USE_TP_FINALIZE 0
  #undef CYTHON_USE_DICT_VERSIONS
  #define CYTHON_USE_DICT_VERSIONS 0
  #undef CYTHON_USE_EXC_INFO_STACK
  #define CYTHON_USE_EXC_INFO_STACK 0
  #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC
    #define CYTHON_UPDATE_DESCRIPTOR_DOC 0
  #endif
  #undef CYTHON_USE_FREELISTS
  #define CYTHON_USE_FREELISTS 0
#elif defined(PYPY_VERSION)
  #define CYTHON_COMPILING_IN_PYPY 1
  #define CYTHON_COMPILING_IN_CPYTHON 0
  #define CYTHON_COMPILING_IN_LIMITED_API 0
  #define CYTHON_COMPILING_IN_GRAAL 0
  #define CYTHON_COMPILING_IN_NOGIL 0
  #undef CYTHON_USE_TYPE_SLOTS
  #define CYTHON_USE_TYPE_SLOTS 0
  #ifndef CYTHON_USE_TYPE_SPECS
    #define CYTHON_USE_TYPE_SPECS 0
  #endif
  #undef CYTHON_USE_PYTYPE_LOOKUP
  #define CYTHON_USE_PYTYPE_LOOKUP 0
  #if PY_VERSION_HEX < 0x03050000
    #undef CYTHON_USE_ASYNC_SLOTS
    #define CYTHON_USE_ASYNC_SLOTS 0
  #elif !defined(CYTHON_USE_ASYNC_SLOTS)
    #define CYTHON_USE_ASYNC_SLOTS 1
  #endif
  #undef CYTHON_USE_PYLIST_INTERNALS
  #define CYTHON_USE_PYLIST_INTERNALS 0
  #undef CYTHON_USE_UNICODE_INTERNALS
  #define CYTHON_USE_UNICODE_INTERNALS 0
  #undef CYTHON_USE_UNICODE_WRITER
  #define CYTHON_USE_UNICODE_WRITER 0
  #undef CYTHON_USE_PYLONG_INTERNALS
  #define CYTHON_USE_PYLONG_INTERNALS 0
  #undef CYTHON_AVOID_BORROWED_REFS
  #define CYTHON_AVOID_BORROWED_REFS 1
  #undef CYTHON_ASSUME_SAFE_MACROS
  #define CYTHON_ASSUME_SAFE_MACROS 0
  #undef CYTHON_UNPACK_METHODS
  #define CYTHON_UNPACK_METHODS 0
  #undef CYTHON_FAST_THREAD_STATE
  #define CYTHON_FAST_THREAD_STATE 0
  #undef CYTHON_FAST_GIL
  #define CYTHON_FAST_GIL 0
  #undef CYTHON_METH_FASTCALL
  #define CYTHON_METH_FASTCALL 0
  #undef CYTHON_FAST_PYCALL
  #define CYTHON_FAST_PYCALL 0
  #ifndef CYTHON_PEP487_INIT_SUBCLASS
    #define CYTHON_PEP487_INIT_SUBCLASS (PY_MAJOR_VERSION >= 3)
  #endif
  #if PY_VERSION_HEX < 0x03090000
    #undef CYTHON_PEP489_MULTI_PHASE_INIT
    #define CYTHON_PEP489_MULTI_PHASE_INIT 0
  #elif !defined(CYTHON_PEP489_MULTI_PHASE_INIT)
    #define CYTHON_PEP489_MULTI_PHASE_INIT 1
  #endif
  #undef CYTHON_USE_MODULE_STATE
  #define CYTHON_USE_MODULE_STATE 0
  #undef CYTHON_USE_TP_FINALIZE
  #define CYTHON_USE_TP_FINALIZE (PY_VERSION_HEX >= 0x030400a1 && PYPY_VERSION_NUM >= 0x07030C00)
  #undef CYTHON_USE_DICT_VERSIONS
  #define CYTHON_USE_DICT_VERSIONS 0
  #undef CYTHON_USE_EXC_INFO_STACK
  #define CYTHON_USE_EXC_INFO_STACK 0
  #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC
    #define CYTHON_UPDATE_DESCRIPTOR_DOC 0
  #endif
  #undef CYTHON_USE_FREELISTS
  #define CYTHON_USE_FREELISTS 0
#elif defined(CYTHON_LIMITED_API)
  #ifdef Py_LIMITED_API
    #undef __PYX_LIMITED_VERSION_HEX
    #define __PYX_LIMITED_VERSION_HEX Py_LIMITED_API
  #endif
  #define CYTHON_COMPILING_IN_PYPY 0
  #define CYTHON_COMPILING_IN_CPYTHON 0
  #define CYTHON_COMPILING_IN_LIMITED_API 1
  #define CYTHON_COMPILING_IN_GRAAL 0
  #define CYTHON_COMPILING_IN_NOGIL 0
  #undef CYTHON_CLINE_IN_TRACEBACK
  #define CYTHON_CLINE_IN_TRACEBACK 0
  #undef CYTHON_USE_TYPE_SLOTS
  #define CYTHON_USE_TYPE_SLOTS 0
  #undef CYTHON_USE_TYPE_SPECS
  #define CYTHON_USE_TYPE_SPECS 1
  #undef CYTHON_USE_PYTYPE_LOOKUP
  #define CYTHON_USE_PYTYPE_LOOKUP 0
  #undef CYTHON_USE_ASYNC_SLOTS
  #define CYTHON_USE_ASYNC_SLOTS 0
  #undef CYTHON_USE_PYLIST_INTERNALS
  #define CYTHON_USE_PYLIST_INTERNALS 0
  #undef CYTHON_USE_UNICODE_INTERNALS
  #define CYTHON_USE_UNICODE_INTERNALS 0
  #ifndef CYTHON_USE_UNICODE_WRITER
    #define CYTHON_USE_UNICODE_WRITER 0
  #endif
  #undef CYTHON_USE_PYLONG_INTERNALS
  #define CYTHON_USE_PYLONG_INTERNALS 0
  #ifndef CYTHON_AVOID_BORROWED_REFS
    #define CYTHON_AVOID_BORROWED_REFS 0
  #endif
  #undef CYTHON_ASSUME_SAFE_MACROS
  #define CYTHON_ASSUME_SAFE_MACROS 0
  #undef CYTHON_UNPACK_METHODS
  #define CYTHON_UNPACK_METHODS 0
  #undef CYTHON_FAST_THREAD_STATE
  #define CYTHON_FAST_THREAD_STATE 0
  #undef CYTHON_FAST_GIL
  #define CYTHON_FAST_GIL 0
  #undef CYTHON_METH_FASTCALL
  #define CYTHON_METH_FASTCALL 0
  #undef CYTHON_FAST_PYCALL
  #define CYTHON_FAST_PYCALL 0
  #ifndef CYTHON_PEP487_INIT_SUBCLASS
    #define CYTHON_PEP487_INIT_SUBCLASS 1
  #endif
  #undef CYTHON_PEP489_MULTI_PHASE_INIT
  #define CYTHON_PEP489_MULTI_PHASE_INIT 0
  #undef CYTHON_USE_MODULE_STATE
  #define CYTHON_USE_MODULE_STATE 1
  #ifndef CYTHON_USE_TP_FINALIZE
    #define CYTHON_USE_TP_FINALIZE 0
  #endif
  #undef CYTHON_USE_DICT_VERSIONS
  #define CYTHON_USE_DICT_VERSIONS 0
  #undef CYTHON_USE_EXC_INFO_STACK
  #define CYTHON_USE_EXC_INFO_STACK 0
  #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC
    #define CYTHON_UPDATE_DESCRIPTOR_DOC 0
  #endif
  #undef CYTHON_USE_FREELISTS
  #define CYTHON_USE_FREELISTS 0
#elif defined(Py_GIL_DISABLED) || defined(Py_NOGIL)
  #define CYTHON_COMPILING_IN_PYPY 0
  #define CYTHON_COMPILING_IN_CPYTHON 0
  #define CYTHON_COMPILING_IN_LIMITED_API 0
  #define CYTHON_COMPILING_IN_GRAAL 0
  #define CYTHON_COMPILING_IN_NOGIL 1
  #ifndef CYTHON_USE_TYPE_SLOTS
    #define CYTHON_USE_TYPE_SLOTS 1
  #endif
  #ifndef CYTHON_USE_TYPE_SPECS
    #define CYTHON_USE_TYPE_SPECS 0
  #endif
  #undef CYTHON_USE_PYTYPE_LOOKUP
  #define CYTHON_USE_PYTYPE_LOOKUP 0
  #ifndef CYTHON_USE_ASYNC_SLOTS
    #define CYTHON_USE_ASYNC_SLOTS 1
  #endif
  #ifndef CYTHON_USE_PYLONG_INTERNALS
    #define CYTHON_USE_PYLONG_INTERNALS 0
  #endif
  #undef CYTHON_USE_PYLIST_INTERNALS
  #define CYTHON_USE_PYLIST_INTERNALS 0
  #ifndef CYTHON_USE_UNICODE_INTERNALS
    #define CYTHON_USE_UNICODE_INTERNALS 1
  #endif
  #undef CYTHON_USE_UNICODE_WRITER
  #define CYTHON_USE_UNICODE_WRITER 0
  #ifndef CYTHON_AVOID_BORROWED_REFS
    #define CYTHON_AVOID_BORROWED_REFS 0
  #endif
  #ifndef CYTHON_ASSUME_SAFE_MACROS
    #define CYTHON_ASSUME_SAFE_MACROS 1
  #endif
  #ifndef CYTHON_UNPACK_METHODS
    #define CYTHON_UNPACK_METHODS 1
  #endif
  #undef CYTHON_FAST_THREAD_STATE
  #define CYTHON_FAST_THREAD_STATE 0
  #undef CYTHON_FAST_GIL
  #define CYTHON_FAST_GIL 0
  #ifndef CYTHON_METH_FASTCALL
    #define CYTHON_METH_FASTCALL 1
  #endif
  #undef CYTHON_FAST_PYCALL
  #define CYTHON_FAST_PYCALL 0
  #ifndef CYTHON_PEP487_INIT_SUBCLASS
    #define CYTHON_PEP487_INIT_SUBCLASS 1
  #endif
  #ifndef CYTHON_PEP489_MULTI_PHASE_INIT
    #define CYTHON_PEP489_MULTI_PHASE_INIT 1
  #endif
  #ifndef CYTHON_USE_MODULE_STATE
    #define CYTHON_USE_MODULE_STATE 0
  #endif
  #ifndef CYTHON_USE_TP_FINALIZE
    #define CYTHON_USE_TP_FINALIZE 1
  #endif
  #undef CYTHON_USE_DICT_VERSIONS
  #define CYTHON_USE_DICT_VERSIONS 0
  #undef CYTHON_USE_EXC_INFO_STACK
  #define CYTHON_USE_EXC_INFO_STACK 0
  #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC
    #define CYTHON_UPDATE_DESCRIPTOR_DOC 1
  #endif
  #ifndef CYTHON_USE_FREELISTS
    #define CYTHON_USE_FREELISTS 0
  #endif
#else
  #define CYTHON_COMPILING_IN_PYPY 0
  #define CYTHON_COMPILING_IN_CPYTHON 1
  #define CYTHON_COMPILING_IN_LIMITED_API 0
  #define CYTHON_COMPILING_IN_GRAAL 0
  #define CYTHON_COMPILING_IN_NOGIL 0
  #ifndef CYTHON_USE_TYPE_SLOTS
    #define CYTHON_USE_TYPE_SLOTS 1
  #endif
  #ifndef CYTHON_USE_TYPE_SPECS
    #define CYTHON_USE_TYPE_SPECS 0
  #endif
  #ifndef CYTHON_USE_PYTYPE_LOOKUP
    #define CYTHON_USE_PYTYPE_LOOKUP 1
  #endif
  #if PY_MAJOR_VERSION < 3
    #undef CYTHON_USE_ASYNC_SLOTS
    #define CYTHON_USE_ASYNC_SLOTS 0
  #elif !defined(CYTHON_USE_ASYNC_SLOTS)
    #define CYTHON_USE_ASYNC_SLOTS 1
  #endif
  #ifndef CYTHON_USE_PYLONG_INTERNALS
    #define CYTHON_USE_PYLONG_INTERNALS 1
  #endif
  #ifndef CYTHON_USE_PYLIST_INTERNALS
    #define CYTHON_USE_PYLIST_INTERNALS 1
  #endif
  #ifndef CYTHON_USE_UNICODE_INTERNALS
    #define CYTHON_USE_UNICODE_INTERNALS 1
  #endif
  #if PY_VERSION_HEX < 0x030300F0 || PY_VERSION_HEX >= 0x030B00A2
    #undef CYTHON_USE_UNICODE_WRITER
    #define CYTHON_USE_UNICODE_WRITER 0
  #elif !defined(CYTHON_USE_UNICODE_WRITER)
    #define CYTHON_USE_UNICODE_WRITER 1
  #endif
  #ifndef CYTHON_AVOID_BORROWED_REFS
    #define CYTHON_AVOID_BORROWED_REFS 0
  #endif
  #ifndef CYTHON_ASSUME_SAFE_MACROS
    #define CYTHON_ASSUME_SAFE_MACROS 1
  #endif
  #ifndef CYTHON_UNPACK_METHODS
    #define CYTHON_UNPACK_METHODS 1
  #endif
  #ifndef CYTHON_FAST_THREAD_STATE
    #define CYTHON_FAST_THREAD_STATE 1
  #endif
  #ifndef CYTHON_FAST_GIL
    #define CYTHON_FAST_GIL (PY_MAJOR_VERSION < 3 || PY_VERSION_HEX >= 0x03060000 && PY_VERSION_HEX < 0x030C00A6)
  #endif
  #ifndef CYTHON_METH_FASTCALL
    #define CYTHON_METH_FASTCALL (PY_VERSION_HEX >= 0x030700A1)
  #endif
  #ifndef CYTHON_FAST_PYCALL
    #define CYTHON_FAST_PYCALL 1
  #endif
  #ifndef CYTHON_PEP487_INIT_SUBCLASS
    #define CYTHON_PEP487_INIT_SUBCLASS 1
  #endif
  #if PY_VERSION_HEX < 0x03050000
    #undef CYTHON_PEP489_MULTI_PHASE_INIT
    #define CYTHON_PEP489_MULTI_PHASE_INIT 0
  #elif !defined(CYTHON_PEP489_MULTI_PHASE_INIT)
    #define CYTHON_PEP489_MULTI_PHASE_INIT 1
  #endif
  #ifndef CYTHON_USE_MODULE_STATE
    #define CYTHON_USE_MODULE_STATE 0
  #endif
  #if PY_VERSION_HEX < 0x030400a1
    #undef CYTHON_USE_TP_FINALIZE
    #define CYTHON_USE_TP_FINALIZE 0
  #elif !defined(CYTHON_USE_TP_FINALIZE)
    #define CYTHON_USE_TP_FINALIZE 1
  #endif
  #if PY_VERSION_HEX < 0x030600B1
    #undef CYTHON_USE_DICT_VERSIONS
    #define CYTHON_USE_DICT_VERSIONS 0
  #elif !defined(CYTHON_USE_DICT_VERSIONS)
    #define CYTHON_USE_DICT_VERSIONS  (PY_VERSION_HEX < 0x030C00A5)
  #endif
  #if PY_VERSION_HEX < 0x030700A3
    #undef CYTHON_USE_EXC_INFO_STACK
    #define CYTHON_USE_EXC_INFO_STACK 0
  #elif !defined(CYTHON_USE_EXC_INFO_STACK)
    #define CYTHON_USE_EXC_INFO_STACK 1
  #endif
  #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC
    #define CYTHON_UPDATE_DESCRIPTOR_DOC 1
  #endif
  #ifndef CYTHON_USE_FREELISTS
    #define CYTHON_USE_FREELISTS 1
  #endif
#endif
#if !defined(CYTHON_FAST_PYCCALL)
#define CYTHON_FAST_PYCCALL  (CYTHON_FAST_PYCALL && PY_VERSION_HEX >= 0x030600B1)
#endif
#if !defined(CYTHON_VECTORCALL)
#define CYTHON_VECTORCALL  (CYTHON_FAST_PYCCALL && PY_VERSION_HEX >= 0x030800B1)
#endif
#define CYTHON_BACKPORT_VECTORCALL (CYTHON_METH_FASTCALL && PY_VERSION_HEX < 0x030800B1)
#if CYTHON_USE_PYLONG_INTERNALS
  #if PY_MAJOR_VERSION < 3
    #include "longintrepr.h"
  #endif
  #undef SHIFT
  #undef BASE
  #undef MASK
  #ifdef SIZEOF_VOID_P
    enum { __pyx_check_sizeof_voidp = 1 / (int)(SIZEOF_VOID_P == sizeof(void*)) };
  #endif
#endif
#ifndef __has_attribute
  #define __has_attribute(x) 0
#endif
#ifndef __has_cpp_attribute
  #define __has_cpp_attribute(x) 0
#endif
#ifndef CYTHON_RESTRICT
  #if defined(__GNUC__)
    #define CYTHON_RESTRICT __restrict__
  #elif defined(_MSC_VER) && _MSC_VER >= 1400
    #define CYTHON_RESTRICT __restrict
  #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
    #define CYTHON_RESTRICT restrict
  #else
    #define CYTHON_RESTRICT
  #endif
#endif
#ifndef CYTHON_UNUSED
  #if defined(__cplusplus)
    /* for clang __has_cpp_attribute(maybe_unused) is true even before C++17
     * but leads to warnings with -pedantic, since it is a C++17 feature */
    #if ((defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) || __cplusplus >= 201703L)
      #if __has_cpp_attribute(maybe_unused)
        #define CYTHON_UNUSED [[maybe_unused]]
      #endif
    #endif
  #endif
#endif
#ifndef CYTHON_UNUSED
# if defined(__GNUC__)
#   if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
#     define CYTHON_UNUSED __attribute__ ((__unused__))
#   else
#     define CYTHON_UNUSED
#   endif
# elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER))
#   define CYTHON_UNUSED __attribute__ ((__unused__))
# else
#   define CYTHON_UNUSED
# endif
#endif
#ifndef CYTHON_UNUSED_VAR
#  if defined(__cplusplus)
     template<class T> void CYTHON_UNUSED_VAR( const T& ) { }
#  else
#    define CYTHON_UNUSED_VAR(x) (void)(x)
#  endif
#endif
#ifndef CYTHON_MAYBE_UNUSED_VAR
  #define CYTHON_MAYBE_UNUSED_VAR(x) CYTHON_UNUSED_VAR(x)
#endif
#ifndef CYTHON_NCP_UNUSED
# if CYTHON_COMPILING_IN_CPYTHON
#  define CYTHON_NCP_UNUSED
# else
#  define CYTHON_NCP_UNUSED CYTHON_UNUSED
# endif
#endif
#ifndef CYTHON_USE_CPP_STD_MOVE
  #if defined(__cplusplus) && (\
    __cplusplus >= 201103L || (defined(_MSC_VER) && _MSC_VER >= 1600))
    #define CYTHON_USE_CPP_STD_MOVE 1
  #else
    #define CYTHON_USE_CPP_STD_MOVE 0
  #endif
#endif
#define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None)
#ifdef _MSC_VER
    #ifndef _MSC_STDINT_H_
        #if _MSC_VER < 1300
            typedef unsigned char     uint8_t;
            typedef unsigned short    uint16_t;
            typedef unsigned int      uint32_t;
        #else
            typedef unsigned __int8   uint8_t;
            typedef unsigned __int16  uint16_t;
            typedef unsigned __int32  uint32_t;
        #endif
    #endif
    #if _MSC_VER < 1300
        #ifdef _WIN64
            typedef unsigned long long  __pyx_uintptr_t;
        #else
            typedef unsigned int        __pyx_uintptr_t;
        #endif
    #else
        #ifdef _WIN64
            typedef unsigned __int64    __pyx_uintptr_t;
        #else
            typedef unsigned __int32    __pyx_uintptr_t;
        #endif
    #endif
#else
    #include <stdint.h>
    typedef uintptr_t  __pyx_uintptr_t;
#endif
#ifndef CYTHON_FALLTHROUGH
  #if defined(__cplusplus)
    /* for clang __has_cpp_attribute(fallthrough) is true even before C++17
     * but leads to warnings with -pedantic, since it is a C++17 feature */
    #if ((defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) || __cplusplus >= 201703L)
      #if __has_cpp_attribute(fallthrough)
        #define CYTHON_FALLTHROUGH [[fallthrough]]
      #endif
    #endif
    #ifndef CYTHON_FALLTHROUGH
      #if __has_cpp_attribute(clang::fallthrough)
        #define CYTHON_FALLTHROUGH [[clang::fallthrough]]
      #elif __has_cpp_attribute(gnu::fallthrough)
        #define CYTHON_FALLTHROUGH [[gnu::fallthrough]]
      #endif
    #endif
  #endif
  #ifndef CYTHON_FALLTHROUGH
    #if __has_attribute(fallthrough)
      #define CYTHON_FALLTHROUGH __attribute__((fallthrough))
    #else
      #define CYTHON_FALLTHROUGH
    #endif
  #endif
  #if defined(__clang__) && defined(__apple_build_version__)
    #if __apple_build_version__ < 7000000
      #undef  CYTHON_FALLTHROUGH
      #define CYTHON_FALLTHROUGH
    #endif
  #endif
#endif
#ifdef __cplusplus
  template <typename T>
  struct __PYX_IS_UNSIGNED_IMPL {static const bool value = T(0) < T(-1);};
  #define __PYX_IS_UNSIGNED(type) (__PYX_IS_UNSIGNED_IMPL<type>::value)
#else
  #define __PYX_IS_UNSIGNED(type) (((type)-1) > 0)
#endif
#if CYTHON_COMPILING_IN_PYPY == 1
  #define __PYX_NEED_TP_PRINT_SLOT  (PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x030A0000)
#else
  #define __PYX_NEED_TP_PRINT_SLOT  (PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000)
#endif
#define __PYX_REINTERPRET_FUNCION(func_pointer, other_pointer) ((func_pointer)(void(*)(void))(other_pointer))

#ifndef CYTHON_INLINE
  #if defined(__clang__)
    #define CYTHON_INLINE __inline__ __attribute__ ((__unused__))
  #elif defined(__GNUC__)
    #define CYTHON_INLINE __inline__
  #elif defined(_MSC_VER)
    #define CYTHON_INLINE __inline
  #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
    #define CYTHON_INLINE inline
  #else
    #define CYTHON_INLINE
  #endif
#endif

#define __PYX_BUILD_PY_SSIZE_T "n"
#define CYTHON_FORMAT_SSIZE_T "z"
#if PY_MAJOR_VERSION < 3
  #define __Pyx_BUILTIN_MODULE_NAME "__builtin__"
  #define __Pyx_DefaultClassType PyClass_Type
  #define __Pyx_PyCode_New(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
          PyCode_New(a+k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
#else
  #define __Pyx_BUILTIN_MODULE_NAME "builtins"
  #define __Pyx_DefaultClassType PyType_Type
#if CYTHON_COMPILING_IN_LIMITED_API
    static CYTHON_INLINE PyObject* __Pyx_PyCode_New(int a, int p, int k, int l, int s, int f,
                                                    PyObject *code, PyObject *c, PyObject* n, PyObject *v,
                                                    PyObject *fv, PyObject *cell, PyObject* fn,
                                                    PyObject *name, int fline, PyObject *lnos) {
        PyObject *exception_table = NULL;
        PyObject *types_module=NULL, *code_type=NULL, *result=NULL;
        #if __PYX_LIMITED_VERSION_HEX < 0x030B0000
        PyObject *version_info;
        PyObject *py_minor_version = NULL;
        #endif
        long minor_version = 0;
        PyObject *type, *value, *traceback;
        PyErr_Fetch(&type, &value, &traceback);
        #if __PYX_LIMITED_VERSION_HEX >= 0x030B0000
        minor_version = 11;
        #else
        if (!(version_info = PySys_GetObject("version_info"))) goto end;
        if (!(py_minor_version = PySequence_GetItem(version_info, 1))) goto end;
        minor_version = PyLong_AsLong(py_minor_version);
        Py_DECREF(py_minor_version);
        if (minor_version == -1 && PyErr_Occurred()) goto end;
        #endif
        if (!(types_module = PyImport_ImportModule("types"))) goto end;
        if (!(code_type = PyObject_GetAttrString(types_module, "CodeType"))) goto end;
        if (minor_version <= 7) {
            (void)p;
            result = PyObject_CallFunction(code_type, "iiiiiOOOOOOiOO", a, k, l, s, f, code,
                          c, n, v, fn, name, fline, lnos, fv, cell);
        } else if (minor_version <= 10) {
            result = PyObject_CallFunction(code_type, "iiiiiiOOOOOOiOO", a,p, k, l, s, f, code,
                          c, n, v, fn, name, fline, lnos, fv, cell);
        } else {
            if (!(exception_table = PyBytes_FromStringAndSize(NULL, 0))) goto end;
            result = PyObject_CallFunction(code_type, "iiiiiiOOOOOOOiOO", a,p, k, l, s, f, code,
                          c, n, v, fn, name, name, fline, lnos, exception_table, fv, cell);
        }
    end:
        Py_XDECREF(code_type);
        Py_XDECREF(exception_table);
        Py_XDECREF(types_module);
        if (type) {
            PyErr_Restore(type, value, traceback);
        }
        return result;
    }
    #ifndef CO_OPTIMIZED
    #define CO_OPTIMIZED 0x0001
    #endif
    #ifndef CO_NEWLOCALS
    #define CO_NEWLOCALS 0x0002
    #endif
    #ifndef CO_VARARGS
    #define CO_VARARGS 0x0004
    #endif
    #ifndef CO_VARKEYWORDS
    #define CO_VARKEYWORDS 0x0008
    #endif
    #ifndef CO_ASYNC_GENERATOR
    #define CO_ASYNC_GENERATOR 0x0200
    #endif
    #ifndef CO_GENERATOR
    #define CO_GENERATOR 0x0020
    #endif
    #ifndef CO_COROUTINE
    #define CO_COROUTINE 0x0080
    #endif
#elif PY_VERSION_HEX >= 0x030B0000
  static CYTHON_INLINE PyCodeObject* __Pyx_PyCode_New(int a, int p, int k, int l, int s, int f,
                                                    PyObject *code, PyObject *c, PyObject* n, PyObject *v,
                                                    PyObject *fv, PyObject *cell, PyObject* fn,
                                                    PyObject *name, int fline, PyObject *lnos) {
    PyCodeObject *result;
    PyObject *empty_bytes = PyBytes_FromStringAndSize("", 0);
    if (!empty_bytes) return NULL;
    result =
      #if PY_VERSION_HEX >= 0x030C0000
        PyUnstable_Code_NewWithPosOnlyArgs
      #else
        PyCode_NewWithPosOnlyArgs
      #endif
        (a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, name, fline, lnos, empty_bytes);
    Py_DECREF(empty_bytes);
    return result;
  }
#elif PY_VERSION_HEX >= 0x030800B2 && !CYTHON_COMPILING_IN_PYPY
  #define __Pyx_PyCode_New(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
          PyCode_NewWithPosOnlyArgs(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
#else
  #define __Pyx_PyCode_New(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
          PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
#endif
#endif
#if PY_VERSION_HEX >= 0x030900A4 || defined(Py_IS_TYPE)
  #define __Pyx_IS_TYPE(ob, type) Py_IS_TYPE(ob, type)
#else
  #define __Pyx_IS_TYPE(ob, type) (((const PyObject*)ob)->ob_type == (type))
#endif
#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_Is)
  #define __Pyx_Py_Is(x, y)  Py_Is(x, y)
#else
  #define __Pyx_Py_Is(x, y) ((x) == (y))
#endif
#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsNone)
  #define __Pyx_Py_IsNone(ob) Py_IsNone(ob)
#else
  #define __Pyx_Py_IsNone(ob) __Pyx_Py_Is((ob), Py_None)
#endif
#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsTrue)
  #define __Pyx_Py_IsTrue(ob) Py_IsTrue(ob)
#else
  #define __Pyx_Py_IsTrue(ob) __Pyx_Py_Is((ob), Py_True)
#endif
#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsFalse)
  #define __Pyx_Py_IsFalse(ob) Py_IsFalse(ob)
#else
  #define __Pyx_Py_IsFalse(ob) __Pyx_Py_Is((ob), Py_False)
#endif
#define __Pyx_NoneAsNull(obj)  (__Pyx_Py_IsNone(obj) ? NULL : (obj))
#if PY_VERSION_HEX >= 0x030900F0 && !CYTHON_COMPILING_IN_PYPY
  #define __Pyx_PyObject_GC_IsFinalized(o) PyObject_GC_IsFinalized(o)
#else
  #define __Pyx_PyObject_GC_IsFinalized(o) _PyGC_FINALIZED(o)
#endif
#ifndef CO_COROUTINE
  #define CO_COROUTINE 0x80
#endif
#ifndef CO_ASYNC_GENERATOR
  #define CO_ASYNC_GENERATOR 0x200
#endif
#ifndef Py_TPFLAGS_CHECKTYPES
  #define Py_TPFLAGS_CHECKTYPES 0
#endif
#ifndef Py_TPFLAGS_HAVE_INDEX
  #define Py_TPFLAGS_HAVE_INDEX 0
#endif
#ifndef Py_TPFLAGS_HAVE_NEWBUFFER
  #define Py_TPFLAGS_HAVE_NEWBUFFER 0
#endif
#ifndef Py_TPFLAGS_HAVE_FINALIZE
  #define Py_TPFLAGS_HAVE_FINALIZE 0
#endif
#ifndef Py_TPFLAGS_SEQUENCE
  #define Py_TPFLAGS_SEQUENCE 0
#endif
#ifndef Py_TPFLAGS_MAPPING
  #define Py_TPFLAGS_MAPPING 0
#endif
#ifndef METH_STACKLESS
  #define METH_STACKLESS 0
#endif
#if PY_VERSION_HEX <= 0x030700A3 || !defined(METH_FASTCALL)
  #ifndef METH_FASTCALL
     #define METH_FASTCALL 0x80
  #endif
  typedef PyObject *(*__Pyx_PyCFunctionFast) (PyObject *self, PyObject *const *args, Py_ssize_t nargs);
  typedef PyObject *(*__Pyx_PyCFunctionFastWithKeywords) (PyObject *self, PyObject *const *args,
                                                          Py_ssize_t nargs, PyObject *kwnames);
#else
  #if PY_VERSION_HEX >= 0x030d00A4
  #  define __Pyx_PyCFunctionFast PyCFunctionFast
  #  define __Pyx_PyCFunctionFastWithKeywords PyCFunctionFastWithKeywords
  #else
  #  define __Pyx_PyCFunctionFast _PyCFunctionFast
  #  define __Pyx_PyCFunctionFastWithKeywords _PyCFunctionFastWithKeywords
  #endif
#endif
#if CYTHON_METH_FASTCALL
  #define __Pyx_METH_FASTCALL METH_FASTCALL
  #define __Pyx_PyCFunction_FastCall __Pyx_PyCFunctionFast
  #define __Pyx_PyCFunction_FastCallWithKeywords __Pyx_PyCFunctionFastWithKeywords
#else
  #define __Pyx_METH_FASTCALL METH_VARARGS
  #define __Pyx_PyCFunction_FastCall PyCFunction
  #define __Pyx_PyCFunction_FastCallWithKeywords PyCFunctionWithKeywords
#endif
#if CYTHON_VECTORCALL
  #define __pyx_vectorcallfunc vectorcallfunc
  #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET  PY_VECTORCALL_ARGUMENTS_OFFSET
  #define __Pyx_PyVectorcall_NARGS(n)  PyVectorcall_NARGS((size_t)(n))
#elif CYTHON_BACKPORT_VECTORCALL
  typedef PyObject *(*__pyx_vectorcallfunc)(PyObject *callable, PyObject *const *args,
                                            size_t nargsf, PyObject *kwnames);
  #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET  ((size_t)1 << (8 * sizeof(size_t) - 1))
  #define __Pyx_PyVectorcall_NARGS(n)  ((Py_ssize_t)(((size_t)(n)) & ~__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET))
#else
  #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET  0
  #define __Pyx_PyVectorcall_NARGS(n)  ((Py_ssize_t)(n))
#endif
#if PY_MAJOR_VERSION >= 0x030900B1
#define __Pyx_PyCFunction_CheckExact(func)  PyCFunction_CheckExact(func)
#else
#define __Pyx_PyCFunction_CheckExact(func)  PyCFunction_Check(func)
#endif
#define __Pyx_CyOrPyCFunction_Check(func)  PyCFunction_Check(func)
#if CYTHON_COMPILING_IN_CPYTHON
#define __Pyx_CyOrPyCFunction_GET_FUNCTION(func)  (((PyCFunctionObject*)(func))->m_ml->ml_meth)
#elif !CYTHON_COMPILING_IN_LIMITED_API
#define __Pyx_CyOrPyCFunction_GET_FUNCTION(func)  PyCFunction_GET_FUNCTION(func)
#endif
#if CYTHON_COMPILING_IN_CPYTHON
#define __Pyx_CyOrPyCFunction_GET_FLAGS(func)  (((PyCFunctionObject*)(func))->m_ml->ml_flags)
static CYTHON_INLINE PyObject* __Pyx_CyOrPyCFunction_GET_SELF(PyObject *func) {
    return (__Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_STATIC) ? NULL : ((PyCFunctionObject*)func)->m_self;
}
#endif
static CYTHON_INLINE int __Pyx__IsSameCFunction(PyObject *func, void *cfunc) {
#if CYTHON_COMPILING_IN_LIMITED_API
    return PyCFunction_Check(func) && PyCFunction_GetFunction(func) == (PyCFunction) cfunc;
#else
    return PyCFunction_Check(func) && PyCFunction_GET_FUNCTION(func) == (PyCFunction) cfunc;
#endif
}
#define __Pyx_IsSameCFunction(func, cfunc)   __Pyx__IsSameCFunction(func, cfunc)
#if __PYX_LIMITED_VERSION_HEX < 0x030900B1
  #define __Pyx_PyType_FromModuleAndSpec(m, s, b)  ((void)m, PyType_FromSpecWithBases(s, b))
  typedef PyObject *(*__Pyx_PyCMethod)(PyObject *, PyTypeObject *, PyObject *const *, size_t, PyObject *);
#else
  #define __Pyx_PyType_FromModuleAndSpec(m, s, b)  PyType_FromModuleAndSpec(m, s, b)
  #define __Pyx_PyCMethod  PyCMethod
#endif
#ifndef METH_METHOD
  #define METH_METHOD 0x200
#endif
#if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Malloc)
  #define PyObject_Malloc(s)   PyMem_Malloc(s)
  #define PyObject_Free(p)     PyMem_Free(p)
  #define PyObject_Realloc(p)  PyMem_Realloc(p)
#endif
#if CYTHON_COMPILING_IN_LIMITED_API
  #define __Pyx_PyCode_HasFreeVars(co)  (PyCode_GetNumFree(co) > 0)
  #define __Pyx_PyFrame_SetLineNumber(frame, lineno)
#else
  #define __Pyx_PyCode_HasFreeVars(co)  (PyCode_GetNumFree(co) > 0)
  #define __Pyx_PyFrame_SetLineNumber(frame, lineno)  (frame)->f_lineno = (lineno)
#endif
#if CYTHON_COMPILING_IN_LIMITED_API
  #define __Pyx_PyThreadState_Current PyThreadState_Get()
#elif !CYTHON_FAST_THREAD_STATE
  #define __Pyx_PyThreadState_Current PyThreadState_GET()
#elif PY_VERSION_HEX >= 0x030d00A1
  #define __Pyx_PyThreadState_Current PyThreadState_GetUnchecked()
#elif PY_VERSION_HEX >= 0x03060000
  #define __Pyx_PyThreadState_Current _PyThreadState_UncheckedGet()
#elif PY_VERSION_HEX >= 0x03000000
  #define __Pyx_PyThreadState_Current PyThreadState_GET()
#else
  #define __Pyx_PyThreadState_Current _PyThreadState_Current
#endif
#if CYTHON_COMPILING_IN_LIMITED_API
static CYTHON_INLINE void *__Pyx_PyModule_GetState(PyObject *op)
{
    void *result;
    result = PyModule_GetState(op);
    if (!result)
        Py_FatalError("Couldn't find the module state");
    return result;
}
#endif
#define __Pyx_PyObject_GetSlot(obj, name, func_ctype)  __Pyx_PyType_GetSlot(Py_TYPE(obj), name, func_ctype)
#if CYTHON_COMPILING_IN_LIMITED_API
  #define __Pyx_PyType_GetSlot(type, name, func_ctype)  ((func_ctype) PyType_GetSlot((type), Py_##name))
#else
  #define __Pyx_PyType_GetSlot(type, name, func_ctype)  ((type)->name)
#endif
#if PY_VERSION_HEX < 0x030700A2 && !defined(PyThread_tss_create) && !defined(Py_tss_NEEDS_INIT)
#include "pythread.h"
#define Py_tss_NEEDS_INIT 0
typedef int Py_tss_t;
static CYTHON_INLINE int PyThread_tss_create(Py_tss_t *key) {
  *key = PyThread_create_key();
  return 0;
}
static CYTHON_INLINE Py_tss_t * PyThread_tss_alloc(void) {
  Py_tss_t *key = (Py_tss_t *)PyObject_Malloc(sizeof(Py_tss_t));
  *key = Py_tss_NEEDS_INIT;
  return key;
}
static CYTHON_INLINE void PyThread_tss_free(Py_tss_t *key) {
  PyObject_Free(key);
}
static CYTHON_INLINE int PyThread_tss_is_created(Py_tss_t *key) {
  return *key != Py_tss_NEEDS_INIT;
}
static CYTHON_INLINE void PyThread_tss_delete(Py_tss_t *key) {
  PyThread_delete_key(*key);
  *key = Py_tss_NEEDS_INIT;
}
static CYTHON_INLINE int PyThread_tss_set(Py_tss_t *key, void *value) {
  return PyThread_set_key_value(*key, value);
}
static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) {
  return PyThread_get_key_value(*key);
}
#endif
#if PY_MAJOR_VERSION < 3
    #if CYTHON_COMPILING_IN_PYPY
        #if PYPY_VERSION_NUM < 0x07030600
            #if defined(__cplusplus) && __cplusplus >= 201402L
                [[deprecated("`with nogil:` inside a nogil function will not release the GIL in PyPy2 < 7.3.6")]]
            #elif defined(__GNUC__) || defined(__clang__)
                __attribute__ ((__deprecated__("`with nogil:` inside a nogil function will not release the GIL in PyPy2 < 7.3.6")))
            #elif defined(_MSC_VER)
                __declspec(deprecated("`with nogil:` inside a nogil function will not release the GIL in PyPy2 < 7.3.6"))
            #endif
            static CYTHON_INLINE int PyGILState_Check(void) {
                return 0;
            }
        #else  // PYPY_VERSION_NUM < 0x07030600
        #endif  // PYPY_VERSION_NUM < 0x07030600
    #else
        static CYTHON_INLINE int PyGILState_Check(void) {
            PyThreadState * tstate = _PyThreadState_Current;
            return tstate && (tstate == PyGILState_GetThisThreadState());
        }
    #endif
#endif
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030d0000 || defined(_PyDict_NewPresized)
#define __Pyx_PyDict_NewPresized(n)  ((n <= 8) ? PyDict_New() : _PyDict_NewPresized(n))
#else
#define __Pyx_PyDict_NewPresized(n)  PyDict_New()
#endif
#if PY_MAJOR_VERSION >= 3 || CYTHON_FUTURE_DIVISION
  #define __Pyx_PyNumber_Divide(x,y)         PyNumber_TrueDivide(x,y)
  #define __Pyx_PyNumber_InPlaceDivide(x,y)  PyNumber_InPlaceTrueDivide(x,y)
#else
  #define __Pyx_PyNumber_Divide(x,y)         PyNumber_Divide(x,y)
  #define __Pyx_PyNumber_InPlaceDivide(x,y)  PyNumber_InPlaceDivide(x,y)
#endif
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX > 0x030600B4 && PY_VERSION_HEX < 0x030d0000 && CYTHON_USE_UNICODE_INTERNALS
#define __Pyx_PyDict_GetItemStrWithError(dict, name)  _PyDict_GetItem_KnownHash(dict, name, ((PyASCIIObject *) name)->hash)
static CYTHON_INLINE PyObject * __Pyx_PyDict_GetItemStr(PyObject *dict, PyObject *name) {
    PyObject *res = __Pyx_PyDict_GetItemStrWithError(dict, name);
    if (res == NULL) PyErr_Clear();
    return res;
}
#elif PY_MAJOR_VERSION >= 3 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07020000)
#define __Pyx_PyDict_GetItemStrWithError  PyDict_GetItemWithError
#define __Pyx_PyDict_GetItemStr           PyDict_GetItem
#else
static CYTHON_INLINE PyObject * __Pyx_PyDict_GetItemStrWithError(PyObject *dict, PyObject *name) {
#if CYTHON_COMPILING_IN_PYPY
    return PyDict_GetItem(dict, name);
#else
    PyDictEntry *ep;
    PyDictObject *mp = (PyDictObject*) dict;
    long hash = ((PyStringObject *) name)->ob_shash;
    assert(hash != -1);
    ep = (mp->ma_lookup)(mp, name, hash);
    if (ep == NULL) {
        return NULL;
    }
    return ep->me_value;
#endif
}
#define __Pyx_PyDict_GetItemStr           PyDict_GetItem
#endif
#if CYTHON_USE_TYPE_SLOTS
  #define __Pyx_PyType_GetFlags(tp)   (((PyTypeObject *)tp)->tp_flags)
  #define __Pyx_PyType_HasFeature(type, feature)  ((__Pyx_PyType_GetFlags(type) & (feature)) != 0)
  #define __Pyx_PyObject_GetIterNextFunc(obj)  (Py_TYPE(obj)->tp_iternext)
#else
  #define __Pyx_PyType_GetFlags(tp)   (PyType_GetFlags((PyTypeObject *)tp))
  #define __Pyx_PyType_HasFeature(type, feature)  PyType_HasFeature(type, feature)
  #define __Pyx_PyObject_GetIterNextFunc(obj)  PyIter_Next
#endif
#if CYTHON_COMPILING_IN_LIMITED_API
  #define __Pyx_SetItemOnTypeDict(tp, k, v) PyObject_GenericSetAttr((PyObject*)tp, k, v)
#else
  #define __Pyx_SetItemOnTypeDict(tp, k, v) PyDict_SetItem(tp->tp_dict, k, v)
#endif
#if CYTHON_USE_TYPE_SPECS && PY_VERSION_HEX >= 0x03080000
#define __Pyx_PyHeapTypeObject_GC_Del(obj)  {\
    PyTypeObject *type = Py_TYPE((PyObject*)obj);\
    assert(__Pyx_PyType_HasFeature(type, Py_TPFLAGS_HEAPTYPE));\
    PyObject_GC_Del(obj);\
    Py_DECREF(type);\
}
#else
#define __Pyx_PyHeapTypeObject_GC_Del(obj)  PyObject_GC_Del(obj)
#endif
#if CYTHON_COMPILING_IN_LIMITED_API
  #define CYTHON_PEP393_ENABLED 1
  #define __Pyx_PyUnicode_READY(op)       (0)
  #define __Pyx_PyUnicode_GET_LENGTH(u)   PyUnicode_GetLength(u)
  #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_ReadChar(u, i)
  #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u)   ((void)u, 1114111U)
  #define __Pyx_PyUnicode_KIND(u)         ((void)u, (0))
  #define __Pyx_PyUnicode_DATA(u)         ((void*)u)
  #define __Pyx_PyUnicode_READ(k, d, i)   ((void)k, PyUnicode_ReadChar((PyObject*)(d), i))
  #define __Pyx_PyUnicode_IS_TRUE(u)      (0 != PyUnicode_GetLength(u))
#elif PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND)
  #define CYTHON_PEP393_ENABLED 1
  #if PY_VERSION_HEX >= 0x030C0000
    #define __Pyx_PyUnicode_READY(op)       (0)
  #else
    #define __Pyx_PyUnicode_READY(op)       (likely(PyUnicode_IS_READY(op)) ?\
                                                0 : _PyUnicode_Ready((PyObject *)(op)))
  #endif
  #define __Pyx_PyUnicode_GET_LENGTH(u)   PyUnicode_GET_LENGTH(u)
  #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i)
  #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u)   PyUnicode_MAX_CHAR_VALUE(u)
  #define __Pyx_PyUnicode_KIND(u)         ((int)PyUnicode_KIND(u))
  #define __Pyx_PyUnicode_DATA(u)         PyUnicode_DATA(u)
  #define __Pyx_PyUnicode_READ(k, d, i)   PyUnicode_READ(k, d, i)
  #define __Pyx_PyUnicode_WRITE(k, d, i, ch)  PyUnicode_WRITE(k, d, i, (Py_UCS4) ch)
  #if PY_VERSION_HEX >= 0x030C0000
    #define __Pyx_PyUnicode_IS_TRUE(u)      (0 != PyUnicode_GET_LENGTH(u))
  #else
    #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03090000
    #define __Pyx_PyUnicode_IS_TRUE(u)      (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : ((PyCompactUnicodeObject *)(u))->wstr_length))
    #else
    #define __Pyx_PyUnicode_IS_TRUE(u)      (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u)))
    #endif
  #endif
#else
  #define CYTHON_PEP393_ENABLED 0
  #define PyUnicode_1BYTE_KIND  1
  #define PyUnicode_2BYTE_KIND  2
  #define PyUnicode_4BYTE_KIND  4
  #define __Pyx_PyUnicode_READY(op)       (0)
  #define __Pyx_PyUnicode_GET_LENGTH(u)   PyUnicode_GET_SIZE(u)
  #define __Pyx_PyUnicode_READ_CHAR(u, i) ((Py_UCS4)(PyUnicode_AS_UNICODE(u)[i]))
  #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u)   ((sizeof(Py_UNICODE) == 2) ? 65535U : 1114111U)
  #define __Pyx_PyUnicode_KIND(u)         ((int)sizeof(Py_UNICODE))
  #define __Pyx_PyUnicode_DATA(u)         ((void*)PyUnicode_AS_UNICODE(u))
  #define __Pyx_PyUnicode_READ(k, d, i)   ((void)(k), (Py_UCS4)(((Py_UNICODE*)d)[i]))
  #define __Pyx_PyUnicode_WRITE(k, d, i, ch)  (((void)(k)), ((Py_UNICODE*)d)[i] = (Py_UNICODE) ch)
  #define __Pyx_PyUnicode_IS_TRUE(u)      (0 != PyUnicode_GET_SIZE(u))
#endif
#if CYTHON_COMPILING_IN_PYPY
  #define __Pyx_PyUnicode_Concat(a, b)      PyNumber_Add(a, b)
  #define __Pyx_PyUnicode_ConcatSafe(a, b)  PyNumber_Add(a, b)
#else
  #define __Pyx_PyUnicode_Concat(a, b)      PyUnicode_Concat(a, b)
  #define __Pyx_PyUnicode_ConcatSafe(a, b)  ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ?\
      PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b))
#endif
#if CYTHON_COMPILING_IN_PYPY
  #if !defined(PyUnicode_DecodeUnicodeEscape)
    #define PyUnicode_DecodeUnicodeEscape(s, size, errors)  PyUnicode_Decode(s, size, "unicode_escape", errors)
  #endif
  #if !defined(PyUnicode_Contains) || (PY_MAJOR_VERSION == 2 && PYPY_VERSION_NUM < 0x07030500)
    #undef PyUnicode_Contains
    #define PyUnicode_Contains(u, s)  PySequence_Contains(u, s)
  #endif
  #if !defined(PyByteArray_Check)
    #define PyByteArray_Check(obj)  PyObject_TypeCheck(obj, &PyByteArray_Type)
  #endif
  #if !defined(PyObject_Format)
    #define PyObject_Format(obj, fmt)  PyObject_CallMethod(obj, "__format__", "O", fmt)
  #endif
#endif
#define __Pyx_PyString_FormatSafe(a, b)   ((unlikely((a) == Py_None || (PyString_Check(b) && !PyString_CheckExact(b)))) ? PyNumber_Remainder(a, b) : __Pyx_PyString_Format(a, b))
#define __Pyx_PyUnicode_FormatSafe(a, b)  ((unlikely((a) == Py_None || (PyUnicode_Check(b) && !PyUnicode_CheckExact(b)))) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b))
#if PY_MAJOR_VERSION >= 3
  #define __Pyx_PyString_Format(a, b)  PyUnicode_Format(a, b)
#else
  #define __Pyx_PyString_Format(a, b)  PyString_Format(a, b)
#endif
#if PY_MAJOR_VERSION < 3 && !defined(PyObject_ASCII)
  #define PyObject_ASCII(o)            PyObject_Repr(o)
#endif
#if PY_MAJOR_VERSION >= 3
  #define PyBaseString_Type            PyUnicode_Type
  #define PyStringObject               PyUnicodeObject
  #define PyString_Type                PyUnicode_Type
  #define PyString_Check               PyUnicode_Check
  #define PyString_CheckExact          PyUnicode_CheckExact
#ifndef PyObject_Unicode
  #define PyObject_Unicode             PyObject_Str
#endif
#endif
#if PY_MAJOR_VERSION >= 3
  #define __Pyx_PyBaseString_Check(obj) PyUnicode_Check(obj)
  #define __Pyx_PyBaseString_CheckExact(obj) PyUnicode_CheckExact(obj)
#else
  #define __Pyx_PyBaseString_Check(obj) (PyString_Check(obj) || PyUnicode_Check(obj))
  #define __Pyx_PyBaseString_CheckExact(obj) (PyString_CheckExact(obj) || PyUnicode_CheckExact(obj))
#endif
#if CYTHON_COMPILING_IN_CPYTHON
  #define __Pyx_PySequence_ListKeepNew(obj)\
    (likely(PyList_CheckExact(obj) && Py_REFCNT(obj) == 1) ? __Pyx_NewRef(obj) : PySequence_List(obj))
#else
  #define __Pyx_PySequence_ListKeepNew(obj)  PySequence_List(obj)
#endif
#ifndef PySet_CheckExact
  #define PySet_CheckExact(obj)        __Pyx_IS_TYPE(obj, &PySet_Type)
#endif
#if PY_VERSION_HEX >= 0x030900A4
  #define __Pyx_SET_REFCNT(obj, refcnt) Py_SET_REFCNT(obj, refcnt)
  #define __Pyx_SET_SIZE(obj, size) Py_SET_SIZE(obj, size)
#else
  #define __Pyx_SET_REFCNT(obj, refcnt) Py_REFCNT(obj) = (refcnt)
  #define __Pyx_SET_SIZE(obj, size) Py_SIZE(obj) = (size)
#endif
#if CYTHON_ASSUME_SAFE_MACROS
  #define __Pyx_PySequence_ITEM(o, i) PySequence_ITEM(o, i)
  #define __Pyx_PySequence_SIZE(seq)  Py_SIZE(seq)
  #define __Pyx_PyTuple_SET_ITEM(o, i, v) (PyTuple_SET_ITEM(o, i, v), (0))
  #define __Pyx_PyList_SET_ITEM(o, i, v) (PyList_SET_ITEM(o, i, v), (0))
  #define __Pyx_PyTuple_GET_SIZE(o) PyTuple_GET_SIZE(o)
  #define __Pyx_PyList_GET_SIZE(o) PyList_GET_SIZE(o)
  #define __Pyx_PySet_GET_SIZE(o) PySet_GET_SIZE(o)
  #define __Pyx_PyBytes_GET_SIZE(o) PyBytes_GET_SIZE(o)
  #define __Pyx_PyByteArray_GET_SIZE(o) PyByteArray_GET_SIZE(o)
#else
  #define __Pyx_PySequence_ITEM(o, i) PySequence_GetItem(o, i)
  #define __Pyx_PySequence_SIZE(seq)  PySequence_Size(seq)
  #define __Pyx_PyTuple_SET_ITEM(o, i, v) PyTuple_SetItem(o, i, v)
  #define __Pyx_PyList_SET_ITEM(o, i, v) PyList_SetItem(o, i, v)
  #define __Pyx_PyTuple_GET_SIZE(o) PyTuple_Size(o)
  #define __Pyx_PyList_GET_SIZE(o) PyList_Size(o)
  #define __Pyx_PySet_GET_SIZE(o) PySet_Size(o)
  #define __Pyx_PyBytes_GET_SIZE(o) PyBytes_Size(o)
  #define __Pyx_PyByteArray_GET_SIZE(o) PyByteArray_Size(o)
#endif
#if __PYX_LIMITED_VERSION_HEX >= 0x030d00A1
  #define __Pyx_PyImport_AddModuleRef(name) PyImport_AddModuleRef(name)
#else
  static CYTHON_INLINE PyObject *__Pyx_PyImport_AddModuleRef(const char *name) {
      PyObject *module = PyImport_AddModule(name);
      Py_XINCREF(module);
      return module;
  }
#endif
#if PY_MAJOR_VERSION >= 3
  #define PyIntObject                  PyLongObject
  #define PyInt_Type                   PyLong_Type
  #define PyInt_Check(op)              PyLong_Check(op)
  #define PyInt_CheckExact(op)         PyLong_CheckExact(op)
  #define __Pyx_Py3Int_Check(op)       PyLong_Check(op)
  #define __Pyx_Py3Int_CheckExact(op)  PyLong_CheckExact(op)
  #define PyInt_FromString             PyLong_FromString
  #define PyInt_FromUnicode            PyLong_FromUnicode
  #define PyInt_FromLong               PyLong_FromLong
  #define PyInt_FromSize_t             PyLong_FromSize_t
  #define PyInt_FromSsize_t            PyLong_FromSsize_t
  #define PyInt_AsLong                 PyLong_AsLong
  #define PyInt_AS_LONG                PyLong_AS_LONG
  #define PyInt_AsSsize_t              PyLong_AsSsize_t
  #define PyInt_AsUnsignedLongMask     PyLong_AsUnsignedLongMask
  #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask
  #define PyNumber_Int                 PyNumber_Long
#else
  #define __Pyx_Py3Int_Check(op)       (PyLong_Check(op) || PyInt_Check(op))
  #define __Pyx_Py3Int_CheckExact(op)  (PyLong_CheckExact(op) || PyInt_CheckExact(op))
#endif
#if PY_MAJOR_VERSION >= 3
  #define PyBoolObject                 PyLongObject
#endif
#if PY_MAJOR_VERSION >= 3 && CYTHON_COMPILING_IN_PYPY
  #ifndef PyUnicode_InternFromString
    #define PyUnicode_InternFromString(s) PyUnicode_FromString(s)
  #endif
#endif
#if PY_VERSION_HEX < 0x030200A4
  typedef long Py_hash_t;
  #define __Pyx_PyInt_FromHash_t PyInt_FromLong
  #define __Pyx_PyInt_AsHash_t   __Pyx_PyIndex_AsHash_t
#else
  #define __Pyx_PyInt_FromHash_t PyInt_FromSsize_t
  #define __Pyx_PyInt_AsHash_t   __Pyx_PyIndex_AsSsize_t
#endif
#if CYTHON_USE_ASYNC_SLOTS
  #if PY_VERSION_HEX >= 0x030500B1
    #define __Pyx_PyAsyncMethodsStruct PyAsyncMethods
    #define __Pyx_PyType_AsAsync(obj) (Py_TYPE(obj)->tp_as_async)
  #else
    #define __Pyx_PyType_AsAsync(obj) ((__Pyx_PyAsyncMethodsStruct*) (Py_TYPE(obj)->tp_reserved))
  #endif
#else
  #define __Pyx_PyType_AsAsync(obj) NULL
#endif
#ifndef __Pyx_PyAsyncMethodsStruct
    typedef struct {
        unaryfunc am_await;
        unaryfunc am_aiter;
        unaryfunc am_anext;
    } __Pyx_PyAsyncMethodsStruct;
#endif

#if defined(_WIN32) || defined(WIN32) || defined(MS_WINDOWS)
  #if !defined(_USE_MATH_DEFINES)
    #define _USE_MATH_DEFINES
  #endif
#endif
#include <math.h>
#ifdef NAN
#define __PYX_NAN() ((float) NAN)
#else
static CYTHON_INLINE float __PYX_NAN() {
  float value;
  memset(&value, 0xFF, sizeof(value));
  return value;
}
#endif
#if defined(__CYGWIN__) && defined(_LDBL_EQ_DBL)
#define __Pyx_truncl trunc
#else
#define __Pyx_truncl truncl
#endif

#define __PYX_MARK_ERR_POS(f_index, lineno) \
    { __pyx_filename = __pyx_f[f_index]; (void)__pyx_filename; __pyx_lineno = lineno; (void)__pyx_lineno; __pyx_clineno = __LINE__;  (void)__pyx_clineno; }
#define __PYX_ERR(f_index, lineno, Ln_error) \
    { __PYX_MARK_ERR_POS(f_index, lineno) goto Ln_error; }

#ifdef CYTHON_EXTERN_C
    #undef __PYX_EXTERN_C
    #define __PYX_EXTERN_C CYTHON_EXTERN_C
#elif defined(__PYX_EXTERN_C)
    #ifdef _MSC_VER
    #pragma message ("Please do not define the '__PYX_EXTERN_C' macro externally. Use 'CYTHON_EXTERN_C' instead.")
    #else
    #warning Please do not define the '__PYX_EXTERN_C' macro externally. Use 'CYTHON_EXTERN_C' instead.
    #endif
#else
  #ifdef __cplusplus
    #define __PYX_EXTERN_C extern "C"
  #else
    #define __PYX_EXTERN_C extern
  #endif
#endif

#define __PYX_HAVE__DifferentialAlgebra
#define __PYX_HAVE_API__DifferentialAlgebra
/* Early includes */
#include <string.h>
#include <stdio.h>
#include <stddef.h>
#include "pythread.h"
#include "bmi.h"
#ifdef _OPENMP
#include <omp.h>
#endif /* _OPENMP */

#if defined(PYREX_WITHOUT_ASSERTIONS) && !defined(CYTHON_WITHOUT_ASSERTIONS)
#define CYTHON_WITHOUT_ASSERTIONS
#endif

typedef struct {PyObject **p; const char *s; const Py_ssize_t n; const char* encoding;
                const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry;

#define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0
#define __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 0
#define __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT (PY_MAJOR_VERSION >= 3 && __PYX_DEFAULT_STRING_ENCODING_IS_UTF8)
#define __PYX_DEFAULT_STRING_ENCODING ""
#define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString
#define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
#define __Pyx_uchar_cast(c) ((unsigned char)c)
#define __Pyx_long_cast(x) ((long)x)
#define __Pyx_fits_Py_ssize_t(v, type, is_signed)  (\
    (sizeof(type) < sizeof(Py_ssize_t))  ||\
    (sizeof(type) > sizeof(Py_ssize_t) &&\
          likely(v < (type)PY_SSIZE_T_MAX ||\
                 v == (type)PY_SSIZE_T_MAX)  &&\
          (!is_signed || likely(v > (type)PY_SSIZE_T_MIN ||\
                                v == (type)PY_SSIZE_T_MIN)))  ||\
    (sizeof(type) == sizeof(Py_ssize_t) &&\
          (is_signed || likely(v < (type)PY_SSIZE_T_MAX ||\
                               v == (type)PY_SSIZE_T_MAX)))  )
static CYTHON_INLINE int __Pyx_is_valid_index(Py_ssize_t i, Py_ssize_t limit) {
    return (size_t) i < (size_t) limit;
}
#if defined (__cplusplus) && __cplusplus >= 201103L
    #include <cstdlib>
    #define __Pyx_sst_abs(value) std::abs(value)
#elif SIZEOF_INT >= SIZEOF_SIZE_T
    #define __Pyx_sst_abs(value) abs(value)
#elif SIZEOF_LONG >= SIZEOF_SIZE_T
    #define __Pyx_sst_abs(value) labs(value)
#elif defined (_MSC_VER)
    #define __Pyx_sst_abs(value) ((Py_ssize_t)_abs64(value))
#elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
    #define __Pyx_sst_abs(value) llabs(value)
#elif defined (__GNUC__)
    #define __Pyx_sst_abs(value) __builtin_llabs(value)
#else
    #define __Pyx_sst_abs(value) ((value<0) ? -value : value)
#endif
static CYTHON_INLINE Py_ssize_t __Pyx_ssize_strlen(const char *s);
static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject*);
static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length);
static CYTHON_INLINE PyObject* __Pyx_PyByteArray_FromString(const char*);
#define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l)
#define __Pyx_PyBytes_FromString        PyBytes_FromString
#define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize
static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char*);
#if PY_MAJOR_VERSION < 3
    #define __Pyx_PyStr_FromString        __Pyx_PyBytes_FromString
    #define __Pyx_PyStr_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
#else
    #define __Pyx_PyStr_FromString        __Pyx_PyUnicode_FromString
    #define __Pyx_PyStr_FromStringAndSize __Pyx_PyUnicode_FromStringAndSize
#endif
#define __Pyx_PyBytes_AsWritableString(s)     ((char*) PyBytes_AS_STRING(s))
#define __Pyx_PyBytes_AsWritableSString(s)    ((signed char*) PyBytes_AS_STRING(s))
#define __Pyx_PyBytes_AsWritableUString(s)    ((unsigned char*) PyBytes_AS_STRING(s))
#define __Pyx_PyBytes_AsString(s)     ((const char*) PyBytes_AS_STRING(s))
#define __Pyx_PyBytes_AsSString(s)    ((const signed char*) PyBytes_AS_STRING(s))
#define __Pyx_PyBytes_AsUString(s)    ((const unsigned char*) PyBytes_AS_STRING(s))
#define __Pyx_PyObject_AsWritableString(s)    ((char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s))
#define __Pyx_PyObject_AsWritableSString(s)    ((signed char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s))
#define __Pyx_PyObject_AsWritableUString(s)    ((unsigned char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s))
#define __Pyx_PyObject_AsSString(s)    ((const signed char*) __Pyx_PyObject_AsString(s))
#define __Pyx_PyObject_AsUString(s)    ((const unsigned char*) __Pyx_PyObject_AsString(s))
#define __Pyx_PyObject_FromCString(s)  __Pyx_PyObject_FromString((const char*)s)
#define __Pyx_PyBytes_FromCString(s)   __Pyx_PyBytes_FromString((const char*)s)
#define __Pyx_PyByteArray_FromCString(s)   __Pyx_PyByteArray_FromString((const char*)s)
#define __Pyx_PyStr_FromCString(s)     __Pyx_PyStr_FromString((const char*)s)
#define __Pyx_PyUnicode_FromCString(s) __Pyx_PyUnicode_FromString((const char*)s)
#define __Pyx_PyUnicode_FromOrdinal(o)       PyUnicode_FromOrdinal((int)o)
#define __Pyx_PyUnicode_AsUnicode            PyUnicode_AsUnicode
#define __Pyx_NewRef(obj) (Py_INCREF(obj), obj)
#define __Pyx_Owned_Py_None(b) __Pyx_NewRef(Py_None)
static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b);
static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*);
static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject*);
static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x);
#define __Pyx_PySequence_Tuple(obj)\
    (likely(PyTuple_CheckExact(obj)) ? __Pyx_NewRef(obj) : PySequence_Tuple(obj))
static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*);
static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t);
static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject*);
#if CYTHON_ASSUME_SAFE_MACROS
#define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x))
#else
#define __pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x)
#endif
#define __pyx_PyFloat_AsFloat(x) ((float) __pyx_PyFloat_AsDouble(x))
#if PY_MAJOR_VERSION >= 3
#define __Pyx_PyNumber_Int(x) (PyLong_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Long(x))
#else
#define __Pyx_PyNumber_Int(x) (PyInt_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Int(x))
#endif
#if CYTHON_USE_PYLONG_INTERNALS
  #if PY_VERSION_HEX >= 0x030C00A7
  #ifndef _PyLong_SIGN_MASK
    #define _PyLong_SIGN_MASK 3
  #endif
  #ifndef _PyLong_NON_SIZE_BITS
    #define _PyLong_NON_SIZE_BITS 3
  #endif
  #define __Pyx_PyLong_Sign(x)  (((PyLongObject*)x)->long_value.lv_tag & _PyLong_SIGN_MASK)
  #define __Pyx_PyLong_IsNeg(x)  ((__Pyx_PyLong_Sign(x) & 2) != 0)
  #define __Pyx_PyLong_IsNonNeg(x)  (!__Pyx_PyLong_IsNeg(x))
  #define __Pyx_PyLong_IsZero(x)  (__Pyx_PyLong_Sign(x) & 1)
  #define __Pyx_PyLong_IsPos(x)  (__Pyx_PyLong_Sign(x) == 0)
  #define __Pyx_PyLong_CompactValueUnsigned(x)  (__Pyx_PyLong_Digits(x)[0])
  #define __Pyx_PyLong_DigitCount(x)  ((Py_ssize_t) (((PyLongObject*)x)->long_value.lv_tag >> _PyLong_NON_SIZE_BITS))
  #define __Pyx_PyLong_SignedDigitCount(x)\
        ((1 - (Py_ssize_t) __Pyx_PyLong_Sign(x)) * __Pyx_PyLong_DigitCount(x))
  #if defined(PyUnstable_Long_IsCompact) && defined(PyUnstable_Long_CompactValue)
    #define __Pyx_PyLong_IsCompact(x)     PyUnstable_Long_IsCompact((PyLongObject*) x)
    #define __Pyx_PyLong_CompactValue(x)  PyUnstable_Long_CompactValue((PyLongObject*) x)
  #else
    #define __Pyx_PyLong_IsCompact(x)     (((PyLongObject*)x)->long_value.lv_tag < (2 << _PyLong_NON_SIZE_BITS))
    #define __Pyx_PyLong_CompactValue(x)  ((1 - (Py_ssize_t) __Pyx_PyLong_Sign(x)) * (Py_ssize_t) __Pyx_PyLong_Digits(x)[0])
  #endif
  typedef Py_ssize_t  __Pyx_compact_pylong;
  typedef size_t  __Pyx_compact_upylong;
  #else
  #define __Pyx_PyLong_IsNeg(x)  (Py_SIZE(x) < 0)
  #define __Pyx_PyLong_IsNonNeg(x)  (Py_SIZE(x) >= 0)
  #define __Pyx_PyLong_IsZero(x)  (Py_SIZE(x) == 0)
  #define __Pyx_PyLong_IsPos(x)  (Py_SIZE(x) > 0)
  #define __Pyx_PyLong_CompactValueUnsigned(x)  ((Py_SIZE(x) == 0) ? 0 : __Pyx_PyLong_Digits(x)[0])
  #define __Pyx_PyLong_DigitCount(x)  __Pyx_sst_abs(Py_SIZE(x))
  #define __Pyx_PyLong_SignedDigitCount(x)  Py_SIZE(x)
  #define __Pyx_PyLong_IsCompact(x)  (Py_SIZE(x) == 0 || Py_SIZE(x) == 1 || Py_SIZE(x) == -1)
  #define __Pyx_PyLong_CompactValue(x)\
        ((Py_SIZE(x) == 0) ? (sdigit) 0 : ((Py_SIZE(x) < 0) ? -(sdigit)__Pyx_PyLong_Digits(x)[0] : (sdigit)__Pyx_PyLong_Digits(x)[0]))
  typedef sdigit  __Pyx_compact_pylong;
  typedef digit  __Pyx_compact_upylong;
  #endif
  #if PY_VERSION_HEX >= 0x030C00A5
  #define __Pyx_PyLong_Digits(x)  (((PyLongObject*)x)->long_value.ob_digit)
  #else
  #define __Pyx_PyLong_Digits(x)  (((PyLongObject*)x)->ob_digit)
  #endif
#endif
#if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
#include <string.h>
static int __Pyx_sys_getdefaultencoding_not_ascii;
static int __Pyx_init_sys_getdefaultencoding_params(void) {
    PyObject* sys;
    PyObject* default_encoding = NULL;
    PyObject* ascii_chars_u = NULL;
    PyObject* ascii_chars_b = NULL;
    const char* default_encoding_c;
    sys = PyImport_ImportModule("sys");
    if (!sys) goto bad;
    default_encoding = PyObject_CallMethod(sys, (char*) "getdefaultencoding", NULL);
    Py_DECREF(sys);
    if (!default_encoding) goto bad;
    default_encoding_c = PyBytes_AsString(default_encoding);
    if (!default_encoding_c) goto bad;
    if (strcmp(default_encoding_c, "ascii") == 0) {
        __Pyx_sys_getdefaultencoding_not_ascii = 0;
    } else {
        char ascii_chars[128];
        int c;
        for (c = 0; c < 128; c++) {
            ascii_chars[c] = (char) c;
        }
        __Pyx_sys_getdefaultencoding_not_ascii = 1;
        ascii_chars_u = PyUnicode_DecodeASCII(ascii_chars, 128, NULL);
        if (!ascii_chars_u) goto bad;
        ascii_chars_b = PyUnicode_AsEncodedString(ascii_chars_u, default_encoding_c, NULL);
        if (!ascii_chars_b || !PyBytes_Check(ascii_chars_b) || memcmp(ascii_chars, PyBytes_AS_STRING(ascii_chars_b), 128) != 0) {
            PyErr_Format(
                PyExc_ValueError,
                "This module compiled with c_string_encoding=ascii, but default encoding '%.200s' is not a superset of ascii.",
                default_encoding_c);
            goto bad;
        }
        Py_DECREF(ascii_chars_u);
        Py_DECREF(ascii_chars_b);
    }
    Py_DECREF(default_encoding);
    return 0;
bad:
    Py_XDECREF(default_encoding);
    Py_XDECREF(ascii_chars_u);
    Py_XDECREF(ascii_chars_b);
    return -1;
}
#endif
#if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT && PY_MAJOR_VERSION >= 3
#define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL)
#else
#define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL)
#if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
#include <string.h>
static char* __PYX_DEFAULT_STRING_ENCODING;
static int __Pyx_init_sys_getdefaultencoding_params(void) {
    PyObject* sys;
    PyObject* default_encoding = NULL;
    char* default_encoding_c;
    sys = PyImport_ImportModule("sys");
    if (!sys) goto bad;
    default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL);
    Py_DECREF(sys);
    if (!default_encoding) goto bad;
    default_encoding_c = PyBytes_AsString(default_encoding);
    if (!default_encoding_c) goto bad;
    __PYX_DEFAULT_STRING_ENCODING = (char*) malloc(strlen(default_encoding_c) + 1);
    if (!__PYX_DEFAULT_STRING_ENCODING) goto bad;
    strcpy(__PYX_DEFAULT_STRING_ENCODING, default_encoding_c);
    Py_DECREF(default_encoding);
    return 0;
bad:
    Py_XDECREF(default_encoding);
    return -1;
}
#endif
#endif


/* Test for GCC > 2.95 */
#if defined(__GNUC__)     && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95)))
  #define likely(x)   __builtin_expect(!!(x), 1)
  #define unlikely(x) __builtin_expect(!!(x), 0)
#else /* !__GNUC__ or GCC < 2.95 */
  #define likely(x)   (x)
  #define unlikely(x) (x)
#endif /* __GNUC__ */
static CYTHON_INLINE void __Pyx_pretend_to_initialize(void* ptr) { (void)ptr; }

#if !CYTHON_USE_MODULE_STATE
static PyObject *__pyx_m = NULL;
#endif
static int __pyx_lineno;
static int __pyx_clineno = 0;
static const char * __pyx_cfilenm = __FILE__;
static const char *__pyx_filename;

/* #### Code section: filename_table ### */

static const char *__pyx_f[] = {
  "DifferentialRing.pyx",
  "<stringsource>",
  "RegularDifferentialChain.pyx",
  "contextvars.pxd",
  "DifferentialAlgebra.pyx",
  "BaseFieldExtension.pyx",
  "DenefLipshitzUple.pyx",
  "type.pxd",
  "bool.pxd",
  "complex.pxd",
};
/* #### Code section: utility_code_proto_before_types ### */
/* ForceInitThreads.proto */
#ifndef __PYX_FORCE_INIT_THREADS
  #define __PYX_FORCE_INIT_THREADS 0
#endif

/* #### Code section: numeric_typedefs ### */
/* #### Code section: complex_type_declarations ### */
/* #### Code section: type_declarations ### */

/*--- Type declarations ---*/
struct __pyx_obj_19DifferentialAlgebra_DifferentialRing;
struct __pyx_obj_19DifferentialAlgebra_RegularDifferentialChain;
struct __pyx_obj_19DifferentialAlgebra_BaseFieldExtension;
struct __pyx_obj_19DifferentialAlgebra_DenefLipshitzUple;
struct __pyx_opt_args_7cpython_11contextvars_get_value;
struct __pyx_opt_args_7cpython_11contextvars_get_value_no_default;

/* "cpython/contextvars.pxd":112
 * 
 * 
 * cdef inline object get_value(var, default_value=None):             # <<<<<<<<<<<<<<
 *     """Return a new reference to the value of the context variable,
 *     or the default value of the context variable,
 */
struct __pyx_opt_args_7cpython_11contextvars_get_value {
  int __pyx_n;
  PyObject *default_value;
};

/* "cpython/contextvars.pxd":129
 * 
 * 
 * cdef inline object get_value_no_default(var, default_value=None):             # <<<<<<<<<<<<<<
 *     """Return a new reference to the value of the context variable,
 *     or the provided default value if no such value was found.
 */
struct __pyx_opt_args_7cpython_11contextvars_get_value_no_default {
  int __pyx_n;
  PyObject *default_value;
};

/* "../../bmi/sympy/DifferentialRing.pyx":2
 * # DifferentialRing
 * cdef class DifferentialRing:             # <<<<<<<<<<<<<<
 *     r"""
 *     The class DifferentialRing implements differential polynomial rings
 */
struct __pyx_obj_19DifferentialAlgebra_DifferentialRing {
  PyObject_HEAD
  ALGEB dring;
  PyObject *notation;
  PyObject *evdict;
};


/* "../../bmi/sympy/RegularDifferentialChain.pyx":2
 * # RegularDifferentialChain
 * cdef class RegularDifferentialChain:             # <<<<<<<<<<<<<<
 *     r"""
 *     The class implements regular differential chains.
 */
struct __pyx_obj_19DifferentialAlgebra_RegularDifferentialChain {
  PyObject_HEAD
  struct __pyx_obj_19DifferentialAlgebra_DifferentialRing *dring;
  PyObject *notation;
  PyObject *evdict;
  ALGEB regchain;
};


/* "../../bmi/sympy/BaseFieldExtension.pyx":2
 * # BaseFieldExtension
 * cdef class BaseFieldExtension:             # <<<<<<<<<<<<<<
 *     r"""
 *     The class implements base field extensions for differential rings
 */
struct __pyx_obj_19DifferentialAlgebra_BaseFieldExtension {
  PyObject_HEAD
  PyBoolObject *rels_are_provided;
  PyObject *gens;
  PyObject *notation;
  PyObject *evdict;
  struct __pyx_obj_19DifferentialAlgebra_RegularDifferentialChain *rels;
};


/* "../../bmi/sympy/DenefLipshitzUple.pyx":2
 * # DenefLipshitzUple
 * cdef class DenefLipshitzUple:             # <<<<<<<<<<<<<<
 *     r"""
 *     The class is a data structure for the DenefLipshitz algorithm
 */
struct __pyx_obj_19DifferentialAlgebra_DenefLipshitzUple {
  PyObject_HEAD
  PyObject *Y;
  PyObject *Ybar;
  PyObject *x;
  PyObject *order;
  PyObject *kappa;
  struct __pyx_obj_19DifferentialAlgebra_RegularDifferentialChain *C;
  PyObject *S;
  PyObject *k;
  PyObject *r;
  PyObject *q;
  PyObject *A;
  PyObject *gamma;
  PyObject *mu;
  PyObject *sigma;
  PyObject *beta;
  PyObject *delta;
  PyObject *notation;
  ALGEB DLuple;
  struct __pyx_obj_19DifferentialAlgebra_DifferentialRing *dring;
  PyObject *evdict;
};

/* #### Code section: utility_code_proto ### */

/* --- Runtime support code (head) --- */
/* Refnanny.proto */
#ifndef CYTHON_REFNANNY
  #define CYTHON_REFNANNY 0
#endif
#if CYTHON_REFNANNY
  typedef struct {
    void (*INCREF)(void*, PyObject*, Py_ssize_t);
    void (*DECREF)(void*, PyObject*, Py_ssize_t);
    void (*GOTREF)(void*, PyObject*, Py_ssize_t);
    void (*GIVEREF)(void*, PyObject*, Py_ssize_t);
    void* (*SetupContext)(const char*, Py_ssize_t, const char*);
    void (*FinishContext)(void**);
  } __Pyx_RefNannyAPIStruct;
  static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL;
  static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname);
  #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL;
#ifdef WITH_THREAD
  #define __Pyx_RefNannySetupContext(name, acquire_gil)\
          if (acquire_gil) {\
              PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\
              __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), (__LINE__), (__FILE__));\
              PyGILState_Release(__pyx_gilstate_save);\
          } else {\
              __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), (__LINE__), (__FILE__));\
          }
  #define __Pyx_RefNannyFinishContextNogil() {\
              PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\
              __Pyx_RefNannyFinishContext();\
              PyGILState_Release(__pyx_gilstate_save);\
          }
#else
  #define __Pyx_RefNannySetupContext(name, acquire_gil)\
          __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), (__LINE__), (__FILE__))
  #define __Pyx_RefNannyFinishContextNogil() __Pyx_RefNannyFinishContext()
#endif
  #define __Pyx_RefNannyFinishContextNogil() {\
              PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\
              __Pyx_RefNannyFinishContext();\
              PyGILState_Release(__pyx_gilstate_save);\
          }
  #define __Pyx_RefNannyFinishContext()\
          __Pyx_RefNanny->FinishContext(&__pyx_refnanny)
  #define __Pyx_INCREF(r)  __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), (__LINE__))
  #define __Pyx_DECREF(r)  __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), (__LINE__))
  #define __Pyx_GOTREF(r)  __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), (__LINE__))
  #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), (__LINE__))
  #define __Pyx_XINCREF(r)  do { if((r) == NULL); else {__Pyx_INCREF(r); }} while(0)
  #define __Pyx_XDECREF(r)  do { if((r) == NULL); else {__Pyx_DECREF(r); }} while(0)
  #define __Pyx_XGOTREF(r)  do { if((r) == NULL); else {__Pyx_GOTREF(r); }} while(0)
  #define __Pyx_XGIVEREF(r) do { if((r) == NULL); else {__Pyx_GIVEREF(r);}} while(0)
#else
  #define __Pyx_RefNannyDeclarations
  #define __Pyx_RefNannySetupContext(name, acquire_gil)
  #define __Pyx_RefNannyFinishContextNogil()
  #define __Pyx_RefNannyFinishContext()
  #define __Pyx_INCREF(r) Py_INCREF(r)
  #define __Pyx_DECREF(r) Py_DECREF(r)
  #define __Pyx_GOTREF(r)
  #define __Pyx_GIVEREF(r)
  #define __Pyx_XINCREF(r) Py_XINCREF(r)
  #define __Pyx_XDECREF(r) Py_XDECREF(r)
  #define __Pyx_XGOTREF(r)
  #define __Pyx_XGIVEREF(r)
#endif
#define __Pyx_Py_XDECREF_SET(r, v) do {\
        PyObject *tmp = (PyObject *) r;\
        r = v; Py_XDECREF(tmp);\
    } while (0)
#define __Pyx_XDECREF_SET(r, v) do {\
        PyObject *tmp = (PyObject *) r;\
        r = v; __Pyx_XDECREF(tmp);\
    } while (0)
#define __Pyx_DECREF_SET(r, v) do {\
        PyObject *tmp = (PyObject *) r;\
        r = v; __Pyx_DECREF(tmp);\
    } while (0)
#define __Pyx_CLEAR(r)    do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0)
#define __Pyx_XCLEAR(r)   do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0)

/* PyErrExceptionMatches.proto */
#if CYTHON_FAST_THREAD_STATE
#define __Pyx_PyErr_ExceptionMatches(err) __Pyx_PyErr_ExceptionMatchesInState(__pyx_tstate, err)
static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err);
#else
#define __Pyx_PyErr_ExceptionMatches(err)  PyErr_ExceptionMatches(err)
#endif

/* PyThreadStateGet.proto */
#if CYTHON_FAST_THREAD_STATE
#define __Pyx_PyThreadState_declare  PyThreadState *__pyx_tstate;
#define __Pyx_PyThreadState_assign  __pyx_tstate = __Pyx_PyThreadState_Current;
#if PY_VERSION_HEX >= 0x030C00A6
#define __Pyx_PyErr_Occurred()  (__pyx_tstate->current_exception != NULL)
#define __Pyx_PyErr_CurrentExceptionType()  (__pyx_tstate->current_exception ? (PyObject*) Py_TYPE(__pyx_tstate->current_exception) : (PyObject*) NULL)
#else
#define __Pyx_PyErr_Occurred()  (__pyx_tstate->curexc_type != NULL)
#define __Pyx_PyErr_CurrentExceptionType()  (__pyx_tstate->curexc_type)
#endif
#else
#define __Pyx_PyThreadState_declare
#define __Pyx_PyThreadState_assign
#define __Pyx_PyErr_Occurred()  (PyErr_Occurred() != NULL)
#define __Pyx_PyErr_CurrentExceptionType()  PyErr_Occurred()
#endif

/* PyErrFetchRestore.proto */
#if CYTHON_FAST_THREAD_STATE
#define __Pyx_PyErr_Clear() __Pyx_ErrRestore(NULL, NULL, NULL)
#define __Pyx_ErrRestoreWithState(type, value, tb)  __Pyx_ErrRestoreInState(PyThreadState_GET(), type, value, tb)
#define __Pyx_ErrFetchWithState(type, value, tb)    __Pyx_ErrFetchInState(PyThreadState_GET(), type, value, tb)
#define __Pyx_ErrRestore(type, value, tb)  __Pyx_ErrRestoreInState(__pyx_tstate, type, value, tb)
#define __Pyx_ErrFetch(type, value, tb)    __Pyx_ErrFetchInState(__pyx_tstate, type, value, tb)
static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A6
#define __Pyx_PyErr_SetNone(exc) (Py_INCREF(exc), __Pyx_ErrRestore((exc), NULL, NULL))
#else
#define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc)
#endif
#else
#define __Pyx_PyErr_Clear() PyErr_Clear()
#define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc)
#define __Pyx_ErrRestoreWithState(type, value, tb)  PyErr_Restore(type, value, tb)
#define __Pyx_ErrFetchWithState(type, value, tb)  PyErr_Fetch(type, value, tb)
#define __Pyx_ErrRestoreInState(tstate, type, value, tb)  PyErr_Restore(type, value, tb)
#define __Pyx_ErrFetchInState(tstate, type, value, tb)  PyErr_Fetch(type, value, tb)
#define __Pyx_ErrRestore(type, value, tb)  PyErr_Restore(type, value, tb)
#define __Pyx_ErrFetch(type, value, tb)  PyErr_Fetch(type, value, tb)
#endif

/* PyObjectGetAttrStr.proto */
#if CYTHON_USE_TYPE_SLOTS
static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name);
#else
#define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n)
#endif

/* PyObjectGetAttrStrNoError.proto */
static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name);

/* GetBuiltinName.proto */
static PyObject *__Pyx_GetBuiltinName(PyObject *name);

/* TupleAndListFromArray.proto */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyList_FromArray(PyObject *const *src, Py_ssize_t n);
static CYTHON_INLINE PyObject* __Pyx_PyTuple_FromArray(PyObject *const *src, Py_ssize_t n);
#endif

/* IncludeStringH.proto */
#include <string.h>

/* BytesEquals.proto */
static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals);

/* UnicodeEquals.proto */
static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals);

/* fastcall.proto */
#if CYTHON_AVOID_BORROWED_REFS
    #define __Pyx_Arg_VARARGS(args, i) PySequence_GetItem(args, i)
#elif CYTHON_ASSUME_SAFE_MACROS
    #define __Pyx_Arg_VARARGS(args, i) PyTuple_GET_ITEM(args, i)
#else
    #define __Pyx_Arg_VARARGS(args, i) PyTuple_GetItem(args, i)
#endif
#if CYTHON_AVOID_BORROWED_REFS
    #define __Pyx_Arg_NewRef_VARARGS(arg) __Pyx_NewRef(arg)
    #define __Pyx_Arg_XDECREF_VARARGS(arg) Py_XDECREF(arg)
#else
    #define __Pyx_Arg_NewRef_VARARGS(arg) arg
    #define __Pyx_Arg_XDECREF_VARARGS(arg)
#endif
#define __Pyx_NumKwargs_VARARGS(kwds) PyDict_Size(kwds)
#define __Pyx_KwValues_VARARGS(args, nargs) NULL
#define __Pyx_GetKwValue_VARARGS(kw, kwvalues, s) __Pyx_PyDict_GetItemStrWithError(kw, s)
#define __Pyx_KwargsAsDict_VARARGS(kw, kwvalues) PyDict_Copy(kw)
#if CYTHON_METH_FASTCALL
    #define __Pyx_Arg_FASTCALL(args, i) args[i]
    #define __Pyx_NumKwargs_FASTCALL(kwds) PyTuple_GET_SIZE(kwds)
    #define __Pyx_KwValues_FASTCALL(args, nargs) ((args) + (nargs))
    static CYTHON_INLINE PyObject * __Pyx_GetKwValue_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues, PyObject *s);
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000
    CYTHON_UNUSED static PyObject *__Pyx_KwargsAsDict_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues);
  #else
    #define __Pyx_KwargsAsDict_FASTCALL(kw, kwvalues) _PyStack_AsDict(kwvalues, kw)
  #endif
    #define __Pyx_Arg_NewRef_FASTCALL(arg) arg  /* no-op, __Pyx_Arg_FASTCALL is direct and this needs
                                                   to have the same reference counting */
    #define __Pyx_Arg_XDECREF_FASTCALL(arg)
#else
    #define __Pyx_Arg_FASTCALL __Pyx_Arg_VARARGS
    #define __Pyx_NumKwargs_FASTCALL __Pyx_NumKwargs_VARARGS
    #define __Pyx_KwValues_FASTCALL __Pyx_KwValues_VARARGS
    #define __Pyx_GetKwValue_FASTCALL __Pyx_GetKwValue_VARARGS
    #define __Pyx_KwargsAsDict_FASTCALL __Pyx_KwargsAsDict_VARARGS
    #define __Pyx_Arg_NewRef_FASTCALL(arg) __Pyx_Arg_NewRef_VARARGS(arg)
    #define __Pyx_Arg_XDECREF_FASTCALL(arg) __Pyx_Arg_XDECREF_VARARGS(arg)
#endif
#if CYTHON_COMPILING_IN_CPYTHON && CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
#define __Pyx_ArgsSlice_VARARGS(args, start, stop) __Pyx_PyTuple_FromArray(&__Pyx_Arg_VARARGS(args, start), stop - start)
#define __Pyx_ArgsSlice_FASTCALL(args, start, stop) __Pyx_PyTuple_FromArray(&__Pyx_Arg_FASTCALL(args, start), stop - start)
#else
#define __Pyx_ArgsSlice_VARARGS(args, start, stop) PyTuple_GetSlice(args, start, stop)
#define __Pyx_ArgsSlice_FASTCALL(args, start, stop) PyTuple_GetSlice(args, start, stop)
#endif

/* RaiseDoubleKeywords.proto */
static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name);

/* ParseKeywords.proto */
static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject *const *kwvalues,
    PyObject **argnames[],
    PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args,
    const char* function_name);

/* RaiseArgTupleInvalid.proto */
static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact,
    Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found);

/* PyObject_Unicode.proto */
#if PY_MAJOR_VERSION >= 3
#define __Pyx_PyObject_Unicode(obj)\
    (likely(PyUnicode_CheckExact(obj)) ? __Pyx_NewRef(obj) : PyObject_Str(obj))
#else
#define __Pyx_PyObject_Unicode(obj)\
    (likely(PyUnicode_CheckExact(obj)) ? __Pyx_NewRef(obj) : PyObject_Unicode(obj))
#endif

/* PyDictVersioning.proto */
#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS
#define __PYX_DICT_VERSION_INIT  ((PY_UINT64_T) -1)
#define __PYX_GET_DICT_VERSION(dict)  (((PyDictObject*)(dict))->ma_version_tag)
#define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)\
    (version_var) = __PYX_GET_DICT_VERSION(dict);\
    (cache_var) = (value);
#define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) {\
    static PY_UINT64_T __pyx_dict_version = 0;\
    static PyObject *__pyx_dict_cached_value = NULL;\
    if (likely(__PYX_GET_DICT_VERSION(DICT) == __pyx_dict_version)) {\
        (VAR) = __pyx_dict_cached_value;\
    } else {\
        (VAR) = __pyx_dict_cached_value = (LOOKUP);\
        __pyx_dict_version = __PYX_GET_DICT_VERSION(DICT);\
    }\
}
static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj);
static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj);
static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version);
#else
#define __PYX_GET_DICT_VERSION(dict)  (0)
#define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)
#define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP)  (VAR) = (LOOKUP);
#endif

/* GetModuleGlobalName.proto */
#if CYTHON_USE_DICT_VERSIONS
#define __Pyx_GetModuleGlobalName(var, name)  do {\
    static PY_UINT64_T __pyx_dict_version = 0;\
    static PyObject *__pyx_dict_cached_value = NULL;\
    (var) = (likely(__pyx_dict_version == __PYX_GET_DICT_VERSION(__pyx_d))) ?\
        (likely(__pyx_dict_cached_value) ? __Pyx_NewRef(__pyx_dict_cached_value) : __Pyx_GetBuiltinName(name)) :\
        __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\
} while(0)
#define __Pyx_GetModuleGlobalNameUncached(var, name)  do {\
    PY_UINT64_T __pyx_dict_version;\
    PyObject *__pyx_dict_cached_value;\
    (var) = __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\
} while(0)
static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value);
#else
#define __Pyx_GetModuleGlobalName(var, name)  (var) = __Pyx__GetModuleGlobalName(name)
#define __Pyx_GetModuleGlobalNameUncached(var, name)  (var) = __Pyx__GetModuleGlobalName(name)
static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name);
#endif

/* PyFunctionFastCall.proto */
#if CYTHON_FAST_PYCALL
#if !CYTHON_VECTORCALL
#define __Pyx_PyFunction_FastCall(func, args, nargs)\
    __Pyx_PyFunction_FastCallDict((func), (args), (nargs), NULL)
static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *kwargs);
#endif
#define __Pyx_BUILD_ASSERT_EXPR(cond)\
    (sizeof(char [1 - 2*!(cond)]) - 1)
#ifndef Py_MEMBER_SIZE
#define Py_MEMBER_SIZE(type, member) sizeof(((type *)0)->member)
#endif
#if !CYTHON_VECTORCALL
#if PY_VERSION_HEX >= 0x03080000
  #include "frameobject.h"
#if PY_VERSION_HEX >= 0x030b00a6 && !CYTHON_COMPILING_IN_LIMITED_API
  #ifndef Py_BUILD_CORE
    #define Py_BUILD_CORE 1
  #endif
  #include "internal/pycore_frame.h"
#endif
  #define __Pxy_PyFrame_Initialize_Offsets()
  #define __Pyx_PyFrame_GetLocalsplus(frame)  ((frame)->f_localsplus)
#else
  static size_t __pyx_pyframe_localsplus_offset = 0;
  #include "frameobject.h"
  #define __Pxy_PyFrame_Initialize_Offsets()\
    ((void)__Pyx_BUILD_ASSERT_EXPR(sizeof(PyFrameObject) == offsetof(PyFrameObject, f_localsplus) + Py_MEMBER_SIZE(PyFrameObject, f_localsplus)),\
     (void)(__pyx_pyframe_localsplus_offset = ((size_t)PyFrame_Type.tp_basicsize) - Py_MEMBER_SIZE(PyFrameObject, f_localsplus)))
  #define __Pyx_PyFrame_GetLocalsplus(frame)\
    (assert(__pyx_pyframe_localsplus_offset), (PyObject **)(((char *)(frame)) + __pyx_pyframe_localsplus_offset))
#endif
#endif
#endif

/* PyObjectCall.proto */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw);
#else
#define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw)
#endif

/* PyObjectCallMethO.proto */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg);
#endif

/* PyObjectFastCall.proto */
#define __Pyx_PyObject_FastCall(func, args, nargs)  __Pyx_PyObject_FastCallDict(func, args, (size_t)(nargs), NULL)
static CYTHON_INLINE PyObject* __Pyx_PyObject_FastCallDict(PyObject *func, PyObject **args, size_t nargs, PyObject *kwargs);

/* GetItemInt.proto */
#define __Pyx_GetItemInt(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
    (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
    __Pyx_GetItemInt_Fast(o, (Py_ssize_t)i, is_list, wraparound, boundscheck) :\
    (is_list ? (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL) :\
               __Pyx_GetItemInt_Generic(o, to_py_func(i))))
#define __Pyx_GetItemInt_List(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
    (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
    __Pyx_GetItemInt_List_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\
    (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL))
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i,
                                                              int wraparound, int boundscheck);
#define __Pyx_GetItemInt_Tuple(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
    (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
    __Pyx_GetItemInt_Tuple_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\
    (PyErr_SetString(PyExc_IndexError, "tuple index out of range"), (PyObject*)NULL))
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,
                                                              int wraparound, int boundscheck);
static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j);
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i,
                                                     int is_list, int wraparound, int boundscheck);

/* ListCompAppend.proto */
#if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS
static CYTHON_INLINE int __Pyx_ListComp_Append(PyObject* list, PyObject* x) {
    PyListObject* L = (PyListObject*) list;
    Py_ssize_t len = Py_SIZE(list);
    if (likely(L->allocated > len)) {
        Py_INCREF(x);
        #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000
        L->ob_item[len] = x;
        #else
        PyList_SET_ITEM(list, len, x);
        #endif
        __Pyx_SET_SIZE(list, len + 1);
        return 0;
    }
    return PyList_Append(list, x);
}
#else
#define __Pyx_ListComp_Append(L,x) PyList_Append(L,x)
#endif

/* PySequenceContains.proto */
static CYTHON_INLINE int __Pyx_PySequence_ContainsTF(PyObject* item, PyObject* seq, int eq) {
    int result = PySequence_Contains(seq, item);
    return unlikely(result < 0) ? result : (result == (eq == Py_EQ));
}

/* GetAttr.proto */
static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *, PyObject *);

/* HasAttr.proto */
static CYTHON_INLINE int __Pyx_HasAttr(PyObject *, PyObject *);

/* ArgTypeTest.proto */
#define __Pyx_ArgTypeTest(obj, type, none_allowed, name, exact)\
    ((likely(__Pyx_IS_TYPE(obj, type) | (none_allowed && (obj == Py_None)))) ? 1 :\
        __Pyx__ArgTypeTest(obj, type, name, exact))
static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact);

/* RaiseUnexpectedTypeError.proto */
static int __Pyx_RaiseUnexpectedTypeError(const char *expected, PyObject *obj);

/* UnpackUnboundCMethod.proto */
typedef struct {
    PyObject *type;
    PyObject **method_name;
    PyCFunction func;
    PyObject *method;
    int flag;
} __Pyx_CachedCFunction;

/* CallUnboundCMethod2.proto */
static PyObject* __Pyx__CallUnboundCMethod2(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg1, PyObject* arg2);
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030600B1
static CYTHON_INLINE PyObject *__Pyx_CallUnboundCMethod2(__Pyx_CachedCFunction *cfunc, PyObject *self, PyObject *arg1, PyObject *arg2);
#else
#define __Pyx_CallUnboundCMethod2(cfunc, self, arg1, arg2)  __Pyx__CallUnboundCMethod2(cfunc, self, arg1, arg2)
#endif

/* PyObjectCallOneArg.proto */
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg);

/* RaiseException.proto */
static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause);

/* KeywordStringCheck.proto */
static int __Pyx_CheckKeywordStrings(PyObject *kw, const char* function_name, int kw_allowed);

/* Globals.proto */
static PyObject* __Pyx_Globals(void);

/* UnicodeConcatInPlace.proto */
# if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
    #if CYTHON_REFNANNY
        #define __Pyx_PyUnicode_ConcatInPlace(left, right) __Pyx_PyUnicode_ConcatInPlaceImpl(&left, right, __pyx_refnanny)
    #else
        #define __Pyx_PyUnicode_ConcatInPlace(left, right) __Pyx_PyUnicode_ConcatInPlaceImpl(&left, right)
    #endif
    static CYTHON_INLINE PyObject *__Pyx_PyUnicode_ConcatInPlaceImpl(PyObject **p_left, PyObject *right
        #if CYTHON_REFNANNY
        , void* __pyx_refnanny
        #endif
    );
#else
#define __Pyx_PyUnicode_ConcatInPlace __Pyx_PyUnicode_Concat
#endif
#define __Pyx_PyUnicode_ConcatInPlaceSafe(left, right) ((unlikely((left) == Py_None) || unlikely((right) == Py_None)) ?\
    PyNumber_InPlaceAdd(left, right) : __Pyx_PyUnicode_ConcatInPlace(left, right))

/* ObjectGetItem.proto */
#if CYTHON_USE_TYPE_SLOTS
static CYTHON_INLINE PyObject *__Pyx_PyObject_GetItem(PyObject *obj, PyObject *key);
#else
#define __Pyx_PyObject_GetItem(obj, key)  PyObject_GetItem(obj, key)
#endif

/* RaiseTooManyValuesToUnpack.proto */
static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected);

/* RaiseNeedMoreValuesToUnpack.proto */
static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index);

/* IterFinish.proto */
static CYTHON_INLINE int __Pyx_IterFinish(void);

/* UnpackItemEndCheck.proto */
static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected);

/* PyIntCompare.proto */
static CYTHON_INLINE int __Pyx_PyInt_BoolEqObjC(PyObject *op1, PyObject *op2, long intval, long inplace);

/* GetTopmostException.proto */
#if CYTHON_USE_EXC_INFO_STACK && CYTHON_FAST_THREAD_STATE
static _PyErr_StackItem * __Pyx_PyErr_GetTopmostException(PyThreadState *tstate);
#endif

/* SaveResetException.proto */
#if CYTHON_FAST_THREAD_STATE
#define __Pyx_ExceptionSave(type, value, tb)  __Pyx__ExceptionSave(__pyx_tstate, type, value, tb)
static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
#define __Pyx_ExceptionReset(type, value, tb)  __Pyx__ExceptionReset(__pyx_tstate, type, value, tb)
static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
#else
#define __Pyx_ExceptionSave(type, value, tb)   PyErr_GetExcInfo(type, value, tb)
#define __Pyx_ExceptionReset(type, value, tb)  PyErr_SetExcInfo(type, value, tb)
#endif

/* GetException.proto */
#if CYTHON_FAST_THREAD_STATE
#define __Pyx_GetException(type, value, tb)  __Pyx__GetException(__pyx_tstate, type, value, tb)
static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
#else
static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb);
#endif

/* ListAppend.proto */
#if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS
static CYTHON_INLINE int __Pyx_PyList_Append(PyObject* list, PyObject* x) {
    PyListObject* L = (PyListObject*) list;
    Py_ssize_t len = Py_SIZE(list);
    if (likely(L->allocated > len) & likely(len > (L->allocated >> 1))) {
        Py_INCREF(x);
        #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000
        L->ob_item[len] = x;
        #else
        PyList_SET_ITEM(list, len, x);
        #endif
        __Pyx_SET_SIZE(list, len + 1);
        return 0;
    }
    return PyList_Append(list, x);
}
#else
#define __Pyx_PyList_Append(L,x) PyList_Append(L,x)
#endif

/* PyObjectCallNoArg.proto */
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func);

/* PyIntBinop.proto */
#if !CYTHON_COMPILING_IN_PYPY
static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check);
#else
#define __Pyx_PyInt_AddObjC(op1, op2, intval, inplace, zerodivision_check)\
    (inplace ? PyNumber_InPlaceAdd(op1, op2) : PyNumber_Add(op1, op2))
#endif

/* PyUnicode_Unicode.proto */
static CYTHON_INLINE PyObject* __Pyx_PyUnicode_Unicode(PyObject *obj);

/* JoinPyUnicode.proto */
static PyObject* __Pyx_PyUnicode_Join(PyObject* value_tuple, Py_ssize_t value_count, Py_ssize_t result_ulength,
                                      Py_UCS4 max_char);

/* GetAttr3.proto */
static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *, PyObject *, PyObject *);

/* ExtTypeTest.proto */
static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type);

/* Import.proto */
static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level);

/* ImportFrom.proto */
static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name);

/* IncludeStructmemberH.proto */
#include <structmember.h>

/* FixUpExtensionType.proto */
#if CYTHON_USE_TYPE_SPECS
static int __Pyx_fix_up_extension_type_from_spec(PyType_Spec *spec, PyTypeObject *type);
#endif

/* PyObjectGetMethod.proto */
static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method);

/* PyObjectCallMethod0.proto */
static PyObject* __Pyx_PyObject_CallMethod0(PyObject* obj, PyObject* method_name);

/* ValidateBasesTuple.proto */
#if CYTHON_COMPILING_IN_CPYTHON || CYTHON_COMPILING_IN_LIMITED_API || CYTHON_USE_TYPE_SPECS
static int __Pyx_validate_bases_tuple(const char *type_name, Py_ssize_t dictoffset, PyObject *bases);
#endif

/* PyType_Ready.proto */
CYTHON_UNUSED static int __Pyx_PyType_Ready(PyTypeObject *t);

/* PyObject_GenericGetAttrNoDict.proto */
#if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
static CYTHON_INLINE PyObject* __Pyx_PyObject_GenericGetAttrNoDict(PyObject* obj, PyObject* attr_name);
#else
#define __Pyx_PyObject_GenericGetAttrNoDict PyObject_GenericGetAttr
#endif

/* PyObject_GenericGetAttr.proto */
#if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_name);
#else
#define __Pyx_PyObject_GenericGetAttr PyObject_GenericGetAttr
#endif

/* SetupReduce.proto */
#if !CYTHON_COMPILING_IN_LIMITED_API
static int __Pyx_setup_reduce(PyObject* type_obj);
#endif

/* TypeImport.proto */
#ifndef __PYX_HAVE_RT_ImportType_proto_3_0_11
#define __PYX_HAVE_RT_ImportType_proto_3_0_11
#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 201112L
#include <stdalign.h>
#endif
#if (defined (__STDC_VERSION__) && __STDC_VERSION__ >= 201112L) || __cplusplus >= 201103L
#define __PYX_GET_STRUCT_ALIGNMENT_3_0_11(s) alignof(s)
#else
#define __PYX_GET_STRUCT_ALIGNMENT_3_0_11(s) sizeof(void*)
#endif
enum __Pyx_ImportType_CheckSize_3_0_11 {
   __Pyx_ImportType_CheckSize_Error_3_0_11 = 0,
   __Pyx_ImportType_CheckSize_Warn_3_0_11 = 1,
   __Pyx_ImportType_CheckSize_Ignore_3_0_11 = 2
};
static PyTypeObject *__Pyx_ImportType_3_0_11(PyObject* module, const char *module_name, const char *class_name, size_t size, size_t alignment, enum __Pyx_ImportType_CheckSize_3_0_11 check_size);
#endif

/* ImportDottedModule.proto */
static PyObject *__Pyx_ImportDottedModule(PyObject *name, PyObject *parts_tuple);
#if PY_MAJOR_VERSION >= 3
static PyObject *__Pyx_ImportDottedModule_WalkParts(PyObject *module, PyObject *name, PyObject *parts_tuple);
#endif

/* FetchSharedCythonModule.proto */
static PyObject *__Pyx_FetchSharedCythonABIModule(void);

/* FetchCommonType.proto */
#if !CYTHON_USE_TYPE_SPECS
static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type);
#else
static PyTypeObject* __Pyx_FetchCommonTypeFromSpec(PyObject *module, PyType_Spec *spec, PyObject *bases);
#endif

/* PyMethodNew.proto */
#if CYTHON_COMPILING_IN_LIMITED_API
static PyObject *__Pyx_PyMethod_New(PyObject *func, PyObject *self, PyObject *typ) {
    PyObject *typesModule=NULL, *methodType=NULL, *result=NULL;
    CYTHON_UNUSED_VAR(typ);
    if (!self)
        return __Pyx_NewRef(func);
    typesModule = PyImport_ImportModule("types");
    if (!typesModule) return NULL;
    methodType = PyObject_GetAttrString(typesModule, "MethodType");
    Py_DECREF(typesModule);
    if (!methodType) return NULL;
    result = PyObject_CallFunctionObjArgs(methodType, func, self, NULL);
    Py_DECREF(methodType);
    return result;
}
#elif PY_MAJOR_VERSION >= 3
static PyObject *__Pyx_PyMethod_New(PyObject *func, PyObject *self, PyObject *typ) {
    CYTHON_UNUSED_VAR(typ);
    if (!self)
        return __Pyx_NewRef(func);
    return PyMethod_New(func, self);
}
#else
    #define __Pyx_PyMethod_New PyMethod_New
#endif

/* PyVectorcallFastCallDict.proto */
#if CYTHON_METH_FASTCALL
static CYTHON_INLINE PyObject *__Pyx_PyVectorcall_FastCallDict(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, size_t nargs, PyObject *kw);
#endif

/* CythonFunctionShared.proto */
#define __Pyx_CyFunction_USED
#define __Pyx_CYFUNCTION_STATICMETHOD  0x01
#define __Pyx_CYFUNCTION_CLASSMETHOD   0x02
#define __Pyx_CYFUNCTION_CCLASS        0x04
#define __Pyx_CYFUNCTION_COROUTINE     0x08
#define __Pyx_CyFunction_GetClosure(f)\
    (((__pyx_CyFunctionObject *) (f))->func_closure)
#if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API
  #define __Pyx_CyFunction_GetClassObj(f)\
      (((__pyx_CyFunctionObject *) (f))->func_classobj)
#else
  #define __Pyx_CyFunction_GetClassObj(f)\
      ((PyObject*) ((PyCMethodObject *) (f))->mm_class)
#endif
#define __Pyx_CyFunction_SetClassObj(f, classobj)\
    __Pyx__CyFunction_SetClassObj((__pyx_CyFunctionObject *) (f), (classobj))
#define __Pyx_CyFunction_Defaults(type, f)\
    ((type *)(((__pyx_CyFunctionObject *) (f))->defaults))
#define __Pyx_CyFunction_SetDefaultsGetter(f, g)\
    ((__pyx_CyFunctionObject *) (f))->defaults_getter = (g)
typedef struct {
#if CYTHON_COMPILING_IN_LIMITED_API
    PyObject_HEAD
    PyObject *func;
#elif PY_VERSION_HEX < 0x030900B1
    PyCFunctionObject func;
#else
    PyCMethodObject func;
#endif
#if CYTHON_BACKPORT_VECTORCALL
    __pyx_vectorcallfunc func_vectorcall;
#endif
#if PY_VERSION_HEX < 0x030500A0 || CYTHON_COMPILING_IN_LIMITED_API
    PyObject *func_weakreflist;
#endif
    PyObject *func_dict;
    PyObject *func_name;
    PyObject *func_qualname;
    PyObject *func_doc;
    PyObject *func_globals;
    PyObject *func_code;
    PyObject *func_closure;
#if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API
    PyObject *func_classobj;
#endif
    void *defaults;
    int defaults_pyobjects;
    size_t defaults_size;
    int flags;
    PyObject *defaults_tuple;
    PyObject *defaults_kwdict;
    PyObject *(*defaults_getter)(PyObject *);
    PyObject *func_annotations;
    PyObject *func_is_coroutine;
} __pyx_CyFunctionObject;
#undef __Pyx_CyOrPyCFunction_Check
#define __Pyx_CyFunction_Check(obj)  __Pyx_TypeCheck(obj, __pyx_CyFunctionType)
#define __Pyx_CyOrPyCFunction_Check(obj)  __Pyx_TypeCheck2(obj, __pyx_CyFunctionType, &PyCFunction_Type)
#define __Pyx_CyFunction_CheckExact(obj)  __Pyx_IS_TYPE(obj, __pyx_CyFunctionType)
static CYTHON_INLINE int __Pyx__IsSameCyOrCFunction(PyObject *func, void *cfunc);
#undef __Pyx_IsSameCFunction
#define __Pyx_IsSameCFunction(func, cfunc)   __Pyx__IsSameCyOrCFunction(func, cfunc)
static PyObject *__Pyx_CyFunction_Init(__pyx_CyFunctionObject* op, PyMethodDef *ml,
                                      int flags, PyObject* qualname,
                                      PyObject *closure,
                                      PyObject *module, PyObject *globals,
                                      PyObject* code);
static CYTHON_INLINE void __Pyx__CyFunction_SetClassObj(__pyx_CyFunctionObject* f, PyObject* classobj);
static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *m,
                                                         size_t size,
                                                         int pyobjects);
static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *m,
                                                            PyObject *tuple);
static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *m,
                                                             PyObject *dict);
static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *m,
                                                              PyObject *dict);
static int __pyx_CyFunction_init(PyObject *module);
#if CYTHON_METH_FASTCALL
static PyObject * __Pyx_CyFunction_Vectorcall_NOARGS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames);
static PyObject * __Pyx_CyFunction_Vectorcall_O(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames);
static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames);
static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames);
#if CYTHON_BACKPORT_VECTORCALL
#define __Pyx_CyFunction_func_vectorcall(f) (((__pyx_CyFunctionObject*)f)->func_vectorcall)
#else
#define __Pyx_CyFunction_func_vectorcall(f) (((PyCFunctionObject*)f)->vectorcall)
#endif
#endif

/* CythonFunction.proto */
static PyObject *__Pyx_CyFunction_New(PyMethodDef *ml,
                                      int flags, PyObject* qualname,
                                      PyObject *closure,
                                      PyObject *module, PyObject *globals,
                                      PyObject* code);

/* CLineInTraceback.proto */
#ifdef CYTHON_CLINE_IN_TRACEBACK
#define __Pyx_CLineForTraceback(tstate, c_line)  (((CYTHON_CLINE_IN_TRACEBACK)) ? c_line : 0)
#else
static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line);
#endif

/* CodeObjectCache.proto */
#if !CYTHON_COMPILING_IN_LIMITED_API
typedef struct {
    PyCodeObject* code_object;
    int code_line;
} __Pyx_CodeObjectCacheEntry;
struct __Pyx_CodeObjectCache {
    int count;
    int max_count;
    __Pyx_CodeObjectCacheEntry* entries;
};
static struct __Pyx_CodeObjectCache __pyx_code_cache = {0,0,NULL};
static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line);
static PyCodeObject *__pyx_find_code_object(int code_line);
static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object);
#endif

/* AddTraceback.proto */
static void __Pyx_AddTraceback(const char *funcname, int c_line,
                               int py_line, const char *filename);

/* GCCDiagnostics.proto */
#if !defined(__INTEL_COMPILER) && defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6))
#define __Pyx_HAS_GCC_DIAGNOSTIC
#endif

/* CIntFromPy.proto */
static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *);

/* CIntFromPy.proto */
static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value);

/* CIntFromPy.proto */
static CYTHON_INLINE bool __Pyx_PyInt_As_bool(PyObject *);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_ba0_int_p(ba0_int_p value);

/* CIntFromPy.proto */
static CYTHON_INLINE ba0_int_p __Pyx_PyInt_As_ba0_int_p(PyObject *);

/* FormatTypeName.proto */
#if CYTHON_COMPILING_IN_LIMITED_API
typedef PyObject *__Pyx_TypeName;
#define __Pyx_FMT_TYPENAME "%U"
static __Pyx_TypeName __Pyx_PyType_GetName(PyTypeObject* tp);
#define __Pyx_DECREF_TypeName(obj) Py_XDECREF(obj)
#else
typedef const char *__Pyx_TypeName;
#define __Pyx_FMT_TYPENAME "%.200s"
#define __Pyx_PyType_GetName(tp) ((tp)->tp_name)
#define __Pyx_DECREF_TypeName(obj)
#endif

/* FastTypeChecks.proto */
#if CYTHON_COMPILING_IN_CPYTHON
#define __Pyx_TypeCheck(obj, type) __Pyx_IsSubtype(Py_TYPE(obj), (PyTypeObject *)type)
#define __Pyx_TypeCheck2(obj, type1, type2) __Pyx_IsAnySubtype2(Py_TYPE(obj), (PyTypeObject *)type1, (PyTypeObject *)type2)
static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b);
static CYTHON_INLINE int __Pyx_IsAnySubtype2(PyTypeObject *cls, PyTypeObject *a, PyTypeObject *b);
static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject *type);
static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2);
#else
#define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type)
#define __Pyx_TypeCheck2(obj, type1, type2) (PyObject_TypeCheck(obj, (PyTypeObject *)type1) || PyObject_TypeCheck(obj, (PyTypeObject *)type2))
#define __Pyx_PyErr_GivenExceptionMatches(err, type) PyErr_GivenExceptionMatches(err, type)
#define __Pyx_PyErr_GivenExceptionMatches2(err, type1, type2) (PyErr_GivenExceptionMatches(err, type1) || PyErr_GivenExceptionMatches(err, type2))
#endif
#define __Pyx_PyErr_ExceptionMatches2(err1, err2)  __Pyx_PyErr_GivenExceptionMatches2(__Pyx_PyErr_CurrentExceptionType(), err1, err2)
#define __Pyx_PyException_Check(obj) __Pyx_TypeCheck(obj, PyExc_Exception)

/* CheckBinaryVersion.proto */
static unsigned long __Pyx_get_runtime_version(void);
static int __Pyx_check_binary_version(unsigned long ct_version, unsigned long rt_version, int allow_newer);

/* InitStrings.proto */
static int __Pyx_InitStrings(__Pyx_StringTabEntry *t);

/* #### Code section: module_declarations ### */
static CYTHON_INLINE double __pyx_f_7cpython_7complex_7complex_4real_real(PyComplexObject *__pyx_v_self); /* proto*/
static CYTHON_INLINE double __pyx_f_7cpython_7complex_7complex_4imag_imag(PyComplexObject *__pyx_v_self); /* proto*/

/* Module declarations from "cpython.version" */

/* Module declarations from "__builtin__" */

/* Module declarations from "cpython.type" */

/* Module declarations from "libc.string" */

/* Module declarations from "libc.stdio" */

/* Module declarations from "cpython.object" */

/* Module declarations from "cpython.ref" */

/* Module declarations from "cpython.exc" */

/* Module declarations from "cpython.module" */

/* Module declarations from "cpython.mem" */

/* Module declarations from "cpython.tuple" */

/* Module declarations from "cpython.list" */

/* Module declarations from "cpython.sequence" */

/* Module declarations from "cpython.mapping" */

/* Module declarations from "cpython.iterator" */

/* Module declarations from "cpython.number" */

/* Module declarations from "cpython.int" */

/* Module declarations from "__builtin__" */

/* Module declarations from "cpython.bool" */

/* Module declarations from "cpython.long" */

/* Module declarations from "cpython.float" */

/* Module declarations from "__builtin__" */

/* Module declarations from "cpython.complex" */

/* Module declarations from "cpython.string" */

/* Module declarations from "libc.stddef" */

/* Module declarations from "cpython.unicode" */

/* Module declarations from "cpython.pyport" */

/* Module declarations from "cpython.dict" */

/* Module declarations from "cpython.instance" */

/* Module declarations from "cpython.function" */

/* Module declarations from "cpython.method" */

/* Module declarations from "cpython.weakref" */

/* Module declarations from "cpython.getargs" */

/* Module declarations from "cpython.pythread" */

/* Module declarations from "cpython.pystate" */

/* Module declarations from "cpython.cobject" */

/* Module declarations from "cpython.oldbuffer" */

/* Module declarations from "cpython.set" */

/* Module declarations from "cpython.buffer" */

/* Module declarations from "cpython.bytes" */

/* Module declarations from "cpython.pycapsule" */

/* Module declarations from "cpython.contextvars" */

/* Module declarations from "cpython" */

/* Module declarations from "bmi_c" */

/* Module declarations from "DifferentialAlgebra" */
static char *__pyx_v_19DifferentialAlgebra_BMI_IX_small;
static char *__pyx_v_19DifferentialAlgebra_BMI_IX_large;
static char *__pyx_v_19DifferentialAlgebra_BMI_IX_equations;
static char *__pyx_v_19DifferentialAlgebra_BMI_IX_ordering;
static char *__pyx_v_19DifferentialAlgebra_BMI_IX_notation;
static char *__pyx_v_19DifferentialAlgebra_BMI_IX_jet;
static char *__pyx_v_19DifferentialAlgebra_BMI_IX_tjet;
static char *__pyx_v_19DifferentialAlgebra_BMI_IX_jet0;
static char *__pyx_v_19DifferentialAlgebra_BMI_IX_diff;
static char *__pyx_v_19DifferentialAlgebra_BMI_IX_udif;
static char *__pyx_v_19DifferentialAlgebra_BMI_IX_D;
static char *__pyx_v_19DifferentialAlgebra_BMI_IX_Derivative;
static char *__pyx_v_19DifferentialAlgebra_BMI_IX_undefined;
static char *__pyx_v_19DifferentialAlgebra_BMI_IX_type;
static char *__pyx_v_19DifferentialAlgebra_BMI_IX_regchain;
static char *__pyx_v_19DifferentialAlgebra_BMI_IX_dring;
static char *__pyx_v_19DifferentialAlgebra_BMI_IX_DLuple;
static char *__pyx_v_19DifferentialAlgebra_BMI_IX_ascending;
static char *__pyx_v_19DifferentialAlgebra_BMI_IX_descending;
static char *__pyx_v_19DifferentialAlgebra_BMI_IX_leader;
static char *__pyx_v_19DifferentialAlgebra_BMI_IX_order;
static char *__pyx_v_19DifferentialAlgebra_BMI_IX_rank;
static char *__pyx_v_19DifferentialAlgebra_BMI_IX_eq;
static char *__pyx_v_19DifferentialAlgebra_BMI_IX_ne;
static char *__pyx_v_19DifferentialAlgebra_BMI_IX_gt;
static char *__pyx_v_19DifferentialAlgebra_BMI_IX_ge;
static char *__pyx_v_19DifferentialAlgebra_BMI_IX_lt;
static char *__pyx_v_19DifferentialAlgebra_BMI_IX_le;
static char *__pyx_v_19DifferentialAlgebra_BMI_IX_identical;
static char *__pyx_v_19DifferentialAlgebra_BMI_IX_deriv;
static char *__pyx_v_19DifferentialAlgebra_BMI_IX_proper;
static char *__pyx_v_19DifferentialAlgebra_BMI_IX_depvars;
static char *__pyx_v_19DifferentialAlgebra_BMI_IX_indepvars;
static char *__pyx_v_19DifferentialAlgebra_BMI_IX_derivs;
static char *__pyx_v_19DifferentialAlgebra_BMI_IX_allvars;
static char *__pyx_v_19DifferentialAlgebra_BMI_IX_params;
static char *__pyx_v_19DifferentialAlgebra_BMI_IX_constants;
static char *__pyx_v_19DifferentialAlgebra_BMI_IX_fully;
static char *__pyx_v_19DifferentialAlgebra_BMI_IX_partially;
static char *__pyx_v_19DifferentialAlgebra_BMI_IX_algebraically;
static char *__pyx_v_19DifferentialAlgebra_BMI_IX_all;
static char *__pyx_v_19DifferentialAlgebra_BMI_IX_none;
static char *__pyx_v_19DifferentialAlgebra_BMI_IX_essential;
static char *__pyx_v_19DifferentialAlgebra_BMI_IX_nocase;
static char *__pyx_v_19DifferentialAlgebra_BMI_IX_safecase;
static char *__pyx_v_19DifferentialAlgebra_BMI_IX_odecase;
static char *__pyx_v_19DifferentialAlgebra_BMI_IX_pdecase;
static char *__pyx_v_19DifferentialAlgebra_BMI_IX_single;
static char *__pyx_v_19DifferentialAlgebra_BMI_IX_vector;
static PyObject *__pyx_f_19DifferentialAlgebra___pyx_unpickle_BaseFieldExtension__set_state(struct __pyx_obj_19DifferentialAlgebra_BaseFieldExtension *, PyObject *); /*proto*/
/* #### Code section: typeinfo ### */
/* #### Code section: before_global_var ### */
#define __Pyx_MODULE_NAME "DifferentialAlgebra"
extern int __pyx_module_is_main_DifferentialAlgebra;
int __pyx_module_is_main_DifferentialAlgebra = 0;

/* Implementation of "DifferentialAlgebra" */
/* #### Code section: global_var ### */
static PyObject *__pyx_builtin_RuntimeError;
static PyObject *__pyx_builtin_eval;
static PyObject *__pyx_builtin_range;
static PyObject *__pyx_builtin_TypeError;
static PyObject *__pyx_builtin_NotImplementedError;
/* #### Code section: string_decls ### */
static const char __pyx_k_[] = "[, ]+";
static const char __pyx_k_0[] = "0";
static const char __pyx_k_1[] = "[1]";
static const char __pyx_k_A[] = "A";
static const char __pyx_k_C[] = "C";
static const char __pyx_k_F[] = "F";
static const char __pyx_k_L[] = "L";
static const char __pyx_k_M[] = "M";
static const char __pyx_k_P[] = "P";
static const char __pyx_k_R[] = "R";
static const char __pyx_k_U[] = "U";
static const char __pyx_k_Y[] = "Y";
static const char __pyx_k_d[] = "d";
static const char __pyx_k_e[] = "e";
static const char __pyx_k_f[] = "f";
static const char __pyx_k_i[] = "i";
static const char __pyx_k_q[] = "q";
static const char __pyx_k_s[] = "s";
static const char __pyx_k_x[] = "x";
static const char __pyx_k_y[] = "y";
static const char __pyx_k_z[] = "z";
static const char __pyx_k_Eq[] = "Eq(";
static const char __pyx_k_L1[] = "L1";
static const char __pyx_k_L2[] = "L2";
static const char __pyx_k_L3[] = "L3";
static const char __pyx_k_Ne[] = "Ne";
static const char __pyx_k__6[] = "'";
static const char __pyx_k__7[] = "";
static const char __pyx_k_gc[] = "gc";
static const char __pyx_k_oo[] = "oo";
static const char __pyx_k_re[] = "re";
static const char __pyx_k_Add[] = "Add";
static const char __pyx_k_Mul[] = "Mul";
static const char __pyx_k_Pow[] = "Pow";
static const char __pyx_k__16[] = "[]";
static const char __pyx_k__65[] = "=";
static const char __pyx_k__66[] = ",";
static const char __pyx_k__67[] = ")";
static const char __pyx_k__76[] = ", ";
static const char __pyx_k__83[] = ".";
static const char __pyx_k__84[] = "*";
static const char __pyx_k_all[] = "all";
static const char __pyx_k_arg[] = "arg";
static const char __pyx_k_elt[] = "elt";
static const char __pyx_k_key[] = "key";
static const char __pyx_k_lex[] = "lex";
static const char __pyx_k_lhs[] = "lhs";
static const char __pyx_k_nbz[] = "nbz";
static const char __pyx_k_new[] = "__new__";
static const char __pyx_k_rhs[] = "rhs";
static const char __pyx_k_sys[] = "sys";
static const char __pyx_k_var[] = "var";
static const char __pyx_k_z_d[] = "z%d";
static const char __pyx_k_Eq_2[] = "Eq";
static const char __pyx_k_None[] = "None";
static const char __pyx_k_Ybar[] = "Ybar";
static const char __pyx_k__202[] = "?";
static const char __pyx_k_args[] = "args";
static const char __pyx_k_base[] = "base";
static const char __pyx_k_copy[] = "copy";
static const char __pyx_k_core[] = "core";
static const char __pyx_k_ders[] = "ders";
static const char __pyx_k_dico[] = "dico";
static const char __pyx_k_dict[] = "__dict__";
static const char __pyx_k_eqns[] = "eqns";
static const char __pyx_k_eval[] = "eval";
static const char __pyx_k_expr[] = "expr";
static const char __pyx_k_func[] = "func";
static const char __pyx_k_ineq[] = "ineq";
static const char __pyx_k_iter[] = "__iter__";
static const char __pyx_k_main[] = "__main__";
static const char __pyx_k_mode[] = "mode";
static const char __pyx_k_name[] = "__name__";
static const char __pyx_k_prem[] = "prem";
static const char __pyx_k_ring[] = "ring";
static const char __pyx_k_self[] = "self";
static const char __pyx_k_sort[] = "sort";
static const char __pyx_k_spec[] = "__spec__";
static const char __pyx_k_strY[] = "strY";
static const char __pyx_k_strq[] = "strq";
static const char __pyx_k_strx[] = "strx";
static const char __pyx_k_tail[] = "tail";
static const char __pyx_k_test[] = "__test__";
static const char __pyx_k_true[] = "true";
static const char __pyx_k_vars[] = "vars";
static const char __pyx_k_zval[] = "zval";
static const char __pyx_k_DRing[] = "DRing";
static const char __pyx_k_ascii[] = "ascii";
static const char __pyx_k_dimlb[] = "dimlb";
static const char __pyx_k_false[] = "false";
static const char __pyx_k_latex[] = "_latex";
static const char __pyx_k_match[] = "match";
static const char __pyx_k_prime[] = "prime";
static const char __pyx_k_range[] = "range";
static const char __pyx_k_split[] = "split";
static const char __pyx_k_state[] = "state";
static const char __pyx_k_sympy[] = "sympy";
static const char __pyx_k_theta[] = "theta";
static const char __pyx_k_utf_8[] = "utf-8";
static const char __pyx_k_zsymb[] = "zsymb";
static const char __pyx_k_Symbol[] = "Symbol";
static const char __pyx_k_blocks[] = "blocks";
static const char __pyx_k_coeffs[] = "coeffs";
static const char __pyx_k_degree[] = "degree";
static const char __pyx_k_dict_2[] = "_dict";
static const char __pyx_k_enable[] = "enable";
static const char __pyx_k_evdict[] = "evdict";
static const char __pyx_k_grlexA[] = "grlexA";
static const char __pyx_k_grlexB[] = "grlexB";
static const char __pyx_k_groups[] = "groups";
static const char __pyx_k_import[] = "__import__";
static const char __pyx_k_indets[] = "indets";
static const char __pyx_k_memout[] = "memout";
static const char __pyx_k_newkey[] = "newkey";
static const char __pyx_k_newval[] = "newval";
static const char __pyx_k_pickle[] = "pickle";
static const char __pyx_k_rank_0[] = "rank >= 0";
static const char __pyx_k_redset[] = "redset";
static const char __pyx_k_reduce[] = "__reduce__";
static const char __pyx_k_rel_op[] = "rel_op";
static const char __pyx_k_result[] = "result";
static const char __pyx_k_series[] = "series";
static const char __pyx_k_solved[] = "solved";
static const char __pyx_k_strder[] = "strder";
static const char __pyx_k_string[] = "string";
static const char __pyx_k_strnot[] = "strnot";
static const char __pyx_k_strsel[] = "strsel";
static const char __pyx_k_strvar[] = "strvar";
static const char __pyx_k_tensor[] = "tensor";
static const char __pyx_k_update[] = "update";
static const char __pyx_k_Indexed[] = "Indexed";
static const char __pyx_k_Integer[] = "Integer";
static const char __pyx_k_compile[] = "compile";
static const char __pyx_k_control[] = "control";
static const char __pyx_k_disable[] = "disable";
static const char __pyx_k_evdict0[] = "evdict0";
static const char __pyx_k_evdict1[] = "evdict1";
static const char __pyx_k_fullset[] = "fullset";
static const char __pyx_k_indexed[] = "indexed";
static const char __pyx_k_indices[] = "indices";
static const char __pyx_k_initial[] = "initial";
static const char __pyx_k_latex_2[] = "_latex_";
static const char __pyx_k_mesgerr[] = "mesgerr";
static const char __pyx_k_newargs[] = "newargs";
static const char __pyx_k_pattern[] = "pattern";
static const char __pyx_k_pretend[] = "pretend";
static const char __pyx_k_ranking[] = "_ranking";
static const char __pyx_k_ratfrac[] = "ratfrac";
static const char __pyx_k_replace[] = "replace";
static const char __pyx_k_singsol[] = "singsol";
static const char __pyx_k_strYbar[] = "strYbar";
static const char __pyx_k_strattr[] = "strattr";
static const char __pyx_k_strders[] = "strders";
static const char __pyx_k_streqns[] = "streqns";
static const char __pyx_k_strfull[] = "strfull";
static const char __pyx_k_strgens[] = "strgens";
static const char __pyx_k_strineq[] = "strineq";
static const char __pyx_k_strmode[] = "strmode";
static const char __pyx_k_strpoly[] = "strpoly";
static const char __pyx_k_strrels[] = "strrels";
static const char __pyx_k_strvars[] = "strvars";
static const char __pyx_k_timeout[] = "timeout";
static const char __pyx_k_zevdict[] = "zevdict";
static const char __pyx_k_zstring[] = "zstring";
static const char __pyx_k_Equality[] = "Equality";
static const char __pyx_k_Function[] = "Function";
static const char __pyx_k_Rational[] = "Rational";
static const char __pyx_k_coherent[] = "coherent";
static const char __pyx_k_equation[] = "equation";
static const char __pyx_k_evaluate[] = "evaluate";
static const char __pyx_k_function[] = "function";
static const char __pyx_k_getstate[] = "__getstate__";
static const char __pyx_k_iterated[] = "iterated";
static const char __pyx_k_listform[] = "listform";
static const char __pyx_k_notation[] = "notation";
static const char __pyx_k_pyx_type[] = "__pyx_type";
static const char __pyx_k_regchain[] = "regchain (";
static const char __pyx_k_separant[] = "separant";
static const char __pyx_k_setstate[] = "__setstate__";
static const char __pyx_k_strdimlb[] = "strdimlb";
static const char __pyx_k_variable[] = "variable";
static const char __pyx_k_TypeError[] = "TypeError";
static const char __pyx_k_basefield[] = "basefield";
static const char __pyx_k_casesplit[] = "casesplit";
static const char __pyx_k_equations[] = "equations";
static const char __pyx_k_integrate[] = "integrate";
static const char __pyx_k_isenabled[] = "isenabled";
static const char __pyx_k_primitive[] = "primitive";
static const char __pyx_k_pyx_state[] = "__pyx_state";
static const char __pyx_k_ranking_2[] = "ranking";
static const char __pyx_k_reduce_ex[] = "__reduce_ex__";
static const char __pyx_k_relations[] = "_relations";
static const char __pyx_k_resultant[] = "resultant";
static const char __pyx_k_selection[] = "selection";
static const char __pyx_k_strredset[] = "strredset";
static const char __pyx_k_Derivative[] = "Derivative";
static const char __pyx_k_attributes[] = "attributes";
static const char __pyx_k_congruence[] = "congruence";
static const char __pyx_k_degrevlexA[] = "degrevlexA";
static const char __pyx_k_degrevlexB[] = "degrevlexB";
static const char __pyx_k_derivation[] = "derivation";
static const char __pyx_k_derivative[] = "derivative";
static const char __pyx_k_evaluate_2[] = "__evaluate";
static const char __pyx_k_generators[] = "generators";
static const char __pyx_k_normalized[] = "normalized";
static const char __pyx_k_parameters[] = "parameters";
static const char __pyx_k_polynomial[] = "polynomial";
static const char __pyx_k_pyx_result[] = "__pyx_result";
static const char __pyx_k_regchain_2[] = "regchain ([], [])";
static const char __pyx_k_relational[] = "relational";
static const char __pyx_k_squarefree[] = "squarefree";
static const char __pyx_k_startswith[] = "startswith";
static const char __pyx_k_strcontrol[] = "strcontrol";
static const char __pyx_k_strsingsol[] = "strsingsol";
static const char __pyx_k_strzstring[] = "strzstring";
static const char __pyx_k_IndexedBase[] = "IndexedBase";
static const char __pyx_k_L_as_string[] = "L_as_string";
static const char __pyx_k_PickleError[] = "PickleError";
static const char __pyx_k_autoreduced[] = "autoreduced";
static const char __pyx_k_constraints[] = "constraints";
static const char __pyx_k_derivations[] = "derivations";
static const char __pyx_k_independent[] = "independent";
static const char __pyx_k_indexedbase[] = "indexedbase";
static const char __pyx_k_is_constant[] = "is_constant";
static const char __pyx_k_normal_form[] = "normal_form";
static const char __pyx_k_polynomials[] = "polynomials";
static const char __pyx_k_relations_2[] = "relations";
static const char __pyx_k_subrankings[] = "subrankings";
static const char __pyx_k_RuntimeError[] = "RuntimeError";
static const char __pyx_k_differential[] = "differential";
static const char __pyx_k_initializing[] = "_initializing";
static const char __pyx_k_is_coroutine[] = "_is_coroutine";
static const char __pyx_k_leading_rank[] = "leading_rank";
static const char __pyx_k_pyx_checksum[] = "__pyx_checksum";
static const char __pyx_k_stringsource[] = "<stringsource>";
static const char __pyx_k_use_setstate[] = "use_setstate";
static const char __pyx_k_DenefLipshitz[] = "DenefLipshitz";
static const char __pyx_k_class_getitem[] = "__class_getitem__";
static const char __pyx_k_differentiate[] = "differentiate";
static const char __pyx_k_reduce_cython[] = "__reduce_cython__";
static const char __pyx_k_casesplit_True[] = "casesplit = True";
static const char __pyx_k_change_ranking[] = "change_ranking";
static const char __pyx_k_listof_symbols[] = "__listof_symbols";
static const char __pyx_k_process_evdict[] = "__process_evdict";
static const char __pyx_k_pyx_PickleError[] = "__pyx_PickleError";
static const char __pyx_k_setstate_cython[] = "__setstate_cython__";
static const char __pyx_k_DifferentialRing[] = "DifferentialRing";
static const char __pyx_k_process_notation[] = "__process_notation";
static const char __pyx_k_DenefLipshitzUple[] = "DenefLipshitzUple";
static const char __pyx_k_RosenfeldGroebner[] = "RosenfeldGroebner";
static const char __pyx_k_UndefinedFunction[] = "UndefinedFunction";
static const char __pyx_k_differential_prem[] = "differential_prem";
static const char __pyx_k_differential_ring[] = "differential_ring";
static const char __pyx_k_factor_derivative[] = "factor_derivative";
static const char __pyx_k_process_equations[] = "_process_equations";
static const char __pyx_k_BaseFieldExtension[] = "BaseFieldExtension";
static const char __pyx_k_asyncio_coroutines[] = "asyncio.coroutines";
static const char __pyx_k_cline_in_traceback[] = "cline_in_traceback";
static const char __pyx_k_differential__ring[] = "differential\\_ring";
static const char __pyx_k_differential_field[] = "differential_field";
static const char __pyx_k_leading_derivative[] = "leading_derivative";
static const char __pyx_k_leading_polynomial[] = "leading_polynomial";
static const char __pyx_k_Denef_Lipshitz_Uple[] = "Denef_Lipshitz_Uple";
static const char __pyx_k_DifferentialAlgebra[] = "DifferentialAlgebra";
static const char __pyx_k_NotImplementedError[] = "NotImplementedError";
static const char __pyx_k_differential__field[] = "differential\\_field";
static const char __pyx_k_leading_coefficient[] = "leading_coefficient";
static const char __pyx_k_number_of_equations[] = "__number_of_equations";
static const char __pyx_k_preparation_equation[] = "preparation_equation";
static const char __pyx_k_Denef__Lipshitz__Uple[] = "Denef\\_Lipshitz\\_Uple";
static const char __pyx_k_DifferentialRing_sort[] = "DifferentialRing.sort";
static const char __pyx_k_DifferentialRing_tail[] = "DifferentialRing.tail";
static const char __pyx_k_DifferentialRing__latex[] = "DifferentialRing._latex";
static const char __pyx_k_DifferentialRing_coeffs[] = "DifferentialRing.coeffs";
static const char __pyx_k_DifferentialRing_indets[] = "DifferentialRing.indets";
static const char __pyx_k_DenefLipshitzUple__latex[] = "DenefLipshitzUple._latex_";
static const char __pyx_k_DenefLipshitzUple_series[] = "DenefLipshitzUple.series";
static const char __pyx_k_DifferentialRing_initial[] = "DifferentialRing.initial";
static const char __pyx_k_RegularDifferentialChain[] = "RegularDifferentialChain";
static const char __pyx_k_is_differential_fraction[] = "is_differential_fraction";
static const char __pyx_k_050_0_1_050_051_133_range[] = "[\\050]{0,1}([^\\050\\051]*).*[\\133] *range";
static const char __pyx_k_BaseFieldExtension__latex[] = "BaseFieldExtension._latex_";
static const char __pyx_k_DifferentialRing__ranking[] = "DifferentialRing._ranking";
static const char __pyx_k_DifferentialRing_evaluate[] = "DifferentialRing.evaluate";
static const char __pyx_k_DifferentialRing_separant[] = "DifferentialRing.separant";
static const char __pyx_k_DifferentialRing__evaluate[] = "_DifferentialRing__evaluate";
static const char __pyx_k_DifferentialRing_equations[] = "DifferentialRing.equations";
static const char __pyx_k_DifferentialRing_integrate[] = "DifferentialRing.integrate";
static const char __pyx_k_regular_differential_chain[] = "regular_differential_chain";
static const char __pyx_k_DifferentialRing___evaluate[] = "DifferentialRing.__evaluate";
static const char __pyx_k_BaseFieldExtension_relations[] = "BaseFieldExtension.relations";
static const char __pyx_k_DifferentialRing_is_constant[] = "DifferentialRing.is_constant";
static const char __pyx_k_DifferentialRing_normal_form[] = "DifferentialRing.normal_form";
static const char __pyx_k_regular__differential__chain[] = "regular\\_differential\\_chain";
static const char __pyx_k_BaseFieldExtension__relations[] = "BaseFieldExtension._relations";
static const char __pyx_k_BaseFieldExtension_generators[] = "BaseFieldExtension.generators";
static const char __pyx_k_DenefLipshitzUple_constraints[] = "DenefLipshitzUple.constraints";
static const char __pyx_k_DifferentialRing_leading_rank[] = "DifferentialRing.leading_rank";
static const char __pyx_k_RegularDifferentialChain_prem[] = "RegularDifferentialChain.prem";
static const char __pyx_k_RegularDifferentialChain_tail[] = "RegularDifferentialChain.tail";
static const char __pyx_k_variable_expected_for_q_found[] = "variable expected for q, found: ";
static const char __pyx_k_DifferentialRing_DenefLipshitz[] = "DifferentialRing.DenefLipshitz";
static const char __pyx_k_DifferentialRing_differentiate[] = "DifferentialRing.differentiate";
static const char __pyx_k_Test_if_a_rational_fraction_is[] = "\n        Test if a rational fraction is constant\n\n        INPUT:\n\n            `ratfrac`    -- a rational fraction or a list of rational\n                              fractions\n            `derivation` -- (default: None) an independent variable\n\n        OUTPUT:\n\n            True, if the rational fraction is a constant with respect\n            to `derivation`, else False. If `derivation` is omitted,\n            True if the rational fraction is a constant with respect\n            to all the derivations of the ring.\n\n        EXAMPLES:\n\n            >>> from sympy import *\n            >>> from DifferentialAlgebra import *\n            >>> init_printing (use_unicode = False, num_columns = 60)\n\n            >>> a,x,y = var ('a,x,y')\n            >>> u,v = function ('u,v')\n            >>> R = DifferentialRing (derivations = [x,y], \n            ...             blocks = [u,v,a], parameters = [a,v(y)])\n\n            >>> R.is_constant (3)\n            True\n        ";
static const char __pyx_k_The_DifferentialAlgebra_Module[] = "\nThe DifferentialAlgebra Module\n\nThe DifferentialAlgebra module implements elimination methods for\nsystems of polynomial differential equations. Mathematically, it\nrelies on the differential algebra theory of Joseph Fels Ritt and\nEllis Robert Kolchin.\n\nAUTHORS:\n\n    Nicolas M. Thiery (2011-12): initial version for Sagemath\n\n    Fran\303\247ois Boulier (2012-): the only other developer, so far\n\nREFERENCES FOR DIFFERENTIAL ALGEBRA:\n\n    [Ritt50] Joseph Fels Ritt. Differential Algebra. Dover Publications\n    Inc.  New York, 1950.\n\n    [Kolchin73] Ellis Robert Kolchin. Differential Algebra and\n    Algebraic Groups.  Academic Press. New York, 1973.\n\nSUMMARY:\n\n    The rest of this help pages contains a few examples:\n\n        - THE MICHAELIS-MENTEN FORMULA\n\n        - AN INTEGRAL FORM OF AN INPUT-OUTPUT EQUATION\n\n        - THE FORMAL POWER SERIES SOLUTIONS OF AN ODE\n\nTHE MICHAELIS-MENTEN FORMULA:\n\n    >>> from sympy import *\n    >>> from DifferentialAlgebra import *\n    >>> init_printing (use_unicode = False, num_columns = 68)\n\n    >>> leader,order,rank = var ('leader,order,rank')\n    >>> derivative = function ('derivative')\n\n    This example shows how to build the Henri Michaelis Menten formula\n    by differential elimination. One considers a chemical reaction\n    system describing the enzymatic reaction:\n\n                   k1\n        E + S  -----------> ES\n                   km1\n        ES     -----------> E + S\n                   k2\n        ES     -----------> E + P\n\n    A substrate S is transformed into a product P, in the presence of\n    an enzyme E. An intermediate complex ES is formed:\n\n    >>> t = var('t')\n    >>> km1,k1,k2 = var('km1,k1,k2')\n    >>> F1,E,S,ES,P = function('F1,E,S,ES,P')\n    >>> params = [km1,k1,k2]\n    >>> params\n    [km1, k1, k2]\n\n    The main assumption is that k1, km1 >> k2 i.e. that the revertible\n    reaction is much faster than the last one. One performs a\n    quasi-steady state"" approximation by considering the following\n    differential-algebraic system (it comes from the mass-action law\n    kinetics, replacing the contribution of the fast reactions by an\n    unknown function F1(t), on the algebraic variety where the fast\n    reaction would equilibrate if they were alone):\n\n    >>> syst = [Derivative(E(t),t) + F1(t) - k2*ES(t), \n    ... Derivative(S(t),t) + F1(t), \n    ... Derivative(ES(t),t) + k2*ES(t) - F1(t), \n    ... Derivative(P(t),t) - k2*ES(t), k1*E(t)*S(t) - km1*ES(t) ]\n    >>> syst\n                         d                 d                           >\n    [-k2*ES(t) + F1(t) + --(E(t)), F1(t) + --(S(t)), k2*ES(t) - F1(t)  >\n                         dt                dt                          >\n    |  \n    >   d                      d                                  \n    > + --(ES(t)), -k2*ES(t) + --(P(t)), k1*E(t)*S(t) - km1*ES(t)]\n    >   dt                     dt                                 \n\n    Differential elimination permits to simplify this DAE.  To avoid\n    discussing the possible vanishing of ``params``, one moves them\n    to the base field of the equations:\n\n    >>> Field = BaseFieldExtension (generators = params)\n    >>> Field\n    differential_field\n\n    >>> R = DifferentialRing (derivations = [t], \n    ...                       blocks = [F1, [E,ES,P,S], params], \n    ...                       parameters = params)\n    >>> R\n    differential_ring\n\n    The RosenfeldGroebner considers three cases. The two last ones\n    are degenerate cases:\n\n    >>> ideal = R.RosenfeldGroebner (syst, basefield = Field)\n    >>> ideal\n    [regular_differential_chain, regular_differential_chain, regular_d >\n    |  \n    > ifferential_chain]\n\n    >>> [ C.equations (solved = True) for C in ideal ]\n                                                  2                    >\n             km1*ES(t)  d          - k1*k2*ES(t)*S (t) - k2*km1*ES(t)* >\n    [[E(t) = ---------, --(S(t)) = ----------------""------------------- >\n              k1*S(t)   dt                 2                           >\n                                       k1*S (t) + km1*ES(t) + km1*S(t) >\n    |  \n    >                                                          2       >\n    > S(t)  d                    d                   -k2*km1*ES (t)    >\n    > ----, --(P(t)) = k2*ES(t), --(ES(t)) = ------------------------- >\n    >       dt                   dt              2                     >\n    >                                        k1*S (t) + km1*ES(t) + km >\n    |  \n    >                              2                                   >\n    >                 k1*k2*ES(t)*S (t) + k2*km1*ES(t)*S(t)            >\n    > ------, F1(t) = -------------------------------------], [S(t) =  >\n    >                        2                                         >\n    > 1*S(t)             k1*S (t) + km1*ES(t) + km1*S(t)               >\n    |  \n    >                                                                  >\n    >               d             d                                 -k >\n    > 0, ES(t) = 0, --(P(t)) = 0, --(E(t)) = 0, F1(t) = 0], [S(t) = -- >\n    >               dt            dt                                 k >\n    >                                                                  >\n    |  \n    >                                                    \n    > m1                        d                        \n    > ---, ES(t) = 0, E(t) = 0, --(P(t)) = 0, F1(t) = 0]]\n    > 1                         dt                       \n    >                                                    \n\n    The sought equation, below, is not yet the Henri-Michaelis-Menten\n    formula. This is expected, since some minor hypotheses have not\n    yet been taken into account:\n\n    >>> ideal [0].equations (solved = True, \n    ...                      selection = Eq(leader,derivative (S(t))))\n                               2                        \n     d          - k1*k2*ES(t)*S (t"") - k2*km1*ES(t)*S(t) \n    [--(S(t)) = ---------------------------------------]\n     dt                 2                               \n                    k1*S (t) + km1*ES(t) + km1*S(t)     \n\n    Let us take them into account. First create two new constants.\n    Put them among ``params``, together with initial values:\n\n    >>> E0,ES0,P0,S0,K,V_max = var ('E0,ES0,P0,S0,K,V_max')\n    >>> params = [km1,k1,k2,E0,ES0,P0,S0,K,V_max]\n    >>> params\n    [km1, k1, k2, E0, ES0, P0, S0, K, V_max]\n\n    >>> R = DifferentialRing (blocks = [F1, [ES,E,P,S], params], \n    ...                       parameters = params, derivations = [t])\n    >>> R\n    differential_ring\n\n    There are relations among the parameters: initial values supposed\n    to be zero, and equations meant to rename constants:\n\n    >>> relations_among_params = RegularDifferentialChain (\n    ...                 [P0, ES0, Eq(K,km1/k1), Eq(V_max,k2*E0)], R)\n    >>> relations_among_params\n    regular_differential_chain\n\n    Coming computations will be performed over a base field defined\n    by generators and relations:\n\n    >>> Field = BaseFieldExtension (generators = params, \n    ...                             relations = relations_among_params)\n    >>> Field\n    differential_field\n\n    Extend the DAE with linear conservation laws. They could have been\n    computed from the stoichimetry matrix of the chemical system:\n\n    >>> newsyst = syst + [Eq(E(t) + ES(t), E0 + ES0), \n    ...                   Eq(S(t) + ES(t) + P(t), S0 + ES0 + P0)]\n    >>> newsyst\n                         d                 d                           >\n    [-k2*ES(t) + F1(t) + --(E(t)), F1(t) + --(S(t)), k2*ES(t) - F1(t)  >\n                         dt                dt                          >\n    |  \n    >   d                      d                                       >\n    > + --(ES(t)), -k2*ES(t) + --(P(t)), k1*E(t)*S(t) - km1*ES(t), E(t >\n    >   dt                     dt                   ""                   >\n    |  \n    >                                                           \n    > ) + ES(t) = E0 + ES0, ES(t) + P(t) + S(t) = ES0 + P0 + S0]\n    >                                                           \n\n    Simplify again. Only one case is left:\n\n    >>> ideal = R.RosenfeldGroebner (newsyst, basefield = Field)\n    >>> ideal\n    [regular_differential_chain]\n\n    To get the traditional Henri-Michaelis-Menten formula, one still\n    needs to neglect the term K*E0:\n\n    >>> ideal[0].equations (solved = True, \n    ...                     selection = Eq(leader,derivative (S(t))))\n                                       2     \n     d          -K*V_max*S(t) - V_max*S (t)  \n    [--(S(t)) = ----------------------------]\n     dt                 2               2    \n                E0*K + K  + 2*K*S(t) + S (t) \n\n    One can also get it by computing the right hand side of the equation\n    which gives the evolution of the product P:\n\n    >>> ideal[0].normal_form (Derivative(P(t),t))\n    V_max*S(t)\n    ----------\n     K + S(t) \n\n    REFERENCES:\n\n        [BLLM11] Fran\303\247ois Boulier, Marc Lefranc, Fran\303\247ois\n        Lemaire and Pierre-Emmanuel Morant. Model Reduction of\n        Chemical Reaction Systems using Elimination. Mathematics\n        in Computer Science vol. 5, pp. 289-301. 2011.\n        http://hal.archives-ouvertes.fr/hal-00184558\n\nAN INTEGRAL FORM OF AN INPUT-OUTPUT EQUATION:\n\n    >>> from sympy import *\n    >>> from DifferentialAlgebra import *\n    >>> init_printing (use_unicode = False, num_columns = 68)\n\n    >>> leader,order,rank = var ('leader,order,rank')\n    >>> derivative = function ('derivative')\n\n    This example shows how to compute an input/output relation,\n    having a nice form, for a compartmental model. The degradation of\n    the studied product, from compartment 1, is supposed to follow\n    a Henri-Michaelis-Menten formula. The exchanges between the two\n    compartments are s""upposed to be linear:\n\n                          ke,Ve\n        compartment 1  --------------> outside the model\n\n                            k12\n        compartment 1 ---------------> compartment 2\n\n                            k21\n        compartment 2 ---------------> compartment 1\n\n    Functions x_1(t) and x_2(t) are associated to both compartments:\n\n    >>> t = var ('t')\n    >>> ke, Ve, k12, k21 = var ('ke, Ve, k12, k21')\n    >>> x1,x2 = function ('x1,x2')\n    >>> params = [ke,Ve,k12,k21]\n    >>> params\n    [ke, Ve, k12, k21]\n\n    The dynamical system associated to the above compartmental model\n    already is a regular differential chain with respect to any orderly\n    ranking, such as the one of R:\n\n    >>> R = DifferentialRing (derivations = [t], \n    ...                       blocks = [[x1,x2], params], \n    ...                       parameters = params)\n    >>> R\n    differential_ring\n\n    Here are the equations which give the dynamics of the system:\n\n    >>> edoA = Eq(Derivative(x1(t),t), \n    ...             -k12*x1(t) + k21*x2(t) - (Ve*x1(t))/(ke + x1(t)))\n    >>> edoA\n    d              Ve*x1(t)                         \n    --(x1(t)) = - ---------- - k12*x1(t) + k21*x2(t)\n    dt            ke + x1(t)                        \n\n    >>> edoB = Eq (Derivative(x2(t),t), k12*x1(t) - k21*x2(t))\n    >>> edoB\n    d                                \n    --(x2(t)) = k12*x1(t) - k21*x2(t)\n    dt                               \n\n    The parameters are moved to the base field of the equations,\n    in order to avoid discussing their possible vanishing:\n\n    >>> F = BaseFieldExtension (generators = params)\n    >>> F\n    differential_field\n\n    The following computation does not do anything. The two equations\n    are just bundled into a regular differential chain:\n\n    >>> ideal = R.RosenfeldGroebner ([edoA, edoB], basefield = F)\n    >>> ideal\n    [regular_differential_chain]\n\n    >>> C = ideal[0]\n    >>> C.equations"" (solved = True)\n                                                                       >\n     d                                  d           -Ve*x1(t) - k12*ke >\n    [--(x2(t)) = k12*x1(t) - k21*x2(t), --(x1(t)) = ------------------ >\n     dt                                 dt                             >\n    |  \n    >                2                                     \n    > *x1(t) - k12*x1 (t) + k21*ke*x2(t) + k21*x1(t)*x2(t) \n    > ----------------------------------------------------]\n    >             ke + x1(t)                               \n\n    Let us assume now that compartment 1 is observed while compartment\n    2 is not.  In other words, let us assume that the output y =\n    x_1(t). The idea is to eliminate the non observed variable x_2(t)\n    and compute a relation (the input/output equation), which is\n    a consequence of the dynamical system, but does not involve\n    x_2(t) and its derivatives. For this purpose, one defines a new\n    differential ring, which is mathematically equivalent to R, but\n    with a different ranking:\n\n    >>> IO_R = DifferentialRing (derivations = [t], \n    ...                          blocks = [x2,x1,params], \n    ...                          parameters = params)\n    >>> IO_R\n    differential_ring\n\n    One just has to perform a change of ranking over C:\n\n    >>> IO_C = C.change_ranking (IO_R)\n    >>> IO_C\n    regular_differential_chain\n\n    Here is the input/output equation. However, it looks quite\n    complicated:\n\n    >>> IO_rel = IO_C.equations (\n    ...                 selection = Eq(leader,derivative(x1(t))))[0]\n    >>> IO_rel\n                                                                       >\n                               2            d                 2 d      >\n    Ve*k21*ke*x1(t) + Ve*k21*x1 (t) + Ve*ke*--(x1(t)) + k12*ke *--(x1( >\n                                            dt                  dt     >\n                                                                ""       >\n    |  \n    >                                                                  >\n    >                      d                 2    d                 2  >\n    > t)) + 2*k12*ke*x1(t)*--(x1(t)) + k12*x1 (t)*--(x1(t)) + k21*ke * >\n    >                      dt                     dt                   >\n    >                                                                  >\n    |  \n    >                                                                  >\n    > d                          d                 2    d              >\n    > --(x1(t)) + 2*k21*ke*x1(t)*--(x1(t)) + k21*x1 (t)*--(x1(t)) + ke >\n    > dt                         dt                     dt             >\n    >                                                                  >\n    |  \n    >    2                       2                   2        \n    > 2 d                       d              2    d         \n    >  *---(x1(t)) + 2*ke*x1(t)*---(x1(t)) + x1 (t)*---(x1(t))\n    >     2                       2                   2       \n    >   dt                      dt                  dt        \n\n    One way to simplify it consists in integrating it. For this\n    purpose, one divides it by its initial and then one and then one\n    integrates it:\n\n    >>> IO_rel = IO_rel / IO_R.initial (IO_rel)\n    >>> IO_rel\n                                                                       >\n                               2            d                 2 d      >\n    Ve*k21*ke*x1(t) + Ve*k21*x1 (t) + Ve*ke*--(x1(t)) + k12*ke *--(x1( >\n                                            dt                  dt     >\n                                                                       >\n    ------------------------------------------------------------------ >\n                                                                       >\n                                                                       >\n    |  \n    >                                                                  >\n    "">                      d                 2    d                 2  >\n    > t)) + 2*k12*ke*x1(t)*--(x1(t)) + k12*x1 (t)*--(x1(t)) + k21*ke * >\n    >                      dt                     dt                   >\n    >                                                                  >\n    > ---------------------------------------------------------------- >\n    >                                                 2                >\n    >                                               ke  + 2*ke*x1(t) + >\n    |  \n    >                                                                  >\n    > d                          d                 2    d              >\n    > --(x1(t)) + 2*k21*ke*x1(t)*--(x1(t)) + k21*x1 (t)*--(x1(t)) + ke >\n    > dt                         dt                     dt             >\n    >                                                                  >\n    > ---------------------------------------------------------------- >\n    >    2                                                             >\n    >  x1 (t)                                                          >\n    |  \n    >    2                       2                   2        \n    > 2 d                       d              2    d         \n    >  *---(x1(t)) + 2*ke*x1(t)*---(x1(t)) + x1 (t)*---(x1(t))\n    >     2                       2                   2       \n    >   dt                      dt                  dt        \n    > --------------------------------------------------------\n    >                                                         \n    >                                                         \n\n    Then, one integrates it. Simpler, isn't it?\n\n    >>> L = IO_R.integrate (IO_rel, t)\n    >>> L\n                                  2         2            2         2   >\n     Ve*k21*x1(t)  -Ve*ke - k12*ke  + k12*x1 (t) - k21*ke  + k21*x1 (t >\n    [------------, --------------------------------------------------- >\n      ke + x1(t)                      ""  ke + x1(t)                     >\n    |  \n    >          \n    > )        \n    > -, x1(t)]\n    >          \n\n    The precise relationship between the input/output equation and\n    the list L is given by the next formula:\n\n    >>> zero = Add (*[IO_R.differentiate (L[i], t**i) \n    ...                         for i in range (len (L))]) - IO_rel\n\n    The variable ``zero`` contains 0 but python does not recognize it.\n    Let us force the simplification:\n\n    >>> IO_R.normal_form (zero)\n    0\n\nTHE FORMAL POWER SERIES SOLUTIONS OF AN ODE:\n\n    >>> from sympy import *\n    >>> from DifferentialAlgebra import *\n    >>> init_printing (use_unicode = False, num_columns = 68)\n\n    >>> xi,q = var('xi,q')\n    >>> x,y = indexedbase ('x,y')\n\n    The next ODE may be called weird because:\n\n    (a) if y[0] = -1/2 the y[3] is a free parameter and there exists\n    infinitely many solutions at x = 0\n\n    (b)i if y[0] = -1/n for any other positive integer n then there\n    does not exist any series solution at x = 0\n\n    (c) for any other initial value, the series exists and is unique\n    at x = 0\n\n    >>> weird = x*y*y[x,x] + y[x] + y**2 - 11/Integer(2)*x**2 \\\n    ...                                         - 1/Integer(8)*x + 1\n    >>> weird\n                             2             \n                         11*x    x    2    \n    y[x, x]*x*y + y[x] - ----- - - + y  + 1\n                           2     8         \n\n    The DenefLipshitz function does not accept nonautonomous ODE but any\n    such ODE can always be encoded as an autonomous system as follows:\n    - change the independent variable x to a new independent variable\n    xi - add the ODE x[xi] = 1 and initial value x[0] = 0\n\n    >>> weird = x*y*y[xi,xi] + y[xi] + y**2 - 11/Integer(2)*x**2 \\\n    ...                                         - 1/Integer(8)*x + 1\n    >>> eqns = [ weird, x[xi] - 1, x[0] ]\n    >>> eqns\n                                 2                              "" \n                             11*x    x    2                      \n    [y[xi, xi]*x*y + y[xi] - ----- - - + y  + 1, x[xi] - 1, x[0]]\n                               2     8                           \n\n    >>> R = DifferentialRing (derivations = [xi], \n    ...     blocks = [[x,y],q,'(x,y)[oo:-1]'], \n    ...     parameters = [q,'(x,y)[oo:-1]'], notation='jet')\n\n    Assign to Y the list of the differential indeterminates for which\n    we seek formal power series solutions. Assign to Ybar a dictionary\n    which provides the correspondence between the differential\n    indeterminates and the coefficients of the series:\n\n    >>> Y = [x,y]\n    >>> Ybar = { x['(xi,k)'] : 'x[k]', y['(xi,k)'] : 'y[k]' }\n\n    The DenefLipshitz function distinguishes three cases:\n\n    >>> DL = R.DenefLipshitz (eqns, Y, Ybar, q)\n    >>> DL\n    [Denef_Lipshitz_Uple, Denef_Lipshitz_Uple, Denef_Lipshitz_Uple]\n\n    The first component covers the case y[0] = -1/2. The function\n    was forced to separate this case from the other ones by the\n    equidimensionnality property of regular chains:\n\n    >>> U = DL[0]\n    >>> U.constraints ()\n                                                                       >\n    [2*y[0] + 1 = 0, x[0] = 0, 4*y[1] + 5 = 0, x[1] - 1 = 0, 4*y[2] +  >\n    |  \n    >                                                                  >\n    > 9 = 0, x[2] = 0, x[3] = 0, 136*y[3] + 8*y[4] - 513 = 0, x[4] = 0 >\n    |  \n    >                                                                  >\n    > , -1808*y[3] + 8*y[5] + 7965 = 0, x[xi] - 1 = 0, 8*y[xi, xi]*x*y >\n    |  \n    >                  2          2                    \n    >  + 8*y[xi] - 44*x  - x + 8*y  + 8 = 0, y[0] != 0]\n\n    There are infinitely many series, depending on the free parameter\n    y[3]:\n\n    >>> U.series ()\n                                                              3        >\n                 5 /113*y[3]   531\\     4 /171   17*y[3]\\   xi *y[3]   >\n    {x: xi, y"": xi *|-------- - ---| + xi *|--- - -------| + -------- - >\n                   \\   60      64 /       \\64      24   /      6       >\n    |  \n    >      2            \n    >  9*xi    5*xi   1 \n    >  ----- - ---- - -}\n    >    8      4     2 \n\n    The second component covers the general case:\n\n    >>> U = DL[1]\n    >>> U.constraints ()\n                   2                                        3          >\n    [x[0] = 0, y[0]  + y[1] + 1 = 0, x[1] - 1 = 0, - 16*y[0]  + 8*y[0] >\n    |  \n    >                                                     4          3 >\n    > *y[2] - 16*y[0] + 8*y[2] - 1 = 0, x[2] = 0, - 4*y[0]  + 14*y[0]  >\n    |  \n    >           2                                                      >\n    >  - 15*y[0]  + 4*y[0]*y[3] + 23*y[0] + 4*y[3] - 37 = 0, x[3] = 0, >\n    |  \n    >            7            6            5            4           3  >\n    >  - 384*y[0]  + 1088*y[0]  - 1568*y[0]  + 1760*y[0]  + 192*y[0] * >\n    |  \n    >                 3           2                 2                  >\n    > y[4] - 3184*y[0]  + 448*y[0] *y[4] - 2384*y[0]  + 320*y[0]*y[4]  >\n    |  \n    >                                                       9          >\n    > - 880*y[0] + 64*y[4] - 3597 = 0, x[4] = 0, - 2304*y[0]  + 9216*y >\n    |  \n    >    8             7             6             5           4       >\n    > [0]  - 18560*y[0]  + 30112*y[0]  - 45888*y[0]  + 384*y[0] *y[5]  >\n    |  \n    >             4           3                  3           2         >\n    > + 29392*y[0]  + 992*y[0] *y[5] - 29984*y[0]  + 864*y[0] *y[5] -  >\n    |  \n    >           2                                                      >\n    > 16830*y[0]  + 288*y[0]*y[5] + 1302*y[0] + 32*y[5] - 23355 = 0, x >\n    |  \n    >                                               2          2       >\n    > [xi] - 1 = 0, 8*y[xi, xi]*x*y + 8*y[xi] - 44*x  - x + 8*y  + 8 = >\n    |  \n    >               \n    >  0, y[0] != 0]\n\n    We see that the series solutio""n of the second component depends\n    on one parameter y[0]:\n\n    >>> U.series ()\n                 5 /         9            8             7              >\n               xi *\\2304*y[0]  - 9216*y[0]  + 18560*y[0]  - 30112*y[0] >\n    {x: xi, y: ------------------------------------------------------- >\n                                                             4         >\n                                                   46080*y[0]  + 11904 >\n    |  \n    > 6             5             4             3             2        >\n    >   + 45888*y[0]  - 29392*y[0]  + 29984*y[0]  + 16830*y[0]  - 1302 >\n    > ---------------------------------------------------------------- >\n    >       3              2                                           >\n    > 0*y[0]  + 103680*y[0]  + 34560*y[0] + 3840                       >\n    |  \n    >              \\     4 /        7            6            5        >\n    > *y[0] + 23355/   xi *\\384*y[0]  - 1088*y[0]  + 1568*y[0]  - 1760 >\n    > -------------- + ----------------------------------------------- >\n    >                                                      3           >\n    >                                             4608*y[0]  + 10752*y >\n    |  \n    >      4            3            2                  \\     3 /      >\n    > *y[0]  + 3184*y[0]  + 2384*y[0]  + 880*y[0] + 3597/   xi *\\4*y[0 >\n    > --------------------------------------------------- + ---------- >\n    >    2                                                             >\n    > [0]  + 7680*y[0] + 1536                                          >\n    |  \n    >  4          3          2               \\     2 /       3         >\n    > ]  - 14*y[0]  + 15*y[0]  - 23*y[0] + 37/   xi *\\16*y[0]  + 16*y[ >\n    > ---------------------------------------- + --------------------- >\n    >          24*y[0] + 24                              16*y[0] + 16  >\n    >                                                                  >\n    |  \n    >       ""\\                           \n    > 0] + 1/      /      2    \\        \n    > ------- + xi*\\- y[0]  - 1/ + y[0]}\n    >                                   \n    >                                   \n\n    If the truncated series of some component depends on parameters,\n    it is not guaranteed that all values of the parameters actually\n    lead to series but we may find out. Indeed, if y[0] = -1/7, there\n    are no formal power series solutions:\n\n    >>> U.DenefLipshitz (7*y[0] + 1)\n    []\n\n    For any other initial value, the series exists and is unique:\n\n    >>> newDL = U.DenefLipshitz (y[0] - 2)\n    >>> newDL\n    [Denef_Lipshitz_Uple]\n\n    >>> newU = newDL[0]\n    >>> newU.series ()\n                       5           4     3         2            \n               28331*xi    13967*xi    xi    161*xi             \n    {x: xi, y: --------- + --------- + --- + ------- - 5*xi + 2}\n                103680       32256     24      48               \n\n    How to find out? The initial values for which issues may arise are\n    the ones for which the following polynomial has positive integer\n    roots: it is a polynomial in q whose coefficients may depend on\n    y[0], y[1], ...  and are constrained by algebraic equations and\n    inequations:\n\n    >>> U.leading_polynomial()\n    {x: 1, y: q*y[0] + 4*y[0] + 1}\n\n    The third component covers a particular case (y[0] = 0) of the\n    general case.  The splitting y[0] nonzero versus y[0] = 0 actually\n    aims at ensuring the degree of the leading polynomial of the\n    second component:\n\n    >>> U = DL[2]\n    >>> U.series ()\n                         7            6          5          4        3 >\n               4472129*xi    449831*xi    1557*xi    1199*xi    37*xi  >\n    {x: xi, y: ----------- + ---------- + -------- + -------- + ------ >\n                  64512        24576        256        512        24   >\n    |  \n    >      2      \n    >    xi       \n    >  + --- - xi}\n    >    16     ""  \n";
static const char __pyx_k_The_coefficients_and_monomials[] = "\n        The coefficients and monomials of a differential fraction\n\n        INPUT:\n\n            `equation`  -- a rational fraction\n            `variable`  -- (default: None) a derivative\n            `basefield` -- (default: None) a base field\n            `notation`  -- (default: 'undefined') a string\n\n        OUTPUT:\n\n            A sequence of two lists: the list C of the coefficients\n            and the list M of the monomials. Both lists have the same\n            length and the following relation holds:\n\n            `equation` == add (C[i]*M[i] for i in range (len (C)))\n\n            The monomials M[i] are possibly rational fractions.\n\n            If `variable` and `basefield` are both None, then the\n            coefficients C[i] are numerical.\n\n            If `variable` is not None, then `basefield` must be None,\n            the C[i] only depend on variables strictly less than\n            `variable`, and the M[i] only depend on variables greater\n            than or equal to `variable`, with respect to the ranking.\n\n            If `basefield` is not None, then `variable` must be None,\n            the C[i] only depend on variables which belong to the field,\n            and the M[i] only depend on variables which do not belong\n            to the field.\n\n            Restriction: the denominator of `equation` must depend\n            on variables which are all, either strictly less than,\n            or greater than `variable`.\n\n        NOTES:\n\n            So far, there is a single notation available, because of\n            limitations of function.\n\n        EXAMPLES:\n\n            >>> from sympy import *\n            >>> from DifferentialAlgebra import *\n            >>> init_printing (use_unicode=False, num_columns=60)\n            >>> x,y = var ('x,y')\n            >>> f,u = function ('f,u')\n\n        The differential ring is equipped with an elimination ranking\n        such that u >> f:\n\n            >>> R = DifferentialRi""ng (derivations = [x,y], \n            ...             blocks = [u,f], parameters = [u(x)])\n\n        Let us define a differential field F:\n\n            >>> eqns = [Eq (Derivative(f(x,y),x), f(x,y)**2 + 1), \n            ...         Eq(Derivative(f(x,y),y), 2*y*(f(x,y)**2 + 1))]\n            >>> C = RegularDifferentialChain (eqns, R, pretend = False)\n            >>> F = BaseFieldExtension (relations = C)\n\n        Let us start with a differential polynomial:\n\n            >>> eqn = x*Derivative(u(x),x)**2-(f(x,y)**2+1)*u(x)\n\n        The numerical coefficients and the corresponding monomials:\n\n            >>> R.coeffs (eqn)\n                                       2                       \n                             /d       \\    2                   \n            ([1, -1, -1], [x*|--(u(x))| , f (x, y)*u(x), u(x)])\n                             \\dx      /                        \n\n        The coefficients of eqn with respect to\n        Derivative(f(x,y),x). The variables x and f(x,y), both less\n        than Derivative(f(x,y),x), with respect to the ranking, arise\n        in the coefficients:\n\n            >>> R.coeffs (eqn, Derivative(f(x,y),x))\n                                             2        \n                    2              /d       \\         \n            ([x, - f (x, y) - 1], [|--(u(x))| , u(x)])\n                                   \\dx      /         \n\n        The coefficients of eqn, viewed as a differential polynomials\n        with coefficients in F:\n\n            >>> R.coeffs (eqn, basefield = F)\n                                             2        \n                    2              /d       \\         \n            ([x, - f (x, y) - 1], [|--(u(x))| , u(x)])\n                                   \\dx      /         \n\n        The coefficients of eqn, viewed as a differential polynomials\n        with coefficients in Q(x,y):\n\n            >>> R.coeffs (eqn, basefield = BaseFieldExtension ())\n                                ""     2                       \n                           /d       \\    2                   \n            ([x, -1, -1], [|--(u(x))| , f (x, y)*u(x), u(x)])\n                           \\dx      /                        \n\n        The coeffs function applies to rational fractions too:\n\n            >>> eqn = x*Derivative(u(x),x)**2-u(x)/Derivative(f(x,y),x)\n\n        The numerical coefficients and the corresponding monomials,\n        in the extended sense:\n\n            >>> R.coeffs (eqn)\n                                   2               \n                         /d       \\      u(x)      \n            ([1, -1], [x*|--(u(x))| , -----------])\n                         \\dx      /   d            \n                                      --(f(x, y))  \n                                      dx           \n\n        The coefficients of eqn, viewed as a differential polynomials\n        with coefficients in F:\n\n            >>> R.coeffs (eqn, basefield = F)\n                                          2        \n                     -1         /d       \\         \n            ([x, -----------], [|--(u(x))| , u(x)])\n                 d              \\dx      /         \n                 --(f(x, y))                       \n                 dx                                \n\n        The coefficients of eqn, viewed as a differential polynomials\n        with coefficients in Q(x,y):\n\n            >>> R.coeffs (eqn, basefield = BaseFieldExtension ())\n                                 2               \n                       /d       \\      u(x)      \n            ([x, -1], [|--(u(x))| , -----------])\n                       \\dx      /   d            \n                                    --(f(x, y))  \n                                    dx           \n        ";
static const char __pyx_k_The_initial_of_a_polynomial_or[] = "\n        The initial of a polynomial or a rational fraction\n\n        INPUT:\n\n            `equations` -- a rational fraction or a list of rational \n                             fractions \n            `notation`  -- (default: 'undefined') a string\n\n        OUTPUT:\n\n            The list of the initials of the equations, i.e. the\n            leading coefficients of the equations with respect to\n            their leading derivatives.\n\n            The initial of a rational fraction F = P/Q, with leading\n            derivative u, is itself a rational fraction: the leading\n            coefficient of P with respect to u, divided by the leading\n            coefficient of Q with respect to u, recalling that the\n            leading coefficient with respect to u, of a polynomial. R\n            which does not depend on u, is defined as R itself.\n\n        NOTES:\n\n            The above definition is not yet fully implemented.\n\n        EXAMPLES:\n\n            >>> from sympy import *\n            >>> from DifferentialAlgebra import *\n            >>> init_printing (use_unicode = False, num_columns = 60)\n\n            >>> t = var ('t')\n            >>> u,v = function ('u,v')\n            >>> R = DifferentialRing (derivations = [t], blocks = [u,v])\n            >>> L = [t, v(t)*u(t)**2 - u(t) + Derivative(v(t),t) + 1, \n            ...      t*u(t)/Derivative(v(t),t)]\n            >>> R.initial (L)\n                         t     \n            [1, v(t), --------]\n                      d        \n                      --(v(t)) \n                      dt       \n        ";
static const char __pyx_k_The_leading_rank_of_a_rational[] = "\n        The leading rank of a rational fraction\n\n        INPUT:\n\n            `equations` -- a rational fraction or a list of rational \n                             fractions \n            `listform`  -- (default: False) a bool\n            `notation`  -- (default: 'undefined') a string\n\n        OUTPUT:\n\n            The list of the leading ranks of the equations.\n\n            If the optional parameter `listform` is True, then the\n            ranks are returned as lists rather than monomials. This is\n            feature is relevant when the rank is a derivative raised\n            at the zeroth power.\n\n            The leading rank of a rational fraction F = P/Q is defined\n            as the leading derivative u of F, raised at the power\n            deg(P,u) - deg(Q,u).\n\n            Nonzero constant rational fractions have leading rank 1.\n\n            The zero rational fraction has leading rank 0.\n\n        EXAMPLES:\n\n            >>> from sympy import *\n            >>> from DifferentialAlgebra import *\n            >>> init_printing (use_unicode = False, num_columns = 60)\n\n            >>> t = var ('t') \n            >>> u,v = function ('u,v')\n            >>> R = DifferentialRing (derivations = [t], blocks = [u,v])\n            >>> L = [t, u(t)**2 - u(t), Derivative(v(t),t), 1/v(t)]\n\n        The list of leading ranks of the elements of L, in monomial\n        form m:\n\n            >>> R.leading_rank (L)\n                 2     d          1   \n            [t, u (t), --(v(t)), ----]\n                       dt        v(t) \n\n        The same list, in list form:\n\n            >>> R.leading_rank (L, listform = True)\n                                 d                        \n            [[t, 1], [u(t), 2], [--(v(t)), 1], [v(t), -1]]\n                                 dt                       \n\n        The case of a single rational fraction:\n\n            >>> R.leading_rank (1/u(t)**2)\n              1  \n            -----\n             ""2   \n            u (t)\n\n        The case of a rank, being a derivative raised at the zeroth\n        power:\n\n            >>> R.leading_rank ((u(t)-1)/(u(t)+2))\n            1\n        ";
static const char __pyx_k_The_leading_ranks_of_a_regular[] = "\n        The leading ranks of a regular differential chain\n\n        INPUT:\n\n            `listform`  -- (default: False) a bool\n            `notation`  -- (default: 'undefined') a string\n\n        OUTPUT:\n\n            The list of the leading ranks of the elements of the\n            chain. See the documentation of differential rings.\n\n            If the optional parameter `listform` is True, then the\n            ranks are returned as lists rather than monomials.\n\n        EXAMPLES:\n\n            >>> from sympy import *\n            >>> from DifferentialAlgebra import *\n            >>> init_printing (use_unicode = False, num_columns = 60)\n\n            >>> x,y = var ('x,y')\n            >>> u,v = indexedbase ('u,v')\n            >>> R = DifferentialRing (derivations = [x,y], \n            ...             blocks = [[v,u]], notation = 'jet')\n            >>> eq1 = u[x]**2 - 4*u\n            >>> eq2 = u[x,y]*v[y] - u + 1\n            >>> eq3 = v[x,x] - u[x]\n            >>> ideal = R.RosenfeldGroebner ([eq1,eq2,eq3])\n            >>> ideal\n            [regular_differential_chain]\n\n            >>> C = ideal [0]  \n            >>> C.leading_rank()      \n                 2      2                \n            [u[y] , u[x] , v[y], v[x, x]]\n        ";
static const char __pyx_k_The_regular_differential_chain[] = " \n        The regular differential chain defining the relations of a\n        base field extension\n\n        INPUT:\n\n            Nothing\n\n        OUTPUT:\n\n            A regular differential chain. If no relations were provided\n            at the field construction, the regular differential chain\n            is the zero chain.\n\n        EXAMPLES:\n\n            >>> from sympy import *\n            >>> from DifferentialAlgebra import *\n            >>> init_printing (use_unicode = False, num_columns = 60)\n\n            >>> a,b = var ('a,b')\n            >>> R = DifferentialRing (derivations = [], blocks = [a,b])\n            >>> C = RegularDifferentialChain ([a**2 + 1], R)\n            >>> F = BaseFieldExtension (generators = [a,b], \n            ...                         relations = C)\n            >>> F.relations ()\n            regular_differential_chain\n\n            >>> F.relations ().equations ()\n              2     \n            [a  + 1]\n        ";
static const char __pyx_k_pyx_unpickle_BaseFieldExtensio[] = "__pyx_unpickle_BaseFieldExtension";
static const char __pyx_k_A_selection_in_a_list_of_polyno[] = "\n        A selection in a list of polynomials\n\n        INPUT:\n\n            `equations` -- a polynomial or a list of polynomials \n            `solved`    -- (default: False) a boolean\n            `selection` -- (default: None) a relational expression\n            `notation`  -- (default: 'undefined') a string\n\n        OUTPUT:\n\n            The same list, but processed according to the other\n            parameters.\n\n            If `solved` is True, the differential polynomials are\n            displayed as equations, solved with respect to their\n            leading rank.\n\n            The optional parameter `selection` is a relational\n            expression combining one of the keywords 'order', 'leader',\n            'rank' on the one side, with a value on the other side,\n            using one of the relational operators. Only the equations\n            which satisfy the condition are selected.\n\n            - If the keyword is 'order', then the value must be a\n              nonnegative integer.\n\n            - If the keyword is 'rank', then the value must be a\n              rank, including the special ranks 0 and 1.\n\n            - If the keyword is 'leader', and the relational\n              operator is '>=', '>', '<=' or '<', then the value must\n              be a derivative.\n\n            - If the keyword is 'leader', and the relational\n              operator is '==' or '!=', then the value may also have\n              the form: 'modifier' (derivative), where 'modifier'\n              is one of the keywords 'derivative' or 'proper'.\n\n        EXAMPLES:\n\n            >>> from sympy import *\n            >>> from DifferentialAlgebra import *\n            >>> init_printing (use_unicode = False, num_columns = 60)\n\n            >>> x,y = var('x,y')\n            >>> w,z,a = function ('w,z,a') \n            >>> R = DifferentialRing (derivations = [x,y], \n            ...             blocks = [[w,a],z], parameters = [a(y)]) \n            >>> L"" = [0, 18, a(y)**2, Derivative(a(y),y), w(x,y)-z(x,y)]\n            >>> leader,order,rank = var('leader,order,rank')\n            >>> derivative,proper = function('derivative,proper')\n\n        Basic call:\n\n            >>> R.equations (L) \n                     2     d                           \n            [0, 18, a (y), --(a(y)), w(x, y) - z(x, y)]\n                           dy                          \n\n        The only polynomial with rank 0 is 0:\n\n            >>> R.equations (L, selection = Eq(rank,0))\n            [0]\n\n        The polynomials with rank 1 are the nonzero numbers:\n\n            >>> R.equations (L, selection = Eq(rank,1))\n            [18]\n\n        The polynomials which are not numbers, solved with respect to\n        their leaders:\n\n            >>> R.equations (L, solved = True, selection = rank > 1)\n              2         d                               \n            [a (y) = 0, --(a(y)) = 0, w(x, y) = z(x, y)]\n                        dy                              \n\n        The polynomials whose leaders are derivatives of a(y):\n\n            >>> R.equations (L, selection = Eq(leader,derivative(a(y))))\n              2     d        \n            [a (y), --(a(y))]\n                    dy       \n\n        The polynomials whose leaders are derivatives of w(x,y),\n        solved with respect to their leaders:\n\n            >>> R.equations (L, solved = True, \n            ...              selection = Eq(leader,derivative (w(x,y))))\n            [w(x, y) = z(x, y)]\n\n        Solving a single equation with respect to its leading\n        derivative:\n\n            >>> R.equations (w(x,y) - a(y), solved=True)\n            w(x, y) = a(y)\n        ";
static const char __pyx_k_BaseFieldExtension__process_not[] = "_BaseFieldExtension__process_notation";
static const char __pyx_k_Change_of_ranking_for_regular_c[] = "\n        Change of ranking for regular chains defining prime ideals\n\n        INPUT:\n\n            `R`          -- (default: None) a differential ring\n            `prime`      -- (default: False) a bool\n            `notation`   -- (default: 'undefined') a string\n            `timeout`    -- (default: 0) a nonnegative integer\n            `memout`     -- (default: 0) a nonnegative integer\n\n        OUTPUT:\n\n            A regular differential chain defining the same ideal as\n            `self`, with respect to the ranking of `R`.\n\n            The differential ring `R` must define the same mathematical\n            differential ring as the underlying ring of `self` (only\n            the ranking should be different).\n\n            The optional parameter `prime` permit to force the\n            application of the algorithm over `self`, even if `self`\n            does not define a prime ideal.\n\n            `timeout` and `memout` permit to limit in seconds and\n            megabytes, the resources allowed for the computation.\n\n        NOTES:\n\n            The implemented algorithm is the PARDI algorithm. See\n            references below.\n\n        REFERENCES:\n\n            [BLM10] Fran\303\247ois Boulier, Fran\303\247ois Lemaire and Marc\n            Moreno Maza.  Computing differential characteristic sets\n            by change of ordering.  Journal of Symbolic Comp. 45(1),\n            pp. 124-149. 2010\n\n        EXAMPLES:\n\n            >>> from sympy import *\n            >>> from DifferentialAlgebra import *\n            >>> init_printing (use_unicode = False, num_columns = 60)\n\n            >>> x,y = var ('x,y')\n            >>> u,v = indexedbase ('u,v')\n            >>> R = DifferentialRing (derivations = [x,y], \n            ...             blocks = [[v,u]], notation = 'jet')\n            >>> eq1 = u[x]**2 - 4*u\n            >>> eq2 = u[x,y]*v[y] - u + 1\n            >>> eq3 = v[x,x] - u[x]\n            >>> ideal = R.RosenfeldGroebner ([eq1,""eq2,eq3])\n            >>> ideal\n            [regular_differential_chain]\n\n        The regular differential chain C defines a prime ideal.\n        Its ranking is orderly:\n\n            >>> C = ideal [0]  \n            >>> C.equations (solved = True)\n                 2            2               u[x]*u[y]*u - u[x]*u[y]  >\n            [u[y]  = 2*u, u[x]  = 4*u, v[y] = -----------------------, >\n                                                        4*u            >\n            |  \n            >                 \n            >  v[x, x] = u[x]]\n            >                 \n\n        The ring Rbar is mathematically equivalent to R, but with\n        respect to an elimination ranking:\n\n            >>> Rbar = DifferentialRing (derivations = [x,y], \n            ...                 blocks = [u,v], notation = 'jet')\n\n        Perform the change of ranking, claiming that the ideal is prime:\n\n            >>> Cbar = C.change_ranking (Rbar, prime=True)\n            >>> Cbar.equations (solved = True)\n                                                                   3   >\n                    4            2         2                v[y, y]  - >\n            [v[y, y]  = 2*v[y, y]  + 2*v[y]  - 1, v[x, y] = ---------- >\n                                                                   v[y >\n            |  \n            >                                             \n            >  v[y, y]                                  2 \n            > --------, v[x, x] = 2*v[y, y], u = v[y, y] ]\n            > ]                                           \n        ";
static const char __pyx_k_DenefLipshitzUple_DenefLipshitz[] = "DenefLipshitzUple.DenefLipshitz";
static const char __pyx_k_DenefLipshitzUple__process_nota[] = "_DenefLipshitzUple__process_notation";
static const char __pyx_k_DifferentialRing__listof_symbol[] = "_DifferentialRing__listof_symbols";
static const char __pyx_k_DifferentialRing__process_evdic[] = "_DifferentialRing__process_evdict";
static const char __pyx_k_DifferentialRing__process_notat[] = "_DifferentialRing__process_notation";
static const char __pyx_k_DifferentialRing_equations_line[] = "DifferentialRing.equations (line 562)";
static const char __pyx_k_DifferentialRing_integrate_line[] = "DifferentialRing.integrate (line 1735)";
static const char __pyx_k_DifferentialRing_sort_line_2161[] = "DifferentialRing.sort (line 2161)";
static const char __pyx_k_DifferentialRing_tail_line_1513[] = "DifferentialRing.tail (line 1513)";
static const char __pyx_k_Differentiate_a_rational_differ[] = "\n        Differentiate a rational differential fraction\n\n        INPUT:\n\n            `equations` -- a rational fraction or a list of \n                             rational fractions \n            `args`      -- a possibly empty sequence of monomials \n                             involving independent variables only\n            `notation`  -- (default: 'undefined') a string\n\n        OUTPUT:\n\n            The list of derivatives of the equations, with respect to\n            the product of the monomials given in `args`. The monomials\n            must depend on independent variables only.\n\n        EXAMPLES:\n\n            >>> from sympy import *\n            >>> from DifferentialAlgebra import *\n            >>> init_printing (use_unicode = False, num_columns = 60)\n\n            >>> t = var ('t')\n            >>> u,v = function ('u,v')\n            >>> R = DifferentialRing (derivations = [t], blocks = [u,v])\n            >>> eq = u(t)**2\n\n        Do not differentiate at all:\n\n            >>> R.differentiate (eq)\n             2   \n            u (t)\n\n        Differentiate twice with respect to t:\n\n            >>> R.differentiate (eq, t, t)\n                    2                      2\n                   d             /d       \\ \n            2*u(t)*---(u(t)) + 2*|--(u(t))| \n                     2           \\dt      / \n                   dt                       \n\n        Another way to differentiate twice with respect to t:\n\n            >>> R.differentiate (eq, t**2) \n                    2                      2\n                   d             /d       \\ \n            2*u(t)*---(u(t)) + 2*|--(u(t))| \n                     2           \\dt      / \n                   dt                       \n        ";
static const char __pyx_k_Evaluate_a_differential_fractio[] = "\n        Evaluate a differential fraction at a dictionary\n\n        INPUT:\n\n            `P`      -- a differential fraction or a list of\n                          differential fractions\n            `evdict` -- a dictionary\n\n        OUTPUT:\n\n            The expression `P` evaluated at `evdict`\n\n        EXAMPLES:\n\n            >>> from sympy import *\n            >>> from DifferentialAlgebra import *\n            >>> init_printing (use_unicode = False, num_columns = 60)\n\n            >>> x = var('x')\n            >>> y = indexedbase('y')\n            >>> R = DifferentialRing (derivations = [x], blocks = [y], \n            ...                       notation = 'jet')\n\n        An order two differential polynomial in jet notation:\n\n            >>> edo = y*y[x,x] + y[x]**2 - 6*y\n\n        A truncated series:\n\n            >>> ybar = Add(*[y[i]*x**i for i in range (5)])\n            >>> ybar\n             4         3         2                     \n            x *y[4] + x *y[3] + x *y[2] + x*y[1] + y[0]\n\n        The differential polynomial evaluated at the series:\n\n            >>> serie = R.evaluate (edo, {y:ybar})\n            >>> serie\n                                                                       >\n                 4           3           2                   / 4       >\n            - 6*x *y[4] - 6*x *y[3] - 6*x *y[2] - 6*x*y[1] + \\x *y[4]  >\n                                                                       >\n                                                                       >\n            |  \n            >                                       2                  >\n            >    3         2                     \\ d  / 4         3    >\n            > + x *y[3] + x *y[2] + x*y[1] + y[0]/*---\\x *y[4] + x *y[ >\n            >                                        2                 >\n            >                                      dx                  >\n            |  \n            >                                     ""                     >\n            >       2                     \\   /d / 4         3         >\n            > 3] + x *y[2] + x*y[1] + y[0]/ + |--\\x *y[4] + x *y[3] +  >\n            >                                 \\dx                      >\n            >                                                          >\n            |  \n            >                          2         \n            >  2                     \\\\          \n            > x *y[2] + x*y[1] + y[0]/|  - 6*y[0]\n            >                         /          \n            >                                    \n\n        The series in collected form:\n\n            >>> collect (expand (serie.doit ()), x)\n                6     2       5              4 /                       >\n            28*x *y[4]  + 42*x *y[3]*y[4] + x *\\30*y[2]*y[4] + 15*y[3] >\n            |  \n            > 2         \\    3                                         >\n            >   - 6*y[4]/ + x *(20*y[1]*y[4] + 20*y[2]*y[3] - 6*y[3])  >\n            |  \n            >    2 /                                    2         \\    >\n            > + x *\\12*y[0]*y[4] + 12*y[1]*y[3] + 6*y[2]  - 6*y[2]/ +  >\n            |  \n            >                                                          >\n            > x*(6*y[0]*y[3] + 6*y[1]*y[2] - 6*y[1]) + 2*y[0]*y[2] - 6 >\n            |  \n            >             2\n            > *y[0] + y[1] \n\n        Observe c is not a differential indeterminate:\n\n            >>> c = var('c')\n            >>> ybar = Rational(1/4)*(c + 2*x)**2\n\n        The series ybar is a zero of the differential polynomial:\n\n            >>> serie = R.evaluate (edo, {y:ybar})\n            >>> expand (serie.doit ())\n            0\n        ";
static const char __pyx_k_Extend_a_regular_differential_c[] = "\n        Extend a regular differential chain using RosenfeldGroebner\n\n        INPUT:\n\n            `equations`  -- a list of differential polynomials, \n                              polynomial equations or inequations\n            `basefield`  -- (default: None) a BaseFieldExtension\n            `attributes` -- (default: ['differential', 'autoreduced', \n                              'primitive', 'squarefree', 'normalized', \n                              'coherent']) a list of strings\n            `singsol`    -- (default: 'all') a string\n            `dimlb`      -- (default: 'safecase') a string\n            `notation`   -- (default: 'undefined') a string\n            `timeout`    -- (default: 0) a nonnegative integer\n            `memout`     -- (default: 0) a nonnegative integer\n\n        OUTPUT:\n\n            A list of regular differential chains.\n\n            Let A be the set of differential polynomials of `self`\n            and I the differential ideal that it defines.  Let S be\n            the set of the initials of A, plus its separants if A is\n            differential or squarefree.\n\n            This variant enlarges `equations` with A = 0, S != 0\n            before executing the classical RosenfeldGroebner method.\n            The output ideals all contain the ideal I.\n\n        EXAMPLES:\n\n            >>> from sympy import *\n            >>> from DifferentialAlgebra import *\n            >>> init_printing (use_unicode = False, num_columns = 60)\n\n            >>> x = var('x')\n            >>> y,z = indexedbase ('y,z')\n            >>> R = DifferentialRing (derivations = [x], \n            ...             blocks = [z,y], notation = 'jet')\n\n            >>> f = y[x]**2 - 4*y\n            >>> g = z[x]**2 - y*z\n\n        Let us start with a single regular differential chain made of\n        f and extend it using g:\n\n            >>> C = RegularDifferentialChain ([f], R)\n            >>> ideal = C.RosenfeldGroebner ([g])\n            >>> ""ideal\n            [regular_differential_chain, regular_differential_chain]\n\n        The above output contains one less regular differential chain\n        than the one of the following call to the classical method:\n\n            >>> ideal = R.RosenfeldGroebner ([f,g])\n            >>> ideal\n            [regular_differential_chain, regular_differential_chain, r >\n            |  \n            > egular_differential_chain]\n        ";
static const char __pyx_k_Integrate_a_rational_differenti[] = "\n        Integrate a rational differential fraction\n\n        INPUT:\n\n            `equations` -- a rational fraction or a list of rational \n                             fractions\n            `variable`  -- a variable\n            `iterated`  -- (default: True) a bool\n            `notation`  -- (default: 'undefined') a string\n\n        OUTPUT:\n\n            A list of rational fractions, representing a decomposition\n            of the equation or, a list of lists of rational fractions if\n            `equations` is a list.\n\n            The parameter `variable` must be an independent variable.\n\n            Assume `equations` is a single rational fraction. Denote\n            R the differential ring, F the rational fraction, t the\n            independent variable and L the returned list. Then we have:\n\n            F == add(R.differentiate (L[i],t**i) for i in range(len(L)))\n\n            Moreover, if F is the derivative of some other rational\n            fraction, with respect to t, then L[0] is zero.\n\n            The returned list is ranking dependent. Orderly rankings\n            usually give more interesting results.\n\n        EXAMPLES:\n\n            >>> from sympy import *\n            >>> from DifferentialAlgebra import *\n            >>> init_printing (use_unicode = False, num_columns = 60)\n\n            >>> t = var ('t')\n            >>> u,v = function ('u,v')\n            >>> R = DifferentialRing (derivations = [t], \n            ...             blocks = [[u,v]])\n\n        Observe that the above ranking is orderly.\n\n            >>> eq = Derivative(u(t),t)**2 + Derivative(v(t)**2,t,t) \\\n            ...                     - Derivative(u(t)*v(t) + t*v(t), t)\n            >>> L = R.integrate (eq.doit(), t)\n            >>> L\n                       2                             \n             /d       \\                         2    \n            [|--(u(t))| , -t*v(t) - u(t)*v(t), v (t)]\n             \\dt      /                       ""       \n\n        The two expressions are equal, for their difference is 0:\n\n            >>> eq - Add (*[R.differentiate (L[i], t**i) \n            ...                             for i in range (len (L))])\n                                                                 2     >\n              d               d               d                 d      >\n            t*--(v(t)) + u(t)*--(v(t)) + v(t)*--(u(t)) - 2*v(t)*---(v( >\n              dt              dt              dt                  2    >\n                                                                dt     >\n            |  \n            >                                                   2    2 >\n            >              d                          /d       \\    d  >\n            > t)) + v(t) - --(t*v(t) + u(t)*v(t)) - 2*|--(v(t))|  + -- >\n            >              dt                         \\dt      /       >\n            >                                                       dt >\n            |  \n            >         \n            >  / 2   \\\n            > -\\v (t)/\n            > 2       \n            >         \n\n        The case of a rational fraction which is the derivative of\n        some other fraction:\n\n            >>> eq = (v(t)**2 + t)/(3*Derivative(v(t),t))              \n            >>> L = R.integrate (Derivative(eq, t).doit(), t)\n            >>> L\n                     2     \n                t + v (t)  \n            [0, ----------]\n                  d        \n                3*--(v(t)) \n                  dt       \n        ";
static const char __pyx_k_RegularDifferentialChain__latex[] = "RegularDifferentialChain._latex_";
static const char __pyx_k_RegularDifferentialChain__numbe[] = "_RegularDifferentialChain__number_of_equations";
static const char __pyx_k_RegularDifferentialChain__proce[] = "_RegularDifferentialChain__process_notation";
static const char __pyx_k_RegularDifferentialChain_change[] = "RegularDifferentialChain.change_ranking";
static const char __pyx_k_RegularDifferentialChain_indets[] = "RegularDifferentialChain.indets";
static const char __pyx_k_RegularDifferentialChain_normal[] = "RegularDifferentialChain.normal_form";
static const char __pyx_k_Ritt_s_reduction_algorithm_by_a[] = "\n        Ritt's reduction algorithm by a set of polynomials\n\n        INPUT:\n\n            `polynomial` -- a polynomial\n            `redset`     -- a list of polynomials with integer \n                              coefficients\n            `mode`       -- (default: 'full') a string\n            `notation`   -- (default: 'undefined') a string\n\n        OUTPUT:\n\n            A pair (h, r) such that h*p = r modulo the differential\n            ideal generated by `redset` (denoting p for `polynomial`).\n\n            The optional argument `mode` = 'full', 'partial' or\n            'algebraic'.  If 'full', the remainder r is fully reduced\n            with respect to `redset`.\n\n            If 'partial', the remainder r is partially reduced with\n            respect to `redset`. If 'algebraic', the remainder is\n            algebraically reduced with respect to `redset`.\n\n            In all cases, h is a product of powers of the initials\n            and separants involved in the reduction process.\n\n        NOTES:\n\n            So far, there is a single notation available, because of\n            limitations of function.\n\n        EXAMPLES:\n\n            >>> from sympy import *\n            >>> from DifferentialAlgebra import *\n            >>> init_printing (use_unicode=False, num_columns=60)\n\n        The examples are processed using the jet notation for\n        legibility:\n\n            >>> x,y = var ('x,y')\n            >>> u,v = indexedbase ('u,v')\n\n            >>> R = DifferentialRing (derivations = [x,y], \n            ...             blocks = [[v,u]], notation = 'jet')\n\n        Note that the parsers accept all notations:\n\n            >>> eq1 = u[x]**2 - 4*u\n            >>> eq2 = u[x,y]*v[y] - u + 1\n            >>> eq3 = v[x,x] - u[x]\n            >>> redset = [eq1, eq2, eq3]\n\n        The reduction set:\n\n            >>> R.equations (redset, solved = True)\n                 2                  u - 1                 \n            [u[x]  ""= 4*u, u[x, y] = -----, v[x, x] = u[x]]\n                                    v[y]                  \n\n        The first polynomial is fully reduced with respect to redset:\n\n            >>> poly = (1/Integer(7))*u\n            >>> h, r = R.differential_prem (poly, redset)\n            >>> h, r\n                u \n            (1, -)\n                7 \n\n        Check that h * poly = r modulo the ideal defined by redset:\n\n            >>> ideal = R.RosenfeldGroebner (redset)\n            >>> C = ideal [0]\n            >>> C.normal_form (h * poly - r)\n            0\n\n        The next polynomial is not fully reduced with respect to redset:\n\n            >>> poly = (1/Integer(7))*v[x,y] + u[x,x]\n            >>> h, r = R.differential_prem (poly, redset)\n            >>> h, r\n                     2*(v[x, y] + 14)*u[x] \n            (2*u[x], ---------------------)\n                               7           \n\n        It is not partially reduced either:\n\n            >>> h, r = R.differential_prem (poly, redset, \n            ...                             mode = 'partial')\n            >>> h, r\n                     2*(v[x, y] + 14)*u[x] \n            (2*u[x], ---------------------)\n                               7           \n\n        However, it is algebraically reduced with respect to redset:\n\n            >>> h, r = R.differential_prem (poly, redset, \n            ...                             mode = 'algebraic')\n            >>> h, r\n                          v[x, y] \n            (1, u[x, x] + -------)\n                             7    \n        ";
static const char __pyx_k_Sort_a_list_of_polynomials_acco[] = "\n        Sort a list of polynomials according to their leading monomials\n\n        INPUT:\n\n            `polynomials` -- a list of polynomials\n            `mode`        -- (default: 'increasing') a string\n            `notation`    -- (default: 'undefined') a string\n\n        OUTPUT:\n\n            The list polynomials, sorted by increasing leading monomial,\n            if `mode` is 'increasing', by decreasing leading monomial,\n            if `mode` is 'decreasing'.\n\n            The leading monomial of a nonzero numeric polynomial is 1.\n            The leading monomial of a nonzero, non numeric polynomial,\n            is the product of the leading rank of the polynomial, by\n            the leading monomial of its initial. Leading monomials are\n            compared lexicographically, with respect to the ranking.\n            This ordering is extended to 0, which is considered lower\n            than any other polynomial.\n\n        NOTES:\n\n            This function should be extended to rational fractions.\n\n        EXAMPLES:\n\n            >>> from sympy import *\n            >>> from DifferentialAlgebra import *\n            >>> init_printing (use_unicode = False, num_columns = 60)\n\n            >>> a,x,y = var ('a,x,y')\n            >>> u,v = function ('u,v')\n            >>> R = DifferentialRing (derivations = [x,y], \n            ...             blocks = [u,v,a], parameters = [a,v(y)])\n            >>> L = [Derivative(v(y),y,y), \n            ...         Derivative(v(y),y,y)**3, 0, a*u(x,y)**2, x]\n\n        The list L is sorted by increasing leading monomial:\n\n            >>> R.sort (L)\n                                         3             \n                    2         / 2       \\              \n                   d          |d        |      2       \n            [0, x, ---(v(y)), |---(v(y))| , a*u (x, y)]\n                     2        |  2      |              \n                   dy         \\dy       /              \n\n        By decr""easing leading monomial:\n\n            >>> R.sort (L, 'descending')\n                                    3                  \n                         / 2       \\    2              \n                2        |d        |   d               \n            [a*u (x, y), |---(v(y))| , ---(v(y)), x, 0]\n                         |  2      |     2             \n                         \\dy       /   dy              \n\n        Another example:\n\n            >>> L = [ u(x,y), u(x,y)*v(y), u(x,y)*v(y)**2, u(x,y)*v(y)*a ]\n            >>> R.sort (L, 'ascending')\n                                                             2    \n            [u(x, y), u(x, y)*v(y), a*u(x, y)*v(y), u(x, y)*v (y)]\n        ";
static const char __pyx_k_Split_a_derivative_into_derivat[] = "\n        Split a derivative into derivation operator and variable\n\n        INPUT:\n\n            `derivative` -- a derivative\n            `notation`   -- (default: 'undefined') a string\n\n        OUTPUT:\n\n            A pair (`theta`, `symb`) such that `derivative` is\n            the derivative of `symb` with respect to `theta`. The\n            derivation operator `theta` is expressed as a monomial on\n            the independent variables.\n\n        EXAMPLES:\n\n            >>> from sympy import *\n            >>> from DifferentialAlgebra import *\n            >>> init_printing (use_unicode = False, num_columns = 60)\n\n            >>> a,x,y = var ('a,x,y')\n            >>> u,v = function ('u,v')\n            >>> R = DifferentialRing (derivations = [x,y], \n            ...             blocks = [u,v,a], parameters = [a,v(y)])\n\n        A basic example:\n\n            >>> R.factor_derivative (Derivative(u(x,y),x))\n            (x, u(x, y))\n\n        A parameter is considered as a dependent variable which does\n        not depend on any independent variable. The monomial `theta`\n        is 1, meaning that a is not differentiated:\n\n            >>> R.factor_derivative (a)\n            (1, a)\n\n        The following examples illustrates the relationship between\n        factor_derivative and differentiate:\n\n            >>> derv = Derivative(u(x,y),x,x,y)\n            >>> derv\n               3           \n              d            \n            ------(u(x, y))\n                 2         \n            dy dx          \n\n            >>> theta, symb = R.factor_derivative (derv)\n            >>> theta, symb\n              2            \n            (x *y, u(x, y))\n\n            >>> R.differentiate (symb, theta)\n               3           \n              d            \n            ------(u(x, y))\n                 2         \n            dy dx          \n        ";
static const char __pyx_k_Test_if_an_expression_is_a_rati[] = "\n        Test if an expression is a rational differential fraction\n\n        INPUT:\n\n            `equations` -- an expression or a list of expressions\n            `notation`  -- (default: 'undefined') a string\n\n        OUTPUT:\n\n            True or False\n\n        EXAMPLES:\n\n            >>> from sympy import *\n            >>> from DifferentialAlgebra import *\n            >>> init_printing (use_unicode = False, num_columns = 60)\n\n            >>> x = var('x')\n            >>> w = function('w')\n            >>> R = DifferentialRing (derivations = [x], blocks = [w])\n            >>> F = w(x)*Derivative(w(x),x) + x + 1\n            >>> R.is_differential_fraction([F, F**(-3)])\n            True\n        ";
static const char __pyx_k_The_DenefLipshitz_algorithm_INP[] = "\n        The DenefLipshitz algorithm\n\n        INPUT:\n\n            `equations`  -- a list of differential polynomials, \n                              polynomial equations or inequations\n            `Y`          -- a list of differential indeterminates\n            `Ybar`       -- a prolongation pattern\n            `q`          -- a variable\n            `x`          -- (default: None) an independent variable\n            `attributes` -- (default: ['differential', 'autoreduced', \n                             'primitive', 'squarefree', 'normalized', \n                             'coherent']) a list of strings\n            `control`    -- (default: 'vector') a string\n            `notation`   -- (default: 'undefined') a string\n            `timeout`    -- (default: 0) a nonnegative integer\n            `memout`     -- (default: 0) a nonnegative integer\n\n        OUTPUT:\n\n            A possibly empty list of DenefLipshitzUple describing the\n            formal power series solutions of `equations`.\n\n            If the list is empty, `equations` has no formal power\n            series solution.\n\n            If it is nonempty, each of its element provides at least\n            one formal power series solution to `equations`.\n\n            The algorithm is restricted to ordinary differential\n            systems.  The base field of the equations is the\n            field of the rational numbers. The equations must\n            be autonomous (they must not explicitly depend on the\n            independent variable `x`). Note that this restriction is\n            mathematically irrelevant since it is always possible to\n            encode nonautonomous differential equations as autonomous\n            ones by means of a change of independent variable and an\n            extra differential indeterminate.\n\n            The list `equations` may involve differential polynomials,\n            differential rational fractions, and, even relational\n            exp""ressions between differential rational fractions,\n            built using the '==' and '!=' operators. Differential\n            inequations are allowed but have a subtle interpretation in\n            the algorithm (note that the existence problem of nonzero\n            formal power series solutions is undecidable [Singer78]).\n\n            The argument `Ybar` establishes the relationship between\n            the differential indeterminates of `Y` and the coefficients\n            of their formal power series solutions.\n\n            The variable `q` is used to form the leading polynomial\n            associated to each DenefLipshitzUple.\n\n            The list `attributes` is provided to the RosenfeldGroebner\n            algorithm, which is called by DenefLipshitz. These\n            attributes are inherited by the regular differential chain\n            contained in each DenefLipshitzUple.\n\n            The possible values for `control` are 'vector' or 'single'.\n\n        NOTES:\n\n            A theoretical version of the DenefLipshitz algorithm is\n            provided in the proof of [DL84, Theorem 3.1]. The very\n            first version of this algorithm, relying on [BL24], was\n            implemented in April 2025 in BLAD.\n\n            The method actually calls the BLAD bas_Denef_Lipshitz\n            function.\n\n        REFERENCES:\n\n            [BL24] Fran\303\247ois Boulier and Fran\303\247ois Lemaire. On\n            Formal Power Series Solutions of Regular Differential\n            Chains. Proceedings of CASC 2024, LNCS 14938, pages 82-99,\n            2024.\n\n            [DL84] Jan Denef and Leonard Lipshitz. Power Series\n            Solutions of Algebraic Differential Equations. Mathematische\n            Annalen vol. 267, pages 213-238, 1984.\n\n            [Singer78] Michael Singer. The Model Theory of Ordered\n            Differential Fields. J. Symb. Logic vol. 43, pages 82-91,\n            1978.\n\n        EXAMPLES:\n\n           "" >>> from sympy import *\n            >>> from DifferentialAlgebra import *\n            >>> init_printing (use_unicode = False, num_columns = 60)\n            >>> x,q = var ('x,q')\n            >>> y = indexedbase ('y')\n\n        The differential indeterminate is y. The coefficients of its\n        formal power series solutions are ... > y[3] > y[2] > y[1]\n        > y[0]:\n\n            >>> R = DifferentialRing (blocks = [y,q,'(y)[oo:-1]'], \n            ...         derivations = [x], \n            ...         parameters = [q,'(y)[oo:-1]'], \n            ...         notation = 'jet')\n\n        The differential equation of the brachistochrone problem. Its\n        solutions are a family of cycloids and the singular solution\n        y(x) = 1:\n\n            >>> eqns = [ y*y[x]**2 + y - 1 ]\n\n        The list of the differential indeterminates for which formal\n        power series solutions are sought:\n\n            >>> Y = [y]\n\n        The relationship between the differential indeterminate y\n        and the coefficients of its formal power series solutions\n        is provided by Ybar. Over this example, the relationship\n        mathematically is:\n\n        y(x) = y[0] + y[1]*x + y[2]/2*x**2 + ... +\n        y[k]/factorial(k)*x**k + ...\n\n            >>> Ybar = { y['(x,k)'] : 'y[k]' } \n\n        The DenefLipshitz algorithm distingues three cases:\n\n            >>> DL = R.DenefLipshitz (eqns, Y, Ybar, q, x)\n            >>> DL\n            [Denef_Lipshitz_Uple, Denef_Lipshitz_Uple, Denef_Lipshitz_ >\n            |  \n            > Uple]\n\n        The first component corresponds to the singular solution.\n\n            >>> DL[0].series ()\n            {y: 1}\n\n        The second component corresponds to the regular case of the\n        general solution:\n\n            >>> DL[1].series ()\n                     2                    \n                    x                     \n            {y: - ------- + x*y[1] + y[0]}\n                        2        ""         \n                  4*y[0]                  \n\n        The third component corresponds to a particular solution of\n        the general solution:\n\n            >>> DL[2].series ()\n                   4    2     \n                  x    x      \n            {y: - -- - -- + 1}\n                  48   4      \n        ";
static const char __pyx_k_The_Rosenfeld_Groebner_simplifi[] = "\n        The Rosenfeld-Groebner simplifier\n\n        INPUT:\n\n            `equations`  -- a list of differential polynomials, \n                              polynomial equations or inequations\n            `basefield`  -- (default: None) a BaseFieldExtension\n            `attributes` -- (default: ['differential', 'autoreduced', \n                              'primitive', 'squarefree', 'normalized', \n                              'coherent']) a list of strings\n            `singsol`    -- (default: 'all') a string\n            `dimlb`      -- (default: 'safecase') a string\n            `notation`   -- (default: 'undefined') a string\n            `timeout`    -- (default: 0) a nonnegative integer\n            `memout`     -- (default: 0) a nonnegative integer\n\n        OUTPUT:\n\n            A representation of the radical of the differential ideal\n            generated by `equations` (assuming, for simplicity, that\n            `equations` only involves differential polynomials), as an\n            intersection of radical differential ideals, presented by\n            regular differential chains, with respect to the ranking\n            of the DifferentialRing.\n\n            The list `equations` may involve differential polynomials,\n            differential rational fractions, and, even relational\n            expressions between differential rational fractions,\n            built using the '==' and '!=' operators. In the presence\n            of inequations (denominators of rational fractions, or\n            relational expression built using '!='), the defined ideal\n            is the radical of the differential ideal generated by the\n            equations of `equations`, saturated by the multiplicative\n            family generated by the inequations of `equations`.\n\n            If `basefield` is not specified, then any case implying a\n            relations between independent variables is discarded. If\n            `basefield` is specified, then, m""oreover, any case implying\n            the vanishing of some nonzero element of `basefield`\n            is discarded also.\n\n            The returned list may be empty, meaning the ideal is the\n            unit one and that `equations` has no solution.\n\n            If `equations` is empty then the output involves a single\n            regular differential chain, which describes the zero ideal.\n\n            The optional parameter `attributes` permit to specify\n            the attributes of the regular differential chains to\n            be computed.\n\n            The optional parameter `singsol` = 'all', 'essential',\n            'none'.  It controls the splittings performed by\n            RosenfeldGroebner.\n\n                - 'all' is the default value.\n\n                - 'essential' ensures that the returned decomposition is\n                  irredundant. It only applies in the case of a single\n                  equation, without any parameter.\n\n                - 'none' makes RosenfeldGroebner return at most one\n                   regular differential chain. This chain is the first\n                   one that would have been computed without this\n                   option. In many cases, this first chain could be\n                   considered as the general component, though this\n                   notion is not always mathematically well-defined.\n\n            The optional parameter `dimlb` = 'nocase', 'safecase',\n            'odecase', 'pdecase' controls the splittings performed by\n            RosenfeldGroebner by discarding any chain whose dimension\n            (differential dimension in the differential case) is lower\n            than the number of input equations.\n\n                - 'nocase' disables this option.\n\n                - 'safecase' is the default value. The option is only\n                  activated in the non-differential case and in the\n                  case of a single input equation. These two cases\n         ""         are theoretically proven.\n\n                - 'odecase' applies also the option to general ODE\n                  systems. The option implements a conjecture in this\n                  case (see Ritt, Questions for investigation, 10).\n\n                - 'pdecase' applies also the option to general PDE\n                  systems. The option implements a conjecture in this\n                  case. It is experimental.\n\n            If not defined using `notation`, the default notation of\n            the returned regular differential chains is the one of\n            the DifferentialRing.\n\n            `timeout` and `memout` permit to limit in seconds and\n            megabytes, the resources allowed for the computation.\n\n        NOTES:\n\n            The first version of the RosenfeldGroebner algorithm\n            appeared in 1994. It benefited from many improvements,\n            coming from many different people. The current version\n            is close to the one described in [Boulier06]. It does not\n            rely on any Gr\303\266bner basis computation.\n\n            The RosenfeldGroebner method contains also an implementation\n            of the Low Power Theorem, which is a major result of Ritt\n            and Kolchin. See also [Hubert99]. The implemented version\n            applies over differential base fields defined by generators\n            and relations.\n\n        REFERENCES:\n\n            [Boulier06] Fran\303\247ois Boulier. R\303\251\303\251criture alg\303\251brique dans\n            les syst\303\250mes d'\303\251quations diff\303\251rentielles polynomiales\n            en vue d'application dans les Sciences du Vivant. M\303\251moire\n            d'Habilitation \303\240 Diriger les Recherches. Universit\303\251\n            Lille I.  2006. http://tel.archives-ouvertes.fr/tel-00137153\n\n            [Hubert99] \303\211velyne Hubert. Essential Components of an\n            Algebraic Differential Equation. Journal of Symbolic""\n            Computation 28(4-5), pp. 657-680. 1999.\n\n        EXAMPLES:\n\n        The first example features one nonlinear ODE. According to the\n        Low Power Theorem, its solution y(x) = 0 is a singular solution:\n\n            >>> from sympy import *\n            >>> from DifferentialAlgebra import *\n            >>> init_printing (use_unicode = False, num_columns = 60)\n\n            >>> x = var('x')\n            >>> y = function ('y')\n            >>> R = DifferentialRing (derivations = [x], blocks = [y])\n            >>> L = R.RosenfeldGroebner (\n            ...         [Derivative(y(x),x)**2-4*y(x)], \n            ...         singsol = 'essential')\n            >>> L\n            [regular_differential_chain, regular_differential_chain]\n\n            >>> [C.equations () for C in L]\n                                  2          \n                        /d       \\           \n            [[-4*y(x) + |--(y(x))| ], [y(x)]]\n                        \\dx      /           \n\n        The second example features a system on nonlinear PDE. This\n        academic example illustrates what a system of differential\n        polynomials may look like, in general. Some integrability\n        conditions are computed:\n\n            >>> from DifferentialAlgebra import DifferentialRing\n            >>> x,y = var('x,y')\n            >>> u,v = function('u,v')\n            >>> R = DifferentialRing (derivations = [x,y], \n            ...             blocks = [[v,u]])\n            >>> eq1 = Derivative(u(x,y),x)**2 - 4*u(x,y)\n            >>> eq2 = Derivative(Derivative(u(x,y),x),y) * \\\n            ...                     Derivative(v(x,y),y) - u(x,y) + 1\n            >>> eq3 = Derivative(Derivative(v(x,y),x),x) - \\\n            ...                     Derivative(u(x,y),x)\n            >>> L = R.RosenfeldGroebner ([eq1, eq2, eq3])\n            >>> L\n            [regular_differential_chain]\n\n            >>> L[0].equations ()\n                                       2 ""                           2  >\n                          /d          \\                /d          \\   >\n            [-2*u(x, y) + |--(u(x, y))| , -4*u(x, y) + |--(u(x, y))| , >\n                          \\dy         /                \\dx         /   >\n                                                                       >\n            |  \n            >                                                          >\n            >            d           d                       d         >\n            >  - u(x, y)*--(u(x, y))*--(u(x, y)) + 4*u(x, y)*--(v(x, y >\n            >            dx          dy                      dy        >\n            >                                                          >\n            |  \n            >                                                2         >\n            >      d           d              d             d          >\n            > )) + --(u(x, y))*--(u(x, y)), - --(u(x, y)) + ---(v(x, y >\n            >      dx          dy             dx              2        >\n            >                                               dx         >\n            |  \n            >    \n            >    \n            > ))]\n            >    \n            >    \n        ";
static const char __pyx_k_The_constraints_of_a_DenefLipsh[] = "\n        The constraints of a DenefLipshitzUple\n\n        INPUT:\n\n            `notation`   -- (default: 'undefined') a string\n            `timeout`    -- (default: 0) a nonnegative integer\n            `memout`     -- (default: 0) a nonnegative integer\n\n        OUTPUT:\n\n            The list of the equations and inequations associated to a\n            DenefLipshitzUple. The equations form a regular differential\n            chain and are made of:\n\n            - the series defining differential equations\n\n            - polynomial equations constraining the series coefficients\n\n            The inequations only apply to the series coefficients.\n\n        EXAMPLES:\n\n            >>> from sympy import *\n            >>> from DifferentialAlgebra import *\n            >>> init_printing (use_unicode = False, num_columns = 60)\n\n            >>> x,q = var ('x,q')\n            >>> y = indexedbase ('y')\n            >>> R = DifferentialRing (blocks = [y,q,'(y)[oo:-1]'], \n            ...             derivations = [x], \n            ...             parameters = [q,'(y)[oo:-1]'], \n            ...             notation = 'jet')\n\n        The differential equation of the brachistochrone problem:\n\n            >>> eqns = [ y*y[x]**2 + y - 1 ]\n\n            >>> Y = [y]\n            >>> Ybar = { y['(x,k)'] : 'y[k]' }\n\n        The DenefLipshitz algorithms distingues three cases:\n\n            >>> DL = R.DenefLipshitz (eqns, Y, Ybar, q)\n            >>> DL\n            [Denef_Lipshitz_Uple, Denef_Lipshitz_Uple, Denef_Lipshitz_ >\n            |  \n            > Uple]\n\n        Here are the constraints of the first case. The differential\n        equation defines the constant function y(x) = 1. Initial values\n        are consistent:\n\n            >>> U = DL[0]\n            >>> U.constraints ()\n            [y[0] - 1 = 0, y[1] = 0, y - 1 = 0]\n\n        Here are the constraints of the second case. The differential\n        equation defines the general solution. T""he two inequations\n        show that this case applies to the regular points of the\n        general solution:\n\n            >>> U = DL[1]\n            >>> U.constraints ()\n                      2                       2                   2    >\n            [y[0]*y[1]  + y[0] - 1 = 0, 2*y[0] *y[2] + 1 = 0, y[x] *y  >\n            |  \n            >                                   \n            > + y - 1 = 0, y[0] != 0, y[1] != 0]\n\n        Here are the constraints of the third case. The differential\n        equation defines the general solution. The two first equations\n        show that the series starts from y[0] = 1 with a horizontal\n        tangent. The other equations show hat this case corresponds\n        to the branch of the cycloid starting from y[0] = 1:\n\n            >>> U = DL[2]\n            >>> U.constraints ()\n                                                                       >\n            [y[0] - 1 = 0, y[1] = 0, 2*y[2] + 1 = 0, y[3] = 0, 2*y[4]  >\n            |  \n            >              2                          \n            > + 1 = 0, y[x] *y + y - 1 = 0, y[2] != 0]\n        ";
static const char __pyx_k_The_embedding_differential_ring[] = " \n        The embedding differential ring of a regular differential chain\n\n        INPUT:\n\n            Nothing\n\n        OUTPUT:\n\n            The differential ring the chain belongs to.\n\n        EXAMPLES:\n\n            >>> from sympy import *\n            >>> from DifferentialAlgebra import *\n            >>> init_printing (use_unicode = False, num_columns = 60)\n\n            >>> x,y = var ('x,y')\n            >>> u,v = indexedbase ('u,v')\n            >>> R = DifferentialRing (derivations = [x,y], blocks = [u,v], \n            ...                       notation = 'jet')\n            >>> eq1 = Eq (u[x], v)\n            >>> eq2 = u[y]\n            >>> eq3 = v[y]\n            >>> C = RegularDifferentialChain ([eq1,eq2,eq3], R)\n\n        Recover the ring from the chain:\n\n            >>> S = C.differential_ring ()\n            >>> S\n            differential_ring\n        ";
static const char __pyx_k_The_formal_power_series_solutio[] = "\n        The formal power series solutions of a DenefLipshitzUple\n\n        INPUT:\n\n            `vars`       -- (default: []) a list\n            `notation`   -- (default: 'undefined') a string\n            `timeout`    -- (default: 0) a nonnegative integer\n            `memout`     -- (default: 0) a nonnegative integer\n\n        OUTPUT:\n\n            A dictionary associating truncated formal power series\n            solutions to each differential indeterminate for which\n            formal power series are sought.\n\n            If nonempty, the list `vars` must contain series\n            coefficients in symbolic form, such as y[6], z[8]\n            providing prolongation limits: series are prolongated up\n            (and including) to these terms.\n\n            If the list is empty, the series only are prolongated\n            up to the highest series coefficients occurring in the\n            DenefLipshitzUple constraints.\n\n        EXAMPLES:\n\n            >>> from sympy import *\n            >>> from DifferentialAlgebra import *\n            >>> init_printing (use_unicode = False, num_columns = 60)\n\n            >>> x,q = var ('x,q')\n            >>> y = indexedbase ('y')\n            >>> R = DifferentialRing (blocks = [y,q,'(y)[oo:-1]'], \n            ...             derivations = [x], \n            ...             parameters = [q,'(y)[oo:-1]'], \n            ...             notation = 'jet')\n\n        The differential equation of the brachistochrone problem:\n\n            >>> eqns = [ y*y[x]**2 + y - 1 ]\n\n            >>> Y = [y]\n            >>> Ybar = { y['(x,k)'] : 'y[k]' }\n\n        The DenefLipshitz algorithms distingues three cases:\n\n            >>> DL = R.DenefLipshitz (eqns, Y, Ybar, q)\n            >>> DL\n            [Denef_Lipshitz_Uple, Denef_Lipshitz_Uple, Denef_Lipshitz_ >\n            |  \n            > Uple]\n\n        The series associated to the first case is y(x) = 1:\n\n            >>> U = DL[0]\n            >>> U.series"" ()\n            {y: 1}\n\n        The series associated to the third case corresponds to a branch\n        of a cycloid starting from y[0] = 1:\n\n            >>> U = DL[2]\n            >>> U.series ()\n                   4    2     \n                  x    x      \n            {y: - -- - -- + 1}\n                  48   4      \n\n        Since this series does not depend on any parameter, it is\n        possible to extend it to an arbitrary order:\n\n            >>> U.series ([y[9]])\n                      8       6    4    2     \n                  73*x    11*x    x    x      \n            {y: - ----- - ----- - -- - -- + 1}\n                  80640   2880    48   4      \n        ";
static const char __pyx_k_The_indeterminates_of_a_Differe[] = "\n        The indeterminates of a DifferentialRing or a rational fraction\n\n        INPUT:\n\n            `equations`  -- (default: None) a rational fraction\n                              or a list of rational fractions\n            `selection`  -- (default: 'derivatives') a string\n            `derivation` -- (default: None) a variable\n            `notation`   -- (default: 'undefined') a string\n\n        OUTPUT:\n\n            A list of variable and function, selected according to\n            `selection`. See the examples below.\n\n        EXAMPLES:\n\n            >>> from sympy import *\n            >>> from DifferentialAlgebra import *\n            >>> init_printing (use_unicode = False, num_columns = 60)\n\n            >>> x,y,z,t = var ('x,y,z,t')\n            >>> u,v,w = function ('u,v,w')\n            >>> R = DifferentialRing (derivations = [x,y,t], \n            ...             blocks = [u,[v,w],z], \n            ...             parameters = [u(t,y,x),z,w(y)])\n\n        With no selection, or with 'derivatives' or 'dependent',\n        return the list of the dependent variables (or differential\n        indeterminates) of R:\n\n            >>> R.indets ()\n            [u(t, y, x), v(x, y, t), w(y), z]\n\n        With 'derivations' or 'independent', return the list of the\n        derivations (or independent variables) of R:\n\n            >>> R.indets (selection = 'derivations')\n            [x, y, t]\n\n        With 'parameters', return the list of the parameters of R:\n\n            >>> R.indets (selection = 'parameters')\n            [u(t, y, x), w(y), z]\n\n        With 'all', return the list of the independent and the dependent\n        variables of R:\n\n            >>> R.indets (selection = 'all')\n            [x, y, t, u(t, y, x), v(x, y, t), w(y), z]\n\n        With 'constants', possibly followed by a derivation, return\n        the list of the dependent variables the derivatives (with\n        respect to the derivation, if any) of which, are z""ero:\n\n            >>> R.indets (selection = 'constants')\n            [z]\n\n        The indets of a rational fraction:\n\n            >>> eq = u(t,y,x) + 1/w(y)\n            >>> R.indets (eq)\n            [u(t, y, x), w(y)]\n        ";
static const char __pyx_k_The_indeterminates_of_a_Regular[] = "\n        The indeterminates of a RegularDifferentialChain\n\n        INPUT:\n\n            `selection`  -- (default: 'derivatives') a string\n            `notation`   -- (default: 'undefined') a string\n\n        OUTPUT:\n\n            A list of variable and indexedbase, selected according to\n            `selection`. See the examples below.\n\n        EXAMPLES:\n\n            >>> from sympy import *\n            >>> from DifferentialAlgebra import *\n            >>> init_printing (use_unicode = False, num_columns = 60)\n\n            >>> x,y = var ('x,y')\n            >>> u,v = indexedbase ('u,v')\n            >>> R = DifferentialRing (derivations = [x,y], \n            ...             blocks = [[v,u]], notation = 'jet')\n            >>> eq1 = u[x]**2 - 4*u\n            >>> eq2 = u[x,y]*v[y] - u + 1\n            >>> eq3 = v[x,x] - u[x]\n            >>> ideal = R.RosenfeldGroebner ([eq1,eq2,eq3])\n            >>> ideal\n            [regular_differential_chain]\n\n            >>> C = ideal [0]  \n\n        With no selection, or with 'derivatives', return the list of\n        the derivatives occurring in the elements of C:\n\n            >>> C.indets ()\n            [u, u[x], v[y], v[x, x], u[y]]\n\n            >>> C.indets (selection = 'derivatives')\n            [u, u[x], v[y], v[x, x], u[y]]\n\n        With 'dependent', return the list of the differential\n        indeterminates, or dependent variables, occurring in the\n        elements of C:\n\n            >>> C.indets (selection = 'dependent')  \n            [v, u]\n\n        With 'parameters', return the list of the parameters occurring\n        in the elements of C:\n\n            >>> C.indets (selection = 'parameters')\n            []\n\n        With 'all', return the list of the independent and the dependent\n        variables occurring in the elements of C:\n\n            >>> C.indets (selection = 'all')       \n            [u, u[x], v[y], v[x, x], u[y]]\n        ";
static const char __pyx_k_The_initials_of_a_regular_diffe[] = "\n        The initials of a regular differential chain\n\n        INPUT:\n\n            `notation`  -- (default: 'undefined') a string\n\n        OUTPUT:\n\n            The list of initials of the regular differential chain.\n\n            See the documentation of differential rings.\n\n        EXAMPLES:\n\n            >>> from sympy import *\n            >>> from DifferentialAlgebra import *\n            >>> init_printing (use_unicode = False, num_columns = 60)\n\n            >>> x,y = var ('x,y')\n            >>> u,v = indexedbase ('u,v')\n            >>> R = DifferentialRing (derivations = [x,y], \n            ...             blocks = [[v,u]], notation = 'jet')\n            >>> eq1 = u[x]**2 - 4*u\n            >>> eq2 = u[x,y]*v[y] - u + 1\n            >>> eq3 = v[x,x] - u[x]\n            >>> ideal = R.RosenfeldGroebner ([eq1,eq2,eq3])\n            >>> ideal\n            [regular_differential_chain]\n\n            >>> C = ideal [0]  \n            >>> C.initial ()\n            [1, 1, 4*u, 1]\n        ";
static const char __pyx_k_The_leading_coefficient_of_a_ra[] = "\n        The leading coefficient of a rational fraction\n\n        INPUT:\n\n            `equations` -- a rational fraction or a list of rational \n                             fractions\n            `variable`  -- (default: None) a variable\n            `notation`  -- (default: 'undefined') a string\n\n        OUTPUT:\n\n            The list of the leading coefficients of the equations,\n            with respect to `variable`. If `variable` is None, the\n            list of the initials of the equations is returned.\n\n            The leading coefficient of a rational fraction F = P/Q,\n            with respect to some derivative u, is a rational fraction:\n            it is the leading coefficient of P with respect to u,\n            divided by the leading coefficient of Q with respect to u,\n            recalling that the leading coefficient with respect to u,\n            of a polynomial R which does not depend on u, is defined\n            as R itself.\n\n        NOTES:\n\n            The above definition is not yet fully implemented.\n\n        EXAMPLES:\n\n            >>> from sympy import *\n            >>> from DifferentialAlgebra import *\n            >>> init_printing (use_unicode = False, num_columns = 60)\n\n            >>> t = var ('t')\n            >>> u,v = function ('u,v')\n            >>> R = DifferentialRing (derivations = [t], blocks = [u,v])\n            >>> L = [t, v(t)*u(t)**2 - u(t) + Derivative(v(t),t) + 1, \n            ...      t*u(t)/Derivative(v(t),t)]\n\n        The initials of the elements of L:\n\n            >>> R.leading_coefficient (L)\n                         t     \n            [1, v(t), --------]\n                      d        \n                      --(v(t)) \n                      dt       \n\n        The initial of a single rational fraction:\n\n            >>> R.leading_coefficient (u(t)**2+Derivative(v(t),t)/v(t))\n            1\n\n        The leading coefficient of the elements of L, with respect to t:\n\n            >>""> R.leading_coefficient (L, t)\n                 2                  d               u(t)   \n            [1, u (t)*v(t) - u(t) + --(v(t)) + 1, --------]\n                                    dt            d        \n                                                  --(v(t)) \n                                                  dt       \n\n        The leading coefficient of a single rational fraction, with\n        respect to a derivative:\n\n            >>> R.leading_coefficient (u(t)**2 + \n            ...             Derivative(v(t),t)/v(t), Derivative(v(t),t))\n             1  \n            ----\n            v(t)\n        ";
static const char __pyx_k_The_leading_coefficients_of_a_r[] = "\n        The leading coefficients of a regular differential chain\n\n        INPUT:\n\n            `variable`  -- (default: None) a variable\n            `notation`  -- (default: 'undefined') a string\n\n        OUTPUT:\n\n            The list of leading coefficients with respect to `variable`\n            of the regular differential chain. If `variable` is omitted,\n            the leading coefficients are taken with respect to the\n            leading derivatives.\n\n            See the documentation of differential rings.\n\n        EXAMPLES:\n\n            >>> from sympy import *\n            >>> from DifferentialAlgebra import *\n            >>> init_printing (use_unicode = False, num_columns = 60)\n\n            >>> x,y = var ('x,y')\n            >>> u,v = indexedbase ('u,v')\n            >>> R = DifferentialRing (derivations = [x,y], \n            ...             blocks = [[v,u]], notation = 'jet')\n            >>> eq1 = u[x]**2 - 4*u\n            >>> eq2 = u[x,y]*v[y] - u + 1\n            >>> eq3 = v[x,x] - u[x]\n            >>> ideal = R.RosenfeldGroebner ([eq1,eq2,eq3])\n            >>> ideal\n            [regular_differential_chain]\n\n            >>> C = ideal [0]  \n\n        If `variable` is omitted, the initials are returned:\n\n            >>> C.leading_coefficient ()\n            [1, 1, 4*u, 1]\n\n        The leading coefficients with respect to u:\n\n            >>> C.leading_coefficient (u)\n            [-2, -4, -u[x]*u[y] + 4*v[y], -u[x] + v[x, x]]\n        ";
static const char __pyx_k_The_leading_derivative_of_a_rat[] = "\n        The leading derivative of a rational fraction\n\n        INPUT:\n\n            `equations` -- a rational fraction or a list of rational \n                             fractions \n            `notation`  -- (default: 'undefined') a string\n\n        OUTPUT:\n\n            The list of the leading derivatives of the equations.\n\n            The leading derivative of a rational fraction F is defined\n            as the highest derivative u such that the partial derivative\n            of F with respect to u is nonzero.\n\n            This definition is extended to rational fractions which\n            only depend on independent variables.\n\n            The leading derivative of constant rational fractions is\n            not defined.\n\n        EXAMPLES:\n\n            >>> from sympy import *\n            >>> from DifferentialAlgebra import *\n            >>> init_printing (use_unicode = False, num_columns = 60)\n\n            >>> t = var ('t')\n            >>> u,v = function ('u,v')\n            >>> R = DifferentialRing (derivations = [t], blocks = [u,v])\n            >>> L = [t, u(t)**2 - u(t), Derivative(v(t),t), 1/v(t)]\n            >>> R.leading_derivative (L)\n                      d              \n            [t, u(t), --(v(t)), v(t)]\n                      dt             \n        ";
static const char __pyx_k_The_leading_derivatives_of_a_re[] = "\n        The leading derivatives of a regular differential chain\n\n        INPUT:\n\n            `notation`  -- (default: 'undefined') a string\n\n        OUTPUT:\n\n            The list of the leading derivatives of the elements of\n            the chain. See the documentation of differential rings.\n\n        EXAMPLES:\n\n            >>> from sympy import *\n            >>> from DifferentialAlgebra import *\n            >>> init_printing (use_unicode = False, num_columns = 60)\n\n            >>> x,y = var ('x,y')\n            >>> u,v = indexedbase ('u,v')\n            >>> R = DifferentialRing (derivations = [x,y], \n            ...             blocks = [[v,u]], notation = 'jet')\n            >>> eq1 = u[x]**2 - 4*u\n            >>> eq2 = u[x,y]*v[y] - u + 1\n            >>> eq3 = v[x,x] - u[x]\n            >>> ideal = R.RosenfeldGroebner ([eq1,eq2,eq3])\n            >>> ideal\n            [regular_differential_chain]\n\n            >>> C = ideal [0]  \n            >>> C.leading_derivative()\n            [u[y], u[x], v[y], v[x, x]]\n        ";
static const char __pyx_k_The_leading_polynomials_of_a_De[] = "\n        The leading polynomials of a DenefLipshitzUple\n\n        INPUT:\n\n            `notation`   -- (default: 'undefined') a string\n            `timeout`    -- (default: 0) a nonnegative integer\n            `memout`     -- (default: 0) a nonnegative integer\n\n        OUTPUT:\n\n            A dictionary associating a triple (A(q), s, d) to each\n            differential indeterminate for which formal power series\n            solutions are sought.\n\n            The polynomial A(q) is (up to some constant factor), the\n            leading coefficient of y[q+s] in the (q+d)-th derivative\n            of the defining differential equation of the corresponding\n            differential indeterminate.\n\n            An important task achieved by the DenefLipshizt function\n            consists in determining the positive integer roots of A(q).\n\n        EXAMPLES:\n\n            >>> from sympy import *\n            >>> from DifferentialAlgebra import *\n            >>> init_printing (use_unicode = False, num_columns = 60)\n\n            >>> xi,q = var ('xi,q')\n            >>> x,y = indexedbase ('x,y')\n            >>> R = DifferentialRing (derivations = [xi], \n            ...             blocks = [[x,y],q,'(x,y)[oo:-1]'], \n            ...             parameters = [q,'(x,y)[oo:-1]'], \n            ...             notation='jet')\n\n        An autonomous system encoding a nonautonomous differential\n        equation (a change of variable expressing that x = xi has\n        been performed):\n\n            >>> eqns = [8*x*y*y[xi,xi] + 8*y[xi] + 8*y**2 \\\n            ...                         - 44*x**2 - x + 8, \\\n            ...                         x[xi] - 1, x[0]]\n\n            >>> Y = [x,y]\n            >>> Ybar = { x['(xi,k)'] : 'x[k]', y['(xi,k)'] : 'y[k]' }\n\n        The DenefLipshitz function distinguishes three cases:\n\n            >>> DL = R.DenefLipshitz (eqns, Y, Ybar, q)\n            >>> DL\n            [Denef_Lipshitz_Uple, Denef_Lipshitz_U""ple, Denef_Lipshitz_ >\n            |  \n            > Uple]\n\n        Let us compute the leading polynomial of the second one:\n\n            >>> U = DL[1]\n            >>> U.leading_polynomial ()\n            {x: (1, 3, 2), y: (q*y[0] + 4*y[0] + 1, 5, 4)}\n\n        If we assign (say) -1/5 to y[0] then the polynomial vanishes\n        at q = 1.  Thus the coefficient of y[1+5] in the (1+4)-th\n        prolongation equation vanishes.\n\n        Here are the constraints of U, for y[0] = -1/5:\n\n            >>> C = U.constraints ()\n            >>> [ c.subs ({y[0] : -1/Integer(5)}) for c in C ] \n                              26                    32*y[2]   291      >\n            [x[0] = 0, y[1] + -- = 0, x[1] - 1 = 0, ------- + --- = 0, >\n                              25                       5      125      >\n            |  \n            >            16*y[3]   26449                2048*y[4]   27 >\n            >  x[2] = 0, ------- - ----- = 0, x[3] = 0, --------- - -- >\n            >               5       625                    125         >\n            |  \n            > 2460601                1024*y[5]   46845365491           >\n            > ------- = 0, x[4] = 0, --------- - ----------- = 0, x[xi >\n            > 78125                     625        1953125             >\n            |  \n            >                                            2          2  >\n            > ] - 1 = 0, 8*y[xi, xi]*x*y + 8*y[xi] - 44*x  - x + 8*y   >\n            >                                                          >\n            |  \n            >               \n            > + 8 = 0, True]\n            >               \n\n        Let us compute the fifth prolongation equation. First\n        differentiate five times the differential equation and replace\n        x by xi. Result in P5:\n\n            >>> P5 = R.differentiate (eqns[0], xi**5)\n            >>> P5 = R.evaluate (P5, {x : xi})\n\n        We are concerned by the coefficient of y[6] in P5. It is\n        ""obtained by evaluating the coefficient of y[6] at xi = 0:\n\n            >>> lc_y6_in_P5 = P5.coeff (y[xi,xi,xi,xi,xi,xi])\n            >>> lc_y6_in_P5 = lc_y6_in_P5.subs ({xi : 0})\n            >>> lc_y6_in_P5\n            40*y + 8\n\n        In the prolongation process, the derivative y is evaluated at\n        y = y[0] for which we have assigned y[0] = -1/5. As predicted,\n        the coefficient vanishes:\n\n            >>> lc_y6_in_P5.subs ({y : -1/Integer(5)})\n            0\n        ";
static const char __pyx_k_The_list_of_attributes_of_a_Reg[] = " \n        The list of attributes of a RegularDifferentialChain\n\n        INPUT:\n\n            Nothing\n\n        OUTPUT:\n\n            A list of strings, providing the attributes of a regular\n            differential chain\n\n        EXAMPLES:\n\n            >>> from sympy import *\n            >>> from DifferentialAlgebra import *\n            >>> init_printing (use_unicode = False, num_columns = 60)\n\n            >>> x,y = var ('x,y')\n            >>> u,v = indexedbase ('u,v')\n            >>> R = DifferentialRing (derivations = [x,y], \n            ...             blocks = [u,v], notation = 'jet')\n            >>> eq1 = Eq(u[x], v)\n            >>> eq2 = u[y] \n            >>> eq3 = v[y]\n            >>> C = RegularDifferentialChain ([eq1,eq2,eq3], R)\n            >>> C.attributes ()\n            [differential, prime, autoreduced, primitive, squarefree,  >\n            |  \n            > coherent, normalized]\n        ";
static const char __pyx_k_The_list_of_equations_of_a_regu[] = "\n        The list of equations of a regular differential chain\n\n        INPUT:\n\n            `solved`    -- (default: False) a boolean\n            `selection` -- (default: None) a relational expression\n            `notation`  -- (default: 'undefined') a string\n\n        OUTPUT:\n\n            A list of the differential polynomials which constitute\n            the chain, sorted by increasing rank.\n\n            If `solved` is True, the differential polynomials are\n            displayed as equations, solved with respect to their\n            leading rank.\n\n            The optional parameter `selection` is a relational\n            expression combining one of the keywords 'order', 'leader',\n            'rank' on the one side, with a value on the other side,\n            using one of the relational operators.  Only the equations\n            which satisfy the condition are selected.\n\n            - If the keyword is 'order', then the value must be a\n              nonnegative integer.\n\n            - If the keyword is 'rank', then the value must be a\n              rank, including the special ranks 0 and 1.\n\n            - If the keyword is 'leader', and the relational\n              operator is '>=', '>', '<=' or '<', then the value must\n              be a derivative.\n\n            - If the keyword is 'leader', and the relational\n              operator is '==' or '!=', then the value may also have\n              the form: 'modifier' (derivative), where 'modifier'\n              is one of the keywords 'derivative' or 'proper'.\n\n            If not defined using `notation`, the notation is the chain\n            default notation.\n\n        EXAMPLES:\n\n            >>> from sympy import *\n            >>> from DifferentialAlgebra import *\n            >>> init_printing (use_unicode = False, num_columns = 60)\n\n            >>> x,a,b = var('x,a,b')\n            >>> y = indexedbase ('y')\n            >>> R = DifferentialRing (derivations = [x], \n      ""      ...             blocks = [y,[a,b]], \n            ...             parameters = [a,b], notation = 'jet')\n            >>> C = RegularDifferentialChain ([y[x]**2-a*y], R)\n            >>> C.equations ()\n                        2 \n            [-a*y + y[x] ]\n\n            >>> C.equations (solved = True)\n                 2       \n            [y[x]  = a*y]\n\n        The next example illustrates the use of `selection`:\n\n            >>> x,y = var ('x,y')\n            >>> u,v = indexedbase ('u,v')\n            >>> R = DifferentialRing (derivations = [x,y], \n            ...             blocks = [u,v], notation = 'jet')\n            >>> eq1 = Eq(u[x], v)\n            >>> eq2 = Eq(u[y], 0)\n            >>> eq3 = Eq(v[y], 0)\n            >>> C = RegularDifferentialChain ([eq1,eq2,eq3], R)\n            >>> C.equations (solved=True)\n            [v[y] = 0, u[y] = 0, u[x] = v]\n\n            >>> leader,rank,order = var ('leader,rank,order')\n            >>> derivative,proper = function ('derivative,proper')\n\n        The equations of order greater than 0. Observe that the ranking\n        is not necessarily orderly:\n\n            >>> C.equations (selection = order > 0)\n            [v[y], u[y], u[x] - v]\n\n        The equation whose leader is u[x]:\n\n            >>> C.equations (selection = Eq(leader,u[x]))\n            [u[x] - v]\n\n        The equations, whose leaders are derivatives of u[x]:\n\n            >>> C.equations (selection = Eq(leader,derivative (u[x])))\n            [u[x] - v]\n        ";
static const char __pyx_k_The_list_of_generators_of_a_bas[] = " \n        The list of generators of a base field extension\n\n        INPUT:\n\n            Nothing\n\n        OUTPUT:\n\n            The list of generators\n\n        EXAMPLES:\n\n            >>> from sympy import *\n            >>> from DifferentialAlgebra import *\n            >>> init_printing (use_unicode = False, num_columns = 60)\n\n            >>> a,b = var ('a,b')\n            >>> R = DifferentialRing (derivations = [], blocks = [a,b])\n            >>> C = RegularDifferentialChain ([a**2 + 1], R)\n            >>> F = BaseFieldExtension (generators = [a,b], \n            ...                         relations = C)\n            >>> F.generators ()\n            [a, b]\n        ";
static const char __pyx_k_The_normal_form_of_a_rational_d[] = "\n        The normal form of a rational differential fraction\n\n        INPUT:\n\n            `equations` -- a rational fraction or a list of rational \n                             fractions \n            `notation`  -- (default: 'undefined') a string\n\n        OUTPUT:\n\n            The list of normal forms of the equations.\n\n        NOTES:\n\n            Mathematically, this function does not do anything. Were\n            there more than one notation, it could perform changes of\n            notations.  At least, it is useful to recognize rational\n            fractions of differential polynomials equal to 0.\n\n        EXAMPLES:\n\n            >>> from sympy import *\n            >>> from DifferentialAlgebra import *\n            >>> init_printing (use_unicode = False, num_columns = 60)\n\n            >>> t = var ('t')\n            >>> u,v = function ('u,v')\n            >>> R = DifferentialRing (derivations = [t], blocks = [u,v])\n\n        A complicated rational fraction of differential polynomials:\n\n            >>> eq = Derivative(u(t)/(3*u(t)+Derivative(v(t),t)), t)\n            >>> L = R.integrate (eq.doit(), t)\n\n        This should be zero:\n\n            >>> zero = (eq - Derivative(L[1], t)).doit()\n            >>> zero                      \n                  2               /                  2       \\         >\n                 d                |    d            d        | d       >\n                 ---(v(t))        |- 9*--(u(t)) - 3*---(v(t))|*--(v(t) >\n                   2              |    dt             2      | dt      >\n                 dt               \\                 dt       /         >\n            ------------------- + ------------------------------------ >\n                       d                                      2        >\n            9*u(t) + 3*--(v(t))          /           d       \\         >\n                       dt                |9*u(t) + 3*--(v(t))|         >\n                                         \\     ""      dt      /         >\n            |  \n            >                         /                2       \\     \n            >                         |    d          d        |     \n            > )       d               |- 3*--(u(t)) - ---(v(t))|*u(t)\n            >         --(u(t))        |    dt           2      |     \n            >         dt              \\               dt       /     \n            > - + ----------------- + -------------------------------\n            >              d                                  2      \n            >     3*u(t) + --(v(t))        /         d       \\       \n            >              dt              |3*u(t) + --(v(t))|       \n            >                              \\         dt      /       \n\n            >>> R.normal_form (zero)      \n            0\n        ";
static const char __pyx_k_The_number_of_equations_of_a_re[] = "\n        The number of equations of a regular differential chain\n\n        INPUT:\n\n            Nothing\n\n        OUTPUT:\n\n            The number of equations of a regular differential chain\n\n        EXAMPLES:\n\n            >>> from sympy import *\n            >>> from DifferentialAlgebra import *\n            >>> t = var('t')\n            >>> u = indexedbase('u')\n            >>> R = DifferentialRing (derivations = [t], blocks = [u], notation = 'jet')\n            >>> poly = u[t]**2 - 4*u\n            >>> ideal = R.RosenfeldGroebner ([poly])\n            >>> ideal\n            [regular_differential_chain, regular_differential_chain]\n\n            >>> C = ideal [0]\n            >>> C.equations ()\n            [u[t]**2 - 4*u]\n        ";
static const char __pyx_k_The_preparation_equation_of_a_p[] = "\n        The preparation equation of a polynomial\n\n        INPUT:\n\n            `polynomial` -- a polynomial\n            `basefield`  -- (default: None) a BaseFieldExtension\n            `congruence` -- (default: False) a bool\n            `zstring`    -- (default: 'z%d') a string\n            `notation`   -- (default: 'undefined') a string\n\n        OUTPUT:\n\n            Return a preparation equation [Kolchin73, chapter IV,\n            section 13] of `polynomial` with respect to the regular\n            differential chain.\n\n            Preparation equations are an important tool of the Low\n            Power Theorem [Ritt50, chapter III, Kolchin73, chapter\n            IV, section 15].  The Low Power Theorem is applied by the\n            RosenfeldGroebner method, when there is a single equation\n            to process and the optional parameter `singsol` = True.\n\n            Let I the differential ideal defined by the chain,\n            denote A[1], ..., A[r] the differential polynomials which\n            constitute the chain. Introduce r new dependent variables\n            z[i]. Each variable z[i] representing the differential\n            polynomial A[i].\n\n            The returned preparation equation is an expression having\n            the form h*f = c[1]*t[1] + c[2]*t[2] + ... + c[n]*t[n],\n            where f stands for `polynomial`. The differential polynomial\n            h is a power product of initials and separants of the\n            A[i]. The coefficients c[i] are reduced with respect to\n            the chain and regular with respect to I. The monomials\n            t[i] are power products of the z[k] variables and their\n            derivatives.  They satisfy some further properties,\n            described in [Kolchin73, chapter IV, section 13]. If each\n            z[k] is replaced by the corresponding polynomial A[k],\n            then the preparation equation becomes an equality.\n\n            The optional parameter `congruence`"". In the right hand-side\n            of the preparation equation, denote q the minimum total\n            degree (the low power, actually) of the monomials t[i].\n            If `congruence` is true, then all the terms c[i]*t[i]\n            such that the total degree of t[i] is strictly greater\n            than q are removed. The remaining sum is call a preparation\n            congruence of f.\n\n            The optional parameter `basefield` is useful in conjunction\n            with `congruence` = True. Reductions by the A[i] which\n            belong to the base field are not taken into account for\n            computing the preparation congruence of f. The terms t[k]\n            which depend on such z[i] and their derivatives are not\n            considered for computing the degree q and do not appear\n            in the preparation congruence.\n\n            The optional parameter `zstring` permits to denote the\n            polynomial A[i] by symbols different from z[i]. This may\n            be useful since the method creates one indexedbase for\n            each z[i]. The `zstring` should correspond to a valid\n            indexedbase identifier and involve the substring '%d'.\n\n        EXAMPLES:\n\n            >>> from sympy import *\n            >>> from DifferentialAlgebra import *\n            >>> init_printing (use_unicode = False, num_columns = 60)\n\n            >>> t = var('t')\n            >>> u = indexedbase('u')\n            >>> R = DifferentialRing (derivations = [t], \n            ...             blocks = [u], notation = 'jet')\n\n        A famous example of Ritt. Two cases are considered:\n\n            >>> poly = u[t]**2 - 4*u\n            >>> ideal = R.RosenfeldGroebner ([poly])\n            >>> [ C.equations (solved = True) for C in ideal ]\n                  2                 \n            [[u[t]  = 4*u], [u = 0]]\n\n        Is the solution u(t) = 0 an essential component?\n\n            >>> C = ideal [1]\n\n        Here is a preparat""ion equation for poly, with respect to the\n        chain C.  Replacing z1 by u, it is easy to see check the result:\n\n            >>> C.preparation_equation (poly)\n                2              2       \n            u[t]  - 4*u = z1[t]  - 4*z1\n\n        Here is the preparation congruence (q = 1):\n\n            >>> C.preparation_equation (poly, congruence = True)\n                2              \n            u[t]  - 4*u = -4*z1\n\n        By [Kolchin73, chapter IV, section 15, theorem 6], the solution\n        is, indeed, essential. This result can be interpreted as\n        follows: the solution u(t) = 0 is not a particular case of the\n        general solution u(t) = (t + c)**2, where c is an arbitrary\n        y constant:\n\n            >>> ideal = R.RosenfeldGroebner ([poly], \n            ...                              singsol = 'essential')\n            >>> [ C.equations (solved = True) for C in ideal ]\n                  2                 \n            [[u[t]  = 4*u], [u = 0]]\n\n        Another famous example. Two similar cases are generated:\n\n            >>> poly = u[t]**2 - 4*u**3\n            >>> ideal = R.RosenfeldGroebner ([poly])\n            >>> ideal\n            [regular_differential_chain, regular_differential_chain]\n\n        Is the solution u(t) = 0 an essential component?\n\n            >>> C = ideal [1]\n\n        Here is a preparation equation for poly, with respect to the\n        chain C.  Replacing z1 by u, it is easy to see check the result:\n\n            >>> C.preparation_equation (poly)\n                2      3        2       3\n            u[t]  - 4*u  = z1[t]  - 4*z1 \n\n        Here is the preparation congruence (q = 2):\n\n            >>> C.preparation_equation (poly, congruence = True)\n                2      3        2\n            u[t]  - 4*u  = z1[t] \n\n        By Ritt's theorem, the solution is particular. This result\n        can be interpreted as follows: the solution u(t) = 0 is the\n        limit, when the arbit""rary constant c tends towards infinity,\n        of the general solution u(t) = 1/(t + c)**2:\n\n            >>> ideal = R.RosenfeldGroebner ([poly], \n            ...                              singsol = 'essential')\n            >>> [ C.equations (solved = True) for C in ideal ]\n                  2      3  \n            [[u[t]  = 4*u ]]\n\n        The following example just illustrates the use of base fields.\n        The F is a differential field involving two indexedbases s(t),\n        c(t), which can be viewed as sin(t) and cos(t):\n\n            >>> t = var('t')\n            >>> u,s,c = indexedbase ('u,s,c')\n            >>> R = DifferentialRing (derivations = [t], \n            ...             blocks = [u,[s,c]], notation = 'jet')\n            >>> C = RegularDifferentialChain (\n            ...             [c[t] + s, s**2 + c**2 - 1], R)\n            >>> F = BaseFieldExtension (relations = C)\n\n        Observe that, over F, poly and poly2 are the same polynomial.\n        They thus should have the same preparation congruence:\n\n            >>> poly = u[t]**2 - 4*u**3\n            >>> poly2 = u[t]**2 - 4*u**3 + s**2 + c**2 - 1\n\n        Two cases are generated:\n\n            >>> ideal = R.RosenfeldGroebner ([poly], basefield = F)\n            >>> [ C.equations (solved = True) for C in ideal ]\n               2        2                 2      3     2        2      >\n            [[s  = 1 - c , c[t] = -s, u[t]  = 4*u ], [s  = 1 - c , c[t >\n            |  \n            >                \n            > ] = -s, u = 0]]\n\n        Is the solution u(t) = 0 essential?\n\n            >>> C = ideal[1]\n            >>> C.equations (solved = True)\n              2        2                   \n            [s  = 1 - c , c[t] = -s, u = 0]\n\n        The preparation congruence of poly (playing with zstring):\n\n            >>> C.preparation_equation (poly, zstring = 'C%d')\n                2      3        2       3\n            u[t]  - 4*u  = C3[t]  - 4*C3 \n\n      ""  The preparation congruence of poly shows that the solution is\n        not essential (see the previous example):\n\n            >>> C.preparation_equation (poly, congruence=True)\n                2      3        2\n            u[t]  - 4*u  = z3[t] \n\n        Let us now consider poly2, which is equal to poly, over F:\n\n            >>> C.preparation_equation (poly2)\n                2    2    2      3            2            3\n            u[t]  + c  + s  - 4*u  - 1 = z3[t]  + z1 - 4*z3 \n\n        The term t[i] of minimal degree correspond to a reduction by\n        a field equation:\n\n            >>> C.preparation_equation (poly2, congruence=True)\n                2    2    2      3         \n            u[t]  + c  + s  - 4*u  - 1 = z1\n\n        Specifying that we should consider poly2 over F, the preparation\n        congruence changes and we conclude similarly as for poly:\n\n            >>> C.preparation_equation (poly2, \n            ...                         congruence=True, basefield=F)\n                2    2    2      3            2\n            u[t]  + c  + s  - 4*u  - 1 = z3[t] \n\n        We check below that RosenfeldGroebner recognizes the solution\n        as not essential:\n\n            >>> ideal = R.RosenfeldGroebner ([poly], \n            ...                 singsol = 'essential', basefield = F)\n            >>> [ C.equations (solved = True) for C in ideal ]\n               2        2                 2      3  \n            [[s  = 1 - c , c[t] = -s, u[t]  = 4*u ]]\n        ";
static const char __pyx_k_The_pseudo_remainder_of_a_fract[] = "\n        The pseudo-remainder of a fraction by a regular chain\n\n        INPUT:\n\n            `ratfrac`  -- a fraction or a list of fractions\n            `notation` -- (default: 'undefined') a string\n\n        OUTPUT:\n\n            The pseudo-remainder of ratfrac modulo the regular\n            differential chain.\n\n            If ratfrac is a polynomial, the result is a polynomial If\n            it is a rational fraction, then the result is defined as\n            the ratio of the pseudo-remainder of the numerator over\n            the pseudo-remainder of the denominator of the fraction.\n\n            The pseudo-remainder of a polynomial is zero if and only\n            if the polynomial is zero modulo the ideal defined by the\n            regular differential chain.\n\n            See also differential_prem.\n\n        EXAMPLES:\n\n            >>> from sympy import *\n            >>> from DifferentialAlgebra import *\n            >>> init_printing (use_unicode = False, num_columns = 60)\n\n            >>> x = var ('x')\n            >>> u,a = indexedbase ('u,a')\n            >>> R = DifferentialRing (derivations = [x], \n            ...             blocks = [u,a], \n            ...             parameters = [a], notation = 'jet')\n            >>> C = RegularDifferentialChain(\n            ...             [u[x]**2-4*u], R, ['differential'])\n\n        u[x,x] - 2 is a zero modulo the differential ideal defined by C:\n\n            >>> C.prem (u[x,x]-2)\n            0\n\n        u[x,x] is not:\n\n            >>> C.prem (u[x,x])\n            4*u[x]\n\n        A few variants:\n\n            >>> C.prem (1/u[x,x])\n              1   \n            ------\n            4*u[x]\n\n            >>> C.prem ([u[x,x]-2, 1/u[x,x]])\n                  1    \n            [0, ------]\n                4*u[x] \n        ";
static const char __pyx_k_The_relations_in_a_BMI_compatib[] = " \n        The relations in a BMI compatible format, as a string\n\n        INPUT:\n\n            Nothing\n\n        OUTPUT:\n\n            A string\n\n        EXAMPLES:\n\n            >>> from sympy import *\n            >>> from DifferentialAlgebra import *\n            >>> a,b = var ('a,b')\n            >>> R = DifferentialRing (derivations = [], blocks = [a,b])\n            >>> C = RegularDifferentialChain ([a**2 + 1], R)\n            >>> F = BaseFieldExtension (generators = [a,b], \n            ...                         relations = C)\n        ";
static const char __pyx_k_The_resultant_of_a_differential[] = "\n        The resultant of a differential fraction modulo a regular chain\n\n        INPUT:\n\n            `ratfrac`  -- a fraction or a list of fractions\n            `notation` -- (default: 'undefined') a string\n\n        OUTPUT:\n\n            The resultant of ratfrac modulo the regular differential\n            chain.\n\n            If ratfrac is a polynomial, the result is a polynomial\n            If it is a rational fraction, then the result is defined\n            as the ratio of the resultant of the numerator over the\n            resultant of the denominator of the fraction.\n\n            The resultant of a polynomial is zero if and only if the\n            polynomial is a zerodivisor modulo the ideal defined by\n            the regular differential chain. See [BLPM19].\n\n        REFERENCES:\n\n            [BLPM19] Fran\303\247ois Boulier and Fran\303\247ois Lemaire and\n            Adrien Poteaux and Marc Moreno Maza. An Equivalence\n            Theorem for Regular Differential Chains. Journal\n            of Symbolic Computation vol 93, pp. 34-5. 2019\n            https://doi.org/10.1016/j.jsc.2018.04.011\n            hal.archives-ouvertes.fr/hal-01391768\n\n        EXAMPLES:\n\n            >>> from sympy import *\n            >>> from DifferentialAlgebra import *\n            >>> init_printing (use_unicode = False, num_columns = 60)\n\n            >>> x = var ('x')\n            >>> u,a = indexedbase ('u,a')\n            >>> R = DifferentialRing (derivations = [x], \n            ...             blocks = [u,a], \n            ...             parameters = [a], notation = 'jet')\n            >>> C = RegularDifferentialChain(\n            ...             [(u[x]**2-4*u)*(u[x]**2-4*u**3)], \n            ...             R, ['differential'])\n\n        u[x,x] - 2 is a zerodivisor modulo the differential ideal\n        defined by C:\n\n            >>> C.resultant(u[x,x]-2)\n            0\n\n        u[x] is not:\n\n            >>> C.resultant(u[x])\n            ""     4\n            -16*u \n\n        A few other examples:\n\n            >>> C.resultant(1/u[x])\n             -1  \n            -----\n                4\n            16*u \n\n            >>> C.resultant([u[x,x] - 2, u[x]])\n                     4 \n            [0, -16*u ]\n        ";
static const char __pyx_k_The_separant_of_a_rational_frac[] = "\n        The separant of a rational fraction\n\n        INPUT:\n\n            `equations` -- a rational fraction or a list of rational \n                             fractions \n            `variable`  -- (default: None) a variable\n            `notation`  -- (default: 'undefined') a string\n\n        OUTPUT:\n\n            The list of separants of the equations, with respect to\n            `variable`.  If `variable` is omitted, the list of separants\n            of the equations, with respect to their leading derivatives.\n\n            The separant of a rational fraction F with respect to some\n            derivative u, is defined as the partial derivative of F\n            with respect to u.\n\n        EXAMPLES:\n\n            >>> from sympy import *\n            >>> from DifferentialAlgebra import *\n            >>> init_printing (use_unicode = False, num_columns = 60)\n\n            >>> t = var ('t')\n            >>> u,v = function ('u,v')\n            >>> R = DifferentialRing (derivations = [t], blocks = [u,v])\n            >>> L = [t + 3, \n            ...      v(t)*u(t)**2 - u(t) + Derivative(v(t),t) + 1, \n            ...      t*u(t)/Derivative(v(t),t)]\n\n        The list of separants of the elements of L, with respect to\n        their leading derivatives:\n\n            >>> R.separant (L)\n                                    t     \n            [1, 2*u(t)*v(t) - 1, --------]\n                                 d        \n                                 --(v(t)) \n                                 dt       \n\n        The separant of a single rational fraction, with respect to\n        its leading derivative:\n\n            >>> R.separant (u(t)**2 + Derivative(v(t),t)/v(t))\n            2*u(t)\n\n        The list of separants of the elements of L, with respect to t:\n\n            >>> R.separant (L, t)\n                     u(t)   \n            [1, 0, --------]\n                   d        \n                   --(v(t)) \n                   dt       \n""\n        The separant of a single rational fraction, with respect to\n        a derivative:\n\n            >>> R.separant (u(t)**2 + Derivative(v(t),t)/v(t), \n            ...             Derivative(v(t),t))\n             1  \n            ----\n            v(t)\n        ";
static const char __pyx_k_The_separants_of_a_regular_diff[] = "\n        The separants of a regular differential chain\n\n        INPUT:\n\n            `variable`  -- (default: None) a variable\n            `notation`  -- (default: 'undefined') a string\n\n        OUTPUT:\n\n            The list of the separants, with respect to `variable`,\n            of the regular differential chain. If `variable` is\n            omitted, the separants are taken with respect to the\n            leading derivatives.\n\n            See the documentation of differential rings.\n\n        EXAMPLES:\n\n            >>> from sympy import *\n            >>> from DifferentialAlgebra import *\n            >>> init_printing (use_unicode = False, num_columns = 60)\n\n            >>> x,y = var ('x,y')\n            >>> u,v = indexedbase ('u,v')\n            >>> R = DifferentialRing (derivations = [x,y], \n            ...             blocks = [[v,u]], notation = 'jet')\n            >>> eq1 = u[x]**2 - 4*u\n            >>> eq2 = u[x,y]*v[y] - u + 1\n            >>> eq3 = v[x,x] - u[x]\n            >>> ideal = R.RosenfeldGroebner ([eq1,eq2,eq3])\n            >>> ideal\n            [regular_differential_chain]\n\n            >>> C = ideal [0]  \n\n        If `variable` is omitted, the separants are taken with respect\n        to the leading derivatives:\n\n            >>> C.separant ()\n            [2*u[y], 2*u[x], 4*u, 1]\n\n        The separants with respect to u:\n\n            >>> C.separant (u)\n            [-2, -4, -u[x]*u[y] + 4*v[y], 0]\n        ";
static const char __pyx_k_The_tail_of_a_rational_fraction[] = "\n        The tail of a rational fraction\n\n        INPUT:\n\n            `equations` -- a rational fraction or a list of rational \n                             fractions \n            `variable`  -- (default: None) a variable\n            `notation`  -- (default: 'undefined') a string\n\n        OUTPUT:\n\n            The list of tails of the equations, with respect to\n            `variable`.  If `variable` is omitted, the list of tails\n            with respect to the leading derivatives of the equations\n            is returned.\n\n            The tail of a rational fraction F is defined as the\n            rational fraction F - i(F) * rg(F) where i(F) and rg(F)\n            denote the initial and the leading rank of F.\n\n            More generally, the tail, with respect to some derivative u,\n            of a rational fraction F = P/Q is defined as the rational\n            fraction F - lc(F,u) * rg(F,u), where lc(F,u) is defined as\n            the leading coefficient of F with respect to u and rg(F,u)\n            is the monomial obtained by raising u at the degree deg\n            (P,u) - deg (Q,u)\n\n        NOTES:\n\n            The above definition is not yet fully implemented.\n\n        EXAMPLES:\n\n            >>> from sympy import *\n            >>> from DifferentialAlgebra import *\n            >>> init_printing (use_unicode = False, num_columns = 60)\n\n            >>> t = var ('t')\n            >>> u,v = function ('u,v')\n            >>> R = DifferentialRing (derivations = [t], blocks = [u,v])\n            >>> L = [t + 3, \n            ...      v(t)*u(t)**2 - u(t) + Derivative(v(t),t) + 1, \n            ...      t*u(t)/Derivative(v(t),t)]\n\n        The list of tails of the elements of L, with respect to their\n        leading derivatives:\n\n            >>> R.tail (L)\n                        d               \n            [3, -u(t) + --(v(t)) + 1, 0]\n                        dt              \n\n        The tail of a single rational fraction, w""ith respect to its\n        leading derivative:\n\n            >>> eq = u(t)**2 + Derivative(v(t),t)/v(t)\n            >>> R.tail (eq)\n            d       \n            --(v(t))\n            dt      \n            --------\n              v(t)  \n\n        Check the definition of tails:\n\n            >>> R.initial (eq) * R.leading_rank (eq) + R.tail (eq) - eq\n            0\n\n        The list of tails of the elements of L, with respect to t:\n\n            >>> R.tail (L, t)\n            [3, 0, 0]\n\n        The tail of a single rational fraction, with respect to\n        a derivative:\n\n            >>> eq = u(t)**2 + Derivative(v(t),t)/v(t)\n            >>> derv = Derivative(v(t), t)\n            >>> R.tail (eq, derv)\n             2   \n            u (t)\n\n        Check the definition of tails with respect to some derivative:\n\n            >>> R.leading_coefficient (eq, derv) * derv + \\\n            ...                             R.tail (eq, derv) - eq\n            0\n        ";
static const char __pyx_k_The_tails_of_a_regular_differen[] = "\n        The tails of a regular differential chain\n\n        INPUT:\n\n            `variable`  -- (default: None) a variable\n            `notation`  -- (default: 'undefined') a string\n\n        OUTPUT:\n\n            The list of the tails, with respect to `variable`, of\n            the regular differential chain. If `variable` is omitted,\n            the tails are taken with respect to the leading derivatives.\n\n            See the documentation of differential rings.\n\n        EXAMPLES:\n\n            >>> from sympy import *\n            >>> from DifferentialAlgebra import *\n            >>> init_printing (use_unicode = False, num_columns = 60)\n\n            >>> x,y = var ('x,y')\n            >>> u,v = indexedbase ('u,v')\n            >>> R = DifferentialRing (derivations = [x,y], \n            ...             blocks = [[v,u]], notation = 'jet')\n            >>> eq1 = u[x]**2 - 4*u\n            >>> eq2 = u[x,y]*v[y] - u + 1\n            >>> eq3 = v[x,x] - u[x]\n            >>> ideal = R.RosenfeldGroebner ([eq1,eq2,eq3])\n            >>> ideal\n            [regular_differential_chain]\n\n            >>> C = ideal [0]  \n\n        If `variable` is omitted, the tails are taken with respect to\n        the leading derivatives:\n\n            >>> C.tail ()\n            [-2*u, -4*u, -u[x]*u[y]*u + u[x]*u[y], -u[x]]\n\n        The tails with respect to u:\n\n            >>> C.tail (u)\n                 2      2               \n            [u[y] , u[x] , u[x]*u[y], 0]\n        ";
static const char __pyx_k_home_boulier_DifferentialAlgebr[] = "/home/boulier/DifferentialAlgebra/bmi/sympy/DifferentialAlgebra.pyx";
static const char __pyx_k_self_DLuple_cannot_be_converted[] = "self.DLuple cannot be converted to a Python object for pickling";
static const char __pyx_k_the_variable_and_the_base_field[] = "the variable and the base field must not be both specified";
static const char __pyx_k_BaseFieldExtension___process_not[] = "BaseFieldExtension.__process_notation";
static const char __pyx_k_BaseFieldExtension___reduce_cyth[] = "BaseFieldExtension.__reduce_cython__";
static const char __pyx_k_BaseFieldExtension___setstate_cy[] = "BaseFieldExtension.__setstate_cython__";
static const char __pyx_k_BaseFieldExtension__relations_li[] = "BaseFieldExtension._relations (line 353)";
static const char __pyx_k_BaseFieldExtension_generators_li[] = "BaseFieldExtension.generators (line 287)";
static const char __pyx_k_BaseFieldExtension_relations_lin[] = "BaseFieldExtension.relations (line 316)";
static const char __pyx_k_DenefLipshitzUple___process_nota[] = "DenefLipshitzUple.__process_notation";
static const char __pyx_k_DenefLipshitzUple___reduce_cytho[] = "DenefLipshitzUple.__reduce_cython__";
static const char __pyx_k_DenefLipshitzUple___setstate_cyt[] = "DenefLipshitzUple.__setstate_cython__";
static const char __pyx_k_DenefLipshitzUple_constraints_li[] = "DenefLipshitzUple.constraints (line 235)";
static const char __pyx_k_DenefLipshitzUple_leading_polyno[] = "DenefLipshitzUple.leading_polynomial";
static const char __pyx_k_DenefLipshitzUple_series_line_47[] = "DenefLipshitzUple.series (line 478)";
static const char __pyx_k_DifferentialRing_DenefLipshitz_l[] = "DifferentialRing.DenefLipshitz (line 2252)";
static const char __pyx_k_DifferentialRing_RosenfeldGroebn[] = "DifferentialRing.RosenfeldGroebner";
static const char __pyx_k_DifferentialRing___listof_symbol[] = "DifferentialRing.__listof_symbols";
static const char __pyx_k_DifferentialRing___process_evdic[] = "DifferentialRing.__process_evdict";
static const char __pyx_k_DifferentialRing___process_notat[] = "DifferentialRing.__process_notation";
static const char __pyx_k_DifferentialRing___reduce_cython[] = "DifferentialRing.__reduce_cython__";
static const char __pyx_k_DifferentialRing___setstate_cyth[] = "DifferentialRing.__setstate_cython__";
static const char __pyx_k_DifferentialRing__process_equati[] = "DifferentialRing._process_equations";
static const char __pyx_k_DifferentialRing_coeffs_line_375[] = "DifferentialRing.coeffs (line 375)";
static const char __pyx_k_DifferentialRing_differential_pr[] = "DifferentialRing.differential_prem";
static const char __pyx_k_DifferentialRing_differentiate_l[] = "DifferentialRing.differentiate (line 1854)";
static const char __pyx_k_DifferentialRing_evaluate_line_7[] = "DifferentialRing.evaluate (line 779)";
static const char __pyx_k_DifferentialRing_expected_for_ri[] = "DifferentialRing expected for ring keyword parameter";
static const char __pyx_k_DifferentialRing_factor_derivati[] = "DifferentialRing.factor_derivative";
static const char __pyx_k_DifferentialRing_indets_line_963[] = "DifferentialRing.indets (line 963)";
static const char __pyx_k_DifferentialRing_initial_line_13[] = "DifferentialRing.initial (line 1335)";
static const char __pyx_k_DifferentialRing_is_constant_lin[] = "DifferentialRing.is_constant (line 1111)";
static const char __pyx_k_DifferentialRing_is_differential[] = "DifferentialRing.is_differential_fraction";
static const char __pyx_k_DifferentialRing_leading_coeffic[] = "DifferentialRing.leading_coefficient";
static const char __pyx_k_DifferentialRing_leading_derivat[] = "DifferentialRing.leading_derivative";
static const char __pyx_k_DifferentialRing_leading_rank_li[] = "DifferentialRing.leading_rank (line 1239)";
static const char __pyx_k_DifferentialRing_normal_form_lin[] = "DifferentialRing.normal_form (line 2067)";
static const char __pyx_k_DifferentialRing_separant_line_1[] = "DifferentialRing.separant (line 1635)";
static const char __pyx_k_Incompatible_checksums_0x_x_vs_0[] = "Incompatible checksums (0x%x vs (0x472eff0, 0x42c8ac3, 0x9bfe941) = (evdict, gens, notation, rels, rels_are_provided))";
static const char __pyx_k_RegularDifferentialChain_Rosenfe[] = "RegularDifferentialChain.RosenfeldGroebner";
static const char __pyx_k_RegularDifferentialChain__Regula[] = "RegularDifferentialChain._RegularDifferentialChain__number_of_equations (line 1711)";
static const char __pyx_k_RegularDifferentialChain___numbe[] = "RegularDifferentialChain.__number_of_equations";
static const char __pyx_k_RegularDifferentialChain___proce[] = "RegularDifferentialChain.__process_notation";
static const char __pyx_k_RegularDifferentialChain___reduc[] = "RegularDifferentialChain.__reduce_cython__";
static const char __pyx_k_RegularDifferentialChain___setst[] = "RegularDifferentialChain.__setstate_cython__";
static const char __pyx_k_RegularDifferentialChain_attribu[] = "RegularDifferentialChain.attributes";
static const char __pyx_k_RegularDifferentialChain_differe[] = "RegularDifferentialChain.differential_ring";
static const char __pyx_k_RegularDifferentialChain_equatio[] = "RegularDifferentialChain.equations";
static const char __pyx_k_RegularDifferentialChain_expecte[] = "RegularDifferentialChain expected for relations keyword parameter";
static const char __pyx_k_RegularDifferentialChain_initial[] = "RegularDifferentialChain.initial";
static const char __pyx_k_RegularDifferentialChain_leading[] = "RegularDifferentialChain.leading_derivative";
static const char __pyx_k_RegularDifferentialChain_prem_li[] = "RegularDifferentialChain.prem (line 1022)";
static const char __pyx_k_RegularDifferentialChain_prepara[] = "RegularDifferentialChain.preparation_equation";
static const char __pyx_k_RegularDifferentialChain_resulta[] = "RegularDifferentialChain.resultant";
static const char __pyx_k_RegularDifferentialChain_separan[] = "RegularDifferentialChain.separant";
static const char __pyx_k_RegularDifferentialChain_tail_li[] = "RegularDifferentialChain.tail (line 646)";
static const char __pyx_k_independent_variable_expected_fo[] = "independent variable expected for x, found: ";
static const char __pyx_k_ordinary_differential_ring_expec[] = "ordinary differential ring expected";
static const char __pyx_k_self_dring_cannot_be_converted_t[] = "self.dring cannot be converted to a Python object for pickling";
static const char __pyx_k_self_regchain_cannot_be_converte[] = "self.regchain cannot be converted to a Python object for pickling";
static const char __pyx_k_DenefLipshitzUple_DenefLipshitz_2[] = "DenefLipshitzUple.DenefLipshitz (line 58)";
static const char __pyx_k_RegularDifferentialChain_change_2[] = "RegularDifferentialChain.change_ranking (line 1211)";
static const char __pyx_k_RegularDifferentialChain_indets_2[] = "RegularDifferentialChain.indets (line 796)";
static const char __pyx_k_RegularDifferentialChain_normal_2[] = "RegularDifferentialChain.normal_form (line 1331)";
static const char __pyx_k_Ritt_s_reduction_algorithm_by_a_2[] = "\n        Ritt's reduction algorithm by a regular differential chain\n\n        INPUT:\n\n            `polynomial` -- a polynomial\n            `mode`       -- (default: 'full') a string\n            `notation`   -- (default: 'undefined') a string\n\n        OUTPUT:\n\n            A pair (h, r) such that h*p = r modulo the differential\n            ideal generated by the equations of the regular differential\n            chain (denoting p for `polynomial`).\n\n            The optional argument `mode` = 'full', 'partial' or\n            'algebraic'.  If 'full', the remainder r is fully reduced\n            with respect to the chain equations. If 'partial', the\n            remainder r is partially reduced with respect to the chain\n            equations. If 'algebraic', the remainder is algebraically\n            reduced with respect to the chain equations.\n\n            In all cases, h is a product of powers of the initials\n            and separants involved in the reduction process.\n\n        EXAMPLES:\n\n            >>> from sympy import *\n            >>> from DifferentialAlgebra import *\n            >>> init_printing (use_unicode = False, num_columns = 60)\n\n            >>> x,y = var ('x,y')\n            >>> u,v = indexedbase ('u,v')\n            >>> R = DifferentialRing (derivations = [x,y], \n            ...             blocks = [[v,u]], notation = 'jet')\n            >>> eq1 = u[x]**2 - 4*u\n            >>> eq2 = u[x,y]*v[y] - u + 1\n            >>> eq3 = v[x,x] - u[x]\n            >>> ideal = R.RosenfeldGroebner ([eq1,eq2,eq3])\n            >>> ideal\n            [regular_differential_chain]\n\n            >>> C = ideal [0]\n\n        Here are the chain equations:\n\n            >>> C.equations (solved = True)\n                 2            2               u[x]*u[y]*u - u[x]*u[y]  >\n            [u[y]  = 2*u, u[x]  = 4*u, v[y] = -----------------------, >\n                                                        4*u            >\n            |  \n       ""     >                 \n            >  v[x, x] = u[x]]\n            >                 \n\n        The first polynomial is already fully reduced with respect to\n        the chain equations:\n\n            >>> poly = (Integer(1)/Integer(7))*u\n            >>> h, r = C.differential_prem (poly)\n            >>> h, r\n                u \n            (1, -)\n                7 \n\n        Check:\n\n            >>> C.normal_form (h * poly - r)\n            0\n\n        The next polynomial is not reduced with respect to the chain\n        equations:\n\n            >>> poly = (Integer(1)/Integer(7))*v[x,y] + u[x,x]\n            >>> h, r = C.differential_prem (poly)\n            >>> h, r\n                                                    2 \n                           2  32*(7*u[y] + u)*u[x]*u  \n            (16*u[x]*u[y]*u , -----------------------)\n                                         7            \n\n            >>> C.normal_form (h * poly - r)\n            0\n\n        Let us try a partial reduction, instead of a full one:\n\n            >>> h, r = C.differential_prem (poly, mode = 'partial')\n            >>> h, r\n                                /      2     2       2         2       >\n                             -4*\\- u[x] *u[y]  - u[x] *u + u[x]  + 4*u >\n            (16*u[x]*u[y]*u, ----------------------------------------- >\n                                                                       >\n            |  \n            >                       2           2            \\       \n            > [x]*u[y]*v[y] - 2*u[y] *u + 2*u[y]  - 56*u[y]*u/*u[x]  \n            > ------------------------------------------------------)\n            >       7                                                \n\n            >>> C.normal_form (h * poly - r)\n            0\n\n        The polynomial actually is algebraically reduced with respect\n        to the chain:\n\n            >>> h, r = C.differential_prem (poly, mode = 'algebraic')\n            >>> h, r\n            ""              v[x, y] \n            (1, u[x, x] + -------)\n                             7    \n\n            >>> C.normal_form (h * poly - r)\n            0\n        ";
static const char __pyx_k_The_DenefLipshitz_algorithm_INP_2[] = "\n        The DenefLipshitz algorithm\n\n        INPUT:\n\n            `equations`  -- a list of differential polynomials, differential \n                              polynomial equations or inequations\n            `notation`   -- (default: 'undefined') a string\n            `timeout`    -- (default: 0) a nonnegative integer\n            `memout`     -- (default: 0) a nonnegative integer\n\n        OUTPUT:\n\n            A possibly empty list of DenefLipshitzUple describing\n            the formal power series solutions of the current\n            DenefLipshitzUple (self) enlarged with the further\n            constraints provided by `equations`.\n\n            If the list is empty, `equations` has no formal power\n            series solution.\n\n            If it is nonempty, each of its element provides at least\n            one formal power series solution.\n\n            See the DenefLipshitz method of the DifferentialRing class.\n\n        NOTE:\n\n            The method calls the BLAD bas_Denef_Lipshitz_resume\n            function.\n\n        EXAMPLES:\n\n            >>> from sympy import *\n            >>> from DifferentialAlgebra import *\n            >>> init_printing (use_unicode = False, num_columns = 60)\n            >>> x,q = var ('x,q')\n            >>> y = indexedbase ('y')\n\n        The differential indeterminate is y. The coefficients of its\n        formal power series solutions are ... > y[3] > y[2] > y[1]\n        > y[0]:\n\n            >>> R = DifferentialRing (blocks = [y,q,'(y)[oo:-1]'], \n            ...             derivations = [x], \n            ...             parameters = [q,'(y)[oo:-1]'], \n            ...             notation = 'jet')\n\n        The differential equation of the brachistochrone problem. Its\n        solutions are a family of cycloids and the singular solution\n        y(x) = 1:\n\n            >>> eqns = [ y*y[x]**2 + y - 1 ]\n\n        The list of the differential indeterminates for which formal\n        power serie""s solutions are sought.\n\n            >>> Y = [y]\n            >>> Ybar = { y['(x,k)'] : 'y[k]' }\n\n        The DenefLipshitz algorithms distingues three cases:\n\n            >>> DL = R.DenefLipshitz (eqns, Y, Ybar, q)\n            >>> DL\n            [Denef_Lipshitz_Uple, Denef_Lipshitz_Uple, Denef_Lipshitz_ >\n            |  \n            > Uple]\n\n        Let us focus on the second one, which corresponds to the\n        regular points of the general solution. The constraints are:\n\n            >>> U = DL[1]\n            >>> U.constraints ()\n                      2                       2                   2    >\n            [y[0]*y[1]  + y[0] - 1 = 0, 2*y[0] *y[2] + 1 = 0, y[x] *y  >\n            |  \n            >                                   \n            > + y - 1 = 0, y[0] != 0, y[1] != 0]\n\n        The associated (truncated) series depends on some parameters:\n\n            >>> U.series ()\n                     2                    \n                    x                     \n            {y: - ------- + x*y[1] + y[0]}\n                        2                 \n                  4*y[0]                  \n\n        The DenefLipshitz method of the DenefLipshitzUple class permits\n        to make initial values more precise:\n\n            >>> DL2 = U.DenefLipshitz([2*y[0]-1])\n            >>> DL2\n            [Denef_Lipshitz_Uple]\n\n            >>> DL2[0].series ()\n                   2            1 \n            {y: - x  + x*y[1] + -}\n                                2 \n        ";
static const char __pyx_k_The_normal_form_of_a_rational_d_2[] = "\n        The normal form of a rational differential fraction\n\n        INPUT:\n\n            `equations` -- a rational fraction or a list of rational\n                             fractions\n            `casesplit` -- (default: False) a bool\n            `notation`  -- (default: 'undefined') a string\n\n        OUTPUT:\n\n            The normal form of the equation with respect to the regular\n            differential chain. If `equations` is a list, a list of\n            normal forms is returned.\n\n            Given a regular differential chain, not all rational\n            fractions have normal forms: the denominator should not\n            be zero, or even a zerodivisor, modulo the ideal defined\n            by the regular differential chain.\n\n            The optional argument `casesplit` permit to handle the\n            case of rational fractions which do not have normal forms,\n            by splitting cases.\n\n        NOTES:\n\n            The argument `casesplit` = True is not yet implemented.\n\n            The current implementation of normal forms may fail, even\n            if the normal form does exist (very rare but possible\n            situation).  A complete algorithm is available but not\n            yet implemented.  See references below.\n\n        REFERENCES:\n\n            [BLS11] Fran\303\247ois Boulier, Fran\303\247ois Lemaire and\n            Alexandre Sedoglavic. On the Regularity Property of\n            Differential Polynomials Modulo Regular Differential\n            Chains. In proc.  of CASC 2011. LNCS 6885, pp. 61-72. 2011.\n            http://hal.archives-ouvertes.fr/hal-00599440\n\n        EXAMPLES:\n\n            >>> from sympy import *\n            >>> from DifferentialAlgebra import *\n            >>> init_printing (use_unicode = False, num_columns = 60)\n\n            >>> x,y = var ('x,y')\n            >>> u,v = indexedbase ('u,v')\n            >>> R = DifferentialRing (derivations = [x,y], \n            ...             b""locks = [[v,u]], notation = 'jet')\n            >>> eq1 = u[x]**2 - 4*u\n            >>> eq2 = u[x,y]*v[y] - u + 1\n            >>> eq3 = v[x,x] - u[x]\n            >>> ideal = R.RosenfeldGroebner ([eq1,eq2,eq3])\n            >>> ideal\n            [regular_differential_chain]\n\n            >>> C = ideal [0]  \n\n        A few basic examples:\n\n            >>> p = u[y,y] / u[x]\n            >>> C.normal_form (p)\n            u[x]\n            ----\n            4*u \n\n            >>> C.normal_form (1/p)\n            u[x]\n\n        An expected behaviour of normal forms:\n\n            >>> C.normal_form (C.normal_form (p) * C.normal_form (1/p))\n            1\n        ";
static const char __pyx_k_home_boulier_DifferentialAlgebr_2[] = "/home/boulier/DifferentialAlgebra/bmi/sympy/DifferentialRing.pyx";
static const char __pyx_k_home_boulier_DifferentialAlgebr_3[] = "/home/boulier/DifferentialAlgebra/bmi/sympy/RegularDifferentialChain.pyx";
static const char __pyx_k_home_boulier_DifferentialAlgebr_4[] = "/home/boulier/DifferentialAlgebra/bmi/sympy/BaseFieldExtension.pyx";
static const char __pyx_k_home_boulier_DifferentialAlgebr_5[] = "/home/boulier/DifferentialAlgebra/bmi/sympy/DenefLipshitzUple.pyx";
static const char __pyx_k_DenefLipshitzUple_leading_polyno_2[] = "DenefLipshitzUple.leading_polynomial (line 343)";
static const char __pyx_k_DifferentialRing_RosenfeldGroebn_2[] = "DifferentialRing.RosenfeldGroebner (line 2523)";
static const char __pyx_k_DifferentialRing_differential_pr_2[] = "DifferentialRing.differential_prem (line 1936)";
static const char __pyx_k_DifferentialRing_factor_derivati_2[] = "DifferentialRing.factor_derivative (line 880)";
static const char __pyx_k_DifferentialRing_is_differential_2[] = "DifferentialRing.is_differential_fraction (line 1063)";
static const char __pyx_k_DifferentialRing_leading_coeffic_2[] = "DifferentialRing.leading_coefficient (line 1408)";
static const char __pyx_k_DifferentialRing_leading_derivat_2[] = "DifferentialRing.leading_derivative (line 1173)";
static const char __pyx_k_RegularDifferentialChain_Rosenfe_2[] = "RegularDifferentialChain.RosenfeldGroebner (line 1753)";
static const char __pyx_k_RegularDifferentialChain_attribu_2[] = "RegularDifferentialChain.attributes (line 339)";
static const char __pyx_k_RegularDifferentialChain_differe_2[] = "RegularDifferentialChain.differential_prem";
static const char __pyx_k_RegularDifferentialChain_differe_3[] = "RegularDifferentialChain.differential_ring (line 175)";
static const char __pyx_k_RegularDifferentialChain_differe_4[] = "RegularDifferentialChain.differential_prem (line 885)";
static const char __pyx_k_RegularDifferentialChain_equatio_2[] = "RegularDifferentialChain.equations (line 212)";
static const char __pyx_k_RegularDifferentialChain_initial_2[] = "RegularDifferentialChain.initial (line 514)";
static const char __pyx_k_RegularDifferentialChain_leading_2[] = "RegularDifferentialChain.leading_rank";
static const char __pyx_k_RegularDifferentialChain_leading_3[] = "RegularDifferentialChain.leading_coefficient";
static const char __pyx_k_RegularDifferentialChain_leading_4[] = "RegularDifferentialChain.leading_derivative (line 396)";
static const char __pyx_k_RegularDifferentialChain_leading_5[] = "RegularDifferentialChain.leading_rank (line 452)";
static const char __pyx_k_RegularDifferentialChain_leading_6[] = "RegularDifferentialChain.leading_coefficient (line 572)";
static const char __pyx_k_RegularDifferentialChain_prepara_2[] = "RegularDifferentialChain.preparation_equation (line 1440)";
static const char __pyx_k_RegularDifferentialChain_resulta_2[] = "RegularDifferentialChain.resultant (line 1111)";
static const char __pyx_k_RegularDifferentialChain_separan_2[] = "RegularDifferentialChain.separant (line 721)";
/* #### Code section: decls ### */
static PyObject *__pyx_pf_19DifferentialAlgebra_ascii(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_s); /* proto */
static PyObject *__pyx_pf_19DifferentialAlgebra_2function(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_s); /* proto */
static PyObject *__pyx_pf_19DifferentialAlgebra_4indexedbase(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_s); /* proto */
static PyObject *__pyx_pf_19DifferentialAlgebra_16DifferentialRing___process_notation(struct __pyx_obj_19DifferentialAlgebra_DifferentialRing *__pyx_v_self, PyObject *__pyx_v_notation); /* proto */
static PyObject *__pyx_pf_19DifferentialAlgebra_16DifferentialRing_2__listof_symbols(struct __pyx_obj_19DifferentialAlgebra_DifferentialRing *__pyx_v_self, PyObject *__pyx_v_expr, PyObject *__pyx_v_subrankings, PyObject *__pyx_v_pattern); /* proto */
static int __pyx_pf_19DifferentialAlgebra_16DifferentialRing_4__init__(struct __pyx_obj_19DifferentialAlgebra_DifferentialRing *__pyx_v_self, PyObject *__pyx_v_derivations, PyObject *__pyx_v_blocks, PyObject *__pyx_v_parameters, PyObject *__pyx_v_notation); /* proto */
static void __pyx_pf_19DifferentialAlgebra_16DifferentialRing_6__dealloc__(struct __pyx_obj_19DifferentialAlgebra_DifferentialRing *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_19DifferentialAlgebra_16DifferentialRing_8__repr__(CYTHON_UNUSED struct __pyx_obj_19DifferentialAlgebra_DifferentialRing *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_19DifferentialAlgebra_16DifferentialRing_10_latex(CYTHON_UNUSED struct __pyx_obj_19DifferentialAlgebra_DifferentialRing *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_19DifferentialAlgebra_16DifferentialRing_12coeffs(struct __pyx_obj_19DifferentialAlgebra_DifferentialRing *__pyx_v_self, PyObject *__pyx_v_equation, PyObject *__pyx_v_variable, struct __pyx_obj_19DifferentialAlgebra_BaseFieldExtension *__pyx_v_basefield, PyObject *__pyx_v_notation); /* proto */
static PyObject *__pyx_pf_19DifferentialAlgebra_16DifferentialRing_14equations(struct __pyx_obj_19DifferentialAlgebra_DifferentialRing *__pyx_v_self, PyObject *__pyx_v_equations, PyBoolObject *__pyx_v_solved, PyObject *__pyx_v_selection, PyObject *__pyx_v_notation); /* proto */
static PyObject *__pyx_pf_19DifferentialAlgebra_16DifferentialRing_16__process_evdict(struct __pyx_obj_19DifferentialAlgebra_DifferentialRing *__pyx_v_self, PyObject *__pyx_v_evdict0); /* proto */
static PyObject *__pyx_pf_19DifferentialAlgebra_16DifferentialRing_18__evaluate(struct __pyx_obj_19DifferentialAlgebra_DifferentialRing *__pyx_v_self, PyObject *__pyx_v_P, PyObject *__pyx_v_evdict); /* proto */
static PyObject *__pyx_pf_19DifferentialAlgebra_16DifferentialRing_20evaluate(struct __pyx_obj_19DifferentialAlgebra_DifferentialRing *__pyx_v_self, PyObject *__pyx_v_P, PyObject *__pyx_v_evdict); /* proto */
static PyObject *__pyx_pf_19DifferentialAlgebra_16DifferentialRing_22factor_derivative(struct __pyx_obj_19DifferentialAlgebra_DifferentialRing *__pyx_v_self, PyObject *__pyx_v_derivative, PyObject *__pyx_v_notation); /* proto */
static PyObject *__pyx_pf_19DifferentialAlgebra_16DifferentialRing_24indets(struct __pyx_obj_19DifferentialAlgebra_DifferentialRing *__pyx_v_self, PyObject *__pyx_v_equations, PyObject *__pyx_v_selection, PyObject *__pyx_v_derivation, PyObject *__pyx_v_notation); /* proto */
static PyObject *__pyx_pf_19DifferentialAlgebra_16DifferentialRing_26is_differential_fraction(struct __pyx_obj_19DifferentialAlgebra_DifferentialRing *__pyx_v_self, PyObject *__pyx_v_equations, PyObject *__pyx_v_notation); /* proto */
static PyObject *__pyx_pf_19DifferentialAlgebra_16DifferentialRing_28is_constant(struct __pyx_obj_19DifferentialAlgebra_DifferentialRing *__pyx_v_self, PyObject *__pyx_v_ratfrac, PyObject *__pyx_v_derivation, PyObject *__pyx_v_notation); /* proto */
static PyObject *__pyx_pf_19DifferentialAlgebra_16DifferentialRing_30leading_derivative(struct __pyx_obj_19DifferentialAlgebra_DifferentialRing *__pyx_v_self, PyObject *__pyx_v_equations, PyObject *__pyx_v_notation); /* proto */
static PyObject *__pyx_pf_19DifferentialAlgebra_16DifferentialRing_32leading_rank(struct __pyx_obj_19DifferentialAlgebra_DifferentialRing *__pyx_v_self, PyObject *__pyx_v_equations, PyBoolObject *__pyx_v_listform, PyObject *__pyx_v_notation); /* proto */
static PyObject *__pyx_pf_19DifferentialAlgebra_16DifferentialRing_34initial(struct __pyx_obj_19DifferentialAlgebra_DifferentialRing *__pyx_v_self, PyObject *__pyx_v_equations, PyObject *__pyx_v_notation); /* proto */
static PyObject *__pyx_pf_19DifferentialAlgebra_16DifferentialRing_36leading_coefficient(struct __pyx_obj_19DifferentialAlgebra_DifferentialRing *__pyx_v_self, PyObject *__pyx_v_equations, PyObject *__pyx_v_variable, PyObject *__pyx_v_notation); /* proto */
static PyObject *__pyx_pf_19DifferentialAlgebra_16DifferentialRing_38tail(struct __pyx_obj_19DifferentialAlgebra_DifferentialRing *__pyx_v_self, PyObject *__pyx_v_equations, PyObject *__pyx_v_variable, PyObject *__pyx_v_notation); /* proto */
static PyObject *__pyx_pf_19DifferentialAlgebra_16DifferentialRing_40separant(struct __pyx_obj_19DifferentialAlgebra_DifferentialRing *__pyx_v_self, PyObject *__pyx_v_equations, PyObject *__pyx_v_variable, PyObject *__pyx_v_notation); /* proto */
static PyObject *__pyx_pf_19DifferentialAlgebra_16DifferentialRing_42integrate(struct __pyx_obj_19DifferentialAlgebra_DifferentialRing *__pyx_v_self, PyObject *__pyx_v_equations, PyObject *__pyx_v_variable, PyBoolObject *__pyx_v_iterated, PyObject *__pyx_v_notation); /* proto */
static PyObject *__pyx_pf_19DifferentialAlgebra_16DifferentialRing_44differentiate(struct __pyx_obj_19DifferentialAlgebra_DifferentialRing *__pyx_v_self, PyObject *__pyx_v_equations, PyObject *__pyx_v_notation, PyObject *__pyx_v_args); /* proto */
static PyObject *__pyx_pf_19DifferentialAlgebra_16DifferentialRing_46differential_prem(struct __pyx_obj_19DifferentialAlgebra_DifferentialRing *__pyx_v_self, PyObject *__pyx_v_polynomial, PyObject *__pyx_v_redset, PyObject *__pyx_v_mode, PyObject *__pyx_v_notation); /* proto */
static PyObject *__pyx_pf_19DifferentialAlgebra_16DifferentialRing_48normal_form(struct __pyx_obj_19DifferentialAlgebra_DifferentialRing *__pyx_v_self, PyObject *__pyx_v_equations, PyObject *__pyx_v_notation); /* proto */
static PyObject *__pyx_pf_19DifferentialAlgebra_16DifferentialRing_50sort(struct __pyx_obj_19DifferentialAlgebra_DifferentialRing *__pyx_v_self, PyObject *__pyx_v_polynomials, PyObject *__pyx_v_mode, PyObject *__pyx_v_notation); /* proto */
static PyObject *__pyx_pf_19DifferentialAlgebra_16DifferentialRing_52DenefLipshitz(struct __pyx_obj_19DifferentialAlgebra_DifferentialRing *__pyx_v_self, PyObject *__pyx_v_equations, PyObject *__pyx_v_Y, PyObject *__pyx_v_Ybar, PyObject *__pyx_v_q, PyObject *__pyx_v_x, PyObject *__pyx_v_attributes, PyObject *__pyx_v_control, PyObject *__pyx_v_notation, int __pyx_v_timeout, int __pyx_v_memout); /* proto */
static PyObject *__pyx_pf_19DifferentialAlgebra_16DifferentialRing_54RosenfeldGroebner(struct __pyx_obj_19DifferentialAlgebra_DifferentialRing *__pyx_v_self, PyObject *__pyx_v_equations, struct __pyx_obj_19DifferentialAlgebra_BaseFieldExtension *__pyx_v_basefield, PyObject *__pyx_v_attributes, PyObject *__pyx_v_singsol, PyObject *__pyx_v_dimlb, PyObject *__pyx_v_notation, int __pyx_v_timeout, int __pyx_v_memout); /* proto */
static PyObject *__pyx_pf_19DifferentialAlgebra_16DifferentialRing_56_process_equations(struct __pyx_obj_19DifferentialAlgebra_DifferentialRing *__pyx_v_self, PyObject *__pyx_v_L, PyObject *__pyx_v_strnot); /* proto */
static PyObject *__pyx_pf_19DifferentialAlgebra_16DifferentialRing_58_ranking(struct __pyx_obj_19DifferentialAlgebra_DifferentialRing *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_19DifferentialAlgebra_16DifferentialRing_6evdict___get__(struct __pyx_obj_19DifferentialAlgebra_DifferentialRing *__pyx_v_self); /* proto */
static int __pyx_pf_19DifferentialAlgebra_16DifferentialRing_6evdict_2__set__(struct __pyx_obj_19DifferentialAlgebra_DifferentialRing *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_19DifferentialAlgebra_16DifferentialRing_6evdict_4__del__(struct __pyx_obj_19DifferentialAlgebra_DifferentialRing *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_19DifferentialAlgebra_16DifferentialRing_60__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_19DifferentialAlgebra_DifferentialRing *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_19DifferentialAlgebra_16DifferentialRing_62__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_19DifferentialAlgebra_DifferentialRing *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_19DifferentialAlgebra_24RegularDifferentialChain___process_notation(struct __pyx_obj_19DifferentialAlgebra_RegularDifferentialChain *__pyx_v_self, PyObject *__pyx_v_notation); /* proto */
static int __pyx_pf_19DifferentialAlgebra_24RegularDifferentialChain_2__init__(struct __pyx_obj_19DifferentialAlgebra_RegularDifferentialChain *__pyx_v_self, PyObject *__pyx_v_equations, struct __pyx_obj_19DifferentialAlgebra_DifferentialRing *__pyx_v_DRing, PyObject *__pyx_v_attributes, PyBoolObject *__pyx_v_pretend, PyObject *__pyx_v_notation, int __pyx_v_timeout, int __pyx_v_memout); /* proto */
static void __pyx_pf_19DifferentialAlgebra_24RegularDifferentialChain_4__dealloc__(struct __pyx_obj_19DifferentialAlgebra_RegularDifferentialChain *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_19DifferentialAlgebra_24RegularDifferentialChain_6__repr__(CYTHON_UNUSED struct __pyx_obj_19DifferentialAlgebra_RegularDifferentialChain *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_19DifferentialAlgebra_24RegularDifferentialChain_8_latex_(CYTHON_UNUSED struct __pyx_obj_19DifferentialAlgebra_RegularDifferentialChain *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_19DifferentialAlgebra_24RegularDifferentialChain_10differential_ring(struct __pyx_obj_19DifferentialAlgebra_RegularDifferentialChain *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_19DifferentialAlgebra_24RegularDifferentialChain_12equations(struct __pyx_obj_19DifferentialAlgebra_RegularDifferentialChain *__pyx_v_self, PyBoolObject *__pyx_v_solved, PyObject *__pyx_v_selection, PyObject *__pyx_v_notation); /* proto */
static PyObject *__pyx_pf_19DifferentialAlgebra_24RegularDifferentialChain_14attributes(struct __pyx_obj_19DifferentialAlgebra_RegularDifferentialChain *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_19DifferentialAlgebra_24RegularDifferentialChain_16leading_derivative(struct __pyx_obj_19DifferentialAlgebra_RegularDifferentialChain *__pyx_v_self, PyBoolObject *__pyx_v_fullset, PyObject *__pyx_v_notation); /* proto */
static PyObject *__pyx_pf_19DifferentialAlgebra_24RegularDifferentialChain_18leading_rank(struct __pyx_obj_19DifferentialAlgebra_RegularDifferentialChain *__pyx_v_self, PyBoolObject *__pyx_v_fullset, PyBoolObject *__pyx_v_listform, PyObject *__pyx_v_notation); /* proto */
static PyObject *__pyx_pf_19DifferentialAlgebra_24RegularDifferentialChain_20initial(struct __pyx_obj_19DifferentialAlgebra_RegularDifferentialChain *__pyx_v_self, PyBoolObject *__pyx_v_fullset, PyObject *__pyx_v_notation); /* proto */
static PyObject *__pyx_pf_19DifferentialAlgebra_24RegularDifferentialChain_22leading_coefficient(struct __pyx_obj_19DifferentialAlgebra_RegularDifferentialChain *__pyx_v_self, PyObject *__pyx_v_variable, PyBoolObject *__pyx_v_fullset, PyObject *__pyx_v_notation); /* proto */
static PyObject *__pyx_pf_19DifferentialAlgebra_24RegularDifferentialChain_24tail(struct __pyx_obj_19DifferentialAlgebra_RegularDifferentialChain *__pyx_v_self, PyObject *__pyx_v_variable, PyBoolObject *__pyx_v_fullset, PyObject *__pyx_v_notation); /* proto */
static PyObject *__pyx_pf_19DifferentialAlgebra_24RegularDifferentialChain_26separant(struct __pyx_obj_19DifferentialAlgebra_RegularDifferentialChain *__pyx_v_self, PyObject *__pyx_v_variable, PyBoolObject *__pyx_v_fullset, PyObject *__pyx_v_notation); /* proto */
static PyObject *__pyx_pf_19DifferentialAlgebra_24RegularDifferentialChain_28indets(struct __pyx_obj_19DifferentialAlgebra_RegularDifferentialChain *__pyx_v_self, PyObject *__pyx_v_selection, PyBoolObject *__pyx_v_fullset, PyObject *__pyx_v_notation); /* proto */
static PyObject *__pyx_pf_19DifferentialAlgebra_24RegularDifferentialChain_30differential_prem(struct __pyx_obj_19DifferentialAlgebra_RegularDifferentialChain *__pyx_v_self, PyObject *__pyx_v_polynomial, PyObject *__pyx_v_mode, PyObject *__pyx_v_notation); /* proto */
static PyObject *__pyx_pf_19DifferentialAlgebra_24RegularDifferentialChain_32prem(struct __pyx_obj_19DifferentialAlgebra_RegularDifferentialChain *__pyx_v_self, PyObject *__pyx_v_ratfrac, PyObject *__pyx_v_notation, CYTHON_UNUSED int __pyx_v_timeout, CYTHON_UNUSED int __pyx_v_memout); /* proto */
static PyObject *__pyx_pf_19DifferentialAlgebra_24RegularDifferentialChain_34resultant(struct __pyx_obj_19DifferentialAlgebra_RegularDifferentialChain *__pyx_v_self, PyObject *__pyx_v_ratfrac, PyObject *__pyx_v_notation, CYTHON_UNUSED int __pyx_v_timeout, CYTHON_UNUSED int __pyx_v_memout); /* proto */
static PyObject *__pyx_pf_19DifferentialAlgebra_24RegularDifferentialChain_36change_ranking(struct __pyx_obj_19DifferentialAlgebra_RegularDifferentialChain *__pyx_v_self, struct __pyx_obj_19DifferentialAlgebra_DifferentialRing *__pyx_v_R, PyBoolObject *__pyx_v_prime, PyObject *__pyx_v_notation, int __pyx_v_timeout, int __pyx_v_memout); /* proto */
static PyObject *__pyx_pf_19DifferentialAlgebra_24RegularDifferentialChain_38normal_form(struct __pyx_obj_19DifferentialAlgebra_RegularDifferentialChain *__pyx_v_self, PyObject *__pyx_v_equations, PyBoolObject *__pyx_v_casesplit, PyObject *__pyx_v_notation); /* proto */
static PyObject *__pyx_pf_19DifferentialAlgebra_24RegularDifferentialChain_40preparation_equation(struct __pyx_obj_19DifferentialAlgebra_RegularDifferentialChain *__pyx_v_self, PyObject *__pyx_v_polynomial, struct __pyx_obj_19DifferentialAlgebra_BaseFieldExtension *__pyx_v_basefield, PyBoolObject *__pyx_v_congruence, PyObject *__pyx_v_zstring, PyObject *__pyx_v_notation); /* proto */
static PyObject *__pyx_pf_19DifferentialAlgebra_24RegularDifferentialChain_42__number_of_equations(struct __pyx_obj_19DifferentialAlgebra_RegularDifferentialChain *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_19DifferentialAlgebra_24RegularDifferentialChain_44RosenfeldGroebner(struct __pyx_obj_19DifferentialAlgebra_RegularDifferentialChain *__pyx_v_self, PyObject *__pyx_v_equations, struct __pyx_obj_19DifferentialAlgebra_BaseFieldExtension *__pyx_v_basefield, PyObject *__pyx_v_attributes, PyObject *__pyx_v_singsol, PyObject *__pyx_v_dimlb, PyObject *__pyx_v_notation, int __pyx_v_timeout, int __pyx_v_memout); /* proto */
static PyObject *__pyx_pf_19DifferentialAlgebra_24RegularDifferentialChain_6evdict___get__(struct __pyx_obj_19DifferentialAlgebra_RegularDifferentialChain *__pyx_v_self); /* proto */
static int __pyx_pf_19DifferentialAlgebra_24RegularDifferentialChain_6evdict_2__set__(struct __pyx_obj_19DifferentialAlgebra_RegularDifferentialChain *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_19DifferentialAlgebra_24RegularDifferentialChain_6evdict_4__del__(struct __pyx_obj_19DifferentialAlgebra_RegularDifferentialChain *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_19DifferentialAlgebra_24RegularDifferentialChain_46__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_19DifferentialAlgebra_RegularDifferentialChain *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_19DifferentialAlgebra_24RegularDifferentialChain_48__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_19DifferentialAlgebra_RegularDifferentialChain *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_19DifferentialAlgebra_18BaseFieldExtension___process_notation(struct __pyx_obj_19DifferentialAlgebra_BaseFieldExtension *__pyx_v_self, PyObject *__pyx_v_notation); /* proto */
static int __pyx_pf_19DifferentialAlgebra_18BaseFieldExtension_2__init__(struct __pyx_obj_19DifferentialAlgebra_BaseFieldExtension *__pyx_v_self, PyObject *__pyx_v_generators, struct __pyx_obj_19DifferentialAlgebra_RegularDifferentialChain *__pyx_v_relations, struct __pyx_obj_19DifferentialAlgebra_DifferentialRing *__pyx_v_ring, PyObject *__pyx_v_notation); /* proto */
static PyObject *__pyx_pf_19DifferentialAlgebra_18BaseFieldExtension_4__repr__(CYTHON_UNUSED struct __pyx_obj_19DifferentialAlgebra_BaseFieldExtension *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_19DifferentialAlgebra_18BaseFieldExtension_6_latex_(CYTHON_UNUSED struct __pyx_obj_19DifferentialAlgebra_BaseFieldExtension *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_19DifferentialAlgebra_18BaseFieldExtension_8generators(struct __pyx_obj_19DifferentialAlgebra_BaseFieldExtension *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_19DifferentialAlgebra_18BaseFieldExtension_10relations(struct __pyx_obj_19DifferentialAlgebra_BaseFieldExtension *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_19DifferentialAlgebra_18BaseFieldExtension_12_relations(struct __pyx_obj_19DifferentialAlgebra_BaseFieldExtension *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_19DifferentialAlgebra_18BaseFieldExtension_6evdict___get__(struct __pyx_obj_19DifferentialAlgebra_BaseFieldExtension *__pyx_v_self); /* proto */
static int __pyx_pf_19DifferentialAlgebra_18BaseFieldExtension_6evdict_2__set__(struct __pyx_obj_19DifferentialAlgebra_BaseFieldExtension *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_19DifferentialAlgebra_18BaseFieldExtension_6evdict_4__del__(struct __pyx_obj_19DifferentialAlgebra_BaseFieldExtension *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_19DifferentialAlgebra_18BaseFieldExtension_14__reduce_cython__(struct __pyx_obj_19DifferentialAlgebra_BaseFieldExtension *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_19DifferentialAlgebra_18BaseFieldExtension_16__setstate_cython__(struct __pyx_obj_19DifferentialAlgebra_BaseFieldExtension *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_19DifferentialAlgebra_17DenefLipshitzUple___repr__(CYTHON_UNUSED struct __pyx_obj_19DifferentialAlgebra_DenefLipshitzUple *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_19DifferentialAlgebra_17DenefLipshitzUple_2_latex_(CYTHON_UNUSED struct __pyx_obj_19DifferentialAlgebra_DenefLipshitzUple *__pyx_v_self); /* proto */
static void __pyx_pf_19DifferentialAlgebra_17DenefLipshitzUple_4__dealloc__(struct __pyx_obj_19DifferentialAlgebra_DenefLipshitzUple *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_19DifferentialAlgebra_17DenefLipshitzUple_6__process_notation(struct __pyx_obj_19DifferentialAlgebra_DenefLipshitzUple *__pyx_v_self, PyObject *__pyx_v_notation); /* proto */
static PyObject *__pyx_pf_19DifferentialAlgebra_17DenefLipshitzUple_8DenefLipshitz(struct __pyx_obj_19DifferentialAlgebra_DenefLipshitzUple *__pyx_v_self, PyObject *__pyx_v_equations, PyObject *__pyx_v_notation, int __pyx_v_timeout, int __pyx_v_memout); /* proto */
static PyObject *__pyx_pf_19DifferentialAlgebra_17DenefLipshitzUple_10constraints(struct __pyx_obj_19DifferentialAlgebra_DenefLipshitzUple *__pyx_v_self, PyObject *__pyx_v_notation, int __pyx_v_timeout, int __pyx_v_memout); /* proto */
static PyObject *__pyx_pf_19DifferentialAlgebra_17DenefLipshitzUple_12leading_polynomial(struct __pyx_obj_19DifferentialAlgebra_DenefLipshitzUple *__pyx_v_self, PyObject *__pyx_v_notation, int __pyx_v_timeout, int __pyx_v_memout); /* proto */
static PyObject *__pyx_pf_19DifferentialAlgebra_17DenefLipshitzUple_14series(struct __pyx_obj_19DifferentialAlgebra_DenefLipshitzUple *__pyx_v_self, PyObject *__pyx_v_vars, PyObject *__pyx_v_notation, int __pyx_v_timeout, int __pyx_v_memout); /* proto */
static PyObject *__pyx_pf_19DifferentialAlgebra_17DenefLipshitzUple_1Y___get__(struct __pyx_obj_19DifferentialAlgebra_DenefLipshitzUple *__pyx_v_self); /* proto */
static int __pyx_pf_19DifferentialAlgebra_17DenefLipshitzUple_1Y_2__set__(struct __pyx_obj_19DifferentialAlgebra_DenefLipshitzUple *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_19DifferentialAlgebra_17DenefLipshitzUple_1Y_4__del__(struct __pyx_obj_19DifferentialAlgebra_DenefLipshitzUple *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_19DifferentialAlgebra_17DenefLipshitzUple_4Ybar___get__(struct __pyx_obj_19DifferentialAlgebra_DenefLipshitzUple *__pyx_v_self); /* proto */
static int __pyx_pf_19DifferentialAlgebra_17DenefLipshitzUple_4Ybar_2__set__(struct __pyx_obj_19DifferentialAlgebra_DenefLipshitzUple *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_19DifferentialAlgebra_17DenefLipshitzUple_4Ybar_4__del__(struct __pyx_obj_19DifferentialAlgebra_DenefLipshitzUple *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_19DifferentialAlgebra_17DenefLipshitzUple_1x___get__(struct __pyx_obj_19DifferentialAlgebra_DenefLipshitzUple *__pyx_v_self); /* proto */
static int __pyx_pf_19DifferentialAlgebra_17DenefLipshitzUple_1x_2__set__(struct __pyx_obj_19DifferentialAlgebra_DenefLipshitzUple *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_19DifferentialAlgebra_17DenefLipshitzUple_1x_4__del__(struct __pyx_obj_19DifferentialAlgebra_DenefLipshitzUple *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_19DifferentialAlgebra_17DenefLipshitzUple_5order___get__(struct __pyx_obj_19DifferentialAlgebra_DenefLipshitzUple *__pyx_v_self); /* proto */
static int __pyx_pf_19DifferentialAlgebra_17DenefLipshitzUple_5order_2__set__(struct __pyx_obj_19DifferentialAlgebra_DenefLipshitzUple *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_19DifferentialAlgebra_17DenefLipshitzUple_5order_4__del__(struct __pyx_obj_19DifferentialAlgebra_DenefLipshitzUple *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_19DifferentialAlgebra_17DenefLipshitzUple_5kappa___get__(struct __pyx_obj_19DifferentialAlgebra_DenefLipshitzUple *__pyx_v_self); /* proto */
static int __pyx_pf_19DifferentialAlgebra_17DenefLipshitzUple_5kappa_2__set__(struct __pyx_obj_19DifferentialAlgebra_DenefLipshitzUple *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_19DifferentialAlgebra_17DenefLipshitzUple_5kappa_4__del__(struct __pyx_obj_19DifferentialAlgebra_DenefLipshitzUple *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_19DifferentialAlgebra_17DenefLipshitzUple_1C___get__(struct __pyx_obj_19DifferentialAlgebra_DenefLipshitzUple *__pyx_v_self); /* proto */
static int __pyx_pf_19DifferentialAlgebra_17DenefLipshitzUple_1C_2__set__(struct __pyx_obj_19DifferentialAlgebra_DenefLipshitzUple *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_19DifferentialAlgebra_17DenefLipshitzUple_1C_4__del__(struct __pyx_obj_19DifferentialAlgebra_DenefLipshitzUple *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_19DifferentialAlgebra_17DenefLipshitzUple_1S___get__(struct __pyx_obj_19DifferentialAlgebra_DenefLipshitzUple *__pyx_v_self); /* proto */
static int __pyx_pf_19DifferentialAlgebra_17DenefLipshitzUple_1S_2__set__(struct __pyx_obj_19DifferentialAlgebra_DenefLipshitzUple *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_19DifferentialAlgebra_17DenefLipshitzUple_1S_4__del__(struct __pyx_obj_19DifferentialAlgebra_DenefLipshitzUple *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_19DifferentialAlgebra_17DenefLipshitzUple_1k___get__(struct __pyx_obj_19DifferentialAlgebra_DenefLipshitzUple *__pyx_v_self); /* proto */
static int __pyx_pf_19DifferentialAlgebra_17DenefLipshitzUple_1k_2__set__(struct __pyx_obj_19DifferentialAlgebra_DenefLipshitzUple *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_19DifferentialAlgebra_17DenefLipshitzUple_1k_4__del__(struct __pyx_obj_19DifferentialAlgebra_DenefLipshitzUple *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_19DifferentialAlgebra_17DenefLipshitzUple_1r___get__(struct __pyx_obj_19DifferentialAlgebra_DenefLipshitzUple *__pyx_v_self); /* proto */
static int __pyx_pf_19DifferentialAlgebra_17DenefLipshitzUple_1r_2__set__(struct __pyx_obj_19DifferentialAlgebra_DenefLipshitzUple *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_19DifferentialAlgebra_17DenefLipshitzUple_1r_4__del__(struct __pyx_obj_19DifferentialAlgebra_DenefLipshitzUple *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_19DifferentialAlgebra_17DenefLipshitzUple_1q___get__(struct __pyx_obj_19DifferentialAlgebra_DenefLipshitzUple *__pyx_v_self); /* proto */
static int __pyx_pf_19DifferentialAlgebra_17DenefLipshitzUple_1q_2__set__(struct __pyx_obj_19DifferentialAlgebra_DenefLipshitzUple *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_19DifferentialAlgebra_17DenefLipshitzUple_1q_4__del__(struct __pyx_obj_19DifferentialAlgebra_DenefLipshitzUple *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_19DifferentialAlgebra_17DenefLipshitzUple_1A___get__(struct __pyx_obj_19DifferentialAlgebra_DenefLipshitzUple *__pyx_v_self); /* proto */
static int __pyx_pf_19DifferentialAlgebra_17DenefLipshitzUple_1A_2__set__(struct __pyx_obj_19DifferentialAlgebra_DenefLipshitzUple *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_19DifferentialAlgebra_17DenefLipshitzUple_1A_4__del__(struct __pyx_obj_19DifferentialAlgebra_DenefLipshitzUple *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_19DifferentialAlgebra_17DenefLipshitzUple_5gamma___get__(struct __pyx_obj_19DifferentialAlgebra_DenefLipshitzUple *__pyx_v_self); /* proto */
static int __pyx_pf_19DifferentialAlgebra_17DenefLipshitzUple_5gamma_2__set__(struct __pyx_obj_19DifferentialAlgebra_DenefLipshitzUple *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_19DifferentialAlgebra_17DenefLipshitzUple_5gamma_4__del__(struct __pyx_obj_19DifferentialAlgebra_DenefLipshitzUple *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_19DifferentialAlgebra_17DenefLipshitzUple_2mu___get__(struct __pyx_obj_19DifferentialAlgebra_DenefLipshitzUple *__pyx_v_self); /* proto */
static int __pyx_pf_19DifferentialAlgebra_17DenefLipshitzUple_2mu_2__set__(struct __pyx_obj_19DifferentialAlgebra_DenefLipshitzUple *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_19DifferentialAlgebra_17DenefLipshitzUple_2mu_4__del__(struct __pyx_obj_19DifferentialAlgebra_DenefLipshitzUple *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_19DifferentialAlgebra_17DenefLipshitzUple_5sigma___get__(struct __pyx_obj_19DifferentialAlgebra_DenefLipshitzUple *__pyx_v_self); /* proto */
static int __pyx_pf_19DifferentialAlgebra_17DenefLipshitzUple_5sigma_2__set__(struct __pyx_obj_19DifferentialAlgebra_DenefLipshitzUple *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_19DifferentialAlgebra_17DenefLipshitzUple_5sigma_4__del__(struct __pyx_obj_19DifferentialAlgebra_DenefLipshitzUple *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_19DifferentialAlgebra_17DenefLipshitzUple_4beta___get__(struct __pyx_obj_19DifferentialAlgebra_DenefLipshitzUple *__pyx_v_self); /* proto */
static int __pyx_pf_19DifferentialAlgebra_17DenefLipshitzUple_4beta_2__set__(struct __pyx_obj_19DifferentialAlgebra_DenefLipshitzUple *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_19DifferentialAlgebra_17DenefLipshitzUple_4beta_4__del__(struct __pyx_obj_19DifferentialAlgebra_DenefLipshitzUple *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_19DifferentialAlgebra_17DenefLipshitzUple_5delta___get__(struct __pyx_obj_19DifferentialAlgebra_DenefLipshitzUple *__pyx_v_self); /* proto */
static int __pyx_pf_19DifferentialAlgebra_17DenefLipshitzUple_5delta_2__set__(struct __pyx_obj_19DifferentialAlgebra_DenefLipshitzUple *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_19DifferentialAlgebra_17DenefLipshitzUple_5delta_4__del__(struct __pyx_obj_19DifferentialAlgebra_DenefLipshitzUple *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_19DifferentialAlgebra_17DenefLipshitzUple_16__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_19DifferentialAlgebra_DenefLipshitzUple *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_19DifferentialAlgebra_17DenefLipshitzUple_18__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_19DifferentialAlgebra_DenefLipshitzUple *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_19DifferentialAlgebra_6__pyx_unpickle_BaseFieldExtension(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_tp_new_19DifferentialAlgebra_DifferentialRing(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_19DifferentialAlgebra_RegularDifferentialChain(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_19DifferentialAlgebra_BaseFieldExtension(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_19DifferentialAlgebra_DenefLipshitzUple(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static __Pyx_CachedCFunction __pyx_umethod_PyBytes_Type_replace = {0, 0, 0, 0, 0};
/* #### Code section: late_includes ### */
/* #### Code section: module_state ### */
typedef struct {
  PyObject *__pyx_d;
  PyObject *__pyx_b;
  PyObject *__pyx_cython_runtime;
  PyObject *__pyx_empty_tuple;
  PyObject *__pyx_empty_bytes;
  PyObject *__pyx_empty_unicode;
  #ifdef __Pyx_CyFunction_USED
  PyTypeObject *__pyx_CyFunctionType;
  #endif
  #ifdef __Pyx_FusedFunction_USED
  PyTypeObject *__pyx_FusedFunctionType;
  #endif
  #ifdef __Pyx_Generator_USED
  PyTypeObject *__pyx_GeneratorType;
  #endif
  #ifdef __Pyx_IterableCoroutine_USED
  PyTypeObject *__pyx_IterableCoroutineType;
  #endif
  #ifdef __Pyx_Coroutine_USED
  PyTypeObject *__pyx_CoroutineAwaitType;
  #endif
  #ifdef __Pyx_Coroutine_USED
  PyTypeObject *__pyx_CoroutineType;
  #endif
  #if CYTHON_USE_MODULE_STATE
  #endif
  #if CYTHON_USE_MODULE_STATE
  #endif
  #if CYTHON_USE_MODULE_STATE
  #endif
  PyTypeObject *__pyx_ptype_7cpython_4type_type;
  #if CYTHON_USE_MODULE_STATE
  #endif
  #if CYTHON_USE_MODULE_STATE
  #endif
  #if CYTHON_USE_MODULE_STATE
  #endif
  #if CYTHON_USE_MODULE_STATE
  #endif
  #if CYTHON_USE_MODULE_STATE
  #endif
  #if CYTHON_USE_MODULE_STATE
  #endif
  #if CYTHON_USE_MODULE_STATE
  #endif
  #if CYTHON_USE_MODULE_STATE
  #endif
  #if CYTHON_USE_MODULE_STATE
  #endif
  #if CYTHON_USE_MODULE_STATE
  #endif
  #if CYTHON_USE_MODULE_STATE
  #endif
  #if CYTHON_USE_MODULE_STATE
  #endif
  #if CYTHON_USE_MODULE_STATE
  #endif
  #if CYTHON_USE_MODULE_STATE
  #endif
  #if CYTHON_USE_MODULE_STATE
  #endif
  #if CYTHON_USE_MODULE_STATE
  #endif
  PyTypeObject *__pyx_ptype_7cpython_4bool_bool;
  #if CYTHON_USE_MODULE_STATE
  #endif
  #if CYTHON_USE_MODULE_STATE
  #endif
  #if CYTHON_USE_MODULE_STATE
  #endif
  #if CYTHON_USE_MODULE_STATE
  #endif
  PyTypeObject *__pyx_ptype_7cpython_7complex_complex;
  #if CYTHON_USE_MODULE_STATE
  #endif
  #if CYTHON_USE_MODULE_STATE
  #endif
  #if CYTHON_USE_MODULE_STATE
  #endif
  #if CYTHON_USE_MODULE_STATE
  #endif
  #if CYTHON_USE_MODULE_STATE
  #endif
  #if CYTHON_USE_MODULE_STATE
  #endif
  #if CYTHON_USE_MODULE_STATE
  #endif
  #if CYTHON_USE_MODULE_STATE
  #endif
  #if CYTHON_USE_MODULE_STATE
  #endif
  #if CYTHON_USE_MODULE_STATE
  #endif
  #if CYTHON_USE_MODULE_STATE
  #endif
  #if CYTHON_USE_MODULE_STATE
  #endif
  #if CYTHON_USE_MODULE_STATE
  #endif
  #if CYTHON_USE_MODULE_STATE
  #endif
  #if CYTHON_USE_MODULE_STATE
  #endif
  #if CYTHON_USE_MODULE_STATE
  #endif
  #if CYTHON_USE_MODULE_STATE
  #endif
  #if CYTHON_USE_MODULE_STATE
  #endif
  #if CYTHON_USE_MODULE_STATE
  #endif
  #if CYTHON_USE_MODULE_STATE
  #endif
  #if CYTHON_USE_MODULE_STATE
  #endif
  #if CYTHON_USE_MODULE_STATE
  PyObject *__pyx_type_19DifferentialAlgebra_DifferentialRing;
  PyObject *__pyx_type_19DifferentialAlgebra_RegularDifferentialChain;
  PyObject *__pyx_type_19DifferentialAlgebra_BaseFieldExtension;
  PyObject *__pyx_type_19DifferentialAlgebra_DenefLipshitzUple;
  #endif
  PyTypeObject *__pyx_ptype_19DifferentialAlgebra_DifferentialRing;
  PyTypeObject *__pyx_ptype_19DifferentialAlgebra_RegularDifferentialChain;
  PyTypeObject *__pyx_ptype_19DifferentialAlgebra_BaseFieldExtension;
  PyTypeObject *__pyx_ptype_19DifferentialAlgebra_DenefLipshitzUple;
  PyObject *__pyx_kp_u_;
  PyObject *__pyx_kp_b_0;
  PyObject *__pyx_kp_u_050_0_1_050_051_133_range;
  PyObject *__pyx_kp_b_1;
  PyObject *__pyx_n_s_A;
  PyObject *__pyx_kp_u_A_selection_in_a_list_of_polyno;
  PyObject *__pyx_n_s_Add;
  PyObject *__pyx_n_s_BaseFieldExtension;
  PyObject *__pyx_n_s_BaseFieldExtension___process_not;
  PyObject *__pyx_n_s_BaseFieldExtension___reduce_cyth;
  PyObject *__pyx_n_s_BaseFieldExtension___setstate_cy;
  PyObject *__pyx_n_s_BaseFieldExtension__latex;
  PyObject *__pyx_n_s_BaseFieldExtension__process_not;
  PyObject *__pyx_n_s_BaseFieldExtension__relations;
  PyObject *__pyx_kp_u_BaseFieldExtension__relations_li;
  PyObject *__pyx_n_s_BaseFieldExtension_generators;
  PyObject *__pyx_kp_u_BaseFieldExtension_generators_li;
  PyObject *__pyx_n_s_BaseFieldExtension_relations;
  PyObject *__pyx_kp_u_BaseFieldExtension_relations_lin;
  PyObject *__pyx_n_s_C;
  PyObject *__pyx_kp_u_Change_of_ranking_for_regular_c;
  PyObject *__pyx_n_s_DRing;
  PyObject *__pyx_n_s_DenefLipshitz;
  PyObject *__pyx_n_s_DenefLipshitzUple;
  PyObject *__pyx_n_s_DenefLipshitzUple_DenefLipshitz;
  PyObject *__pyx_kp_u_DenefLipshitzUple_DenefLipshitz_2;
  PyObject *__pyx_n_s_DenefLipshitzUple___process_nota;
  PyObject *__pyx_n_s_DenefLipshitzUple___reduce_cytho;
  PyObject *__pyx_n_s_DenefLipshitzUple___setstate_cyt;
  PyObject *__pyx_n_s_DenefLipshitzUple__latex;
  PyObject *__pyx_n_s_DenefLipshitzUple__process_nota;
  PyObject *__pyx_n_s_DenefLipshitzUple_constraints;
  PyObject *__pyx_kp_u_DenefLipshitzUple_constraints_li;
  PyObject *__pyx_n_s_DenefLipshitzUple_leading_polyno;
  PyObject *__pyx_kp_u_DenefLipshitzUple_leading_polyno_2;
  PyObject *__pyx_n_s_DenefLipshitzUple_series;
  PyObject *__pyx_kp_u_DenefLipshitzUple_series_line_47;
  PyObject *__pyx_n_u_Denef_Lipshitz_Uple;
  PyObject *__pyx_kp_u_Denef__Lipshitz__Uple;
  PyObject *__pyx_n_s_Derivative;
  PyObject *__pyx_n_s_DifferentialAlgebra;
  PyObject *__pyx_n_s_DifferentialRing;
  PyObject *__pyx_n_s_DifferentialRing_DenefLipshitz;
  PyObject *__pyx_kp_u_DifferentialRing_DenefLipshitz_l;
  PyObject *__pyx_n_s_DifferentialRing_RosenfeldGroebn;
  PyObject *__pyx_kp_u_DifferentialRing_RosenfeldGroebn_2;
  PyObject *__pyx_n_s_DifferentialRing___evaluate;
  PyObject *__pyx_n_s_DifferentialRing___listof_symbol;
  PyObject *__pyx_n_s_DifferentialRing___process_evdic;
  PyObject *__pyx_n_s_DifferentialRing___process_notat;
  PyObject *__pyx_n_s_DifferentialRing___reduce_cython;
  PyObject *__pyx_n_s_DifferentialRing___setstate_cyth;
  PyObject *__pyx_n_s_DifferentialRing__evaluate;
  PyObject *__pyx_n_s_DifferentialRing__latex;
  PyObject *__pyx_n_s_DifferentialRing__listof_symbol;
  PyObject *__pyx_n_s_DifferentialRing__process_equati;
  PyObject *__pyx_n_s_DifferentialRing__process_evdic;
  PyObject *__pyx_n_s_DifferentialRing__process_notat;
  PyObject *__pyx_n_s_DifferentialRing__ranking;
  PyObject *__pyx_n_s_DifferentialRing_coeffs;
  PyObject *__pyx_kp_u_DifferentialRing_coeffs_line_375;
  PyObject *__pyx_n_s_DifferentialRing_differential_pr;
  PyObject *__pyx_kp_u_DifferentialRing_differential_pr_2;
  PyObject *__pyx_n_s_DifferentialRing_differentiate;
  PyObject *__pyx_kp_u_DifferentialRing_differentiate_l;
  PyObject *__pyx_n_s_DifferentialRing_equations;
  PyObject *__pyx_kp_u_DifferentialRing_equations_line;
  PyObject *__pyx_n_s_DifferentialRing_evaluate;
  PyObject *__pyx_kp_u_DifferentialRing_evaluate_line_7;
  PyObject *__pyx_kp_u_DifferentialRing_expected_for_ri;
  PyObject *__pyx_n_s_DifferentialRing_factor_derivati;
  PyObject *__pyx_kp_u_DifferentialRing_factor_derivati_2;
  PyObject *__pyx_n_s_DifferentialRing_indets;
  PyObject *__pyx_kp_u_DifferentialRing_indets_line_963;
  PyObject *__pyx_n_s_DifferentialRing_initial;
  PyObject *__pyx_kp_u_DifferentialRing_initial_line_13;
  PyObject *__pyx_n_s_DifferentialRing_integrate;
  PyObject *__pyx_kp_u_DifferentialRing_integrate_line;
  PyObject *__pyx_n_s_DifferentialRing_is_constant;
  PyObject *__pyx_kp_u_DifferentialRing_is_constant_lin;
  PyObject *__pyx_n_s_DifferentialRing_is_differential;
  PyObject *__pyx_kp_u_DifferentialRing_is_differential_2;
  PyObject *__pyx_n_s_DifferentialRing_leading_coeffic;
  PyObject *__pyx_kp_u_DifferentialRing_leading_coeffic_2;
  PyObject *__pyx_n_s_DifferentialRing_leading_derivat;
  PyObject *__pyx_kp_u_DifferentialRing_leading_derivat_2;
  PyObject *__pyx_n_s_DifferentialRing_leading_rank;
  PyObject *__pyx_kp_u_DifferentialRing_leading_rank_li;
  PyObject *__pyx_n_s_DifferentialRing_normal_form;
  PyObject *__pyx_kp_u_DifferentialRing_normal_form_lin;
  PyObject *__pyx_n_s_DifferentialRing_separant;
  PyObject *__pyx_kp_u_DifferentialRing_separant_line_1;
  PyObject *__pyx_n_s_DifferentialRing_sort;
  PyObject *__pyx_kp_u_DifferentialRing_sort_line_2161;
  PyObject *__pyx_n_s_DifferentialRing_tail;
  PyObject *__pyx_kp_u_DifferentialRing_tail_line_1513;
  PyObject *__pyx_kp_u_Differentiate_a_rational_differ;
  PyObject *__pyx_kp_b_Eq;
  PyObject *__pyx_n_s_Eq_2;
  PyObject *__pyx_n_s_Equality;
  PyObject *__pyx_kp_u_Evaluate_a_differential_fractio;
  PyObject *__pyx_kp_u_Extend_a_regular_differential_c;
  PyObject *__pyx_n_s_F;
  PyObject *__pyx_n_s_Function;
  PyObject *__pyx_kp_s_Incompatible_checksums_0x_x_vs_0;
  PyObject *__pyx_n_s_Indexed;
  PyObject *__pyx_n_s_IndexedBase;
  PyObject *__pyx_n_s_Integer;
  PyObject *__pyx_kp_u_Integrate_a_rational_differenti;
  PyObject *__pyx_n_s_L;
  PyObject *__pyx_n_s_L1;
  PyObject *__pyx_n_s_L2;
  PyObject *__pyx_n_s_L3;
  PyObject *__pyx_n_s_L_as_string;
  PyObject *__pyx_n_s_M;
  PyObject *__pyx_n_s_Mul;
  PyObject *__pyx_n_s_Ne;
  PyObject *__pyx_kp_u_None;
  PyObject *__pyx_n_s_NotImplementedError;
  PyObject *__pyx_n_s_P;
  PyObject *__pyx_n_s_PickleError;
  PyObject *__pyx_n_s_Pow;
  PyObject *__pyx_n_s_R;
  PyObject *__pyx_n_s_Rational;
  PyObject *__pyx_n_s_RegularDifferentialChain;
  PyObject *__pyx_n_s_RegularDifferentialChain_Rosenfe;
  PyObject *__pyx_kp_u_RegularDifferentialChain_Rosenfe_2;
  PyObject *__pyx_kp_u_RegularDifferentialChain__Regula;
  PyObject *__pyx_n_s_RegularDifferentialChain___numbe;
  PyObject *__pyx_n_s_RegularDifferentialChain___proce;
  PyObject *__pyx_n_s_RegularDifferentialChain___reduc;
  PyObject *__pyx_n_s_RegularDifferentialChain___setst;
  PyObject *__pyx_n_s_RegularDifferentialChain__latex;
  PyObject *__pyx_n_s_RegularDifferentialChain__numbe;
  PyObject *__pyx_n_s_RegularDifferentialChain__proce;
  PyObject *__pyx_n_s_RegularDifferentialChain_attribu;
  PyObject *__pyx_kp_u_RegularDifferentialChain_attribu_2;
  PyObject *__pyx_n_s_RegularDifferentialChain_change;
  PyObject *__pyx_kp_u_RegularDifferentialChain_change_2;
  PyObject *__pyx_n_s_RegularDifferentialChain_differe;
  PyObject *__pyx_n_s_RegularDifferentialChain_differe_2;
  PyObject *__pyx_kp_u_RegularDifferentialChain_differe_3;
  PyObject *__pyx_kp_u_RegularDifferentialChain_differe_4;
  PyObject *__pyx_n_s_RegularDifferentialChain_equatio;
  PyObject *__pyx_kp_u_RegularDifferentialChain_equatio_2;
  PyObject *__pyx_kp_u_RegularDifferentialChain_expecte;
  PyObject *__pyx_n_s_RegularDifferentialChain_indets;
  PyObject *__pyx_kp_u_RegularDifferentialChain_indets_2;
  PyObject *__pyx_n_s_RegularDifferentialChain_initial;
  PyObject *__pyx_kp_u_RegularDifferentialChain_initial_2;
  PyObject *__pyx_n_s_RegularDifferentialChain_leading;
  PyObject *__pyx_n_s_RegularDifferentialChain_leading_2;
  PyObject *__pyx_n_s_RegularDifferentialChain_leading_3;
  PyObject *__pyx_kp_u_RegularDifferentialChain_leading_4;
  PyObject *__pyx_kp_u_RegularDifferentialChain_leading_5;
  PyObject *__pyx_kp_u_RegularDifferentialChain_leading_6;
  PyObject *__pyx_n_s_RegularDifferentialChain_normal;
  PyObject *__pyx_kp_u_RegularDifferentialChain_normal_2;
  PyObject *__pyx_n_s_RegularDifferentialChain_prem;
  PyObject *__pyx_kp_u_RegularDifferentialChain_prem_li;
  PyObject *__pyx_n_s_RegularDifferentialChain_prepara;
  PyObject *__pyx_kp_u_RegularDifferentialChain_prepara_2;
  PyObject *__pyx_n_s_RegularDifferentialChain_resulta;
  PyObject *__pyx_kp_u_RegularDifferentialChain_resulta_2;
  PyObject *__pyx_n_s_RegularDifferentialChain_separan;
  PyObject *__pyx_kp_u_RegularDifferentialChain_separan_2;
  PyObject *__pyx_n_s_RegularDifferentialChain_tail;
  PyObject *__pyx_kp_u_RegularDifferentialChain_tail_li;
  PyObject *__pyx_kp_u_Ritt_s_reduction_algorithm_by_a;
  PyObject *__pyx_kp_u_Ritt_s_reduction_algorithm_by_a_2;
  PyObject *__pyx_n_s_RosenfeldGroebner;
  PyObject *__pyx_n_s_RuntimeError;
  PyObject *__pyx_kp_u_Sort_a_list_of_polynomials_acco;
  PyObject *__pyx_kp_u_Split_a_derivative_into_derivat;
  PyObject *__pyx_n_s_Symbol;
  PyObject *__pyx_kp_u_Test_if_a_rational_fraction_is;
  PyObject *__pyx_kp_u_Test_if_an_expression_is_a_rati;
  PyObject *__pyx_kp_u_The_DenefLipshitz_algorithm_INP;
  PyObject *__pyx_kp_u_The_DenefLipshitz_algorithm_INP_2;
  PyObject *__pyx_kp_u_The_Rosenfeld_Groebner_simplifi;
  PyObject *__pyx_kp_u_The_coefficients_and_monomials;
  PyObject *__pyx_kp_u_The_constraints_of_a_DenefLipsh;
  PyObject *__pyx_kp_u_The_embedding_differential_ring;
  PyObject *__pyx_kp_u_The_formal_power_series_solutio;
  PyObject *__pyx_kp_u_The_indeterminates_of_a_Differe;
  PyObject *__pyx_kp_u_The_indeterminates_of_a_Regular;
  PyObject *__pyx_kp_u_The_initial_of_a_polynomial_or;
  PyObject *__pyx_kp_u_The_initials_of_a_regular_diffe;
  PyObject *__pyx_kp_u_The_leading_coefficient_of_a_ra;
  PyObject *__pyx_kp_u_The_leading_coefficients_of_a_r;
  PyObject *__pyx_kp_u_The_leading_derivative_of_a_rat;
  PyObject *__pyx_kp_u_The_leading_derivatives_of_a_re;
  PyObject *__pyx_kp_u_The_leading_polynomials_of_a_De;
  PyObject *__pyx_kp_u_The_leading_rank_of_a_rational;
  PyObject *__pyx_kp_u_The_leading_ranks_of_a_regular;
  PyObject *__pyx_kp_u_The_list_of_attributes_of_a_Reg;
  PyObject *__pyx_kp_u_The_list_of_equations_of_a_regu;
  PyObject *__pyx_kp_u_The_list_of_generators_of_a_bas;
  PyObject *__pyx_kp_u_The_normal_form_of_a_rational_d;
  PyObject *__pyx_kp_u_The_normal_form_of_a_rational_d_2;
  PyObject *__pyx_kp_u_The_number_of_equations_of_a_re;
  PyObject *__pyx_kp_u_The_preparation_equation_of_a_p;
  PyObject *__pyx_kp_u_The_pseudo_remainder_of_a_fract;
  PyObject *__pyx_kp_u_The_regular_differential_chain;
  PyObject *__pyx_kp_u_The_relations_in_a_BMI_compatib;
  PyObject *__pyx_kp_u_The_resultant_of_a_differential;
  PyObject *__pyx_kp_u_The_separant_of_a_rational_frac;
  PyObject *__pyx_kp_u_The_separants_of_a_regular_diff;
  PyObject *__pyx_kp_u_The_tail_of_a_rational_fraction;
  PyObject *__pyx_kp_u_The_tails_of_a_regular_differen;
  PyObject *__pyx_n_s_TypeError;
  PyObject *__pyx_n_s_U;
  PyObject *__pyx_n_s_UndefinedFunction;
  PyObject *__pyx_n_s_Y;
  PyObject *__pyx_n_s_Ybar;
  PyObject *__pyx_kp_b__16;
  PyObject *__pyx_n_s__202;
  PyObject *__pyx_kp_b__6;
  PyObject *__pyx_kp_u__6;
  PyObject *__pyx_kp_b__65;
  PyObject *__pyx_kp_b__66;
  PyObject *__pyx_kp_b__67;
  PyObject *__pyx_kp_u__67;
  PyObject *__pyx_kp_b__7;
  PyObject *__pyx_kp_u__7;
  PyObject *__pyx_kp_u__76;
  PyObject *__pyx_kp_u__83;
  PyObject *__pyx_n_s__84;
  PyObject *__pyx_n_u_all;
  PyObject *__pyx_n_s_arg;
  PyObject *__pyx_n_s_args;
  PyObject *__pyx_n_s_ascii;
  PyObject *__pyx_n_s_asyncio_coroutines;
  PyObject *__pyx_n_s_attributes;
  PyObject *__pyx_n_u_autoreduced;
  PyObject *__pyx_n_s_base;
  PyObject *__pyx_n_s_basefield;
  PyObject *__pyx_n_s_blocks;
  PyObject *__pyx_n_s_casesplit;
  PyObject *__pyx_kp_u_casesplit_True;
  PyObject *__pyx_n_s_change_ranking;
  PyObject *__pyx_n_s_class_getitem;
  PyObject *__pyx_n_s_cline_in_traceback;
  PyObject *__pyx_n_s_coeffs;
  PyObject *__pyx_n_u_coherent;
  PyObject *__pyx_n_s_compile;
  PyObject *__pyx_n_s_congruence;
  PyObject *__pyx_n_s_constraints;
  PyObject *__pyx_n_s_control;
  PyObject *__pyx_n_s_copy;
  PyObject *__pyx_n_s_core;
  PyObject *__pyx_n_s_d;
  PyObject *__pyx_n_s_degree;
  PyObject *__pyx_n_u_degrevlexA;
  PyObject *__pyx_n_u_degrevlexB;
  PyObject *__pyx_n_s_derivation;
  PyObject *__pyx_n_s_derivations;
  PyObject *__pyx_n_u_derivations;
  PyObject *__pyx_n_s_derivative;
  PyObject *__pyx_n_s_ders;
  PyObject *__pyx_n_s_dico;
  PyObject *__pyx_n_s_dict;
  PyObject *__pyx_n_s_dict_2;
  PyObject *__pyx_n_u_differential;
  PyObject *__pyx_kp_u_differential__field;
  PyObject *__pyx_kp_u_differential__ring;
  PyObject *__pyx_n_u_differential_field;
  PyObject *__pyx_n_s_differential_prem;
  PyObject *__pyx_n_s_differential_ring;
  PyObject *__pyx_n_u_differential_ring;
  PyObject *__pyx_n_s_differentiate;
  PyObject *__pyx_n_s_dimlb;
  PyObject *__pyx_kp_u_disable;
  PyObject *__pyx_n_s_e;
  PyObject *__pyx_n_s_elt;
  PyObject *__pyx_kp_u_enable;
  PyObject *__pyx_n_s_eqns;
  PyObject *__pyx_n_s_equation;
  PyObject *__pyx_n_s_equations;
  PyObject *__pyx_n_s_eval;
  PyObject *__pyx_n_s_evaluate;
  PyObject *__pyx_n_s_evaluate_2;
  PyObject *__pyx_n_s_evdict;
  PyObject *__pyx_n_s_evdict0;
  PyObject *__pyx_n_s_evdict1;
  PyObject *__pyx_n_s_expr;
  PyObject *__pyx_n_s_f;
  PyObject *__pyx_n_s_factor_derivative;
  PyObject *__pyx_n_b_false;
  PyObject *__pyx_n_s_fullset;
  PyObject *__pyx_n_s_func;
  PyObject *__pyx_n_s_function;
  PyObject *__pyx_kp_u_gc;
  PyObject *__pyx_n_s_generators;
  PyObject *__pyx_n_s_getstate;
  PyObject *__pyx_n_u_grlexA;
  PyObject *__pyx_n_u_grlexB;
  PyObject *__pyx_n_s_groups;
  PyObject *__pyx_kp_s_home_boulier_DifferentialAlgebr;
  PyObject *__pyx_kp_s_home_boulier_DifferentialAlgebr_2;
  PyObject *__pyx_kp_s_home_boulier_DifferentialAlgebr_3;
  PyObject *__pyx_kp_s_home_boulier_DifferentialAlgebr_4;
  PyObject *__pyx_kp_s_home_boulier_DifferentialAlgebr_5;
  PyObject *__pyx_n_s_i;
  PyObject *__pyx_n_s_import;
  PyObject *__pyx_n_u_independent;
  PyObject *__pyx_kp_u_independent_variable_expected_fo;
  PyObject *__pyx_n_s_indets;
  PyObject *__pyx_n_s_indexed;
  PyObject *__pyx_n_s_indexedbase;
  PyObject *__pyx_n_s_indices;
  PyObject *__pyx_n_s_ineq;
  PyObject *__pyx_n_s_initial;
  PyObject *__pyx_n_s_initializing;
  PyObject *__pyx_n_s_integrate;
  PyObject *__pyx_n_s_is_constant;
  PyObject *__pyx_n_s_is_coroutine;
  PyObject *__pyx_n_s_is_differential_fraction;
  PyObject *__pyx_kp_u_isenabled;
  PyObject *__pyx_n_u_iter;
  PyObject *__pyx_n_s_iterated;
  PyObject *__pyx_n_s_key;
  PyObject *__pyx_n_s_latex;
  PyObject *__pyx_n_s_latex_2;
  PyObject *__pyx_n_s_leading_coefficient;
  PyObject *__pyx_n_s_leading_derivative;
  PyObject *__pyx_n_s_leading_polynomial;
  PyObject *__pyx_n_s_leading_rank;
  PyObject *__pyx_n_u_lex;
  PyObject *__pyx_n_s_lhs;
  PyObject *__pyx_n_s_listform;
  PyObject *__pyx_n_s_listof_symbols;
  PyObject *__pyx_n_s_main;
  PyObject *__pyx_n_s_match;
  PyObject *__pyx_n_s_memout;
  PyObject *__pyx_n_s_mesgerr;
  PyObject *__pyx_n_s_mode;
  PyObject *__pyx_n_s_name;
  PyObject *__pyx_n_s_nbz;
  PyObject *__pyx_n_s_new;
  PyObject *__pyx_n_s_newargs;
  PyObject *__pyx_n_s_newkey;
  PyObject *__pyx_n_s_newval;
  PyObject *__pyx_n_s_normal_form;
  PyObject *__pyx_n_u_normalized;
  PyObject *__pyx_n_s_notation;
  PyObject *__pyx_n_s_number_of_equations;
  PyObject *__pyx_n_s_oo;
  PyObject *__pyx_kp_u_ordinary_differential_ring_expec;
  PyObject *__pyx_n_s_parameters;
  PyObject *__pyx_n_s_pattern;
  PyObject *__pyx_n_s_pickle;
  PyObject *__pyx_n_s_polynomial;
  PyObject *__pyx_n_s_polynomials;
  PyObject *__pyx_n_s_prem;
  PyObject *__pyx_n_s_preparation_equation;
  PyObject *__pyx_n_s_pretend;
  PyObject *__pyx_n_s_prime;
  PyObject *__pyx_n_u_prime;
  PyObject *__pyx_n_u_primitive;
  PyObject *__pyx_n_s_process_equations;
  PyObject *__pyx_n_s_process_evdict;
  PyObject *__pyx_n_s_process_notation;
  PyObject *__pyx_n_s_pyx_PickleError;
  PyObject *__pyx_n_s_pyx_checksum;
  PyObject *__pyx_n_s_pyx_result;
  PyObject *__pyx_n_s_pyx_state;
  PyObject *__pyx_n_s_pyx_type;
  PyObject *__pyx_n_s_pyx_unpickle_BaseFieldExtensio;
  PyObject *__pyx_n_s_q;
  PyObject *__pyx_n_s_range;
  PyObject *__pyx_kp_b_rank_0;
  PyObject *__pyx_n_s_ranking;
  PyObject *__pyx_n_s_ranking_2;
  PyObject *__pyx_n_s_ratfrac;
  PyObject *__pyx_n_s_re;
  PyObject *__pyx_n_s_redset;
  PyObject *__pyx_n_s_reduce;
  PyObject *__pyx_n_s_reduce_cython;
  PyObject *__pyx_n_s_reduce_ex;
  PyObject *__pyx_kp_u_regchain;
  PyObject *__pyx_kp_u_regchain_2;
  PyObject *__pyx_kp_u_regular__differential__chain;
  PyObject *__pyx_n_u_regular_differential_chain;
  PyObject *__pyx_n_s_rel_op;
  PyObject *__pyx_n_s_relational;
  PyObject *__pyx_n_s_relations;
  PyObject *__pyx_n_s_relations_2;
  PyObject *__pyx_n_s_replace;
  PyObject *__pyx_n_s_result;
  PyObject *__pyx_n_s_resultant;
  PyObject *__pyx_n_s_rhs;
  PyObject *__pyx_n_s_ring;
  PyObject *__pyx_n_s_s;
  PyObject *__pyx_n_s_selection;
  PyObject *__pyx_n_s_self;
  PyObject *__pyx_kp_s_self_DLuple_cannot_be_converted;
  PyObject *__pyx_kp_s_self_dring_cannot_be_converted_t;
  PyObject *__pyx_kp_s_self_regchain_cannot_be_converte;
  PyObject *__pyx_n_s_separant;
  PyObject *__pyx_n_s_series;
  PyObject *__pyx_n_s_setstate;
  PyObject *__pyx_n_s_setstate_cython;
  PyObject *__pyx_n_s_singsol;
  PyObject *__pyx_n_s_solved;
  PyObject *__pyx_n_s_sort;
  PyObject *__pyx_n_s_spec;
  PyObject *__pyx_n_s_split;
  PyObject *__pyx_n_u_squarefree;
  PyObject *__pyx_n_s_startswith;
  PyObject *__pyx_n_s_state;
  PyObject *__pyx_n_s_strY;
  PyObject *__pyx_n_s_strYbar;
  PyObject *__pyx_n_s_strattr;
  PyObject *__pyx_n_s_strcontrol;
  PyObject *__pyx_n_s_strder;
  PyObject *__pyx_n_s_strders;
  PyObject *__pyx_n_s_strdimlb;
  PyObject *__pyx_n_s_streqns;
  PyObject *__pyx_n_s_strfull;
  PyObject *__pyx_n_s_strgens;
  PyObject *__pyx_n_s_strineq;
  PyObject *__pyx_n_s_string;
  PyObject *__pyx_kp_s_stringsource;
  PyObject *__pyx_n_s_strmode;
  PyObject *__pyx_n_s_strnot;
  PyObject *__pyx_n_s_strpoly;
  PyObject *__pyx_n_s_strq;
  PyObject *__pyx_n_s_strredset;
  PyObject *__pyx_n_s_strrels;
  PyObject *__pyx_n_s_strsel;
  PyObject *__pyx_n_s_strsingsol;
  PyObject *__pyx_n_s_strvar;
  PyObject *__pyx_n_s_strvars;
  PyObject *__pyx_n_s_strx;
  PyObject *__pyx_n_s_strzstring;
  PyObject *__pyx_n_s_subrankings;
  PyObject *__pyx_n_s_sympy;
  PyObject *__pyx_n_s_sys;
  PyObject *__pyx_n_s_tail;
  PyObject *__pyx_n_s_tensor;
  PyObject *__pyx_n_s_test;
  PyObject *__pyx_kp_u_the_variable_and_the_base_field;
  PyObject *__pyx_n_s_theta;
  PyObject *__pyx_n_s_timeout;
  PyObject *__pyx_n_b_true;
  PyObject *__pyx_n_s_update;
  PyObject *__pyx_n_s_use_setstate;
  PyObject *__pyx_kp_u_utf_8;
  PyObject *__pyx_n_s_var;
  PyObject *__pyx_n_s_variable;
  PyObject *__pyx_kp_u_variable_expected_for_q_found;
  PyObject *__pyx_n_s_vars;
  PyObject *__pyx_n_s_x;
  PyObject *__pyx_n_s_y;
  PyObject *__pyx_n_s_z;
  PyObject *__pyx_kp_u_z_d;
  PyObject *__pyx_n_s_zevdict;
  PyObject *__pyx_n_s_zstring;
  PyObject *__pyx_n_s_zsymb;
  PyObject *__pyx_n_s_zval;
  PyObject *__pyx_int_0;
  PyObject *__pyx_int_1;
  PyObject *__pyx_int_70027971;
  PyObject *__pyx_int_74641392;
  PyObject *__pyx_int_163572033;
  PyObject *__pyx_k__2;
  PyObject *__pyx_k__3;
  PyObject *__pyx_k__4;
  PyObject *__pyx_k__5;
  PyObject *__pyx_k__9;
  PyObject *__pyx_k__11;
  PyObject *__pyx_k__12;
  PyObject *__pyx_k__13;
  PyObject *__pyx_k__14;
  PyObject *__pyx_k__15;
  PyObject *__pyx_k__17;
  PyObject *__pyx_k__18;
  PyObject *__pyx_k__19;
  PyObject *__pyx_k__20;
  PyObject *__pyx_k__21;
  PyObject *__pyx_k__22;
  PyObject *__pyx_k__23;
  PyObject *__pyx_k__24;
  PyObject *__pyx_k__25;
  PyObject *__pyx_k__26;
  PyObject *__pyx_k__27;
  PyObject *__pyx_k__28;
  PyObject *__pyx_k__29;
  PyObject *__pyx_k__30;
  PyObject *__pyx_k__31;
  PyObject *__pyx_k__32;
  PyObject *__pyx_k__33;
  PyObject *__pyx_k__35;
  PyObject *__pyx_k__36;
  PyObject *__pyx_k__37;
  PyObject *__pyx_k__38;
  PyObject *__pyx_k__39;
  PyObject *__pyx_k__40;
  PyObject *__pyx_k__41;
  PyObject *__pyx_k__49;
  PyObject *__pyx_k__50;
  PyObject *__pyx_k__51;
  PyObject *__pyx_k__52;
  PyObject *__pyx_k__53;
  PyObject *__pyx_k__54;
  PyObject *__pyx_k__55;
  PyObject *__pyx_k__56;
  PyObject *__pyx_k__57;
  PyObject *__pyx_k__58;
  PyObject *__pyx_k__59;
  PyObject *__pyx_k__60;
  PyObject *__pyx_k__61;
  PyObject *__pyx_k__62;
  PyObject *__pyx_k__64;
  PyObject *__pyx_k__68;
  PyObject *__pyx_k__69;
  PyObject *__pyx_k__70;
  PyObject *__pyx_k__71;
  PyObject *__pyx_k__72;
  PyObject *__pyx_k__73;
  PyObject *__pyx_k__77;
  PyObject *__pyx_k__78;
  PyObject *__pyx_k__79;
  PyObject *__pyx_k__80;
  PyObject *__pyx_k__81;
  PyObject *__pyx_tuple__8;
  PyObject *__pyx_tuple__10;
  PyObject *__pyx_tuple__34;
  PyObject *__pyx_tuple__42;
  PyObject *__pyx_tuple__43;
  PyObject *__pyx_tuple__44;
  PyObject *__pyx_tuple__45;
  PyObject *__pyx_tuple__46;
  PyObject *__pyx_tuple__47;
  PyObject *__pyx_tuple__48;
  PyObject *__pyx_tuple__63;
  PyObject *__pyx_tuple__74;
  PyObject *__pyx_tuple__75;
  PyObject *__pyx_tuple__82;
  PyObject *__pyx_tuple__85;
  PyObject *__pyx_tuple__87;
  PyObject *__pyx_tuple__90;
  PyObject *__pyx_tuple__92;
  PyObject *__pyx_tuple__94;
  PyObject *__pyx_tuple__96;
  PyObject *__pyx_tuple__98;
  PyObject *__pyx_tuple__100;
  PyObject *__pyx_tuple__102;
  PyObject *__pyx_tuple__104;
  PyObject *__pyx_tuple__106;
  PyObject *__pyx_tuple__108;
  PyObject *__pyx_tuple__110;
  PyObject *__pyx_tuple__112;
  PyObject *__pyx_tuple__114;
  PyObject *__pyx_tuple__116;
  PyObject *__pyx_tuple__118;
  PyObject *__pyx_tuple__120;
  PyObject *__pyx_tuple__124;
  PyObject *__pyx_tuple__126;
  PyObject *__pyx_tuple__128;
  PyObject *__pyx_tuple__130;
  PyObject *__pyx_tuple__132;
  PyObject *__pyx_tuple__134;
  PyObject *__pyx_tuple__136;
  PyObject *__pyx_tuple__138;
  PyObject *__pyx_tuple__140;
  PyObject *__pyx_tuple__143;
  PyObject *__pyx_tuple__148;
  PyObject *__pyx_tuple__150;
  PyObject *__pyx_tuple__152;
  PyObject *__pyx_tuple__154;
  PyObject *__pyx_tuple__156;
  PyObject *__pyx_tuple__158;
  PyObject *__pyx_tuple__162;
  PyObject *__pyx_tuple__164;
  PyObject *__pyx_tuple__166;
  PyObject *__pyx_tuple__169;
  PyObject *__pyx_tuple__171;
  PyObject *__pyx_tuple__173;
  PyObject *__pyx_tuple__175;
  PyObject *__pyx_tuple__184;
  PyObject *__pyx_tuple__186;
  PyObject *__pyx_tuple__191;
  PyObject *__pyx_tuple__193;
  PyObject *__pyx_tuple__196;
  PyObject *__pyx_tuple__200;
  PyObject *__pyx_codeobj__86;
  PyObject *__pyx_codeobj__88;
  PyObject *__pyx_codeobj__89;
  PyObject *__pyx_codeobj__91;
  PyObject *__pyx_codeobj__93;
  PyObject *__pyx_codeobj__95;
  PyObject *__pyx_codeobj__97;
  PyObject *__pyx_codeobj__99;
  PyObject *__pyx_codeobj__101;
  PyObject *__pyx_codeobj__103;
  PyObject *__pyx_codeobj__105;
  PyObject *__pyx_codeobj__107;
  PyObject *__pyx_codeobj__109;
  PyObject *__pyx_codeobj__111;
  PyObject *__pyx_codeobj__113;
  PyObject *__pyx_codeobj__115;
  PyObject *__pyx_codeobj__117;
  PyObject *__pyx_codeobj__119;
  PyObject *__pyx_codeobj__121;
  PyObject *__pyx_codeobj__122;
  PyObject *__pyx_codeobj__123;
  PyObject *__pyx_codeobj__125;
  PyObject *__pyx_codeobj__127;
  PyObject *__pyx_codeobj__129;
  PyObject *__pyx_codeobj__131;
  PyObject *__pyx_codeobj__133;
  PyObject *__pyx_codeobj__135;
  PyObject *__pyx_codeobj__137;
  PyObject *__pyx_codeobj__139;
  PyObject *__pyx_codeobj__141;
  PyObject *__pyx_codeobj__142;
  PyObject *__pyx_codeobj__144;
  PyObject *__pyx_codeobj__145;
  PyObject *__pyx_codeobj__146;
  PyObject *__pyx_codeobj__147;
  PyObject *__pyx_codeobj__149;
  PyObject *__pyx_codeobj__151;
  PyObject *__pyx_codeobj__153;
  PyObject *__pyx_codeobj__155;
  PyObject *__pyx_codeobj__157;
  PyObject *__pyx_codeobj__159;
  PyObject *__pyx_codeobj__160;
  PyObject *__pyx_codeobj__161;
  PyObject *__pyx_codeobj__163;
  PyObject *__pyx_codeobj__165;
  PyObject *__pyx_codeobj__167;
  PyObject *__pyx_codeobj__168;
  PyObject *__pyx_codeobj__170;
  PyObject *__pyx_codeobj__172;
  PyObject *__pyx_codeobj__174;
  PyObject *__pyx_codeobj__176;
  PyObject *__pyx_codeobj__177;
  PyObject *__pyx_codeobj__178;
  PyObject *__pyx_codeobj__179;
  PyObject *__pyx_codeobj__180;
  PyObject *__pyx_codeobj__181;
  PyObject *__pyx_codeobj__182;
  PyObject *__pyx_codeobj__183;
  PyObject *__pyx_codeobj__185;
  PyObject *__pyx_codeobj__187;
  PyObject *__pyx_codeobj__188;
  PyObject *__pyx_codeobj__189;
  PyObject *__pyx_codeobj__190;
  PyObject *__pyx_codeobj__192;
  PyObject *__pyx_codeobj__194;
  PyObject *__pyx_codeobj__195;
  PyObject *__pyx_codeobj__197;
  PyObject *__pyx_codeobj__198;
  PyObject *__pyx_codeobj__199;
  PyObject *__pyx_codeobj__201;
} __pyx_mstate;

#if CYTHON_USE_MODULE_STATE
#ifdef __cplusplus
namespace {
  extern struct PyModuleDef __pyx_moduledef;
} /* anonymous namespace */
#else
static struct PyModuleDef __pyx_moduledef;
#endif

#define __pyx_mstate(o) ((__pyx_mstate *)__Pyx_PyModule_GetState(o))

#define __pyx_mstate_global (__pyx_mstate(PyState_FindModule(&__pyx_moduledef)))

#define __pyx_m (PyState_FindModule(&__pyx_moduledef))
#else
static __pyx_mstate __pyx_mstate_global_static =
#ifdef __cplusplus
    {};
#else
    {0};
#endif
static __pyx_mstate *__pyx_mstate_global = &__pyx_mstate_global_static;
#endif
/* #### Code section: module_state_clear ### */
#if CYTHON_USE_MODULE_STATE
static int __pyx_m_clear(PyObject *m) {
  __pyx_mstate *clear_module_state = __pyx_mstate(m);
  if (!clear_module_state) return 0;
  Py_CLEAR(clear_module_state->__pyx_d);
  Py_CLEAR(clear_module_state->__pyx_b);
  Py_CLEAR(clear_module_state->__pyx_cython_runtime);
  Py_CLEAR(clear_module_state->__pyx_empty_tuple);
  Py_CLEAR(clear_module_state->__pyx_empty_bytes);
  Py_CLEAR(clear_module_state->__pyx_empty_unicode);
  #ifdef __Pyx_CyFunction_USED
  Py_CLEAR(clear_module_state->__pyx_CyFunctionType);
  #endif
  #ifdef __Pyx_FusedFunction_USED
  Py_CLEAR(clear_module_state->__pyx_FusedFunctionType);
  #endif
  Py_CLEAR(clear_module_state->__pyx_ptype_7cpython_4type_type);
  Py_CLEAR(clear_module_state->__pyx_ptype_7cpython_4bool_bool);
  Py_CLEAR(clear_module_state->__pyx_ptype_7cpython_7complex_complex);
  Py_CLEAR(clear_module_state->__pyx_ptype_19DifferentialAlgebra_DifferentialRing);
  Py_CLEAR(clear_module_state->__pyx_type_19DifferentialAlgebra_DifferentialRing);
  Py_CLEAR(clear_module_state->__pyx_ptype_19DifferentialAlgebra_RegularDifferentialChain);
  Py_CLEAR(clear_module_state->__pyx_type_19DifferentialAlgebra_RegularDifferentialChain);
  Py_CLEAR(clear_module_state->__pyx_ptype_19DifferentialAlgebra_BaseFieldExtension);
  Py_CLEAR(clear_module_state->__pyx_type_19DifferentialAlgebra_BaseFieldExtension);
  Py_CLEAR(clear_module_state->__pyx_ptype_19DifferentialAlgebra_DenefLipshitzUple);
  Py_CLEAR(clear_module_state->__pyx_type_19DifferentialAlgebra_DenefLipshitzUple);
  Py_CLEAR(clear_module_state->__pyx_kp_u_);
  Py_CLEAR(clear_module_state->__pyx_kp_b_0);
  Py_CLEAR(clear_module_state->__pyx_kp_u_050_0_1_050_051_133_range);
  Py_CLEAR(clear_module_state->__pyx_kp_b_1);
  Py_CLEAR(clear_module_state->__pyx_n_s_A);
  Py_CLEAR(clear_module_state->__pyx_kp_u_A_selection_in_a_list_of_polyno);
  Py_CLEAR(clear_module_state->__pyx_n_s_Add);
  Py_CLEAR(clear_module_state->__pyx_n_s_BaseFieldExtension);
  Py_CLEAR(clear_module_state->__pyx_n_s_BaseFieldExtension___process_not);
  Py_CLEAR(clear_module_state->__pyx_n_s_BaseFieldExtension___reduce_cyth);
  Py_CLEAR(clear_module_state->__pyx_n_s_BaseFieldExtension___setstate_cy);
  Py_CLEAR(clear_module_state->__pyx_n_s_BaseFieldExtension__latex);
  Py_CLEAR(clear_module_state->__pyx_n_s_BaseFieldExtension__process_not);
  Py_CLEAR(clear_module_state->__pyx_n_s_BaseFieldExtension__relations);
  Py_CLEAR(clear_module_state->__pyx_kp_u_BaseFieldExtension__relations_li);
  Py_CLEAR(clear_module_state->__pyx_n_s_BaseFieldExtension_generators);
  Py_CLEAR(clear_module_state->__pyx_kp_u_BaseFieldExtension_generators_li);
  Py_CLEAR(clear_module_state->__pyx_n_s_BaseFieldExtension_relations);
  Py_CLEAR(clear_module_state->__pyx_kp_u_BaseFieldExtension_relations_lin);
  Py_CLEAR(clear_module_state->__pyx_n_s_C);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Change_of_ranking_for_regular_c);
  Py_CLEAR(clear_module_state->__pyx_n_s_DRing);
  Py_CLEAR(clear_module_state->__pyx_n_s_DenefLipshitz);
  Py_CLEAR(clear_module_state->__pyx_n_s_DenefLipshitzUple);
  Py_CLEAR(clear_module_state->__pyx_n_s_DenefLipshitzUple_DenefLipshitz);
  Py_CLEAR(clear_module_state->__pyx_kp_u_DenefLipshitzUple_DenefLipshitz_2);
  Py_CLEAR(clear_module_state->__pyx_n_s_DenefLipshitzUple___process_nota);
  Py_CLEAR(clear_module_state->__pyx_n_s_DenefLipshitzUple___reduce_cytho);
  Py_CLEAR(clear_module_state->__pyx_n_s_DenefLipshitzUple___setstate_cyt);
  Py_CLEAR(clear_module_state->__pyx_n_s_DenefLipshitzUple__latex);
  Py_CLEAR(clear_module_state->__pyx_n_s_DenefLipshitzUple__process_nota);
  Py_CLEAR(clear_module_state->__pyx_n_s_DenefLipshitzUple_constraints);
  Py_CLEAR(clear_module_state->__pyx_kp_u_DenefLipshitzUple_constraints_li);
  Py_CLEAR(clear_module_state->__pyx_n_s_DenefLipshitzUple_leading_polyno);
  Py_CLEAR(clear_module_state->__pyx_kp_u_DenefLipshitzUple_leading_polyno_2);
  Py_CLEAR(clear_module_state->__pyx_n_s_DenefLipshitzUple_series);
  Py_CLEAR(clear_module_state->__pyx_kp_u_DenefLipshitzUple_series_line_47);
  Py_CLEAR(clear_module_state->__pyx_n_u_Denef_Lipshitz_Uple);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Denef__Lipshitz__Uple);
  Py_CLEAR(clear_module_state->__pyx_n_s_Derivative);
  Py_CLEAR(clear_module_state->__pyx_n_s_DifferentialAlgebra);
  Py_CLEAR(clear_module_state->__pyx_n_s_DifferentialRing);
  Py_CLEAR(clear_module_state->__pyx_n_s_DifferentialRing_DenefLipshitz);
  Py_CLEAR(clear_module_state->__pyx_kp_u_DifferentialRing_DenefLipshitz_l);
  Py_CLEAR(clear_module_state->__pyx_n_s_DifferentialRing_RosenfeldGroebn);
  Py_CLEAR(clear_module_state->__pyx_kp_u_DifferentialRing_RosenfeldGroebn_2);
  Py_CLEAR(clear_module_state->__pyx_n_s_DifferentialRing___evaluate);
  Py_CLEAR(clear_module_state->__pyx_n_s_DifferentialRing___listof_symbol);
  Py_CLEAR(clear_module_state->__pyx_n_s_DifferentialRing___process_evdic);
  Py_CLEAR(clear_module_state->__pyx_n_s_DifferentialRing___process_notat);
  Py_CLEAR(clear_module_state->__pyx_n_s_DifferentialRing___reduce_cython);
  Py_CLEAR(clear_module_state->__pyx_n_s_DifferentialRing___setstate_cyth);
  Py_CLEAR(clear_module_state->__pyx_n_s_DifferentialRing__evaluate);
  Py_CLEAR(clear_module_state->__pyx_n_s_DifferentialRing__latex);
  Py_CLEAR(clear_module_state->__pyx_n_s_DifferentialRing__listof_symbol);
  Py_CLEAR(clear_module_state->__pyx_n_s_DifferentialRing__process_equati);
  Py_CLEAR(clear_module_state->__pyx_n_s_DifferentialRing__process_evdic);
  Py_CLEAR(clear_module_state->__pyx_n_s_DifferentialRing__process_notat);
  Py_CLEAR(clear_module_state->__pyx_n_s_DifferentialRing__ranking);
  Py_CLEAR(clear_module_state->__pyx_n_s_DifferentialRing_coeffs);
  Py_CLEAR(clear_module_state->__pyx_kp_u_DifferentialRing_coeffs_line_375);
  Py_CLEAR(clear_module_state->__pyx_n_s_DifferentialRing_differential_pr);
  Py_CLEAR(clear_module_state->__pyx_kp_u_DifferentialRing_differential_pr_2);
  Py_CLEAR(clear_module_state->__pyx_n_s_DifferentialRing_differentiate);
  Py_CLEAR(clear_module_state->__pyx_kp_u_DifferentialRing_differentiate_l);
  Py_CLEAR(clear_module_state->__pyx_n_s_DifferentialRing_equations);
  Py_CLEAR(clear_module_state->__pyx_kp_u_DifferentialRing_equations_line);
  Py_CLEAR(clear_module_state->__pyx_n_s_DifferentialRing_evaluate);
  Py_CLEAR(clear_module_state->__pyx_kp_u_DifferentialRing_evaluate_line_7);
  Py_CLEAR(clear_module_state->__pyx_kp_u_DifferentialRing_expected_for_ri);
  Py_CLEAR(clear_module_state->__pyx_n_s_DifferentialRing_factor_derivati);
  Py_CLEAR(clear_module_state->__pyx_kp_u_DifferentialRing_factor_derivati_2);
  Py_CLEAR(clear_module_state->__pyx_n_s_DifferentialRing_indets);
  Py_CLEAR(clear_module_state->__pyx_kp_u_DifferentialRing_indets_line_963);
  Py_CLEAR(clear_module_state->__pyx_n_s_DifferentialRing_initial);
  Py_CLEAR(clear_module_state->__pyx_kp_u_DifferentialRing_initial_line_13);
  Py_CLEAR(clear_module_state->__pyx_n_s_DifferentialRing_integrate);
  Py_CLEAR(clear_module_state->__pyx_kp_u_DifferentialRing_integrate_line);
  Py_CLEAR(clear_module_state->__pyx_n_s_DifferentialRing_is_constant);
  Py_CLEAR(clear_module_state->__pyx_kp_u_DifferentialRing_is_constant_lin);
  Py_CLEAR(clear_module_state->__pyx_n_s_DifferentialRing_is_differential);
  Py_CLEAR(clear_module_state->__pyx_kp_u_DifferentialRing_is_differential_2);
  Py_CLEAR(clear_module_state->__pyx_n_s_DifferentialRing_leading_coeffic);
  Py_CLEAR(clear_module_state->__pyx_kp_u_DifferentialRing_leading_coeffic_2);
  Py_CLEAR(clear_module_state->__pyx_n_s_DifferentialRing_leading_derivat);
  Py_CLEAR(clear_module_state->__pyx_kp_u_DifferentialRing_leading_derivat_2);
  Py_CLEAR(clear_module_state->__pyx_n_s_DifferentialRing_leading_rank);
  Py_CLEAR(clear_module_state->__pyx_kp_u_DifferentialRing_leading_rank_li);
  Py_CLEAR(clear_module_state->__pyx_n_s_DifferentialRing_normal_form);
  Py_CLEAR(clear_module_state->__pyx_kp_u_DifferentialRing_normal_form_lin);
  Py_CLEAR(clear_module_state->__pyx_n_s_DifferentialRing_separant);
  Py_CLEAR(clear_module_state->__pyx_kp_u_DifferentialRing_separant_line_1);
  Py_CLEAR(clear_module_state->__pyx_n_s_DifferentialRing_sort);
  Py_CLEAR(clear_module_state->__pyx_kp_u_DifferentialRing_sort_line_2161);
  Py_CLEAR(clear_module_state->__pyx_n_s_DifferentialRing_tail);
  Py_CLEAR(clear_module_state->__pyx_kp_u_DifferentialRing_tail_line_1513);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Differentiate_a_rational_differ);
  Py_CLEAR(clear_module_state->__pyx_kp_b_Eq);
  Py_CLEAR(clear_module_state->__pyx_n_s_Eq_2);
  Py_CLEAR(clear_module_state->__pyx_n_s_Equality);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Evaluate_a_differential_fractio);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Extend_a_regular_differential_c);
  Py_CLEAR(clear_module_state->__pyx_n_s_F);
  Py_CLEAR(clear_module_state->__pyx_n_s_Function);
  Py_CLEAR(clear_module_state->__pyx_kp_s_Incompatible_checksums_0x_x_vs_0);
  Py_CLEAR(clear_module_state->__pyx_n_s_Indexed);
  Py_CLEAR(clear_module_state->__pyx_n_s_IndexedBase);
  Py_CLEAR(clear_module_state->__pyx_n_s_Integer);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Integrate_a_rational_differenti);
  Py_CLEAR(clear_module_state->__pyx_n_s_L);
  Py_CLEAR(clear_module_state->__pyx_n_s_L1);
  Py_CLEAR(clear_module_state->__pyx_n_s_L2);
  Py_CLEAR(clear_module_state->__pyx_n_s_L3);
  Py_CLEAR(clear_module_state->__pyx_n_s_L_as_string);
  Py_CLEAR(clear_module_state->__pyx_n_s_M);
  Py_CLEAR(clear_module_state->__pyx_n_s_Mul);
  Py_CLEAR(clear_module_state->__pyx_n_s_Ne);
  Py_CLEAR(clear_module_state->__pyx_kp_u_None);
  Py_CLEAR(clear_module_state->__pyx_n_s_NotImplementedError);
  Py_CLEAR(clear_module_state->__pyx_n_s_P);
  Py_CLEAR(clear_module_state->__pyx_n_s_PickleError);
  Py_CLEAR(clear_module_state->__pyx_n_s_Pow);
  Py_CLEAR(clear_module_state->__pyx_n_s_R);
  Py_CLEAR(clear_module_state->__pyx_n_s_Rational);
  Py_CLEAR(clear_module_state->__pyx_n_s_RegularDifferentialChain);
  Py_CLEAR(clear_module_state->__pyx_n_s_RegularDifferentialChain_Rosenfe);
  Py_CLEAR(clear_module_state->__pyx_kp_u_RegularDifferentialChain_Rosenfe_2);
  Py_CLEAR(clear_module_state->__pyx_kp_u_RegularDifferentialChain__Regula);
  Py_CLEAR(clear_module_state->__pyx_n_s_RegularDifferentialChain___numbe);
  Py_CLEAR(clear_module_state->__pyx_n_s_RegularDifferentialChain___proce);
  Py_CLEAR(clear_module_state->__pyx_n_s_RegularDifferentialChain___reduc);
  Py_CLEAR(clear_module_state->__pyx_n_s_RegularDifferentialChain___setst);
  Py_CLEAR(clear_module_state->__pyx_n_s_RegularDifferentialChain__latex);
  Py_CLEAR(clear_module_state->__pyx_n_s_RegularDifferentialChain__numbe);
  Py_CLEAR(clear_module_state->__pyx_n_s_RegularDifferentialChain__proce);
  Py_CLEAR(clear_module_state->__pyx_n_s_RegularDifferentialChain_attribu);
  Py_CLEAR(clear_module_state->__pyx_kp_u_RegularDifferentialChain_attribu_2);
  Py_CLEAR(clear_module_state->__pyx_n_s_RegularDifferentialChain_change);
  Py_CLEAR(clear_module_state->__pyx_kp_u_RegularDifferentialChain_change_2);
  Py_CLEAR(clear_module_state->__pyx_n_s_RegularDifferentialChain_differe);
  Py_CLEAR(clear_module_state->__pyx_n_s_RegularDifferentialChain_differe_2);
  Py_CLEAR(clear_module_state->__pyx_kp_u_RegularDifferentialChain_differe_3);
  Py_CLEAR(clear_module_state->__pyx_kp_u_RegularDifferentialChain_differe_4);
  Py_CLEAR(clear_module_state->__pyx_n_s_RegularDifferentialChain_equatio);
  Py_CLEAR(clear_module_state->__pyx_kp_u_RegularDifferentialChain_equatio_2);
  Py_CLEAR(clear_module_state->__pyx_kp_u_RegularDifferentialChain_expecte);
  Py_CLEAR(clear_module_state->__pyx_n_s_RegularDifferentialChain_indets);
  Py_CLEAR(clear_module_state->__pyx_kp_u_RegularDifferentialChain_indets_2);
  Py_CLEAR(clear_module_state->__pyx_n_s_RegularDifferentialChain_initial);
  Py_CLEAR(clear_module_state->__pyx_kp_u_RegularDifferentialChain_initial_2);
  Py_CLEAR(clear_module_state->__pyx_n_s_RegularDifferentialChain_leading);
  Py_CLEAR(clear_module_state->__pyx_n_s_RegularDifferentialChain_leading_2);
  Py_CLEAR(clear_module_state->__pyx_n_s_RegularDifferentialChain_leading_3);
  Py_CLEAR(clear_module_state->__pyx_kp_u_RegularDifferentialChain_leading_4);
  Py_CLEAR(clear_module_state->__pyx_kp_u_RegularDifferentialChain_leading_5);
  Py_CLEAR(clear_module_state->__pyx_kp_u_RegularDifferentialChain_leading_6);
  Py_CLEAR(clear_module_state->__pyx_n_s_RegularDifferentialChain_normal);
  Py_CLEAR(clear_module_state->__pyx_kp_u_RegularDifferentialChain_normal_2);
  Py_CLEAR(clear_module_state->__pyx_n_s_RegularDifferentialChain_prem);
  Py_CLEAR(clear_module_state->__pyx_kp_u_RegularDifferentialChain_prem_li);
  Py_CLEAR(clear_module_state->__pyx_n_s_RegularDifferentialChain_prepara);
  Py_CLEAR(clear_module_state->__pyx_kp_u_RegularDifferentialChain_prepara_2);
  Py_CLEAR(clear_module_state->__pyx_n_s_RegularDifferentialChain_resulta);
  Py_CLEAR(clear_module_state->__pyx_kp_u_RegularDifferentialChain_resulta_2);
  Py_CLEAR(clear_module_state->__pyx_n_s_RegularDifferentialChain_separan);
  Py_CLEAR(clear_module_state->__pyx_kp_u_RegularDifferentialChain_separan_2);
  Py_CLEAR(clear_module_state->__pyx_n_s_RegularDifferentialChain_tail);
  Py_CLEAR(clear_module_state->__pyx_kp_u_RegularDifferentialChain_tail_li);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Ritt_s_reduction_algorithm_by_a);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Ritt_s_reduction_algorithm_by_a_2);
  Py_CLEAR(clear_module_state->__pyx_n_s_RosenfeldGroebner);
  Py_CLEAR(clear_module_state->__pyx_n_s_RuntimeError);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Sort_a_list_of_polynomials_acco);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Split_a_derivative_into_derivat);
  Py_CLEAR(clear_module_state->__pyx_n_s_Symbol);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Test_if_a_rational_fraction_is);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Test_if_an_expression_is_a_rati);
  Py_CLEAR(clear_module_state->__pyx_kp_u_The_DenefLipshitz_algorithm_INP);
  Py_CLEAR(clear_module_state->__pyx_kp_u_The_DenefLipshitz_algorithm_INP_2);
  Py_CLEAR(clear_module_state->__pyx_kp_u_The_Rosenfeld_Groebner_simplifi);
  Py_CLEAR(clear_module_state->__pyx_kp_u_The_coefficients_and_monomials);
  Py_CLEAR(clear_module_state->__pyx_kp_u_The_constraints_of_a_DenefLipsh);
  Py_CLEAR(clear_module_state->__pyx_kp_u_The_embedding_differential_ring);
  Py_CLEAR(clear_module_state->__pyx_kp_u_The_formal_power_series_solutio);
  Py_CLEAR(clear_module_state->__pyx_kp_u_The_indeterminates_of_a_Differe);
  Py_CLEAR(clear_module_state->__pyx_kp_u_The_indeterminates_of_a_Regular);
  Py_CLEAR(clear_module_state->__pyx_kp_u_The_initial_of_a_polynomial_or);
  Py_CLEAR(clear_module_state->__pyx_kp_u_The_initials_of_a_regular_diffe);
  Py_CLEAR(clear_module_state->__pyx_kp_u_The_leading_coefficient_of_a_ra);
  Py_CLEAR(clear_module_state->__pyx_kp_u_The_leading_coefficients_of_a_r);
  Py_CLEAR(clear_module_state->__pyx_kp_u_The_leading_derivative_of_a_rat);
  Py_CLEAR(clear_module_state->__pyx_kp_u_The_leading_derivatives_of_a_re);
  Py_CLEAR(clear_module_state->__pyx_kp_u_The_leading_polynomials_of_a_De);
  Py_CLEAR(clear_module_state->__pyx_kp_u_The_leading_rank_of_a_rational);
  Py_CLEAR(clear_module_state->__pyx_kp_u_The_leading_ranks_of_a_regular);
  Py_CLEAR(clear_module_state->__pyx_kp_u_The_list_of_attributes_of_a_Reg);
  Py_CLEAR(clear_module_state->__pyx_kp_u_The_list_of_equations_of_a_regu);
  Py_CLEAR(clear_module_state->__pyx_kp_u_The_list_of_generators_of_a_bas);
  Py_CLEAR(clear_module_state->__pyx_kp_u_The_normal_form_of_a_rational_d);
  Py_CLEAR(clear_module_state->__pyx_kp_u_The_normal_form_of_a_rational_d_2);
  Py_CLEAR(clear_module_state->__pyx_kp_u_The_number_of_equations_of_a_re);
  Py_CLEAR(clear_module_state->__pyx_kp_u_The_preparation_equation_of_a_p);
  Py_CLEAR(clear_module_state->__pyx_kp_u_The_pseudo_remainder_of_a_fract);
  Py_CLEAR(clear_module_state->__pyx_kp_u_The_regular_differential_chain);
  Py_CLEAR(clear_module_state->__pyx_kp_u_The_relations_in_a_BMI_compatib);
  Py_CLEAR(clear_module_state->__pyx_kp_u_The_resultant_of_a_differential);
  Py_CLEAR(clear_module_state->__pyx_kp_u_The_separant_of_a_rational_frac);
  Py_CLEAR(clear_module_state->__pyx_kp_u_The_separants_of_a_regular_diff);
  Py_CLEAR(clear_module_state->__pyx_kp_u_The_tail_of_a_rational_fraction);
  Py_CLEAR(clear_module_state->__pyx_kp_u_The_tails_of_a_regular_differen);
  Py_CLEAR(clear_module_state->__pyx_n_s_TypeError);
  Py_CLEAR(clear_module_state->__pyx_n_s_U);
  Py_CLEAR(clear_module_state->__pyx_n_s_UndefinedFunction);
  Py_CLEAR(clear_module_state->__pyx_n_s_Y);
  Py_CLEAR(clear_module_state->__pyx_n_s_Ybar);
  Py_CLEAR(clear_module_state->__pyx_kp_b__16);
  Py_CLEAR(clear_module_state->__pyx_n_s__202);
  Py_CLEAR(clear_module_state->__pyx_kp_b__6);
  Py_CLEAR(clear_module_state->__pyx_kp_u__6);
  Py_CLEAR(clear_module_state->__pyx_kp_b__65);
  Py_CLEAR(clear_module_state->__pyx_kp_b__66);
  Py_CLEAR(clear_module_state->__pyx_kp_b__67);
  Py_CLEAR(clear_module_state->__pyx_kp_u__67);
  Py_CLEAR(clear_module_state->__pyx_kp_b__7);
  Py_CLEAR(clear_module_state->__pyx_kp_u__7);
  Py_CLEAR(clear_module_state->__pyx_kp_u__76);
  Py_CLEAR(clear_module_state->__pyx_kp_u__83);
  Py_CLEAR(clear_module_state->__pyx_n_s__84);
  Py_CLEAR(clear_module_state->__pyx_n_u_all);
  Py_CLEAR(clear_module_state->__pyx_n_s_arg);
  Py_CLEAR(clear_module_state->__pyx_n_s_args);
  Py_CLEAR(clear_module_state->__pyx_n_s_ascii);
  Py_CLEAR(clear_module_state->__pyx_n_s_asyncio_coroutines);
  Py_CLEAR(clear_module_state->__pyx_n_s_attributes);
  Py_CLEAR(clear_module_state->__pyx_n_u_autoreduced);
  Py_CLEAR(clear_module_state->__pyx_n_s_base);
  Py_CLEAR(clear_module_state->__pyx_n_s_basefield);
  Py_CLEAR(clear_module_state->__pyx_n_s_blocks);
  Py_CLEAR(clear_module_state->__pyx_n_s_casesplit);
  Py_CLEAR(clear_module_state->__pyx_kp_u_casesplit_True);
  Py_CLEAR(clear_module_state->__pyx_n_s_change_ranking);
  Py_CLEAR(clear_module_state->__pyx_n_s_class_getitem);
  Py_CLEAR(clear_module_state->__pyx_n_s_cline_in_traceback);
  Py_CLEAR(clear_module_state->__pyx_n_s_coeffs);
  Py_CLEAR(clear_module_state->__pyx_n_u_coherent);
  Py_CLEAR(clear_module_state->__pyx_n_s_compile);
  Py_CLEAR(clear_module_state->__pyx_n_s_congruence);
  Py_CLEAR(clear_module_state->__pyx_n_s_constraints);
  Py_CLEAR(clear_module_state->__pyx_n_s_control);
  Py_CLEAR(clear_module_state->__pyx_n_s_copy);
  Py_CLEAR(clear_module_state->__pyx_n_s_core);
  Py_CLEAR(clear_module_state->__pyx_n_s_d);
  Py_CLEAR(clear_module_state->__pyx_n_s_degree);
  Py_CLEAR(clear_module_state->__pyx_n_u_degrevlexA);
  Py_CLEAR(clear_module_state->__pyx_n_u_degrevlexB);
  Py_CLEAR(clear_module_state->__pyx_n_s_derivation);
  Py_CLEAR(clear_module_state->__pyx_n_s_derivations);
  Py_CLEAR(clear_module_state->__pyx_n_u_derivations);
  Py_CLEAR(clear_module_state->__pyx_n_s_derivative);
  Py_CLEAR(clear_module_state->__pyx_n_s_ders);
  Py_CLEAR(clear_module_state->__pyx_n_s_dico);
  Py_CLEAR(clear_module_state->__pyx_n_s_dict);
  Py_CLEAR(clear_module_state->__pyx_n_s_dict_2);
  Py_CLEAR(clear_module_state->__pyx_n_u_differential);
  Py_CLEAR(clear_module_state->__pyx_kp_u_differential__field);
  Py_CLEAR(clear_module_state->__pyx_kp_u_differential__ring);
  Py_CLEAR(clear_module_state->__pyx_n_u_differential_field);
  Py_CLEAR(clear_module_state->__pyx_n_s_differential_prem);
  Py_CLEAR(clear_module_state->__pyx_n_s_differential_ring);
  Py_CLEAR(clear_module_state->__pyx_n_u_differential_ring);
  Py_CLEAR(clear_module_state->__pyx_n_s_differentiate);
  Py_CLEAR(clear_module_state->__pyx_n_s_dimlb);
  Py_CLEAR(clear_module_state->__pyx_kp_u_disable);
  Py_CLEAR(clear_module_state->__pyx_n_s_e);
  Py_CLEAR(clear_module_state->__pyx_n_s_elt);
  Py_CLEAR(clear_module_state->__pyx_kp_u_enable);
  Py_CLEAR(clear_module_state->__pyx_n_s_eqns);
  Py_CLEAR(clear_module_state->__pyx_n_s_equation);
  Py_CLEAR(clear_module_state->__pyx_n_s_equations);
  Py_CLEAR(clear_module_state->__pyx_n_s_eval);
  Py_CLEAR(clear_module_state->__pyx_n_s_evaluate);
  Py_CLEAR(clear_module_state->__pyx_n_s_evaluate_2);
  Py_CLEAR(clear_module_state->__pyx_n_s_evdict);
  Py_CLEAR(clear_module_state->__pyx_n_s_evdict0);
  Py_CLEAR(clear_module_state->__pyx_n_s_evdict1);
  Py_CLEAR(clear_module_state->__pyx_n_s_expr);
  Py_CLEAR(clear_module_state->__pyx_n_s_f);
  Py_CLEAR(clear_module_state->__pyx_n_s_factor_derivative);
  Py_CLEAR(clear_module_state->__pyx_n_b_false);
  Py_CLEAR(clear_module_state->__pyx_n_s_fullset);
  Py_CLEAR(clear_module_state->__pyx_n_s_func);
  Py_CLEAR(clear_module_state->__pyx_n_s_function);
  Py_CLEAR(clear_module_state->__pyx_kp_u_gc);
  Py_CLEAR(clear_module_state->__pyx_n_s_generators);
  Py_CLEAR(clear_module_state->__pyx_n_s_getstate);
  Py_CLEAR(clear_module_state->__pyx_n_u_grlexA);
  Py_CLEAR(clear_module_state->__pyx_n_u_grlexB);
  Py_CLEAR(clear_module_state->__pyx_n_s_groups);
  Py_CLEAR(clear_module_state->__pyx_kp_s_home_boulier_DifferentialAlgebr);
  Py_CLEAR(clear_module_state->__pyx_kp_s_home_boulier_DifferentialAlgebr_2);
  Py_CLEAR(clear_module_state->__pyx_kp_s_home_boulier_DifferentialAlgebr_3);
  Py_CLEAR(clear_module_state->__pyx_kp_s_home_boulier_DifferentialAlgebr_4);
  Py_CLEAR(clear_module_state->__pyx_kp_s_home_boulier_DifferentialAlgebr_5);
  Py_CLEAR(clear_module_state->__pyx_n_s_i);
  Py_CLEAR(clear_module_state->__pyx_n_s_import);
  Py_CLEAR(clear_module_state->__pyx_n_u_independent);
  Py_CLEAR(clear_module_state->__pyx_kp_u_independent_variable_expected_fo);
  Py_CLEAR(clear_module_state->__pyx_n_s_indets);
  Py_CLEAR(clear_module_state->__pyx_n_s_indexed);
  Py_CLEAR(clear_module_state->__pyx_n_s_indexedbase);
  Py_CLEAR(clear_module_state->__pyx_n_s_indices);
  Py_CLEAR(clear_module_state->__pyx_n_s_ineq);
  Py_CLEAR(clear_module_state->__pyx_n_s_initial);
  Py_CLEAR(clear_module_state->__pyx_n_s_initializing);
  Py_CLEAR(clear_module_state->__pyx_n_s_integrate);
  Py_CLEAR(clear_module_state->__pyx_n_s_is_constant);
  Py_CLEAR(clear_module_state->__pyx_n_s_is_coroutine);
  Py_CLEAR(clear_module_state->__pyx_n_s_is_differential_fraction);
  Py_CLEAR(clear_module_state->__pyx_kp_u_isenabled);
  Py_CLEAR(clear_module_state->__pyx_n_u_iter);
  Py_CLEAR(clear_module_state->__pyx_n_s_iterated);
  Py_CLEAR(clear_module_state->__pyx_n_s_key);
  Py_CLEAR(clear_module_state->__pyx_n_s_latex);
  Py_CLEAR(clear_module_state->__pyx_n_s_latex_2);
  Py_CLEAR(clear_module_state->__pyx_n_s_leading_coefficient);
  Py_CLEAR(clear_module_state->__pyx_n_s_leading_derivative);
  Py_CLEAR(clear_module_state->__pyx_n_s_leading_polynomial);
  Py_CLEAR(clear_module_state->__pyx_n_s_leading_rank);
  Py_CLEAR(clear_module_state->__pyx_n_u_lex);
  Py_CLEAR(clear_module_state->__pyx_n_s_lhs);
  Py_CLEAR(clear_module_state->__pyx_n_s_listform);
  Py_CLEAR(clear_module_state->__pyx_n_s_listof_symbols);
  Py_CLEAR(clear_module_state->__pyx_n_s_main);
  Py_CLEAR(clear_module_state->__pyx_n_s_match);
  Py_CLEAR(clear_module_state->__pyx_n_s_memout);
  Py_CLEAR(clear_module_state->__pyx_n_s_mesgerr);
  Py_CLEAR(clear_module_state->__pyx_n_s_mode);
  Py_CLEAR(clear_module_state->__pyx_n_s_name);
  Py_CLEAR(clear_module_state->__pyx_n_s_nbz);
  Py_CLEAR(clear_module_state->__pyx_n_s_new);
  Py_CLEAR(clear_module_state->__pyx_n_s_newargs);
  Py_CLEAR(clear_module_state->__pyx_n_s_newkey);
  Py_CLEAR(clear_module_state->__pyx_n_s_newval);
  Py_CLEAR(clear_module_state->__pyx_n_s_normal_form);
  Py_CLEAR(clear_module_state->__pyx_n_u_normalized);
  Py_CLEAR(clear_module_state->__pyx_n_s_notation);
  Py_CLEAR(clear_module_state->__pyx_n_s_number_of_equations);
  Py_CLEAR(clear_module_state->__pyx_n_s_oo);
  Py_CLEAR(clear_module_state->__pyx_kp_u_ordinary_differential_ring_expec);
  Py_CLEAR(clear_module_state->__pyx_n_s_parameters);
  Py_CLEAR(clear_module_state->__pyx_n_s_pattern);
  Py_CLEAR(clear_module_state->__pyx_n_s_pickle);
  Py_CLEAR(clear_module_state->__pyx_n_s_polynomial);
  Py_CLEAR(clear_module_state->__pyx_n_s_polynomials);
  Py_CLEAR(clear_module_state->__pyx_n_s_prem);
  Py_CLEAR(clear_module_state->__pyx_n_s_preparation_equation);
  Py_CLEAR(clear_module_state->__pyx_n_s_pretend);
  Py_CLEAR(clear_module_state->__pyx_n_s_prime);
  Py_CLEAR(clear_module_state->__pyx_n_u_prime);
  Py_CLEAR(clear_module_state->__pyx_n_u_primitive);
  Py_CLEAR(clear_module_state->__pyx_n_s_process_equations);
  Py_CLEAR(clear_module_state->__pyx_n_s_process_evdict);
  Py_CLEAR(clear_module_state->__pyx_n_s_process_notation);
  Py_CLEAR(clear_module_state->__pyx_n_s_pyx_PickleError);
  Py_CLEAR(clear_module_state->__pyx_n_s_pyx_checksum);
  Py_CLEAR(clear_module_state->__pyx_n_s_pyx_result);
  Py_CLEAR(clear_module_state->__pyx_n_s_pyx_state);
  Py_CLEAR(clear_module_state->__pyx_n_s_pyx_type);
  Py_CLEAR(clear_module_state->__pyx_n_s_pyx_unpickle_BaseFieldExtensio);
  Py_CLEAR(clear_module_state->__pyx_n_s_q);
  Py_CLEAR(clear_module_state->__pyx_n_s_range);
  Py_CLEAR(clear_module_state->__pyx_kp_b_rank_0);
  Py_CLEAR(clear_module_state->__pyx_n_s_ranking);
  Py_CLEAR(clear_module_state->__pyx_n_s_ranking_2);
  Py_CLEAR(clear_module_state->__pyx_n_s_ratfrac);
  Py_CLEAR(clear_module_state->__pyx_n_s_re);
  Py_CLEAR(clear_module_state->__pyx_n_s_redset);
  Py_CLEAR(clear_module_state->__pyx_n_s_reduce);
  Py_CLEAR(clear_module_state->__pyx_n_s_reduce_cython);
  Py_CLEAR(clear_module_state->__pyx_n_s_reduce_ex);
  Py_CLEAR(clear_module_state->__pyx_kp_u_regchain);
  Py_CLEAR(clear_module_state->__pyx_kp_u_regchain_2);
  Py_CLEAR(clear_module_state->__pyx_kp_u_regular__differential__chain);
  Py_CLEAR(clear_module_state->__pyx_n_u_regular_differential_chain);
  Py_CLEAR(clear_module_state->__pyx_n_s_rel_op);
  Py_CLEAR(clear_module_state->__pyx_n_s_relational);
  Py_CLEAR(clear_module_state->__pyx_n_s_relations);
  Py_CLEAR(clear_module_state->__pyx_n_s_relations_2);
  Py_CLEAR(clear_module_state->__pyx_n_s_replace);
  Py_CLEAR(clear_module_state->__pyx_n_s_result);
  Py_CLEAR(clear_module_state->__pyx_n_s_resultant);
  Py_CLEAR(clear_module_state->__pyx_n_s_rhs);
  Py_CLEAR(clear_module_state->__pyx_n_s_ring);
  Py_CLEAR(clear_module_state->__pyx_n_s_s);
  Py_CLEAR(clear_module_state->__pyx_n_s_selection);
  Py_CLEAR(clear_module_state->__pyx_n_s_self);
  Py_CLEAR(clear_module_state->__pyx_kp_s_self_DLuple_cannot_be_converted);
  Py_CLEAR(clear_module_state->__pyx_kp_s_self_dring_cannot_be_converted_t);
  Py_CLEAR(clear_module_state->__pyx_kp_s_self_regchain_cannot_be_converte);
  Py_CLEAR(clear_module_state->__pyx_n_s_separant);
  Py_CLEAR(clear_module_state->__pyx_n_s_series);
  Py_CLEAR(clear_module_state->__pyx_n_s_setstate);
  Py_CLEAR(clear_module_state->__pyx_n_s_setstate_cython);
  Py_CLEAR(clear_module_state->__pyx_n_s_singsol);
  Py_CLEAR(clear_module_state->__pyx_n_s_solved);
  Py_CLEAR(clear_module_state->__pyx_n_s_sort);
  Py_CLEAR(clear_module_state->__pyx_n_s_spec);
  Py_CLEAR(clear_module_state->__pyx_n_s_split);
  Py_CLEAR(clear_module_state->__pyx_n_u_squarefree);
  Py_CLEAR(clear_module_state->__pyx_n_s_startswith);
  Py_CLEAR(clear_module_state->__pyx_n_s_state);
  Py_CLEAR(clear_module_state->__pyx_n_s_strY);
  Py_CLEAR(clear_module_state->__pyx_n_s_strYbar);
  Py_CLEAR(clear_module_state->__pyx_n_s_strattr);
  Py_CLEAR(clear_module_state->__pyx_n_s_strcontrol);
  Py_CLEAR(clear_module_state->__pyx_n_s_strder);
  Py_CLEAR(clear_module_state->__pyx_n_s_strders);
  Py_CLEAR(clear_module_state->__pyx_n_s_strdimlb);
  Py_CLEAR(clear_module_state->__pyx_n_s_streqns);
  Py_CLEAR(clear_module_state->__pyx_n_s_strfull);
  Py_CLEAR(clear_module_state->__pyx_n_s_strgens);
  Py_CLEAR(clear_module_state->__pyx_n_s_strineq);
  Py_CLEAR(clear_module_state->__pyx_n_s_string);
  Py_CLEAR(clear_module_state->__pyx_kp_s_stringsource);
  Py_CLEAR(clear_module_state->__pyx_n_s_strmode);
  Py_CLEAR(clear_module_state->__pyx_n_s_strnot);
  Py_CLEAR(clear_module_state->__pyx_n_s_strpoly);
  Py_CLEAR(clear_module_state->__pyx_n_s_strq);
  Py_CLEAR(clear_module_state->__pyx_n_s_strredset);
  Py_CLEAR(clear_module_state->__pyx_n_s_strrels);
  Py_CLEAR(clear_module_state->__pyx_n_s_strsel);
  Py_CLEAR(clear_module_state->__pyx_n_s_strsingsol);
  Py_CLEAR(clear_module_state->__pyx_n_s_strvar);
  Py_CLEAR(clear_module_state->__pyx_n_s_strvars);
  Py_CLEAR(clear_module_state->__pyx_n_s_strx);
  Py_CLEAR(clear_module_state->__pyx_n_s_strzstring);
  Py_CLEAR(clear_module_state->__pyx_n_s_subrankings);
  Py_CLEAR(clear_module_state->__pyx_n_s_sympy);
  Py_CLEAR(clear_module_state->__pyx_n_s_sys);
  Py_CLEAR(clear_module_state->__pyx_n_s_tail);
  Py_CLEAR(clear_module_state->__pyx_n_s_tensor);
  Py_CLEAR(clear_module_state->__pyx_n_s_test);
  Py_CLEAR(clear_module_state->__pyx_kp_u_the_variable_and_the_base_field);
  Py_CLEAR(clear_module_state->__pyx_n_s_theta);
  Py_CLEAR(clear_module_state->__pyx_n_s_timeout);
  Py_CLEAR(clear_module_state->__pyx_n_b_true);
  Py_CLEAR(clear_module_state->__pyx_n_s_update);
  Py_CLEAR(clear_module_state->__pyx_n_s_use_setstate);
  Py_CLEAR(clear_module_state->__pyx_kp_u_utf_8);
  Py_CLEAR(clear_module_state->__pyx_n_s_var);
  Py_CLEAR(clear_module_state->__pyx_n_s_variable);
  Py_CLEAR(clear_module_state->__pyx_kp_u_variable_expected_for_q_found);
  Py_CLEAR(clear_module_state->__pyx_n_s_vars);
  Py_CLEAR(clear_module_state->__pyx_n_s_x);
  Py_CLEAR(clear_module_state->__pyx_n_s_y);
  Py_CLEAR(clear_module_state->__pyx_n_s_z);
  Py_CLEAR(clear_module_state->__pyx_kp_u_z_d);
  Py_CLEAR(clear_module_state->__pyx_n_s_zevdict);
  Py_CLEAR(clear_module_state->__pyx_n_s_zstring);
  Py_CLEAR(clear_module_state->__pyx_n_s_zsymb);
  Py_CLEAR(clear_module_state->__pyx_n_s_zval);
  Py_CLEAR(clear_module_state->__pyx_int_0);
  Py_CLEAR(clear_module_state->__pyx_int_1);
  Py_CLEAR(clear_module_state->__pyx_int_70027971);
  Py_CLEAR(clear_module_state->__pyx_int_74641392);
  Py_CLEAR(clear_module_state->__pyx_int_163572033);
  Py_CLEAR(clear_module_state->__pyx_k__2);
  Py_CLEAR(clear_module_state->__pyx_k__3);
  Py_CLEAR(clear_module_state->__pyx_k__4);
  Py_CLEAR(clear_module_state->__pyx_k__5);
  Py_CLEAR(clear_module_state->__pyx_k__9);
  Py_CLEAR(clear_module_state->__pyx_k__11);
  Py_CLEAR(clear_module_state->__pyx_k__12);
  Py_CLEAR(clear_module_state->__pyx_k__13);
  Py_CLEAR(clear_module_state->__pyx_k__14);
  Py_CLEAR(clear_module_state->__pyx_k__15);
  Py_CLEAR(clear_module_state->__pyx_k__17);
  Py_CLEAR(clear_module_state->__pyx_k__18);
  Py_CLEAR(clear_module_state->__pyx_k__19);
  Py_CLEAR(clear_module_state->__pyx_k__20);
  Py_CLEAR(clear_module_state->__pyx_k__21);
  Py_CLEAR(clear_module_state->__pyx_k__22);
  Py_CLEAR(clear_module_state->__pyx_k__23);
  Py_CLEAR(clear_module_state->__pyx_k__24);
  Py_CLEAR(clear_module_state->__pyx_k__25);
  Py_CLEAR(clear_module_state->__pyx_k__26);
  Py_CLEAR(clear_module_state->__pyx_k__27);
  Py_CLEAR(clear_module_state->__pyx_k__28);
  Py_CLEAR(clear_module_state->__pyx_k__29);
  Py_CLEAR(clear_module_state->__pyx_k__30);
  Py_CLEAR(clear_module_state->__pyx_k__31);
  Py_CLEAR(clear_module_state->__pyx_k__32);
  Py_CLEAR(clear_module_state->__pyx_k__33);
  Py_CLEAR(clear_module_state->__pyx_k__35);
  Py_CLEAR(clear_module_state->__pyx_k__36);
  Py_CLEAR(clear_module_state->__pyx_k__37);
  Py_CLEAR(clear_module_state->__pyx_k__38);
  Py_CLEAR(clear_module_state->__pyx_k__39);
  Py_CLEAR(clear_module_state->__pyx_k__40);
  Py_CLEAR(clear_module_state->__pyx_k__41);
  Py_CLEAR(clear_module_state->__pyx_k__49);
  Py_CLEAR(clear_module_state->__pyx_k__50);
  Py_CLEAR(clear_module_state->__pyx_k__51);
  Py_CLEAR(clear_module_state->__pyx_k__52);
  Py_CLEAR(clear_module_state->__pyx_k__53);
  Py_CLEAR(clear_module_state->__pyx_k__54);
  Py_CLEAR(clear_module_state->__pyx_k__55);
  Py_CLEAR(clear_module_state->__pyx_k__56);
  Py_CLEAR(clear_module_state->__pyx_k__57);
  Py_CLEAR(clear_module_state->__pyx_k__58);
  Py_CLEAR(clear_module_state->__pyx_k__59);
  Py_CLEAR(clear_module_state->__pyx_k__60);
  Py_CLEAR(clear_module_state->__pyx_k__61);
  Py_CLEAR(clear_module_state->__pyx_k__62);
  Py_CLEAR(clear_module_state->__pyx_k__64);
  Py_CLEAR(clear_module_state->__pyx_k__68);
  Py_CLEAR(clear_module_state->__pyx_k__69);
  Py_CLEAR(clear_module_state->__pyx_k__70);
  Py_CLEAR(clear_module_state->__pyx_k__71);
  Py_CLEAR(clear_module_state->__pyx_k__72);
  Py_CLEAR(clear_module_state->__pyx_k__73);
  Py_CLEAR(clear_module_state->__pyx_k__77);
  Py_CLEAR(clear_module_state->__pyx_k__78);
  Py_CLEAR(clear_module_state->__pyx_k__79);
  Py_CLEAR(clear_module_state->__pyx_k__80);
  Py_CLEAR(clear_module_state->__pyx_k__81);
  Py_CLEAR(clear_module_state->__pyx_tuple__8);
  Py_CLEAR(clear_module_state->__pyx_tuple__10);
  Py_CLEAR(clear_module_state->__pyx_tuple__34);
  Py_CLEAR(clear_module_state->__pyx_tuple__42);
  Py_CLEAR(clear_module_state->__pyx_tuple__43);
  Py_CLEAR(clear_module_state->__pyx_tuple__44);
  Py_CLEAR(clear_module_state->__pyx_tuple__45);
  Py_CLEAR(clear_module_state->__pyx_tuple__46);
  Py_CLEAR(clear_module_state->__pyx_tuple__47);
  Py_CLEAR(clear_module_state->__pyx_tuple__48);
  Py_CLEAR(clear_module_state->__pyx_tuple__63);
  Py_CLEAR(clear_module_state->__pyx_tuple__74);
  Py_CLEAR(clear_module_state->__pyx_tuple__75);
  Py_CLEAR(clear_module_state->__pyx_tuple__82);
  Py_CLEAR(clear_module_state->__pyx_tuple__85);
  Py_CLEAR(clear_module_state->__pyx_tuple__87);
  Py_CLEAR(clear_module_state->__pyx_tuple__90);
  Py_CLEAR(clear_module_state->__pyx_tuple__92);
  Py_CLEAR(clear_module_state->__pyx_tuple__94);
  Py_CLEAR(clear_module_state->__pyx_tuple__96);
  Py_CLEAR(clear_module_state->__pyx_tuple__98);
  Py_CLEAR(clear_module_state->__pyx_tuple__100);
  Py_CLEAR(clear_module_state->__pyx_tuple__102);
  Py_CLEAR(clear_module_state->__pyx_tuple__104);
  Py_CLEAR(clear_module_state->__pyx_tuple__106);
  Py_CLEAR(clear_module_state->__pyx_tuple__108);
  Py_CLEAR(clear_module_state->__pyx_tuple__110);
  Py_CLEAR(clear_module_state->__pyx_tuple__112);
  Py_CLEAR(clear_module_state->__pyx_tuple__114);
  Py_CLEAR(clear_module_state->__pyx_tuple__116);
  Py_CLEAR(clear_module_state->__pyx_tuple__118);
  Py_CLEAR(clear_module_state->__pyx_tuple__120);
  Py_CLEAR(clear_module_state->__pyx_tuple__124);
  Py_CLEAR(clear_module_state->__pyx_tuple__126);
  Py_CLEAR(clear_module_state->__pyx_tuple__128);
  Py_CLEAR(clear_module_state->__pyx_tuple__130);
  Py_CLEAR(clear_module_state->__pyx_tuple__132);
  Py_CLEAR(clear_module_state->__pyx_tuple__134);
  Py_CLEAR(clear_module_state->__pyx_tuple__136);
  Py_CLEAR(clear_module_state->__pyx_tuple__138);
  Py_CLEAR(clear_module_state->__pyx_tuple__140);
  Py_CLEAR(clear_module_state->__pyx_tuple__143);
  Py_CLEAR(clear_module_state->__pyx_tuple__148);
  Py_CLEAR(clear_module_state->__pyx_tuple__150);
  Py_CLEAR(clear_module_state->__pyx_tuple__152);
  Py_CLEAR(clear_module_state->__pyx_tuple__154);
  Py_CLEAR(clear_module_state->__pyx_tuple__156);
  Py_CLEAR(clear_module_state->__pyx_tuple__158);
  Py_CLEAR(clear_module_state->__pyx_tuple__162);
  Py_CLEAR(clear_module_state->__pyx_tuple__164);
  Py_CLEAR(clear_module_state->__pyx_tuple__166);
  Py_CLEAR(clear_module_state->__pyx_tuple__169);
  Py_CLEAR(clear_module_state->__pyx_tuple__171);
  Py_CLEAR(clear_module_state->__pyx_tuple__173);
  Py_CLEAR(clear_module_state->__pyx_tuple__175);
  Py_CLEAR(clear_module_state->__pyx_tuple__184);
  Py_CLEAR(clear_module_state->__pyx_tuple__186);
  Py_CLEAR(clear_module_state->__pyx_tuple__191);
  Py_CLEAR(clear_module_state->__pyx_tuple__193);
  Py_CLEAR(clear_module_state->__pyx_tuple__196);
  Py_CLEAR(clear_module_state->__pyx_tuple__200);
  Py_CLEAR(clear_module_state->__pyx_codeobj__86);
  Py_CLEAR(clear_module_state->__pyx_codeobj__88);
  Py_CLEAR(clear_module_state->__pyx_codeobj__89);
  Py_CLEAR(clear_module_state->__pyx_codeobj__91);
  Py_CLEAR(clear_module_state->__pyx_codeobj__93);
  Py_CLEAR(clear_module_state->__pyx_codeobj__95);
  Py_CLEAR(clear_module_state->__pyx_codeobj__97);
  Py_CLEAR(clear_module_state->__pyx_codeobj__99);
  Py_CLEAR(clear_module_state->__pyx_codeobj__101);
  Py_CLEAR(clear_module_state->__pyx_codeobj__103);
  Py_CLEAR(clear_module_state->__pyx_codeobj__105);
  Py_CLEAR(clear_module_state->__pyx_codeobj__107);
  Py_CLEAR(clear_module_state->__pyx_codeobj__109);
  Py_CLEAR(clear_module_state->__pyx_codeobj__111);
  Py_CLEAR(clear_module_state->__pyx_codeobj__113);
  Py_CLEAR(clear_module_state->__pyx_codeobj__115);
  Py_CLEAR(clear_module_state->__pyx_codeobj__117);
  Py_CLEAR(clear_module_state->__pyx_codeobj__119);
  Py_CLEAR(clear_module_state->__pyx_codeobj__121);
  Py_CLEAR(clear_module_state->__pyx_codeobj__122);
  Py_CLEAR(clear_module_state->__pyx_codeobj__123);
  Py_CLEAR(clear_module_state->__pyx_codeobj__125);
  Py_CLEAR(clear_module_state->__pyx_codeobj__127);
  Py_CLEAR(clear_module_state->__pyx_codeobj__129);
  Py_CLEAR(clear_module_state->__pyx_codeobj__131);
  Py_CLEAR(clear_module_state->__pyx_codeobj__133);
  Py_CLEAR(clear_module_state->__pyx_codeobj__135);
  Py_CLEAR(clear_module_state->__pyx_codeobj__137);
  Py_CLEAR(clear_module_state->__pyx_codeobj__139);
  Py_CLEAR(clear_module_state->__pyx_codeobj__141);
  Py_CLEAR(clear_module_state->__pyx_codeobj__142);
  Py_CLEAR(clear_module_state->__pyx_codeobj__144);
  Py_CLEAR(clear_module_state->__pyx_codeobj__145);
  Py_CLEAR(clear_module_state->__pyx_codeobj__146);
  Py_CLEAR(clear_module_state->__pyx_codeobj__147);
  Py_CLEAR(clear_module_state->__pyx_codeobj__149);
  Py_CLEAR(clear_module_state->__pyx_codeobj__151);
  Py_CLEAR(clear_module_state->__pyx_codeobj__153);
  Py_CLEAR(clear_module_state->__pyx_codeobj__155);
  Py_CLEAR(clear_module_state->__pyx_codeobj__157);
  Py_CLEAR(clear_module_state->__pyx_codeobj__159);
  Py_CLEAR(clear_module_state->__pyx_codeobj__160);
  Py_CLEAR(clear_module_state->__pyx_codeobj__161);
  Py_CLEAR(clear_module_state->__pyx_codeobj__163);
  Py_CLEAR(clear_module_state->__pyx_codeobj__165);
  Py_CLEAR(clear_module_state->__pyx_codeobj__167);
  Py_CLEAR(clear_module_state->__pyx_codeobj__168);
  Py_CLEAR(clear_module_state->__pyx_codeobj__170);
  Py_CLEAR(clear_module_state->__pyx_codeobj__172);
  Py_CLEAR(clear_module_state->__pyx_codeobj__174);
  Py_CLEAR(clear_module_state->__pyx_codeobj__176);
  Py_CLEAR(clear_module_state->__pyx_codeobj__177);
  Py_CLEAR(clear_module_state->__pyx_codeobj__178);
  Py_CLEAR(clear_module_state->__pyx_codeobj__179);
  Py_CLEAR(clear_module_state->__pyx_codeobj__180);
  Py_CLEAR(clear_module_state->__pyx_codeobj__181);
  Py_CLEAR(clear_module_state->__pyx_codeobj__182);
  Py_CLEAR(clear_module_state->__pyx_codeobj__183);
  Py_CLEAR(clear_module_state->__pyx_codeobj__185);
  Py_CLEAR(clear_module_state->__pyx_codeobj__187);
  Py_CLEAR(clear_module_state->__pyx_codeobj__188);
  Py_CLEAR(clear_module_state->__pyx_codeobj__189);
  Py_CLEAR(clear_module_state->__pyx_codeobj__190);
  Py_CLEAR(clear_module_state->__pyx_codeobj__192);
  Py_CLEAR(clear_module_state->__pyx_codeobj__194);
  Py_CLEAR(clear_module_state->__pyx_codeobj__195);
  Py_CLEAR(clear_module_state->__pyx_codeobj__197);
  Py_CLEAR(clear_module_state->__pyx_codeobj__198);
  Py_CLEAR(clear_module_state->__pyx_codeobj__199);
  Py_CLEAR(clear_module_state->__pyx_codeobj__201);
  return 0;
}
#endif
/* #### Code section: module_state_traverse ### */
#if CYTHON_USE_MODULE_STATE
static int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) {
  __pyx_mstate *traverse_module_state = __pyx_mstate(m);
  if (!traverse_module_state) return 0;
  Py_VISIT(traverse_module_state->__pyx_d);
  Py_VISIT(traverse_module_state->__pyx_b);
  Py_VISIT(traverse_module_state->__pyx_cython_runtime);
  Py_VISIT(traverse_module_state->__pyx_empty_tuple);
  Py_VISIT(traverse_module_state->__pyx_empty_bytes);
  Py_VISIT(traverse_module_state->__pyx_empty_unicode);
  #ifdef __Pyx_CyFunction_USED
  Py_VISIT(traverse_module_state->__pyx_CyFunctionType);
  #endif
  #ifdef __Pyx_FusedFunction_USED
  Py_VISIT(traverse_module_state->__pyx_FusedFunctionType);
  #endif
  Py_VISIT(traverse_module_state->__pyx_ptype_7cpython_4type_type);
  Py_VISIT(traverse_module_state->__pyx_ptype_7cpython_4bool_bool);
  Py_VISIT(traverse_module_state->__pyx_ptype_7cpython_7complex_complex);
  Py_VISIT(traverse_module_state->__pyx_ptype_19DifferentialAlgebra_DifferentialRing);
  Py_VISIT(traverse_module_state->__pyx_type_19DifferentialAlgebra_DifferentialRing);
  Py_VISIT(traverse_module_state->__pyx_ptype_19DifferentialAlgebra_RegularDifferentialChain);
  Py_VISIT(traverse_module_state->__pyx_type_19DifferentialAlgebra_RegularDifferentialChain);
  Py_VISIT(traverse_module_state->__pyx_ptype_19DifferentialAlgebra_BaseFieldExtension);
  Py_VISIT(traverse_module_state->__pyx_type_19DifferentialAlgebra_BaseFieldExtension);
  Py_VISIT(traverse_module_state->__pyx_ptype_19DifferentialAlgebra_DenefLipshitzUple);
  Py_VISIT(traverse_module_state->__pyx_type_19DifferentialAlgebra_DenefLipshitzUple);
  Py_VISIT(traverse_module_state->__pyx_kp_u_);
  Py_VISIT(traverse_module_state->__pyx_kp_b_0);
  Py_VISIT(traverse_module_state->__pyx_kp_u_050_0_1_050_051_133_range);
  Py_VISIT(traverse_module_state->__pyx_kp_b_1);
  Py_VISIT(traverse_module_state->__pyx_n_s_A);
  Py_VISIT(traverse_module_state->__pyx_kp_u_A_selection_in_a_list_of_polyno);
  Py_VISIT(traverse_module_state->__pyx_n_s_Add);
  Py_VISIT(traverse_module_state->__pyx_n_s_BaseFieldExtension);
  Py_VISIT(traverse_module_state->__pyx_n_s_BaseFieldExtension___process_not);
  Py_VISIT(traverse_module_state->__pyx_n_s_BaseFieldExtension___reduce_cyth);
  Py_VISIT(traverse_module_state->__pyx_n_s_BaseFieldExtension___setstate_cy);
  Py_VISIT(traverse_module_state->__pyx_n_s_BaseFieldExtension__latex);
  Py_VISIT(traverse_module_state->__pyx_n_s_BaseFieldExtension__process_not);
  Py_VISIT(traverse_module_state->__pyx_n_s_BaseFieldExtension__relations);
  Py_VISIT(traverse_module_state->__pyx_kp_u_BaseFieldExtension__relations_li);
  Py_VISIT(traverse_module_state->__pyx_n_s_BaseFieldExtension_generators);
  Py_VISIT(traverse_module_state->__pyx_kp_u_BaseFieldExtension_generators_li);
  Py_VISIT(traverse_module_state->__pyx_n_s_BaseFieldExtension_relations);
  Py_VISIT(traverse_module_state->__pyx_kp_u_BaseFieldExtension_relations_lin);
  Py_VISIT(traverse_module_state->__pyx_n_s_C);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Change_of_ranking_for_regular_c);
  Py_VISIT(traverse_module_state->__pyx_n_s_DRing);
  Py_VISIT(traverse_module_state->__pyx_n_s_DenefLipshitz);
  Py_VISIT(traverse_module_state->__pyx_n_s_DenefLipshitzUple);
  Py_VISIT(traverse_module_state->__pyx_n_s_DenefLipshitzUple_DenefLipshitz);
  Py_VISIT(traverse_module_state->__pyx_kp_u_DenefLipshitzUple_DenefLipshitz_2);
  Py_VISIT(traverse_module_state->__pyx_n_s_DenefLipshitzUple___process_nota);
  Py_VISIT(traverse_module_state->__pyx_n_s_DenefLipshitzUple___reduce_cytho);
  Py_VISIT(traverse_module_state->__pyx_n_s_DenefLipshitzUple___setstate_cyt);
  Py_VISIT(traverse_module_state->__pyx_n_s_DenefLipshitzUple__latex);
  Py_VISIT(traverse_module_state->__pyx_n_s_DenefLipshitzUple__process_nota);
  Py_VISIT(traverse_module_state->__pyx_n_s_DenefLipshitzUple_constraints);
  Py_VISIT(traverse_module_state->__pyx_kp_u_DenefLipshitzUple_constraints_li);
  Py_VISIT(traverse_module_state->__pyx_n_s_DenefLipshitzUple_leading_polyno);
  Py_VISIT(traverse_module_state->__pyx_kp_u_DenefLipshitzUple_leading_polyno_2);
  Py_VISIT(traverse_module_state->__pyx_n_s_DenefLipshitzUple_series);
  Py_VISIT(traverse_module_state->__pyx_kp_u_DenefLipshitzUple_series_line_47);
  Py_VISIT(traverse_module_state->__pyx_n_u_Denef_Lipshitz_Uple);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Denef__Lipshitz__Uple);
  Py_VISIT(traverse_module_state->__pyx_n_s_Derivative);
  Py_VISIT(traverse_module_state->__pyx_n_s_DifferentialAlgebra);
  Py_VISIT(traverse_module_state->__pyx_n_s_DifferentialRing);
  Py_VISIT(traverse_module_state->__pyx_n_s_DifferentialRing_DenefLipshitz);
  Py_VISIT(traverse_module_state->__pyx_kp_u_DifferentialRing_DenefLipshitz_l);
  Py_VISIT(traverse_module_state->__pyx_n_s_DifferentialRing_RosenfeldGroebn);
  Py_VISIT(traverse_module_state->__pyx_kp_u_DifferentialRing_RosenfeldGroebn_2);
  Py_VISIT(traverse_module_state->__pyx_n_s_DifferentialRing___evaluate);
  Py_VISIT(traverse_module_state->__pyx_n_s_DifferentialRing___listof_symbol);
  Py_VISIT(traverse_module_state->__pyx_n_s_DifferentialRing___process_evdic);
  Py_VISIT(traverse_module_state->__pyx_n_s_DifferentialRing___process_notat);
  Py_VISIT(traverse_module_state->__pyx_n_s_DifferentialRing___reduce_cython);
  Py_VISIT(traverse_module_state->__pyx_n_s_DifferentialRing___setstate_cyth);
  Py_VISIT(traverse_module_state->__pyx_n_s_DifferentialRing__evaluate);
  Py_VISIT(traverse_module_state->__pyx_n_s_DifferentialRing__latex);
  Py_VISIT(traverse_module_state->__pyx_n_s_DifferentialRing__listof_symbol);
  Py_VISIT(traverse_module_state->__pyx_n_s_DifferentialRing__process_equati);
  Py_VISIT(traverse_module_state->__pyx_n_s_DifferentialRing__process_evdic);
  Py_VISIT(traverse_module_state->__pyx_n_s_DifferentialRing__process_notat);
  Py_VISIT(traverse_module_state->__pyx_n_s_DifferentialRing__ranking);
  Py_VISIT(traverse_module_state->__pyx_n_s_DifferentialRing_coeffs);
  Py_VISIT(traverse_module_state->__pyx_kp_u_DifferentialRing_coeffs_line_375);
  Py_VISIT(traverse_module_state->__pyx_n_s_DifferentialRing_differential_pr);
  Py_VISIT(traverse_module_state->__pyx_kp_u_DifferentialRing_differential_pr_2);
  Py_VISIT(traverse_module_state->__pyx_n_s_DifferentialRing_differentiate);
  Py_VISIT(traverse_module_state->__pyx_kp_u_DifferentialRing_differentiate_l);
  Py_VISIT(traverse_module_state->__pyx_n_s_DifferentialRing_equations);
  Py_VISIT(traverse_module_state->__pyx_kp_u_DifferentialRing_equations_line);
  Py_VISIT(traverse_module_state->__pyx_n_s_DifferentialRing_evaluate);
  Py_VISIT(traverse_module_state->__pyx_kp_u_DifferentialRing_evaluate_line_7);
  Py_VISIT(traverse_module_state->__pyx_kp_u_DifferentialRing_expected_for_ri);
  Py_VISIT(traverse_module_state->__pyx_n_s_DifferentialRing_factor_derivati);
  Py_VISIT(traverse_module_state->__pyx_kp_u_DifferentialRing_factor_derivati_2);
  Py_VISIT(traverse_module_state->__pyx_n_s_DifferentialRing_indets);
  Py_VISIT(traverse_module_state->__pyx_kp_u_DifferentialRing_indets_line_963);
  Py_VISIT(traverse_module_state->__pyx_n_s_DifferentialRing_initial);
  Py_VISIT(traverse_module_state->__pyx_kp_u_DifferentialRing_initial_line_13);
  Py_VISIT(traverse_module_state->__pyx_n_s_DifferentialRing_integrate);
  Py_VISIT(traverse_module_state->__pyx_kp_u_DifferentialRing_integrate_line);
  Py_VISIT(traverse_module_state->__pyx_n_s_DifferentialRing_is_constant);
  Py_VISIT(traverse_module_state->__pyx_kp_u_DifferentialRing_is_constant_lin);
  Py_VISIT(traverse_module_state->__pyx_n_s_DifferentialRing_is_differential);
  Py_VISIT(traverse_module_state->__pyx_kp_u_DifferentialRing_is_differential_2);
  Py_VISIT(traverse_module_state->__pyx_n_s_DifferentialRing_leading_coeffic);
  Py_VISIT(traverse_module_state->__pyx_kp_u_DifferentialRing_leading_coeffic_2);
  Py_VISIT(traverse_module_state->__pyx_n_s_DifferentialRing_leading_derivat);
  Py_VISIT(traverse_module_state->__pyx_kp_u_DifferentialRing_leading_derivat_2);
  Py_VISIT(traverse_module_state->__pyx_n_s_DifferentialRing_leading_rank);
  Py_VISIT(traverse_module_state->__pyx_kp_u_DifferentialRing_leading_rank_li);
  Py_VISIT(traverse_module_state->__pyx_n_s_DifferentialRing_normal_form);
  Py_VISIT(traverse_module_state->__pyx_kp_u_DifferentialRing_normal_form_lin);
  Py_VISIT(traverse_module_state->__pyx_n_s_DifferentialRing_separant);
  Py_VISIT(traverse_module_state->__pyx_kp_u_DifferentialRing_separant_line_1);
  Py_VISIT(traverse_module_state->__pyx_n_s_DifferentialRing_sort);
  Py_VISIT(traverse_module_state->__pyx_kp_u_DifferentialRing_sort_line_2161);
  Py_VISIT(traverse_module_state->__pyx_n_s_DifferentialRing_tail);
  Py_VISIT(traverse_module_state->__pyx_kp_u_DifferentialRing_tail_line_1513);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Differentiate_a_rational_differ);
  Py_VISIT(traverse_module_state->__pyx_kp_b_Eq);
  Py_VISIT(traverse_module_state->__pyx_n_s_Eq_2);
  Py_VISIT(traverse_module_state->__pyx_n_s_Equality);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Evaluate_a_differential_fractio);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Extend_a_regular_differential_c);
  Py_VISIT(traverse_module_state->__pyx_n_s_F);
  Py_VISIT(traverse_module_state->__pyx_n_s_Function);
  Py_VISIT(traverse_module_state->__pyx_kp_s_Incompatible_checksums_0x_x_vs_0);
  Py_VISIT(traverse_module_state->__pyx_n_s_Indexed);
  Py_VISIT(traverse_module_state->__pyx_n_s_IndexedBase);
  Py_VISIT(traverse_module_state->__pyx_n_s_Integer);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Integrate_a_rational_differenti);
  Py_VISIT(traverse_module_state->__pyx_n_s_L);
  Py_VISIT(traverse_module_state->__pyx_n_s_L1);
  Py_VISIT(traverse_module_state->__pyx_n_s_L2);
  Py_VISIT(traverse_module_state->__pyx_n_s_L3);
  Py_VISIT(traverse_module_state->__pyx_n_s_L_as_string);
  Py_VISIT(traverse_module_state->__pyx_n_s_M);
  Py_VISIT(traverse_module_state->__pyx_n_s_Mul);
  Py_VISIT(traverse_module_state->__pyx_n_s_Ne);
  Py_VISIT(traverse_module_state->__pyx_kp_u_None);
  Py_VISIT(traverse_module_state->__pyx_n_s_NotImplementedError);
  Py_VISIT(traverse_module_state->__pyx_n_s_P);
  Py_VISIT(traverse_module_state->__pyx_n_s_PickleError);
  Py_VISIT(traverse_module_state->__pyx_n_s_Pow);
  Py_VISIT(traverse_module_state->__pyx_n_s_R);
  Py_VISIT(traverse_module_state->__pyx_n_s_Rational);
  Py_VISIT(traverse_module_state->__pyx_n_s_RegularDifferentialChain);
  Py_VISIT(traverse_module_state->__pyx_n_s_RegularDifferentialChain_Rosenfe);
  Py_VISIT(traverse_module_state->__pyx_kp_u_RegularDifferentialChain_Rosenfe_2);
  Py_VISIT(traverse_module_state->__pyx_kp_u_RegularDifferentialChain__Regula);
  Py_VISIT(traverse_module_state->__pyx_n_s_RegularDifferentialChain___numbe);
  Py_VISIT(traverse_module_state->__pyx_n_s_RegularDifferentialChain___proce);
  Py_VISIT(traverse_module_state->__pyx_n_s_RegularDifferentialChain___reduc);
  Py_VISIT(traverse_module_state->__pyx_n_s_RegularDifferentialChain___setst);
  Py_VISIT(traverse_module_state->__pyx_n_s_RegularDifferentialChain__latex);
  Py_VISIT(traverse_module_state->__pyx_n_s_RegularDifferentialChain__numbe);
  Py_VISIT(traverse_module_state->__pyx_n_s_RegularDifferentialChain__proce);
  Py_VISIT(traverse_module_state->__pyx_n_s_RegularDifferentialChain_attribu);
  Py_VISIT(traverse_module_state->__pyx_kp_u_RegularDifferentialChain_attribu_2);
  Py_VISIT(traverse_module_state->__pyx_n_s_RegularDifferentialChain_change);
  Py_VISIT(traverse_module_state->__pyx_kp_u_RegularDifferentialChain_change_2);
  Py_VISIT(traverse_module_state->__pyx_n_s_RegularDifferentialChain_differe);
  Py_VISIT(traverse_module_state->__pyx_n_s_RegularDifferentialChain_differe_2);
  Py_VISIT(traverse_module_state->__pyx_kp_u_RegularDifferentialChain_differe_3);
  Py_VISIT(traverse_module_state->__pyx_kp_u_RegularDifferentialChain_differe_4);
  Py_VISIT(traverse_module_state->__pyx_n_s_RegularDifferentialChain_equatio);
  Py_VISIT(traverse_module_state->__pyx_kp_u_RegularDifferentialChain_equatio_2);
  Py_VISIT(traverse_module_state->__pyx_kp_u_RegularDifferentialChain_expecte);
  Py_VISIT(traverse_module_state->__pyx_n_s_RegularDifferentialChain_indets);
  Py_VISIT(traverse_module_state->__pyx_kp_u_RegularDifferentialChain_indets_2);
  Py_VISIT(traverse_module_state->__pyx_n_s_RegularDifferentialChain_initial);
  Py_VISIT(traverse_module_state->__pyx_kp_u_RegularDifferentialChain_initial_2);
  Py_VISIT(traverse_module_state->__pyx_n_s_RegularDifferentialChain_leading);
  Py_VISIT(traverse_module_state->__pyx_n_s_RegularDifferentialChain_leading_2);
  Py_VISIT(traverse_module_state->__pyx_n_s_RegularDifferentialChain_leading_3);
  Py_VISIT(traverse_module_state->__pyx_kp_u_RegularDifferentialChain_leading_4);
  Py_VISIT(traverse_module_state->__pyx_kp_u_RegularDifferentialChain_leading_5);
  Py_VISIT(traverse_module_state->__pyx_kp_u_RegularDifferentialChain_leading_6);
  Py_VISIT(traverse_module_state->__pyx_n_s_RegularDifferentialChain_normal);
  Py_VISIT(traverse_module_state->__pyx_kp_u_RegularDifferentialChain_normal_2);
  Py_VISIT(traverse_module_state->__pyx_n_s_RegularDifferentialChain_prem);
  Py_VISIT(traverse_module_state->__pyx_kp_u_RegularDifferentialChain_prem_li);
  Py_VISIT(traverse_module_state->__pyx_n_s_RegularDifferentialChain_prepara);
  Py_VISIT(traverse_module_state->__pyx_kp_u_RegularDifferentialChain_prepara_2);
  Py_VISIT(traverse_module_state->__pyx_n_s_RegularDifferentialChain_resulta);
  Py_VISIT(traverse_module_state->__pyx_kp_u_RegularDifferentialChain_resulta_2);
  Py_VISIT(traverse_module_state->__pyx_n_s_RegularDifferentialChain_separan);
  Py_VISIT(traverse_module_state->__pyx_kp_u_RegularDifferentialChain_separan_2);
  Py_VISIT(traverse_module_state->__pyx_n_s_RegularDifferentialChain_tail);
  Py_VISIT(traverse_module_state->__pyx_kp_u_RegularDifferentialChain_tail_li);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Ritt_s_reduction_algorithm_by_a);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Ritt_s_reduction_algorithm_by_a_2);
  Py_VISIT(traverse_module_state->__pyx_n_s_RosenfeldGroebner);
  Py_VISIT(traverse_module_state->__pyx_n_s_RuntimeError);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Sort_a_list_of_polynomials_acco);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Split_a_derivative_into_derivat);
  Py_VISIT(traverse_module_state->__pyx_n_s_Symbol);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Test_if_a_rational_fraction_is);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Test_if_an_expression_is_a_rati);
  Py_VISIT(traverse_module_state->__pyx_kp_u_The_DenefLipshitz_algorithm_INP);
  Py_VISIT(traverse_module_state->__pyx_kp_u_The_DenefLipshitz_algorithm_INP_2);
  Py_VISIT(traverse_module_state->__pyx_kp_u_The_Rosenfeld_Groebner_simplifi);
  Py_VISIT(traverse_module_state->__pyx_kp_u_The_coefficients_and_monomials);
  Py_VISIT(traverse_module_state->__pyx_kp_u_The_constraints_of_a_DenefLipsh);
  Py_VISIT(traverse_module_state->__pyx_kp_u_The_embedding_differential_ring);
  Py_VISIT(traverse_module_state->__pyx_kp_u_The_formal_power_series_solutio);
  Py_VISIT(traverse_module_state->__pyx_kp_u_The_indeterminates_of_a_Differe);
  Py_VISIT(traverse_module_state->__pyx_kp_u_The_indeterminates_of_a_Regular);
  Py_VISIT(traverse_module_state->__pyx_kp_u_The_initial_of_a_polynomial_or);
  Py_VISIT(traverse_module_state->__pyx_kp_u_The_initials_of_a_regular_diffe);
  Py_VISIT(traverse_module_state->__pyx_kp_u_The_leading_coefficient_of_a_ra);
  Py_VISIT(traverse_module_state->__pyx_kp_u_The_leading_coefficients_of_a_r);
  Py_VISIT(traverse_module_state->__pyx_kp_u_The_leading_derivative_of_a_rat);
  Py_VISIT(traverse_module_state->__pyx_kp_u_The_leading_derivatives_of_a_re);
  Py_VISIT(traverse_module_state->__pyx_kp_u_The_leading_polynomials_of_a_De);
  Py_VISIT(traverse_module_state->__pyx_kp_u_The_leading_rank_of_a_rational);
  Py_VISIT(traverse_module_state->__pyx_kp_u_The_leading_ranks_of_a_regular);
  Py_VISIT(traverse_module_state->__pyx_kp_u_The_list_of_attributes_of_a_Reg);
  Py_VISIT(traverse_module_state->__pyx_kp_u_The_list_of_equations_of_a_regu);
  Py_VISIT(traverse_module_state->__pyx_kp_u_The_list_of_generators_of_a_bas);
  Py_VISIT(traverse_module_state->__pyx_kp_u_The_normal_form_of_a_rational_d);
  Py_VISIT(traverse_module_state->__pyx_kp_u_The_normal_form_of_a_rational_d_2);
  Py_VISIT(traverse_module_state->__pyx_kp_u_The_number_of_equations_of_a_re);
  Py_VISIT(traverse_module_state->__pyx_kp_u_The_preparation_equation_of_a_p);
  Py_VISIT(traverse_module_state->__pyx_kp_u_The_pseudo_remainder_of_a_fract);
  Py_VISIT(traverse_module_state->__pyx_kp_u_The_regular_differential_chain);
  Py_VISIT(traverse_module_state->__pyx_kp_u_The_relations_in_a_BMI_compatib);
  Py_VISIT(traverse_module_state->__pyx_kp_u_The_resultant_of_a_differential);
  Py_VISIT(traverse_module_state->__pyx_kp_u_The_separant_of_a_rational_frac);
  Py_VISIT(traverse_module_state->__pyx_kp_u_The_separants_of_a_regular_diff);
  Py_VISIT(traverse_module_state->__pyx_kp_u_The_tail_of_a_rational_fraction);
  Py_VISIT(traverse_module_state->__pyx_kp_u_The_tails_of_a_regular_differen);
  Py_VISIT(traverse_module_state->__pyx_n_s_TypeError);
  Py_VISIT(traverse_module_state->__pyx_n_s_U);
  Py_VISIT(traverse_module_state->__pyx_n_s_UndefinedFunction);
  Py_VISIT(traverse_module_state->__pyx_n_s_Y);
  Py_VISIT(traverse_module_state->__pyx_n_s_Ybar);
  Py_VISIT(traverse_module_state->__pyx_kp_b__16);
  Py_VISIT(traverse_module_state->__pyx_n_s__202);
  Py_VISIT(traverse_module_state->__pyx_kp_b__6);
  Py_VISIT(traverse_module_state->__pyx_kp_u__6);
  Py_VISIT(traverse_module_state->__pyx_kp_b__65);
  Py_VISIT(traverse_module_state->__pyx_kp_b__66);
  Py_VISIT(traverse_module_state->__pyx_kp_b__67);
  Py_VISIT(traverse_module_state->__pyx_kp_u__67);
  Py_VISIT(traverse_module_state->__pyx_kp_b__7);
  Py_VISIT(traverse_module_state->__pyx_kp_u__7);
  Py_VISIT(traverse_module_state->__pyx_kp_u__76);
  Py_VISIT(traverse_module_state->__pyx_kp_u__83);
  Py_VISIT(traverse_module_state->__pyx_n_s__84);
  Py_VISIT(traverse_module_state->__pyx_n_u_all);
  Py_VISIT(traverse_module_state->__pyx_n_s_arg);
  Py_VISIT(traverse_module_state->__pyx_n_s_args);
  Py_VISIT(traverse_module_state->__pyx_n_s_ascii);
  Py_VISIT(traverse_module_state->__pyx_n_s_asyncio_coroutines);
  Py_VISIT(traverse_module_state->__pyx_n_s_attributes);
  Py_VISIT(traverse_module_state->__pyx_n_u_autoreduced);
  Py_VISIT(traverse_module_state->__pyx_n_s_base);
  Py_VISIT(traverse_module_state->__pyx_n_s_basefield);
  Py_VISIT(traverse_module_state->__pyx_n_s_blocks);
  Py_VISIT(traverse_module_state->__pyx_n_s_casesplit);
  Py_VISIT(traverse_module_state->__pyx_kp_u_casesplit_True);
  Py_VISIT(traverse_module_state->__pyx_n_s_change_ranking);
  Py_VISIT(traverse_module_state->__pyx_n_s_class_getitem);
  Py_VISIT(traverse_module_state->__pyx_n_s_cline_in_traceback);
  Py_VISIT(traverse_module_state->__pyx_n_s_coeffs);
  Py_VISIT(traverse_module_state->__pyx_n_u_coherent);
  Py_VISIT(traverse_module_state->__pyx_n_s_compile);
  Py_VISIT(traverse_module_state->__pyx_n_s_congruence);
  Py_VISIT(traverse_module_state->__pyx_n_s_constraints);
  Py_VISIT(traverse_module_state->__pyx_n_s_control);
  Py_VISIT(traverse_module_state->__pyx_n_s_copy);
  Py_VISIT(traverse_module_state->__pyx_n_s_core);
  Py_VISIT(traverse_module_state->__pyx_n_s_d);
  Py_VISIT(traverse_module_state->__pyx_n_s_degree);
  Py_VISIT(traverse_module_state->__pyx_n_u_degrevlexA);
  Py_VISIT(traverse_module_state->__pyx_n_u_degrevlexB);
  Py_VISIT(traverse_module_state->__pyx_n_s_derivation);
  Py_VISIT(traverse_module_state->__pyx_n_s_derivations);
  Py_VISIT(traverse_module_state->__pyx_n_u_derivations);
  Py_VISIT(traverse_module_state->__pyx_n_s_derivative);
  Py_VISIT(traverse_module_state->__pyx_n_s_ders);
  Py_VISIT(traverse_module_state->__pyx_n_s_dico);
  Py_VISIT(traverse_module_state->__pyx_n_s_dict);
  Py_VISIT(traverse_module_state->__pyx_n_s_dict_2);
  Py_VISIT(traverse_module_state->__pyx_n_u_differential);
  Py_VISIT(traverse_module_state->__pyx_kp_u_differential__field);
  Py_VISIT(traverse_module_state->__pyx_kp_u_differential__ring);
  Py_VISIT(traverse_module_state->__pyx_n_u_differential_field);
  Py_VISIT(traverse_module_state->__pyx_n_s_differential_prem);
  Py_VISIT(traverse_module_state->__pyx_n_s_differential_ring);
  Py_VISIT(traverse_module_state->__pyx_n_u_differential_ring);
  Py_VISIT(traverse_module_state->__pyx_n_s_differentiate);
  Py_VISIT(traverse_module_state->__pyx_n_s_dimlb);
  Py_VISIT(traverse_module_state->__pyx_kp_u_disable);
  Py_VISIT(traverse_module_state->__pyx_n_s_e);
  Py_VISIT(traverse_module_state->__pyx_n_s_elt);
  Py_VISIT(traverse_module_state->__pyx_kp_u_enable);
  Py_VISIT(traverse_module_state->__pyx_n_s_eqns);
  Py_VISIT(traverse_module_state->__pyx_n_s_equation);
  Py_VISIT(traverse_module_state->__pyx_n_s_equations);
  Py_VISIT(traverse_module_state->__pyx_n_s_eval);
  Py_VISIT(traverse_module_state->__pyx_n_s_evaluate);
  Py_VISIT(traverse_module_state->__pyx_n_s_evaluate_2);
  Py_VISIT(traverse_module_state->__pyx_n_s_evdict);
  Py_VISIT(traverse_module_state->__pyx_n_s_evdict0);
  Py_VISIT(traverse_module_state->__pyx_n_s_evdict1);
  Py_VISIT(traverse_module_state->__pyx_n_s_expr);
  Py_VISIT(traverse_module_state->__pyx_n_s_f);
  Py_VISIT(traverse_module_state->__pyx_n_s_factor_derivative);
  Py_VISIT(traverse_module_state->__pyx_n_b_false);
  Py_VISIT(traverse_module_state->__pyx_n_s_fullset);
  Py_VISIT(traverse_module_state->__pyx_n_s_func);
  Py_VISIT(traverse_module_state->__pyx_n_s_function);
  Py_VISIT(traverse_module_state->__pyx_kp_u_gc);
  Py_VISIT(traverse_module_state->__pyx_n_s_generators);
  Py_VISIT(traverse_module_state->__pyx_n_s_getstate);
  Py_VISIT(traverse_module_state->__pyx_n_u_grlexA);
  Py_VISIT(traverse_module_state->__pyx_n_u_grlexB);
  Py_VISIT(traverse_module_state->__pyx_n_s_groups);
  Py_VISIT(traverse_module_state->__pyx_kp_s_home_boulier_DifferentialAlgebr);
  Py_VISIT(traverse_module_state->__pyx_kp_s_home_boulier_DifferentialAlgebr_2);
  Py_VISIT(traverse_module_state->__pyx_kp_s_home_boulier_DifferentialAlgebr_3);
  Py_VISIT(traverse_module_state->__pyx_kp_s_home_boulier_DifferentialAlgebr_4);
  Py_VISIT(traverse_module_state->__pyx_kp_s_home_boulier_DifferentialAlgebr_5);
  Py_VISIT(traverse_module_state->__pyx_n_s_i);
  Py_VISIT(traverse_module_state->__pyx_n_s_import);
  Py_VISIT(traverse_module_state->__pyx_n_u_independent);
  Py_VISIT(traverse_module_state->__pyx_kp_u_independent_variable_expected_fo);
  Py_VISIT(traverse_module_state->__pyx_n_s_indets);
  Py_VISIT(traverse_module_state->__pyx_n_s_indexed);
  Py_VISIT(traverse_module_state->__pyx_n_s_indexedbase);
  Py_VISIT(traverse_module_state->__pyx_n_s_indices);
  Py_VISIT(traverse_module_state->__pyx_n_s_ineq);
  Py_VISIT(traverse_module_state->__pyx_n_s_initial);
  Py_VISIT(traverse_module_state->__pyx_n_s_initializing);
  Py_VISIT(traverse_module_state->__pyx_n_s_integrate);
  Py_VISIT(traverse_module_state->__pyx_n_s_is_constant);
  Py_VISIT(traverse_module_state->__pyx_n_s_is_coroutine);
  Py_VISIT(traverse_module_state->__pyx_n_s_is_differential_fraction);
  Py_VISIT(traverse_module_state->__pyx_kp_u_isenabled);
  Py_VISIT(traverse_module_state->__pyx_n_u_iter);
  Py_VISIT(traverse_module_state->__pyx_n_s_iterated);
  Py_VISIT(traverse_module_state->__pyx_n_s_key);
  Py_VISIT(traverse_module_state->__pyx_n_s_latex);
  Py_VISIT(traverse_module_state->__pyx_n_s_latex_2);
  Py_VISIT(traverse_module_state->__pyx_n_s_leading_coefficient);
  Py_VISIT(traverse_module_state->__pyx_n_s_leading_derivative);
  Py_VISIT(traverse_module_state->__pyx_n_s_leading_polynomial);
  Py_VISIT(traverse_module_state->__pyx_n_s_leading_rank);
  Py_VISIT(traverse_module_state->__pyx_n_u_lex);
  Py_VISIT(traverse_module_state->__pyx_n_s_lhs);
  Py_VISIT(traverse_module_state->__pyx_n_s_listform);
  Py_VISIT(traverse_module_state->__pyx_n_s_listof_symbols);
  Py_VISIT(traverse_module_state->__pyx_n_s_main);
  Py_VISIT(traverse_module_state->__pyx_n_s_match);
  Py_VISIT(traverse_module_state->__pyx_n_s_memout);
  Py_VISIT(traverse_module_state->__pyx_n_s_mesgerr);
  Py_VISIT(traverse_module_state->__pyx_n_s_mode);
  Py_VISIT(traverse_module_state->__pyx_n_s_name);
  Py_VISIT(traverse_module_state->__pyx_n_s_nbz);
  Py_VISIT(traverse_module_state->__pyx_n_s_new);
  Py_VISIT(traverse_module_state->__pyx_n_s_newargs);
  Py_VISIT(traverse_module_state->__pyx_n_s_newkey);
  Py_VISIT(traverse_module_state->__pyx_n_s_newval);
  Py_VISIT(traverse_module_state->__pyx_n_s_normal_form);
  Py_VISIT(traverse_module_state->__pyx_n_u_normalized);
  Py_VISIT(traverse_module_state->__pyx_n_s_notation);
  Py_VISIT(traverse_module_state->__pyx_n_s_number_of_equations);
  Py_VISIT(traverse_module_state->__pyx_n_s_oo);
  Py_VISIT(traverse_module_state->__pyx_kp_u_ordinary_differential_ring_expec);
  Py_VISIT(traverse_module_state->__pyx_n_s_parameters);
  Py_VISIT(traverse_module_state->__pyx_n_s_pattern);
  Py_VISIT(traverse_module_state->__pyx_n_s_pickle);
  Py_VISIT(traverse_module_state->__pyx_n_s_polynomial);
  Py_VISIT(traverse_module_state->__pyx_n_s_polynomials);
  Py_VISIT(traverse_module_state->__pyx_n_s_prem);
  Py_VISIT(traverse_module_state->__pyx_n_s_preparation_equation);
  Py_VISIT(traverse_module_state->__pyx_n_s_pretend);
  Py_VISIT(traverse_module_state->__pyx_n_s_prime);
  Py_VISIT(traverse_module_state->__pyx_n_u_prime);
  Py_VISIT(traverse_module_state->__pyx_n_u_primitive);
  Py_VISIT(traverse_module_state->__pyx_n_s_process_equations);
  Py_VISIT(traverse_module_state->__pyx_n_s_process_evdict);
  Py_VISIT(traverse_module_state->__pyx_n_s_process_notation);
  Py_VISIT(traverse_module_state->__pyx_n_s_pyx_PickleError);
  Py_VISIT(traverse_module_state->__pyx_n_s_pyx_checksum);
  Py_VISIT(traverse_module_state->__pyx_n_s_pyx_result);
  Py_VISIT(traverse_module_state->__pyx_n_s_pyx_state);
  Py_VISIT(traverse_module_state->__pyx_n_s_pyx_type);
  Py_VISIT(traverse_module_state->__pyx_n_s_pyx_unpickle_BaseFieldExtensio);
  Py_VISIT(traverse_module_state->__pyx_n_s_q);
  Py_VISIT(traverse_module_state->__pyx_n_s_range);
  Py_VISIT(traverse_module_state->__pyx_kp_b_rank_0);
  Py_VISIT(traverse_module_state->__pyx_n_s_ranking);
  Py_VISIT(traverse_module_state->__pyx_n_s_ranking_2);
  Py_VISIT(traverse_module_state->__pyx_n_s_ratfrac);
  Py_VISIT(traverse_module_state->__pyx_n_s_re);
  Py_VISIT(traverse_module_state->__pyx_n_s_redset);
  Py_VISIT(traverse_module_state->__pyx_n_s_reduce);
  Py_VISIT(traverse_module_state->__pyx_n_s_reduce_cython);
  Py_VISIT(traverse_module_state->__pyx_n_s_reduce_ex);
  Py_VISIT(traverse_module_state->__pyx_kp_u_regchain);
  Py_VISIT(traverse_module_state->__pyx_kp_u_regchain_2);
  Py_VISIT(traverse_module_state->__pyx_kp_u_regular__differential__chain);
  Py_VISIT(traverse_module_state->__pyx_n_u_regular_differential_chain);
  Py_VISIT(traverse_module_state->__pyx_n_s_rel_op);
  Py_VISIT(traverse_module_state->__pyx_n_s_relational);
  Py_VISIT(traverse_module_state->__pyx_n_s_relations);
  Py_VISIT(traverse_module_state->__pyx_n_s_relations_2);
  Py_VISIT(traverse_module_state->__pyx_n_s_replace);
  Py_VISIT(traverse_module_state->__pyx_n_s_result);
  Py_VISIT(traverse_module_state->__pyx_n_s_resultant);
  Py_VISIT(traverse_module_state->__pyx_n_s_rhs);
  Py_VISIT(traverse_module_state->__pyx_n_s_ring);
  Py_VISIT(traverse_module_state->__pyx_n_s_s);
  Py_VISIT(traverse_module_state->__pyx_n_s_selection);
  Py_VISIT(traverse_module_state->__pyx_n_s_self);
  Py_VISIT(traverse_module_state->__pyx_kp_s_self_DLuple_cannot_be_converted);
  Py_VISIT(traverse_module_state->__pyx_kp_s_self_dring_cannot_be_converted_t);
  Py_VISIT(traverse_module_state->__pyx_kp_s_self_regchain_cannot_be_converte);
  Py_VISIT(traverse_module_state->__pyx_n_s_separant);
  Py_VISIT(traverse_module_state->__pyx_n_s_series);
  Py_VISIT(traverse_module_state->__pyx_n_s_setstate);
  Py_VISIT(traverse_module_state->__pyx_n_s_setstate_cython);
  Py_VISIT(traverse_module_state->__pyx_n_s_singsol);
  Py_VISIT(traverse_module_state->__pyx_n_s_solved);
  Py_VISIT(traverse_module_state->__pyx_n_s_sort);
  Py_VISIT(traverse_module_state->__pyx_n_s_spec);
  Py_VISIT(traverse_module_state->__pyx_n_s_split);
  Py_VISIT(traverse_module_state->__pyx_n_u_squarefree);
  Py_VISIT(traverse_module_state->__pyx_n_s_startswith);
  Py_VISIT(traverse_module_state->__pyx_n_s_state);
  Py_VISIT(traverse_module_state->__pyx_n_s_strY);
  Py_VISIT(traverse_module_state->__pyx_n_s_strYbar);
  Py_VISIT(traverse_module_state->__pyx_n_s_strattr);
  Py_VISIT(traverse_module_state->__pyx_n_s_strcontrol);
  Py_VISIT(traverse_module_state->__pyx_n_s_strder);
  Py_VISIT(traverse_module_state->__pyx_n_s_strders);
  Py_VISIT(traverse_module_state->__pyx_n_s_strdimlb);
  Py_VISIT(traverse_module_state->__pyx_n_s_streqns);
  Py_VISIT(traverse_module_state->__pyx_n_s_strfull);
  Py_VISIT(traverse_module_state->__pyx_n_s_strgens);
  Py_VISIT(traverse_module_state->__pyx_n_s_strineq);
  Py_VISIT(traverse_module_state->__pyx_n_s_string);
  Py_VISIT(traverse_module_state->__pyx_kp_s_stringsource);
  Py_VISIT(traverse_module_state->__pyx_n_s_strmode);
  Py_VISIT(traverse_module_state->__pyx_n_s_strnot);
  Py_VISIT(traverse_module_state->__pyx_n_s_strpoly);
  Py_VISIT(traverse_module_state->__pyx_n_s_strq);
  Py_VISIT(traverse_module_state->__pyx_n_s_strredset);
  Py_VISIT(traverse_module_state->__pyx_n_s_strrels);
  Py_VISIT(traverse_module_state->__pyx_n_s_strsel);
  Py_VISIT(traverse_module_state->__pyx_n_s_strsingsol);
  Py_VISIT(traverse_module_state->__pyx_n_s_strvar);
  Py_VISIT(traverse_module_state->__pyx_n_s_strvars);
  Py_VISIT(traverse_module_state->__pyx_n_s_strx);
  Py_VISIT(traverse_module_state->__pyx_n_s_strzstring);
  Py_VISIT(traverse_module_state->__pyx_n_s_subrankings);
  Py_VISIT(traverse_module_state->__pyx_n_s_sympy);
  Py_VISIT(traverse_module_state->__pyx_n_s_sys);
  Py_VISIT(traverse_module_state->__pyx_n_s_tail);
  Py_VISIT(traverse_module_state->__pyx_n_s_tensor);
  Py_VISIT(traverse_module_state->__pyx_n_s_test);
  Py_VISIT(traverse_module_state->__pyx_kp_u_the_variable_and_the_base_field);
  Py_VISIT(traverse_module_state->__pyx_n_s_theta);
  Py_VISIT(traverse_module_state->__pyx_n_s_timeout);
  Py_VISIT(traverse_module_state->__pyx_n_b_true);
  Py_VISIT(traverse_module_state->__pyx_n_s_update);
  Py_VISIT(traverse_module_state->__pyx_n_s_use_setstate);
  Py_VISIT(traverse_module_state->__pyx_kp_u_utf_8);
  Py_VISIT(traverse_module_state->__pyx_n_s_var);
  Py_VISIT(traverse_module_state->__pyx_n_s_variable);
  Py_VISIT(traverse_module_state->__pyx_kp_u_variable_expected_for_q_found);
  Py_VISIT(traverse_module_state->__pyx_n_s_vars);
  Py_VISIT(traverse_module_state->__pyx_n_s_x);
  Py_VISIT(traverse_module_state->__pyx_n_s_y);
  Py_VISIT(traverse_module_state->__pyx_n_s_z);
  Py_VISIT(traverse_module_state->__pyx_kp_u_z_d);
  Py_VISIT(traverse_module_state->__pyx_n_s_zevdict);
  Py_VISIT(traverse_module_state->__pyx_n_s_zstring);
  Py_VISIT(traverse_module_state->__pyx_n_s_zsymb);
  Py_VISIT(traverse_module_state->__pyx_n_s_zval);
  Py_VISIT(traverse_module_state->__pyx_int_0);
  Py_VISIT(traverse_module_state->__pyx_int_1);
  Py_VISIT(traverse_module_state->__pyx_int_70027971);
  Py_VISIT(traverse_module_state->__pyx_int_74641392);
  Py_VISIT(traverse_module_state->__pyx_int_163572033);
  Py_VISIT(traverse_module_state->__pyx_k__2);
  Py_VISIT(traverse_module_state->__pyx_k__3);
  Py_VISIT(traverse_module_state->__pyx_k__4);
  Py_VISIT(traverse_module_state->__pyx_k__5);
  Py_VISIT(traverse_module_state->__pyx_k__9);
  Py_VISIT(traverse_module_state->__pyx_k__11);
  Py_VISIT(traverse_module_state->__pyx_k__12);
  Py_VISIT(traverse_module_state->__pyx_k__13);
  Py_VISIT(traverse_module_state->__pyx_k__14);
  Py_VISIT(traverse_module_state->__pyx_k__15);
  Py_VISIT(traverse_module_state->__pyx_k__17);
  Py_VISIT(traverse_module_state->__pyx_k__18);
  Py_VISIT(traverse_module_state->__pyx_k__19);
  Py_VISIT(traverse_module_state->__pyx_k__20);
  Py_VISIT(traverse_module_state->__pyx_k__21);
  Py_VISIT(traverse_module_state->__pyx_k__22);
  Py_VISIT(traverse_module_state->__pyx_k__23);
  Py_VISIT(traverse_module_state->__pyx_k__24);
  Py_VISIT(traverse_module_state->__pyx_k__25);
  Py_VISIT(traverse_module_state->__pyx_k__26);
  Py_VISIT(traverse_module_state->__pyx_k__27);
  Py_VISIT(traverse_module_state->__pyx_k__28);
  Py_VISIT(traverse_module_state->__pyx_k__29);
  Py_VISIT(traverse_module_state->__pyx_k__30);
  Py_VISIT(traverse_module_state->__pyx_k__31);
  Py_VISIT(traverse_module_state->__pyx_k__32);
  Py_VISIT(traverse_module_state->__pyx_k__33);
  Py_VISIT(traverse_module_state->__pyx_k__35);
  Py_VISIT(traverse_module_state->__pyx_k__36);
  Py_VISIT(traverse_module_state->__pyx_k__37);
  Py_VISIT(traverse_module_state->__pyx_k__38);
  Py_VISIT(traverse_module_state->__pyx_k__39);
  Py_VISIT(traverse_module_state->__pyx_k__40);
  Py_VISIT(traverse_module_state->__pyx_k__41);
  Py_VISIT(traverse_module_state->__pyx_k__49);
  Py_VISIT(traverse_module_state->__pyx_k__50);
  Py_VISIT(traverse_module_state->__pyx_k__51);
  Py_VISIT(traverse_module_state->__pyx_k__52);
  Py_VISIT(traverse_module_state->__pyx_k__53);
  Py_VISIT(traverse_module_state->__pyx_k__54);
  Py_VISIT(traverse_module_state->__pyx_k__55);
  Py_VISIT(traverse_module_state->__pyx_k__56);
  Py_VISIT(traverse_module_state->__pyx_k__57);
  Py_VISIT(traverse_module_state->__pyx_k__58);
  Py_VISIT(traverse_module_state->__pyx_k__59);
  Py_VISIT(traverse_module_state->__pyx_k__60);
  Py_VISIT(traverse_module_state->__pyx_k__61);
  Py_VISIT(traverse_module_state->__pyx_k__62);
  Py_VISIT(traverse_module_state->__pyx_k__64);
  Py_VISIT(traverse_module_state->__pyx_k__68);
  Py_VISIT(traverse_module_state->__pyx_k__69);
  Py_VISIT(traverse_module_state->__pyx_k__70);
  Py_VISIT(traverse_module_state->__pyx_k__71);
  Py_VISIT(traverse_module_state->__pyx_k__72);
  Py_VISIT(traverse_module_state->__pyx_k__73);
  Py_VISIT(traverse_module_state->__pyx_k__77);
  Py_VISIT(traverse_module_state->__pyx_k__78);
  Py_VISIT(traverse_module_state->__pyx_k__79);
  Py_VISIT(traverse_module_state->__pyx_k__80);
  Py_VISIT(traverse_module_state->__pyx_k__81);
  Py_VISIT(traverse_module_state->__pyx_tuple__8);
  Py_VISIT(traverse_module_state->__pyx_tuple__10);
  Py_VISIT(traverse_module_state->__pyx_tuple__34);
  Py_VISIT(traverse_module_state->__pyx_tuple__42);
  Py_VISIT(traverse_module_state->__pyx_tuple__43);
  Py_VISIT(traverse_module_state->__pyx_tuple__44);
  Py_VISIT(traverse_module_state->__pyx_tuple__45);
  Py_VISIT(traverse_module_state->__pyx_tuple__46);
  Py_VISIT(traverse_module_state->__pyx_tuple__47);
  Py_VISIT(traverse_module_state->__pyx_tuple__48);
  Py_VISIT(traverse_module_state->__pyx_tuple__63);
  Py_VISIT(traverse_module_state->__pyx_tuple__74);
  Py_VISIT(traverse_module_state->__pyx_tuple__75);
  Py_VISIT(traverse_module_state->__pyx_tuple__82);
  Py_VISIT(traverse_module_state->__pyx_tuple__85);
  Py_VISIT(traverse_module_state->__pyx_tuple__87);
  Py_VISIT(traverse_module_state->__pyx_tuple__90);
  Py_VISIT(traverse_module_state->__pyx_tuple__92);
  Py_VISIT(traverse_module_state->__pyx_tuple__94);
  Py_VISIT(traverse_module_state->__pyx_tuple__96);
  Py_VISIT(traverse_module_state->__pyx_tuple__98);
  Py_VISIT(traverse_module_state->__pyx_tuple__100);
  Py_VISIT(traverse_module_state->__pyx_tuple__102);
  Py_VISIT(traverse_module_state->__pyx_tuple__104);
  Py_VISIT(traverse_module_state->__pyx_tuple__106);
  Py_VISIT(traverse_module_state->__pyx_tuple__108);
  Py_VISIT(traverse_module_state->__pyx_tuple__110);
  Py_VISIT(traverse_module_state->__pyx_tuple__112);
  Py_VISIT(traverse_module_state->__pyx_tuple__114);
  Py_VISIT(traverse_module_state->__pyx_tuple__116);
  Py_VISIT(traverse_module_state->__pyx_tuple__118);
  Py_VISIT(traverse_module_state->__pyx_tuple__120);
  Py_VISIT(traverse_module_state->__pyx_tuple__124);
  Py_VISIT(traverse_module_state->__pyx_tuple__126);
  Py_VISIT(traverse_module_state->__pyx_tuple__128);
  Py_VISIT(traverse_module_state->__pyx_tuple__130);
  Py_VISIT(traverse_module_state->__pyx_tuple__132);
  Py_VISIT(traverse_module_state->__pyx_tuple__134);
  Py_VISIT(traverse_module_state->__pyx_tuple__136);
  Py_VISIT(traverse_module_state->__pyx_tuple__138);
  Py_VISIT(traverse_module_state->__pyx_tuple__140);
  Py_VISIT(traverse_module_state->__pyx_tuple__143);
  Py_VISIT(traverse_module_state->__pyx_tuple__148);
  Py_VISIT(traverse_module_state->__pyx_tuple__150);
  Py_VISIT(traverse_module_state->__pyx_tuple__152);
  Py_VISIT(traverse_module_state->__pyx_tuple__154);
  Py_VISIT(traverse_module_state->__pyx_tuple__156);
  Py_VISIT(traverse_module_state->__pyx_tuple__158);
  Py_VISIT(traverse_module_state->__pyx_tuple__162);
  Py_VISIT(traverse_module_state->__pyx_tuple__164);
  Py_VISIT(traverse_module_state->__pyx_tuple__166);
  Py_VISIT(traverse_module_state->__pyx_tuple__169);
  Py_VISIT(traverse_module_state->__pyx_tuple__171);
  Py_VISIT(traverse_module_state->__pyx_tuple__173);
  Py_VISIT(traverse_module_state->__pyx_tuple__175);
  Py_VISIT(traverse_module_state->__pyx_tuple__184);
  Py_VISIT(traverse_module_state->__pyx_tuple__186);
  Py_VISIT(traverse_module_state->__pyx_tuple__191);
  Py_VISIT(traverse_module_state->__pyx_tuple__193);
  Py_VISIT(traverse_module_state->__pyx_tuple__196);
  Py_VISIT(traverse_module_state->__pyx_tuple__200);
  Py_VISIT(traverse_module_state->__pyx_codeobj__86);
  Py_VISIT(traverse_module_state->__pyx_codeobj__88);
  Py_VISIT(traverse_module_state->__pyx_codeobj__89);
  Py_VISIT(traverse_module_state->__pyx_codeobj__91);
  Py_VISIT(traverse_module_state->__pyx_codeobj__93);
  Py_VISIT(traverse_module_state->__pyx_codeobj__95);
  Py_VISIT(traverse_module_state->__pyx_codeobj__97);
  Py_VISIT(traverse_module_state->__pyx_codeobj__99);
  Py_VISIT(traverse_module_state->__pyx_codeobj__101);
  Py_VISIT(traverse_module_state->__pyx_codeobj__103);
  Py_VISIT(traverse_module_state->__pyx_codeobj__105);
  Py_VISIT(traverse_module_state->__pyx_codeobj__107);
  Py_VISIT(traverse_module_state->__pyx_codeobj__109);
  Py_VISIT(traverse_module_state->__pyx_codeobj__111);
  Py_VISIT(traverse_module_state->__pyx_codeobj__113);
  Py_VISIT(traverse_module_state->__pyx_codeobj__115);
  Py_VISIT(traverse_module_state->__pyx_codeobj__117);
  Py_VISIT(traverse_module_state->__pyx_codeobj__119);
  Py_VISIT(traverse_module_state->__pyx_codeobj__121);
  Py_VISIT(traverse_module_state->__pyx_codeobj__122);
  Py_VISIT(traverse_module_state->__pyx_codeobj__123);
  Py_VISIT(traverse_module_state->__pyx_codeobj__125);
  Py_VISIT(traverse_module_state->__pyx_codeobj__127);
  Py_VISIT(traverse_module_state->__pyx_codeobj__129);
  Py_VISIT(traverse_module_state->__pyx_codeobj__131);
  Py_VISIT(traverse_module_state->__pyx_codeobj__133);
  Py_VISIT(traverse_module_state->__pyx_codeobj__135);
  Py_VISIT(traverse_module_state->__pyx_codeobj__137);
  Py_VISIT(traverse_module_state->__pyx_codeobj__139);
  Py_VISIT(traverse_module_state->__pyx_codeobj__141);
  Py_VISIT(traverse_module_state->__pyx_codeobj__142);
  Py_VISIT(traverse_module_state->__pyx_codeobj__144);
  Py_VISIT(traverse_module_state->__pyx_codeobj__145);
  Py_VISIT(traverse_module_state->__pyx_codeobj__146);
  Py_VISIT(traverse_module_state->__pyx_codeobj__147);
  Py_VISIT(traverse_module_state->__pyx_codeobj__149);
  Py_VISIT(traverse_module_state->__pyx_codeobj__151);
  Py_VISIT(traverse_module_state->__pyx_codeobj__153);
  Py_VISIT(traverse_module_state->__pyx_codeobj__155);
  Py_VISIT(traverse_module_state->__pyx_codeobj__157);
  Py_VISIT(traverse_module_state->__pyx_codeobj__159);
  Py_VISIT(traverse_module_state->__pyx_codeobj__160);
  Py_VISIT(traverse_module_state->__pyx_codeobj__161);
  Py_VISIT(traverse_module_state->__pyx_codeobj__163);
  Py_VISIT(traverse_module_state->__pyx_codeobj__165);
  Py_VISIT(traverse_module_state->__pyx_codeobj__167);
  Py_VISIT(traverse_module_state->__pyx_codeobj__168);
  Py_VISIT(traverse_module_state->__pyx_codeobj__170);
  Py_VISIT(traverse_module_state->__pyx_codeobj__172);
  Py_VISIT(traverse_module_state->__pyx_codeobj__174);
  Py_VISIT(traverse_module_state->__pyx_codeobj__176);
  Py_VISIT(traverse_module_state->__pyx_codeobj__177);
  Py_VISIT(traverse_module_state->__pyx_codeobj__178);
  Py_VISIT(traverse_module_state->__pyx_codeobj__179);
  Py_VISIT(traverse_module_state->__pyx_codeobj__180);
  Py_VISIT(traverse_module_state->__pyx_codeobj__181);
  Py_VISIT(traverse_module_state->__pyx_codeobj__182);
  Py_VISIT(traverse_module_state->__pyx_codeobj__183);
  Py_VISIT(traverse_module_state->__pyx_codeobj__185);
  Py_VISIT(traverse_module_state->__pyx_codeobj__187);
  Py_VISIT(traverse_module_state->__pyx_codeobj__188);
  Py_VISIT(traverse_module_state->__pyx_codeobj__189);
  Py_VISIT(traverse_module_state->__pyx_codeobj__190);
  Py_VISIT(traverse_module_state->__pyx_codeobj__192);
  Py_VISIT(traverse_module_state->__pyx_codeobj__194);
  Py_VISIT(traverse_module_state->__pyx_codeobj__195);
  Py_VISIT(traverse_module_state->__pyx_codeobj__197);
  Py_VISIT(traverse_module_state->__pyx_codeobj__198);
  Py_VISIT(traverse_module_state->__pyx_codeobj__199);
  Py_VISIT(traverse_module_state->__pyx_codeobj__201);
  return 0;
}
#endif
/* #### Code section: module_state_defines ### */
#define __pyx_d __pyx_mstate_global->__pyx_d
#define __pyx_b __pyx_mstate_global->__pyx_b
#define __pyx_cython_runtime __pyx_mstate_global->__pyx_cython_runtime
#define __pyx_empty_tuple __pyx_mstate_global->__pyx_empty_tuple
#define __pyx_empty_bytes __pyx_mstate_global->__pyx_empty_bytes
#define __pyx_empty_unicode __pyx_mstate_global->__pyx_empty_unicode
#ifdef __Pyx_CyFunction_USED
#define __pyx_CyFunctionType __pyx_mstate_global->__pyx_CyFunctionType
#endif
#ifdef __Pyx_FusedFunction_USED
#define __pyx_FusedFunctionType __pyx_mstate_global->__pyx_FusedFunctionType
#endif
#ifdef __Pyx_Generator_USED
#define __pyx_GeneratorType __pyx_mstate_global->__pyx_GeneratorType
#endif
#ifdef __Pyx_IterableCoroutine_USED
#define __pyx_IterableCoroutineType __pyx_mstate_global->__pyx_IterableCoroutineType
#endif
#ifdef __Pyx_Coroutine_USED
#define __pyx_CoroutineAwaitType __pyx_mstate_global->__pyx_CoroutineAwaitType
#endif
#ifdef __Pyx_Coroutine_USED
#define __pyx_CoroutineType __pyx_mstate_global->__pyx_CoroutineType
#endif
#if CYTHON_USE_MODULE_STATE
#endif
#if CYTHON_USE_MODULE_STATE
#endif
#if CYTHON_USE_MODULE_STATE
#endif
#define __pyx_ptype_7cpython_4type_type __pyx_mstate_global->__pyx_ptype_7cpython_4type_type
#if CYTHON_USE_MODULE_STATE
#endif
#if CYTHON_USE_MODULE_STATE
#endif
#if CYTHON_USE_MODULE_STATE
#endif
#if CYTHON_USE_MODULE_STATE
#endif
#if CYTHON_USE_MODULE_STATE
#endif
#if CYTHON_USE_MODULE_STATE
#endif
#if CYTHON_USE_MODULE_STATE
#endif
#if CYTHON_USE_MODULE_STATE
#endif
#if CYTHON_USE_MODULE_STATE
#endif
#if CYTHON_USE_MODULE_STATE
#endif
#if CYTHON_USE_MODULE_STATE
#endif
#if CYTHON_USE_MODULE_STATE
#endif
#if CYTHON_USE_MODULE_STATE
#endif
#if CYTHON_USE_MODULE_STATE
#endif
#if CYTHON_USE_MODULE_STATE
#endif
#if CYTHON_USE_MODULE_STATE
#endif
#define __pyx_ptype_7cpython_4bool_bool __pyx_mstate_global->__pyx_ptype_7cpython_4bool_bool
#if CYTHON_USE_MODULE_STATE
#endif
#if CYTHON_USE_MODULE_STATE
#endif
#if CYTHON_USE_MODULE_STATE
#endif
#if CYTHON_USE_MODULE_STATE
#endif
#define __pyx_ptype_7cpython_7complex_complex __pyx_mstate_global->__pyx_ptype_7cpython_7complex_complex
#if CYTHON_USE_MODULE_STATE
#endif
#if CYTHON_USE_MODULE_STATE
#endif
#if CYTHON_USE_MODULE_STATE
#endif
#if CYTHON_USE_MODULE_STATE
#endif
#if CYTHON_USE_MODULE_STATE
#endif
#if CYTHON_USE_MODULE_STATE
#endif
#if CYTHON_USE_MODULE_STATE
#endif
#if CYTHON_USE_MODULE_STATE
#endif
#if CYTHON_USE_MODULE_STATE
#endif
#if CYTHON_USE_MODULE_STATE
#endif
#if CYTHON_USE_MODULE_STATE
#endif
#if CYTHON_USE_MODULE_STATE
#endif
#if CYTHON_USE_MODULE_STATE
#endif
#if CYTHON_USE_MODULE_STATE
#endif
#if CYTHON_USE_MODULE_STATE
#endif
#if CYTHON_USE_MODULE_STATE
#endif
#if CYTHON_USE_MODULE_STATE
#endif
#if CYTHON_USE_MODULE_STATE
#endif
#if CYTHON_USE_MODULE_STATE
#endif
#if CYTHON_USE_MODULE_STATE
#endif
#if CYTHON_USE_MODULE_STATE
#endif
#if CYTHON_USE_MODULE_STATE
#define __pyx_type_19DifferentialAlgebra_DifferentialRing __pyx_mstate_global->__pyx_type_19DifferentialAlgebra_DifferentialRing
#define __pyx_type_19DifferentialAlgebra_RegularDifferentialChain __pyx_mstate_global->__pyx_type_19DifferentialAlgebra_RegularDifferentialChain
#define __pyx_type_19DifferentialAlgebra_BaseFieldExtension __pyx_mstate_global->__pyx_type_19DifferentialAlgebra_BaseFieldExtension
#define __pyx_type_19DifferentialAlgebra_DenefLipshitzUple __pyx_mstate_global->__pyx_type_19DifferentialAlgebra_DenefLipshitzUple
#endif
#define __pyx_ptype_19DifferentialAlgebra_DifferentialRing __pyx_mstate_global->__pyx_ptype_19DifferentialAlgebra_DifferentialRing
#define __pyx_ptype_19DifferentialAlgebra_RegularDifferentialChain __pyx_mstate_global->__pyx_ptype_19DifferentialAlgebra_RegularDifferentialChain
#define __pyx_ptype_19DifferentialAlgebra_BaseFieldExtension __pyx_mstate_global->__pyx_ptype_19DifferentialAlgebra_BaseFieldExtension
#define __pyx_ptype_19DifferentialAlgebra_DenefLipshitzUple __pyx_mstate_global->__pyx_ptype_19DifferentialAlgebra_DenefLipshitzUple
#define __pyx_kp_u_ __pyx_mstate_global->__pyx_kp_u_
#define __pyx_kp_b_0 __pyx_mstate_global->__pyx_kp_b_0
#define __pyx_kp_u_050_0_1_050_051_133_range __pyx_mstate_global->__pyx_kp_u_050_0_1_050_051_133_range
#define __pyx_kp_b_1 __pyx_mstate_global->__pyx_kp_b_1
#define __pyx_n_s_A __pyx_mstate_global->__pyx_n_s_A
#define __pyx_kp_u_A_selection_in_a_list_of_polyno __pyx_mstate_global->__pyx_kp_u_A_selection_in_a_list_of_polyno
#define __pyx_n_s_Add __pyx_mstate_global->__pyx_n_s_Add
#define __pyx_n_s_BaseFieldExtension __pyx_mstate_global->__pyx_n_s_BaseFieldExtension
#define __pyx_n_s_BaseFieldExtension___process_not __pyx_mstate_global->__pyx_n_s_BaseFieldExtension___process_not
#define __pyx_n_s_BaseFieldExtension___reduce_cyth __pyx_mstate_global->__pyx_n_s_BaseFieldExtension___reduce_cyth
#define __pyx_n_s_BaseFieldExtension___setstate_cy __pyx_mstate_global->__pyx_n_s_BaseFieldExtension___setstate_cy
#define __pyx_n_s_BaseFieldExtension__latex __pyx_mstate_global->__pyx_n_s_BaseFieldExtension__latex
#define __pyx_n_s_BaseFieldExtension__process_not __pyx_mstate_global->__pyx_n_s_BaseFieldExtension__process_not
#define __pyx_n_s_BaseFieldExtension__relations __pyx_mstate_global->__pyx_n_s_BaseFieldExtension__relations
#define __pyx_kp_u_BaseFieldExtension__relations_li __pyx_mstate_global->__pyx_kp_u_BaseFieldExtension__relations_li
#define __pyx_n_s_BaseFieldExtension_generators __pyx_mstate_global->__pyx_n_s_BaseFieldExtension_generators
#define __pyx_kp_u_BaseFieldExtension_generators_li __pyx_mstate_global->__pyx_kp_u_BaseFieldExtension_generators_li
#define __pyx_n_s_BaseFieldExtension_relations __pyx_mstate_global->__pyx_n_s_BaseFieldExtension_relations
#define __pyx_kp_u_BaseFieldExtension_relations_lin __pyx_mstate_global->__pyx_kp_u_BaseFieldExtension_relations_lin
#define __pyx_n_s_C __pyx_mstate_global->__pyx_n_s_C
#define __pyx_kp_u_Change_of_ranking_for_regular_c __pyx_mstate_global->__pyx_kp_u_Change_of_ranking_for_regular_c
#define __pyx_n_s_DRing __pyx_mstate_global->__pyx_n_s_DRing
#define __pyx_n_s_DenefLipshitz __pyx_mstate_global->__pyx_n_s_DenefLipshitz
#define __pyx_n_s_DenefLipshitzUple __pyx_mstate_global->__pyx_n_s_DenefLipshitzUple
#define __pyx_n_s_DenefLipshitzUple_DenefLipshitz __pyx_mstate_global->__pyx_n_s_DenefLipshitzUple_DenefLipshitz
#define __pyx_kp_u_DenefLipshitzUple_DenefLipshitz_2 __pyx_mstate_global->__pyx_kp_u_DenefLipshitzUple_DenefLipshitz_2
#define __pyx_n_s_DenefLipshitzUple___process_nota __pyx_mstate_global->__pyx_n_s_DenefLipshitzUple___process_nota
#define __pyx_n_s_DenefLipshitzUple___reduce_cytho __pyx_mstate_global->__pyx_n_s_DenefLipshitzUple___reduce_cytho
#define __pyx_n_s_DenefLipshitzUple___setstate_cyt __pyx_mstate_global->__pyx_n_s_DenefLipshitzUple___setstate_cyt
#define __pyx_n_s_DenefLipshitzUple__latex __pyx_mstate_global->__pyx_n_s_DenefLipshitzUple__latex
#define __pyx_n_s_DenefLipshitzUple__process_nota __pyx_mstate_global->__pyx_n_s_DenefLipshitzUple__process_nota
#define __pyx_n_s_DenefLipshitzUple_constraints __pyx_mstate_global->__pyx_n_s_DenefLipshitzUple_constraints
#define __pyx_kp_u_DenefLipshitzUple_constraints_li __pyx_mstate_global->__pyx_kp_u_DenefLipshitzUple_constraints_li
#define __pyx_n_s_DenefLipshitzUple_leading_polyno __pyx_mstate_global->__pyx_n_s_DenefLipshitzUple_leading_polyno
#define __pyx_kp_u_DenefLipshitzUple_leading_polyno_2 __pyx_mstate_global->__pyx_kp_u_DenefLipshitzUple_leading_polyno_2
#define __pyx_n_s_DenefLipshitzUple_series __pyx_mstate_global->__pyx_n_s_DenefLipshitzUple_series
#define __pyx_kp_u_DenefLipshitzUple_series_line_47 __pyx_mstate_global->__pyx_kp_u_DenefLipshitzUple_series_line_47
#define __pyx_n_u_Denef_Lipshitz_Uple __pyx_mstate_global->__pyx_n_u_Denef_Lipshitz_Uple
#define __pyx_kp_u_Denef__Lipshitz__Uple __pyx_mstate_global->__pyx_kp_u_Denef__Lipshitz__Uple
#define __pyx_n_s_Derivative __pyx_mstate_global->__pyx_n_s_Derivative
#define __pyx_n_s_DifferentialAlgebra __pyx_mstate_global->__pyx_n_s_DifferentialAlgebra
#define __pyx_n_s_DifferentialRing __pyx_mstate_global->__pyx_n_s_DifferentialRing
#define __pyx_n_s_DifferentialRing_DenefLipshitz __pyx_mstate_global->__pyx_n_s_DifferentialRing_DenefLipshitz
#define __pyx_kp_u_DifferentialRing_DenefLipshitz_l __pyx_mstate_global->__pyx_kp_u_DifferentialRing_DenefLipshitz_l
#define __pyx_n_s_DifferentialRing_RosenfeldGroebn __pyx_mstate_global->__pyx_n_s_DifferentialRing_RosenfeldGroebn
#define __pyx_kp_u_DifferentialRing_RosenfeldGroebn_2 __pyx_mstate_global->__pyx_kp_u_DifferentialRing_RosenfeldGroebn_2
#define __pyx_n_s_DifferentialRing___evaluate __pyx_mstate_global->__pyx_n_s_DifferentialRing___evaluate
#define __pyx_n_s_DifferentialRing___listof_symbol __pyx_mstate_global->__pyx_n_s_DifferentialRing___listof_symbol
#define __pyx_n_s_DifferentialRing___process_evdic __pyx_mstate_global->__pyx_n_s_DifferentialRing___process_evdic
#define __pyx_n_s_DifferentialRing___process_notat __pyx_mstate_global->__pyx_n_s_DifferentialRing___process_notat
#define __pyx_n_s_DifferentialRing___reduce_cython __pyx_mstate_global->__pyx_n_s_DifferentialRing___reduce_cython
#define __pyx_n_s_DifferentialRing___setstate_cyth __pyx_mstate_global->__pyx_n_s_DifferentialRing___setstate_cyth
#define __pyx_n_s_DifferentialRing__evaluate __pyx_mstate_global->__pyx_n_s_DifferentialRing__evaluate
#define __pyx_n_s_DifferentialRing__latex __pyx_mstate_global->__pyx_n_s_DifferentialRing__latex
#define __pyx_n_s_DifferentialRing__listof_symbol __pyx_mstate_global->__pyx_n_s_DifferentialRing__listof_symbol
#define __pyx_n_s_DifferentialRing__process_equati __pyx_mstate_global->__pyx_n_s_DifferentialRing__process_equati
#define __pyx_n_s_DifferentialRing__process_evdic __pyx_mstate_global->__pyx_n_s_DifferentialRing__process_evdic
#define __pyx_n_s_DifferentialRing__process_notat __pyx_mstate_global->__pyx_n_s_DifferentialRing__process_notat
#define __pyx_n_s_DifferentialRing__ranking __pyx_mstate_global->__pyx_n_s_DifferentialRing__ranking
#define __pyx_n_s_DifferentialRing_coeffs __pyx_mstate_global->__pyx_n_s_DifferentialRing_coeffs
#define __pyx_kp_u_DifferentialRing_coeffs_line_375 __pyx_mstate_global->__pyx_kp_u_DifferentialRing_coeffs_line_375
#define __pyx_n_s_DifferentialRing_differential_pr __pyx_mstate_global->__pyx_n_s_DifferentialRing_differential_pr
#define __pyx_kp_u_DifferentialRing_differential_pr_2 __pyx_mstate_global->__pyx_kp_u_DifferentialRing_differential_pr_2
#define __pyx_n_s_DifferentialRing_differentiate __pyx_mstate_global->__pyx_n_s_DifferentialRing_differentiate
#define __pyx_kp_u_DifferentialRing_differentiate_l __pyx_mstate_global->__pyx_kp_u_DifferentialRing_differentiate_l
#define __pyx_n_s_DifferentialRing_equations __pyx_mstate_global->__pyx_n_s_DifferentialRing_equations
#define __pyx_kp_u_DifferentialRing_equations_line __pyx_mstate_global->__pyx_kp_u_DifferentialRing_equations_line
#define __pyx_n_s_DifferentialRing_evaluate __pyx_mstate_global->__pyx_n_s_DifferentialRing_evaluate
#define __pyx_kp_u_DifferentialRing_evaluate_line_7 __pyx_mstate_global->__pyx_kp_u_DifferentialRing_evaluate_line_7
#define __pyx_kp_u_DifferentialRing_expected_for_ri __pyx_mstate_global->__pyx_kp_u_DifferentialRing_expected_for_ri
#define __pyx_n_s_DifferentialRing_factor_derivati __pyx_mstate_global->__pyx_n_s_DifferentialRing_factor_derivati
#define __pyx_kp_u_DifferentialRing_factor_derivati_2 __pyx_mstate_global->__pyx_kp_u_DifferentialRing_factor_derivati_2
#define __pyx_n_s_DifferentialRing_indets __pyx_mstate_global->__pyx_n_s_DifferentialRing_indets
#define __pyx_kp_u_DifferentialRing_indets_line_963 __pyx_mstate_global->__pyx_kp_u_DifferentialRing_indets_line_963
#define __pyx_n_s_DifferentialRing_initial __pyx_mstate_global->__pyx_n_s_DifferentialRing_initial
#define __pyx_kp_u_DifferentialRing_initial_line_13 __pyx_mstate_global->__pyx_kp_u_DifferentialRing_initial_line_13
#define __pyx_n_s_DifferentialRing_integrate __pyx_mstate_global->__pyx_n_s_DifferentialRing_integrate
#define __pyx_kp_u_DifferentialRing_integrate_line __pyx_mstate_global->__pyx_kp_u_DifferentialRing_integrate_line
#define __pyx_n_s_DifferentialRing_is_constant __pyx_mstate_global->__pyx_n_s_DifferentialRing_is_constant
#define __pyx_kp_u_DifferentialRing_is_constant_lin __pyx_mstate_global->__pyx_kp_u_DifferentialRing_is_constant_lin
#define __pyx_n_s_DifferentialRing_is_differential __pyx_mstate_global->__pyx_n_s_DifferentialRing_is_differential
#define __pyx_kp_u_DifferentialRing_is_differential_2 __pyx_mstate_global->__pyx_kp_u_DifferentialRing_is_differential_2
#define __pyx_n_s_DifferentialRing_leading_coeffic __pyx_mstate_global->__pyx_n_s_DifferentialRing_leading_coeffic
#define __pyx_kp_u_DifferentialRing_leading_coeffic_2 __pyx_mstate_global->__pyx_kp_u_DifferentialRing_leading_coeffic_2
#define __pyx_n_s_DifferentialRing_leading_derivat __pyx_mstate_global->__pyx_n_s_DifferentialRing_leading_derivat
#define __pyx_kp_u_DifferentialRing_leading_derivat_2 __pyx_mstate_global->__pyx_kp_u_DifferentialRing_leading_derivat_2
#define __pyx_n_s_DifferentialRing_leading_rank __pyx_mstate_global->__pyx_n_s_DifferentialRing_leading_rank
#define __pyx_kp_u_DifferentialRing_leading_rank_li __pyx_mstate_global->__pyx_kp_u_DifferentialRing_leading_rank_li
#define __pyx_n_s_DifferentialRing_normal_form __pyx_mstate_global->__pyx_n_s_DifferentialRing_normal_form
#define __pyx_kp_u_DifferentialRing_normal_form_lin __pyx_mstate_global->__pyx_kp_u_DifferentialRing_normal_form_lin
#define __pyx_n_s_DifferentialRing_separant __pyx_mstate_global->__pyx_n_s_DifferentialRing_separant
#define __pyx_kp_u_DifferentialRing_separant_line_1 __pyx_mstate_global->__pyx_kp_u_DifferentialRing_separant_line_1
#define __pyx_n_s_DifferentialRing_sort __pyx_mstate_global->__pyx_n_s_DifferentialRing_sort
#define __pyx_kp_u_DifferentialRing_sort_line_2161 __pyx_mstate_global->__pyx_kp_u_DifferentialRing_sort_line_2161
#define __pyx_n_s_DifferentialRing_tail __pyx_mstate_global->__pyx_n_s_DifferentialRing_tail
#define __pyx_kp_u_DifferentialRing_tail_line_1513 __pyx_mstate_global->__pyx_kp_u_DifferentialRing_tail_line_1513
#define __pyx_kp_u_Differentiate_a_rational_differ __pyx_mstate_global->__pyx_kp_u_Differentiate_a_rational_differ
#define __pyx_kp_b_Eq __pyx_mstate_global->__pyx_kp_b_Eq
#define __pyx_n_s_Eq_2 __pyx_mstate_global->__pyx_n_s_Eq_2
#define __pyx_n_s_Equality __pyx_mstate_global->__pyx_n_s_Equality
#define __pyx_kp_u_Evaluate_a_differential_fractio __pyx_mstate_global->__pyx_kp_u_Evaluate_a_differential_fractio
#define __pyx_kp_u_Extend_a_regular_differential_c __pyx_mstate_global->__pyx_kp_u_Extend_a_regular_differential_c
#define __pyx_n_s_F __pyx_mstate_global->__pyx_n_s_F
#define __pyx_n_s_Function __pyx_mstate_global->__pyx_n_s_Function
#define __pyx_kp_s_Incompatible_checksums_0x_x_vs_0 __pyx_mstate_global->__pyx_kp_s_Incompatible_checksums_0x_x_vs_0
#define __pyx_n_s_Indexed __pyx_mstate_global->__pyx_n_s_Indexed
#define __pyx_n_s_IndexedBase __pyx_mstate_global->__pyx_n_s_IndexedBase
#define __pyx_n_s_Integer __pyx_mstate_global->__pyx_n_s_Integer
#define __pyx_kp_u_Integrate_a_rational_differenti __pyx_mstate_global->__pyx_kp_u_Integrate_a_rational_differenti
#define __pyx_n_s_L __pyx_mstate_global->__pyx_n_s_L
#define __pyx_n_s_L1 __pyx_mstate_global->__pyx_n_s_L1
#define __pyx_n_s_L2 __pyx_mstate_global->__pyx_n_s_L2
#define __pyx_n_s_L3 __pyx_mstate_global->__pyx_n_s_L3
#define __pyx_n_s_L_as_string __pyx_mstate_global->__pyx_n_s_L_as_string
#define __pyx_n_s_M __pyx_mstate_global->__pyx_n_s_M
#define __pyx_n_s_Mul __pyx_mstate_global->__pyx_n_s_Mul
#define __pyx_n_s_Ne __pyx_mstate_global->__pyx_n_s_Ne
#define __pyx_kp_u_None __pyx_mstate_global->__pyx_kp_u_None
#define __pyx_n_s_NotImplementedError __pyx_mstate_global->__pyx_n_s_NotImplementedError
#define __pyx_n_s_P __pyx_mstate_global->__pyx_n_s_P
#define __pyx_n_s_PickleError __pyx_mstate_global->__pyx_n_s_PickleError
#define __pyx_n_s_Pow __pyx_mstate_global->__pyx_n_s_Pow
#define __pyx_n_s_R __pyx_mstate_global->__pyx_n_s_R
#define __pyx_n_s_Rational __pyx_mstate_global->__pyx_n_s_Rational
#define __pyx_n_s_RegularDifferentialChain __pyx_mstate_global->__pyx_n_s_RegularDifferentialChain
#define __pyx_n_s_RegularDifferentialChain_Rosenfe __pyx_mstate_global->__pyx_n_s_RegularDifferentialChain_Rosenfe
#define __pyx_kp_u_RegularDifferentialChain_Rosenfe_2 __pyx_mstate_global->__pyx_kp_u_RegularDifferentialChain_Rosenfe_2
#define __pyx_kp_u_RegularDifferentialChain__Regula __pyx_mstate_global->__pyx_kp_u_RegularDifferentialChain__Regula
#define __pyx_n_s_RegularDifferentialChain___numbe __pyx_mstate_global->__pyx_n_s_RegularDifferentialChain___numbe
#define __pyx_n_s_RegularDifferentialChain___proce __pyx_mstate_global->__pyx_n_s_RegularDifferentialChain___proce
#define __pyx_n_s_RegularDifferentialChain___reduc __pyx_mstate_global->__pyx_n_s_RegularDifferentialChain___reduc
#define __pyx_n_s_RegularDifferentialChain___setst __pyx_mstate_global->__pyx_n_s_RegularDifferentialChain___setst
#define __pyx_n_s_RegularDifferentialChain__latex __pyx_mstate_global->__pyx_n_s_RegularDifferentialChain__latex
#define __pyx_n_s_RegularDifferentialChain__numbe __pyx_mstate_global->__pyx_n_s_RegularDifferentialChain__numbe
#define __pyx_n_s_RegularDifferentialChain__proce __pyx_mstate_global->__pyx_n_s_RegularDifferentialChain__proce
#define __pyx_n_s_RegularDifferentialChain_attribu __pyx_mstate_global->__pyx_n_s_RegularDifferentialChain_attribu
#define __pyx_kp_u_RegularDifferentialChain_attribu_2 __pyx_mstate_global->__pyx_kp_u_RegularDifferentialChain_attribu_2
#define __pyx_n_s_RegularDifferentialChain_change __pyx_mstate_global->__pyx_n_s_RegularDifferentialChain_change
#define __pyx_kp_u_RegularDifferentialChain_change_2 __pyx_mstate_global->__pyx_kp_u_RegularDifferentialChain_change_2
#define __pyx_n_s_RegularDifferentialChain_differe __pyx_mstate_global->__pyx_n_s_RegularDifferentialChain_differe
#define __pyx_n_s_RegularDifferentialChain_differe_2 __pyx_mstate_global->__pyx_n_s_RegularDifferentialChain_differe_2
#define __pyx_kp_u_RegularDifferentialChain_differe_3 __pyx_mstate_global->__pyx_kp_u_RegularDifferentialChain_differe_3
#define __pyx_kp_u_RegularDifferentialChain_differe_4 __pyx_mstate_global->__pyx_kp_u_RegularDifferentialChain_differe_4
#define __pyx_n_s_RegularDifferentialChain_equatio __pyx_mstate_global->__pyx_n_s_RegularDifferentialChain_equatio
#define __pyx_kp_u_RegularDifferentialChain_equatio_2 __pyx_mstate_global->__pyx_kp_u_RegularDifferentialChain_equatio_2
#define __pyx_kp_u_RegularDifferentialChain_expecte __pyx_mstate_global->__pyx_kp_u_RegularDifferentialChain_expecte
#define __pyx_n_s_RegularDifferentialChain_indets __pyx_mstate_global->__pyx_n_s_RegularDifferentialChain_indets
#define __pyx_kp_u_RegularDifferentialChain_indets_2 __pyx_mstate_global->__pyx_kp_u_RegularDifferentialChain_indets_2
#define __pyx_n_s_RegularDifferentialChain_initial __pyx_mstate_global->__pyx_n_s_RegularDifferentialChain_initial
#define __pyx_kp_u_RegularDifferentialChain_initial_2 __pyx_mstate_global->__pyx_kp_u_RegularDifferentialChain_initial_2
#define __pyx_n_s_RegularDifferentialChain_leading __pyx_mstate_global->__pyx_n_s_RegularDifferentialChain_leading
#define __pyx_n_s_RegularDifferentialChain_leading_2 __pyx_mstate_global->__pyx_n_s_RegularDifferentialChain_leading_2
#define __pyx_n_s_RegularDifferentialChain_leading_3 __pyx_mstate_global->__pyx_n_s_RegularDifferentialChain_leading_3
#define __pyx_kp_u_RegularDifferentialChain_leading_4 __pyx_mstate_global->__pyx_kp_u_RegularDifferentialChain_leading_4
#define __pyx_kp_u_RegularDifferentialChain_leading_5 __pyx_mstate_global->__pyx_kp_u_RegularDifferentialChain_leading_5
#define __pyx_kp_u_RegularDifferentialChain_leading_6 __pyx_mstate_global->__pyx_kp_u_RegularDifferentialChain_leading_6
#define __pyx_n_s_RegularDifferentialChain_normal __pyx_mstate_global->__pyx_n_s_RegularDifferentialChain_normal
#define __pyx_kp_u_RegularDifferentialChain_normal_2 __pyx_mstate_global->__pyx_kp_u_RegularDifferentialChain_normal_2
#define __pyx_n_s_RegularDifferentialChain_prem __pyx_mstate_global->__pyx_n_s_RegularDifferentialChain_prem
#define __pyx_kp_u_RegularDifferentialChain_prem_li __pyx_mstate_global->__pyx_kp_u_RegularDifferentialChain_prem_li
#define __pyx_n_s_RegularDifferentialChain_prepara __pyx_mstate_global->__pyx_n_s_RegularDifferentialChain_prepara
#define __pyx_kp_u_RegularDifferentialChain_prepara_2 __pyx_mstate_global->__pyx_kp_u_RegularDifferentialChain_prepara_2
#define __pyx_n_s_RegularDifferentialChain_resulta __pyx_mstate_global->__pyx_n_s_RegularDifferentialChain_resulta
#define __pyx_kp_u_RegularDifferentialChain_resulta_2 __pyx_mstate_global->__pyx_kp_u_RegularDifferentialChain_resulta_2
#define __pyx_n_s_RegularDifferentialChain_separan __pyx_mstate_global->__pyx_n_s_RegularDifferentialChain_separan
#define __pyx_kp_u_RegularDifferentialChain_separan_2 __pyx_mstate_global->__pyx_kp_u_RegularDifferentialChain_separan_2
#define __pyx_n_s_RegularDifferentialChain_tail __pyx_mstate_global->__pyx_n_s_RegularDifferentialChain_tail
#define __pyx_kp_u_RegularDifferentialChain_tail_li __pyx_mstate_global->__pyx_kp_u_RegularDifferentialChain_tail_li
#define __pyx_kp_u_Ritt_s_reduction_algorithm_by_a __pyx_mstate_global->__pyx_kp_u_Ritt_s_reduction_algorithm_by_a
#define __pyx_kp_u_Ritt_s_reduction_algorithm_by_a_2 __pyx_mstate_global->__pyx_kp_u_Ritt_s_reduction_algorithm_by_a_2
#define __pyx_n_s_RosenfeldGroebner __pyx_mstate_global->__pyx_n_s_RosenfeldGroebner
#define __pyx_n_s_RuntimeError __pyx_mstate_global->__pyx_n_s_RuntimeError
#define __pyx_kp_u_Sort_a_list_of_polynomials_acco __pyx_mstate_global->__pyx_kp_u_Sort_a_list_of_polynomials_acco
#define __pyx_kp_u_Split_a_derivative_into_derivat __pyx_mstate_global->__pyx_kp_u_Split_a_derivative_into_derivat
#define __pyx_n_s_Symbol __pyx_mstate_global->__pyx_n_s_Symbol
#define __pyx_kp_u_Test_if_a_rational_fraction_is __pyx_mstate_global->__pyx_kp_u_Test_if_a_rational_fraction_is
#define __pyx_kp_u_Test_if_an_expression_is_a_rati __pyx_mstate_global->__pyx_kp_u_Test_if_an_expression_is_a_rati
#define __pyx_kp_u_The_DenefLipshitz_algorithm_INP __pyx_mstate_global->__pyx_kp_u_The_DenefLipshitz_algorithm_INP
#define __pyx_kp_u_The_DenefLipshitz_algorithm_INP_2 __pyx_mstate_global->__pyx_kp_u_The_DenefLipshitz_algorithm_INP_2
#define __pyx_kp_u_The_Rosenfeld_Groebner_simplifi __pyx_mstate_global->__pyx_kp_u_The_Rosenfeld_Groebner_simplifi
#define __pyx_kp_u_The_coefficients_and_monomials __pyx_mstate_global->__pyx_kp_u_The_coefficients_and_monomials
#define __pyx_kp_u_The_constraints_of_a_DenefLipsh __pyx_mstate_global->__pyx_kp_u_The_constraints_of_a_DenefLipsh
#define __pyx_kp_u_The_embedding_differential_ring __pyx_mstate_global->__pyx_kp_u_The_embedding_differential_ring
#define __pyx_kp_u_The_formal_power_series_solutio __pyx_mstate_global->__pyx_kp_u_The_formal_power_series_solutio
#define __pyx_kp_u_The_indeterminates_of_a_Differe __pyx_mstate_global->__pyx_kp_u_The_indeterminates_of_a_Differe
#define __pyx_kp_u_The_indeterminates_of_a_Regular __pyx_mstate_global->__pyx_kp_u_The_indeterminates_of_a_Regular
#define __pyx_kp_u_The_initial_of_a_polynomial_or __pyx_mstate_global->__pyx_kp_u_The_initial_of_a_polynomial_or
#define __pyx_kp_u_The_initials_of_a_regular_diffe __pyx_mstate_global->__pyx_kp_u_The_initials_of_a_regular_diffe
#define __pyx_kp_u_The_leading_coefficient_of_a_ra __pyx_mstate_global->__pyx_kp_u_The_leading_coefficient_of_a_ra
#define __pyx_kp_u_The_leading_coefficients_of_a_r __pyx_mstate_global->__pyx_kp_u_The_leading_coefficients_of_a_r
#define __pyx_kp_u_The_leading_derivative_of_a_rat __pyx_mstate_global->__pyx_kp_u_The_leading_derivative_of_a_rat
#define __pyx_kp_u_The_leading_derivatives_of_a_re __pyx_mstate_global->__pyx_kp_u_The_leading_derivatives_of_a_re
#define __pyx_kp_u_The_leading_polynomials_of_a_De __pyx_mstate_global->__pyx_kp_u_The_leading_polynomials_of_a_De
#define __pyx_kp_u_The_leading_rank_of_a_rational __pyx_mstate_global->__pyx_kp_u_The_leading_rank_of_a_rational
#define __pyx_kp_u_The_leading_ranks_of_a_regular __pyx_mstate_global->__pyx_kp_u_The_leading_ranks_of_a_regular
#define __pyx_kp_u_The_list_of_attributes_of_a_Reg __pyx_mstate_global->__pyx_kp_u_The_list_of_attributes_of_a_Reg
#define __pyx_kp_u_The_list_of_equations_of_a_regu __pyx_mstate_global->__pyx_kp_u_The_list_of_equations_of_a_regu
#define __pyx_kp_u_The_list_of_generators_of_a_bas __pyx_mstate_global->__pyx_kp_u_The_list_of_generators_of_a_bas
#define __pyx_kp_u_The_normal_form_of_a_rational_d __pyx_mstate_global->__pyx_kp_u_The_normal_form_of_a_rational_d
#define __pyx_kp_u_The_normal_form_of_a_rational_d_2 __pyx_mstate_global->__pyx_kp_u_The_normal_form_of_a_rational_d_2
#define __pyx_kp_u_The_number_of_equations_of_a_re __pyx_mstate_global->__pyx_kp_u_The_number_of_equations_of_a_re
#define __pyx_kp_u_The_preparation_equation_of_a_p __pyx_mstate_global->__pyx_kp_u_The_preparation_equation_of_a_p
#define __pyx_kp_u_The_pseudo_remainder_of_a_fract __pyx_mstate_global->__pyx_kp_u_The_pseudo_remainder_of_a_fract
#define __pyx_kp_u_The_regular_differential_chain __pyx_mstate_global->__pyx_kp_u_The_regular_differential_chain
#define __pyx_kp_u_The_relations_in_a_BMI_compatib __pyx_mstate_global->__pyx_kp_u_The_relations_in_a_BMI_compatib
#define __pyx_kp_u_The_resultant_of_a_differential __pyx_mstate_global->__pyx_kp_u_The_resultant_of_a_differential
#define __pyx_kp_u_The_separant_of_a_rational_frac __pyx_mstate_global->__pyx_kp_u_The_separant_of_a_rational_frac
#define __pyx_kp_u_The_separants_of_a_regular_diff __pyx_mstate_global->__pyx_kp_u_The_separants_of_a_regular_diff
#define __pyx_kp_u_The_tail_of_a_rational_fraction __pyx_mstate_global->__pyx_kp_u_The_tail_of_a_rational_fraction
#define __pyx_kp_u_The_tails_of_a_regular_differen __pyx_mstate_global->__pyx_kp_u_The_tails_of_a_regular_differen
#define __pyx_n_s_TypeError __pyx_mstate_global->__pyx_n_s_TypeError
#define __pyx_n_s_U __pyx_mstate_global->__pyx_n_s_U
#define __pyx_n_s_UndefinedFunction __pyx_mstate_global->__pyx_n_s_UndefinedFunction
#define __pyx_n_s_Y __pyx_mstate_global->__pyx_n_s_Y
#define __pyx_n_s_Ybar __pyx_mstate_global->__pyx_n_s_Ybar
#define __pyx_kp_b__16 __pyx_mstate_global->__pyx_kp_b__16
#define __pyx_n_s__202 __pyx_mstate_global->__pyx_n_s__202
#define __pyx_kp_b__6 __pyx_mstate_global->__pyx_kp_b__6
#define __pyx_kp_u__6 __pyx_mstate_global->__pyx_kp_u__6
#define __pyx_kp_b__65 __pyx_mstate_global->__pyx_kp_b__65
#define __pyx_kp_b__66 __pyx_mstate_global->__pyx_kp_b__66
#define __pyx_kp_b__67 __pyx_mstate_global->__pyx_kp_b__67
#define __pyx_kp_u__67 __pyx_mstate_global->__pyx_kp_u__67
#define __pyx_kp_b__7 __pyx_mstate_global->__pyx_kp_b__7
#define __pyx_kp_u__7 __pyx_mstate_global->__pyx_kp_u__7
#define __pyx_kp_u__76 __pyx_mstate_global->__pyx_kp_u__76
#define __pyx_kp_u__83 __pyx_mstate_global->__pyx_kp_u__83
#define __pyx_n_s__84 __pyx_mstate_global->__pyx_n_s__84
#define __pyx_n_u_all __pyx_mstate_global->__pyx_n_u_all
#define __pyx_n_s_arg __pyx_mstate_global->__pyx_n_s_arg
#define __pyx_n_s_args __pyx_mstate_global->__pyx_n_s_args
#define __pyx_n_s_ascii __pyx_mstate_global->__pyx_n_s_ascii
#define __pyx_n_s_asyncio_coroutines __pyx_mstate_global->__pyx_n_s_asyncio_coroutines
#define __pyx_n_s_attributes __pyx_mstate_global->__pyx_n_s_attributes
#define __pyx_n_u_autoreduced __pyx_mstate_global->__pyx_n_u_autoreduced
#define __pyx_n_s_base __pyx_mstate_global->__pyx_n_s_base
#define __pyx_n_s_basefield __pyx_mstate_global->__pyx_n_s_basefield
#define __pyx_n_s_blocks __pyx_mstate_global->__pyx_n_s_blocks
#define __pyx_n_s_casesplit __pyx_mstate_global->__pyx_n_s_casesplit
#define __pyx_kp_u_casesplit_True __pyx_mstate_global->__pyx_kp_u_casesplit_True
#define __pyx_n_s_change_ranking __pyx_mstate_global->__pyx_n_s_change_ranking
#define __pyx_n_s_class_getitem __pyx_mstate_global->__pyx_n_s_class_getitem
#define __pyx_n_s_cline_in_traceback __pyx_mstate_global->__pyx_n_s_cline_in_traceback
#define __pyx_n_s_coeffs __pyx_mstate_global->__pyx_n_s_coeffs
#define __pyx_n_u_coherent __pyx_mstate_global->__pyx_n_u_coherent
#define __pyx_n_s_compile __pyx_mstate_global->__pyx_n_s_compile
#define __pyx_n_s_congruence __pyx_mstate_global->__pyx_n_s_congruence
#define __pyx_n_s_constraints __pyx_mstate_global->__pyx_n_s_constraints
#define __pyx_n_s_control __pyx_mstate_global->__pyx_n_s_control
#define __pyx_n_s_copy __pyx_mstate_global->__pyx_n_s_copy
#define __pyx_n_s_core __pyx_mstate_global->__pyx_n_s_core
#define __pyx_n_s_d __pyx_mstate_global->__pyx_n_s_d
#define __pyx_n_s_degree __pyx_mstate_global->__pyx_n_s_degree
#define __pyx_n_u_degrevlexA __pyx_mstate_global->__pyx_n_u_degrevlexA
#define __pyx_n_u_degrevlexB __pyx_mstate_global->__pyx_n_u_degrevlexB
#define __pyx_n_s_derivation __pyx_mstate_global->__pyx_n_s_derivation
#define __pyx_n_s_derivations __pyx_mstate_global->__pyx_n_s_derivations
#define __pyx_n_u_derivations __pyx_mstate_global->__pyx_n_u_derivations
#define __pyx_n_s_derivative __pyx_mstate_global->__pyx_n_s_derivative
#define __pyx_n_s_ders __pyx_mstate_global->__pyx_n_s_ders
#define __pyx_n_s_dico __pyx_mstate_global->__pyx_n_s_dico
#define __pyx_n_s_dict __pyx_mstate_global->__pyx_n_s_dict
#define __pyx_n_s_dict_2 __pyx_mstate_global->__pyx_n_s_dict_2
#define __pyx_n_u_differential __pyx_mstate_global->__pyx_n_u_differential
#define __pyx_kp_u_differential__field __pyx_mstate_global->__pyx_kp_u_differential__field
#define __pyx_kp_u_differential__ring __pyx_mstate_global->__pyx_kp_u_differential__ring
#define __pyx_n_u_differential_field __pyx_mstate_global->__pyx_n_u_differential_field
#define __pyx_n_s_differential_prem __pyx_mstate_global->__pyx_n_s_differential_prem
#define __pyx_n_s_differential_ring __pyx_mstate_global->__pyx_n_s_differential_ring
#define __pyx_n_u_differential_ring __pyx_mstate_global->__pyx_n_u_differential_ring
#define __pyx_n_s_differentiate __pyx_mstate_global->__pyx_n_s_differentiate
#define __pyx_n_s_dimlb __pyx_mstate_global->__pyx_n_s_dimlb
#define __pyx_kp_u_disable __pyx_mstate_global->__pyx_kp_u_disable
#define __pyx_n_s_e __pyx_mstate_global->__pyx_n_s_e
#define __pyx_n_s_elt __pyx_mstate_global->__pyx_n_s_elt
#define __pyx_kp_u_enable __pyx_mstate_global->__pyx_kp_u_enable
#define __pyx_n_s_eqns __pyx_mstate_global->__pyx_n_s_eqns
#define __pyx_n_s_equation __pyx_mstate_global->__pyx_n_s_equation
#define __pyx_n_s_equations __pyx_mstate_global->__pyx_n_s_equations
#define __pyx_n_s_eval __pyx_mstate_global->__pyx_n_s_eval
#define __pyx_n_s_evaluate __pyx_mstate_global->__pyx_n_s_evaluate
#define __pyx_n_s_evaluate_2 __pyx_mstate_global->__pyx_n_s_evaluate_2
#define __pyx_n_s_evdict __pyx_mstate_global->__pyx_n_s_evdict
#define __pyx_n_s_evdict0 __pyx_mstate_global->__pyx_n_s_evdict0
#define __pyx_n_s_evdict1 __pyx_mstate_global->__pyx_n_s_evdict1
#define __pyx_n_s_expr __pyx_mstate_global->__pyx_n_s_expr
#define __pyx_n_s_f __pyx_mstate_global->__pyx_n_s_f
#define __pyx_n_s_factor_derivative __pyx_mstate_global->__pyx_n_s_factor_derivative
#define __pyx_n_b_false __pyx_mstate_global->__pyx_n_b_false
#define __pyx_n_s_fullset __pyx_mstate_global->__pyx_n_s_fullset
#define __pyx_n_s_func __pyx_mstate_global->__pyx_n_s_func
#define __pyx_n_s_function __pyx_mstate_global->__pyx_n_s_function
#define __pyx_kp_u_gc __pyx_mstate_global->__pyx_kp_u_gc
#define __pyx_n_s_generators __pyx_mstate_global->__pyx_n_s_generators
#define __pyx_n_s_getstate __pyx_mstate_global->__pyx_n_s_getstate
#define __pyx_n_u_grlexA __pyx_mstate_global->__pyx_n_u_grlexA
#define __pyx_n_u_grlexB __pyx_mstate_global->__pyx_n_u_grlexB
#define __pyx_n_s_groups __pyx_mstate_global->__pyx_n_s_groups
#define __pyx_kp_s_home_boulier_DifferentialAlgebr __pyx_mstate_global->__pyx_kp_s_home_boulier_DifferentialAlgebr
#define __pyx_kp_s_home_boulier_DifferentialAlgebr_2 __pyx_mstate_global->__pyx_kp_s_home_boulier_DifferentialAlgebr_2
#define __pyx_kp_s_home_boulier_DifferentialAlgebr_3 __pyx_mstate_global->__pyx_kp_s_home_boulier_DifferentialAlgebr_3
#define __pyx_kp_s_home_boulier_DifferentialAlgebr_4 __pyx_mstate_global->__pyx_kp_s_home_boulier_DifferentialAlgebr_4
#define __pyx_kp_s_home_boulier_DifferentialAlgebr_5 __pyx_mstate_global->__pyx_kp_s_home_boulier_DifferentialAlgebr_5
#define __pyx_n_s_i __pyx_mstate_global->__pyx_n_s_i
#define __pyx_n_s_import __pyx_mstate_global->__pyx_n_s_import
#define __pyx_n_u_independent __pyx_mstate_global->__pyx_n_u_independent
#define __pyx_kp_u_independent_variable_expected_fo __pyx_mstate_global->__pyx_kp_u_independent_variable_expected_fo
#define __pyx_n_s_indets __pyx_mstate_global->__pyx_n_s_indets
#define __pyx_n_s_indexed __pyx_mstate_global->__pyx_n_s_indexed
#define __pyx_n_s_indexedbase __pyx_mstate_global->__pyx_n_s_indexedbase
#define __pyx_n_s_indices __pyx_mstate_global->__pyx_n_s_indices
#define __pyx_n_s_ineq __pyx_mstate_global->__pyx_n_s_ineq
#define __pyx_n_s_initial __pyx_mstate_global->__pyx_n_s_initial
#define __pyx_n_s_initializing __pyx_mstate_global->__pyx_n_s_initializing
#define __pyx_n_s_integrate __pyx_mstate_global->__pyx_n_s_integrate
#define __pyx_n_s_is_constant __pyx_mstate_global->__pyx_n_s_is_constant
#define __pyx_n_s_is_coroutine __pyx_mstate_global->__pyx_n_s_is_coroutine
#define __pyx_n_s_is_differential_fraction __pyx_mstate_global->__pyx_n_s_is_differential_fraction
#define __pyx_kp_u_isenabled __pyx_mstate_global->__pyx_kp_u_isenabled
#define __pyx_n_u_iter __pyx_mstate_global->__pyx_n_u_iter
#define __pyx_n_s_iterated __pyx_mstate_global->__pyx_n_s_iterated
#define __pyx_n_s_key __pyx_mstate_global->__pyx_n_s_key
#define __pyx_n_s_latex __pyx_mstate_global->__pyx_n_s_latex
#define __pyx_n_s_latex_2 __pyx_mstate_global->__pyx_n_s_latex_2
#define __pyx_n_s_leading_coefficient __pyx_mstate_global->__pyx_n_s_leading_coefficient
#define __pyx_n_s_leading_derivative __pyx_mstate_global->__pyx_n_s_leading_derivative
#define __pyx_n_s_leading_polynomial __pyx_mstate_global->__pyx_n_s_leading_polynomial
#define __pyx_n_s_leading_rank __pyx_mstate_global->__pyx_n_s_leading_rank
#define __pyx_n_u_lex __pyx_mstate_global->__pyx_n_u_lex
#define __pyx_n_s_lhs __pyx_mstate_global->__pyx_n_s_lhs
#define __pyx_n_s_listform __pyx_mstate_global->__pyx_n_s_listform
#define __pyx_n_s_listof_symbols __pyx_mstate_global->__pyx_n_s_listof_symbols
#define __pyx_n_s_main __pyx_mstate_global->__pyx_n_s_main
#define __pyx_n_s_match __pyx_mstate_global->__pyx_n_s_match
#define __pyx_n_s_memout __pyx_mstate_global->__pyx_n_s_memout
#define __pyx_n_s_mesgerr __pyx_mstate_global->__pyx_n_s_mesgerr
#define __pyx_n_s_mode __pyx_mstate_global->__pyx_n_s_mode
#define __pyx_n_s_name __pyx_mstate_global->__pyx_n_s_name
#define __pyx_n_s_nbz __pyx_mstate_global->__pyx_n_s_nbz
#define __pyx_n_s_new __pyx_mstate_global->__pyx_n_s_new
#define __pyx_n_s_newargs __pyx_mstate_global->__pyx_n_s_newargs
#define __pyx_n_s_newkey __pyx_mstate_global->__pyx_n_s_newkey
#define __pyx_n_s_newval __pyx_mstate_global->__pyx_n_s_newval
#define __pyx_n_s_normal_form __pyx_mstate_global->__pyx_n_s_normal_form
#define __pyx_n_u_normalized __pyx_mstate_global->__pyx_n_u_normalized
#define __pyx_n_s_notation __pyx_mstate_global->__pyx_n_s_notation
#define __pyx_n_s_number_of_equations __pyx_mstate_global->__pyx_n_s_number_of_equations
#define __pyx_n_s_oo __pyx_mstate_global->__pyx_n_s_oo
#define __pyx_kp_u_ordinary_differential_ring_expec __pyx_mstate_global->__pyx_kp_u_ordinary_differential_ring_expec
#define __pyx_n_s_parameters __pyx_mstate_global->__pyx_n_s_parameters
#define __pyx_n_s_pattern __pyx_mstate_global->__pyx_n_s_pattern
#define __pyx_n_s_pickle __pyx_mstate_global->__pyx_n_s_pickle
#define __pyx_n_s_polynomial __pyx_mstate_global->__pyx_n_s_polynomial
#define __pyx_n_s_polynomials __pyx_mstate_global->__pyx_n_s_polynomials
#define __pyx_n_s_prem __pyx_mstate_global->__pyx_n_s_prem
#define __pyx_n_s_preparation_equation __pyx_mstate_global->__pyx_n_s_preparation_equation
#define __pyx_n_s_pretend __pyx_mstate_global->__pyx_n_s_pretend
#define __pyx_n_s_prime __pyx_mstate_global->__pyx_n_s_prime
#define __pyx_n_u_prime __pyx_mstate_global->__pyx_n_u_prime
#define __pyx_n_u_primitive __pyx_mstate_global->__pyx_n_u_primitive
#define __pyx_n_s_process_equations __pyx_mstate_global->__pyx_n_s_process_equations
#define __pyx_n_s_process_evdict __pyx_mstate_global->__pyx_n_s_process_evdict
#define __pyx_n_s_process_notation __pyx_mstate_global->__pyx_n_s_process_notation
#define __pyx_n_s_pyx_PickleError __pyx_mstate_global->__pyx_n_s_pyx_PickleError
#define __pyx_n_s_pyx_checksum __pyx_mstate_global->__pyx_n_s_pyx_checksum
#define __pyx_n_s_pyx_result __pyx_mstate_global->__pyx_n_s_pyx_result
#define __pyx_n_s_pyx_state __pyx_mstate_global->__pyx_n_s_pyx_state
#define __pyx_n_s_pyx_type __pyx_mstate_global->__pyx_n_s_pyx_type
#define __pyx_n_s_pyx_unpickle_BaseFieldExtensio __pyx_mstate_global->__pyx_n_s_pyx_unpickle_BaseFieldExtensio
#define __pyx_n_s_q __pyx_mstate_global->__pyx_n_s_q
#define __pyx_n_s_range __pyx_mstate_global->__pyx_n_s_range
#define __pyx_kp_b_rank_0 __pyx_mstate_global->__pyx_kp_b_rank_0
#define __pyx_n_s_ranking __pyx_mstate_global->__pyx_n_s_ranking
#define __pyx_n_s_ranking_2 __pyx_mstate_global->__pyx_n_s_ranking_2
#define __pyx_n_s_ratfrac __pyx_mstate_global->__pyx_n_s_ratfrac
#define __pyx_n_s_re __pyx_mstate_global->__pyx_n_s_re
#define __pyx_n_s_redset __pyx_mstate_global->__pyx_n_s_redset
#define __pyx_n_s_reduce __pyx_mstate_global->__pyx_n_s_reduce
#define __pyx_n_s_reduce_cython __pyx_mstate_global->__pyx_n_s_reduce_cython
#define __pyx_n_s_reduce_ex __pyx_mstate_global->__pyx_n_s_reduce_ex
#define __pyx_kp_u_regchain __pyx_mstate_global->__pyx_kp_u_regchain
#define __pyx_kp_u_regchain_2 __pyx_mstate_global->__pyx_kp_u_regchain_2
#define __pyx_kp_u_regular__differential__chain __pyx_mstate_global->__pyx_kp_u_regular__differential__chain
#define __pyx_n_u_regular_differential_chain __pyx_mstate_global->__pyx_n_u_regular_differential_chain
#define __pyx_n_s_rel_op __pyx_mstate_global->__pyx_n_s_rel_op
#define __pyx_n_s_relational __pyx_mstate_global->__pyx_n_s_relational
#define __pyx_n_s_relations __pyx_mstate_global->__pyx_n_s_relations
#define __pyx_n_s_relations_2 __pyx_mstate_global->__pyx_n_s_relations_2
#define __pyx_n_s_replace __pyx_mstate_global->__pyx_n_s_replace
#define __pyx_n_s_result __pyx_mstate_global->__pyx_n_s_result
#define __pyx_n_s_resultant __pyx_mstate_global->__pyx_n_s_resultant
#define __pyx_n_s_rhs __pyx_mstate_global->__pyx_n_s_rhs
#define __pyx_n_s_ring __pyx_mstate_global->__pyx_n_s_ring
#define __pyx_n_s_s __pyx_mstate_global->__pyx_n_s_s
#define __pyx_n_s_selection __pyx_mstate_global->__pyx_n_s_selection
#define __pyx_n_s_self __pyx_mstate_global->__pyx_n_s_self
#define __pyx_kp_s_self_DLuple_cannot_be_converted __pyx_mstate_global->__pyx_kp_s_self_DLuple_cannot_be_converted
#define __pyx_kp_s_self_dring_cannot_be_converted_t __pyx_mstate_global->__pyx_kp_s_self_dring_cannot_be_converted_t
#define __pyx_kp_s_self_regchain_cannot_be_converte __pyx_mstate_global->__pyx_kp_s_self_regchain_cannot_be_converte
#define __pyx_n_s_separant __pyx_mstate_global->__pyx_n_s_separant
#define __pyx_n_s_series __pyx_mstate_global->__pyx_n_s_series
#define __pyx_n_s_setstate __pyx_mstate_global->__pyx_n_s_setstate
#define __pyx_n_s_setstate_cython __pyx_mstate_global->__pyx_n_s_setstate_cython
#define __pyx_n_s_singsol __pyx_mstate_global->__pyx_n_s_singsol
#define __pyx_n_s_solved __pyx_mstate_global->__pyx_n_s_solved
#define __pyx_n_s_sort __pyx_mstate_global->__pyx_n_s_sort
#define __pyx_n_s_spec __pyx_mstate_global->__pyx_n_s_spec
#define __pyx_n_s_split __pyx_mstate_global->__pyx_n_s_split
#define __pyx_n_u_squarefree __pyx_mstate_global->__pyx_n_u_squarefree
#define __pyx_n_s_startswith __pyx_mstate_global->__pyx_n_s_startswith
#define __pyx_n_s_state __pyx_mstate_global->__pyx_n_s_state
#define __pyx_n_s_strY __pyx_mstate_global->__pyx_n_s_strY
#define __pyx_n_s_strYbar __pyx_mstate_global->__pyx_n_s_strYbar
#define __pyx_n_s_strattr __pyx_mstate_global->__pyx_n_s_strattr
#define __pyx_n_s_strcontrol __pyx_mstate_global->__pyx_n_s_strcontrol
#define __pyx_n_s_strder __pyx_mstate_global->__pyx_n_s_strder
#define __pyx_n_s_strders __pyx_mstate_global->__pyx_n_s_strders
#define __pyx_n_s_strdimlb __pyx_mstate_global->__pyx_n_s_strdimlb
#define __pyx_n_s_streqns __pyx_mstate_global->__pyx_n_s_streqns
#define __pyx_n_s_strfull __pyx_mstate_global->__pyx_n_s_strfull
#define __pyx_n_s_strgens __pyx_mstate_global->__pyx_n_s_strgens
#define __pyx_n_s_strineq __pyx_mstate_global->__pyx_n_s_strineq
#define __pyx_n_s_string __pyx_mstate_global->__pyx_n_s_string
#define __pyx_kp_s_stringsource __pyx_mstate_global->__pyx_kp_s_stringsource
#define __pyx_n_s_strmode __pyx_mstate_global->__pyx_n_s_strmode
#define __pyx_n_s_strnot __pyx_mstate_global->__pyx_n_s_strnot
#define __pyx_n_s_strpoly __pyx_mstate_global->__pyx_n_s_strpoly
#define __pyx_n_s_strq __pyx_mstate_global->__pyx_n_s_strq
#define __pyx_n_s_strredset __pyx_mstate_global->__pyx_n_s_strredset
#define __pyx_n_s_strrels __pyx_mstate_global->__pyx_n_s_strrels
#define __pyx_n_s_strsel __pyx_mstate_global->__pyx_n_s_strsel
#define __pyx_n_s_strsingsol __pyx_mstate_global->__pyx_n_s_strsingsol
#define __pyx_n_s_strvar __pyx_mstate_global->__pyx_n_s_strvar
#define __pyx_n_s_strvars __pyx_mstate_global->__pyx_n_s_strvars
#define __pyx_n_s_strx __pyx_mstate_global->__pyx_n_s_strx
#define __pyx_n_s_strzstring __pyx_mstate_global->__pyx_n_s_strzstring
#define __pyx_n_s_subrankings __pyx_mstate_global->__pyx_n_s_subrankings
#define __pyx_n_s_sympy __pyx_mstate_global->__pyx_n_s_sympy
#define __pyx_n_s_sys __pyx_mstate_global->__pyx_n_s_sys
#define __pyx_n_s_tail __pyx_mstate_global->__pyx_n_s_tail
#define __pyx_n_s_tensor __pyx_mstate_global->__pyx_n_s_tensor
#define __pyx_n_s_test __pyx_mstate_global->__pyx_n_s_test
#define __pyx_kp_u_the_variable_and_the_base_field __pyx_mstate_global->__pyx_kp_u_the_variable_and_the_base_field
#define __pyx_n_s_theta __pyx_mstate_global->__pyx_n_s_theta
#define __pyx_n_s_timeout __pyx_mstate_global->__pyx_n_s_timeout
#define __pyx_n_b_true __pyx_mstate_global->__pyx_n_b_true
#define __pyx_n_s_update __pyx_mstate_global->__pyx_n_s_update
#define __pyx_n_s_use_setstate __pyx_mstate_global->__pyx_n_s_use_setstate
#define __pyx_kp_u_utf_8 __pyx_mstate_global->__pyx_kp_u_utf_8
#define __pyx_n_s_var __pyx_mstate_global->__pyx_n_s_var
#define __pyx_n_s_variable __pyx_mstate_global->__pyx_n_s_variable
#define __pyx_kp_u_variable_expected_for_q_found __pyx_mstate_global->__pyx_kp_u_variable_expected_for_q_found
#define __pyx_n_s_vars __pyx_mstate_global->__pyx_n_s_vars
#define __pyx_n_s_x __pyx_mstate_global->__pyx_n_s_x
#define __pyx_n_s_y __pyx_mstate_global->__pyx_n_s_y
#define __pyx_n_s_z __pyx_mstate_global->__pyx_n_s_z
#define __pyx_kp_u_z_d __pyx_mstate_global->__pyx_kp_u_z_d
#define __pyx_n_s_zevdict __pyx_mstate_global->__pyx_n_s_zevdict
#define __pyx_n_s_zstring __pyx_mstate_global->__pyx_n_s_zstring
#define __pyx_n_s_zsymb __pyx_mstate_global->__pyx_n_s_zsymb
#define __pyx_n_s_zval __pyx_mstate_global->__pyx_n_s_zval
#define __pyx_int_0 __pyx_mstate_global->__pyx_int_0
#define __pyx_int_1 __pyx_mstate_global->__pyx_int_1
#define __pyx_int_70027971 __pyx_mstate_global->__pyx_int_70027971
#define __pyx_int_74641392 __pyx_mstate_global->__pyx_int_74641392
#define __pyx_int_163572033 __pyx_mstate_global->__pyx_int_163572033
#define __pyx_k__2 __pyx_mstate_global->__pyx_k__2
#define __pyx_k__3 __pyx_mstate_global->__pyx_k__3
#define __pyx_k__4 __pyx_mstate_global->__pyx_k__4
#define __pyx_k__5 __pyx_mstate_global->__pyx_k__5
#define __pyx_k__9 __pyx_mstate_global->__pyx_k__9
#define __pyx_k__11 __pyx_mstate_global->__pyx_k__11
#define __pyx_k__12 __pyx_mstate_global->__pyx_k__12
#define __pyx_k__13 __pyx_mstate_global->__pyx_k__13
#define __pyx_k__14 __pyx_mstate_global->__pyx_k__14
#define __pyx_k__15 __pyx_mstate_global->__pyx_k__15
#define __pyx_k__17 __pyx_mstate_global->__pyx_k__17
#define __pyx_k__18 __pyx_mstate_global->__pyx_k__18
#define __pyx_k__19 __pyx_mstate_global->__pyx_k__19
#define __pyx_k__20 __pyx_mstate_global->__pyx_k__20
#define __pyx_k__21 __pyx_mstate_global->__pyx_k__21
#define __pyx_k__22 __pyx_mstate_global->__pyx_k__22
#define __pyx_k__23 __pyx_mstate_global->__pyx_k__23
#define __pyx_k__24 __pyx_mstate_global->__pyx_k__24
#define __pyx_k__25 __pyx_mstate_global->__pyx_k__25
#define __pyx_k__26 __pyx_mstate_global->__pyx_k__26
#define __pyx_k__27 __pyx_mstate_global->__pyx_k__27
#define __pyx_k__28 __pyx_mstate_global->__pyx_k__28
#define __pyx_k__29 __pyx_mstate_global->__pyx_k__29
#define __pyx_k__30 __pyx_mstate_global->__pyx_k__30
#define __pyx_k__31 __pyx_mstate_global->__pyx_k__31
#define __pyx_k__32 __pyx_mstate_global->__pyx_k__32
#define __pyx_k__33 __pyx_mstate_global->__pyx_k__33
#define __pyx_k__35 __pyx_mstate_global->__pyx_k__35
#define __pyx_k__36 __pyx_mstate_global->__pyx_k__36
#define __pyx_k__37 __pyx_mstate_global->__pyx_k__37
#define __pyx_k__38 __pyx_mstate_global->__pyx_k__38
#define __pyx_k__39 __pyx_mstate_global->__pyx_k__39
#define __pyx_k__40 __pyx_mstate_global->__pyx_k__40
#define __pyx_k__41 __pyx_mstate_global->__pyx_k__41
#define __pyx_k__49 __pyx_mstate_global->__pyx_k__49
#define __pyx_k__50 __pyx_mstate_global->__pyx_k__50
#define __pyx_k__51 __pyx_mstate_global->__pyx_k__51
#define __pyx_k__52 __pyx_mstate_global->__pyx_k__52
#define __pyx_k__53 __pyx_mstate_global->__pyx_k__53
#define __pyx_k__54 __pyx_mstate_global->__pyx_k__54
#define __pyx_k__55 __pyx_mstate_global->__pyx_k__55
#define __pyx_k__56 __pyx_mstate_global->__pyx_k__56
#define __pyx_k__57 __pyx_mstate_global->__pyx_k__57
#define __pyx_k__58 __pyx_mstate_global->__pyx_k__58
#define __pyx_k__59 __pyx_mstate_global->__pyx_k__59
#define __pyx_k__60 __pyx_mstate_global->__pyx_k__60
#define __pyx_k__61 __pyx_mstate_global->__pyx_k__61
#define __pyx_k__62 __pyx_mstate_global->__pyx_k__62
#define __pyx_k__64 __pyx_mstate_global->__pyx_k__64
#define __pyx_k__68 __pyx_mstate_global->__pyx_k__68
#define __pyx_k__69 __pyx_mstate_global->__pyx_k__69
#define __pyx_k__70 __pyx_mstate_global->__pyx_k__70
#define __pyx_k__71 __pyx_mstate_global->__pyx_k__71
#define __pyx_k__72 __pyx_mstate_global->__pyx_k__72
#define __pyx_k__73 __pyx_mstate_global->__pyx_k__73
#define __pyx_k__77 __pyx_mstate_global->__pyx_k__77
#define __pyx_k__78 __pyx_mstate_global->__pyx_k__78
#define __pyx_k__79 __pyx_mstate_global->__pyx_k__79
#define __pyx_k__80 __pyx_mstate_global->__pyx_k__80
#define __pyx_k__81 __pyx_mstate_global->__pyx_k__81
#define __pyx_tuple__8 __pyx_mstate_global->__pyx_tuple__8
#define __pyx_tuple__10 __pyx_mstate_global->__pyx_tuple__10
#define __pyx_tuple__34 __pyx_mstate_global->__pyx_tuple__34
#define __pyx_tuple__42 __pyx_mstate_global->__pyx_tuple__42
#define __pyx_tuple__43 __pyx_mstate_global->__pyx_tuple__43
#define __pyx_tuple__44 __pyx_mstate_global->__pyx_tuple__44
#define __pyx_tuple__45 __pyx_mstate_global->__pyx_tuple__45
#define __pyx_tuple__46 __pyx_mstate_global->__pyx_tuple__46
#define __pyx_tuple__47 __pyx_mstate_global->__pyx_tuple__47
#define __pyx_tuple__48 __pyx_mstate_global->__pyx_tuple__48
#define __pyx_tuple__63 __pyx_mstate_global->__pyx_tuple__63
#define __pyx_tuple__74 __pyx_mstate_global->__pyx_tuple__74
#define __pyx_tuple__75 __pyx_mstate_global->__pyx_tuple__75
#define __pyx_tuple__82 __pyx_mstate_global->__pyx_tuple__82
#define __pyx_tuple__85 __pyx_mstate_global->__pyx_tuple__85
#define __pyx_tuple__87 __pyx_mstate_global->__pyx_tuple__87
#define __pyx_tuple__90 __pyx_mstate_global->__pyx_tuple__90
#define __pyx_tuple__92 __pyx_mstate_global->__pyx_tuple__92
#define __pyx_tuple__94 __pyx_mstate_global->__pyx_tuple__94
#define __pyx_tuple__96 __pyx_mstate_global->__pyx_tuple__96
#define __pyx_tuple__98 __pyx_mstate_global->__pyx_tuple__98
#define __pyx_tuple__100 __pyx_mstate_global->__pyx_tuple__100
#define __pyx_tuple__102 __pyx_mstate_global->__pyx_tuple__102
#define __pyx_tuple__104 __pyx_mstate_global->__pyx_tuple__104
#define __pyx_tuple__106 __pyx_mstate_global->__pyx_tuple__106
#define __pyx_tuple__108 __pyx_mstate_global->__pyx_tuple__108
#define __pyx_tuple__110 __pyx_mstate_global->__pyx_tuple__110
#define __pyx_tuple__112 __pyx_mstate_global->__pyx_tuple__112
#define __pyx_tuple__114 __pyx_mstate_global->__pyx_tuple__114
#define __pyx_tuple__116 __pyx_mstate_global->__pyx_tuple__116
#define __pyx_tuple__118 __pyx_mstate_global->__pyx_tuple__118
#define __pyx_tuple__120 __pyx_mstate_global->__pyx_tuple__120
#define __pyx_tuple__124 __pyx_mstate_global->__pyx_tuple__124
#define __pyx_tuple__126 __pyx_mstate_global->__pyx_tuple__126
#define __pyx_tuple__128 __pyx_mstate_global->__pyx_tuple__128
#define __pyx_tuple__130 __pyx_mstate_global->__pyx_tuple__130
#define __pyx_tuple__132 __pyx_mstate_global->__pyx_tuple__132
#define __pyx_tuple__134 __pyx_mstate_global->__pyx_tuple__134
#define __pyx_tuple__136 __pyx_mstate_global->__pyx_tuple__136
#define __pyx_tuple__138 __pyx_mstate_global->__pyx_tuple__138
#define __pyx_tuple__140 __pyx_mstate_global->__pyx_tuple__140
#define __pyx_tuple__143 __pyx_mstate_global->__pyx_tuple__143
#define __pyx_tuple__148 __pyx_mstate_global->__pyx_tuple__148
#define __pyx_tuple__150 __pyx_mstate_global->__pyx_tuple__150
#define __pyx_tuple__152 __pyx_mstate_global->__pyx_tuple__152
#define __pyx_tuple__154 __pyx_mstate_global->__pyx_tuple__154
#define __pyx_tuple__156 __pyx_mstate_global->__pyx_tuple__156
#define __pyx_tuple__158 __pyx_mstate_global->__pyx_tuple__158
#define __pyx_tuple__162 __pyx_mstate_global->__pyx_tuple__162
#define __pyx_tuple__164 __pyx_mstate_global->__pyx_tuple__164
#define __pyx_tuple__166 __pyx_mstate_global->__pyx_tuple__166
#define __pyx_tuple__169 __pyx_mstate_global->__pyx_tuple__169
#define __pyx_tuple__171 __pyx_mstate_global->__pyx_tuple__171
#define __pyx_tuple__173 __pyx_mstate_global->__pyx_tuple__173
#define __pyx_tuple__175 __pyx_mstate_global->__pyx_tuple__175
#define __pyx_tuple__184 __pyx_mstate_global->__pyx_tuple__184
#define __pyx_tuple__186 __pyx_mstate_global->__pyx_tuple__186
#define __pyx_tuple__191 __pyx_mstate_global->__pyx_tuple__191
#define __pyx_tuple__193 __pyx_mstate_global->__pyx_tuple__193
#define __pyx_tuple__196 __pyx_mstate_global->__pyx_tuple__196
#define __pyx_tuple__200 __pyx_mstate_global->__pyx_tuple__200
#define __pyx_codeobj__86 __pyx_mstate_global->__pyx_codeobj__86
#define __pyx_codeobj__88 __pyx_mstate_global->__pyx_codeobj__88
#define __pyx_codeobj__89 __pyx_mstate_global->__pyx_codeobj__89
#define __pyx_codeobj__91 __pyx_mstate_global->__pyx_codeobj__91
#define __pyx_codeobj__93 __pyx_mstate_global->__pyx_codeobj__93
#define __pyx_codeobj__95 __pyx_mstate_global->__pyx_codeobj__95
#define __pyx_codeobj__97 __pyx_mstate_global->__pyx_codeobj__97
#define __pyx_codeobj__99 __pyx_mstate_global->__pyx_codeobj__99
#define __pyx_codeobj__101 __pyx_mstate_global->__pyx_codeobj__101
#define __pyx_codeobj__103 __pyx_mstate_global->__pyx_codeobj__103
#define __pyx_codeobj__105 __pyx_mstate_global->__pyx_codeobj__105
#define __pyx_codeobj__107 __pyx_mstate_global->__pyx_codeobj__107
#define __pyx_codeobj__109 __pyx_mstate_global->__pyx_codeobj__109
#define __pyx_codeobj__111 __pyx_mstate_global->__pyx_codeobj__111
#define __pyx_codeobj__113 __pyx_mstate_global->__pyx_codeobj__113
#define __pyx_codeobj__115 __pyx_mstate_global->__pyx_codeobj__115
#define __pyx_codeobj__117 __pyx_mstate_global->__pyx_codeobj__117
#define __pyx_codeobj__119 __pyx_mstate_global->__pyx_codeobj__119
#define __pyx_codeobj__121 __pyx_mstate_global->__pyx_codeobj__121
#define __pyx_codeobj__122 __pyx_mstate_global->__pyx_codeobj__122
#define __pyx_codeobj__123 __pyx_mstate_global->__pyx_codeobj__123
#define __pyx_codeobj__125 __pyx_mstate_global->__pyx_codeobj__125
#define __pyx_codeobj__127 __pyx_mstate_global->__pyx_codeobj__127
#define __pyx_codeobj__129 __pyx_mstate_global->__pyx_codeobj__129
#define __pyx_codeobj__131 __pyx_mstate_global->__pyx_codeobj__131
#define __pyx_codeobj__133 __pyx_mstate_global->__pyx_codeobj__133
#define __pyx_codeobj__135 __pyx_mstate_global->__pyx_codeobj__135
#define __pyx_codeobj__137 __pyx_mstate_global->__pyx_codeobj__137
#define __pyx_codeobj__139 __pyx_mstate_global->__pyx_codeobj__139
#define __pyx_codeobj__141 __pyx_mstate_global->__pyx_codeobj__141
#define __pyx_codeobj__142 __pyx_mstate_global->__pyx_codeobj__142
#define __pyx_codeobj__144 __pyx_mstate_global->__pyx_codeobj__144
#define __pyx_codeobj__145 __pyx_mstate_global->__pyx_codeobj__145
#define __pyx_codeobj__146 __pyx_mstate_global->__pyx_codeobj__146
#define __pyx_codeobj__147 __pyx_mstate_global->__pyx_codeobj__147
#define __pyx_codeobj__149 __pyx_mstate_global->__pyx_codeobj__149
#define __pyx_codeobj__151 __pyx_mstate_global->__pyx_codeobj__151
#define __pyx_codeobj__153 __pyx_mstate_global->__pyx_codeobj__153
#define __pyx_codeobj__155 __pyx_mstate_global->__pyx_codeobj__155
#define __pyx_codeobj__157 __pyx_mstate_global->__pyx_codeobj__157
#define __pyx_codeobj__159 __pyx_mstate_global->__pyx_codeobj__159
#define __pyx_codeobj__160 __pyx_mstate_global->__pyx_codeobj__160
#define __pyx_codeobj__161 __pyx_mstate_global->__pyx_codeobj__161
#define __pyx_codeobj__163 __pyx_mstate_global->__pyx_codeobj__163
#define __pyx_codeobj__165 __pyx_mstate_global->__pyx_codeobj__165
#define __pyx_codeobj__167 __pyx_mstate_global->__pyx_codeobj__167
#define __pyx_codeobj__168 __pyx_mstate_global->__pyx_codeobj__168
#define __pyx_codeobj__170 __pyx_mstate_global->__pyx_codeobj__170
#define __pyx_codeobj__172 __pyx_mstate_global->__pyx_codeobj__172
#define __pyx_codeobj__174 __pyx_mstate_global->__pyx_codeobj__174
#define __pyx_codeobj__176 __pyx_mstate_global->__pyx_codeobj__176
#define __pyx_codeobj__177 __pyx_mstate_global->__pyx_codeobj__177
#define __pyx_codeobj__178 __pyx_mstate_global->__pyx_codeobj__178
#define __pyx_codeobj__179 __pyx_mstate_global->__pyx_codeobj__179
#define __pyx_codeobj__180 __pyx_mstate_global->__pyx_codeobj__180
#define __pyx_codeobj__181 __pyx_mstate_global->__pyx_codeobj__181
#define __pyx_codeobj__182 __pyx_mstate_global->__pyx_codeobj__182
#define __pyx_codeobj__183 __pyx_mstate_global->__pyx_codeobj__183
#define __pyx_codeobj__185 __pyx_mstate_global->__pyx_codeobj__185
#define __pyx_codeobj__187 __pyx_mstate_global->__pyx_codeobj__187
#define __pyx_codeobj__188 __pyx_mstate_global->__pyx_codeobj__188
#define __pyx_codeobj__189 __pyx_mstate_global->__pyx_codeobj__189
#define __pyx_codeobj__190 __pyx_mstate_global->__pyx_codeobj__190
#define __pyx_codeobj__192 __pyx_mstate_global->__pyx_codeobj__192
#define __pyx_codeobj__194 __pyx_mstate_global->__pyx_codeobj__194
#define __pyx_codeobj__195 __pyx_mstate_global->__pyx_codeobj__195
#define __pyx_codeobj__197 __pyx_mstate_global->__pyx_codeobj__197
#define __pyx_codeobj__198 __pyx_mstate_global->__pyx_codeobj__198
#define __pyx_codeobj__199 __pyx_mstate_global->__pyx_codeobj__199
#define __pyx_codeobj__201 __pyx_mstate_global->__pyx_codeobj__201
/* #### Code section: module_code ### */

/* "cpython/complex.pxd":19
 * 
 *         @property
 *         cdef inline double real(self) noexcept:             # <<<<<<<<<<<<<<
 *             return self.cval.real
 * 
 */

static CYTHON_INLINE double __pyx_f_7cpython_7complex_7complex_4real_real(PyComplexObject *__pyx_v_self) {
  double __pyx_r;

  /* "cpython/complex.pxd":20
 *         @property
 *         cdef inline double real(self) noexcept:
 *             return self.cval.real             # <<<<<<<<<<<<<<
 * 
 *         @property
 */
  __pyx_r = __pyx_v_self->cval.real;
  goto __pyx_L0;

  /* "cpython/complex.pxd":19
 * 
 *         @property
 *         cdef inline double real(self) noexcept:             # <<<<<<<<<<<<<<
 *             return self.cval.real
 * 
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "cpython/complex.pxd":23
 * 
 *         @property
 *         cdef inline double imag(self) noexcept:             # <<<<<<<<<<<<<<
 *             return self.cval.imag
 * 
 */

static CYTHON_INLINE double __pyx_f_7cpython_7complex_7complex_4imag_imag(PyComplexObject *__pyx_v_self) {
  double __pyx_r;

  /* "cpython/complex.pxd":24
 *         @property
 *         cdef inline double imag(self) noexcept:
 *             return self.cval.imag             # <<<<<<<<<<<<<<
 * 
 *     # PyTypeObject PyComplex_Type
 */
  __pyx_r = __pyx_v_self->cval.imag;
  goto __pyx_L0;

  /* "cpython/complex.pxd":23
 * 
 *         @property
 *         cdef inline double imag(self) noexcept:             # <<<<<<<<<<<<<<
 *             return self.cval.imag
 * 
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "cpython/contextvars.pxd":112
 * 
 * 
 * cdef inline object get_value(var, default_value=None):             # <<<<<<<<<<<<<<
 *     """Return a new reference to the value of the context variable,
 *     or the default value of the context variable,
 */

static CYTHON_INLINE PyObject *__pyx_f_7cpython_11contextvars_get_value(PyObject *__pyx_v_var, struct __pyx_opt_args_7cpython_11contextvars_get_value *__pyx_optional_args) {
  PyObject *__pyx_v_default_value = ((PyObject *)Py_None);
  PyObject *__pyx_v_value;
  PyObject *__pyx_v_pyvalue = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_value", 1);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_default_value = __pyx_optional_args->default_value;
    }
  }

  /* "cpython/contextvars.pxd":117
 *     or None if no such value or default was found.
 *     """
 *     cdef PyObject *value = NULL             # <<<<<<<<<<<<<<
 *     PyContextVar_Get(var, NULL, &value)
 *     if value is NULL:
 */
  __pyx_v_value = NULL;

  /* "cpython/contextvars.pxd":118
 *     """
 *     cdef PyObject *value = NULL
 *     PyContextVar_Get(var, NULL, &value)             # <<<<<<<<<<<<<<
 *     if value is NULL:
 *         # context variable does not have a default
 */
  __pyx_t_1 = PyContextVar_Get(__pyx_v_var, NULL, (&__pyx_v_value)); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(3, 118, __pyx_L1_error)

  /* "cpython/contextvars.pxd":119
 *     cdef PyObject *value = NULL
 *     PyContextVar_Get(var, NULL, &value)
 *     if value is NULL:             # <<<<<<<<<<<<<<
 *         # context variable does not have a default
 *         pyvalue = default_value
 */
  __pyx_t_2 = (__pyx_v_value == NULL);
  if (__pyx_t_2) {

    /* "cpython/contextvars.pxd":121
 *     if value is NULL:
 *         # context variable does not have a default
 *         pyvalue = default_value             # <<<<<<<<<<<<<<
 *     else:
 *         # value or default value of context variable
 */
    __Pyx_INCREF(__pyx_v_default_value);
    __pyx_v_pyvalue = __pyx_v_default_value;

    /* "cpython/contextvars.pxd":119
 *     cdef PyObject *value = NULL
 *     PyContextVar_Get(var, NULL, &value)
 *     if value is NULL:             # <<<<<<<<<<<<<<
 *         # context variable does not have a default
 *         pyvalue = default_value
 */
    goto __pyx_L3;
  }

  /* "cpython/contextvars.pxd":124
 *     else:
 *         # value or default value of context variable
 *         pyvalue = <object>value             # <<<<<<<<<<<<<<
 *         Py_XDECREF(value)  # PyContextVar_Get() returned an owned reference as 'PyObject*'
 *     return pyvalue
 */
  /*else*/ {
    __pyx_t_3 = ((PyObject *)__pyx_v_value);
    __Pyx_INCREF(__pyx_t_3);
    __pyx_v_pyvalue = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cpython/contextvars.pxd":125
 *         # value or default value of context variable
 *         pyvalue = <object>value
 *         Py_XDECREF(value)  # PyContextVar_Get() returned an owned reference as 'PyObject*'             # <<<<<<<<<<<<<<
 *     return pyvalue
 * 
 */
    Py_XDECREF(__pyx_v_value);
  }
  __pyx_L3:;

  /* "cpython/contextvars.pxd":126
 *         pyvalue = <object>value
 *         Py_XDECREF(value)  # PyContextVar_Get() returned an owned reference as 'PyObject*'
 *     return pyvalue             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_pyvalue);
  __pyx_r = __pyx_v_pyvalue;
  goto __pyx_L0;

  /* "cpython/contextvars.pxd":112
 * 
 * 
 * cdef inline object get_value(var, default_value=None):             # <<<<<<<<<<<<<<
 *     """Return a new reference to the value of the context variable,
 *     or the default value of the context variable,
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cpython.contextvars.get_value", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_pyvalue);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cpython/contextvars.pxd":129
 * 
 * 
 * cdef inline object get_value_no_default(var, default_value=None):             # <<<<<<<<<<<<<<
 *     """Return a new reference to the value of the context variable,
 *     or the provided default value if no such value was found.
 */

static CYTHON_INLINE PyObject *__pyx_f_7cpython_11contextvars_get_value_no_default(PyObject *__pyx_v_var, struct __pyx_opt_args_7cpython_11contextvars_get_value_no_default *__pyx_optional_args) {
  PyObject *__pyx_v_default_value = ((PyObject *)Py_None);
  PyObject *__pyx_v_value;
  PyObject *__pyx_v_pyvalue = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_value_no_default", 1);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_default_value = __pyx_optional_args->default_value;
    }
  }

  /* "cpython/contextvars.pxd":135
 *     Ignores the default value of the context variable, if any.
 *     """
 *     cdef PyObject *value = NULL             # <<<<<<<<<<<<<<
 *     PyContextVar_Get(var, <PyObject*>default_value, &value)
 *     # value of context variable or 'default_value'
 */
  __pyx_v_value = NULL;

  /* "cpython/contextvars.pxd":136
 *     """
 *     cdef PyObject *value = NULL
 *     PyContextVar_Get(var, <PyObject*>default_value, &value)             # <<<<<<<<<<<<<<
 *     # value of context variable or 'default_value'
 *     pyvalue = <object>value
 */
  __pyx_t_1 = PyContextVar_Get(__pyx_v_var, ((PyObject *)__pyx_v_default_value), (&__pyx_v_value)); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(3, 136, __pyx_L1_error)

  /* "cpython/contextvars.pxd":138
 *     PyContextVar_Get(var, <PyObject*>default_value, &value)
 *     # value of context variable or 'default_value'
 *     pyvalue = <object>value             # <<<<<<<<<<<<<<
 *     Py_XDECREF(value)  # PyContextVar_Get() returned an owned reference as 'PyObject*'
 *     return pyvalue
 */
  __pyx_t_2 = ((PyObject *)__pyx_v_value);
  __Pyx_INCREF(__pyx_t_2);
  __pyx_v_pyvalue = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "cpython/contextvars.pxd":139
 *     # value of context variable or 'default_value'
 *     pyvalue = <object>value
 *     Py_XDECREF(value)  # PyContextVar_Get() returned an owned reference as 'PyObject*'             # <<<<<<<<<<<<<<
 *     return pyvalue
 */
  Py_XDECREF(__pyx_v_value);

  /* "cpython/contextvars.pxd":140
 *     pyvalue = <object>value
 *     Py_XDECREF(value)  # PyContextVar_Get() returned an owned reference as 'PyObject*'
 *     return pyvalue             # <<<<<<<<<<<<<<
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_pyvalue);
  __pyx_r = __pyx_v_pyvalue;
  goto __pyx_L0;

  /* "cpython/contextvars.pxd":129
 * 
 * 
 * cdef inline object get_value_no_default(var, default_value=None):             # <<<<<<<<<<<<<<
 *     """Return a new reference to the value of the context variable,
 *     or the provided default value if no such value was found.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("cpython.contextvars.get_value_no_default", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_pyvalue);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "DifferentialAlgebra.pyx":659
 * from cpython cimport bool
 * 
 * def ascii (s) :             # <<<<<<<<<<<<<<
 *     if isinstance (s, bytes) :
 *         return s
 */

/* Python wrapper */
static PyObject *__pyx_pw_19DifferentialAlgebra_1ascii(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_19DifferentialAlgebra_1ascii = {"ascii", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_19DifferentialAlgebra_1ascii, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_19DifferentialAlgebra_1ascii(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_s = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("ascii (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_s,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_s)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(4, 659, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "ascii") < 0)) __PYX_ERR(4, 659, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_s = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("ascii", 1, 1, 1, __pyx_nargs); __PYX_ERR(4, 659, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("DifferentialAlgebra.ascii", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_19DifferentialAlgebra_ascii(__pyx_self, __pyx_v_s);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_19DifferentialAlgebra_ascii(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_s) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("ascii", 1);

  /* "DifferentialAlgebra.pyx":660
 * 
 * def ascii (s) :
 *     if isinstance (s, bytes) :             # <<<<<<<<<<<<<<
 *         return s
 *     else :
 */
  __pyx_t_1 = PyBytes_Check(__pyx_v_s); 
  if (__pyx_t_1) {

    /* "DifferentialAlgebra.pyx":661
 * def ascii (s) :
 *     if isinstance (s, bytes) :
 *         return s             # <<<<<<<<<<<<<<
 *     else :
 *         return str (s).encode ('ascii')
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_s);
    __pyx_r = __pyx_v_s;
    goto __pyx_L0;

    /* "DifferentialAlgebra.pyx":660
 * 
 * def ascii (s) :
 *     if isinstance (s, bytes) :             # <<<<<<<<<<<<<<
 *         return s
 *     else :
 */
  }

  /* "DifferentialAlgebra.pyx":663
 *         return s
 *     else :
 *         return str (s).encode ('ascii')             # <<<<<<<<<<<<<<
 * 
 * import sympy
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __Pyx_PyObject_Unicode(__pyx_v_s); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 663, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = PyUnicode_AsASCIIString(((PyObject*)__pyx_t_2)); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 663, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;
  }

  /* "DifferentialAlgebra.pyx":659
 * from cpython cimport bool
 * 
 * def ascii (s) :             # <<<<<<<<<<<<<<
 *     if isinstance (s, bytes) :
 *         return s
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("DifferentialAlgebra.ascii", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "DifferentialAlgebra.pyx":668
 * from sympy import var, Symbol, Derivative, Eq, Ne, Integer, Rational, oo, Add, Mul, Pow, degree
 * 
 * def function (s) :             # <<<<<<<<<<<<<<
 *     L = re.split (r'[, ]+', s)
 *     if len(L) == 1 :
 */

/* Python wrapper */
static PyObject *__pyx_pw_19DifferentialAlgebra_3function(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_19DifferentialAlgebra_3function = {"function", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_19DifferentialAlgebra_3function, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_19DifferentialAlgebra_3function(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_s = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("function (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_s,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_s)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(4, 668, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "function") < 0)) __PYX_ERR(4, 668, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_s = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("function", 1, 1, 1, __pyx_nargs); __PYX_ERR(4, 668, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("DifferentialAlgebra.function", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_19DifferentialAlgebra_2function(__pyx_self, __pyx_v_s);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_19DifferentialAlgebra_2function(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_s) {
  PyObject *__pyx_v_L = NULL;
  PyObject *__pyx_7genexpr__pyx_v_z = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  unsigned int __pyx_t_4;
  Py_ssize_t __pyx_t_5;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *(*__pyx_t_8)(PyObject *);
  PyObject *__pyx_t_9 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("function", 1);

  /* "DifferentialAlgebra.pyx":669
 * 
 * def function (s) :
 *     L = re.split (r'[, ]+', s)             # <<<<<<<<<<<<<<
 *     if len(L) == 1 :
 *         return sympy.Function(L[0])
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_re); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 669, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_split); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 669, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_kp_u_, __pyx_v_s};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 2+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 669, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v_L = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "DifferentialAlgebra.pyx":670
 * def function (s) :
 *     L = re.split (r'[, ]+', s)
 *     if len(L) == 1 :             # <<<<<<<<<<<<<<
 *         return sympy.Function(L[0])
 *     else :
 */
  __pyx_t_5 = PyObject_Length(__pyx_v_L); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(4, 670, __pyx_L1_error)
  __pyx_t_6 = (__pyx_t_5 == 1);
  if (__pyx_t_6) {

    /* "DifferentialAlgebra.pyx":671
 *     L = re.split (r'[, ]+', s)
 *     if len(L) == 1 :
 *         return sympy.Function(L[0])             # <<<<<<<<<<<<<<
 *     else :
 *         return tuple ([sympy.Function(z) for z in L])
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_sympy); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 671, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_Function); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 671, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_L, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 671, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_7 = NULL;
    __pyx_t_4 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
        __pyx_t_4 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_t_3};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 671, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "DifferentialAlgebra.pyx":670
 * def function (s) :
 *     L = re.split (r'[, ]+', s)
 *     if len(L) == 1 :             # <<<<<<<<<<<<<<
 *         return sympy.Function(L[0])
 *     else :
 */
  }

  /* "DifferentialAlgebra.pyx":673
 *         return sympy.Function(L[0])
 *     else :
 *         return tuple ([sympy.Function(z) for z in L])             # <<<<<<<<<<<<<<
 * 
 * def indexedbase (s) :
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    { /* enter inner scope */
      __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 673, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (likely(PyList_CheckExact(__pyx_v_L)) || PyTuple_CheckExact(__pyx_v_L)) {
        __pyx_t_2 = __pyx_v_L; __Pyx_INCREF(__pyx_t_2);
        __pyx_t_5 = 0;
        __pyx_t_8 = NULL;
      } else {
        __pyx_t_5 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_L); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 673, __pyx_L6_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_8 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(4, 673, __pyx_L6_error)
      }
      for (;;) {
        if (likely(!__pyx_t_8)) {
          if (likely(PyList_CheckExact(__pyx_t_2))) {
            {
              Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_2);
              #if !CYTHON_ASSUME_SAFE_MACROS
              if (unlikely((__pyx_temp < 0))) __PYX_ERR(4, 673, __pyx_L6_error)
              #endif
              if (__pyx_t_5 >= __pyx_temp) break;
            }
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_3 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_5); __Pyx_INCREF(__pyx_t_3); __pyx_t_5++; if (unlikely((0 < 0))) __PYX_ERR(4, 673, __pyx_L6_error)
            #else
            __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 673, __pyx_L6_error)
            __Pyx_GOTREF(__pyx_t_3);
            #endif
          } else {
            {
              Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_2);
              #if !CYTHON_ASSUME_SAFE_MACROS
              if (unlikely((__pyx_temp < 0))) __PYX_ERR(4, 673, __pyx_L6_error)
              #endif
              if (__pyx_t_5 >= __pyx_temp) break;
            }
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_5); __Pyx_INCREF(__pyx_t_3); __pyx_t_5++; if (unlikely((0 < 0))) __PYX_ERR(4, 673, __pyx_L6_error)
            #else
            __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 673, __pyx_L6_error)
            __Pyx_GOTREF(__pyx_t_3);
            #endif
          }
        } else {
          __pyx_t_3 = __pyx_t_8(__pyx_t_2);
          if (unlikely(!__pyx_t_3)) {
            PyObject* exc_type = PyErr_Occurred();
            if (exc_type) {
              if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
              else __PYX_ERR(4, 673, __pyx_L6_error)
            }
            break;
          }
          __Pyx_GOTREF(__pyx_t_3);
        }
        __Pyx_XDECREF_SET(__pyx_7genexpr__pyx_v_z, __pyx_t_3);
        __pyx_t_3 = 0;
        __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_sympy); if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 673, __pyx_L6_error)
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_Function); if (unlikely(!__pyx_t_9)) __PYX_ERR(4, 673, __pyx_L6_error)
        __Pyx_GOTREF(__pyx_t_9);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __pyx_t_7 = NULL;
        __pyx_t_4 = 0;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_9))) {
          __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_9);
          if (likely(__pyx_t_7)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
            __Pyx_INCREF(__pyx_t_7);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_9, function);
            __pyx_t_4 = 1;
          }
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_7genexpr__pyx_v_z};
          __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_9, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
          __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
          if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 673, __pyx_L6_error)
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        }
        if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_3))) __PYX_ERR(4, 673, __pyx_L6_error)
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      }
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_XDECREF(__pyx_7genexpr__pyx_v_z); __pyx_7genexpr__pyx_v_z = 0;
      goto __pyx_L10_exit_scope;
      __pyx_L6_error:;
      __Pyx_XDECREF(__pyx_7genexpr__pyx_v_z); __pyx_7genexpr__pyx_v_z = 0;
      goto __pyx_L1_error;
      __pyx_L10_exit_scope:;
    } /* exit inner scope */
    __pyx_t_2 = PyList_AsTuple(((PyObject*)__pyx_t_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 673, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;
  }

  /* "DifferentialAlgebra.pyx":668
 * from sympy import var, Symbol, Derivative, Eq, Ne, Integer, Rational, oo, Add, Mul, Pow, degree
 * 
 * def function (s) :             # <<<<<<<<<<<<<<
 *     L = re.split (r'[, ]+', s)
 *     if len(L) == 1 :
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("DifferentialAlgebra.function", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_L);
  __Pyx_XDECREF(__pyx_7genexpr__pyx_v_z);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "DifferentialAlgebra.pyx":675
 *         return tuple ([sympy.Function(z) for z in L])
 * 
 * def indexedbase (s) :             # <<<<<<<<<<<<<<
 *     L = re.split (r'[, ]+', s)
 *     if len(L) == 1 :
 */

/* Python wrapper */
static PyObject *__pyx_pw_19DifferentialAlgebra_5indexedbase(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_19DifferentialAlgebra_5indexedbase = {"indexedbase", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_19DifferentialAlgebra_5indexedbase, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_19DifferentialAlgebra_5indexedbase(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_s = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("indexedbase (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_s,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_s)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(4, 675, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "indexedbase") < 0)) __PYX_ERR(4, 675, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_s = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("indexedbase", 1, 1, 1, __pyx_nargs); __PYX_ERR(4, 675, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("DifferentialAlgebra.indexedbase", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_19DifferentialAlgebra_4indexedbase(__pyx_self, __pyx_v_s);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_19DifferentialAlgebra_4indexedbase(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_s) {
  PyObject *__pyx_v_L = NULL;
  PyObject *__pyx_8genexpr1__pyx_v_z = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  unsigned int __pyx_t_4;
  Py_ssize_t __pyx_t_5;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *(*__pyx_t_8)(PyObject *);
  PyObject *__pyx_t_9 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("indexedbase", 1);

  /* "DifferentialAlgebra.pyx":676
 * 
 * def indexedbase (s) :
 *     L = re.split (r'[, ]+', s)             # <<<<<<<<<<<<<<
 *     if len(L) == 1 :
 *         return sympy.IndexedBase(L[0])
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_re); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 676, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_split); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 676, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_kp_u_, __pyx_v_s};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 2+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 676, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v_L = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "DifferentialAlgebra.pyx":677
 * def indexedbase (s) :
 *     L = re.split (r'[, ]+', s)
 *     if len(L) == 1 :             # <<<<<<<<<<<<<<
 *         return sympy.IndexedBase(L[0])
 *     else :
 */
  __pyx_t_5 = PyObject_Length(__pyx_v_L); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(4, 677, __pyx_L1_error)
  __pyx_t_6 = (__pyx_t_5 == 1);
  if (__pyx_t_6) {

    /* "DifferentialAlgebra.pyx":678
 *     L = re.split (r'[, ]+', s)
 *     if len(L) == 1 :
 *         return sympy.IndexedBase(L[0])             # <<<<<<<<<<<<<<
 *     else :
 *         return tuple ([sympy.IndexedBase(z) for z in L])
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_sympy); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 678, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_IndexedBase); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 678, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_L, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 678, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_7 = NULL;
    __pyx_t_4 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
        __pyx_t_4 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_t_3};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 678, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "DifferentialAlgebra.pyx":677
 * def indexedbase (s) :
 *     L = re.split (r'[, ]+', s)
 *     if len(L) == 1 :             # <<<<<<<<<<<<<<
 *         return sympy.IndexedBase(L[0])
 *     else :
 */
  }

  /* "DifferentialAlgebra.pyx":680
 *         return sympy.IndexedBase(L[0])
 *     else :
 *         return tuple ([sympy.IndexedBase(z) for z in L])             # <<<<<<<<<<<<<<
 * 
 * # bmi_c.pxd is automatically built from bmi_balsa.h
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    { /* enter inner scope */
      __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 680, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (likely(PyList_CheckExact(__pyx_v_L)) || PyTuple_CheckExact(__pyx_v_L)) {
        __pyx_t_2 = __pyx_v_L; __Pyx_INCREF(__pyx_t_2);
        __pyx_t_5 = 0;
        __pyx_t_8 = NULL;
      } else {
        __pyx_t_5 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_L); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 680, __pyx_L6_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_8 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(4, 680, __pyx_L6_error)
      }
      for (;;) {
        if (likely(!__pyx_t_8)) {
          if (likely(PyList_CheckExact(__pyx_t_2))) {
            {
              Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_2);
              #if !CYTHON_ASSUME_SAFE_MACROS
              if (unlikely((__pyx_temp < 0))) __PYX_ERR(4, 680, __pyx_L6_error)
              #endif
              if (__pyx_t_5 >= __pyx_temp) break;
            }
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_3 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_5); __Pyx_INCREF(__pyx_t_3); __pyx_t_5++; if (unlikely((0 < 0))) __PYX_ERR(4, 680, __pyx_L6_error)
            #else
            __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 680, __pyx_L6_error)
            __Pyx_GOTREF(__pyx_t_3);
            #endif
          } else {
            {
              Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_2);
              #if !CYTHON_ASSUME_SAFE_MACROS
              if (unlikely((__pyx_temp < 0))) __PYX_ERR(4, 680, __pyx_L6_error)
              #endif
              if (__pyx_t_5 >= __pyx_temp) break;
            }
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_5); __Pyx_INCREF(__pyx_t_3); __pyx_t_5++; if (unlikely((0 < 0))) __PYX_ERR(4, 680, __pyx_L6_error)
            #else
            __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 680, __pyx_L6_error)
            __Pyx_GOTREF(__pyx_t_3);
            #endif
          }
        } else {
          __pyx_t_3 = __pyx_t_8(__pyx_t_2);
          if (unlikely(!__pyx_t_3)) {
            PyObject* exc_type = PyErr_Occurred();
            if (exc_type) {
              if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
              else __PYX_ERR(4, 680, __pyx_L6_error)
            }
            break;
          }
          __Pyx_GOTREF(__pyx_t_3);
        }
        __Pyx_XDECREF_SET(__pyx_8genexpr1__pyx_v_z, __pyx_t_3);
        __pyx_t_3 = 0;
        __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_sympy); if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 680, __pyx_L6_error)
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_IndexedBase); if (unlikely(!__pyx_t_9)) __PYX_ERR(4, 680, __pyx_L6_error)
        __Pyx_GOTREF(__pyx_t_9);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __pyx_t_7 = NULL;
        __pyx_t_4 = 0;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_9))) {
          __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_9);
          if (likely(__pyx_t_7)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
            __Pyx_INCREF(__pyx_t_7);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_9, function);
            __pyx_t_4 = 1;
          }
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_8genexpr1__pyx_v_z};
          __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_9, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
          __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
          if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 680, __pyx_L6_error)
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        }
        if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_3))) __PYX_ERR(4, 680, __pyx_L6_error)
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      }
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_XDECREF(__pyx_8genexpr1__pyx_v_z); __pyx_8genexpr1__pyx_v_z = 0;
      goto __pyx_L10_exit_scope;
      __pyx_L6_error:;
      __Pyx_XDECREF(__pyx_8genexpr1__pyx_v_z); __pyx_8genexpr1__pyx_v_z = 0;
      goto __pyx_L1_error;
      __pyx_L10_exit_scope:;
    } /* exit inner scope */
    __pyx_t_2 = PyList_AsTuple(((PyObject*)__pyx_t_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 680, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;
  }

  /* "DifferentialAlgebra.pyx":675
 *         return tuple ([sympy.Function(z) for z in L])
 * 
 * def indexedbase (s) :             # <<<<<<<<<<<<<<
 *     L = re.split (r'[, ]+', s)
 *     if len(L) == 1 :
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("DifferentialAlgebra.indexedbase", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_L);
  __Pyx_XDECREF(__pyx_8genexpr1__pyx_v_z);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "../../bmi/sympy/DifferentialRing.pyx":257
 * 
 * # __process_notation
 *     def __process_notation (self, notation) :             # <<<<<<<<<<<<<<
 *         cdef strnot
 *         if not isinstance (notation, str) :
 */

/* Python wrapper */
static PyObject *__pyx_pw_19DifferentialAlgebra_16DifferentialRing_1_DifferentialRing__process_notation(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_19DifferentialAlgebra_16DifferentialRing_1_DifferentialRing__process_notation = {"_DifferentialRing__process_notation", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_19DifferentialAlgebra_16DifferentialRing_1_DifferentialRing__process_notation, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_19DifferentialAlgebra_16DifferentialRing_1_DifferentialRing__process_notation(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_notation = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_DifferentialRing__process_notation (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_notation,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_notation)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 257, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "_DifferentialRing__process_notation") < 0)) __PYX_ERR(0, 257, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_notation = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_DifferentialRing__process_notation", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 257, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("DifferentialAlgebra.DifferentialRing._DifferentialRing__process_notation", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_19DifferentialAlgebra_16DifferentialRing___process_notation(((struct __pyx_obj_19DifferentialAlgebra_DifferentialRing *)__pyx_v_self), __pyx_v_notation);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_19DifferentialAlgebra_16DifferentialRing___process_notation(struct __pyx_obj_19DifferentialAlgebra_DifferentialRing *__pyx_v_self, PyObject *__pyx_v_notation) {
  PyObject *__pyx_v_strnot = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  unsigned int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_DifferentialRing__process_notation", 1);

  /* "../../bmi/sympy/DifferentialRing.pyx":259
 *     def __process_notation (self, notation) :
 *         cdef strnot
 *         if not isinstance (notation, str) :             # <<<<<<<<<<<<<<
 *             strnot = self.notation
 *         else :
 */
  __pyx_t_1 = PyUnicode_Check(__pyx_v_notation); 
  __pyx_t_2 = (!__pyx_t_1);
  if (__pyx_t_2) {

    /* "../../bmi/sympy/DifferentialRing.pyx":260
 *         cdef strnot
 *         if not isinstance (notation, str) :
 *             strnot = self.notation             # <<<<<<<<<<<<<<
 *         else :
 *             strnot = ascii (notation)
 */
    __pyx_t_3 = __pyx_v_self->notation;
    __Pyx_INCREF(__pyx_t_3);
    __pyx_v_strnot = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "../../bmi/sympy/DifferentialRing.pyx":259
 *     def __process_notation (self, notation) :
 *         cdef strnot
 *         if not isinstance (notation, str) :             # <<<<<<<<<<<<<<
 *             strnot = self.notation
 *         else :
 */
    goto __pyx_L3;
  }

  /* "../../bmi/sympy/DifferentialRing.pyx":262
 *             strnot = self.notation
 *         else :
 *             strnot = ascii (notation)             # <<<<<<<<<<<<<<
 *             if strnot != BMI_IX_Derivative and \
 *                not strnot.startswith (BMI_IX_jet) :
 */
  /*else*/ {
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_ascii); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 262, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = NULL;
    __pyx_t_6 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
        __pyx_t_6 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_v_notation};
      __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6);
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 262, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
    __pyx_v_strnot = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "../../bmi/sympy/DifferentialRing.pyx":263
 *         else :
 *             strnot = ascii (notation)
 *             if strnot != BMI_IX_Derivative and \             # <<<<<<<<<<<<<<
 *                not strnot.startswith (BMI_IX_jet) :
 *                 strnot = self.notation
 */
    __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v_19DifferentialAlgebra_BMI_IX_Derivative); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 263, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = (__Pyx_PyBytes_Equals(__pyx_v_strnot, __pyx_t_3, Py_NE)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 263, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (__pyx_t_1) {
    } else {
      __pyx_t_2 = __pyx_t_1;
      goto __pyx_L5_bool_binop_done;
    }

    /* "../../bmi/sympy/DifferentialRing.pyx":264
 *             strnot = ascii (notation)
 *             if strnot != BMI_IX_Derivative and \
 *                not strnot.startswith (BMI_IX_jet) :             # <<<<<<<<<<<<<<
 *                 strnot = self.notation
 *         return strnot
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_strnot, __pyx_n_s_startswith); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 264, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyBytes_FromString(__pyx_v_19DifferentialAlgebra_BMI_IX_jet); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 264, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_7 = NULL;
    __pyx_t_6 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
        __pyx_t_6 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_t_5};
      __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6);
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 264, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 264, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_8 = (!__pyx_t_1);
    __pyx_t_2 = __pyx_t_8;
    __pyx_L5_bool_binop_done:;

    /* "../../bmi/sympy/DifferentialRing.pyx":263
 *         else :
 *             strnot = ascii (notation)
 *             if strnot != BMI_IX_Derivative and \             # <<<<<<<<<<<<<<
 *                not strnot.startswith (BMI_IX_jet) :
 *                 strnot = self.notation
 */
    if (__pyx_t_2) {

      /* "../../bmi/sympy/DifferentialRing.pyx":265
 *             if strnot != BMI_IX_Derivative and \
 *                not strnot.startswith (BMI_IX_jet) :
 *                 strnot = self.notation             # <<<<<<<<<<<<<<
 *         return strnot
 * 
 */
      __pyx_t_3 = __pyx_v_self->notation;
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_DECREF_SET(__pyx_v_strnot, __pyx_t_3);
      __pyx_t_3 = 0;

      /* "../../bmi/sympy/DifferentialRing.pyx":263
 *         else :
 *             strnot = ascii (notation)
 *             if strnot != BMI_IX_Derivative and \             # <<<<<<<<<<<<<<
 *                not strnot.startswith (BMI_IX_jet) :
 *                 strnot = self.notation
 */
    }
  }
  __pyx_L3:;

  /* "../../bmi/sympy/DifferentialRing.pyx":266
 *                not strnot.startswith (BMI_IX_jet) :
 *                 strnot = self.notation
 *         return strnot             # <<<<<<<<<<<<<<
 * 
 * # __listof_symbols
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_strnot);
  __pyx_r = __pyx_v_strnot;
  goto __pyx_L0;

  /* "../../bmi/sympy/DifferentialRing.pyx":257
 * 
 * # __process_notation
 *     def __process_notation (self, notation) :             # <<<<<<<<<<<<<<
 *         cdef strnot
 *         if not isinstance (notation, str) :
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("DifferentialAlgebra.DifferentialRing._DifferentialRing__process_notation", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_strnot);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "../../bmi/sympy/DifferentialRing.pyx":269
 * 
 * # __listof_symbols
 *     def __listof_symbols (self, expr, subrankings, pattern) :             # <<<<<<<<<<<<<<
 *         cdef L
 *         if expr is None :
 */

/* Python wrapper */
static PyObject *__pyx_pw_19DifferentialAlgebra_16DifferentialRing_3_DifferentialRing__listof_symbols(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_19DifferentialAlgebra_16DifferentialRing_3_DifferentialRing__listof_symbols = {"_DifferentialRing__listof_symbols", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_19DifferentialAlgebra_16DifferentialRing_3_DifferentialRing__listof_symbols, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_19DifferentialAlgebra_16DifferentialRing_3_DifferentialRing__listof_symbols(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_expr = 0;
  PyObject *__pyx_v_subrankings = 0;
  PyObject *__pyx_v_pattern = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[3] = {0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_DifferentialRing__listof_symbols (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_expr,&__pyx_n_s_subrankings,&__pyx_n_s_pattern,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_expr)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 269, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_subrankings)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 269, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("_DifferentialRing__listof_symbols", 1, 3, 3, 1); __PYX_ERR(0, 269, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pattern)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[2]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 269, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("_DifferentialRing__listof_symbols", 1, 3, 3, 2); __PYX_ERR(0, 269, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "_DifferentialRing__listof_symbols") < 0)) __PYX_ERR(0, 269, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 3)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
      values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
    }
    __pyx_v_expr = values[0];
    __pyx_v_subrankings = values[1];
    __pyx_v_pattern = values[2];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_DifferentialRing__listof_symbols", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 269, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("DifferentialAlgebra.DifferentialRing._DifferentialRing__listof_symbols", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_19DifferentialAlgebra_16DifferentialRing_2__listof_symbols(((struct __pyx_obj_19DifferentialAlgebra_DifferentialRing *)__pyx_v_self), __pyx_v_expr, __pyx_v_subrankings, __pyx_v_pattern);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_19DifferentialAlgebra_16DifferentialRing_2__listof_symbols(struct __pyx_obj_19DifferentialAlgebra_DifferentialRing *__pyx_v_self, PyObject *__pyx_v_expr, PyObject *__pyx_v_subrankings, PyObject *__pyx_v_pattern) {
  PyObject *__pyx_v_L = 0;
  PyObject *__pyx_8genexpr2__pyx_v_e = NULL;
  PyObject *__pyx_8genexpr3__pyx_v_f = NULL;
  PyObject *__pyx_8genexpr3__pyx_v_e = NULL;
  PyObject *__pyx_8genexpr4__pyx_v_z = NULL;
  PyObject *__pyx_8genexpr5__pyx_v_e = NULL;
  PyObject *__pyx_8genexpr6__pyx_v_f = NULL;
  PyObject *__pyx_8genexpr6__pyx_v_e = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  Py_ssize_t __pyx_t_5;
  PyObject *(*__pyx_t_6)(PyObject *);
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  unsigned int __pyx_t_9;
  Py_ssize_t __pyx_t_10;
  PyObject *(*__pyx_t_11)(PyObject *);
  int __pyx_t_12;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_DifferentialRing__listof_symbols", 1);

  /* "../../bmi/sympy/DifferentialRing.pyx":271
 *     def __listof_symbols (self, expr, subrankings, pattern) :
 *         cdef L
 *         if expr is None :             # <<<<<<<<<<<<<<
 *             return []
 *         elif isinstance (expr, sympy.core.function.UndefinedFunction) :
 */
  __pyx_t_1 = (__pyx_v_expr == Py_None);
  if (__pyx_t_1) {

    /* "../../bmi/sympy/DifferentialRing.pyx":272
 *         cdef L
 *         if expr is None :
 *             return []             # <<<<<<<<<<<<<<
 *         elif isinstance (expr, sympy.core.function.UndefinedFunction) :
 *             return [ expr ]
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 272, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "../../bmi/sympy/DifferentialRing.pyx":271
 *     def __listof_symbols (self, expr, subrankings, pattern) :
 *         cdef L
 *         if expr is None :             # <<<<<<<<<<<<<<
 *             return []
 *         elif isinstance (expr, sympy.core.function.UndefinedFunction) :
 */
  }

  /* "../../bmi/sympy/DifferentialRing.pyx":273
 *         if expr is None :
 *             return []
 *         elif isinstance (expr, sympy.core.function.UndefinedFunction) :             # <<<<<<<<<<<<<<
 *             return [ expr ]
 *         elif isinstance (expr, sympy.IndexedBase) :
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_sympy); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 273, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_core); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 273, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_function); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 273, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_UndefinedFunction); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 273, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_1 = PyObject_IsInstance(__pyx_v_expr, __pyx_t_3); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 273, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__pyx_t_1) {

    /* "../../bmi/sympy/DifferentialRing.pyx":274
 *             return []
 *         elif isinstance (expr, sympy.core.function.UndefinedFunction) :
 *             return [ expr ]             # <<<<<<<<<<<<<<
 *         elif isinstance (expr, sympy.IndexedBase) :
 *             return [ expr ]
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 274, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_v_expr);
    __Pyx_GIVEREF(__pyx_v_expr);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 0, __pyx_v_expr)) __PYX_ERR(0, 274, __pyx_L1_error);
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "../../bmi/sympy/DifferentialRing.pyx":273
 *         if expr is None :
 *             return []
 *         elif isinstance (expr, sympy.core.function.UndefinedFunction) :             # <<<<<<<<<<<<<<
 *             return [ expr ]
 *         elif isinstance (expr, sympy.IndexedBase) :
 */
  }

  /* "../../bmi/sympy/DifferentialRing.pyx":275
 *         elif isinstance (expr, sympy.core.function.UndefinedFunction) :
 *             return [ expr ]
 *         elif isinstance (expr, sympy.IndexedBase) :             # <<<<<<<<<<<<<<
 *             return [ expr ]
 *         elif isinstance (expr, sympy.tensor.indexed.Indexed) :
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_sympy); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 275, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_IndexedBase); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 275, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_1 = PyObject_IsInstance(__pyx_v_expr, __pyx_t_2); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 275, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_1) {

    /* "../../bmi/sympy/DifferentialRing.pyx":276
 *             return [ expr ]
 *         elif isinstance (expr, sympy.IndexedBase) :
 *             return [ expr ]             # <<<<<<<<<<<<<<
 *         elif isinstance (expr, sympy.tensor.indexed.Indexed) :
 *             if expr.base in subrankings :
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 276, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_v_expr);
    __Pyx_GIVEREF(__pyx_v_expr);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 0, __pyx_v_expr)) __PYX_ERR(0, 276, __pyx_L1_error);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "../../bmi/sympy/DifferentialRing.pyx":275
 *         elif isinstance (expr, sympy.core.function.UndefinedFunction) :
 *             return [ expr ]
 *         elif isinstance (expr, sympy.IndexedBase) :             # <<<<<<<<<<<<<<
 *             return [ expr ]
 *         elif isinstance (expr, sympy.tensor.indexed.Indexed) :
 */
  }

  /* "../../bmi/sympy/DifferentialRing.pyx":277
 *         elif isinstance (expr, sympy.IndexedBase) :
 *             return [ expr ]
 *         elif isinstance (expr, sympy.tensor.indexed.Indexed) :             # <<<<<<<<<<<<<<
 *             if expr.base in subrankings :
 *                 L = [ self.__listof_symbols (e, subrankings, pattern) \
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_sympy); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 277, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_tensor); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 277, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_indexed); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 277, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_Indexed); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 277, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_1 = PyObject_IsInstance(__pyx_v_expr, __pyx_t_3); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 277, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__pyx_t_1) {

    /* "../../bmi/sympy/DifferentialRing.pyx":278
 *             return [ expr ]
 *         elif isinstance (expr, sympy.tensor.indexed.Indexed) :
 *             if expr.base in subrankings :             # <<<<<<<<<<<<<<
 *                 L = [ self.__listof_symbols (e, subrankings, pattern) \
 *                                     for e in expr.indices ]
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_expr, __pyx_n_s_base); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 278, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = (__Pyx_PySequence_ContainsTF(__pyx_t_3, __pyx_v_subrankings, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 278, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (__pyx_t_1) {

      /* "../../bmi/sympy/DifferentialRing.pyx":279
 *         elif isinstance (expr, sympy.tensor.indexed.Indexed) :
 *             if expr.base in subrankings :
 *                 L = [ self.__listof_symbols (e, subrankings, pattern) \             # <<<<<<<<<<<<<<
 *                                     for e in expr.indices ]
 *                 return [ e for f in L for e in f ]
 */
      { /* enter inner scope */
        __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 279, __pyx_L7_error)
        __Pyx_GOTREF(__pyx_t_3);

        /* "../../bmi/sympy/DifferentialRing.pyx":280
 *             if expr.base in subrankings :
 *                 L = [ self.__listof_symbols (e, subrankings, pattern) \
 *                                     for e in expr.indices ]             # <<<<<<<<<<<<<<
 *                 return [ e for f in L for e in f ]
 *             else :
 */
        __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_expr, __pyx_n_s_indices); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 280, __pyx_L7_error)
        __Pyx_GOTREF(__pyx_t_2);
        if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) {
          __pyx_t_4 = __pyx_t_2; __Pyx_INCREF(__pyx_t_4);
          __pyx_t_5 = 0;
          __pyx_t_6 = NULL;
        } else {
          __pyx_t_5 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 280, __pyx_L7_error)
          __Pyx_GOTREF(__pyx_t_4);
          __pyx_t_6 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 280, __pyx_L7_error)
        }
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        for (;;) {
          if (likely(!__pyx_t_6)) {
            if (likely(PyList_CheckExact(__pyx_t_4))) {
              {
                Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_4);
                #if !CYTHON_ASSUME_SAFE_MACROS
                if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 280, __pyx_L7_error)
                #endif
                if (__pyx_t_5 >= __pyx_temp) break;
              }
              #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
              __pyx_t_2 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_2); __pyx_t_5++; if (unlikely((0 < 0))) __PYX_ERR(0, 280, __pyx_L7_error)
              #else
              __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 280, __pyx_L7_error)
              __Pyx_GOTREF(__pyx_t_2);
              #endif
            } else {
              {
                Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_4);
                #if !CYTHON_ASSUME_SAFE_MACROS
                if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 280, __pyx_L7_error)
                #endif
                if (__pyx_t_5 >= __pyx_temp) break;
              }
              #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
              __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_2); __pyx_t_5++; if (unlikely((0 < 0))) __PYX_ERR(0, 280, __pyx_L7_error)
              #else
              __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 280, __pyx_L7_error)
              __Pyx_GOTREF(__pyx_t_2);
              #endif
            }
          } else {
            __pyx_t_2 = __pyx_t_6(__pyx_t_4);
            if (unlikely(!__pyx_t_2)) {
              PyObject* exc_type = PyErr_Occurred();
              if (exc_type) {
                if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
                else __PYX_ERR(0, 280, __pyx_L7_error)
              }
              break;
            }
            __Pyx_GOTREF(__pyx_t_2);
          }
          __Pyx_XDECREF_SET(__pyx_8genexpr2__pyx_v_e, __pyx_t_2);
          __pyx_t_2 = 0;

          /* "../../bmi/sympy/DifferentialRing.pyx":279
 *         elif isinstance (expr, sympy.tensor.indexed.Indexed) :
 *             if expr.base in subrankings :
 *                 L = [ self.__listof_symbols (e, subrankings, pattern) \             # <<<<<<<<<<<<<<
 *                                     for e in expr.indices ]
 *                 return [ e for f in L for e in f ]
 */
          __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_DifferentialRing__listof_symbol); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 279, __pyx_L7_error)
          __Pyx_GOTREF(__pyx_t_7);
          __pyx_t_8 = NULL;
          __pyx_t_9 = 0;
          #if CYTHON_UNPACK_METHODS
          if (likely(PyMethod_Check(__pyx_t_7))) {
            __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
            if (likely(__pyx_t_8)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
              __Pyx_INCREF(__pyx_t_8);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_7, function);
              __pyx_t_9 = 1;
            }
          }
          #endif
          {
            PyObject *__pyx_callargs[4] = {__pyx_t_8, __pyx_8genexpr2__pyx_v_e, __pyx_v_subrankings, __pyx_v_pattern};
            __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_9, 3+__pyx_t_9);
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 279, __pyx_L7_error)
            __Pyx_GOTREF(__pyx_t_2);
            __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          }
          if (unlikely(__Pyx_ListComp_Append(__pyx_t_3, (PyObject*)__pyx_t_2))) __PYX_ERR(0, 279, __pyx_L7_error)
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

          /* "../../bmi/sympy/DifferentialRing.pyx":280
 *             if expr.base in subrankings :
 *                 L = [ self.__listof_symbols (e, subrankings, pattern) \
 *                                     for e in expr.indices ]             # <<<<<<<<<<<<<<
 *                 return [ e for f in L for e in f ]
 *             else :
 */
        }
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_XDECREF(__pyx_8genexpr2__pyx_v_e); __pyx_8genexpr2__pyx_v_e = 0;
        goto __pyx_L11_exit_scope;
        __pyx_L7_error:;
        __Pyx_XDECREF(__pyx_8genexpr2__pyx_v_e); __pyx_8genexpr2__pyx_v_e = 0;
        goto __pyx_L1_error;
        __pyx_L11_exit_scope:;
      } /* exit inner scope */
      __pyx_v_L = __pyx_t_3;
      __pyx_t_3 = 0;

      /* "../../bmi/sympy/DifferentialRing.pyx":281
 *                 L = [ self.__listof_symbols (e, subrankings, pattern) \
 *                                     for e in expr.indices ]
 *                 return [ e for f in L for e in f ]             # <<<<<<<<<<<<<<
 *             else :
 *                 return [expr.base, expr]
 */
      __Pyx_XDECREF(__pyx_r);
      { /* enter inner scope */
        __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 281, __pyx_L14_error)
        __Pyx_GOTREF(__pyx_t_3);
        if (likely(PyList_CheckExact(__pyx_v_L)) || PyTuple_CheckExact(__pyx_v_L)) {
          __pyx_t_4 = __pyx_v_L; __Pyx_INCREF(__pyx_t_4);
          __pyx_t_5 = 0;
          __pyx_t_6 = NULL;
        } else {
          __pyx_t_5 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_v_L); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 281, __pyx_L14_error)
          __Pyx_GOTREF(__pyx_t_4);
          __pyx_t_6 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 281, __pyx_L14_error)
        }
        for (;;) {
          if (likely(!__pyx_t_6)) {
            if (likely(PyList_CheckExact(__pyx_t_4))) {
              {
                Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_4);
                #if !CYTHON_ASSUME_SAFE_MACROS
                if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 281, __pyx_L14_error)
                #endif
                if (__pyx_t_5 >= __pyx_temp) break;
              }
              #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
              __pyx_t_2 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_2); __pyx_t_5++; if (unlikely((0 < 0))) __PYX_ERR(0, 281, __pyx_L14_error)
              #else
              __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 281, __pyx_L14_error)
              __Pyx_GOTREF(__pyx_t_2);
              #endif
            } else {
              {
                Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_4);
                #if !CYTHON_ASSUME_SAFE_MACROS
                if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 281, __pyx_L14_error)
                #endif
                if (__pyx_t_5 >= __pyx_temp) break;
              }
              #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
              __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_2); __pyx_t_5++; if (unlikely((0 < 0))) __PYX_ERR(0, 281, __pyx_L14_error)
              #else
              __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 281, __pyx_L14_error)
              __Pyx_GOTREF(__pyx_t_2);
              #endif
            }
          } else {
            __pyx_t_2 = __pyx_t_6(__pyx_t_4);
            if (unlikely(!__pyx_t_2)) {
              PyObject* exc_type = PyErr_Occurred();
              if (exc_type) {
                if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
                else __PYX_ERR(0, 281, __pyx_L14_error)
              }
              break;
            }
            __Pyx_GOTREF(__pyx_t_2);
          }
          __Pyx_XDECREF_SET(__pyx_8genexpr3__pyx_v_f, __pyx_t_2);
          __pyx_t_2 = 0;
          if (likely(PyList_CheckExact(__pyx_8genexpr3__pyx_v_f)) || PyTuple_CheckExact(__pyx_8genexpr3__pyx_v_f)) {
            __pyx_t_2 = __pyx_8genexpr3__pyx_v_f; __Pyx_INCREF(__pyx_t_2);
            __pyx_t_10 = 0;
            __pyx_t_11 = NULL;
          } else {
            __pyx_t_10 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_8genexpr3__pyx_v_f); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 281, __pyx_L14_error)
            __Pyx_GOTREF(__pyx_t_2);
            __pyx_t_11 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 281, __pyx_L14_error)
          }
          for (;;) {
            if (likely(!__pyx_t_11)) {
              if (likely(PyList_CheckExact(__pyx_t_2))) {
                {
                  Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_2);
                  #if !CYTHON_ASSUME_SAFE_MACROS
                  if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 281, __pyx_L14_error)
                  #endif
                  if (__pyx_t_10 >= __pyx_temp) break;
                }
                #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                __pyx_t_7 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_10); __Pyx_INCREF(__pyx_t_7); __pyx_t_10++; if (unlikely((0 < 0))) __PYX_ERR(0, 281, __pyx_L14_error)
                #else
                __pyx_t_7 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 281, __pyx_L14_error)
                __Pyx_GOTREF(__pyx_t_7);
                #endif
              } else {
                {
                  Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_2);
                  #if !CYTHON_ASSUME_SAFE_MACROS
                  if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 281, __pyx_L14_error)
                  #endif
                  if (__pyx_t_10 >= __pyx_temp) break;
                }
                #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_10); __Pyx_INCREF(__pyx_t_7); __pyx_t_10++; if (unlikely((0 < 0))) __PYX_ERR(0, 281, __pyx_L14_error)
                #else
                __pyx_t_7 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 281, __pyx_L14_error)
                __Pyx_GOTREF(__pyx_t_7);
                #endif
              }
            } else {
              __pyx_t_7 = __pyx_t_11(__pyx_t_2);
              if (unlikely(!__pyx_t_7)) {
                PyObject* exc_type = PyErr_Occurred();
                if (exc_type) {
                  if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
                  else __PYX_ERR(0, 281, __pyx_L14_error)
                }
                break;
              }
              __Pyx_GOTREF(__pyx_t_7);
            }
            __Pyx_XDECREF_SET(__pyx_8genexpr3__pyx_v_e, __pyx_t_7);
            __pyx_t_7 = 0;
            if (unlikely(__Pyx_ListComp_Append(__pyx_t_3, (PyObject*)__pyx_8genexpr3__pyx_v_e))) __PYX_ERR(0, 281, __pyx_L14_error)
          }
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        }
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_XDECREF(__pyx_8genexpr3__pyx_v_e); __pyx_8genexpr3__pyx_v_e = 0;
        __Pyx_XDECREF(__pyx_8genexpr3__pyx_v_f); __pyx_8genexpr3__pyx_v_f = 0;
        goto __pyx_L21_exit_scope;
        __pyx_L14_error:;
        __Pyx_XDECREF(__pyx_8genexpr3__pyx_v_e); __pyx_8genexpr3__pyx_v_e = 0;
        __Pyx_XDECREF(__pyx_8genexpr3__pyx_v_f); __pyx_8genexpr3__pyx_v_f = 0;
        goto __pyx_L1_error;
        __pyx_L21_exit_scope:;
      } /* exit inner scope */
      __pyx_r = __pyx_t_3;
      __pyx_t_3 = 0;
      goto __pyx_L0;

      /* "../../bmi/sympy/DifferentialRing.pyx":278
 *             return [ expr ]
 *         elif isinstance (expr, sympy.tensor.indexed.Indexed) :
 *             if expr.base in subrankings :             # <<<<<<<<<<<<<<
 *                 L = [ self.__listof_symbols (e, subrankings, pattern) \
 *                                     for e in expr.indices ]
 */
    }

    /* "../../bmi/sympy/DifferentialRing.pyx":283
 *                 return [ e for f in L for e in f ]
 *             else :
 *                 return [expr.base, expr]             # <<<<<<<<<<<<<<
 *         elif isinstance (expr, str) :
 *             L = pattern.match (expr)
 */
    /*else*/ {
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_expr, __pyx_n_s_base); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 283, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = PyList_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 283, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GIVEREF(__pyx_t_3);
      if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 0, __pyx_t_3)) __PYX_ERR(0, 283, __pyx_L1_error);
      __Pyx_INCREF(__pyx_v_expr);
      __Pyx_GIVEREF(__pyx_v_expr);
      if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 1, __pyx_v_expr)) __PYX_ERR(0, 283, __pyx_L1_error);
      __pyx_t_3 = 0;
      __pyx_r = __pyx_t_4;
      __pyx_t_4 = 0;
      goto __pyx_L0;
    }

    /* "../../bmi/sympy/DifferentialRing.pyx":277
 *         elif isinstance (expr, sympy.IndexedBase) :
 *             return [ expr ]
 *         elif isinstance (expr, sympy.tensor.indexed.Indexed) :             # <<<<<<<<<<<<<<
 *             if expr.base in subrankings :
 *                 L = [ self.__listof_symbols (e, subrankings, pattern) \
 */
  }

  /* "../../bmi/sympy/DifferentialRing.pyx":284
 *             else :
 *                 return [expr.base, expr]
 *         elif isinstance (expr, str) :             # <<<<<<<<<<<<<<
 *             L = pattern.match (expr)
 *             if L is None or len (L.groups()) == 0 :
 */
  __pyx_t_1 = PyUnicode_Check(__pyx_v_expr); 
  if (__pyx_t_1) {

    /* "../../bmi/sympy/DifferentialRing.pyx":285
 *                 return [expr.base, expr]
 *         elif isinstance (expr, str) :
 *             L = pattern.match (expr)             # <<<<<<<<<<<<<<
 *             if L is None or len (L.groups()) == 0 :
 *                 return [ expr ]
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_pattern, __pyx_n_s_match); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 285, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = NULL;
    __pyx_t_9 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_2)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_2);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
        __pyx_t_9 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_expr};
      __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_9, 1+__pyx_t_9);
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 285, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
    __pyx_v_L = __pyx_t_4;
    __pyx_t_4 = 0;

    /* "../../bmi/sympy/DifferentialRing.pyx":286
 *         elif isinstance (expr, str) :
 *             L = pattern.match (expr)
 *             if L is None or len (L.groups()) == 0 :             # <<<<<<<<<<<<<<
 *                 return [ expr ]
 *             else :
 */
    __pyx_t_12 = (__pyx_v_L == Py_None);
    if (!__pyx_t_12) {
    } else {
      __pyx_t_1 = __pyx_t_12;
      goto __pyx_L23_bool_binop_done;
    }
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_L, __pyx_n_s_groups); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 286, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = NULL;
    __pyx_t_9 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_2)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_2);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
        __pyx_t_9 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
      __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_9, 0+__pyx_t_9);
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 286, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
    __pyx_t_5 = PyObject_Length(__pyx_t_4); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 286, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_12 = (__pyx_t_5 == 0);
    __pyx_t_1 = __pyx_t_12;
    __pyx_L23_bool_binop_done:;
    if (__pyx_t_1) {

      /* "../../bmi/sympy/DifferentialRing.pyx":287
 *             L = pattern.match (expr)
 *             if L is None or len (L.groups()) == 0 :
 *                 return [ expr ]             # <<<<<<<<<<<<<<
 *             else :
 * # expr = y[range(0..oo)] | (y,z)[range(oo..0)] | ...
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 287, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_INCREF(__pyx_v_expr);
      __Pyx_GIVEREF(__pyx_v_expr);
      if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 0, __pyx_v_expr)) __PYX_ERR(0, 287, __pyx_L1_error);
      __pyx_r = __pyx_t_4;
      __pyx_t_4 = 0;
      goto __pyx_L0;

      /* "../../bmi/sympy/DifferentialRing.pyx":286
 *         elif isinstance (expr, str) :
 *             L = pattern.match (expr)
 *             if L is None or len (L.groups()) == 0 :             # <<<<<<<<<<<<<<
 *                 return [ expr ]
 *             else :
 */
    }

    /* "../../bmi/sympy/DifferentialRing.pyx":290
 *             else :
 * # expr = y[range(0..oo)] | (y,z)[range(oo..0)] | ...
 *                 L = re.split (r'[, ]+', L.groups()[0])             # <<<<<<<<<<<<<<
 *                 return [ sympy.IndexedBase(z) for z in L ]
 *         elif hasattr (expr, '__iter__') :
 */
    /*else*/ {
      __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_re); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 290, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_split); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 290, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_L, __pyx_n_s_groups); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 290, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_8 = NULL;
      __pyx_t_9 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_7))) {
        __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
        if (likely(__pyx_t_8)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
          __Pyx_INCREF(__pyx_t_8);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_7, function);
          __pyx_t_9 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_8, NULL};
        __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_9, 0+__pyx_t_9);
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 290, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      }
      __pyx_t_7 = __Pyx_GetItemInt(__pyx_t_3, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 290, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = NULL;
      __pyx_t_9 = 0;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_2))) {
        __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
        if (likely(__pyx_t_3)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_2, function);
          __pyx_t_9 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_kp_u_, __pyx_t_7};
        __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_9, 2+__pyx_t_9);
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 290, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      }
      __Pyx_DECREF_SET(__pyx_v_L, __pyx_t_4);
      __pyx_t_4 = 0;

      /* "../../bmi/sympy/DifferentialRing.pyx":291
 * # expr = y[range(0..oo)] | (y,z)[range(oo..0)] | ...
 *                 L = re.split (r'[, ]+', L.groups()[0])
 *                 return [ sympy.IndexedBase(z) for z in L ]             # <<<<<<<<<<<<<<
 *         elif hasattr (expr, '__iter__') :
 *             L = [ self.__listof_symbols (e, subrankings, pattern) \
 */
      __Pyx_XDECREF(__pyx_r);
      { /* enter inner scope */
        __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 291, __pyx_L27_error)
        __Pyx_GOTREF(__pyx_t_4);
        if (likely(PyList_CheckExact(__pyx_v_L)) || PyTuple_CheckExact(__pyx_v_L)) {
          __pyx_t_2 = __pyx_v_L; __Pyx_INCREF(__pyx_t_2);
          __pyx_t_5 = 0;
          __pyx_t_6 = NULL;
        } else {
          __pyx_t_5 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_L); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 291, __pyx_L27_error)
          __Pyx_GOTREF(__pyx_t_2);
          __pyx_t_6 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 291, __pyx_L27_error)
        }
        for (;;) {
          if (likely(!__pyx_t_6)) {
            if (likely(PyList_CheckExact(__pyx_t_2))) {
              {
                Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_2);
                #if !CYTHON_ASSUME_SAFE_MACROS
                if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 291, __pyx_L27_error)
                #endif
                if (__pyx_t_5 >= __pyx_temp) break;
              }
              #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
              __pyx_t_7 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_5); __Pyx_INCREF(__pyx_t_7); __pyx_t_5++; if (unlikely((0 < 0))) __PYX_ERR(0, 291, __pyx_L27_error)
              #else
              __pyx_t_7 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 291, __pyx_L27_error)
              __Pyx_GOTREF(__pyx_t_7);
              #endif
            } else {
              {
                Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_2);
                #if !CYTHON_ASSUME_SAFE_MACROS
                if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 291, __pyx_L27_error)
                #endif
                if (__pyx_t_5 >= __pyx_temp) break;
              }
              #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
              __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_5); __Pyx_INCREF(__pyx_t_7); __pyx_t_5++; if (unlikely((0 < 0))) __PYX_ERR(0, 291, __pyx_L27_error)
              #else
              __pyx_t_7 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 291, __pyx_L27_error)
              __Pyx_GOTREF(__pyx_t_7);
              #endif
            }
          } else {
            __pyx_t_7 = __pyx_t_6(__pyx_t_2);
            if (unlikely(!__pyx_t_7)) {
              PyObject* exc_type = PyErr_Occurred();
              if (exc_type) {
                if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
                else __PYX_ERR(0, 291, __pyx_L27_error)
              }
              break;
            }
            __Pyx_GOTREF(__pyx_t_7);
          }
          __Pyx_XDECREF_SET(__pyx_8genexpr4__pyx_v_z, __pyx_t_7);
          __pyx_t_7 = 0;
          __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_sympy); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 291, __pyx_L27_error)
          __Pyx_GOTREF(__pyx_t_3);
          __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_IndexedBase); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 291, __pyx_L27_error)
          __Pyx_GOTREF(__pyx_t_8);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __pyx_t_3 = NULL;
          __pyx_t_9 = 0;
          #if CYTHON_UNPACK_METHODS
          if (unlikely(PyMethod_Check(__pyx_t_8))) {
            __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_8);
            if (likely(__pyx_t_3)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
              __Pyx_INCREF(__pyx_t_3);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_8, function);
              __pyx_t_9 = 1;
            }
          }
          #endif
          {
            PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_8genexpr4__pyx_v_z};
            __pyx_t_7 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+1-__pyx_t_9, 1+__pyx_t_9);
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 291, __pyx_L27_error)
            __Pyx_GOTREF(__pyx_t_7);
            __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          }
          if (unlikely(__Pyx_ListComp_Append(__pyx_t_4, (PyObject*)__pyx_t_7))) __PYX_ERR(0, 291, __pyx_L27_error)
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        }
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_XDECREF(__pyx_8genexpr4__pyx_v_z); __pyx_8genexpr4__pyx_v_z = 0;
        goto __pyx_L31_exit_scope;
        __pyx_L27_error:;
        __Pyx_XDECREF(__pyx_8genexpr4__pyx_v_z); __pyx_8genexpr4__pyx_v_z = 0;
        goto __pyx_L1_error;
        __pyx_L31_exit_scope:;
      } /* exit inner scope */
      __pyx_r = __pyx_t_4;
      __pyx_t_4 = 0;
      goto __pyx_L0;
    }

    /* "../../bmi/sympy/DifferentialRing.pyx":284
 *             else :
 *                 return [expr.base, expr]
 *         elif isinstance (expr, str) :             # <<<<<<<<<<<<<<
 *             L = pattern.match (expr)
 *             if L is None or len (L.groups()) == 0 :
 */
  }

  /* "../../bmi/sympy/DifferentialRing.pyx":292
 *                 L = re.split (r'[, ]+', L.groups()[0])
 *                 return [ sympy.IndexedBase(z) for z in L ]
 *         elif hasattr (expr, '__iter__') :             # <<<<<<<<<<<<<<
 *             L = [ self.__listof_symbols (e, subrankings, pattern) \
 *                                     for e in expr ]
 */
  __pyx_t_1 = __Pyx_HasAttr(__pyx_v_expr, __pyx_n_u_iter); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 292, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "../../bmi/sympy/DifferentialRing.pyx":293
 *                 return [ sympy.IndexedBase(z) for z in L ]
 *         elif hasattr (expr, '__iter__') :
 *             L = [ self.__listof_symbols (e, subrankings, pattern) \             # <<<<<<<<<<<<<<
 *                                     for e in expr ]
 *             return [ e for f in L for e in f ]
 */
    { /* enter inner scope */
      __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 293, __pyx_L34_error)
      __Pyx_GOTREF(__pyx_t_4);

      /* "../../bmi/sympy/DifferentialRing.pyx":294
 *         elif hasattr (expr, '__iter__') :
 *             L = [ self.__listof_symbols (e, subrankings, pattern) \
 *                                     for e in expr ]             # <<<<<<<<<<<<<<
 *             return [ e for f in L for e in f ]
 *         else :
 */
      if (likely(PyList_CheckExact(__pyx_v_expr)) || PyTuple_CheckExact(__pyx_v_expr)) {
        __pyx_t_2 = __pyx_v_expr; __Pyx_INCREF(__pyx_t_2);
        __pyx_t_5 = 0;
        __pyx_t_6 = NULL;
      } else {
        __pyx_t_5 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_expr); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 294, __pyx_L34_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_6 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 294, __pyx_L34_error)
      }
      for (;;) {
        if (likely(!__pyx_t_6)) {
          if (likely(PyList_CheckExact(__pyx_t_2))) {
            {
              Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_2);
              #if !CYTHON_ASSUME_SAFE_MACROS
              if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 294, __pyx_L34_error)
              #endif
              if (__pyx_t_5 >= __pyx_temp) break;
            }
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_7 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_5); __Pyx_INCREF(__pyx_t_7); __pyx_t_5++; if (unlikely((0 < 0))) __PYX_ERR(0, 294, __pyx_L34_error)
            #else
            __pyx_t_7 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 294, __pyx_L34_error)
            __Pyx_GOTREF(__pyx_t_7);
            #endif
          } else {
            {
              Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_2);
              #if !CYTHON_ASSUME_SAFE_MACROS
              if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 294, __pyx_L34_error)
              #endif
              if (__pyx_t_5 >= __pyx_temp) break;
            }
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_5); __Pyx_INCREF(__pyx_t_7); __pyx_t_5++; if (unlikely((0 < 0))) __PYX_ERR(0, 294, __pyx_L34_error)
            #else
            __pyx_t_7 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 294, __pyx_L34_error)
            __Pyx_GOTREF(__pyx_t_7);
            #endif
          }
        } else {
          __pyx_t_7 = __pyx_t_6(__pyx_t_2);
          if (unlikely(!__pyx_t_7)) {
            PyObject* exc_type = PyErr_Occurred();
            if (exc_type) {
              if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
              else __PYX_ERR(0, 294, __pyx_L34_error)
            }
            break;
          }
          __Pyx_GOTREF(__pyx_t_7);
        }
        __Pyx_XDECREF_SET(__pyx_8genexpr5__pyx_v_e, __pyx_t_7);
        __pyx_t_7 = 0;

        /* "../../bmi/sympy/DifferentialRing.pyx":293
 *                 return [ sympy.IndexedBase(z) for z in L ]
 *         elif hasattr (expr, '__iter__') :
 *             L = [ self.__listof_symbols (e, subrankings, pattern) \             # <<<<<<<<<<<<<<
 *                                     for e in expr ]
 *             return [ e for f in L for e in f ]
 */
        __pyx_t_8 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_DifferentialRing__listof_symbol); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 293, __pyx_L34_error)
        __Pyx_GOTREF(__pyx_t_8);
        __pyx_t_3 = NULL;
        __pyx_t_9 = 0;
        #if CYTHON_UNPACK_METHODS
        if (likely(PyMethod_Check(__pyx_t_8))) {
          __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_8);
          if (likely(__pyx_t_3)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
            __Pyx_INCREF(__pyx_t_3);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_8, function);
            __pyx_t_9 = 1;
          }
        }
        #endif
        {
          PyObject *__pyx_callargs[4] = {__pyx_t_3, __pyx_8genexpr5__pyx_v_e, __pyx_v_subrankings, __pyx_v_pattern};
          __pyx_t_7 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+1-__pyx_t_9, 3+__pyx_t_9);
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 293, __pyx_L34_error)
          __Pyx_GOTREF(__pyx_t_7);
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        }
        if (unlikely(__Pyx_ListComp_Append(__pyx_t_4, (PyObject*)__pyx_t_7))) __PYX_ERR(0, 293, __pyx_L34_error)
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

        /* "../../bmi/sympy/DifferentialRing.pyx":294
 *         elif hasattr (expr, '__iter__') :
 *             L = [ self.__listof_symbols (e, subrankings, pattern) \
 *                                     for e in expr ]             # <<<<<<<<<<<<<<
 *             return [ e for f in L for e in f ]
 *         else :
 */
      }
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_XDECREF(__pyx_8genexpr5__pyx_v_e); __pyx_8genexpr5__pyx_v_e = 0;
      goto __pyx_L38_exit_scope;
      __pyx_L34_error:;
      __Pyx_XDECREF(__pyx_8genexpr5__pyx_v_e); __pyx_8genexpr5__pyx_v_e = 0;
      goto __pyx_L1_error;
      __pyx_L38_exit_scope:;
    } /* exit inner scope */
    __pyx_v_L = __pyx_t_4;
    __pyx_t_4 = 0;

    /* "../../bmi/sympy/DifferentialRing.pyx":295
 *             L = [ self.__listof_symbols (e, subrankings, pattern) \
 *                                     for e in expr ]
 *             return [ e for f in L for e in f ]             # <<<<<<<<<<<<<<
 *         else :
 *             return [expr]
 */
    __Pyx_XDECREF(__pyx_r);
    { /* enter inner scope */
      __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 295, __pyx_L41_error)
      __Pyx_GOTREF(__pyx_t_4);
      if (likely(PyList_CheckExact(__pyx_v_L)) || PyTuple_CheckExact(__pyx_v_L)) {
        __pyx_t_2 = __pyx_v_L; __Pyx_INCREF(__pyx_t_2);
        __pyx_t_5 = 0;
        __pyx_t_6 = NULL;
      } else {
        __pyx_t_5 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_L); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 295, __pyx_L41_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_6 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 295, __pyx_L41_error)
      }
      for (;;) {
        if (likely(!__pyx_t_6)) {
          if (likely(PyList_CheckExact(__pyx_t_2))) {
            {
              Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_2);
              #if !CYTHON_ASSUME_SAFE_MACROS
              if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 295, __pyx_L41_error)
              #endif
              if (__pyx_t_5 >= __pyx_temp) break;
            }
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_7 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_5); __Pyx_INCREF(__pyx_t_7); __pyx_t_5++; if (unlikely((0 < 0))) __PYX_ERR(0, 295, __pyx_L41_error)
            #else
            __pyx_t_7 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 295, __pyx_L41_error)
            __Pyx_GOTREF(__pyx_t_7);
            #endif
          } else {
            {
              Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_2);
              #if !CYTHON_ASSUME_SAFE_MACROS
              if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 295, __pyx_L41_error)
              #endif
              if (__pyx_t_5 >= __pyx_temp) break;
            }
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_5); __Pyx_INCREF(__pyx_t_7); __pyx_t_5++; if (unlikely((0 < 0))) __PYX_ERR(0, 295, __pyx_L41_error)
            #else
            __pyx_t_7 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 295, __pyx_L41_error)
            __Pyx_GOTREF(__pyx_t_7);
            #endif
          }
        } else {
          __pyx_t_7 = __pyx_t_6(__pyx_t_2);
          if (unlikely(!__pyx_t_7)) {
            PyObject* exc_type = PyErr_Occurred();
            if (exc_type) {
              if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
              else __PYX_ERR(0, 295, __pyx_L41_error)
            }
            break;
          }
          __Pyx_GOTREF(__pyx_t_7);
        }
        __Pyx_XDECREF_SET(__pyx_8genexpr6__pyx_v_f, __pyx_t_7);
        __pyx_t_7 = 0;
        if (likely(PyList_CheckExact(__pyx_8genexpr6__pyx_v_f)) || PyTuple_CheckExact(__pyx_8genexpr6__pyx_v_f)) {
          __pyx_t_7 = __pyx_8genexpr6__pyx_v_f; __Pyx_INCREF(__pyx_t_7);
          __pyx_t_10 = 0;
          __pyx_t_11 = NULL;
        } else {
          __pyx_t_10 = -1; __pyx_t_7 = PyObject_GetIter(__pyx_8genexpr6__pyx_v_f); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 295, __pyx_L41_error)
          __Pyx_GOTREF(__pyx_t_7);
          __pyx_t_11 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_7); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 295, __pyx_L41_error)
        }
        for (;;) {
          if (likely(!__pyx_t_11)) {
            if (likely(PyList_CheckExact(__pyx_t_7))) {
              {
                Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_7);
                #if !CYTHON_ASSUME_SAFE_MACROS
                if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 295, __pyx_L41_error)
                #endif
                if (__pyx_t_10 >= __pyx_temp) break;
              }
              #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
              __pyx_t_8 = PyList_GET_ITEM(__pyx_t_7, __pyx_t_10); __Pyx_INCREF(__pyx_t_8); __pyx_t_10++; if (unlikely((0 < 0))) __PYX_ERR(0, 295, __pyx_L41_error)
              #else
              __pyx_t_8 = __Pyx_PySequence_ITEM(__pyx_t_7, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 295, __pyx_L41_error)
              __Pyx_GOTREF(__pyx_t_8);
              #endif
            } else {
              {
                Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_7);
                #if !CYTHON_ASSUME_SAFE_MACROS
                if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 295, __pyx_L41_error)
                #endif
                if (__pyx_t_10 >= __pyx_temp) break;
              }
              #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
              __pyx_t_8 = PyTuple_GET_ITEM(__pyx_t_7, __pyx_t_10); __Pyx_INCREF(__pyx_t_8); __pyx_t_10++; if (unlikely((0 < 0))) __PYX_ERR(0, 295, __pyx_L41_error)
              #else
              __pyx_t_8 = __Pyx_PySequence_ITEM(__pyx_t_7, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 295, __pyx_L41_error)
              __Pyx_GOTREF(__pyx_t_8);
              #endif
            }
          } else {
            __pyx_t_8 = __pyx_t_11(__pyx_t_7);
            if (unlikely(!__pyx_t_8)) {
              PyObject* exc_type = PyErr_Occurred();
              if (exc_type) {
                if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
                else __PYX_ERR(0, 295, __pyx_L41_error)
              }
              break;
            }
            __Pyx_GOTREF(__pyx_t_8);
          }
          __Pyx_XDECREF_SET(__pyx_8genexpr6__pyx_v_e, __pyx_t_8);
          __pyx_t_8 = 0;
          if (unlikely(__Pyx_ListComp_Append(__pyx_t_4, (PyObject*)__pyx_8genexpr6__pyx_v_e))) __PYX_ERR(0, 295, __pyx_L41_error)
        }
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      }
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_XDECREF(__pyx_8genexpr6__pyx_v_e); __pyx_8genexpr6__pyx_v_e = 0;
      __Pyx_XDECREF(__pyx_8genexpr6__pyx_v_f); __pyx_8genexpr6__pyx_v_f = 0;
      goto __pyx_L48_exit_scope;
      __pyx_L41_error:;
      __Pyx_XDECREF(__pyx_8genexpr6__pyx_v_e); __pyx_8genexpr6__pyx_v_e = 0;
      __Pyx_XDECREF(__pyx_8genexpr6__pyx_v_f); __pyx_8genexpr6__pyx_v_f = 0;
      goto __pyx_L1_error;
      __pyx_L48_exit_scope:;
    } /* exit inner scope */
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L0;

    /* "../../bmi/sympy/DifferentialRing.pyx":292
 *                 L = re.split (r'[, ]+', L.groups()[0])
 *                 return [ sympy.IndexedBase(z) for z in L ]
 *         elif hasattr (expr, '__iter__') :             # <<<<<<<<<<<<<<
 *             L = [ self.__listof_symbols (e, subrankings, pattern) \
 *                                     for e in expr ]
 */
  }

  /* "../../bmi/sympy/DifferentialRing.pyx":297
 *             return [ e for f in L for e in f ]
 *         else :
 *             return [expr]             # <<<<<<<<<<<<<<
 * 
 * # __init__
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 297, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_INCREF(__pyx_v_expr);
    __Pyx_GIVEREF(__pyx_v_expr);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 0, __pyx_v_expr)) __PYX_ERR(0, 297, __pyx_L1_error);
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L0;
  }

  /* "../../bmi/sympy/DifferentialRing.pyx":269
 * 
 * # __listof_symbols
 *     def __listof_symbols (self, expr, subrankings, pattern) :             # <<<<<<<<<<<<<<
 *         cdef L
 *         if expr is None :
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("DifferentialAlgebra.DifferentialRing._DifferentialRing__listof_symbols", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_L);
  __Pyx_XDECREF(__pyx_8genexpr2__pyx_v_e);
  __Pyx_XDECREF(__pyx_8genexpr3__pyx_v_f);
  __Pyx_XDECREF(__pyx_8genexpr3__pyx_v_e);
  __Pyx_XDECREF(__pyx_8genexpr4__pyx_v_z);
  __Pyx_XDECREF(__pyx_8genexpr5__pyx_v_e);
  __Pyx_XDECREF(__pyx_8genexpr6__pyx_v_f);
  __Pyx_XDECREF(__pyx_8genexpr6__pyx_v_e);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "../../bmi/sympy/DifferentialRing.pyx":300
 * 
 * # __init__
 *     def __init__ (             # <<<<<<<<<<<<<<
 *                 self,
 *                 list derivations = [],
 */

/* Python wrapper */
static int __pyx_pw_19DifferentialAlgebra_16DifferentialRing_5__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
PyDoc_STRVAR(__pyx_doc_19DifferentialAlgebra_16DifferentialRing_4__init__, "\n        Constructor of DifferentialRing\n\n        INPUT:\n\n            `derivations` -- a list of variables\n            `blocks`      -- a list of blocks, each block being \n                               either a dependent variable or, a list \n                               of dependent variables\n            `parameters`  -- a list of dependent variables, with \n                               dependencies\n            `notation`    -- (default: 'undefined') a string\n\n        OUTPUT:\n\n            A data structure describing a differential polynomial ring\n            endowed with a ranking.\n\n            See the class help page for more details.\n        ");
#if CYTHON_UPDATE_DESCRIPTOR_DOC
struct wrapperbase __pyx_wrapperbase_19DifferentialAlgebra_16DifferentialRing_4__init__;
#endif
static int __pyx_pw_19DifferentialAlgebra_16DifferentialRing_5__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_derivations = 0;
  PyObject *__pyx_v_blocks = 0;
  PyObject *__pyx_v_parameters = 0;
  PyObject *__pyx_v_notation = 0;
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[4] = {0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
  #endif
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_derivations,&__pyx_n_s_blocks,&__pyx_n_s_parameters,&__pyx_n_s_notation,0};
    values[0] = __Pyx_Arg_NewRef_VARARGS(__pyx_k__2);
    values[1] = __Pyx_Arg_NewRef_VARARGS(__pyx_k__3);
    values[2] = __Pyx_Arg_NewRef_VARARGS(__pyx_k__4);
    values[3] = __Pyx_Arg_NewRef_VARARGS(__pyx_k__5);
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  4: values[3] = __Pyx_Arg_VARARGS(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_VARARGS(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_VARARGS(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_derivations);
          if (value) { values[0] = __Pyx_Arg_NewRef_VARARGS(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 300, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_blocks);
          if (value) { values[1] = __Pyx_Arg_NewRef_VARARGS(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 300, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_parameters);
          if (value) { values[2] = __Pyx_Arg_NewRef_VARARGS(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 300, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_notation);
          if (value) { values[3] = __Pyx_Arg_NewRef_VARARGS(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 300, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__init__") < 0)) __PYX_ERR(0, 300, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  4: values[3] = __Pyx_Arg_VARARGS(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_VARARGS(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_derivations = ((PyObject*)values[0]);
    __pyx_v_blocks = ((PyObject*)values[1]);
    __pyx_v_parameters = ((PyObject*)values[2]);
    __pyx_v_notation = values[3];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 4, __pyx_nargs); __PYX_ERR(0, 300, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("DifferentialAlgebra.DifferentialRing.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_derivations), (&PyList_Type), 1, "derivations", 1))) __PYX_ERR(0, 302, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_blocks), (&PyList_Type), 1, "blocks", 1))) __PYX_ERR(0, 303, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_parameters), (&PyList_Type), 1, "parameters", 1))) __PYX_ERR(0, 304, __pyx_L1_error)
  __pyx_r = __pyx_pf_19DifferentialAlgebra_16DifferentialRing_4__init__(((struct __pyx_obj_19DifferentialAlgebra_DifferentialRing *)__pyx_v_self), __pyx_v_derivations, __pyx_v_blocks, __pyx_v_parameters, __pyx_v_notation);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = -1;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_19DifferentialAlgebra_16DifferentialRing_4__init__(struct __pyx_obj_19DifferentialAlgebra_DifferentialRing *__pyx_v_self, PyObject *__pyx_v_derivations, PyObject *__pyx_v_blocks, PyObject *__pyx_v_parameters, PyObject *__pyx_v_notation) {
  ALGEB __pyx_v_A;
  PyObject *__pyx_v_mesgerr = 0;
  PyObject *__pyx_v_strders = 0;
  PyObject *__pyx_v_strblks = 0;
  PyObject *__pyx_v_strpars = 0;
  PyObject *__pyx_v_L = 0;
  PyObject *__pyx_v_subrankings = 0;
  PyObject *__pyx_v_pattern = 0;
  PyObject *__pyx_8genexpr7__pyx_v_z = NULL;
  PyObject *__pyx_8genexpr8__pyx_v_e = NULL;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  unsigned int __pyx_t_4;
  char *__pyx_t_5;
  char *__pyx_t_6;
  char *__pyx_t_7;
  char *__pyx_t_8;
  int __pyx_t_9;
  Py_ssize_t __pyx_t_10;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 1);

  /* "../../bmi/sympy/DifferentialRing.pyx":331
 *         cdef list L, subrankings
 *         cdef pattern
 *         strders = ascii (derivations)             # <<<<<<<<<<<<<<
 *         strblks = ascii (blocks)
 * # It is important to remove the quotes around the range indexed groups
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ascii); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 331, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_derivations};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 331, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  if (!(likely(PyBytes_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_1))) __PYX_ERR(0, 331, __pyx_L1_error)
  __pyx_v_strders = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "../../bmi/sympy/DifferentialRing.pyx":332
 *         cdef pattern
 *         strders = ascii (derivations)
 *         strblks = ascii (blocks)             # <<<<<<<<<<<<<<
 * # It is important to remove the quotes around the range indexed groups
 * #   otherwise they will be interpreted as plain strings
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ascii); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 332, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_blocks};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 332, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  if (!(likely(PyBytes_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_1))) __PYX_ERR(0, 332, __pyx_L1_error)
  __pyx_v_strblks = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "../../bmi/sympy/DifferentialRing.pyx":335
 * # It is important to remove the quotes around the range indexed groups
 * #   otherwise they will be interpreted as plain strings
 *         strblks = strblks.replace(b"'",b"")             # <<<<<<<<<<<<<<
 * # Same remark
 *         strpars = ascii (parameters)
 */
  __pyx_t_1 = __Pyx_CallUnboundCMethod2(&__pyx_umethod_PyBytes_Type_replace, __pyx_v_strblks, __pyx_kp_b__6, __pyx_kp_b__7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 335, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyBytes_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_1))) __PYX_ERR(0, 335, __pyx_L1_error)
  __Pyx_DECREF_SET(__pyx_v_strblks, ((PyObject*)__pyx_t_1));
  __pyx_t_1 = 0;

  /* "../../bmi/sympy/DifferentialRing.pyx":337
 *         strblks = strblks.replace(b"'",b"")
 * # Same remark
 *         strpars = ascii (parameters)             # <<<<<<<<<<<<<<
 *         strpars = strpars.replace(b"'",b"")
 * # The default notation
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ascii); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 337, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_parameters};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 337, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  if (!(likely(PyBytes_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_1))) __PYX_ERR(0, 337, __pyx_L1_error)
  __pyx_v_strpars = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "../../bmi/sympy/DifferentialRing.pyx":338
 * # Same remark
 *         strpars = ascii (parameters)
 *         strpars = strpars.replace(b"'",b"")             # <<<<<<<<<<<<<<
 * # The default notation
 *         self.notation = BMI_IX_Derivative
 */
  __pyx_t_1 = __Pyx_CallUnboundCMethod2(&__pyx_umethod_PyBytes_Type_replace, __pyx_v_strpars, __pyx_kp_b__6, __pyx_kp_b__7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 338, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyBytes_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_1))) __PYX_ERR(0, 338, __pyx_L1_error)
  __Pyx_DECREF_SET(__pyx_v_strpars, ((PyObject*)__pyx_t_1));
  __pyx_t_1 = 0;

  /* "../../bmi/sympy/DifferentialRing.pyx":340
 *         strpars = strpars.replace(b"'",b"")
 * # The default notation
 *         self.notation = BMI_IX_Derivative             # <<<<<<<<<<<<<<
 *         self.notation = self.__process_notation (notation)
 * # First build the BMI differential ring and exit on error
 */
  __pyx_t_1 = __Pyx_PyBytes_FromString(__pyx_v_19DifferentialAlgebra_BMI_IX_Derivative); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 340, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->notation);
  __Pyx_DECREF(__pyx_v_self->notation);
  __pyx_v_self->notation = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "../../bmi/sympy/DifferentialRing.pyx":341
 * # The default notation
 *         self.notation = BMI_IX_Derivative
 *         self.notation = self.__process_notation (notation)             # <<<<<<<<<<<<<<
 * # First build the BMI differential ring and exit on error
 *         A = bmi_c.bmi_dapyx_differential_ring (
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_DifferentialRing__process_notat); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 341, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_notation};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 341, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  if (!(likely(PyBytes_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_1))) __PYX_ERR(0, 341, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->notation);
  __Pyx_DECREF(__pyx_v_self->notation);
  __pyx_v_self->notation = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "../../bmi/sympy/DifferentialRing.pyx":344
 * # First build the BMI differential ring and exit on error
 *         A = bmi_c.bmi_dapyx_differential_ring (
 *                 strders, strblks, strpars, self.notation)             # <<<<<<<<<<<<<<
 *         if bmi_c.bmi_dapyx_is_error (A):
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (A)
 */
  if (unlikely(__pyx_v_strders == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
    __PYX_ERR(0, 344, __pyx_L1_error)
  }
  __pyx_t_5 = __Pyx_PyBytes_AsWritableString(__pyx_v_strders); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) __PYX_ERR(0, 344, __pyx_L1_error)
  if (unlikely(__pyx_v_strblks == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
    __PYX_ERR(0, 344, __pyx_L1_error)
  }
  __pyx_t_6 = __Pyx_PyBytes_AsWritableString(__pyx_v_strblks); if (unlikely((!__pyx_t_6) && PyErr_Occurred())) __PYX_ERR(0, 344, __pyx_L1_error)
  if (unlikely(__pyx_v_strpars == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
    __PYX_ERR(0, 344, __pyx_L1_error)
  }
  __pyx_t_7 = __Pyx_PyBytes_AsWritableString(__pyx_v_strpars); if (unlikely((!__pyx_t_7) && PyErr_Occurred())) __PYX_ERR(0, 344, __pyx_L1_error)
  if (unlikely(__pyx_v_self->notation == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
    __PYX_ERR(0, 344, __pyx_L1_error)
  }
  __pyx_t_8 = __Pyx_PyBytes_AsWritableString(__pyx_v_self->notation); if (unlikely((!__pyx_t_8) && PyErr_Occurred())) __PYX_ERR(0, 344, __pyx_L1_error)

  /* "../../bmi/sympy/DifferentialRing.pyx":343
 *         self.notation = self.__process_notation (notation)
 * # First build the BMI differential ring and exit on error
 *         A = bmi_c.bmi_dapyx_differential_ring (             # <<<<<<<<<<<<<<
 *                 strders, strblks, strpars, self.notation)
 *         if bmi_c.bmi_dapyx_is_error (A):
 */
  __pyx_v_A = bmi_dapyx_differential_ring(__pyx_t_5, __pyx_t_6, __pyx_t_7, __pyx_t_8);

  /* "../../bmi/sympy/DifferentialRing.pyx":345
 *         A = bmi_c.bmi_dapyx_differential_ring (
 *                 strders, strblks, strpars, self.notation)
 *         if bmi_c.bmi_dapyx_is_error (A):             # <<<<<<<<<<<<<<
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (A)
 *             bmi_c.bmi_balsa_clear_ALGEB (A)
 */
  __pyx_t_9 = (bmi_dapyx_is_error(__pyx_v_A) != 0);
  if (unlikely(__pyx_t_9)) {

    /* "../../bmi/sympy/DifferentialRing.pyx":346
 *                 strders, strblks, strpars, self.notation)
 *         if bmi_c.bmi_dapyx_is_error (A):
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (A)             # <<<<<<<<<<<<<<
 *             bmi_c.bmi_balsa_clear_ALGEB (A)
 *             raise RuntimeError (str (mesgerr, 'utf-8'))
 */
    __pyx_t_1 = __Pyx_PyBytes_FromString(bmi_dapyx_mesgerr(__pyx_v_A)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 346, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_v_mesgerr = ((PyObject*)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "../../bmi/sympy/DifferentialRing.pyx":347
 *         if bmi_c.bmi_dapyx_is_error (A):
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (A)
 *             bmi_c.bmi_balsa_clear_ALGEB (A)             # <<<<<<<<<<<<<<
 *             raise RuntimeError (str (mesgerr, 'utf-8'))
 * # The dring field with its reference counter set to 1
 */
    bmi_balsa_clear_ALGEB(__pyx_v_A);

    /* "../../bmi/sympy/DifferentialRing.pyx":348
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (A)
 *             bmi_c.bmi_balsa_clear_ALGEB (A)
 *             raise RuntimeError (str (mesgerr, 'utf-8'))             # <<<<<<<<<<<<<<
 * # The dring field with its reference counter set to 1
 *         self.dring = A
 */
    __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 348, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_v_mesgerr);
    __Pyx_GIVEREF(__pyx_v_mesgerr);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_mesgerr)) __PYX_ERR(0, 348, __pyx_L1_error);
    __Pyx_INCREF(__pyx_kp_u_utf_8);
    __Pyx_GIVEREF(__pyx_kp_u_utf_8);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_kp_u_utf_8)) __PYX_ERR(0, 348, __pyx_L1_error);
    __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)(&PyUnicode_Type)), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 348, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_RuntimeError, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 348, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(0, 348, __pyx_L1_error)

    /* "../../bmi/sympy/DifferentialRing.pyx":345
 *         A = bmi_c.bmi_dapyx_differential_ring (
 *                 strders, strblks, strpars, self.notation)
 *         if bmi_c.bmi_dapyx_is_error (A):             # <<<<<<<<<<<<<<
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (A)
 *             bmi_c.bmi_balsa_clear_ALGEB (A)
 */
  }

  /* "../../bmi/sympy/DifferentialRing.pyx":350
 *             raise RuntimeError (str (mesgerr, 'utf-8'))
 * # The dring field with its reference counter set to 1
 *         self.dring = A             # <<<<<<<<<<<<<<
 *         bmi_c.bmi_balsa_increment_nbref (self.dring)
 * # The dictionary to be used by eval
 */
  __pyx_v_self->dring = __pyx_v_A;

  /* "../../bmi/sympy/DifferentialRing.pyx":351
 * # The dring field with its reference counter set to 1
 *         self.dring = A
 *         bmi_c.bmi_balsa_increment_nbref (self.dring)             # <<<<<<<<<<<<<<
 * # The dictionary to be used by eval
 *         subrankings = [sympy.IndexedBase(z) for z in \
 */
  bmi_balsa_increment_nbref(__pyx_v_self->dring);

  /* "../../bmi/sympy/DifferentialRing.pyx":353
 *         bmi_c.bmi_balsa_increment_nbref (self.dring)
 * # The dictionary to be used by eval
 *         subrankings = [sympy.IndexedBase(z) for z in \             # <<<<<<<<<<<<<<
 *                 ['lex', 'grlexA', 'grlexB', 'degrevlexA', 'degrevlexB']]
 *         pattern = re.compile (r'[\050]{0,1}([^\050\051]*).*[\133] *range')
 */
  { /* enter inner scope */
    __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 353, __pyx_L6_error)
    __Pyx_GOTREF(__pyx_t_1);

    /* "../../bmi/sympy/DifferentialRing.pyx":354
 * # The dictionary to be used by eval
 *         subrankings = [sympy.IndexedBase(z) for z in \
 *                 ['lex', 'grlexA', 'grlexB', 'degrevlexA', 'degrevlexB']]             # <<<<<<<<<<<<<<
 *         pattern = re.compile (r'[\050]{0,1}([^\050\051]*).*[\133] *range')
 *         L = self.__listof_symbols ([derivations, blocks], \
 */
    __pyx_t_2 = __pyx_tuple__8; __Pyx_INCREF(__pyx_t_2);
    __pyx_t_10 = 0;
    for (;;) {
      if (__pyx_t_10 >= 5) break;
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_10); __Pyx_INCREF(__pyx_t_3); __pyx_t_10++; if (unlikely((0 < 0))) __PYX_ERR(0, 354, __pyx_L6_error)
      #else
      __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 354, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_3);
      #endif
      __Pyx_XDECREF_SET(__pyx_8genexpr7__pyx_v_z, ((PyObject*)__pyx_t_3));
      __pyx_t_3 = 0;

      /* "../../bmi/sympy/DifferentialRing.pyx":353
 *         bmi_c.bmi_balsa_increment_nbref (self.dring)
 * # The dictionary to be used by eval
 *         subrankings = [sympy.IndexedBase(z) for z in \             # <<<<<<<<<<<<<<
 *                 ['lex', 'grlexA', 'grlexB', 'degrevlexA', 'degrevlexB']]
 *         pattern = re.compile (r'[\050]{0,1}([^\050\051]*).*[\133] *range')
 */
      __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_sympy); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 353, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_11);
      __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_IndexedBase); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 353, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_12);
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      __pyx_t_11 = NULL;
      __pyx_t_4 = 0;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_12))) {
        __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_12);
        if (likely(__pyx_t_11)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
          __Pyx_INCREF(__pyx_t_11);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_12, function);
          __pyx_t_4 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_11, __pyx_8genexpr7__pyx_v_z};
        __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_12, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
        __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 353, __pyx_L6_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      }
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_3))) __PYX_ERR(0, 353, __pyx_L6_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_8genexpr7__pyx_v_z); __pyx_8genexpr7__pyx_v_z = 0;
    goto __pyx_L10_exit_scope;
    __pyx_L6_error:;
    __Pyx_XDECREF(__pyx_8genexpr7__pyx_v_z); __pyx_8genexpr7__pyx_v_z = 0;
    goto __pyx_L1_error;
    __pyx_L10_exit_scope:;
  } /* exit inner scope */
  __pyx_v_subrankings = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "../../bmi/sympy/DifferentialRing.pyx":355
 *         subrankings = [sympy.IndexedBase(z) for z in \
 *                 ['lex', 'grlexA', 'grlexB', 'degrevlexA', 'degrevlexB']]
 *         pattern = re.compile (r'[\050]{0,1}([^\050\051]*).*[\133] *range')             # <<<<<<<<<<<<<<
 *         L = self.__listof_symbols ([derivations, blocks], \
 *                 subrankings, \
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_re); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 355, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_compile); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 355, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_kp_u_050_0_1_050_051_133_range};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 355, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v_pattern = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "../../bmi/sympy/DifferentialRing.pyx":356
 *                 ['lex', 'grlexA', 'grlexB', 'degrevlexA', 'degrevlexB']]
 *         pattern = re.compile (r'[\050]{0,1}([^\050\051]*).*[\133] *range')
 *         L = self.__listof_symbols ([derivations, blocks], \             # <<<<<<<<<<<<<<
 *                 subrankings, \
 *                 pattern)
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_DifferentialRing__listof_symbol); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 356, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = PyList_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 356, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_v_derivations);
  __Pyx_GIVEREF(__pyx_v_derivations);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 0, __pyx_v_derivations)) __PYX_ERR(0, 356, __pyx_L1_error);
  __Pyx_INCREF(__pyx_v_blocks);
  __Pyx_GIVEREF(__pyx_v_blocks);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 1, __pyx_v_blocks)) __PYX_ERR(0, 356, __pyx_L1_error);

  /* "../../bmi/sympy/DifferentialRing.pyx":358
 *         L = self.__listof_symbols ([derivations, blocks], \
 *                 subrankings, \
 *                 pattern)             # <<<<<<<<<<<<<<
 *         self.evdict = { str(e):e for e in L }
 * 
 */
  __pyx_t_12 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_12)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_12);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[4] = {__pyx_t_12, __pyx_t_2, __pyx_v_subrankings, __pyx_v_pattern};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 3+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 356, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }

  /* "../../bmi/sympy/DifferentialRing.pyx":356
 *                 ['lex', 'grlexA', 'grlexB', 'degrevlexA', 'degrevlexB']]
 *         pattern = re.compile (r'[\050]{0,1}([^\050\051]*).*[\133] *range')
 *         L = self.__listof_symbols ([derivations, blocks], \             # <<<<<<<<<<<<<<
 *                 subrankings, \
 *                 pattern)
 */
  if (!(likely(PyList_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("list", __pyx_t_1))) __PYX_ERR(0, 356, __pyx_L1_error)
  __pyx_v_L = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "../../bmi/sympy/DifferentialRing.pyx":359
 *                 subrankings, \
 *                 pattern)
 *         self.evdict = { str(e):e for e in L }             # <<<<<<<<<<<<<<
 * 
 *     def __dealloc__ (self):
 */
  { /* enter inner scope */
    __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 359, __pyx_L13_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (unlikely(__pyx_v_L == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
      __PYX_ERR(0, 359, __pyx_L13_error)
    }
    __pyx_t_3 = __pyx_v_L; __Pyx_INCREF(__pyx_t_3);
    __pyx_t_10 = 0;
    for (;;) {
      {
        Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_3);
        #if !CYTHON_ASSUME_SAFE_MACROS
        if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 359, __pyx_L13_error)
        #endif
        if (__pyx_t_10 >= __pyx_temp) break;
      }
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      __pyx_t_2 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_10); __Pyx_INCREF(__pyx_t_2); __pyx_t_10++; if (unlikely((0 < 0))) __PYX_ERR(0, 359, __pyx_L13_error)
      #else
      __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 359, __pyx_L13_error)
      __Pyx_GOTREF(__pyx_t_2);
      #endif
      __Pyx_XDECREF_SET(__pyx_8genexpr8__pyx_v_e, __pyx_t_2);
      __pyx_t_2 = 0;
      __pyx_t_2 = __Pyx_PyObject_Unicode(__pyx_8genexpr8__pyx_v_e); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 359, __pyx_L13_error)
      __Pyx_GOTREF(__pyx_t_2);
      if (unlikely(PyDict_SetItem(__pyx_t_1, (PyObject*)__pyx_t_2, (PyObject*)__pyx_8genexpr8__pyx_v_e))) __PYX_ERR(0, 359, __pyx_L13_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_XDECREF(__pyx_8genexpr8__pyx_v_e); __pyx_8genexpr8__pyx_v_e = 0;
    goto __pyx_L17_exit_scope;
    __pyx_L13_error:;
    __Pyx_XDECREF(__pyx_8genexpr8__pyx_v_e); __pyx_8genexpr8__pyx_v_e = 0;
    goto __pyx_L1_error;
    __pyx_L17_exit_scope:;
  } /* exit inner scope */
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->evdict);
  __Pyx_DECREF(__pyx_v_self->evdict);
  __pyx_v_self->evdict = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "../../bmi/sympy/DifferentialRing.pyx":300
 * 
 * # __init__
 *     def __init__ (             # <<<<<<<<<<<<<<
 *                 self,
 *                 list derivations = [],
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_AddTraceback("DifferentialAlgebra.DifferentialRing.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_mesgerr);
  __Pyx_XDECREF(__pyx_v_strders);
  __Pyx_XDECREF(__pyx_v_strblks);
  __Pyx_XDECREF(__pyx_v_strpars);
  __Pyx_XDECREF(__pyx_v_L);
  __Pyx_XDECREF(__pyx_v_subrankings);
  __Pyx_XDECREF(__pyx_v_pattern);
  __Pyx_XDECREF(__pyx_8genexpr7__pyx_v_z);
  __Pyx_XDECREF(__pyx_8genexpr8__pyx_v_e);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "../../bmi/sympy/DifferentialRing.pyx":361
 *         self.evdict = { str(e):e for e in L }
 * 
 *     def __dealloc__ (self):             # <<<<<<<<<<<<<<
 * #   The destructor
 *         bmi_c.bmi_balsa_decrement_nbref (self.dring)
 */

/* Python wrapper */
static void __pyx_pw_19DifferentialAlgebra_16DifferentialRing_7__dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_pw_19DifferentialAlgebra_16DifferentialRing_7__dealloc__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_pf_19DifferentialAlgebra_16DifferentialRing_6__dealloc__(((struct __pyx_obj_19DifferentialAlgebra_DifferentialRing *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

static void __pyx_pf_19DifferentialAlgebra_16DifferentialRing_6__dealloc__(struct __pyx_obj_19DifferentialAlgebra_DifferentialRing *__pyx_v_self) {

  /* "../../bmi/sympy/DifferentialRing.pyx":363
 *     def __dealloc__ (self):
 * #   The destructor
 *         bmi_c.bmi_balsa_decrement_nbref (self.dring)             # <<<<<<<<<<<<<<
 *         bmi_c.bmi_balsa_clear_ALGEB (self.dring)
 * 
 */
  bmi_balsa_decrement_nbref(__pyx_v_self->dring);

  /* "../../bmi/sympy/DifferentialRing.pyx":364
 * #   The destructor
 *         bmi_c.bmi_balsa_decrement_nbref (self.dring)
 *         bmi_c.bmi_balsa_clear_ALGEB (self.dring)             # <<<<<<<<<<<<<<
 * 
 *     def __repr__ (self):
 */
  bmi_balsa_clear_ALGEB(__pyx_v_self->dring);

  /* "../../bmi/sympy/DifferentialRing.pyx":361
 *         self.evdict = { str(e):e for e in L }
 * 
 *     def __dealloc__ (self):             # <<<<<<<<<<<<<<
 * #   The destructor
 *         bmi_c.bmi_balsa_decrement_nbref (self.dring)
 */

  /* function exit code */
}

/* "../../bmi/sympy/DifferentialRing.pyx":366
 *         bmi_c.bmi_balsa_clear_ALGEB (self.dring)
 * 
 *     def __repr__ (self):             # <<<<<<<<<<<<<<
 * #   The external representation
 *         return 'differential_ring'
 */

/* Python wrapper */
static PyObject *__pyx_pw_19DifferentialAlgebra_16DifferentialRing_9__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_19DifferentialAlgebra_16DifferentialRing_9__repr__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_19DifferentialAlgebra_16DifferentialRing_8__repr__(((struct __pyx_obj_19DifferentialAlgebra_DifferentialRing *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_19DifferentialAlgebra_16DifferentialRing_8__repr__(CYTHON_UNUSED struct __pyx_obj_19DifferentialAlgebra_DifferentialRing *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__", 1);

  /* "../../bmi/sympy/DifferentialRing.pyx":368
 *     def __repr__ (self):
 * #   The external representation
 *         return 'differential_ring'             # <<<<<<<<<<<<<<
 * 
 *     def _latex (self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_n_u_differential_ring);
  __pyx_r = __pyx_n_u_differential_ring;
  goto __pyx_L0;

  /* "../../bmi/sympy/DifferentialRing.pyx":366
 *         bmi_c.bmi_balsa_clear_ALGEB (self.dring)
 * 
 *     def __repr__ (self):             # <<<<<<<<<<<<<<
 * #   The external representation
 *         return 'differential_ring'
 */

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "../../bmi/sympy/DifferentialRing.pyx":370
 *         return 'differential_ring'
 * 
 *     def _latex (self):             # <<<<<<<<<<<<<<
 * #   The LaTeX representation
 *         return 'differential\\_ring'
 */

/* Python wrapper */
static PyObject *__pyx_pw_19DifferentialAlgebra_16DifferentialRing_11_latex(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_19DifferentialAlgebra_16DifferentialRing_11_latex = {"_latex", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_19DifferentialAlgebra_16DifferentialRing_11_latex, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_19DifferentialAlgebra_16DifferentialRing_11_latex(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_latex (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) {
    __Pyx_RaiseArgtupleInvalid("_latex", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "_latex", 0))) return NULL;
  __pyx_r = __pyx_pf_19DifferentialAlgebra_16DifferentialRing_10_latex(((struct __pyx_obj_19DifferentialAlgebra_DifferentialRing *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_19DifferentialAlgebra_16DifferentialRing_10_latex(CYTHON_UNUSED struct __pyx_obj_19DifferentialAlgebra_DifferentialRing *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_latex", 1);

  /* "../../bmi/sympy/DifferentialRing.pyx":372
 *     def _latex (self):
 * #   The LaTeX representation
 *         return 'differential\\_ring'             # <<<<<<<<<<<<<<
 * 
 * # coeffs
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_kp_u_differential__ring);
  __pyx_r = __pyx_kp_u_differential__ring;
  goto __pyx_L0;

  /* "../../bmi/sympy/DifferentialRing.pyx":370
 *         return 'differential_ring'
 * 
 *     def _latex (self):             # <<<<<<<<<<<<<<
 * #   The LaTeX representation
 *         return 'differential\\_ring'
 */

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "../../bmi/sympy/DifferentialRing.pyx":375
 * 
 * # coeffs
 *     def coeffs (             # <<<<<<<<<<<<<<
 *             self,
 *             equation,
 */

/* Python wrapper */
static PyObject *__pyx_pw_19DifferentialAlgebra_16DifferentialRing_13coeffs(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_19DifferentialAlgebra_16DifferentialRing_12coeffs, "\n        The coefficients and monomials of a differential fraction\n\n        INPUT:\n\n            `equation`  -- a rational fraction\n            `variable`  -- (default: None) a derivative\n            `basefield` -- (default: None) a base field\n            `notation`  -- (default: 'undefined') a string\n\n        OUTPUT:\n\n            A sequence of two lists: the list C of the coefficients\n            and the list M of the monomials. Both lists have the same\n            length and the following relation holds:\n\n            `equation` == add (C[i]*M[i] for i in range (len (C)))\n\n            The monomials M[i] are possibly rational fractions.\n\n            If `variable` and `basefield` are both None, then the\n            coefficients C[i] are numerical.\n\n            If `variable` is not None, then `basefield` must be None,\n            the C[i] only depend on variables strictly less than\n            `variable`, and the M[i] only depend on variables greater\n            than or equal to `variable`, with respect to the ranking.\n\n            If `basefield` is not None, then `variable` must be None,\n            the C[i] only depend on variables which belong to the field,\n            and the M[i] only depend on variables which do not belong\n            to the field.\n\n            Restriction: the denominator of `equation` must depend\n            on variables which are all, either strictly less than,\n            or greater than `variable`.\n\n        NOTES:\n\n            So far, there is a single notation available, because of\n            limitations of function.\n\n        EXAMPLES:\n\n            >>> from sympy import *\n            >>> from DifferentialAlgebra import *\n            >>> init_printing (use_unicode=False, num_columns=60)\n            >>> x,y = var ('x,y')\n            >>> f,u = function ('f,u')\n\n        The differential ring is equipped with an elimination ranking\n        such that u >> f:\n\n            >>> R = DifferentialRi""ng (derivations = [x,y], \n            ...             blocks = [u,f], parameters = [u(x)])\n\n        Let us define a differential field F:\n\n            >>> eqns = [Eq (Derivative(f(x,y),x), f(x,y)**2 + 1), \n            ...         Eq(Derivative(f(x,y),y), 2*y*(f(x,y)**2 + 1))]\n            >>> C = RegularDifferentialChain (eqns, R, pretend = False)\n            >>> F = BaseFieldExtension (relations = C)\n\n        Let us start with a differential polynomial:\n\n            >>> eqn = x*Derivative(u(x),x)**2-(f(x,y)**2+1)*u(x)\n\n        The numerical coefficients and the corresponding monomials:\n\n            >>> R.coeffs (eqn)\n                                       2                       \n                             /d       \\    2                   \n            ([1, -1, -1], [x*|--(u(x))| , f (x, y)*u(x), u(x)])\n                             \\dx      /                        \n\n        The coefficients of eqn with respect to\n        Derivative(f(x,y),x). The variables x and f(x,y), both less\n        than Derivative(f(x,y),x), with respect to the ranking, arise\n        in the coefficients:\n\n            >>> R.coeffs (eqn, Derivative(f(x,y),x))\n                                             2        \n                    2              /d       \\         \n            ([x, - f (x, y) - 1], [|--(u(x))| , u(x)])\n                                   \\dx      /         \n\n        The coefficients of eqn, viewed as a differential polynomials\n        with coefficients in F:\n\n            >>> R.coeffs (eqn, basefield = F)\n                                             2        \n                    2              /d       \\         \n            ([x, - f (x, y) - 1], [|--(u(x))| , u(x)])\n                                   \\dx      /         \n\n        The coefficients of eqn, viewed as a differential polynomials\n        with coefficients in Q(x,y):\n\n            >>> R.coeffs (eqn, basefield = BaseFieldExtension ())\n                                ""     2                       \n                           /d       \\    2                   \n            ([x, -1, -1], [|--(u(x))| , f (x, y)*u(x), u(x)])\n                           \\dx      /                        \n\n        The coeffs function applies to rational fractions too:\n\n            >>> eqn = x*Derivative(u(x),x)**2-u(x)/Derivative(f(x,y),x)\n\n        The numerical coefficients and the corresponding monomials,\n        in the extended sense:\n\n            >>> R.coeffs (eqn)\n                                   2               \n                         /d       \\      u(x)      \n            ([1, -1], [x*|--(u(x))| , -----------])\n                         \\dx      /   d            \n                                      --(f(x, y))  \n                                      dx           \n\n        The coefficients of eqn, viewed as a differential polynomials\n        with coefficients in F:\n\n            >>> R.coeffs (eqn, basefield = F)\n                                          2        \n                     -1         /d       \\         \n            ([x, -----------], [|--(u(x))| , u(x)])\n                 d              \\dx      /         \n                 --(f(x, y))                       \n                 dx                                \n\n        The coefficients of eqn, viewed as a differential polynomials\n        with coefficients in Q(x,y):\n\n            >>> R.coeffs (eqn, basefield = BaseFieldExtension ())\n                                 2               \n                       /d       \\      u(x)      \n            ([x, -1], [|--(u(x))| , -----------])\n                       \\dx      /   d            \n                                    --(f(x, y))  \n                                    dx           \n        ");
static PyMethodDef __pyx_mdef_19DifferentialAlgebra_16DifferentialRing_13coeffs = {"coeffs", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_19DifferentialAlgebra_16DifferentialRing_13coeffs, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_19DifferentialAlgebra_16DifferentialRing_12coeffs};
static PyObject *__pyx_pw_19DifferentialAlgebra_16DifferentialRing_13coeffs(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_equation = 0;
  PyObject *__pyx_v_variable = 0;
  struct __pyx_obj_19DifferentialAlgebra_BaseFieldExtension *__pyx_v_basefield = 0;
  PyObject *__pyx_v_notation = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[4] = {0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("coeffs (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_equation,&__pyx_n_s_variable,&__pyx_n_s_basefield,&__pyx_n_s_notation,0};

    /* "../../bmi/sympy/DifferentialRing.pyx":378
 *             self,
 *             equation,
 *             variable = None,             # <<<<<<<<<<<<<<
 *             BaseFieldExtension basefield = None,
 *             notation = BMI_IX_undefined):
 */
    values[1] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));

    /* "../../bmi/sympy/DifferentialRing.pyx":379
 *             equation,
 *             variable = None,
 *             BaseFieldExtension basefield = None,             # <<<<<<<<<<<<<<
 *             notation = BMI_IX_undefined):
 *         r"""
 */
    values[2] = __Pyx_Arg_NewRef_FASTCALL((PyObject *)((struct __pyx_obj_19DifferentialAlgebra_BaseFieldExtension *)Py_None));
    values[3] = __Pyx_Arg_NewRef_FASTCALL(__pyx_k__9);
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_equation)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 375, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_variable);
          if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 375, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_basefield);
          if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 375, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_notation);
          if (value) { values[3] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 375, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "coeffs") < 0)) __PYX_ERR(0, 375, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_equation = values[0];
    __pyx_v_variable = values[1];
    __pyx_v_basefield = ((struct __pyx_obj_19DifferentialAlgebra_BaseFieldExtension *)values[2]);
    __pyx_v_notation = values[3];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("coeffs", 0, 1, 4, __pyx_nargs); __PYX_ERR(0, 375, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("DifferentialAlgebra.DifferentialRing.coeffs", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_basefield), __pyx_ptype_19DifferentialAlgebra_BaseFieldExtension, 1, "basefield", 0))) __PYX_ERR(0, 379, __pyx_L1_error)
  __pyx_r = __pyx_pf_19DifferentialAlgebra_16DifferentialRing_12coeffs(((struct __pyx_obj_19DifferentialAlgebra_DifferentialRing *)__pyx_v_self), __pyx_v_equation, __pyx_v_variable, __pyx_v_basefield, __pyx_v_notation);

  /* "../../bmi/sympy/DifferentialRing.pyx":375
 * 
 * # coeffs
 *     def coeffs (             # <<<<<<<<<<<<<<
 *             self,
 *             equation,
 */

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_19DifferentialAlgebra_16DifferentialRing_12coeffs(struct __pyx_obj_19DifferentialAlgebra_DifferentialRing *__pyx_v_self, PyObject *__pyx_v_equation, PyObject *__pyx_v_variable, struct __pyx_obj_19DifferentialAlgebra_BaseFieldExtension *__pyx_v_basefield, PyObject *__pyx_v_notation) {
  PyObject *__pyx_v_result = 0;
  PyObject *__pyx_v_streqns = 0;
  PyObject *__pyx_v_strvar = 0;
  PyObject *__pyx_v_strgens = 0;
  PyObject *__pyx_v_strrels = 0;
  PyObject *__pyx_v_mesgerr = 0;
  ALGEB_string __pyx_v_A;
  PyObject *__pyx_v_strnot = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  unsigned int __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  char *__pyx_t_9;
  char *__pyx_t_10;
  char *__pyx_t_11;
  char *__pyx_t_12;
  char *__pyx_t_13;
  char *__pyx_t_14;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("coeffs", 1);

  /* "../../bmi/sympy/DifferentialRing.pyx":527
 *         cdef bmi_c.ALGEB_string A
 *         cdef strnot
 *         strnot = self.__process_notation (notation)             # <<<<<<<<<<<<<<
 *         if variable != None and basefield != None:
 *             raise RuntimeError ('the variable and the base field must not be both specified')
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_DifferentialRing__process_notat); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 527, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_notation};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 527, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_v_strnot = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "../../bmi/sympy/DifferentialRing.pyx":528
 *         cdef strnot
 *         strnot = self.__process_notation (notation)
 *         if variable != None and basefield != None:             # <<<<<<<<<<<<<<
 *             raise RuntimeError ('the variable and the base field must not be both specified')
 *         streqns = ascii (equation)
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_variable, Py_None, Py_NE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 528, __pyx_L1_error)
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 528, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_6) {
  } else {
    __pyx_t_5 = __pyx_t_6;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_1 = PyObject_RichCompare(((PyObject *)__pyx_v_basefield), Py_None, Py_NE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 528, __pyx_L1_error)
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 528, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_5 = __pyx_t_6;
  __pyx_L4_bool_binop_done:;
  if (unlikely(__pyx_t_5)) {

    /* "../../bmi/sympy/DifferentialRing.pyx":529
 *         strnot = self.__process_notation (notation)
 *         if variable != None and basefield != None:
 *             raise RuntimeError ('the variable and the base field must not be both specified')             # <<<<<<<<<<<<<<
 *         streqns = ascii (equation)
 *         if variable == None:
 */
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__10, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 529, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(0, 529, __pyx_L1_error)

    /* "../../bmi/sympy/DifferentialRing.pyx":528
 *         cdef strnot
 *         strnot = self.__process_notation (notation)
 *         if variable != None and basefield != None:             # <<<<<<<<<<<<<<
 *             raise RuntimeError ('the variable and the base field must not be both specified')
 *         streqns = ascii (equation)
 */
  }

  /* "../../bmi/sympy/DifferentialRing.pyx":530
 *         if variable != None and basefield != None:
 *             raise RuntimeError ('the variable and the base field must not be both specified')
 *         streqns = ascii (equation)             # <<<<<<<<<<<<<<
 *         if variable == None:
 *             if basefield == None:
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ascii); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 530, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_equation};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 530, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  if (!(likely(PyBytes_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_1))) __PYX_ERR(0, 530, __pyx_L1_error)
  __pyx_v_streqns = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "../../bmi/sympy/DifferentialRing.pyx":531
 *             raise RuntimeError ('the variable and the base field must not be both specified')
 *         streqns = ascii (equation)
 *         if variable == None:             # <<<<<<<<<<<<<<
 *             if basefield == None:
 *                 strvar = b"0"
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_variable, Py_None, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 531, __pyx_L1_error)
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 531, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_5) {

    /* "../../bmi/sympy/DifferentialRing.pyx":532
 *         streqns = ascii (equation)
 *         if variable == None:
 *             if basefield == None:             # <<<<<<<<<<<<<<
 *                 strvar = b"0"
 *                 strgens = b""
 */
    __pyx_t_1 = PyObject_RichCompare(((PyObject *)__pyx_v_basefield), Py_None, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 532, __pyx_L1_error)
    __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 532, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (__pyx_t_5) {

      /* "../../bmi/sympy/DifferentialRing.pyx":533
 *         if variable == None:
 *             if basefield == None:
 *                 strvar = b"0"             # <<<<<<<<<<<<<<
 *                 strgens = b""
 *                 strrels = b""
 */
      __Pyx_INCREF(__pyx_kp_b_0);
      __pyx_v_strvar = __pyx_kp_b_0;

      /* "../../bmi/sympy/DifferentialRing.pyx":534
 *             if basefield == None:
 *                 strvar = b"0"
 *                 strgens = b""             # <<<<<<<<<<<<<<
 *                 strrels = b""
 *             else:
 */
      __Pyx_INCREF(__pyx_kp_b__7);
      __pyx_v_strgens = __pyx_kp_b__7;

      /* "../../bmi/sympy/DifferentialRing.pyx":535
 *                 strvar = b"0"
 *                 strgens = b""
 *                 strrels = b""             # <<<<<<<<<<<<<<
 *             else:
 *                 strvar = b""
 */
      __Pyx_INCREF(__pyx_kp_b__7);
      __pyx_v_strrels = __pyx_kp_b__7;

      /* "../../bmi/sympy/DifferentialRing.pyx":532
 *         streqns = ascii (equation)
 *         if variable == None:
 *             if basefield == None:             # <<<<<<<<<<<<<<
 *                 strvar = b"0"
 *                 strgens = b""
 */
      goto __pyx_L7;
    }

    /* "../../bmi/sympy/DifferentialRing.pyx":537
 *                 strrels = b""
 *             else:
 *                 strvar = b""             # <<<<<<<<<<<<<<
 *                 strgens = ascii (basefield.generators ())
 * # It is important to remove quotes around range indexed groups otherwise
 */
    /*else*/ {
      __Pyx_INCREF(__pyx_kp_b__7);
      __pyx_v_strvar = __pyx_kp_b__7;

      /* "../../bmi/sympy/DifferentialRing.pyx":538
 *             else:
 *                 strvar = b""
 *                 strgens = ascii (basefield.generators ())             # <<<<<<<<<<<<<<
 * # It is important to remove quotes around range indexed groups otherwise
 * #   they will be interpreted as plain strings
 */
      __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ascii); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 538, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_basefield), __pyx_n_s_generators); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 538, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_8 = NULL;
      __pyx_t_4 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_7))) {
        __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
        if (likely(__pyx_t_8)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
          __Pyx_INCREF(__pyx_t_8);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_7, function);
          __pyx_t_4 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_8, NULL};
        __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 538, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      }
      __pyx_t_7 = NULL;
      __pyx_t_4 = 0;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_2))) {
        __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_2);
        if (likely(__pyx_t_7)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
          __Pyx_INCREF(__pyx_t_7);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_2, function);
          __pyx_t_4 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_t_3};
        __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 538, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      }
      if (!(likely(PyBytes_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_1))) __PYX_ERR(0, 538, __pyx_L1_error)
      __pyx_v_strgens = ((PyObject*)__pyx_t_1);
      __pyx_t_1 = 0;

      /* "../../bmi/sympy/DifferentialRing.pyx":541
 * # It is important to remove quotes around range indexed groups otherwise
 * #   they will be interpreted as plain strings
 *                 strgens = strgens.replace (b"'", b"")             # <<<<<<<<<<<<<<
 *                 strrels = ascii (basefield._relations ())
 *         else:
 */
      __pyx_t_1 = __Pyx_CallUnboundCMethod2(&__pyx_umethod_PyBytes_Type_replace, __pyx_v_strgens, __pyx_kp_b__6, __pyx_kp_b__7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 541, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!(likely(PyBytes_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_1))) __PYX_ERR(0, 541, __pyx_L1_error)
      __Pyx_DECREF_SET(__pyx_v_strgens, ((PyObject*)__pyx_t_1));
      __pyx_t_1 = 0;

      /* "../../bmi/sympy/DifferentialRing.pyx":542
 * #   they will be interpreted as plain strings
 *                 strgens = strgens.replace (b"'", b"")
 *                 strrels = ascii (basefield._relations ())             # <<<<<<<<<<<<<<
 *         else:
 *             strvar = ascii (variable)
 */
      __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ascii); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 542, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_basefield), __pyx_n_s_relations); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 542, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_8 = NULL;
      __pyx_t_4 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_7))) {
        __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
        if (likely(__pyx_t_8)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
          __Pyx_INCREF(__pyx_t_8);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_7, function);
          __pyx_t_4 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_8, NULL};
        __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 542, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      }
      __pyx_t_7 = NULL;
      __pyx_t_4 = 0;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_2))) {
        __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_2);
        if (likely(__pyx_t_7)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
          __Pyx_INCREF(__pyx_t_7);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_2, function);
          __pyx_t_4 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_t_3};
        __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 542, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      }
      if (!(likely(PyBytes_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_1))) __PYX_ERR(0, 542, __pyx_L1_error)
      __pyx_v_strrels = ((PyObject*)__pyx_t_1);
      __pyx_t_1 = 0;
    }
    __pyx_L7:;

    /* "../../bmi/sympy/DifferentialRing.pyx":531
 *             raise RuntimeError ('the variable and the base field must not be both specified')
 *         streqns = ascii (equation)
 *         if variable == None:             # <<<<<<<<<<<<<<
 *             if basefield == None:
 *                 strvar = b"0"
 */
    goto __pyx_L6;
  }

  /* "../../bmi/sympy/DifferentialRing.pyx":544
 *                 strrels = ascii (basefield._relations ())
 *         else:
 *             strvar = ascii (variable)             # <<<<<<<<<<<<<<
 *             if basefield == None:
 *                 strgens = b""
 */
  /*else*/ {
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ascii); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 544, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = NULL;
    __pyx_t_4 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
        __pyx_t_4 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_variable};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 544, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    if (!(likely(PyBytes_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_1))) __PYX_ERR(0, 544, __pyx_L1_error)
    __pyx_v_strvar = ((PyObject*)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "../../bmi/sympy/DifferentialRing.pyx":545
 *         else:
 *             strvar = ascii (variable)
 *             if basefield == None:             # <<<<<<<<<<<<<<
 *                 strgens = b""
 *                 strrels = b""
 */
    __pyx_t_1 = PyObject_RichCompare(((PyObject *)__pyx_v_basefield), Py_None, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 545, __pyx_L1_error)
    __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 545, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (likely(__pyx_t_5)) {

      /* "../../bmi/sympy/DifferentialRing.pyx":546
 *             strvar = ascii (variable)
 *             if basefield == None:
 *                 strgens = b""             # <<<<<<<<<<<<<<
 *                 strrels = b""
 *             else:
 */
      __Pyx_INCREF(__pyx_kp_b__7);
      __pyx_v_strgens = __pyx_kp_b__7;

      /* "../../bmi/sympy/DifferentialRing.pyx":547
 *             if basefield == None:
 *                 strgens = b""
 *                 strrels = b""             # <<<<<<<<<<<<<<
 *             else:
 *                 raise RuntimeError ('the variable and the base field must not be both specified')
 */
      __Pyx_INCREF(__pyx_kp_b__7);
      __pyx_v_strrels = __pyx_kp_b__7;

      /* "../../bmi/sympy/DifferentialRing.pyx":545
 *         else:
 *             strvar = ascii (variable)
 *             if basefield == None:             # <<<<<<<<<<<<<<
 *                 strgens = b""
 *                 strrels = b""
 */
      goto __pyx_L8;
    }

    /* "../../bmi/sympy/DifferentialRing.pyx":549
 *                 strrels = b""
 *             else:
 *                 raise RuntimeError ('the variable and the base field must not be both specified')             # <<<<<<<<<<<<<<
 *         A = bmi_c.bmi_dapyx_coeffs (
 *                     streqns, strvar, strgens, strrels, self.dring,
 */
    /*else*/ {
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__10, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 549, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_Raise(__pyx_t_1, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __PYX_ERR(0, 549, __pyx_L1_error)
    }
    __pyx_L8:;
  }
  __pyx_L6:;

  /* "../../bmi/sympy/DifferentialRing.pyx":551
 *                 raise RuntimeError ('the variable and the base field must not be both specified')
 *         A = bmi_c.bmi_dapyx_coeffs (
 *                     streqns, strvar, strgens, strrels, self.dring,             # <<<<<<<<<<<<<<
 *                     self.notation, strnot, 0, 0)
 *         if bmi_c.bmi_dapyx_is_error (A):
 */
  if (unlikely(__pyx_v_streqns == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
    __PYX_ERR(0, 551, __pyx_L1_error)
  }
  __pyx_t_9 = __Pyx_PyBytes_AsWritableString(__pyx_v_streqns); if (unlikely((!__pyx_t_9) && PyErr_Occurred())) __PYX_ERR(0, 551, __pyx_L1_error)
  if (unlikely(__pyx_v_strvar == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
    __PYX_ERR(0, 551, __pyx_L1_error)
  }
  __pyx_t_10 = __Pyx_PyBytes_AsWritableString(__pyx_v_strvar); if (unlikely((!__pyx_t_10) && PyErr_Occurred())) __PYX_ERR(0, 551, __pyx_L1_error)
  if (unlikely(__pyx_v_strgens == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
    __PYX_ERR(0, 551, __pyx_L1_error)
  }
  __pyx_t_11 = __Pyx_PyBytes_AsWritableString(__pyx_v_strgens); if (unlikely((!__pyx_t_11) && PyErr_Occurred())) __PYX_ERR(0, 551, __pyx_L1_error)
  if (unlikely(__pyx_v_strrels == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
    __PYX_ERR(0, 551, __pyx_L1_error)
  }
  __pyx_t_12 = __Pyx_PyBytes_AsWritableString(__pyx_v_strrels); if (unlikely((!__pyx_t_12) && PyErr_Occurred())) __PYX_ERR(0, 551, __pyx_L1_error)

  /* "../../bmi/sympy/DifferentialRing.pyx":552
 *         A = bmi_c.bmi_dapyx_coeffs (
 *                     streqns, strvar, strgens, strrels, self.dring,
 *                     self.notation, strnot, 0, 0)             # <<<<<<<<<<<<<<
 *         if bmi_c.bmi_dapyx_is_error (A):
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (A)
 */
  if (unlikely(__pyx_v_self->notation == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
    __PYX_ERR(0, 552, __pyx_L1_error)
  }
  __pyx_t_13 = __Pyx_PyBytes_AsWritableString(__pyx_v_self->notation); if (unlikely((!__pyx_t_13) && PyErr_Occurred())) __PYX_ERR(0, 552, __pyx_L1_error)
  __pyx_t_14 = __Pyx_PyObject_AsWritableString(__pyx_v_strnot); if (unlikely((!__pyx_t_14) && PyErr_Occurred())) __PYX_ERR(0, 552, __pyx_L1_error)

  /* "../../bmi/sympy/DifferentialRing.pyx":550
 *             else:
 *                 raise RuntimeError ('the variable and the base field must not be both specified')
 *         A = bmi_c.bmi_dapyx_coeffs (             # <<<<<<<<<<<<<<
 *                     streqns, strvar, strgens, strrels, self.dring,
 *                     self.notation, strnot, 0, 0)
 */
  __pyx_v_A = bmi_dapyx_coeffs(__pyx_t_9, __pyx_t_10, __pyx_t_11, __pyx_t_12, __pyx_v_self->dring, __pyx_t_13, __pyx_t_14, 0, 0);

  /* "../../bmi/sympy/DifferentialRing.pyx":553
 *                     streqns, strvar, strgens, strrels, self.dring,
 *                     self.notation, strnot, 0, 0)
 *         if bmi_c.bmi_dapyx_is_error (A):             # <<<<<<<<<<<<<<
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (A)
 *             bmi_c.bmi_balsa_clear_ALGEB (A)
 */
  __pyx_t_5 = (bmi_dapyx_is_error(__pyx_v_A) != 0);
  if (unlikely(__pyx_t_5)) {

    /* "../../bmi/sympy/DifferentialRing.pyx":554
 *                     self.notation, strnot, 0, 0)
 *         if bmi_c.bmi_dapyx_is_error (A):
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (A)             # <<<<<<<<<<<<<<
 *             bmi_c.bmi_balsa_clear_ALGEB (A)
 *             raise RuntimeError (str (mesgerr, 'utf-8'))
 */
    __pyx_t_1 = __Pyx_PyBytes_FromString(bmi_dapyx_mesgerr(__pyx_v_A)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 554, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_v_mesgerr = ((PyObject*)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "../../bmi/sympy/DifferentialRing.pyx":555
 *         if bmi_c.bmi_dapyx_is_error (A):
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (A)
 *             bmi_c.bmi_balsa_clear_ALGEB (A)             # <<<<<<<<<<<<<<
 *             raise RuntimeError (str (mesgerr, 'utf-8'))
 *         result = eval (A.value, globals (), self.evdict)
 */
    bmi_balsa_clear_ALGEB(__pyx_v_A);

    /* "../../bmi/sympy/DifferentialRing.pyx":556
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (A)
 *             bmi_c.bmi_balsa_clear_ALGEB (A)
 *             raise RuntimeError (str (mesgerr, 'utf-8'))             # <<<<<<<<<<<<<<
 *         result = eval (A.value, globals (), self.evdict)
 *         bmi_c.bmi_balsa_clear_ALGEB (A)
 */
    __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 556, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_v_mesgerr);
    __Pyx_GIVEREF(__pyx_v_mesgerr);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_mesgerr)) __PYX_ERR(0, 556, __pyx_L1_error);
    __Pyx_INCREF(__pyx_kp_u_utf_8);
    __Pyx_GIVEREF(__pyx_kp_u_utf_8);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_kp_u_utf_8)) __PYX_ERR(0, 556, __pyx_L1_error);
    __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)(&PyUnicode_Type)), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 556, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_RuntimeError, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 556, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(0, 556, __pyx_L1_error)

    /* "../../bmi/sympy/DifferentialRing.pyx":553
 *                     streqns, strvar, strgens, strrels, self.dring,
 *                     self.notation, strnot, 0, 0)
 *         if bmi_c.bmi_dapyx_is_error (A):             # <<<<<<<<<<<<<<
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (A)
 *             bmi_c.bmi_balsa_clear_ALGEB (A)
 */
  }

  /* "../../bmi/sympy/DifferentialRing.pyx":557
 *             bmi_c.bmi_balsa_clear_ALGEB (A)
 *             raise RuntimeError (str (mesgerr, 'utf-8'))
 *         result = eval (A.value, globals (), self.evdict)             # <<<<<<<<<<<<<<
 *         bmi_c.bmi_balsa_clear_ALGEB (A)
 *         return result
 */
  __pyx_t_1 = __Pyx_PyBytes_FromString(__pyx_v_A->value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 557, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_Globals(); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 557, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 557, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_1);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1)) __PYX_ERR(0, 557, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_2);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2)) __PYX_ERR(0, 557, __pyx_L1_error);
  __Pyx_INCREF(__pyx_v_self->evdict);
  __Pyx_GIVEREF(__pyx_v_self->evdict);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_self->evdict)) __PYX_ERR(0, 557, __pyx_L1_error);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_eval, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 557, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_result = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "../../bmi/sympy/DifferentialRing.pyx":558
 *             raise RuntimeError (str (mesgerr, 'utf-8'))
 *         result = eval (A.value, globals (), self.evdict)
 *         bmi_c.bmi_balsa_clear_ALGEB (A)             # <<<<<<<<<<<<<<
 *         return result
 * 
 */
  bmi_balsa_clear_ALGEB(__pyx_v_A);

  /* "../../bmi/sympy/DifferentialRing.pyx":559
 *         result = eval (A.value, globals (), self.evdict)
 *         bmi_c.bmi_balsa_clear_ALGEB (A)
 *         return result             # <<<<<<<<<<<<<<
 * 
 * # equations
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_result);
  __pyx_r = __pyx_v_result;
  goto __pyx_L0;

  /* "../../bmi/sympy/DifferentialRing.pyx":375
 * 
 * # coeffs
 *     def coeffs (             # <<<<<<<<<<<<<<
 *             self,
 *             equation,
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("DifferentialAlgebra.DifferentialRing.coeffs", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XDECREF(__pyx_v_streqns);
  __Pyx_XDECREF(__pyx_v_strvar);
  __Pyx_XDECREF(__pyx_v_strgens);
  __Pyx_XDECREF(__pyx_v_strrels);
  __Pyx_XDECREF(__pyx_v_mesgerr);
  __Pyx_XDECREF(__pyx_v_strnot);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "../../bmi/sympy/DifferentialRing.pyx":562
 * 
 * # equations
 *     def equations (             # <<<<<<<<<<<<<<
 *             self,
 *             equations,
 */

/* Python wrapper */
static PyObject *__pyx_pw_19DifferentialAlgebra_16DifferentialRing_15equations(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_19DifferentialAlgebra_16DifferentialRing_14equations, "\n        A selection in a list of polynomials\n\n        INPUT:\n\n            `equations` -- a polynomial or a list of polynomials \n            `solved`    -- (default: False) a boolean\n            `selection` -- (default: None) a relational expression\n            `notation`  -- (default: 'undefined') a string\n\n        OUTPUT:\n\n            The same list, but processed according to the other\n            parameters.\n\n            If `solved` is True, the differential polynomials are\n            displayed as equations, solved with respect to their\n            leading rank.\n\n            The optional parameter `selection` is a relational\n            expression combining one of the keywords 'order', 'leader',\n            'rank' on the one side, with a value on the other side,\n            using one of the relational operators. Only the equations\n            which satisfy the condition are selected.\n\n            - If the keyword is 'order', then the value must be a\n              nonnegative integer.\n\n            - If the keyword is 'rank', then the value must be a\n              rank, including the special ranks 0 and 1.\n\n            - If the keyword is 'leader', and the relational\n              operator is '>=', '>', '<=' or '<', then the value must\n              be a derivative.\n\n            - If the keyword is 'leader', and the relational\n              operator is '==' or '!=', then the value may also have\n              the form: 'modifier' (derivative), where 'modifier'\n              is one of the keywords 'derivative' or 'proper'.\n\n        EXAMPLES:\n\n            >>> from sympy import *\n            >>> from DifferentialAlgebra import *\n            >>> init_printing (use_unicode = False, num_columns = 60)\n\n            >>> x,y = var('x,y')\n            >>> w,z,a = function ('w,z,a') \n            >>> R = DifferentialRing (derivations = [x,y], \n            ...             blocks = [[w,a],z], parameters = [a(y)]) \n            >>> L"" = [0, 18, a(y)**2, Derivative(a(y),y), w(x,y)-z(x,y)]\n            >>> leader,order,rank = var('leader,order,rank')\n            >>> derivative,proper = function('derivative,proper')\n\n        Basic call:\n\n            >>> R.equations (L) \n                     2     d                           \n            [0, 18, a (y), --(a(y)), w(x, y) - z(x, y)]\n                           dy                          \n\n        The only polynomial with rank 0 is 0:\n\n            >>> R.equations (L, selection = Eq(rank,0))\n            [0]\n\n        The polynomials with rank 1 are the nonzero numbers:\n\n            >>> R.equations (L, selection = Eq(rank,1))\n            [18]\n\n        The polynomials which are not numbers, solved with respect to\n        their leaders:\n\n            >>> R.equations (L, solved = True, selection = rank > 1)\n              2         d                               \n            [a (y) = 0, --(a(y)) = 0, w(x, y) = z(x, y)]\n                        dy                              \n\n        The polynomials whose leaders are derivatives of a(y):\n\n            >>> R.equations (L, selection = Eq(leader,derivative(a(y))))\n              2     d        \n            [a (y), --(a(y))]\n                    dy       \n\n        The polynomials whose leaders are derivatives of w(x,y),\n        solved with respect to their leaders:\n\n            >>> R.equations (L, solved = True, \n            ...              selection = Eq(leader,derivative (w(x,y))))\n            [w(x, y) = z(x, y)]\n\n        Solving a single equation with respect to its leading\n        derivative:\n\n            >>> R.equations (w(x,y) - a(y), solved=True)\n            w(x, y) = a(y)\n        ");
static PyMethodDef __pyx_mdef_19DifferentialAlgebra_16DifferentialRing_15equations = {"equations", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_19DifferentialAlgebra_16DifferentialRing_15equations, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_19DifferentialAlgebra_16DifferentialRing_14equations};
static PyObject *__pyx_pw_19DifferentialAlgebra_16DifferentialRing_15equations(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_equations = 0;
  PyBoolObject *__pyx_v_solved = 0;
  PyObject *__pyx_v_selection = 0;
  PyObject *__pyx_v_notation = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[4] = {0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("equations (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_equations,&__pyx_n_s_solved,&__pyx_n_s_selection,&__pyx_n_s_notation,0};

    /* "../../bmi/sympy/DifferentialRing.pyx":565
 *             self,
 *             equations,
 *             bool solved = False,             # <<<<<<<<<<<<<<
 *             selection = None,
 *             notation = BMI_IX_undefined):
 */
    values[1] = __Pyx_Arg_NewRef_FASTCALL((PyObject *)((PyBoolObject *)Py_False));

    /* "../../bmi/sympy/DifferentialRing.pyx":566
 *             equations,
 *             bool solved = False,
 *             selection = None,             # <<<<<<<<<<<<<<
 *             notation = BMI_IX_undefined):
 *         r"""
 */
    values[2] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
    values[3] = __Pyx_Arg_NewRef_FASTCALL(__pyx_k__11);
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_equations)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 562, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_solved);
          if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 562, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_selection);
          if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 562, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_notation);
          if (value) { values[3] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 562, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "equations") < 0)) __PYX_ERR(0, 562, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_equations = values[0];
    __pyx_v_solved = ((PyBoolObject *)values[1]);
    __pyx_v_selection = values[2];
    __pyx_v_notation = values[3];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("equations", 0, 1, 4, __pyx_nargs); __PYX_ERR(0, 562, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("DifferentialAlgebra.DifferentialRing.equations", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_solved), __pyx_ptype_7cpython_4bool_bool, 1, "solved", 0))) __PYX_ERR(0, 565, __pyx_L1_error)
  __pyx_r = __pyx_pf_19DifferentialAlgebra_16DifferentialRing_14equations(((struct __pyx_obj_19DifferentialAlgebra_DifferentialRing *)__pyx_v_self), __pyx_v_equations, __pyx_v_solved, __pyx_v_selection, __pyx_v_notation);

  /* "../../bmi/sympy/DifferentialRing.pyx":562
 * 
 * # equations
 *     def equations (             # <<<<<<<<<<<<<<
 *             self,
 *             equations,
 */

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_19DifferentialAlgebra_16DifferentialRing_14equations(struct __pyx_obj_19DifferentialAlgebra_DifferentialRing *__pyx_v_self, PyObject *__pyx_v_equations, PyBoolObject *__pyx_v_solved, PyObject *__pyx_v_selection, PyObject *__pyx_v_notation) {
  PyObject *__pyx_v_result = 0;
  PyObject *__pyx_v_streqns = 0;
  PyObject *__pyx_v_strsel = 0;
  PyObject *__pyx_v_mesgerr = 0;
  ALGEB_string __pyx_v_A;
  PyObject *__pyx_v_strnot = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  unsigned int __pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  char *__pyx_t_8;
  bool __pyx_t_9;
  bool __pyx_t_10;
  char *__pyx_t_11;
  char *__pyx_t_12;
  char *__pyx_t_13;
  int __pyx_t_14;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("equations", 1);

  /* "../../bmi/sympy/DifferentialRing.pyx":672
 *         cdef bmi_c.ALGEB_string A
 *         cdef strnot
 *         strnot = self.__process_notation (notation)             # <<<<<<<<<<<<<<
 *         if isinstance (equations, list):
 *             streqns = ascii (equations)
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_DifferentialRing__process_notat); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 672, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_notation};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 672, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_v_strnot = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "../../bmi/sympy/DifferentialRing.pyx":673
 *         cdef strnot
 *         strnot = self.__process_notation (notation)
 *         if isinstance (equations, list):             # <<<<<<<<<<<<<<
 *             streqns = ascii (equations)
 *         else:
 */
  __pyx_t_5 = PyList_Check(__pyx_v_equations); 
  if (__pyx_t_5) {

    /* "../../bmi/sympy/DifferentialRing.pyx":674
 *         strnot = self.__process_notation (notation)
 *         if isinstance (equations, list):
 *             streqns = ascii (equations)             # <<<<<<<<<<<<<<
 *         else:
 *             streqns = ascii ([equations])
 */
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ascii); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 674, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = NULL;
    __pyx_t_4 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
        __pyx_t_4 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_equations};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 674, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    if (!(likely(PyBytes_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_1))) __PYX_ERR(0, 674, __pyx_L1_error)
    __pyx_v_streqns = ((PyObject*)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "../../bmi/sympy/DifferentialRing.pyx":673
 *         cdef strnot
 *         strnot = self.__process_notation (notation)
 *         if isinstance (equations, list):             # <<<<<<<<<<<<<<
 *             streqns = ascii (equations)
 *         else:
 */
    goto __pyx_L3;
  }

  /* "../../bmi/sympy/DifferentialRing.pyx":676
 *             streqns = ascii (equations)
 *         else:
 *             streqns = ascii ([equations])             # <<<<<<<<<<<<<<
 *         if selection == None:
 *             strsel = b"rank >= 0"
 */
  /*else*/ {
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ascii); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 676, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 676, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_v_equations);
    __Pyx_GIVEREF(__pyx_v_equations);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 0, __pyx_v_equations)) __PYX_ERR(0, 676, __pyx_L1_error);
    __pyx_t_6 = NULL;
    __pyx_t_4 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
        __pyx_t_4 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_3};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 676, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    if (!(likely(PyBytes_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_1))) __PYX_ERR(0, 676, __pyx_L1_error)
    __pyx_v_streqns = ((PyObject*)__pyx_t_1);
    __pyx_t_1 = 0;
  }
  __pyx_L3:;

  /* "../../bmi/sympy/DifferentialRing.pyx":677
 *         else:
 *             streqns = ascii ([equations])
 *         if selection == None:             # <<<<<<<<<<<<<<
 *             strsel = b"rank >= 0"
 *         elif isinstance (selection, sympy.core.relational.Equality):
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_selection, Py_None, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 677, __pyx_L1_error)
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 677, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_5) {

    /* "../../bmi/sympy/DifferentialRing.pyx":678
 *             streqns = ascii ([equations])
 *         if selection == None:
 *             strsel = b"rank >= 0"             # <<<<<<<<<<<<<<
 *         elif isinstance (selection, sympy.core.relational.Equality):
 *             strsel = ascii (str (selection.lhs) + str (selection.rel_op) \
 */
    __Pyx_INCREF(__pyx_kp_b_rank_0);
    __pyx_v_strsel = __pyx_kp_b_rank_0;

    /* "../../bmi/sympy/DifferentialRing.pyx":677
 *         else:
 *             streqns = ascii ([equations])
 *         if selection == None:             # <<<<<<<<<<<<<<
 *             strsel = b"rank >= 0"
 *         elif isinstance (selection, sympy.core.relational.Equality):
 */
    goto __pyx_L4;
  }

  /* "../../bmi/sympy/DifferentialRing.pyx":679
 *         if selection == None:
 *             strsel = b"rank >= 0"
 *         elif isinstance (selection, sympy.core.relational.Equality):             # <<<<<<<<<<<<<<
 *             strsel = ascii (str (selection.lhs) + str (selection.rel_op) \
 *                                 + str(selection.rhs))
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_sympy); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 679, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_core); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 679, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_relational); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 679, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_Equality); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 679, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_5 = PyObject_IsInstance(__pyx_v_selection, __pyx_t_2); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 679, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_5) {

    /* "../../bmi/sympy/DifferentialRing.pyx":680
 *             strsel = b"rank >= 0"
 *         elif isinstance (selection, sympy.core.relational.Equality):
 *             strsel = ascii (str (selection.lhs) + str (selection.rel_op) \             # <<<<<<<<<<<<<<
 *                                 + str(selection.rhs))
 *         else:
 */
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_ascii); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 680, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_selection, __pyx_n_s_lhs); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 680, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_6 = __Pyx_PyObject_Unicode(__pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 680, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_selection, __pyx_n_s_rel_op); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 680, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_7 = __Pyx_PyObject_Unicode(__pyx_t_3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 680, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyUnicode_ConcatInPlace(__pyx_t_6, __pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 680, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

    /* "../../bmi/sympy/DifferentialRing.pyx":681
 *         elif isinstance (selection, sympy.core.relational.Equality):
 *             strsel = ascii (str (selection.lhs) + str (selection.rel_op) \
 *                                 + str(selection.rhs))             # <<<<<<<<<<<<<<
 *         else:
 *             strsel = ascii (selection)
 */
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_selection, __pyx_n_s_rhs); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 681, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_6 = __Pyx_PyObject_Unicode(__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 681, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = __Pyx_PyUnicode_ConcatInPlace(__pyx_t_3, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 681, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = NULL;
    __pyx_t_4 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
        __pyx_t_4 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_7};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 680, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    }

    /* "../../bmi/sympy/DifferentialRing.pyx":680
 *             strsel = b"rank >= 0"
 *         elif isinstance (selection, sympy.core.relational.Equality):
 *             strsel = ascii (str (selection.lhs) + str (selection.rel_op) \             # <<<<<<<<<<<<<<
 *                                 + str(selection.rhs))
 *         else:
 */
    if (!(likely(PyBytes_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_2))) __PYX_ERR(0, 680, __pyx_L1_error)
    __pyx_v_strsel = ((PyObject*)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "../../bmi/sympy/DifferentialRing.pyx":679
 *         if selection == None:
 *             strsel = b"rank >= 0"
 *         elif isinstance (selection, sympy.core.relational.Equality):             # <<<<<<<<<<<<<<
 *             strsel = ascii (str (selection.lhs) + str (selection.rel_op) \
 *                                 + str(selection.rhs))
 */
    goto __pyx_L4;
  }

  /* "../../bmi/sympy/DifferentialRing.pyx":683
 *                                 + str(selection.rhs))
 *         else:
 *             strsel = ascii (selection)             # <<<<<<<<<<<<<<
 *         A = bmi_c.bmi_dapyx_equations_with_criterion_DR (
 *                     streqns, self.dring, int (False), int (solved), strsel,
 */
  /*else*/ {
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_ascii); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 683, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_7 = NULL;
    __pyx_t_4 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
        __pyx_t_4 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_v_selection};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 683, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    }
    if (!(likely(PyBytes_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_2))) __PYX_ERR(0, 683, __pyx_L1_error)
    __pyx_v_strsel = ((PyObject*)__pyx_t_2);
    __pyx_t_2 = 0;
  }
  __pyx_L4:;

  /* "../../bmi/sympy/DifferentialRing.pyx":685
 *             strsel = ascii (selection)
 *         A = bmi_c.bmi_dapyx_equations_with_criterion_DR (
 *                     streqns, self.dring, int (False), int (solved), strsel,             # <<<<<<<<<<<<<<
 *                     self.notation, strnot, 0, 0)
 *         if bmi_c.bmi_dapyx_is_error (A):
 */
  if (unlikely(__pyx_v_streqns == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
    __PYX_ERR(0, 685, __pyx_L1_error)
  }
  __pyx_t_8 = __Pyx_PyBytes_AsWritableString(__pyx_v_streqns); if (unlikely((!__pyx_t_8) && PyErr_Occurred())) __PYX_ERR(0, 685, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyNumber_Int(Py_False); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 685, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_9 = __Pyx_PyInt_As_bool(__pyx_t_2); if (unlikely((__pyx_t_9 == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 685, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyNumber_Int(((PyObject *)__pyx_v_solved)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 685, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_10 = __Pyx_PyInt_As_bool(__pyx_t_2); if (unlikely((__pyx_t_10 == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 685, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (unlikely(__pyx_v_strsel == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
    __PYX_ERR(0, 685, __pyx_L1_error)
  }
  __pyx_t_11 = __Pyx_PyBytes_AsWritableString(__pyx_v_strsel); if (unlikely((!__pyx_t_11) && PyErr_Occurred())) __PYX_ERR(0, 685, __pyx_L1_error)

  /* "../../bmi/sympy/DifferentialRing.pyx":686
 *         A = bmi_c.bmi_dapyx_equations_with_criterion_DR (
 *                     streqns, self.dring, int (False), int (solved), strsel,
 *                     self.notation, strnot, 0, 0)             # <<<<<<<<<<<<<<
 *         if bmi_c.bmi_dapyx_is_error (A):
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (A)
 */
  if (unlikely(__pyx_v_self->notation == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
    __PYX_ERR(0, 686, __pyx_L1_error)
  }
  __pyx_t_12 = __Pyx_PyBytes_AsWritableString(__pyx_v_self->notation); if (unlikely((!__pyx_t_12) && PyErr_Occurred())) __PYX_ERR(0, 686, __pyx_L1_error)
  __pyx_t_13 = __Pyx_PyObject_AsWritableString(__pyx_v_strnot); if (unlikely((!__pyx_t_13) && PyErr_Occurred())) __PYX_ERR(0, 686, __pyx_L1_error)

  /* "../../bmi/sympy/DifferentialRing.pyx":684
 *         else:
 *             strsel = ascii (selection)
 *         A = bmi_c.bmi_dapyx_equations_with_criterion_DR (             # <<<<<<<<<<<<<<
 *                     streqns, self.dring, int (False), int (solved), strsel,
 *                     self.notation, strnot, 0, 0)
 */
  __pyx_v_A = bmi_dapyx_equations_with_criterion_DR(__pyx_t_8, __pyx_v_self->dring, __pyx_t_9, __pyx_t_10, __pyx_t_11, __pyx_t_12, __pyx_t_13, 0, 0);

  /* "../../bmi/sympy/DifferentialRing.pyx":687
 *                     streqns, self.dring, int (False), int (solved), strsel,
 *                     self.notation, strnot, 0, 0)
 *         if bmi_c.bmi_dapyx_is_error (A):             # <<<<<<<<<<<<<<
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (A)
 *             bmi_c.bmi_balsa_clear_ALGEB (A)
 */
  __pyx_t_5 = (bmi_dapyx_is_error(__pyx_v_A) != 0);
  if (unlikely(__pyx_t_5)) {

    /* "../../bmi/sympy/DifferentialRing.pyx":688
 *                     self.notation, strnot, 0, 0)
 *         if bmi_c.bmi_dapyx_is_error (A):
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (A)             # <<<<<<<<<<<<<<
 *             bmi_c.bmi_balsa_clear_ALGEB (A)
 *             raise RuntimeError (str (mesgerr, 'utf-8'))
 */
    __pyx_t_2 = __Pyx_PyBytes_FromString(bmi_dapyx_mesgerr(__pyx_v_A)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 688, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_mesgerr = ((PyObject*)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "../../bmi/sympy/DifferentialRing.pyx":689
 *         if bmi_c.bmi_dapyx_is_error (A):
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (A)
 *             bmi_c.bmi_balsa_clear_ALGEB (A)             # <<<<<<<<<<<<<<
 *             raise RuntimeError (str (mesgerr, 'utf-8'))
 *         result = eval (A.value, globals (), self.evdict)
 */
    bmi_balsa_clear_ALGEB(__pyx_v_A);

    /* "../../bmi/sympy/DifferentialRing.pyx":690
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (A)
 *             bmi_c.bmi_balsa_clear_ALGEB (A)
 *             raise RuntimeError (str (mesgerr, 'utf-8'))             # <<<<<<<<<<<<<<
 *         result = eval (A.value, globals (), self.evdict)
 *         if not isinstance (equations, list):
 */
    __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 690, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_v_mesgerr);
    __Pyx_GIVEREF(__pyx_v_mesgerr);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_mesgerr)) __PYX_ERR(0, 690, __pyx_L1_error);
    __Pyx_INCREF(__pyx_kp_u_utf_8);
    __Pyx_GIVEREF(__pyx_kp_u_utf_8);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_kp_u_utf_8)) __PYX_ERR(0, 690, __pyx_L1_error);
    __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)(&PyUnicode_Type)), __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 690, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_RuntimeError, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 690, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(0, 690, __pyx_L1_error)

    /* "../../bmi/sympy/DifferentialRing.pyx":687
 *                     streqns, self.dring, int (False), int (solved), strsel,
 *                     self.notation, strnot, 0, 0)
 *         if bmi_c.bmi_dapyx_is_error (A):             # <<<<<<<<<<<<<<
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (A)
 *             bmi_c.bmi_balsa_clear_ALGEB (A)
 */
  }

  /* "../../bmi/sympy/DifferentialRing.pyx":691
 *             bmi_c.bmi_balsa_clear_ALGEB (A)
 *             raise RuntimeError (str (mesgerr, 'utf-8'))
 *         result = eval (A.value, globals (), self.evdict)             # <<<<<<<<<<<<<<
 *         if not isinstance (equations, list):
 *             result = result [0]
 */
  __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v_A->value); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 691, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_Globals(); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 691, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_7 = PyTuple_New(3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 691, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_GIVEREF(__pyx_t_2);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_2)) __PYX_ERR(0, 691, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_1);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_1)) __PYX_ERR(0, 691, __pyx_L1_error);
  __Pyx_INCREF(__pyx_v_self->evdict);
  __Pyx_GIVEREF(__pyx_v_self->evdict);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_v_self->evdict)) __PYX_ERR(0, 691, __pyx_L1_error);
  __pyx_t_2 = 0;
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_eval, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 691, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_v_result = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "../../bmi/sympy/DifferentialRing.pyx":692
 *             raise RuntimeError (str (mesgerr, 'utf-8'))
 *         result = eval (A.value, globals (), self.evdict)
 *         if not isinstance (equations, list):             # <<<<<<<<<<<<<<
 *             result = result [0]
 *         bmi_c.bmi_balsa_clear_ALGEB (A)
 */
  __pyx_t_5 = PyList_Check(__pyx_v_equations); 
  __pyx_t_14 = (!__pyx_t_5);
  if (__pyx_t_14) {

    /* "../../bmi/sympy/DifferentialRing.pyx":693
 *         result = eval (A.value, globals (), self.evdict)
 *         if not isinstance (equations, list):
 *             result = result [0]             # <<<<<<<<<<<<<<
 *         bmi_c.bmi_balsa_clear_ALGEB (A)
 *         return result
 */
    __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_result, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 693, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF_SET(__pyx_v_result, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "../../bmi/sympy/DifferentialRing.pyx":692
 *             raise RuntimeError (str (mesgerr, 'utf-8'))
 *         result = eval (A.value, globals (), self.evdict)
 *         if not isinstance (equations, list):             # <<<<<<<<<<<<<<
 *             result = result [0]
 *         bmi_c.bmi_balsa_clear_ALGEB (A)
 */
  }

  /* "../../bmi/sympy/DifferentialRing.pyx":694
 *         if not isinstance (equations, list):
 *             result = result [0]
 *         bmi_c.bmi_balsa_clear_ALGEB (A)             # <<<<<<<<<<<<<<
 *         return result
 * 
 */
  bmi_balsa_clear_ALGEB(__pyx_v_A);

  /* "../../bmi/sympy/DifferentialRing.pyx":695
 *             result = result [0]
 *         bmi_c.bmi_balsa_clear_ALGEB (A)
 *         return result             # <<<<<<<<<<<<<<
 * 
 * # __process_evdict
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_result);
  __pyx_r = __pyx_v_result;
  goto __pyx_L0;

  /* "../../bmi/sympy/DifferentialRing.pyx":562
 * 
 * # equations
 *     def equations (             # <<<<<<<<<<<<<<
 *             self,
 *             equations,
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("DifferentialAlgebra.DifferentialRing.equations", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XDECREF(__pyx_v_streqns);
  __Pyx_XDECREF(__pyx_v_strsel);
  __Pyx_XDECREF(__pyx_v_mesgerr);
  __Pyx_XDECREF(__pyx_v_strnot);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "../../bmi/sympy/DifferentialRing.pyx":698
 * 
 * # __process_evdict
 *     def __process_evdict (             # <<<<<<<<<<<<<<
 *             self,
 *             evdict0) :
 */

/* Python wrapper */
static PyObject *__pyx_pw_19DifferentialAlgebra_16DifferentialRing_17_DifferentialRing__process_evdict(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_19DifferentialAlgebra_16DifferentialRing_16__process_evdict, "\n        Normalize the notation of keys in the evaluate dictionary\n\n        INPUT:\n\n            `evdict0` -- a dictionary as used by evaluate\n\n        OUTPUT:\n\n            The normalized dictionary. The only transform is this:\n            in the case of the Derivative notation, UndefinedFunction\n            (say w) are transformed into functions (say w(x)).\n\n        ");
static PyMethodDef __pyx_mdef_19DifferentialAlgebra_16DifferentialRing_17_DifferentialRing__process_evdict = {"_DifferentialRing__process_evdict", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_19DifferentialAlgebra_16DifferentialRing_17_DifferentialRing__process_evdict, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_19DifferentialAlgebra_16DifferentialRing_16__process_evdict};
static PyObject *__pyx_pw_19DifferentialAlgebra_16DifferentialRing_17_DifferentialRing__process_evdict(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_evdict0 = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_DifferentialRing__process_evdict (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_evdict0,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_evdict0)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 698, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "_DifferentialRing__process_evdict") < 0)) __PYX_ERR(0, 698, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_evdict0 = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_DifferentialRing__process_evdict", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 698, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("DifferentialAlgebra.DifferentialRing._DifferentialRing__process_evdict", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_19DifferentialAlgebra_16DifferentialRing_16__process_evdict(((struct __pyx_obj_19DifferentialAlgebra_DifferentialRing *)__pyx_v_self), __pyx_v_evdict0);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_19DifferentialAlgebra_16DifferentialRing_16__process_evdict(struct __pyx_obj_19DifferentialAlgebra_DifferentialRing *__pyx_v_self, PyObject *__pyx_v_evdict0) {
  PyObject *__pyx_v_evdict = NULL;
  PyObject *__pyx_v_key = NULL;
  ALGEB_string __pyx_v_A;
  char *__pyx_v_mesgerr;
  PyObject *__pyx_v_result = NULL;
  PyObject *__pyx_v_newkey = NULL;
  PyObject *__pyx_v_theta = NULL;
  PyObject *__pyx_v_y = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  PyObject *(*__pyx_t_3)(PyObject *);
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  unsigned int __pyx_t_9;
  char *__pyx_t_10;
  bool __pyx_t_11;
  char *__pyx_t_12;
  PyObject *(*__pyx_t_13)(PyObject *);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_DifferentialRing__process_evdict", 1);

  /* "../../bmi/sympy/DifferentialRing.pyx":715
 * 
 *         """
 *         evdict = dict ()             # <<<<<<<<<<<<<<
 *         for key in evdict0 :
 *             if self.notation == BMI_IX_Derivative:
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 715, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_evdict = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "../../bmi/sympy/DifferentialRing.pyx":716
 *         """
 *         evdict = dict ()
 *         for key in evdict0 :             # <<<<<<<<<<<<<<
 *             if self.notation == BMI_IX_Derivative:
 *                 if isinstance (key, sympy.core.function.UndefinedFunction) :
 */
  if (likely(PyList_CheckExact(__pyx_v_evdict0)) || PyTuple_CheckExact(__pyx_v_evdict0)) {
    __pyx_t_1 = __pyx_v_evdict0; __Pyx_INCREF(__pyx_t_1);
    __pyx_t_2 = 0;
    __pyx_t_3 = NULL;
  } else {
    __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_evdict0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 716, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 716, __pyx_L1_error)
  }
  for (;;) {
    if (likely(!__pyx_t_3)) {
      if (likely(PyList_CheckExact(__pyx_t_1))) {
        {
          Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1);
          #if !CYTHON_ASSUME_SAFE_MACROS
          if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 716, __pyx_L1_error)
          #endif
          if (__pyx_t_2 >= __pyx_temp) break;
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely((0 < 0))) __PYX_ERR(0, 716, __pyx_L1_error)
        #else
        __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 716, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
      } else {
        {
          Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1);
          #if !CYTHON_ASSUME_SAFE_MACROS
          if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 716, __pyx_L1_error)
          #endif
          if (__pyx_t_2 >= __pyx_temp) break;
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely((0 < 0))) __PYX_ERR(0, 716, __pyx_L1_error)
        #else
        __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 716, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
      }
    } else {
      __pyx_t_4 = __pyx_t_3(__pyx_t_1);
      if (unlikely(!__pyx_t_4)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 716, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_4);
    }
    __Pyx_XDECREF_SET(__pyx_v_key, __pyx_t_4);
    __pyx_t_4 = 0;

    /* "../../bmi/sympy/DifferentialRing.pyx":717
 *         evdict = dict ()
 *         for key in evdict0 :
 *             if self.notation == BMI_IX_Derivative:             # <<<<<<<<<<<<<<
 *                 if isinstance (key, sympy.core.function.UndefinedFunction) :
 *                     A = bmi_c.bmi_dapyx_leading_derivative (
 */
    __pyx_t_4 = __Pyx_PyBytes_FromString(__pyx_v_19DifferentialAlgebra_BMI_IX_Derivative); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 717, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = (__Pyx_PyBytes_Equals(__pyx_v_self->notation, __pyx_t_4, Py_EQ)); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 717, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (__pyx_t_5) {

      /* "../../bmi/sympy/DifferentialRing.pyx":718
 *         for key in evdict0 :
 *             if self.notation == BMI_IX_Derivative:
 *                 if isinstance (key, sympy.core.function.UndefinedFunction) :             # <<<<<<<<<<<<<<
 *                     A = bmi_c.bmi_dapyx_leading_derivative (
 *                             ascii ([key]), self.dring, int (False),
 */
      __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_sympy); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 718, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_core); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 718, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_function); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 718, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_UndefinedFunction); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 718, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_5 = PyObject_IsInstance(__pyx_v_key, __pyx_t_6); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 718, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (__pyx_t_5) {

        /* "../../bmi/sympy/DifferentialRing.pyx":720
 *                 if isinstance (key, sympy.core.function.UndefinedFunction) :
 *                     A = bmi_c.bmi_dapyx_leading_derivative (
 *                             ascii ([key]), self.dring, int (False),             # <<<<<<<<<<<<<<
 *                             BMI_IX_jet, self.notation, 0, 0)
 *                     if bmi_c.bmi_dapyx_is_error (A):
 */
        __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_ascii); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 720, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_7 = PyList_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 720, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_INCREF(__pyx_v_key);
        __Pyx_GIVEREF(__pyx_v_key);
        if (__Pyx_PyList_SET_ITEM(__pyx_t_7, 0, __pyx_v_key)) __PYX_ERR(0, 720, __pyx_L1_error);
        __pyx_t_8 = NULL;
        __pyx_t_9 = 0;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_4);
          if (likely(__pyx_t_8)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
            __Pyx_INCREF(__pyx_t_8);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_4, function);
            __pyx_t_9 = 1;
          }
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_t_7};
          __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_9, 1+__pyx_t_9);
          __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 720, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        }
        __pyx_t_10 = __Pyx_PyObject_AsWritableString(__pyx_t_6); if (unlikely((!__pyx_t_10) && PyErr_Occurred())) __PYX_ERR(0, 720, __pyx_L1_error)
        __pyx_t_4 = __Pyx_PyNumber_Int(Py_False); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 720, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_11 = __Pyx_PyInt_As_bool(__pyx_t_4); if (unlikely((__pyx_t_11 == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 720, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

        /* "../../bmi/sympy/DifferentialRing.pyx":721
 *                     A = bmi_c.bmi_dapyx_leading_derivative (
 *                             ascii ([key]), self.dring, int (False),
 *                             BMI_IX_jet, self.notation, 0, 0)             # <<<<<<<<<<<<<<
 *                     if bmi_c.bmi_dapyx_is_error (A):
 *                         mesgerr = bmi_c.bmi_dapyx_mesgerr (A)
 */
        if (unlikely(__pyx_v_self->notation == Py_None)) {
          PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
          __PYX_ERR(0, 721, __pyx_L1_error)
        }
        __pyx_t_12 = __Pyx_PyBytes_AsWritableString(__pyx_v_self->notation); if (unlikely((!__pyx_t_12) && PyErr_Occurred())) __PYX_ERR(0, 721, __pyx_L1_error)

        /* "../../bmi/sympy/DifferentialRing.pyx":719
 *             if self.notation == BMI_IX_Derivative:
 *                 if isinstance (key, sympy.core.function.UndefinedFunction) :
 *                     A = bmi_c.bmi_dapyx_leading_derivative (             # <<<<<<<<<<<<<<
 *                             ascii ([key]), self.dring, int (False),
 *                             BMI_IX_jet, self.notation, 0, 0)
 */
        __pyx_v_A = bmi_dapyx_leading_derivative(__pyx_t_10, __pyx_v_self->dring, __pyx_t_11, __pyx_v_19DifferentialAlgebra_BMI_IX_jet, __pyx_t_12, 0, 0);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

        /* "../../bmi/sympy/DifferentialRing.pyx":722
 *                             ascii ([key]), self.dring, int (False),
 *                             BMI_IX_jet, self.notation, 0, 0)
 *                     if bmi_c.bmi_dapyx_is_error (A):             # <<<<<<<<<<<<<<
 *                         mesgerr = bmi_c.bmi_dapyx_mesgerr (A)
 *                         bmi_c.bmi_balsa_clear_ALGEB (A)
 */
        __pyx_t_5 = (bmi_dapyx_is_error(__pyx_v_A) != 0);
        if (unlikely(__pyx_t_5)) {

          /* "../../bmi/sympy/DifferentialRing.pyx":723
 *                             BMI_IX_jet, self.notation, 0, 0)
 *                     if bmi_c.bmi_dapyx_is_error (A):
 *                         mesgerr = bmi_c.bmi_dapyx_mesgerr (A)             # <<<<<<<<<<<<<<
 *                         bmi_c.bmi_balsa_clear_ALGEB (A)
 *                         raise RuntimeError (str (mesgerr, 'utf-8'))
 */
          __pyx_v_mesgerr = bmi_dapyx_mesgerr(__pyx_v_A);

          /* "../../bmi/sympy/DifferentialRing.pyx":724
 *                     if bmi_c.bmi_dapyx_is_error (A):
 *                         mesgerr = bmi_c.bmi_dapyx_mesgerr (A)
 *                         bmi_c.bmi_balsa_clear_ALGEB (A)             # <<<<<<<<<<<<<<
 *                         raise RuntimeError (str (mesgerr, 'utf-8'))
 *                     result = eval (A.value, globals (), self.evdict)
 */
          bmi_balsa_clear_ALGEB(__pyx_v_A);

          /* "../../bmi/sympy/DifferentialRing.pyx":725
 *                         mesgerr = bmi_c.bmi_dapyx_mesgerr (A)
 *                         bmi_c.bmi_balsa_clear_ALGEB (A)
 *                         raise RuntimeError (str (mesgerr, 'utf-8'))             # <<<<<<<<<<<<<<
 *                     result = eval (A.value, globals (), self.evdict)
 *                     bmi_c.bmi_balsa_clear_ALGEB (A)
 */
          __pyx_t_6 = __Pyx_PyBytes_FromString(__pyx_v_mesgerr); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 725, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 725, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_GIVEREF(__pyx_t_6);
          if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6)) __PYX_ERR(0, 725, __pyx_L1_error);
          __Pyx_INCREF(__pyx_kp_u_utf_8);
          __Pyx_GIVEREF(__pyx_kp_u_utf_8);
          if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_kp_u_utf_8)) __PYX_ERR(0, 725, __pyx_L1_error);
          __pyx_t_6 = 0;
          __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)(&PyUnicode_Type)), __pyx_t_4, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 725, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_RuntimeError, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 725, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_Raise(__pyx_t_4, 0, 0, 0);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __PYX_ERR(0, 725, __pyx_L1_error)

          /* "../../bmi/sympy/DifferentialRing.pyx":722
 *                             ascii ([key]), self.dring, int (False),
 *                             BMI_IX_jet, self.notation, 0, 0)
 *                     if bmi_c.bmi_dapyx_is_error (A):             # <<<<<<<<<<<<<<
 *                         mesgerr = bmi_c.bmi_dapyx_mesgerr (A)
 *                         bmi_c.bmi_balsa_clear_ALGEB (A)
 */
        }

        /* "../../bmi/sympy/DifferentialRing.pyx":726
 *                         bmi_c.bmi_balsa_clear_ALGEB (A)
 *                         raise RuntimeError (str (mesgerr, 'utf-8'))
 *                     result = eval (A.value, globals (), self.evdict)             # <<<<<<<<<<<<<<
 *                     bmi_c.bmi_balsa_clear_ALGEB (A)
 *                     newkey = result[0]
 */
        __pyx_t_4 = __Pyx_PyBytes_FromString(__pyx_v_A->value); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 726, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_6 = __Pyx_Globals(); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 726, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_7 = PyTuple_New(3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 726, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_GIVEREF(__pyx_t_4);
        if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_4)) __PYX_ERR(0, 726, __pyx_L1_error);
        __Pyx_GIVEREF(__pyx_t_6);
        if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_6)) __PYX_ERR(0, 726, __pyx_L1_error);
        __Pyx_INCREF(__pyx_v_self->evdict);
        __Pyx_GIVEREF(__pyx_v_self->evdict);
        if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_v_self->evdict)) __PYX_ERR(0, 726, __pyx_L1_error);
        __pyx_t_4 = 0;
        __pyx_t_6 = 0;
        __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_eval, __pyx_t_7, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 726, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_XDECREF_SET(__pyx_v_result, __pyx_t_6);
        __pyx_t_6 = 0;

        /* "../../bmi/sympy/DifferentialRing.pyx":727
 *                         raise RuntimeError (str (mesgerr, 'utf-8'))
 *                     result = eval (A.value, globals (), self.evdict)
 *                     bmi_c.bmi_balsa_clear_ALGEB (A)             # <<<<<<<<<<<<<<
 *                     newkey = result[0]
 *                     evdict [newkey] = evdict0 [key]
 */
        bmi_balsa_clear_ALGEB(__pyx_v_A);

        /* "../../bmi/sympy/DifferentialRing.pyx":728
 *                     result = eval (A.value, globals (), self.evdict)
 *                     bmi_c.bmi_balsa_clear_ALGEB (A)
 *                     newkey = result[0]             # <<<<<<<<<<<<<<
 *                     evdict [newkey] = evdict0 [key]
 *                 else :
 */
        __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_result, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 728, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_XDECREF_SET(__pyx_v_newkey, __pyx_t_6);
        __pyx_t_6 = 0;

        /* "../../bmi/sympy/DifferentialRing.pyx":729
 *                     bmi_c.bmi_balsa_clear_ALGEB (A)
 *                     newkey = result[0]
 *                     evdict [newkey] = evdict0 [key]             # <<<<<<<<<<<<<<
 *                 else :
 *                     evdict [key] = evdict0 [key]
 */
        __pyx_t_6 = __Pyx_PyObject_GetItem(__pyx_v_evdict0, __pyx_v_key); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 729, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        if (unlikely((PyDict_SetItem(__pyx_v_evdict, __pyx_v_newkey, __pyx_t_6) < 0))) __PYX_ERR(0, 729, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

        /* "../../bmi/sympy/DifferentialRing.pyx":718
 *         for key in evdict0 :
 *             if self.notation == BMI_IX_Derivative:
 *                 if isinstance (key, sympy.core.function.UndefinedFunction) :             # <<<<<<<<<<<<<<
 *                     A = bmi_c.bmi_dapyx_leading_derivative (
 *                             ascii ([key]), self.dring, int (False),
 */
        goto __pyx_L6;
      }

      /* "../../bmi/sympy/DifferentialRing.pyx":731
 *                     evdict [newkey] = evdict0 [key]
 *                 else :
 *                     evdict [key] = evdict0 [key]             # <<<<<<<<<<<<<<
 *             else :
 *                 theta, y = self.factor_derivative (key)
 */
      /*else*/ {
        __pyx_t_6 = __Pyx_PyObject_GetItem(__pyx_v_evdict0, __pyx_v_key); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 731, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        if (unlikely((PyDict_SetItem(__pyx_v_evdict, __pyx_v_key, __pyx_t_6) < 0))) __PYX_ERR(0, 731, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      }
      __pyx_L6:;

      /* "../../bmi/sympy/DifferentialRing.pyx":717
 *         evdict = dict ()
 *         for key in evdict0 :
 *             if self.notation == BMI_IX_Derivative:             # <<<<<<<<<<<<<<
 *                 if isinstance (key, sympy.core.function.UndefinedFunction) :
 *                     A = bmi_c.bmi_dapyx_leading_derivative (
 */
      goto __pyx_L5;
    }

    /* "../../bmi/sympy/DifferentialRing.pyx":733
 *                     evdict [key] = evdict0 [key]
 *             else :
 *                 theta, y = self.factor_derivative (key)             # <<<<<<<<<<<<<<
 *                 if theta == 1 :
 *                     evdict [y] = evdict0 [key]
 */
    /*else*/ {
      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_factor_derivative); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 733, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_4 = NULL;
      __pyx_t_9 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_7))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_7);
        if (likely(__pyx_t_4)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_7, function);
          __pyx_t_9 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_key};
        __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_9, 1+__pyx_t_9);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 733, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      }
      if ((likely(PyTuple_CheckExact(__pyx_t_6))) || (PyList_CheckExact(__pyx_t_6))) {
        PyObject* sequence = __pyx_t_6;
        Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
        if (unlikely(size != 2)) {
          if (size > 2) __Pyx_RaiseTooManyValuesError(2);
          else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
          __PYX_ERR(0, 733, __pyx_L1_error)
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        if (likely(PyTuple_CheckExact(sequence))) {
          __pyx_t_7 = PyTuple_GET_ITEM(sequence, 0); 
          __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1); 
        } else {
          __pyx_t_7 = PyList_GET_ITEM(sequence, 0); 
          __pyx_t_4 = PyList_GET_ITEM(sequence, 1); 
        }
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_4);
        #else
        __pyx_t_7 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 733, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 733, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      } else {
        Py_ssize_t index = -1;
        __pyx_t_8 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 733, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __pyx_t_13 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_8);
        index = 0; __pyx_t_7 = __pyx_t_13(__pyx_t_8); if (unlikely(!__pyx_t_7)) goto __pyx_L8_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_7);
        index = 1; __pyx_t_4 = __pyx_t_13(__pyx_t_8); if (unlikely(!__pyx_t_4)) goto __pyx_L8_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_4);
        if (__Pyx_IternextUnpackEndCheck(__pyx_t_13(__pyx_t_8), 2) < 0) __PYX_ERR(0, 733, __pyx_L1_error)
        __pyx_t_13 = NULL;
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        goto __pyx_L9_unpacking_done;
        __pyx_L8_unpacking_failed:;
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __pyx_t_13 = NULL;
        if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
        __PYX_ERR(0, 733, __pyx_L1_error)
        __pyx_L9_unpacking_done:;
      }
      __Pyx_XDECREF_SET(__pyx_v_theta, __pyx_t_7);
      __pyx_t_7 = 0;
      __Pyx_XDECREF_SET(__pyx_v_y, __pyx_t_4);
      __pyx_t_4 = 0;

      /* "../../bmi/sympy/DifferentialRing.pyx":734
 *             else :
 *                 theta, y = self.factor_derivative (key)
 *                 if theta == 1 :             # <<<<<<<<<<<<<<
 *                     evdict [y] = evdict0 [key]
 *                 else :
 */
      __pyx_t_5 = (__Pyx_PyInt_BoolEqObjC(__pyx_v_theta, __pyx_int_1, 1, 0)); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 734, __pyx_L1_error)
      if (__pyx_t_5) {

        /* "../../bmi/sympy/DifferentialRing.pyx":735
 *                 theta, y = self.factor_derivative (key)
 *                 if theta == 1 :
 *                     evdict [y] = evdict0 [key]             # <<<<<<<<<<<<<<
 *                 else :
 *                     evdict [key] = evdict0 [key]
 */
        __pyx_t_6 = __Pyx_PyObject_GetItem(__pyx_v_evdict0, __pyx_v_key); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 735, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        if (unlikely((PyDict_SetItem(__pyx_v_evdict, __pyx_v_y, __pyx_t_6) < 0))) __PYX_ERR(0, 735, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

        /* "../../bmi/sympy/DifferentialRing.pyx":734
 *             else :
 *                 theta, y = self.factor_derivative (key)
 *                 if theta == 1 :             # <<<<<<<<<<<<<<
 *                     evdict [y] = evdict0 [key]
 *                 else :
 */
        goto __pyx_L10;
      }

      /* "../../bmi/sympy/DifferentialRing.pyx":737
 *                     evdict [y] = evdict0 [key]
 *                 else :
 *                     evdict [key] = evdict0 [key]             # <<<<<<<<<<<<<<
 *         return evdict
 * 
 */
      /*else*/ {
        __pyx_t_6 = __Pyx_PyObject_GetItem(__pyx_v_evdict0, __pyx_v_key); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 737, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        if (unlikely((PyDict_SetItem(__pyx_v_evdict, __pyx_v_key, __pyx_t_6) < 0))) __PYX_ERR(0, 737, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      }
      __pyx_L10:;
    }
    __pyx_L5:;

    /* "../../bmi/sympy/DifferentialRing.pyx":716
 *         """
 *         evdict = dict ()
 *         for key in evdict0 :             # <<<<<<<<<<<<<<
 *             if self.notation == BMI_IX_Derivative:
 *                 if isinstance (key, sympy.core.function.UndefinedFunction) :
 */
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "../../bmi/sympy/DifferentialRing.pyx":738
 *                 else :
 *                     evdict [key] = evdict0 [key]
 *         return evdict             # <<<<<<<<<<<<<<
 * 
 * # __evaluate
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_evdict);
  __pyx_r = __pyx_v_evdict;
  goto __pyx_L0;

  /* "../../bmi/sympy/DifferentialRing.pyx":698
 * 
 * # __process_evdict
 *     def __process_evdict (             # <<<<<<<<<<<<<<
 *             self,
 *             evdict0) :
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("DifferentialAlgebra.DifferentialRing._DifferentialRing__process_evdict", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_evdict);
  __Pyx_XDECREF(__pyx_v_key);
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XDECREF(__pyx_v_newkey);
  __Pyx_XDECREF(__pyx_v_theta);
  __Pyx_XDECREF(__pyx_v_y);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "../../bmi/sympy/DifferentialRing.pyx":741
 * 
 * # __evaluate
 *     def __evaluate (             # <<<<<<<<<<<<<<
 *             self,
 *             P,
 */

/* Python wrapper */
static PyObject *__pyx_pw_19DifferentialAlgebra_16DifferentialRing_19_DifferentialRing__evaluate(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_19DifferentialAlgebra_16DifferentialRing_18__evaluate, "\n        Subfunction of evaluate\n        ");
static PyMethodDef __pyx_mdef_19DifferentialAlgebra_16DifferentialRing_19_DifferentialRing__evaluate = {"_DifferentialRing__evaluate", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_19DifferentialAlgebra_16DifferentialRing_19_DifferentialRing__evaluate, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_19DifferentialAlgebra_16DifferentialRing_18__evaluate};
static PyObject *__pyx_pw_19DifferentialAlgebra_16DifferentialRing_19_DifferentialRing__evaluate(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_P = 0;
  PyObject *__pyx_v_evdict = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_DifferentialRing__evaluate (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_P,&__pyx_n_s_evdict,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_P)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 741, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_evdict)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 741, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("_DifferentialRing__evaluate", 1, 2, 2, 1); __PYX_ERR(0, 741, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "_DifferentialRing__evaluate") < 0)) __PYX_ERR(0, 741, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
    }
    __pyx_v_P = values[0];
    __pyx_v_evdict = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_DifferentialRing__evaluate", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 741, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("DifferentialAlgebra.DifferentialRing._DifferentialRing__evaluate", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_19DifferentialAlgebra_16DifferentialRing_18__evaluate(((struct __pyx_obj_19DifferentialAlgebra_DifferentialRing *)__pyx_v_self), __pyx_v_P, __pyx_v_evdict);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_19DifferentialAlgebra_16DifferentialRing_18__evaluate(struct __pyx_obj_19DifferentialAlgebra_DifferentialRing *__pyx_v_self, PyObject *__pyx_v_P, PyObject *__pyx_v_evdict) {
  PyObject *__pyx_v_newargs = 0;
  PyObject *__pyx_v_theta = 0;
  PyObject *__pyx_v_y = 0;
  PyObject *__pyx_v_result = 0;
  PyObject *__pyx_v_ders = 0;
  PyObject *__pyx_v_x = 0;
  PyObject *__pyx_v_d = 0;
  PyObject *__pyx_8genexpr9__pyx_v_arg = NULL;
  PyObject *__pyx_9genexpr10__pyx_v_arg = NULL;
  PyObject *__pyx_9genexpr11__pyx_v_arg = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  Py_ssize_t __pyx_t_6;
  PyObject *(*__pyx_t_7)(PyObject *);
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  unsigned int __pyx_t_10;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  PyObject *__pyx_t_15 = NULL;
  PyObject *__pyx_t_16 = NULL;
  PyObject *__pyx_t_17 = NULL;
  PyObject *__pyx_t_18 = NULL;
  PyObject *(*__pyx_t_19)(PyObject *);
  PyObject *__pyx_t_20 = NULL;
  int __pyx_t_21;
  PyObject *__pyx_t_22 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_DifferentialRing__evaluate", 1);

  /* "../../bmi/sympy/DifferentialRing.pyx":749
 *         """
 *         cdef newargs, theta, y, result, ders, x, d
 *         if isinstance (P, Add) or isinstance (P, Mul) or isinstance (P, Pow):             # <<<<<<<<<<<<<<
 *             newargs = [ self.evaluate (arg, evdict) for arg in P.args ]
 *             return P.func (*newargs)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_Add); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 749, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyObject_IsInstance(__pyx_v_P, __pyx_t_2); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 749, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (!__pyx_t_3) {
  } else {
    __pyx_t_1 = __pyx_t_3;
    goto __pyx_L4_bool_binop_done;
  }
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_Mul); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 749, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyObject_IsInstance(__pyx_v_P, __pyx_t_2); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 749, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (!__pyx_t_3) {
  } else {
    __pyx_t_1 = __pyx_t_3;
    goto __pyx_L4_bool_binop_done;
  }
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_Pow); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 749, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyObject_IsInstance(__pyx_v_P, __pyx_t_2); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 749, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_1 = __pyx_t_3;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_1) {

    /* "../../bmi/sympy/DifferentialRing.pyx":750
 *         cdef newargs, theta, y, result, ders, x, d
 *         if isinstance (P, Add) or isinstance (P, Mul) or isinstance (P, Pow):
 *             newargs = [ self.evaluate (arg, evdict) for arg in P.args ]             # <<<<<<<<<<<<<<
 *             return P.func (*newargs)
 *         elif isinstance (P, Integer) or isinstance (P, Rational) :
 */
    { /* enter inner scope */
      __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 750, __pyx_L9_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_P, __pyx_n_s_args); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 750, __pyx_L9_error)
      __Pyx_GOTREF(__pyx_t_4);
      if (likely(PyList_CheckExact(__pyx_t_4)) || PyTuple_CheckExact(__pyx_t_4)) {
        __pyx_t_5 = __pyx_t_4; __Pyx_INCREF(__pyx_t_5);
        __pyx_t_6 = 0;
        __pyx_t_7 = NULL;
      } else {
        __pyx_t_6 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 750, __pyx_L9_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_7 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_5); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 750, __pyx_L9_error)
      }
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      for (;;) {
        if (likely(!__pyx_t_7)) {
          if (likely(PyList_CheckExact(__pyx_t_5))) {
            {
              Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_5);
              #if !CYTHON_ASSUME_SAFE_MACROS
              if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 750, __pyx_L9_error)
              #endif
              if (__pyx_t_6 >= __pyx_temp) break;
            }
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_4 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_6); __Pyx_INCREF(__pyx_t_4); __pyx_t_6++; if (unlikely((0 < 0))) __PYX_ERR(0, 750, __pyx_L9_error)
            #else
            __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_5, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 750, __pyx_L9_error)
            __Pyx_GOTREF(__pyx_t_4);
            #endif
          } else {
            {
              Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_5);
              #if !CYTHON_ASSUME_SAFE_MACROS
              if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 750, __pyx_L9_error)
              #endif
              if (__pyx_t_6 >= __pyx_temp) break;
            }
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_6); __Pyx_INCREF(__pyx_t_4); __pyx_t_6++; if (unlikely((0 < 0))) __PYX_ERR(0, 750, __pyx_L9_error)
            #else
            __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_5, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 750, __pyx_L9_error)
            __Pyx_GOTREF(__pyx_t_4);
            #endif
          }
        } else {
          __pyx_t_4 = __pyx_t_7(__pyx_t_5);
          if (unlikely(!__pyx_t_4)) {
            PyObject* exc_type = PyErr_Occurred();
            if (exc_type) {
              if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
              else __PYX_ERR(0, 750, __pyx_L9_error)
            }
            break;
          }
          __Pyx_GOTREF(__pyx_t_4);
        }
        __Pyx_XDECREF_SET(__pyx_8genexpr9__pyx_v_arg, __pyx_t_4);
        __pyx_t_4 = 0;
        __pyx_t_8 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_evaluate); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 750, __pyx_L9_error)
        __Pyx_GOTREF(__pyx_t_8);
        __pyx_t_9 = NULL;
        __pyx_t_10 = 0;
        #if CYTHON_UNPACK_METHODS
        if (likely(PyMethod_Check(__pyx_t_8))) {
          __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8);
          if (likely(__pyx_t_9)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
            __Pyx_INCREF(__pyx_t_9);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_8, function);
            __pyx_t_10 = 1;
          }
        }
        #endif
        {
          PyObject *__pyx_callargs[3] = {__pyx_t_9, __pyx_8genexpr9__pyx_v_arg, __pyx_v_evdict};
          __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+1-__pyx_t_10, 2+__pyx_t_10);
          __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
          if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 750, __pyx_L9_error)
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        }
        if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_4))) __PYX_ERR(0, 750, __pyx_L9_error)
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      }
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_XDECREF(__pyx_8genexpr9__pyx_v_arg); __pyx_8genexpr9__pyx_v_arg = 0;
      goto __pyx_L13_exit_scope;
      __pyx_L9_error:;
      __Pyx_XDECREF(__pyx_8genexpr9__pyx_v_arg); __pyx_8genexpr9__pyx_v_arg = 0;
      goto __pyx_L1_error;
      __pyx_L13_exit_scope:;
    } /* exit inner scope */
    __pyx_v_newargs = __pyx_t_2;
    __pyx_t_2 = 0;

    /* "../../bmi/sympy/DifferentialRing.pyx":751
 *         if isinstance (P, Add) or isinstance (P, Mul) or isinstance (P, Pow):
 *             newargs = [ self.evaluate (arg, evdict) for arg in P.args ]
 *             return P.func (*newargs)             # <<<<<<<<<<<<<<
 *         elif isinstance (P, Integer) or isinstance (P, Rational) :
 *             return P
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_P, __pyx_n_s_func); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 751, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_5 = __Pyx_PySequence_Tuple(__pyx_v_newargs); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 751, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 751, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L0;

    /* "../../bmi/sympy/DifferentialRing.pyx":749
 *         """
 *         cdef newargs, theta, y, result, ders, x, d
 *         if isinstance (P, Add) or isinstance (P, Mul) or isinstance (P, Pow):             # <<<<<<<<<<<<<<
 *             newargs = [ self.evaluate (arg, evdict) for arg in P.args ]
 *             return P.func (*newargs)
 */
  }

  /* "../../bmi/sympy/DifferentialRing.pyx":752
 *             newargs = [ self.evaluate (arg, evdict) for arg in P.args ]
 *             return P.func (*newargs)
 *         elif isinstance (P, Integer) or isinstance (P, Rational) :             # <<<<<<<<<<<<<<
 *             return P
 *         elif isinstance (P, list) :
 */
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_Integer); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 752, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = PyObject_IsInstance(__pyx_v_P, __pyx_t_4); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 752, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (!__pyx_t_3) {
  } else {
    __pyx_t_1 = __pyx_t_3;
    goto __pyx_L14_bool_binop_done;
  }
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_Rational); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 752, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = PyObject_IsInstance(__pyx_v_P, __pyx_t_4); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 752, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_1 = __pyx_t_3;
  __pyx_L14_bool_binop_done:;
  if (__pyx_t_1) {

    /* "../../bmi/sympy/DifferentialRing.pyx":753
 *             return P.func (*newargs)
 *         elif isinstance (P, Integer) or isinstance (P, Rational) :
 *             return P             # <<<<<<<<<<<<<<
 *         elif isinstance (P, list) :
 *             return [ self.evaluate (arg, evdict) for arg in P ]
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_P);
    __pyx_r = __pyx_v_P;
    goto __pyx_L0;

    /* "../../bmi/sympy/DifferentialRing.pyx":752
 *             newargs = [ self.evaluate (arg, evdict) for arg in P.args ]
 *             return P.func (*newargs)
 *         elif isinstance (P, Integer) or isinstance (P, Rational) :             # <<<<<<<<<<<<<<
 *             return P
 *         elif isinstance (P, list) :
 */
  }

  /* "../../bmi/sympy/DifferentialRing.pyx":754
 *         elif isinstance (P, Integer) or isinstance (P, Rational) :
 *             return P
 *         elif isinstance (P, list) :             # <<<<<<<<<<<<<<
 *             return [ self.evaluate (arg, evdict) for arg in P ]
 *         elif isinstance (P, set) :
 */
  __pyx_t_1 = PyList_Check(__pyx_v_P); 
  if (__pyx_t_1) {

    /* "../../bmi/sympy/DifferentialRing.pyx":755
 *             return P
 *         elif isinstance (P, list) :
 *             return [ self.evaluate (arg, evdict) for arg in P ]             # <<<<<<<<<<<<<<
 *         elif isinstance (P, set) :
 *             return { self.evaluate (arg, evdict) for arg in P }
 */
    __Pyx_XDECREF(__pyx_r);
    { /* enter inner scope */
      __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 755, __pyx_L18_error)
      __Pyx_GOTREF(__pyx_t_4);
      if (likely(PyList_CheckExact(__pyx_v_P)) || PyTuple_CheckExact(__pyx_v_P)) {
        __pyx_t_5 = __pyx_v_P; __Pyx_INCREF(__pyx_t_5);
        __pyx_t_6 = 0;
        __pyx_t_7 = NULL;
      } else {
        __pyx_t_6 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_v_P); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 755, __pyx_L18_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_7 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_5); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 755, __pyx_L18_error)
      }
      for (;;) {
        if (likely(!__pyx_t_7)) {
          if (likely(PyList_CheckExact(__pyx_t_5))) {
            {
              Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_5);
              #if !CYTHON_ASSUME_SAFE_MACROS
              if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 755, __pyx_L18_error)
              #endif
              if (__pyx_t_6 >= __pyx_temp) break;
            }
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_2 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_6); __Pyx_INCREF(__pyx_t_2); __pyx_t_6++; if (unlikely((0 < 0))) __PYX_ERR(0, 755, __pyx_L18_error)
            #else
            __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_5, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 755, __pyx_L18_error)
            __Pyx_GOTREF(__pyx_t_2);
            #endif
          } else {
            {
              Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_5);
              #if !CYTHON_ASSUME_SAFE_MACROS
              if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 755, __pyx_L18_error)
              #endif
              if (__pyx_t_6 >= __pyx_temp) break;
            }
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_6); __Pyx_INCREF(__pyx_t_2); __pyx_t_6++; if (unlikely((0 < 0))) __PYX_ERR(0, 755, __pyx_L18_error)
            #else
            __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_5, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 755, __pyx_L18_error)
            __Pyx_GOTREF(__pyx_t_2);
            #endif
          }
        } else {
          __pyx_t_2 = __pyx_t_7(__pyx_t_5);
          if (unlikely(!__pyx_t_2)) {
            PyObject* exc_type = PyErr_Occurred();
            if (exc_type) {
              if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
              else __PYX_ERR(0, 755, __pyx_L18_error)
            }
            break;
          }
          __Pyx_GOTREF(__pyx_t_2);
        }
        __Pyx_XDECREF_SET(__pyx_9genexpr10__pyx_v_arg, __pyx_t_2);
        __pyx_t_2 = 0;
        __pyx_t_8 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_evaluate); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 755, __pyx_L18_error)
        __Pyx_GOTREF(__pyx_t_8);
        __pyx_t_9 = NULL;
        __pyx_t_10 = 0;
        #if CYTHON_UNPACK_METHODS
        if (likely(PyMethod_Check(__pyx_t_8))) {
          __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8);
          if (likely(__pyx_t_9)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
            __Pyx_INCREF(__pyx_t_9);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_8, function);
            __pyx_t_10 = 1;
          }
        }
        #endif
        {
          PyObject *__pyx_callargs[3] = {__pyx_t_9, __pyx_9genexpr10__pyx_v_arg, __pyx_v_evdict};
          __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+1-__pyx_t_10, 2+__pyx_t_10);
          __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 755, __pyx_L18_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        }
        if (unlikely(__Pyx_ListComp_Append(__pyx_t_4, (PyObject*)__pyx_t_2))) __PYX_ERR(0, 755, __pyx_L18_error)
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      }
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_XDECREF(__pyx_9genexpr10__pyx_v_arg); __pyx_9genexpr10__pyx_v_arg = 0;
      goto __pyx_L22_exit_scope;
      __pyx_L18_error:;
      __Pyx_XDECREF(__pyx_9genexpr10__pyx_v_arg); __pyx_9genexpr10__pyx_v_arg = 0;
      goto __pyx_L1_error;
      __pyx_L22_exit_scope:;
    } /* exit inner scope */
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L0;

    /* "../../bmi/sympy/DifferentialRing.pyx":754
 *         elif isinstance (P, Integer) or isinstance (P, Rational) :
 *             return P
 *         elif isinstance (P, list) :             # <<<<<<<<<<<<<<
 *             return [ self.evaluate (arg, evdict) for arg in P ]
 *         elif isinstance (P, set) :
 */
  }

  /* "../../bmi/sympy/DifferentialRing.pyx":756
 *         elif isinstance (P, list) :
 *             return [ self.evaluate (arg, evdict) for arg in P ]
 *         elif isinstance (P, set) :             # <<<<<<<<<<<<<<
 *             return { self.evaluate (arg, evdict) for arg in P }
 *         else :
 */
  __pyx_t_1 = PySet_Check(__pyx_v_P); 
  if (__pyx_t_1) {

    /* "../../bmi/sympy/DifferentialRing.pyx":757
 *             return [ self.evaluate (arg, evdict) for arg in P ]
 *         elif isinstance (P, set) :
 *             return { self.evaluate (arg, evdict) for arg in P }             # <<<<<<<<<<<<<<
 *         else :
 *             try :
 */
    __Pyx_XDECREF(__pyx_r);
    { /* enter inner scope */
      __pyx_t_4 = PySet_New(NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 757, __pyx_L25_error)
      __Pyx_GOTREF(__pyx_t_4);
      if (likely(PyList_CheckExact(__pyx_v_P)) || PyTuple_CheckExact(__pyx_v_P)) {
        __pyx_t_5 = __pyx_v_P; __Pyx_INCREF(__pyx_t_5);
        __pyx_t_6 = 0;
        __pyx_t_7 = NULL;
      } else {
        __pyx_t_6 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_v_P); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 757, __pyx_L25_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_7 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_5); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 757, __pyx_L25_error)
      }
      for (;;) {
        if (likely(!__pyx_t_7)) {
          if (likely(PyList_CheckExact(__pyx_t_5))) {
            {
              Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_5);
              #if !CYTHON_ASSUME_SAFE_MACROS
              if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 757, __pyx_L25_error)
              #endif
              if (__pyx_t_6 >= __pyx_temp) break;
            }
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_2 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_6); __Pyx_INCREF(__pyx_t_2); __pyx_t_6++; if (unlikely((0 < 0))) __PYX_ERR(0, 757, __pyx_L25_error)
            #else
            __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_5, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 757, __pyx_L25_error)
            __Pyx_GOTREF(__pyx_t_2);
            #endif
          } else {
            {
              Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_5);
              #if !CYTHON_ASSUME_SAFE_MACROS
              if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 757, __pyx_L25_error)
              #endif
              if (__pyx_t_6 >= __pyx_temp) break;
            }
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_6); __Pyx_INCREF(__pyx_t_2); __pyx_t_6++; if (unlikely((0 < 0))) __PYX_ERR(0, 757, __pyx_L25_error)
            #else
            __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_5, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 757, __pyx_L25_error)
            __Pyx_GOTREF(__pyx_t_2);
            #endif
          }
        } else {
          __pyx_t_2 = __pyx_t_7(__pyx_t_5);
          if (unlikely(!__pyx_t_2)) {
            PyObject* exc_type = PyErr_Occurred();
            if (exc_type) {
              if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
              else __PYX_ERR(0, 757, __pyx_L25_error)
            }
            break;
          }
          __Pyx_GOTREF(__pyx_t_2);
        }
        __Pyx_XDECREF_SET(__pyx_9genexpr11__pyx_v_arg, __pyx_t_2);
        __pyx_t_2 = 0;
        __pyx_t_8 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_evaluate); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 757, __pyx_L25_error)
        __Pyx_GOTREF(__pyx_t_8);
        __pyx_t_9 = NULL;
        __pyx_t_10 = 0;
        #if CYTHON_UNPACK_METHODS
        if (likely(PyMethod_Check(__pyx_t_8))) {
          __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8);
          if (likely(__pyx_t_9)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
            __Pyx_INCREF(__pyx_t_9);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_8, function);
            __pyx_t_10 = 1;
          }
        }
        #endif
        {
          PyObject *__pyx_callargs[3] = {__pyx_t_9, __pyx_9genexpr11__pyx_v_arg, __pyx_v_evdict};
          __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+1-__pyx_t_10, 2+__pyx_t_10);
          __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 757, __pyx_L25_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        }
        if (unlikely(PySet_Add(__pyx_t_4, (PyObject*)__pyx_t_2))) __PYX_ERR(0, 757, __pyx_L25_error)
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      }
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_XDECREF(__pyx_9genexpr11__pyx_v_arg); __pyx_9genexpr11__pyx_v_arg = 0;
      goto __pyx_L29_exit_scope;
      __pyx_L25_error:;
      __Pyx_XDECREF(__pyx_9genexpr11__pyx_v_arg); __pyx_9genexpr11__pyx_v_arg = 0;
      goto __pyx_L1_error;
      __pyx_L29_exit_scope:;
    } /* exit inner scope */
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L0;

    /* "../../bmi/sympy/DifferentialRing.pyx":756
 *         elif isinstance (P, list) :
 *             return [ self.evaluate (arg, evdict) for arg in P ]
 *         elif isinstance (P, set) :             # <<<<<<<<<<<<<<
 *             return { self.evaluate (arg, evdict) for arg in P }
 *         else :
 */
  }

  /* "../../bmi/sympy/DifferentialRing.pyx":759
 *             return { self.evaluate (arg, evdict) for arg in P }
 *         else :
 *             try :             # <<<<<<<<<<<<<<
 *                 result = evdict[P]
 *             except :
 */
  /*else*/ {
    {
      __Pyx_PyThreadState_declare
      __Pyx_PyThreadState_assign
      __Pyx_ExceptionSave(&__pyx_t_11, &__pyx_t_12, &__pyx_t_13);
      __Pyx_XGOTREF(__pyx_t_11);
      __Pyx_XGOTREF(__pyx_t_12);
      __Pyx_XGOTREF(__pyx_t_13);
      /*try:*/ {

        /* "../../bmi/sympy/DifferentialRing.pyx":760
 *         else :
 *             try :
 *                 result = evdict[P]             # <<<<<<<<<<<<<<
 *             except :
 *                 try :
 */
        __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_v_evdict, __pyx_v_P); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 760, __pyx_L30_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_v_result = __pyx_t_4;
        __pyx_t_4 = 0;

        /* "../../bmi/sympy/DifferentialRing.pyx":759
 *             return { self.evaluate (arg, evdict) for arg in P }
 *         else :
 *             try :             # <<<<<<<<<<<<<<
 *                 result = evdict[P]
 *             except :
 */
      }
      __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
      __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
      __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
      goto __pyx_L35_try_end;
      __pyx_L30_error:;
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;

      /* "../../bmi/sympy/DifferentialRing.pyx":761
 *             try :
 *                 result = evdict[P]
 *             except :             # <<<<<<<<<<<<<<
 *                 try :
 *                     theta, y = self.factor_derivative (P)
 */
      /*except:*/ {
        __Pyx_AddTraceback("DifferentialAlgebra.DifferentialRing._DifferentialRing__evaluate", __pyx_clineno, __pyx_lineno, __pyx_filename);
        if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_5, &__pyx_t_2) < 0) __PYX_ERR(0, 761, __pyx_L32_except_error)
        __Pyx_XGOTREF(__pyx_t_4);
        __Pyx_XGOTREF(__pyx_t_5);
        __Pyx_XGOTREF(__pyx_t_2);

        /* "../../bmi/sympy/DifferentialRing.pyx":762
 *                 result = evdict[P]
 *             except :
 *                 try :             # <<<<<<<<<<<<<<
 *                     theta, y = self.factor_derivative (P)
 *                     result = evdict[y]
 */
        {
          __Pyx_PyThreadState_declare
          __Pyx_PyThreadState_assign
          __Pyx_ExceptionSave(&__pyx_t_14, &__pyx_t_15, &__pyx_t_16);
          __Pyx_XGOTREF(__pyx_t_14);
          __Pyx_XGOTREF(__pyx_t_15);
          __Pyx_XGOTREF(__pyx_t_16);
          /*try:*/ {

            /* "../../bmi/sympy/DifferentialRing.pyx":763
 *             except :
 *                 try :
 *                     theta, y = self.factor_derivative (P)             # <<<<<<<<<<<<<<
 *                     result = evdict[y]
 *                     ders = self.indets (selection = 'derivations')
 */
            __pyx_t_9 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_factor_derivative); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 763, __pyx_L38_error)
            __Pyx_GOTREF(__pyx_t_9);
            __pyx_t_17 = NULL;
            __pyx_t_10 = 0;
            #if CYTHON_UNPACK_METHODS
            if (likely(PyMethod_Check(__pyx_t_9))) {
              __pyx_t_17 = PyMethod_GET_SELF(__pyx_t_9);
              if (likely(__pyx_t_17)) {
                PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
                __Pyx_INCREF(__pyx_t_17);
                __Pyx_INCREF(function);
                __Pyx_DECREF_SET(__pyx_t_9, function);
                __pyx_t_10 = 1;
              }
            }
            #endif
            {
              PyObject *__pyx_callargs[2] = {__pyx_t_17, __pyx_v_P};
              __pyx_t_8 = __Pyx_PyObject_FastCall(__pyx_t_9, __pyx_callargs+1-__pyx_t_10, 1+__pyx_t_10);
              __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
              if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 763, __pyx_L38_error)
              __Pyx_GOTREF(__pyx_t_8);
              __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
            }
            if ((likely(PyTuple_CheckExact(__pyx_t_8))) || (PyList_CheckExact(__pyx_t_8))) {
              PyObject* sequence = __pyx_t_8;
              Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
              if (unlikely(size != 2)) {
                if (size > 2) __Pyx_RaiseTooManyValuesError(2);
                else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
                __PYX_ERR(0, 763, __pyx_L38_error)
              }
              #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
              if (likely(PyTuple_CheckExact(sequence))) {
                __pyx_t_9 = PyTuple_GET_ITEM(sequence, 0); 
                __pyx_t_17 = PyTuple_GET_ITEM(sequence, 1); 
              } else {
                __pyx_t_9 = PyList_GET_ITEM(sequence, 0); 
                __pyx_t_17 = PyList_GET_ITEM(sequence, 1); 
              }
              __Pyx_INCREF(__pyx_t_9);
              __Pyx_INCREF(__pyx_t_17);
              #else
              __pyx_t_9 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 763, __pyx_L38_error)
              __Pyx_GOTREF(__pyx_t_9);
              __pyx_t_17 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 763, __pyx_L38_error)
              __Pyx_GOTREF(__pyx_t_17);
              #endif
              __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
            } else {
              Py_ssize_t index = -1;
              __pyx_t_18 = PyObject_GetIter(__pyx_t_8); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 763, __pyx_L38_error)
              __Pyx_GOTREF(__pyx_t_18);
              __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
              __pyx_t_19 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_18);
              index = 0; __pyx_t_9 = __pyx_t_19(__pyx_t_18); if (unlikely(!__pyx_t_9)) goto __pyx_L46_unpacking_failed;
              __Pyx_GOTREF(__pyx_t_9);
              index = 1; __pyx_t_17 = __pyx_t_19(__pyx_t_18); if (unlikely(!__pyx_t_17)) goto __pyx_L46_unpacking_failed;
              __Pyx_GOTREF(__pyx_t_17);
              if (__Pyx_IternextUnpackEndCheck(__pyx_t_19(__pyx_t_18), 2) < 0) __PYX_ERR(0, 763, __pyx_L38_error)
              __pyx_t_19 = NULL;
              __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
              goto __pyx_L47_unpacking_done;
              __pyx_L46_unpacking_failed:;
              __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
              __pyx_t_19 = NULL;
              if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
              __PYX_ERR(0, 763, __pyx_L38_error)
              __pyx_L47_unpacking_done:;
            }
            __pyx_v_theta = __pyx_t_9;
            __pyx_t_9 = 0;
            __pyx_v_y = __pyx_t_17;
            __pyx_t_17 = 0;

            /* "../../bmi/sympy/DifferentialRing.pyx":764
 *                 try :
 *                     theta, y = self.factor_derivative (P)
 *                     result = evdict[y]             # <<<<<<<<<<<<<<
 *                     ders = self.indets (selection = 'derivations')
 *                     if self.notation in [BMI_IX_jet, BMI_IX_jet0] and \
 */
            __pyx_t_8 = __Pyx_PyObject_GetItem(__pyx_v_evdict, __pyx_v_y); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 764, __pyx_L38_error)
            __Pyx_GOTREF(__pyx_t_8);
            __Pyx_XDECREF_SET(__pyx_v_result, __pyx_t_8);
            __pyx_t_8 = 0;

            /* "../../bmi/sympy/DifferentialRing.pyx":765
 *                     theta, y = self.factor_derivative (P)
 *                     result = evdict[y]
 *                     ders = self.indets (selection = 'derivations')             # <<<<<<<<<<<<<<
 *                     if self.notation in [BMI_IX_jet, BMI_IX_jet0] and \
 *                             self.is_differential_fraction (result) :
 */
            __pyx_t_8 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_indets); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 765, __pyx_L38_error)
            __Pyx_GOTREF(__pyx_t_8);
            __pyx_t_17 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 765, __pyx_L38_error)
            __Pyx_GOTREF(__pyx_t_17);
            if (PyDict_SetItem(__pyx_t_17, __pyx_n_s_selection, __pyx_n_u_derivations) < 0) __PYX_ERR(0, 765, __pyx_L38_error)
            __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_empty_tuple, __pyx_t_17); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 765, __pyx_L38_error)
            __Pyx_GOTREF(__pyx_t_9);
            __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
            __pyx_v_ders = __pyx_t_9;
            __pyx_t_9 = 0;

            /* "../../bmi/sympy/DifferentialRing.pyx":766
 *                     result = evdict[y]
 *                     ders = self.indets (selection = 'derivations')
 *                     if self.notation in [BMI_IX_jet, BMI_IX_jet0] and \             # <<<<<<<<<<<<<<
 *                             self.is_differential_fraction (result) :
 *                         result = self.differentiate (result, theta)
 */
            __Pyx_INCREF(__pyx_v_self->notation);
            __pyx_t_20 = __pyx_v_self->notation;
            __pyx_t_9 = __Pyx_PyBytes_FromString(__pyx_v_19DifferentialAlgebra_BMI_IX_jet); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 766, __pyx_L38_error)
            __Pyx_GOTREF(__pyx_t_9);
            __pyx_t_21 = (__Pyx_PyBytes_Equals(__pyx_t_20, __pyx_t_9, Py_EQ)); if (unlikely((__pyx_t_21 < 0))) __PYX_ERR(0, 766, __pyx_L38_error)
            __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
            if (!__pyx_t_21) {
            } else {
              __pyx_t_3 = __pyx_t_21;
              goto __pyx_L51_bool_binop_done;
            }
            __pyx_t_9 = __Pyx_PyBytes_FromString(__pyx_v_19DifferentialAlgebra_BMI_IX_jet0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 766, __pyx_L38_error)
            __Pyx_GOTREF(__pyx_t_9);
            __pyx_t_21 = (__Pyx_PyBytes_Equals(__pyx_t_20, __pyx_t_9, Py_EQ)); if (unlikely((__pyx_t_21 < 0))) __PYX_ERR(0, 766, __pyx_L38_error)
            __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
            __pyx_t_3 = __pyx_t_21;
            __pyx_L51_bool_binop_done:;
            __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
            __pyx_t_21 = __pyx_t_3;
            if (__pyx_t_21) {
            } else {
              __pyx_t_1 = __pyx_t_21;
              goto __pyx_L49_bool_binop_done;
            }

            /* "../../bmi/sympy/DifferentialRing.pyx":767
 *                     ders = self.indets (selection = 'derivations')
 *                     if self.notation in [BMI_IX_jet, BMI_IX_jet0] and \
 *                             self.is_differential_fraction (result) :             # <<<<<<<<<<<<<<
 *                         result = self.differentiate (result, theta)
 *                     else :
 */
            __pyx_t_17 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_is_differential_fraction); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 767, __pyx_L38_error)
            __Pyx_GOTREF(__pyx_t_17);
            __pyx_t_8 = NULL;
            __pyx_t_10 = 0;
            #if CYTHON_UNPACK_METHODS
            if (likely(PyMethod_Check(__pyx_t_17))) {
              __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_17);
              if (likely(__pyx_t_8)) {
                PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_17);
                __Pyx_INCREF(__pyx_t_8);
                __Pyx_INCREF(function);
                __Pyx_DECREF_SET(__pyx_t_17, function);
                __pyx_t_10 = 1;
              }
            }
            #endif
            {
              PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_v_result};
              __pyx_t_9 = __Pyx_PyObject_FastCall(__pyx_t_17, __pyx_callargs+1-__pyx_t_10, 1+__pyx_t_10);
              __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
              if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 767, __pyx_L38_error)
              __Pyx_GOTREF(__pyx_t_9);
              __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
            }
            __pyx_t_21 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely((__pyx_t_21 < 0))) __PYX_ERR(0, 767, __pyx_L38_error)
            __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
            __pyx_t_1 = __pyx_t_21;
            __pyx_L49_bool_binop_done:;

            /* "../../bmi/sympy/DifferentialRing.pyx":766
 *                     result = evdict[y]
 *                     ders = self.indets (selection = 'derivations')
 *                     if self.notation in [BMI_IX_jet, BMI_IX_jet0] and \             # <<<<<<<<<<<<<<
 *                             self.is_differential_fraction (result) :
 *                         result = self.differentiate (result, theta)
 */
            if (__pyx_t_1) {

              /* "../../bmi/sympy/DifferentialRing.pyx":768
 *                     if self.notation in [BMI_IX_jet, BMI_IX_jet0] and \
 *                             self.is_differential_fraction (result) :
 *                         result = self.differentiate (result, theta)             # <<<<<<<<<<<<<<
 *                     else :
 *                         for x in ders :
 */
              __pyx_t_17 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_differentiate); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 768, __pyx_L38_error)
              __Pyx_GOTREF(__pyx_t_17);
              __pyx_t_8 = NULL;
              __pyx_t_10 = 0;
              #if CYTHON_UNPACK_METHODS
              if (likely(PyMethod_Check(__pyx_t_17))) {
                __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_17);
                if (likely(__pyx_t_8)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_17);
                  __Pyx_INCREF(__pyx_t_8);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_17, function);
                  __pyx_t_10 = 1;
                }
              }
              #endif
              {
                PyObject *__pyx_callargs[3] = {__pyx_t_8, __pyx_v_result, __pyx_v_theta};
                __pyx_t_9 = __Pyx_PyObject_FastCall(__pyx_t_17, __pyx_callargs+1-__pyx_t_10, 2+__pyx_t_10);
                __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
                if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 768, __pyx_L38_error)
                __Pyx_GOTREF(__pyx_t_9);
                __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
              }
              __Pyx_DECREF_SET(__pyx_v_result, __pyx_t_9);
              __pyx_t_9 = 0;

              /* "../../bmi/sympy/DifferentialRing.pyx":766
 *                     result = evdict[y]
 *                     ders = self.indets (selection = 'derivations')
 *                     if self.notation in [BMI_IX_jet, BMI_IX_jet0] and \             # <<<<<<<<<<<<<<
 *                             self.is_differential_fraction (result) :
 *                         result = self.differentiate (result, theta)
 */
              goto __pyx_L48;
            }

            /* "../../bmi/sympy/DifferentialRing.pyx":770
 *                         result = self.differentiate (result, theta)
 *                     else :
 *                         for x in ders :             # <<<<<<<<<<<<<<
 *                             d = degree (theta, x)
 *                             if d > 0 :
 */
            /*else*/ {
              if (likely(PyList_CheckExact(__pyx_v_ders)) || PyTuple_CheckExact(__pyx_v_ders)) {
                __pyx_t_9 = __pyx_v_ders; __Pyx_INCREF(__pyx_t_9);
                __pyx_t_6 = 0;
                __pyx_t_7 = NULL;
              } else {
                __pyx_t_6 = -1; __pyx_t_9 = PyObject_GetIter(__pyx_v_ders); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 770, __pyx_L38_error)
                __Pyx_GOTREF(__pyx_t_9);
                __pyx_t_7 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_9); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 770, __pyx_L38_error)
              }
              for (;;) {
                if (likely(!__pyx_t_7)) {
                  if (likely(PyList_CheckExact(__pyx_t_9))) {
                    {
                      Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_9);
                      #if !CYTHON_ASSUME_SAFE_MACROS
                      if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 770, __pyx_L38_error)
                      #endif
                      if (__pyx_t_6 >= __pyx_temp) break;
                    }
                    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                    __pyx_t_17 = PyList_GET_ITEM(__pyx_t_9, __pyx_t_6); __Pyx_INCREF(__pyx_t_17); __pyx_t_6++; if (unlikely((0 < 0))) __PYX_ERR(0, 770, __pyx_L38_error)
                    #else
                    __pyx_t_17 = __Pyx_PySequence_ITEM(__pyx_t_9, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 770, __pyx_L38_error)
                    __Pyx_GOTREF(__pyx_t_17);
                    #endif
                  } else {
                    {
                      Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_9);
                      #if !CYTHON_ASSUME_SAFE_MACROS
                      if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 770, __pyx_L38_error)
                      #endif
                      if (__pyx_t_6 >= __pyx_temp) break;
                    }
                    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                    __pyx_t_17 = PyTuple_GET_ITEM(__pyx_t_9, __pyx_t_6); __Pyx_INCREF(__pyx_t_17); __pyx_t_6++; if (unlikely((0 < 0))) __PYX_ERR(0, 770, __pyx_L38_error)
                    #else
                    __pyx_t_17 = __Pyx_PySequence_ITEM(__pyx_t_9, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 770, __pyx_L38_error)
                    __Pyx_GOTREF(__pyx_t_17);
                    #endif
                  }
                } else {
                  __pyx_t_17 = __pyx_t_7(__pyx_t_9);
                  if (unlikely(!__pyx_t_17)) {
                    PyObject* exc_type = PyErr_Occurred();
                    if (exc_type) {
                      if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
                      else __PYX_ERR(0, 770, __pyx_L38_error)
                    }
                    break;
                  }
                  __Pyx_GOTREF(__pyx_t_17);
                }
                __Pyx_XDECREF_SET(__pyx_v_x, __pyx_t_17);
                __pyx_t_17 = 0;

                /* "../../bmi/sympy/DifferentialRing.pyx":771
 *                     else :
 *                         for x in ders :
 *                             d = degree (theta, x)             # <<<<<<<<<<<<<<
 *                             if d > 0 :
 *                                 result = Derivative (result, (x, d))
 */
                __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_degree); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 771, __pyx_L38_error)
                __Pyx_GOTREF(__pyx_t_8);
                __pyx_t_18 = NULL;
                __pyx_t_10 = 0;
                #if CYTHON_UNPACK_METHODS
                if (unlikely(PyMethod_Check(__pyx_t_8))) {
                  __pyx_t_18 = PyMethod_GET_SELF(__pyx_t_8);
                  if (likely(__pyx_t_18)) {
                    PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
                    __Pyx_INCREF(__pyx_t_18);
                    __Pyx_INCREF(function);
                    __Pyx_DECREF_SET(__pyx_t_8, function);
                    __pyx_t_10 = 1;
                  }
                }
                #endif
                {
                  PyObject *__pyx_callargs[3] = {__pyx_t_18, __pyx_v_theta, __pyx_v_x};
                  __pyx_t_17 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+1-__pyx_t_10, 2+__pyx_t_10);
                  __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0;
                  if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 771, __pyx_L38_error)
                  __Pyx_GOTREF(__pyx_t_17);
                  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
                }
                __Pyx_XDECREF_SET(__pyx_v_d, __pyx_t_17);
                __pyx_t_17 = 0;

                /* "../../bmi/sympy/DifferentialRing.pyx":772
 *                         for x in ders :
 *                             d = degree (theta, x)
 *                             if d > 0 :             # <<<<<<<<<<<<<<
 *                                 result = Derivative (result, (x, d))
 *                 except :
 */
                __pyx_t_17 = PyObject_RichCompare(__pyx_v_d, __pyx_int_0, Py_GT); __Pyx_XGOTREF(__pyx_t_17); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 772, __pyx_L38_error)
                __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_17); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 772, __pyx_L38_error)
                __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
                if (__pyx_t_1) {

                  /* "../../bmi/sympy/DifferentialRing.pyx":773
 *                             d = degree (theta, x)
 *                             if d > 0 :
 *                                 result = Derivative (result, (x, d))             # <<<<<<<<<<<<<<
 *                 except :
 *                     result = P
 */
                  __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_Derivative); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 773, __pyx_L38_error)
                  __Pyx_GOTREF(__pyx_t_8);
                  __pyx_t_18 = PyTuple_New(2); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 773, __pyx_L38_error)
                  __Pyx_GOTREF(__pyx_t_18);
                  __Pyx_INCREF(__pyx_v_x);
                  __Pyx_GIVEREF(__pyx_v_x);
                  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_18, 0, __pyx_v_x)) __PYX_ERR(0, 773, __pyx_L38_error);
                  __Pyx_INCREF(__pyx_v_d);
                  __Pyx_GIVEREF(__pyx_v_d);
                  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_18, 1, __pyx_v_d)) __PYX_ERR(0, 773, __pyx_L38_error);
                  __pyx_t_22 = NULL;
                  __pyx_t_10 = 0;
                  #if CYTHON_UNPACK_METHODS
                  if (unlikely(PyMethod_Check(__pyx_t_8))) {
                    __pyx_t_22 = PyMethod_GET_SELF(__pyx_t_8);
                    if (likely(__pyx_t_22)) {
                      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
                      __Pyx_INCREF(__pyx_t_22);
                      __Pyx_INCREF(function);
                      __Pyx_DECREF_SET(__pyx_t_8, function);
                      __pyx_t_10 = 1;
                    }
                  }
                  #endif
                  {
                    PyObject *__pyx_callargs[3] = {__pyx_t_22, __pyx_v_result, __pyx_t_18};
                    __pyx_t_17 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+1-__pyx_t_10, 2+__pyx_t_10);
                    __Pyx_XDECREF(__pyx_t_22); __pyx_t_22 = 0;
                    __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
                    if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 773, __pyx_L38_error)
                    __Pyx_GOTREF(__pyx_t_17);
                    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
                  }
                  __Pyx_DECREF_SET(__pyx_v_result, __pyx_t_17);
                  __pyx_t_17 = 0;

                  /* "../../bmi/sympy/DifferentialRing.pyx":772
 *                         for x in ders :
 *                             d = degree (theta, x)
 *                             if d > 0 :             # <<<<<<<<<<<<<<
 *                                 result = Derivative (result, (x, d))
 *                 except :
 */
                }

                /* "../../bmi/sympy/DifferentialRing.pyx":770
 *                         result = self.differentiate (result, theta)
 *                     else :
 *                         for x in ders :             # <<<<<<<<<<<<<<
 *                             d = degree (theta, x)
 *                             if d > 0 :
 */
              }
              __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
            }
            __pyx_L48:;

            /* "../../bmi/sympy/DifferentialRing.pyx":762
 *                 result = evdict[P]
 *             except :
 *                 try :             # <<<<<<<<<<<<<<
 *                     theta, y = self.factor_derivative (P)
 *                     result = evdict[y]
 */
          }
          __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
          __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
          __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
          goto __pyx_L45_try_end;
          __pyx_L38_error:;
          __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
          __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0;
          __Pyx_XDECREF(__pyx_t_20); __pyx_t_20 = 0;
          __Pyx_XDECREF(__pyx_t_22); __pyx_t_22 = 0;
          __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
          __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;

          /* "../../bmi/sympy/DifferentialRing.pyx":774
 *                             if d > 0 :
 *                                 result = Derivative (result, (x, d))
 *                 except :             # <<<<<<<<<<<<<<
 *                     result = P
 *             return result
 */
          /*except:*/ {
            __Pyx_AddTraceback("DifferentialAlgebra.DifferentialRing._DifferentialRing__evaluate", __pyx_clineno, __pyx_lineno, __pyx_filename);
            if (__Pyx_GetException(&__pyx_t_9, &__pyx_t_17, &__pyx_t_8) < 0) __PYX_ERR(0, 774, __pyx_L40_except_error)
            __Pyx_XGOTREF(__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_17);
            __Pyx_XGOTREF(__pyx_t_8);

            /* "../../bmi/sympy/DifferentialRing.pyx":775
 *                                 result = Derivative (result, (x, d))
 *                 except :
 *                     result = P             # <<<<<<<<<<<<<<
 *             return result
 * 
 */
            __Pyx_INCREF(__pyx_v_P);
            __Pyx_XDECREF_SET(__pyx_v_result, __pyx_v_P);
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            goto __pyx_L39_exception_handled;
          }

          /* "../../bmi/sympy/DifferentialRing.pyx":762
 *                 result = evdict[P]
 *             except :
 *                 try :             # <<<<<<<<<<<<<<
 *                     theta, y = self.factor_derivative (P)
 *                     result = evdict[y]
 */
          __pyx_L40_except_error:;
          __Pyx_XGIVEREF(__pyx_t_14);
          __Pyx_XGIVEREF(__pyx_t_15);
          __Pyx_XGIVEREF(__pyx_t_16);
          __Pyx_ExceptionReset(__pyx_t_14, __pyx_t_15, __pyx_t_16);
          goto __pyx_L32_except_error;
          __pyx_L39_exception_handled:;
          __Pyx_XGIVEREF(__pyx_t_14);
          __Pyx_XGIVEREF(__pyx_t_15);
          __Pyx_XGIVEREF(__pyx_t_16);
          __Pyx_ExceptionReset(__pyx_t_14, __pyx_t_15, __pyx_t_16);
          __pyx_L45_try_end:;
        }
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        goto __pyx_L31_exception_handled;
      }

      /* "../../bmi/sympy/DifferentialRing.pyx":759
 *             return { self.evaluate (arg, evdict) for arg in P }
 *         else :
 *             try :             # <<<<<<<<<<<<<<
 *                 result = evdict[P]
 *             except :
 */
      __pyx_L32_except_error:;
      __Pyx_XGIVEREF(__pyx_t_11);
      __Pyx_XGIVEREF(__pyx_t_12);
      __Pyx_XGIVEREF(__pyx_t_13);
      __Pyx_ExceptionReset(__pyx_t_11, __pyx_t_12, __pyx_t_13);
      goto __pyx_L1_error;
      __pyx_L31_exception_handled:;
      __Pyx_XGIVEREF(__pyx_t_11);
      __Pyx_XGIVEREF(__pyx_t_12);
      __Pyx_XGIVEREF(__pyx_t_13);
      __Pyx_ExceptionReset(__pyx_t_11, __pyx_t_12, __pyx_t_13);
      __pyx_L35_try_end:;
    }

    /* "../../bmi/sympy/DifferentialRing.pyx":776
 *                 except :
 *                     result = P
 *             return result             # <<<<<<<<<<<<<<
 * 
 * # evaluate
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_result);
    __pyx_r = __pyx_v_result;
    goto __pyx_L0;
  }

  /* "../../bmi/sympy/DifferentialRing.pyx":741
 * 
 * # __evaluate
 *     def __evaluate (             # <<<<<<<<<<<<<<
 *             self,
 *             P,
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_17);
  __Pyx_XDECREF(__pyx_t_18);
  __Pyx_XDECREF(__pyx_t_20);
  __Pyx_XDECREF(__pyx_t_22);
  __Pyx_AddTraceback("DifferentialAlgebra.DifferentialRing._DifferentialRing__evaluate", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_newargs);
  __Pyx_XDECREF(__pyx_v_theta);
  __Pyx_XDECREF(__pyx_v_y);
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XDECREF(__pyx_v_ders);
  __Pyx_XDECREF(__pyx_v_x);
  __Pyx_XDECREF(__pyx_v_d);
  __Pyx_XDECREF(__pyx_8genexpr9__pyx_v_arg);
  __Pyx_XDECREF(__pyx_9genexpr10__pyx_v_arg);
  __Pyx_XDECREF(__pyx_9genexpr11__pyx_v_arg);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "../../bmi/sympy/DifferentialRing.pyx":779
 * 
 * # evaluate
 *     def evaluate (             # <<<<<<<<<<<<<<
 *             self,
 *             P,
 */

/* Python wrapper */
static PyObject *__pyx_pw_19DifferentialAlgebra_16DifferentialRing_21evaluate(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_19DifferentialAlgebra_16DifferentialRing_20evaluate, "\n        Evaluate a differential fraction at a dictionary\n\n        INPUT:\n\n            `P`      -- a differential fraction or a list of\n                          differential fractions\n            `evdict` -- a dictionary\n\n        OUTPUT:\n\n            The expression `P` evaluated at `evdict`\n\n        EXAMPLES:\n\n            >>> from sympy import *\n            >>> from DifferentialAlgebra import *\n            >>> init_printing (use_unicode = False, num_columns = 60)\n\n            >>> x = var('x')\n            >>> y = indexedbase('y')\n            >>> R = DifferentialRing (derivations = [x], blocks = [y], \n            ...                       notation = 'jet')\n\n        An order two differential polynomial in jet notation:\n\n            >>> edo = y*y[x,x] + y[x]**2 - 6*y\n\n        A truncated series:\n\n            >>> ybar = Add(*[y[i]*x**i for i in range (5)])\n            >>> ybar\n             4         3         2                     \n            x *y[4] + x *y[3] + x *y[2] + x*y[1] + y[0]\n\n        The differential polynomial evaluated at the series:\n\n            >>> serie = R.evaluate (edo, {y:ybar})\n            >>> serie\n                                                                       >\n                 4           3           2                   / 4       >\n            - 6*x *y[4] - 6*x *y[3] - 6*x *y[2] - 6*x*y[1] + \\x *y[4]  >\n                                                                       >\n                                                                       >\n            |  \n            >                                       2                  >\n            >    3         2                     \\ d  / 4         3    >\n            > + x *y[3] + x *y[2] + x*y[1] + y[0]/*---\\x *y[4] + x *y[ >\n            >                                        2                 >\n            >                                      dx                  >\n            |  \n            >                                     ""                     >\n            >       2                     \\   /d / 4         3         >\n            > 3] + x *y[2] + x*y[1] + y[0]/ + |--\\x *y[4] + x *y[3] +  >\n            >                                 \\dx                      >\n            >                                                          >\n            |  \n            >                          2         \n            >  2                     \\\\          \n            > x *y[2] + x*y[1] + y[0]/|  - 6*y[0]\n            >                         /          \n            >                                    \n\n        The series in collected form:\n\n            >>> collect (expand (serie.doit ()), x)\n                6     2       5              4 /                       >\n            28*x *y[4]  + 42*x *y[3]*y[4] + x *\\30*y[2]*y[4] + 15*y[3] >\n            |  \n            > 2         \\    3                                         >\n            >   - 6*y[4]/ + x *(20*y[1]*y[4] + 20*y[2]*y[3] - 6*y[3])  >\n            |  \n            >    2 /                                    2         \\    >\n            > + x *\\12*y[0]*y[4] + 12*y[1]*y[3] + 6*y[2]  - 6*y[2]/ +  >\n            |  \n            >                                                          >\n            > x*(6*y[0]*y[3] + 6*y[1]*y[2] - 6*y[1]) + 2*y[0]*y[2] - 6 >\n            |  \n            >             2\n            > *y[0] + y[1] \n\n        Observe c is not a differential indeterminate:\n\n            >>> c = var('c')\n            >>> ybar = Rational(1/4)*(c + 2*x)**2\n\n        The series ybar is a zero of the differential polynomial:\n\n            >>> serie = R.evaluate (edo, {y:ybar})\n            >>> expand (serie.doit ())\n            0\n        ");
static PyMethodDef __pyx_mdef_19DifferentialAlgebra_16DifferentialRing_21evaluate = {"evaluate", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_19DifferentialAlgebra_16DifferentialRing_21evaluate, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_19DifferentialAlgebra_16DifferentialRing_20evaluate};
static PyObject *__pyx_pw_19DifferentialAlgebra_16DifferentialRing_21evaluate(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_P = 0;
  PyObject *__pyx_v_evdict = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("evaluate (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_P,&__pyx_n_s_evdict,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_P)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 779, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_evdict)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 779, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("evaluate", 1, 2, 2, 1); __PYX_ERR(0, 779, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "evaluate") < 0)) __PYX_ERR(0, 779, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
    }
    __pyx_v_P = values[0];
    __pyx_v_evdict = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("evaluate", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 779, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("DifferentialAlgebra.DifferentialRing.evaluate", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_19DifferentialAlgebra_16DifferentialRing_20evaluate(((struct __pyx_obj_19DifferentialAlgebra_DifferentialRing *)__pyx_v_self), __pyx_v_P, __pyx_v_evdict);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_19DifferentialAlgebra_16DifferentialRing_20evaluate(struct __pyx_obj_19DifferentialAlgebra_DifferentialRing *__pyx_v_self, PyObject *__pyx_v_P, PyObject *__pyx_v_evdict) {
  PyObject *__pyx_v_evdict1 = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  unsigned int __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("evaluate", 1);

  /* "../../bmi/sympy/DifferentialRing.pyx":876
 *         """
 *         cdef evdict1
 *         evdict1 = self.__process_evdict (evdict)             # <<<<<<<<<<<<<<
 *         return self.__evaluate (P, evdict1)
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_DifferentialRing__process_evdic); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 876, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_evdict};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 876, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_v_evdict1 = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "../../bmi/sympy/DifferentialRing.pyx":877
 *         cdef evdict1
 *         evdict1 = self.__process_evdict (evdict)
 *         return self.__evaluate (P, evdict1)             # <<<<<<<<<<<<<<
 * 
 * # factor_derivative
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_DifferentialRing__evaluate); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 877, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_v_P, __pyx_v_evdict1};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 2+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 877, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "../../bmi/sympy/DifferentialRing.pyx":779
 * 
 * # evaluate
 *     def evaluate (             # <<<<<<<<<<<<<<
 *             self,
 *             P,
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("DifferentialAlgebra.DifferentialRing.evaluate", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_evdict1);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "../../bmi/sympy/DifferentialRing.pyx":880
 * 
 * # factor_derivative
 *     def factor_derivative (             # <<<<<<<<<<<<<<
 *             self,
 *             derivative,
 */

/* Python wrapper */
static PyObject *__pyx_pw_19DifferentialAlgebra_16DifferentialRing_23factor_derivative(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_19DifferentialAlgebra_16DifferentialRing_22factor_derivative, "\n        Split a derivative into derivation operator and variable\n\n        INPUT:\n\n            `derivative` -- a derivative\n            `notation`   -- (default: 'undefined') a string\n\n        OUTPUT:\n\n            A pair (`theta`, `symb`) such that `derivative` is\n            the derivative of `symb` with respect to `theta`. The\n            derivation operator `theta` is expressed as a monomial on\n            the independent variables.\n\n        EXAMPLES:\n\n            >>> from sympy import *\n            >>> from DifferentialAlgebra import *\n            >>> init_printing (use_unicode = False, num_columns = 60)\n\n            >>> a,x,y = var ('a,x,y')\n            >>> u,v = function ('u,v')\n            >>> R = DifferentialRing (derivations = [x,y], \n            ...             blocks = [u,v,a], parameters = [a,v(y)])\n\n        A basic example:\n\n            >>> R.factor_derivative (Derivative(u(x,y),x))\n            (x, u(x, y))\n\n        A parameter is considered as a dependent variable which does\n        not depend on any independent variable. The monomial `theta`\n        is 1, meaning that a is not differentiated:\n\n            >>> R.factor_derivative (a)\n            (1, a)\n\n        The following examples illustrates the relationship between\n        factor_derivative and differentiate:\n\n            >>> derv = Derivative(u(x,y),x,x,y)\n            >>> derv\n               3           \n              d            \n            ------(u(x, y))\n                 2         \n            dy dx          \n\n            >>> theta, symb = R.factor_derivative (derv)\n            >>> theta, symb\n              2            \n            (x *y, u(x, y))\n\n            >>> R.differentiate (symb, theta)\n               3           \n              d            \n            ------(u(x, y))\n                 2         \n            dy dx          \n        ");
static PyMethodDef __pyx_mdef_19DifferentialAlgebra_16DifferentialRing_23factor_derivative = {"factor_derivative", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_19DifferentialAlgebra_16DifferentialRing_23factor_derivative, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_19DifferentialAlgebra_16DifferentialRing_22factor_derivative};
static PyObject *__pyx_pw_19DifferentialAlgebra_16DifferentialRing_23factor_derivative(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_derivative = 0;
  PyObject *__pyx_v_notation = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("factor_derivative (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_derivative,&__pyx_n_s_notation,0};
    values[1] = __Pyx_Arg_NewRef_FASTCALL(__pyx_k__12);
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_derivative)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 880, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_notation);
          if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 880, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "factor_derivative") < 0)) __PYX_ERR(0, 880, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_derivative = values[0];
    __pyx_v_notation = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("factor_derivative", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 880, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("DifferentialAlgebra.DifferentialRing.factor_derivative", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_19DifferentialAlgebra_16DifferentialRing_22factor_derivative(((struct __pyx_obj_19DifferentialAlgebra_DifferentialRing *)__pyx_v_self), __pyx_v_derivative, __pyx_v_notation);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_19DifferentialAlgebra_16DifferentialRing_22factor_derivative(struct __pyx_obj_19DifferentialAlgebra_DifferentialRing *__pyx_v_self, PyObject *__pyx_v_derivative, PyObject *__pyx_v_notation) {
  PyObject *__pyx_v_result = 0;
  PyObject *__pyx_v_strder = 0;
  PyObject *__pyx_v_mesgerr = 0;
  ALGEB_string __pyx_v_A;
  PyObject *__pyx_v_strnot = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  unsigned int __pyx_t_4;
  char *__pyx_t_5;
  char *__pyx_t_6;
  char *__pyx_t_7;
  int __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("factor_derivative", 1);

  /* "../../bmi/sympy/DifferentialRing.pyx":949
 *         cdef bmi_c.ALGEB_string A
 *         cdef strnot
 *         strnot = self.__process_notation (notation)             # <<<<<<<<<<<<<<
 *         strder = ascii (derivative)
 *         A = bmi_c.bmi_dapyx_factor_derivative (
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_DifferentialRing__process_notat); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 949, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_notation};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 949, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_v_strnot = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "../../bmi/sympy/DifferentialRing.pyx":950
 *         cdef strnot
 *         strnot = self.__process_notation (notation)
 *         strder = ascii (derivative)             # <<<<<<<<<<<<<<
 *         A = bmi_c.bmi_dapyx_factor_derivative (
 *                     strder, self.dring,
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ascii); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 950, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_derivative};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 950, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  if (!(likely(PyBytes_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_1))) __PYX_ERR(0, 950, __pyx_L1_error)
  __pyx_v_strder = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "../../bmi/sympy/DifferentialRing.pyx":952
 *         strder = ascii (derivative)
 *         A = bmi_c.bmi_dapyx_factor_derivative (
 *                     strder, self.dring,             # <<<<<<<<<<<<<<
 *                     self.notation, strnot, 0, 0)
 *         if bmi_c.bmi_dapyx_is_error (A):
 */
  if (unlikely(__pyx_v_strder == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
    __PYX_ERR(0, 952, __pyx_L1_error)
  }
  __pyx_t_5 = __Pyx_PyBytes_AsWritableString(__pyx_v_strder); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) __PYX_ERR(0, 952, __pyx_L1_error)

  /* "../../bmi/sympy/DifferentialRing.pyx":953
 *         A = bmi_c.bmi_dapyx_factor_derivative (
 *                     strder, self.dring,
 *                     self.notation, strnot, 0, 0)             # <<<<<<<<<<<<<<
 *         if bmi_c.bmi_dapyx_is_error (A):
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (A)
 */
  if (unlikely(__pyx_v_self->notation == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
    __PYX_ERR(0, 953, __pyx_L1_error)
  }
  __pyx_t_6 = __Pyx_PyBytes_AsWritableString(__pyx_v_self->notation); if (unlikely((!__pyx_t_6) && PyErr_Occurred())) __PYX_ERR(0, 953, __pyx_L1_error)
  __pyx_t_7 = __Pyx_PyObject_AsWritableString(__pyx_v_strnot); if (unlikely((!__pyx_t_7) && PyErr_Occurred())) __PYX_ERR(0, 953, __pyx_L1_error)

  /* "../../bmi/sympy/DifferentialRing.pyx":951
 *         strnot = self.__process_notation (notation)
 *         strder = ascii (derivative)
 *         A = bmi_c.bmi_dapyx_factor_derivative (             # <<<<<<<<<<<<<<
 *                     strder, self.dring,
 *                     self.notation, strnot, 0, 0)
 */
  __pyx_v_A = bmi_dapyx_factor_derivative(__pyx_t_5, __pyx_v_self->dring, __pyx_t_6, __pyx_t_7, 0, 0);

  /* "../../bmi/sympy/DifferentialRing.pyx":954
 *                     strder, self.dring,
 *                     self.notation, strnot, 0, 0)
 *         if bmi_c.bmi_dapyx_is_error (A):             # <<<<<<<<<<<<<<
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (A)
 *             bmi_c.bmi_balsa_clear_ALGEB (A)
 */
  __pyx_t_8 = (bmi_dapyx_is_error(__pyx_v_A) != 0);
  if (unlikely(__pyx_t_8)) {

    /* "../../bmi/sympy/DifferentialRing.pyx":955
 *                     self.notation, strnot, 0, 0)
 *         if bmi_c.bmi_dapyx_is_error (A):
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (A)             # <<<<<<<<<<<<<<
 *             bmi_c.bmi_balsa_clear_ALGEB (A)
 *             raise RuntimeError (str (mesgerr, 'utf-8'))
 */
    __pyx_t_1 = __Pyx_PyBytes_FromString(bmi_dapyx_mesgerr(__pyx_v_A)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 955, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_v_mesgerr = ((PyObject*)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "../../bmi/sympy/DifferentialRing.pyx":956
 *         if bmi_c.bmi_dapyx_is_error (A):
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (A)
 *             bmi_c.bmi_balsa_clear_ALGEB (A)             # <<<<<<<<<<<<<<
 *             raise RuntimeError (str (mesgerr, 'utf-8'))
 *         result = eval (A.value, globals (), self.evdict)
 */
    bmi_balsa_clear_ALGEB(__pyx_v_A);

    /* "../../bmi/sympy/DifferentialRing.pyx":957
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (A)
 *             bmi_c.bmi_balsa_clear_ALGEB (A)
 *             raise RuntimeError (str (mesgerr, 'utf-8'))             # <<<<<<<<<<<<<<
 *         result = eval (A.value, globals (), self.evdict)
 *         bmi_c.bmi_balsa_clear_ALGEB (A)
 */
    __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 957, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_v_mesgerr);
    __Pyx_GIVEREF(__pyx_v_mesgerr);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_mesgerr)) __PYX_ERR(0, 957, __pyx_L1_error);
    __Pyx_INCREF(__pyx_kp_u_utf_8);
    __Pyx_GIVEREF(__pyx_kp_u_utf_8);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_kp_u_utf_8)) __PYX_ERR(0, 957, __pyx_L1_error);
    __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)(&PyUnicode_Type)), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 957, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_RuntimeError, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 957, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(0, 957, __pyx_L1_error)

    /* "../../bmi/sympy/DifferentialRing.pyx":954
 *                     strder, self.dring,
 *                     self.notation, strnot, 0, 0)
 *         if bmi_c.bmi_dapyx_is_error (A):             # <<<<<<<<<<<<<<
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (A)
 *             bmi_c.bmi_balsa_clear_ALGEB (A)
 */
  }

  /* "../../bmi/sympy/DifferentialRing.pyx":958
 *             bmi_c.bmi_balsa_clear_ALGEB (A)
 *             raise RuntimeError (str (mesgerr, 'utf-8'))
 *         result = eval (A.value, globals (), self.evdict)             # <<<<<<<<<<<<<<
 *         bmi_c.bmi_balsa_clear_ALGEB (A)
 *         return result
 */
  __pyx_t_1 = __Pyx_PyBytes_FromString(__pyx_v_A->value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 958, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_Globals(); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 958, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 958, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_1);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1)) __PYX_ERR(0, 958, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_2);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2)) __PYX_ERR(0, 958, __pyx_L1_error);
  __Pyx_INCREF(__pyx_v_self->evdict);
  __Pyx_GIVEREF(__pyx_v_self->evdict);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_self->evdict)) __PYX_ERR(0, 958, __pyx_L1_error);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_eval, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 958, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_result = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "../../bmi/sympy/DifferentialRing.pyx":959
 *             raise RuntimeError (str (mesgerr, 'utf-8'))
 *         result = eval (A.value, globals (), self.evdict)
 *         bmi_c.bmi_balsa_clear_ALGEB (A)             # <<<<<<<<<<<<<<
 *         return result
 * 
 */
  bmi_balsa_clear_ALGEB(__pyx_v_A);

  /* "../../bmi/sympy/DifferentialRing.pyx":960
 *         result = eval (A.value, globals (), self.evdict)
 *         bmi_c.bmi_balsa_clear_ALGEB (A)
 *         return result             # <<<<<<<<<<<<<<
 * 
 * # indets
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_result);
  __pyx_r = __pyx_v_result;
  goto __pyx_L0;

  /* "../../bmi/sympy/DifferentialRing.pyx":880
 * 
 * # factor_derivative
 *     def factor_derivative (             # <<<<<<<<<<<<<<
 *             self,
 *             derivative,
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("DifferentialAlgebra.DifferentialRing.factor_derivative", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XDECREF(__pyx_v_strder);
  __Pyx_XDECREF(__pyx_v_mesgerr);
  __Pyx_XDECREF(__pyx_v_strnot);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "../../bmi/sympy/DifferentialRing.pyx":963
 * 
 * # indets
 *     def indets (             # <<<<<<<<<<<<<<
 *                 self,
 *                 equations = None,
 */

/* Python wrapper */
static PyObject *__pyx_pw_19DifferentialAlgebra_16DifferentialRing_25indets(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_19DifferentialAlgebra_16DifferentialRing_24indets, "\n        The indeterminates of a DifferentialRing or a rational fraction\n\n        INPUT:\n\n            `equations`  -- (default: None) a rational fraction\n                              or a list of rational fractions\n            `selection`  -- (default: 'derivatives') a string\n            `derivation` -- (default: None) a variable\n            `notation`   -- (default: 'undefined') a string\n\n        OUTPUT:\n\n            A list of variable and function, selected according to\n            `selection`. See the examples below.\n\n        EXAMPLES:\n\n            >>> from sympy import *\n            >>> from DifferentialAlgebra import *\n            >>> init_printing (use_unicode = False, num_columns = 60)\n\n            >>> x,y,z,t = var ('x,y,z,t')\n            >>> u,v,w = function ('u,v,w')\n            >>> R = DifferentialRing (derivations = [x,y,t], \n            ...             blocks = [u,[v,w],z], \n            ...             parameters = [u(t,y,x),z,w(y)])\n\n        With no selection, or with 'derivatives' or 'dependent',\n        return the list of the dependent variables (or differential\n        indeterminates) of R:\n\n            >>> R.indets ()\n            [u(t, y, x), v(x, y, t), w(y), z]\n\n        With 'derivations' or 'independent', return the list of the\n        derivations (or independent variables) of R:\n\n            >>> R.indets (selection = 'derivations')\n            [x, y, t]\n\n        With 'parameters', return the list of the parameters of R:\n\n            >>> R.indets (selection = 'parameters')\n            [u(t, y, x), w(y), z]\n\n        With 'all', return the list of the independent and the dependent\n        variables of R:\n\n            >>> R.indets (selection = 'all')\n            [x, y, t, u(t, y, x), v(x, y, t), w(y), z]\n\n        With 'constants', possibly followed by a derivation, return\n        the list of the dependent variables the derivatives (with\n        respect to the derivation, if any) of which, are z""ero:\n\n            >>> R.indets (selection = 'constants')\n            [z]\n\n        The indets of a rational fraction:\n\n            >>> eq = u(t,y,x) + 1/w(y)\n            >>> R.indets (eq)\n            [u(t, y, x), w(y)]\n        ");
static PyMethodDef __pyx_mdef_19DifferentialAlgebra_16DifferentialRing_25indets = {"indets", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_19DifferentialAlgebra_16DifferentialRing_25indets, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_19DifferentialAlgebra_16DifferentialRing_24indets};
static PyObject *__pyx_pw_19DifferentialAlgebra_16DifferentialRing_25indets(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_equations = 0;
  PyObject *__pyx_v_selection = 0;
  PyObject *__pyx_v_derivation = 0;
  PyObject *__pyx_v_notation = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[4] = {0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("indets (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_equations,&__pyx_n_s_selection,&__pyx_n_s_derivation,&__pyx_n_s_notation,0};

    /* "../../bmi/sympy/DifferentialRing.pyx":965
 *     def indets (
 *                 self,
 *                 equations = None,             # <<<<<<<<<<<<<<
 *                 selection = BMI_IX_derivs,
 *                 derivation = None,
 */
    values[0] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
    values[1] = __Pyx_Arg_NewRef_FASTCALL(__pyx_k__13);

    /* "../../bmi/sympy/DifferentialRing.pyx":967
 *                 equations = None,
 *                 selection = BMI_IX_derivs,
 *                 derivation = None,             # <<<<<<<<<<<<<<
 *                 notation = BMI_IX_undefined):
 *         r"""
 */
    values[2] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
    values[3] = __Pyx_Arg_NewRef_FASTCALL(__pyx_k__14);
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_equations);
          if (value) { values[0] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 963, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_selection);
          if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 963, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_derivation);
          if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 963, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_notation);
          if (value) { values[3] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 963, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "indets") < 0)) __PYX_ERR(0, 963, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_equations = values[0];
    __pyx_v_selection = values[1];
    __pyx_v_derivation = values[2];
    __pyx_v_notation = values[3];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("indets", 0, 0, 4, __pyx_nargs); __PYX_ERR(0, 963, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("DifferentialAlgebra.DifferentialRing.indets", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_19DifferentialAlgebra_16DifferentialRing_24indets(((struct __pyx_obj_19DifferentialAlgebra_DifferentialRing *)__pyx_v_self), __pyx_v_equations, __pyx_v_selection, __pyx_v_derivation, __pyx_v_notation);

  /* "../../bmi/sympy/DifferentialRing.pyx":963
 * 
 * # indets
 *     def indets (             # <<<<<<<<<<<<<<
 *                 self,
 *                 equations = None,
 */

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_19DifferentialAlgebra_16DifferentialRing_24indets(struct __pyx_obj_19DifferentialAlgebra_DifferentialRing *__pyx_v_self, PyObject *__pyx_v_equations, PyObject *__pyx_v_selection, PyObject *__pyx_v_derivation, PyObject *__pyx_v_notation) {
  PyObject *__pyx_v_result = 0;
  PyObject *__pyx_v_streqns = 0;
  PyObject *__pyx_v_strder = 0;
  PyObject *__pyx_v_strsel = 0;
  PyObject *__pyx_v_mesgerr = 0;
  ALGEB_string __pyx_v_L;
  PyObject *__pyx_v_strnot = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  unsigned int __pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  char *__pyx_t_7;
  char *__pyx_t_8;
  char *__pyx_t_9;
  char *__pyx_t_10;
  char *__pyx_t_11;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("indets", 1);

  /* "../../bmi/sympy/DifferentialRing.pyx":1039
 *         cdef bmi_c.ALGEB_string L
 *         cdef strnot
 *         strnot = self.__process_notation (notation)             # <<<<<<<<<<<<<<
 *         if equations == None:
 *             streqns = b""
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_DifferentialRing__process_notat); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1039, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_notation};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1039, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_v_strnot = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "../../bmi/sympy/DifferentialRing.pyx":1040
 *         cdef strnot
 *         strnot = self.__process_notation (notation)
 *         if equations == None:             # <<<<<<<<<<<<<<
 *             streqns = b""
 *         elif isinstance (equations, list):
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_equations, Py_None, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1040, __pyx_L1_error)
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 1040, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_5) {

    /* "../../bmi/sympy/DifferentialRing.pyx":1041
 *         strnot = self.__process_notation (notation)
 *         if equations == None:
 *             streqns = b""             # <<<<<<<<<<<<<<
 *         elif isinstance (equations, list):
 *             streqns = ascii (equations)
 */
    __Pyx_INCREF(__pyx_kp_b__7);
    __pyx_v_streqns = __pyx_kp_b__7;

    /* "../../bmi/sympy/DifferentialRing.pyx":1040
 *         cdef strnot
 *         strnot = self.__process_notation (notation)
 *         if equations == None:             # <<<<<<<<<<<<<<
 *             streqns = b""
 *         elif isinstance (equations, list):
 */
    goto __pyx_L3;
  }

  /* "../../bmi/sympy/DifferentialRing.pyx":1042
 *         if equations == None:
 *             streqns = b""
 *         elif isinstance (equations, list):             # <<<<<<<<<<<<<<
 *             streqns = ascii (equations)
 *         else:
 */
  __pyx_t_5 = PyList_Check(__pyx_v_equations); 
  if (__pyx_t_5) {

    /* "../../bmi/sympy/DifferentialRing.pyx":1043
 *             streqns = b""
 *         elif isinstance (equations, list):
 *             streqns = ascii (equations)             # <<<<<<<<<<<<<<
 *         else:
 *             streqns = ascii ([equations])
 */
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ascii); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1043, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = NULL;
    __pyx_t_4 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
        __pyx_t_4 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_equations};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1043, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    if (!(likely(PyBytes_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_1))) __PYX_ERR(0, 1043, __pyx_L1_error)
    __pyx_v_streqns = ((PyObject*)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "../../bmi/sympy/DifferentialRing.pyx":1042
 *         if equations == None:
 *             streqns = b""
 *         elif isinstance (equations, list):             # <<<<<<<<<<<<<<
 *             streqns = ascii (equations)
 *         else:
 */
    goto __pyx_L3;
  }

  /* "../../bmi/sympy/DifferentialRing.pyx":1045
 *             streqns = ascii (equations)
 *         else:
 *             streqns = ascii ([equations])             # <<<<<<<<<<<<<<
 *         if derivation == None:
 *             strder = b"0"
 */
  /*else*/ {
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ascii); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1045, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1045, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_v_equations);
    __Pyx_GIVEREF(__pyx_v_equations);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 0, __pyx_v_equations)) __PYX_ERR(0, 1045, __pyx_L1_error);
    __pyx_t_6 = NULL;
    __pyx_t_4 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
        __pyx_t_4 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_3};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1045, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    if (!(likely(PyBytes_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_1))) __PYX_ERR(0, 1045, __pyx_L1_error)
    __pyx_v_streqns = ((PyObject*)__pyx_t_1);
    __pyx_t_1 = 0;
  }
  __pyx_L3:;

  /* "../../bmi/sympy/DifferentialRing.pyx":1046
 *         else:
 *             streqns = ascii ([equations])
 *         if derivation == None:             # <<<<<<<<<<<<<<
 *             strder = b"0"
 *         else:
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_derivation, Py_None, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1046, __pyx_L1_error)
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 1046, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_5) {

    /* "../../bmi/sympy/DifferentialRing.pyx":1047
 *             streqns = ascii ([equations])
 *         if derivation == None:
 *             strder = b"0"             # <<<<<<<<<<<<<<
 *         else:
 *             strder = ascii (derivation)
 */
    __Pyx_INCREF(__pyx_kp_b_0);
    __pyx_v_strder = __pyx_kp_b_0;

    /* "../../bmi/sympy/DifferentialRing.pyx":1046
 *         else:
 *             streqns = ascii ([equations])
 *         if derivation == None:             # <<<<<<<<<<<<<<
 *             strder = b"0"
 *         else:
 */
    goto __pyx_L4;
  }

  /* "../../bmi/sympy/DifferentialRing.pyx":1049
 *             strder = b"0"
 *         else:
 *             strder = ascii (derivation)             # <<<<<<<<<<<<<<
 *         strsel = ascii (selection)
 *         L = bmi_c.bmi_dapyx_indets (
 */
  /*else*/ {
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ascii); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1049, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = NULL;
    __pyx_t_4 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
        __pyx_t_4 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_derivation};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1049, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    if (!(likely(PyBytes_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_1))) __PYX_ERR(0, 1049, __pyx_L1_error)
    __pyx_v_strder = ((PyObject*)__pyx_t_1);
    __pyx_t_1 = 0;
  }
  __pyx_L4:;

  /* "../../bmi/sympy/DifferentialRing.pyx":1050
 *         else:
 *             strder = ascii (derivation)
 *         strsel = ascii (selection)             # <<<<<<<<<<<<<<
 *         L = bmi_c.bmi_dapyx_indets (
 *                 streqns, self.dring, strsel, strder,
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ascii); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1050, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_selection};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1050, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  if (!(likely(PyBytes_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_1))) __PYX_ERR(0, 1050, __pyx_L1_error)
  __pyx_v_strsel = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "../../bmi/sympy/DifferentialRing.pyx":1052
 *         strsel = ascii (selection)
 *         L = bmi_c.bmi_dapyx_indets (
 *                 streqns, self.dring, strsel, strder,             # <<<<<<<<<<<<<<
 *                 self.notation, strnot, 0, 0)
 *         if bmi_c.bmi_dapyx_is_error (L):
 */
  if (unlikely(__pyx_v_streqns == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
    __PYX_ERR(0, 1052, __pyx_L1_error)
  }
  __pyx_t_7 = __Pyx_PyBytes_AsWritableString(__pyx_v_streqns); if (unlikely((!__pyx_t_7) && PyErr_Occurred())) __PYX_ERR(0, 1052, __pyx_L1_error)
  if (unlikely(__pyx_v_strsel == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
    __PYX_ERR(0, 1052, __pyx_L1_error)
  }
  __pyx_t_8 = __Pyx_PyBytes_AsWritableString(__pyx_v_strsel); if (unlikely((!__pyx_t_8) && PyErr_Occurred())) __PYX_ERR(0, 1052, __pyx_L1_error)
  if (unlikely(__pyx_v_strder == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
    __PYX_ERR(0, 1052, __pyx_L1_error)
  }
  __pyx_t_9 = __Pyx_PyBytes_AsWritableString(__pyx_v_strder); if (unlikely((!__pyx_t_9) && PyErr_Occurred())) __PYX_ERR(0, 1052, __pyx_L1_error)

  /* "../../bmi/sympy/DifferentialRing.pyx":1053
 *         L = bmi_c.bmi_dapyx_indets (
 *                 streqns, self.dring, strsel, strder,
 *                 self.notation, strnot, 0, 0)             # <<<<<<<<<<<<<<
 *         if bmi_c.bmi_dapyx_is_error (L):
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (L)
 */
  if (unlikely(__pyx_v_self->notation == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
    __PYX_ERR(0, 1053, __pyx_L1_error)
  }
  __pyx_t_10 = __Pyx_PyBytes_AsWritableString(__pyx_v_self->notation); if (unlikely((!__pyx_t_10) && PyErr_Occurred())) __PYX_ERR(0, 1053, __pyx_L1_error)
  __pyx_t_11 = __Pyx_PyObject_AsWritableString(__pyx_v_strnot); if (unlikely((!__pyx_t_11) && PyErr_Occurred())) __PYX_ERR(0, 1053, __pyx_L1_error)

  /* "../../bmi/sympy/DifferentialRing.pyx":1051
 *             strder = ascii (derivation)
 *         strsel = ascii (selection)
 *         L = bmi_c.bmi_dapyx_indets (             # <<<<<<<<<<<<<<
 *                 streqns, self.dring, strsel, strder,
 *                 self.notation, strnot, 0, 0)
 */
  __pyx_v_L = bmi_dapyx_indets(__pyx_t_7, __pyx_v_self->dring, __pyx_t_8, __pyx_t_9, __pyx_t_10, __pyx_t_11, 0, 0);

  /* "../../bmi/sympy/DifferentialRing.pyx":1054
 *                 streqns, self.dring, strsel, strder,
 *                 self.notation, strnot, 0, 0)
 *         if bmi_c.bmi_dapyx_is_error (L):             # <<<<<<<<<<<<<<
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (L)
 *             bmi_c.bmi_balsa_clear_ALGEB (L)
 */
  __pyx_t_5 = (bmi_dapyx_is_error(__pyx_v_L) != 0);
  if (unlikely(__pyx_t_5)) {

    /* "../../bmi/sympy/DifferentialRing.pyx":1055
 *                 self.notation, strnot, 0, 0)
 *         if bmi_c.bmi_dapyx_is_error (L):
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (L)             # <<<<<<<<<<<<<<
 *             bmi_c.bmi_balsa_clear_ALGEB (L)
 *             raise RuntimeError (str (mesgerr, 'utf-8'))
 */
    __pyx_t_1 = __Pyx_PyBytes_FromString(bmi_dapyx_mesgerr(__pyx_v_L)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1055, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_v_mesgerr = ((PyObject*)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "../../bmi/sympy/DifferentialRing.pyx":1056
 *         if bmi_c.bmi_dapyx_is_error (L):
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (L)
 *             bmi_c.bmi_balsa_clear_ALGEB (L)             # <<<<<<<<<<<<<<
 *             raise RuntimeError (str (mesgerr, 'utf-8'))
 *         result = eval (L.value, globals (), self.evdict)
 */
    bmi_balsa_clear_ALGEB(__pyx_v_L);

    /* "../../bmi/sympy/DifferentialRing.pyx":1057
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (L)
 *             bmi_c.bmi_balsa_clear_ALGEB (L)
 *             raise RuntimeError (str (mesgerr, 'utf-8'))             # <<<<<<<<<<<<<<
 *         result = eval (L.value, globals (), self.evdict)
 *         bmi_c.bmi_balsa_clear_ALGEB (L)
 */
    __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1057, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_v_mesgerr);
    __Pyx_GIVEREF(__pyx_v_mesgerr);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_mesgerr)) __PYX_ERR(0, 1057, __pyx_L1_error);
    __Pyx_INCREF(__pyx_kp_u_utf_8);
    __Pyx_GIVEREF(__pyx_kp_u_utf_8);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_kp_u_utf_8)) __PYX_ERR(0, 1057, __pyx_L1_error);
    __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)(&PyUnicode_Type)), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1057, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_RuntimeError, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1057, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(0, 1057, __pyx_L1_error)

    /* "../../bmi/sympy/DifferentialRing.pyx":1054
 *                 streqns, self.dring, strsel, strder,
 *                 self.notation, strnot, 0, 0)
 *         if bmi_c.bmi_dapyx_is_error (L):             # <<<<<<<<<<<<<<
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (L)
 *             bmi_c.bmi_balsa_clear_ALGEB (L)
 */
  }

  /* "../../bmi/sympy/DifferentialRing.pyx":1058
 *             bmi_c.bmi_balsa_clear_ALGEB (L)
 *             raise RuntimeError (str (mesgerr, 'utf-8'))
 *         result = eval (L.value, globals (), self.evdict)             # <<<<<<<<<<<<<<
 *         bmi_c.bmi_balsa_clear_ALGEB (L)
 *         return result
 */
  __pyx_t_1 = __Pyx_PyBytes_FromString(__pyx_v_L->value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1058, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_Globals(); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1058, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1058, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_1);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1)) __PYX_ERR(0, 1058, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_2);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2)) __PYX_ERR(0, 1058, __pyx_L1_error);
  __Pyx_INCREF(__pyx_v_self->evdict);
  __Pyx_GIVEREF(__pyx_v_self->evdict);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_self->evdict)) __PYX_ERR(0, 1058, __pyx_L1_error);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_eval, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1058, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (!(likely(PyList_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None) || __Pyx_RaiseUnexpectedTypeError("list", __pyx_t_2))) __PYX_ERR(0, 1058, __pyx_L1_error)
  __pyx_v_result = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "../../bmi/sympy/DifferentialRing.pyx":1059
 *             raise RuntimeError (str (mesgerr, 'utf-8'))
 *         result = eval (L.value, globals (), self.evdict)
 *         bmi_c.bmi_balsa_clear_ALGEB (L)             # <<<<<<<<<<<<<<
 *         return result
 * 
 */
  bmi_balsa_clear_ALGEB(__pyx_v_L);

  /* "../../bmi/sympy/DifferentialRing.pyx":1060
 *         result = eval (L.value, globals (), self.evdict)
 *         bmi_c.bmi_balsa_clear_ALGEB (L)
 *         return result             # <<<<<<<<<<<<<<
 * 
 * # is_differential_fraction
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_result);
  __pyx_r = __pyx_v_result;
  goto __pyx_L0;

  /* "../../bmi/sympy/DifferentialRing.pyx":963
 * 
 * # indets
 *     def indets (             # <<<<<<<<<<<<<<
 *                 self,
 *                 equations = None,
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("DifferentialAlgebra.DifferentialRing.indets", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XDECREF(__pyx_v_streqns);
  __Pyx_XDECREF(__pyx_v_strder);
  __Pyx_XDECREF(__pyx_v_strsel);
  __Pyx_XDECREF(__pyx_v_mesgerr);
  __Pyx_XDECREF(__pyx_v_strnot);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "../../bmi/sympy/DifferentialRing.pyx":1063
 * 
 * # is_differential_fraction
 *     def is_differential_fraction (             # <<<<<<<<<<<<<<
 *             self,
 *             equations,
 */

/* Python wrapper */
static PyObject *__pyx_pw_19DifferentialAlgebra_16DifferentialRing_27is_differential_fraction(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_19DifferentialAlgebra_16DifferentialRing_26is_differential_fraction, "\n        Test if an expression is a rational differential fraction\n\n        INPUT:\n\n            `equations` -- an expression or a list of expressions\n            `notation`  -- (default: 'undefined') a string\n\n        OUTPUT:\n\n            True or False\n\n        EXAMPLES:\n\n            >>> from sympy import *\n            >>> from DifferentialAlgebra import *\n            >>> init_printing (use_unicode = False, num_columns = 60)\n\n            >>> x = var('x')\n            >>> w = function('w')\n            >>> R = DifferentialRing (derivations = [x], blocks = [w])\n            >>> F = w(x)*Derivative(w(x),x) + x + 1\n            >>> R.is_differential_fraction([F, F**(-3)])\n            True\n        ");
static PyMethodDef __pyx_mdef_19DifferentialAlgebra_16DifferentialRing_27is_differential_fraction = {"is_differential_fraction", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_19DifferentialAlgebra_16DifferentialRing_27is_differential_fraction, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_19DifferentialAlgebra_16DifferentialRing_26is_differential_fraction};
static PyObject *__pyx_pw_19DifferentialAlgebra_16DifferentialRing_27is_differential_fraction(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_equations = 0;
  PyObject *__pyx_v_notation = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_differential_fraction (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_equations,&__pyx_n_s_notation,0};
    values[1] = __Pyx_Arg_NewRef_FASTCALL(__pyx_k__15);
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_equations)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1063, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_notation);
          if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1063, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "is_differential_fraction") < 0)) __PYX_ERR(0, 1063, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_equations = values[0];
    __pyx_v_notation = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("is_differential_fraction", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 1063, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("DifferentialAlgebra.DifferentialRing.is_differential_fraction", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_19DifferentialAlgebra_16DifferentialRing_26is_differential_fraction(((struct __pyx_obj_19DifferentialAlgebra_DifferentialRing *)__pyx_v_self), __pyx_v_equations, __pyx_v_notation);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_19DifferentialAlgebra_16DifferentialRing_26is_differential_fraction(struct __pyx_obj_19DifferentialAlgebra_DifferentialRing *__pyx_v_self, PyObject *__pyx_v_equations, PyObject *__pyx_v_notation) {
  PyObject *__pyx_v_result = 0;
  PyObject *__pyx_v_streqns = 0;
  PyObject *__pyx_v_strders = 0;
  ALGEB_string __pyx_v_A;
  PyObject *__pyx_v_strnot = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  unsigned int __pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  char *__pyx_t_7;
  bool __pyx_t_8;
  char *__pyx_t_9;
  char *__pyx_t_10;
  char *__pyx_t_11;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_differential_fraction", 1);

  /* "../../bmi/sympy/DifferentialRing.pyx":1097
 *         cdef bmi_c.ALGEB_string A
 *         cdef strnot
 *         strnot = self.__process_notation (notation)             # <<<<<<<<<<<<<<
 *         if isinstance (equations, list):
 *             streqns = ascii (equations)
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_DifferentialRing__process_notat); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1097, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_notation};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1097, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_v_strnot = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "../../bmi/sympy/DifferentialRing.pyx":1098
 *         cdef strnot
 *         strnot = self.__process_notation (notation)
 *         if isinstance (equations, list):             # <<<<<<<<<<<<<<
 *             streqns = ascii (equations)
 *         else:
 */
  __pyx_t_5 = PyList_Check(__pyx_v_equations); 
  if (__pyx_t_5) {

    /* "../../bmi/sympy/DifferentialRing.pyx":1099
 *         strnot = self.__process_notation (notation)
 *         if isinstance (equations, list):
 *             streqns = ascii (equations)             # <<<<<<<<<<<<<<
 *         else:
 *             streqns = ascii ([equations])
 */
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ascii); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1099, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = NULL;
    __pyx_t_4 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
        __pyx_t_4 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_equations};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1099, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    if (!(likely(PyBytes_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_1))) __PYX_ERR(0, 1099, __pyx_L1_error)
    __pyx_v_streqns = ((PyObject*)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "../../bmi/sympy/DifferentialRing.pyx":1098
 *         cdef strnot
 *         strnot = self.__process_notation (notation)
 *         if isinstance (equations, list):             # <<<<<<<<<<<<<<
 *             streqns = ascii (equations)
 *         else:
 */
    goto __pyx_L3;
  }

  /* "../../bmi/sympy/DifferentialRing.pyx":1101
 *             streqns = ascii (equations)
 *         else:
 *             streqns = ascii ([equations])             # <<<<<<<<<<<<<<
 *         strders = b"[]"
 *         A = bmi_c.bmi_dapyx_differentiate (
 */
  /*else*/ {
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ascii); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1101, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1101, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_v_equations);
    __Pyx_GIVEREF(__pyx_v_equations);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 0, __pyx_v_equations)) __PYX_ERR(0, 1101, __pyx_L1_error);
    __pyx_t_6 = NULL;
    __pyx_t_4 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
        __pyx_t_4 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_3};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1101, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    if (!(likely(PyBytes_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_1))) __PYX_ERR(0, 1101, __pyx_L1_error)
    __pyx_v_streqns = ((PyObject*)__pyx_t_1);
    __pyx_t_1 = 0;
  }
  __pyx_L3:;

  /* "../../bmi/sympy/DifferentialRing.pyx":1102
 *         else:
 *             streqns = ascii ([equations])
 *         strders = b"[]"             # <<<<<<<<<<<<<<
 *         A = bmi_c.bmi_dapyx_differentiate (
 *                     self.dring, streqns, int (False), strders,
 */
  __Pyx_INCREF(__pyx_kp_b__16);
  __pyx_v_strders = __pyx_kp_b__16;

  /* "../../bmi/sympy/DifferentialRing.pyx":1104
 *         strders = b"[]"
 *         A = bmi_c.bmi_dapyx_differentiate (
 *                     self.dring, streqns, int (False), strders,             # <<<<<<<<<<<<<<
 *                     self.notation, strnot, 0, 0)
 *         result = not bmi_c.bmi_dapyx_is_error (A)
 */
  if (unlikely(__pyx_v_streqns == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
    __PYX_ERR(0, 1104, __pyx_L1_error)
  }
  __pyx_t_7 = __Pyx_PyBytes_AsWritableString(__pyx_v_streqns); if (unlikely((!__pyx_t_7) && PyErr_Occurred())) __PYX_ERR(0, 1104, __pyx_L1_error)
  __pyx_t_1 = __Pyx_PyNumber_Int(Py_False); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1104, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_8 = __Pyx_PyInt_As_bool(__pyx_t_1); if (unlikely((__pyx_t_8 == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1104, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_9 = __Pyx_PyBytes_AsWritableString(__pyx_v_strders); if (unlikely((!__pyx_t_9) && PyErr_Occurred())) __PYX_ERR(0, 1104, __pyx_L1_error)

  /* "../../bmi/sympy/DifferentialRing.pyx":1105
 *         A = bmi_c.bmi_dapyx_differentiate (
 *                     self.dring, streqns, int (False), strders,
 *                     self.notation, strnot, 0, 0)             # <<<<<<<<<<<<<<
 *         result = not bmi_c.bmi_dapyx_is_error (A)
 *         bmi_c.bmi_balsa_clear_ALGEB (A)
 */
  if (unlikely(__pyx_v_self->notation == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
    __PYX_ERR(0, 1105, __pyx_L1_error)
  }
  __pyx_t_10 = __Pyx_PyBytes_AsWritableString(__pyx_v_self->notation); if (unlikely((!__pyx_t_10) && PyErr_Occurred())) __PYX_ERR(0, 1105, __pyx_L1_error)
  __pyx_t_11 = __Pyx_PyObject_AsWritableString(__pyx_v_strnot); if (unlikely((!__pyx_t_11) && PyErr_Occurred())) __PYX_ERR(0, 1105, __pyx_L1_error)

  /* "../../bmi/sympy/DifferentialRing.pyx":1103
 *             streqns = ascii ([equations])
 *         strders = b"[]"
 *         A = bmi_c.bmi_dapyx_differentiate (             # <<<<<<<<<<<<<<
 *                     self.dring, streqns, int (False), strders,
 *                     self.notation, strnot, 0, 0)
 */
  __pyx_v_A = bmi_dapyx_differentiate(__pyx_v_self->dring, __pyx_t_7, __pyx_t_8, __pyx_t_9, __pyx_t_10, __pyx_t_11, 0, 0);

  /* "../../bmi/sympy/DifferentialRing.pyx":1106
 *                     self.dring, streqns, int (False), strders,
 *                     self.notation, strnot, 0, 0)
 *         result = not bmi_c.bmi_dapyx_is_error (A)             # <<<<<<<<<<<<<<
 *         bmi_c.bmi_balsa_clear_ALGEB (A)
 *         return result
 */
  __pyx_t_1 = __Pyx_PyBool_FromLong((!(bmi_dapyx_is_error(__pyx_v_A) != 0))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1106, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_result = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "../../bmi/sympy/DifferentialRing.pyx":1107
 *                     self.notation, strnot, 0, 0)
 *         result = not bmi_c.bmi_dapyx_is_error (A)
 *         bmi_c.bmi_balsa_clear_ALGEB (A)             # <<<<<<<<<<<<<<
 *         return result
 * 
 */
  bmi_balsa_clear_ALGEB(__pyx_v_A);

  /* "../../bmi/sympy/DifferentialRing.pyx":1108
 *         result = not bmi_c.bmi_dapyx_is_error (A)
 *         bmi_c.bmi_balsa_clear_ALGEB (A)
 *         return result             # <<<<<<<<<<<<<<
 * 
 * # is_constant
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_result);
  __pyx_r = __pyx_v_result;
  goto __pyx_L0;

  /* "../../bmi/sympy/DifferentialRing.pyx":1063
 * 
 * # is_differential_fraction
 *     def is_differential_fraction (             # <<<<<<<<<<<<<<
 *             self,
 *             equations,
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("DifferentialAlgebra.DifferentialRing.is_differential_fraction", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XDECREF(__pyx_v_streqns);
  __Pyx_XDECREF(__pyx_v_strders);
  __Pyx_XDECREF(__pyx_v_strnot);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "../../bmi/sympy/DifferentialRing.pyx":1111
 * 
 * # is_constant
 *     def is_constant (             # <<<<<<<<<<<<<<
 *             self,
 *             ratfrac,
 */

/* Python wrapper */
static PyObject *__pyx_pw_19DifferentialAlgebra_16DifferentialRing_29is_constant(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_19DifferentialAlgebra_16DifferentialRing_28is_constant, "\n        Test if a rational fraction is constant\n\n        INPUT:\n\n            `ratfrac`    -- a rational fraction or a list of rational\n                              fractions\n            `derivation` -- (default: None) an independent variable\n\n        OUTPUT:\n\n            True, if the rational fraction is a constant with respect\n            to `derivation`, else False. If `derivation` is omitted,\n            True if the rational fraction is a constant with respect\n            to all the derivations of the ring.\n\n        EXAMPLES:\n\n            >>> from sympy import *\n            >>> from DifferentialAlgebra import *\n            >>> init_printing (use_unicode = False, num_columns = 60)\n\n            >>> a,x,y = var ('a,x,y')\n            >>> u,v = function ('u,v')\n            >>> R = DifferentialRing (derivations = [x,y], \n            ...             blocks = [u,v,a], parameters = [a,v(y)])\n\n            >>> R.is_constant (3)\n            True\n        ");
static PyMethodDef __pyx_mdef_19DifferentialAlgebra_16DifferentialRing_29is_constant = {"is_constant", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_19DifferentialAlgebra_16DifferentialRing_29is_constant, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_19DifferentialAlgebra_16DifferentialRing_28is_constant};
static PyObject *__pyx_pw_19DifferentialAlgebra_16DifferentialRing_29is_constant(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_ratfrac = 0;
  PyObject *__pyx_v_derivation = 0;
  PyObject *__pyx_v_notation = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[3] = {0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_constant (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ratfrac,&__pyx_n_s_derivation,&__pyx_n_s_notation,0};

    /* "../../bmi/sympy/DifferentialRing.pyx":1114
 *             self,
 *             ratfrac,
 *             derivation = None,             # <<<<<<<<<<<<<<
 *             notation = BMI_IX_undefined):
 *         r"""
 */
    values[1] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
    values[2] = __Pyx_Arg_NewRef_FASTCALL(__pyx_k__17);
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_ratfrac)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1111, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_derivation);
          if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1111, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_notation);
          if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1111, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "is_constant") < 0)) __PYX_ERR(0, 1111, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_ratfrac = values[0];
    __pyx_v_derivation = values[1];
    __pyx_v_notation = values[2];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("is_constant", 0, 1, 3, __pyx_nargs); __PYX_ERR(0, 1111, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("DifferentialAlgebra.DifferentialRing.is_constant", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_19DifferentialAlgebra_16DifferentialRing_28is_constant(((struct __pyx_obj_19DifferentialAlgebra_DifferentialRing *)__pyx_v_self), __pyx_v_ratfrac, __pyx_v_derivation, __pyx_v_notation);

  /* "../../bmi/sympy/DifferentialRing.pyx":1111
 * 
 * # is_constant
 *     def is_constant (             # <<<<<<<<<<<<<<
 *             self,
 *             ratfrac,
 */

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_19DifferentialAlgebra_16DifferentialRing_28is_constant(struct __pyx_obj_19DifferentialAlgebra_DifferentialRing *__pyx_v_self, PyObject *__pyx_v_ratfrac, PyObject *__pyx_v_derivation, PyObject *__pyx_v_notation) {
  PyObject *__pyx_v_result = 0;
  PyObject *__pyx_v_streqns = 0;
  PyObject *__pyx_v_strder = 0;
  PyObject *__pyx_v_mesgerr = 0;
  ALGEB_string __pyx_v_A;
  PyObject *__pyx_v_strnot = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  unsigned int __pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  char *__pyx_t_7;
  char *__pyx_t_8;
  char *__pyx_t_9;
  char *__pyx_t_10;
  int __pyx_t_11;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_constant", 1);

  /* "../../bmi/sympy/DifferentialRing.pyx":1150
 *         cdef bmi_c.ALGEB_string A
 *         cdef strnot
 *         strnot = self.__process_notation (notation)             # <<<<<<<<<<<<<<
 *         if isinstance (ratfrac, list):
 *             streqns = ascii (ratfrac)
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_DifferentialRing__process_notat); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1150, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_notation};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1150, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_v_strnot = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "../../bmi/sympy/DifferentialRing.pyx":1151
 *         cdef strnot
 *         strnot = self.__process_notation (notation)
 *         if isinstance (ratfrac, list):             # <<<<<<<<<<<<<<
 *             streqns = ascii (ratfrac)
 *         else:
 */
  __pyx_t_5 = PyList_Check(__pyx_v_ratfrac); 
  if (__pyx_t_5) {

    /* "../../bmi/sympy/DifferentialRing.pyx":1152
 *         strnot = self.__process_notation (notation)
 *         if isinstance (ratfrac, list):
 *             streqns = ascii (ratfrac)             # <<<<<<<<<<<<<<
 *         else:
 *             streqns = ascii ([ratfrac])
 */
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ascii); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1152, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = NULL;
    __pyx_t_4 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
        __pyx_t_4 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_ratfrac};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1152, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    if (!(likely(PyBytes_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_1))) __PYX_ERR(0, 1152, __pyx_L1_error)
    __pyx_v_streqns = ((PyObject*)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "../../bmi/sympy/DifferentialRing.pyx":1151
 *         cdef strnot
 *         strnot = self.__process_notation (notation)
 *         if isinstance (ratfrac, list):             # <<<<<<<<<<<<<<
 *             streqns = ascii (ratfrac)
 *         else:
 */
    goto __pyx_L3;
  }

  /* "../../bmi/sympy/DifferentialRing.pyx":1154
 *             streqns = ascii (ratfrac)
 *         else:
 *             streqns = ascii ([ratfrac])             # <<<<<<<<<<<<<<
 *         if derivation == None:
 *             strder = b"0"
 */
  /*else*/ {
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ascii); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1154, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1154, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_v_ratfrac);
    __Pyx_GIVEREF(__pyx_v_ratfrac);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 0, __pyx_v_ratfrac)) __PYX_ERR(0, 1154, __pyx_L1_error);
    __pyx_t_6 = NULL;
    __pyx_t_4 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
        __pyx_t_4 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_3};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1154, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    if (!(likely(PyBytes_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_1))) __PYX_ERR(0, 1154, __pyx_L1_error)
    __pyx_v_streqns = ((PyObject*)__pyx_t_1);
    __pyx_t_1 = 0;
  }
  __pyx_L3:;

  /* "../../bmi/sympy/DifferentialRing.pyx":1155
 *         else:
 *             streqns = ascii ([ratfrac])
 *         if derivation == None:             # <<<<<<<<<<<<<<
 *             strder = b"0"
 *         else:
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_derivation, Py_None, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1155, __pyx_L1_error)
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 1155, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_5) {

    /* "../../bmi/sympy/DifferentialRing.pyx":1156
 *             streqns = ascii ([ratfrac])
 *         if derivation == None:
 *             strder = b"0"             # <<<<<<<<<<<<<<
 *         else:
 *             strder = ascii (derivation)
 */
    __Pyx_INCREF(__pyx_kp_b_0);
    __pyx_v_strder = __pyx_kp_b_0;

    /* "../../bmi/sympy/DifferentialRing.pyx":1155
 *         else:
 *             streqns = ascii ([ratfrac])
 *         if derivation == None:             # <<<<<<<<<<<<<<
 *             strder = b"0"
 *         else:
 */
    goto __pyx_L4;
  }

  /* "../../bmi/sympy/DifferentialRing.pyx":1158
 *             strder = b"0"
 *         else:
 *             strder = ascii (derivation)             # <<<<<<<<<<<<<<
 *         A = bmi_c.bmi_dapyx_is_constant (
 *                     streqns, strder, self.dring,
 */
  /*else*/ {
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ascii); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1158, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = NULL;
    __pyx_t_4 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
        __pyx_t_4 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_derivation};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1158, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    if (!(likely(PyBytes_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_1))) __PYX_ERR(0, 1158, __pyx_L1_error)
    __pyx_v_strder = ((PyObject*)__pyx_t_1);
    __pyx_t_1 = 0;
  }
  __pyx_L4:;

  /* "../../bmi/sympy/DifferentialRing.pyx":1160
 *             strder = ascii (derivation)
 *         A = bmi_c.bmi_dapyx_is_constant (
 *                     streqns, strder, self.dring,             # <<<<<<<<<<<<<<
 *                     self.notation, strnot, 0, 0)
 *         if bmi_c.bmi_dapyx_is_error (A):
 */
  if (unlikely(__pyx_v_streqns == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
    __PYX_ERR(0, 1160, __pyx_L1_error)
  }
  __pyx_t_7 = __Pyx_PyBytes_AsWritableString(__pyx_v_streqns); if (unlikely((!__pyx_t_7) && PyErr_Occurred())) __PYX_ERR(0, 1160, __pyx_L1_error)
  if (unlikely(__pyx_v_strder == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
    __PYX_ERR(0, 1160, __pyx_L1_error)
  }
  __pyx_t_8 = __Pyx_PyBytes_AsWritableString(__pyx_v_strder); if (unlikely((!__pyx_t_8) && PyErr_Occurred())) __PYX_ERR(0, 1160, __pyx_L1_error)

  /* "../../bmi/sympy/DifferentialRing.pyx":1161
 *         A = bmi_c.bmi_dapyx_is_constant (
 *                     streqns, strder, self.dring,
 *                     self.notation, strnot, 0, 0)             # <<<<<<<<<<<<<<
 *         if bmi_c.bmi_dapyx_is_error (A):
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (A)
 */
  if (unlikely(__pyx_v_self->notation == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
    __PYX_ERR(0, 1161, __pyx_L1_error)
  }
  __pyx_t_9 = __Pyx_PyBytes_AsWritableString(__pyx_v_self->notation); if (unlikely((!__pyx_t_9) && PyErr_Occurred())) __PYX_ERR(0, 1161, __pyx_L1_error)
  __pyx_t_10 = __Pyx_PyObject_AsWritableString(__pyx_v_strnot); if (unlikely((!__pyx_t_10) && PyErr_Occurred())) __PYX_ERR(0, 1161, __pyx_L1_error)

  /* "../../bmi/sympy/DifferentialRing.pyx":1159
 *         else:
 *             strder = ascii (derivation)
 *         A = bmi_c.bmi_dapyx_is_constant (             # <<<<<<<<<<<<<<
 *                     streqns, strder, self.dring,
 *                     self.notation, strnot, 0, 0)
 */
  __pyx_v_A = bmi_dapyx_is_constant(__pyx_t_7, __pyx_t_8, __pyx_v_self->dring, __pyx_t_9, __pyx_t_10, 0, 0);

  /* "../../bmi/sympy/DifferentialRing.pyx":1162
 *                     streqns, strder, self.dring,
 *                     self.notation, strnot, 0, 0)
 *         if bmi_c.bmi_dapyx_is_error (A):             # <<<<<<<<<<<<<<
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (A)
 *             bmi_c.bmi_balsa_clear_ALGEB (A)
 */
  __pyx_t_5 = (bmi_dapyx_is_error(__pyx_v_A) != 0);
  if (unlikely(__pyx_t_5)) {

    /* "../../bmi/sympy/DifferentialRing.pyx":1163
 *                     self.notation, strnot, 0, 0)
 *         if bmi_c.bmi_dapyx_is_error (A):
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (A)             # <<<<<<<<<<<<<<
 *             bmi_c.bmi_balsa_clear_ALGEB (A)
 *             raise RuntimeError (str (mesgerr, 'utf-8'))
 */
    __pyx_t_1 = __Pyx_PyBytes_FromString(bmi_dapyx_mesgerr(__pyx_v_A)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1163, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_v_mesgerr = ((PyObject*)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "../../bmi/sympy/DifferentialRing.pyx":1164
 *         if bmi_c.bmi_dapyx_is_error (A):
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (A)
 *             bmi_c.bmi_balsa_clear_ALGEB (A)             # <<<<<<<<<<<<<<
 *             raise RuntimeError (str (mesgerr, 'utf-8'))
 *         result = eval (A.value, globals (), self.evdict)
 */
    bmi_balsa_clear_ALGEB(__pyx_v_A);

    /* "../../bmi/sympy/DifferentialRing.pyx":1165
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (A)
 *             bmi_c.bmi_balsa_clear_ALGEB (A)
 *             raise RuntimeError (str (mesgerr, 'utf-8'))             # <<<<<<<<<<<<<<
 *         result = eval (A.value, globals (), self.evdict)
 *         if not isinstance (ratfrac, list):
 */
    __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1165, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_v_mesgerr);
    __Pyx_GIVEREF(__pyx_v_mesgerr);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_mesgerr)) __PYX_ERR(0, 1165, __pyx_L1_error);
    __Pyx_INCREF(__pyx_kp_u_utf_8);
    __Pyx_GIVEREF(__pyx_kp_u_utf_8);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_kp_u_utf_8)) __PYX_ERR(0, 1165, __pyx_L1_error);
    __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)(&PyUnicode_Type)), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1165, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_RuntimeError, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1165, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(0, 1165, __pyx_L1_error)

    /* "../../bmi/sympy/DifferentialRing.pyx":1162
 *                     streqns, strder, self.dring,
 *                     self.notation, strnot, 0, 0)
 *         if bmi_c.bmi_dapyx_is_error (A):             # <<<<<<<<<<<<<<
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (A)
 *             bmi_c.bmi_balsa_clear_ALGEB (A)
 */
  }

  /* "../../bmi/sympy/DifferentialRing.pyx":1166
 *             bmi_c.bmi_balsa_clear_ALGEB (A)
 *             raise RuntimeError (str (mesgerr, 'utf-8'))
 *         result = eval (A.value, globals (), self.evdict)             # <<<<<<<<<<<<<<
 *         if not isinstance (ratfrac, list):
 *             result = result [0]
 */
  __pyx_t_1 = __Pyx_PyBytes_FromString(__pyx_v_A->value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1166, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_Globals(); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1166, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1166, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_1);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1)) __PYX_ERR(0, 1166, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_2);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2)) __PYX_ERR(0, 1166, __pyx_L1_error);
  __Pyx_INCREF(__pyx_v_self->evdict);
  __Pyx_GIVEREF(__pyx_v_self->evdict);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_self->evdict)) __PYX_ERR(0, 1166, __pyx_L1_error);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_eval, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1166, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_result = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "../../bmi/sympy/DifferentialRing.pyx":1167
 *             raise RuntimeError (str (mesgerr, 'utf-8'))
 *         result = eval (A.value, globals (), self.evdict)
 *         if not isinstance (ratfrac, list):             # <<<<<<<<<<<<<<
 *             result = result [0]
 *         bmi_c.bmi_balsa_clear_ALGEB (A)
 */
  __pyx_t_5 = PyList_Check(__pyx_v_ratfrac); 
  __pyx_t_11 = (!__pyx_t_5);
  if (__pyx_t_11) {

    /* "../../bmi/sympy/DifferentialRing.pyx":1168
 *         result = eval (A.value, globals (), self.evdict)
 *         if not isinstance (ratfrac, list):
 *             result = result [0]             # <<<<<<<<<<<<<<
 *         bmi_c.bmi_balsa_clear_ALGEB (A)
 *         return result
 */
    __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_result, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1168, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF_SET(__pyx_v_result, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "../../bmi/sympy/DifferentialRing.pyx":1167
 *             raise RuntimeError (str (mesgerr, 'utf-8'))
 *         result = eval (A.value, globals (), self.evdict)
 *         if not isinstance (ratfrac, list):             # <<<<<<<<<<<<<<
 *             result = result [0]
 *         bmi_c.bmi_balsa_clear_ALGEB (A)
 */
  }

  /* "../../bmi/sympy/DifferentialRing.pyx":1169
 *         if not isinstance (ratfrac, list):
 *             result = result [0]
 *         bmi_c.bmi_balsa_clear_ALGEB (A)             # <<<<<<<<<<<<<<
 *         return result
 * 
 */
  bmi_balsa_clear_ALGEB(__pyx_v_A);

  /* "../../bmi/sympy/DifferentialRing.pyx":1170
 *             result = result [0]
 *         bmi_c.bmi_balsa_clear_ALGEB (A)
 *         return result             # <<<<<<<<<<<<<<
 * 
 * # leading_derivative
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_result);
  __pyx_r = __pyx_v_result;
  goto __pyx_L0;

  /* "../../bmi/sympy/DifferentialRing.pyx":1111
 * 
 * # is_constant
 *     def is_constant (             # <<<<<<<<<<<<<<
 *             self,
 *             ratfrac,
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("DifferentialAlgebra.DifferentialRing.is_constant", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XDECREF(__pyx_v_streqns);
  __Pyx_XDECREF(__pyx_v_strder);
  __Pyx_XDECREF(__pyx_v_mesgerr);
  __Pyx_XDECREF(__pyx_v_strnot);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "../../bmi/sympy/DifferentialRing.pyx":1173
 * 
 * # leading_derivative
 *     def leading_derivative (             # <<<<<<<<<<<<<<
 *             self,
 *             equations,
 */

/* Python wrapper */
static PyObject *__pyx_pw_19DifferentialAlgebra_16DifferentialRing_31leading_derivative(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_19DifferentialAlgebra_16DifferentialRing_30leading_derivative, "\n        The leading derivative of a rational fraction\n\n        INPUT:\n\n            `equations` -- a rational fraction or a list of rational \n                             fractions \n            `notation`  -- (default: 'undefined') a string\n\n        OUTPUT:\n\n            The list of the leading derivatives of the equations.\n\n            The leading derivative of a rational fraction F is defined\n            as the highest derivative u such that the partial derivative\n            of F with respect to u is nonzero.\n\n            This definition is extended to rational fractions which\n            only depend on independent variables.\n\n            The leading derivative of constant rational fractions is\n            not defined.\n\n        EXAMPLES:\n\n            >>> from sympy import *\n            >>> from DifferentialAlgebra import *\n            >>> init_printing (use_unicode = False, num_columns = 60)\n\n            >>> t = var ('t')\n            >>> u,v = function ('u,v')\n            >>> R = DifferentialRing (derivations = [t], blocks = [u,v])\n            >>> L = [t, u(t)**2 - u(t), Derivative(v(t),t), 1/v(t)]\n            >>> R.leading_derivative (L)\n                      d              \n            [t, u(t), --(v(t)), v(t)]\n                      dt             \n        ");
static PyMethodDef __pyx_mdef_19DifferentialAlgebra_16DifferentialRing_31leading_derivative = {"leading_derivative", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_19DifferentialAlgebra_16DifferentialRing_31leading_derivative, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_19DifferentialAlgebra_16DifferentialRing_30leading_derivative};
static PyObject *__pyx_pw_19DifferentialAlgebra_16DifferentialRing_31leading_derivative(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_equations = 0;
  PyObject *__pyx_v_notation = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("leading_derivative (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_equations,&__pyx_n_s_notation,0};
    values[1] = __Pyx_Arg_NewRef_FASTCALL(__pyx_k__18);
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_equations)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1173, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_notation);
          if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1173, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "leading_derivative") < 0)) __PYX_ERR(0, 1173, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_equations = values[0];
    __pyx_v_notation = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("leading_derivative", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 1173, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("DifferentialAlgebra.DifferentialRing.leading_derivative", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_19DifferentialAlgebra_16DifferentialRing_30leading_derivative(((struct __pyx_obj_19DifferentialAlgebra_DifferentialRing *)__pyx_v_self), __pyx_v_equations, __pyx_v_notation);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_19DifferentialAlgebra_16DifferentialRing_30leading_derivative(struct __pyx_obj_19DifferentialAlgebra_DifferentialRing *__pyx_v_self, PyObject *__pyx_v_equations, PyObject *__pyx_v_notation) {
  PyObject *__pyx_v_result = 0;
  PyObject *__pyx_v_streqns = 0;
  PyObject *__pyx_v_mesgerr = 0;
  ALGEB_string __pyx_v_A;
  PyObject *__pyx_v_strnot = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  unsigned int __pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  char *__pyx_t_7;
  bool __pyx_t_8;
  char *__pyx_t_9;
  char *__pyx_t_10;
  int __pyx_t_11;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("leading_derivative", 1);

  /* "../../bmi/sympy/DifferentialRing.pyx":1220
 *         cdef bmi_c.ALGEB_string A
 *         cdef strnot
 *         strnot = self.__process_notation (notation)             # <<<<<<<<<<<<<<
 *         if isinstance (equations, list):
 *             streqns = ascii (equations)
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_DifferentialRing__process_notat); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1220, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_notation};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1220, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_v_strnot = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "../../bmi/sympy/DifferentialRing.pyx":1221
 *         cdef strnot
 *         strnot = self.__process_notation (notation)
 *         if isinstance (equations, list):             # <<<<<<<<<<<<<<
 *             streqns = ascii (equations)
 *         else:
 */
  __pyx_t_5 = PyList_Check(__pyx_v_equations); 
  if (__pyx_t_5) {

    /* "../../bmi/sympy/DifferentialRing.pyx":1222
 *         strnot = self.__process_notation (notation)
 *         if isinstance (equations, list):
 *             streqns = ascii (equations)             # <<<<<<<<<<<<<<
 *         else:
 *             streqns = ascii ([equations])
 */
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ascii); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1222, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = NULL;
    __pyx_t_4 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
        __pyx_t_4 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_equations};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1222, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    if (!(likely(PyBytes_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_1))) __PYX_ERR(0, 1222, __pyx_L1_error)
    __pyx_v_streqns = ((PyObject*)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "../../bmi/sympy/DifferentialRing.pyx":1221
 *         cdef strnot
 *         strnot = self.__process_notation (notation)
 *         if isinstance (equations, list):             # <<<<<<<<<<<<<<
 *             streqns = ascii (equations)
 *         else:
 */
    goto __pyx_L3;
  }

  /* "../../bmi/sympy/DifferentialRing.pyx":1224
 *             streqns = ascii (equations)
 *         else:
 *             streqns = ascii ([equations])             # <<<<<<<<<<<<<<
 *         A = bmi_c.bmi_dapyx_leading_derivative (
 *                     streqns, self.dring, int (False),
 */
  /*else*/ {
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ascii); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1224, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1224, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_v_equations);
    __Pyx_GIVEREF(__pyx_v_equations);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 0, __pyx_v_equations)) __PYX_ERR(0, 1224, __pyx_L1_error);
    __pyx_t_6 = NULL;
    __pyx_t_4 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
        __pyx_t_4 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_3};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1224, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    if (!(likely(PyBytes_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_1))) __PYX_ERR(0, 1224, __pyx_L1_error)
    __pyx_v_streqns = ((PyObject*)__pyx_t_1);
    __pyx_t_1 = 0;
  }
  __pyx_L3:;

  /* "../../bmi/sympy/DifferentialRing.pyx":1226
 *             streqns = ascii ([equations])
 *         A = bmi_c.bmi_dapyx_leading_derivative (
 *                     streqns, self.dring, int (False),             # <<<<<<<<<<<<<<
 *                     self.notation, strnot, 0, 0)
 *         if bmi_c.bmi_dapyx_is_error (A):
 */
  if (unlikely(__pyx_v_streqns == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
    __PYX_ERR(0, 1226, __pyx_L1_error)
  }
  __pyx_t_7 = __Pyx_PyBytes_AsWritableString(__pyx_v_streqns); if (unlikely((!__pyx_t_7) && PyErr_Occurred())) __PYX_ERR(0, 1226, __pyx_L1_error)
  __pyx_t_1 = __Pyx_PyNumber_Int(Py_False); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1226, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_8 = __Pyx_PyInt_As_bool(__pyx_t_1); if (unlikely((__pyx_t_8 == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1226, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "../../bmi/sympy/DifferentialRing.pyx":1227
 *         A = bmi_c.bmi_dapyx_leading_derivative (
 *                     streqns, self.dring, int (False),
 *                     self.notation, strnot, 0, 0)             # <<<<<<<<<<<<<<
 *         if bmi_c.bmi_dapyx_is_error (A):
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (A)
 */
  if (unlikely(__pyx_v_self->notation == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
    __PYX_ERR(0, 1227, __pyx_L1_error)
  }
  __pyx_t_9 = __Pyx_PyBytes_AsWritableString(__pyx_v_self->notation); if (unlikely((!__pyx_t_9) && PyErr_Occurred())) __PYX_ERR(0, 1227, __pyx_L1_error)
  __pyx_t_10 = __Pyx_PyObject_AsWritableString(__pyx_v_strnot); if (unlikely((!__pyx_t_10) && PyErr_Occurred())) __PYX_ERR(0, 1227, __pyx_L1_error)

  /* "../../bmi/sympy/DifferentialRing.pyx":1225
 *         else:
 *             streqns = ascii ([equations])
 *         A = bmi_c.bmi_dapyx_leading_derivative (             # <<<<<<<<<<<<<<
 *                     streqns, self.dring, int (False),
 *                     self.notation, strnot, 0, 0)
 */
  __pyx_v_A = bmi_dapyx_leading_derivative(__pyx_t_7, __pyx_v_self->dring, __pyx_t_8, __pyx_t_9, __pyx_t_10, 0, 0);

  /* "../../bmi/sympy/DifferentialRing.pyx":1228
 *                     streqns, self.dring, int (False),
 *                     self.notation, strnot, 0, 0)
 *         if bmi_c.bmi_dapyx_is_error (A):             # <<<<<<<<<<<<<<
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (A)
 *             bmi_c.bmi_balsa_clear_ALGEB (A)
 */
  __pyx_t_5 = (bmi_dapyx_is_error(__pyx_v_A) != 0);
  if (unlikely(__pyx_t_5)) {

    /* "../../bmi/sympy/DifferentialRing.pyx":1229
 *                     self.notation, strnot, 0, 0)
 *         if bmi_c.bmi_dapyx_is_error (A):
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (A)             # <<<<<<<<<<<<<<
 *             bmi_c.bmi_balsa_clear_ALGEB (A)
 *             raise RuntimeError (str (mesgerr, 'utf-8'))
 */
    __pyx_t_1 = __Pyx_PyBytes_FromString(bmi_dapyx_mesgerr(__pyx_v_A)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1229, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_v_mesgerr = ((PyObject*)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "../../bmi/sympy/DifferentialRing.pyx":1230
 *         if bmi_c.bmi_dapyx_is_error (A):
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (A)
 *             bmi_c.bmi_balsa_clear_ALGEB (A)             # <<<<<<<<<<<<<<
 *             raise RuntimeError (str (mesgerr, 'utf-8'))
 *         result = eval (A.value, globals (), self.evdict)
 */
    bmi_balsa_clear_ALGEB(__pyx_v_A);

    /* "../../bmi/sympy/DifferentialRing.pyx":1231
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (A)
 *             bmi_c.bmi_balsa_clear_ALGEB (A)
 *             raise RuntimeError (str (mesgerr, 'utf-8'))             # <<<<<<<<<<<<<<
 *         result = eval (A.value, globals (), self.evdict)
 *         if not isinstance (equations, list):
 */
    __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1231, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_v_mesgerr);
    __Pyx_GIVEREF(__pyx_v_mesgerr);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_mesgerr)) __PYX_ERR(0, 1231, __pyx_L1_error);
    __Pyx_INCREF(__pyx_kp_u_utf_8);
    __Pyx_GIVEREF(__pyx_kp_u_utf_8);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_kp_u_utf_8)) __PYX_ERR(0, 1231, __pyx_L1_error);
    __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)(&PyUnicode_Type)), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1231, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_RuntimeError, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1231, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(0, 1231, __pyx_L1_error)

    /* "../../bmi/sympy/DifferentialRing.pyx":1228
 *                     streqns, self.dring, int (False),
 *                     self.notation, strnot, 0, 0)
 *         if bmi_c.bmi_dapyx_is_error (A):             # <<<<<<<<<<<<<<
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (A)
 *             bmi_c.bmi_balsa_clear_ALGEB (A)
 */
  }

  /* "../../bmi/sympy/DifferentialRing.pyx":1232
 *             bmi_c.bmi_balsa_clear_ALGEB (A)
 *             raise RuntimeError (str (mesgerr, 'utf-8'))
 *         result = eval (A.value, globals (), self.evdict)             # <<<<<<<<<<<<<<
 *         if not isinstance (equations, list):
 *             result = result [0]
 */
  __pyx_t_1 = __Pyx_PyBytes_FromString(__pyx_v_A->value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1232, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_Globals(); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1232, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1232, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_1);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1)) __PYX_ERR(0, 1232, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_2);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2)) __PYX_ERR(0, 1232, __pyx_L1_error);
  __Pyx_INCREF(__pyx_v_self->evdict);
  __Pyx_GIVEREF(__pyx_v_self->evdict);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_self->evdict)) __PYX_ERR(0, 1232, __pyx_L1_error);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_eval, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1232, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_result = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "../../bmi/sympy/DifferentialRing.pyx":1233
 *             raise RuntimeError (str (mesgerr, 'utf-8'))
 *         result = eval (A.value, globals (), self.evdict)
 *         if not isinstance (equations, list):             # <<<<<<<<<<<<<<
 *             result = result [0]
 *         bmi_c.bmi_balsa_clear_ALGEB (A)
 */
  __pyx_t_5 = PyList_Check(__pyx_v_equations); 
  __pyx_t_11 = (!__pyx_t_5);
  if (__pyx_t_11) {

    /* "../../bmi/sympy/DifferentialRing.pyx":1234
 *         result = eval (A.value, globals (), self.evdict)
 *         if not isinstance (equations, list):
 *             result = result [0]             # <<<<<<<<<<<<<<
 *         bmi_c.bmi_balsa_clear_ALGEB (A)
 *         return result
 */
    __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_result, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1234, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF_SET(__pyx_v_result, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "../../bmi/sympy/DifferentialRing.pyx":1233
 *             raise RuntimeError (str (mesgerr, 'utf-8'))
 *         result = eval (A.value, globals (), self.evdict)
 *         if not isinstance (equations, list):             # <<<<<<<<<<<<<<
 *             result = result [0]
 *         bmi_c.bmi_balsa_clear_ALGEB (A)
 */
  }

  /* "../../bmi/sympy/DifferentialRing.pyx":1235
 *         if not isinstance (equations, list):
 *             result = result [0]
 *         bmi_c.bmi_balsa_clear_ALGEB (A)             # <<<<<<<<<<<<<<
 *         return result
 * 
 */
  bmi_balsa_clear_ALGEB(__pyx_v_A);

  /* "../../bmi/sympy/DifferentialRing.pyx":1236
 *             result = result [0]
 *         bmi_c.bmi_balsa_clear_ALGEB (A)
 *         return result             # <<<<<<<<<<<<<<
 * 
 * # leading_rank
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_result);
  __pyx_r = __pyx_v_result;
  goto __pyx_L0;

  /* "../../bmi/sympy/DifferentialRing.pyx":1173
 * 
 * # leading_derivative
 *     def leading_derivative (             # <<<<<<<<<<<<<<
 *             self,
 *             equations,
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("DifferentialAlgebra.DifferentialRing.leading_derivative", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XDECREF(__pyx_v_streqns);
  __Pyx_XDECREF(__pyx_v_mesgerr);
  __Pyx_XDECREF(__pyx_v_strnot);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "../../bmi/sympy/DifferentialRing.pyx":1239
 * 
 * # leading_rank
 *     def leading_rank (             # <<<<<<<<<<<<<<
 *             self,
 *             equations,
 */

/* Python wrapper */
static PyObject *__pyx_pw_19DifferentialAlgebra_16DifferentialRing_33leading_rank(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_19DifferentialAlgebra_16DifferentialRing_32leading_rank, "\n        The leading rank of a rational fraction\n\n        INPUT:\n\n            `equations` -- a rational fraction or a list of rational \n                             fractions \n            `listform`  -- (default: False) a bool\n            `notation`  -- (default: 'undefined') a string\n\n        OUTPUT:\n\n            The list of the leading ranks of the equations.\n\n            If the optional parameter `listform` is True, then the\n            ranks are returned as lists rather than monomials. This is\n            feature is relevant when the rank is a derivative raised\n            at the zeroth power.\n\n            The leading rank of a rational fraction F = P/Q is defined\n            as the leading derivative u of F, raised at the power\n            deg(P,u) - deg(Q,u).\n\n            Nonzero constant rational fractions have leading rank 1.\n\n            The zero rational fraction has leading rank 0.\n\n        EXAMPLES:\n\n            >>> from sympy import *\n            >>> from DifferentialAlgebra import *\n            >>> init_printing (use_unicode = False, num_columns = 60)\n\n            >>> t = var ('t') \n            >>> u,v = function ('u,v')\n            >>> R = DifferentialRing (derivations = [t], blocks = [u,v])\n            >>> L = [t, u(t)**2 - u(t), Derivative(v(t),t), 1/v(t)]\n\n        The list of leading ranks of the elements of L, in monomial\n        form m:\n\n            >>> R.leading_rank (L)\n                 2     d          1   \n            [t, u (t), --(v(t)), ----]\n                       dt        v(t) \n\n        The same list, in list form:\n\n            >>> R.leading_rank (L, listform = True)\n                                 d                        \n            [[t, 1], [u(t), 2], [--(v(t)), 1], [v(t), -1]]\n                                 dt                       \n\n        The case of a single rational fraction:\n\n            >>> R.leading_rank (1/u(t)**2)\n              1  \n            -----\n             ""2   \n            u (t)\n\n        The case of a rank, being a derivative raised at the zeroth\n        power:\n\n            >>> R.leading_rank ((u(t)-1)/(u(t)+2))\n            1\n        ");
static PyMethodDef __pyx_mdef_19DifferentialAlgebra_16DifferentialRing_33leading_rank = {"leading_rank", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_19DifferentialAlgebra_16DifferentialRing_33leading_rank, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_19DifferentialAlgebra_16DifferentialRing_32leading_rank};
static PyObject *__pyx_pw_19DifferentialAlgebra_16DifferentialRing_33leading_rank(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_equations = 0;
  PyBoolObject *__pyx_v_listform = 0;
  PyObject *__pyx_v_notation = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[3] = {0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("leading_rank (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_equations,&__pyx_n_s_listform,&__pyx_n_s_notation,0};

    /* "../../bmi/sympy/DifferentialRing.pyx":1242
 *             self,
 *             equations,
 *             bool listform = False,             # <<<<<<<<<<<<<<
 *             notation = BMI_IX_undefined):
 *         r"""
 */
    values[1] = __Pyx_Arg_NewRef_FASTCALL((PyObject *)((PyBoolObject *)Py_False));
    values[2] = __Pyx_Arg_NewRef_FASTCALL(__pyx_k__19);
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_equations)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1239, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_listform);
          if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1239, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_notation);
          if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1239, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "leading_rank") < 0)) __PYX_ERR(0, 1239, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_equations = values[0];
    __pyx_v_listform = ((PyBoolObject *)values[1]);
    __pyx_v_notation = values[2];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("leading_rank", 0, 1, 3, __pyx_nargs); __PYX_ERR(0, 1239, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("DifferentialAlgebra.DifferentialRing.leading_rank", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_listform), __pyx_ptype_7cpython_4bool_bool, 1, "listform", 0))) __PYX_ERR(0, 1242, __pyx_L1_error)
  __pyx_r = __pyx_pf_19DifferentialAlgebra_16DifferentialRing_32leading_rank(((struct __pyx_obj_19DifferentialAlgebra_DifferentialRing *)__pyx_v_self), __pyx_v_equations, __pyx_v_listform, __pyx_v_notation);

  /* "../../bmi/sympy/DifferentialRing.pyx":1239
 * 
 * # leading_rank
 *     def leading_rank (             # <<<<<<<<<<<<<<
 *             self,
 *             equations,
 */

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_19DifferentialAlgebra_16DifferentialRing_32leading_rank(struct __pyx_obj_19DifferentialAlgebra_DifferentialRing *__pyx_v_self, PyObject *__pyx_v_equations, PyBoolObject *__pyx_v_listform, PyObject *__pyx_v_notation) {
  PyObject *__pyx_v_result = 0;
  PyObject *__pyx_v_streqns = 0;
  PyObject *__pyx_v_mesgerr = 0;
  ALGEB_string __pyx_v_A;
  PyObject *__pyx_v_strnot = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  unsigned int __pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  char *__pyx_t_7;
  bool __pyx_t_8;
  bool __pyx_t_9;
  char *__pyx_t_10;
  char *__pyx_t_11;
  int __pyx_t_12;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("leading_rank", 1);

  /* "../../bmi/sympy/DifferentialRing.pyx":1316
 *         cdef bmi_c.ALGEB_string A
 *         cdef strnot
 *         strnot = self.__process_notation (notation)             # <<<<<<<<<<<<<<
 *         if isinstance (equations, list):
 *             streqns = ascii (equations)
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_DifferentialRing__process_notat); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1316, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_notation};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1316, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_v_strnot = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "../../bmi/sympy/DifferentialRing.pyx":1317
 *         cdef strnot
 *         strnot = self.__process_notation (notation)
 *         if isinstance (equations, list):             # <<<<<<<<<<<<<<
 *             streqns = ascii (equations)
 *         else:
 */
  __pyx_t_5 = PyList_Check(__pyx_v_equations); 
  if (__pyx_t_5) {

    /* "../../bmi/sympy/DifferentialRing.pyx":1318
 *         strnot = self.__process_notation (notation)
 *         if isinstance (equations, list):
 *             streqns = ascii (equations)             # <<<<<<<<<<<<<<
 *         else:
 *             streqns = ascii ([equations])
 */
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ascii); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1318, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = NULL;
    __pyx_t_4 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
        __pyx_t_4 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_equations};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1318, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    if (!(likely(PyBytes_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_1))) __PYX_ERR(0, 1318, __pyx_L1_error)
    __pyx_v_streqns = ((PyObject*)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "../../bmi/sympy/DifferentialRing.pyx":1317
 *         cdef strnot
 *         strnot = self.__process_notation (notation)
 *         if isinstance (equations, list):             # <<<<<<<<<<<<<<
 *             streqns = ascii (equations)
 *         else:
 */
    goto __pyx_L3;
  }

  /* "../../bmi/sympy/DifferentialRing.pyx":1320
 *             streqns = ascii (equations)
 *         else:
 *             streqns = ascii ([equations])             # <<<<<<<<<<<<<<
 *         A = bmi_c.bmi_dapyx_leading_rank (
 *                     streqns, self.dring, int (False), int (listform),
 */
  /*else*/ {
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ascii); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1320, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1320, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_v_equations);
    __Pyx_GIVEREF(__pyx_v_equations);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 0, __pyx_v_equations)) __PYX_ERR(0, 1320, __pyx_L1_error);
    __pyx_t_6 = NULL;
    __pyx_t_4 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
        __pyx_t_4 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_3};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1320, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    if (!(likely(PyBytes_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_1))) __PYX_ERR(0, 1320, __pyx_L1_error)
    __pyx_v_streqns = ((PyObject*)__pyx_t_1);
    __pyx_t_1 = 0;
  }
  __pyx_L3:;

  /* "../../bmi/sympy/DifferentialRing.pyx":1322
 *             streqns = ascii ([equations])
 *         A = bmi_c.bmi_dapyx_leading_rank (
 *                     streqns, self.dring, int (False), int (listform),             # <<<<<<<<<<<<<<
 *                     self.notation, strnot, 0, 0)
 *         if bmi_c.bmi_dapyx_is_error (A):
 */
  if (unlikely(__pyx_v_streqns == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
    __PYX_ERR(0, 1322, __pyx_L1_error)
  }
  __pyx_t_7 = __Pyx_PyBytes_AsWritableString(__pyx_v_streqns); if (unlikely((!__pyx_t_7) && PyErr_Occurred())) __PYX_ERR(0, 1322, __pyx_L1_error)
  __pyx_t_1 = __Pyx_PyNumber_Int(Py_False); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1322, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_8 = __Pyx_PyInt_As_bool(__pyx_t_1); if (unlikely((__pyx_t_8 == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1322, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyNumber_Int(((PyObject *)__pyx_v_listform)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1322, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_9 = __Pyx_PyInt_As_bool(__pyx_t_1); if (unlikely((__pyx_t_9 == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1322, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "../../bmi/sympy/DifferentialRing.pyx":1323
 *         A = bmi_c.bmi_dapyx_leading_rank (
 *                     streqns, self.dring, int (False), int (listform),
 *                     self.notation, strnot, 0, 0)             # <<<<<<<<<<<<<<
 *         if bmi_c.bmi_dapyx_is_error (A):
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (A)
 */
  if (unlikely(__pyx_v_self->notation == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
    __PYX_ERR(0, 1323, __pyx_L1_error)
  }
  __pyx_t_10 = __Pyx_PyBytes_AsWritableString(__pyx_v_self->notation); if (unlikely((!__pyx_t_10) && PyErr_Occurred())) __PYX_ERR(0, 1323, __pyx_L1_error)
  __pyx_t_11 = __Pyx_PyObject_AsWritableString(__pyx_v_strnot); if (unlikely((!__pyx_t_11) && PyErr_Occurred())) __PYX_ERR(0, 1323, __pyx_L1_error)

  /* "../../bmi/sympy/DifferentialRing.pyx":1321
 *         else:
 *             streqns = ascii ([equations])
 *         A = bmi_c.bmi_dapyx_leading_rank (             # <<<<<<<<<<<<<<
 *                     streqns, self.dring, int (False), int (listform),
 *                     self.notation, strnot, 0, 0)
 */
  __pyx_v_A = bmi_dapyx_leading_rank(__pyx_t_7, __pyx_v_self->dring, __pyx_t_8, __pyx_t_9, __pyx_t_10, __pyx_t_11, 0, 0);

  /* "../../bmi/sympy/DifferentialRing.pyx":1324
 *                     streqns, self.dring, int (False), int (listform),
 *                     self.notation, strnot, 0, 0)
 *         if bmi_c.bmi_dapyx_is_error (A):             # <<<<<<<<<<<<<<
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (A)
 *             bmi_c.bmi_balsa_clear_ALGEB (A)
 */
  __pyx_t_5 = (bmi_dapyx_is_error(__pyx_v_A) != 0);
  if (unlikely(__pyx_t_5)) {

    /* "../../bmi/sympy/DifferentialRing.pyx":1325
 *                     self.notation, strnot, 0, 0)
 *         if bmi_c.bmi_dapyx_is_error (A):
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (A)             # <<<<<<<<<<<<<<
 *             bmi_c.bmi_balsa_clear_ALGEB (A)
 *             raise RuntimeError (str (mesgerr, 'utf-8'))
 */
    __pyx_t_1 = __Pyx_PyBytes_FromString(bmi_dapyx_mesgerr(__pyx_v_A)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1325, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_v_mesgerr = ((PyObject*)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "../../bmi/sympy/DifferentialRing.pyx":1326
 *         if bmi_c.bmi_dapyx_is_error (A):
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (A)
 *             bmi_c.bmi_balsa_clear_ALGEB (A)             # <<<<<<<<<<<<<<
 *             raise RuntimeError (str (mesgerr, 'utf-8'))
 *         result = eval (A.value, globals (), self.evdict)
 */
    bmi_balsa_clear_ALGEB(__pyx_v_A);

    /* "../../bmi/sympy/DifferentialRing.pyx":1327
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (A)
 *             bmi_c.bmi_balsa_clear_ALGEB (A)
 *             raise RuntimeError (str (mesgerr, 'utf-8'))             # <<<<<<<<<<<<<<
 *         result = eval (A.value, globals (), self.evdict)
 *         if not isinstance (equations, list):
 */
    __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1327, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_v_mesgerr);
    __Pyx_GIVEREF(__pyx_v_mesgerr);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_mesgerr)) __PYX_ERR(0, 1327, __pyx_L1_error);
    __Pyx_INCREF(__pyx_kp_u_utf_8);
    __Pyx_GIVEREF(__pyx_kp_u_utf_8);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_kp_u_utf_8)) __PYX_ERR(0, 1327, __pyx_L1_error);
    __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)(&PyUnicode_Type)), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1327, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_RuntimeError, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1327, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(0, 1327, __pyx_L1_error)

    /* "../../bmi/sympy/DifferentialRing.pyx":1324
 *                     streqns, self.dring, int (False), int (listform),
 *                     self.notation, strnot, 0, 0)
 *         if bmi_c.bmi_dapyx_is_error (A):             # <<<<<<<<<<<<<<
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (A)
 *             bmi_c.bmi_balsa_clear_ALGEB (A)
 */
  }

  /* "../../bmi/sympy/DifferentialRing.pyx":1328
 *             bmi_c.bmi_balsa_clear_ALGEB (A)
 *             raise RuntimeError (str (mesgerr, 'utf-8'))
 *         result = eval (A.value, globals (), self.evdict)             # <<<<<<<<<<<<<<
 *         if not isinstance (equations, list):
 *             result = result [0]
 */
  __pyx_t_1 = __Pyx_PyBytes_FromString(__pyx_v_A->value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1328, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_Globals(); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1328, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1328, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_1);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1)) __PYX_ERR(0, 1328, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_2);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2)) __PYX_ERR(0, 1328, __pyx_L1_error);
  __Pyx_INCREF(__pyx_v_self->evdict);
  __Pyx_GIVEREF(__pyx_v_self->evdict);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_self->evdict)) __PYX_ERR(0, 1328, __pyx_L1_error);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_eval, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1328, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_result = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "../../bmi/sympy/DifferentialRing.pyx":1329
 *             raise RuntimeError (str (mesgerr, 'utf-8'))
 *         result = eval (A.value, globals (), self.evdict)
 *         if not isinstance (equations, list):             # <<<<<<<<<<<<<<
 *             result = result [0]
 *         bmi_c.bmi_balsa_clear_ALGEB (A)
 */
  __pyx_t_5 = PyList_Check(__pyx_v_equations); 
  __pyx_t_12 = (!__pyx_t_5);
  if (__pyx_t_12) {

    /* "../../bmi/sympy/DifferentialRing.pyx":1330
 *         result = eval (A.value, globals (), self.evdict)
 *         if not isinstance (equations, list):
 *             result = result [0]             # <<<<<<<<<<<<<<
 *         bmi_c.bmi_balsa_clear_ALGEB (A)
 *         return result
 */
    __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_result, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1330, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF_SET(__pyx_v_result, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "../../bmi/sympy/DifferentialRing.pyx":1329
 *             raise RuntimeError (str (mesgerr, 'utf-8'))
 *         result = eval (A.value, globals (), self.evdict)
 *         if not isinstance (equations, list):             # <<<<<<<<<<<<<<
 *             result = result [0]
 *         bmi_c.bmi_balsa_clear_ALGEB (A)
 */
  }

  /* "../../bmi/sympy/DifferentialRing.pyx":1331
 *         if not isinstance (equations, list):
 *             result = result [0]
 *         bmi_c.bmi_balsa_clear_ALGEB (A)             # <<<<<<<<<<<<<<
 *         return result
 * 
 */
  bmi_balsa_clear_ALGEB(__pyx_v_A);

  /* "../../bmi/sympy/DifferentialRing.pyx":1332
 *             result = result [0]
 *         bmi_c.bmi_balsa_clear_ALGEB (A)
 *         return result             # <<<<<<<<<<<<<<
 * 
 * # initial
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_result);
  __pyx_r = __pyx_v_result;
  goto __pyx_L0;

  /* "../../bmi/sympy/DifferentialRing.pyx":1239
 * 
 * # leading_rank
 *     def leading_rank (             # <<<<<<<<<<<<<<
 *             self,
 *             equations,
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("DifferentialAlgebra.DifferentialRing.leading_rank", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XDECREF(__pyx_v_streqns);
  __Pyx_XDECREF(__pyx_v_mesgerr);
  __Pyx_XDECREF(__pyx_v_strnot);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "../../bmi/sympy/DifferentialRing.pyx":1335
 * 
 * # initial
 *     def initial (             # <<<<<<<<<<<<<<
 *             self,
 *             equations,
 */

/* Python wrapper */
static PyObject *__pyx_pw_19DifferentialAlgebra_16DifferentialRing_35initial(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_19DifferentialAlgebra_16DifferentialRing_34initial, "\n        The initial of a polynomial or a rational fraction\n\n        INPUT:\n\n            `equations` -- a rational fraction or a list of rational \n                             fractions \n            `notation`  -- (default: 'undefined') a string\n\n        OUTPUT:\n\n            The list of the initials of the equations, i.e. the\n            leading coefficients of the equations with respect to\n            their leading derivatives.\n\n            The initial of a rational fraction F = P/Q, with leading\n            derivative u, is itself a rational fraction: the leading\n            coefficient of P with respect to u, divided by the leading\n            coefficient of Q with respect to u, recalling that the\n            leading coefficient with respect to u, of a polynomial. R\n            which does not depend on u, is defined as R itself.\n\n        NOTES:\n\n            The above definition is not yet fully implemented.\n\n        EXAMPLES:\n\n            >>> from sympy import *\n            >>> from DifferentialAlgebra import *\n            >>> init_printing (use_unicode = False, num_columns = 60)\n\n            >>> t = var ('t')\n            >>> u,v = function ('u,v')\n            >>> R = DifferentialRing (derivations = [t], blocks = [u,v])\n            >>> L = [t, v(t)*u(t)**2 - u(t) + Derivative(v(t),t) + 1, \n            ...      t*u(t)/Derivative(v(t),t)]\n            >>> R.initial (L)\n                         t     \n            [1, v(t), --------]\n                      d        \n                      --(v(t)) \n                      dt       \n        ");
static PyMethodDef __pyx_mdef_19DifferentialAlgebra_16DifferentialRing_35initial = {"initial", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_19DifferentialAlgebra_16DifferentialRing_35initial, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_19DifferentialAlgebra_16DifferentialRing_34initial};
static PyObject *__pyx_pw_19DifferentialAlgebra_16DifferentialRing_35initial(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_equations = 0;
  PyObject *__pyx_v_notation = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("initial (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_equations,&__pyx_n_s_notation,0};
    values[1] = __Pyx_Arg_NewRef_FASTCALL(__pyx_k__20);
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_equations)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1335, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_notation);
          if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1335, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "initial") < 0)) __PYX_ERR(0, 1335, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_equations = values[0];
    __pyx_v_notation = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("initial", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 1335, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("DifferentialAlgebra.DifferentialRing.initial", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_19DifferentialAlgebra_16DifferentialRing_34initial(((struct __pyx_obj_19DifferentialAlgebra_DifferentialRing *)__pyx_v_self), __pyx_v_equations, __pyx_v_notation);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_19DifferentialAlgebra_16DifferentialRing_34initial(struct __pyx_obj_19DifferentialAlgebra_DifferentialRing *__pyx_v_self, PyObject *__pyx_v_equations, PyObject *__pyx_v_notation) {
  PyObject *__pyx_v_result = 0;
  PyObject *__pyx_v_streqns = 0;
  PyObject *__pyx_v_strvar = 0;
  PyObject *__pyx_v_mesgerr = 0;
  ALGEB_string __pyx_v_A;
  PyObject *__pyx_v_strnot = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  unsigned int __pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  char *__pyx_t_7;
  bool __pyx_t_8;
  char *__pyx_t_9;
  char *__pyx_t_10;
  char *__pyx_t_11;
  int __pyx_t_12;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("initial", 1);

  /* "../../bmi/sympy/DifferentialRing.pyx":1388
 *         cdef bmi_c.ALGEB_string A
 *         cdef strnot
 *         strnot = self.__process_notation (notation)             # <<<<<<<<<<<<<<
 *         if isinstance (equations, list):
 *             streqns = ascii (equations)
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_DifferentialRing__process_notat); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1388, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_notation};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1388, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_v_strnot = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "../../bmi/sympy/DifferentialRing.pyx":1389
 *         cdef strnot
 *         strnot = self.__process_notation (notation)
 *         if isinstance (equations, list):             # <<<<<<<<<<<<<<
 *             streqns = ascii (equations)
 *         else:
 */
  __pyx_t_5 = PyList_Check(__pyx_v_equations); 
  if (__pyx_t_5) {

    /* "../../bmi/sympy/DifferentialRing.pyx":1390
 *         strnot = self.__process_notation (notation)
 *         if isinstance (equations, list):
 *             streqns = ascii (equations)             # <<<<<<<<<<<<<<
 *         else:
 *             streqns = ascii ([equations])
 */
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ascii); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1390, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = NULL;
    __pyx_t_4 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
        __pyx_t_4 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_equations};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1390, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    if (!(likely(PyBytes_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_1))) __PYX_ERR(0, 1390, __pyx_L1_error)
    __pyx_v_streqns = ((PyObject*)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "../../bmi/sympy/DifferentialRing.pyx":1389
 *         cdef strnot
 *         strnot = self.__process_notation (notation)
 *         if isinstance (equations, list):             # <<<<<<<<<<<<<<
 *             streqns = ascii (equations)
 *         else:
 */
    goto __pyx_L3;
  }

  /* "../../bmi/sympy/DifferentialRing.pyx":1392
 *             streqns = ascii (equations)
 *         else:
 *             streqns = ascii ([equations])             # <<<<<<<<<<<<<<
 *         strvar = b"0"
 *         A = bmi_c.bmi_dapyx_leading_coefficient (
 */
  /*else*/ {
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ascii); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1392, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1392, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_v_equations);
    __Pyx_GIVEREF(__pyx_v_equations);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 0, __pyx_v_equations)) __PYX_ERR(0, 1392, __pyx_L1_error);
    __pyx_t_6 = NULL;
    __pyx_t_4 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
        __pyx_t_4 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_3};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1392, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    if (!(likely(PyBytes_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_1))) __PYX_ERR(0, 1392, __pyx_L1_error)
    __pyx_v_streqns = ((PyObject*)__pyx_t_1);
    __pyx_t_1 = 0;
  }
  __pyx_L3:;

  /* "../../bmi/sympy/DifferentialRing.pyx":1393
 *         else:
 *             streqns = ascii ([equations])
 *         strvar = b"0"             # <<<<<<<<<<<<<<
 *         A = bmi_c.bmi_dapyx_leading_coefficient (
 *                     streqns, self.dring, int (False), strvar,
 */
  __Pyx_INCREF(__pyx_kp_b_0);
  __pyx_v_strvar = __pyx_kp_b_0;

  /* "../../bmi/sympy/DifferentialRing.pyx":1395
 *         strvar = b"0"
 *         A = bmi_c.bmi_dapyx_leading_coefficient (
 *                     streqns, self.dring, int (False), strvar,             # <<<<<<<<<<<<<<
 *                     self.notation, strnot, 0, 0)
 *         if bmi_c.bmi_dapyx_is_error (A):
 */
  if (unlikely(__pyx_v_streqns == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
    __PYX_ERR(0, 1395, __pyx_L1_error)
  }
  __pyx_t_7 = __Pyx_PyBytes_AsWritableString(__pyx_v_streqns); if (unlikely((!__pyx_t_7) && PyErr_Occurred())) __PYX_ERR(0, 1395, __pyx_L1_error)
  __pyx_t_1 = __Pyx_PyNumber_Int(Py_False); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1395, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_8 = __Pyx_PyInt_As_bool(__pyx_t_1); if (unlikely((__pyx_t_8 == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1395, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_9 = __Pyx_PyBytes_AsWritableString(__pyx_v_strvar); if (unlikely((!__pyx_t_9) && PyErr_Occurred())) __PYX_ERR(0, 1395, __pyx_L1_error)

  /* "../../bmi/sympy/DifferentialRing.pyx":1396
 *         A = bmi_c.bmi_dapyx_leading_coefficient (
 *                     streqns, self.dring, int (False), strvar,
 *                     self.notation, strnot, 0, 0)             # <<<<<<<<<<<<<<
 *         if bmi_c.bmi_dapyx_is_error (A):
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (A)
 */
  if (unlikely(__pyx_v_self->notation == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
    __PYX_ERR(0, 1396, __pyx_L1_error)
  }
  __pyx_t_10 = __Pyx_PyBytes_AsWritableString(__pyx_v_self->notation); if (unlikely((!__pyx_t_10) && PyErr_Occurred())) __PYX_ERR(0, 1396, __pyx_L1_error)
  __pyx_t_11 = __Pyx_PyObject_AsWritableString(__pyx_v_strnot); if (unlikely((!__pyx_t_11) && PyErr_Occurred())) __PYX_ERR(0, 1396, __pyx_L1_error)

  /* "../../bmi/sympy/DifferentialRing.pyx":1394
 *             streqns = ascii ([equations])
 *         strvar = b"0"
 *         A = bmi_c.bmi_dapyx_leading_coefficient (             # <<<<<<<<<<<<<<
 *                     streqns, self.dring, int (False), strvar,
 *                     self.notation, strnot, 0, 0)
 */
  __pyx_v_A = bmi_dapyx_leading_coefficient(__pyx_t_7, __pyx_v_self->dring, __pyx_t_8, __pyx_t_9, __pyx_t_10, __pyx_t_11, 0, 0);

  /* "../../bmi/sympy/DifferentialRing.pyx":1397
 *                     streqns, self.dring, int (False), strvar,
 *                     self.notation, strnot, 0, 0)
 *         if bmi_c.bmi_dapyx_is_error (A):             # <<<<<<<<<<<<<<
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (A)
 *             bmi_c.bmi_balsa_clear_ALGEB (A)
 */
  __pyx_t_5 = (bmi_dapyx_is_error(__pyx_v_A) != 0);
  if (unlikely(__pyx_t_5)) {

    /* "../../bmi/sympy/DifferentialRing.pyx":1398
 *                     self.notation, strnot, 0, 0)
 *         if bmi_c.bmi_dapyx_is_error (A):
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (A)             # <<<<<<<<<<<<<<
 *             bmi_c.bmi_balsa_clear_ALGEB (A)
 *             raise RuntimeError (str (mesgerr, 'utf-8'))
 */
    __pyx_t_1 = __Pyx_PyBytes_FromString(bmi_dapyx_mesgerr(__pyx_v_A)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1398, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_v_mesgerr = ((PyObject*)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "../../bmi/sympy/DifferentialRing.pyx":1399
 *         if bmi_c.bmi_dapyx_is_error (A):
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (A)
 *             bmi_c.bmi_balsa_clear_ALGEB (A)             # <<<<<<<<<<<<<<
 *             raise RuntimeError (str (mesgerr, 'utf-8'))
 *         result = eval (A.value, globals (), self.evdict)
 */
    bmi_balsa_clear_ALGEB(__pyx_v_A);

    /* "../../bmi/sympy/DifferentialRing.pyx":1400
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (A)
 *             bmi_c.bmi_balsa_clear_ALGEB (A)
 *             raise RuntimeError (str (mesgerr, 'utf-8'))             # <<<<<<<<<<<<<<
 *         result = eval (A.value, globals (), self.evdict)
 *         if not isinstance (equations, list):
 */
    __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1400, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_v_mesgerr);
    __Pyx_GIVEREF(__pyx_v_mesgerr);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_mesgerr)) __PYX_ERR(0, 1400, __pyx_L1_error);
    __Pyx_INCREF(__pyx_kp_u_utf_8);
    __Pyx_GIVEREF(__pyx_kp_u_utf_8);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_kp_u_utf_8)) __PYX_ERR(0, 1400, __pyx_L1_error);
    __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)(&PyUnicode_Type)), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1400, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_RuntimeError, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1400, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(0, 1400, __pyx_L1_error)

    /* "../../bmi/sympy/DifferentialRing.pyx":1397
 *                     streqns, self.dring, int (False), strvar,
 *                     self.notation, strnot, 0, 0)
 *         if bmi_c.bmi_dapyx_is_error (A):             # <<<<<<<<<<<<<<
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (A)
 *             bmi_c.bmi_balsa_clear_ALGEB (A)
 */
  }

  /* "../../bmi/sympy/DifferentialRing.pyx":1401
 *             bmi_c.bmi_balsa_clear_ALGEB (A)
 *             raise RuntimeError (str (mesgerr, 'utf-8'))
 *         result = eval (A.value, globals (), self.evdict)             # <<<<<<<<<<<<<<
 *         if not isinstance (equations, list):
 *             result = result [0]
 */
  __pyx_t_1 = __Pyx_PyBytes_FromString(__pyx_v_A->value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1401, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_Globals(); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1401, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1401, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_1);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1)) __PYX_ERR(0, 1401, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_2);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2)) __PYX_ERR(0, 1401, __pyx_L1_error);
  __Pyx_INCREF(__pyx_v_self->evdict);
  __Pyx_GIVEREF(__pyx_v_self->evdict);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_self->evdict)) __PYX_ERR(0, 1401, __pyx_L1_error);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_eval, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1401, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_result = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "../../bmi/sympy/DifferentialRing.pyx":1402
 *             raise RuntimeError (str (mesgerr, 'utf-8'))
 *         result = eval (A.value, globals (), self.evdict)
 *         if not isinstance (equations, list):             # <<<<<<<<<<<<<<
 *             result = result [0]
 *         bmi_c.bmi_balsa_clear_ALGEB (A)
 */
  __pyx_t_5 = PyList_Check(__pyx_v_equations); 
  __pyx_t_12 = (!__pyx_t_5);
  if (__pyx_t_12) {

    /* "../../bmi/sympy/DifferentialRing.pyx":1403
 *         result = eval (A.value, globals (), self.evdict)
 *         if not isinstance (equations, list):
 *             result = result [0]             # <<<<<<<<<<<<<<
 *         bmi_c.bmi_balsa_clear_ALGEB (A)
 *         return result
 */
    __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_result, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1403, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF_SET(__pyx_v_result, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "../../bmi/sympy/DifferentialRing.pyx":1402
 *             raise RuntimeError (str (mesgerr, 'utf-8'))
 *         result = eval (A.value, globals (), self.evdict)
 *         if not isinstance (equations, list):             # <<<<<<<<<<<<<<
 *             result = result [0]
 *         bmi_c.bmi_balsa_clear_ALGEB (A)
 */
  }

  /* "../../bmi/sympy/DifferentialRing.pyx":1404
 *         if not isinstance (equations, list):
 *             result = result [0]
 *         bmi_c.bmi_balsa_clear_ALGEB (A)             # <<<<<<<<<<<<<<
 *         return result
 * 
 */
  bmi_balsa_clear_ALGEB(__pyx_v_A);

  /* "../../bmi/sympy/DifferentialRing.pyx":1405
 *             result = result [0]
 *         bmi_c.bmi_balsa_clear_ALGEB (A)
 *         return result             # <<<<<<<<<<<<<<
 * 
 * # leading_coefficient
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_result);
  __pyx_r = __pyx_v_result;
  goto __pyx_L0;

  /* "../../bmi/sympy/DifferentialRing.pyx":1335
 * 
 * # initial
 *     def initial (             # <<<<<<<<<<<<<<
 *             self,
 *             equations,
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("DifferentialAlgebra.DifferentialRing.initial", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XDECREF(__pyx_v_streqns);
  __Pyx_XDECREF(__pyx_v_strvar);
  __Pyx_XDECREF(__pyx_v_mesgerr);
  __Pyx_XDECREF(__pyx_v_strnot);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "../../bmi/sympy/DifferentialRing.pyx":1408
 * 
 * # leading_coefficient
 *     def leading_coefficient (             # <<<<<<<<<<<<<<
 *             self,
 *             equations,
 */

/* Python wrapper */
static PyObject *__pyx_pw_19DifferentialAlgebra_16DifferentialRing_37leading_coefficient(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_19DifferentialAlgebra_16DifferentialRing_36leading_coefficient, "\n        The leading coefficient of a rational fraction\n\n        INPUT:\n\n            `equations` -- a rational fraction or a list of rational \n                             fractions\n            `variable`  -- (default: None) a variable\n            `notation`  -- (default: 'undefined') a string\n\n        OUTPUT:\n\n            The list of the leading coefficients of the equations,\n            with respect to `variable`. If `variable` is None, the\n            list of the initials of the equations is returned.\n\n            The leading coefficient of a rational fraction F = P/Q,\n            with respect to some derivative u, is a rational fraction:\n            it is the leading coefficient of P with respect to u,\n            divided by the leading coefficient of Q with respect to u,\n            recalling that the leading coefficient with respect to u,\n            of a polynomial R which does not depend on u, is defined\n            as R itself.\n\n        NOTES:\n\n            The above definition is not yet fully implemented.\n\n        EXAMPLES:\n\n            >>> from sympy import *\n            >>> from DifferentialAlgebra import *\n            >>> init_printing (use_unicode = False, num_columns = 60)\n\n            >>> t = var ('t')\n            >>> u,v = function ('u,v')\n            >>> R = DifferentialRing (derivations = [t], blocks = [u,v])\n            >>> L = [t, v(t)*u(t)**2 - u(t) + Derivative(v(t),t) + 1, \n            ...      t*u(t)/Derivative(v(t),t)]\n\n        The initials of the elements of L:\n\n            >>> R.leading_coefficient (L)\n                         t     \n            [1, v(t), --------]\n                      d        \n                      --(v(t)) \n                      dt       \n\n        The initial of a single rational fraction:\n\n            >>> R.leading_coefficient (u(t)**2+Derivative(v(t),t)/v(t))\n            1\n\n        The leading coefficient of the elements of L, with respect to t:\n\n            >>""> R.leading_coefficient (L, t)\n                 2                  d               u(t)   \n            [1, u (t)*v(t) - u(t) + --(v(t)) + 1, --------]\n                                    dt            d        \n                                                  --(v(t)) \n                                                  dt       \n\n        The leading coefficient of a single rational fraction, with\n        respect to a derivative:\n\n            >>> R.leading_coefficient (u(t)**2 + \n            ...             Derivative(v(t),t)/v(t), Derivative(v(t),t))\n             1  \n            ----\n            v(t)\n        ");
static PyMethodDef __pyx_mdef_19DifferentialAlgebra_16DifferentialRing_37leading_coefficient = {"leading_coefficient", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_19DifferentialAlgebra_16DifferentialRing_37leading_coefficient, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_19DifferentialAlgebra_16DifferentialRing_36leading_coefficient};
static PyObject *__pyx_pw_19DifferentialAlgebra_16DifferentialRing_37leading_coefficient(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_equations = 0;
  PyObject *__pyx_v_variable = 0;
  PyObject *__pyx_v_notation = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[3] = {0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("leading_coefficient (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_equations,&__pyx_n_s_variable,&__pyx_n_s_notation,0};

    /* "../../bmi/sympy/DifferentialRing.pyx":1411
 *             self,
 *             equations,
 *             variable = None,             # <<<<<<<<<<<<<<
 *             notation = BMI_IX_undefined):
 *         r"""
 */
    values[1] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
    values[2] = __Pyx_Arg_NewRef_FASTCALL(__pyx_k__21);
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_equations)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1408, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_variable);
          if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1408, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_notation);
          if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1408, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "leading_coefficient") < 0)) __PYX_ERR(0, 1408, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_equations = values[0];
    __pyx_v_variable = values[1];
    __pyx_v_notation = values[2];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("leading_coefficient", 0, 1, 3, __pyx_nargs); __PYX_ERR(0, 1408, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("DifferentialAlgebra.DifferentialRing.leading_coefficient", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_19DifferentialAlgebra_16DifferentialRing_36leading_coefficient(((struct __pyx_obj_19DifferentialAlgebra_DifferentialRing *)__pyx_v_self), __pyx_v_equations, __pyx_v_variable, __pyx_v_notation);

  /* "../../bmi/sympy/DifferentialRing.pyx":1408
 * 
 * # leading_coefficient
 *     def leading_coefficient (             # <<<<<<<<<<<<<<
 *             self,
 *             equations,
 */

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_19DifferentialAlgebra_16DifferentialRing_36leading_coefficient(struct __pyx_obj_19DifferentialAlgebra_DifferentialRing *__pyx_v_self, PyObject *__pyx_v_equations, PyObject *__pyx_v_variable, PyObject *__pyx_v_notation) {
  PyObject *__pyx_v_result = 0;
  PyObject *__pyx_v_streqns = 0;
  PyObject *__pyx_v_strvar = 0;
  PyObject *__pyx_v_mesgerr = 0;
  ALGEB_string __pyx_v_A;
  PyObject *__pyx_v_strnot = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  unsigned int __pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  char *__pyx_t_7;
  bool __pyx_t_8;
  char *__pyx_t_9;
  char *__pyx_t_10;
  char *__pyx_t_11;
  int __pyx_t_12;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("leading_coefficient", 1);

  /* "../../bmi/sympy/DifferentialRing.pyx":1490
 *         cdef bmi_c.ALGEB_string A
 *         cdef strnot
 *         strnot = self.__process_notation (notation)             # <<<<<<<<<<<<<<
 *         if isinstance (equations, list):
 *             streqns = ascii (equations)
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_DifferentialRing__process_notat); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1490, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_notation};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1490, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_v_strnot = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "../../bmi/sympy/DifferentialRing.pyx":1491
 *         cdef strnot
 *         strnot = self.__process_notation (notation)
 *         if isinstance (equations, list):             # <<<<<<<<<<<<<<
 *             streqns = ascii (equations)
 *         else:
 */
  __pyx_t_5 = PyList_Check(__pyx_v_equations); 
  if (__pyx_t_5) {

    /* "../../bmi/sympy/DifferentialRing.pyx":1492
 *         strnot = self.__process_notation (notation)
 *         if isinstance (equations, list):
 *             streqns = ascii (equations)             # <<<<<<<<<<<<<<
 *         else:
 *             streqns = ascii ([equations])
 */
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ascii); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1492, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = NULL;
    __pyx_t_4 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
        __pyx_t_4 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_equations};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1492, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    if (!(likely(PyBytes_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_1))) __PYX_ERR(0, 1492, __pyx_L1_error)
    __pyx_v_streqns = ((PyObject*)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "../../bmi/sympy/DifferentialRing.pyx":1491
 *         cdef strnot
 *         strnot = self.__process_notation (notation)
 *         if isinstance (equations, list):             # <<<<<<<<<<<<<<
 *             streqns = ascii (equations)
 *         else:
 */
    goto __pyx_L3;
  }

  /* "../../bmi/sympy/DifferentialRing.pyx":1494
 *             streqns = ascii (equations)
 *         else:
 *             streqns = ascii ([equations])             # <<<<<<<<<<<<<<
 *         if variable == None:
 *             strvar = b"0"
 */
  /*else*/ {
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ascii); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1494, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1494, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_v_equations);
    __Pyx_GIVEREF(__pyx_v_equations);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 0, __pyx_v_equations)) __PYX_ERR(0, 1494, __pyx_L1_error);
    __pyx_t_6 = NULL;
    __pyx_t_4 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
        __pyx_t_4 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_3};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1494, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    if (!(likely(PyBytes_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_1))) __PYX_ERR(0, 1494, __pyx_L1_error)
    __pyx_v_streqns = ((PyObject*)__pyx_t_1);
    __pyx_t_1 = 0;
  }
  __pyx_L3:;

  /* "../../bmi/sympy/DifferentialRing.pyx":1495
 *         else:
 *             streqns = ascii ([equations])
 *         if variable == None:             # <<<<<<<<<<<<<<
 *             strvar = b"0"
 *         else:
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_variable, Py_None, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1495, __pyx_L1_error)
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 1495, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_5) {

    /* "../../bmi/sympy/DifferentialRing.pyx":1496
 *             streqns = ascii ([equations])
 *         if variable == None:
 *             strvar = b"0"             # <<<<<<<<<<<<<<
 *         else:
 *             strvar = ascii (variable)
 */
    __Pyx_INCREF(__pyx_kp_b_0);
    __pyx_v_strvar = __pyx_kp_b_0;

    /* "../../bmi/sympy/DifferentialRing.pyx":1495
 *         else:
 *             streqns = ascii ([equations])
 *         if variable == None:             # <<<<<<<<<<<<<<
 *             strvar = b"0"
 *         else:
 */
    goto __pyx_L4;
  }

  /* "../../bmi/sympy/DifferentialRing.pyx":1498
 *             strvar = b"0"
 *         else:
 *             strvar = ascii (variable)             # <<<<<<<<<<<<<<
 *         A = bmi_c.bmi_dapyx_leading_coefficient (
 *                     streqns, self.dring, int (False), strvar,
 */
  /*else*/ {
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ascii); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1498, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = NULL;
    __pyx_t_4 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
        __pyx_t_4 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_variable};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1498, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    if (!(likely(PyBytes_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_1))) __PYX_ERR(0, 1498, __pyx_L1_error)
    __pyx_v_strvar = ((PyObject*)__pyx_t_1);
    __pyx_t_1 = 0;
  }
  __pyx_L4:;

  /* "../../bmi/sympy/DifferentialRing.pyx":1500
 *             strvar = ascii (variable)
 *         A = bmi_c.bmi_dapyx_leading_coefficient (
 *                     streqns, self.dring, int (False), strvar,             # <<<<<<<<<<<<<<
 *                     self.notation, strnot, 0, 0)
 *         if bmi_c.bmi_dapyx_is_error (A):
 */
  if (unlikely(__pyx_v_streqns == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
    __PYX_ERR(0, 1500, __pyx_L1_error)
  }
  __pyx_t_7 = __Pyx_PyBytes_AsWritableString(__pyx_v_streqns); if (unlikely((!__pyx_t_7) && PyErr_Occurred())) __PYX_ERR(0, 1500, __pyx_L1_error)
  __pyx_t_1 = __Pyx_PyNumber_Int(Py_False); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1500, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_8 = __Pyx_PyInt_As_bool(__pyx_t_1); if (unlikely((__pyx_t_8 == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1500, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(__pyx_v_strvar == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
    __PYX_ERR(0, 1500, __pyx_L1_error)
  }
  __pyx_t_9 = __Pyx_PyBytes_AsWritableString(__pyx_v_strvar); if (unlikely((!__pyx_t_9) && PyErr_Occurred())) __PYX_ERR(0, 1500, __pyx_L1_error)

  /* "../../bmi/sympy/DifferentialRing.pyx":1501
 *         A = bmi_c.bmi_dapyx_leading_coefficient (
 *                     streqns, self.dring, int (False), strvar,
 *                     self.notation, strnot, 0, 0)             # <<<<<<<<<<<<<<
 *         if bmi_c.bmi_dapyx_is_error (A):
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (A)
 */
  if (unlikely(__pyx_v_self->notation == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
    __PYX_ERR(0, 1501, __pyx_L1_error)
  }
  __pyx_t_10 = __Pyx_PyBytes_AsWritableString(__pyx_v_self->notation); if (unlikely((!__pyx_t_10) && PyErr_Occurred())) __PYX_ERR(0, 1501, __pyx_L1_error)
  __pyx_t_11 = __Pyx_PyObject_AsWritableString(__pyx_v_strnot); if (unlikely((!__pyx_t_11) && PyErr_Occurred())) __PYX_ERR(0, 1501, __pyx_L1_error)

  /* "../../bmi/sympy/DifferentialRing.pyx":1499
 *         else:
 *             strvar = ascii (variable)
 *         A = bmi_c.bmi_dapyx_leading_coefficient (             # <<<<<<<<<<<<<<
 *                     streqns, self.dring, int (False), strvar,
 *                     self.notation, strnot, 0, 0)
 */
  __pyx_v_A = bmi_dapyx_leading_coefficient(__pyx_t_7, __pyx_v_self->dring, __pyx_t_8, __pyx_t_9, __pyx_t_10, __pyx_t_11, 0, 0);

  /* "../../bmi/sympy/DifferentialRing.pyx":1502
 *                     streqns, self.dring, int (False), strvar,
 *                     self.notation, strnot, 0, 0)
 *         if bmi_c.bmi_dapyx_is_error (A):             # <<<<<<<<<<<<<<
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (A)
 *             bmi_c.bmi_balsa_clear_ALGEB (A)
 */
  __pyx_t_5 = (bmi_dapyx_is_error(__pyx_v_A) != 0);
  if (unlikely(__pyx_t_5)) {

    /* "../../bmi/sympy/DifferentialRing.pyx":1503
 *                     self.notation, strnot, 0, 0)
 *         if bmi_c.bmi_dapyx_is_error (A):
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (A)             # <<<<<<<<<<<<<<
 *             bmi_c.bmi_balsa_clear_ALGEB (A)
 *             raise RuntimeError (str (mesgerr, 'utf-8'))
 */
    __pyx_t_1 = __Pyx_PyBytes_FromString(bmi_dapyx_mesgerr(__pyx_v_A)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1503, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_v_mesgerr = ((PyObject*)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "../../bmi/sympy/DifferentialRing.pyx":1504
 *         if bmi_c.bmi_dapyx_is_error (A):
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (A)
 *             bmi_c.bmi_balsa_clear_ALGEB (A)             # <<<<<<<<<<<<<<
 *             raise RuntimeError (str (mesgerr, 'utf-8'))
 *         result = eval (A.value, globals (), self.evdict)
 */
    bmi_balsa_clear_ALGEB(__pyx_v_A);

    /* "../../bmi/sympy/DifferentialRing.pyx":1505
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (A)
 *             bmi_c.bmi_balsa_clear_ALGEB (A)
 *             raise RuntimeError (str (mesgerr, 'utf-8'))             # <<<<<<<<<<<<<<
 *         result = eval (A.value, globals (), self.evdict)
 *         if not isinstance (equations, list):
 */
    __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1505, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_v_mesgerr);
    __Pyx_GIVEREF(__pyx_v_mesgerr);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_mesgerr)) __PYX_ERR(0, 1505, __pyx_L1_error);
    __Pyx_INCREF(__pyx_kp_u_utf_8);
    __Pyx_GIVEREF(__pyx_kp_u_utf_8);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_kp_u_utf_8)) __PYX_ERR(0, 1505, __pyx_L1_error);
    __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)(&PyUnicode_Type)), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1505, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_RuntimeError, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1505, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(0, 1505, __pyx_L1_error)

    /* "../../bmi/sympy/DifferentialRing.pyx":1502
 *                     streqns, self.dring, int (False), strvar,
 *                     self.notation, strnot, 0, 0)
 *         if bmi_c.bmi_dapyx_is_error (A):             # <<<<<<<<<<<<<<
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (A)
 *             bmi_c.bmi_balsa_clear_ALGEB (A)
 */
  }

  /* "../../bmi/sympy/DifferentialRing.pyx":1506
 *             bmi_c.bmi_balsa_clear_ALGEB (A)
 *             raise RuntimeError (str (mesgerr, 'utf-8'))
 *         result = eval (A.value, globals (), self.evdict)             # <<<<<<<<<<<<<<
 *         if not isinstance (equations, list):
 *             result = result [0]
 */
  __pyx_t_1 = __Pyx_PyBytes_FromString(__pyx_v_A->value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1506, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_Globals(); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1506, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1506, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_1);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1)) __PYX_ERR(0, 1506, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_2);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2)) __PYX_ERR(0, 1506, __pyx_L1_error);
  __Pyx_INCREF(__pyx_v_self->evdict);
  __Pyx_GIVEREF(__pyx_v_self->evdict);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_self->evdict)) __PYX_ERR(0, 1506, __pyx_L1_error);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_eval, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1506, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_result = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "../../bmi/sympy/DifferentialRing.pyx":1507
 *             raise RuntimeError (str (mesgerr, 'utf-8'))
 *         result = eval (A.value, globals (), self.evdict)
 *         if not isinstance (equations, list):             # <<<<<<<<<<<<<<
 *             result = result [0]
 *         bmi_c.bmi_balsa_clear_ALGEB (A)
 */
  __pyx_t_5 = PyList_Check(__pyx_v_equations); 
  __pyx_t_12 = (!__pyx_t_5);
  if (__pyx_t_12) {

    /* "../../bmi/sympy/DifferentialRing.pyx":1508
 *         result = eval (A.value, globals (), self.evdict)
 *         if not isinstance (equations, list):
 *             result = result [0]             # <<<<<<<<<<<<<<
 *         bmi_c.bmi_balsa_clear_ALGEB (A)
 *         return result
 */
    __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_result, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1508, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF_SET(__pyx_v_result, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "../../bmi/sympy/DifferentialRing.pyx":1507
 *             raise RuntimeError (str (mesgerr, 'utf-8'))
 *         result = eval (A.value, globals (), self.evdict)
 *         if not isinstance (equations, list):             # <<<<<<<<<<<<<<
 *             result = result [0]
 *         bmi_c.bmi_balsa_clear_ALGEB (A)
 */
  }

  /* "../../bmi/sympy/DifferentialRing.pyx":1509
 *         if not isinstance (equations, list):
 *             result = result [0]
 *         bmi_c.bmi_balsa_clear_ALGEB (A)             # <<<<<<<<<<<<<<
 *         return result
 * 
 */
  bmi_balsa_clear_ALGEB(__pyx_v_A);

  /* "../../bmi/sympy/DifferentialRing.pyx":1510
 *             result = result [0]
 *         bmi_c.bmi_balsa_clear_ALGEB (A)
 *         return result             # <<<<<<<<<<<<<<
 * 
 * # tail
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_result);
  __pyx_r = __pyx_v_result;
  goto __pyx_L0;

  /* "../../bmi/sympy/DifferentialRing.pyx":1408
 * 
 * # leading_coefficient
 *     def leading_coefficient (             # <<<<<<<<<<<<<<
 *             self,
 *             equations,
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("DifferentialAlgebra.DifferentialRing.leading_coefficient", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XDECREF(__pyx_v_streqns);
  __Pyx_XDECREF(__pyx_v_strvar);
  __Pyx_XDECREF(__pyx_v_mesgerr);
  __Pyx_XDECREF(__pyx_v_strnot);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "../../bmi/sympy/DifferentialRing.pyx":1513
 * 
 * # tail
 *     def tail (             # <<<<<<<<<<<<<<
 *             self,
 *             equations,
 */

/* Python wrapper */
static PyObject *__pyx_pw_19DifferentialAlgebra_16DifferentialRing_39tail(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_19DifferentialAlgebra_16DifferentialRing_38tail, "\n        The tail of a rational fraction\n\n        INPUT:\n\n            `equations` -- a rational fraction or a list of rational \n                             fractions \n            `variable`  -- (default: None) a variable\n            `notation`  -- (default: 'undefined') a string\n\n        OUTPUT:\n\n            The list of tails of the equations, with respect to\n            `variable`.  If `variable` is omitted, the list of tails\n            with respect to the leading derivatives of the equations\n            is returned.\n\n            The tail of a rational fraction F is defined as the\n            rational fraction F - i(F) * rg(F) where i(F) and rg(F)\n            denote the initial and the leading rank of F.\n\n            More generally, the tail, with respect to some derivative u,\n            of a rational fraction F = P/Q is defined as the rational\n            fraction F - lc(F,u) * rg(F,u), where lc(F,u) is defined as\n            the leading coefficient of F with respect to u and rg(F,u)\n            is the monomial obtained by raising u at the degree deg\n            (P,u) - deg (Q,u)\n\n        NOTES:\n\n            The above definition is not yet fully implemented.\n\n        EXAMPLES:\n\n            >>> from sympy import *\n            >>> from DifferentialAlgebra import *\n            >>> init_printing (use_unicode = False, num_columns = 60)\n\n            >>> t = var ('t')\n            >>> u,v = function ('u,v')\n            >>> R = DifferentialRing (derivations = [t], blocks = [u,v])\n            >>> L = [t + 3, \n            ...      v(t)*u(t)**2 - u(t) + Derivative(v(t),t) + 1, \n            ...      t*u(t)/Derivative(v(t),t)]\n\n        The list of tails of the elements of L, with respect to their\n        leading derivatives:\n\n            >>> R.tail (L)\n                        d               \n            [3, -u(t) + --(v(t)) + 1, 0]\n                        dt              \n\n        The tail of a single rational fraction, w""ith respect to its\n        leading derivative:\n\n            >>> eq = u(t)**2 + Derivative(v(t),t)/v(t)\n            >>> R.tail (eq)\n            d       \n            --(v(t))\n            dt      \n            --------\n              v(t)  \n\n        Check the definition of tails:\n\n            >>> R.initial (eq) * R.leading_rank (eq) + R.tail (eq) - eq\n            0\n\n        The list of tails of the elements of L, with respect to t:\n\n            >>> R.tail (L, t)\n            [3, 0, 0]\n\n        The tail of a single rational fraction, with respect to\n        a derivative:\n\n            >>> eq = u(t)**2 + Derivative(v(t),t)/v(t)\n            >>> derv = Derivative(v(t), t)\n            >>> R.tail (eq, derv)\n             2   \n            u (t)\n\n        Check the definition of tails with respect to some derivative:\n\n            >>> R.leading_coefficient (eq, derv) * derv + \\\n            ...                             R.tail (eq, derv) - eq\n            0\n        ");
static PyMethodDef __pyx_mdef_19DifferentialAlgebra_16DifferentialRing_39tail = {"tail", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_19DifferentialAlgebra_16DifferentialRing_39tail, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_19DifferentialAlgebra_16DifferentialRing_38tail};
static PyObject *__pyx_pw_19DifferentialAlgebra_16DifferentialRing_39tail(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_equations = 0;
  PyObject *__pyx_v_variable = 0;
  PyObject *__pyx_v_notation = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[3] = {0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("tail (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_equations,&__pyx_n_s_variable,&__pyx_n_s_notation,0};

    /* "../../bmi/sympy/DifferentialRing.pyx":1516
 *             self,
 *             equations,
 *             variable = None,             # <<<<<<<<<<<<<<
 *             notation = BMI_IX_undefined):
 *         r"""
 */
    values[1] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
    values[2] = __Pyx_Arg_NewRef_FASTCALL(__pyx_k__22);
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_equations)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1513, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_variable);
          if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1513, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_notation);
          if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1513, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "tail") < 0)) __PYX_ERR(0, 1513, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_equations = values[0];
    __pyx_v_variable = values[1];
    __pyx_v_notation = values[2];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("tail", 0, 1, 3, __pyx_nargs); __PYX_ERR(0, 1513, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("DifferentialAlgebra.DifferentialRing.tail", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_19DifferentialAlgebra_16DifferentialRing_38tail(((struct __pyx_obj_19DifferentialAlgebra_DifferentialRing *)__pyx_v_self), __pyx_v_equations, __pyx_v_variable, __pyx_v_notation);

  /* "../../bmi/sympy/DifferentialRing.pyx":1513
 * 
 * # tail
 *     def tail (             # <<<<<<<<<<<<<<
 *             self,
 *             equations,
 */

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_19DifferentialAlgebra_16DifferentialRing_38tail(struct __pyx_obj_19DifferentialAlgebra_DifferentialRing *__pyx_v_self, PyObject *__pyx_v_equations, PyObject *__pyx_v_variable, PyObject *__pyx_v_notation) {
  PyObject *__pyx_v_result = 0;
  PyObject *__pyx_v_streqns = 0;
  PyObject *__pyx_v_strvar = 0;
  PyObject *__pyx_v_mesgerr = 0;
  ALGEB_string __pyx_v_A;
  PyObject *__pyx_v_strnot = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  unsigned int __pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  char *__pyx_t_7;
  bool __pyx_t_8;
  char *__pyx_t_9;
  char *__pyx_t_10;
  char *__pyx_t_11;
  int __pyx_t_12;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("tail", 1);

  /* "../../bmi/sympy/DifferentialRing.pyx":1612
 *         cdef bmi_c.ALGEB_string A
 *         cdef strnot
 *         strnot = self.__process_notation (notation)             # <<<<<<<<<<<<<<
 *         if isinstance (equations, list):
 *             streqns = ascii (equations)
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_DifferentialRing__process_notat); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1612, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_notation};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1612, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_v_strnot = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "../../bmi/sympy/DifferentialRing.pyx":1613
 *         cdef strnot
 *         strnot = self.__process_notation (notation)
 *         if isinstance (equations, list):             # <<<<<<<<<<<<<<
 *             streqns = ascii (equations)
 *         else:
 */
  __pyx_t_5 = PyList_Check(__pyx_v_equations); 
  if (__pyx_t_5) {

    /* "../../bmi/sympy/DifferentialRing.pyx":1614
 *         strnot = self.__process_notation (notation)
 *         if isinstance (equations, list):
 *             streqns = ascii (equations)             # <<<<<<<<<<<<<<
 *         else:
 *             streqns = ascii ([equations])
 */
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ascii); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1614, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = NULL;
    __pyx_t_4 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
        __pyx_t_4 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_equations};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1614, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    if (!(likely(PyBytes_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_1))) __PYX_ERR(0, 1614, __pyx_L1_error)
    __pyx_v_streqns = ((PyObject*)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "../../bmi/sympy/DifferentialRing.pyx":1613
 *         cdef strnot
 *         strnot = self.__process_notation (notation)
 *         if isinstance (equations, list):             # <<<<<<<<<<<<<<
 *             streqns = ascii (equations)
 *         else:
 */
    goto __pyx_L3;
  }

  /* "../../bmi/sympy/DifferentialRing.pyx":1616
 *             streqns = ascii (equations)
 *         else:
 *             streqns = ascii ([equations])             # <<<<<<<<<<<<<<
 *         if variable == None:
 *             strvar = b"0"
 */
  /*else*/ {
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ascii); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1616, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1616, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_v_equations);
    __Pyx_GIVEREF(__pyx_v_equations);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 0, __pyx_v_equations)) __PYX_ERR(0, 1616, __pyx_L1_error);
    __pyx_t_6 = NULL;
    __pyx_t_4 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
        __pyx_t_4 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_3};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1616, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    if (!(likely(PyBytes_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_1))) __PYX_ERR(0, 1616, __pyx_L1_error)
    __pyx_v_streqns = ((PyObject*)__pyx_t_1);
    __pyx_t_1 = 0;
  }
  __pyx_L3:;

  /* "../../bmi/sympy/DifferentialRing.pyx":1617
 *         else:
 *             streqns = ascii ([equations])
 *         if variable == None:             # <<<<<<<<<<<<<<
 *             strvar = b"0"
 *         else:
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_variable, Py_None, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1617, __pyx_L1_error)
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 1617, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_5) {

    /* "../../bmi/sympy/DifferentialRing.pyx":1618
 *             streqns = ascii ([equations])
 *         if variable == None:
 *             strvar = b"0"             # <<<<<<<<<<<<<<
 *         else:
 *             strvar = ascii (variable)
 */
    __Pyx_INCREF(__pyx_kp_b_0);
    __pyx_v_strvar = __pyx_kp_b_0;

    /* "../../bmi/sympy/DifferentialRing.pyx":1617
 *         else:
 *             streqns = ascii ([equations])
 *         if variable == None:             # <<<<<<<<<<<<<<
 *             strvar = b"0"
 *         else:
 */
    goto __pyx_L4;
  }

  /* "../../bmi/sympy/DifferentialRing.pyx":1620
 *             strvar = b"0"
 *         else:
 *             strvar = ascii (variable)             # <<<<<<<<<<<<<<
 *         A = bmi_c.bmi_dapyx_tail (
 *                     streqns, self.dring, int (False), strvar,
 */
  /*else*/ {
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ascii); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1620, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = NULL;
    __pyx_t_4 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
        __pyx_t_4 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_variable};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1620, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    if (!(likely(PyBytes_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_1))) __PYX_ERR(0, 1620, __pyx_L1_error)
    __pyx_v_strvar = ((PyObject*)__pyx_t_1);
    __pyx_t_1 = 0;
  }
  __pyx_L4:;

  /* "../../bmi/sympy/DifferentialRing.pyx":1622
 *             strvar = ascii (variable)
 *         A = bmi_c.bmi_dapyx_tail (
 *                     streqns, self.dring, int (False), strvar,             # <<<<<<<<<<<<<<
 *                     self.notation, strnot, 0, 0)
 *         if bmi_c.bmi_dapyx_is_error (A):
 */
  if (unlikely(__pyx_v_streqns == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
    __PYX_ERR(0, 1622, __pyx_L1_error)
  }
  __pyx_t_7 = __Pyx_PyBytes_AsWritableString(__pyx_v_streqns); if (unlikely((!__pyx_t_7) && PyErr_Occurred())) __PYX_ERR(0, 1622, __pyx_L1_error)
  __pyx_t_1 = __Pyx_PyNumber_Int(Py_False); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1622, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_8 = __Pyx_PyInt_As_bool(__pyx_t_1); if (unlikely((__pyx_t_8 == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1622, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(__pyx_v_strvar == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
    __PYX_ERR(0, 1622, __pyx_L1_error)
  }
  __pyx_t_9 = __Pyx_PyBytes_AsWritableString(__pyx_v_strvar); if (unlikely((!__pyx_t_9) && PyErr_Occurred())) __PYX_ERR(0, 1622, __pyx_L1_error)

  /* "../../bmi/sympy/DifferentialRing.pyx":1623
 *         A = bmi_c.bmi_dapyx_tail (
 *                     streqns, self.dring, int (False), strvar,
 *                     self.notation, strnot, 0, 0)             # <<<<<<<<<<<<<<
 *         if bmi_c.bmi_dapyx_is_error (A):
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (A)
 */
  if (unlikely(__pyx_v_self->notation == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
    __PYX_ERR(0, 1623, __pyx_L1_error)
  }
  __pyx_t_10 = __Pyx_PyBytes_AsWritableString(__pyx_v_self->notation); if (unlikely((!__pyx_t_10) && PyErr_Occurred())) __PYX_ERR(0, 1623, __pyx_L1_error)
  __pyx_t_11 = __Pyx_PyObject_AsWritableString(__pyx_v_strnot); if (unlikely((!__pyx_t_11) && PyErr_Occurred())) __PYX_ERR(0, 1623, __pyx_L1_error)

  /* "../../bmi/sympy/DifferentialRing.pyx":1621
 *         else:
 *             strvar = ascii (variable)
 *         A = bmi_c.bmi_dapyx_tail (             # <<<<<<<<<<<<<<
 *                     streqns, self.dring, int (False), strvar,
 *                     self.notation, strnot, 0, 0)
 */
  __pyx_v_A = bmi_dapyx_tail(__pyx_t_7, __pyx_v_self->dring, __pyx_t_8, __pyx_t_9, __pyx_t_10, __pyx_t_11, 0, 0);

  /* "../../bmi/sympy/DifferentialRing.pyx":1624
 *                     streqns, self.dring, int (False), strvar,
 *                     self.notation, strnot, 0, 0)
 *         if bmi_c.bmi_dapyx_is_error (A):             # <<<<<<<<<<<<<<
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (A)
 *             bmi_c.bmi_balsa_clear_ALGEB (A)
 */
  __pyx_t_5 = (bmi_dapyx_is_error(__pyx_v_A) != 0);
  if (unlikely(__pyx_t_5)) {

    /* "../../bmi/sympy/DifferentialRing.pyx":1625
 *                     self.notation, strnot, 0, 0)
 *         if bmi_c.bmi_dapyx_is_error (A):
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (A)             # <<<<<<<<<<<<<<
 *             bmi_c.bmi_balsa_clear_ALGEB (A)
 *             raise RuntimeError (str (mesgerr, 'utf-8'))
 */
    __pyx_t_1 = __Pyx_PyBytes_FromString(bmi_dapyx_mesgerr(__pyx_v_A)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1625, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_v_mesgerr = ((PyObject*)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "../../bmi/sympy/DifferentialRing.pyx":1626
 *         if bmi_c.bmi_dapyx_is_error (A):
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (A)
 *             bmi_c.bmi_balsa_clear_ALGEB (A)             # <<<<<<<<<<<<<<
 *             raise RuntimeError (str (mesgerr, 'utf-8'))
 *         result = eval (A.value, globals (), self.evdict)
 */
    bmi_balsa_clear_ALGEB(__pyx_v_A);

    /* "../../bmi/sympy/DifferentialRing.pyx":1627
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (A)
 *             bmi_c.bmi_balsa_clear_ALGEB (A)
 *             raise RuntimeError (str (mesgerr, 'utf-8'))             # <<<<<<<<<<<<<<
 *         result = eval (A.value, globals (), self.evdict)
 *         if not isinstance (equations, list):
 */
    __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1627, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_v_mesgerr);
    __Pyx_GIVEREF(__pyx_v_mesgerr);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_mesgerr)) __PYX_ERR(0, 1627, __pyx_L1_error);
    __Pyx_INCREF(__pyx_kp_u_utf_8);
    __Pyx_GIVEREF(__pyx_kp_u_utf_8);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_kp_u_utf_8)) __PYX_ERR(0, 1627, __pyx_L1_error);
    __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)(&PyUnicode_Type)), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1627, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_RuntimeError, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1627, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(0, 1627, __pyx_L1_error)

    /* "../../bmi/sympy/DifferentialRing.pyx":1624
 *                     streqns, self.dring, int (False), strvar,
 *                     self.notation, strnot, 0, 0)
 *         if bmi_c.bmi_dapyx_is_error (A):             # <<<<<<<<<<<<<<
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (A)
 *             bmi_c.bmi_balsa_clear_ALGEB (A)
 */
  }

  /* "../../bmi/sympy/DifferentialRing.pyx":1628
 *             bmi_c.bmi_balsa_clear_ALGEB (A)
 *             raise RuntimeError (str (mesgerr, 'utf-8'))
 *         result = eval (A.value, globals (), self.evdict)             # <<<<<<<<<<<<<<
 *         if not isinstance (equations, list):
 *             result = result [0]
 */
  __pyx_t_1 = __Pyx_PyBytes_FromString(__pyx_v_A->value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1628, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_Globals(); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1628, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1628, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_1);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1)) __PYX_ERR(0, 1628, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_2);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2)) __PYX_ERR(0, 1628, __pyx_L1_error);
  __Pyx_INCREF(__pyx_v_self->evdict);
  __Pyx_GIVEREF(__pyx_v_self->evdict);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_self->evdict)) __PYX_ERR(0, 1628, __pyx_L1_error);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_eval, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1628, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_result = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "../../bmi/sympy/DifferentialRing.pyx":1629
 *             raise RuntimeError (str (mesgerr, 'utf-8'))
 *         result = eval (A.value, globals (), self.evdict)
 *         if not isinstance (equations, list):             # <<<<<<<<<<<<<<
 *             result = result [0]
 *         bmi_c.bmi_balsa_clear_ALGEB (A)
 */
  __pyx_t_5 = PyList_Check(__pyx_v_equations); 
  __pyx_t_12 = (!__pyx_t_5);
  if (__pyx_t_12) {

    /* "../../bmi/sympy/DifferentialRing.pyx":1630
 *         result = eval (A.value, globals (), self.evdict)
 *         if not isinstance (equations, list):
 *             result = result [0]             # <<<<<<<<<<<<<<
 *         bmi_c.bmi_balsa_clear_ALGEB (A)
 *         return result
 */
    __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_result, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1630, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF_SET(__pyx_v_result, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "../../bmi/sympy/DifferentialRing.pyx":1629
 *             raise RuntimeError (str (mesgerr, 'utf-8'))
 *         result = eval (A.value, globals (), self.evdict)
 *         if not isinstance (equations, list):             # <<<<<<<<<<<<<<
 *             result = result [0]
 *         bmi_c.bmi_balsa_clear_ALGEB (A)
 */
  }

  /* "../../bmi/sympy/DifferentialRing.pyx":1631
 *         if not isinstance (equations, list):
 *             result = result [0]
 *         bmi_c.bmi_balsa_clear_ALGEB (A)             # <<<<<<<<<<<<<<
 *         return result
 * 
 */
  bmi_balsa_clear_ALGEB(__pyx_v_A);

  /* "../../bmi/sympy/DifferentialRing.pyx":1632
 *             result = result [0]
 *         bmi_c.bmi_balsa_clear_ALGEB (A)
 *         return result             # <<<<<<<<<<<<<<
 * 
 * # separant
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_result);
  __pyx_r = __pyx_v_result;
  goto __pyx_L0;

  /* "../../bmi/sympy/DifferentialRing.pyx":1513
 * 
 * # tail
 *     def tail (             # <<<<<<<<<<<<<<
 *             self,
 *             equations,
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("DifferentialAlgebra.DifferentialRing.tail", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XDECREF(__pyx_v_streqns);
  __Pyx_XDECREF(__pyx_v_strvar);
  __Pyx_XDECREF(__pyx_v_mesgerr);
  __Pyx_XDECREF(__pyx_v_strnot);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "../../bmi/sympy/DifferentialRing.pyx":1635
 * 
 * # separant
 *     def separant (             # <<<<<<<<<<<<<<
 *             self,
 *             equations,
 */

/* Python wrapper */
static PyObject *__pyx_pw_19DifferentialAlgebra_16DifferentialRing_41separant(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_19DifferentialAlgebra_16DifferentialRing_40separant, "\n        The separant of a rational fraction\n\n        INPUT:\n\n            `equations` -- a rational fraction or a list of rational \n                             fractions \n            `variable`  -- (default: None) a variable\n            `notation`  -- (default: 'undefined') a string\n\n        OUTPUT:\n\n            The list of separants of the equations, with respect to\n            `variable`.  If `variable` is omitted, the list of separants\n            of the equations, with respect to their leading derivatives.\n\n            The separant of a rational fraction F with respect to some\n            derivative u, is defined as the partial derivative of F\n            with respect to u.\n\n        EXAMPLES:\n\n            >>> from sympy import *\n            >>> from DifferentialAlgebra import *\n            >>> init_printing (use_unicode = False, num_columns = 60)\n\n            >>> t = var ('t')\n            >>> u,v = function ('u,v')\n            >>> R = DifferentialRing (derivations = [t], blocks = [u,v])\n            >>> L = [t + 3, \n            ...      v(t)*u(t)**2 - u(t) + Derivative(v(t),t) + 1, \n            ...      t*u(t)/Derivative(v(t),t)]\n\n        The list of separants of the elements of L, with respect to\n        their leading derivatives:\n\n            >>> R.separant (L)\n                                    t     \n            [1, 2*u(t)*v(t) - 1, --------]\n                                 d        \n                                 --(v(t)) \n                                 dt       \n\n        The separant of a single rational fraction, with respect to\n        its leading derivative:\n\n            >>> R.separant (u(t)**2 + Derivative(v(t),t)/v(t))\n            2*u(t)\n\n        The list of separants of the elements of L, with respect to t:\n\n            >>> R.separant (L, t)\n                     u(t)   \n            [1, 0, --------]\n                   d        \n                   --(v(t)) \n                   dt       \n""\n        The separant of a single rational fraction, with respect to\n        a derivative:\n\n            >>> R.separant (u(t)**2 + Derivative(v(t),t)/v(t), \n            ...             Derivative(v(t),t))\n             1  \n            ----\n            v(t)\n        ");
static PyMethodDef __pyx_mdef_19DifferentialAlgebra_16DifferentialRing_41separant = {"separant", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_19DifferentialAlgebra_16DifferentialRing_41separant, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_19DifferentialAlgebra_16DifferentialRing_40separant};
static PyObject *__pyx_pw_19DifferentialAlgebra_16DifferentialRing_41separant(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_equations = 0;
  PyObject *__pyx_v_variable = 0;
  PyObject *__pyx_v_notation = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[3] = {0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("separant (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_equations,&__pyx_n_s_variable,&__pyx_n_s_notation,0};

    /* "../../bmi/sympy/DifferentialRing.pyx":1638
 *             self,
 *             equations,
 *             variable = None,             # <<<<<<<<<<<<<<
 *             notation = BMI_IX_undefined):
 *         r"""
 */
    values[1] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
    values[2] = __Pyx_Arg_NewRef_FASTCALL(__pyx_k__23);
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_equations)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1635, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_variable);
          if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1635, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_notation);
          if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1635, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "separant") < 0)) __PYX_ERR(0, 1635, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_equations = values[0];
    __pyx_v_variable = values[1];
    __pyx_v_notation = values[2];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("separant", 0, 1, 3, __pyx_nargs); __PYX_ERR(0, 1635, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("DifferentialAlgebra.DifferentialRing.separant", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_19DifferentialAlgebra_16DifferentialRing_40separant(((struct __pyx_obj_19DifferentialAlgebra_DifferentialRing *)__pyx_v_self), __pyx_v_equations, __pyx_v_variable, __pyx_v_notation);

  /* "../../bmi/sympy/DifferentialRing.pyx":1635
 * 
 * # separant
 *     def separant (             # <<<<<<<<<<<<<<
 *             self,
 *             equations,
 */

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_19DifferentialAlgebra_16DifferentialRing_40separant(struct __pyx_obj_19DifferentialAlgebra_DifferentialRing *__pyx_v_self, PyObject *__pyx_v_equations, PyObject *__pyx_v_variable, PyObject *__pyx_v_notation) {
  PyObject *__pyx_v_result = 0;
  PyObject *__pyx_v_streqns = 0;
  PyObject *__pyx_v_strvar = 0;
  PyObject *__pyx_v_mesgerr = 0;
  ALGEB_string __pyx_v_A;
  PyObject *__pyx_v_strnot = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  unsigned int __pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  char *__pyx_t_7;
  bool __pyx_t_8;
  char *__pyx_t_9;
  char *__pyx_t_10;
  char *__pyx_t_11;
  int __pyx_t_12;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("separant", 1);

  /* "../../bmi/sympy/DifferentialRing.pyx":1712
 *         cdef bmi_c.ALGEB_string A
 *         cdef strnot
 *         strnot = self.__process_notation (notation)             # <<<<<<<<<<<<<<
 *         if isinstance (equations, list):
 *             streqns = ascii (equations)
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_DifferentialRing__process_notat); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1712, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_notation};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1712, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_v_strnot = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "../../bmi/sympy/DifferentialRing.pyx":1713
 *         cdef strnot
 *         strnot = self.__process_notation (notation)
 *         if isinstance (equations, list):             # <<<<<<<<<<<<<<
 *             streqns = ascii (equations)
 *         else:
 */
  __pyx_t_5 = PyList_Check(__pyx_v_equations); 
  if (__pyx_t_5) {

    /* "../../bmi/sympy/DifferentialRing.pyx":1714
 *         strnot = self.__process_notation (notation)
 *         if isinstance (equations, list):
 *             streqns = ascii (equations)             # <<<<<<<<<<<<<<
 *         else:
 *             streqns = ascii ([equations])
 */
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ascii); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1714, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = NULL;
    __pyx_t_4 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
        __pyx_t_4 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_equations};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1714, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    if (!(likely(PyBytes_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_1))) __PYX_ERR(0, 1714, __pyx_L1_error)
    __pyx_v_streqns = ((PyObject*)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "../../bmi/sympy/DifferentialRing.pyx":1713
 *         cdef strnot
 *         strnot = self.__process_notation (notation)
 *         if isinstance (equations, list):             # <<<<<<<<<<<<<<
 *             streqns = ascii (equations)
 *         else:
 */
    goto __pyx_L3;
  }

  /* "../../bmi/sympy/DifferentialRing.pyx":1716
 *             streqns = ascii (equations)
 *         else:
 *             streqns = ascii ([equations])             # <<<<<<<<<<<<<<
 *         if variable == None:
 *             strvar = b"0"
 */
  /*else*/ {
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ascii); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1716, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1716, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_v_equations);
    __Pyx_GIVEREF(__pyx_v_equations);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 0, __pyx_v_equations)) __PYX_ERR(0, 1716, __pyx_L1_error);
    __pyx_t_6 = NULL;
    __pyx_t_4 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
        __pyx_t_4 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_3};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1716, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    if (!(likely(PyBytes_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_1))) __PYX_ERR(0, 1716, __pyx_L1_error)
    __pyx_v_streqns = ((PyObject*)__pyx_t_1);
    __pyx_t_1 = 0;
  }
  __pyx_L3:;

  /* "../../bmi/sympy/DifferentialRing.pyx":1717
 *         else:
 *             streqns = ascii ([equations])
 *         if variable == None:             # <<<<<<<<<<<<<<
 *             strvar = b"0"
 *         else:
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_variable, Py_None, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1717, __pyx_L1_error)
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 1717, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_5) {

    /* "../../bmi/sympy/DifferentialRing.pyx":1718
 *             streqns = ascii ([equations])
 *         if variable == None:
 *             strvar = b"0"             # <<<<<<<<<<<<<<
 *         else:
 *             strvar = ascii (variable)
 */
    __Pyx_INCREF(__pyx_kp_b_0);
    __pyx_v_strvar = __pyx_kp_b_0;

    /* "../../bmi/sympy/DifferentialRing.pyx":1717
 *         else:
 *             streqns = ascii ([equations])
 *         if variable == None:             # <<<<<<<<<<<<<<
 *             strvar = b"0"
 *         else:
 */
    goto __pyx_L4;
  }

  /* "../../bmi/sympy/DifferentialRing.pyx":1720
 *             strvar = b"0"
 *         else:
 *             strvar = ascii (variable)             # <<<<<<<<<<<<<<
 *         A = bmi_c.bmi_dapyx_separant (
 *                     streqns, self.dring, int (False), strvar,
 */
  /*else*/ {
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ascii); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1720, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = NULL;
    __pyx_t_4 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
        __pyx_t_4 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_variable};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1720, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    if (!(likely(PyBytes_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_1))) __PYX_ERR(0, 1720, __pyx_L1_error)
    __pyx_v_strvar = ((PyObject*)__pyx_t_1);
    __pyx_t_1 = 0;
  }
  __pyx_L4:;

  /* "../../bmi/sympy/DifferentialRing.pyx":1722
 *             strvar = ascii (variable)
 *         A = bmi_c.bmi_dapyx_separant (
 *                     streqns, self.dring, int (False), strvar,             # <<<<<<<<<<<<<<
 *                     self.notation, strnot, 0, 0)
 *         if bmi_c.bmi_dapyx_is_error (A):
 */
  if (unlikely(__pyx_v_streqns == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
    __PYX_ERR(0, 1722, __pyx_L1_error)
  }
  __pyx_t_7 = __Pyx_PyBytes_AsWritableString(__pyx_v_streqns); if (unlikely((!__pyx_t_7) && PyErr_Occurred())) __PYX_ERR(0, 1722, __pyx_L1_error)
  __pyx_t_1 = __Pyx_PyNumber_Int(Py_False); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1722, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_8 = __Pyx_PyInt_As_bool(__pyx_t_1); if (unlikely((__pyx_t_8 == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1722, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(__pyx_v_strvar == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
    __PYX_ERR(0, 1722, __pyx_L1_error)
  }
  __pyx_t_9 = __Pyx_PyBytes_AsWritableString(__pyx_v_strvar); if (unlikely((!__pyx_t_9) && PyErr_Occurred())) __PYX_ERR(0, 1722, __pyx_L1_error)

  /* "../../bmi/sympy/DifferentialRing.pyx":1723
 *         A = bmi_c.bmi_dapyx_separant (
 *                     streqns, self.dring, int (False), strvar,
 *                     self.notation, strnot, 0, 0)             # <<<<<<<<<<<<<<
 *         if bmi_c.bmi_dapyx_is_error (A):
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (A)
 */
  if (unlikely(__pyx_v_self->notation == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
    __PYX_ERR(0, 1723, __pyx_L1_error)
  }
  __pyx_t_10 = __Pyx_PyBytes_AsWritableString(__pyx_v_self->notation); if (unlikely((!__pyx_t_10) && PyErr_Occurred())) __PYX_ERR(0, 1723, __pyx_L1_error)
  __pyx_t_11 = __Pyx_PyObject_AsWritableString(__pyx_v_strnot); if (unlikely((!__pyx_t_11) && PyErr_Occurred())) __PYX_ERR(0, 1723, __pyx_L1_error)

  /* "../../bmi/sympy/DifferentialRing.pyx":1721
 *         else:
 *             strvar = ascii (variable)
 *         A = bmi_c.bmi_dapyx_separant (             # <<<<<<<<<<<<<<
 *                     streqns, self.dring, int (False), strvar,
 *                     self.notation, strnot, 0, 0)
 */
  __pyx_v_A = bmi_dapyx_separant(__pyx_t_7, __pyx_v_self->dring, __pyx_t_8, __pyx_t_9, __pyx_t_10, __pyx_t_11, 0, 0);

  /* "../../bmi/sympy/DifferentialRing.pyx":1724
 *                     streqns, self.dring, int (False), strvar,
 *                     self.notation, strnot, 0, 0)
 *         if bmi_c.bmi_dapyx_is_error (A):             # <<<<<<<<<<<<<<
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (A)
 *             bmi_c.bmi_balsa_clear_ALGEB (A)
 */
  __pyx_t_5 = (bmi_dapyx_is_error(__pyx_v_A) != 0);
  if (unlikely(__pyx_t_5)) {

    /* "../../bmi/sympy/DifferentialRing.pyx":1725
 *                     self.notation, strnot, 0, 0)
 *         if bmi_c.bmi_dapyx_is_error (A):
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (A)             # <<<<<<<<<<<<<<
 *             bmi_c.bmi_balsa_clear_ALGEB (A)
 *             raise RuntimeError (str (mesgerr, 'utf-8'))
 */
    __pyx_t_1 = __Pyx_PyBytes_FromString(bmi_dapyx_mesgerr(__pyx_v_A)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1725, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_v_mesgerr = ((PyObject*)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "../../bmi/sympy/DifferentialRing.pyx":1726
 *         if bmi_c.bmi_dapyx_is_error (A):
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (A)
 *             bmi_c.bmi_balsa_clear_ALGEB (A)             # <<<<<<<<<<<<<<
 *             raise RuntimeError (str (mesgerr, 'utf-8'))
 *         result = eval (A.value, globals (), self.evdict)
 */
    bmi_balsa_clear_ALGEB(__pyx_v_A);

    /* "../../bmi/sympy/DifferentialRing.pyx":1727
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (A)
 *             bmi_c.bmi_balsa_clear_ALGEB (A)
 *             raise RuntimeError (str (mesgerr, 'utf-8'))             # <<<<<<<<<<<<<<
 *         result = eval (A.value, globals (), self.evdict)
 *         if not isinstance (equations, list):
 */
    __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1727, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_v_mesgerr);
    __Pyx_GIVEREF(__pyx_v_mesgerr);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_mesgerr)) __PYX_ERR(0, 1727, __pyx_L1_error);
    __Pyx_INCREF(__pyx_kp_u_utf_8);
    __Pyx_GIVEREF(__pyx_kp_u_utf_8);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_kp_u_utf_8)) __PYX_ERR(0, 1727, __pyx_L1_error);
    __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)(&PyUnicode_Type)), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1727, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_RuntimeError, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1727, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(0, 1727, __pyx_L1_error)

    /* "../../bmi/sympy/DifferentialRing.pyx":1724
 *                     streqns, self.dring, int (False), strvar,
 *                     self.notation, strnot, 0, 0)
 *         if bmi_c.bmi_dapyx_is_error (A):             # <<<<<<<<<<<<<<
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (A)
 *             bmi_c.bmi_balsa_clear_ALGEB (A)
 */
  }

  /* "../../bmi/sympy/DifferentialRing.pyx":1728
 *             bmi_c.bmi_balsa_clear_ALGEB (A)
 *             raise RuntimeError (str (mesgerr, 'utf-8'))
 *         result = eval (A.value, globals (), self.evdict)             # <<<<<<<<<<<<<<
 *         if not isinstance (equations, list):
 *             result = result [0]
 */
  __pyx_t_1 = __Pyx_PyBytes_FromString(__pyx_v_A->value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1728, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_Globals(); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1728, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1728, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_1);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1)) __PYX_ERR(0, 1728, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_2);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2)) __PYX_ERR(0, 1728, __pyx_L1_error);
  __Pyx_INCREF(__pyx_v_self->evdict);
  __Pyx_GIVEREF(__pyx_v_self->evdict);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_self->evdict)) __PYX_ERR(0, 1728, __pyx_L1_error);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_eval, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1728, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_result = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "../../bmi/sympy/DifferentialRing.pyx":1729
 *             raise RuntimeError (str (mesgerr, 'utf-8'))
 *         result = eval (A.value, globals (), self.evdict)
 *         if not isinstance (equations, list):             # <<<<<<<<<<<<<<
 *             result = result [0]
 *         bmi_c.bmi_balsa_clear_ALGEB (A)
 */
  __pyx_t_5 = PyList_Check(__pyx_v_equations); 
  __pyx_t_12 = (!__pyx_t_5);
  if (__pyx_t_12) {

    /* "../../bmi/sympy/DifferentialRing.pyx":1730
 *         result = eval (A.value, globals (), self.evdict)
 *         if not isinstance (equations, list):
 *             result = result [0]             # <<<<<<<<<<<<<<
 *         bmi_c.bmi_balsa_clear_ALGEB (A)
 *         return result
 */
    __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_result, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1730, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF_SET(__pyx_v_result, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "../../bmi/sympy/DifferentialRing.pyx":1729
 *             raise RuntimeError (str (mesgerr, 'utf-8'))
 *         result = eval (A.value, globals (), self.evdict)
 *         if not isinstance (equations, list):             # <<<<<<<<<<<<<<
 *             result = result [0]
 *         bmi_c.bmi_balsa_clear_ALGEB (A)
 */
  }

  /* "../../bmi/sympy/DifferentialRing.pyx":1731
 *         if not isinstance (equations, list):
 *             result = result [0]
 *         bmi_c.bmi_balsa_clear_ALGEB (A)             # <<<<<<<<<<<<<<
 *         return result
 * 
 */
  bmi_balsa_clear_ALGEB(__pyx_v_A);

  /* "../../bmi/sympy/DifferentialRing.pyx":1732
 *             result = result [0]
 *         bmi_c.bmi_balsa_clear_ALGEB (A)
 *         return result             # <<<<<<<<<<<<<<
 * 
 * # integrate
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_result);
  __pyx_r = __pyx_v_result;
  goto __pyx_L0;

  /* "../../bmi/sympy/DifferentialRing.pyx":1635
 * 
 * # separant
 *     def separant (             # <<<<<<<<<<<<<<
 *             self,
 *             equations,
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("DifferentialAlgebra.DifferentialRing.separant", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XDECREF(__pyx_v_streqns);
  __Pyx_XDECREF(__pyx_v_strvar);
  __Pyx_XDECREF(__pyx_v_mesgerr);
  __Pyx_XDECREF(__pyx_v_strnot);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "../../bmi/sympy/DifferentialRing.pyx":1735
 * 
 * # integrate
 *     def integrate (             # <<<<<<<<<<<<<<
 *             self,
 *             equations,
 */

/* Python wrapper */
static PyObject *__pyx_pw_19DifferentialAlgebra_16DifferentialRing_43integrate(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_19DifferentialAlgebra_16DifferentialRing_42integrate, "\n        Integrate a rational differential fraction\n\n        INPUT:\n\n            `equations` -- a rational fraction or a list of rational \n                             fractions\n            `variable`  -- a variable\n            `iterated`  -- (default: True) a bool\n            `notation`  -- (default: 'undefined') a string\n\n        OUTPUT:\n\n            A list of rational fractions, representing a decomposition\n            of the equation or, a list of lists of rational fractions if\n            `equations` is a list.\n\n            The parameter `variable` must be an independent variable.\n\n            Assume `equations` is a single rational fraction. Denote\n            R the differential ring, F the rational fraction, t the\n            independent variable and L the returned list. Then we have:\n\n            F == add(R.differentiate (L[i],t**i) for i in range(len(L)))\n\n            Moreover, if F is the derivative of some other rational\n            fraction, with respect to t, then L[0] is zero.\n\n            The returned list is ranking dependent. Orderly rankings\n            usually give more interesting results.\n\n        EXAMPLES:\n\n            >>> from sympy import *\n            >>> from DifferentialAlgebra import *\n            >>> init_printing (use_unicode = False, num_columns = 60)\n\n            >>> t = var ('t')\n            >>> u,v = function ('u,v')\n            >>> R = DifferentialRing (derivations = [t], \n            ...             blocks = [[u,v]])\n\n        Observe that the above ranking is orderly.\n\n            >>> eq = Derivative(u(t),t)**2 + Derivative(v(t)**2,t,t) \\\n            ...                     - Derivative(u(t)*v(t) + t*v(t), t)\n            >>> L = R.integrate (eq.doit(), t)\n            >>> L\n                       2                             \n             /d       \\                         2    \n            [|--(u(t))| , -t*v(t) - u(t)*v(t), v (t)]\n             \\dt      /                       ""       \n\n        The two expressions are equal, for their difference is 0:\n\n            >>> eq - Add (*[R.differentiate (L[i], t**i) \n            ...                             for i in range (len (L))])\n                                                                 2     >\n              d               d               d                 d      >\n            t*--(v(t)) + u(t)*--(v(t)) + v(t)*--(u(t)) - 2*v(t)*---(v( >\n              dt              dt              dt                  2    >\n                                                                dt     >\n            |  \n            >                                                   2    2 >\n            >              d                          /d       \\    d  >\n            > t)) + v(t) - --(t*v(t) + u(t)*v(t)) - 2*|--(v(t))|  + -- >\n            >              dt                         \\dt      /       >\n            >                                                       dt >\n            |  \n            >         \n            >  / 2   \\\n            > -\\v (t)/\n            > 2       \n            >         \n\n        The case of a rational fraction which is the derivative of\n        some other fraction:\n\n            >>> eq = (v(t)**2 + t)/(3*Derivative(v(t),t))              \n            >>> L = R.integrate (Derivative(eq, t).doit(), t)\n            >>> L\n                     2     \n                t + v (t)  \n            [0, ----------]\n                  d        \n                3*--(v(t)) \n                  dt       \n        ");
static PyMethodDef __pyx_mdef_19DifferentialAlgebra_16DifferentialRing_43integrate = {"integrate", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_19DifferentialAlgebra_16DifferentialRing_43integrate, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_19DifferentialAlgebra_16DifferentialRing_42integrate};
static PyObject *__pyx_pw_19DifferentialAlgebra_16DifferentialRing_43integrate(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_equations = 0;
  PyObject *__pyx_v_variable = 0;
  PyBoolObject *__pyx_v_iterated = 0;
  PyObject *__pyx_v_notation = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[4] = {0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("integrate (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_equations,&__pyx_n_s_variable,&__pyx_n_s_iterated,&__pyx_n_s_notation,0};

    /* "../../bmi/sympy/DifferentialRing.pyx":1739
 *             equations,
 *             variable,
 *             bool iterated = True,             # <<<<<<<<<<<<<<
 *             notation = BMI_IX_undefined):
 *         r"""
 */
    values[2] = __Pyx_Arg_NewRef_FASTCALL((PyObject *)((PyBoolObject *)Py_True));
    values[3] = __Pyx_Arg_NewRef_FASTCALL(__pyx_k__24);
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_equations)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1735, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_variable)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1735, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("integrate", 0, 2, 4, 1); __PYX_ERR(0, 1735, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_iterated);
          if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1735, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_notation);
          if (value) { values[3] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1735, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "integrate") < 0)) __PYX_ERR(0, 1735, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_equations = values[0];
    __pyx_v_variable = values[1];
    __pyx_v_iterated = ((PyBoolObject *)values[2]);
    __pyx_v_notation = values[3];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("integrate", 0, 2, 4, __pyx_nargs); __PYX_ERR(0, 1735, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("DifferentialAlgebra.DifferentialRing.integrate", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_iterated), __pyx_ptype_7cpython_4bool_bool, 1, "iterated", 0))) __PYX_ERR(0, 1739, __pyx_L1_error)
  __pyx_r = __pyx_pf_19DifferentialAlgebra_16DifferentialRing_42integrate(((struct __pyx_obj_19DifferentialAlgebra_DifferentialRing *)__pyx_v_self), __pyx_v_equations, __pyx_v_variable, __pyx_v_iterated, __pyx_v_notation);

  /* "../../bmi/sympy/DifferentialRing.pyx":1735
 * 
 * # integrate
 *     def integrate (             # <<<<<<<<<<<<<<
 *             self,
 *             equations,
 */

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_19DifferentialAlgebra_16DifferentialRing_42integrate(struct __pyx_obj_19DifferentialAlgebra_DifferentialRing *__pyx_v_self, PyObject *__pyx_v_equations, PyObject *__pyx_v_variable, PyBoolObject *__pyx_v_iterated, PyObject *__pyx_v_notation) {
  PyObject *__pyx_v_result = 0;
  PyObject *__pyx_v_streqns = 0;
  PyObject *__pyx_v_strvar = 0;
  PyObject *__pyx_v_mesgerr = 0;
  ALGEB_string __pyx_v_A;
  PyObject *__pyx_v_strnot = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  unsigned int __pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  char *__pyx_t_7;
  char *__pyx_t_8;
  bool __pyx_t_9;
  char *__pyx_t_10;
  char *__pyx_t_11;
  int __pyx_t_12;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("integrate", 1);

  /* "../../bmi/sympy/DifferentialRing.pyx":1834
 *         cdef bmi_c.ALGEB_string A
 *         cdef strnot
 *         strnot = self.__process_notation (notation)             # <<<<<<<<<<<<<<
 *         if isinstance (equations, list):
 *             streqns = ascii (equations)
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_DifferentialRing__process_notat); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1834, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_notation};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1834, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_v_strnot = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "../../bmi/sympy/DifferentialRing.pyx":1835
 *         cdef strnot
 *         strnot = self.__process_notation (notation)
 *         if isinstance (equations, list):             # <<<<<<<<<<<<<<
 *             streqns = ascii (equations)
 *         else:
 */
  __pyx_t_5 = PyList_Check(__pyx_v_equations); 
  if (__pyx_t_5) {

    /* "../../bmi/sympy/DifferentialRing.pyx":1836
 *         strnot = self.__process_notation (notation)
 *         if isinstance (equations, list):
 *             streqns = ascii (equations)             # <<<<<<<<<<<<<<
 *         else:
 *             streqns = ascii ([equations])
 */
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ascii); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1836, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = NULL;
    __pyx_t_4 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
        __pyx_t_4 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_equations};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1836, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    if (!(likely(PyBytes_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_1))) __PYX_ERR(0, 1836, __pyx_L1_error)
    __pyx_v_streqns = ((PyObject*)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "../../bmi/sympy/DifferentialRing.pyx":1835
 *         cdef strnot
 *         strnot = self.__process_notation (notation)
 *         if isinstance (equations, list):             # <<<<<<<<<<<<<<
 *             streqns = ascii (equations)
 *         else:
 */
    goto __pyx_L3;
  }

  /* "../../bmi/sympy/DifferentialRing.pyx":1838
 *             streqns = ascii (equations)
 *         else:
 *             streqns = ascii ([equations])             # <<<<<<<<<<<<<<
 *         strvar = ascii (variable)
 *         A = bmi_c.bmi_dapyx_integrate (
 */
  /*else*/ {
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ascii); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1838, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1838, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_v_equations);
    __Pyx_GIVEREF(__pyx_v_equations);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 0, __pyx_v_equations)) __PYX_ERR(0, 1838, __pyx_L1_error);
    __pyx_t_6 = NULL;
    __pyx_t_4 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
        __pyx_t_4 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_3};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1838, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    if (!(likely(PyBytes_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_1))) __PYX_ERR(0, 1838, __pyx_L1_error)
    __pyx_v_streqns = ((PyObject*)__pyx_t_1);
    __pyx_t_1 = 0;
  }
  __pyx_L3:;

  /* "../../bmi/sympy/DifferentialRing.pyx":1839
 *         else:
 *             streqns = ascii ([equations])
 *         strvar = ascii (variable)             # <<<<<<<<<<<<<<
 *         A = bmi_c.bmi_dapyx_integrate (
 *                     self.dring, streqns, strvar, int (iterated),
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ascii); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1839, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_variable};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1839, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  if (!(likely(PyBytes_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_1))) __PYX_ERR(0, 1839, __pyx_L1_error)
  __pyx_v_strvar = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "../../bmi/sympy/DifferentialRing.pyx":1841
 *         strvar = ascii (variable)
 *         A = bmi_c.bmi_dapyx_integrate (
 *                     self.dring, streqns, strvar, int (iterated),             # <<<<<<<<<<<<<<
 *                     self.notation, strnot, 0, 0)
 *         if bmi_c.bmi_dapyx_is_error (A):
 */
  if (unlikely(__pyx_v_streqns == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
    __PYX_ERR(0, 1841, __pyx_L1_error)
  }
  __pyx_t_7 = __Pyx_PyBytes_AsWritableString(__pyx_v_streqns); if (unlikely((!__pyx_t_7) && PyErr_Occurred())) __PYX_ERR(0, 1841, __pyx_L1_error)
  if (unlikely(__pyx_v_strvar == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
    __PYX_ERR(0, 1841, __pyx_L1_error)
  }
  __pyx_t_8 = __Pyx_PyBytes_AsWritableString(__pyx_v_strvar); if (unlikely((!__pyx_t_8) && PyErr_Occurred())) __PYX_ERR(0, 1841, __pyx_L1_error)
  __pyx_t_1 = __Pyx_PyNumber_Int(((PyObject *)__pyx_v_iterated)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1841, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_9 = __Pyx_PyInt_As_bool(__pyx_t_1); if (unlikely((__pyx_t_9 == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1841, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "../../bmi/sympy/DifferentialRing.pyx":1842
 *         A = bmi_c.bmi_dapyx_integrate (
 *                     self.dring, streqns, strvar, int (iterated),
 *                     self.notation, strnot, 0, 0)             # <<<<<<<<<<<<<<
 *         if bmi_c.bmi_dapyx_is_error (A):
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (A)
 */
  if (unlikely(__pyx_v_self->notation == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
    __PYX_ERR(0, 1842, __pyx_L1_error)
  }
  __pyx_t_10 = __Pyx_PyBytes_AsWritableString(__pyx_v_self->notation); if (unlikely((!__pyx_t_10) && PyErr_Occurred())) __PYX_ERR(0, 1842, __pyx_L1_error)
  __pyx_t_11 = __Pyx_PyObject_AsWritableString(__pyx_v_strnot); if (unlikely((!__pyx_t_11) && PyErr_Occurred())) __PYX_ERR(0, 1842, __pyx_L1_error)

  /* "../../bmi/sympy/DifferentialRing.pyx":1840
 *             streqns = ascii ([equations])
 *         strvar = ascii (variable)
 *         A = bmi_c.bmi_dapyx_integrate (             # <<<<<<<<<<<<<<
 *                     self.dring, streqns, strvar, int (iterated),
 *                     self.notation, strnot, 0, 0)
 */
  __pyx_v_A = bmi_dapyx_integrate(__pyx_v_self->dring, __pyx_t_7, __pyx_t_8, __pyx_t_9, __pyx_t_10, __pyx_t_11, 0, 0);

  /* "../../bmi/sympy/DifferentialRing.pyx":1843
 *                     self.dring, streqns, strvar, int (iterated),
 *                     self.notation, strnot, 0, 0)
 *         if bmi_c.bmi_dapyx_is_error (A):             # <<<<<<<<<<<<<<
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (A)
 *             bmi_c.bmi_balsa_clear_ALGEB (A)
 */
  __pyx_t_5 = (bmi_dapyx_is_error(__pyx_v_A) != 0);
  if (unlikely(__pyx_t_5)) {

    /* "../../bmi/sympy/DifferentialRing.pyx":1844
 *                     self.notation, strnot, 0, 0)
 *         if bmi_c.bmi_dapyx_is_error (A):
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (A)             # <<<<<<<<<<<<<<
 *             bmi_c.bmi_balsa_clear_ALGEB (A)
 *             raise RuntimeError (str (mesgerr, 'utf-8'))
 */
    __pyx_t_1 = __Pyx_PyBytes_FromString(bmi_dapyx_mesgerr(__pyx_v_A)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1844, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_v_mesgerr = ((PyObject*)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "../../bmi/sympy/DifferentialRing.pyx":1845
 *         if bmi_c.bmi_dapyx_is_error (A):
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (A)
 *             bmi_c.bmi_balsa_clear_ALGEB (A)             # <<<<<<<<<<<<<<
 *             raise RuntimeError (str (mesgerr, 'utf-8'))
 *         result = eval (A.value, globals (), self.evdict)
 */
    bmi_balsa_clear_ALGEB(__pyx_v_A);

    /* "../../bmi/sympy/DifferentialRing.pyx":1846
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (A)
 *             bmi_c.bmi_balsa_clear_ALGEB (A)
 *             raise RuntimeError (str (mesgerr, 'utf-8'))             # <<<<<<<<<<<<<<
 *         result = eval (A.value, globals (), self.evdict)
 *         if not isinstance (equations, list):
 */
    __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1846, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_v_mesgerr);
    __Pyx_GIVEREF(__pyx_v_mesgerr);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_mesgerr)) __PYX_ERR(0, 1846, __pyx_L1_error);
    __Pyx_INCREF(__pyx_kp_u_utf_8);
    __Pyx_GIVEREF(__pyx_kp_u_utf_8);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_kp_u_utf_8)) __PYX_ERR(0, 1846, __pyx_L1_error);
    __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)(&PyUnicode_Type)), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1846, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_RuntimeError, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1846, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(0, 1846, __pyx_L1_error)

    /* "../../bmi/sympy/DifferentialRing.pyx":1843
 *                     self.dring, streqns, strvar, int (iterated),
 *                     self.notation, strnot, 0, 0)
 *         if bmi_c.bmi_dapyx_is_error (A):             # <<<<<<<<<<<<<<
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (A)
 *             bmi_c.bmi_balsa_clear_ALGEB (A)
 */
  }

  /* "../../bmi/sympy/DifferentialRing.pyx":1847
 *             bmi_c.bmi_balsa_clear_ALGEB (A)
 *             raise RuntimeError (str (mesgerr, 'utf-8'))
 *         result = eval (A.value, globals (), self.evdict)             # <<<<<<<<<<<<<<
 *         if not isinstance (equations, list):
 *             result = result [0]
 */
  __pyx_t_1 = __Pyx_PyBytes_FromString(__pyx_v_A->value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1847, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_Globals(); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1847, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1847, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_1);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1)) __PYX_ERR(0, 1847, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_2);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2)) __PYX_ERR(0, 1847, __pyx_L1_error);
  __Pyx_INCREF(__pyx_v_self->evdict);
  __Pyx_GIVEREF(__pyx_v_self->evdict);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_self->evdict)) __PYX_ERR(0, 1847, __pyx_L1_error);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_eval, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1847, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (!(likely(PyList_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None) || __Pyx_RaiseUnexpectedTypeError("list", __pyx_t_2))) __PYX_ERR(0, 1847, __pyx_L1_error)
  __pyx_v_result = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "../../bmi/sympy/DifferentialRing.pyx":1848
 *             raise RuntimeError (str (mesgerr, 'utf-8'))
 *         result = eval (A.value, globals (), self.evdict)
 *         if not isinstance (equations, list):             # <<<<<<<<<<<<<<
 *             result = result [0]
 *         bmi_c.bmi_balsa_clear_ALGEB (A)
 */
  __pyx_t_5 = PyList_Check(__pyx_v_equations); 
  __pyx_t_12 = (!__pyx_t_5);
  if (__pyx_t_12) {

    /* "../../bmi/sympy/DifferentialRing.pyx":1849
 *         result = eval (A.value, globals (), self.evdict)
 *         if not isinstance (equations, list):
 *             result = result [0]             # <<<<<<<<<<<<<<
 *         bmi_c.bmi_balsa_clear_ALGEB (A)
 *         return result
 */
    if (unlikely(__pyx_v_result == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(0, 1849, __pyx_L1_error)
    }
    __pyx_t_2 = __Pyx_GetItemInt_List(__pyx_v_result, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1849, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    if (!(likely(PyList_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None) || __Pyx_RaiseUnexpectedTypeError("list", __pyx_t_2))) __PYX_ERR(0, 1849, __pyx_L1_error)
    __Pyx_DECREF_SET(__pyx_v_result, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "../../bmi/sympy/DifferentialRing.pyx":1848
 *             raise RuntimeError (str (mesgerr, 'utf-8'))
 *         result = eval (A.value, globals (), self.evdict)
 *         if not isinstance (equations, list):             # <<<<<<<<<<<<<<
 *             result = result [0]
 *         bmi_c.bmi_balsa_clear_ALGEB (A)
 */
  }

  /* "../../bmi/sympy/DifferentialRing.pyx":1850
 *         if not isinstance (equations, list):
 *             result = result [0]
 *         bmi_c.bmi_balsa_clear_ALGEB (A)             # <<<<<<<<<<<<<<
 *         return result
 * 
 */
  bmi_balsa_clear_ALGEB(__pyx_v_A);

  /* "../../bmi/sympy/DifferentialRing.pyx":1851
 *             result = result [0]
 *         bmi_c.bmi_balsa_clear_ALGEB (A)
 *         return result             # <<<<<<<<<<<<<<
 * 
 * # differentiate
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_result);
  __pyx_r = __pyx_v_result;
  goto __pyx_L0;

  /* "../../bmi/sympy/DifferentialRing.pyx":1735
 * 
 * # integrate
 *     def integrate (             # <<<<<<<<<<<<<<
 *             self,
 *             equations,
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("DifferentialAlgebra.DifferentialRing.integrate", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XDECREF(__pyx_v_streqns);
  __Pyx_XDECREF(__pyx_v_strvar);
  __Pyx_XDECREF(__pyx_v_mesgerr);
  __Pyx_XDECREF(__pyx_v_strnot);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "../../bmi/sympy/DifferentialRing.pyx":1854
 * 
 * # differentiate
 *     def differentiate (             # <<<<<<<<<<<<<<
 *             self,
 *             equations,
 */

/* Python wrapper */
static PyObject *__pyx_pw_19DifferentialAlgebra_16DifferentialRing_45differentiate(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_19DifferentialAlgebra_16DifferentialRing_44differentiate, "\n        Differentiate a rational differential fraction\n\n        INPUT:\n\n            `equations` -- a rational fraction or a list of \n                             rational fractions \n            `args`      -- a possibly empty sequence of monomials \n                             involving independent variables only\n            `notation`  -- (default: 'undefined') a string\n\n        OUTPUT:\n\n            The list of derivatives of the equations, with respect to\n            the product of the monomials given in `args`. The monomials\n            must depend on independent variables only.\n\n        EXAMPLES:\n\n            >>> from sympy import *\n            >>> from DifferentialAlgebra import *\n            >>> init_printing (use_unicode = False, num_columns = 60)\n\n            >>> t = var ('t')\n            >>> u,v = function ('u,v')\n            >>> R = DifferentialRing (derivations = [t], blocks = [u,v])\n            >>> eq = u(t)**2\n\n        Do not differentiate at all:\n\n            >>> R.differentiate (eq)\n             2   \n            u (t)\n\n        Differentiate twice with respect to t:\n\n            >>> R.differentiate (eq, t, t)\n                    2                      2\n                   d             /d       \\ \n            2*u(t)*---(u(t)) + 2*|--(u(t))| \n                     2           \\dt      / \n                   dt                       \n\n        Another way to differentiate twice with respect to t:\n\n            >>> R.differentiate (eq, t**2) \n                    2                      2\n                   d             /d       \\ \n            2*u(t)*---(u(t)) + 2*|--(u(t))| \n                     2           \\dt      / \n                   dt                       \n        ");
static PyMethodDef __pyx_mdef_19DifferentialAlgebra_16DifferentialRing_45differentiate = {"differentiate", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_19DifferentialAlgebra_16DifferentialRing_45differentiate, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_19DifferentialAlgebra_16DifferentialRing_44differentiate};
static PyObject *__pyx_pw_19DifferentialAlgebra_16DifferentialRing_45differentiate(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_equations = 0;
  PyObject *__pyx_v_notation = 0;
  PyObject *__pyx_v_args = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("differentiate (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  __pyx_v_args = __Pyx_ArgsSlice_FASTCALL(__pyx_args, 1, __pyx_nargs);
  if (unlikely(!__pyx_v_args)) {
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __Pyx_GOTREF(__pyx_v_args);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_equations,&__pyx_n_s_notation,0};
    values[1] = __Pyx_Arg_NewRef_FASTCALL(__pyx_k__25);
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        default:
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_equations)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1854, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (kw_args == 1) {
        const Py_ssize_t index = 1;
        PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, *__pyx_pyargnames[index]);
        if (value) { values[index] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1854, __pyx_L3_error)
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        const Py_ssize_t used_pos_args = (kwd_pos_args < 1) ? kwd_pos_args : 1;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, used_pos_args, "differentiate") < 0)) __PYX_ERR(0, 1854, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs < 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_equations = values[0];
    __pyx_v_notation = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("differentiate", 0, 1, 1, __pyx_nargs); __PYX_ERR(0, 1854, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0;
  __Pyx_AddTraceback("DifferentialAlgebra.DifferentialRing.differentiate", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_19DifferentialAlgebra_16DifferentialRing_44differentiate(((struct __pyx_obj_19DifferentialAlgebra_DifferentialRing *)__pyx_v_self), __pyx_v_equations, __pyx_v_notation, __pyx_v_args);

  /* function exit code */
  __Pyx_DECREF(__pyx_v_args);
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_19DifferentialAlgebra_16DifferentialRing_44differentiate(struct __pyx_obj_19DifferentialAlgebra_DifferentialRing *__pyx_v_self, PyObject *__pyx_v_equations, PyObject *__pyx_v_notation, PyObject *__pyx_v_args) {
  PyObject *__pyx_v_result = 0;
  PyObject *__pyx_v_streqns = 0;
  PyObject *__pyx_v_strders = 0;
  PyObject *__pyx_v_mesgerr = 0;
  ALGEB_string __pyx_v_A;
  PyObject *__pyx_v_strnot = 0;
  PyObject *__pyx_9genexpr12__pyx_v_arg = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  unsigned int __pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  Py_ssize_t __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  char *__pyx_t_9;
  bool __pyx_t_10;
  char *__pyx_t_11;
  char *__pyx_t_12;
  char *__pyx_t_13;
  int __pyx_t_14;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("differentiate", 1);

  /* "../../bmi/sympy/DifferentialRing.pyx":1916
 *         cdef bmi_c.ALGEB_string A
 *         cdef strnot
 *         strnot = self.__process_notation (notation)             # <<<<<<<<<<<<<<
 *         if isinstance (equations, list):
 *             streqns = ascii (equations)
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_DifferentialRing__process_notat); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1916, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_notation};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1916, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_v_strnot = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "../../bmi/sympy/DifferentialRing.pyx":1917
 *         cdef strnot
 *         strnot = self.__process_notation (notation)
 *         if isinstance (equations, list):             # <<<<<<<<<<<<<<
 *             streqns = ascii (equations)
 *         else:
 */
  __pyx_t_5 = PyList_Check(__pyx_v_equations); 
  if (__pyx_t_5) {

    /* "../../bmi/sympy/DifferentialRing.pyx":1918
 *         strnot = self.__process_notation (notation)
 *         if isinstance (equations, list):
 *             streqns = ascii (equations)             # <<<<<<<<<<<<<<
 *         else:
 *             streqns = ascii ([equations])
 */
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ascii); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1918, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = NULL;
    __pyx_t_4 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
        __pyx_t_4 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_equations};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1918, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    if (!(likely(PyBytes_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_1))) __PYX_ERR(0, 1918, __pyx_L1_error)
    __pyx_v_streqns = ((PyObject*)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "../../bmi/sympy/DifferentialRing.pyx":1917
 *         cdef strnot
 *         strnot = self.__process_notation (notation)
 *         if isinstance (equations, list):             # <<<<<<<<<<<<<<
 *             streqns = ascii (equations)
 *         else:
 */
    goto __pyx_L3;
  }

  /* "../../bmi/sympy/DifferentialRing.pyx":1920
 *             streqns = ascii (equations)
 *         else:
 *             streqns = ascii ([equations])             # <<<<<<<<<<<<<<
 *         strders = ascii ([arg for arg in args])
 *         A = bmi_c.bmi_dapyx_differentiate (
 */
  /*else*/ {
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ascii); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1920, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1920, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_v_equations);
    __Pyx_GIVEREF(__pyx_v_equations);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 0, __pyx_v_equations)) __PYX_ERR(0, 1920, __pyx_L1_error);
    __pyx_t_6 = NULL;
    __pyx_t_4 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
        __pyx_t_4 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_3};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1920, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    if (!(likely(PyBytes_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_1))) __PYX_ERR(0, 1920, __pyx_L1_error)
    __pyx_v_streqns = ((PyObject*)__pyx_t_1);
    __pyx_t_1 = 0;
  }
  __pyx_L3:;

  /* "../../bmi/sympy/DifferentialRing.pyx":1921
 *         else:
 *             streqns = ascii ([equations])
 *         strders = ascii ([arg for arg in args])             # <<<<<<<<<<<<<<
 *         A = bmi_c.bmi_dapyx_differentiate (
 *                     self.dring, streqns, int (False), strders,
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ascii); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1921, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  { /* enter inner scope */
    __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1921, __pyx_L6_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_6 = __pyx_v_args; __Pyx_INCREF(__pyx_t_6);
    __pyx_t_7 = 0;
    for (;;) {
      {
        Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_6);
        #if !CYTHON_ASSUME_SAFE_MACROS
        if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1921, __pyx_L6_error)
        #endif
        if (__pyx_t_7 >= __pyx_temp) break;
      }
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      __pyx_t_8 = PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_7); __Pyx_INCREF(__pyx_t_8); __pyx_t_7++; if (unlikely((0 < 0))) __PYX_ERR(0, 1921, __pyx_L6_error)
      #else
      __pyx_t_8 = __Pyx_PySequence_ITEM(__pyx_t_6, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1921, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_8);
      #endif
      __Pyx_XDECREF_SET(__pyx_9genexpr12__pyx_v_arg, __pyx_t_8);
      __pyx_t_8 = 0;
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_3, (PyObject*)__pyx_9genexpr12__pyx_v_arg))) __PYX_ERR(0, 1921, __pyx_L6_error)
    }
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_XDECREF(__pyx_9genexpr12__pyx_v_arg); __pyx_9genexpr12__pyx_v_arg = 0;
    goto __pyx_L10_exit_scope;
    __pyx_L6_error:;
    __Pyx_XDECREF(__pyx_9genexpr12__pyx_v_arg); __pyx_9genexpr12__pyx_v_arg = 0;
    goto __pyx_L1_error;
    __pyx_L10_exit_scope:;
  } /* exit inner scope */
  __pyx_t_6 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1921, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  if (!(likely(PyBytes_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_1))) __PYX_ERR(0, 1921, __pyx_L1_error)
  __pyx_v_strders = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "../../bmi/sympy/DifferentialRing.pyx":1923
 *         strders = ascii ([arg for arg in args])
 *         A = bmi_c.bmi_dapyx_differentiate (
 *                     self.dring, streqns, int (False), strders,             # <<<<<<<<<<<<<<
 *                     self.notation, strnot, 0, 0)
 *         if bmi_c.bmi_dapyx_is_error (A):
 */
  if (unlikely(__pyx_v_streqns == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
    __PYX_ERR(0, 1923, __pyx_L1_error)
  }
  __pyx_t_9 = __Pyx_PyBytes_AsWritableString(__pyx_v_streqns); if (unlikely((!__pyx_t_9) && PyErr_Occurred())) __PYX_ERR(0, 1923, __pyx_L1_error)
  __pyx_t_1 = __Pyx_PyNumber_Int(Py_False); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1923, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_10 = __Pyx_PyInt_As_bool(__pyx_t_1); if (unlikely((__pyx_t_10 == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1923, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(__pyx_v_strders == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
    __PYX_ERR(0, 1923, __pyx_L1_error)
  }
  __pyx_t_11 = __Pyx_PyBytes_AsWritableString(__pyx_v_strders); if (unlikely((!__pyx_t_11) && PyErr_Occurred())) __PYX_ERR(0, 1923, __pyx_L1_error)

  /* "../../bmi/sympy/DifferentialRing.pyx":1924
 *         A = bmi_c.bmi_dapyx_differentiate (
 *                     self.dring, streqns, int (False), strders,
 *                     self.notation, strnot, 0, 0)             # <<<<<<<<<<<<<<
 *         if bmi_c.bmi_dapyx_is_error (A):
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (A)
 */
  if (unlikely(__pyx_v_self->notation == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
    __PYX_ERR(0, 1924, __pyx_L1_error)
  }
  __pyx_t_12 = __Pyx_PyBytes_AsWritableString(__pyx_v_self->notation); if (unlikely((!__pyx_t_12) && PyErr_Occurred())) __PYX_ERR(0, 1924, __pyx_L1_error)
  __pyx_t_13 = __Pyx_PyObject_AsWritableString(__pyx_v_strnot); if (unlikely((!__pyx_t_13) && PyErr_Occurred())) __PYX_ERR(0, 1924, __pyx_L1_error)

  /* "../../bmi/sympy/DifferentialRing.pyx":1922
 *             streqns = ascii ([equations])
 *         strders = ascii ([arg for arg in args])
 *         A = bmi_c.bmi_dapyx_differentiate (             # <<<<<<<<<<<<<<
 *                     self.dring, streqns, int (False), strders,
 *                     self.notation, strnot, 0, 0)
 */
  __pyx_v_A = bmi_dapyx_differentiate(__pyx_v_self->dring, __pyx_t_9, __pyx_t_10, __pyx_t_11, __pyx_t_12, __pyx_t_13, 0, 0);

  /* "../../bmi/sympy/DifferentialRing.pyx":1925
 *                     self.dring, streqns, int (False), strders,
 *                     self.notation, strnot, 0, 0)
 *         if bmi_c.bmi_dapyx_is_error (A):             # <<<<<<<<<<<<<<
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (A)
 *             bmi_c.bmi_balsa_clear_ALGEB (A)
 */
  __pyx_t_5 = (bmi_dapyx_is_error(__pyx_v_A) != 0);
  if (unlikely(__pyx_t_5)) {

    /* "../../bmi/sympy/DifferentialRing.pyx":1926
 *                     self.notation, strnot, 0, 0)
 *         if bmi_c.bmi_dapyx_is_error (A):
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (A)             # <<<<<<<<<<<<<<
 *             bmi_c.bmi_balsa_clear_ALGEB (A)
 *             raise RuntimeError (str (mesgerr, 'utf-8'))
 */
    __pyx_t_1 = __Pyx_PyBytes_FromString(bmi_dapyx_mesgerr(__pyx_v_A)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1926, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_v_mesgerr = ((PyObject*)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "../../bmi/sympy/DifferentialRing.pyx":1927
 *         if bmi_c.bmi_dapyx_is_error (A):
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (A)
 *             bmi_c.bmi_balsa_clear_ALGEB (A)             # <<<<<<<<<<<<<<
 *             raise RuntimeError (str (mesgerr, 'utf-8'))
 *         result = eval (A.value, globals (), self.evdict)
 */
    bmi_balsa_clear_ALGEB(__pyx_v_A);

    /* "../../bmi/sympy/DifferentialRing.pyx":1928
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (A)
 *             bmi_c.bmi_balsa_clear_ALGEB (A)
 *             raise RuntimeError (str (mesgerr, 'utf-8'))             # <<<<<<<<<<<<<<
 *         result = eval (A.value, globals (), self.evdict)
 *         if not isinstance (equations, list):
 */
    __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1928, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_v_mesgerr);
    __Pyx_GIVEREF(__pyx_v_mesgerr);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_mesgerr)) __PYX_ERR(0, 1928, __pyx_L1_error);
    __Pyx_INCREF(__pyx_kp_u_utf_8);
    __Pyx_GIVEREF(__pyx_kp_u_utf_8);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_kp_u_utf_8)) __PYX_ERR(0, 1928, __pyx_L1_error);
    __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)(&PyUnicode_Type)), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1928, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_RuntimeError, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1928, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(0, 1928, __pyx_L1_error)

    /* "../../bmi/sympy/DifferentialRing.pyx":1925
 *                     self.dring, streqns, int (False), strders,
 *                     self.notation, strnot, 0, 0)
 *         if bmi_c.bmi_dapyx_is_error (A):             # <<<<<<<<<<<<<<
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (A)
 *             bmi_c.bmi_balsa_clear_ALGEB (A)
 */
  }

  /* "../../bmi/sympy/DifferentialRing.pyx":1929
 *             bmi_c.bmi_balsa_clear_ALGEB (A)
 *             raise RuntimeError (str (mesgerr, 'utf-8'))
 *         result = eval (A.value, globals (), self.evdict)             # <<<<<<<<<<<<<<
 *         if not isinstance (equations, list):
 *             result = result [0]
 */
  __pyx_t_1 = __Pyx_PyBytes_FromString(__pyx_v_A->value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1929, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_Globals(); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1929, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1929, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_1);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1)) __PYX_ERR(0, 1929, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_2);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2)) __PYX_ERR(0, 1929, __pyx_L1_error);
  __Pyx_INCREF(__pyx_v_self->evdict);
  __Pyx_GIVEREF(__pyx_v_self->evdict);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_self->evdict)) __PYX_ERR(0, 1929, __pyx_L1_error);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_eval, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1929, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_result = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "../../bmi/sympy/DifferentialRing.pyx":1930
 *             raise RuntimeError (str (mesgerr, 'utf-8'))
 *         result = eval (A.value, globals (), self.evdict)
 *         if not isinstance (equations, list):             # <<<<<<<<<<<<<<
 *             result = result [0]
 *         bmi_c.bmi_balsa_clear_ALGEB (A)
 */
  __pyx_t_5 = PyList_Check(__pyx_v_equations); 
  __pyx_t_14 = (!__pyx_t_5);
  if (__pyx_t_14) {

    /* "../../bmi/sympy/DifferentialRing.pyx":1931
 *         result = eval (A.value, globals (), self.evdict)
 *         if not isinstance (equations, list):
 *             result = result [0]             # <<<<<<<<<<<<<<
 *         bmi_c.bmi_balsa_clear_ALGEB (A)
 *         return result
 */
    __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_result, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1931, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF_SET(__pyx_v_result, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "../../bmi/sympy/DifferentialRing.pyx":1930
 *             raise RuntimeError (str (mesgerr, 'utf-8'))
 *         result = eval (A.value, globals (), self.evdict)
 *         if not isinstance (equations, list):             # <<<<<<<<<<<<<<
 *             result = result [0]
 *         bmi_c.bmi_balsa_clear_ALGEB (A)
 */
  }

  /* "../../bmi/sympy/DifferentialRing.pyx":1932
 *         if not isinstance (equations, list):
 *             result = result [0]
 *         bmi_c.bmi_balsa_clear_ALGEB (A)             # <<<<<<<<<<<<<<
 *         return result
 * 
 */
  bmi_balsa_clear_ALGEB(__pyx_v_A);

  /* "../../bmi/sympy/DifferentialRing.pyx":1933
 *             result = result [0]
 *         bmi_c.bmi_balsa_clear_ALGEB (A)
 *         return result             # <<<<<<<<<<<<<<
 * 
 * # differential_prem
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_result);
  __pyx_r = __pyx_v_result;
  goto __pyx_L0;

  /* "../../bmi/sympy/DifferentialRing.pyx":1854
 * 
 * # differentiate
 *     def differentiate (             # <<<<<<<<<<<<<<
 *             self,
 *             equations,
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("DifferentialAlgebra.DifferentialRing.differentiate", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XDECREF(__pyx_v_streqns);
  __Pyx_XDECREF(__pyx_v_strders);
  __Pyx_XDECREF(__pyx_v_mesgerr);
  __Pyx_XDECREF(__pyx_v_strnot);
  __Pyx_XDECREF(__pyx_9genexpr12__pyx_v_arg);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "../../bmi/sympy/DifferentialRing.pyx":1936
 * 
 * # differential_prem
 *     def differential_prem (             # <<<<<<<<<<<<<<
 *              self,
 *              polynomial,
 */

/* Python wrapper */
static PyObject *__pyx_pw_19DifferentialAlgebra_16DifferentialRing_47differential_prem(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_19DifferentialAlgebra_16DifferentialRing_46differential_prem, "\n        Ritt's reduction algorithm by a set of polynomials\n\n        INPUT:\n\n            `polynomial` -- a polynomial\n            `redset`     -- a list of polynomials with integer \n                              coefficients\n            `mode`       -- (default: 'full') a string\n            `notation`   -- (default: 'undefined') a string\n\n        OUTPUT:\n\n            A pair (h, r) such that h*p = r modulo the differential\n            ideal generated by `redset` (denoting p for `polynomial`).\n\n            The optional argument `mode` = 'full', 'partial' or\n            'algebraic'.  If 'full', the remainder r is fully reduced\n            with respect to `redset`.\n\n            If 'partial', the remainder r is partially reduced with\n            respect to `redset`. If 'algebraic', the remainder is\n            algebraically reduced with respect to `redset`.\n\n            In all cases, h is a product of powers of the initials\n            and separants involved in the reduction process.\n\n        NOTES:\n\n            So far, there is a single notation available, because of\n            limitations of function.\n\n        EXAMPLES:\n\n            >>> from sympy import *\n            >>> from DifferentialAlgebra import *\n            >>> init_printing (use_unicode=False, num_columns=60)\n\n        The examples are processed using the jet notation for\n        legibility:\n\n            >>> x,y = var ('x,y')\n            >>> u,v = indexedbase ('u,v')\n\n            >>> R = DifferentialRing (derivations = [x,y], \n            ...             blocks = [[v,u]], notation = 'jet')\n\n        Note that the parsers accept all notations:\n\n            >>> eq1 = u[x]**2 - 4*u\n            >>> eq2 = u[x,y]*v[y] - u + 1\n            >>> eq3 = v[x,x] - u[x]\n            >>> redset = [eq1, eq2, eq3]\n\n        The reduction set:\n\n            >>> R.equations (redset, solved = True)\n                 2                  u - 1                 \n            [u[x]  ""= 4*u, u[x, y] = -----, v[x, x] = u[x]]\n                                    v[y]                  \n\n        The first polynomial is fully reduced with respect to redset:\n\n            >>> poly = (1/Integer(7))*u\n            >>> h, r = R.differential_prem (poly, redset)\n            >>> h, r\n                u \n            (1, -)\n                7 \n\n        Check that h * poly = r modulo the ideal defined by redset:\n\n            >>> ideal = R.RosenfeldGroebner (redset)\n            >>> C = ideal [0]\n            >>> C.normal_form (h * poly - r)\n            0\n\n        The next polynomial is not fully reduced with respect to redset:\n\n            >>> poly = (1/Integer(7))*v[x,y] + u[x,x]\n            >>> h, r = R.differential_prem (poly, redset)\n            >>> h, r\n                     2*(v[x, y] + 14)*u[x] \n            (2*u[x], ---------------------)\n                               7           \n\n        It is not partially reduced either:\n\n            >>> h, r = R.differential_prem (poly, redset, \n            ...                             mode = 'partial')\n            >>> h, r\n                     2*(v[x, y] + 14)*u[x] \n            (2*u[x], ---------------------)\n                               7           \n\n        However, it is algebraically reduced with respect to redset:\n\n            >>> h, r = R.differential_prem (poly, redset, \n            ...                             mode = 'algebraic')\n            >>> h, r\n                          v[x, y] \n            (1, u[x, x] + -------)\n                             7    \n        ");
static PyMethodDef __pyx_mdef_19DifferentialAlgebra_16DifferentialRing_47differential_prem = {"differential_prem", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_19DifferentialAlgebra_16DifferentialRing_47differential_prem, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_19DifferentialAlgebra_16DifferentialRing_46differential_prem};
static PyObject *__pyx_pw_19DifferentialAlgebra_16DifferentialRing_47differential_prem(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_polynomial = 0;
  PyObject *__pyx_v_redset = 0;
  PyObject *__pyx_v_mode = 0;
  PyObject *__pyx_v_notation = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[4] = {0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("differential_prem (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_polynomial,&__pyx_n_s_redset,&__pyx_n_s_mode,&__pyx_n_s_notation,0};
    values[2] = __Pyx_Arg_NewRef_FASTCALL(__pyx_k__26);
    values[3] = __Pyx_Arg_NewRef_FASTCALL(__pyx_k__27);
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_polynomial)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1936, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_redset)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1936, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("differential_prem", 0, 2, 4, 1); __PYX_ERR(0, 1936, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_mode);
          if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1936, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_notation);
          if (value) { values[3] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1936, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "differential_prem") < 0)) __PYX_ERR(0, 1936, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_polynomial = values[0];
    __pyx_v_redset = ((PyObject*)values[1]);
    __pyx_v_mode = values[2];
    __pyx_v_notation = values[3];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("differential_prem", 0, 2, 4, __pyx_nargs); __PYX_ERR(0, 1936, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("DifferentialAlgebra.DifferentialRing.differential_prem", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_redset), (&PyList_Type), 1, "redset", 1))) __PYX_ERR(0, 1939, __pyx_L1_error)
  __pyx_r = __pyx_pf_19DifferentialAlgebra_16DifferentialRing_46differential_prem(((struct __pyx_obj_19DifferentialAlgebra_DifferentialRing *)__pyx_v_self), __pyx_v_polynomial, __pyx_v_redset, __pyx_v_mode, __pyx_v_notation);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_19DifferentialAlgebra_16DifferentialRing_46differential_prem(struct __pyx_obj_19DifferentialAlgebra_DifferentialRing *__pyx_v_self, PyObject *__pyx_v_polynomial, PyObject *__pyx_v_redset, PyObject *__pyx_v_mode, PyObject *__pyx_v_notation) {
  PyObject *__pyx_v_result = 0;
  PyObject *__pyx_v_streqns = 0;
  PyObject *__pyx_v_strredset = 0;
  PyObject *__pyx_v_mesgerr = 0;
  PyObject *__pyx_v_strmode = 0;
  ALGEB_string __pyx_v_L;
  PyObject *__pyx_v_strnot = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  unsigned int __pyx_t_4;
  char *__pyx_t_5;
  char *__pyx_t_6;
  char *__pyx_t_7;
  char *__pyx_t_8;
  char *__pyx_t_9;
  int __pyx_t_10;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("differential_prem", 1);

  /* "../../bmi/sympy/DifferentialRing.pyx":2051
 *         cdef bmi_c.ALGEB_string L
 *         cdef strnot
 *         strnot = self.__process_notation (notation)             # <<<<<<<<<<<<<<
 *         streqns = ascii (polynomial)
 *         strredset = ascii (redset)
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_DifferentialRing__process_notat); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2051, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_notation};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2051, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_v_strnot = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "../../bmi/sympy/DifferentialRing.pyx":2052
 *         cdef strnot
 *         strnot = self.__process_notation (notation)
 *         streqns = ascii (polynomial)             # <<<<<<<<<<<<<<
 *         strredset = ascii (redset)
 *         strmode = ascii (mode)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ascii); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2052, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_polynomial};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2052, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  if (!(likely(PyBytes_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_1))) __PYX_ERR(0, 2052, __pyx_L1_error)
  __pyx_v_streqns = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "../../bmi/sympy/DifferentialRing.pyx":2053
 *         strnot = self.__process_notation (notation)
 *         streqns = ascii (polynomial)
 *         strredset = ascii (redset)             # <<<<<<<<<<<<<<
 *         strmode = ascii (mode)
 *         L = bmi_c.bmi_dapyx_differential_prem2 (
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ascii); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2053, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_redset};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2053, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  if (!(likely(PyBytes_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_1))) __PYX_ERR(0, 2053, __pyx_L1_error)
  __pyx_v_strredset = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "../../bmi/sympy/DifferentialRing.pyx":2054
 *         streqns = ascii (polynomial)
 *         strredset = ascii (redset)
 *         strmode = ascii (mode)             # <<<<<<<<<<<<<<
 *         L = bmi_c.bmi_dapyx_differential_prem2 (
 *             streqns, strredset, strmode, self.dring,
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ascii); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2054, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_mode};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2054, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  if (!(likely(PyBytes_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_1))) __PYX_ERR(0, 2054, __pyx_L1_error)
  __pyx_v_strmode = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "../../bmi/sympy/DifferentialRing.pyx":2056
 *         strmode = ascii (mode)
 *         L = bmi_c.bmi_dapyx_differential_prem2 (
 *             streqns, strredset, strmode, self.dring,             # <<<<<<<<<<<<<<
 *             self.notation, strnot, 0, 0)
 *         if bmi_c.bmi_dapyx_is_error (L):
 */
  if (unlikely(__pyx_v_streqns == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
    __PYX_ERR(0, 2056, __pyx_L1_error)
  }
  __pyx_t_5 = __Pyx_PyBytes_AsWritableString(__pyx_v_streqns); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) __PYX_ERR(0, 2056, __pyx_L1_error)
  if (unlikely(__pyx_v_strredset == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
    __PYX_ERR(0, 2056, __pyx_L1_error)
  }
  __pyx_t_6 = __Pyx_PyBytes_AsWritableString(__pyx_v_strredset); if (unlikely((!__pyx_t_6) && PyErr_Occurred())) __PYX_ERR(0, 2056, __pyx_L1_error)
  if (unlikely(__pyx_v_strmode == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
    __PYX_ERR(0, 2056, __pyx_L1_error)
  }
  __pyx_t_7 = __Pyx_PyBytes_AsWritableString(__pyx_v_strmode); if (unlikely((!__pyx_t_7) && PyErr_Occurred())) __PYX_ERR(0, 2056, __pyx_L1_error)

  /* "../../bmi/sympy/DifferentialRing.pyx":2057
 *         L = bmi_c.bmi_dapyx_differential_prem2 (
 *             streqns, strredset, strmode, self.dring,
 *             self.notation, strnot, 0, 0)             # <<<<<<<<<<<<<<
 *         if bmi_c.bmi_dapyx_is_error (L):
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (L)
 */
  if (unlikely(__pyx_v_self->notation == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
    __PYX_ERR(0, 2057, __pyx_L1_error)
  }
  __pyx_t_8 = __Pyx_PyBytes_AsWritableString(__pyx_v_self->notation); if (unlikely((!__pyx_t_8) && PyErr_Occurred())) __PYX_ERR(0, 2057, __pyx_L1_error)
  __pyx_t_9 = __Pyx_PyObject_AsWritableString(__pyx_v_strnot); if (unlikely((!__pyx_t_9) && PyErr_Occurred())) __PYX_ERR(0, 2057, __pyx_L1_error)

  /* "../../bmi/sympy/DifferentialRing.pyx":2055
 *         strredset = ascii (redset)
 *         strmode = ascii (mode)
 *         L = bmi_c.bmi_dapyx_differential_prem2 (             # <<<<<<<<<<<<<<
 *             streqns, strredset, strmode, self.dring,
 *             self.notation, strnot, 0, 0)
 */
  __pyx_v_L = bmi_dapyx_differential_prem2(__pyx_t_5, __pyx_t_6, __pyx_t_7, __pyx_v_self->dring, __pyx_t_8, __pyx_t_9, 0, 0);

  /* "../../bmi/sympy/DifferentialRing.pyx":2058
 *             streqns, strredset, strmode, self.dring,
 *             self.notation, strnot, 0, 0)
 *         if bmi_c.bmi_dapyx_is_error (L):             # <<<<<<<<<<<<<<
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (L)
 *             bmi_c.bmi_balsa_clear_ALGEB (L)
 */
  __pyx_t_10 = (bmi_dapyx_is_error(__pyx_v_L) != 0);
  if (unlikely(__pyx_t_10)) {

    /* "../../bmi/sympy/DifferentialRing.pyx":2059
 *             self.notation, strnot, 0, 0)
 *         if bmi_c.bmi_dapyx_is_error (L):
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (L)             # <<<<<<<<<<<<<<
 *             bmi_c.bmi_balsa_clear_ALGEB (L)
 *             raise RuntimeError (str (mesgerr, 'utf-8'))
 */
    __pyx_t_1 = __Pyx_PyBytes_FromString(bmi_dapyx_mesgerr(__pyx_v_L)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2059, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_v_mesgerr = ((PyObject*)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "../../bmi/sympy/DifferentialRing.pyx":2060
 *         if bmi_c.bmi_dapyx_is_error (L):
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (L)
 *             bmi_c.bmi_balsa_clear_ALGEB (L)             # <<<<<<<<<<<<<<
 *             raise RuntimeError (str (mesgerr, 'utf-8'))
 *         result = eval (L.value, globals (), self.evdict)
 */
    bmi_balsa_clear_ALGEB(__pyx_v_L);

    /* "../../bmi/sympy/DifferentialRing.pyx":2061
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (L)
 *             bmi_c.bmi_balsa_clear_ALGEB (L)
 *             raise RuntimeError (str (mesgerr, 'utf-8'))             # <<<<<<<<<<<<<<
 *         result = eval (L.value, globals (), self.evdict)
 *         bmi_c.bmi_balsa_clear_ALGEB (L)
 */
    __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2061, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_v_mesgerr);
    __Pyx_GIVEREF(__pyx_v_mesgerr);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_mesgerr)) __PYX_ERR(0, 2061, __pyx_L1_error);
    __Pyx_INCREF(__pyx_kp_u_utf_8);
    __Pyx_GIVEREF(__pyx_kp_u_utf_8);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_kp_u_utf_8)) __PYX_ERR(0, 2061, __pyx_L1_error);
    __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)(&PyUnicode_Type)), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2061, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_RuntimeError, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2061, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(0, 2061, __pyx_L1_error)

    /* "../../bmi/sympy/DifferentialRing.pyx":2058
 *             streqns, strredset, strmode, self.dring,
 *             self.notation, strnot, 0, 0)
 *         if bmi_c.bmi_dapyx_is_error (L):             # <<<<<<<<<<<<<<
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (L)
 *             bmi_c.bmi_balsa_clear_ALGEB (L)
 */
  }

  /* "../../bmi/sympy/DifferentialRing.pyx":2062
 *             bmi_c.bmi_balsa_clear_ALGEB (L)
 *             raise RuntimeError (str (mesgerr, 'utf-8'))
 *         result = eval (L.value, globals (), self.evdict)             # <<<<<<<<<<<<<<
 *         bmi_c.bmi_balsa_clear_ALGEB (L)
 *         return result
 */
  __pyx_t_1 = __Pyx_PyBytes_FromString(__pyx_v_L->value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2062, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_Globals(); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2062, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2062, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_1);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1)) __PYX_ERR(0, 2062, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_2);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2)) __PYX_ERR(0, 2062, __pyx_L1_error);
  __Pyx_INCREF(__pyx_v_self->evdict);
  __Pyx_GIVEREF(__pyx_v_self->evdict);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_self->evdict)) __PYX_ERR(0, 2062, __pyx_L1_error);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_eval, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2062, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_result = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "../../bmi/sympy/DifferentialRing.pyx":2063
 *             raise RuntimeError (str (mesgerr, 'utf-8'))
 *         result = eval (L.value, globals (), self.evdict)
 *         bmi_c.bmi_balsa_clear_ALGEB (L)             # <<<<<<<<<<<<<<
 *         return result
 * 
 */
  bmi_balsa_clear_ALGEB(__pyx_v_L);

  /* "../../bmi/sympy/DifferentialRing.pyx":2064
 *         result = eval (L.value, globals (), self.evdict)
 *         bmi_c.bmi_balsa_clear_ALGEB (L)
 *         return result             # <<<<<<<<<<<<<<
 * 
 * # normal_form
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_result);
  __pyx_r = __pyx_v_result;
  goto __pyx_L0;

  /* "../../bmi/sympy/DifferentialRing.pyx":1936
 * 
 * # differential_prem
 *     def differential_prem (             # <<<<<<<<<<<<<<
 *              self,
 *              polynomial,
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("DifferentialAlgebra.DifferentialRing.differential_prem", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XDECREF(__pyx_v_streqns);
  __Pyx_XDECREF(__pyx_v_strredset);
  __Pyx_XDECREF(__pyx_v_mesgerr);
  __Pyx_XDECREF(__pyx_v_strmode);
  __Pyx_XDECREF(__pyx_v_strnot);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "../../bmi/sympy/DifferentialRing.pyx":2067
 * 
 * # normal_form
 *     def normal_form (             # <<<<<<<<<<<<<<
 *             self,
 *             equations,
 */

/* Python wrapper */
static PyObject *__pyx_pw_19DifferentialAlgebra_16DifferentialRing_49normal_form(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_19DifferentialAlgebra_16DifferentialRing_48normal_form, "\n        The normal form of a rational differential fraction\n\n        INPUT:\n\n            `equations` -- a rational fraction or a list of rational \n                             fractions \n            `notation`  -- (default: 'undefined') a string\n\n        OUTPUT:\n\n            The list of normal forms of the equations.\n\n        NOTES:\n\n            Mathematically, this function does not do anything. Were\n            there more than one notation, it could perform changes of\n            notations.  At least, it is useful to recognize rational\n            fractions of differential polynomials equal to 0.\n\n        EXAMPLES:\n\n            >>> from sympy import *\n            >>> from DifferentialAlgebra import *\n            >>> init_printing (use_unicode = False, num_columns = 60)\n\n            >>> t = var ('t')\n            >>> u,v = function ('u,v')\n            >>> R = DifferentialRing (derivations = [t], blocks = [u,v])\n\n        A complicated rational fraction of differential polynomials:\n\n            >>> eq = Derivative(u(t)/(3*u(t)+Derivative(v(t),t)), t)\n            >>> L = R.integrate (eq.doit(), t)\n\n        This should be zero:\n\n            >>> zero = (eq - Derivative(L[1], t)).doit()\n            >>> zero                      \n                  2               /                  2       \\         >\n                 d                |    d            d        | d       >\n                 ---(v(t))        |- 9*--(u(t)) - 3*---(v(t))|*--(v(t) >\n                   2              |    dt             2      | dt      >\n                 dt               \\                 dt       /         >\n            ------------------- + ------------------------------------ >\n                       d                                      2        >\n            9*u(t) + 3*--(v(t))          /           d       \\         >\n                       dt                |9*u(t) + 3*--(v(t))|         >\n                                         \\     ""      dt      /         >\n            |  \n            >                         /                2       \\     \n            >                         |    d          d        |     \n            > )       d               |- 3*--(u(t)) - ---(v(t))|*u(t)\n            >         --(u(t))        |    dt           2      |     \n            >         dt              \\               dt       /     \n            > - + ----------------- + -------------------------------\n            >              d                                  2      \n            >     3*u(t) + --(v(t))        /         d       \\       \n            >              dt              |3*u(t) + --(v(t))|       \n            >                              \\         dt      /       \n\n            >>> R.normal_form (zero)      \n            0\n        ");
static PyMethodDef __pyx_mdef_19DifferentialAlgebra_16DifferentialRing_49normal_form = {"normal_form", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_19DifferentialAlgebra_16DifferentialRing_49normal_form, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_19DifferentialAlgebra_16DifferentialRing_48normal_form};
static PyObject *__pyx_pw_19DifferentialAlgebra_16DifferentialRing_49normal_form(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_equations = 0;
  PyObject *__pyx_v_notation = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("normal_form (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_equations,&__pyx_n_s_notation,0};
    values[1] = __Pyx_Arg_NewRef_FASTCALL(__pyx_k__28);
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_equations)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2067, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_notation);
          if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2067, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "normal_form") < 0)) __PYX_ERR(0, 2067, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_equations = values[0];
    __pyx_v_notation = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("normal_form", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 2067, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("DifferentialAlgebra.DifferentialRing.normal_form", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_19DifferentialAlgebra_16DifferentialRing_48normal_form(((struct __pyx_obj_19DifferentialAlgebra_DifferentialRing *)__pyx_v_self), __pyx_v_equations, __pyx_v_notation);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_19DifferentialAlgebra_16DifferentialRing_48normal_form(struct __pyx_obj_19DifferentialAlgebra_DifferentialRing *__pyx_v_self, PyObject *__pyx_v_equations, PyObject *__pyx_v_notation) {
  PyObject *__pyx_v_result = 0;
  PyObject *__pyx_v_streqns = 0;
  PyObject *__pyx_v_strders = 0;
  PyObject *__pyx_v_mesgerr = 0;
  ALGEB_string __pyx_v_A;
  PyObject *__pyx_v_strnot = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  unsigned int __pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  char *__pyx_t_7;
  bool __pyx_t_8;
  char *__pyx_t_9;
  char *__pyx_t_10;
  char *__pyx_t_11;
  int __pyx_t_12;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("normal_form", 1);

  /* "../../bmi/sympy/DifferentialRing.pyx":2141
 *         cdef bmi_c.ALGEB_string A
 *         cdef strnot
 *         strnot = self.__process_notation (notation)             # <<<<<<<<<<<<<<
 *         if isinstance (equations, list):
 *             streqns = ascii (equations)
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_DifferentialRing__process_notat); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2141, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_notation};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2141, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_v_strnot = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "../../bmi/sympy/DifferentialRing.pyx":2142
 *         cdef strnot
 *         strnot = self.__process_notation (notation)
 *         if isinstance (equations, list):             # <<<<<<<<<<<<<<
 *             streqns = ascii (equations)
 *         else:
 */
  __pyx_t_5 = PyList_Check(__pyx_v_equations); 
  if (__pyx_t_5) {

    /* "../../bmi/sympy/DifferentialRing.pyx":2143
 *         strnot = self.__process_notation (notation)
 *         if isinstance (equations, list):
 *             streqns = ascii (equations)             # <<<<<<<<<<<<<<
 *         else:
 *             streqns = ascii ([equations])
 */
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ascii); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2143, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = NULL;
    __pyx_t_4 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
        __pyx_t_4 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_equations};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2143, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    if (!(likely(PyBytes_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_1))) __PYX_ERR(0, 2143, __pyx_L1_error)
    __pyx_v_streqns = ((PyObject*)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "../../bmi/sympy/DifferentialRing.pyx":2142
 *         cdef strnot
 *         strnot = self.__process_notation (notation)
 *         if isinstance (equations, list):             # <<<<<<<<<<<<<<
 *             streqns = ascii (equations)
 *         else:
 */
    goto __pyx_L3;
  }

  /* "../../bmi/sympy/DifferentialRing.pyx":2145
 *             streqns = ascii (equations)
 *         else:
 *             streqns = ascii ([equations])             # <<<<<<<<<<<<<<
 *         strders = b"[1]"
 *         A = bmi_c.bmi_dapyx_differentiate (
 */
  /*else*/ {
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ascii); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2145, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2145, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_v_equations);
    __Pyx_GIVEREF(__pyx_v_equations);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 0, __pyx_v_equations)) __PYX_ERR(0, 2145, __pyx_L1_error);
    __pyx_t_6 = NULL;
    __pyx_t_4 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
        __pyx_t_4 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_3};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2145, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    if (!(likely(PyBytes_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_1))) __PYX_ERR(0, 2145, __pyx_L1_error)
    __pyx_v_streqns = ((PyObject*)__pyx_t_1);
    __pyx_t_1 = 0;
  }
  __pyx_L3:;

  /* "../../bmi/sympy/DifferentialRing.pyx":2146
 *         else:
 *             streqns = ascii ([equations])
 *         strders = b"[1]"             # <<<<<<<<<<<<<<
 *         A = bmi_c.bmi_dapyx_differentiate (
 *                     self.dring, streqns, int (False), strders,
 */
  __Pyx_INCREF(__pyx_kp_b_1);
  __pyx_v_strders = __pyx_kp_b_1;

  /* "../../bmi/sympy/DifferentialRing.pyx":2148
 *         strders = b"[1]"
 *         A = bmi_c.bmi_dapyx_differentiate (
 *                     self.dring, streqns, int (False), strders,             # <<<<<<<<<<<<<<
 *                     self.notation, strnot, 0, 0)
 *         if bmi_c.bmi_dapyx_is_error (A):
 */
  if (unlikely(__pyx_v_streqns == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
    __PYX_ERR(0, 2148, __pyx_L1_error)
  }
  __pyx_t_7 = __Pyx_PyBytes_AsWritableString(__pyx_v_streqns); if (unlikely((!__pyx_t_7) && PyErr_Occurred())) __PYX_ERR(0, 2148, __pyx_L1_error)
  __pyx_t_1 = __Pyx_PyNumber_Int(Py_False); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2148, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_8 = __Pyx_PyInt_As_bool(__pyx_t_1); if (unlikely((__pyx_t_8 == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2148, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_9 = __Pyx_PyBytes_AsWritableString(__pyx_v_strders); if (unlikely((!__pyx_t_9) && PyErr_Occurred())) __PYX_ERR(0, 2148, __pyx_L1_error)

  /* "../../bmi/sympy/DifferentialRing.pyx":2149
 *         A = bmi_c.bmi_dapyx_differentiate (
 *                     self.dring, streqns, int (False), strders,
 *                     self.notation, strnot, 0, 0)             # <<<<<<<<<<<<<<
 *         if bmi_c.bmi_dapyx_is_error (A):
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (A)
 */
  if (unlikely(__pyx_v_self->notation == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
    __PYX_ERR(0, 2149, __pyx_L1_error)
  }
  __pyx_t_10 = __Pyx_PyBytes_AsWritableString(__pyx_v_self->notation); if (unlikely((!__pyx_t_10) && PyErr_Occurred())) __PYX_ERR(0, 2149, __pyx_L1_error)
  __pyx_t_11 = __Pyx_PyObject_AsWritableString(__pyx_v_strnot); if (unlikely((!__pyx_t_11) && PyErr_Occurred())) __PYX_ERR(0, 2149, __pyx_L1_error)

  /* "../../bmi/sympy/DifferentialRing.pyx":2147
 *             streqns = ascii ([equations])
 *         strders = b"[1]"
 *         A = bmi_c.bmi_dapyx_differentiate (             # <<<<<<<<<<<<<<
 *                     self.dring, streqns, int (False), strders,
 *                     self.notation, strnot, 0, 0)
 */
  __pyx_v_A = bmi_dapyx_differentiate(__pyx_v_self->dring, __pyx_t_7, __pyx_t_8, __pyx_t_9, __pyx_t_10, __pyx_t_11, 0, 0);

  /* "../../bmi/sympy/DifferentialRing.pyx":2150
 *                     self.dring, streqns, int (False), strders,
 *                     self.notation, strnot, 0, 0)
 *         if bmi_c.bmi_dapyx_is_error (A):             # <<<<<<<<<<<<<<
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (A)
 *             bmi_c.bmi_balsa_clear_ALGEB (A)
 */
  __pyx_t_5 = (bmi_dapyx_is_error(__pyx_v_A) != 0);
  if (unlikely(__pyx_t_5)) {

    /* "../../bmi/sympy/DifferentialRing.pyx":2151
 *                     self.notation, strnot, 0, 0)
 *         if bmi_c.bmi_dapyx_is_error (A):
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (A)             # <<<<<<<<<<<<<<
 *             bmi_c.bmi_balsa_clear_ALGEB (A)
 *             raise RuntimeError (str (mesgerr, 'utf-8'))
 */
    __pyx_t_1 = __Pyx_PyBytes_FromString(bmi_dapyx_mesgerr(__pyx_v_A)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2151, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_v_mesgerr = ((PyObject*)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "../../bmi/sympy/DifferentialRing.pyx":2152
 *         if bmi_c.bmi_dapyx_is_error (A):
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (A)
 *             bmi_c.bmi_balsa_clear_ALGEB (A)             # <<<<<<<<<<<<<<
 *             raise RuntimeError (str (mesgerr, 'utf-8'))
 *         result = eval (A.value, globals (), self.evdict)
 */
    bmi_balsa_clear_ALGEB(__pyx_v_A);

    /* "../../bmi/sympy/DifferentialRing.pyx":2153
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (A)
 *             bmi_c.bmi_balsa_clear_ALGEB (A)
 *             raise RuntimeError (str (mesgerr, 'utf-8'))             # <<<<<<<<<<<<<<
 *         result = eval (A.value, globals (), self.evdict)
 *         if not isinstance (equations, list):
 */
    __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2153, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_v_mesgerr);
    __Pyx_GIVEREF(__pyx_v_mesgerr);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_mesgerr)) __PYX_ERR(0, 2153, __pyx_L1_error);
    __Pyx_INCREF(__pyx_kp_u_utf_8);
    __Pyx_GIVEREF(__pyx_kp_u_utf_8);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_kp_u_utf_8)) __PYX_ERR(0, 2153, __pyx_L1_error);
    __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)(&PyUnicode_Type)), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2153, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_RuntimeError, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2153, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(0, 2153, __pyx_L1_error)

    /* "../../bmi/sympy/DifferentialRing.pyx":2150
 *                     self.dring, streqns, int (False), strders,
 *                     self.notation, strnot, 0, 0)
 *         if bmi_c.bmi_dapyx_is_error (A):             # <<<<<<<<<<<<<<
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (A)
 *             bmi_c.bmi_balsa_clear_ALGEB (A)
 */
  }

  /* "../../bmi/sympy/DifferentialRing.pyx":2154
 *             bmi_c.bmi_balsa_clear_ALGEB (A)
 *             raise RuntimeError (str (mesgerr, 'utf-8'))
 *         result = eval (A.value, globals (), self.evdict)             # <<<<<<<<<<<<<<
 *         if not isinstance (equations, list):
 *             result = result [0]
 */
  __pyx_t_1 = __Pyx_PyBytes_FromString(__pyx_v_A->value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2154, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_Globals(); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2154, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2154, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_1);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1)) __PYX_ERR(0, 2154, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_2);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2)) __PYX_ERR(0, 2154, __pyx_L1_error);
  __Pyx_INCREF(__pyx_v_self->evdict);
  __Pyx_GIVEREF(__pyx_v_self->evdict);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_self->evdict)) __PYX_ERR(0, 2154, __pyx_L1_error);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_eval, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2154, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_result = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "../../bmi/sympy/DifferentialRing.pyx":2155
 *             raise RuntimeError (str (mesgerr, 'utf-8'))
 *         result = eval (A.value, globals (), self.evdict)
 *         if not isinstance (equations, list):             # <<<<<<<<<<<<<<
 *             result = result [0]
 *         bmi_c.bmi_balsa_clear_ALGEB (A)
 */
  __pyx_t_5 = PyList_Check(__pyx_v_equations); 
  __pyx_t_12 = (!__pyx_t_5);
  if (__pyx_t_12) {

    /* "../../bmi/sympy/DifferentialRing.pyx":2156
 *         result = eval (A.value, globals (), self.evdict)
 *         if not isinstance (equations, list):
 *             result = result [0]             # <<<<<<<<<<<<<<
 *         bmi_c.bmi_balsa_clear_ALGEB (A)
 *         return result
 */
    __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_result, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2156, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF_SET(__pyx_v_result, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "../../bmi/sympy/DifferentialRing.pyx":2155
 *             raise RuntimeError (str (mesgerr, 'utf-8'))
 *         result = eval (A.value, globals (), self.evdict)
 *         if not isinstance (equations, list):             # <<<<<<<<<<<<<<
 *             result = result [0]
 *         bmi_c.bmi_balsa_clear_ALGEB (A)
 */
  }

  /* "../../bmi/sympy/DifferentialRing.pyx":2157
 *         if not isinstance (equations, list):
 *             result = result [0]
 *         bmi_c.bmi_balsa_clear_ALGEB (A)             # <<<<<<<<<<<<<<
 *         return result
 * 
 */
  bmi_balsa_clear_ALGEB(__pyx_v_A);

  /* "../../bmi/sympy/DifferentialRing.pyx":2158
 *             result = result [0]
 *         bmi_c.bmi_balsa_clear_ALGEB (A)
 *         return result             # <<<<<<<<<<<<<<
 * 
 * # sort
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_result);
  __pyx_r = __pyx_v_result;
  goto __pyx_L0;

  /* "../../bmi/sympy/DifferentialRing.pyx":2067
 * 
 * # normal_form
 *     def normal_form (             # <<<<<<<<<<<<<<
 *             self,
 *             equations,
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("DifferentialAlgebra.DifferentialRing.normal_form", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XDECREF(__pyx_v_streqns);
  __Pyx_XDECREF(__pyx_v_strders);
  __Pyx_XDECREF(__pyx_v_mesgerr);
  __Pyx_XDECREF(__pyx_v_strnot);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "../../bmi/sympy/DifferentialRing.pyx":2161
 * 
 * # sort
 *     def sort (             # <<<<<<<<<<<<<<
 *             self,
 *             list polynomials,
 */

/* Python wrapper */
static PyObject *__pyx_pw_19DifferentialAlgebra_16DifferentialRing_51sort(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_19DifferentialAlgebra_16DifferentialRing_50sort, "\n        Sort a list of polynomials according to their leading monomials\n\n        INPUT:\n\n            `polynomials` -- a list of polynomials\n            `mode`        -- (default: 'increasing') a string\n            `notation`    -- (default: 'undefined') a string\n\n        OUTPUT:\n\n            The list polynomials, sorted by increasing leading monomial,\n            if `mode` is 'increasing', by decreasing leading monomial,\n            if `mode` is 'decreasing'.\n\n            The leading monomial of a nonzero numeric polynomial is 1.\n            The leading monomial of a nonzero, non numeric polynomial,\n            is the product of the leading rank of the polynomial, by\n            the leading monomial of its initial. Leading monomials are\n            compared lexicographically, with respect to the ranking.\n            This ordering is extended to 0, which is considered lower\n            than any other polynomial.\n\n        NOTES:\n\n            This function should be extended to rational fractions.\n\n        EXAMPLES:\n\n            >>> from sympy import *\n            >>> from DifferentialAlgebra import *\n            >>> init_printing (use_unicode = False, num_columns = 60)\n\n            >>> a,x,y = var ('a,x,y')\n            >>> u,v = function ('u,v')\n            >>> R = DifferentialRing (derivations = [x,y], \n            ...             blocks = [u,v,a], parameters = [a,v(y)])\n            >>> L = [Derivative(v(y),y,y), \n            ...         Derivative(v(y),y,y)**3, 0, a*u(x,y)**2, x]\n\n        The list L is sorted by increasing leading monomial:\n\n            >>> R.sort (L)\n                                         3             \n                    2         / 2       \\              \n                   d          |d        |      2       \n            [0, x, ---(v(y)), |---(v(y))| , a*u (x, y)]\n                     2        |  2      |              \n                   dy         \\dy       /              \n\n        By decr""easing leading monomial:\n\n            >>> R.sort (L, 'descending')\n                                    3                  \n                         / 2       \\    2              \n                2        |d        |   d               \n            [a*u (x, y), |---(v(y))| , ---(v(y)), x, 0]\n                         |  2      |     2             \n                         \\dy       /   dy              \n\n        Another example:\n\n            >>> L = [ u(x,y), u(x,y)*v(y), u(x,y)*v(y)**2, u(x,y)*v(y)*a ]\n            >>> R.sort (L, 'ascending')\n                                                             2    \n            [u(x, y), u(x, y)*v(y), a*u(x, y)*v(y), u(x, y)*v (y)]\n        ");
static PyMethodDef __pyx_mdef_19DifferentialAlgebra_16DifferentialRing_51sort = {"sort", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_19DifferentialAlgebra_16DifferentialRing_51sort, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_19DifferentialAlgebra_16DifferentialRing_50sort};
static PyObject *__pyx_pw_19DifferentialAlgebra_16DifferentialRing_51sort(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_polynomials = 0;
  PyObject *__pyx_v_mode = 0;
  PyObject *__pyx_v_notation = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[3] = {0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("sort (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_polynomials,&__pyx_n_s_mode,&__pyx_n_s_notation,0};
    values[1] = __Pyx_Arg_NewRef_FASTCALL(__pyx_k__29);
    values[2] = __Pyx_Arg_NewRef_FASTCALL(__pyx_k__30);
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_polynomials)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2161, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_mode);
          if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2161, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_notation);
          if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2161, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "sort") < 0)) __PYX_ERR(0, 2161, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_polynomials = ((PyObject*)values[0]);
    __pyx_v_mode = values[1];
    __pyx_v_notation = values[2];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("sort", 0, 1, 3, __pyx_nargs); __PYX_ERR(0, 2161, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("DifferentialAlgebra.DifferentialRing.sort", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_polynomials), (&PyList_Type), 1, "polynomials", 1))) __PYX_ERR(0, 2163, __pyx_L1_error)
  __pyx_r = __pyx_pf_19DifferentialAlgebra_16DifferentialRing_50sort(((struct __pyx_obj_19DifferentialAlgebra_DifferentialRing *)__pyx_v_self), __pyx_v_polynomials, __pyx_v_mode, __pyx_v_notation);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_19DifferentialAlgebra_16DifferentialRing_50sort(struct __pyx_obj_19DifferentialAlgebra_DifferentialRing *__pyx_v_self, PyObject *__pyx_v_polynomials, PyObject *__pyx_v_mode, PyObject *__pyx_v_notation) {
  PyObject *__pyx_v_result = 0;
  PyObject *__pyx_v_streqns = 0;
  PyObject *__pyx_v_mesgerr = 0;
  PyObject *__pyx_v_strmode = 0;
  ALGEB_string __pyx_v_L;
  PyObject *__pyx_v_strnot = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  unsigned int __pyx_t_4;
  char *__pyx_t_5;
  char *__pyx_t_6;
  char *__pyx_t_7;
  char *__pyx_t_8;
  int __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("sort", 1);

  /* "../../bmi/sympy/DifferentialRing.pyx":2238
 *         cdef bmi_c.ALGEB_string L
 *         cdef strnot
 *         strnot = self.__process_notation (notation)             # <<<<<<<<<<<<<<
 *         streqns = ascii (polynomials)
 *         strmode = ascii (mode)
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_DifferentialRing__process_notat); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2238, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_notation};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2238, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_v_strnot = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "../../bmi/sympy/DifferentialRing.pyx":2239
 *         cdef strnot
 *         strnot = self.__process_notation (notation)
 *         streqns = ascii (polynomials)             # <<<<<<<<<<<<<<
 *         strmode = ascii (mode)
 *         L = bmi_c.bmi_dapyx_sort (
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ascii); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2239, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_polynomials};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2239, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  if (!(likely(PyBytes_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_1))) __PYX_ERR(0, 2239, __pyx_L1_error)
  __pyx_v_streqns = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "../../bmi/sympy/DifferentialRing.pyx":2240
 *         strnot = self.__process_notation (notation)
 *         streqns = ascii (polynomials)
 *         strmode = ascii (mode)             # <<<<<<<<<<<<<<
 *         L = bmi_c.bmi_dapyx_sort (
 *                 streqns, strmode, self.dring, self.notation, strnot, 0, 0)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ascii); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2240, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_mode};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2240, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  if (!(likely(PyBytes_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_1))) __PYX_ERR(0, 2240, __pyx_L1_error)
  __pyx_v_strmode = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "../../bmi/sympy/DifferentialRing.pyx":2242
 *         strmode = ascii (mode)
 *         L = bmi_c.bmi_dapyx_sort (
 *                 streqns, strmode, self.dring, self.notation, strnot, 0, 0)             # <<<<<<<<<<<<<<
 *         if bmi_c.bmi_dapyx_is_error (L):
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (L)
 */
  if (unlikely(__pyx_v_streqns == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
    __PYX_ERR(0, 2242, __pyx_L1_error)
  }
  __pyx_t_5 = __Pyx_PyBytes_AsWritableString(__pyx_v_streqns); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) __PYX_ERR(0, 2242, __pyx_L1_error)
  if (unlikely(__pyx_v_strmode == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
    __PYX_ERR(0, 2242, __pyx_L1_error)
  }
  __pyx_t_6 = __Pyx_PyBytes_AsWritableString(__pyx_v_strmode); if (unlikely((!__pyx_t_6) && PyErr_Occurred())) __PYX_ERR(0, 2242, __pyx_L1_error)
  if (unlikely(__pyx_v_self->notation == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
    __PYX_ERR(0, 2242, __pyx_L1_error)
  }
  __pyx_t_7 = __Pyx_PyBytes_AsWritableString(__pyx_v_self->notation); if (unlikely((!__pyx_t_7) && PyErr_Occurred())) __PYX_ERR(0, 2242, __pyx_L1_error)
  __pyx_t_8 = __Pyx_PyObject_AsWritableString(__pyx_v_strnot); if (unlikely((!__pyx_t_8) && PyErr_Occurred())) __PYX_ERR(0, 2242, __pyx_L1_error)

  /* "../../bmi/sympy/DifferentialRing.pyx":2241
 *         streqns = ascii (polynomials)
 *         strmode = ascii (mode)
 *         L = bmi_c.bmi_dapyx_sort (             # <<<<<<<<<<<<<<
 *                 streqns, strmode, self.dring, self.notation, strnot, 0, 0)
 *         if bmi_c.bmi_dapyx_is_error (L):
 */
  __pyx_v_L = bmi_dapyx_sort(__pyx_t_5, __pyx_t_6, __pyx_v_self->dring, __pyx_t_7, __pyx_t_8, 0, 0);

  /* "../../bmi/sympy/DifferentialRing.pyx":2243
 *         L = bmi_c.bmi_dapyx_sort (
 *                 streqns, strmode, self.dring, self.notation, strnot, 0, 0)
 *         if bmi_c.bmi_dapyx_is_error (L):             # <<<<<<<<<<<<<<
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (L)
 *             bmi_c.bmi_balsa_clear_ALGEB (L)
 */
  __pyx_t_9 = (bmi_dapyx_is_error(__pyx_v_L) != 0);
  if (unlikely(__pyx_t_9)) {

    /* "../../bmi/sympy/DifferentialRing.pyx":2244
 *                 streqns, strmode, self.dring, self.notation, strnot, 0, 0)
 *         if bmi_c.bmi_dapyx_is_error (L):
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (L)             # <<<<<<<<<<<<<<
 *             bmi_c.bmi_balsa_clear_ALGEB (L)
 *             raise RuntimeError (str (mesgerr, 'utf-8'))
 */
    __pyx_t_1 = __Pyx_PyBytes_FromString(bmi_dapyx_mesgerr(__pyx_v_L)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2244, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_v_mesgerr = ((PyObject*)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "../../bmi/sympy/DifferentialRing.pyx":2245
 *         if bmi_c.bmi_dapyx_is_error (L):
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (L)
 *             bmi_c.bmi_balsa_clear_ALGEB (L)             # <<<<<<<<<<<<<<
 *             raise RuntimeError (str (mesgerr, 'utf-8'))
 *         result = eval (L.value, globals (), self.evdict)
 */
    bmi_balsa_clear_ALGEB(__pyx_v_L);

    /* "../../bmi/sympy/DifferentialRing.pyx":2246
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (L)
 *             bmi_c.bmi_balsa_clear_ALGEB (L)
 *             raise RuntimeError (str (mesgerr, 'utf-8'))             # <<<<<<<<<<<<<<
 *         result = eval (L.value, globals (), self.evdict)
 *         bmi_c.bmi_balsa_clear_ALGEB (L)
 */
    __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2246, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_v_mesgerr);
    __Pyx_GIVEREF(__pyx_v_mesgerr);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_mesgerr)) __PYX_ERR(0, 2246, __pyx_L1_error);
    __Pyx_INCREF(__pyx_kp_u_utf_8);
    __Pyx_GIVEREF(__pyx_kp_u_utf_8);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_kp_u_utf_8)) __PYX_ERR(0, 2246, __pyx_L1_error);
    __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)(&PyUnicode_Type)), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2246, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_RuntimeError, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2246, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(0, 2246, __pyx_L1_error)

    /* "../../bmi/sympy/DifferentialRing.pyx":2243
 *         L = bmi_c.bmi_dapyx_sort (
 *                 streqns, strmode, self.dring, self.notation, strnot, 0, 0)
 *         if bmi_c.bmi_dapyx_is_error (L):             # <<<<<<<<<<<<<<
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (L)
 *             bmi_c.bmi_balsa_clear_ALGEB (L)
 */
  }

  /* "../../bmi/sympy/DifferentialRing.pyx":2247
 *             bmi_c.bmi_balsa_clear_ALGEB (L)
 *             raise RuntimeError (str (mesgerr, 'utf-8'))
 *         result = eval (L.value, globals (), self.evdict)             # <<<<<<<<<<<<<<
 *         bmi_c.bmi_balsa_clear_ALGEB (L)
 *         return result
 */
  __pyx_t_1 = __Pyx_PyBytes_FromString(__pyx_v_L->value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2247, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_Globals(); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2247, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2247, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_1);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1)) __PYX_ERR(0, 2247, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_2);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2)) __PYX_ERR(0, 2247, __pyx_L1_error);
  __Pyx_INCREF(__pyx_v_self->evdict);
  __Pyx_GIVEREF(__pyx_v_self->evdict);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_self->evdict)) __PYX_ERR(0, 2247, __pyx_L1_error);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_eval, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2247, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (!(likely(PyList_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None) || __Pyx_RaiseUnexpectedTypeError("list", __pyx_t_2))) __PYX_ERR(0, 2247, __pyx_L1_error)
  __pyx_v_result = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "../../bmi/sympy/DifferentialRing.pyx":2248
 *             raise RuntimeError (str (mesgerr, 'utf-8'))
 *         result = eval (L.value, globals (), self.evdict)
 *         bmi_c.bmi_balsa_clear_ALGEB (L)             # <<<<<<<<<<<<<<
 *         return result
 * 
 */
  bmi_balsa_clear_ALGEB(__pyx_v_L);

  /* "../../bmi/sympy/DifferentialRing.pyx":2249
 *         result = eval (L.value, globals (), self.evdict)
 *         bmi_c.bmi_balsa_clear_ALGEB (L)
 *         return result             # <<<<<<<<<<<<<<
 * 
 * # DenefLipshitz
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_result);
  __pyx_r = __pyx_v_result;
  goto __pyx_L0;

  /* "../../bmi/sympy/DifferentialRing.pyx":2161
 * 
 * # sort
 *     def sort (             # <<<<<<<<<<<<<<
 *             self,
 *             list polynomials,
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("DifferentialAlgebra.DifferentialRing.sort", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XDECREF(__pyx_v_streqns);
  __Pyx_XDECREF(__pyx_v_mesgerr);
  __Pyx_XDECREF(__pyx_v_strmode);
  __Pyx_XDECREF(__pyx_v_strnot);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "../../bmi/sympy/DifferentialRing.pyx":2252
 * 
 * # DenefLipshitz
 *     def DenefLipshitz (             # <<<<<<<<<<<<<<
 *             self,
 *             equations,
 */

/* Python wrapper */
static PyObject *__pyx_pw_19DifferentialAlgebra_16DifferentialRing_53DenefLipshitz(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_19DifferentialAlgebra_16DifferentialRing_52DenefLipshitz, "\n        The DenefLipshitz algorithm\n\n        INPUT:\n\n            `equations`  -- a list of differential polynomials, \n                              polynomial equations or inequations\n            `Y`          -- a list of differential indeterminates\n            `Ybar`       -- a prolongation pattern\n            `q`          -- a variable\n            `x`          -- (default: None) an independent variable\n            `attributes` -- (default: ['differential', 'autoreduced', \n                             'primitive', 'squarefree', 'normalized', \n                             'coherent']) a list of strings\n            `control`    -- (default: 'vector') a string\n            `notation`   -- (default: 'undefined') a string\n            `timeout`    -- (default: 0) a nonnegative integer\n            `memout`     -- (default: 0) a nonnegative integer\n\n        OUTPUT:\n\n            A possibly empty list of DenefLipshitzUple describing the\n            formal power series solutions of `equations`.\n\n            If the list is empty, `equations` has no formal power\n            series solution.\n\n            If it is nonempty, each of its element provides at least\n            one formal power series solution to `equations`.\n\n            The algorithm is restricted to ordinary differential\n            systems.  The base field of the equations is the\n            field of the rational numbers. The equations must\n            be autonomous (they must not explicitly depend on the\n            independent variable `x`). Note that this restriction is\n            mathematically irrelevant since it is always possible to\n            encode nonautonomous differential equations as autonomous\n            ones by means of a change of independent variable and an\n            extra differential indeterminate.\n\n            The list `equations` may involve differential polynomials,\n            differential rational fractions, and, even relational\n            exp""ressions between differential rational fractions,\n            built using the '==' and '!=' operators. Differential\n            inequations are allowed but have a subtle interpretation in\n            the algorithm (note that the existence problem of nonzero\n            formal power series solutions is undecidable [Singer78]).\n\n            The argument `Ybar` establishes the relationship between\n            the differential indeterminates of `Y` and the coefficients\n            of their formal power series solutions.\n\n            The variable `q` is used to form the leading polynomial\n            associated to each DenefLipshitzUple.\n\n            The list `attributes` is provided to the RosenfeldGroebner\n            algorithm, which is called by DenefLipshitz. These\n            attributes are inherited by the regular differential chain\n            contained in each DenefLipshitzUple.\n\n            The possible values for `control` are 'vector' or 'single'.\n\n        NOTES:\n\n            A theoretical version of the DenefLipshitz algorithm is\n            provided in the proof of [DL84, Theorem 3.1]. The very\n            first version of this algorithm, relying on [BL24], was\n            implemented in April 2025 in BLAD.\n\n            The method actually calls the BLAD bas_Denef_Lipshitz\n            function.\n\n        REFERENCES:\n\n            [BL24] Fran\303\247ois Boulier and Fran\303\247ois Lemaire. On\n            Formal Power Series Solutions of Regular Differential\n            Chains. Proceedings of CASC 2024, LNCS 14938, pages 82-99,\n            2024.\n\n            [DL84] Jan Denef and Leonard Lipshitz. Power Series\n            Solutions of Algebraic Differential Equations. Mathematische\n            Annalen vol. 267, pages 213-238, 1984.\n\n            [Singer78] Michael Singer. The Model Theory of Ordered\n            Differential Fields. J. Symb. Logic vol. 43, pages 82-91,\n            1978.\n\n        EXAMPLES:\n\n           "" >>> from sympy import *\n            >>> from DifferentialAlgebra import *\n            >>> init_printing (use_unicode = False, num_columns = 60)\n            >>> x,q = var ('x,q')\n            >>> y = indexedbase ('y')\n\n        The differential indeterminate is y. The coefficients of its\n        formal power series solutions are ... > y[3] > y[2] > y[1]\n        > y[0]:\n\n            >>> R = DifferentialRing (blocks = [y,q,'(y)[oo:-1]'], \n            ...         derivations = [x], \n            ...         parameters = [q,'(y)[oo:-1]'], \n            ...         notation = 'jet')\n\n        The differential equation of the brachistochrone problem. Its\n        solutions are a family of cycloids and the singular solution\n        y(x) = 1:\n\n            >>> eqns = [ y*y[x]**2 + y - 1 ]\n\n        The list of the differential indeterminates for which formal\n        power series solutions are sought:\n\n            >>> Y = [y]\n\n        The relationship between the differential indeterminate y\n        and the coefficients of its formal power series solutions\n        is provided by Ybar. Over this example, the relationship\n        mathematically is:\n\n        y(x) = y[0] + y[1]*x + y[2]/2*x**2 + ... +\n        y[k]/factorial(k)*x**k + ...\n\n            >>> Ybar = { y['(x,k)'] : 'y[k]' } \n\n        The DenefLipshitz algorithm distingues three cases:\n\n            >>> DL = R.DenefLipshitz (eqns, Y, Ybar, q, x)\n            >>> DL\n            [Denef_Lipshitz_Uple, Denef_Lipshitz_Uple, Denef_Lipshitz_ >\n            |  \n            > Uple]\n\n        The first component corresponds to the singular solution.\n\n            >>> DL[0].series ()\n            {y: 1}\n\n        The second component corresponds to the regular case of the\n        general solution:\n\n            >>> DL[1].series ()\n                     2                    \n                    x                     \n            {y: - ------- + x*y[1] + y[0]}\n                        2        ""         \n                  4*y[0]                  \n\n        The third component corresponds to a particular solution of\n        the general solution:\n\n            >>> DL[2].series ()\n                   4    2     \n                  x    x      \n            {y: - -- - -- + 1}\n                  48   4      \n        ");
static PyMethodDef __pyx_mdef_19DifferentialAlgebra_16DifferentialRing_53DenefLipshitz = {"DenefLipshitz", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_19DifferentialAlgebra_16DifferentialRing_53DenefLipshitz, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_19DifferentialAlgebra_16DifferentialRing_52DenefLipshitz};
static PyObject *__pyx_pw_19DifferentialAlgebra_16DifferentialRing_53DenefLipshitz(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_equations = 0;
  PyObject *__pyx_v_Y = 0;
  PyObject *__pyx_v_Ybar = 0;
  PyObject *__pyx_v_q = 0;
  PyObject *__pyx_v_x = 0;
  PyObject *__pyx_v_attributes = 0;
  PyObject *__pyx_v_control = 0;
  PyObject *__pyx_v_notation = 0;
  int __pyx_v_timeout;
  int __pyx_v_memout;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[10] = {0,0,0,0,0,0,0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("DenefLipshitz (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_equations,&__pyx_n_s_Y,&__pyx_n_s_Ybar,&__pyx_n_s_q,&__pyx_n_s_x,&__pyx_n_s_attributes,&__pyx_n_s_control,&__pyx_n_s_notation,&__pyx_n_s_timeout,&__pyx_n_s_memout,0};

    /* "../../bmi/sympy/DifferentialRing.pyx":2258
 *             Ybar,
 *             q,
 *             x = None,             # <<<<<<<<<<<<<<
 *             list attributes = [
 *                     'differential', 'autoreduced', 'primitive',
 */
    values[4] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
    values[5] = __Pyx_Arg_NewRef_FASTCALL(__pyx_k__31);
    values[6] = __Pyx_Arg_NewRef_FASTCALL(__pyx_k__32);
    values[7] = __Pyx_Arg_NewRef_FASTCALL(__pyx_k__33);
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case 10: values[9] = __Pyx_Arg_FASTCALL(__pyx_args, 9);
        CYTHON_FALLTHROUGH;
        case  9: values[8] = __Pyx_Arg_FASTCALL(__pyx_args, 8);
        CYTHON_FALLTHROUGH;
        case  8: values[7] = __Pyx_Arg_FASTCALL(__pyx_args, 7);
        CYTHON_FALLTHROUGH;
        case  7: values[6] = __Pyx_Arg_FASTCALL(__pyx_args, 6);
        CYTHON_FALLTHROUGH;
        case  6: values[5] = __Pyx_Arg_FASTCALL(__pyx_args, 5);
        CYTHON_FALLTHROUGH;
        case  5: values[4] = __Pyx_Arg_FASTCALL(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_equations)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2252, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_Y)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2252, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("DenefLipshitz", 0, 4, 10, 1); __PYX_ERR(0, 2252, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_Ybar)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[2]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2252, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("DenefLipshitz", 0, 4, 10, 2); __PYX_ERR(0, 2252, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_q)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[3]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2252, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("DenefLipshitz", 0, 4, 10, 3); __PYX_ERR(0, 2252, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_x);
          if (value) { values[4] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2252, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  5:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_attributes);
          if (value) { values[5] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2252, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  6:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_control);
          if (value) { values[6] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2252, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  7:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_notation);
          if (value) { values[7] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2252, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  8:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_timeout);
          if (value) { values[8] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2252, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  9:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_memout);
          if (value) { values[9] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2252, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "DenefLipshitz") < 0)) __PYX_ERR(0, 2252, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case 10: values[9] = __Pyx_Arg_FASTCALL(__pyx_args, 9);
        CYTHON_FALLTHROUGH;
        case  9: values[8] = __Pyx_Arg_FASTCALL(__pyx_args, 8);
        CYTHON_FALLTHROUGH;
        case  8: values[7] = __Pyx_Arg_FASTCALL(__pyx_args, 7);
        CYTHON_FALLTHROUGH;
        case  7: values[6] = __Pyx_Arg_FASTCALL(__pyx_args, 6);
        CYTHON_FALLTHROUGH;
        case  6: values[5] = __Pyx_Arg_FASTCALL(__pyx_args, 5);
        CYTHON_FALLTHROUGH;
        case  5: values[4] = __Pyx_Arg_FASTCALL(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
        values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_equations = values[0];
    __pyx_v_Y = values[1];
    __pyx_v_Ybar = values[2];
    __pyx_v_q = values[3];
    __pyx_v_x = values[4];
    __pyx_v_attributes = ((PyObject*)values[5]);
    __pyx_v_control = values[6];
    __pyx_v_notation = values[7];
    if (values[8]) {
      __pyx_v_timeout = __Pyx_PyInt_As_int(values[8]); if (unlikely((__pyx_v_timeout == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2264, __pyx_L3_error)
    } else {
      __pyx_v_timeout = ((int)0);
    }
    if (values[9]) {
      __pyx_v_memout = __Pyx_PyInt_As_int(values[9]); if (unlikely((__pyx_v_memout == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2265, __pyx_L3_error)
    } else {
      __pyx_v_memout = ((int)0);
    }
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("DenefLipshitz", 0, 4, 10, __pyx_nargs); __PYX_ERR(0, 2252, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("DifferentialAlgebra.DifferentialRing.DenefLipshitz", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_attributes), (&PyList_Type), 1, "attributes", 1))) __PYX_ERR(0, 2259, __pyx_L1_error)
  __pyx_r = __pyx_pf_19DifferentialAlgebra_16DifferentialRing_52DenefLipshitz(((struct __pyx_obj_19DifferentialAlgebra_DifferentialRing *)__pyx_v_self), __pyx_v_equations, __pyx_v_Y, __pyx_v_Ybar, __pyx_v_q, __pyx_v_x, __pyx_v_attributes, __pyx_v_control, __pyx_v_notation, __pyx_v_timeout, __pyx_v_memout);

  /* "../../bmi/sympy/DifferentialRing.pyx":2252
 * 
 * # DenefLipshitz
 *     def DenefLipshitz (             # <<<<<<<<<<<<<<
 *             self,
 *             equations,
 */

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_19DifferentialAlgebra_16DifferentialRing_52DenefLipshitz(struct __pyx_obj_19DifferentialAlgebra_DifferentialRing *__pyx_v_self, PyObject *__pyx_v_equations, PyObject *__pyx_v_Y, PyObject *__pyx_v_Ybar, PyObject *__pyx_v_q, PyObject *__pyx_v_x, PyObject *__pyx_v_attributes, PyObject *__pyx_v_control, PyObject *__pyx_v_notation, int __pyx_v_timeout, int __pyx_v_memout) {
  PyObject *__pyx_v_result = 0;
  PyObject *__pyx_v_eqns = 0;
  PyObject *__pyx_v_ineq = 0;
  PyObject *__pyx_v_M = 0;
  struct __pyx_obj_19DifferentialAlgebra_DenefLipshitzUple *__pyx_v_U = 0;
  struct __pyx_obj_19DifferentialAlgebra_RegularDifferentialChain *__pyx_v_C = 0;
  ALGEB_listof_list __pyx_v_L;
  ALGEB_listof_string __pyx_v_L1;
  ALGEB_list __pyx_v_L2;
  ALGEB_list __pyx_v_L3;
  PyObject *__pyx_v_mesgerr = 0;
  PyObject *__pyx_v_streqns = 0;
  PyObject *__pyx_v_strineq = 0;
  PyObject *__pyx_v_strattr = 0;
  PyObject *__pyx_v_strY = 0;
  PyObject *__pyx_v_strYbar = 0;
  PyObject *__pyx_v_strq = 0;
  PyObject *__pyx_v_strx = 0;
  PyObject *__pyx_v_strcontrol = 0;
  PyObject *__pyx_v_strnot = 0;
  ba0_int_p __pyx_v_i;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  unsigned int __pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *(*__pyx_t_7)(PyObject *);
  Py_ssize_t __pyx_t_8;
  char *__pyx_t_9;
  char *__pyx_t_10;
  char *__pyx_t_11;
  char *__pyx_t_12;
  char *__pyx_t_13;
  char *__pyx_t_14;
  char *__pyx_t_15;
  char *__pyx_t_16;
  char *__pyx_t_17;
  char *__pyx_t_18;
  ba0_int_p __pyx_t_19;
  ba0_int_p __pyx_t_20;
  ba0_int_p __pyx_t_21;
  int __pyx_t_22;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("DenefLipshitz", 1);

  /* "../../bmi/sympy/DifferentialRing.pyx":2434
 *         cdef strnot
 * #
 *         strnot = self.__process_notation (notation)             # <<<<<<<<<<<<<<
 *         if isinstance (equations, list):
 *             eqns, ineq = self._process_equations (equations, strnot)
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_DifferentialRing__process_notat); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2434, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_notation};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2434, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_v_strnot = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "../../bmi/sympy/DifferentialRing.pyx":2435
 * #
 *         strnot = self.__process_notation (notation)
 *         if isinstance (equations, list):             # <<<<<<<<<<<<<<
 *             eqns, ineq = self._process_equations (equations, strnot)
 *         else:
 */
  __pyx_t_5 = PyList_Check(__pyx_v_equations); 
  if (__pyx_t_5) {

    /* "../../bmi/sympy/DifferentialRing.pyx":2436
 *         strnot = self.__process_notation (notation)
 *         if isinstance (equations, list):
 *             eqns, ineq = self._process_equations (equations, strnot)             # <<<<<<<<<<<<<<
 *         else:
 *             eqns, ineq = self._process_equations ([equations], strnot)
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_process_equations); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2436, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = NULL;
    __pyx_t_4 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
        __pyx_t_4 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_v_equations, __pyx_v_strnot};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 2+__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2436, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
      PyObject* sequence = __pyx_t_1;
      Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
      if (unlikely(size != 2)) {
        if (size > 2) __Pyx_RaiseTooManyValuesError(2);
        else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
        __PYX_ERR(0, 2436, __pyx_L1_error)
      }
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      if (likely(PyTuple_CheckExact(sequence))) {
        __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); 
        __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); 
      } else {
        __pyx_t_2 = PyList_GET_ITEM(sequence, 0); 
        __pyx_t_3 = PyList_GET_ITEM(sequence, 1); 
      }
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      #else
      __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2436, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2436, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    } else {
      Py_ssize_t index = -1;
      __pyx_t_6 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2436, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_7 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_6);
      index = 0; __pyx_t_2 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_2)) goto __pyx_L4_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_2);
      index = 1; __pyx_t_3 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_3)) goto __pyx_L4_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_3);
      if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_6), 2) < 0) __PYX_ERR(0, 2436, __pyx_L1_error)
      __pyx_t_7 = NULL;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      goto __pyx_L5_unpacking_done;
      __pyx_L4_unpacking_failed:;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_7 = NULL;
      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
      __PYX_ERR(0, 2436, __pyx_L1_error)
      __pyx_L5_unpacking_done:;
    }
    if (!(likely(PyList_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None) || __Pyx_RaiseUnexpectedTypeError("list", __pyx_t_2))) __PYX_ERR(0, 2436, __pyx_L1_error)
    if (!(likely(PyList_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None) || __Pyx_RaiseUnexpectedTypeError("list", __pyx_t_3))) __PYX_ERR(0, 2436, __pyx_L1_error)
    __pyx_v_eqns = ((PyObject*)__pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_v_ineq = ((PyObject*)__pyx_t_3);
    __pyx_t_3 = 0;

    /* "../../bmi/sympy/DifferentialRing.pyx":2435
 * #
 *         strnot = self.__process_notation (notation)
 *         if isinstance (equations, list):             # <<<<<<<<<<<<<<
 *             eqns, ineq = self._process_equations (equations, strnot)
 *         else:
 */
    goto __pyx_L3;
  }

  /* "../../bmi/sympy/DifferentialRing.pyx":2438
 *             eqns, ineq = self._process_equations (equations, strnot)
 *         else:
 *             eqns, ineq = self._process_equations ([equations], strnot)             # <<<<<<<<<<<<<<
 *         streqns = ascii (eqns)
 *         strineq = ascii (ineq)
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_process_equations); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2438, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2438, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_v_equations);
    __Pyx_GIVEREF(__pyx_v_equations);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 0, __pyx_v_equations)) __PYX_ERR(0, 2438, __pyx_L1_error);
    __pyx_t_6 = NULL;
    __pyx_t_4 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
        __pyx_t_4 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[3] = {__pyx_t_6, __pyx_t_2, __pyx_v_strnot};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 2+__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2438, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
    if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
      PyObject* sequence = __pyx_t_1;
      Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
      if (unlikely(size != 2)) {
        if (size > 2) __Pyx_RaiseTooManyValuesError(2);
        else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
        __PYX_ERR(0, 2438, __pyx_L1_error)
      }
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      if (likely(PyTuple_CheckExact(sequence))) {
        __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); 
        __pyx_t_2 = PyTuple_GET_ITEM(sequence, 1); 
      } else {
        __pyx_t_3 = PyList_GET_ITEM(sequence, 0); 
        __pyx_t_2 = PyList_GET_ITEM(sequence, 1); 
      }
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      #else
      __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2438, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_2 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2438, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    } else {
      Py_ssize_t index = -1;
      __pyx_t_6 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2438, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_7 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_6);
      index = 0; __pyx_t_3 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_3)) goto __pyx_L6_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_3);
      index = 1; __pyx_t_2 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_2)) goto __pyx_L6_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_2);
      if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_6), 2) < 0) __PYX_ERR(0, 2438, __pyx_L1_error)
      __pyx_t_7 = NULL;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      goto __pyx_L7_unpacking_done;
      __pyx_L6_unpacking_failed:;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_7 = NULL;
      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
      __PYX_ERR(0, 2438, __pyx_L1_error)
      __pyx_L7_unpacking_done:;
    }
    if (!(likely(PyList_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None) || __Pyx_RaiseUnexpectedTypeError("list", __pyx_t_3))) __PYX_ERR(0, 2438, __pyx_L1_error)
    if (!(likely(PyList_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None) || __Pyx_RaiseUnexpectedTypeError("list", __pyx_t_2))) __PYX_ERR(0, 2438, __pyx_L1_error)
    __pyx_v_eqns = ((PyObject*)__pyx_t_3);
    __pyx_t_3 = 0;
    __pyx_v_ineq = ((PyObject*)__pyx_t_2);
    __pyx_t_2 = 0;
  }
  __pyx_L3:;

  /* "../../bmi/sympy/DifferentialRing.pyx":2439
 *         else:
 *             eqns, ineq = self._process_equations ([equations], strnot)
 *         streqns = ascii (eqns)             # <<<<<<<<<<<<<<
 *         strineq = ascii (ineq)
 *         strattr = ascii (attributes)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ascii); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2439, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_eqns};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2439, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  if (!(likely(PyBytes_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_1))) __PYX_ERR(0, 2439, __pyx_L1_error)
  __pyx_v_streqns = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "../../bmi/sympy/DifferentialRing.pyx":2440
 *             eqns, ineq = self._process_equations ([equations], strnot)
 *         streqns = ascii (eqns)
 *         strineq = ascii (ineq)             # <<<<<<<<<<<<<<
 *         strattr = ascii (attributes)
 *         strattr = strattr.replace (b"'", b"")
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ascii); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2440, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_ineq};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2440, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  if (!(likely(PyBytes_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_1))) __PYX_ERR(0, 2440, __pyx_L1_error)
  __pyx_v_strineq = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "../../bmi/sympy/DifferentialRing.pyx":2441
 *         streqns = ascii (eqns)
 *         strineq = ascii (ineq)
 *         strattr = ascii (attributes)             # <<<<<<<<<<<<<<
 *         strattr = strattr.replace (b"'", b"")
 *         strY = ascii (Y)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ascii); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2441, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_attributes};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2441, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  if (!(likely(PyBytes_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_1))) __PYX_ERR(0, 2441, __pyx_L1_error)
  __pyx_v_strattr = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "../../bmi/sympy/DifferentialRing.pyx":2442
 *         strineq = ascii (ineq)
 *         strattr = ascii (attributes)
 *         strattr = strattr.replace (b"'", b"")             # <<<<<<<<<<<<<<
 *         strY = ascii (Y)
 *         strYbar = ascii (Ybar)
 */
  __pyx_t_1 = __Pyx_CallUnboundCMethod2(&__pyx_umethod_PyBytes_Type_replace, __pyx_v_strattr, __pyx_kp_b__6, __pyx_kp_b__7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2442, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyBytes_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_1))) __PYX_ERR(0, 2442, __pyx_L1_error)
  __Pyx_DECREF_SET(__pyx_v_strattr, ((PyObject*)__pyx_t_1));
  __pyx_t_1 = 0;

  /* "../../bmi/sympy/DifferentialRing.pyx":2443
 *         strattr = ascii (attributes)
 *         strattr = strattr.replace (b"'", b"")
 *         strY = ascii (Y)             # <<<<<<<<<<<<<<
 *         strYbar = ascii (Ybar)
 * #
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ascii); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2443, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_Y};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2443, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  if (!(likely(PyBytes_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_1))) __PYX_ERR(0, 2443, __pyx_L1_error)
  __pyx_v_strY = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "../../bmi/sympy/DifferentialRing.pyx":2444
 *         strattr = strattr.replace (b"'", b"")
 *         strY = ascii (Y)
 *         strYbar = ascii (Ybar)             # <<<<<<<<<<<<<<
 * #
 *         M = self.indets (q, selection = 'all')
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ascii); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2444, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_Ybar};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2444, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  if (!(likely(PyBytes_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_1))) __PYX_ERR(0, 2444, __pyx_L1_error)
  __pyx_v_strYbar = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "../../bmi/sympy/DifferentialRing.pyx":2446
 *         strYbar = ascii (Ybar)
 * #
 *         M = self.indets (q, selection = 'all')             # <<<<<<<<<<<<<<
 *         if M != [q] :
 *             raise RuntimeError ("variable expected for q, found: " + str(q))
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_indets); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2446, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2446, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_v_q);
  __Pyx_GIVEREF(__pyx_v_q);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_q)) __PYX_ERR(0, 2446, __pyx_L1_error);
  __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2446, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_selection, __pyx_n_u_all) < 0) __PYX_ERR(0, 2446, __pyx_L1_error)
  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2446, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (!(likely(PyList_CheckExact(__pyx_t_6))||((__pyx_t_6) == Py_None) || __Pyx_RaiseUnexpectedTypeError("list", __pyx_t_6))) __PYX_ERR(0, 2446, __pyx_L1_error)
  __pyx_v_M = ((PyObject*)__pyx_t_6);
  __pyx_t_6 = 0;

  /* "../../bmi/sympy/DifferentialRing.pyx":2447
 * #
 *         M = self.indets (q, selection = 'all')
 *         if M != [q] :             # <<<<<<<<<<<<<<
 *             raise RuntimeError ("variable expected for q, found: " + str(q))
 *         else :
 */
  __pyx_t_6 = PyList_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2447, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_INCREF(__pyx_v_q);
  __Pyx_GIVEREF(__pyx_v_q);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_6, 0, __pyx_v_q)) __PYX_ERR(0, 2447, __pyx_L1_error);
  __pyx_t_3 = PyObject_RichCompare(__pyx_v_M, __pyx_t_6, Py_NE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2447, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 2447, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(__pyx_t_5)) {

    /* "../../bmi/sympy/DifferentialRing.pyx":2448
 *         M = self.indets (q, selection = 'all')
 *         if M != [q] :
 *             raise RuntimeError ("variable expected for q, found: " + str(q))             # <<<<<<<<<<<<<<
 *         else :
 *             strq = ascii (q)
 */
    __pyx_t_3 = __Pyx_PyObject_Unicode(__pyx_v_q); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2448, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_6 = __Pyx_PyUnicode_Concat(__pyx_kp_u_variable_expected_for_q_found, __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2448, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_RuntimeError, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2448, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(0, 2448, __pyx_L1_error)

    /* "../../bmi/sympy/DifferentialRing.pyx":2447
 * #
 *         M = self.indets (q, selection = 'all')
 *         if M != [q] :             # <<<<<<<<<<<<<<
 *             raise RuntimeError ("variable expected for q, found: " + str(q))
 *         else :
 */
  }

  /* "../../bmi/sympy/DifferentialRing.pyx":2450
 *             raise RuntimeError ("variable expected for q, found: " + str(q))
 *         else :
 *             strq = ascii (q)             # <<<<<<<<<<<<<<
 * #
 *         M = self.indets (selection = 'independent')
 */
  /*else*/ {
    __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_ascii); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2450, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_2 = NULL;
    __pyx_t_4 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_6);
      if (likely(__pyx_t_2)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_2);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_6, function);
        __pyx_t_4 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_q};
      __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2450, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }
    if (!(likely(PyBytes_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_3))) __PYX_ERR(0, 2450, __pyx_L1_error)
    __pyx_v_strq = ((PyObject*)__pyx_t_3);
    __pyx_t_3 = 0;
  }

  /* "../../bmi/sympy/DifferentialRing.pyx":2452
 *             strq = ascii (q)
 * #
 *         M = self.indets (selection = 'independent')             # <<<<<<<<<<<<<<
 *         if len(M) != 1 :
 *             raise RuntimeError ("ordinary differential ring expected")
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_indets); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2452, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_6 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2452, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_selection, __pyx_n_u_independent) < 0) __PYX_ERR(0, 2452, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2452, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (!(likely(PyList_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None) || __Pyx_RaiseUnexpectedTypeError("list", __pyx_t_2))) __PYX_ERR(0, 2452, __pyx_L1_error)
  __Pyx_DECREF_SET(__pyx_v_M, ((PyObject*)__pyx_t_2));
  __pyx_t_2 = 0;

  /* "../../bmi/sympy/DifferentialRing.pyx":2453
 * #
 *         M = self.indets (selection = 'independent')
 *         if len(M) != 1 :             # <<<<<<<<<<<<<<
 *             raise RuntimeError ("ordinary differential ring expected")
 *         elif x is None :
 */
  if (unlikely(__pyx_v_M == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(0, 2453, __pyx_L1_error)
  }
  __pyx_t_8 = __Pyx_PyList_GET_SIZE(__pyx_v_M); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2453, __pyx_L1_error)
  __pyx_t_5 = (__pyx_t_8 != 1);
  if (unlikely(__pyx_t_5)) {

    /* "../../bmi/sympy/DifferentialRing.pyx":2454
 *         M = self.indets (selection = 'independent')
 *         if len(M) != 1 :
 *             raise RuntimeError ("ordinary differential ring expected")             # <<<<<<<<<<<<<<
 *         elif x is None :
 *             strx = ascii (M[0])
 */
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__34, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2454, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(0, 2454, __pyx_L1_error)

    /* "../../bmi/sympy/DifferentialRing.pyx":2453
 * #
 *         M = self.indets (selection = 'independent')
 *         if len(M) != 1 :             # <<<<<<<<<<<<<<
 *             raise RuntimeError ("ordinary differential ring expected")
 *         elif x is None :
 */
  }

  /* "../../bmi/sympy/DifferentialRing.pyx":2455
 *         if len(M) != 1 :
 *             raise RuntimeError ("ordinary differential ring expected")
 *         elif x is None :             # <<<<<<<<<<<<<<
 *             strx = ascii (M[0])
 *         elif not x in M :
 */
  __pyx_t_5 = (__pyx_v_x == Py_None);
  if (__pyx_t_5) {

    /* "../../bmi/sympy/DifferentialRing.pyx":2456
 *             raise RuntimeError ("ordinary differential ring expected")
 *         elif x is None :
 *             strx = ascii (M[0])             # <<<<<<<<<<<<<<
 *         elif not x in M :
 *             raise RuntimeError ("independent variable expected for x, found: " + str(x))
 */
    __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_ascii); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2456, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    if (unlikely(__pyx_v_M == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(0, 2456, __pyx_L1_error)
    }
    __pyx_t_3 = __Pyx_GetItemInt_List(__pyx_v_M, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2456, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = NULL;
    __pyx_t_4 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_6);
      if (likely(__pyx_t_1)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_1);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_6, function);
        __pyx_t_4 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_t_3};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2456, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }
    if (!(likely(PyBytes_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_2))) __PYX_ERR(0, 2456, __pyx_L1_error)
    __pyx_v_strx = ((PyObject*)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "../../bmi/sympy/DifferentialRing.pyx":2455
 *         if len(M) != 1 :
 *             raise RuntimeError ("ordinary differential ring expected")
 *         elif x is None :             # <<<<<<<<<<<<<<
 *             strx = ascii (M[0])
 *         elif not x in M :
 */
    goto __pyx_L9;
  }

  /* "../../bmi/sympy/DifferentialRing.pyx":2457
 *         elif x is None :
 *             strx = ascii (M[0])
 *         elif not x in M :             # <<<<<<<<<<<<<<
 *             raise RuntimeError ("independent variable expected for x, found: " + str(x))
 *         else :
 */
  __pyx_t_5 = (__Pyx_PySequence_ContainsTF(__pyx_v_x, __pyx_v_M, Py_NE)); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 2457, __pyx_L1_error)
  if (unlikely(__pyx_t_5)) {

    /* "../../bmi/sympy/DifferentialRing.pyx":2458
 *             strx = ascii (M[0])
 *         elif not x in M :
 *             raise RuntimeError ("independent variable expected for x, found: " + str(x))             # <<<<<<<<<<<<<<
 *         else :
 *             strx = ascii (x)
 */
    __pyx_t_2 = __Pyx_PyObject_Unicode(__pyx_v_x); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2458, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_6 = __Pyx_PyUnicode_Concat(__pyx_kp_u_independent_variable_expected_fo, __pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2458, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_RuntimeError, __pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2458, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(0, 2458, __pyx_L1_error)

    /* "../../bmi/sympy/DifferentialRing.pyx":2457
 *         elif x is None :
 *             strx = ascii (M[0])
 *         elif not x in M :             # <<<<<<<<<<<<<<
 *             raise RuntimeError ("independent variable expected for x, found: " + str(x))
 *         else :
 */
  }

  /* "../../bmi/sympy/DifferentialRing.pyx":2460
 *             raise RuntimeError ("independent variable expected for x, found: " + str(x))
 *         else :
 *             strx = ascii (x)             # <<<<<<<<<<<<<<
 * #
 *         strcontrol = ascii (control)
 */
  /*else*/ {
    __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_ascii); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2460, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_3 = NULL;
    __pyx_t_4 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_6);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_6, function);
        __pyx_t_4 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_x};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2460, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }
    if (!(likely(PyBytes_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_2))) __PYX_ERR(0, 2460, __pyx_L1_error)
    __pyx_v_strx = ((PyObject*)__pyx_t_2);
    __pyx_t_2 = 0;
  }
  __pyx_L9:;

  /* "../../bmi/sympy/DifferentialRing.pyx":2462
 *             strx = ascii (x)
 * #
 *         strcontrol = ascii (control)             # <<<<<<<<<<<<<<
 * # L = [L1, L2, L3] where L1, L2, L3 are three lists of the same length
 * #   L1 entries contain basic entries of DLuples in string form
 */
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_ascii); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2462, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_6);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_6, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_control};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2462, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  }
  if (!(likely(PyBytes_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_2))) __PYX_ERR(0, 2462, __pyx_L1_error)
  __pyx_v_strcontrol = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "../../bmi/sympy/DifferentialRing.pyx":2470
 * #   should eventually be removed
 *         L = bmi_c.bmi_dapyx_DenefLipshitz (
 *                     streqns, strineq, strattr, self.dring, strY, strYbar,             # <<<<<<<<<<<<<<
 *                     strq, strx, strcontrol,
 *                     self.notation, strnot, timeout, memout)
 */
  if (unlikely(__pyx_v_streqns == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
    __PYX_ERR(0, 2470, __pyx_L1_error)
  }
  __pyx_t_9 = __Pyx_PyBytes_AsWritableString(__pyx_v_streqns); if (unlikely((!__pyx_t_9) && PyErr_Occurred())) __PYX_ERR(0, 2470, __pyx_L1_error)
  if (unlikely(__pyx_v_strineq == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
    __PYX_ERR(0, 2470, __pyx_L1_error)
  }
  __pyx_t_10 = __Pyx_PyBytes_AsWritableString(__pyx_v_strineq); if (unlikely((!__pyx_t_10) && PyErr_Occurred())) __PYX_ERR(0, 2470, __pyx_L1_error)
  if (unlikely(__pyx_v_strattr == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
    __PYX_ERR(0, 2470, __pyx_L1_error)
  }
  __pyx_t_11 = __Pyx_PyBytes_AsWritableString(__pyx_v_strattr); if (unlikely((!__pyx_t_11) && PyErr_Occurred())) __PYX_ERR(0, 2470, __pyx_L1_error)
  if (unlikely(__pyx_v_strY == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
    __PYX_ERR(0, 2470, __pyx_L1_error)
  }
  __pyx_t_12 = __Pyx_PyBytes_AsWritableString(__pyx_v_strY); if (unlikely((!__pyx_t_12) && PyErr_Occurred())) __PYX_ERR(0, 2470, __pyx_L1_error)
  if (unlikely(__pyx_v_strYbar == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
    __PYX_ERR(0, 2470, __pyx_L1_error)
  }
  __pyx_t_13 = __Pyx_PyBytes_AsWritableString(__pyx_v_strYbar); if (unlikely((!__pyx_t_13) && PyErr_Occurred())) __PYX_ERR(0, 2470, __pyx_L1_error)

  /* "../../bmi/sympy/DifferentialRing.pyx":2471
 *         L = bmi_c.bmi_dapyx_DenefLipshitz (
 *                     streqns, strineq, strattr, self.dring, strY, strYbar,
 *                     strq, strx, strcontrol,             # <<<<<<<<<<<<<<
 *                     self.notation, strnot, timeout, memout)
 *         if bmi_c.bmi_dapyx_is_error (L):
 */
  if (unlikely(__pyx_v_strq == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
    __PYX_ERR(0, 2471, __pyx_L1_error)
  }
  __pyx_t_14 = __Pyx_PyBytes_AsWritableString(__pyx_v_strq); if (unlikely((!__pyx_t_14) && PyErr_Occurred())) __PYX_ERR(0, 2471, __pyx_L1_error)
  if (unlikely(__pyx_v_strx == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
    __PYX_ERR(0, 2471, __pyx_L1_error)
  }
  __pyx_t_15 = __Pyx_PyBytes_AsWritableString(__pyx_v_strx); if (unlikely((!__pyx_t_15) && PyErr_Occurred())) __PYX_ERR(0, 2471, __pyx_L1_error)
  if (unlikely(__pyx_v_strcontrol == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
    __PYX_ERR(0, 2471, __pyx_L1_error)
  }
  __pyx_t_16 = __Pyx_PyBytes_AsWritableString(__pyx_v_strcontrol); if (unlikely((!__pyx_t_16) && PyErr_Occurred())) __PYX_ERR(0, 2471, __pyx_L1_error)

  /* "../../bmi/sympy/DifferentialRing.pyx":2472
 *                     streqns, strineq, strattr, self.dring, strY, strYbar,
 *                     strq, strx, strcontrol,
 *                     self.notation, strnot, timeout, memout)             # <<<<<<<<<<<<<<
 *         if bmi_c.bmi_dapyx_is_error (L):
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (L)
 */
  if (unlikely(__pyx_v_self->notation == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
    __PYX_ERR(0, 2472, __pyx_L1_error)
  }
  __pyx_t_17 = __Pyx_PyBytes_AsWritableString(__pyx_v_self->notation); if (unlikely((!__pyx_t_17) && PyErr_Occurred())) __PYX_ERR(0, 2472, __pyx_L1_error)
  __pyx_t_18 = __Pyx_PyObject_AsWritableString(__pyx_v_strnot); if (unlikely((!__pyx_t_18) && PyErr_Occurred())) __PYX_ERR(0, 2472, __pyx_L1_error)

  /* "../../bmi/sympy/DifferentialRing.pyx":2469
 * # Actually, the lists L1 and L2 are redundant with respect to L3 and
 * #   should eventually be removed
 *         L = bmi_c.bmi_dapyx_DenefLipshitz (             # <<<<<<<<<<<<<<
 *                     streqns, strineq, strattr, self.dring, strY, strYbar,
 *                     strq, strx, strcontrol,
 */
  __pyx_v_L = bmi_dapyx_DenefLipshitz(__pyx_t_9, __pyx_t_10, __pyx_t_11, __pyx_v_self->dring, __pyx_t_12, __pyx_t_13, __pyx_t_14, __pyx_t_15, __pyx_t_16, __pyx_t_17, __pyx_t_18, __pyx_v_timeout, __pyx_v_memout);

  /* "../../bmi/sympy/DifferentialRing.pyx":2473
 *                     strq, strx, strcontrol,
 *                     self.notation, strnot, timeout, memout)
 *         if bmi_c.bmi_dapyx_is_error (L):             # <<<<<<<<<<<<<<
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (L)
 *             bmi_c.bmi_balsa_clear_ALGEB (L)
 */
  __pyx_t_5 = (bmi_dapyx_is_error(__pyx_v_L) != 0);
  if (unlikely(__pyx_t_5)) {

    /* "../../bmi/sympy/DifferentialRing.pyx":2474
 *                     self.notation, strnot, timeout, memout)
 *         if bmi_c.bmi_dapyx_is_error (L):
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (L)             # <<<<<<<<<<<<<<
 *             bmi_c.bmi_balsa_clear_ALGEB (L)
 *             raise RuntimeError (str (mesgerr, 'utf-8'))
 */
    __pyx_t_2 = __Pyx_PyBytes_FromString(bmi_dapyx_mesgerr(__pyx_v_L)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2474, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_mesgerr = ((PyObject*)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "../../bmi/sympy/DifferentialRing.pyx":2475
 *         if bmi_c.bmi_dapyx_is_error (L):
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (L)
 *             bmi_c.bmi_balsa_clear_ALGEB (L)             # <<<<<<<<<<<<<<
 *             raise RuntimeError (str (mesgerr, 'utf-8'))
 *         L1 = <bmi_c.ALGEB_listof_string>L.value.tab [1]
 */
    bmi_balsa_clear_ALGEB(__pyx_v_L);

    /* "../../bmi/sympy/DifferentialRing.pyx":2476
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (L)
 *             bmi_c.bmi_balsa_clear_ALGEB (L)
 *             raise RuntimeError (str (mesgerr, 'utf-8'))             # <<<<<<<<<<<<<<
 *         L1 = <bmi_c.ALGEB_listof_string>L.value.tab [1]
 *         L2 = <bmi_c.ALGEB_list>L.value.tab [2]
 */
    __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2476, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_v_mesgerr);
    __Pyx_GIVEREF(__pyx_v_mesgerr);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_mesgerr)) __PYX_ERR(0, 2476, __pyx_L1_error);
    __Pyx_INCREF(__pyx_kp_u_utf_8);
    __Pyx_GIVEREF(__pyx_kp_u_utf_8);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_kp_u_utf_8)) __PYX_ERR(0, 2476, __pyx_L1_error);
    __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)(&PyUnicode_Type)), __pyx_t_2, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2476, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_RuntimeError, __pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2476, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(0, 2476, __pyx_L1_error)

    /* "../../bmi/sympy/DifferentialRing.pyx":2473
 *                     strq, strx, strcontrol,
 *                     self.notation, strnot, timeout, memout)
 *         if bmi_c.bmi_dapyx_is_error (L):             # <<<<<<<<<<<<<<
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (L)
 *             bmi_c.bmi_balsa_clear_ALGEB (L)
 */
  }

  /* "../../bmi/sympy/DifferentialRing.pyx":2477
 *             bmi_c.bmi_balsa_clear_ALGEB (L)
 *             raise RuntimeError (str (mesgerr, 'utf-8'))
 *         L1 = <bmi_c.ALGEB_listof_string>L.value.tab [1]             # <<<<<<<<<<<<<<
 *         L2 = <bmi_c.ALGEB_list>L.value.tab [2]
 *         L3 = <bmi_c.ALGEB_list>L.value.tab [3]
 */
  __pyx_v_L1 = ((ALGEB_listof_string)(__pyx_v_L->value->tab[1]));

  /* "../../bmi/sympy/DifferentialRing.pyx":2478
 *             raise RuntimeError (str (mesgerr, 'utf-8'))
 *         L1 = <bmi_c.ALGEB_listof_string>L.value.tab [1]
 *         L2 = <bmi_c.ALGEB_list>L.value.tab [2]             # <<<<<<<<<<<<<<
 *         L3 = <bmi_c.ALGEB_list>L.value.tab [3]
 *         result = []
 */
  __pyx_v_L2 = ((ALGEB_list)(__pyx_v_L->value->tab[2]));

  /* "../../bmi/sympy/DifferentialRing.pyx":2479
 *         L1 = <bmi_c.ALGEB_listof_string>L.value.tab [1]
 *         L2 = <bmi_c.ALGEB_list>L.value.tab [2]
 *         L3 = <bmi_c.ALGEB_list>L.value.tab [3]             # <<<<<<<<<<<<<<
 *         result = []
 *         for i in range (1, L1.value.size) :
 */
  __pyx_v_L3 = ((ALGEB_list)(__pyx_v_L->value->tab[3]));

  /* "../../bmi/sympy/DifferentialRing.pyx":2480
 *         L2 = <bmi_c.ALGEB_list>L.value.tab [2]
 *         L3 = <bmi_c.ALGEB_list>L.value.tab [3]
 *         result = []             # <<<<<<<<<<<<<<
 *         for i in range (1, L1.value.size) :
 *             M = eval (L1.value.tab[i].value, globals (), self.evdict)
 */
  __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2480, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_result = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "../../bmi/sympy/DifferentialRing.pyx":2481
 *         L3 = <bmi_c.ALGEB_list>L.value.tab [3]
 *         result = []
 *         for i in range (1, L1.value.size) :             # <<<<<<<<<<<<<<
 *             M = eval (L1.value.tab[i].value, globals (), self.evdict)
 * # The RegularDifferentialChain class contains a raw pointer which cannot
 */
  __pyx_t_19 = __pyx_v_L1->value->size;
  __pyx_t_20 = __pyx_t_19;
  for (__pyx_t_21 = 1; __pyx_t_21 < __pyx_t_20; __pyx_t_21+=1) {
    __pyx_v_i = __pyx_t_21;

    /* "../../bmi/sympy/DifferentialRing.pyx":2482
 *         result = []
 *         for i in range (1, L1.value.size) :
 *             M = eval (L1.value.tab[i].value, globals (), self.evdict)             # <<<<<<<<<<<<<<
 * # The RegularDifferentialChain class contains a raw pointer which cannot
 * #   be passed to a Python function as an argument. Thus ...
 */
    __pyx_t_2 = __Pyx_PyBytes_FromString((__pyx_v_L1->value->tab[__pyx_v_i])->value); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2482, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_6 = __Pyx_Globals(); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2482, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2482, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2)) __PYX_ERR(0, 2482, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_6);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_6)) __PYX_ERR(0, 2482, __pyx_L1_error);
    __Pyx_INCREF(__pyx_v_self->evdict);
    __Pyx_GIVEREF(__pyx_v_self->evdict);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_self->evdict)) __PYX_ERR(0, 2482, __pyx_L1_error);
    __pyx_t_2 = 0;
    __pyx_t_6 = 0;
    __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_eval, __pyx_t_3, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2482, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (!(likely(PyList_CheckExact(__pyx_t_6))||((__pyx_t_6) == Py_None) || __Pyx_RaiseUnexpectedTypeError("list", __pyx_t_6))) __PYX_ERR(0, 2482, __pyx_L1_error)
    __Pyx_DECREF_SET(__pyx_v_M, ((PyObject*)__pyx_t_6));
    __pyx_t_6 = 0;

    /* "../../bmi/sympy/DifferentialRing.pyx":2485
 * # The RegularDifferentialChain class contains a raw pointer which cannot
 * #   be passed to a Python function as an argument. Thus ...
 *             C = RegularDifferentialChain.__new__ (RegularDifferentialChain)             # <<<<<<<<<<<<<<
 *             C.dring = self
 *             C.notation = strnot
 */
    __pyx_t_6 = ((PyObject *)__pyx_tp_new_19DifferentialAlgebra_RegularDifferentialChain(((PyTypeObject *)__pyx_ptype_19DifferentialAlgebra_RegularDifferentialChain), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2485, __pyx_L1_error)
    __Pyx_GOTREF((PyObject *)__pyx_t_6);
    __Pyx_XDECREF_SET(__pyx_v_C, ((struct __pyx_obj_19DifferentialAlgebra_RegularDifferentialChain *)__pyx_t_6));
    __pyx_t_6 = 0;

    /* "../../bmi/sympy/DifferentialRing.pyx":2486
 * #   be passed to a Python function as an argument. Thus ...
 *             C = RegularDifferentialChain.__new__ (RegularDifferentialChain)
 *             C.dring = self             # <<<<<<<<<<<<<<
 *             C.notation = strnot
 *             C.evdict = self.evdict
 */
    __Pyx_INCREF((PyObject *)__pyx_v_self);
    __Pyx_GIVEREF((PyObject *)__pyx_v_self);
    __Pyx_GOTREF((PyObject *)__pyx_v_C->dring);
    __Pyx_DECREF((PyObject *)__pyx_v_C->dring);
    __pyx_v_C->dring = __pyx_v_self;

    /* "../../bmi/sympy/DifferentialRing.pyx":2487
 *             C = RegularDifferentialChain.__new__ (RegularDifferentialChain)
 *             C.dring = self
 *             C.notation = strnot             # <<<<<<<<<<<<<<
 *             C.evdict = self.evdict
 *             C.regchain = L2.value.tab[i]
 */
    __Pyx_INCREF(__pyx_v_strnot);
    __Pyx_GIVEREF(__pyx_v_strnot);
    __Pyx_GOTREF(__pyx_v_C->notation);
    __Pyx_DECREF(__pyx_v_C->notation);
    __pyx_v_C->notation = __pyx_v_strnot;

    /* "../../bmi/sympy/DifferentialRing.pyx":2488
 *             C.dring = self
 *             C.notation = strnot
 *             C.evdict = self.evdict             # <<<<<<<<<<<<<<
 *             C.regchain = L2.value.tab[i]
 *             bmi_c.bmi_balsa_increment_nbref (C.regchain)
 */
    __pyx_t_6 = __pyx_v_self->evdict;
    __Pyx_INCREF(__pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_6);
    __Pyx_GOTREF(__pyx_v_C->evdict);
    __Pyx_DECREF(__pyx_v_C->evdict);
    __pyx_v_C->evdict = __pyx_t_6;
    __pyx_t_6 = 0;

    /* "../../bmi/sympy/DifferentialRing.pyx":2489
 *             C.notation = strnot
 *             C.evdict = self.evdict
 *             C.regchain = L2.value.tab[i]             # <<<<<<<<<<<<<<
 *             bmi_c.bmi_balsa_increment_nbref (C.regchain)
 * # Same remark for the DenefLipshitzUple class
 */
    __pyx_v_C->regchain = (__pyx_v_L2->value->tab[__pyx_v_i]);

    /* "../../bmi/sympy/DifferentialRing.pyx":2490
 *             C.evdict = self.evdict
 *             C.regchain = L2.value.tab[i]
 *             bmi_c.bmi_balsa_increment_nbref (C.regchain)             # <<<<<<<<<<<<<<
 * # Same remark for the DenefLipshitzUple class
 *             U = DenefLipshitzUple.__new__ (DenefLipshitzUple)
 */
    bmi_balsa_increment_nbref(__pyx_v_C->regchain);

    /* "../../bmi/sympy/DifferentialRing.pyx":2492
 *             bmi_c.bmi_balsa_increment_nbref (C.regchain)
 * # Same remark for the DenefLipshitzUple class
 *             U = DenefLipshitzUple.__new__ (DenefLipshitzUple)             # <<<<<<<<<<<<<<
 * #
 *             U.Y = M[0]
 */
    __pyx_t_6 = ((PyObject *)__pyx_tp_new_19DifferentialAlgebra_DenefLipshitzUple(((PyTypeObject *)__pyx_ptype_19DifferentialAlgebra_DenefLipshitzUple), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2492, __pyx_L1_error)
    __Pyx_GOTREF((PyObject *)__pyx_t_6);
    __Pyx_XDECREF_SET(__pyx_v_U, ((struct __pyx_obj_19DifferentialAlgebra_DenefLipshitzUple *)__pyx_t_6));
    __pyx_t_6 = 0;

    /* "../../bmi/sympy/DifferentialRing.pyx":2494
 *             U = DenefLipshitzUple.__new__ (DenefLipshitzUple)
 * #
 *             U.Y = M[0]             # <<<<<<<<<<<<<<
 *             U.Ybar = M[1]
 *             U.x = M[2]
 */
    if (unlikely(__pyx_v_M == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(0, 2494, __pyx_L1_error)
    }
    __pyx_t_6 = __Pyx_GetItemInt_List(__pyx_v_M, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2494, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    if (!(likely(PyList_CheckExact(__pyx_t_6))||((__pyx_t_6) == Py_None) || __Pyx_RaiseUnexpectedTypeError("list", __pyx_t_6))) __PYX_ERR(0, 2494, __pyx_L1_error)
    __Pyx_GIVEREF(__pyx_t_6);
    __Pyx_GOTREF(__pyx_v_U->Y);
    __Pyx_DECREF(__pyx_v_U->Y);
    __pyx_v_U->Y = ((PyObject*)__pyx_t_6);
    __pyx_t_6 = 0;

    /* "../../bmi/sympy/DifferentialRing.pyx":2495
 * #
 *             U.Y = M[0]
 *             U.Ybar = M[1]             # <<<<<<<<<<<<<<
 *             U.x = M[2]
 *             U.order = M[3]
 */
    if (unlikely(__pyx_v_M == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(0, 2495, __pyx_L1_error)
    }
    __pyx_t_6 = __Pyx_GetItemInt_List(__pyx_v_M, 1, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2495, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_6);
    __Pyx_GOTREF(__pyx_v_U->Ybar);
    __Pyx_DECREF(__pyx_v_U->Ybar);
    __pyx_v_U->Ybar = __pyx_t_6;
    __pyx_t_6 = 0;

    /* "../../bmi/sympy/DifferentialRing.pyx":2496
 *             U.Y = M[0]
 *             U.Ybar = M[1]
 *             U.x = M[2]             # <<<<<<<<<<<<<<
 *             U.order = M[3]
 *             U.kappa = M[4]
 */
    if (unlikely(__pyx_v_M == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(0, 2496, __pyx_L1_error)
    }
    __pyx_t_6 = __Pyx_GetItemInt_List(__pyx_v_M, 2, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2496, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_6);
    __Pyx_GOTREF(__pyx_v_U->x);
    __Pyx_DECREF(__pyx_v_U->x);
    __pyx_v_U->x = __pyx_t_6;
    __pyx_t_6 = 0;

    /* "../../bmi/sympy/DifferentialRing.pyx":2497
 *             U.Ybar = M[1]
 *             U.x = M[2]
 *             U.order = M[3]             # <<<<<<<<<<<<<<
 *             U.kappa = M[4]
 *             U.C = C
 */
    if (unlikely(__pyx_v_M == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(0, 2497, __pyx_L1_error)
    }
    __pyx_t_6 = __Pyx_GetItemInt_List(__pyx_v_M, 3, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2497, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    if (!(likely(PyList_CheckExact(__pyx_t_6))||((__pyx_t_6) == Py_None) || __Pyx_RaiseUnexpectedTypeError("list", __pyx_t_6))) __PYX_ERR(0, 2497, __pyx_L1_error)
    __Pyx_GIVEREF(__pyx_t_6);
    __Pyx_GOTREF(__pyx_v_U->order);
    __Pyx_DECREF(__pyx_v_U->order);
    __pyx_v_U->order = ((PyObject*)__pyx_t_6);
    __pyx_t_6 = 0;

    /* "../../bmi/sympy/DifferentialRing.pyx":2498
 *             U.x = M[2]
 *             U.order = M[3]
 *             U.kappa = M[4]             # <<<<<<<<<<<<<<
 *             U.C = C
 *             U.S = M[5]
 */
    if (unlikely(__pyx_v_M == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(0, 2498, __pyx_L1_error)
    }
    __pyx_t_6 = __Pyx_GetItemInt_List(__pyx_v_M, 4, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2498, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    if (!(likely(PyList_CheckExact(__pyx_t_6))||((__pyx_t_6) == Py_None) || __Pyx_RaiseUnexpectedTypeError("list", __pyx_t_6))) __PYX_ERR(0, 2498, __pyx_L1_error)
    __Pyx_GIVEREF(__pyx_t_6);
    __Pyx_GOTREF(__pyx_v_U->kappa);
    __Pyx_DECREF(__pyx_v_U->kappa);
    __pyx_v_U->kappa = ((PyObject*)__pyx_t_6);
    __pyx_t_6 = 0;

    /* "../../bmi/sympy/DifferentialRing.pyx":2499
 *             U.order = M[3]
 *             U.kappa = M[4]
 *             U.C = C             # <<<<<<<<<<<<<<
 *             U.S = M[5]
 *             U.k = M[6]
 */
    __Pyx_INCREF((PyObject *)__pyx_v_C);
    __Pyx_GIVEREF((PyObject *)__pyx_v_C);
    __Pyx_GOTREF((PyObject *)__pyx_v_U->C);
    __Pyx_DECREF((PyObject *)__pyx_v_U->C);
    __pyx_v_U->C = __pyx_v_C;

    /* "../../bmi/sympy/DifferentialRing.pyx":2500
 *             U.kappa = M[4]
 *             U.C = C
 *             U.S = M[5]             # <<<<<<<<<<<<<<
 *             U.k = M[6]
 *             U.r = M[7]
 */
    if (unlikely(__pyx_v_M == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(0, 2500, __pyx_L1_error)
    }
    __pyx_t_6 = __Pyx_GetItemInt_List(__pyx_v_M, 5, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2500, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    if (!(likely(PyList_CheckExact(__pyx_t_6))||((__pyx_t_6) == Py_None) || __Pyx_RaiseUnexpectedTypeError("list", __pyx_t_6))) __PYX_ERR(0, 2500, __pyx_L1_error)
    __Pyx_GIVEREF(__pyx_t_6);
    __Pyx_GOTREF(__pyx_v_U->S);
    __Pyx_DECREF(__pyx_v_U->S);
    __pyx_v_U->S = ((PyObject*)__pyx_t_6);
    __pyx_t_6 = 0;

    /* "../../bmi/sympy/DifferentialRing.pyx":2501
 *             U.C = C
 *             U.S = M[5]
 *             U.k = M[6]             # <<<<<<<<<<<<<<
 *             U.r = M[7]
 *             U.q = M[8]
 */
    if (unlikely(__pyx_v_M == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(0, 2501, __pyx_L1_error)
    }
    __pyx_t_6 = __Pyx_GetItemInt_List(__pyx_v_M, 6, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2501, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    if (!(likely(PyList_CheckExact(__pyx_t_6))||((__pyx_t_6) == Py_None) || __Pyx_RaiseUnexpectedTypeError("list", __pyx_t_6))) __PYX_ERR(0, 2501, __pyx_L1_error)
    __Pyx_GIVEREF(__pyx_t_6);
    __Pyx_GOTREF(__pyx_v_U->k);
    __Pyx_DECREF(__pyx_v_U->k);
    __pyx_v_U->k = ((PyObject*)__pyx_t_6);
    __pyx_t_6 = 0;

    /* "../../bmi/sympy/DifferentialRing.pyx":2502
 *             U.S = M[5]
 *             U.k = M[6]
 *             U.r = M[7]             # <<<<<<<<<<<<<<
 *             U.q = M[8]
 *             U.A = M[9]
 */
    if (unlikely(__pyx_v_M == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(0, 2502, __pyx_L1_error)
    }
    __pyx_t_6 = __Pyx_GetItemInt_List(__pyx_v_M, 7, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2502, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    if (!(likely(PyList_CheckExact(__pyx_t_6))||((__pyx_t_6) == Py_None) || __Pyx_RaiseUnexpectedTypeError("list", __pyx_t_6))) __PYX_ERR(0, 2502, __pyx_L1_error)
    __Pyx_GIVEREF(__pyx_t_6);
    __Pyx_GOTREF(__pyx_v_U->r);
    __Pyx_DECREF(__pyx_v_U->r);
    __pyx_v_U->r = ((PyObject*)__pyx_t_6);
    __pyx_t_6 = 0;

    /* "../../bmi/sympy/DifferentialRing.pyx":2503
 *             U.k = M[6]
 *             U.r = M[7]
 *             U.q = M[8]             # <<<<<<<<<<<<<<
 *             U.A = M[9]
 *             U.gamma = M[10]
 */
    if (unlikely(__pyx_v_M == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(0, 2503, __pyx_L1_error)
    }
    __pyx_t_6 = __Pyx_GetItemInt_List(__pyx_v_M, 8, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2503, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_6);
    __Pyx_GOTREF(__pyx_v_U->q);
    __Pyx_DECREF(__pyx_v_U->q);
    __pyx_v_U->q = __pyx_t_6;
    __pyx_t_6 = 0;

    /* "../../bmi/sympy/DifferentialRing.pyx":2504
 *             U.r = M[7]
 *             U.q = M[8]
 *             U.A = M[9]             # <<<<<<<<<<<<<<
 *             U.gamma = M[10]
 *             U.mu = M[11]
 */
    if (unlikely(__pyx_v_M == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(0, 2504, __pyx_L1_error)
    }
    __pyx_t_6 = __Pyx_GetItemInt_List(__pyx_v_M, 9, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2504, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    if (!(likely(PyList_CheckExact(__pyx_t_6))||((__pyx_t_6) == Py_None) || __Pyx_RaiseUnexpectedTypeError("list", __pyx_t_6))) __PYX_ERR(0, 2504, __pyx_L1_error)
    __Pyx_GIVEREF(__pyx_t_6);
    __Pyx_GOTREF(__pyx_v_U->A);
    __Pyx_DECREF(__pyx_v_U->A);
    __pyx_v_U->A = ((PyObject*)__pyx_t_6);
    __pyx_t_6 = 0;

    /* "../../bmi/sympy/DifferentialRing.pyx":2505
 *             U.q = M[8]
 *             U.A = M[9]
 *             U.gamma = M[10]             # <<<<<<<<<<<<<<
 *             U.mu = M[11]
 *             U.sigma = M[12]
 */
    if (unlikely(__pyx_v_M == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(0, 2505, __pyx_L1_error)
    }
    __pyx_t_6 = __Pyx_GetItemInt_List(__pyx_v_M, 10, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2505, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    if (!(likely(PyList_CheckExact(__pyx_t_6))||((__pyx_t_6) == Py_None) || __Pyx_RaiseUnexpectedTypeError("list", __pyx_t_6))) __PYX_ERR(0, 2505, __pyx_L1_error)
    __Pyx_GIVEREF(__pyx_t_6);
    __Pyx_GOTREF(__pyx_v_U->gamma);
    __Pyx_DECREF(__pyx_v_U->gamma);
    __pyx_v_U->gamma = ((PyObject*)__pyx_t_6);
    __pyx_t_6 = 0;

    /* "../../bmi/sympy/DifferentialRing.pyx":2506
 *             U.A = M[9]
 *             U.gamma = M[10]
 *             U.mu = M[11]             # <<<<<<<<<<<<<<
 *             U.sigma = M[12]
 *             U.beta = M[13]
 */
    if (unlikely(__pyx_v_M == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(0, 2506, __pyx_L1_error)
    }
    __pyx_t_6 = __Pyx_GetItemInt_List(__pyx_v_M, 11, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2506, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    if (!(likely(PyList_CheckExact(__pyx_t_6))||((__pyx_t_6) == Py_None) || __Pyx_RaiseUnexpectedTypeError("list", __pyx_t_6))) __PYX_ERR(0, 2506, __pyx_L1_error)
    __Pyx_GIVEREF(__pyx_t_6);
    __Pyx_GOTREF(__pyx_v_U->mu);
    __Pyx_DECREF(__pyx_v_U->mu);
    __pyx_v_U->mu = ((PyObject*)__pyx_t_6);
    __pyx_t_6 = 0;

    /* "../../bmi/sympy/DifferentialRing.pyx":2507
 *             U.gamma = M[10]
 *             U.mu = M[11]
 *             U.sigma = M[12]             # <<<<<<<<<<<<<<
 *             U.beta = M[13]
 *             U.delta = M[14]
 */
    if (unlikely(__pyx_v_M == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(0, 2507, __pyx_L1_error)
    }
    __pyx_t_6 = __Pyx_GetItemInt_List(__pyx_v_M, 12, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2507, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    if (!(likely(PyList_CheckExact(__pyx_t_6))||((__pyx_t_6) == Py_None) || __Pyx_RaiseUnexpectedTypeError("list", __pyx_t_6))) __PYX_ERR(0, 2507, __pyx_L1_error)
    __Pyx_GIVEREF(__pyx_t_6);
    __Pyx_GOTREF(__pyx_v_U->sigma);
    __Pyx_DECREF(__pyx_v_U->sigma);
    __pyx_v_U->sigma = ((PyObject*)__pyx_t_6);
    __pyx_t_6 = 0;

    /* "../../bmi/sympy/DifferentialRing.pyx":2508
 *             U.mu = M[11]
 *             U.sigma = M[12]
 *             U.beta = M[13]             # <<<<<<<<<<<<<<
 *             U.delta = M[14]
 * #
 */
    if (unlikely(__pyx_v_M == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(0, 2508, __pyx_L1_error)
    }
    __pyx_t_6 = __Pyx_GetItemInt_List(__pyx_v_M, 13, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2508, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    if (!(likely(PyList_CheckExact(__pyx_t_6))||((__pyx_t_6) == Py_None) || __Pyx_RaiseUnexpectedTypeError("list", __pyx_t_6))) __PYX_ERR(0, 2508, __pyx_L1_error)
    __Pyx_GIVEREF(__pyx_t_6);
    __Pyx_GOTREF(__pyx_v_U->beta);
    __Pyx_DECREF(__pyx_v_U->beta);
    __pyx_v_U->beta = ((PyObject*)__pyx_t_6);
    __pyx_t_6 = 0;

    /* "../../bmi/sympy/DifferentialRing.pyx":2509
 *             U.sigma = M[12]
 *             U.beta = M[13]
 *             U.delta = M[14]             # <<<<<<<<<<<<<<
 * #
 *             U.notation = strnot
 */
    if (unlikely(__pyx_v_M == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(0, 2509, __pyx_L1_error)
    }
    __pyx_t_6 = __Pyx_GetItemInt_List(__pyx_v_M, 14, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2509, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    if (!(likely(PyList_CheckExact(__pyx_t_6))||((__pyx_t_6) == Py_None) || __Pyx_RaiseUnexpectedTypeError("list", __pyx_t_6))) __PYX_ERR(0, 2509, __pyx_L1_error)
    __Pyx_GIVEREF(__pyx_t_6);
    __Pyx_GOTREF(__pyx_v_U->delta);
    __Pyx_DECREF(__pyx_v_U->delta);
    __pyx_v_U->delta = ((PyObject*)__pyx_t_6);
    __pyx_t_6 = 0;

    /* "../../bmi/sympy/DifferentialRing.pyx":2511
 *             U.delta = M[14]
 * #
 *             U.notation = strnot             # <<<<<<<<<<<<<<
 *             U.dring = self
 *             U.evdict = self.evdict
 */
    __Pyx_INCREF(__pyx_v_strnot);
    __Pyx_GIVEREF(__pyx_v_strnot);
    __Pyx_GOTREF(__pyx_v_U->notation);
    __Pyx_DECREF(__pyx_v_U->notation);
    __pyx_v_U->notation = __pyx_v_strnot;

    /* "../../bmi/sympy/DifferentialRing.pyx":2512
 * #
 *             U.notation = strnot
 *             U.dring = self             # <<<<<<<<<<<<<<
 *             U.evdict = self.evdict
 * #
 */
    __Pyx_INCREF((PyObject *)__pyx_v_self);
    __Pyx_GIVEREF((PyObject *)__pyx_v_self);
    __Pyx_GOTREF((PyObject *)__pyx_v_U->dring);
    __Pyx_DECREF((PyObject *)__pyx_v_U->dring);
    __pyx_v_U->dring = __pyx_v_self;

    /* "../../bmi/sympy/DifferentialRing.pyx":2513
 *             U.notation = strnot
 *             U.dring = self
 *             U.evdict = self.evdict             # <<<<<<<<<<<<<<
 * #
 *             U.DLuple = L3.value.tab[i]
 */
    __pyx_t_6 = __pyx_v_self->evdict;
    __Pyx_INCREF(__pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_6);
    __Pyx_GOTREF(__pyx_v_U->evdict);
    __Pyx_DECREF(__pyx_v_U->evdict);
    __pyx_v_U->evdict = __pyx_t_6;
    __pyx_t_6 = 0;

    /* "../../bmi/sympy/DifferentialRing.pyx":2515
 *             U.evdict = self.evdict
 * #
 *             U.DLuple = L3.value.tab[i]             # <<<<<<<<<<<<<<
 *             bmi_c.bmi_balsa_increment_nbref (U.DLuple)
 * #
 */
    __pyx_v_U->DLuple = (__pyx_v_L3->value->tab[__pyx_v_i]);

    /* "../../bmi/sympy/DifferentialRing.pyx":2516
 * #
 *             U.DLuple = L3.value.tab[i]
 *             bmi_c.bmi_balsa_increment_nbref (U.DLuple)             # <<<<<<<<<<<<<<
 * #
 *             result.append (U)
 */
    bmi_balsa_increment_nbref(__pyx_v_U->DLuple);

    /* "../../bmi/sympy/DifferentialRing.pyx":2518
 *             bmi_c.bmi_balsa_increment_nbref (U.DLuple)
 * #
 *             result.append (U)             # <<<<<<<<<<<<<<
 *         bmi_c.bmi_balsa_clear_ALGEB (L)
 *         return result
 */
    __pyx_t_22 = __Pyx_PyList_Append(__pyx_v_result, ((PyObject *)__pyx_v_U)); if (unlikely(__pyx_t_22 == ((int)-1))) __PYX_ERR(0, 2518, __pyx_L1_error)
  }

  /* "../../bmi/sympy/DifferentialRing.pyx":2519
 * #
 *             result.append (U)
 *         bmi_c.bmi_balsa_clear_ALGEB (L)             # <<<<<<<<<<<<<<
 *         return result
 * 
 */
  bmi_balsa_clear_ALGEB(__pyx_v_L);

  /* "../../bmi/sympy/DifferentialRing.pyx":2520
 *             result.append (U)
 *         bmi_c.bmi_balsa_clear_ALGEB (L)
 *         return result             # <<<<<<<<<<<<<<
 * 
 * # RosenfeldGroebner
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_result);
  __pyx_r = __pyx_v_result;
  goto __pyx_L0;

  /* "../../bmi/sympy/DifferentialRing.pyx":2252
 * 
 * # DenefLipshitz
 *     def DenefLipshitz (             # <<<<<<<<<<<<<<
 *             self,
 *             equations,
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("DifferentialAlgebra.DifferentialRing.DenefLipshitz", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XDECREF(__pyx_v_eqns);
  __Pyx_XDECREF(__pyx_v_ineq);
  __Pyx_XDECREF(__pyx_v_M);
  __Pyx_XDECREF((PyObject *)__pyx_v_U);
  __Pyx_XDECREF((PyObject *)__pyx_v_C);
  __Pyx_XDECREF(__pyx_v_mesgerr);
  __Pyx_XDECREF(__pyx_v_streqns);
  __Pyx_XDECREF(__pyx_v_strineq);
  __Pyx_XDECREF(__pyx_v_strattr);
  __Pyx_XDECREF(__pyx_v_strY);
  __Pyx_XDECREF(__pyx_v_strYbar);
  __Pyx_XDECREF(__pyx_v_strq);
  __Pyx_XDECREF(__pyx_v_strx);
  __Pyx_XDECREF(__pyx_v_strcontrol);
  __Pyx_XDECREF(__pyx_v_strnot);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "../../bmi/sympy/DifferentialRing.pyx":2523
 * 
 * # RosenfeldGroebner
 *     def RosenfeldGroebner (             # <<<<<<<<<<<<<<
 *             self,
 *             equations,
 */

/* Python wrapper */
static PyObject *__pyx_pw_19DifferentialAlgebra_16DifferentialRing_55RosenfeldGroebner(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_19DifferentialAlgebra_16DifferentialRing_54RosenfeldGroebner, "\n        The Rosenfeld-Groebner simplifier\n\n        INPUT:\n\n            `equations`  -- a list of differential polynomials, \n                              polynomial equations or inequations\n            `basefield`  -- (default: None) a BaseFieldExtension\n            `attributes` -- (default: ['differential', 'autoreduced', \n                              'primitive', 'squarefree', 'normalized', \n                              'coherent']) a list of strings\n            `singsol`    -- (default: 'all') a string\n            `dimlb`      -- (default: 'safecase') a string\n            `notation`   -- (default: 'undefined') a string\n            `timeout`    -- (default: 0) a nonnegative integer\n            `memout`     -- (default: 0) a nonnegative integer\n\n        OUTPUT:\n\n            A representation of the radical of the differential ideal\n            generated by `equations` (assuming, for simplicity, that\n            `equations` only involves differential polynomials), as an\n            intersection of radical differential ideals, presented by\n            regular differential chains, with respect to the ranking\n            of the DifferentialRing.\n\n            The list `equations` may involve differential polynomials,\n            differential rational fractions, and, even relational\n            expressions between differential rational fractions,\n            built using the '==' and '!=' operators. In the presence\n            of inequations (denominators of rational fractions, or\n            relational expression built using '!='), the defined ideal\n            is the radical of the differential ideal generated by the\n            equations of `equations`, saturated by the multiplicative\n            family generated by the inequations of `equations`.\n\n            If `basefield` is not specified, then any case implying a\n            relations between independent variables is discarded. If\n            `basefield` is specified, then, m""oreover, any case implying\n            the vanishing of some nonzero element of `basefield`\n            is discarded also.\n\n            The returned list may be empty, meaning the ideal is the\n            unit one and that `equations` has no solution.\n\n            If `equations` is empty then the output involves a single\n            regular differential chain, which describes the zero ideal.\n\n            The optional parameter `attributes` permit to specify\n            the attributes of the regular differential chains to\n            be computed.\n\n            The optional parameter `singsol` = 'all', 'essential',\n            'none'.  It controls the splittings performed by\n            RosenfeldGroebner.\n\n                - 'all' is the default value.\n\n                - 'essential' ensures that the returned decomposition is\n                  irredundant. It only applies in the case of a single\n                  equation, without any parameter.\n\n                - 'none' makes RosenfeldGroebner return at most one\n                   regular differential chain. This chain is the first\n                   one that would have been computed without this\n                   option. In many cases, this first chain could be\n                   considered as the general component, though this\n                   notion is not always mathematically well-defined.\n\n            The optional parameter `dimlb` = 'nocase', 'safecase',\n            'odecase', 'pdecase' controls the splittings performed by\n            RosenfeldGroebner by discarding any chain whose dimension\n            (differential dimension in the differential case) is lower\n            than the number of input equations.\n\n                - 'nocase' disables this option.\n\n                - 'safecase' is the default value. The option is only\n                  activated in the non-differential case and in the\n                  case of a single input equation. These two cases\n         ""         are theoretically proven.\n\n                - 'odecase' applies also the option to general ODE\n                  systems. The option implements a conjecture in this\n                  case (see Ritt, Questions for investigation, 10).\n\n                - 'pdecase' applies also the option to general PDE\n                  systems. The option implements a conjecture in this\n                  case. It is experimental.\n\n            If not defined using `notation`, the default notation of\n            the returned regular differential chains is the one of\n            the DifferentialRing.\n\n            `timeout` and `memout` permit to limit in seconds and\n            megabytes, the resources allowed for the computation.\n\n        NOTES:\n\n            The first version of the RosenfeldGroebner algorithm\n            appeared in 1994. It benefited from many improvements,\n            coming from many different people. The current version\n            is close to the one described in [Boulier06]. It does not\n            rely on any Gr\303\266bner basis computation.\n\n            The RosenfeldGroebner method contains also an implementation\n            of the Low Power Theorem, which is a major result of Ritt\n            and Kolchin. See also [Hubert99]. The implemented version\n            applies over differential base fields defined by generators\n            and relations.\n\n        REFERENCES:\n\n            [Boulier06] Fran\303\247ois Boulier. R\303\251\303\251criture alg\303\251brique dans\n            les syst\303\250mes d'\303\251quations diff\303\251rentielles polynomiales\n            en vue d'application dans les Sciences du Vivant. M\303\251moire\n            d'Habilitation \303\240 Diriger les Recherches. Universit\303\251\n            Lille I.  2006. http://tel.archives-ouvertes.fr/tel-00137153\n\n            [Hubert99] \303\211velyne Hubert. Essential Components of an\n            Algebraic Differential Equation. Journal of Symbolic""\n            Computation 28(4-5), pp. 657-680. 1999.\n\n        EXAMPLES:\n\n        The first example features one nonlinear ODE. According to the\n        Low Power Theorem, its solution y(x) = 0 is a singular solution:\n\n            >>> from sympy import *\n            >>> from DifferentialAlgebra import *\n            >>> init_printing (use_unicode = False, num_columns = 60)\n\n            >>> x = var('x')\n            >>> y = function ('y')\n            >>> R = DifferentialRing (derivations = [x], blocks = [y])\n            >>> L = R.RosenfeldGroebner (\n            ...         [Derivative(y(x),x)**2-4*y(x)], \n            ...         singsol = 'essential')\n            >>> L\n            [regular_differential_chain, regular_differential_chain]\n\n            >>> [C.equations () for C in L]\n                                  2          \n                        /d       \\           \n            [[-4*y(x) + |--(y(x))| ], [y(x)]]\n                        \\dx      /           \n\n        The second example features a system on nonlinear PDE. This\n        academic example illustrates what a system of differential\n        polynomials may look like, in general. Some integrability\n        conditions are computed:\n\n            >>> from DifferentialAlgebra import DifferentialRing\n            >>> x,y = var('x,y')\n            >>> u,v = function('u,v')\n            >>> R = DifferentialRing (derivations = [x,y], \n            ...             blocks = [[v,u]])\n            >>> eq1 = Derivative(u(x,y),x)**2 - 4*u(x,y)\n            >>> eq2 = Derivative(Derivative(u(x,y),x),y) * \\\n            ...                     Derivative(v(x,y),y) - u(x,y) + 1\n            >>> eq3 = Derivative(Derivative(v(x,y),x),x) - \\\n            ...                     Derivative(u(x,y),x)\n            >>> L = R.RosenfeldGroebner ([eq1, eq2, eq3])\n            >>> L\n            [regular_differential_chain]\n\n            >>> L[0].equations ()\n                                       2 ""                           2  >\n                          /d          \\                /d          \\   >\n            [-2*u(x, y) + |--(u(x, y))| , -4*u(x, y) + |--(u(x, y))| , >\n                          \\dy         /                \\dx         /   >\n                                                                       >\n            |  \n            >                                                          >\n            >            d           d                       d         >\n            >  - u(x, y)*--(u(x, y))*--(u(x, y)) + 4*u(x, y)*--(v(x, y >\n            >            dx          dy                      dy        >\n            >                                                          >\n            |  \n            >                                                2         >\n            >      d           d              d             d          >\n            > )) + --(u(x, y))*--(u(x, y)), - --(u(x, y)) + ---(v(x, y >\n            >      dx          dy             dx              2        >\n            >                                               dx         >\n            |  \n            >    \n            >    \n            > ))]\n            >    \n            >    \n        ");
static PyMethodDef __pyx_mdef_19DifferentialAlgebra_16DifferentialRing_55RosenfeldGroebner = {"RosenfeldGroebner", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_19DifferentialAlgebra_16DifferentialRing_55RosenfeldGroebner, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_19DifferentialAlgebra_16DifferentialRing_54RosenfeldGroebner};
static PyObject *__pyx_pw_19DifferentialAlgebra_16DifferentialRing_55RosenfeldGroebner(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_equations = 0;
  struct __pyx_obj_19DifferentialAlgebra_BaseFieldExtension *__pyx_v_basefield = 0;
  PyObject *__pyx_v_attributes = 0;
  PyObject *__pyx_v_singsol = 0;
  PyObject *__pyx_v_dimlb = 0;
  PyObject *__pyx_v_notation = 0;
  int __pyx_v_timeout;
  int __pyx_v_memout;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[8] = {0,0,0,0,0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("RosenfeldGroebner (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_equations,&__pyx_n_s_basefield,&__pyx_n_s_attributes,&__pyx_n_s_singsol,&__pyx_n_s_dimlb,&__pyx_n_s_notation,&__pyx_n_s_timeout,&__pyx_n_s_memout,0};

    /* "../../bmi/sympy/DifferentialRing.pyx":2526
 *             self,
 *             equations,
 *             BaseFieldExtension basefield = None,             # <<<<<<<<<<<<<<
 *             list attributes = [
 *                     'differential', 'autoreduced', 'primitive',
 */
    values[1] = __Pyx_Arg_NewRef_FASTCALL((PyObject *)((struct __pyx_obj_19DifferentialAlgebra_BaseFieldExtension *)Py_None));
    values[2] = __Pyx_Arg_NewRef_FASTCALL(__pyx_k__35);
    values[3] = __Pyx_Arg_NewRef_FASTCALL(__pyx_k__36);
    values[4] = __Pyx_Arg_NewRef_FASTCALL(__pyx_k__37);
    values[5] = __Pyx_Arg_NewRef_FASTCALL(__pyx_k__38);
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  8: values[7] = __Pyx_Arg_FASTCALL(__pyx_args, 7);
        CYTHON_FALLTHROUGH;
        case  7: values[6] = __Pyx_Arg_FASTCALL(__pyx_args, 6);
        CYTHON_FALLTHROUGH;
        case  6: values[5] = __Pyx_Arg_FASTCALL(__pyx_args, 5);
        CYTHON_FALLTHROUGH;
        case  5: values[4] = __Pyx_Arg_FASTCALL(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_equations)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2523, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_basefield);
          if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2523, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_attributes);
          if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2523, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_singsol);
          if (value) { values[3] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2523, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_dimlb);
          if (value) { values[4] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2523, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  5:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_notation);
          if (value) { values[5] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2523, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  6:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_timeout);
          if (value) { values[6] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2523, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  7:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_memout);
          if (value) { values[7] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2523, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "RosenfeldGroebner") < 0)) __PYX_ERR(0, 2523, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  8: values[7] = __Pyx_Arg_FASTCALL(__pyx_args, 7);
        CYTHON_FALLTHROUGH;
        case  7: values[6] = __Pyx_Arg_FASTCALL(__pyx_args, 6);
        CYTHON_FALLTHROUGH;
        case  6: values[5] = __Pyx_Arg_FASTCALL(__pyx_args, 5);
        CYTHON_FALLTHROUGH;
        case  5: values[4] = __Pyx_Arg_FASTCALL(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_equations = values[0];
    __pyx_v_basefield = ((struct __pyx_obj_19DifferentialAlgebra_BaseFieldExtension *)values[1]);
    __pyx_v_attributes = ((PyObject*)values[2]);
    __pyx_v_singsol = values[3];
    __pyx_v_dimlb = values[4];
    __pyx_v_notation = values[5];
    if (values[6]) {
      __pyx_v_timeout = __Pyx_PyInt_As_int(values[6]); if (unlikely((__pyx_v_timeout == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2533, __pyx_L3_error)
    } else {
      __pyx_v_timeout = ((int)0);
    }
    if (values[7]) {
      __pyx_v_memout = __Pyx_PyInt_As_int(values[7]); if (unlikely((__pyx_v_memout == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2534, __pyx_L3_error)
    } else {
      __pyx_v_memout = ((int)0);
    }
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("RosenfeldGroebner", 0, 1, 8, __pyx_nargs); __PYX_ERR(0, 2523, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("DifferentialAlgebra.DifferentialRing.RosenfeldGroebner", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_basefield), __pyx_ptype_19DifferentialAlgebra_BaseFieldExtension, 1, "basefield", 0))) __PYX_ERR(0, 2526, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_attributes), (&PyList_Type), 1, "attributes", 1))) __PYX_ERR(0, 2527, __pyx_L1_error)
  __pyx_r = __pyx_pf_19DifferentialAlgebra_16DifferentialRing_54RosenfeldGroebner(((struct __pyx_obj_19DifferentialAlgebra_DifferentialRing *)__pyx_v_self), __pyx_v_equations, __pyx_v_basefield, __pyx_v_attributes, __pyx_v_singsol, __pyx_v_dimlb, __pyx_v_notation, __pyx_v_timeout, __pyx_v_memout);

  /* "../../bmi/sympy/DifferentialRing.pyx":2523
 * 
 * # RosenfeldGroebner
 *     def RosenfeldGroebner (             # <<<<<<<<<<<<<<
 *             self,
 *             equations,
 */

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_19DifferentialAlgebra_16DifferentialRing_54RosenfeldGroebner(struct __pyx_obj_19DifferentialAlgebra_DifferentialRing *__pyx_v_self, PyObject *__pyx_v_equations, struct __pyx_obj_19DifferentialAlgebra_BaseFieldExtension *__pyx_v_basefield, PyObject *__pyx_v_attributes, PyObject *__pyx_v_singsol, PyObject *__pyx_v_dimlb, PyObject *__pyx_v_notation, int __pyx_v_timeout, int __pyx_v_memout) {
  PyObject *__pyx_v_result = 0;
  PyObject *__pyx_v_eqns = 0;
  PyObject *__pyx_v_ineq = 0;
  struct __pyx_obj_19DifferentialAlgebra_BaseFieldExtension *__pyx_v_F = 0;
  struct __pyx_obj_19DifferentialAlgebra_RegularDifferentialChain *__pyx_v_C = 0;
  ALGEB_list __pyx_v_L;
  PyObject *__pyx_v_mesgerr = 0;
  PyObject *__pyx_v_streqns = 0;
  PyObject *__pyx_v_strineq = 0;
  PyObject *__pyx_v_strgens = 0;
  PyObject *__pyx_v_strrels = 0;
  PyObject *__pyx_v_strattr = 0;
  PyObject *__pyx_v_strsingsol = 0;
  PyObject *__pyx_v_strdimlb = 0;
  PyObject *__pyx_v_strnot = 0;
  ba0_int_p __pyx_v_i;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  unsigned int __pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *(*__pyx_t_7)(PyObject *);
  PyObject *__pyx_t_8 = NULL;
  char *__pyx_t_9;
  char *__pyx_t_10;
  char *__pyx_t_11;
  char *__pyx_t_12;
  char *__pyx_t_13;
  char *__pyx_t_14;
  char *__pyx_t_15;
  char *__pyx_t_16;
  char *__pyx_t_17;
  ba0_int_p __pyx_t_18;
  ba0_int_p __pyx_t_19;
  ba0_int_p __pyx_t_20;
  int __pyx_t_21;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("RosenfeldGroebner", 1);

  /* "../../bmi/sympy/DifferentialRing.pyx":2734
 *         cdef bytes strsingsol, strdimlb
 *         cdef strnot
 *         strnot = self.__process_notation (notation)             # <<<<<<<<<<<<<<
 *         if isinstance (equations, list):
 *             eqns, ineq = self._process_equations (equations, strnot)
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_DifferentialRing__process_notat); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2734, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_notation};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2734, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_v_strnot = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "../../bmi/sympy/DifferentialRing.pyx":2735
 *         cdef strnot
 *         strnot = self.__process_notation (notation)
 *         if isinstance (equations, list):             # <<<<<<<<<<<<<<
 *             eqns, ineq = self._process_equations (equations, strnot)
 *         else:
 */
  __pyx_t_5 = PyList_Check(__pyx_v_equations); 
  if (__pyx_t_5) {

    /* "../../bmi/sympy/DifferentialRing.pyx":2736
 *         strnot = self.__process_notation (notation)
 *         if isinstance (equations, list):
 *             eqns, ineq = self._process_equations (equations, strnot)             # <<<<<<<<<<<<<<
 *         else:
 *             eqns, ineq = self._process_equations ([equations], strnot)
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_process_equations); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2736, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = NULL;
    __pyx_t_4 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
        __pyx_t_4 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_v_equations, __pyx_v_strnot};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 2+__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2736, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
      PyObject* sequence = __pyx_t_1;
      Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
      if (unlikely(size != 2)) {
        if (size > 2) __Pyx_RaiseTooManyValuesError(2);
        else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
        __PYX_ERR(0, 2736, __pyx_L1_error)
      }
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      if (likely(PyTuple_CheckExact(sequence))) {
        __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); 
        __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); 
      } else {
        __pyx_t_2 = PyList_GET_ITEM(sequence, 0); 
        __pyx_t_3 = PyList_GET_ITEM(sequence, 1); 
      }
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      #else
      __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2736, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2736, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    } else {
      Py_ssize_t index = -1;
      __pyx_t_6 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2736, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_7 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_6);
      index = 0; __pyx_t_2 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_2)) goto __pyx_L4_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_2);
      index = 1; __pyx_t_3 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_3)) goto __pyx_L4_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_3);
      if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_6), 2) < 0) __PYX_ERR(0, 2736, __pyx_L1_error)
      __pyx_t_7 = NULL;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      goto __pyx_L5_unpacking_done;
      __pyx_L4_unpacking_failed:;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_7 = NULL;
      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
      __PYX_ERR(0, 2736, __pyx_L1_error)
      __pyx_L5_unpacking_done:;
    }
    if (!(likely(PyList_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None) || __Pyx_RaiseUnexpectedTypeError("list", __pyx_t_2))) __PYX_ERR(0, 2736, __pyx_L1_error)
    if (!(likely(PyList_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None) || __Pyx_RaiseUnexpectedTypeError("list", __pyx_t_3))) __PYX_ERR(0, 2736, __pyx_L1_error)
    __pyx_v_eqns = ((PyObject*)__pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_v_ineq = ((PyObject*)__pyx_t_3);
    __pyx_t_3 = 0;

    /* "../../bmi/sympy/DifferentialRing.pyx":2735
 *         cdef strnot
 *         strnot = self.__process_notation (notation)
 *         if isinstance (equations, list):             # <<<<<<<<<<<<<<
 *             eqns, ineq = self._process_equations (equations, strnot)
 *         else:
 */
    goto __pyx_L3;
  }

  /* "../../bmi/sympy/DifferentialRing.pyx":2738
 *             eqns, ineq = self._process_equations (equations, strnot)
 *         else:
 *             eqns, ineq = self._process_equations ([equations], strnot)             # <<<<<<<<<<<<<<
 *         streqns = ascii (eqns)
 *         strineq = ascii (ineq)
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_process_equations); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2738, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2738, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_v_equations);
    __Pyx_GIVEREF(__pyx_v_equations);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 0, __pyx_v_equations)) __PYX_ERR(0, 2738, __pyx_L1_error);
    __pyx_t_6 = NULL;
    __pyx_t_4 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
        __pyx_t_4 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[3] = {__pyx_t_6, __pyx_t_2, __pyx_v_strnot};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 2+__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2738, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
    if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
      PyObject* sequence = __pyx_t_1;
      Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
      if (unlikely(size != 2)) {
        if (size > 2) __Pyx_RaiseTooManyValuesError(2);
        else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
        __PYX_ERR(0, 2738, __pyx_L1_error)
      }
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      if (likely(PyTuple_CheckExact(sequence))) {
        __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); 
        __pyx_t_2 = PyTuple_GET_ITEM(sequence, 1); 
      } else {
        __pyx_t_3 = PyList_GET_ITEM(sequence, 0); 
        __pyx_t_2 = PyList_GET_ITEM(sequence, 1); 
      }
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      #else
      __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2738, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_2 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2738, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    } else {
      Py_ssize_t index = -1;
      __pyx_t_6 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2738, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_7 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_6);
      index = 0; __pyx_t_3 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_3)) goto __pyx_L6_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_3);
      index = 1; __pyx_t_2 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_2)) goto __pyx_L6_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_2);
      if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_6), 2) < 0) __PYX_ERR(0, 2738, __pyx_L1_error)
      __pyx_t_7 = NULL;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      goto __pyx_L7_unpacking_done;
      __pyx_L6_unpacking_failed:;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_7 = NULL;
      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
      __PYX_ERR(0, 2738, __pyx_L1_error)
      __pyx_L7_unpacking_done:;
    }
    if (!(likely(PyList_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None) || __Pyx_RaiseUnexpectedTypeError("list", __pyx_t_3))) __PYX_ERR(0, 2738, __pyx_L1_error)
    if (!(likely(PyList_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None) || __Pyx_RaiseUnexpectedTypeError("list", __pyx_t_2))) __PYX_ERR(0, 2738, __pyx_L1_error)
    __pyx_v_eqns = ((PyObject*)__pyx_t_3);
    __pyx_t_3 = 0;
    __pyx_v_ineq = ((PyObject*)__pyx_t_2);
    __pyx_t_2 = 0;
  }
  __pyx_L3:;

  /* "../../bmi/sympy/DifferentialRing.pyx":2739
 *         else:
 *             eqns, ineq = self._process_equations ([equations], strnot)
 *         streqns = ascii (eqns)             # <<<<<<<<<<<<<<
 *         strineq = ascii (ineq)
 *         strattr = ascii (attributes)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ascii); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2739, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_eqns};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2739, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  if (!(likely(PyBytes_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_1))) __PYX_ERR(0, 2739, __pyx_L1_error)
  __pyx_v_streqns = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "../../bmi/sympy/DifferentialRing.pyx":2740
 *             eqns, ineq = self._process_equations ([equations], strnot)
 *         streqns = ascii (eqns)
 *         strineq = ascii (ineq)             # <<<<<<<<<<<<<<
 *         strattr = ascii (attributes)
 *         strattr = strattr.replace (b"'", b"")
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ascii); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2740, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_ineq};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2740, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  if (!(likely(PyBytes_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_1))) __PYX_ERR(0, 2740, __pyx_L1_error)
  __pyx_v_strineq = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "../../bmi/sympy/DifferentialRing.pyx":2741
 *         streqns = ascii (eqns)
 *         strineq = ascii (ineq)
 *         strattr = ascii (attributes)             # <<<<<<<<<<<<<<
 *         strattr = strattr.replace (b"'", b"")
 *         strsingsol = ascii (singsol)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ascii); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2741, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_attributes};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2741, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  if (!(likely(PyBytes_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_1))) __PYX_ERR(0, 2741, __pyx_L1_error)
  __pyx_v_strattr = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "../../bmi/sympy/DifferentialRing.pyx":2742
 *         strineq = ascii (ineq)
 *         strattr = ascii (attributes)
 *         strattr = strattr.replace (b"'", b"")             # <<<<<<<<<<<<<<
 *         strsingsol = ascii (singsol)
 *         strdimlb = ascii (dimlb)
 */
  __pyx_t_1 = __Pyx_CallUnboundCMethod2(&__pyx_umethod_PyBytes_Type_replace, __pyx_v_strattr, __pyx_kp_b__6, __pyx_kp_b__7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2742, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyBytes_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_1))) __PYX_ERR(0, 2742, __pyx_L1_error)
  __Pyx_DECREF_SET(__pyx_v_strattr, ((PyObject*)__pyx_t_1));
  __pyx_t_1 = 0;

  /* "../../bmi/sympy/DifferentialRing.pyx":2743
 *         strattr = ascii (attributes)
 *         strattr = strattr.replace (b"'", b"")
 *         strsingsol = ascii (singsol)             # <<<<<<<<<<<<<<
 *         strdimlb = ascii (dimlb)
 *         if basefield == None:
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ascii); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2743, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_singsol};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2743, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  if (!(likely(PyBytes_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_1))) __PYX_ERR(0, 2743, __pyx_L1_error)
  __pyx_v_strsingsol = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "../../bmi/sympy/DifferentialRing.pyx":2744
 *         strattr = strattr.replace (b"'", b"")
 *         strsingsol = ascii (singsol)
 *         strdimlb = ascii (dimlb)             # <<<<<<<<<<<<<<
 *         if basefield == None:
 *             F = BaseFieldExtension ()
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ascii); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2744, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_dimlb};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2744, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  if (!(likely(PyBytes_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_1))) __PYX_ERR(0, 2744, __pyx_L1_error)
  __pyx_v_strdimlb = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "../../bmi/sympy/DifferentialRing.pyx":2745
 *         strsingsol = ascii (singsol)
 *         strdimlb = ascii (dimlb)
 *         if basefield == None:             # <<<<<<<<<<<<<<
 *             F = BaseFieldExtension ()
 *         else:
 */
  __pyx_t_1 = PyObject_RichCompare(((PyObject *)__pyx_v_basefield), Py_None, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2745, __pyx_L1_error)
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 2745, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_5) {

    /* "../../bmi/sympy/DifferentialRing.pyx":2746
 *         strdimlb = ascii (dimlb)
 *         if basefield == None:
 *             F = BaseFieldExtension ()             # <<<<<<<<<<<<<<
 *         else:
 *             F = basefield
 */
    __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_19DifferentialAlgebra_BaseFieldExtension)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2746, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_v_F = ((struct __pyx_obj_19DifferentialAlgebra_BaseFieldExtension *)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "../../bmi/sympy/DifferentialRing.pyx":2745
 *         strsingsol = ascii (singsol)
 *         strdimlb = ascii (dimlb)
 *         if basefield == None:             # <<<<<<<<<<<<<<
 *             F = BaseFieldExtension ()
 *         else:
 */
    goto __pyx_L8;
  }

  /* "../../bmi/sympy/DifferentialRing.pyx":2748
 *             F = BaseFieldExtension ()
 *         else:
 *             F = basefield             # <<<<<<<<<<<<<<
 * # It is important to replace quotes around range indexed groups otherwise
 * #   they will be interpreted as plain strings
 */
  /*else*/ {
    __Pyx_INCREF((PyObject *)__pyx_v_basefield);
    __pyx_v_F = __pyx_v_basefield;
  }
  __pyx_L8:;

  /* "../../bmi/sympy/DifferentialRing.pyx":2751
 * # It is important to replace quotes around range indexed groups otherwise
 * #   they will be interpreted as plain strings
 *         strgens = ascii (F.generators ())             # <<<<<<<<<<<<<<
 *         strgens = strgens.replace (b"'", b"")
 *         strrels = ascii (F._relations ())
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ascii); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2751, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_F), __pyx_n_s_generators); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2751, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_8 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_6);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_6, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_8, NULL};
    __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2751, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  }
  __pyx_t_6 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2751, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  if (!(likely(PyBytes_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_1))) __PYX_ERR(0, 2751, __pyx_L1_error)
  __pyx_v_strgens = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "../../bmi/sympy/DifferentialRing.pyx":2752
 * #   they will be interpreted as plain strings
 *         strgens = ascii (F.generators ())
 *         strgens = strgens.replace (b"'", b"")             # <<<<<<<<<<<<<<
 *         strrels = ascii (F._relations ())
 *         L = bmi_c.bmi_dapyx_RosenfeldGroebner (
 */
  __pyx_t_1 = __Pyx_CallUnboundCMethod2(&__pyx_umethod_PyBytes_Type_replace, __pyx_v_strgens, __pyx_kp_b__6, __pyx_kp_b__7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2752, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyBytes_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_1))) __PYX_ERR(0, 2752, __pyx_L1_error)
  __Pyx_DECREF_SET(__pyx_v_strgens, ((PyObject*)__pyx_t_1));
  __pyx_t_1 = 0;

  /* "../../bmi/sympy/DifferentialRing.pyx":2753
 *         strgens = ascii (F.generators ())
 *         strgens = strgens.replace (b"'", b"")
 *         strrels = ascii (F._relations ())             # <<<<<<<<<<<<<<
 *         L = bmi_c.bmi_dapyx_RosenfeldGroebner (
 *                     streqns, strineq, strgens, strrels,
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ascii); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2753, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_F), __pyx_n_s_relations); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2753, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_8 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_6);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_6, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_8, NULL};
    __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2753, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  }
  __pyx_t_6 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2753, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  if (!(likely(PyBytes_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_1))) __PYX_ERR(0, 2753, __pyx_L1_error)
  __pyx_v_strrels = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "../../bmi/sympy/DifferentialRing.pyx":2755
 *         strrels = ascii (F._relations ())
 *         L = bmi_c.bmi_dapyx_RosenfeldGroebner (
 *                     streqns, strineq, strgens, strrels,             # <<<<<<<<<<<<<<
 *                     strattr, self.dring, strsingsol, strdimlb, 1,
 *                     self.notation, strnot, timeout, memout)
 */
  if (unlikely(__pyx_v_streqns == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
    __PYX_ERR(0, 2755, __pyx_L1_error)
  }
  __pyx_t_9 = __Pyx_PyBytes_AsWritableString(__pyx_v_streqns); if (unlikely((!__pyx_t_9) && PyErr_Occurred())) __PYX_ERR(0, 2755, __pyx_L1_error)
  if (unlikely(__pyx_v_strineq == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
    __PYX_ERR(0, 2755, __pyx_L1_error)
  }
  __pyx_t_10 = __Pyx_PyBytes_AsWritableString(__pyx_v_strineq); if (unlikely((!__pyx_t_10) && PyErr_Occurred())) __PYX_ERR(0, 2755, __pyx_L1_error)
  if (unlikely(__pyx_v_strgens == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
    __PYX_ERR(0, 2755, __pyx_L1_error)
  }
  __pyx_t_11 = __Pyx_PyBytes_AsWritableString(__pyx_v_strgens); if (unlikely((!__pyx_t_11) && PyErr_Occurred())) __PYX_ERR(0, 2755, __pyx_L1_error)
  if (unlikely(__pyx_v_strrels == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
    __PYX_ERR(0, 2755, __pyx_L1_error)
  }
  __pyx_t_12 = __Pyx_PyBytes_AsWritableString(__pyx_v_strrels); if (unlikely((!__pyx_t_12) && PyErr_Occurred())) __PYX_ERR(0, 2755, __pyx_L1_error)

  /* "../../bmi/sympy/DifferentialRing.pyx":2756
 *         L = bmi_c.bmi_dapyx_RosenfeldGroebner (
 *                     streqns, strineq, strgens, strrels,
 *                     strattr, self.dring, strsingsol, strdimlb, 1,             # <<<<<<<<<<<<<<
 *                     self.notation, strnot, timeout, memout)
 *         if bmi_c.bmi_dapyx_is_error (L):
 */
  if (unlikely(__pyx_v_strattr == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
    __PYX_ERR(0, 2756, __pyx_L1_error)
  }
  __pyx_t_13 = __Pyx_PyBytes_AsWritableString(__pyx_v_strattr); if (unlikely((!__pyx_t_13) && PyErr_Occurred())) __PYX_ERR(0, 2756, __pyx_L1_error)
  if (unlikely(__pyx_v_strsingsol == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
    __PYX_ERR(0, 2756, __pyx_L1_error)
  }
  __pyx_t_14 = __Pyx_PyBytes_AsWritableString(__pyx_v_strsingsol); if (unlikely((!__pyx_t_14) && PyErr_Occurred())) __PYX_ERR(0, 2756, __pyx_L1_error)
  if (unlikely(__pyx_v_strdimlb == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
    __PYX_ERR(0, 2756, __pyx_L1_error)
  }
  __pyx_t_15 = __Pyx_PyBytes_AsWritableString(__pyx_v_strdimlb); if (unlikely((!__pyx_t_15) && PyErr_Occurred())) __PYX_ERR(0, 2756, __pyx_L1_error)

  /* "../../bmi/sympy/DifferentialRing.pyx":2757
 *                     streqns, strineq, strgens, strrels,
 *                     strattr, self.dring, strsingsol, strdimlb, 1,
 *                     self.notation, strnot, timeout, memout)             # <<<<<<<<<<<<<<
 *         if bmi_c.bmi_dapyx_is_error (L):
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (L)
 */
  if (unlikely(__pyx_v_self->notation == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
    __PYX_ERR(0, 2757, __pyx_L1_error)
  }
  __pyx_t_16 = __Pyx_PyBytes_AsWritableString(__pyx_v_self->notation); if (unlikely((!__pyx_t_16) && PyErr_Occurred())) __PYX_ERR(0, 2757, __pyx_L1_error)
  __pyx_t_17 = __Pyx_PyObject_AsWritableString(__pyx_v_strnot); if (unlikely((!__pyx_t_17) && PyErr_Occurred())) __PYX_ERR(0, 2757, __pyx_L1_error)

  /* "../../bmi/sympy/DifferentialRing.pyx":2754
 *         strgens = strgens.replace (b"'", b"")
 *         strrels = ascii (F._relations ())
 *         L = bmi_c.bmi_dapyx_RosenfeldGroebner (             # <<<<<<<<<<<<<<
 *                     streqns, strineq, strgens, strrels,
 *                     strattr, self.dring, strsingsol, strdimlb, 1,
 */
  __pyx_v_L = bmi_dapyx_RosenfeldGroebner(__pyx_t_9, __pyx_t_10, __pyx_t_11, __pyx_t_12, __pyx_t_13, __pyx_v_self->dring, __pyx_t_14, __pyx_t_15, 1, __pyx_t_16, __pyx_t_17, __pyx_v_timeout, __pyx_v_memout);

  /* "../../bmi/sympy/DifferentialRing.pyx":2758
 *                     strattr, self.dring, strsingsol, strdimlb, 1,
 *                     self.notation, strnot, timeout, memout)
 *         if bmi_c.bmi_dapyx_is_error (L):             # <<<<<<<<<<<<<<
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (L)
 *             bmi_c.bmi_balsa_clear_ALGEB (L)
 */
  __pyx_t_5 = (bmi_dapyx_is_error(__pyx_v_L) != 0);
  if (unlikely(__pyx_t_5)) {

    /* "../../bmi/sympy/DifferentialRing.pyx":2759
 *                     self.notation, strnot, timeout, memout)
 *         if bmi_c.bmi_dapyx_is_error (L):
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (L)             # <<<<<<<<<<<<<<
 *             bmi_c.bmi_balsa_clear_ALGEB (L)
 *             raise RuntimeError (str (mesgerr, 'utf-8'))
 */
    __pyx_t_1 = __Pyx_PyBytes_FromString(bmi_dapyx_mesgerr(__pyx_v_L)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2759, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_v_mesgerr = ((PyObject*)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "../../bmi/sympy/DifferentialRing.pyx":2760
 *         if bmi_c.bmi_dapyx_is_error (L):
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (L)
 *             bmi_c.bmi_balsa_clear_ALGEB (L)             # <<<<<<<<<<<<<<
 *             raise RuntimeError (str (mesgerr, 'utf-8'))
 *         result = []
 */
    bmi_balsa_clear_ALGEB(__pyx_v_L);

    /* "../../bmi/sympy/DifferentialRing.pyx":2761
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (L)
 *             bmi_c.bmi_balsa_clear_ALGEB (L)
 *             raise RuntimeError (str (mesgerr, 'utf-8'))             # <<<<<<<<<<<<<<
 *         result = []
 *         for i in range (1, L.value.size) :
 */
    __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2761, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_v_mesgerr);
    __Pyx_GIVEREF(__pyx_v_mesgerr);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_mesgerr)) __PYX_ERR(0, 2761, __pyx_L1_error);
    __Pyx_INCREF(__pyx_kp_u_utf_8);
    __Pyx_GIVEREF(__pyx_kp_u_utf_8);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_kp_u_utf_8)) __PYX_ERR(0, 2761, __pyx_L1_error);
    __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)(&PyUnicode_Type)), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2761, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_RuntimeError, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2761, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(0, 2761, __pyx_L1_error)

    /* "../../bmi/sympy/DifferentialRing.pyx":2758
 *                     strattr, self.dring, strsingsol, strdimlb, 1,
 *                     self.notation, strnot, timeout, memout)
 *         if bmi_c.bmi_dapyx_is_error (L):             # <<<<<<<<<<<<<<
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (L)
 *             bmi_c.bmi_balsa_clear_ALGEB (L)
 */
  }

  /* "../../bmi/sympy/DifferentialRing.pyx":2762
 *             bmi_c.bmi_balsa_clear_ALGEB (L)
 *             raise RuntimeError (str (mesgerr, 'utf-8'))
 *         result = []             # <<<<<<<<<<<<<<
 *         for i in range (1, L.value.size) :
 *             C = RegularDifferentialChain.__new__ (RegularDifferentialChain)
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2762, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_result = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "../../bmi/sympy/DifferentialRing.pyx":2763
 *             raise RuntimeError (str (mesgerr, 'utf-8'))
 *         result = []
 *         for i in range (1, L.value.size) :             # <<<<<<<<<<<<<<
 *             C = RegularDifferentialChain.__new__ (RegularDifferentialChain)
 * # The RegularDifferentialChain class contains a raw pointer which cannot
 */
  __pyx_t_18 = __pyx_v_L->value->size;
  __pyx_t_19 = __pyx_t_18;
  for (__pyx_t_20 = 1; __pyx_t_20 < __pyx_t_19; __pyx_t_20+=1) {
    __pyx_v_i = __pyx_t_20;

    /* "../../bmi/sympy/DifferentialRing.pyx":2764
 *         result = []
 *         for i in range (1, L.value.size) :
 *             C = RegularDifferentialChain.__new__ (RegularDifferentialChain)             # <<<<<<<<<<<<<<
 * # The RegularDifferentialChain class contains a raw pointer which cannot
 * #   be passed to a Python function as an argument. Thus ...
 */
    __pyx_t_1 = ((PyObject *)__pyx_tp_new_19DifferentialAlgebra_RegularDifferentialChain(((PyTypeObject *)__pyx_ptype_19DifferentialAlgebra_RegularDifferentialChain), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2764, __pyx_L1_error)
    __Pyx_GOTREF((PyObject *)__pyx_t_1);
    __Pyx_XDECREF_SET(__pyx_v_C, ((struct __pyx_obj_19DifferentialAlgebra_RegularDifferentialChain *)__pyx_t_1));
    __pyx_t_1 = 0;

    /* "../../bmi/sympy/DifferentialRing.pyx":2767
 * # The RegularDifferentialChain class contains a raw pointer which cannot
 * #   be passed to a Python function as an argument. Thus ...
 *             C.dring = self             # <<<<<<<<<<<<<<
 *             C.notation = strnot
 *             C.evdict = self.evdict
 */
    __Pyx_INCREF((PyObject *)__pyx_v_self);
    __Pyx_GIVEREF((PyObject *)__pyx_v_self);
    __Pyx_GOTREF((PyObject *)__pyx_v_C->dring);
    __Pyx_DECREF((PyObject *)__pyx_v_C->dring);
    __pyx_v_C->dring = __pyx_v_self;

    /* "../../bmi/sympy/DifferentialRing.pyx":2768
 * #   be passed to a Python function as an argument. Thus ...
 *             C.dring = self
 *             C.notation = strnot             # <<<<<<<<<<<<<<
 *             C.evdict = self.evdict
 *             C.regchain = L.value.tab [i]
 */
    __Pyx_INCREF(__pyx_v_strnot);
    __Pyx_GIVEREF(__pyx_v_strnot);
    __Pyx_GOTREF(__pyx_v_C->notation);
    __Pyx_DECREF(__pyx_v_C->notation);
    __pyx_v_C->notation = __pyx_v_strnot;

    /* "../../bmi/sympy/DifferentialRing.pyx":2769
 *             C.dring = self
 *             C.notation = strnot
 *             C.evdict = self.evdict             # <<<<<<<<<<<<<<
 *             C.regchain = L.value.tab [i]
 *             bmi_c.bmi_balsa_increment_nbref (C.regchain)
 */
    __pyx_t_1 = __pyx_v_self->evdict;
    __Pyx_INCREF(__pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_1);
    __Pyx_GOTREF(__pyx_v_C->evdict);
    __Pyx_DECREF(__pyx_v_C->evdict);
    __pyx_v_C->evdict = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "../../bmi/sympy/DifferentialRing.pyx":2770
 *             C.notation = strnot
 *             C.evdict = self.evdict
 *             C.regchain = L.value.tab [i]             # <<<<<<<<<<<<<<
 *             bmi_c.bmi_balsa_increment_nbref (C.regchain)
 *             result.append (C)
 */
    __pyx_v_C->regchain = (__pyx_v_L->value->tab[__pyx_v_i]);

    /* "../../bmi/sympy/DifferentialRing.pyx":2771
 *             C.evdict = self.evdict
 *             C.regchain = L.value.tab [i]
 *             bmi_c.bmi_balsa_increment_nbref (C.regchain)             # <<<<<<<<<<<<<<
 *             result.append (C)
 *         bmi_c.bmi_balsa_clear_ALGEB (L)
 */
    bmi_balsa_increment_nbref(__pyx_v_C->regchain);

    /* "../../bmi/sympy/DifferentialRing.pyx":2772
 *             C.regchain = L.value.tab [i]
 *             bmi_c.bmi_balsa_increment_nbref (C.regchain)
 *             result.append (C)             # <<<<<<<<<<<<<<
 *         bmi_c.bmi_balsa_clear_ALGEB (L)
 *         return result
 */
    __pyx_t_21 = __Pyx_PyList_Append(__pyx_v_result, ((PyObject *)__pyx_v_C)); if (unlikely(__pyx_t_21 == ((int)-1))) __PYX_ERR(0, 2772, __pyx_L1_error)
  }

  /* "../../bmi/sympy/DifferentialRing.pyx":2773
 *             bmi_c.bmi_balsa_increment_nbref (C.regchain)
 *             result.append (C)
 *         bmi_c.bmi_balsa_clear_ALGEB (L)             # <<<<<<<<<<<<<<
 *         return result
 * 
 */
  bmi_balsa_clear_ALGEB(__pyx_v_L);

  /* "../../bmi/sympy/DifferentialRing.pyx":2774
 *             result.append (C)
 *         bmi_c.bmi_balsa_clear_ALGEB (L)
 *         return result             # <<<<<<<<<<<<<<
 * 
 * # _process_equations
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_result);
  __pyx_r = __pyx_v_result;
  goto __pyx_L0;

  /* "../../bmi/sympy/DifferentialRing.pyx":2523
 * 
 * # RosenfeldGroebner
 *     def RosenfeldGroebner (             # <<<<<<<<<<<<<<
 *             self,
 *             equations,
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("DifferentialAlgebra.DifferentialRing.RosenfeldGroebner", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XDECREF(__pyx_v_eqns);
  __Pyx_XDECREF(__pyx_v_ineq);
  __Pyx_XDECREF((PyObject *)__pyx_v_F);
  __Pyx_XDECREF((PyObject *)__pyx_v_C);
  __Pyx_XDECREF(__pyx_v_mesgerr);
  __Pyx_XDECREF(__pyx_v_streqns);
  __Pyx_XDECREF(__pyx_v_strineq);
  __Pyx_XDECREF(__pyx_v_strgens);
  __Pyx_XDECREF(__pyx_v_strrels);
  __Pyx_XDECREF(__pyx_v_strattr);
  __Pyx_XDECREF(__pyx_v_strsingsol);
  __Pyx_XDECREF(__pyx_v_strdimlb);
  __Pyx_XDECREF(__pyx_v_strnot);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "../../bmi/sympy/DifferentialRing.pyx":2777
 * 
 * # _process_equations
 *     def _process_equations (self, list L, strnot):             # <<<<<<<<<<<<<<
 *         r"""
 *         Split a list into equations and inequations
 */

/* Python wrapper */
static PyObject *__pyx_pw_19DifferentialAlgebra_16DifferentialRing_57_process_equations(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_19DifferentialAlgebra_16DifferentialRing_56_process_equations, "\n        Split a list into equations and inequations\n\n        INPUT:\n\n            `L` -- a list\n\n        OUTPUT:\n\n            A pair of two lists: a first list of polynomials that\n            should be considered as equations and a second one that\n            should be considered as inequations.\n\n            The elements of `L` can be rational differential\n            fractions. Their denominators are then considered as\n            inequations. The elements of `L` may also be relational\n            expressions, built using '==' and '!='.\n\n        NOTES:\n\n            This function is used by RosenfeldGroebner, mostly.\n\n        EXAMPLES:\n        ");
static PyMethodDef __pyx_mdef_19DifferentialAlgebra_16DifferentialRing_57_process_equations = {"_process_equations", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_19DifferentialAlgebra_16DifferentialRing_57_process_equations, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_19DifferentialAlgebra_16DifferentialRing_56_process_equations};
static PyObject *__pyx_pw_19DifferentialAlgebra_16DifferentialRing_57_process_equations(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_L = 0;
  PyObject *__pyx_v_strnot = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_process_equations (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_L,&__pyx_n_s_strnot,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_L)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2777, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_strnot)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2777, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("_process_equations", 1, 2, 2, 1); __PYX_ERR(0, 2777, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "_process_equations") < 0)) __PYX_ERR(0, 2777, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
    }
    __pyx_v_L = ((PyObject*)values[0]);
    __pyx_v_strnot = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_process_equations", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 2777, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("DifferentialAlgebra.DifferentialRing._process_equations", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_L), (&PyList_Type), 1, "L", 1))) __PYX_ERR(0, 2777, __pyx_L1_error)
  __pyx_r = __pyx_pf_19DifferentialAlgebra_16DifferentialRing_56_process_equations(((struct __pyx_obj_19DifferentialAlgebra_DifferentialRing *)__pyx_v_self), __pyx_v_L, __pyx_v_strnot);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_19DifferentialAlgebra_16DifferentialRing_56_process_equations(struct __pyx_obj_19DifferentialAlgebra_DifferentialRing *__pyx_v_self, PyObject *__pyx_v_L, PyObject *__pyx_v_strnot) {
  ALGEB_listof_string __pyx_v_P;
  PyObject *__pyx_v_L_as_string = 0;
  PyObject *__pyx_v_mesgerr = 0;
  PyObject *__pyx_v_eqns = 0;
  PyObject *__pyx_v_ineq = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  unsigned int __pyx_t_4;
  char *__pyx_t_5;
  char *__pyx_t_6;
  char *__pyx_t_7;
  int __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_process_equations", 1);

  /* "../../bmi/sympy/DifferentialRing.pyx":2806
 *         cdef bytes L_as_string, mesgerr
 *         cdef list eqns, ineq
 *         L_as_string = ascii (L)             # <<<<<<<<<<<<<<
 *         P = bmi_c.bmi_dapyx_process_equations (
 *                     L_as_string, self.dring,
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ascii); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2806, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_L};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2806, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  if (!(likely(PyBytes_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_1))) __PYX_ERR(0, 2806, __pyx_L1_error)
  __pyx_v_L_as_string = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "../../bmi/sympy/DifferentialRing.pyx":2808
 *         L_as_string = ascii (L)
 *         P = bmi_c.bmi_dapyx_process_equations (
 *                     L_as_string, self.dring,             # <<<<<<<<<<<<<<
 *                     self.notation, strnot, 0, 0)
 *         if bmi_c.bmi_dapyx_is_error (P):
 */
  if (unlikely(__pyx_v_L_as_string == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
    __PYX_ERR(0, 2808, __pyx_L1_error)
  }
  __pyx_t_5 = __Pyx_PyBytes_AsWritableString(__pyx_v_L_as_string); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) __PYX_ERR(0, 2808, __pyx_L1_error)

  /* "../../bmi/sympy/DifferentialRing.pyx":2809
 *         P = bmi_c.bmi_dapyx_process_equations (
 *                     L_as_string, self.dring,
 *                     self.notation, strnot, 0, 0)             # <<<<<<<<<<<<<<
 *         if bmi_c.bmi_dapyx_is_error (P):
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (P)
 */
  if (unlikely(__pyx_v_self->notation == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
    __PYX_ERR(0, 2809, __pyx_L1_error)
  }
  __pyx_t_6 = __Pyx_PyBytes_AsWritableString(__pyx_v_self->notation); if (unlikely((!__pyx_t_6) && PyErr_Occurred())) __PYX_ERR(0, 2809, __pyx_L1_error)
  __pyx_t_7 = __Pyx_PyObject_AsWritableString(__pyx_v_strnot); if (unlikely((!__pyx_t_7) && PyErr_Occurred())) __PYX_ERR(0, 2809, __pyx_L1_error)

  /* "../../bmi/sympy/DifferentialRing.pyx":2807
 *         cdef list eqns, ineq
 *         L_as_string = ascii (L)
 *         P = bmi_c.bmi_dapyx_process_equations (             # <<<<<<<<<<<<<<
 *                     L_as_string, self.dring,
 *                     self.notation, strnot, 0, 0)
 */
  __pyx_v_P = bmi_dapyx_process_equations(__pyx_t_5, __pyx_v_self->dring, __pyx_t_6, __pyx_t_7, 0, 0);

  /* "../../bmi/sympy/DifferentialRing.pyx":2810
 *                     L_as_string, self.dring,
 *                     self.notation, strnot, 0, 0)
 *         if bmi_c.bmi_dapyx_is_error (P):             # <<<<<<<<<<<<<<
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (P)
 *             bmi_c.bmi_balsa_clear_ALGEB (P)
 */
  __pyx_t_8 = (bmi_dapyx_is_error(__pyx_v_P) != 0);
  if (unlikely(__pyx_t_8)) {

    /* "../../bmi/sympy/DifferentialRing.pyx":2811
 *                     self.notation, strnot, 0, 0)
 *         if bmi_c.bmi_dapyx_is_error (P):
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (P)             # <<<<<<<<<<<<<<
 *             bmi_c.bmi_balsa_clear_ALGEB (P)
 *             raise RuntimeError (str (mesgerr, 'utf-8'))
 */
    __pyx_t_1 = __Pyx_PyBytes_FromString(bmi_dapyx_mesgerr(__pyx_v_P)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2811, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_v_mesgerr = ((PyObject*)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "../../bmi/sympy/DifferentialRing.pyx":2812
 *         if bmi_c.bmi_dapyx_is_error (P):
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (P)
 *             bmi_c.bmi_balsa_clear_ALGEB (P)             # <<<<<<<<<<<<<<
 *             raise RuntimeError (str (mesgerr, 'utf-8'))
 *         eqns = eval (P.value.tab [1].value, globals (), self.evdict)
 */
    bmi_balsa_clear_ALGEB(__pyx_v_P);

    /* "../../bmi/sympy/DifferentialRing.pyx":2813
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (P)
 *             bmi_c.bmi_balsa_clear_ALGEB (P)
 *             raise RuntimeError (str (mesgerr, 'utf-8'))             # <<<<<<<<<<<<<<
 *         eqns = eval (P.value.tab [1].value, globals (), self.evdict)
 *         ineq = eval (P.value.tab [2].value, globals (), self.evdict)
 */
    __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2813, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_v_mesgerr);
    __Pyx_GIVEREF(__pyx_v_mesgerr);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_mesgerr)) __PYX_ERR(0, 2813, __pyx_L1_error);
    __Pyx_INCREF(__pyx_kp_u_utf_8);
    __Pyx_GIVEREF(__pyx_kp_u_utf_8);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_kp_u_utf_8)) __PYX_ERR(0, 2813, __pyx_L1_error);
    __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)(&PyUnicode_Type)), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2813, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_RuntimeError, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2813, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(0, 2813, __pyx_L1_error)

    /* "../../bmi/sympy/DifferentialRing.pyx":2810
 *                     L_as_string, self.dring,
 *                     self.notation, strnot, 0, 0)
 *         if bmi_c.bmi_dapyx_is_error (P):             # <<<<<<<<<<<<<<
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (P)
 *             bmi_c.bmi_balsa_clear_ALGEB (P)
 */
  }

  /* "../../bmi/sympy/DifferentialRing.pyx":2814
 *             bmi_c.bmi_balsa_clear_ALGEB (P)
 *             raise RuntimeError (str (mesgerr, 'utf-8'))
 *         eqns = eval (P.value.tab [1].value, globals (), self.evdict)             # <<<<<<<<<<<<<<
 *         ineq = eval (P.value.tab [2].value, globals (), self.evdict)
 *         bmi_c.bmi_balsa_clear_ALGEB (P)
 */
  __pyx_t_1 = __Pyx_PyBytes_FromString((__pyx_v_P->value->tab[1])->value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2814, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_Globals(); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2814, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2814, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_1);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1)) __PYX_ERR(0, 2814, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_2);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2)) __PYX_ERR(0, 2814, __pyx_L1_error);
  __Pyx_INCREF(__pyx_v_self->evdict);
  __Pyx_GIVEREF(__pyx_v_self->evdict);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_self->evdict)) __PYX_ERR(0, 2814, __pyx_L1_error);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_eval, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2814, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (!(likely(PyList_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None) || __Pyx_RaiseUnexpectedTypeError("list", __pyx_t_2))) __PYX_ERR(0, 2814, __pyx_L1_error)
  __pyx_v_eqns = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "../../bmi/sympy/DifferentialRing.pyx":2815
 *             raise RuntimeError (str (mesgerr, 'utf-8'))
 *         eqns = eval (P.value.tab [1].value, globals (), self.evdict)
 *         ineq = eval (P.value.tab [2].value, globals (), self.evdict)             # <<<<<<<<<<<<<<
 *         bmi_c.bmi_balsa_clear_ALGEB (P)
 *         return (eqns, ineq)
 */
  __pyx_t_2 = __Pyx_PyBytes_FromString((__pyx_v_P->value->tab[2])->value); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2815, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_Globals(); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2815, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2815, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2)) __PYX_ERR(0, 2815, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_3);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_3)) __PYX_ERR(0, 2815, __pyx_L1_error);
  __Pyx_INCREF(__pyx_v_self->evdict);
  __Pyx_GIVEREF(__pyx_v_self->evdict);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_self->evdict)) __PYX_ERR(0, 2815, __pyx_L1_error);
  __pyx_t_2 = 0;
  __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_eval, __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2815, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (!(likely(PyList_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None) || __Pyx_RaiseUnexpectedTypeError("list", __pyx_t_3))) __PYX_ERR(0, 2815, __pyx_L1_error)
  __pyx_v_ineq = ((PyObject*)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "../../bmi/sympy/DifferentialRing.pyx":2816
 *         eqns = eval (P.value.tab [1].value, globals (), self.evdict)
 *         ineq = eval (P.value.tab [2].value, globals (), self.evdict)
 *         bmi_c.bmi_balsa_clear_ALGEB (P)             # <<<<<<<<<<<<<<
 *         return (eqns, ineq)
 * 
 */
  bmi_balsa_clear_ALGEB(__pyx_v_P);

  /* "../../bmi/sympy/DifferentialRing.pyx":2817
 *         ineq = eval (P.value.tab [2].value, globals (), self.evdict)
 *         bmi_c.bmi_balsa_clear_ALGEB (P)
 *         return (eqns, ineq)             # <<<<<<<<<<<<<<
 * 
 * # _ranking
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2817, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_v_eqns);
  __Pyx_GIVEREF(__pyx_v_eqns);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_eqns)) __PYX_ERR(0, 2817, __pyx_L1_error);
  __Pyx_INCREF(__pyx_v_ineq);
  __Pyx_GIVEREF(__pyx_v_ineq);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_ineq)) __PYX_ERR(0, 2817, __pyx_L1_error);
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "../../bmi/sympy/DifferentialRing.pyx":2777
 * 
 * # _process_equations
 *     def _process_equations (self, list L, strnot):             # <<<<<<<<<<<<<<
 *         r"""
 *         Split a list into equations and inequations
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("DifferentialAlgebra.DifferentialRing._process_equations", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_L_as_string);
  __Pyx_XDECREF(__pyx_v_mesgerr);
  __Pyx_XDECREF(__pyx_v_eqns);
  __Pyx_XDECREF(__pyx_v_ineq);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "../../bmi/sympy/DifferentialRing.pyx":2820
 * 
 * # _ranking
 *     def _ranking (self):             # <<<<<<<<<<<<<<
 *         r"""
 *         The ranking of a DifferentialRing
 */

/* Python wrapper */
static PyObject *__pyx_pw_19DifferentialAlgebra_16DifferentialRing_59_ranking(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_19DifferentialAlgebra_16DifferentialRing_58_ranking, "\n        The ranking of a DifferentialRing\n\n        INPUT:\n\n            Nothing\n\n        OUTPUT:\n\n            A string describing the ranking of the differential ring.\n\n        NOTES:\n\n            This function is used by the change_ranking method of the\n            RegularDifferentialChain class.\n        ");
static PyMethodDef __pyx_mdef_19DifferentialAlgebra_16DifferentialRing_59_ranking = {"_ranking", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_19DifferentialAlgebra_16DifferentialRing_59_ranking, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_19DifferentialAlgebra_16DifferentialRing_58_ranking};
static PyObject *__pyx_pw_19DifferentialAlgebra_16DifferentialRing_59_ranking(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_ranking (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) {
    __Pyx_RaiseArgtupleInvalid("_ranking", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "_ranking", 0))) return NULL;
  __pyx_r = __pyx_pf_19DifferentialAlgebra_16DifferentialRing_58_ranking(((struct __pyx_obj_19DifferentialAlgebra_DifferentialRing *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_19DifferentialAlgebra_16DifferentialRing_58_ranking(struct __pyx_obj_19DifferentialAlgebra_DifferentialRing *__pyx_v_self) {
  PyObject *__pyx_v_result = 0;
  PyObject *__pyx_v_mesgerr = 0;
  ALGEB_string __pyx_v_L;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_ranking", 1);

  /* "../../bmi/sympy/DifferentialRing.pyx":2841
 *         cdef bytes mesgerr
 *         cdef bmi_c.ALGEB_string L
 *         L = bmi_c.bmi_dapyx_ranking (self.dring)             # <<<<<<<<<<<<<<
 *         if bmi_c.bmi_dapyx_is_error (L):
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (L)
 */
  __pyx_v_L = bmi_dapyx_ranking(__pyx_v_self->dring);

  /* "../../bmi/sympy/DifferentialRing.pyx":2842
 *         cdef bmi_c.ALGEB_string L
 *         L = bmi_c.bmi_dapyx_ranking (self.dring)
 *         if bmi_c.bmi_dapyx_is_error (L):             # <<<<<<<<<<<<<<
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (L)
 *             bmi_c.bmi_balsa_clear_ALGEB (L)
 */
  __pyx_t_1 = (bmi_dapyx_is_error(__pyx_v_L) != 0);
  if (unlikely(__pyx_t_1)) {

    /* "../../bmi/sympy/DifferentialRing.pyx":2843
 *         L = bmi_c.bmi_dapyx_ranking (self.dring)
 *         if bmi_c.bmi_dapyx_is_error (L):
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (L)             # <<<<<<<<<<<<<<
 *             bmi_c.bmi_balsa_clear_ALGEB (L)
 *             raise RuntimeError (str (mesgerr, 'utf-8'))
 */
    __pyx_t_2 = __Pyx_PyBytes_FromString(bmi_dapyx_mesgerr(__pyx_v_L)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2843, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_mesgerr = ((PyObject*)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "../../bmi/sympy/DifferentialRing.pyx":2844
 *         if bmi_c.bmi_dapyx_is_error (L):
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (L)
 *             bmi_c.bmi_balsa_clear_ALGEB (L)             # <<<<<<<<<<<<<<
 *             raise RuntimeError (str (mesgerr, 'utf-8'))
 *         result = L.value
 */
    bmi_balsa_clear_ALGEB(__pyx_v_L);

    /* "../../bmi/sympy/DifferentialRing.pyx":2845
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (L)
 *             bmi_c.bmi_balsa_clear_ALGEB (L)
 *             raise RuntimeError (str (mesgerr, 'utf-8'))             # <<<<<<<<<<<<<<
 *         result = L.value
 *         bmi_c.bmi_balsa_clear_ALGEB (L)
 */
    __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2845, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_v_mesgerr);
    __Pyx_GIVEREF(__pyx_v_mesgerr);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_mesgerr)) __PYX_ERR(0, 2845, __pyx_L1_error);
    __Pyx_INCREF(__pyx_kp_u_utf_8);
    __Pyx_GIVEREF(__pyx_kp_u_utf_8);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_kp_u_utf_8)) __PYX_ERR(0, 2845, __pyx_L1_error);
    __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)(&PyUnicode_Type)), __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2845, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_RuntimeError, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2845, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(0, 2845, __pyx_L1_error)

    /* "../../bmi/sympy/DifferentialRing.pyx":2842
 *         cdef bmi_c.ALGEB_string L
 *         L = bmi_c.bmi_dapyx_ranking (self.dring)
 *         if bmi_c.bmi_dapyx_is_error (L):             # <<<<<<<<<<<<<<
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (L)
 *             bmi_c.bmi_balsa_clear_ALGEB (L)
 */
  }

  /* "../../bmi/sympy/DifferentialRing.pyx":2846
 *             bmi_c.bmi_balsa_clear_ALGEB (L)
 *             raise RuntimeError (str (mesgerr, 'utf-8'))
 *         result = L.value             # <<<<<<<<<<<<<<
 *         bmi_c.bmi_balsa_clear_ALGEB (L)
 *         return result
 */
  __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v_L->value); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2846, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_result = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "../../bmi/sympy/DifferentialRing.pyx":2847
 *             raise RuntimeError (str (mesgerr, 'utf-8'))
 *         result = L.value
 *         bmi_c.bmi_balsa_clear_ALGEB (L)             # <<<<<<<<<<<<<<
 *         return result
 * 
 */
  bmi_balsa_clear_ALGEB(__pyx_v_L);

  /* "../../bmi/sympy/DifferentialRing.pyx":2848
 *         result = L.value
 *         bmi_c.bmi_balsa_clear_ALGEB (L)
 *         return result             # <<<<<<<<<<<<<<
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_result);
  __pyx_r = __pyx_v_result;
  goto __pyx_L0;

  /* "../../bmi/sympy/DifferentialRing.pyx":2820
 * 
 * # _ranking
 *     def _ranking (self):             # <<<<<<<<<<<<<<
 *         r"""
 *         The ranking of a DifferentialRing
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("DifferentialAlgebra.DifferentialRing._ranking", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XDECREF(__pyx_v_mesgerr);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "../../bmi/sympy/DifferentialRing.pyx":253
 * #   The default notation
 * 
 *     cdef public object evdict             # <<<<<<<<<<<<<<
 * #   A dictionary used by eval
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_19DifferentialAlgebra_16DifferentialRing_6evdict_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_19DifferentialAlgebra_16DifferentialRing_6evdict_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_19DifferentialAlgebra_16DifferentialRing_6evdict___get__(((struct __pyx_obj_19DifferentialAlgebra_DifferentialRing *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_19DifferentialAlgebra_16DifferentialRing_6evdict___get__(struct __pyx_obj_19DifferentialAlgebra_DifferentialRing *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 1);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->evdict);
  __pyx_r = __pyx_v_self->evdict;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_19DifferentialAlgebra_16DifferentialRing_6evdict_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_19DifferentialAlgebra_16DifferentialRing_6evdict_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_19DifferentialAlgebra_16DifferentialRing_6evdict_2__set__(((struct __pyx_obj_19DifferentialAlgebra_DifferentialRing *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_19DifferentialAlgebra_16DifferentialRing_6evdict_2__set__(struct __pyx_obj_19DifferentialAlgebra_DifferentialRing *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__", 1);
  __Pyx_INCREF(__pyx_v_value);
  __Pyx_GIVEREF(__pyx_v_value);
  __Pyx_GOTREF(__pyx_v_self->evdict);
  __Pyx_DECREF(__pyx_v_self->evdict);
  __pyx_v_self->evdict = __pyx_v_value;

  /* function exit code */
  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_19DifferentialAlgebra_16DifferentialRing_6evdict_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_19DifferentialAlgebra_16DifferentialRing_6evdict_5__del__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_19DifferentialAlgebra_16DifferentialRing_6evdict_4__del__(((struct __pyx_obj_19DifferentialAlgebra_DifferentialRing *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_19DifferentialAlgebra_16DifferentialRing_6evdict_4__del__(struct __pyx_obj_19DifferentialAlgebra_DifferentialRing *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__", 1);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->evdict);
  __Pyx_DECREF(__pyx_v_self->evdict);
  __pyx_v_self->evdict = Py_None;

  /* function exit code */
  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "self.dring cannot be converted to a Python object for pickling"
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_19DifferentialAlgebra_16DifferentialRing_61__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_19DifferentialAlgebra_16DifferentialRing_61__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_19DifferentialAlgebra_16DifferentialRing_61__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_19DifferentialAlgebra_16DifferentialRing_61__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) {
    __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__reduce_cython__", 0))) return NULL;
  __pyx_r = __pyx_pf_19DifferentialAlgebra_16DifferentialRing_60__reduce_cython__(((struct __pyx_obj_19DifferentialAlgebra_DifferentialRing *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_19DifferentialAlgebra_16DifferentialRing_60__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_19DifferentialAlgebra_DifferentialRing *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 1);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError, "self.dring cannot be converted to a Python object for pickling"             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "self.dring cannot be converted to a Python object for pickling"
 */
  __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_self_dring_cannot_be_converted_t, 0, 0);
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "self.dring cannot be converted to a Python object for pickling"
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("DifferentialAlgebra.DifferentialRing.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "self.dring cannot be converted to a Python object for pickling"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "self.dring cannot be converted to a Python object for pickling"
 */

/* Python wrapper */
static PyObject *__pyx_pw_19DifferentialAlgebra_16DifferentialRing_63__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_19DifferentialAlgebra_16DifferentialRing_63__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_19DifferentialAlgebra_16DifferentialRing_63__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_19DifferentialAlgebra_16DifferentialRing_63__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v___pyx_state = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_state,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 3, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__setstate_cython__") < 0)) __PYX_ERR(1, 3, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v___pyx_state = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 3, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("DifferentialAlgebra.DifferentialRing.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_19DifferentialAlgebra_16DifferentialRing_62__setstate_cython__(((struct __pyx_obj_19DifferentialAlgebra_DifferentialRing *)__pyx_v_self), __pyx_v___pyx_state);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_19DifferentialAlgebra_16DifferentialRing_62__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_19DifferentialAlgebra_DifferentialRing *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setstate_cython__", 1);

  /* "(tree fragment)":4
 *     raise TypeError, "self.dring cannot be converted to a Python object for pickling"
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "self.dring cannot be converted to a Python object for pickling"             # <<<<<<<<<<<<<<
 */
  __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_self_dring_cannot_be_converted_t, 0, 0);
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "self.dring cannot be converted to a Python object for pickling"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "self.dring cannot be converted to a Python object for pickling"
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("DifferentialAlgebra.DifferentialRing.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "../../bmi/sympy/RegularDifferentialChain.pyx":77
 * 
 * # __process_notation
 *     def __process_notation (self, notation) :             # <<<<<<<<<<<<<<
 *         cdef strnot
 *         if not isinstance (notation, str) :
 */

/* Python wrapper */
static PyObject *__pyx_pw_19DifferentialAlgebra_24RegularDifferentialChain_1_RegularDifferentialChain__process_notation(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_19DifferentialAlgebra_24RegularDifferentialChain_1_RegularDifferentialChain__process_notation = {"_RegularDifferentialChain__process_notation", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_19DifferentialAlgebra_24RegularDifferentialChain_1_RegularDifferentialChain__process_notation, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_19DifferentialAlgebra_24RegularDifferentialChain_1_RegularDifferentialChain__process_notation(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_notation = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_RegularDifferentialChain__process_notation (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_notation,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_notation)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 77, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "_RegularDifferentialChain__process_notation") < 0)) __PYX_ERR(2, 77, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_notation = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_RegularDifferentialChain__process_notation", 1, 1, 1, __pyx_nargs); __PYX_ERR(2, 77, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("DifferentialAlgebra.RegularDifferentialChain._RegularDifferentialChain__process_notation", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_19DifferentialAlgebra_24RegularDifferentialChain___process_notation(((struct __pyx_obj_19DifferentialAlgebra_RegularDifferentialChain *)__pyx_v_self), __pyx_v_notation);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_19DifferentialAlgebra_24RegularDifferentialChain___process_notation(struct __pyx_obj_19DifferentialAlgebra_RegularDifferentialChain *__pyx_v_self, PyObject *__pyx_v_notation) {
  PyObject *__pyx_v_strnot = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  unsigned int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_RegularDifferentialChain__process_notation", 1);

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":79
 *     def __process_notation (self, notation) :
 *         cdef strnot
 *         if not isinstance (notation, str) :             # <<<<<<<<<<<<<<
 *             strnot = self.notation
 *         else :
 */
  __pyx_t_1 = PyUnicode_Check(__pyx_v_notation); 
  __pyx_t_2 = (!__pyx_t_1);
  if (__pyx_t_2) {

    /* "../../bmi/sympy/RegularDifferentialChain.pyx":80
 *         cdef strnot
 *         if not isinstance (notation, str) :
 *             strnot = self.notation             # <<<<<<<<<<<<<<
 *         else :
 *             strnot = ascii (notation)
 */
    __pyx_t_3 = __pyx_v_self->notation;
    __Pyx_INCREF(__pyx_t_3);
    __pyx_v_strnot = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "../../bmi/sympy/RegularDifferentialChain.pyx":79
 *     def __process_notation (self, notation) :
 *         cdef strnot
 *         if not isinstance (notation, str) :             # <<<<<<<<<<<<<<
 *             strnot = self.notation
 *         else :
 */
    goto __pyx_L3;
  }

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":82
 *             strnot = self.notation
 *         else :
 *             strnot = ascii (notation)             # <<<<<<<<<<<<<<
 *             if strnot != BMI_IX_Derivative and strnot != BMI_IX_jet:
 *                 strnot = self.notation
 */
  /*else*/ {
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_ascii); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 82, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = NULL;
    __pyx_t_6 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
        __pyx_t_6 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_v_notation};
      __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6);
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 82, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
    __pyx_v_strnot = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "../../bmi/sympy/RegularDifferentialChain.pyx":83
 *         else :
 *             strnot = ascii (notation)
 *             if strnot != BMI_IX_Derivative and strnot != BMI_IX_jet:             # <<<<<<<<<<<<<<
 *                 strnot = self.notation
 *         return strnot
 */
    __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v_19DifferentialAlgebra_BMI_IX_Derivative); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 83, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = (__Pyx_PyBytes_Equals(__pyx_v_strnot, __pyx_t_3, Py_NE)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(2, 83, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (__pyx_t_1) {
    } else {
      __pyx_t_2 = __pyx_t_1;
      goto __pyx_L5_bool_binop_done;
    }
    __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v_19DifferentialAlgebra_BMI_IX_jet); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 83, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = (__Pyx_PyBytes_Equals(__pyx_v_strnot, __pyx_t_3, Py_NE)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(2, 83, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_2 = __pyx_t_1;
    __pyx_L5_bool_binop_done:;
    if (__pyx_t_2) {

      /* "../../bmi/sympy/RegularDifferentialChain.pyx":84
 *             strnot = ascii (notation)
 *             if strnot != BMI_IX_Derivative and strnot != BMI_IX_jet:
 *                 strnot = self.notation             # <<<<<<<<<<<<<<
 *         return strnot
 * 
 */
      __pyx_t_3 = __pyx_v_self->notation;
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_DECREF_SET(__pyx_v_strnot, __pyx_t_3);
      __pyx_t_3 = 0;

      /* "../../bmi/sympy/RegularDifferentialChain.pyx":83
 *         else :
 *             strnot = ascii (notation)
 *             if strnot != BMI_IX_Derivative and strnot != BMI_IX_jet:             # <<<<<<<<<<<<<<
 *                 strnot = self.notation
 *         return strnot
 */
    }
  }
  __pyx_L3:;

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":85
 *             if strnot != BMI_IX_Derivative and strnot != BMI_IX_jet:
 *                 strnot = self.notation
 *         return strnot             # <<<<<<<<<<<<<<
 * 
 * # __init__
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_strnot);
  __pyx_r = __pyx_v_strnot;
  goto __pyx_L0;

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":77
 * 
 * # __process_notation
 *     def __process_notation (self, notation) :             # <<<<<<<<<<<<<<
 *         cdef strnot
 *         if not isinstance (notation, str) :
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("DifferentialAlgebra.RegularDifferentialChain._RegularDifferentialChain__process_notation", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_strnot);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "../../bmi/sympy/RegularDifferentialChain.pyx":88
 * 
 * # __init__
 *     def __init__ (             # <<<<<<<<<<<<<<
 *             self,
 *             list equations,
 */

/* Python wrapper */
static int __pyx_pw_19DifferentialAlgebra_24RegularDifferentialChain_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
PyDoc_STRVAR(__pyx_doc_19DifferentialAlgebra_24RegularDifferentialChain_2__init__, "\n        Constructor of RegularDifferentialChain\n\n        INPUT:\n\n            `equations`  -- a list of differential polynomials or \n                              differential polynomial equations\n            `DRing`      -- a DifferentialRing\n            `attributes` -- (default: ['differential', 'autoreduced', \n                              'primitive', 'squarefree', 'normalized', \n                              'coherent']) a list of strings\n            `pretend`    -- (default: True) a bool,\n            `notation`   -- (default: 'undefined') a string\n            `timeout`    -- (default: 0) a nonnegative integer\n            `memout`     -- (default: 0) a nonnegative integer\n\n        OUTPUT:\n\n            A data structure describing a regular differential chain.\n\n            The returned regular differential chain belongs to the\n            differential polynomial ring `DRing`. It has been obtained\n            from `equations`.  The attributes of the chain are given by\n            `attributes`.\n\n            By default, almost no test is performed, to check that\n            the equations do constitute a chain, unless `pretend`\n            is set to False.\n\n            If not defined using `notation`, the default notation is\n            the one of `DRing`.\n\n            `timeout` and `memout` permit to limit in seconds and\n            megabytes, the resources allowed for the computation.\n\n            See the class help page for more details.\n        ");
#if CYTHON_UPDATE_DESCRIPTOR_DOC
struct wrapperbase __pyx_wrapperbase_19DifferentialAlgebra_24RegularDifferentialChain_2__init__;
#endif
static int __pyx_pw_19DifferentialAlgebra_24RegularDifferentialChain_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_equations = 0;
  struct __pyx_obj_19DifferentialAlgebra_DifferentialRing *__pyx_v_DRing = 0;
  PyObject *__pyx_v_attributes = 0;
  PyBoolObject *__pyx_v_pretend = 0;
  PyObject *__pyx_v_notation = 0;
  int __pyx_v_timeout;
  int __pyx_v_memout;
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[7] = {0,0,0,0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
  #endif
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_equations,&__pyx_n_s_DRing,&__pyx_n_s_attributes,&__pyx_n_s_pretend,&__pyx_n_s_notation,&__pyx_n_s_timeout,&__pyx_n_s_memout,0};
    values[2] = __Pyx_Arg_NewRef_VARARGS(__pyx_k__39);

    /* "../../bmi/sympy/RegularDifferentialChain.pyx":95
 *                 'differential', 'autoreduced', 'primitive',
 *                 'squarefree', 'normalized', 'coherent'],
 *             bool pretend = True,             # <<<<<<<<<<<<<<
 *             notation = BMI_IX_undefined,
 *             int timeout = 0,
 */
    values[3] = __Pyx_Arg_NewRef_VARARGS((PyObject *)((PyBoolObject *)Py_True));
    values[4] = __Pyx_Arg_NewRef_VARARGS(__pyx_k__40);
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  7: values[6] = __Pyx_Arg_VARARGS(__pyx_args, 6);
        CYTHON_FALLTHROUGH;
        case  6: values[5] = __Pyx_Arg_VARARGS(__pyx_args, 5);
        CYTHON_FALLTHROUGH;
        case  5: values[4] = __Pyx_Arg_VARARGS(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = __Pyx_Arg_VARARGS(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_VARARGS(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_VARARGS(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_equations)) != 0)) {
          (void)__Pyx_Arg_NewRef_VARARGS(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 88, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_DRing)) != 0)) {
          (void)__Pyx_Arg_NewRef_VARARGS(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 88, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 7, 1); __PYX_ERR(2, 88, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_attributes);
          if (value) { values[2] = __Pyx_Arg_NewRef_VARARGS(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 88, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pretend);
          if (value) { values[3] = __Pyx_Arg_NewRef_VARARGS(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 88, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_notation);
          if (value) { values[4] = __Pyx_Arg_NewRef_VARARGS(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 88, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  5:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_timeout);
          if (value) { values[5] = __Pyx_Arg_NewRef_VARARGS(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 88, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  6:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_memout);
          if (value) { values[6] = __Pyx_Arg_NewRef_VARARGS(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 88, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__init__") < 0)) __PYX_ERR(2, 88, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  7: values[6] = __Pyx_Arg_VARARGS(__pyx_args, 6);
        CYTHON_FALLTHROUGH;
        case  6: values[5] = __Pyx_Arg_VARARGS(__pyx_args, 5);
        CYTHON_FALLTHROUGH;
        case  5: values[4] = __Pyx_Arg_VARARGS(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = __Pyx_Arg_VARARGS(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_VARARGS(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
        values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_equations = ((PyObject*)values[0]);
    __pyx_v_DRing = ((struct __pyx_obj_19DifferentialAlgebra_DifferentialRing *)values[1]);
    __pyx_v_attributes = ((PyObject*)values[2]);
    __pyx_v_pretend = ((PyBoolObject *)values[3]);
    __pyx_v_notation = values[4];
    if (values[5]) {
      __pyx_v_timeout = __Pyx_PyInt_As_int(values[5]); if (unlikely((__pyx_v_timeout == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 97, __pyx_L3_error)
    } else {
      __pyx_v_timeout = ((int)0);
    }
    if (values[6]) {
      __pyx_v_memout = __Pyx_PyInt_As_int(values[6]); if (unlikely((__pyx_v_memout == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 98, __pyx_L3_error)
    } else {
      __pyx_v_memout = ((int)0);
    }
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 7, __pyx_nargs); __PYX_ERR(2, 88, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("DifferentialAlgebra.RegularDifferentialChain.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_equations), (&PyList_Type), 1, "equations", 1))) __PYX_ERR(2, 90, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_DRing), __pyx_ptype_19DifferentialAlgebra_DifferentialRing, 1, "DRing", 0))) __PYX_ERR(2, 91, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_attributes), (&PyList_Type), 1, "attributes", 1))) __PYX_ERR(2, 92, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_pretend), __pyx_ptype_7cpython_4bool_bool, 1, "pretend", 0))) __PYX_ERR(2, 95, __pyx_L1_error)
  __pyx_r = __pyx_pf_19DifferentialAlgebra_24RegularDifferentialChain_2__init__(((struct __pyx_obj_19DifferentialAlgebra_RegularDifferentialChain *)__pyx_v_self), __pyx_v_equations, __pyx_v_DRing, __pyx_v_attributes, __pyx_v_pretend, __pyx_v_notation, __pyx_v_timeout, __pyx_v_memout);

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":88
 * 
 * # __init__
 *     def __init__ (             # <<<<<<<<<<<<<<
 *             self,
 *             list equations,
 */

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = -1;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_19DifferentialAlgebra_24RegularDifferentialChain_2__init__(struct __pyx_obj_19DifferentialAlgebra_RegularDifferentialChain *__pyx_v_self, PyObject *__pyx_v_equations, struct __pyx_obj_19DifferentialAlgebra_DifferentialRing *__pyx_v_DRing, PyObject *__pyx_v_attributes, PyBoolObject *__pyx_v_pretend, PyObject *__pyx_v_notation, int __pyx_v_timeout, int __pyx_v_memout) {
  PyObject *__pyx_v_eqns = 0;
  CYTHON_UNUSED PyObject *__pyx_v_ineq = 0;
  ALGEB __pyx_v_A;
  PyObject *__pyx_v_streqns = 0;
  PyObject *__pyx_v_strattr = 0;
  PyObject *__pyx_v_mesgerr = 0;
  PyObject *__pyx_v_strnot = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  unsigned int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *(*__pyx_t_6)(PyObject *);
  char *__pyx_t_7;
  char *__pyx_t_8;
  bool __pyx_t_9;
  char *__pyx_t_10;
  char *__pyx_t_11;
  int __pyx_t_12;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 1);

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":141
 *         cdef bytes streqns, strattr, mesgerr
 *         cdef strnot
 *         self.notation = DRing.notation             # <<<<<<<<<<<<<<
 *         self.notation = self.__process_notation (notation)
 *         strnot = self.notation
 */
  __pyx_t_1 = __pyx_v_DRing->notation;
  __Pyx_INCREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->notation);
  __Pyx_DECREF(__pyx_v_self->notation);
  __pyx_v_self->notation = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":142
 *         cdef strnot
 *         self.notation = DRing.notation
 *         self.notation = self.__process_notation (notation)             # <<<<<<<<<<<<<<
 *         strnot = self.notation
 *         eqns, ineq = DRing._process_equations (equations, strnot)
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_RegularDifferentialChain__proce); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 142, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_notation};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 142, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->notation);
  __Pyx_DECREF(__pyx_v_self->notation);
  __pyx_v_self->notation = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":143
 *         self.notation = DRing.notation
 *         self.notation = self.__process_notation (notation)
 *         strnot = self.notation             # <<<<<<<<<<<<<<
 *         eqns, ineq = DRing._process_equations (equations, strnot)
 *         streqns = ascii (eqns)
 */
  __pyx_t_1 = __pyx_v_self->notation;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_v_strnot = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":144
 *         self.notation = self.__process_notation (notation)
 *         strnot = self.notation
 *         eqns, ineq = DRing._process_equations (equations, strnot)             # <<<<<<<<<<<<<<
 *         streqns = ascii (eqns)
 *         strattr = ascii (attributes)
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_DRing), __pyx_n_s_process_equations); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 144, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_v_equations, __pyx_v_strnot};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 2+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 144, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
    PyObject* sequence = __pyx_t_1;
    Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
    if (unlikely(size != 2)) {
      if (size > 2) __Pyx_RaiseTooManyValuesError(2);
      else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
      __PYX_ERR(2, 144, __pyx_L1_error)
    }
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    if (likely(PyTuple_CheckExact(sequence))) {
      __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); 
      __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); 
    } else {
      __pyx_t_2 = PyList_GET_ITEM(sequence, 0); 
      __pyx_t_3 = PyList_GET_ITEM(sequence, 1); 
    }
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_3);
    #else
    __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 144, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 144, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    #endif
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  } else {
    Py_ssize_t index = -1;
    __pyx_t_5 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 144, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_6 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_5);
    index = 0; __pyx_t_2 = __pyx_t_6(__pyx_t_5); if (unlikely(!__pyx_t_2)) goto __pyx_L3_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_2);
    index = 1; __pyx_t_3 = __pyx_t_6(__pyx_t_5); if (unlikely(!__pyx_t_3)) goto __pyx_L3_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_3);
    if (__Pyx_IternextUnpackEndCheck(__pyx_t_6(__pyx_t_5), 2) < 0) __PYX_ERR(2, 144, __pyx_L1_error)
    __pyx_t_6 = NULL;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    goto __pyx_L4_unpacking_done;
    __pyx_L3_unpacking_failed:;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_6 = NULL;
    if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
    __PYX_ERR(2, 144, __pyx_L1_error)
    __pyx_L4_unpacking_done:;
  }
  if (!(likely(PyList_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None) || __Pyx_RaiseUnexpectedTypeError("list", __pyx_t_2))) __PYX_ERR(2, 144, __pyx_L1_error)
  if (!(likely(PyList_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None) || __Pyx_RaiseUnexpectedTypeError("list", __pyx_t_3))) __PYX_ERR(2, 144, __pyx_L1_error)
  __pyx_v_eqns = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_v_ineq = ((PyObject*)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":145
 *         strnot = self.notation
 *         eqns, ineq = DRing._process_equations (equations, strnot)
 *         streqns = ascii (eqns)             # <<<<<<<<<<<<<<
 *         strattr = ascii (attributes)
 *         strattr = strattr.replace (b"'", b"")
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_ascii); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 145, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_eqns};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 145, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  if (!(likely(PyBytes_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_1))) __PYX_ERR(2, 145, __pyx_L1_error)
  __pyx_v_streqns = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":146
 *         eqns, ineq = DRing._process_equations (equations, strnot)
 *         streqns = ascii (eqns)
 *         strattr = ascii (attributes)             # <<<<<<<<<<<<<<
 *         strattr = strattr.replace (b"'", b"")
 *         A = bmi_c.bmi_dapyx_pretend_regular_differential_chain (
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_ascii); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 146, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_attributes};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 146, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  if (!(likely(PyBytes_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_1))) __PYX_ERR(2, 146, __pyx_L1_error)
  __pyx_v_strattr = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":147
 *         streqns = ascii (eqns)
 *         strattr = ascii (attributes)
 *         strattr = strattr.replace (b"'", b"")             # <<<<<<<<<<<<<<
 *         A = bmi_c.bmi_dapyx_pretend_regular_differential_chain (
 *                 streqns, DRing.dring, strattr,
 */
  __pyx_t_1 = __Pyx_CallUnboundCMethod2(&__pyx_umethod_PyBytes_Type_replace, __pyx_v_strattr, __pyx_kp_b__6, __pyx_kp_b__7); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 147, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyBytes_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_1))) __PYX_ERR(2, 147, __pyx_L1_error)
  __Pyx_DECREF_SET(__pyx_v_strattr, ((PyObject*)__pyx_t_1));
  __pyx_t_1 = 0;

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":149
 *         strattr = strattr.replace (b"'", b"")
 *         A = bmi_c.bmi_dapyx_pretend_regular_differential_chain (
 *                 streqns, DRing.dring, strattr,             # <<<<<<<<<<<<<<
 *                 int (pretend), self.notation, strnot, timeout, memout)
 *         if bmi_c.bmi_dapyx_is_error (A):
 */
  if (unlikely(__pyx_v_streqns == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
    __PYX_ERR(2, 149, __pyx_L1_error)
  }
  __pyx_t_7 = __Pyx_PyBytes_AsWritableString(__pyx_v_streqns); if (unlikely((!__pyx_t_7) && PyErr_Occurred())) __PYX_ERR(2, 149, __pyx_L1_error)
  if (unlikely(__pyx_v_strattr == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
    __PYX_ERR(2, 149, __pyx_L1_error)
  }
  __pyx_t_8 = __Pyx_PyBytes_AsWritableString(__pyx_v_strattr); if (unlikely((!__pyx_t_8) && PyErr_Occurred())) __PYX_ERR(2, 149, __pyx_L1_error)

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":150
 *         A = bmi_c.bmi_dapyx_pretend_regular_differential_chain (
 *                 streqns, DRing.dring, strattr,
 *                 int (pretend), self.notation, strnot, timeout, memout)             # <<<<<<<<<<<<<<
 *         if bmi_c.bmi_dapyx_is_error (A):
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (A)
 */
  __pyx_t_1 = __Pyx_PyNumber_Int(((PyObject *)__pyx_v_pretend)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 150, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_9 = __Pyx_PyInt_As_bool(__pyx_t_1); if (unlikely((__pyx_t_9 == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(2, 150, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_10 = __Pyx_PyObject_AsWritableString(__pyx_v_self->notation); if (unlikely((!__pyx_t_10) && PyErr_Occurred())) __PYX_ERR(2, 150, __pyx_L1_error)
  __pyx_t_11 = __Pyx_PyObject_AsWritableString(__pyx_v_strnot); if (unlikely((!__pyx_t_11) && PyErr_Occurred())) __PYX_ERR(2, 150, __pyx_L1_error)

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":148
 *         strattr = ascii (attributes)
 *         strattr = strattr.replace (b"'", b"")
 *         A = bmi_c.bmi_dapyx_pretend_regular_differential_chain (             # <<<<<<<<<<<<<<
 *                 streqns, DRing.dring, strattr,
 *                 int (pretend), self.notation, strnot, timeout, memout)
 */
  __pyx_v_A = bmi_dapyx_pretend_regular_differential_chain(__pyx_t_7, __pyx_v_DRing->dring, __pyx_t_8, __pyx_t_9, __pyx_t_10, __pyx_t_11, __pyx_v_timeout, __pyx_v_memout);

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":151
 *                 streqns, DRing.dring, strattr,
 *                 int (pretend), self.notation, strnot, timeout, memout)
 *         if bmi_c.bmi_dapyx_is_error (A):             # <<<<<<<<<<<<<<
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (A)
 *             bmi_c.bmi_balsa_clear_ALGEB (A)
 */
  __pyx_t_12 = (bmi_dapyx_is_error(__pyx_v_A) != 0);
  if (unlikely(__pyx_t_12)) {

    /* "../../bmi/sympy/RegularDifferentialChain.pyx":152
 *                 int (pretend), self.notation, strnot, timeout, memout)
 *         if bmi_c.bmi_dapyx_is_error (A):
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (A)             # <<<<<<<<<<<<<<
 *             bmi_c.bmi_balsa_clear_ALGEB (A)
 *             raise RuntimeError (str (mesgerr, 'utf-8'))
 */
    __pyx_t_1 = __Pyx_PyBytes_FromString(bmi_dapyx_mesgerr(__pyx_v_A)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 152, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_v_mesgerr = ((PyObject*)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "../../bmi/sympy/RegularDifferentialChain.pyx":153
 *         if bmi_c.bmi_dapyx_is_error (A):
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (A)
 *             bmi_c.bmi_balsa_clear_ALGEB (A)             # <<<<<<<<<<<<<<
 *             raise RuntimeError (str (mesgerr, 'utf-8'))
 *         self.dring = DRing
 */
    bmi_balsa_clear_ALGEB(__pyx_v_A);

    /* "../../bmi/sympy/RegularDifferentialChain.pyx":154
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (A)
 *             bmi_c.bmi_balsa_clear_ALGEB (A)
 *             raise RuntimeError (str (mesgerr, 'utf-8'))             # <<<<<<<<<<<<<<
 *         self.dring = DRing
 *         self.notation = strnot
 */
    __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 154, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_v_mesgerr);
    __Pyx_GIVEREF(__pyx_v_mesgerr);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_mesgerr)) __PYX_ERR(2, 154, __pyx_L1_error);
    __Pyx_INCREF(__pyx_kp_u_utf_8);
    __Pyx_GIVEREF(__pyx_kp_u_utf_8);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_kp_u_utf_8)) __PYX_ERR(2, 154, __pyx_L1_error);
    __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)(&PyUnicode_Type)), __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 154, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_RuntimeError, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 154, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(2, 154, __pyx_L1_error)

    /* "../../bmi/sympy/RegularDifferentialChain.pyx":151
 *                 streqns, DRing.dring, strattr,
 *                 int (pretend), self.notation, strnot, timeout, memout)
 *         if bmi_c.bmi_dapyx_is_error (A):             # <<<<<<<<<<<<<<
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (A)
 *             bmi_c.bmi_balsa_clear_ALGEB (A)
 */
  }

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":155
 *             bmi_c.bmi_balsa_clear_ALGEB (A)
 *             raise RuntimeError (str (mesgerr, 'utf-8'))
 *         self.dring = DRing             # <<<<<<<<<<<<<<
 *         self.notation = strnot
 *         self.evdict = DRing.evdict
 */
  __Pyx_INCREF((PyObject *)__pyx_v_DRing);
  __Pyx_GIVEREF((PyObject *)__pyx_v_DRing);
  __Pyx_GOTREF((PyObject *)__pyx_v_self->dring);
  __Pyx_DECREF((PyObject *)__pyx_v_self->dring);
  __pyx_v_self->dring = __pyx_v_DRing;

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":156
 *             raise RuntimeError (str (mesgerr, 'utf-8'))
 *         self.dring = DRing
 *         self.notation = strnot             # <<<<<<<<<<<<<<
 *         self.evdict = DRing.evdict
 *         self.regchain = A
 */
  __Pyx_INCREF(__pyx_v_strnot);
  __Pyx_GIVEREF(__pyx_v_strnot);
  __Pyx_GOTREF(__pyx_v_self->notation);
  __Pyx_DECREF(__pyx_v_self->notation);
  __pyx_v_self->notation = __pyx_v_strnot;

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":157
 *         self.dring = DRing
 *         self.notation = strnot
 *         self.evdict = DRing.evdict             # <<<<<<<<<<<<<<
 *         self.regchain = A
 *         bmi_c.bmi_balsa_increment_nbref (self.regchain)
 */
  __pyx_t_1 = __pyx_v_DRing->evdict;
  __Pyx_INCREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->evdict);
  __Pyx_DECREF(__pyx_v_self->evdict);
  __pyx_v_self->evdict = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":158
 *         self.notation = strnot
 *         self.evdict = DRing.evdict
 *         self.regchain = A             # <<<<<<<<<<<<<<
 *         bmi_c.bmi_balsa_increment_nbref (self.regchain)
 * 
 */
  __pyx_v_self->regchain = __pyx_v_A;

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":159
 *         self.evdict = DRing.evdict
 *         self.regchain = A
 *         bmi_c.bmi_balsa_increment_nbref (self.regchain)             # <<<<<<<<<<<<<<
 * 
 *     def __dealloc__ (self):
 */
  bmi_balsa_increment_nbref(__pyx_v_self->regchain);

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":88
 * 
 * # __init__
 *     def __init__ (             # <<<<<<<<<<<<<<
 *             self,
 *             list equations,
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("DifferentialAlgebra.RegularDifferentialChain.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_eqns);
  __Pyx_XDECREF(__pyx_v_ineq);
  __Pyx_XDECREF(__pyx_v_streqns);
  __Pyx_XDECREF(__pyx_v_strattr);
  __Pyx_XDECREF(__pyx_v_mesgerr);
  __Pyx_XDECREF(__pyx_v_strnot);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "../../bmi/sympy/RegularDifferentialChain.pyx":161
 *         bmi_c.bmi_balsa_increment_nbref (self.regchain)
 * 
 *     def __dealloc__ (self):             # <<<<<<<<<<<<<<
 * #   The destructor
 *         bmi_c.bmi_balsa_decrement_nbref (self.regchain)
 */

/* Python wrapper */
static void __pyx_pw_19DifferentialAlgebra_24RegularDifferentialChain_5__dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_pw_19DifferentialAlgebra_24RegularDifferentialChain_5__dealloc__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_pf_19DifferentialAlgebra_24RegularDifferentialChain_4__dealloc__(((struct __pyx_obj_19DifferentialAlgebra_RegularDifferentialChain *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

static void __pyx_pf_19DifferentialAlgebra_24RegularDifferentialChain_4__dealloc__(struct __pyx_obj_19DifferentialAlgebra_RegularDifferentialChain *__pyx_v_self) {

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":163
 *     def __dealloc__ (self):
 * #   The destructor
 *         bmi_c.bmi_balsa_decrement_nbref (self.regchain)             # <<<<<<<<<<<<<<
 *         bmi_c.bmi_balsa_clear_ALGEB (self.regchain)
 * 
 */
  bmi_balsa_decrement_nbref(__pyx_v_self->regchain);

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":164
 * #   The destructor
 *         bmi_c.bmi_balsa_decrement_nbref (self.regchain)
 *         bmi_c.bmi_balsa_clear_ALGEB (self.regchain)             # <<<<<<<<<<<<<<
 * 
 *     def __repr__ (self):
 */
  bmi_balsa_clear_ALGEB(__pyx_v_self->regchain);

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":161
 *         bmi_c.bmi_balsa_increment_nbref (self.regchain)
 * 
 *     def __dealloc__ (self):             # <<<<<<<<<<<<<<
 * #   The destructor
 *         bmi_c.bmi_balsa_decrement_nbref (self.regchain)
 */

  /* function exit code */
}

/* "../../bmi/sympy/RegularDifferentialChain.pyx":166
 *         bmi_c.bmi_balsa_clear_ALGEB (self.regchain)
 * 
 *     def __repr__ (self):             # <<<<<<<<<<<<<<
 * #   The external representation
 *         return 'regular_differential_chain'
 */

/* Python wrapper */
static PyObject *__pyx_pw_19DifferentialAlgebra_24RegularDifferentialChain_7__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_19DifferentialAlgebra_24RegularDifferentialChain_7__repr__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_19DifferentialAlgebra_24RegularDifferentialChain_6__repr__(((struct __pyx_obj_19DifferentialAlgebra_RegularDifferentialChain *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_19DifferentialAlgebra_24RegularDifferentialChain_6__repr__(CYTHON_UNUSED struct __pyx_obj_19DifferentialAlgebra_RegularDifferentialChain *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__", 1);

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":168
 *     def __repr__ (self):
 * #   The external representation
 *         return 'regular_differential_chain'             # <<<<<<<<<<<<<<
 * 
 *     def _latex_ (self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_n_u_regular_differential_chain);
  __pyx_r = __pyx_n_u_regular_differential_chain;
  goto __pyx_L0;

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":166
 *         bmi_c.bmi_balsa_clear_ALGEB (self.regchain)
 * 
 *     def __repr__ (self):             # <<<<<<<<<<<<<<
 * #   The external representation
 *         return 'regular_differential_chain'
 */

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "../../bmi/sympy/RegularDifferentialChain.pyx":170
 *         return 'regular_differential_chain'
 * 
 *     def _latex_ (self):             # <<<<<<<<<<<<<<
 * #   The LaTeX representation
 *         return 'regular\\_differential\\_chain'
 */

/* Python wrapper */
static PyObject *__pyx_pw_19DifferentialAlgebra_24RegularDifferentialChain_9_latex_(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_19DifferentialAlgebra_24RegularDifferentialChain_9_latex_ = {"_latex_", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_19DifferentialAlgebra_24RegularDifferentialChain_9_latex_, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_19DifferentialAlgebra_24RegularDifferentialChain_9_latex_(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_latex_ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) {
    __Pyx_RaiseArgtupleInvalid("_latex_", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "_latex_", 0))) return NULL;
  __pyx_r = __pyx_pf_19DifferentialAlgebra_24RegularDifferentialChain_8_latex_(((struct __pyx_obj_19DifferentialAlgebra_RegularDifferentialChain *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_19DifferentialAlgebra_24RegularDifferentialChain_8_latex_(CYTHON_UNUSED struct __pyx_obj_19DifferentialAlgebra_RegularDifferentialChain *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_latex_", 1);

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":172
 *     def _latex_ (self):
 * #   The LaTeX representation
 *         return 'regular\\_differential\\_chain'             # <<<<<<<<<<<<<<
 * 
 * # differential_ring
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_kp_u_regular__differential__chain);
  __pyx_r = __pyx_kp_u_regular__differential__chain;
  goto __pyx_L0;

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":170
 *         return 'regular_differential_chain'
 * 
 *     def _latex_ (self):             # <<<<<<<<<<<<<<
 * #   The LaTeX representation
 *         return 'regular\\_differential\\_chain'
 */

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "../../bmi/sympy/RegularDifferentialChain.pyx":175
 * 
 * # differential_ring
 *     def differential_ring (self):             # <<<<<<<<<<<<<<
 *         r"""
 *         The embedding differential ring of a regular differential chain
 */

/* Python wrapper */
static PyObject *__pyx_pw_19DifferentialAlgebra_24RegularDifferentialChain_11differential_ring(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_19DifferentialAlgebra_24RegularDifferentialChain_10differential_ring, " \n        The embedding differential ring of a regular differential chain\n\n        INPUT:\n\n            Nothing\n\n        OUTPUT:\n\n            The differential ring the chain belongs to.\n\n        EXAMPLES:\n\n            >>> from sympy import *\n            >>> from DifferentialAlgebra import *\n            >>> init_printing (use_unicode = False, num_columns = 60)\n\n            >>> x,y = var ('x,y')\n            >>> u,v = indexedbase ('u,v')\n            >>> R = DifferentialRing (derivations = [x,y], blocks = [u,v], \n            ...                       notation = 'jet')\n            >>> eq1 = Eq (u[x], v)\n            >>> eq2 = u[y]\n            >>> eq3 = v[y]\n            >>> C = RegularDifferentialChain ([eq1,eq2,eq3], R)\n\n        Recover the ring from the chain:\n\n            >>> S = C.differential_ring ()\n            >>> S\n            differential_ring\n        ");
static PyMethodDef __pyx_mdef_19DifferentialAlgebra_24RegularDifferentialChain_11differential_ring = {"differential_ring", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_19DifferentialAlgebra_24RegularDifferentialChain_11differential_ring, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_19DifferentialAlgebra_24RegularDifferentialChain_10differential_ring};
static PyObject *__pyx_pw_19DifferentialAlgebra_24RegularDifferentialChain_11differential_ring(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("differential_ring (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) {
    __Pyx_RaiseArgtupleInvalid("differential_ring", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "differential_ring", 0))) return NULL;
  __pyx_r = __pyx_pf_19DifferentialAlgebra_24RegularDifferentialChain_10differential_ring(((struct __pyx_obj_19DifferentialAlgebra_RegularDifferentialChain *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_19DifferentialAlgebra_24RegularDifferentialChain_10differential_ring(struct __pyx_obj_19DifferentialAlgebra_RegularDifferentialChain *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("differential_ring", 1);

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":209
 *         """
 * #
 *         return self.dring             # <<<<<<<<<<<<<<
 * 
 * # equations
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_self->dring);
  __pyx_r = ((PyObject *)__pyx_v_self->dring);
  goto __pyx_L0;

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":175
 * 
 * # differential_ring
 *     def differential_ring (self):             # <<<<<<<<<<<<<<
 *         r"""
 *         The embedding differential ring of a regular differential chain
 */

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "../../bmi/sympy/RegularDifferentialChain.pyx":212
 * 
 * # equations
 *     def equations (             # <<<<<<<<<<<<<<
 *             self,
 *             bool solved = False,
 */

/* Python wrapper */
static PyObject *__pyx_pw_19DifferentialAlgebra_24RegularDifferentialChain_13equations(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_19DifferentialAlgebra_24RegularDifferentialChain_12equations, "\n        The list of equations of a regular differential chain\n\n        INPUT:\n\n            `solved`    -- (default: False) a boolean\n            `selection` -- (default: None) a relational expression\n            `notation`  -- (default: 'undefined') a string\n\n        OUTPUT:\n\n            A list of the differential polynomials which constitute\n            the chain, sorted by increasing rank.\n\n            If `solved` is True, the differential polynomials are\n            displayed as equations, solved with respect to their\n            leading rank.\n\n            The optional parameter `selection` is a relational\n            expression combining one of the keywords 'order', 'leader',\n            'rank' on the one side, with a value on the other side,\n            using one of the relational operators.  Only the equations\n            which satisfy the condition are selected.\n\n            - If the keyword is 'order', then the value must be a\n              nonnegative integer.\n\n            - If the keyword is 'rank', then the value must be a\n              rank, including the special ranks 0 and 1.\n\n            - If the keyword is 'leader', and the relational\n              operator is '>=', '>', '<=' or '<', then the value must\n              be a derivative.\n\n            - If the keyword is 'leader', and the relational\n              operator is '==' or '!=', then the value may also have\n              the form: 'modifier' (derivative), where 'modifier'\n              is one of the keywords 'derivative' or 'proper'.\n\n            If not defined using `notation`, the notation is the chain\n            default notation.\n\n        EXAMPLES:\n\n            >>> from sympy import *\n            >>> from DifferentialAlgebra import *\n            >>> init_printing (use_unicode = False, num_columns = 60)\n\n            >>> x,a,b = var('x,a,b')\n            >>> y = indexedbase ('y')\n            >>> R = DifferentialRing (derivations = [x], \n      ""      ...             blocks = [y,[a,b]], \n            ...             parameters = [a,b], notation = 'jet')\n            >>> C = RegularDifferentialChain ([y[x]**2-a*y], R)\n            >>> C.equations ()\n                        2 \n            [-a*y + y[x] ]\n\n            >>> C.equations (solved = True)\n                 2       \n            [y[x]  = a*y]\n\n        The next example illustrates the use of `selection`:\n\n            >>> x,y = var ('x,y')\n            >>> u,v = indexedbase ('u,v')\n            >>> R = DifferentialRing (derivations = [x,y], \n            ...             blocks = [u,v], notation = 'jet')\n            >>> eq1 = Eq(u[x], v)\n            >>> eq2 = Eq(u[y], 0)\n            >>> eq3 = Eq(v[y], 0)\n            >>> C = RegularDifferentialChain ([eq1,eq2,eq3], R)\n            >>> C.equations (solved=True)\n            [v[y] = 0, u[y] = 0, u[x] = v]\n\n            >>> leader,rank,order = var ('leader,rank,order')\n            >>> derivative,proper = function ('derivative,proper')\n\n        The equations of order greater than 0. Observe that the ranking\n        is not necessarily orderly:\n\n            >>> C.equations (selection = order > 0)\n            [v[y], u[y], u[x] - v]\n\n        The equation whose leader is u[x]:\n\n            >>> C.equations (selection = Eq(leader,u[x]))\n            [u[x] - v]\n\n        The equations, whose leaders are derivatives of u[x]:\n\n            >>> C.equations (selection = Eq(leader,derivative (u[x])))\n            [u[x] - v]\n        ");
static PyMethodDef __pyx_mdef_19DifferentialAlgebra_24RegularDifferentialChain_13equations = {"equations", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_19DifferentialAlgebra_24RegularDifferentialChain_13equations, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_19DifferentialAlgebra_24RegularDifferentialChain_12equations};
static PyObject *__pyx_pw_19DifferentialAlgebra_24RegularDifferentialChain_13equations(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyBoolObject *__pyx_v_solved = 0;
  PyObject *__pyx_v_selection = 0;
  PyObject *__pyx_v_notation = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[3] = {0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("equations (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_solved,&__pyx_n_s_selection,&__pyx_n_s_notation,0};

    /* "../../bmi/sympy/RegularDifferentialChain.pyx":214
 *     def equations (
 *             self,
 *             bool solved = False,             # <<<<<<<<<<<<<<
 *             selection = None,
 *             notation = BMI_IX_undefined):
 */
    values[0] = __Pyx_Arg_NewRef_FASTCALL((PyObject *)((PyBoolObject *)Py_False));

    /* "../../bmi/sympy/RegularDifferentialChain.pyx":215
 *             self,
 *             bool solved = False,
 *             selection = None,             # <<<<<<<<<<<<<<
 *             notation = BMI_IX_undefined):
 *         r"""
 */
    values[1] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
    values[2] = __Pyx_Arg_NewRef_FASTCALL(__pyx_k__41);
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_solved);
          if (value) { values[0] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 212, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_selection);
          if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 212, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_notation);
          if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 212, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "equations") < 0)) __PYX_ERR(2, 212, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_solved = ((PyBoolObject *)values[0]);
    __pyx_v_selection = values[1];
    __pyx_v_notation = values[2];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("equations", 0, 0, 3, __pyx_nargs); __PYX_ERR(2, 212, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("DifferentialAlgebra.RegularDifferentialChain.equations", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_solved), __pyx_ptype_7cpython_4bool_bool, 1, "solved", 0))) __PYX_ERR(2, 214, __pyx_L1_error)
  __pyx_r = __pyx_pf_19DifferentialAlgebra_24RegularDifferentialChain_12equations(((struct __pyx_obj_19DifferentialAlgebra_RegularDifferentialChain *)__pyx_v_self), __pyx_v_solved, __pyx_v_selection, __pyx_v_notation);

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":212
 * 
 * # equations
 *     def equations (             # <<<<<<<<<<<<<<
 *             self,
 *             bool solved = False,
 */

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_19DifferentialAlgebra_24RegularDifferentialChain_12equations(struct __pyx_obj_19DifferentialAlgebra_RegularDifferentialChain *__pyx_v_self, PyBoolObject *__pyx_v_solved, PyObject *__pyx_v_selection, PyObject *__pyx_v_notation) {
  PyObject *__pyx_v_result = 0;
  PyObject *__pyx_v_strsel = 0;
  PyObject *__pyx_v_mesgerr = 0;
  ALGEB_string __pyx_v_A;
  PyObject *__pyx_v_strnot = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  unsigned int __pyx_t_4;
  int __pyx_t_5;
  bool __pyx_t_6;
  bool __pyx_t_7;
  char *__pyx_t_8;
  char *__pyx_t_9;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  char *__pyx_t_12;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("equations", 1);

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":316
 *         cdef bmi_c.ALGEB_string A
 *         cdef strnot
 *         strnot = self.__process_notation (notation)             # <<<<<<<<<<<<<<
 *         if selection == None:
 *             A = bmi_c.bmi_dapyx_equations (
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_RegularDifferentialChain__proce); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 316, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_notation};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 316, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_v_strnot = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":317
 *         cdef strnot
 *         strnot = self.__process_notation (notation)
 *         if selection == None:             # <<<<<<<<<<<<<<
 *             A = bmi_c.bmi_dapyx_equations (
 *                     self.regchain, int (False), int (solved),
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_selection, Py_None, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 317, __pyx_L1_error)
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(2, 317, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_5) {

    /* "../../bmi/sympy/RegularDifferentialChain.pyx":319
 *         if selection == None:
 *             A = bmi_c.bmi_dapyx_equations (
 *                     self.regchain, int (False), int (solved),             # <<<<<<<<<<<<<<
 *                     self.notation, strnot, 0, 0)
 *         else:
 */
    __pyx_t_1 = __Pyx_PyNumber_Int(Py_False); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 319, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_6 = __Pyx_PyInt_As_bool(__pyx_t_1); if (unlikely((__pyx_t_6 == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(2, 319, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyNumber_Int(((PyObject *)__pyx_v_solved)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 319, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_7 = __Pyx_PyInt_As_bool(__pyx_t_1); if (unlikely((__pyx_t_7 == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(2, 319, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "../../bmi/sympy/RegularDifferentialChain.pyx":320
 *             A = bmi_c.bmi_dapyx_equations (
 *                     self.regchain, int (False), int (solved),
 *                     self.notation, strnot, 0, 0)             # <<<<<<<<<<<<<<
 *         else:
 *             if isinstance (selection, sympy.core.relational.Equality):
 */
    __pyx_t_8 = __Pyx_PyObject_AsWritableString(__pyx_v_self->notation); if (unlikely((!__pyx_t_8) && PyErr_Occurred())) __PYX_ERR(2, 320, __pyx_L1_error)
    __pyx_t_9 = __Pyx_PyObject_AsWritableString(__pyx_v_strnot); if (unlikely((!__pyx_t_9) && PyErr_Occurred())) __PYX_ERR(2, 320, __pyx_L1_error)

    /* "../../bmi/sympy/RegularDifferentialChain.pyx":318
 *         strnot = self.__process_notation (notation)
 *         if selection == None:
 *             A = bmi_c.bmi_dapyx_equations (             # <<<<<<<<<<<<<<
 *                     self.regchain, int (False), int (solved),
 *                     self.notation, strnot, 0, 0)
 */
    __pyx_v_A = bmi_dapyx_equations(__pyx_v_self->regchain, __pyx_t_6, __pyx_t_7, __pyx_t_8, __pyx_t_9, 0, 0);

    /* "../../bmi/sympy/RegularDifferentialChain.pyx":317
 *         cdef strnot
 *         strnot = self.__process_notation (notation)
 *         if selection == None:             # <<<<<<<<<<<<<<
 *             A = bmi_c.bmi_dapyx_equations (
 *                     self.regchain, int (False), int (solved),
 */
    goto __pyx_L3;
  }

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":322
 *                     self.notation, strnot, 0, 0)
 *         else:
 *             if isinstance (selection, sympy.core.relational.Equality):             # <<<<<<<<<<<<<<
 *                 strsel = ascii (str (selection.lhs) + str (selection.rel_op) \
 *                                 + str(selection.rhs))
 */
  /*else*/ {
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_sympy); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 322, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_core); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 322, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_relational); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 322, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_Equality); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 322, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_5 = PyObject_IsInstance(__pyx_v_selection, __pyx_t_2); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(2, 322, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (__pyx_t_5) {

      /* "../../bmi/sympy/RegularDifferentialChain.pyx":323
 *         else:
 *             if isinstance (selection, sympy.core.relational.Equality):
 *                 strsel = ascii (str (selection.lhs) + str (selection.rel_op) \             # <<<<<<<<<<<<<<
 *                                 + str(selection.rhs))
 *             else:
 */
      __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_ascii); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 323, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_selection, __pyx_n_s_lhs); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 323, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_10 = __Pyx_PyObject_Unicode(__pyx_t_3); if (unlikely(!__pyx_t_10)) __PYX_ERR(2, 323, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_selection, __pyx_n_s_rel_op); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 323, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_11 = __Pyx_PyObject_Unicode(__pyx_t_3); if (unlikely(!__pyx_t_11)) __PYX_ERR(2, 323, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_PyUnicode_ConcatInPlace(__pyx_t_10, __pyx_t_11); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 323, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

      /* "../../bmi/sympy/RegularDifferentialChain.pyx":324
 *             if isinstance (selection, sympy.core.relational.Equality):
 *                 strsel = ascii (str (selection.lhs) + str (selection.rel_op) \
 *                                 + str(selection.rhs))             # <<<<<<<<<<<<<<
 *             else:
 *                 strsel = ascii (selection)
 */
      __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_selection, __pyx_n_s_rhs); if (unlikely(!__pyx_t_11)) __PYX_ERR(2, 324, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __pyx_t_10 = __Pyx_PyObject_Unicode(__pyx_t_11); if (unlikely(!__pyx_t_10)) __PYX_ERR(2, 324, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      __pyx_t_11 = __Pyx_PyUnicode_ConcatInPlace(__pyx_t_3, __pyx_t_10); if (unlikely(!__pyx_t_11)) __PYX_ERR(2, 324, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __pyx_t_10 = NULL;
      __pyx_t_4 = 0;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_1))) {
        __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_1);
        if (likely(__pyx_t_10)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
          __Pyx_INCREF(__pyx_t_10);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_1, function);
          __pyx_t_4 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_10, __pyx_t_11};
        __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
        __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 323, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      }

      /* "../../bmi/sympy/RegularDifferentialChain.pyx":323
 *         else:
 *             if isinstance (selection, sympy.core.relational.Equality):
 *                 strsel = ascii (str (selection.lhs) + str (selection.rel_op) \             # <<<<<<<<<<<<<<
 *                                 + str(selection.rhs))
 *             else:
 */
      if (!(likely(PyBytes_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_2))) __PYX_ERR(2, 323, __pyx_L1_error)
      __pyx_v_strsel = ((PyObject*)__pyx_t_2);
      __pyx_t_2 = 0;

      /* "../../bmi/sympy/RegularDifferentialChain.pyx":322
 *                     self.notation, strnot, 0, 0)
 *         else:
 *             if isinstance (selection, sympy.core.relational.Equality):             # <<<<<<<<<<<<<<
 *                 strsel = ascii (str (selection.lhs) + str (selection.rel_op) \
 *                                 + str(selection.rhs))
 */
      goto __pyx_L4;
    }

    /* "../../bmi/sympy/RegularDifferentialChain.pyx":326
 *                                 + str(selection.rhs))
 *             else:
 *                 strsel = ascii (selection)             # <<<<<<<<<<<<<<
 *             A = bmi_c.bmi_dapyx_equations_with_criterion_RDC (
 *                     self.regchain, int (False), int (solved), strsel,
 */
    /*else*/ {
      __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_ascii); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 326, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_11 = NULL;
      __pyx_t_4 = 0;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_1))) {
        __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_1);
        if (likely(__pyx_t_11)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
          __Pyx_INCREF(__pyx_t_11);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_1, function);
          __pyx_t_4 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_11, __pyx_v_selection};
        __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
        __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 326, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      }
      if (!(likely(PyBytes_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_2))) __PYX_ERR(2, 326, __pyx_L1_error)
      __pyx_v_strsel = ((PyObject*)__pyx_t_2);
      __pyx_t_2 = 0;
    }
    __pyx_L4:;

    /* "../../bmi/sympy/RegularDifferentialChain.pyx":328
 *                 strsel = ascii (selection)
 *             A = bmi_c.bmi_dapyx_equations_with_criterion_RDC (
 *                     self.regchain, int (False), int (solved), strsel,             # <<<<<<<<<<<<<<
 *                     self.notation, strnot, 0, 0)
 *         if bmi_c.bmi_dapyx_is_error (A):
 */
    __pyx_t_2 = __Pyx_PyNumber_Int(Py_False); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 328, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_7 = __Pyx_PyInt_As_bool(__pyx_t_2); if (unlikely((__pyx_t_7 == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(2, 328, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyNumber_Int(((PyObject *)__pyx_v_solved)); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 328, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_6 = __Pyx_PyInt_As_bool(__pyx_t_2); if (unlikely((__pyx_t_6 == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(2, 328, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(__pyx_v_strsel == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
      __PYX_ERR(2, 328, __pyx_L1_error)
    }
    __pyx_t_9 = __Pyx_PyBytes_AsWritableString(__pyx_v_strsel); if (unlikely((!__pyx_t_9) && PyErr_Occurred())) __PYX_ERR(2, 328, __pyx_L1_error)

    /* "../../bmi/sympy/RegularDifferentialChain.pyx":329
 *             A = bmi_c.bmi_dapyx_equations_with_criterion_RDC (
 *                     self.regchain, int (False), int (solved), strsel,
 *                     self.notation, strnot, 0, 0)             # <<<<<<<<<<<<<<
 *         if bmi_c.bmi_dapyx_is_error (A):
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (A)
 */
    __pyx_t_8 = __Pyx_PyObject_AsWritableString(__pyx_v_self->notation); if (unlikely((!__pyx_t_8) && PyErr_Occurred())) __PYX_ERR(2, 329, __pyx_L1_error)
    __pyx_t_12 = __Pyx_PyObject_AsWritableString(__pyx_v_strnot); if (unlikely((!__pyx_t_12) && PyErr_Occurred())) __PYX_ERR(2, 329, __pyx_L1_error)

    /* "../../bmi/sympy/RegularDifferentialChain.pyx":327
 *             else:
 *                 strsel = ascii (selection)
 *             A = bmi_c.bmi_dapyx_equations_with_criterion_RDC (             # <<<<<<<<<<<<<<
 *                     self.regchain, int (False), int (solved), strsel,
 *                     self.notation, strnot, 0, 0)
 */
    __pyx_v_A = bmi_dapyx_equations_with_criterion_RDC(__pyx_v_self->regchain, __pyx_t_7, __pyx_t_6, __pyx_t_9, __pyx_t_8, __pyx_t_12, 0, 0);
  }
  __pyx_L3:;

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":330
 *                     self.regchain, int (False), int (solved), strsel,
 *                     self.notation, strnot, 0, 0)
 *         if bmi_c.bmi_dapyx_is_error (A):             # <<<<<<<<<<<<<<
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (A)
 *             bmi_c.bmi_balsa_clear_ALGEB (A)
 */
  __pyx_t_5 = (bmi_dapyx_is_error(__pyx_v_A) != 0);
  if (unlikely(__pyx_t_5)) {

    /* "../../bmi/sympy/RegularDifferentialChain.pyx":331
 *                     self.notation, strnot, 0, 0)
 *         if bmi_c.bmi_dapyx_is_error (A):
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (A)             # <<<<<<<<<<<<<<
 *             bmi_c.bmi_balsa_clear_ALGEB (A)
 *             raise RuntimeError (str (mesgerr, 'utf-8'))
 */
    __pyx_t_2 = __Pyx_PyBytes_FromString(bmi_dapyx_mesgerr(__pyx_v_A)); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 331, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_mesgerr = ((PyObject*)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "../../bmi/sympy/RegularDifferentialChain.pyx":332
 *         if bmi_c.bmi_dapyx_is_error (A):
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (A)
 *             bmi_c.bmi_balsa_clear_ALGEB (A)             # <<<<<<<<<<<<<<
 *             raise RuntimeError (str (mesgerr, 'utf-8'))
 *         result = eval (A.value, globals (), self.evdict)
 */
    bmi_balsa_clear_ALGEB(__pyx_v_A);

    /* "../../bmi/sympy/RegularDifferentialChain.pyx":333
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (A)
 *             bmi_c.bmi_balsa_clear_ALGEB (A)
 *             raise RuntimeError (str (mesgerr, 'utf-8'))             # <<<<<<<<<<<<<<
 *         result = eval (A.value, globals (), self.evdict)
 *         bmi_c.bmi_balsa_clear_ALGEB (A)
 */
    __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 333, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_v_mesgerr);
    __Pyx_GIVEREF(__pyx_v_mesgerr);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_mesgerr)) __PYX_ERR(2, 333, __pyx_L1_error);
    __Pyx_INCREF(__pyx_kp_u_utf_8);
    __Pyx_GIVEREF(__pyx_kp_u_utf_8);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_kp_u_utf_8)) __PYX_ERR(2, 333, __pyx_L1_error);
    __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)(&PyUnicode_Type)), __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 333, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_RuntimeError, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 333, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(2, 333, __pyx_L1_error)

    /* "../../bmi/sympy/RegularDifferentialChain.pyx":330
 *                     self.regchain, int (False), int (solved), strsel,
 *                     self.notation, strnot, 0, 0)
 *         if bmi_c.bmi_dapyx_is_error (A):             # <<<<<<<<<<<<<<
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (A)
 *             bmi_c.bmi_balsa_clear_ALGEB (A)
 */
  }

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":334
 *             bmi_c.bmi_balsa_clear_ALGEB (A)
 *             raise RuntimeError (str (mesgerr, 'utf-8'))
 *         result = eval (A.value, globals (), self.evdict)             # <<<<<<<<<<<<<<
 *         bmi_c.bmi_balsa_clear_ALGEB (A)
 *         return result
 */
  __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v_A->value); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 334, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_Globals(); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 334, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_11 = PyTuple_New(3); if (unlikely(!__pyx_t_11)) __PYX_ERR(2, 334, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __Pyx_GIVEREF(__pyx_t_2);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_2)) __PYX_ERR(2, 334, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_1);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_t_1)) __PYX_ERR(2, 334, __pyx_L1_error);
  __Pyx_INCREF(__pyx_v_self->evdict);
  __Pyx_GIVEREF(__pyx_v_self->evdict);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_11, 2, __pyx_v_self->evdict)) __PYX_ERR(2, 334, __pyx_L1_error);
  __pyx_t_2 = 0;
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_eval, __pyx_t_11, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 334, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  if (!(likely(PyList_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("list", __pyx_t_1))) __PYX_ERR(2, 334, __pyx_L1_error)
  __pyx_v_result = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":335
 *             raise RuntimeError (str (mesgerr, 'utf-8'))
 *         result = eval (A.value, globals (), self.evdict)
 *         bmi_c.bmi_balsa_clear_ALGEB (A)             # <<<<<<<<<<<<<<
 *         return result
 * 
 */
  bmi_balsa_clear_ALGEB(__pyx_v_A);

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":336
 *         result = eval (A.value, globals (), self.evdict)
 *         bmi_c.bmi_balsa_clear_ALGEB (A)
 *         return result             # <<<<<<<<<<<<<<
 * 
 * # attributes
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_result);
  __pyx_r = __pyx_v_result;
  goto __pyx_L0;

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":212
 * 
 * # equations
 *     def equations (             # <<<<<<<<<<<<<<
 *             self,
 *             bool solved = False,
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_AddTraceback("DifferentialAlgebra.RegularDifferentialChain.equations", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XDECREF(__pyx_v_strsel);
  __Pyx_XDECREF(__pyx_v_mesgerr);
  __Pyx_XDECREF(__pyx_v_strnot);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "../../bmi/sympy/RegularDifferentialChain.pyx":339
 * 
 * # attributes
 *     def attributes (self):             # <<<<<<<<<<<<<<
 *         r"""
 *         The list of attributes of a RegularDifferentialChain
 */

/* Python wrapper */
static PyObject *__pyx_pw_19DifferentialAlgebra_24RegularDifferentialChain_15attributes(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_19DifferentialAlgebra_24RegularDifferentialChain_14attributes, " \n        The list of attributes of a RegularDifferentialChain\n\n        INPUT:\n\n            Nothing\n\n        OUTPUT:\n\n            A list of strings, providing the attributes of a regular\n            differential chain\n\n        EXAMPLES:\n\n            >>> from sympy import *\n            >>> from DifferentialAlgebra import *\n            >>> init_printing (use_unicode = False, num_columns = 60)\n\n            >>> x,y = var ('x,y')\n            >>> u,v = indexedbase ('u,v')\n            >>> R = DifferentialRing (derivations = [x,y], \n            ...             blocks = [u,v], notation = 'jet')\n            >>> eq1 = Eq(u[x], v)\n            >>> eq2 = u[y] \n            >>> eq3 = v[y]\n            >>> C = RegularDifferentialChain ([eq1,eq2,eq3], R)\n            >>> C.attributes ()\n            [differential, prime, autoreduced, primitive, squarefree,  >\n            |  \n            > coherent, normalized]\n        ");
static PyMethodDef __pyx_mdef_19DifferentialAlgebra_24RegularDifferentialChain_15attributes = {"attributes", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_19DifferentialAlgebra_24RegularDifferentialChain_15attributes, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_19DifferentialAlgebra_24RegularDifferentialChain_14attributes};
static PyObject *__pyx_pw_19DifferentialAlgebra_24RegularDifferentialChain_15attributes(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("attributes (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) {
    __Pyx_RaiseArgtupleInvalid("attributes", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "attributes", 0))) return NULL;
  __pyx_r = __pyx_pf_19DifferentialAlgebra_24RegularDifferentialChain_14attributes(((struct __pyx_obj_19DifferentialAlgebra_RegularDifferentialChain *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_19DifferentialAlgebra_24RegularDifferentialChain_14attributes(struct __pyx_obj_19DifferentialAlgebra_RegularDifferentialChain *__pyx_v_self) {
  PyObject *__pyx_v_result = 0;
  PyObject *__pyx_v_mesgerr = 0;
  PyObject *__pyx_v_dico = 0;
  ALGEB_string __pyx_v_A;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("attributes", 1);

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":376
 *         cdef dict dico
 *         cdef bmi_c.ALGEB_string A
 *         A = bmi_c.bmi_dapyx_attributes (self.regchain)             # <<<<<<<<<<<<<<
 *         if bmi_c.bmi_dapyx_is_error (A):
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (A)
 */
  __pyx_v_A = bmi_dapyx_attributes(__pyx_v_self->regchain);

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":377
 *         cdef bmi_c.ALGEB_string A
 *         A = bmi_c.bmi_dapyx_attributes (self.regchain)
 *         if bmi_c.bmi_dapyx_is_error (A):             # <<<<<<<<<<<<<<
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (A)
 *             bmi_c.bmi_balsa_clear_ALGEB (A)
 */
  __pyx_t_1 = (bmi_dapyx_is_error(__pyx_v_A) != 0);
  if (unlikely(__pyx_t_1)) {

    /* "../../bmi/sympy/RegularDifferentialChain.pyx":378
 *         A = bmi_c.bmi_dapyx_attributes (self.regchain)
 *         if bmi_c.bmi_dapyx_is_error (A):
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (A)             # <<<<<<<<<<<<<<
 *             bmi_c.bmi_balsa_clear_ALGEB (A)
 *             raise RuntimeError (str (mesgerr, 'utf-8'))
 */
    __pyx_t_2 = __Pyx_PyBytes_FromString(bmi_dapyx_mesgerr(__pyx_v_A)); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 378, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_mesgerr = ((PyObject*)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "../../bmi/sympy/RegularDifferentialChain.pyx":379
 *         if bmi_c.bmi_dapyx_is_error (A):
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (A)
 *             bmi_c.bmi_balsa_clear_ALGEB (A)             # <<<<<<<<<<<<<<
 *             raise RuntimeError (str (mesgerr, 'utf-8'))
 *         dico = dict (
 */
    bmi_balsa_clear_ALGEB(__pyx_v_A);

    /* "../../bmi/sympy/RegularDifferentialChain.pyx":380
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (A)
 *             bmi_c.bmi_balsa_clear_ALGEB (A)
 *             raise RuntimeError (str (mesgerr, 'utf-8'))             # <<<<<<<<<<<<<<
 *         dico = dict (
 *                 [
 */
    __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 380, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_v_mesgerr);
    __Pyx_GIVEREF(__pyx_v_mesgerr);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_mesgerr)) __PYX_ERR(2, 380, __pyx_L1_error);
    __Pyx_INCREF(__pyx_kp_u_utf_8);
    __Pyx_GIVEREF(__pyx_kp_u_utf_8);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_kp_u_utf_8)) __PYX_ERR(2, 380, __pyx_L1_error);
    __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)(&PyUnicode_Type)), __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 380, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_RuntimeError, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 380, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(2, 380, __pyx_L1_error)

    /* "../../bmi/sympy/RegularDifferentialChain.pyx":377
 *         cdef bmi_c.ALGEB_string A
 *         A = bmi_c.bmi_dapyx_attributes (self.regchain)
 *         if bmi_c.bmi_dapyx_is_error (A):             # <<<<<<<<<<<<<<
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (A)
 *             bmi_c.bmi_balsa_clear_ALGEB (A)
 */
  }

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":382
 *             raise RuntimeError (str (mesgerr, 'utf-8'))
 *         dico = dict (
 *                 [             # <<<<<<<<<<<<<<
 *                         ('differential', 'differential'),
 *                         ('prime','prime'),
 */
  __pyx_t_2 = PyList_New(7); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 382, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_tuple__42);
  __Pyx_GIVEREF(__pyx_tuple__42);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 0, __pyx_tuple__42)) __PYX_ERR(2, 382, __pyx_L1_error);
  __Pyx_INCREF(__pyx_tuple__43);
  __Pyx_GIVEREF(__pyx_tuple__43);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 1, __pyx_tuple__43)) __PYX_ERR(2, 382, __pyx_L1_error);
  __Pyx_INCREF(__pyx_tuple__44);
  __Pyx_GIVEREF(__pyx_tuple__44);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 2, __pyx_tuple__44)) __PYX_ERR(2, 382, __pyx_L1_error);
  __Pyx_INCREF(__pyx_tuple__45);
  __Pyx_GIVEREF(__pyx_tuple__45);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 3, __pyx_tuple__45)) __PYX_ERR(2, 382, __pyx_L1_error);
  __Pyx_INCREF(__pyx_tuple__46);
  __Pyx_GIVEREF(__pyx_tuple__46);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 4, __pyx_tuple__46)) __PYX_ERR(2, 382, __pyx_L1_error);
  __Pyx_INCREF(__pyx_tuple__47);
  __Pyx_GIVEREF(__pyx_tuple__47);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 5, __pyx_tuple__47)) __PYX_ERR(2, 382, __pyx_L1_error);
  __Pyx_INCREF(__pyx_tuple__48);
  __Pyx_GIVEREF(__pyx_tuple__48);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 6, __pyx_tuple__48)) __PYX_ERR(2, 382, __pyx_L1_error);

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":381
 *             bmi_c.bmi_balsa_clear_ALGEB (A)
 *             raise RuntimeError (str (mesgerr, 'utf-8'))
 *         dico = dict (             # <<<<<<<<<<<<<<
 *                 [
 *                         ('differential', 'differential'),
 */
  __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyDict_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 381, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_dico = ((PyObject*)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":391
 *                         ('normalized','normalized')
 *                 ])
 *         result = eval (A.value, dico)             # <<<<<<<<<<<<<<
 *         bmi_c.bmi_balsa_clear_ALGEB (A)
 *         return result
 */
  __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v_A->value); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 391, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 391, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_3);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3)) __PYX_ERR(2, 391, __pyx_L1_error);
  __Pyx_INCREF(__pyx_v_dico);
  __Pyx_GIVEREF(__pyx_v_dico);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_dico)) __PYX_ERR(2, 391, __pyx_L1_error);
  __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_eval, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 391, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (!(likely(PyList_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None) || __Pyx_RaiseUnexpectedTypeError("list", __pyx_t_3))) __PYX_ERR(2, 391, __pyx_L1_error)
  __pyx_v_result = ((PyObject*)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":392
 *                 ])
 *         result = eval (A.value, dico)
 *         bmi_c.bmi_balsa_clear_ALGEB (A)             # <<<<<<<<<<<<<<
 *         return result
 * 
 */
  bmi_balsa_clear_ALGEB(__pyx_v_A);

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":393
 *         result = eval (A.value, dico)
 *         bmi_c.bmi_balsa_clear_ALGEB (A)
 *         return result             # <<<<<<<<<<<<<<
 * 
 * # leading_derivative
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_result);
  __pyx_r = __pyx_v_result;
  goto __pyx_L0;

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":339
 * 
 * # attributes
 *     def attributes (self):             # <<<<<<<<<<<<<<
 *         r"""
 *         The list of attributes of a RegularDifferentialChain
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("DifferentialAlgebra.RegularDifferentialChain.attributes", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XDECREF(__pyx_v_mesgerr);
  __Pyx_XDECREF(__pyx_v_dico);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "../../bmi/sympy/RegularDifferentialChain.pyx":396
 * 
 * # leading_derivative
 *     def leading_derivative (             # <<<<<<<<<<<<<<
 *             self,
 *             bool fullset = False,
 */

/* Python wrapper */
static PyObject *__pyx_pw_19DifferentialAlgebra_24RegularDifferentialChain_17leading_derivative(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_19DifferentialAlgebra_24RegularDifferentialChain_16leading_derivative, "\n        The leading derivatives of a regular differential chain\n\n        INPUT:\n\n            `notation`  -- (default: 'undefined') a string\n\n        OUTPUT:\n\n            The list of the leading derivatives of the elements of\n            the chain. See the documentation of differential rings.\n\n        EXAMPLES:\n\n            >>> from sympy import *\n            >>> from DifferentialAlgebra import *\n            >>> init_printing (use_unicode = False, num_columns = 60)\n\n            >>> x,y = var ('x,y')\n            >>> u,v = indexedbase ('u,v')\n            >>> R = DifferentialRing (derivations = [x,y], \n            ...             blocks = [[v,u]], notation = 'jet')\n            >>> eq1 = u[x]**2 - 4*u\n            >>> eq2 = u[x,y]*v[y] - u + 1\n            >>> eq3 = v[x,x] - u[x]\n            >>> ideal = R.RosenfeldGroebner ([eq1,eq2,eq3])\n            >>> ideal\n            [regular_differential_chain]\n\n            >>> C = ideal [0]  \n            >>> C.leading_derivative()\n            [u[y], u[x], v[y], v[x, x]]\n        ");
static PyMethodDef __pyx_mdef_19DifferentialAlgebra_24RegularDifferentialChain_17leading_derivative = {"leading_derivative", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_19DifferentialAlgebra_24RegularDifferentialChain_17leading_derivative, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_19DifferentialAlgebra_24RegularDifferentialChain_16leading_derivative};
static PyObject *__pyx_pw_19DifferentialAlgebra_24RegularDifferentialChain_17leading_derivative(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyBoolObject *__pyx_v_fullset = 0;
  PyObject *__pyx_v_notation = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("leading_derivative (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_fullset,&__pyx_n_s_notation,0};

    /* "../../bmi/sympy/RegularDifferentialChain.pyx":398
 *     def leading_derivative (
 *             self,
 *             bool fullset = False,             # <<<<<<<<<<<<<<
 *             notation = BMI_IX_undefined):
 *         r"""
 */
    values[0] = __Pyx_Arg_NewRef_FASTCALL((PyObject *)((PyBoolObject *)Py_False));
    values[1] = __Pyx_Arg_NewRef_FASTCALL(__pyx_k__49);
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_fullset);
          if (value) { values[0] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 396, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_notation);
          if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 396, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "leading_derivative") < 0)) __PYX_ERR(2, 396, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_fullset = ((PyBoolObject *)values[0]);
    __pyx_v_notation = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("leading_derivative", 0, 0, 2, __pyx_nargs); __PYX_ERR(2, 396, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("DifferentialAlgebra.RegularDifferentialChain.leading_derivative", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_fullset), __pyx_ptype_7cpython_4bool_bool, 1, "fullset", 0))) __PYX_ERR(2, 398, __pyx_L1_error)
  __pyx_r = __pyx_pf_19DifferentialAlgebra_24RegularDifferentialChain_16leading_derivative(((struct __pyx_obj_19DifferentialAlgebra_RegularDifferentialChain *)__pyx_v_self), __pyx_v_fullset, __pyx_v_notation);

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":396
 * 
 * # leading_derivative
 *     def leading_derivative (             # <<<<<<<<<<<<<<
 *             self,
 *             bool fullset = False,
 */

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_19DifferentialAlgebra_24RegularDifferentialChain_16leading_derivative(struct __pyx_obj_19DifferentialAlgebra_RegularDifferentialChain *__pyx_v_self, PyBoolObject *__pyx_v_fullset, PyObject *__pyx_v_notation) {
  PyObject *__pyx_v_result = 0;
  PyObject *__pyx_v_streqns = 0;
  PyObject *__pyx_v_mesgerr = 0;
  ALGEB_string __pyx_v_A;
  PyObject *__pyx_v_strnot = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  unsigned int __pyx_t_4;
  char *__pyx_t_5;
  bool __pyx_t_6;
  char *__pyx_t_7;
  char *__pyx_t_8;
  int __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("leading_derivative", 1);

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":438
 *         cdef bmi_c.ALGEB_string A
 *         cdef strnot
 *         strnot = self.__process_notation (notation)             # <<<<<<<<<<<<<<
 *         streqns = b""
 *         A = bmi_c.bmi_dapyx_leading_derivative (
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_RegularDifferentialChain__proce); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 438, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_notation};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 438, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_v_strnot = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":439
 *         cdef strnot
 *         strnot = self.__process_notation (notation)
 *         streqns = b""             # <<<<<<<<<<<<<<
 *         A = bmi_c.bmi_dapyx_leading_derivative (
 *                     streqns, self.regchain, int (fullset),
 */
  __Pyx_INCREF(__pyx_kp_b__7);
  __pyx_v_streqns = __pyx_kp_b__7;

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":441
 *         streqns = b""
 *         A = bmi_c.bmi_dapyx_leading_derivative (
 *                     streqns, self.regchain, int (fullset),             # <<<<<<<<<<<<<<
 *                     self.notation, strnot, 0, 0)
 *         if bmi_c.bmi_dapyx_is_error (A):
 */
  __pyx_t_5 = __Pyx_PyBytes_AsWritableString(__pyx_v_streqns); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) __PYX_ERR(2, 441, __pyx_L1_error)
  __pyx_t_1 = __Pyx_PyNumber_Int(((PyObject *)__pyx_v_fullset)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 441, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_6 = __Pyx_PyInt_As_bool(__pyx_t_1); if (unlikely((__pyx_t_6 == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(2, 441, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":442
 *         A = bmi_c.bmi_dapyx_leading_derivative (
 *                     streqns, self.regchain, int (fullset),
 *                     self.notation, strnot, 0, 0)             # <<<<<<<<<<<<<<
 *         if bmi_c.bmi_dapyx_is_error (A):
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (A)
 */
  __pyx_t_7 = __Pyx_PyObject_AsWritableString(__pyx_v_self->notation); if (unlikely((!__pyx_t_7) && PyErr_Occurred())) __PYX_ERR(2, 442, __pyx_L1_error)
  __pyx_t_8 = __Pyx_PyObject_AsWritableString(__pyx_v_strnot); if (unlikely((!__pyx_t_8) && PyErr_Occurred())) __PYX_ERR(2, 442, __pyx_L1_error)

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":440
 *         strnot = self.__process_notation (notation)
 *         streqns = b""
 *         A = bmi_c.bmi_dapyx_leading_derivative (             # <<<<<<<<<<<<<<
 *                     streqns, self.regchain, int (fullset),
 *                     self.notation, strnot, 0, 0)
 */
  __pyx_v_A = bmi_dapyx_leading_derivative(__pyx_t_5, __pyx_v_self->regchain, __pyx_t_6, __pyx_t_7, __pyx_t_8, 0, 0);

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":443
 *                     streqns, self.regchain, int (fullset),
 *                     self.notation, strnot, 0, 0)
 *         if bmi_c.bmi_dapyx_is_error (A):             # <<<<<<<<<<<<<<
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (A)
 *             bmi_c.bmi_balsa_clear_ALGEB (A)
 */
  __pyx_t_9 = (bmi_dapyx_is_error(__pyx_v_A) != 0);
  if (unlikely(__pyx_t_9)) {

    /* "../../bmi/sympy/RegularDifferentialChain.pyx":444
 *                     self.notation, strnot, 0, 0)
 *         if bmi_c.bmi_dapyx_is_error (A):
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (A)             # <<<<<<<<<<<<<<
 *             bmi_c.bmi_balsa_clear_ALGEB (A)
 *             raise RuntimeError (str (mesgerr, 'utf-8'))
 */
    __pyx_t_1 = __Pyx_PyBytes_FromString(bmi_dapyx_mesgerr(__pyx_v_A)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 444, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_v_mesgerr = ((PyObject*)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "../../bmi/sympy/RegularDifferentialChain.pyx":445
 *         if bmi_c.bmi_dapyx_is_error (A):
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (A)
 *             bmi_c.bmi_balsa_clear_ALGEB (A)             # <<<<<<<<<<<<<<
 *             raise RuntimeError (str (mesgerr, 'utf-8'))
 *         result = eval (A.value, globals (), self.evdict)
 */
    bmi_balsa_clear_ALGEB(__pyx_v_A);

    /* "../../bmi/sympy/RegularDifferentialChain.pyx":446
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (A)
 *             bmi_c.bmi_balsa_clear_ALGEB (A)
 *             raise RuntimeError (str (mesgerr, 'utf-8'))             # <<<<<<<<<<<<<<
 *         result = eval (A.value, globals (), self.evdict)
 *         bmi_c.bmi_balsa_clear_ALGEB (A)
 */
    __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 446, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_v_mesgerr);
    __Pyx_GIVEREF(__pyx_v_mesgerr);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_mesgerr)) __PYX_ERR(2, 446, __pyx_L1_error);
    __Pyx_INCREF(__pyx_kp_u_utf_8);
    __Pyx_GIVEREF(__pyx_kp_u_utf_8);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_kp_u_utf_8)) __PYX_ERR(2, 446, __pyx_L1_error);
    __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)(&PyUnicode_Type)), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 446, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_RuntimeError, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 446, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(2, 446, __pyx_L1_error)

    /* "../../bmi/sympy/RegularDifferentialChain.pyx":443
 *                     streqns, self.regchain, int (fullset),
 *                     self.notation, strnot, 0, 0)
 *         if bmi_c.bmi_dapyx_is_error (A):             # <<<<<<<<<<<<<<
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (A)
 *             bmi_c.bmi_balsa_clear_ALGEB (A)
 */
  }

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":447
 *             bmi_c.bmi_balsa_clear_ALGEB (A)
 *             raise RuntimeError (str (mesgerr, 'utf-8'))
 *         result = eval (A.value, globals (), self.evdict)             # <<<<<<<<<<<<<<
 *         bmi_c.bmi_balsa_clear_ALGEB (A)
 *         return result
 */
  __pyx_t_1 = __Pyx_PyBytes_FromString(__pyx_v_A->value); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 447, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_Globals(); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 447, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 447, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_1);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1)) __PYX_ERR(2, 447, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_2);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2)) __PYX_ERR(2, 447, __pyx_L1_error);
  __Pyx_INCREF(__pyx_v_self->evdict);
  __Pyx_GIVEREF(__pyx_v_self->evdict);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_self->evdict)) __PYX_ERR(2, 447, __pyx_L1_error);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_eval, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 447, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_result = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":448
 *             raise RuntimeError (str (mesgerr, 'utf-8'))
 *         result = eval (A.value, globals (), self.evdict)
 *         bmi_c.bmi_balsa_clear_ALGEB (A)             # <<<<<<<<<<<<<<
 *         return result
 * 
 */
  bmi_balsa_clear_ALGEB(__pyx_v_A);

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":449
 *         result = eval (A.value, globals (), self.evdict)
 *         bmi_c.bmi_balsa_clear_ALGEB (A)
 *         return result             # <<<<<<<<<<<<<<
 * 
 * # leading_rank
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_result);
  __pyx_r = __pyx_v_result;
  goto __pyx_L0;

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":396
 * 
 * # leading_derivative
 *     def leading_derivative (             # <<<<<<<<<<<<<<
 *             self,
 *             bool fullset = False,
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("DifferentialAlgebra.RegularDifferentialChain.leading_derivative", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XDECREF(__pyx_v_streqns);
  __Pyx_XDECREF(__pyx_v_mesgerr);
  __Pyx_XDECREF(__pyx_v_strnot);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "../../bmi/sympy/RegularDifferentialChain.pyx":452
 * 
 * # leading_rank
 *     def leading_rank (             # <<<<<<<<<<<<<<
 *             self,
 *             bool fullset = False,
 */

/* Python wrapper */
static PyObject *__pyx_pw_19DifferentialAlgebra_24RegularDifferentialChain_19leading_rank(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_19DifferentialAlgebra_24RegularDifferentialChain_18leading_rank, "\n        The leading ranks of a regular differential chain\n\n        INPUT:\n\n            `listform`  -- (default: False) a bool\n            `notation`  -- (default: 'undefined') a string\n\n        OUTPUT:\n\n            The list of the leading ranks of the elements of the\n            chain. See the documentation of differential rings.\n\n            If the optional parameter `listform` is True, then the\n            ranks are returned as lists rather than monomials.\n\n        EXAMPLES:\n\n            >>> from sympy import *\n            >>> from DifferentialAlgebra import *\n            >>> init_printing (use_unicode = False, num_columns = 60)\n\n            >>> x,y = var ('x,y')\n            >>> u,v = indexedbase ('u,v')\n            >>> R = DifferentialRing (derivations = [x,y], \n            ...             blocks = [[v,u]], notation = 'jet')\n            >>> eq1 = u[x]**2 - 4*u\n            >>> eq2 = u[x,y]*v[y] - u + 1\n            >>> eq3 = v[x,x] - u[x]\n            >>> ideal = R.RosenfeldGroebner ([eq1,eq2,eq3])\n            >>> ideal\n            [regular_differential_chain]\n\n            >>> C = ideal [0]  \n            >>> C.leading_rank()      \n                 2      2                \n            [u[y] , u[x] , v[y], v[x, x]]\n        ");
static PyMethodDef __pyx_mdef_19DifferentialAlgebra_24RegularDifferentialChain_19leading_rank = {"leading_rank", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_19DifferentialAlgebra_24RegularDifferentialChain_19leading_rank, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_19DifferentialAlgebra_24RegularDifferentialChain_18leading_rank};
static PyObject *__pyx_pw_19DifferentialAlgebra_24RegularDifferentialChain_19leading_rank(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyBoolObject *__pyx_v_fullset = 0;
  PyBoolObject *__pyx_v_listform = 0;
  PyObject *__pyx_v_notation = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[3] = {0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("leading_rank (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_fullset,&__pyx_n_s_listform,&__pyx_n_s_notation,0};

    /* "../../bmi/sympy/RegularDifferentialChain.pyx":454
 *     def leading_rank (
 *             self,
 *             bool fullset = False,             # <<<<<<<<<<<<<<
 *             bool listform = False,
 *             notation = BMI_IX_undefined):
 */
    values[0] = __Pyx_Arg_NewRef_FASTCALL((PyObject *)((PyBoolObject *)Py_False));

    /* "../../bmi/sympy/RegularDifferentialChain.pyx":455
 *             self,
 *             bool fullset = False,
 *             bool listform = False,             # <<<<<<<<<<<<<<
 *             notation = BMI_IX_undefined):
 *         r"""
 */
    values[1] = __Pyx_Arg_NewRef_FASTCALL((PyObject *)((PyBoolObject *)Py_False));
    values[2] = __Pyx_Arg_NewRef_FASTCALL(__pyx_k__50);
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_fullset);
          if (value) { values[0] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 452, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_listform);
          if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 452, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_notation);
          if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 452, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "leading_rank") < 0)) __PYX_ERR(2, 452, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_fullset = ((PyBoolObject *)values[0]);
    __pyx_v_listform = ((PyBoolObject *)values[1]);
    __pyx_v_notation = values[2];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("leading_rank", 0, 0, 3, __pyx_nargs); __PYX_ERR(2, 452, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("DifferentialAlgebra.RegularDifferentialChain.leading_rank", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_fullset), __pyx_ptype_7cpython_4bool_bool, 1, "fullset", 0))) __PYX_ERR(2, 454, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_listform), __pyx_ptype_7cpython_4bool_bool, 1, "listform", 0))) __PYX_ERR(2, 455, __pyx_L1_error)
  __pyx_r = __pyx_pf_19DifferentialAlgebra_24RegularDifferentialChain_18leading_rank(((struct __pyx_obj_19DifferentialAlgebra_RegularDifferentialChain *)__pyx_v_self), __pyx_v_fullset, __pyx_v_listform, __pyx_v_notation);

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":452
 * 
 * # leading_rank
 *     def leading_rank (             # <<<<<<<<<<<<<<
 *             self,
 *             bool fullset = False,
 */

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_19DifferentialAlgebra_24RegularDifferentialChain_18leading_rank(struct __pyx_obj_19DifferentialAlgebra_RegularDifferentialChain *__pyx_v_self, PyBoolObject *__pyx_v_fullset, PyBoolObject *__pyx_v_listform, PyObject *__pyx_v_notation) {
  PyObject *__pyx_v_result = 0;
  PyObject *__pyx_v_streqns = 0;
  PyObject *__pyx_v_mesgerr = 0;
  ALGEB_string __pyx_v_A;
  PyObject *__pyx_v_strnot = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  unsigned int __pyx_t_4;
  char *__pyx_t_5;
  bool __pyx_t_6;
  bool __pyx_t_7;
  char *__pyx_t_8;
  char *__pyx_t_9;
  int __pyx_t_10;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("leading_rank", 1);

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":500
 *         cdef bmi_c.ALGEB_string A
 *         cdef strnot
 *         strnot = self.__process_notation (notation)             # <<<<<<<<<<<<<<
 *         streqns = b""
 *         A = bmi_c.bmi_dapyx_leading_rank (
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_RegularDifferentialChain__proce); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 500, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_notation};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 500, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_v_strnot = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":501
 *         cdef strnot
 *         strnot = self.__process_notation (notation)
 *         streqns = b""             # <<<<<<<<<<<<<<
 *         A = bmi_c.bmi_dapyx_leading_rank (
 *                     streqns, self.regchain, int (fullset), int (listform),
 */
  __Pyx_INCREF(__pyx_kp_b__7);
  __pyx_v_streqns = __pyx_kp_b__7;

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":503
 *         streqns = b""
 *         A = bmi_c.bmi_dapyx_leading_rank (
 *                     streqns, self.regchain, int (fullset), int (listform),             # <<<<<<<<<<<<<<
 *                     self.notation, strnot, 0, 0)
 *         if bmi_c.bmi_dapyx_is_error (A):
 */
  __pyx_t_5 = __Pyx_PyBytes_AsWritableString(__pyx_v_streqns); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) __PYX_ERR(2, 503, __pyx_L1_error)
  __pyx_t_1 = __Pyx_PyNumber_Int(((PyObject *)__pyx_v_fullset)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 503, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_6 = __Pyx_PyInt_As_bool(__pyx_t_1); if (unlikely((__pyx_t_6 == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(2, 503, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyNumber_Int(((PyObject *)__pyx_v_listform)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 503, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_7 = __Pyx_PyInt_As_bool(__pyx_t_1); if (unlikely((__pyx_t_7 == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(2, 503, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":504
 *         A = bmi_c.bmi_dapyx_leading_rank (
 *                     streqns, self.regchain, int (fullset), int (listform),
 *                     self.notation, strnot, 0, 0)             # <<<<<<<<<<<<<<
 *         if bmi_c.bmi_dapyx_is_error (A):
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (A)
 */
  __pyx_t_8 = __Pyx_PyObject_AsWritableString(__pyx_v_self->notation); if (unlikely((!__pyx_t_8) && PyErr_Occurred())) __PYX_ERR(2, 504, __pyx_L1_error)
  __pyx_t_9 = __Pyx_PyObject_AsWritableString(__pyx_v_strnot); if (unlikely((!__pyx_t_9) && PyErr_Occurred())) __PYX_ERR(2, 504, __pyx_L1_error)

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":502
 *         strnot = self.__process_notation (notation)
 *         streqns = b""
 *         A = bmi_c.bmi_dapyx_leading_rank (             # <<<<<<<<<<<<<<
 *                     streqns, self.regchain, int (fullset), int (listform),
 *                     self.notation, strnot, 0, 0)
 */
  __pyx_v_A = bmi_dapyx_leading_rank(__pyx_t_5, __pyx_v_self->regchain, __pyx_t_6, __pyx_t_7, __pyx_t_8, __pyx_t_9, 0, 0);

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":505
 *                     streqns, self.regchain, int (fullset), int (listform),
 *                     self.notation, strnot, 0, 0)
 *         if bmi_c.bmi_dapyx_is_error (A):             # <<<<<<<<<<<<<<
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (A)
 *             bmi_c.bmi_balsa_clear_ALGEB (A)
 */
  __pyx_t_10 = (bmi_dapyx_is_error(__pyx_v_A) != 0);
  if (unlikely(__pyx_t_10)) {

    /* "../../bmi/sympy/RegularDifferentialChain.pyx":506
 *                     self.notation, strnot, 0, 0)
 *         if bmi_c.bmi_dapyx_is_error (A):
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (A)             # <<<<<<<<<<<<<<
 *             bmi_c.bmi_balsa_clear_ALGEB (A)
 *             raise RuntimeError (str (mesgerr, 'utf-8'))
 */
    __pyx_t_1 = __Pyx_PyBytes_FromString(bmi_dapyx_mesgerr(__pyx_v_A)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 506, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_v_mesgerr = ((PyObject*)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "../../bmi/sympy/RegularDifferentialChain.pyx":507
 *         if bmi_c.bmi_dapyx_is_error (A):
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (A)
 *             bmi_c.bmi_balsa_clear_ALGEB (A)             # <<<<<<<<<<<<<<
 *             raise RuntimeError (str (mesgerr, 'utf-8'))
 *         result = eval (A.value, globals (), self.evdict)
 */
    bmi_balsa_clear_ALGEB(__pyx_v_A);

    /* "../../bmi/sympy/RegularDifferentialChain.pyx":508
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (A)
 *             bmi_c.bmi_balsa_clear_ALGEB (A)
 *             raise RuntimeError (str (mesgerr, 'utf-8'))             # <<<<<<<<<<<<<<
 *         result = eval (A.value, globals (), self.evdict)
 *         bmi_c.bmi_balsa_clear_ALGEB (A)
 */
    __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 508, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_v_mesgerr);
    __Pyx_GIVEREF(__pyx_v_mesgerr);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_mesgerr)) __PYX_ERR(2, 508, __pyx_L1_error);
    __Pyx_INCREF(__pyx_kp_u_utf_8);
    __Pyx_GIVEREF(__pyx_kp_u_utf_8);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_kp_u_utf_8)) __PYX_ERR(2, 508, __pyx_L1_error);
    __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)(&PyUnicode_Type)), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 508, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_RuntimeError, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 508, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(2, 508, __pyx_L1_error)

    /* "../../bmi/sympy/RegularDifferentialChain.pyx":505
 *                     streqns, self.regchain, int (fullset), int (listform),
 *                     self.notation, strnot, 0, 0)
 *         if bmi_c.bmi_dapyx_is_error (A):             # <<<<<<<<<<<<<<
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (A)
 *             bmi_c.bmi_balsa_clear_ALGEB (A)
 */
  }

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":509
 *             bmi_c.bmi_balsa_clear_ALGEB (A)
 *             raise RuntimeError (str (mesgerr, 'utf-8'))
 *         result = eval (A.value, globals (), self.evdict)             # <<<<<<<<<<<<<<
 *         bmi_c.bmi_balsa_clear_ALGEB (A)
 *         return result
 */
  __pyx_t_1 = __Pyx_PyBytes_FromString(__pyx_v_A->value); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 509, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_Globals(); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 509, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 509, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_1);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1)) __PYX_ERR(2, 509, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_2);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2)) __PYX_ERR(2, 509, __pyx_L1_error);
  __Pyx_INCREF(__pyx_v_self->evdict);
  __Pyx_GIVEREF(__pyx_v_self->evdict);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_self->evdict)) __PYX_ERR(2, 509, __pyx_L1_error);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_eval, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 509, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_result = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":510
 *             raise RuntimeError (str (mesgerr, 'utf-8'))
 *         result = eval (A.value, globals (), self.evdict)
 *         bmi_c.bmi_balsa_clear_ALGEB (A)             # <<<<<<<<<<<<<<
 *         return result
 * 
 */
  bmi_balsa_clear_ALGEB(__pyx_v_A);

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":511
 *         result = eval (A.value, globals (), self.evdict)
 *         bmi_c.bmi_balsa_clear_ALGEB (A)
 *         return result             # <<<<<<<<<<<<<<
 * 
 * # initial
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_result);
  __pyx_r = __pyx_v_result;
  goto __pyx_L0;

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":452
 * 
 * # leading_rank
 *     def leading_rank (             # <<<<<<<<<<<<<<
 *             self,
 *             bool fullset = False,
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("DifferentialAlgebra.RegularDifferentialChain.leading_rank", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XDECREF(__pyx_v_streqns);
  __Pyx_XDECREF(__pyx_v_mesgerr);
  __Pyx_XDECREF(__pyx_v_strnot);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "../../bmi/sympy/RegularDifferentialChain.pyx":514
 * 
 * # initial
 *     def initial (             # <<<<<<<<<<<<<<
 *             self,
 *             bool fullset = False,
 */

/* Python wrapper */
static PyObject *__pyx_pw_19DifferentialAlgebra_24RegularDifferentialChain_21initial(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_19DifferentialAlgebra_24RegularDifferentialChain_20initial, "\n        The initials of a regular differential chain\n\n        INPUT:\n\n            `notation`  -- (default: 'undefined') a string\n\n        OUTPUT:\n\n            The list of initials of the regular differential chain.\n\n            See the documentation of differential rings.\n\n        EXAMPLES:\n\n            >>> from sympy import *\n            >>> from DifferentialAlgebra import *\n            >>> init_printing (use_unicode = False, num_columns = 60)\n\n            >>> x,y = var ('x,y')\n            >>> u,v = indexedbase ('u,v')\n            >>> R = DifferentialRing (derivations = [x,y], \n            ...             blocks = [[v,u]], notation = 'jet')\n            >>> eq1 = u[x]**2 - 4*u\n            >>> eq2 = u[x,y]*v[y] - u + 1\n            >>> eq3 = v[x,x] - u[x]\n            >>> ideal = R.RosenfeldGroebner ([eq1,eq2,eq3])\n            >>> ideal\n            [regular_differential_chain]\n\n            >>> C = ideal [0]  \n            >>> C.initial ()\n            [1, 1, 4*u, 1]\n        ");
static PyMethodDef __pyx_mdef_19DifferentialAlgebra_24RegularDifferentialChain_21initial = {"initial", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_19DifferentialAlgebra_24RegularDifferentialChain_21initial, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_19DifferentialAlgebra_24RegularDifferentialChain_20initial};
static PyObject *__pyx_pw_19DifferentialAlgebra_24RegularDifferentialChain_21initial(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyBoolObject *__pyx_v_fullset = 0;
  PyObject *__pyx_v_notation = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("initial (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_fullset,&__pyx_n_s_notation,0};

    /* "../../bmi/sympy/RegularDifferentialChain.pyx":516
 *     def initial (
 *             self,
 *             bool fullset = False,             # <<<<<<<<<<<<<<
 *             notation = BMI_IX_undefined):
 *         r"""
 */
    values[0] = __Pyx_Arg_NewRef_FASTCALL((PyObject *)((PyBoolObject *)Py_False));
    values[1] = __Pyx_Arg_NewRef_FASTCALL(__pyx_k__51);
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_fullset);
          if (value) { values[0] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 514, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_notation);
          if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 514, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "initial") < 0)) __PYX_ERR(2, 514, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_fullset = ((PyBoolObject *)values[0]);
    __pyx_v_notation = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("initial", 0, 0, 2, __pyx_nargs); __PYX_ERR(2, 514, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("DifferentialAlgebra.RegularDifferentialChain.initial", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_fullset), __pyx_ptype_7cpython_4bool_bool, 1, "fullset", 0))) __PYX_ERR(2, 516, __pyx_L1_error)
  __pyx_r = __pyx_pf_19DifferentialAlgebra_24RegularDifferentialChain_20initial(((struct __pyx_obj_19DifferentialAlgebra_RegularDifferentialChain *)__pyx_v_self), __pyx_v_fullset, __pyx_v_notation);

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":514
 * 
 * # initial
 *     def initial (             # <<<<<<<<<<<<<<
 *             self,
 *             bool fullset = False,
 */

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_19DifferentialAlgebra_24RegularDifferentialChain_20initial(struct __pyx_obj_19DifferentialAlgebra_RegularDifferentialChain *__pyx_v_self, PyBoolObject *__pyx_v_fullset, PyObject *__pyx_v_notation) {
  PyObject *__pyx_v_result = 0;
  PyObject *__pyx_v_streqns = 0;
  PyObject *__pyx_v_strvar = 0;
  PyObject *__pyx_v_mesgerr = 0;
  ALGEB_string __pyx_v_A;
  PyObject *__pyx_v_strnot = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  unsigned int __pyx_t_4;
  char *__pyx_t_5;
  bool __pyx_t_6;
  char *__pyx_t_7;
  char *__pyx_t_8;
  char *__pyx_t_9;
  int __pyx_t_10;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("initial", 1);

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":557
 *         cdef bmi_c.ALGEB_string A
 *         cdef strnot
 *         strnot = self.__process_notation (notation)             # <<<<<<<<<<<<<<
 *         streqns = b""
 *         strvar = b"0"
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_RegularDifferentialChain__proce); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 557, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_notation};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 557, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_v_strnot = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":558
 *         cdef strnot
 *         strnot = self.__process_notation (notation)
 *         streqns = b""             # <<<<<<<<<<<<<<
 *         strvar = b"0"
 *         A = bmi_c.bmi_dapyx_leading_coefficient (
 */
  __Pyx_INCREF(__pyx_kp_b__7);
  __pyx_v_streqns = __pyx_kp_b__7;

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":559
 *         strnot = self.__process_notation (notation)
 *         streqns = b""
 *         strvar = b"0"             # <<<<<<<<<<<<<<
 *         A = bmi_c.bmi_dapyx_leading_coefficient (
 *                     streqns, self.regchain, int (fullset), strvar,
 */
  __Pyx_INCREF(__pyx_kp_b_0);
  __pyx_v_strvar = __pyx_kp_b_0;

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":561
 *         strvar = b"0"
 *         A = bmi_c.bmi_dapyx_leading_coefficient (
 *                     streqns, self.regchain, int (fullset), strvar,             # <<<<<<<<<<<<<<
 *                     self.notation, strnot, 0, 0)
 *         if bmi_c.bmi_dapyx_is_error (A):
 */
  __pyx_t_5 = __Pyx_PyBytes_AsWritableString(__pyx_v_streqns); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) __PYX_ERR(2, 561, __pyx_L1_error)
  __pyx_t_1 = __Pyx_PyNumber_Int(((PyObject *)__pyx_v_fullset)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 561, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_6 = __Pyx_PyInt_As_bool(__pyx_t_1); if (unlikely((__pyx_t_6 == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(2, 561, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_7 = __Pyx_PyBytes_AsWritableString(__pyx_v_strvar); if (unlikely((!__pyx_t_7) && PyErr_Occurred())) __PYX_ERR(2, 561, __pyx_L1_error)

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":562
 *         A = bmi_c.bmi_dapyx_leading_coefficient (
 *                     streqns, self.regchain, int (fullset), strvar,
 *                     self.notation, strnot, 0, 0)             # <<<<<<<<<<<<<<
 *         if bmi_c.bmi_dapyx_is_error (A):
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (A)
 */
  __pyx_t_8 = __Pyx_PyObject_AsWritableString(__pyx_v_self->notation); if (unlikely((!__pyx_t_8) && PyErr_Occurred())) __PYX_ERR(2, 562, __pyx_L1_error)
  __pyx_t_9 = __Pyx_PyObject_AsWritableString(__pyx_v_strnot); if (unlikely((!__pyx_t_9) && PyErr_Occurred())) __PYX_ERR(2, 562, __pyx_L1_error)

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":560
 *         streqns = b""
 *         strvar = b"0"
 *         A = bmi_c.bmi_dapyx_leading_coefficient (             # <<<<<<<<<<<<<<
 *                     streqns, self.regchain, int (fullset), strvar,
 *                     self.notation, strnot, 0, 0)
 */
  __pyx_v_A = bmi_dapyx_leading_coefficient(__pyx_t_5, __pyx_v_self->regchain, __pyx_t_6, __pyx_t_7, __pyx_t_8, __pyx_t_9, 0, 0);

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":563
 *                     streqns, self.regchain, int (fullset), strvar,
 *                     self.notation, strnot, 0, 0)
 *         if bmi_c.bmi_dapyx_is_error (A):             # <<<<<<<<<<<<<<
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (A)
 *             bmi_c.bmi_balsa_clear_ALGEB (A)
 */
  __pyx_t_10 = (bmi_dapyx_is_error(__pyx_v_A) != 0);
  if (unlikely(__pyx_t_10)) {

    /* "../../bmi/sympy/RegularDifferentialChain.pyx":564
 *                     self.notation, strnot, 0, 0)
 *         if bmi_c.bmi_dapyx_is_error (A):
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (A)             # <<<<<<<<<<<<<<
 *             bmi_c.bmi_balsa_clear_ALGEB (A)
 *             raise RuntimeError (str (mesgerr, 'utf-8'))
 */
    __pyx_t_1 = __Pyx_PyBytes_FromString(bmi_dapyx_mesgerr(__pyx_v_A)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 564, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_v_mesgerr = ((PyObject*)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "../../bmi/sympy/RegularDifferentialChain.pyx":565
 *         if bmi_c.bmi_dapyx_is_error (A):
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (A)
 *             bmi_c.bmi_balsa_clear_ALGEB (A)             # <<<<<<<<<<<<<<
 *             raise RuntimeError (str (mesgerr, 'utf-8'))
 *         result = eval (A.value, globals (), self.evdict)
 */
    bmi_balsa_clear_ALGEB(__pyx_v_A);

    /* "../../bmi/sympy/RegularDifferentialChain.pyx":566
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (A)
 *             bmi_c.bmi_balsa_clear_ALGEB (A)
 *             raise RuntimeError (str (mesgerr, 'utf-8'))             # <<<<<<<<<<<<<<
 *         result = eval (A.value, globals (), self.evdict)
 *         bmi_c.bmi_balsa_clear_ALGEB (A)
 */
    __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 566, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_v_mesgerr);
    __Pyx_GIVEREF(__pyx_v_mesgerr);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_mesgerr)) __PYX_ERR(2, 566, __pyx_L1_error);
    __Pyx_INCREF(__pyx_kp_u_utf_8);
    __Pyx_GIVEREF(__pyx_kp_u_utf_8);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_kp_u_utf_8)) __PYX_ERR(2, 566, __pyx_L1_error);
    __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)(&PyUnicode_Type)), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 566, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_RuntimeError, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 566, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(2, 566, __pyx_L1_error)

    /* "../../bmi/sympy/RegularDifferentialChain.pyx":563
 *                     streqns, self.regchain, int (fullset), strvar,
 *                     self.notation, strnot, 0, 0)
 *         if bmi_c.bmi_dapyx_is_error (A):             # <<<<<<<<<<<<<<
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (A)
 *             bmi_c.bmi_balsa_clear_ALGEB (A)
 */
  }

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":567
 *             bmi_c.bmi_balsa_clear_ALGEB (A)
 *             raise RuntimeError (str (mesgerr, 'utf-8'))
 *         result = eval (A.value, globals (), self.evdict)             # <<<<<<<<<<<<<<
 *         bmi_c.bmi_balsa_clear_ALGEB (A)
 *         return result
 */
  __pyx_t_1 = __Pyx_PyBytes_FromString(__pyx_v_A->value); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 567, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_Globals(); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 567, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 567, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_1);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1)) __PYX_ERR(2, 567, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_2);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2)) __PYX_ERR(2, 567, __pyx_L1_error);
  __Pyx_INCREF(__pyx_v_self->evdict);
  __Pyx_GIVEREF(__pyx_v_self->evdict);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_self->evdict)) __PYX_ERR(2, 567, __pyx_L1_error);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_eval, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 567, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_result = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":568
 *             raise RuntimeError (str (mesgerr, 'utf-8'))
 *         result = eval (A.value, globals (), self.evdict)
 *         bmi_c.bmi_balsa_clear_ALGEB (A)             # <<<<<<<<<<<<<<
 *         return result
 * 
 */
  bmi_balsa_clear_ALGEB(__pyx_v_A);

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":569
 *         result = eval (A.value, globals (), self.evdict)
 *         bmi_c.bmi_balsa_clear_ALGEB (A)
 *         return result             # <<<<<<<<<<<<<<
 * 
 * # leading_coefficient
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_result);
  __pyx_r = __pyx_v_result;
  goto __pyx_L0;

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":514
 * 
 * # initial
 *     def initial (             # <<<<<<<<<<<<<<
 *             self,
 *             bool fullset = False,
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("DifferentialAlgebra.RegularDifferentialChain.initial", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XDECREF(__pyx_v_streqns);
  __Pyx_XDECREF(__pyx_v_strvar);
  __Pyx_XDECREF(__pyx_v_mesgerr);
  __Pyx_XDECREF(__pyx_v_strnot);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "../../bmi/sympy/RegularDifferentialChain.pyx":572
 * 
 * # leading_coefficient
 *     def leading_coefficient (             # <<<<<<<<<<<<<<
 *             self,
 *             variable = None,
 */

/* Python wrapper */
static PyObject *__pyx_pw_19DifferentialAlgebra_24RegularDifferentialChain_23leading_coefficient(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_19DifferentialAlgebra_24RegularDifferentialChain_22leading_coefficient, "\n        The leading coefficients of a regular differential chain\n\n        INPUT:\n\n            `variable`  -- (default: None) a variable\n            `notation`  -- (default: 'undefined') a string\n\n        OUTPUT:\n\n            The list of leading coefficients with respect to `variable`\n            of the regular differential chain. If `variable` is omitted,\n            the leading coefficients are taken with respect to the\n            leading derivatives.\n\n            See the documentation of differential rings.\n\n        EXAMPLES:\n\n            >>> from sympy import *\n            >>> from DifferentialAlgebra import *\n            >>> init_printing (use_unicode = False, num_columns = 60)\n\n            >>> x,y = var ('x,y')\n            >>> u,v = indexedbase ('u,v')\n            >>> R = DifferentialRing (derivations = [x,y], \n            ...             blocks = [[v,u]], notation = 'jet')\n            >>> eq1 = u[x]**2 - 4*u\n            >>> eq2 = u[x,y]*v[y] - u + 1\n            >>> eq3 = v[x,x] - u[x]\n            >>> ideal = R.RosenfeldGroebner ([eq1,eq2,eq3])\n            >>> ideal\n            [regular_differential_chain]\n\n            >>> C = ideal [0]  \n\n        If `variable` is omitted, the initials are returned:\n\n            >>> C.leading_coefficient ()\n            [1, 1, 4*u, 1]\n\n        The leading coefficients with respect to u:\n\n            >>> C.leading_coefficient (u)\n            [-2, -4, -u[x]*u[y] + 4*v[y], -u[x] + v[x, x]]\n        ");
static PyMethodDef __pyx_mdef_19DifferentialAlgebra_24RegularDifferentialChain_23leading_coefficient = {"leading_coefficient", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_19DifferentialAlgebra_24RegularDifferentialChain_23leading_coefficient, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_19DifferentialAlgebra_24RegularDifferentialChain_22leading_coefficient};
static PyObject *__pyx_pw_19DifferentialAlgebra_24RegularDifferentialChain_23leading_coefficient(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_variable = 0;
  PyBoolObject *__pyx_v_fullset = 0;
  PyObject *__pyx_v_notation = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[3] = {0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("leading_coefficient (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_variable,&__pyx_n_s_fullset,&__pyx_n_s_notation,0};

    /* "../../bmi/sympy/RegularDifferentialChain.pyx":574
 *     def leading_coefficient (
 *             self,
 *             variable = None,             # <<<<<<<<<<<<<<
 *             bool fullset = False,
 *             notation = BMI_IX_undefined):
 */
    values[0] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));

    /* "../../bmi/sympy/RegularDifferentialChain.pyx":575
 *             self,
 *             variable = None,
 *             bool fullset = False,             # <<<<<<<<<<<<<<
 *             notation = BMI_IX_undefined):
 *         r"""
 */
    values[1] = __Pyx_Arg_NewRef_FASTCALL((PyObject *)((PyBoolObject *)Py_False));
    values[2] = __Pyx_Arg_NewRef_FASTCALL(__pyx_k__52);
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_variable);
          if (value) { values[0] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 572, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_fullset);
          if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 572, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_notation);
          if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 572, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "leading_coefficient") < 0)) __PYX_ERR(2, 572, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_variable = values[0];
    __pyx_v_fullset = ((PyBoolObject *)values[1]);
    __pyx_v_notation = values[2];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("leading_coefficient", 0, 0, 3, __pyx_nargs); __PYX_ERR(2, 572, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("DifferentialAlgebra.RegularDifferentialChain.leading_coefficient", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_fullset), __pyx_ptype_7cpython_4bool_bool, 1, "fullset", 0))) __PYX_ERR(2, 575, __pyx_L1_error)
  __pyx_r = __pyx_pf_19DifferentialAlgebra_24RegularDifferentialChain_22leading_coefficient(((struct __pyx_obj_19DifferentialAlgebra_RegularDifferentialChain *)__pyx_v_self), __pyx_v_variable, __pyx_v_fullset, __pyx_v_notation);

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":572
 * 
 * # leading_coefficient
 *     def leading_coefficient (             # <<<<<<<<<<<<<<
 *             self,
 *             variable = None,
 */

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_19DifferentialAlgebra_24RegularDifferentialChain_22leading_coefficient(struct __pyx_obj_19DifferentialAlgebra_RegularDifferentialChain *__pyx_v_self, PyObject *__pyx_v_variable, PyBoolObject *__pyx_v_fullset, PyObject *__pyx_v_notation) {
  PyObject *__pyx_v_result = 0;
  PyObject *__pyx_v_streqns = 0;
  PyObject *__pyx_v_strvar = 0;
  PyObject *__pyx_v_mesgerr = 0;
  ALGEB_string __pyx_v_A;
  PyObject *__pyx_v_strnot = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  unsigned int __pyx_t_4;
  int __pyx_t_5;
  char *__pyx_t_6;
  bool __pyx_t_7;
  char *__pyx_t_8;
  char *__pyx_t_9;
  char *__pyx_t_10;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("leading_coefficient", 1);

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":628
 *         cdef bmi_c.ALGEB_string A
 *         cdef strnot
 *         strnot = self.__process_notation (notation)             # <<<<<<<<<<<<<<
 *         streqns = b""
 *         if variable == None:
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_RegularDifferentialChain__proce); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 628, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_notation};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 628, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_v_strnot = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":629
 *         cdef strnot
 *         strnot = self.__process_notation (notation)
 *         streqns = b""             # <<<<<<<<<<<<<<
 *         if variable == None:
 *             strvar = b"0"
 */
  __Pyx_INCREF(__pyx_kp_b__7);
  __pyx_v_streqns = __pyx_kp_b__7;

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":630
 *         strnot = self.__process_notation (notation)
 *         streqns = b""
 *         if variable == None:             # <<<<<<<<<<<<<<
 *             strvar = b"0"
 *         else:
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_variable, Py_None, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 630, __pyx_L1_error)
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(2, 630, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_5) {

    /* "../../bmi/sympy/RegularDifferentialChain.pyx":631
 *         streqns = b""
 *         if variable == None:
 *             strvar = b"0"             # <<<<<<<<<<<<<<
 *         else:
 *             strvar = ascii (variable)
 */
    __Pyx_INCREF(__pyx_kp_b_0);
    __pyx_v_strvar = __pyx_kp_b_0;

    /* "../../bmi/sympy/RegularDifferentialChain.pyx":630
 *         strnot = self.__process_notation (notation)
 *         streqns = b""
 *         if variable == None:             # <<<<<<<<<<<<<<
 *             strvar = b"0"
 *         else:
 */
    goto __pyx_L3;
  }

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":633
 *             strvar = b"0"
 *         else:
 *             strvar = ascii (variable)             # <<<<<<<<<<<<<<
 *         A = bmi_c.bmi_dapyx_leading_coefficient (
 *                     streqns, self.regchain, int (fullset), strvar,
 */
  /*else*/ {
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ascii); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 633, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = NULL;
    __pyx_t_4 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
        __pyx_t_4 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_variable};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 633, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    if (!(likely(PyBytes_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_1))) __PYX_ERR(2, 633, __pyx_L1_error)
    __pyx_v_strvar = ((PyObject*)__pyx_t_1);
    __pyx_t_1 = 0;
  }
  __pyx_L3:;

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":635
 *             strvar = ascii (variable)
 *         A = bmi_c.bmi_dapyx_leading_coefficient (
 *                     streqns, self.regchain, int (fullset), strvar,             # <<<<<<<<<<<<<<
 *                     self.notation, strnot, 0, 0)
 *         if bmi_c.bmi_dapyx_is_error (A):
 */
  __pyx_t_6 = __Pyx_PyBytes_AsWritableString(__pyx_v_streqns); if (unlikely((!__pyx_t_6) && PyErr_Occurred())) __PYX_ERR(2, 635, __pyx_L1_error)
  __pyx_t_1 = __Pyx_PyNumber_Int(((PyObject *)__pyx_v_fullset)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 635, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_7 = __Pyx_PyInt_As_bool(__pyx_t_1); if (unlikely((__pyx_t_7 == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(2, 635, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(__pyx_v_strvar == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
    __PYX_ERR(2, 635, __pyx_L1_error)
  }
  __pyx_t_8 = __Pyx_PyBytes_AsWritableString(__pyx_v_strvar); if (unlikely((!__pyx_t_8) && PyErr_Occurred())) __PYX_ERR(2, 635, __pyx_L1_error)

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":636
 *         A = bmi_c.bmi_dapyx_leading_coefficient (
 *                     streqns, self.regchain, int (fullset), strvar,
 *                     self.notation, strnot, 0, 0)             # <<<<<<<<<<<<<<
 *         if bmi_c.bmi_dapyx_is_error (A):
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (A)
 */
  __pyx_t_9 = __Pyx_PyObject_AsWritableString(__pyx_v_self->notation); if (unlikely((!__pyx_t_9) && PyErr_Occurred())) __PYX_ERR(2, 636, __pyx_L1_error)
  __pyx_t_10 = __Pyx_PyObject_AsWritableString(__pyx_v_strnot); if (unlikely((!__pyx_t_10) && PyErr_Occurred())) __PYX_ERR(2, 636, __pyx_L1_error)

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":634
 *         else:
 *             strvar = ascii (variable)
 *         A = bmi_c.bmi_dapyx_leading_coefficient (             # <<<<<<<<<<<<<<
 *                     streqns, self.regchain, int (fullset), strvar,
 *                     self.notation, strnot, 0, 0)
 */
  __pyx_v_A = bmi_dapyx_leading_coefficient(__pyx_t_6, __pyx_v_self->regchain, __pyx_t_7, __pyx_t_8, __pyx_t_9, __pyx_t_10, 0, 0);

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":637
 *                     streqns, self.regchain, int (fullset), strvar,
 *                     self.notation, strnot, 0, 0)
 *         if bmi_c.bmi_dapyx_is_error (A):             # <<<<<<<<<<<<<<
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (A)
 *             bmi_c.bmi_balsa_clear_ALGEB (A)
 */
  __pyx_t_5 = (bmi_dapyx_is_error(__pyx_v_A) != 0);
  if (unlikely(__pyx_t_5)) {

    /* "../../bmi/sympy/RegularDifferentialChain.pyx":638
 *                     self.notation, strnot, 0, 0)
 *         if bmi_c.bmi_dapyx_is_error (A):
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (A)             # <<<<<<<<<<<<<<
 *             bmi_c.bmi_balsa_clear_ALGEB (A)
 *             raise RuntimeError (str (mesgerr, 'utf-8'))
 */
    __pyx_t_1 = __Pyx_PyBytes_FromString(bmi_dapyx_mesgerr(__pyx_v_A)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 638, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_v_mesgerr = ((PyObject*)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "../../bmi/sympy/RegularDifferentialChain.pyx":639
 *         if bmi_c.bmi_dapyx_is_error (A):
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (A)
 *             bmi_c.bmi_balsa_clear_ALGEB (A)             # <<<<<<<<<<<<<<
 *             raise RuntimeError (str (mesgerr, 'utf-8'))
 *         result = eval (A.value, globals (), self.evdict)
 */
    bmi_balsa_clear_ALGEB(__pyx_v_A);

    /* "../../bmi/sympy/RegularDifferentialChain.pyx":640
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (A)
 *             bmi_c.bmi_balsa_clear_ALGEB (A)
 *             raise RuntimeError (str (mesgerr, 'utf-8'))             # <<<<<<<<<<<<<<
 *         result = eval (A.value, globals (), self.evdict)
 *         bmi_c.bmi_balsa_clear_ALGEB (A)
 */
    __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 640, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_v_mesgerr);
    __Pyx_GIVEREF(__pyx_v_mesgerr);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_mesgerr)) __PYX_ERR(2, 640, __pyx_L1_error);
    __Pyx_INCREF(__pyx_kp_u_utf_8);
    __Pyx_GIVEREF(__pyx_kp_u_utf_8);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_kp_u_utf_8)) __PYX_ERR(2, 640, __pyx_L1_error);
    __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)(&PyUnicode_Type)), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 640, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_RuntimeError, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 640, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(2, 640, __pyx_L1_error)

    /* "../../bmi/sympy/RegularDifferentialChain.pyx":637
 *                     streqns, self.regchain, int (fullset), strvar,
 *                     self.notation, strnot, 0, 0)
 *         if bmi_c.bmi_dapyx_is_error (A):             # <<<<<<<<<<<<<<
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (A)
 *             bmi_c.bmi_balsa_clear_ALGEB (A)
 */
  }

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":641
 *             bmi_c.bmi_balsa_clear_ALGEB (A)
 *             raise RuntimeError (str (mesgerr, 'utf-8'))
 *         result = eval (A.value, globals (), self.evdict)             # <<<<<<<<<<<<<<
 *         bmi_c.bmi_balsa_clear_ALGEB (A)
 *         return result
 */
  __pyx_t_1 = __Pyx_PyBytes_FromString(__pyx_v_A->value); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 641, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_Globals(); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 641, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 641, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_1);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1)) __PYX_ERR(2, 641, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_2);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2)) __PYX_ERR(2, 641, __pyx_L1_error);
  __Pyx_INCREF(__pyx_v_self->evdict);
  __Pyx_GIVEREF(__pyx_v_self->evdict);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_self->evdict)) __PYX_ERR(2, 641, __pyx_L1_error);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_eval, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 641, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_result = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":642
 *             raise RuntimeError (str (mesgerr, 'utf-8'))
 *         result = eval (A.value, globals (), self.evdict)
 *         bmi_c.bmi_balsa_clear_ALGEB (A)             # <<<<<<<<<<<<<<
 *         return result
 * 
 */
  bmi_balsa_clear_ALGEB(__pyx_v_A);

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":643
 *         result = eval (A.value, globals (), self.evdict)
 *         bmi_c.bmi_balsa_clear_ALGEB (A)
 *         return result             # <<<<<<<<<<<<<<
 * 
 * # tail
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_result);
  __pyx_r = __pyx_v_result;
  goto __pyx_L0;

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":572
 * 
 * # leading_coefficient
 *     def leading_coefficient (             # <<<<<<<<<<<<<<
 *             self,
 *             variable = None,
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("DifferentialAlgebra.RegularDifferentialChain.leading_coefficient", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XDECREF(__pyx_v_streqns);
  __Pyx_XDECREF(__pyx_v_strvar);
  __Pyx_XDECREF(__pyx_v_mesgerr);
  __Pyx_XDECREF(__pyx_v_strnot);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "../../bmi/sympy/RegularDifferentialChain.pyx":646
 * 
 * # tail
 *     def tail (             # <<<<<<<<<<<<<<
 *             self,
 *             variable = None,
 */

/* Python wrapper */
static PyObject *__pyx_pw_19DifferentialAlgebra_24RegularDifferentialChain_25tail(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_19DifferentialAlgebra_24RegularDifferentialChain_24tail, "\n        The tails of a regular differential chain\n\n        INPUT:\n\n            `variable`  -- (default: None) a variable\n            `notation`  -- (default: 'undefined') a string\n\n        OUTPUT:\n\n            The list of the tails, with respect to `variable`, of\n            the regular differential chain. If `variable` is omitted,\n            the tails are taken with respect to the leading derivatives.\n\n            See the documentation of differential rings.\n\n        EXAMPLES:\n\n            >>> from sympy import *\n            >>> from DifferentialAlgebra import *\n            >>> init_printing (use_unicode = False, num_columns = 60)\n\n            >>> x,y = var ('x,y')\n            >>> u,v = indexedbase ('u,v')\n            >>> R = DifferentialRing (derivations = [x,y], \n            ...             blocks = [[v,u]], notation = 'jet')\n            >>> eq1 = u[x]**2 - 4*u\n            >>> eq2 = u[x,y]*v[y] - u + 1\n            >>> eq3 = v[x,x] - u[x]\n            >>> ideal = R.RosenfeldGroebner ([eq1,eq2,eq3])\n            >>> ideal\n            [regular_differential_chain]\n\n            >>> C = ideal [0]  \n\n        If `variable` is omitted, the tails are taken with respect to\n        the leading derivatives:\n\n            >>> C.tail ()\n            [-2*u, -4*u, -u[x]*u[y]*u + u[x]*u[y], -u[x]]\n\n        The tails with respect to u:\n\n            >>> C.tail (u)\n                 2      2               \n            [u[y] , u[x] , u[x]*u[y], 0]\n        ");
static PyMethodDef __pyx_mdef_19DifferentialAlgebra_24RegularDifferentialChain_25tail = {"tail", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_19DifferentialAlgebra_24RegularDifferentialChain_25tail, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_19DifferentialAlgebra_24RegularDifferentialChain_24tail};
static PyObject *__pyx_pw_19DifferentialAlgebra_24RegularDifferentialChain_25tail(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_variable = 0;
  PyBoolObject *__pyx_v_fullset = 0;
  PyObject *__pyx_v_notation = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[3] = {0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("tail (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_variable,&__pyx_n_s_fullset,&__pyx_n_s_notation,0};

    /* "../../bmi/sympy/RegularDifferentialChain.pyx":648
 *     def tail (
 *             self,
 *             variable = None,             # <<<<<<<<<<<<<<
 *             bool fullset = False,
 *             notation = BMI_IX_undefined):
 */
    values[0] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));

    /* "../../bmi/sympy/RegularDifferentialChain.pyx":649
 *             self,
 *             variable = None,
 *             bool fullset = False,             # <<<<<<<<<<<<<<
 *             notation = BMI_IX_undefined):
 *         r"""
 */
    values[1] = __Pyx_Arg_NewRef_FASTCALL((PyObject *)((PyBoolObject *)Py_False));
    values[2] = __Pyx_Arg_NewRef_FASTCALL(__pyx_k__53);
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_variable);
          if (value) { values[0] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 646, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_fullset);
          if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 646, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_notation);
          if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 646, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "tail") < 0)) __PYX_ERR(2, 646, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_variable = values[0];
    __pyx_v_fullset = ((PyBoolObject *)values[1]);
    __pyx_v_notation = values[2];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("tail", 0, 0, 3, __pyx_nargs); __PYX_ERR(2, 646, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("DifferentialAlgebra.RegularDifferentialChain.tail", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_fullset), __pyx_ptype_7cpython_4bool_bool, 1, "fullset", 0))) __PYX_ERR(2, 649, __pyx_L1_error)
  __pyx_r = __pyx_pf_19DifferentialAlgebra_24RegularDifferentialChain_24tail(((struct __pyx_obj_19DifferentialAlgebra_RegularDifferentialChain *)__pyx_v_self), __pyx_v_variable, __pyx_v_fullset, __pyx_v_notation);

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":646
 * 
 * # tail
 *     def tail (             # <<<<<<<<<<<<<<
 *             self,
 *             variable = None,
 */

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_19DifferentialAlgebra_24RegularDifferentialChain_24tail(struct __pyx_obj_19DifferentialAlgebra_RegularDifferentialChain *__pyx_v_self, PyObject *__pyx_v_variable, PyBoolObject *__pyx_v_fullset, PyObject *__pyx_v_notation) {
  PyObject *__pyx_v_result = 0;
  PyObject *__pyx_v_streqns = 0;
  PyObject *__pyx_v_strvar = 0;
  PyObject *__pyx_v_mesgerr = 0;
  ALGEB_string __pyx_v_A;
  PyObject *__pyx_v_strnot = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  unsigned int __pyx_t_4;
  int __pyx_t_5;
  char *__pyx_t_6;
  bool __pyx_t_7;
  char *__pyx_t_8;
  char *__pyx_t_9;
  char *__pyx_t_10;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("tail", 1);

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":703
 *         cdef bmi_c.ALGEB_string A
 *         cdef strnot
 *         strnot = self.__process_notation (notation)             # <<<<<<<<<<<<<<
 *         streqns = b""
 *         if variable == None:
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_RegularDifferentialChain__proce); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 703, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_notation};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 703, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_v_strnot = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":704
 *         cdef strnot
 *         strnot = self.__process_notation (notation)
 *         streqns = b""             # <<<<<<<<<<<<<<
 *         if variable == None:
 *             strvar = b"0"
 */
  __Pyx_INCREF(__pyx_kp_b__7);
  __pyx_v_streqns = __pyx_kp_b__7;

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":705
 *         strnot = self.__process_notation (notation)
 *         streqns = b""
 *         if variable == None:             # <<<<<<<<<<<<<<
 *             strvar = b"0"
 *         else:
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_variable, Py_None, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 705, __pyx_L1_error)
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(2, 705, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_5) {

    /* "../../bmi/sympy/RegularDifferentialChain.pyx":706
 *         streqns = b""
 *         if variable == None:
 *             strvar = b"0"             # <<<<<<<<<<<<<<
 *         else:
 *             strvar = ascii (variable)
 */
    __Pyx_INCREF(__pyx_kp_b_0);
    __pyx_v_strvar = __pyx_kp_b_0;

    /* "../../bmi/sympy/RegularDifferentialChain.pyx":705
 *         strnot = self.__process_notation (notation)
 *         streqns = b""
 *         if variable == None:             # <<<<<<<<<<<<<<
 *             strvar = b"0"
 *         else:
 */
    goto __pyx_L3;
  }

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":708
 *             strvar = b"0"
 *         else:
 *             strvar = ascii (variable)             # <<<<<<<<<<<<<<
 *         A = bmi_c.bmi_dapyx_tail (
 *                     streqns, self.regchain, int (fullset), strvar,
 */
  /*else*/ {
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ascii); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 708, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = NULL;
    __pyx_t_4 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
        __pyx_t_4 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_variable};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 708, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    if (!(likely(PyBytes_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_1))) __PYX_ERR(2, 708, __pyx_L1_error)
    __pyx_v_strvar = ((PyObject*)__pyx_t_1);
    __pyx_t_1 = 0;
  }
  __pyx_L3:;

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":710
 *             strvar = ascii (variable)
 *         A = bmi_c.bmi_dapyx_tail (
 *                     streqns, self.regchain, int (fullset), strvar,             # <<<<<<<<<<<<<<
 *                     self.notation, strnot, 0, 0)
 *         if bmi_c.bmi_dapyx_is_error (A):
 */
  __pyx_t_6 = __Pyx_PyBytes_AsWritableString(__pyx_v_streqns); if (unlikely((!__pyx_t_6) && PyErr_Occurred())) __PYX_ERR(2, 710, __pyx_L1_error)
  __pyx_t_1 = __Pyx_PyNumber_Int(((PyObject *)__pyx_v_fullset)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 710, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_7 = __Pyx_PyInt_As_bool(__pyx_t_1); if (unlikely((__pyx_t_7 == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(2, 710, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(__pyx_v_strvar == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
    __PYX_ERR(2, 710, __pyx_L1_error)
  }
  __pyx_t_8 = __Pyx_PyBytes_AsWritableString(__pyx_v_strvar); if (unlikely((!__pyx_t_8) && PyErr_Occurred())) __PYX_ERR(2, 710, __pyx_L1_error)

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":711
 *         A = bmi_c.bmi_dapyx_tail (
 *                     streqns, self.regchain, int (fullset), strvar,
 *                     self.notation, strnot, 0, 0)             # <<<<<<<<<<<<<<
 *         if bmi_c.bmi_dapyx_is_error (A):
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (A)
 */
  __pyx_t_9 = __Pyx_PyObject_AsWritableString(__pyx_v_self->notation); if (unlikely((!__pyx_t_9) && PyErr_Occurred())) __PYX_ERR(2, 711, __pyx_L1_error)
  __pyx_t_10 = __Pyx_PyObject_AsWritableString(__pyx_v_strnot); if (unlikely((!__pyx_t_10) && PyErr_Occurred())) __PYX_ERR(2, 711, __pyx_L1_error)

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":709
 *         else:
 *             strvar = ascii (variable)
 *         A = bmi_c.bmi_dapyx_tail (             # <<<<<<<<<<<<<<
 *                     streqns, self.regchain, int (fullset), strvar,
 *                     self.notation, strnot, 0, 0)
 */
  __pyx_v_A = bmi_dapyx_tail(__pyx_t_6, __pyx_v_self->regchain, __pyx_t_7, __pyx_t_8, __pyx_t_9, __pyx_t_10, 0, 0);

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":712
 *                     streqns, self.regchain, int (fullset), strvar,
 *                     self.notation, strnot, 0, 0)
 *         if bmi_c.bmi_dapyx_is_error (A):             # <<<<<<<<<<<<<<
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (A)
 *             bmi_c.bmi_balsa_clear_ALGEB (A)
 */
  __pyx_t_5 = (bmi_dapyx_is_error(__pyx_v_A) != 0);
  if (unlikely(__pyx_t_5)) {

    /* "../../bmi/sympy/RegularDifferentialChain.pyx":713
 *                     self.notation, strnot, 0, 0)
 *         if bmi_c.bmi_dapyx_is_error (A):
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (A)             # <<<<<<<<<<<<<<
 *             bmi_c.bmi_balsa_clear_ALGEB (A)
 *             raise RuntimeError (str (mesgerr, 'utf-8'))
 */
    __pyx_t_1 = __Pyx_PyBytes_FromString(bmi_dapyx_mesgerr(__pyx_v_A)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 713, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_v_mesgerr = ((PyObject*)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "../../bmi/sympy/RegularDifferentialChain.pyx":714
 *         if bmi_c.bmi_dapyx_is_error (A):
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (A)
 *             bmi_c.bmi_balsa_clear_ALGEB (A)             # <<<<<<<<<<<<<<
 *             raise RuntimeError (str (mesgerr, 'utf-8'))
 *         result = eval (A.value, globals (), self.evdict)
 */
    bmi_balsa_clear_ALGEB(__pyx_v_A);

    /* "../../bmi/sympy/RegularDifferentialChain.pyx":715
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (A)
 *             bmi_c.bmi_balsa_clear_ALGEB (A)
 *             raise RuntimeError (str (mesgerr, 'utf-8'))             # <<<<<<<<<<<<<<
 *         result = eval (A.value, globals (), self.evdict)
 *         bmi_c.bmi_balsa_clear_ALGEB (A)
 */
    __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 715, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_v_mesgerr);
    __Pyx_GIVEREF(__pyx_v_mesgerr);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_mesgerr)) __PYX_ERR(2, 715, __pyx_L1_error);
    __Pyx_INCREF(__pyx_kp_u_utf_8);
    __Pyx_GIVEREF(__pyx_kp_u_utf_8);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_kp_u_utf_8)) __PYX_ERR(2, 715, __pyx_L1_error);
    __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)(&PyUnicode_Type)), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 715, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_RuntimeError, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 715, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(2, 715, __pyx_L1_error)

    /* "../../bmi/sympy/RegularDifferentialChain.pyx":712
 *                     streqns, self.regchain, int (fullset), strvar,
 *                     self.notation, strnot, 0, 0)
 *         if bmi_c.bmi_dapyx_is_error (A):             # <<<<<<<<<<<<<<
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (A)
 *             bmi_c.bmi_balsa_clear_ALGEB (A)
 */
  }

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":716
 *             bmi_c.bmi_balsa_clear_ALGEB (A)
 *             raise RuntimeError (str (mesgerr, 'utf-8'))
 *         result = eval (A.value, globals (), self.evdict)             # <<<<<<<<<<<<<<
 *         bmi_c.bmi_balsa_clear_ALGEB (A)
 *         return result
 */
  __pyx_t_1 = __Pyx_PyBytes_FromString(__pyx_v_A->value); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 716, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_Globals(); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 716, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 716, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_1);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1)) __PYX_ERR(2, 716, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_2);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2)) __PYX_ERR(2, 716, __pyx_L1_error);
  __Pyx_INCREF(__pyx_v_self->evdict);
  __Pyx_GIVEREF(__pyx_v_self->evdict);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_self->evdict)) __PYX_ERR(2, 716, __pyx_L1_error);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_eval, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 716, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_result = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":717
 *             raise RuntimeError (str (mesgerr, 'utf-8'))
 *         result = eval (A.value, globals (), self.evdict)
 *         bmi_c.bmi_balsa_clear_ALGEB (A)             # <<<<<<<<<<<<<<
 *         return result
 * 
 */
  bmi_balsa_clear_ALGEB(__pyx_v_A);

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":718
 *         result = eval (A.value, globals (), self.evdict)
 *         bmi_c.bmi_balsa_clear_ALGEB (A)
 *         return result             # <<<<<<<<<<<<<<
 * 
 * # separant
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_result);
  __pyx_r = __pyx_v_result;
  goto __pyx_L0;

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":646
 * 
 * # tail
 *     def tail (             # <<<<<<<<<<<<<<
 *             self,
 *             variable = None,
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("DifferentialAlgebra.RegularDifferentialChain.tail", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XDECREF(__pyx_v_streqns);
  __Pyx_XDECREF(__pyx_v_strvar);
  __Pyx_XDECREF(__pyx_v_mesgerr);
  __Pyx_XDECREF(__pyx_v_strnot);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "../../bmi/sympy/RegularDifferentialChain.pyx":721
 * 
 * # separant
 *     def separant (             # <<<<<<<<<<<<<<
 *             self,
 *             variable = None,
 */

/* Python wrapper */
static PyObject *__pyx_pw_19DifferentialAlgebra_24RegularDifferentialChain_27separant(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_19DifferentialAlgebra_24RegularDifferentialChain_26separant, "\n        The separants of a regular differential chain\n\n        INPUT:\n\n            `variable`  -- (default: None) a variable\n            `notation`  -- (default: 'undefined') a string\n\n        OUTPUT:\n\n            The list of the separants, with respect to `variable`,\n            of the regular differential chain. If `variable` is\n            omitted, the separants are taken with respect to the\n            leading derivatives.\n\n            See the documentation of differential rings.\n\n        EXAMPLES:\n\n            >>> from sympy import *\n            >>> from DifferentialAlgebra import *\n            >>> init_printing (use_unicode = False, num_columns = 60)\n\n            >>> x,y = var ('x,y')\n            >>> u,v = indexedbase ('u,v')\n            >>> R = DifferentialRing (derivations = [x,y], \n            ...             blocks = [[v,u]], notation = 'jet')\n            >>> eq1 = u[x]**2 - 4*u\n            >>> eq2 = u[x,y]*v[y] - u + 1\n            >>> eq3 = v[x,x] - u[x]\n            >>> ideal = R.RosenfeldGroebner ([eq1,eq2,eq3])\n            >>> ideal\n            [regular_differential_chain]\n\n            >>> C = ideal [0]  \n\n        If `variable` is omitted, the separants are taken with respect\n        to the leading derivatives:\n\n            >>> C.separant ()\n            [2*u[y], 2*u[x], 4*u, 1]\n\n        The separants with respect to u:\n\n            >>> C.separant (u)\n            [-2, -4, -u[x]*u[y] + 4*v[y], 0]\n        ");
static PyMethodDef __pyx_mdef_19DifferentialAlgebra_24RegularDifferentialChain_27separant = {"separant", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_19DifferentialAlgebra_24RegularDifferentialChain_27separant, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_19DifferentialAlgebra_24RegularDifferentialChain_26separant};
static PyObject *__pyx_pw_19DifferentialAlgebra_24RegularDifferentialChain_27separant(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_variable = 0;
  PyBoolObject *__pyx_v_fullset = 0;
  PyObject *__pyx_v_notation = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[3] = {0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("separant (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_variable,&__pyx_n_s_fullset,&__pyx_n_s_notation,0};

    /* "../../bmi/sympy/RegularDifferentialChain.pyx":723
 *     def separant (
 *             self,
 *             variable = None,             # <<<<<<<<<<<<<<
 *             bool fullset = False,
 *             notation = BMI_IX_undefined):
 */
    values[0] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));

    /* "../../bmi/sympy/RegularDifferentialChain.pyx":724
 *             self,
 *             variable = None,
 *             bool fullset = False,             # <<<<<<<<<<<<<<
 *             notation = BMI_IX_undefined):
 *         r"""
 */
    values[1] = __Pyx_Arg_NewRef_FASTCALL((PyObject *)((PyBoolObject *)Py_False));
    values[2] = __Pyx_Arg_NewRef_FASTCALL(__pyx_k__54);
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_variable);
          if (value) { values[0] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 721, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_fullset);
          if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 721, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_notation);
          if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 721, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "separant") < 0)) __PYX_ERR(2, 721, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_variable = values[0];
    __pyx_v_fullset = ((PyBoolObject *)values[1]);
    __pyx_v_notation = values[2];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("separant", 0, 0, 3, __pyx_nargs); __PYX_ERR(2, 721, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("DifferentialAlgebra.RegularDifferentialChain.separant", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_fullset), __pyx_ptype_7cpython_4bool_bool, 1, "fullset", 0))) __PYX_ERR(2, 724, __pyx_L1_error)
  __pyx_r = __pyx_pf_19DifferentialAlgebra_24RegularDifferentialChain_26separant(((struct __pyx_obj_19DifferentialAlgebra_RegularDifferentialChain *)__pyx_v_self), __pyx_v_variable, __pyx_v_fullset, __pyx_v_notation);

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":721
 * 
 * # separant
 *     def separant (             # <<<<<<<<<<<<<<
 *             self,
 *             variable = None,
 */

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_19DifferentialAlgebra_24RegularDifferentialChain_26separant(struct __pyx_obj_19DifferentialAlgebra_RegularDifferentialChain *__pyx_v_self, PyObject *__pyx_v_variable, PyBoolObject *__pyx_v_fullset, PyObject *__pyx_v_notation) {
  PyObject *__pyx_v_result = 0;
  PyObject *__pyx_v_streqns = 0;
  PyObject *__pyx_v_strvar = 0;
  PyObject *__pyx_v_mesgerr = 0;
  ALGEB_string __pyx_v_A;
  PyObject *__pyx_v_strnot = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  unsigned int __pyx_t_4;
  int __pyx_t_5;
  char *__pyx_t_6;
  bool __pyx_t_7;
  char *__pyx_t_8;
  char *__pyx_t_9;
  char *__pyx_t_10;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("separant", 1);

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":778
 *         cdef bmi_c.ALGEB_string A
 *         cdef strnot
 *         strnot = self.__process_notation (notation)             # <<<<<<<<<<<<<<
 *         streqns = b""
 *         if variable == None:
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_RegularDifferentialChain__proce); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 778, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_notation};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 778, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_v_strnot = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":779
 *         cdef strnot
 *         strnot = self.__process_notation (notation)
 *         streqns = b""             # <<<<<<<<<<<<<<
 *         if variable == None:
 *             strvar = b"0"
 */
  __Pyx_INCREF(__pyx_kp_b__7);
  __pyx_v_streqns = __pyx_kp_b__7;

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":780
 *         strnot = self.__process_notation (notation)
 *         streqns = b""
 *         if variable == None:             # <<<<<<<<<<<<<<
 *             strvar = b"0"
 *         else:
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_variable, Py_None, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 780, __pyx_L1_error)
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(2, 780, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_5) {

    /* "../../bmi/sympy/RegularDifferentialChain.pyx":781
 *         streqns = b""
 *         if variable == None:
 *             strvar = b"0"             # <<<<<<<<<<<<<<
 *         else:
 *             strvar = ascii (variable)
 */
    __Pyx_INCREF(__pyx_kp_b_0);
    __pyx_v_strvar = __pyx_kp_b_0;

    /* "../../bmi/sympy/RegularDifferentialChain.pyx":780
 *         strnot = self.__process_notation (notation)
 *         streqns = b""
 *         if variable == None:             # <<<<<<<<<<<<<<
 *             strvar = b"0"
 *         else:
 */
    goto __pyx_L3;
  }

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":783
 *             strvar = b"0"
 *         else:
 *             strvar = ascii (variable)             # <<<<<<<<<<<<<<
 *         A = bmi_c.bmi_dapyx_separant (
 *                     streqns, self.regchain, int (fullset), strvar,
 */
  /*else*/ {
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ascii); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 783, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = NULL;
    __pyx_t_4 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
        __pyx_t_4 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_variable};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 783, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    if (!(likely(PyBytes_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_1))) __PYX_ERR(2, 783, __pyx_L1_error)
    __pyx_v_strvar = ((PyObject*)__pyx_t_1);
    __pyx_t_1 = 0;
  }
  __pyx_L3:;

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":785
 *             strvar = ascii (variable)
 *         A = bmi_c.bmi_dapyx_separant (
 *                     streqns, self.regchain, int (fullset), strvar,             # <<<<<<<<<<<<<<
 *                     self.notation, strnot, 0, 0)
 *         if bmi_c.bmi_dapyx_is_error (A):
 */
  __pyx_t_6 = __Pyx_PyBytes_AsWritableString(__pyx_v_streqns); if (unlikely((!__pyx_t_6) && PyErr_Occurred())) __PYX_ERR(2, 785, __pyx_L1_error)
  __pyx_t_1 = __Pyx_PyNumber_Int(((PyObject *)__pyx_v_fullset)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 785, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_7 = __Pyx_PyInt_As_bool(__pyx_t_1); if (unlikely((__pyx_t_7 == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(2, 785, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(__pyx_v_strvar == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
    __PYX_ERR(2, 785, __pyx_L1_error)
  }
  __pyx_t_8 = __Pyx_PyBytes_AsWritableString(__pyx_v_strvar); if (unlikely((!__pyx_t_8) && PyErr_Occurred())) __PYX_ERR(2, 785, __pyx_L1_error)

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":786
 *         A = bmi_c.bmi_dapyx_separant (
 *                     streqns, self.regchain, int (fullset), strvar,
 *                     self.notation, strnot, 0, 0)             # <<<<<<<<<<<<<<
 *         if bmi_c.bmi_dapyx_is_error (A):
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (A)
 */
  __pyx_t_9 = __Pyx_PyObject_AsWritableString(__pyx_v_self->notation); if (unlikely((!__pyx_t_9) && PyErr_Occurred())) __PYX_ERR(2, 786, __pyx_L1_error)
  __pyx_t_10 = __Pyx_PyObject_AsWritableString(__pyx_v_strnot); if (unlikely((!__pyx_t_10) && PyErr_Occurred())) __PYX_ERR(2, 786, __pyx_L1_error)

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":784
 *         else:
 *             strvar = ascii (variable)
 *         A = bmi_c.bmi_dapyx_separant (             # <<<<<<<<<<<<<<
 *                     streqns, self.regchain, int (fullset), strvar,
 *                     self.notation, strnot, 0, 0)
 */
  __pyx_v_A = bmi_dapyx_separant(__pyx_t_6, __pyx_v_self->regchain, __pyx_t_7, __pyx_t_8, __pyx_t_9, __pyx_t_10, 0, 0);

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":787
 *                     streqns, self.regchain, int (fullset), strvar,
 *                     self.notation, strnot, 0, 0)
 *         if bmi_c.bmi_dapyx_is_error (A):             # <<<<<<<<<<<<<<
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (A)
 *             bmi_c.bmi_balsa_clear_ALGEB (A)
 */
  __pyx_t_5 = (bmi_dapyx_is_error(__pyx_v_A) != 0);
  if (unlikely(__pyx_t_5)) {

    /* "../../bmi/sympy/RegularDifferentialChain.pyx":788
 *                     self.notation, strnot, 0, 0)
 *         if bmi_c.bmi_dapyx_is_error (A):
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (A)             # <<<<<<<<<<<<<<
 *             bmi_c.bmi_balsa_clear_ALGEB (A)
 *             raise RuntimeError (str (mesgerr, 'utf-8'))
 */
    __pyx_t_1 = __Pyx_PyBytes_FromString(bmi_dapyx_mesgerr(__pyx_v_A)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 788, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_v_mesgerr = ((PyObject*)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "../../bmi/sympy/RegularDifferentialChain.pyx":789
 *         if bmi_c.bmi_dapyx_is_error (A):
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (A)
 *             bmi_c.bmi_balsa_clear_ALGEB (A)             # <<<<<<<<<<<<<<
 *             raise RuntimeError (str (mesgerr, 'utf-8'))
 *         result = eval (A.value, globals (), self.evdict)
 */
    bmi_balsa_clear_ALGEB(__pyx_v_A);

    /* "../../bmi/sympy/RegularDifferentialChain.pyx":790
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (A)
 *             bmi_c.bmi_balsa_clear_ALGEB (A)
 *             raise RuntimeError (str (mesgerr, 'utf-8'))             # <<<<<<<<<<<<<<
 *         result = eval (A.value, globals (), self.evdict)
 *         bmi_c.bmi_balsa_clear_ALGEB (A)
 */
    __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 790, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_v_mesgerr);
    __Pyx_GIVEREF(__pyx_v_mesgerr);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_mesgerr)) __PYX_ERR(2, 790, __pyx_L1_error);
    __Pyx_INCREF(__pyx_kp_u_utf_8);
    __Pyx_GIVEREF(__pyx_kp_u_utf_8);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_kp_u_utf_8)) __PYX_ERR(2, 790, __pyx_L1_error);
    __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)(&PyUnicode_Type)), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 790, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_RuntimeError, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 790, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(2, 790, __pyx_L1_error)

    /* "../../bmi/sympy/RegularDifferentialChain.pyx":787
 *                     streqns, self.regchain, int (fullset), strvar,
 *                     self.notation, strnot, 0, 0)
 *         if bmi_c.bmi_dapyx_is_error (A):             # <<<<<<<<<<<<<<
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (A)
 *             bmi_c.bmi_balsa_clear_ALGEB (A)
 */
  }

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":791
 *             bmi_c.bmi_balsa_clear_ALGEB (A)
 *             raise RuntimeError (str (mesgerr, 'utf-8'))
 *         result = eval (A.value, globals (), self.evdict)             # <<<<<<<<<<<<<<
 *         bmi_c.bmi_balsa_clear_ALGEB (A)
 *         return result
 */
  __pyx_t_1 = __Pyx_PyBytes_FromString(__pyx_v_A->value); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 791, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_Globals(); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 791, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 791, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_1);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1)) __PYX_ERR(2, 791, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_2);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2)) __PYX_ERR(2, 791, __pyx_L1_error);
  __Pyx_INCREF(__pyx_v_self->evdict);
  __Pyx_GIVEREF(__pyx_v_self->evdict);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_self->evdict)) __PYX_ERR(2, 791, __pyx_L1_error);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_eval, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 791, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_result = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":792
 *             raise RuntimeError (str (mesgerr, 'utf-8'))
 *         result = eval (A.value, globals (), self.evdict)
 *         bmi_c.bmi_balsa_clear_ALGEB (A)             # <<<<<<<<<<<<<<
 *         return result
 * 
 */
  bmi_balsa_clear_ALGEB(__pyx_v_A);

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":793
 *         result = eval (A.value, globals (), self.evdict)
 *         bmi_c.bmi_balsa_clear_ALGEB (A)
 *         return result             # <<<<<<<<<<<<<<
 * 
 * # indets
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_result);
  __pyx_r = __pyx_v_result;
  goto __pyx_L0;

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":721
 * 
 * # separant
 *     def separant (             # <<<<<<<<<<<<<<
 *             self,
 *             variable = None,
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("DifferentialAlgebra.RegularDifferentialChain.separant", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XDECREF(__pyx_v_streqns);
  __Pyx_XDECREF(__pyx_v_strvar);
  __Pyx_XDECREF(__pyx_v_mesgerr);
  __Pyx_XDECREF(__pyx_v_strnot);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "../../bmi/sympy/RegularDifferentialChain.pyx":796
 * 
 * # indets
 *     def indets (             # <<<<<<<<<<<<<<
 *                 self,
 *                 selection = BMI_IX_derivs,
 */

/* Python wrapper */
static PyObject *__pyx_pw_19DifferentialAlgebra_24RegularDifferentialChain_29indets(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_19DifferentialAlgebra_24RegularDifferentialChain_28indets, "\n        The indeterminates of a RegularDifferentialChain\n\n        INPUT:\n\n            `selection`  -- (default: 'derivatives') a string\n            `notation`   -- (default: 'undefined') a string\n\n        OUTPUT:\n\n            A list of variable and indexedbase, selected according to\n            `selection`. See the examples below.\n\n        EXAMPLES:\n\n            >>> from sympy import *\n            >>> from DifferentialAlgebra import *\n            >>> init_printing (use_unicode = False, num_columns = 60)\n\n            >>> x,y = var ('x,y')\n            >>> u,v = indexedbase ('u,v')\n            >>> R = DifferentialRing (derivations = [x,y], \n            ...             blocks = [[v,u]], notation = 'jet')\n            >>> eq1 = u[x]**2 - 4*u\n            >>> eq2 = u[x,y]*v[y] - u + 1\n            >>> eq3 = v[x,x] - u[x]\n            >>> ideal = R.RosenfeldGroebner ([eq1,eq2,eq3])\n            >>> ideal\n            [regular_differential_chain]\n\n            >>> C = ideal [0]  \n\n        With no selection, or with 'derivatives', return the list of\n        the derivatives occurring in the elements of C:\n\n            >>> C.indets ()\n            [u, u[x], v[y], v[x, x], u[y]]\n\n            >>> C.indets (selection = 'derivatives')\n            [u, u[x], v[y], v[x, x], u[y]]\n\n        With 'dependent', return the list of the differential\n        indeterminates, or dependent variables, occurring in the\n        elements of C:\n\n            >>> C.indets (selection = 'dependent')  \n            [v, u]\n\n        With 'parameters', return the list of the parameters occurring\n        in the elements of C:\n\n            >>> C.indets (selection = 'parameters')\n            []\n\n        With 'all', return the list of the independent and the dependent\n        variables occurring in the elements of C:\n\n            >>> C.indets (selection = 'all')       \n            [u, u[x], v[y], v[x, x], u[y]]\n        ");
static PyMethodDef __pyx_mdef_19DifferentialAlgebra_24RegularDifferentialChain_29indets = {"indets", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_19DifferentialAlgebra_24RegularDifferentialChain_29indets, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_19DifferentialAlgebra_24RegularDifferentialChain_28indets};
static PyObject *__pyx_pw_19DifferentialAlgebra_24RegularDifferentialChain_29indets(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_selection = 0;
  PyBoolObject *__pyx_v_fullset = 0;
  PyObject *__pyx_v_notation = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[3] = {0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("indets (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_selection,&__pyx_n_s_fullset,&__pyx_n_s_notation,0};
    values[0] = __Pyx_Arg_NewRef_FASTCALL(__pyx_k__55);

    /* "../../bmi/sympy/RegularDifferentialChain.pyx":799
 *                 self,
 *                 selection = BMI_IX_derivs,
 *                 bool fullset = False,             # <<<<<<<<<<<<<<
 *                 notation = BMI_IX_undefined):
 *         r"""
 */
    values[1] = __Pyx_Arg_NewRef_FASTCALL((PyObject *)((PyBoolObject *)Py_False));
    values[2] = __Pyx_Arg_NewRef_FASTCALL(__pyx_k__56);
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_selection);
          if (value) { values[0] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 796, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_fullset);
          if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 796, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_notation);
          if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 796, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "indets") < 0)) __PYX_ERR(2, 796, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_selection = values[0];
    __pyx_v_fullset = ((PyBoolObject *)values[1]);
    __pyx_v_notation = values[2];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("indets", 0, 0, 3, __pyx_nargs); __PYX_ERR(2, 796, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("DifferentialAlgebra.RegularDifferentialChain.indets", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_fullset), __pyx_ptype_7cpython_4bool_bool, 1, "fullset", 0))) __PYX_ERR(2, 799, __pyx_L1_error)
  __pyx_r = __pyx_pf_19DifferentialAlgebra_24RegularDifferentialChain_28indets(((struct __pyx_obj_19DifferentialAlgebra_RegularDifferentialChain *)__pyx_v_self), __pyx_v_selection, __pyx_v_fullset, __pyx_v_notation);

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":796
 * 
 * # indets
 *     def indets (             # <<<<<<<<<<<<<<
 *                 self,
 *                 selection = BMI_IX_derivs,
 */

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_19DifferentialAlgebra_24RegularDifferentialChain_28indets(struct __pyx_obj_19DifferentialAlgebra_RegularDifferentialChain *__pyx_v_self, PyObject *__pyx_v_selection, PyBoolObject *__pyx_v_fullset, PyObject *__pyx_v_notation) {
  PyObject *__pyx_v_result = 0;
  PyObject *__pyx_v_streqns = 0;
  PyObject *__pyx_v_strfull = 0;
  PyObject *__pyx_v_mesgerr = 0;
  PyObject *__pyx_v_strsel = 0;
  ALGEB_string __pyx_v_L;
  PyObject *__pyx_v_strnot = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  unsigned int __pyx_t_4;
  int __pyx_t_5;
  char *__pyx_t_6;
  char *__pyx_t_7;
  char *__pyx_t_8;
  char *__pyx_t_9;
  char *__pyx_t_10;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("indets", 1);

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":866
 *         cdef bmi_c.ALGEB_string L
 *         cdef strnot
 *         strnot = self.__process_notation (notation)             # <<<<<<<<<<<<<<
 *         streqns = b""
 *         if fullset:
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_RegularDifferentialChain__proce); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 866, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_notation};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 866, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_v_strnot = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":867
 *         cdef strnot
 *         strnot = self.__process_notation (notation)
 *         streqns = b""             # <<<<<<<<<<<<<<
 *         if fullset:
 *             strfull = b"true"
 */
  __Pyx_INCREF(__pyx_kp_b__7);
  __pyx_v_streqns = __pyx_kp_b__7;

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":868
 *         strnot = self.__process_notation (notation)
 *         streqns = b""
 *         if fullset:             # <<<<<<<<<<<<<<
 *             strfull = b"true"
 *         else:
 */
  __pyx_t_5 = __Pyx_PyObject_IsTrue(((PyObject *)__pyx_v_fullset)); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(2, 868, __pyx_L1_error)
  if (__pyx_t_5) {

    /* "../../bmi/sympy/RegularDifferentialChain.pyx":869
 *         streqns = b""
 *         if fullset:
 *             strfull = b"true"             # <<<<<<<<<<<<<<
 *         else:
 *             strfull = b"false"
 */
    __Pyx_INCREF(__pyx_n_b_true);
    __pyx_v_strfull = __pyx_n_b_true;

    /* "../../bmi/sympy/RegularDifferentialChain.pyx":868
 *         strnot = self.__process_notation (notation)
 *         streqns = b""
 *         if fullset:             # <<<<<<<<<<<<<<
 *             strfull = b"true"
 *         else:
 */
    goto __pyx_L3;
  }

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":871
 *             strfull = b"true"
 *         else:
 *             strfull = b"false"             # <<<<<<<<<<<<<<
 *         strsel = ascii (selection)
 *         L = bmi_c.bmi_dapyx_indets (
 */
  /*else*/ {
    __Pyx_INCREF(__pyx_n_b_false);
    __pyx_v_strfull = __pyx_n_b_false;
  }
  __pyx_L3:;

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":872
 *         else:
 *             strfull = b"false"
 *         strsel = ascii (selection)             # <<<<<<<<<<<<<<
 *         L = bmi_c.bmi_dapyx_indets (
 *                         streqns, self.regchain, strsel, strfull,
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ascii); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 872, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_selection};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 872, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  if (!(likely(PyBytes_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_1))) __PYX_ERR(2, 872, __pyx_L1_error)
  __pyx_v_strsel = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":874
 *         strsel = ascii (selection)
 *         L = bmi_c.bmi_dapyx_indets (
 *                         streqns, self.regchain, strsel, strfull,             # <<<<<<<<<<<<<<
 *                         self.notation, strnot, 0, 0)
 *         if bmi_c.bmi_dapyx_is_error (L):
 */
  __pyx_t_6 = __Pyx_PyBytes_AsWritableString(__pyx_v_streqns); if (unlikely((!__pyx_t_6) && PyErr_Occurred())) __PYX_ERR(2, 874, __pyx_L1_error)
  if (unlikely(__pyx_v_strsel == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
    __PYX_ERR(2, 874, __pyx_L1_error)
  }
  __pyx_t_7 = __Pyx_PyBytes_AsWritableString(__pyx_v_strsel); if (unlikely((!__pyx_t_7) && PyErr_Occurred())) __PYX_ERR(2, 874, __pyx_L1_error)
  __pyx_t_8 = __Pyx_PyBytes_AsWritableString(__pyx_v_strfull); if (unlikely((!__pyx_t_8) && PyErr_Occurred())) __PYX_ERR(2, 874, __pyx_L1_error)

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":875
 *         L = bmi_c.bmi_dapyx_indets (
 *                         streqns, self.regchain, strsel, strfull,
 *                         self.notation, strnot, 0, 0)             # <<<<<<<<<<<<<<
 *         if bmi_c.bmi_dapyx_is_error (L):
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (L)
 */
  __pyx_t_9 = __Pyx_PyObject_AsWritableString(__pyx_v_self->notation); if (unlikely((!__pyx_t_9) && PyErr_Occurred())) __PYX_ERR(2, 875, __pyx_L1_error)
  __pyx_t_10 = __Pyx_PyObject_AsWritableString(__pyx_v_strnot); if (unlikely((!__pyx_t_10) && PyErr_Occurred())) __PYX_ERR(2, 875, __pyx_L1_error)

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":873
 *             strfull = b"false"
 *         strsel = ascii (selection)
 *         L = bmi_c.bmi_dapyx_indets (             # <<<<<<<<<<<<<<
 *                         streqns, self.regchain, strsel, strfull,
 *                         self.notation, strnot, 0, 0)
 */
  __pyx_v_L = bmi_dapyx_indets(__pyx_t_6, __pyx_v_self->regchain, __pyx_t_7, __pyx_t_8, __pyx_t_9, __pyx_t_10, 0, 0);

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":876
 *                         streqns, self.regchain, strsel, strfull,
 *                         self.notation, strnot, 0, 0)
 *         if bmi_c.bmi_dapyx_is_error (L):             # <<<<<<<<<<<<<<
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (L)
 *             bmi_c.bmi_balsa_clear_ALGEB (L)
 */
  __pyx_t_5 = (bmi_dapyx_is_error(__pyx_v_L) != 0);
  if (unlikely(__pyx_t_5)) {

    /* "../../bmi/sympy/RegularDifferentialChain.pyx":877
 *                         self.notation, strnot, 0, 0)
 *         if bmi_c.bmi_dapyx_is_error (L):
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (L)             # <<<<<<<<<<<<<<
 *             bmi_c.bmi_balsa_clear_ALGEB (L)
 *             raise RuntimeError (str (mesgerr, 'utf-8'))
 */
    __pyx_t_1 = __Pyx_PyBytes_FromString(bmi_dapyx_mesgerr(__pyx_v_L)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 877, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_v_mesgerr = ((PyObject*)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "../../bmi/sympy/RegularDifferentialChain.pyx":878
 *         if bmi_c.bmi_dapyx_is_error (L):
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (L)
 *             bmi_c.bmi_balsa_clear_ALGEB (L)             # <<<<<<<<<<<<<<
 *             raise RuntimeError (str (mesgerr, 'utf-8'))
 *         result = eval (L.value, globals (), self.evdict)
 */
    bmi_balsa_clear_ALGEB(__pyx_v_L);

    /* "../../bmi/sympy/RegularDifferentialChain.pyx":879
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (L)
 *             bmi_c.bmi_balsa_clear_ALGEB (L)
 *             raise RuntimeError (str (mesgerr, 'utf-8'))             # <<<<<<<<<<<<<<
 *         result = eval (L.value, globals (), self.evdict)
 *         bmi_c.bmi_balsa_clear_ALGEB (L)
 */
    __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 879, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_v_mesgerr);
    __Pyx_GIVEREF(__pyx_v_mesgerr);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_mesgerr)) __PYX_ERR(2, 879, __pyx_L1_error);
    __Pyx_INCREF(__pyx_kp_u_utf_8);
    __Pyx_GIVEREF(__pyx_kp_u_utf_8);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_kp_u_utf_8)) __PYX_ERR(2, 879, __pyx_L1_error);
    __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)(&PyUnicode_Type)), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 879, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_RuntimeError, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 879, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(2, 879, __pyx_L1_error)

    /* "../../bmi/sympy/RegularDifferentialChain.pyx":876
 *                         streqns, self.regchain, strsel, strfull,
 *                         self.notation, strnot, 0, 0)
 *         if bmi_c.bmi_dapyx_is_error (L):             # <<<<<<<<<<<<<<
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (L)
 *             bmi_c.bmi_balsa_clear_ALGEB (L)
 */
  }

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":880
 *             bmi_c.bmi_balsa_clear_ALGEB (L)
 *             raise RuntimeError (str (mesgerr, 'utf-8'))
 *         result = eval (L.value, globals (), self.evdict)             # <<<<<<<<<<<<<<
 *         bmi_c.bmi_balsa_clear_ALGEB (L)
 *         return result
 */
  __pyx_t_1 = __Pyx_PyBytes_FromString(__pyx_v_L->value); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 880, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_Globals(); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 880, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 880, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_1);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1)) __PYX_ERR(2, 880, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_2);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2)) __PYX_ERR(2, 880, __pyx_L1_error);
  __Pyx_INCREF(__pyx_v_self->evdict);
  __Pyx_GIVEREF(__pyx_v_self->evdict);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_self->evdict)) __PYX_ERR(2, 880, __pyx_L1_error);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_eval, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 880, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (!(likely(PyList_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None) || __Pyx_RaiseUnexpectedTypeError("list", __pyx_t_2))) __PYX_ERR(2, 880, __pyx_L1_error)
  __pyx_v_result = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":881
 *             raise RuntimeError (str (mesgerr, 'utf-8'))
 *         result = eval (L.value, globals (), self.evdict)
 *         bmi_c.bmi_balsa_clear_ALGEB (L)             # <<<<<<<<<<<<<<
 *         return result
 * 
 */
  bmi_balsa_clear_ALGEB(__pyx_v_L);

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":882
 *         result = eval (L.value, globals (), self.evdict)
 *         bmi_c.bmi_balsa_clear_ALGEB (L)
 *         return result             # <<<<<<<<<<<<<<
 * 
 * # differential_prem
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_result);
  __pyx_r = __pyx_v_result;
  goto __pyx_L0;

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":796
 * 
 * # indets
 *     def indets (             # <<<<<<<<<<<<<<
 *                 self,
 *                 selection = BMI_IX_derivs,
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("DifferentialAlgebra.RegularDifferentialChain.indets", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XDECREF(__pyx_v_streqns);
  __Pyx_XDECREF(__pyx_v_strfull);
  __Pyx_XDECREF(__pyx_v_mesgerr);
  __Pyx_XDECREF(__pyx_v_strsel);
  __Pyx_XDECREF(__pyx_v_strnot);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "../../bmi/sympy/RegularDifferentialChain.pyx":885
 * 
 * # differential_prem
 *     def differential_prem (             # <<<<<<<<<<<<<<
 *              self,
 *              polynomial,
 */

/* Python wrapper */
static PyObject *__pyx_pw_19DifferentialAlgebra_24RegularDifferentialChain_31differential_prem(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_19DifferentialAlgebra_24RegularDifferentialChain_30differential_prem, "\n        Ritt's reduction algorithm by a regular differential chain\n\n        INPUT:\n\n            `polynomial` -- a polynomial\n            `mode`       -- (default: 'full') a string\n            `notation`   -- (default: 'undefined') a string\n\n        OUTPUT:\n\n            A pair (h, r) such that h*p = r modulo the differential\n            ideal generated by the equations of the regular differential\n            chain (denoting p for `polynomial`).\n\n            The optional argument `mode` = 'full', 'partial' or\n            'algebraic'.  If 'full', the remainder r is fully reduced\n            with respect to the chain equations. If 'partial', the\n            remainder r is partially reduced with respect to the chain\n            equations. If 'algebraic', the remainder is algebraically\n            reduced with respect to the chain equations.\n\n            In all cases, h is a product of powers of the initials\n            and separants involved in the reduction process.\n\n        EXAMPLES:\n\n            >>> from sympy import *\n            >>> from DifferentialAlgebra import *\n            >>> init_printing (use_unicode = False, num_columns = 60)\n\n            >>> x,y = var ('x,y')\n            >>> u,v = indexedbase ('u,v')\n            >>> R = DifferentialRing (derivations = [x,y], \n            ...             blocks = [[v,u]], notation = 'jet')\n            >>> eq1 = u[x]**2 - 4*u\n            >>> eq2 = u[x,y]*v[y] - u + 1\n            >>> eq3 = v[x,x] - u[x]\n            >>> ideal = R.RosenfeldGroebner ([eq1,eq2,eq3])\n            >>> ideal\n            [regular_differential_chain]\n\n            >>> C = ideal [0]\n\n        Here are the chain equations:\n\n            >>> C.equations (solved = True)\n                 2            2               u[x]*u[y]*u - u[x]*u[y]  >\n            [u[y]  = 2*u, u[x]  = 4*u, v[y] = -----------------------, >\n                                                        4*u            >\n            |  \n       ""     >                 \n            >  v[x, x] = u[x]]\n            >                 \n\n        The first polynomial is already fully reduced with respect to\n        the chain equations:\n\n            >>> poly = (Integer(1)/Integer(7))*u\n            >>> h, r = C.differential_prem (poly)\n            >>> h, r\n                u \n            (1, -)\n                7 \n\n        Check:\n\n            >>> C.normal_form (h * poly - r)\n            0\n\n        The next polynomial is not reduced with respect to the chain\n        equations:\n\n            >>> poly = (Integer(1)/Integer(7))*v[x,y] + u[x,x]\n            >>> h, r = C.differential_prem (poly)\n            >>> h, r\n                                                    2 \n                           2  32*(7*u[y] + u)*u[x]*u  \n            (16*u[x]*u[y]*u , -----------------------)\n                                         7            \n\n            >>> C.normal_form (h * poly - r)\n            0\n\n        Let us try a partial reduction, instead of a full one:\n\n            >>> h, r = C.differential_prem (poly, mode = 'partial')\n            >>> h, r\n                                /      2     2       2         2       >\n                             -4*\\- u[x] *u[y]  - u[x] *u + u[x]  + 4*u >\n            (16*u[x]*u[y]*u, ----------------------------------------- >\n                                                                       >\n            |  \n            >                       2           2            \\       \n            > [x]*u[y]*v[y] - 2*u[y] *u + 2*u[y]  - 56*u[y]*u/*u[x]  \n            > ------------------------------------------------------)\n            >       7                                                \n\n            >>> C.normal_form (h * poly - r)\n            0\n\n        The polynomial actually is algebraically reduced with respect\n        to the chain:\n\n            >>> h, r = C.differential_prem (poly, mode = 'algebraic')\n            >>> h, r\n            ""              v[x, y] \n            (1, u[x, x] + -------)\n                             7    \n\n            >>> C.normal_form (h * poly - r)\n            0\n        ");
static PyMethodDef __pyx_mdef_19DifferentialAlgebra_24RegularDifferentialChain_31differential_prem = {"differential_prem", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_19DifferentialAlgebra_24RegularDifferentialChain_31differential_prem, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_19DifferentialAlgebra_24RegularDifferentialChain_30differential_prem};
static PyObject *__pyx_pw_19DifferentialAlgebra_24RegularDifferentialChain_31differential_prem(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_polynomial = 0;
  PyObject *__pyx_v_mode = 0;
  PyObject *__pyx_v_notation = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[3] = {0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("differential_prem (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_polynomial,&__pyx_n_s_mode,&__pyx_n_s_notation,0};
    values[1] = __Pyx_Arg_NewRef_FASTCALL(__pyx_k__57);
    values[2] = __Pyx_Arg_NewRef_FASTCALL(__pyx_k__58);
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_polynomial)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 885, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_mode);
          if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 885, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_notation);
          if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 885, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "differential_prem") < 0)) __PYX_ERR(2, 885, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_polynomial = values[0];
    __pyx_v_mode = values[1];
    __pyx_v_notation = values[2];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("differential_prem", 0, 1, 3, __pyx_nargs); __PYX_ERR(2, 885, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("DifferentialAlgebra.RegularDifferentialChain.differential_prem", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_19DifferentialAlgebra_24RegularDifferentialChain_30differential_prem(((struct __pyx_obj_19DifferentialAlgebra_RegularDifferentialChain *)__pyx_v_self), __pyx_v_polynomial, __pyx_v_mode, __pyx_v_notation);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_19DifferentialAlgebra_24RegularDifferentialChain_30differential_prem(struct __pyx_obj_19DifferentialAlgebra_RegularDifferentialChain *__pyx_v_self, PyObject *__pyx_v_polynomial, PyObject *__pyx_v_mode, PyObject *__pyx_v_notation) {
  PyObject *__pyx_v_result = 0;
  PyObject *__pyx_v_streqns = 0;
  PyObject *__pyx_v_mesgerr = 0;
  PyObject *__pyx_v_strmode = 0;
  ALGEB_string __pyx_v_L;
  PyObject *__pyx_v_strnot = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  unsigned int __pyx_t_4;
  char *__pyx_t_5;
  char *__pyx_t_6;
  char *__pyx_t_7;
  char *__pyx_t_8;
  int __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("differential_prem", 1);

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":1008
 *         cdef bmi_c.ALGEB_string L
 *         cdef strnot
 *         strnot = self.__process_notation (notation)             # <<<<<<<<<<<<<<
 *         streqns = ascii (polynomial)
 *         strmode = ascii (mode)
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_RegularDifferentialChain__proce); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1008, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_notation};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1008, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_v_strnot = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":1009
 *         cdef strnot
 *         strnot = self.__process_notation (notation)
 *         streqns = ascii (polynomial)             # <<<<<<<<<<<<<<
 *         strmode = ascii (mode)
 *         L = bmi_c.bmi_dapyx_differential_prem (
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ascii); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1009, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_polynomial};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1009, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  if (!(likely(PyBytes_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_1))) __PYX_ERR(2, 1009, __pyx_L1_error)
  __pyx_v_streqns = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":1010
 *         strnot = self.__process_notation (notation)
 *         streqns = ascii (polynomial)
 *         strmode = ascii (mode)             # <<<<<<<<<<<<<<
 *         L = bmi_c.bmi_dapyx_differential_prem (
 *             streqns, strmode, self.regchain, self.notation, strnot, 0, 0)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ascii); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1010, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_mode};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1010, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  if (!(likely(PyBytes_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_1))) __PYX_ERR(2, 1010, __pyx_L1_error)
  __pyx_v_strmode = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":1012
 *         strmode = ascii (mode)
 *         L = bmi_c.bmi_dapyx_differential_prem (
 *             streqns, strmode, self.regchain, self.notation, strnot, 0, 0)             # <<<<<<<<<<<<<<
 *         if bmi_c.bmi_dapyx_is_error (L):
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (L)
 */
  if (unlikely(__pyx_v_streqns == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
    __PYX_ERR(2, 1012, __pyx_L1_error)
  }
  __pyx_t_5 = __Pyx_PyBytes_AsWritableString(__pyx_v_streqns); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) __PYX_ERR(2, 1012, __pyx_L1_error)
  if (unlikely(__pyx_v_strmode == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
    __PYX_ERR(2, 1012, __pyx_L1_error)
  }
  __pyx_t_6 = __Pyx_PyBytes_AsWritableString(__pyx_v_strmode); if (unlikely((!__pyx_t_6) && PyErr_Occurred())) __PYX_ERR(2, 1012, __pyx_L1_error)
  __pyx_t_7 = __Pyx_PyObject_AsWritableString(__pyx_v_self->notation); if (unlikely((!__pyx_t_7) && PyErr_Occurred())) __PYX_ERR(2, 1012, __pyx_L1_error)
  __pyx_t_8 = __Pyx_PyObject_AsWritableString(__pyx_v_strnot); if (unlikely((!__pyx_t_8) && PyErr_Occurred())) __PYX_ERR(2, 1012, __pyx_L1_error)

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":1011
 *         streqns = ascii (polynomial)
 *         strmode = ascii (mode)
 *         L = bmi_c.bmi_dapyx_differential_prem (             # <<<<<<<<<<<<<<
 *             streqns, strmode, self.regchain, self.notation, strnot, 0, 0)
 *         if bmi_c.bmi_dapyx_is_error (L):
 */
  __pyx_v_L = bmi_dapyx_differential_prem(__pyx_t_5, __pyx_t_6, __pyx_v_self->regchain, __pyx_t_7, __pyx_t_8, 0, 0);

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":1013
 *         L = bmi_c.bmi_dapyx_differential_prem (
 *             streqns, strmode, self.regchain, self.notation, strnot, 0, 0)
 *         if bmi_c.bmi_dapyx_is_error (L):             # <<<<<<<<<<<<<<
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (L)
 *             bmi_c.bmi_balsa_clear_ALGEB (L)
 */
  __pyx_t_9 = (bmi_dapyx_is_error(__pyx_v_L) != 0);
  if (unlikely(__pyx_t_9)) {

    /* "../../bmi/sympy/RegularDifferentialChain.pyx":1014
 *             streqns, strmode, self.regchain, self.notation, strnot, 0, 0)
 *         if bmi_c.bmi_dapyx_is_error (L):
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (L)             # <<<<<<<<<<<<<<
 *             bmi_c.bmi_balsa_clear_ALGEB (L)
 *             raise RuntimeError (str (mesgerr, 'utf-8'))
 */
    __pyx_t_1 = __Pyx_PyBytes_FromString(bmi_dapyx_mesgerr(__pyx_v_L)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1014, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_v_mesgerr = ((PyObject*)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "../../bmi/sympy/RegularDifferentialChain.pyx":1015
 *         if bmi_c.bmi_dapyx_is_error (L):
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (L)
 *             bmi_c.bmi_balsa_clear_ALGEB (L)             # <<<<<<<<<<<<<<
 *             raise RuntimeError (str (mesgerr, 'utf-8'))
 *         result = eval (L.value, globals (), self.evdict)
 */
    bmi_balsa_clear_ALGEB(__pyx_v_L);

    /* "../../bmi/sympy/RegularDifferentialChain.pyx":1016
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (L)
 *             bmi_c.bmi_balsa_clear_ALGEB (L)
 *             raise RuntimeError (str (mesgerr, 'utf-8'))             # <<<<<<<<<<<<<<
 *         result = eval (L.value, globals (), self.evdict)
 *         bmi_c.bmi_balsa_clear_ALGEB (L)
 */
    __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1016, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_v_mesgerr);
    __Pyx_GIVEREF(__pyx_v_mesgerr);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_mesgerr)) __PYX_ERR(2, 1016, __pyx_L1_error);
    __Pyx_INCREF(__pyx_kp_u_utf_8);
    __Pyx_GIVEREF(__pyx_kp_u_utf_8);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_kp_u_utf_8)) __PYX_ERR(2, 1016, __pyx_L1_error);
    __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)(&PyUnicode_Type)), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1016, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_RuntimeError, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1016, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(2, 1016, __pyx_L1_error)

    /* "../../bmi/sympy/RegularDifferentialChain.pyx":1013
 *         L = bmi_c.bmi_dapyx_differential_prem (
 *             streqns, strmode, self.regchain, self.notation, strnot, 0, 0)
 *         if bmi_c.bmi_dapyx_is_error (L):             # <<<<<<<<<<<<<<
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (L)
 *             bmi_c.bmi_balsa_clear_ALGEB (L)
 */
  }

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":1017
 *             bmi_c.bmi_balsa_clear_ALGEB (L)
 *             raise RuntimeError (str (mesgerr, 'utf-8'))
 *         result = eval (L.value, globals (), self.evdict)             # <<<<<<<<<<<<<<
 *         bmi_c.bmi_balsa_clear_ALGEB (L)
 *         return result
 */
  __pyx_t_1 = __Pyx_PyBytes_FromString(__pyx_v_L->value); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1017, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_Globals(); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1017, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1017, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_1);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1)) __PYX_ERR(2, 1017, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_2);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2)) __PYX_ERR(2, 1017, __pyx_L1_error);
  __Pyx_INCREF(__pyx_v_self->evdict);
  __Pyx_GIVEREF(__pyx_v_self->evdict);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_self->evdict)) __PYX_ERR(2, 1017, __pyx_L1_error);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_eval, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1017, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_result = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":1018
 *             raise RuntimeError (str (mesgerr, 'utf-8'))
 *         result = eval (L.value, globals (), self.evdict)
 *         bmi_c.bmi_balsa_clear_ALGEB (L)             # <<<<<<<<<<<<<<
 *         return result
 * 
 */
  bmi_balsa_clear_ALGEB(__pyx_v_L);

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":1019
 *         result = eval (L.value, globals (), self.evdict)
 *         bmi_c.bmi_balsa_clear_ALGEB (L)
 *         return result             # <<<<<<<<<<<<<<
 * 
 * # prem
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_result);
  __pyx_r = __pyx_v_result;
  goto __pyx_L0;

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":885
 * 
 * # differential_prem
 *     def differential_prem (             # <<<<<<<<<<<<<<
 *              self,
 *              polynomial,
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("DifferentialAlgebra.RegularDifferentialChain.differential_prem", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XDECREF(__pyx_v_streqns);
  __Pyx_XDECREF(__pyx_v_mesgerr);
  __Pyx_XDECREF(__pyx_v_strmode);
  __Pyx_XDECREF(__pyx_v_strnot);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "../../bmi/sympy/RegularDifferentialChain.pyx":1022
 * 
 * # prem
 *     def prem (             # <<<<<<<<<<<<<<
 *             self,
 *             ratfrac,
 */

/* Python wrapper */
static PyObject *__pyx_pw_19DifferentialAlgebra_24RegularDifferentialChain_33prem(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_19DifferentialAlgebra_24RegularDifferentialChain_32prem, "\n        The pseudo-remainder of a fraction by a regular chain\n\n        INPUT:\n\n            `ratfrac`  -- a fraction or a list of fractions\n            `notation` -- (default: 'undefined') a string\n\n        OUTPUT:\n\n            The pseudo-remainder of ratfrac modulo the regular\n            differential chain.\n\n            If ratfrac is a polynomial, the result is a polynomial If\n            it is a rational fraction, then the result is defined as\n            the ratio of the pseudo-remainder of the numerator over\n            the pseudo-remainder of the denominator of the fraction.\n\n            The pseudo-remainder of a polynomial is zero if and only\n            if the polynomial is zero modulo the ideal defined by the\n            regular differential chain.\n\n            See also differential_prem.\n\n        EXAMPLES:\n\n            >>> from sympy import *\n            >>> from DifferentialAlgebra import *\n            >>> init_printing (use_unicode = False, num_columns = 60)\n\n            >>> x = var ('x')\n            >>> u,a = indexedbase ('u,a')\n            >>> R = DifferentialRing (derivations = [x], \n            ...             blocks = [u,a], \n            ...             parameters = [a], notation = 'jet')\n            >>> C = RegularDifferentialChain(\n            ...             [u[x]**2-4*u], R, ['differential'])\n\n        u[x,x] - 2 is a zero modulo the differential ideal defined by C:\n\n            >>> C.prem (u[x,x]-2)\n            0\n\n        u[x,x] is not:\n\n            >>> C.prem (u[x,x])\n            4*u[x]\n\n        A few variants:\n\n            >>> C.prem (1/u[x,x])\n              1   \n            ------\n            4*u[x]\n\n            >>> C.prem ([u[x,x]-2, 1/u[x,x]])\n                  1    \n            [0, ------]\n                4*u[x] \n        ");
static PyMethodDef __pyx_mdef_19DifferentialAlgebra_24RegularDifferentialChain_33prem = {"prem", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_19DifferentialAlgebra_24RegularDifferentialChain_33prem, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_19DifferentialAlgebra_24RegularDifferentialChain_32prem};
static PyObject *__pyx_pw_19DifferentialAlgebra_24RegularDifferentialChain_33prem(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_ratfrac = 0;
  PyObject *__pyx_v_notation = 0;
  CYTHON_UNUSED int __pyx_v_timeout;
  CYTHON_UNUSED int __pyx_v_memout;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[4] = {0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("prem (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ratfrac,&__pyx_n_s_notation,&__pyx_n_s_timeout,&__pyx_n_s_memout,0};
    values[1] = __Pyx_Arg_NewRef_FASTCALL(__pyx_k__59);
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_ratfrac)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 1022, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_notation);
          if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 1022, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_timeout);
          if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 1022, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_memout);
          if (value) { values[3] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 1022, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "prem") < 0)) __PYX_ERR(2, 1022, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_ratfrac = values[0];
    __pyx_v_notation = values[1];
    if (values[2]) {
      __pyx_v_timeout = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_timeout == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 1026, __pyx_L3_error)
    } else {
      __pyx_v_timeout = ((int)0);
    }
    if (values[3]) {
      __pyx_v_memout = __Pyx_PyInt_As_int(values[3]); if (unlikely((__pyx_v_memout == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 1027, __pyx_L3_error)
    } else {
      __pyx_v_memout = ((int)0);
    }
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("prem", 0, 1, 4, __pyx_nargs); __PYX_ERR(2, 1022, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("DifferentialAlgebra.RegularDifferentialChain.prem", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_19DifferentialAlgebra_24RegularDifferentialChain_32prem(((struct __pyx_obj_19DifferentialAlgebra_RegularDifferentialChain *)__pyx_v_self), __pyx_v_ratfrac, __pyx_v_notation, __pyx_v_timeout, __pyx_v_memout);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_19DifferentialAlgebra_24RegularDifferentialChain_32prem(struct __pyx_obj_19DifferentialAlgebra_RegularDifferentialChain *__pyx_v_self, PyObject *__pyx_v_ratfrac, PyObject *__pyx_v_notation, CYTHON_UNUSED int __pyx_v_timeout, CYTHON_UNUSED int __pyx_v_memout) {
  PyObject *__pyx_v_result = 0;
  PyObject *__pyx_v_streqns = 0;
  PyObject *__pyx_v_mesgerr = 0;
  ALGEB_string __pyx_v_L;
  PyObject *__pyx_v_strnot = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  unsigned int __pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  char *__pyx_t_7;
  char *__pyx_t_8;
  char *__pyx_t_9;
  int __pyx_t_10;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("prem", 1);

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":1093
 *         cdef bmi_c.ALGEB_string L
 *         cdef strnot
 *         strnot = self.__process_notation (notation)             # <<<<<<<<<<<<<<
 *         if isinstance (ratfrac, list) :
 *             streqns = ascii (ratfrac)
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_RegularDifferentialChain__proce); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1093, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_notation};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1093, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_v_strnot = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":1094
 *         cdef strnot
 *         strnot = self.__process_notation (notation)
 *         if isinstance (ratfrac, list) :             # <<<<<<<<<<<<<<
 *             streqns = ascii (ratfrac)
 *         else :
 */
  __pyx_t_5 = PyList_Check(__pyx_v_ratfrac); 
  if (__pyx_t_5) {

    /* "../../bmi/sympy/RegularDifferentialChain.pyx":1095
 *         strnot = self.__process_notation (notation)
 *         if isinstance (ratfrac, list) :
 *             streqns = ascii (ratfrac)             # <<<<<<<<<<<<<<
 *         else :
 *             streqns = ascii ([ratfrac])
 */
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ascii); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1095, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = NULL;
    __pyx_t_4 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
        __pyx_t_4 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_ratfrac};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1095, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    if (!(likely(PyBytes_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_1))) __PYX_ERR(2, 1095, __pyx_L1_error)
    __pyx_v_streqns = ((PyObject*)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "../../bmi/sympy/RegularDifferentialChain.pyx":1094
 *         cdef strnot
 *         strnot = self.__process_notation (notation)
 *         if isinstance (ratfrac, list) :             # <<<<<<<<<<<<<<
 *             streqns = ascii (ratfrac)
 *         else :
 */
    goto __pyx_L3;
  }

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":1097
 *             streqns = ascii (ratfrac)
 *         else :
 *             streqns = ascii ([ratfrac])             # <<<<<<<<<<<<<<
 *         L = bmi_c.bmi_dapyx_prem (
 *             streqns, self.regchain, self.notation, strnot, 0, 0)
 */
  /*else*/ {
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ascii); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1097, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1097, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_v_ratfrac);
    __Pyx_GIVEREF(__pyx_v_ratfrac);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 0, __pyx_v_ratfrac)) __PYX_ERR(2, 1097, __pyx_L1_error);
    __pyx_t_6 = NULL;
    __pyx_t_4 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
        __pyx_t_4 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_3};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1097, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    if (!(likely(PyBytes_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_1))) __PYX_ERR(2, 1097, __pyx_L1_error)
    __pyx_v_streqns = ((PyObject*)__pyx_t_1);
    __pyx_t_1 = 0;
  }
  __pyx_L3:;

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":1099
 *             streqns = ascii ([ratfrac])
 *         L = bmi_c.bmi_dapyx_prem (
 *             streqns, self.regchain, self.notation, strnot, 0, 0)             # <<<<<<<<<<<<<<
 *         if bmi_c.bmi_dapyx_is_error (L):
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (L)
 */
  if (unlikely(__pyx_v_streqns == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
    __PYX_ERR(2, 1099, __pyx_L1_error)
  }
  __pyx_t_7 = __Pyx_PyBytes_AsWritableString(__pyx_v_streqns); if (unlikely((!__pyx_t_7) && PyErr_Occurred())) __PYX_ERR(2, 1099, __pyx_L1_error)
  __pyx_t_8 = __Pyx_PyObject_AsWritableString(__pyx_v_self->notation); if (unlikely((!__pyx_t_8) && PyErr_Occurred())) __PYX_ERR(2, 1099, __pyx_L1_error)
  __pyx_t_9 = __Pyx_PyObject_AsWritableString(__pyx_v_strnot); if (unlikely((!__pyx_t_9) && PyErr_Occurred())) __PYX_ERR(2, 1099, __pyx_L1_error)

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":1098
 *         else :
 *             streqns = ascii ([ratfrac])
 *         L = bmi_c.bmi_dapyx_prem (             # <<<<<<<<<<<<<<
 *             streqns, self.regchain, self.notation, strnot, 0, 0)
 *         if bmi_c.bmi_dapyx_is_error (L):
 */
  __pyx_v_L = bmi_dapyx_prem(__pyx_t_7, __pyx_v_self->regchain, __pyx_t_8, __pyx_t_9, 0, 0);

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":1100
 *         L = bmi_c.bmi_dapyx_prem (
 *             streqns, self.regchain, self.notation, strnot, 0, 0)
 *         if bmi_c.bmi_dapyx_is_error (L):             # <<<<<<<<<<<<<<
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (L)
 *             bmi_c.bmi_balsa_clear_ALGEB (L)
 */
  __pyx_t_5 = (bmi_dapyx_is_error(__pyx_v_L) != 0);
  if (unlikely(__pyx_t_5)) {

    /* "../../bmi/sympy/RegularDifferentialChain.pyx":1101
 *             streqns, self.regchain, self.notation, strnot, 0, 0)
 *         if bmi_c.bmi_dapyx_is_error (L):
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (L)             # <<<<<<<<<<<<<<
 *             bmi_c.bmi_balsa_clear_ALGEB (L)
 *             raise RuntimeError (str (mesgerr, 'utf-8'))
 */
    __pyx_t_1 = __Pyx_PyBytes_FromString(bmi_dapyx_mesgerr(__pyx_v_L)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1101, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_v_mesgerr = ((PyObject*)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "../../bmi/sympy/RegularDifferentialChain.pyx":1102
 *         if bmi_c.bmi_dapyx_is_error (L):
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (L)
 *             bmi_c.bmi_balsa_clear_ALGEB (L)             # <<<<<<<<<<<<<<
 *             raise RuntimeError (str (mesgerr, 'utf-8'))
 *         result = eval (L.value, globals (), self.evdict)
 */
    bmi_balsa_clear_ALGEB(__pyx_v_L);

    /* "../../bmi/sympy/RegularDifferentialChain.pyx":1103
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (L)
 *             bmi_c.bmi_balsa_clear_ALGEB (L)
 *             raise RuntimeError (str (mesgerr, 'utf-8'))             # <<<<<<<<<<<<<<
 *         result = eval (L.value, globals (), self.evdict)
 *         if not isinstance (ratfrac, list) :
 */
    __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1103, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_v_mesgerr);
    __Pyx_GIVEREF(__pyx_v_mesgerr);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_mesgerr)) __PYX_ERR(2, 1103, __pyx_L1_error);
    __Pyx_INCREF(__pyx_kp_u_utf_8);
    __Pyx_GIVEREF(__pyx_kp_u_utf_8);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_kp_u_utf_8)) __PYX_ERR(2, 1103, __pyx_L1_error);
    __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)(&PyUnicode_Type)), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1103, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_RuntimeError, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1103, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(2, 1103, __pyx_L1_error)

    /* "../../bmi/sympy/RegularDifferentialChain.pyx":1100
 *         L = bmi_c.bmi_dapyx_prem (
 *             streqns, self.regchain, self.notation, strnot, 0, 0)
 *         if bmi_c.bmi_dapyx_is_error (L):             # <<<<<<<<<<<<<<
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (L)
 *             bmi_c.bmi_balsa_clear_ALGEB (L)
 */
  }

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":1104
 *             bmi_c.bmi_balsa_clear_ALGEB (L)
 *             raise RuntimeError (str (mesgerr, 'utf-8'))
 *         result = eval (L.value, globals (), self.evdict)             # <<<<<<<<<<<<<<
 *         if not isinstance (ratfrac, list) :
 *             result = result[0]
 */
  __pyx_t_1 = __Pyx_PyBytes_FromString(__pyx_v_L->value); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1104, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_Globals(); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1104, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1104, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_1);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1)) __PYX_ERR(2, 1104, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_2);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2)) __PYX_ERR(2, 1104, __pyx_L1_error);
  __Pyx_INCREF(__pyx_v_self->evdict);
  __Pyx_GIVEREF(__pyx_v_self->evdict);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_self->evdict)) __PYX_ERR(2, 1104, __pyx_L1_error);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_eval, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1104, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_result = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":1105
 *             raise RuntimeError (str (mesgerr, 'utf-8'))
 *         result = eval (L.value, globals (), self.evdict)
 *         if not isinstance (ratfrac, list) :             # <<<<<<<<<<<<<<
 *             result = result[0]
 *         bmi_c.bmi_balsa_clear_ALGEB (L)
 */
  __pyx_t_5 = PyList_Check(__pyx_v_ratfrac); 
  __pyx_t_10 = (!__pyx_t_5);
  if (__pyx_t_10) {

    /* "../../bmi/sympy/RegularDifferentialChain.pyx":1106
 *         result = eval (L.value, globals (), self.evdict)
 *         if not isinstance (ratfrac, list) :
 *             result = result[0]             # <<<<<<<<<<<<<<
 *         bmi_c.bmi_balsa_clear_ALGEB (L)
 *         return result
 */
    __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_result, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1106, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF_SET(__pyx_v_result, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "../../bmi/sympy/RegularDifferentialChain.pyx":1105
 *             raise RuntimeError (str (mesgerr, 'utf-8'))
 *         result = eval (L.value, globals (), self.evdict)
 *         if not isinstance (ratfrac, list) :             # <<<<<<<<<<<<<<
 *             result = result[0]
 *         bmi_c.bmi_balsa_clear_ALGEB (L)
 */
  }

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":1107
 *         if not isinstance (ratfrac, list) :
 *             result = result[0]
 *         bmi_c.bmi_balsa_clear_ALGEB (L)             # <<<<<<<<<<<<<<
 *         return result
 * 
 */
  bmi_balsa_clear_ALGEB(__pyx_v_L);

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":1108
 *             result = result[0]
 *         bmi_c.bmi_balsa_clear_ALGEB (L)
 *         return result             # <<<<<<<<<<<<<<
 * 
 * # resultant
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_result);
  __pyx_r = __pyx_v_result;
  goto __pyx_L0;

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":1022
 * 
 * # prem
 *     def prem (             # <<<<<<<<<<<<<<
 *             self,
 *             ratfrac,
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("DifferentialAlgebra.RegularDifferentialChain.prem", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XDECREF(__pyx_v_streqns);
  __Pyx_XDECREF(__pyx_v_mesgerr);
  __Pyx_XDECREF(__pyx_v_strnot);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "../../bmi/sympy/RegularDifferentialChain.pyx":1111
 * 
 * # resultant
 *     def resultant (             # <<<<<<<<<<<<<<
 *             self,
 *             ratfrac,
 */

/* Python wrapper */
static PyObject *__pyx_pw_19DifferentialAlgebra_24RegularDifferentialChain_35resultant(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_19DifferentialAlgebra_24RegularDifferentialChain_34resultant, "\n        The resultant of a differential fraction modulo a regular chain\n\n        INPUT:\n\n            `ratfrac`  -- a fraction or a list of fractions\n            `notation` -- (default: 'undefined') a string\n\n        OUTPUT:\n\n            The resultant of ratfrac modulo the regular differential\n            chain.\n\n            If ratfrac is a polynomial, the result is a polynomial\n            If it is a rational fraction, then the result is defined\n            as the ratio of the resultant of the numerator over the\n            resultant of the denominator of the fraction.\n\n            The resultant of a polynomial is zero if and only if the\n            polynomial is a zerodivisor modulo the ideal defined by\n            the regular differential chain. See [BLPM19].\n\n        REFERENCES:\n\n            [BLPM19] Fran\303\247ois Boulier and Fran\303\247ois Lemaire and\n            Adrien Poteaux and Marc Moreno Maza. An Equivalence\n            Theorem for Regular Differential Chains. Journal\n            of Symbolic Computation vol 93, pp. 34-5. 2019\n            https://doi.org/10.1016/j.jsc.2018.04.011\n            hal.archives-ouvertes.fr/hal-01391768\n\n        EXAMPLES:\n\n            >>> from sympy import *\n            >>> from DifferentialAlgebra import *\n            >>> init_printing (use_unicode = False, num_columns = 60)\n\n            >>> x = var ('x')\n            >>> u,a = indexedbase ('u,a')\n            >>> R = DifferentialRing (derivations = [x], \n            ...             blocks = [u,a], \n            ...             parameters = [a], notation = 'jet')\n            >>> C = RegularDifferentialChain(\n            ...             [(u[x]**2-4*u)*(u[x]**2-4*u**3)], \n            ...             R, ['differential'])\n\n        u[x,x] - 2 is a zerodivisor modulo the differential ideal\n        defined by C:\n\n            >>> C.resultant(u[x,x]-2)\n            0\n\n        u[x] is not:\n\n            >>> C.resultant(u[x])\n            ""     4\n            -16*u \n\n        A few other examples:\n\n            >>> C.resultant(1/u[x])\n             -1  \n            -----\n                4\n            16*u \n\n            >>> C.resultant([u[x,x] - 2, u[x]])\n                     4 \n            [0, -16*u ]\n        ");
static PyMethodDef __pyx_mdef_19DifferentialAlgebra_24RegularDifferentialChain_35resultant = {"resultant", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_19DifferentialAlgebra_24RegularDifferentialChain_35resultant, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_19DifferentialAlgebra_24RegularDifferentialChain_34resultant};
static PyObject *__pyx_pw_19DifferentialAlgebra_24RegularDifferentialChain_35resultant(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_ratfrac = 0;
  PyObject *__pyx_v_notation = 0;
  CYTHON_UNUSED int __pyx_v_timeout;
  CYTHON_UNUSED int __pyx_v_memout;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[4] = {0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("resultant (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ratfrac,&__pyx_n_s_notation,&__pyx_n_s_timeout,&__pyx_n_s_memout,0};
    values[1] = __Pyx_Arg_NewRef_FASTCALL(__pyx_k__60);
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_ratfrac)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 1111, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_notation);
          if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 1111, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_timeout);
          if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 1111, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_memout);
          if (value) { values[3] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 1111, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "resultant") < 0)) __PYX_ERR(2, 1111, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_ratfrac = values[0];
    __pyx_v_notation = values[1];
    if (values[2]) {
      __pyx_v_timeout = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_timeout == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 1115, __pyx_L3_error)
    } else {
      __pyx_v_timeout = ((int)0);
    }
    if (values[3]) {
      __pyx_v_memout = __Pyx_PyInt_As_int(values[3]); if (unlikely((__pyx_v_memout == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 1116, __pyx_L3_error)
    } else {
      __pyx_v_memout = ((int)0);
    }
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("resultant", 0, 1, 4, __pyx_nargs); __PYX_ERR(2, 1111, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("DifferentialAlgebra.RegularDifferentialChain.resultant", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_19DifferentialAlgebra_24RegularDifferentialChain_34resultant(((struct __pyx_obj_19DifferentialAlgebra_RegularDifferentialChain *)__pyx_v_self), __pyx_v_ratfrac, __pyx_v_notation, __pyx_v_timeout, __pyx_v_memout);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_19DifferentialAlgebra_24RegularDifferentialChain_34resultant(struct __pyx_obj_19DifferentialAlgebra_RegularDifferentialChain *__pyx_v_self, PyObject *__pyx_v_ratfrac, PyObject *__pyx_v_notation, CYTHON_UNUSED int __pyx_v_timeout, CYTHON_UNUSED int __pyx_v_memout) {
  PyObject *__pyx_v_result = 0;
  PyObject *__pyx_v_streqns = 0;
  PyObject *__pyx_v_mesgerr = 0;
  ALGEB_string __pyx_v_L;
  PyObject *__pyx_v_strnot = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  unsigned int __pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  char *__pyx_t_7;
  char *__pyx_t_8;
  char *__pyx_t_9;
  int __pyx_t_10;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("resultant", 1);

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":1192
 *         cdef bmi_c.ALGEB_string L
 *         cdef strnot
 *         strnot = self.__process_notation (notation)             # <<<<<<<<<<<<<<
 *         if isinstance (ratfrac, list) :
 *             streqns = ascii (ratfrac)
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_RegularDifferentialChain__proce); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1192, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_notation};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1192, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_v_strnot = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":1193
 *         cdef strnot
 *         strnot = self.__process_notation (notation)
 *         if isinstance (ratfrac, list) :             # <<<<<<<<<<<<<<
 *             streqns = ascii (ratfrac)
 *         else :
 */
  __pyx_t_5 = PyList_Check(__pyx_v_ratfrac); 
  if (__pyx_t_5) {

    /* "../../bmi/sympy/RegularDifferentialChain.pyx":1194
 *         strnot = self.__process_notation (notation)
 *         if isinstance (ratfrac, list) :
 *             streqns = ascii (ratfrac)             # <<<<<<<<<<<<<<
 *         else :
 *             streqns = ascii ([ratfrac])
 */
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ascii); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1194, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = NULL;
    __pyx_t_4 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
        __pyx_t_4 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_ratfrac};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1194, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    if (!(likely(PyBytes_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_1))) __PYX_ERR(2, 1194, __pyx_L1_error)
    __pyx_v_streqns = ((PyObject*)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "../../bmi/sympy/RegularDifferentialChain.pyx":1193
 *         cdef strnot
 *         strnot = self.__process_notation (notation)
 *         if isinstance (ratfrac, list) :             # <<<<<<<<<<<<<<
 *             streqns = ascii (ratfrac)
 *         else :
 */
    goto __pyx_L3;
  }

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":1196
 *             streqns = ascii (ratfrac)
 *         else :
 *             streqns = ascii ([ratfrac])             # <<<<<<<<<<<<<<
 *         L = bmi_c.bmi_dapyx_resultant (
 *             streqns, self.regchain, self.notation, strnot, 0, 0)
 */
  /*else*/ {
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ascii); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1196, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1196, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_v_ratfrac);
    __Pyx_GIVEREF(__pyx_v_ratfrac);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 0, __pyx_v_ratfrac)) __PYX_ERR(2, 1196, __pyx_L1_error);
    __pyx_t_6 = NULL;
    __pyx_t_4 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
        __pyx_t_4 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_3};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1196, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    if (!(likely(PyBytes_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_1))) __PYX_ERR(2, 1196, __pyx_L1_error)
    __pyx_v_streqns = ((PyObject*)__pyx_t_1);
    __pyx_t_1 = 0;
  }
  __pyx_L3:;

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":1198
 *             streqns = ascii ([ratfrac])
 *         L = bmi_c.bmi_dapyx_resultant (
 *             streqns, self.regchain, self.notation, strnot, 0, 0)             # <<<<<<<<<<<<<<
 *         if bmi_c.bmi_dapyx_is_error (L):
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (L)
 */
  if (unlikely(__pyx_v_streqns == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
    __PYX_ERR(2, 1198, __pyx_L1_error)
  }
  __pyx_t_7 = __Pyx_PyBytes_AsWritableString(__pyx_v_streqns); if (unlikely((!__pyx_t_7) && PyErr_Occurred())) __PYX_ERR(2, 1198, __pyx_L1_error)
  __pyx_t_8 = __Pyx_PyObject_AsWritableString(__pyx_v_self->notation); if (unlikely((!__pyx_t_8) && PyErr_Occurred())) __PYX_ERR(2, 1198, __pyx_L1_error)
  __pyx_t_9 = __Pyx_PyObject_AsWritableString(__pyx_v_strnot); if (unlikely((!__pyx_t_9) && PyErr_Occurred())) __PYX_ERR(2, 1198, __pyx_L1_error)

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":1197
 *         else :
 *             streqns = ascii ([ratfrac])
 *         L = bmi_c.bmi_dapyx_resultant (             # <<<<<<<<<<<<<<
 *             streqns, self.regchain, self.notation, strnot, 0, 0)
 *         if bmi_c.bmi_dapyx_is_error (L):
 */
  __pyx_v_L = bmi_dapyx_resultant(__pyx_t_7, __pyx_v_self->regchain, __pyx_t_8, __pyx_t_9, 0, 0);

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":1199
 *         L = bmi_c.bmi_dapyx_resultant (
 *             streqns, self.regchain, self.notation, strnot, 0, 0)
 *         if bmi_c.bmi_dapyx_is_error (L):             # <<<<<<<<<<<<<<
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (L)
 *             bmi_c.bmi_balsa_clear_ALGEB (L)
 */
  __pyx_t_5 = (bmi_dapyx_is_error(__pyx_v_L) != 0);
  if (unlikely(__pyx_t_5)) {

    /* "../../bmi/sympy/RegularDifferentialChain.pyx":1200
 *             streqns, self.regchain, self.notation, strnot, 0, 0)
 *         if bmi_c.bmi_dapyx_is_error (L):
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (L)             # <<<<<<<<<<<<<<
 *             bmi_c.bmi_balsa_clear_ALGEB (L)
 *             raise RuntimeError (str (mesgerr, 'utf-8'))
 */
    __pyx_t_1 = __Pyx_PyBytes_FromString(bmi_dapyx_mesgerr(__pyx_v_L)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1200, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_v_mesgerr = ((PyObject*)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "../../bmi/sympy/RegularDifferentialChain.pyx":1201
 *         if bmi_c.bmi_dapyx_is_error (L):
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (L)
 *             bmi_c.bmi_balsa_clear_ALGEB (L)             # <<<<<<<<<<<<<<
 *             raise RuntimeError (str (mesgerr, 'utf-8'))
 *         result = eval (L.value, globals (), self.evdict)
 */
    bmi_balsa_clear_ALGEB(__pyx_v_L);

    /* "../../bmi/sympy/RegularDifferentialChain.pyx":1202
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (L)
 *             bmi_c.bmi_balsa_clear_ALGEB (L)
 *             raise RuntimeError (str (mesgerr, 'utf-8'))             # <<<<<<<<<<<<<<
 *         result = eval (L.value, globals (), self.evdict)
 *         if not isinstance (ratfrac, list) :
 */
    __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1202, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_v_mesgerr);
    __Pyx_GIVEREF(__pyx_v_mesgerr);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_mesgerr)) __PYX_ERR(2, 1202, __pyx_L1_error);
    __Pyx_INCREF(__pyx_kp_u_utf_8);
    __Pyx_GIVEREF(__pyx_kp_u_utf_8);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_kp_u_utf_8)) __PYX_ERR(2, 1202, __pyx_L1_error);
    __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)(&PyUnicode_Type)), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1202, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_RuntimeError, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1202, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(2, 1202, __pyx_L1_error)

    /* "../../bmi/sympy/RegularDifferentialChain.pyx":1199
 *         L = bmi_c.bmi_dapyx_resultant (
 *             streqns, self.regchain, self.notation, strnot, 0, 0)
 *         if bmi_c.bmi_dapyx_is_error (L):             # <<<<<<<<<<<<<<
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (L)
 *             bmi_c.bmi_balsa_clear_ALGEB (L)
 */
  }

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":1203
 *             bmi_c.bmi_balsa_clear_ALGEB (L)
 *             raise RuntimeError (str (mesgerr, 'utf-8'))
 *         result = eval (L.value, globals (), self.evdict)             # <<<<<<<<<<<<<<
 *         if not isinstance (ratfrac, list) :
 *             result = result[0]
 */
  __pyx_t_1 = __Pyx_PyBytes_FromString(__pyx_v_L->value); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1203, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_Globals(); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1203, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1203, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_1);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1)) __PYX_ERR(2, 1203, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_2);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2)) __PYX_ERR(2, 1203, __pyx_L1_error);
  __Pyx_INCREF(__pyx_v_self->evdict);
  __Pyx_GIVEREF(__pyx_v_self->evdict);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_self->evdict)) __PYX_ERR(2, 1203, __pyx_L1_error);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_eval, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1203, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_result = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":1204
 *             raise RuntimeError (str (mesgerr, 'utf-8'))
 *         result = eval (L.value, globals (), self.evdict)
 *         if not isinstance (ratfrac, list) :             # <<<<<<<<<<<<<<
 *             result = result[0]
 *         bmi_c.bmi_balsa_clear_ALGEB (L)
 */
  __pyx_t_5 = PyList_Check(__pyx_v_ratfrac); 
  __pyx_t_10 = (!__pyx_t_5);
  if (__pyx_t_10) {

    /* "../../bmi/sympy/RegularDifferentialChain.pyx":1205
 *         result = eval (L.value, globals (), self.evdict)
 *         if not isinstance (ratfrac, list) :
 *             result = result[0]             # <<<<<<<<<<<<<<
 *         bmi_c.bmi_balsa_clear_ALGEB (L)
 *         return result
 */
    __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_result, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1205, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF_SET(__pyx_v_result, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "../../bmi/sympy/RegularDifferentialChain.pyx":1204
 *             raise RuntimeError (str (mesgerr, 'utf-8'))
 *         result = eval (L.value, globals (), self.evdict)
 *         if not isinstance (ratfrac, list) :             # <<<<<<<<<<<<<<
 *             result = result[0]
 *         bmi_c.bmi_balsa_clear_ALGEB (L)
 */
  }

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":1206
 *         if not isinstance (ratfrac, list) :
 *             result = result[0]
 *         bmi_c.bmi_balsa_clear_ALGEB (L)             # <<<<<<<<<<<<<<
 *         return result
 * 
 */
  bmi_balsa_clear_ALGEB(__pyx_v_L);

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":1207
 *             result = result[0]
 *         bmi_c.bmi_balsa_clear_ALGEB (L)
 *         return result             # <<<<<<<<<<<<<<
 * 
 * # change_ranking
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_result);
  __pyx_r = __pyx_v_result;
  goto __pyx_L0;

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":1111
 * 
 * # resultant
 *     def resultant (             # <<<<<<<<<<<<<<
 *             self,
 *             ratfrac,
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("DifferentialAlgebra.RegularDifferentialChain.resultant", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XDECREF(__pyx_v_streqns);
  __Pyx_XDECREF(__pyx_v_mesgerr);
  __Pyx_XDECREF(__pyx_v_strnot);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "../../bmi/sympy/RegularDifferentialChain.pyx":1211
 * # change_ranking
 * # pardi
 *     def change_ranking (             # <<<<<<<<<<<<<<
 *             self,
 *             DifferentialRing R = None,
 */

/* Python wrapper */
static PyObject *__pyx_pw_19DifferentialAlgebra_24RegularDifferentialChain_37change_ranking(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_19DifferentialAlgebra_24RegularDifferentialChain_36change_ranking, "\n        Change of ranking for regular chains defining prime ideals\n\n        INPUT:\n\n            `R`          -- (default: None) a differential ring\n            `prime`      -- (default: False) a bool\n            `notation`   -- (default: 'undefined') a string\n            `timeout`    -- (default: 0) a nonnegative integer\n            `memout`     -- (default: 0) a nonnegative integer\n\n        OUTPUT:\n\n            A regular differential chain defining the same ideal as\n            `self`, with respect to the ranking of `R`.\n\n            The differential ring `R` must define the same mathematical\n            differential ring as the underlying ring of `self` (only\n            the ranking should be different).\n\n            The optional parameter `prime` permit to force the\n            application of the algorithm over `self`, even if `self`\n            does not define a prime ideal.\n\n            `timeout` and `memout` permit to limit in seconds and\n            megabytes, the resources allowed for the computation.\n\n        NOTES:\n\n            The implemented algorithm is the PARDI algorithm. See\n            references below.\n\n        REFERENCES:\n\n            [BLM10] Fran\303\247ois Boulier, Fran\303\247ois Lemaire and Marc\n            Moreno Maza.  Computing differential characteristic sets\n            by change of ordering.  Journal of Symbolic Comp. 45(1),\n            pp. 124-149. 2010\n\n        EXAMPLES:\n\n            >>> from sympy import *\n            >>> from DifferentialAlgebra import *\n            >>> init_printing (use_unicode = False, num_columns = 60)\n\n            >>> x,y = var ('x,y')\n            >>> u,v = indexedbase ('u,v')\n            >>> R = DifferentialRing (derivations = [x,y], \n            ...             blocks = [[v,u]], notation = 'jet')\n            >>> eq1 = u[x]**2 - 4*u\n            >>> eq2 = u[x,y]*v[y] - u + 1\n            >>> eq3 = v[x,x] - u[x]\n            >>> ideal = R.RosenfeldGroebner ([eq1,""eq2,eq3])\n            >>> ideal\n            [regular_differential_chain]\n\n        The regular differential chain C defines a prime ideal.\n        Its ranking is orderly:\n\n            >>> C = ideal [0]  \n            >>> C.equations (solved = True)\n                 2            2               u[x]*u[y]*u - u[x]*u[y]  >\n            [u[y]  = 2*u, u[x]  = 4*u, v[y] = -----------------------, >\n                                                        4*u            >\n            |  \n            >                 \n            >  v[x, x] = u[x]]\n            >                 \n\n        The ring Rbar is mathematically equivalent to R, but with\n        respect to an elimination ranking:\n\n            >>> Rbar = DifferentialRing (derivations = [x,y], \n            ...                 blocks = [u,v], notation = 'jet')\n\n        Perform the change of ranking, claiming that the ideal is prime:\n\n            >>> Cbar = C.change_ranking (Rbar, prime=True)\n            >>> Cbar.equations (solved = True)\n                                                                   3   >\n                    4            2         2                v[y, y]  - >\n            [v[y, y]  = 2*v[y, y]  + 2*v[y]  - 1, v[x, y] = ---------- >\n                                                                   v[y >\n            |  \n            >                                             \n            >  v[y, y]                                  2 \n            > --------, v[x, x] = 2*v[y, y], u = v[y, y] ]\n            > ]                                           \n        ");
static PyMethodDef __pyx_mdef_19DifferentialAlgebra_24RegularDifferentialChain_37change_ranking = {"change_ranking", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_19DifferentialAlgebra_24RegularDifferentialChain_37change_ranking, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_19DifferentialAlgebra_24RegularDifferentialChain_36change_ranking};
static PyObject *__pyx_pw_19DifferentialAlgebra_24RegularDifferentialChain_37change_ranking(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_19DifferentialAlgebra_DifferentialRing *__pyx_v_R = 0;
  PyBoolObject *__pyx_v_prime = 0;
  PyObject *__pyx_v_notation = 0;
  int __pyx_v_timeout;
  int __pyx_v_memout;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[5] = {0,0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("change_ranking (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_R,&__pyx_n_s_prime,&__pyx_n_s_notation,&__pyx_n_s_timeout,&__pyx_n_s_memout,0};

    /* "../../bmi/sympy/RegularDifferentialChain.pyx":1213
 *     def change_ranking (
 *             self,
 *             DifferentialRing R = None,             # <<<<<<<<<<<<<<
 *             bool prime = False,
 *             notation = BMI_IX_undefined,
 */
    values[0] = __Pyx_Arg_NewRef_FASTCALL((PyObject *)((struct __pyx_obj_19DifferentialAlgebra_DifferentialRing *)Py_None));

    /* "../../bmi/sympy/RegularDifferentialChain.pyx":1214
 *             self,
 *             DifferentialRing R = None,
 *             bool prime = False,             # <<<<<<<<<<<<<<
 *             notation = BMI_IX_undefined,
 *             int timeout = 0,
 */
    values[1] = __Pyx_Arg_NewRef_FASTCALL((PyObject *)((PyBoolObject *)Py_False));
    values[2] = __Pyx_Arg_NewRef_FASTCALL(__pyx_k__61);
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  5: values[4] = __Pyx_Arg_FASTCALL(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_R);
          if (value) { values[0] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 1211, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_prime);
          if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 1211, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_notation);
          if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 1211, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_timeout);
          if (value) { values[3] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 1211, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_memout);
          if (value) { values[4] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 1211, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "change_ranking") < 0)) __PYX_ERR(2, 1211, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  5: values[4] = __Pyx_Arg_FASTCALL(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_R = ((struct __pyx_obj_19DifferentialAlgebra_DifferentialRing *)values[0]);
    __pyx_v_prime = ((PyBoolObject *)values[1]);
    __pyx_v_notation = values[2];
    if (values[3]) {
      __pyx_v_timeout = __Pyx_PyInt_As_int(values[3]); if (unlikely((__pyx_v_timeout == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 1216, __pyx_L3_error)
    } else {
      __pyx_v_timeout = ((int)0);
    }
    if (values[4]) {
      __pyx_v_memout = __Pyx_PyInt_As_int(values[4]); if (unlikely((__pyx_v_memout == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 1217, __pyx_L3_error)
    } else {
      __pyx_v_memout = ((int)0);
    }
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("change_ranking", 0, 0, 5, __pyx_nargs); __PYX_ERR(2, 1211, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("DifferentialAlgebra.RegularDifferentialChain.change_ranking", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_R), __pyx_ptype_19DifferentialAlgebra_DifferentialRing, 1, "R", 0))) __PYX_ERR(2, 1213, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_prime), __pyx_ptype_7cpython_4bool_bool, 1, "prime", 0))) __PYX_ERR(2, 1214, __pyx_L1_error)
  __pyx_r = __pyx_pf_19DifferentialAlgebra_24RegularDifferentialChain_36change_ranking(((struct __pyx_obj_19DifferentialAlgebra_RegularDifferentialChain *)__pyx_v_self), __pyx_v_R, __pyx_v_prime, __pyx_v_notation, __pyx_v_timeout, __pyx_v_memout);

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":1211
 * # change_ranking
 * # pardi
 *     def change_ranking (             # <<<<<<<<<<<<<<
 *             self,
 *             DifferentialRing R = None,
 */

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_19DifferentialAlgebra_24RegularDifferentialChain_36change_ranking(struct __pyx_obj_19DifferentialAlgebra_RegularDifferentialChain *__pyx_v_self, struct __pyx_obj_19DifferentialAlgebra_DifferentialRing *__pyx_v_R, PyBoolObject *__pyx_v_prime, PyObject *__pyx_v_notation, int __pyx_v_timeout, int __pyx_v_memout) {
  ALGEB __pyx_v_L;
  PyObject *__pyx_v_mesgerr = 0;
  PyObject *__pyx_v_ranking = 0;
  struct __pyx_obj_19DifferentialAlgebra_RegularDifferentialChain *__pyx_v_C = 0;
  PyObject *__pyx_v_strnot = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  unsigned int __pyx_t_4;
  char *__pyx_t_5;
  bool __pyx_t_6;
  char *__pyx_t_7;
  char *__pyx_t_8;
  int __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("change_ranking", 1);

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":1312
 *         cdef RegularDifferentialChain C
 *         cdef strnot
 *         strnot = self.__process_notation (notation)             # <<<<<<<<<<<<<<
 *         ranking = R._ranking ()
 *         L = bmi_c.bmi_dapyx_pardi (
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_RegularDifferentialChain__proce); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1312, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_notation};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1312, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_v_strnot = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":1313
 *         cdef strnot
 *         strnot = self.__process_notation (notation)
 *         ranking = R._ranking ()             # <<<<<<<<<<<<<<
 *         L = bmi_c.bmi_dapyx_pardi (
 *                 self.regchain, ranking, int (prime),
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_R), __pyx_n_s_ranking); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1313, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1313, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  if (!(likely(PyBytes_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_1))) __PYX_ERR(2, 1313, __pyx_L1_error)
  __pyx_v_ranking = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":1315
 *         ranking = R._ranking ()
 *         L = bmi_c.bmi_dapyx_pardi (
 *                 self.regchain, ranking, int (prime),             # <<<<<<<<<<<<<<
 *                 self.notation, strnot, timeout, memout)
 *         if bmi_c.bmi_dapyx_is_error (L):
 */
  if (unlikely(__pyx_v_ranking == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
    __PYX_ERR(2, 1315, __pyx_L1_error)
  }
  __pyx_t_5 = __Pyx_PyBytes_AsWritableString(__pyx_v_ranking); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) __PYX_ERR(2, 1315, __pyx_L1_error)
  __pyx_t_1 = __Pyx_PyNumber_Int(((PyObject *)__pyx_v_prime)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1315, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_6 = __Pyx_PyInt_As_bool(__pyx_t_1); if (unlikely((__pyx_t_6 == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(2, 1315, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":1316
 *         L = bmi_c.bmi_dapyx_pardi (
 *                 self.regchain, ranking, int (prime),
 *                 self.notation, strnot, timeout, memout)             # <<<<<<<<<<<<<<
 *         if bmi_c.bmi_dapyx_is_error (L):
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (L)
 */
  __pyx_t_7 = __Pyx_PyObject_AsWritableString(__pyx_v_self->notation); if (unlikely((!__pyx_t_7) && PyErr_Occurred())) __PYX_ERR(2, 1316, __pyx_L1_error)
  __pyx_t_8 = __Pyx_PyObject_AsWritableString(__pyx_v_strnot); if (unlikely((!__pyx_t_8) && PyErr_Occurred())) __PYX_ERR(2, 1316, __pyx_L1_error)

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":1314
 *         strnot = self.__process_notation (notation)
 *         ranking = R._ranking ()
 *         L = bmi_c.bmi_dapyx_pardi (             # <<<<<<<<<<<<<<
 *                 self.regchain, ranking, int (prime),
 *                 self.notation, strnot, timeout, memout)
 */
  __pyx_v_L = bmi_dapyx_pardi(__pyx_v_self->regchain, __pyx_t_5, __pyx_t_6, __pyx_t_7, __pyx_t_8, __pyx_v_timeout, __pyx_v_memout);

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":1317
 *                 self.regchain, ranking, int (prime),
 *                 self.notation, strnot, timeout, memout)
 *         if bmi_c.bmi_dapyx_is_error (L):             # <<<<<<<<<<<<<<
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (L)
 *             bmi_c.bmi_balsa_clear_ALGEB (L)
 */
  __pyx_t_9 = (bmi_dapyx_is_error(__pyx_v_L) != 0);
  if (unlikely(__pyx_t_9)) {

    /* "../../bmi/sympy/RegularDifferentialChain.pyx":1318
 *                 self.notation, strnot, timeout, memout)
 *         if bmi_c.bmi_dapyx_is_error (L):
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (L)             # <<<<<<<<<<<<<<
 *             bmi_c.bmi_balsa_clear_ALGEB (L)
 *             raise RuntimeError (str (mesgerr, 'utf-8'))
 */
    __pyx_t_1 = __Pyx_PyBytes_FromString(bmi_dapyx_mesgerr(__pyx_v_L)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1318, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_v_mesgerr = ((PyObject*)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "../../bmi/sympy/RegularDifferentialChain.pyx":1319
 *         if bmi_c.bmi_dapyx_is_error (L):
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (L)
 *             bmi_c.bmi_balsa_clear_ALGEB (L)             # <<<<<<<<<<<<<<
 *             raise RuntimeError (str (mesgerr, 'utf-8'))
 *         C = RegularDifferentialChain.__new__ (RegularDifferentialChain)
 */
    bmi_balsa_clear_ALGEB(__pyx_v_L);

    /* "../../bmi/sympy/RegularDifferentialChain.pyx":1320
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (L)
 *             bmi_c.bmi_balsa_clear_ALGEB (L)
 *             raise RuntimeError (str (mesgerr, 'utf-8'))             # <<<<<<<<<<<<<<
 *         C = RegularDifferentialChain.__new__ (RegularDifferentialChain)
 *         C.dring = R
 */
    __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1320, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_v_mesgerr);
    __Pyx_GIVEREF(__pyx_v_mesgerr);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_mesgerr)) __PYX_ERR(2, 1320, __pyx_L1_error);
    __Pyx_INCREF(__pyx_kp_u_utf_8);
    __Pyx_GIVEREF(__pyx_kp_u_utf_8);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_kp_u_utf_8)) __PYX_ERR(2, 1320, __pyx_L1_error);
    __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)(&PyUnicode_Type)), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1320, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_RuntimeError, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1320, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(2, 1320, __pyx_L1_error)

    /* "../../bmi/sympy/RegularDifferentialChain.pyx":1317
 *                 self.regchain, ranking, int (prime),
 *                 self.notation, strnot, timeout, memout)
 *         if bmi_c.bmi_dapyx_is_error (L):             # <<<<<<<<<<<<<<
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (L)
 *             bmi_c.bmi_balsa_clear_ALGEB (L)
 */
  }

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":1321
 *             bmi_c.bmi_balsa_clear_ALGEB (L)
 *             raise RuntimeError (str (mesgerr, 'utf-8'))
 *         C = RegularDifferentialChain.__new__ (RegularDifferentialChain)             # <<<<<<<<<<<<<<
 *         C.dring = R
 *         C.notation = strnot
 */
  __pyx_t_1 = ((PyObject *)__pyx_tp_new_19DifferentialAlgebra_RegularDifferentialChain(((PyTypeObject *)__pyx_ptype_19DifferentialAlgebra_RegularDifferentialChain), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1321, __pyx_L1_error)
  __Pyx_GOTREF((PyObject *)__pyx_t_1);
  __pyx_v_C = ((struct __pyx_obj_19DifferentialAlgebra_RegularDifferentialChain *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":1322
 *             raise RuntimeError (str (mesgerr, 'utf-8'))
 *         C = RegularDifferentialChain.__new__ (RegularDifferentialChain)
 *         C.dring = R             # <<<<<<<<<<<<<<
 *         C.notation = strnot
 *         C.evdict = self.evdict
 */
  __Pyx_INCREF((PyObject *)__pyx_v_R);
  __Pyx_GIVEREF((PyObject *)__pyx_v_R);
  __Pyx_GOTREF((PyObject *)__pyx_v_C->dring);
  __Pyx_DECREF((PyObject *)__pyx_v_C->dring);
  __pyx_v_C->dring = __pyx_v_R;

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":1323
 *         C = RegularDifferentialChain.__new__ (RegularDifferentialChain)
 *         C.dring = R
 *         C.notation = strnot             # <<<<<<<<<<<<<<
 *         C.evdict = self.evdict
 *         C.regchain = L
 */
  __Pyx_INCREF(__pyx_v_strnot);
  __Pyx_GIVEREF(__pyx_v_strnot);
  __Pyx_GOTREF(__pyx_v_C->notation);
  __Pyx_DECREF(__pyx_v_C->notation);
  __pyx_v_C->notation = __pyx_v_strnot;

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":1324
 *         C.dring = R
 *         C.notation = strnot
 *         C.evdict = self.evdict             # <<<<<<<<<<<<<<
 *         C.regchain = L
 *         bmi_c.bmi_balsa_increment_nbref (C.regchain)
 */
  __pyx_t_1 = __pyx_v_self->evdict;
  __Pyx_INCREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_C->evdict);
  __Pyx_DECREF(__pyx_v_C->evdict);
  __pyx_v_C->evdict = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":1325
 *         C.notation = strnot
 *         C.evdict = self.evdict
 *         C.regchain = L             # <<<<<<<<<<<<<<
 *         bmi_c.bmi_balsa_increment_nbref (C.regchain)
 *         bmi_c.bmi_balsa_clear_ALGEB (L)
 */
  __pyx_v_C->regchain = __pyx_v_L;

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":1326
 *         C.evdict = self.evdict
 *         C.regchain = L
 *         bmi_c.bmi_balsa_increment_nbref (C.regchain)             # <<<<<<<<<<<<<<
 *         bmi_c.bmi_balsa_clear_ALGEB (L)
 *         return C
 */
  bmi_balsa_increment_nbref(__pyx_v_C->regchain);

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":1327
 *         C.regchain = L
 *         bmi_c.bmi_balsa_increment_nbref (C.regchain)
 *         bmi_c.bmi_balsa_clear_ALGEB (L)             # <<<<<<<<<<<<<<
 *         return C
 * 
 */
  bmi_balsa_clear_ALGEB(__pyx_v_L);

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":1328
 *         bmi_c.bmi_balsa_increment_nbref (C.regchain)
 *         bmi_c.bmi_balsa_clear_ALGEB (L)
 *         return C             # <<<<<<<<<<<<<<
 * 
 * # normal_form
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_C);
  __pyx_r = ((PyObject *)__pyx_v_C);
  goto __pyx_L0;

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":1211
 * # change_ranking
 * # pardi
 *     def change_ranking (             # <<<<<<<<<<<<<<
 *             self,
 *             DifferentialRing R = None,
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("DifferentialAlgebra.RegularDifferentialChain.change_ranking", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_mesgerr);
  __Pyx_XDECREF(__pyx_v_ranking);
  __Pyx_XDECREF((PyObject *)__pyx_v_C);
  __Pyx_XDECREF(__pyx_v_strnot);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "../../bmi/sympy/RegularDifferentialChain.pyx":1331
 * 
 * # normal_form
 *     def normal_form (             # <<<<<<<<<<<<<<
 *             self,
 *             equations,
 */

/* Python wrapper */
static PyObject *__pyx_pw_19DifferentialAlgebra_24RegularDifferentialChain_39normal_form(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_19DifferentialAlgebra_24RegularDifferentialChain_38normal_form, "\n        The normal form of a rational differential fraction\n\n        INPUT:\n\n            `equations` -- a rational fraction or a list of rational\n                             fractions\n            `casesplit` -- (default: False) a bool\n            `notation`  -- (default: 'undefined') a string\n\n        OUTPUT:\n\n            The normal form of the equation with respect to the regular\n            differential chain. If `equations` is a list, a list of\n            normal forms is returned.\n\n            Given a regular differential chain, not all rational\n            fractions have normal forms: the denominator should not\n            be zero, or even a zerodivisor, modulo the ideal defined\n            by the regular differential chain.\n\n            The optional argument `casesplit` permit to handle the\n            case of rational fractions which do not have normal forms,\n            by splitting cases.\n\n        NOTES:\n\n            The argument `casesplit` = True is not yet implemented.\n\n            The current implementation of normal forms may fail, even\n            if the normal form does exist (very rare but possible\n            situation).  A complete algorithm is available but not\n            yet implemented.  See references below.\n\n        REFERENCES:\n\n            [BLS11] Fran\303\247ois Boulier, Fran\303\247ois Lemaire and\n            Alexandre Sedoglavic. On the Regularity Property of\n            Differential Polynomials Modulo Regular Differential\n            Chains. In proc.  of CASC 2011. LNCS 6885, pp. 61-72. 2011.\n            http://hal.archives-ouvertes.fr/hal-00599440\n\n        EXAMPLES:\n\n            >>> from sympy import *\n            >>> from DifferentialAlgebra import *\n            >>> init_printing (use_unicode = False, num_columns = 60)\n\n            >>> x,y = var ('x,y')\n            >>> u,v = indexedbase ('u,v')\n            >>> R = DifferentialRing (derivations = [x,y], \n            ...             b""locks = [[v,u]], notation = 'jet')\n            >>> eq1 = u[x]**2 - 4*u\n            >>> eq2 = u[x,y]*v[y] - u + 1\n            >>> eq3 = v[x,x] - u[x]\n            >>> ideal = R.RosenfeldGroebner ([eq1,eq2,eq3])\n            >>> ideal\n            [regular_differential_chain]\n\n            >>> C = ideal [0]  \n\n        A few basic examples:\n\n            >>> p = u[y,y] / u[x]\n            >>> C.normal_form (p)\n            u[x]\n            ----\n            4*u \n\n            >>> C.normal_form (1/p)\n            u[x]\n\n        An expected behaviour of normal forms:\n\n            >>> C.normal_form (C.normal_form (p) * C.normal_form (1/p))\n            1\n        ");
static PyMethodDef __pyx_mdef_19DifferentialAlgebra_24RegularDifferentialChain_39normal_form = {"normal_form", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_19DifferentialAlgebra_24RegularDifferentialChain_39normal_form, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_19DifferentialAlgebra_24RegularDifferentialChain_38normal_form};
static PyObject *__pyx_pw_19DifferentialAlgebra_24RegularDifferentialChain_39normal_form(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_equations = 0;
  PyBoolObject *__pyx_v_casesplit = 0;
  PyObject *__pyx_v_notation = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[3] = {0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("normal_form (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_equations,&__pyx_n_s_casesplit,&__pyx_n_s_notation,0};

    /* "../../bmi/sympy/RegularDifferentialChain.pyx":1334
 *             self,
 *             equations,
 *             bool casesplit = False,             # <<<<<<<<<<<<<<
 *             notation = BMI_IX_undefined):
 *         r"""
 */
    values[1] = __Pyx_Arg_NewRef_FASTCALL((PyObject *)((PyBoolObject *)Py_False));
    values[2] = __Pyx_Arg_NewRef_FASTCALL(__pyx_k__62);
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_equations)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 1331, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_casesplit);
          if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 1331, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_notation);
          if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 1331, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "normal_form") < 0)) __PYX_ERR(2, 1331, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_equations = values[0];
    __pyx_v_casesplit = ((PyBoolObject *)values[1]);
    __pyx_v_notation = values[2];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("normal_form", 0, 1, 3, __pyx_nargs); __PYX_ERR(2, 1331, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("DifferentialAlgebra.RegularDifferentialChain.normal_form", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_casesplit), __pyx_ptype_7cpython_4bool_bool, 1, "casesplit", 0))) __PYX_ERR(2, 1334, __pyx_L1_error)
  __pyx_r = __pyx_pf_19DifferentialAlgebra_24RegularDifferentialChain_38normal_form(((struct __pyx_obj_19DifferentialAlgebra_RegularDifferentialChain *)__pyx_v_self), __pyx_v_equations, __pyx_v_casesplit, __pyx_v_notation);

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":1331
 * 
 * # normal_form
 *     def normal_form (             # <<<<<<<<<<<<<<
 *             self,
 *             equations,
 */

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_19DifferentialAlgebra_24RegularDifferentialChain_38normal_form(struct __pyx_obj_19DifferentialAlgebra_RegularDifferentialChain *__pyx_v_self, PyObject *__pyx_v_equations, PyBoolObject *__pyx_v_casesplit, PyObject *__pyx_v_notation) {
  PyObject *__pyx_v_result = 0;
  PyObject *__pyx_v_streqns = 0;
  PyObject *__pyx_v_mesgerr = 0;
  ALGEB_string __pyx_v_A;
  PyObject *__pyx_v_strnot = 0;
  PyObject *__pyx_9genexpr13__pyx_v_elt = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  unsigned int __pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  char *__pyx_t_7;
  char *__pyx_t_8;
  char *__pyx_t_9;
  Py_ssize_t __pyx_t_10;
  PyObject *(*__pyx_t_11)(PyObject *);
  int __pyx_t_12;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("normal_form", 1);

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":1418
 *         cdef bmi_c.ALGEB_string A
 *         cdef strnot
 *         strnot = self.__process_notation (notation)             # <<<<<<<<<<<<<<
 *         if casesplit:
 *             raise NotImplementedError ('casesplit = True')
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_RegularDifferentialChain__proce); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1418, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_notation};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1418, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_v_strnot = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":1419
 *         cdef strnot
 *         strnot = self.__process_notation (notation)
 *         if casesplit:             # <<<<<<<<<<<<<<
 *             raise NotImplementedError ('casesplit = True')
 *         if isinstance (equations, list):
 */
  __pyx_t_5 = __Pyx_PyObject_IsTrue(((PyObject *)__pyx_v_casesplit)); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(2, 1419, __pyx_L1_error)
  if (unlikely(__pyx_t_5)) {

    /* "../../bmi/sympy/RegularDifferentialChain.pyx":1420
 *         strnot = self.__process_notation (notation)
 *         if casesplit:
 *             raise NotImplementedError ('casesplit = True')             # <<<<<<<<<<<<<<
 *         if isinstance (equations, list):
 *             streqns = ascii (equations)
 */
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_NotImplementedError, __pyx_tuple__63, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1420, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(2, 1420, __pyx_L1_error)

    /* "../../bmi/sympy/RegularDifferentialChain.pyx":1419
 *         cdef strnot
 *         strnot = self.__process_notation (notation)
 *         if casesplit:             # <<<<<<<<<<<<<<
 *             raise NotImplementedError ('casesplit = True')
 *         if isinstance (equations, list):
 */
  }

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":1421
 *         if casesplit:
 *             raise NotImplementedError ('casesplit = True')
 *         if isinstance (equations, list):             # <<<<<<<<<<<<<<
 *             streqns = ascii (equations)
 *         else:
 */
  __pyx_t_5 = PyList_Check(__pyx_v_equations); 
  if (__pyx_t_5) {

    /* "../../bmi/sympy/RegularDifferentialChain.pyx":1422
 *             raise NotImplementedError ('casesplit = True')
 *         if isinstance (equations, list):
 *             streqns = ascii (equations)             # <<<<<<<<<<<<<<
 *         else:
 *             streqns = ascii ([equations])
 */
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ascii); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1422, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = NULL;
    __pyx_t_4 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
        __pyx_t_4 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_equations};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1422, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    if (!(likely(PyBytes_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_1))) __PYX_ERR(2, 1422, __pyx_L1_error)
    __pyx_v_streqns = ((PyObject*)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "../../bmi/sympy/RegularDifferentialChain.pyx":1421
 *         if casesplit:
 *             raise NotImplementedError ('casesplit = True')
 *         if isinstance (equations, list):             # <<<<<<<<<<<<<<
 *             streqns = ascii (equations)
 *         else:
 */
    goto __pyx_L4;
  }

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":1424
 *             streqns = ascii (equations)
 *         else:
 *             streqns = ascii ([equations])             # <<<<<<<<<<<<<<
 *         A = bmi_c.bmi_dapyx_normal_form (
 *                     self.regchain, streqns,
 */
  /*else*/ {
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ascii); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1424, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1424, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_v_equations);
    __Pyx_GIVEREF(__pyx_v_equations);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 0, __pyx_v_equations)) __PYX_ERR(2, 1424, __pyx_L1_error);
    __pyx_t_6 = NULL;
    __pyx_t_4 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
        __pyx_t_4 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_3};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1424, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    if (!(likely(PyBytes_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_1))) __PYX_ERR(2, 1424, __pyx_L1_error)
    __pyx_v_streqns = ((PyObject*)__pyx_t_1);
    __pyx_t_1 = 0;
  }
  __pyx_L4:;

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":1426
 *             streqns = ascii ([equations])
 *         A = bmi_c.bmi_dapyx_normal_form (
 *                     self.regchain, streqns,             # <<<<<<<<<<<<<<
 *                     self.notation, strnot, 0, 0)
 *         if bmi_c.bmi_dapyx_is_error (A):
 */
  if (unlikely(__pyx_v_streqns == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
    __PYX_ERR(2, 1426, __pyx_L1_error)
  }
  __pyx_t_7 = __Pyx_PyBytes_AsWritableString(__pyx_v_streqns); if (unlikely((!__pyx_t_7) && PyErr_Occurred())) __PYX_ERR(2, 1426, __pyx_L1_error)

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":1427
 *         A = bmi_c.bmi_dapyx_normal_form (
 *                     self.regchain, streqns,
 *                     self.notation, strnot, 0, 0)             # <<<<<<<<<<<<<<
 *         if bmi_c.bmi_dapyx_is_error (A):
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (A)
 */
  __pyx_t_8 = __Pyx_PyObject_AsWritableString(__pyx_v_self->notation); if (unlikely((!__pyx_t_8) && PyErr_Occurred())) __PYX_ERR(2, 1427, __pyx_L1_error)
  __pyx_t_9 = __Pyx_PyObject_AsWritableString(__pyx_v_strnot); if (unlikely((!__pyx_t_9) && PyErr_Occurred())) __PYX_ERR(2, 1427, __pyx_L1_error)

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":1425
 *         else:
 *             streqns = ascii ([equations])
 *         A = bmi_c.bmi_dapyx_normal_form (             # <<<<<<<<<<<<<<
 *                     self.regchain, streqns,
 *                     self.notation, strnot, 0, 0)
 */
  __pyx_v_A = bmi_dapyx_normal_form(__pyx_v_self->regchain, __pyx_t_7, __pyx_t_8, __pyx_t_9, 0, 0);

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":1428
 *                     self.regchain, streqns,
 *                     self.notation, strnot, 0, 0)
 *         if bmi_c.bmi_dapyx_is_error (A):             # <<<<<<<<<<<<<<
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (A)
 *             bmi_c.bmi_balsa_clear_ALGEB (A)
 */
  __pyx_t_5 = (bmi_dapyx_is_error(__pyx_v_A) != 0);
  if (unlikely(__pyx_t_5)) {

    /* "../../bmi/sympy/RegularDifferentialChain.pyx":1429
 *                     self.notation, strnot, 0, 0)
 *         if bmi_c.bmi_dapyx_is_error (A):
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (A)             # <<<<<<<<<<<<<<
 *             bmi_c.bmi_balsa_clear_ALGEB (A)
 *             raise RuntimeError (str (mesgerr, 'utf-8'))
 */
    __pyx_t_1 = __Pyx_PyBytes_FromString(bmi_dapyx_mesgerr(__pyx_v_A)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1429, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_v_mesgerr = ((PyObject*)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "../../bmi/sympy/RegularDifferentialChain.pyx":1430
 *         if bmi_c.bmi_dapyx_is_error (A):
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (A)
 *             bmi_c.bmi_balsa_clear_ALGEB (A)             # <<<<<<<<<<<<<<
 *             raise RuntimeError (str (mesgerr, 'utf-8'))
 *         result = eval (A.value, globals (), self.evdict)
 */
    bmi_balsa_clear_ALGEB(__pyx_v_A);

    /* "../../bmi/sympy/RegularDifferentialChain.pyx":1431
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (A)
 *             bmi_c.bmi_balsa_clear_ALGEB (A)
 *             raise RuntimeError (str (mesgerr, 'utf-8'))             # <<<<<<<<<<<<<<
 *         result = eval (A.value, globals (), self.evdict)
 *         result = [elt[0] for elt in result]
 */
    __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1431, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_v_mesgerr);
    __Pyx_GIVEREF(__pyx_v_mesgerr);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_mesgerr)) __PYX_ERR(2, 1431, __pyx_L1_error);
    __Pyx_INCREF(__pyx_kp_u_utf_8);
    __Pyx_GIVEREF(__pyx_kp_u_utf_8);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_kp_u_utf_8)) __PYX_ERR(2, 1431, __pyx_L1_error);
    __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)(&PyUnicode_Type)), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1431, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_RuntimeError, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1431, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(2, 1431, __pyx_L1_error)

    /* "../../bmi/sympy/RegularDifferentialChain.pyx":1428
 *                     self.regchain, streqns,
 *                     self.notation, strnot, 0, 0)
 *         if bmi_c.bmi_dapyx_is_error (A):             # <<<<<<<<<<<<<<
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (A)
 *             bmi_c.bmi_balsa_clear_ALGEB (A)
 */
  }

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":1432
 *             bmi_c.bmi_balsa_clear_ALGEB (A)
 *             raise RuntimeError (str (mesgerr, 'utf-8'))
 *         result = eval (A.value, globals (), self.evdict)             # <<<<<<<<<<<<<<
 *         result = [elt[0] for elt in result]
 *         if not isinstance (equations, list):
 */
  __pyx_t_1 = __Pyx_PyBytes_FromString(__pyx_v_A->value); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1432, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_Globals(); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1432, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1432, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_1);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1)) __PYX_ERR(2, 1432, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_2);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2)) __PYX_ERR(2, 1432, __pyx_L1_error);
  __Pyx_INCREF(__pyx_v_self->evdict);
  __Pyx_GIVEREF(__pyx_v_self->evdict);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_self->evdict)) __PYX_ERR(2, 1432, __pyx_L1_error);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_eval, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1432, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_result = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":1433
 *             raise RuntimeError (str (mesgerr, 'utf-8'))
 *         result = eval (A.value, globals (), self.evdict)
 *         result = [elt[0] for elt in result]             # <<<<<<<<<<<<<<
 *         if not isinstance (equations, list):
 *             result = result [0]
 */
  { /* enter inner scope */
    __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1433, __pyx_L8_error)
    __Pyx_GOTREF(__pyx_t_2);
    if (likely(PyList_CheckExact(__pyx_v_result)) || PyTuple_CheckExact(__pyx_v_result)) {
      __pyx_t_3 = __pyx_v_result; __Pyx_INCREF(__pyx_t_3);
      __pyx_t_10 = 0;
      __pyx_t_11 = NULL;
    } else {
      __pyx_t_10 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_result); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1433, __pyx_L8_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_11 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_3); if (unlikely(!__pyx_t_11)) __PYX_ERR(2, 1433, __pyx_L8_error)
    }
    for (;;) {
      if (likely(!__pyx_t_11)) {
        if (likely(PyList_CheckExact(__pyx_t_3))) {
          {
            Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_3);
            #if !CYTHON_ASSUME_SAFE_MACROS
            if (unlikely((__pyx_temp < 0))) __PYX_ERR(2, 1433, __pyx_L8_error)
            #endif
            if (__pyx_t_10 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_1 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_10); __Pyx_INCREF(__pyx_t_1); __pyx_t_10++; if (unlikely((0 < 0))) __PYX_ERR(2, 1433, __pyx_L8_error)
          #else
          __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1433, __pyx_L8_error)
          __Pyx_GOTREF(__pyx_t_1);
          #endif
        } else {
          {
            Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_3);
            #if !CYTHON_ASSUME_SAFE_MACROS
            if (unlikely((__pyx_temp < 0))) __PYX_ERR(2, 1433, __pyx_L8_error)
            #endif
            if (__pyx_t_10 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_10); __Pyx_INCREF(__pyx_t_1); __pyx_t_10++; if (unlikely((0 < 0))) __PYX_ERR(2, 1433, __pyx_L8_error)
          #else
          __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1433, __pyx_L8_error)
          __Pyx_GOTREF(__pyx_t_1);
          #endif
        }
      } else {
        __pyx_t_1 = __pyx_t_11(__pyx_t_3);
        if (unlikely(!__pyx_t_1)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(2, 1433, __pyx_L8_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_1);
      }
      __Pyx_XDECREF_SET(__pyx_9genexpr13__pyx_v_elt, __pyx_t_1);
      __pyx_t_1 = 0;
      __pyx_t_1 = __Pyx_GetItemInt(__pyx_9genexpr13__pyx_v_elt, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1433, __pyx_L8_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_1))) __PYX_ERR(2, 1433, __pyx_L8_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_XDECREF(__pyx_9genexpr13__pyx_v_elt); __pyx_9genexpr13__pyx_v_elt = 0;
    goto __pyx_L12_exit_scope;
    __pyx_L8_error:;
    __Pyx_XDECREF(__pyx_9genexpr13__pyx_v_elt); __pyx_9genexpr13__pyx_v_elt = 0;
    goto __pyx_L1_error;
    __pyx_L12_exit_scope:;
  } /* exit inner scope */
  __Pyx_DECREF_SET(__pyx_v_result, __pyx_t_2);
  __pyx_t_2 = 0;

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":1434
 *         result = eval (A.value, globals (), self.evdict)
 *         result = [elt[0] for elt in result]
 *         if not isinstance (equations, list):             # <<<<<<<<<<<<<<
 *             result = result [0]
 *         bmi_c.bmi_balsa_clear_ALGEB (A)
 */
  __pyx_t_5 = PyList_Check(__pyx_v_equations); 
  __pyx_t_12 = (!__pyx_t_5);
  if (__pyx_t_12) {

    /* "../../bmi/sympy/RegularDifferentialChain.pyx":1435
 *         result = [elt[0] for elt in result]
 *         if not isinstance (equations, list):
 *             result = result [0]             # <<<<<<<<<<<<<<
 *         bmi_c.bmi_balsa_clear_ALGEB (A)
 *         return result
 */
    __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_result, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1435, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF_SET(__pyx_v_result, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "../../bmi/sympy/RegularDifferentialChain.pyx":1434
 *         result = eval (A.value, globals (), self.evdict)
 *         result = [elt[0] for elt in result]
 *         if not isinstance (equations, list):             # <<<<<<<<<<<<<<
 *             result = result [0]
 *         bmi_c.bmi_balsa_clear_ALGEB (A)
 */
  }

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":1436
 *         if not isinstance (equations, list):
 *             result = result [0]
 *         bmi_c.bmi_balsa_clear_ALGEB (A)             # <<<<<<<<<<<<<<
 *         return result
 * 
 */
  bmi_balsa_clear_ALGEB(__pyx_v_A);

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":1437
 *             result = result [0]
 *         bmi_c.bmi_balsa_clear_ALGEB (A)
 *         return result             # <<<<<<<<<<<<<<
 * 
 * # preparation_equation
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_result);
  __pyx_r = __pyx_v_result;
  goto __pyx_L0;

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":1331
 * 
 * # normal_form
 *     def normal_form (             # <<<<<<<<<<<<<<
 *             self,
 *             equations,
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("DifferentialAlgebra.RegularDifferentialChain.normal_form", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XDECREF(__pyx_v_streqns);
  __Pyx_XDECREF(__pyx_v_mesgerr);
  __Pyx_XDECREF(__pyx_v_strnot);
  __Pyx_XDECREF(__pyx_9genexpr13__pyx_v_elt);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "../../bmi/sympy/RegularDifferentialChain.pyx":1440
 * 
 * # preparation_equation
 *     def preparation_equation (             # <<<<<<<<<<<<<<
 *             self,
 *             polynomial,
 */

/* Python wrapper */
static PyObject *__pyx_pw_19DifferentialAlgebra_24RegularDifferentialChain_41preparation_equation(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_19DifferentialAlgebra_24RegularDifferentialChain_40preparation_equation, "\n        The preparation equation of a polynomial\n\n        INPUT:\n\n            `polynomial` -- a polynomial\n            `basefield`  -- (default: None) a BaseFieldExtension\n            `congruence` -- (default: False) a bool\n            `zstring`    -- (default: 'z%d') a string\n            `notation`   -- (default: 'undefined') a string\n\n        OUTPUT:\n\n            Return a preparation equation [Kolchin73, chapter IV,\n            section 13] of `polynomial` with respect to the regular\n            differential chain.\n\n            Preparation equations are an important tool of the Low\n            Power Theorem [Ritt50, chapter III, Kolchin73, chapter\n            IV, section 15].  The Low Power Theorem is applied by the\n            RosenfeldGroebner method, when there is a single equation\n            to process and the optional parameter `singsol` = True.\n\n            Let I the differential ideal defined by the chain,\n            denote A[1], ..., A[r] the differential polynomials which\n            constitute the chain. Introduce r new dependent variables\n            z[i]. Each variable z[i] representing the differential\n            polynomial A[i].\n\n            The returned preparation equation is an expression having\n            the form h*f = c[1]*t[1] + c[2]*t[2] + ... + c[n]*t[n],\n            where f stands for `polynomial`. The differential polynomial\n            h is a power product of initials and separants of the\n            A[i]. The coefficients c[i] are reduced with respect to\n            the chain and regular with respect to I. The monomials\n            t[i] are power products of the z[k] variables and their\n            derivatives.  They satisfy some further properties,\n            described in [Kolchin73, chapter IV, section 13]. If each\n            z[k] is replaced by the corresponding polynomial A[k],\n            then the preparation equation becomes an equality.\n\n            The optional parameter `congruence`"". In the right hand-side\n            of the preparation equation, denote q the minimum total\n            degree (the low power, actually) of the monomials t[i].\n            If `congruence` is true, then all the terms c[i]*t[i]\n            such that the total degree of t[i] is strictly greater\n            than q are removed. The remaining sum is call a preparation\n            congruence of f.\n\n            The optional parameter `basefield` is useful in conjunction\n            with `congruence` = True. Reductions by the A[i] which\n            belong to the base field are not taken into account for\n            computing the preparation congruence of f. The terms t[k]\n            which depend on such z[i] and their derivatives are not\n            considered for computing the degree q and do not appear\n            in the preparation congruence.\n\n            The optional parameter `zstring` permits to denote the\n            polynomial A[i] by symbols different from z[i]. This may\n            be useful since the method creates one indexedbase for\n            each z[i]. The `zstring` should correspond to a valid\n            indexedbase identifier and involve the substring '%d'.\n\n        EXAMPLES:\n\n            >>> from sympy import *\n            >>> from DifferentialAlgebra import *\n            >>> init_printing (use_unicode = False, num_columns = 60)\n\n            >>> t = var('t')\n            >>> u = indexedbase('u')\n            >>> R = DifferentialRing (derivations = [t], \n            ...             blocks = [u], notation = 'jet')\n\n        A famous example of Ritt. Two cases are considered:\n\n            >>> poly = u[t]**2 - 4*u\n            >>> ideal = R.RosenfeldGroebner ([poly])\n            >>> [ C.equations (solved = True) for C in ideal ]\n                  2                 \n            [[u[t]  = 4*u], [u = 0]]\n\n        Is the solution u(t) = 0 an essential component?\n\n            >>> C = ideal [1]\n\n        Here is a preparat""ion equation for poly, with respect to the\n        chain C.  Replacing z1 by u, it is easy to see check the result:\n\n            >>> C.preparation_equation (poly)\n                2              2       \n            u[t]  - 4*u = z1[t]  - 4*z1\n\n        Here is the preparation congruence (q = 1):\n\n            >>> C.preparation_equation (poly, congruence = True)\n                2              \n            u[t]  - 4*u = -4*z1\n\n        By [Kolchin73, chapter IV, section 15, theorem 6], the solution\n        is, indeed, essential. This result can be interpreted as\n        follows: the solution u(t) = 0 is not a particular case of the\n        general solution u(t) = (t + c)**2, where c is an arbitrary\n        y constant:\n\n            >>> ideal = R.RosenfeldGroebner ([poly], \n            ...                              singsol = 'essential')\n            >>> [ C.equations (solved = True) for C in ideal ]\n                  2                 \n            [[u[t]  = 4*u], [u = 0]]\n\n        Another famous example. Two similar cases are generated:\n\n            >>> poly = u[t]**2 - 4*u**3\n            >>> ideal = R.RosenfeldGroebner ([poly])\n            >>> ideal\n            [regular_differential_chain, regular_differential_chain]\n\n        Is the solution u(t) = 0 an essential component?\n\n            >>> C = ideal [1]\n\n        Here is a preparation equation for poly, with respect to the\n        chain C.  Replacing z1 by u, it is easy to see check the result:\n\n            >>> C.preparation_equation (poly)\n                2      3        2       3\n            u[t]  - 4*u  = z1[t]  - 4*z1 \n\n        Here is the preparation congruence (q = 2):\n\n            >>> C.preparation_equation (poly, congruence = True)\n                2      3        2\n            u[t]  - 4*u  = z1[t] \n\n        By Ritt's theorem, the solution is particular. This result\n        can be interpreted as follows: the solution u(t) = 0 is the\n        limit, when the arbit""rary constant c tends towards infinity,\n        of the general solution u(t) = 1/(t + c)**2:\n\n            >>> ideal = R.RosenfeldGroebner ([poly], \n            ...                              singsol = 'essential')\n            >>> [ C.equations (solved = True) for C in ideal ]\n                  2      3  \n            [[u[t]  = 4*u ]]\n\n        The following example just illustrates the use of base fields.\n        The F is a differential field involving two indexedbases s(t),\n        c(t), which can be viewed as sin(t) and cos(t):\n\n            >>> t = var('t')\n            >>> u,s,c = indexedbase ('u,s,c')\n            >>> R = DifferentialRing (derivations = [t], \n            ...             blocks = [u,[s,c]], notation = 'jet')\n            >>> C = RegularDifferentialChain (\n            ...             [c[t] + s, s**2 + c**2 - 1], R)\n            >>> F = BaseFieldExtension (relations = C)\n\n        Observe that, over F, poly and poly2 are the same polynomial.\n        They thus should have the same preparation congruence:\n\n            >>> poly = u[t]**2 - 4*u**3\n            >>> poly2 = u[t]**2 - 4*u**3 + s**2 + c**2 - 1\n\n        Two cases are generated:\n\n            >>> ideal = R.RosenfeldGroebner ([poly], basefield = F)\n            >>> [ C.equations (solved = True) for C in ideal ]\n               2        2                 2      3     2        2      >\n            [[s  = 1 - c , c[t] = -s, u[t]  = 4*u ], [s  = 1 - c , c[t >\n            |  \n            >                \n            > ] = -s, u = 0]]\n\n        Is the solution u(t) = 0 essential?\n\n            >>> C = ideal[1]\n            >>> C.equations (solved = True)\n              2        2                   \n            [s  = 1 - c , c[t] = -s, u = 0]\n\n        The preparation congruence of poly (playing with zstring):\n\n            >>> C.preparation_equation (poly, zstring = 'C%d')\n                2      3        2       3\n            u[t]  - 4*u  = C3[t]  - 4*C3 \n\n      ""  The preparation congruence of poly shows that the solution is\n        not essential (see the previous example):\n\n            >>> C.preparation_equation (poly, congruence=True)\n                2      3        2\n            u[t]  - 4*u  = z3[t] \n\n        Let us now consider poly2, which is equal to poly, over F:\n\n            >>> C.preparation_equation (poly2)\n                2    2    2      3            2            3\n            u[t]  + c  + s  - 4*u  - 1 = z3[t]  + z1 - 4*z3 \n\n        The term t[i] of minimal degree correspond to a reduction by\n        a field equation:\n\n            >>> C.preparation_equation (poly2, congruence=True)\n                2    2    2      3         \n            u[t]  + c  + s  - 4*u  - 1 = z1\n\n        Specifying that we should consider poly2 over F, the preparation\n        congruence changes and we conclude similarly as for poly:\n\n            >>> C.preparation_equation (poly2, \n            ...                         congruence=True, basefield=F)\n                2    2    2      3            2\n            u[t]  + c  + s  - 4*u  - 1 = z3[t] \n\n        We check below that RosenfeldGroebner recognizes the solution\n        as not essential:\n\n            >>> ideal = R.RosenfeldGroebner ([poly], \n            ...                 singsol = 'essential', basefield = F)\n            >>> [ C.equations (solved = True) for C in ideal ]\n               2        2                 2      3  \n            [[s  = 1 - c , c[t] = -s, u[t]  = 4*u ]]\n        ");
static PyMethodDef __pyx_mdef_19DifferentialAlgebra_24RegularDifferentialChain_41preparation_equation = {"preparation_equation", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_19DifferentialAlgebra_24RegularDifferentialChain_41preparation_equation, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_19DifferentialAlgebra_24RegularDifferentialChain_40preparation_equation};
static PyObject *__pyx_pw_19DifferentialAlgebra_24RegularDifferentialChain_41preparation_equation(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_polynomial = 0;
  struct __pyx_obj_19DifferentialAlgebra_BaseFieldExtension *__pyx_v_basefield = 0;
  PyBoolObject *__pyx_v_congruence = 0;
  PyObject *__pyx_v_zstring = 0;
  PyObject *__pyx_v_notation = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[5] = {0,0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("preparation_equation (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_polynomial,&__pyx_n_s_basefield,&__pyx_n_s_congruence,&__pyx_n_s_zstring,&__pyx_n_s_notation,0};

    /* "../../bmi/sympy/RegularDifferentialChain.pyx":1443
 *             self,
 *             polynomial,
 *             BaseFieldExtension basefield = None,             # <<<<<<<<<<<<<<
 *             bool congruence = False,
 *             zstring = 'z%d',
 */
    values[1] = __Pyx_Arg_NewRef_FASTCALL((PyObject *)((struct __pyx_obj_19DifferentialAlgebra_BaseFieldExtension *)Py_None));

    /* "../../bmi/sympy/RegularDifferentialChain.pyx":1444
 *             polynomial,
 *             BaseFieldExtension basefield = None,
 *             bool congruence = False,             # <<<<<<<<<<<<<<
 *             zstring = 'z%d',
 *             notation = BMI_IX_undefined):
 */
    values[2] = __Pyx_Arg_NewRef_FASTCALL((PyObject *)((PyBoolObject *)Py_False));
    values[3] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)__pyx_kp_u_z_d));
    values[4] = __Pyx_Arg_NewRef_FASTCALL(__pyx_k__64);
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  5: values[4] = __Pyx_Arg_FASTCALL(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_polynomial)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 1440, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_basefield);
          if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 1440, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_congruence);
          if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 1440, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_zstring);
          if (value) { values[3] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 1440, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_notation);
          if (value) { values[4] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 1440, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "preparation_equation") < 0)) __PYX_ERR(2, 1440, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  5: values[4] = __Pyx_Arg_FASTCALL(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_polynomial = values[0];
    __pyx_v_basefield = ((struct __pyx_obj_19DifferentialAlgebra_BaseFieldExtension *)values[1]);
    __pyx_v_congruence = ((PyBoolObject *)values[2]);
    __pyx_v_zstring = values[3];
    __pyx_v_notation = values[4];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("preparation_equation", 0, 1, 5, __pyx_nargs); __PYX_ERR(2, 1440, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("DifferentialAlgebra.RegularDifferentialChain.preparation_equation", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_basefield), __pyx_ptype_19DifferentialAlgebra_BaseFieldExtension, 1, "basefield", 0))) __PYX_ERR(2, 1443, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_congruence), __pyx_ptype_7cpython_4bool_bool, 1, "congruence", 0))) __PYX_ERR(2, 1444, __pyx_L1_error)
  __pyx_r = __pyx_pf_19DifferentialAlgebra_24RegularDifferentialChain_40preparation_equation(((struct __pyx_obj_19DifferentialAlgebra_RegularDifferentialChain *)__pyx_v_self), __pyx_v_polynomial, __pyx_v_basefield, __pyx_v_congruence, __pyx_v_zstring, __pyx_v_notation);

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":1440
 * 
 * # preparation_equation
 *     def preparation_equation (             # <<<<<<<<<<<<<<
 *             self,
 *             polynomial,
 */

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_19DifferentialAlgebra_24RegularDifferentialChain_40preparation_equation(struct __pyx_obj_19DifferentialAlgebra_RegularDifferentialChain *__pyx_v_self, PyObject *__pyx_v_polynomial, struct __pyx_obj_19DifferentialAlgebra_BaseFieldExtension *__pyx_v_basefield, PyBoolObject *__pyx_v_congruence, PyObject *__pyx_v_zstring, PyObject *__pyx_v_notation) {
  PyObject *__pyx_v_result = 0;
  PyObject *__pyx_v_nbz = 0;
  PyObject *__pyx_v_i = 0;
  PyObject *__pyx_v_zevdict = 0;
  PyObject *__pyx_v_zsymb = 0;
  PyObject *__pyx_v_zval = 0;
  PyObject *__pyx_v_mesgerr = 0;
  PyObject *__pyx_v_strpoly = 0;
  PyObject *__pyx_v_strgens = 0;
  PyObject *__pyx_v_strrels = 0;
  PyObject *__pyx_v_newval = 0;
  PyObject *__pyx_v_strzstring = 0;
  ALGEB_string __pyx_v_A;
  PyObject *__pyx_v_strnot = 0;
  struct __pyx_obj_19DifferentialAlgebra_BaseFieldExtension *__pyx_v_F = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  unsigned int __pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  char *__pyx_t_8;
  char *__pyx_t_9;
  char *__pyx_t_10;
  ba0_int_p __pyx_t_11;
  char *__pyx_t_12;
  char *__pyx_t_13;
  char *__pyx_t_14;
  Py_ssize_t __pyx_t_15;
  PyObject *(*__pyx_t_16)(PyObject *);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("preparation_equation", 1);

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":1676
 *         cdef bmi_c.ALGEB_string A
 *         cdef strnot
 *         strnot = self.__process_notation (notation)             # <<<<<<<<<<<<<<
 *         strpoly = ascii (polynomial)
 *         if basefield == None:
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_RegularDifferentialChain__proce); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1676, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_notation};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1676, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_v_strnot = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":1677
 *         cdef strnot
 *         strnot = self.__process_notation (notation)
 *         strpoly = ascii (polynomial)             # <<<<<<<<<<<<<<
 *         if basefield == None:
 *             F = BaseFieldExtension ()
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ascii); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1677, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_polynomial};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1677, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  if (!(likely(PyBytes_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_1))) __PYX_ERR(2, 1677, __pyx_L1_error)
  __pyx_v_strpoly = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":1678
 *         strnot = self.__process_notation (notation)
 *         strpoly = ascii (polynomial)
 *         if basefield == None:             # <<<<<<<<<<<<<<
 *             F = BaseFieldExtension ()
 *         else:
 */
  __pyx_t_1 = PyObject_RichCompare(((PyObject *)__pyx_v_basefield), Py_None, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1678, __pyx_L1_error)
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(2, 1678, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_5) {

    /* "../../bmi/sympy/RegularDifferentialChain.pyx":1679
 *         strpoly = ascii (polynomial)
 *         if basefield == None:
 *             F = BaseFieldExtension ()             # <<<<<<<<<<<<<<
 *         else:
 *             F = basefield
 */
    __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_19DifferentialAlgebra_BaseFieldExtension)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1679, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_v_F = ((struct __pyx_obj_19DifferentialAlgebra_BaseFieldExtension *)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "../../bmi/sympy/RegularDifferentialChain.pyx":1678
 *         strnot = self.__process_notation (notation)
 *         strpoly = ascii (polynomial)
 *         if basefield == None:             # <<<<<<<<<<<<<<
 *             F = BaseFieldExtension ()
 *         else:
 */
    goto __pyx_L3;
  }

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":1681
 *             F = BaseFieldExtension ()
 *         else:
 *             F = basefield             # <<<<<<<<<<<<<<
 * # It is important to remove quotes around range indexed groups otherwise
 * #   they will be interpreted as plain strings
 */
  /*else*/ {
    __Pyx_INCREF((PyObject *)__pyx_v_basefield);
    __pyx_v_F = __pyx_v_basefield;
  }
  __pyx_L3:;

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":1684
 * # It is important to remove quotes around range indexed groups otherwise
 * #   they will be interpreted as plain strings
 *         strgens = ascii (F.generators ())             # <<<<<<<<<<<<<<
 *         strgens = strgens.replace (b"'", b"")
 *         strrels = ascii (F._relations ())
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ascii); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1684, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_F), __pyx_n_s_generators); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 1684, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
    if (likely(__pyx_t_7)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_7);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_6, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_7, NULL};
    __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1684, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  }
  __pyx_t_6 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1684, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  if (!(likely(PyBytes_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_1))) __PYX_ERR(2, 1684, __pyx_L1_error)
  __pyx_v_strgens = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":1685
 * #   they will be interpreted as plain strings
 *         strgens = ascii (F.generators ())
 *         strgens = strgens.replace (b"'", b"")             # <<<<<<<<<<<<<<
 *         strrels = ascii (F._relations ())
 *         strzstring = ascii (zstring)
 */
  __pyx_t_1 = __Pyx_CallUnboundCMethod2(&__pyx_umethod_PyBytes_Type_replace, __pyx_v_strgens, __pyx_kp_b__6, __pyx_kp_b__7); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1685, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyBytes_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_1))) __PYX_ERR(2, 1685, __pyx_L1_error)
  __Pyx_DECREF_SET(__pyx_v_strgens, ((PyObject*)__pyx_t_1));
  __pyx_t_1 = 0;

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":1686
 *         strgens = ascii (F.generators ())
 *         strgens = strgens.replace (b"'", b"")
 *         strrels = ascii (F._relations ())             # <<<<<<<<<<<<<<
 *         strzstring = ascii (zstring)
 *         A = bmi_c.bmi_dapyx_preparation_equation (
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ascii); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1686, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_F), __pyx_n_s_relations); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 1686, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
    if (likely(__pyx_t_7)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_7);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_6, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_7, NULL};
    __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1686, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  }
  __pyx_t_6 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1686, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  if (!(likely(PyBytes_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_1))) __PYX_ERR(2, 1686, __pyx_L1_error)
  __pyx_v_strrels = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":1687
 *         strgens = strgens.replace (b"'", b"")
 *         strrels = ascii (F._relations ())
 *         strzstring = ascii (zstring)             # <<<<<<<<<<<<<<
 *         A = bmi_c.bmi_dapyx_preparation_equation (
 *                 strpoly, self.regchain, strgens, strrels, int (congruence),
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ascii); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1687, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_zstring};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1687, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  if (!(likely(PyBytes_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_1))) __PYX_ERR(2, 1687, __pyx_L1_error)
  __pyx_v_strzstring = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":1689
 *         strzstring = ascii (zstring)
 *         A = bmi_c.bmi_dapyx_preparation_equation (
 *                 strpoly, self.regchain, strgens, strrels, int (congruence),             # <<<<<<<<<<<<<<
 *                 strzstring, self.notation, strnot, 0, 0)
 *         if bmi_c.bmi_dapyx_is_error (A):
 */
  if (unlikely(__pyx_v_strpoly == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
    __PYX_ERR(2, 1689, __pyx_L1_error)
  }
  __pyx_t_8 = __Pyx_PyBytes_AsWritableString(__pyx_v_strpoly); if (unlikely((!__pyx_t_8) && PyErr_Occurred())) __PYX_ERR(2, 1689, __pyx_L1_error)
  if (unlikely(__pyx_v_strgens == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
    __PYX_ERR(2, 1689, __pyx_L1_error)
  }
  __pyx_t_9 = __Pyx_PyBytes_AsWritableString(__pyx_v_strgens); if (unlikely((!__pyx_t_9) && PyErr_Occurred())) __PYX_ERR(2, 1689, __pyx_L1_error)
  if (unlikely(__pyx_v_strrels == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
    __PYX_ERR(2, 1689, __pyx_L1_error)
  }
  __pyx_t_10 = __Pyx_PyBytes_AsWritableString(__pyx_v_strrels); if (unlikely((!__pyx_t_10) && PyErr_Occurred())) __PYX_ERR(2, 1689, __pyx_L1_error)
  __pyx_t_1 = __Pyx_PyNumber_Int(((PyObject *)__pyx_v_congruence)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1689, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_11 = __Pyx_PyInt_As_ba0_int_p(__pyx_t_1); if (unlikely((__pyx_t_11 == ((ba0_int_p)-1)) && PyErr_Occurred())) __PYX_ERR(2, 1689, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":1690
 *         A = bmi_c.bmi_dapyx_preparation_equation (
 *                 strpoly, self.regchain, strgens, strrels, int (congruence),
 *                 strzstring, self.notation, strnot, 0, 0)             # <<<<<<<<<<<<<<
 *         if bmi_c.bmi_dapyx_is_error (A):
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (A)
 */
  if (unlikely(__pyx_v_strzstring == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
    __PYX_ERR(2, 1690, __pyx_L1_error)
  }
  __pyx_t_12 = __Pyx_PyBytes_AsWritableString(__pyx_v_strzstring); if (unlikely((!__pyx_t_12) && PyErr_Occurred())) __PYX_ERR(2, 1690, __pyx_L1_error)
  __pyx_t_13 = __Pyx_PyObject_AsWritableString(__pyx_v_self->notation); if (unlikely((!__pyx_t_13) && PyErr_Occurred())) __PYX_ERR(2, 1690, __pyx_L1_error)
  __pyx_t_14 = __Pyx_PyObject_AsWritableString(__pyx_v_strnot); if (unlikely((!__pyx_t_14) && PyErr_Occurred())) __PYX_ERR(2, 1690, __pyx_L1_error)

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":1688
 *         strrels = ascii (F._relations ())
 *         strzstring = ascii (zstring)
 *         A = bmi_c.bmi_dapyx_preparation_equation (             # <<<<<<<<<<<<<<
 *                 strpoly, self.regchain, strgens, strrels, int (congruence),
 *                 strzstring, self.notation, strnot, 0, 0)
 */
  __pyx_v_A = bmi_dapyx_preparation_equation(__pyx_t_8, __pyx_v_self->regchain, __pyx_t_9, __pyx_t_10, __pyx_t_11, __pyx_t_12, __pyx_t_13, __pyx_t_14, 0, 0);

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":1691
 *                 strpoly, self.regchain, strgens, strrels, int (congruence),
 *                 strzstring, self.notation, strnot, 0, 0)
 *         if bmi_c.bmi_dapyx_is_error (A):             # <<<<<<<<<<<<<<
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (A)
 *             bmi_c.bmi_balsa_clear_ALGEB (A)
 */
  __pyx_t_5 = (bmi_dapyx_is_error(__pyx_v_A) != 0);
  if (unlikely(__pyx_t_5)) {

    /* "../../bmi/sympy/RegularDifferentialChain.pyx":1692
 *                 strzstring, self.notation, strnot, 0, 0)
 *         if bmi_c.bmi_dapyx_is_error (A):
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (A)             # <<<<<<<<<<<<<<
 *             bmi_c.bmi_balsa_clear_ALGEB (A)
 *             raise RuntimeError (str (mesgerr, 'utf-8'))
 */
    __pyx_t_1 = __Pyx_PyBytes_FromString(bmi_dapyx_mesgerr(__pyx_v_A)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1692, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_v_mesgerr = ((PyObject*)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "../../bmi/sympy/RegularDifferentialChain.pyx":1693
 *         if bmi_c.bmi_dapyx_is_error (A):
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (A)
 *             bmi_c.bmi_balsa_clear_ALGEB (A)             # <<<<<<<<<<<<<<
 *             raise RuntimeError (str (mesgerr, 'utf-8'))
 *         nbz = self.__number_of_equations ()
 */
    bmi_balsa_clear_ALGEB(__pyx_v_A);

    /* "../../bmi/sympy/RegularDifferentialChain.pyx":1694
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (A)
 *             bmi_c.bmi_balsa_clear_ALGEB (A)
 *             raise RuntimeError (str (mesgerr, 'utf-8'))             # <<<<<<<<<<<<<<
 *         nbz = self.__number_of_equations ()
 *         zevdict = self.evdict.copy ()
 */
    __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1694, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_v_mesgerr);
    __Pyx_GIVEREF(__pyx_v_mesgerr);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_mesgerr)) __PYX_ERR(2, 1694, __pyx_L1_error);
    __Pyx_INCREF(__pyx_kp_u_utf_8);
    __Pyx_GIVEREF(__pyx_kp_u_utf_8);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_kp_u_utf_8)) __PYX_ERR(2, 1694, __pyx_L1_error);
    __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)(&PyUnicode_Type)), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1694, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_RuntimeError, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1694, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(2, 1694, __pyx_L1_error)

    /* "../../bmi/sympy/RegularDifferentialChain.pyx":1691
 *                 strpoly, self.regchain, strgens, strrels, int (congruence),
 *                 strzstring, self.notation, strnot, 0, 0)
 *         if bmi_c.bmi_dapyx_is_error (A):             # <<<<<<<<<<<<<<
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (A)
 *             bmi_c.bmi_balsa_clear_ALGEB (A)
 */
  }

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":1695
 *             bmi_c.bmi_balsa_clear_ALGEB (A)
 *             raise RuntimeError (str (mesgerr, 'utf-8'))
 *         nbz = self.__number_of_equations ()             # <<<<<<<<<<<<<<
 *         zevdict = self.evdict.copy ()
 *         for i in range (nbz):
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_RegularDifferentialChain__numbe); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1695, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1695, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_v_nbz = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":1696
 *             raise RuntimeError (str (mesgerr, 'utf-8'))
 *         nbz = self.__number_of_equations ()
 *         zevdict = self.evdict.copy ()             # <<<<<<<<<<<<<<
 *         for i in range (nbz):
 *             zsymb = zstring % (i+1)
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->evdict, __pyx_n_s_copy); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1696, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1696, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_v_zevdict = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":1697
 *         nbz = self.__number_of_equations ()
 *         zevdict = self.evdict.copy ()
 *         for i in range (nbz):             # <<<<<<<<<<<<<<
 *             zsymb = zstring % (i+1)
 *             if self.notation == BMI_IX_Derivative :
 */
  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_range, __pyx_v_nbz); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1697, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
    __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2);
    __pyx_t_15 = 0;
    __pyx_t_16 = NULL;
  } else {
    __pyx_t_15 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1697, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_16 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_16)) __PYX_ERR(2, 1697, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  for (;;) {
    if (likely(!__pyx_t_16)) {
      if (likely(PyList_CheckExact(__pyx_t_2))) {
        {
          Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_2);
          #if !CYTHON_ASSUME_SAFE_MACROS
          if (unlikely((__pyx_temp < 0))) __PYX_ERR(2, 1697, __pyx_L1_error)
          #endif
          if (__pyx_t_15 >= __pyx_temp) break;
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_15); __Pyx_INCREF(__pyx_t_1); __pyx_t_15++; if (unlikely((0 < 0))) __PYX_ERR(2, 1697, __pyx_L1_error)
        #else
        __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_15); __pyx_t_15++; if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1697, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      } else {
        {
          Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_2);
          #if !CYTHON_ASSUME_SAFE_MACROS
          if (unlikely((__pyx_temp < 0))) __PYX_ERR(2, 1697, __pyx_L1_error)
          #endif
          if (__pyx_t_15 >= __pyx_temp) break;
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_15); __Pyx_INCREF(__pyx_t_1); __pyx_t_15++; if (unlikely((0 < 0))) __PYX_ERR(2, 1697, __pyx_L1_error)
        #else
        __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_15); __pyx_t_15++; if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1697, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      }
    } else {
      __pyx_t_1 = __pyx_t_16(__pyx_t_2);
      if (unlikely(!__pyx_t_1)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(2, 1697, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_1);
    }
    __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "../../bmi/sympy/RegularDifferentialChain.pyx":1698
 *         zevdict = self.evdict.copy ()
 *         for i in range (nbz):
 *             zsymb = zstring % (i+1)             # <<<<<<<<<<<<<<
 *             if self.notation == BMI_IX_Derivative :
 *                 zval = sympy.Function (zsymb)
 */
    __pyx_t_1 = __Pyx_PyInt_AddObjC(__pyx_v_i, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1698, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = PyNumber_Remainder(__pyx_v_zstring, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1698, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF_SET(__pyx_v_zsymb, __pyx_t_3);
    __pyx_t_3 = 0;

    /* "../../bmi/sympy/RegularDifferentialChain.pyx":1699
 *         for i in range (nbz):
 *             zsymb = zstring % (i+1)
 *             if self.notation == BMI_IX_Derivative :             # <<<<<<<<<<<<<<
 *                 zval = sympy.Function (zsymb)
 *             else :
 */
    __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v_19DifferentialAlgebra_BMI_IX_Derivative); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1699, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = (__Pyx_PyBytes_Equals(__pyx_v_self->notation, __pyx_t_3, Py_EQ)); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(2, 1699, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (__pyx_t_5) {

      /* "../../bmi/sympy/RegularDifferentialChain.pyx":1700
 *             zsymb = zstring % (i+1)
 *             if self.notation == BMI_IX_Derivative :
 *                 zval = sympy.Function (zsymb)             # <<<<<<<<<<<<<<
 *             else :
 *                 zval = sympy.IndexedBase (zsymb)
 */
      __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_sympy); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1700, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_Function); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 1700, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = NULL;
      __pyx_t_4 = 0;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_6))) {
        __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_6);
        if (likely(__pyx_t_1)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
          __Pyx_INCREF(__pyx_t_1);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_6, function);
          __pyx_t_4 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_v_zsymb};
        __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
        __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1700, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      }
      __Pyx_XDECREF_SET(__pyx_v_zval, __pyx_t_3);
      __pyx_t_3 = 0;

      /* "../../bmi/sympy/RegularDifferentialChain.pyx":1699
 *         for i in range (nbz):
 *             zsymb = zstring % (i+1)
 *             if self.notation == BMI_IX_Derivative :             # <<<<<<<<<<<<<<
 *                 zval = sympy.Function (zsymb)
 *             else :
 */
      goto __pyx_L7;
    }

    /* "../../bmi/sympy/RegularDifferentialChain.pyx":1702
 *                 zval = sympy.Function (zsymb)
 *             else :
 *                 zval = sympy.IndexedBase (zsymb)             # <<<<<<<<<<<<<<
 *             zevdict[zsymb] = zval
 *         newval = ascii (A.value)
 */
    /*else*/ {
      __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_sympy); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 1702, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_IndexedBase); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1702, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_6 = NULL;
      __pyx_t_4 = 0;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_1))) {
        __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_1);
        if (likely(__pyx_t_6)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
          __Pyx_INCREF(__pyx_t_6);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_1, function);
          __pyx_t_4 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_zsymb};
        __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1702, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      }
      __Pyx_XDECREF_SET(__pyx_v_zval, __pyx_t_3);
      __pyx_t_3 = 0;
    }
    __pyx_L7:;

    /* "../../bmi/sympy/RegularDifferentialChain.pyx":1703
 *             else :
 *                 zval = sympy.IndexedBase (zsymb)
 *             zevdict[zsymb] = zval             # <<<<<<<<<<<<<<
 *         newval = ascii (A.value)
 *         newval = b'Eq(' + newval.replace (b'=', b',') + b')'
 */
    if (unlikely((PyObject_SetItem(__pyx_v_zevdict, __pyx_v_zsymb, __pyx_v_zval) < 0))) __PYX_ERR(2, 1703, __pyx_L1_error)

    /* "../../bmi/sympy/RegularDifferentialChain.pyx":1697
 *         nbz = self.__number_of_equations ()
 *         zevdict = self.evdict.copy ()
 *         for i in range (nbz):             # <<<<<<<<<<<<<<
 *             zsymb = zstring % (i+1)
 *             if self.notation == BMI_IX_Derivative :
 */
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":1704
 *                 zval = sympy.IndexedBase (zsymb)
 *             zevdict[zsymb] = zval
 *         newval = ascii (A.value)             # <<<<<<<<<<<<<<
 *         newval = b'Eq(' + newval.replace (b'=', b',') + b')'
 *         result = eval (newval, globals (), zevdict)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_ascii); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1704, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = __Pyx_PyBytes_FromString(__pyx_v_A->value); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1704, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_6 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_1};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1704, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  if (!(likely(PyBytes_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_2))) __PYX_ERR(2, 1704, __pyx_L1_error)
  __pyx_v_newval = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":1705
 *             zevdict[zsymb] = zval
 *         newval = ascii (A.value)
 *         newval = b'Eq(' + newval.replace (b'=', b',') + b')'             # <<<<<<<<<<<<<<
 *         result = eval (newval, globals (), zevdict)
 *         bmi_c.bmi_balsa_clear_ALGEB (A)
 */
  __pyx_t_2 = __Pyx_CallUnboundCMethod2(&__pyx_umethod_PyBytes_Type_replace, __pyx_v_newval, __pyx_kp_b__65, __pyx_kp_b__66); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1705, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyNumber_Add(__pyx_kp_b_Eq, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1705, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyNumber_Add(__pyx_t_3, __pyx_kp_b__67); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1705, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (!(likely(PyBytes_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_2))) __PYX_ERR(2, 1705, __pyx_L1_error)
  __Pyx_DECREF_SET(__pyx_v_newval, ((PyObject*)__pyx_t_2));
  __pyx_t_2 = 0;

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":1706
 *         newval = ascii (A.value)
 *         newval = b'Eq(' + newval.replace (b'=', b',') + b')'
 *         result = eval (newval, globals (), zevdict)             # <<<<<<<<<<<<<<
 *         bmi_c.bmi_balsa_clear_ALGEB (A)
 *         return result
 */
  __pyx_t_2 = __Pyx_Globals(); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1706, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1706, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_v_newval);
  __Pyx_GIVEREF(__pyx_v_newval);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_newval)) __PYX_ERR(2, 1706, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_2);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2)) __PYX_ERR(2, 1706, __pyx_L1_error);
  __Pyx_INCREF(__pyx_v_zevdict);
  __Pyx_GIVEREF(__pyx_v_zevdict);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_zevdict)) __PYX_ERR(2, 1706, __pyx_L1_error);
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_eval, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1706, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_result = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":1707
 *         newval = b'Eq(' + newval.replace (b'=', b',') + b')'
 *         result = eval (newval, globals (), zevdict)
 *         bmi_c.bmi_balsa_clear_ALGEB (A)             # <<<<<<<<<<<<<<
 *         return result
 * 
 */
  bmi_balsa_clear_ALGEB(__pyx_v_A);

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":1708
 *         result = eval (newval, globals (), zevdict)
 *         bmi_c.bmi_balsa_clear_ALGEB (A)
 *         return result             # <<<<<<<<<<<<<<
 * 
 * # __number_of_equations
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_result);
  __pyx_r = __pyx_v_result;
  goto __pyx_L0;

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":1440
 * 
 * # preparation_equation
 *     def preparation_equation (             # <<<<<<<<<<<<<<
 *             self,
 *             polynomial,
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("DifferentialAlgebra.RegularDifferentialChain.preparation_equation", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XDECREF(__pyx_v_nbz);
  __Pyx_XDECREF(__pyx_v_i);
  __Pyx_XDECREF(__pyx_v_zevdict);
  __Pyx_XDECREF(__pyx_v_zsymb);
  __Pyx_XDECREF(__pyx_v_zval);
  __Pyx_XDECREF(__pyx_v_mesgerr);
  __Pyx_XDECREF(__pyx_v_strpoly);
  __Pyx_XDECREF(__pyx_v_strgens);
  __Pyx_XDECREF(__pyx_v_strrels);
  __Pyx_XDECREF(__pyx_v_newval);
  __Pyx_XDECREF(__pyx_v_strzstring);
  __Pyx_XDECREF(__pyx_v_strnot);
  __Pyx_XDECREF((PyObject *)__pyx_v_F);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "../../bmi/sympy/RegularDifferentialChain.pyx":1711
 * 
 * # __number_of_equations
 *     def __number_of_equations (self):             # <<<<<<<<<<<<<<
 *         r"""
 *         The number of equations of a regular differential chain
 */

/* Python wrapper */
static PyObject *__pyx_pw_19DifferentialAlgebra_24RegularDifferentialChain_43_RegularDifferentialChain__number_of_equations(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_19DifferentialAlgebra_24RegularDifferentialChain_42__number_of_equations, "\n        The number of equations of a regular differential chain\n\n        INPUT:\n\n            Nothing\n\n        OUTPUT:\n\n            The number of equations of a regular differential chain\n\n        EXAMPLES:\n\n            >>> from sympy import *\n            >>> from DifferentialAlgebra import *\n            >>> t = var('t')\n            >>> u = indexedbase('u')\n            >>> R = DifferentialRing (derivations = [t], blocks = [u], notation = 'jet')\n            >>> poly = u[t]**2 - 4*u\n            >>> ideal = R.RosenfeldGroebner ([poly])\n            >>> ideal\n            [regular_differential_chain, regular_differential_chain]\n\n            >>> C = ideal [0]\n            >>> C.equations ()\n            [u[t]**2 - 4*u]\n        ");
static PyMethodDef __pyx_mdef_19DifferentialAlgebra_24RegularDifferentialChain_43_RegularDifferentialChain__number_of_equations = {"_RegularDifferentialChain__number_of_equations", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_19DifferentialAlgebra_24RegularDifferentialChain_43_RegularDifferentialChain__number_of_equations, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_19DifferentialAlgebra_24RegularDifferentialChain_42__number_of_equations};
static PyObject *__pyx_pw_19DifferentialAlgebra_24RegularDifferentialChain_43_RegularDifferentialChain__number_of_equations(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_RegularDifferentialChain__number_of_equations (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) {
    __Pyx_RaiseArgtupleInvalid("_RegularDifferentialChain__number_of_equations", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "_RegularDifferentialChain__number_of_equations", 0))) return NULL;
  __pyx_r = __pyx_pf_19DifferentialAlgebra_24RegularDifferentialChain_42__number_of_equations(((struct __pyx_obj_19DifferentialAlgebra_RegularDifferentialChain *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_19DifferentialAlgebra_24RegularDifferentialChain_42__number_of_equations(struct __pyx_obj_19DifferentialAlgebra_RegularDifferentialChain *__pyx_v_self) {
  ALGEB_string __pyx_v_A;
  PyObject *__pyx_v_mesgerr = 0;
  PyObject *__pyx_v_result = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_RegularDifferentialChain__number_of_equations", 1);

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":1743
 *         cdef bytes mesgerr
 *         cdef result
 *         A = bmi_c.bmi_dapyx_number_of_equations (self.regchain)             # <<<<<<<<<<<<<<
 *         if bmi_c.bmi_dapyx_is_error (A):
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (A)
 */
  __pyx_v_A = bmi_dapyx_number_of_equations(__pyx_v_self->regchain);

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":1744
 *         cdef result
 *         A = bmi_c.bmi_dapyx_number_of_equations (self.regchain)
 *         if bmi_c.bmi_dapyx_is_error (A):             # <<<<<<<<<<<<<<
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (A)
 *             bmi_c.bmi_balsa_clear_ALGEB (A)
 */
  __pyx_t_1 = (bmi_dapyx_is_error(__pyx_v_A) != 0);
  if (unlikely(__pyx_t_1)) {

    /* "../../bmi/sympy/RegularDifferentialChain.pyx":1745
 *         A = bmi_c.bmi_dapyx_number_of_equations (self.regchain)
 *         if bmi_c.bmi_dapyx_is_error (A):
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (A)             # <<<<<<<<<<<<<<
 *             bmi_c.bmi_balsa_clear_ALGEB (A)
 *             raise RuntimeError (str (mesgerr, 'utf-8'))
 */
    __pyx_t_2 = __Pyx_PyBytes_FromString(bmi_dapyx_mesgerr(__pyx_v_A)); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1745, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_mesgerr = ((PyObject*)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "../../bmi/sympy/RegularDifferentialChain.pyx":1746
 *         if bmi_c.bmi_dapyx_is_error (A):
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (A)
 *             bmi_c.bmi_balsa_clear_ALGEB (A)             # <<<<<<<<<<<<<<
 *             raise RuntimeError (str (mesgerr, 'utf-8'))
 *         result = eval (A.value, globals (), self.evdict)
 */
    bmi_balsa_clear_ALGEB(__pyx_v_A);

    /* "../../bmi/sympy/RegularDifferentialChain.pyx":1747
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (A)
 *             bmi_c.bmi_balsa_clear_ALGEB (A)
 *             raise RuntimeError (str (mesgerr, 'utf-8'))             # <<<<<<<<<<<<<<
 *         result = eval (A.value, globals (), self.evdict)
 *         bmi_c.bmi_balsa_clear_ALGEB (A)
 */
    __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1747, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_v_mesgerr);
    __Pyx_GIVEREF(__pyx_v_mesgerr);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_mesgerr)) __PYX_ERR(2, 1747, __pyx_L1_error);
    __Pyx_INCREF(__pyx_kp_u_utf_8);
    __Pyx_GIVEREF(__pyx_kp_u_utf_8);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_kp_u_utf_8)) __PYX_ERR(2, 1747, __pyx_L1_error);
    __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)(&PyUnicode_Type)), __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1747, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_RuntimeError, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1747, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(2, 1747, __pyx_L1_error)

    /* "../../bmi/sympy/RegularDifferentialChain.pyx":1744
 *         cdef result
 *         A = bmi_c.bmi_dapyx_number_of_equations (self.regchain)
 *         if bmi_c.bmi_dapyx_is_error (A):             # <<<<<<<<<<<<<<
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (A)
 *             bmi_c.bmi_balsa_clear_ALGEB (A)
 */
  }

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":1748
 *             bmi_c.bmi_balsa_clear_ALGEB (A)
 *             raise RuntimeError (str (mesgerr, 'utf-8'))
 *         result = eval (A.value, globals (), self.evdict)             # <<<<<<<<<<<<<<
 *         bmi_c.bmi_balsa_clear_ALGEB (A)
 *         return result
 */
  __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v_A->value); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1748, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_Globals(); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1748, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1748, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_2);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2)) __PYX_ERR(2, 1748, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_3);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3)) __PYX_ERR(2, 1748, __pyx_L1_error);
  __Pyx_INCREF(__pyx_v_self->evdict);
  __Pyx_GIVEREF(__pyx_v_self->evdict);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_v_self->evdict)) __PYX_ERR(2, 1748, __pyx_L1_error);
  __pyx_t_2 = 0;
  __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_eval, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1748, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_v_result = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":1749
 *             raise RuntimeError (str (mesgerr, 'utf-8'))
 *         result = eval (A.value, globals (), self.evdict)
 *         bmi_c.bmi_balsa_clear_ALGEB (A)             # <<<<<<<<<<<<<<
 *         return result
 * 
 */
  bmi_balsa_clear_ALGEB(__pyx_v_A);

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":1750
 *         result = eval (A.value, globals (), self.evdict)
 *         bmi_c.bmi_balsa_clear_ALGEB (A)
 *         return result             # <<<<<<<<<<<<<<
 * 
 * # RosenfeldGroebner
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_result);
  __pyx_r = __pyx_v_result;
  goto __pyx_L0;

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":1711
 * 
 * # __number_of_equations
 *     def __number_of_equations (self):             # <<<<<<<<<<<<<<
 *         r"""
 *         The number of equations of a regular differential chain
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("DifferentialAlgebra.RegularDifferentialChain._RegularDifferentialChain__number_of_equations", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_mesgerr);
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "../../bmi/sympy/RegularDifferentialChain.pyx":1753
 * 
 * # RosenfeldGroebner
 *     def RosenfeldGroebner (             # <<<<<<<<<<<<<<
 *             self,
 *             equations,
 */

/* Python wrapper */
static PyObject *__pyx_pw_19DifferentialAlgebra_24RegularDifferentialChain_45RosenfeldGroebner(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_19DifferentialAlgebra_24RegularDifferentialChain_44RosenfeldGroebner, "\n        Extend a regular differential chain using RosenfeldGroebner\n\n        INPUT:\n\n            `equations`  -- a list of differential polynomials, \n                              polynomial equations or inequations\n            `basefield`  -- (default: None) a BaseFieldExtension\n            `attributes` -- (default: ['differential', 'autoreduced', \n                              'primitive', 'squarefree', 'normalized', \n                              'coherent']) a list of strings\n            `singsol`    -- (default: 'all') a string\n            `dimlb`      -- (default: 'safecase') a string\n            `notation`   -- (default: 'undefined') a string\n            `timeout`    -- (default: 0) a nonnegative integer\n            `memout`     -- (default: 0) a nonnegative integer\n\n        OUTPUT:\n\n            A list of regular differential chains.\n\n            Let A be the set of differential polynomials of `self`\n            and I the differential ideal that it defines.  Let S be\n            the set of the initials of A, plus its separants if A is\n            differential or squarefree.\n\n            This variant enlarges `equations` with A = 0, S != 0\n            before executing the classical RosenfeldGroebner method.\n            The output ideals all contain the ideal I.\n\n        EXAMPLES:\n\n            >>> from sympy import *\n            >>> from DifferentialAlgebra import *\n            >>> init_printing (use_unicode = False, num_columns = 60)\n\n            >>> x = var('x')\n            >>> y,z = indexedbase ('y,z')\n            >>> R = DifferentialRing (derivations = [x], \n            ...             blocks = [z,y], notation = 'jet')\n\n            >>> f = y[x]**2 - 4*y\n            >>> g = z[x]**2 - y*z\n\n        Let us start with a single regular differential chain made of\n        f and extend it using g:\n\n            >>> C = RegularDifferentialChain ([f], R)\n            >>> ideal = C.RosenfeldGroebner ([g])\n            >>> ""ideal\n            [regular_differential_chain, regular_differential_chain]\n\n        The above output contains one less regular differential chain\n        than the one of the following call to the classical method:\n\n            >>> ideal = R.RosenfeldGroebner ([f,g])\n            >>> ideal\n            [regular_differential_chain, regular_differential_chain, r >\n            |  \n            > egular_differential_chain]\n        ");
static PyMethodDef __pyx_mdef_19DifferentialAlgebra_24RegularDifferentialChain_45RosenfeldGroebner = {"RosenfeldGroebner", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_19DifferentialAlgebra_24RegularDifferentialChain_45RosenfeldGroebner, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_19DifferentialAlgebra_24RegularDifferentialChain_44RosenfeldGroebner};
static PyObject *__pyx_pw_19DifferentialAlgebra_24RegularDifferentialChain_45RosenfeldGroebner(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_equations = 0;
  struct __pyx_obj_19DifferentialAlgebra_BaseFieldExtension *__pyx_v_basefield = 0;
  PyObject *__pyx_v_attributes = 0;
  PyObject *__pyx_v_singsol = 0;
  PyObject *__pyx_v_dimlb = 0;
  PyObject *__pyx_v_notation = 0;
  int __pyx_v_timeout;
  int __pyx_v_memout;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[8] = {0,0,0,0,0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("RosenfeldGroebner (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_equations,&__pyx_n_s_basefield,&__pyx_n_s_attributes,&__pyx_n_s_singsol,&__pyx_n_s_dimlb,&__pyx_n_s_notation,&__pyx_n_s_timeout,&__pyx_n_s_memout,0};

    /* "../../bmi/sympy/RegularDifferentialChain.pyx":1756
 *             self,
 *             equations,
 *             BaseFieldExtension basefield = None,             # <<<<<<<<<<<<<<
 *             list attributes = [
 *                     'differential', 'autoreduced', 'primitive',
 */
    values[1] = __Pyx_Arg_NewRef_FASTCALL((PyObject *)((struct __pyx_obj_19DifferentialAlgebra_BaseFieldExtension *)Py_None));
    values[2] = __Pyx_Arg_NewRef_FASTCALL(__pyx_k__68);
    values[3] = __Pyx_Arg_NewRef_FASTCALL(__pyx_k__69);
    values[4] = __Pyx_Arg_NewRef_FASTCALL(__pyx_k__70);
    values[5] = __Pyx_Arg_NewRef_FASTCALL(__pyx_k__71);
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  8: values[7] = __Pyx_Arg_FASTCALL(__pyx_args, 7);
        CYTHON_FALLTHROUGH;
        case  7: values[6] = __Pyx_Arg_FASTCALL(__pyx_args, 6);
        CYTHON_FALLTHROUGH;
        case  6: values[5] = __Pyx_Arg_FASTCALL(__pyx_args, 5);
        CYTHON_FALLTHROUGH;
        case  5: values[4] = __Pyx_Arg_FASTCALL(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_equations)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 1753, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_basefield);
          if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 1753, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_attributes);
          if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 1753, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_singsol);
          if (value) { values[3] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 1753, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_dimlb);
          if (value) { values[4] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 1753, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  5:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_notation);
          if (value) { values[5] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 1753, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  6:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_timeout);
          if (value) { values[6] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 1753, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  7:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_memout);
          if (value) { values[7] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 1753, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "RosenfeldGroebner") < 0)) __PYX_ERR(2, 1753, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  8: values[7] = __Pyx_Arg_FASTCALL(__pyx_args, 7);
        CYTHON_FALLTHROUGH;
        case  7: values[6] = __Pyx_Arg_FASTCALL(__pyx_args, 6);
        CYTHON_FALLTHROUGH;
        case  6: values[5] = __Pyx_Arg_FASTCALL(__pyx_args, 5);
        CYTHON_FALLTHROUGH;
        case  5: values[4] = __Pyx_Arg_FASTCALL(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_equations = values[0];
    __pyx_v_basefield = ((struct __pyx_obj_19DifferentialAlgebra_BaseFieldExtension *)values[1]);
    __pyx_v_attributes = ((PyObject*)values[2]);
    __pyx_v_singsol = values[3];
    __pyx_v_dimlb = values[4];
    __pyx_v_notation = values[5];
    if (values[6]) {
      __pyx_v_timeout = __Pyx_PyInt_As_int(values[6]); if (unlikely((__pyx_v_timeout == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 1763, __pyx_L3_error)
    } else {
      __pyx_v_timeout = ((int)0);
    }
    if (values[7]) {
      __pyx_v_memout = __Pyx_PyInt_As_int(values[7]); if (unlikely((__pyx_v_memout == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 1764, __pyx_L3_error)
    } else {
      __pyx_v_memout = ((int)0);
    }
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("RosenfeldGroebner", 0, 1, 8, __pyx_nargs); __PYX_ERR(2, 1753, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("DifferentialAlgebra.RegularDifferentialChain.RosenfeldGroebner", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_basefield), __pyx_ptype_19DifferentialAlgebra_BaseFieldExtension, 1, "basefield", 0))) __PYX_ERR(2, 1756, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_attributes), (&PyList_Type), 1, "attributes", 1))) __PYX_ERR(2, 1757, __pyx_L1_error)
  __pyx_r = __pyx_pf_19DifferentialAlgebra_24RegularDifferentialChain_44RosenfeldGroebner(((struct __pyx_obj_19DifferentialAlgebra_RegularDifferentialChain *)__pyx_v_self), __pyx_v_equations, __pyx_v_basefield, __pyx_v_attributes, __pyx_v_singsol, __pyx_v_dimlb, __pyx_v_notation, __pyx_v_timeout, __pyx_v_memout);

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":1753
 * 
 * # RosenfeldGroebner
 *     def RosenfeldGroebner (             # <<<<<<<<<<<<<<
 *             self,
 *             equations,
 */

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_19DifferentialAlgebra_24RegularDifferentialChain_44RosenfeldGroebner(struct __pyx_obj_19DifferentialAlgebra_RegularDifferentialChain *__pyx_v_self, PyObject *__pyx_v_equations, struct __pyx_obj_19DifferentialAlgebra_BaseFieldExtension *__pyx_v_basefield, PyObject *__pyx_v_attributes, PyObject *__pyx_v_singsol, PyObject *__pyx_v_dimlb, PyObject *__pyx_v_notation, int __pyx_v_timeout, int __pyx_v_memout) {
  PyObject *__pyx_v_result = 0;
  PyObject *__pyx_v_eqns = 0;
  PyObject *__pyx_v_ineq = 0;
  struct __pyx_obj_19DifferentialAlgebra_BaseFieldExtension *__pyx_v_F = 0;
  struct __pyx_obj_19DifferentialAlgebra_RegularDifferentialChain *__pyx_v_C = 0;
  ALGEB_list __pyx_v_L;
  PyObject *__pyx_v_mesgerr = 0;
  PyObject *__pyx_v_streqns = 0;
  PyObject *__pyx_v_strineq = 0;
  PyObject *__pyx_v_strgens = 0;
  PyObject *__pyx_v_strrels = 0;
  PyObject *__pyx_v_strattr = 0;
  PyObject *__pyx_v_strsingsol = 0;
  PyObject *__pyx_v_strdimlb = 0;
  PyObject *__pyx_v_strnot = 0;
  ba0_int_p __pyx_v_i;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  unsigned int __pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *(*__pyx_t_7)(PyObject *);
  PyObject *__pyx_t_8 = NULL;
  char *__pyx_t_9;
  char *__pyx_t_10;
  char *__pyx_t_11;
  char *__pyx_t_12;
  char *__pyx_t_13;
  char *__pyx_t_14;
  char *__pyx_t_15;
  char *__pyx_t_16;
  char *__pyx_t_17;
  ba0_int_p __pyx_t_18;
  ba0_int_p __pyx_t_19;
  ba0_int_p __pyx_t_20;
  int __pyx_t_21;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("RosenfeldGroebner", 1);

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":1833
 *         cdef bytes strsingsol, strdimlb
 *         cdef strnot
 *         strnot = self.__process_notation (notation)             # <<<<<<<<<<<<<<
 *         if isinstance (equations, list):
 *             eqns, ineq = self.dring._process_equations (equations, strnot)
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_RegularDifferentialChain__proce); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1833, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_notation};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1833, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_v_strnot = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":1834
 *         cdef strnot
 *         strnot = self.__process_notation (notation)
 *         if isinstance (equations, list):             # <<<<<<<<<<<<<<
 *             eqns, ineq = self.dring._process_equations (equations, strnot)
 *         else:
 */
  __pyx_t_5 = PyList_Check(__pyx_v_equations); 
  if (__pyx_t_5) {

    /* "../../bmi/sympy/RegularDifferentialChain.pyx":1835
 *         strnot = self.__process_notation (notation)
 *         if isinstance (equations, list):
 *             eqns, ineq = self.dring._process_equations (equations, strnot)             # <<<<<<<<<<<<<<
 *         else:
 *             eqns, ineq = self.dring._process_equations ([equations], strnot)
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->dring), __pyx_n_s_process_equations); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1835, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = NULL;
    __pyx_t_4 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
        __pyx_t_4 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_v_equations, __pyx_v_strnot};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 2+__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1835, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
      PyObject* sequence = __pyx_t_1;
      Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
      if (unlikely(size != 2)) {
        if (size > 2) __Pyx_RaiseTooManyValuesError(2);
        else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
        __PYX_ERR(2, 1835, __pyx_L1_error)
      }
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      if (likely(PyTuple_CheckExact(sequence))) {
        __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); 
        __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); 
      } else {
        __pyx_t_2 = PyList_GET_ITEM(sequence, 0); 
        __pyx_t_3 = PyList_GET_ITEM(sequence, 1); 
      }
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      #else
      __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1835, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1835, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    } else {
      Py_ssize_t index = -1;
      __pyx_t_6 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 1835, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_7 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_6);
      index = 0; __pyx_t_2 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_2)) goto __pyx_L4_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_2);
      index = 1; __pyx_t_3 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_3)) goto __pyx_L4_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_3);
      if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_6), 2) < 0) __PYX_ERR(2, 1835, __pyx_L1_error)
      __pyx_t_7 = NULL;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      goto __pyx_L5_unpacking_done;
      __pyx_L4_unpacking_failed:;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_7 = NULL;
      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
      __PYX_ERR(2, 1835, __pyx_L1_error)
      __pyx_L5_unpacking_done:;
    }
    if (!(likely(PyList_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None) || __Pyx_RaiseUnexpectedTypeError("list", __pyx_t_2))) __PYX_ERR(2, 1835, __pyx_L1_error)
    if (!(likely(PyList_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None) || __Pyx_RaiseUnexpectedTypeError("list", __pyx_t_3))) __PYX_ERR(2, 1835, __pyx_L1_error)
    __pyx_v_eqns = ((PyObject*)__pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_v_ineq = ((PyObject*)__pyx_t_3);
    __pyx_t_3 = 0;

    /* "../../bmi/sympy/RegularDifferentialChain.pyx":1834
 *         cdef strnot
 *         strnot = self.__process_notation (notation)
 *         if isinstance (equations, list):             # <<<<<<<<<<<<<<
 *             eqns, ineq = self.dring._process_equations (equations, strnot)
 *         else:
 */
    goto __pyx_L3;
  }

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":1837
 *             eqns, ineq = self.dring._process_equations (equations, strnot)
 *         else:
 *             eqns, ineq = self.dring._process_equations ([equations], strnot)             # <<<<<<<<<<<<<<
 *         streqns = ascii (eqns)
 *         strineq = ascii (ineq)
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->dring), __pyx_n_s_process_equations); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1837, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1837, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_v_equations);
    __Pyx_GIVEREF(__pyx_v_equations);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 0, __pyx_v_equations)) __PYX_ERR(2, 1837, __pyx_L1_error);
    __pyx_t_6 = NULL;
    __pyx_t_4 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
        __pyx_t_4 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[3] = {__pyx_t_6, __pyx_t_2, __pyx_v_strnot};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 2+__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1837, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
    if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
      PyObject* sequence = __pyx_t_1;
      Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
      if (unlikely(size != 2)) {
        if (size > 2) __Pyx_RaiseTooManyValuesError(2);
        else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
        __PYX_ERR(2, 1837, __pyx_L1_error)
      }
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      if (likely(PyTuple_CheckExact(sequence))) {
        __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); 
        __pyx_t_2 = PyTuple_GET_ITEM(sequence, 1); 
      } else {
        __pyx_t_3 = PyList_GET_ITEM(sequence, 0); 
        __pyx_t_2 = PyList_GET_ITEM(sequence, 1); 
      }
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      #else
      __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1837, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_2 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1837, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    } else {
      Py_ssize_t index = -1;
      __pyx_t_6 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 1837, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_7 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_6);
      index = 0; __pyx_t_3 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_3)) goto __pyx_L6_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_3);
      index = 1; __pyx_t_2 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_2)) goto __pyx_L6_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_2);
      if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_6), 2) < 0) __PYX_ERR(2, 1837, __pyx_L1_error)
      __pyx_t_7 = NULL;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      goto __pyx_L7_unpacking_done;
      __pyx_L6_unpacking_failed:;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_7 = NULL;
      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
      __PYX_ERR(2, 1837, __pyx_L1_error)
      __pyx_L7_unpacking_done:;
    }
    if (!(likely(PyList_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None) || __Pyx_RaiseUnexpectedTypeError("list", __pyx_t_3))) __PYX_ERR(2, 1837, __pyx_L1_error)
    if (!(likely(PyList_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None) || __Pyx_RaiseUnexpectedTypeError("list", __pyx_t_2))) __PYX_ERR(2, 1837, __pyx_L1_error)
    __pyx_v_eqns = ((PyObject*)__pyx_t_3);
    __pyx_t_3 = 0;
    __pyx_v_ineq = ((PyObject*)__pyx_t_2);
    __pyx_t_2 = 0;
  }
  __pyx_L3:;

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":1838
 *         else:
 *             eqns, ineq = self.dring._process_equations ([equations], strnot)
 *         streqns = ascii (eqns)             # <<<<<<<<<<<<<<
 *         strineq = ascii (ineq)
 *         strattr = ascii (attributes)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ascii); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1838, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_eqns};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1838, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  if (!(likely(PyBytes_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_1))) __PYX_ERR(2, 1838, __pyx_L1_error)
  __pyx_v_streqns = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":1839
 *             eqns, ineq = self.dring._process_equations ([equations], strnot)
 *         streqns = ascii (eqns)
 *         strineq = ascii (ineq)             # <<<<<<<<<<<<<<
 *         strattr = ascii (attributes)
 *         strattr = strattr.replace (b"'", b"")
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ascii); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1839, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_ineq};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1839, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  if (!(likely(PyBytes_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_1))) __PYX_ERR(2, 1839, __pyx_L1_error)
  __pyx_v_strineq = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":1840
 *         streqns = ascii (eqns)
 *         strineq = ascii (ineq)
 *         strattr = ascii (attributes)             # <<<<<<<<<<<<<<
 *         strattr = strattr.replace (b"'", b"")
 *         strsingsol = ascii (singsol)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ascii); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1840, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_attributes};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1840, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  if (!(likely(PyBytes_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_1))) __PYX_ERR(2, 1840, __pyx_L1_error)
  __pyx_v_strattr = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":1841
 *         strineq = ascii (ineq)
 *         strattr = ascii (attributes)
 *         strattr = strattr.replace (b"'", b"")             # <<<<<<<<<<<<<<
 *         strsingsol = ascii (singsol)
 *         strdimlb = ascii (dimlb)
 */
  __pyx_t_1 = __Pyx_CallUnboundCMethod2(&__pyx_umethod_PyBytes_Type_replace, __pyx_v_strattr, __pyx_kp_b__6, __pyx_kp_b__7); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1841, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyBytes_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_1))) __PYX_ERR(2, 1841, __pyx_L1_error)
  __Pyx_DECREF_SET(__pyx_v_strattr, ((PyObject*)__pyx_t_1));
  __pyx_t_1 = 0;

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":1842
 *         strattr = ascii (attributes)
 *         strattr = strattr.replace (b"'", b"")
 *         strsingsol = ascii (singsol)             # <<<<<<<<<<<<<<
 *         strdimlb = ascii (dimlb)
 *         if basefield == None:
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ascii); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1842, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_singsol};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1842, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  if (!(likely(PyBytes_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_1))) __PYX_ERR(2, 1842, __pyx_L1_error)
  __pyx_v_strsingsol = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":1843
 *         strattr = strattr.replace (b"'", b"")
 *         strsingsol = ascii (singsol)
 *         strdimlb = ascii (dimlb)             # <<<<<<<<<<<<<<
 *         if basefield == None:
 *             F = BaseFieldExtension ()
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ascii); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1843, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_dimlb};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1843, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  if (!(likely(PyBytes_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_1))) __PYX_ERR(2, 1843, __pyx_L1_error)
  __pyx_v_strdimlb = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":1844
 *         strsingsol = ascii (singsol)
 *         strdimlb = ascii (dimlb)
 *         if basefield == None:             # <<<<<<<<<<<<<<
 *             F = BaseFieldExtension ()
 *         else:
 */
  __pyx_t_1 = PyObject_RichCompare(((PyObject *)__pyx_v_basefield), Py_None, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1844, __pyx_L1_error)
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(2, 1844, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_5) {

    /* "../../bmi/sympy/RegularDifferentialChain.pyx":1845
 *         strdimlb = ascii (dimlb)
 *         if basefield == None:
 *             F = BaseFieldExtension ()             # <<<<<<<<<<<<<<
 *         else:
 *             F = basefield
 */
    __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_19DifferentialAlgebra_BaseFieldExtension)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1845, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_v_F = ((struct __pyx_obj_19DifferentialAlgebra_BaseFieldExtension *)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "../../bmi/sympy/RegularDifferentialChain.pyx":1844
 *         strsingsol = ascii (singsol)
 *         strdimlb = ascii (dimlb)
 *         if basefield == None:             # <<<<<<<<<<<<<<
 *             F = BaseFieldExtension ()
 *         else:
 */
    goto __pyx_L8;
  }

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":1847
 *             F = BaseFieldExtension ()
 *         else:
 *             F = basefield             # <<<<<<<<<<<<<<
 * # It is important to remove quotes around range indexed groups otherwise
 * #   they will be interpreted as plain strings
 */
  /*else*/ {
    __Pyx_INCREF((PyObject *)__pyx_v_basefield);
    __pyx_v_F = __pyx_v_basefield;
  }
  __pyx_L8:;

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":1850
 * # It is important to remove quotes around range indexed groups otherwise
 * #   they will be interpreted as plain strings
 *         strgens = ascii (F.generators ())             # <<<<<<<<<<<<<<
 *         strgens = strgens.replace (b"'", b"")
 *         strrels = ascii (F._relations ())
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ascii); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1850, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_F), __pyx_n_s_generators); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 1850, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_8 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_6);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_6, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_8, NULL};
    __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1850, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  }
  __pyx_t_6 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1850, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  if (!(likely(PyBytes_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_1))) __PYX_ERR(2, 1850, __pyx_L1_error)
  __pyx_v_strgens = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":1851
 * #   they will be interpreted as plain strings
 *         strgens = ascii (F.generators ())
 *         strgens = strgens.replace (b"'", b"")             # <<<<<<<<<<<<<<
 *         strrels = ascii (F._relations ())
 *         L = bmi_c.bmi_dapyx_RosenfeldGroebner (
 */
  __pyx_t_1 = __Pyx_CallUnboundCMethod2(&__pyx_umethod_PyBytes_Type_replace, __pyx_v_strgens, __pyx_kp_b__6, __pyx_kp_b__7); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1851, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyBytes_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_1))) __PYX_ERR(2, 1851, __pyx_L1_error)
  __Pyx_DECREF_SET(__pyx_v_strgens, ((PyObject*)__pyx_t_1));
  __pyx_t_1 = 0;

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":1852
 *         strgens = ascii (F.generators ())
 *         strgens = strgens.replace (b"'", b"")
 *         strrels = ascii (F._relations ())             # <<<<<<<<<<<<<<
 *         L = bmi_c.bmi_dapyx_RosenfeldGroebner (
 *                     streqns, strineq, strgens, strrels,
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ascii); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1852, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_F), __pyx_n_s_relations); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 1852, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_8 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_6);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_6, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_8, NULL};
    __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1852, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  }
  __pyx_t_6 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1852, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  if (!(likely(PyBytes_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_1))) __PYX_ERR(2, 1852, __pyx_L1_error)
  __pyx_v_strrels = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":1854
 *         strrels = ascii (F._relations ())
 *         L = bmi_c.bmi_dapyx_RosenfeldGroebner (
 *                     streqns, strineq, strgens, strrels,             # <<<<<<<<<<<<<<
 *                     strattr, self.regchain, strsingsol, strdimlb, 1,
 *                     self.notation, strnot, timeout, memout)
 */
  if (unlikely(__pyx_v_streqns == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
    __PYX_ERR(2, 1854, __pyx_L1_error)
  }
  __pyx_t_9 = __Pyx_PyBytes_AsWritableString(__pyx_v_streqns); if (unlikely((!__pyx_t_9) && PyErr_Occurred())) __PYX_ERR(2, 1854, __pyx_L1_error)
  if (unlikely(__pyx_v_strineq == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
    __PYX_ERR(2, 1854, __pyx_L1_error)
  }
  __pyx_t_10 = __Pyx_PyBytes_AsWritableString(__pyx_v_strineq); if (unlikely((!__pyx_t_10) && PyErr_Occurred())) __PYX_ERR(2, 1854, __pyx_L1_error)
  if (unlikely(__pyx_v_strgens == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
    __PYX_ERR(2, 1854, __pyx_L1_error)
  }
  __pyx_t_11 = __Pyx_PyBytes_AsWritableString(__pyx_v_strgens); if (unlikely((!__pyx_t_11) && PyErr_Occurred())) __PYX_ERR(2, 1854, __pyx_L1_error)
  if (unlikely(__pyx_v_strrels == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
    __PYX_ERR(2, 1854, __pyx_L1_error)
  }
  __pyx_t_12 = __Pyx_PyBytes_AsWritableString(__pyx_v_strrels); if (unlikely((!__pyx_t_12) && PyErr_Occurred())) __PYX_ERR(2, 1854, __pyx_L1_error)

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":1855
 *         L = bmi_c.bmi_dapyx_RosenfeldGroebner (
 *                     streqns, strineq, strgens, strrels,
 *                     strattr, self.regchain, strsingsol, strdimlb, 1,             # <<<<<<<<<<<<<<
 *                     self.notation, strnot, timeout, memout)
 *         if bmi_c.bmi_dapyx_is_error (L):
 */
  if (unlikely(__pyx_v_strattr == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
    __PYX_ERR(2, 1855, __pyx_L1_error)
  }
  __pyx_t_13 = __Pyx_PyBytes_AsWritableString(__pyx_v_strattr); if (unlikely((!__pyx_t_13) && PyErr_Occurred())) __PYX_ERR(2, 1855, __pyx_L1_error)
  if (unlikely(__pyx_v_strsingsol == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
    __PYX_ERR(2, 1855, __pyx_L1_error)
  }
  __pyx_t_14 = __Pyx_PyBytes_AsWritableString(__pyx_v_strsingsol); if (unlikely((!__pyx_t_14) && PyErr_Occurred())) __PYX_ERR(2, 1855, __pyx_L1_error)
  if (unlikely(__pyx_v_strdimlb == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
    __PYX_ERR(2, 1855, __pyx_L1_error)
  }
  __pyx_t_15 = __Pyx_PyBytes_AsWritableString(__pyx_v_strdimlb); if (unlikely((!__pyx_t_15) && PyErr_Occurred())) __PYX_ERR(2, 1855, __pyx_L1_error)

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":1856
 *                     streqns, strineq, strgens, strrels,
 *                     strattr, self.regchain, strsingsol, strdimlb, 1,
 *                     self.notation, strnot, timeout, memout)             # <<<<<<<<<<<<<<
 *         if bmi_c.bmi_dapyx_is_error (L):
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (L)
 */
  __pyx_t_16 = __Pyx_PyObject_AsWritableString(__pyx_v_self->notation); if (unlikely((!__pyx_t_16) && PyErr_Occurred())) __PYX_ERR(2, 1856, __pyx_L1_error)
  __pyx_t_17 = __Pyx_PyObject_AsWritableString(__pyx_v_strnot); if (unlikely((!__pyx_t_17) && PyErr_Occurred())) __PYX_ERR(2, 1856, __pyx_L1_error)

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":1853
 *         strgens = strgens.replace (b"'", b"")
 *         strrels = ascii (F._relations ())
 *         L = bmi_c.bmi_dapyx_RosenfeldGroebner (             # <<<<<<<<<<<<<<
 *                     streqns, strineq, strgens, strrels,
 *                     strattr, self.regchain, strsingsol, strdimlb, 1,
 */
  __pyx_v_L = bmi_dapyx_RosenfeldGroebner(__pyx_t_9, __pyx_t_10, __pyx_t_11, __pyx_t_12, __pyx_t_13, __pyx_v_self->regchain, __pyx_t_14, __pyx_t_15, 1, __pyx_t_16, __pyx_t_17, __pyx_v_timeout, __pyx_v_memout);

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":1857
 *                     strattr, self.regchain, strsingsol, strdimlb, 1,
 *                     self.notation, strnot, timeout, memout)
 *         if bmi_c.bmi_dapyx_is_error (L):             # <<<<<<<<<<<<<<
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (L)
 *             bmi_c.bmi_balsa_clear_ALGEB (L)
 */
  __pyx_t_5 = (bmi_dapyx_is_error(__pyx_v_L) != 0);
  if (unlikely(__pyx_t_5)) {

    /* "../../bmi/sympy/RegularDifferentialChain.pyx":1858
 *                     self.notation, strnot, timeout, memout)
 *         if bmi_c.bmi_dapyx_is_error (L):
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (L)             # <<<<<<<<<<<<<<
 *             bmi_c.bmi_balsa_clear_ALGEB (L)
 *             raise RuntimeError (str (mesgerr, 'utf-8'))
 */
    __pyx_t_1 = __Pyx_PyBytes_FromString(bmi_dapyx_mesgerr(__pyx_v_L)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1858, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_v_mesgerr = ((PyObject*)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "../../bmi/sympy/RegularDifferentialChain.pyx":1859
 *         if bmi_c.bmi_dapyx_is_error (L):
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (L)
 *             bmi_c.bmi_balsa_clear_ALGEB (L)             # <<<<<<<<<<<<<<
 *             raise RuntimeError (str (mesgerr, 'utf-8'))
 *         result = []
 */
    bmi_balsa_clear_ALGEB(__pyx_v_L);

    /* "../../bmi/sympy/RegularDifferentialChain.pyx":1860
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (L)
 *             bmi_c.bmi_balsa_clear_ALGEB (L)
 *             raise RuntimeError (str (mesgerr, 'utf-8'))             # <<<<<<<<<<<<<<
 *         result = []
 *         for i in range (1, L.value.size) :
 */
    __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1860, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_v_mesgerr);
    __Pyx_GIVEREF(__pyx_v_mesgerr);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_mesgerr)) __PYX_ERR(2, 1860, __pyx_L1_error);
    __Pyx_INCREF(__pyx_kp_u_utf_8);
    __Pyx_GIVEREF(__pyx_kp_u_utf_8);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_kp_u_utf_8)) __PYX_ERR(2, 1860, __pyx_L1_error);
    __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)(&PyUnicode_Type)), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1860, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_RuntimeError, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1860, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(2, 1860, __pyx_L1_error)

    /* "../../bmi/sympy/RegularDifferentialChain.pyx":1857
 *                     strattr, self.regchain, strsingsol, strdimlb, 1,
 *                     self.notation, strnot, timeout, memout)
 *         if bmi_c.bmi_dapyx_is_error (L):             # <<<<<<<<<<<<<<
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (L)
 *             bmi_c.bmi_balsa_clear_ALGEB (L)
 */
  }

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":1861
 *             bmi_c.bmi_balsa_clear_ALGEB (L)
 *             raise RuntimeError (str (mesgerr, 'utf-8'))
 *         result = []             # <<<<<<<<<<<<<<
 *         for i in range (1, L.value.size) :
 *             C = RegularDifferentialChain.__new__ (RegularDifferentialChain)
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1861, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_result = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":1862
 *             raise RuntimeError (str (mesgerr, 'utf-8'))
 *         result = []
 *         for i in range (1, L.value.size) :             # <<<<<<<<<<<<<<
 *             C = RegularDifferentialChain.__new__ (RegularDifferentialChain)
 *             C.dring = self.dring
 */
  __pyx_t_18 = __pyx_v_L->value->size;
  __pyx_t_19 = __pyx_t_18;
  for (__pyx_t_20 = 1; __pyx_t_20 < __pyx_t_19; __pyx_t_20+=1) {
    __pyx_v_i = __pyx_t_20;

    /* "../../bmi/sympy/RegularDifferentialChain.pyx":1863
 *         result = []
 *         for i in range (1, L.value.size) :
 *             C = RegularDifferentialChain.__new__ (RegularDifferentialChain)             # <<<<<<<<<<<<<<
 *             C.dring = self.dring
 *             C.notation = strnot
 */
    __pyx_t_1 = ((PyObject *)__pyx_tp_new_19DifferentialAlgebra_RegularDifferentialChain(((PyTypeObject *)__pyx_ptype_19DifferentialAlgebra_RegularDifferentialChain), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1863, __pyx_L1_error)
    __Pyx_GOTREF((PyObject *)__pyx_t_1);
    __Pyx_XDECREF_SET(__pyx_v_C, ((struct __pyx_obj_19DifferentialAlgebra_RegularDifferentialChain *)__pyx_t_1));
    __pyx_t_1 = 0;

    /* "../../bmi/sympy/RegularDifferentialChain.pyx":1864
 *         for i in range (1, L.value.size) :
 *             C = RegularDifferentialChain.__new__ (RegularDifferentialChain)
 *             C.dring = self.dring             # <<<<<<<<<<<<<<
 *             C.notation = strnot
 *             C.evdict = self.evdict
 */
    __pyx_t_1 = ((PyObject *)__pyx_v_self->dring);
    __Pyx_INCREF(__pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_1);
    __Pyx_GOTREF((PyObject *)__pyx_v_C->dring);
    __Pyx_DECREF((PyObject *)__pyx_v_C->dring);
    __pyx_v_C->dring = ((struct __pyx_obj_19DifferentialAlgebra_DifferentialRing *)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "../../bmi/sympy/RegularDifferentialChain.pyx":1865
 *             C = RegularDifferentialChain.__new__ (RegularDifferentialChain)
 *             C.dring = self.dring
 *             C.notation = strnot             # <<<<<<<<<<<<<<
 *             C.evdict = self.evdict
 *             C.regchain = L.value.tab [i]
 */
    __Pyx_INCREF(__pyx_v_strnot);
    __Pyx_GIVEREF(__pyx_v_strnot);
    __Pyx_GOTREF(__pyx_v_C->notation);
    __Pyx_DECREF(__pyx_v_C->notation);
    __pyx_v_C->notation = __pyx_v_strnot;

    /* "../../bmi/sympy/RegularDifferentialChain.pyx":1866
 *             C.dring = self.dring
 *             C.notation = strnot
 *             C.evdict = self.evdict             # <<<<<<<<<<<<<<
 *             C.regchain = L.value.tab [i]
 *             bmi_c.bmi_balsa_increment_nbref (C.regchain)
 */
    __pyx_t_1 = __pyx_v_self->evdict;
    __Pyx_INCREF(__pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_1);
    __Pyx_GOTREF(__pyx_v_C->evdict);
    __Pyx_DECREF(__pyx_v_C->evdict);
    __pyx_v_C->evdict = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "../../bmi/sympy/RegularDifferentialChain.pyx":1867
 *             C.notation = strnot
 *             C.evdict = self.evdict
 *             C.regchain = L.value.tab [i]             # <<<<<<<<<<<<<<
 *             bmi_c.bmi_balsa_increment_nbref (C.regchain)
 *             result.append (C)
 */
    __pyx_v_C->regchain = (__pyx_v_L->value->tab[__pyx_v_i]);

    /* "../../bmi/sympy/RegularDifferentialChain.pyx":1868
 *             C.evdict = self.evdict
 *             C.regchain = L.value.tab [i]
 *             bmi_c.bmi_balsa_increment_nbref (C.regchain)             # <<<<<<<<<<<<<<
 *             result.append (C)
 *         bmi_c.bmi_balsa_clear_ALGEB (L)
 */
    bmi_balsa_increment_nbref(__pyx_v_C->regchain);

    /* "../../bmi/sympy/RegularDifferentialChain.pyx":1869
 *             C.regchain = L.value.tab [i]
 *             bmi_c.bmi_balsa_increment_nbref (C.regchain)
 *             result.append (C)             # <<<<<<<<<<<<<<
 *         bmi_c.bmi_balsa_clear_ALGEB (L)
 *         return result
 */
    __pyx_t_21 = __Pyx_PyList_Append(__pyx_v_result, ((PyObject *)__pyx_v_C)); if (unlikely(__pyx_t_21 == ((int)-1))) __PYX_ERR(2, 1869, __pyx_L1_error)
  }

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":1870
 *             bmi_c.bmi_balsa_increment_nbref (C.regchain)
 *             result.append (C)
 *         bmi_c.bmi_balsa_clear_ALGEB (L)             # <<<<<<<<<<<<<<
 *         return result
 */
  bmi_balsa_clear_ALGEB(__pyx_v_L);

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":1871
 *             result.append (C)
 *         bmi_c.bmi_balsa_clear_ALGEB (L)
 *         return result             # <<<<<<<<<<<<<<
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_result);
  __pyx_r = __pyx_v_result;
  goto __pyx_L0;

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":1753
 * 
 * # RosenfeldGroebner
 *     def RosenfeldGroebner (             # <<<<<<<<<<<<<<
 *             self,
 *             equations,
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("DifferentialAlgebra.RegularDifferentialChain.RosenfeldGroebner", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XDECREF(__pyx_v_eqns);
  __Pyx_XDECREF(__pyx_v_ineq);
  __Pyx_XDECREF((PyObject *)__pyx_v_F);
  __Pyx_XDECREF((PyObject *)__pyx_v_C);
  __Pyx_XDECREF(__pyx_v_mesgerr);
  __Pyx_XDECREF(__pyx_v_streqns);
  __Pyx_XDECREF(__pyx_v_strineq);
  __Pyx_XDECREF(__pyx_v_strgens);
  __Pyx_XDECREF(__pyx_v_strrels);
  __Pyx_XDECREF(__pyx_v_strattr);
  __Pyx_XDECREF(__pyx_v_strsingsol);
  __Pyx_XDECREF(__pyx_v_strdimlb);
  __Pyx_XDECREF(__pyx_v_strnot);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "../../bmi/sympy/RegularDifferentialChain.pyx":70
 * #   The default notation
 * 
 *     cdef public object evdict             # <<<<<<<<<<<<<<
 * #   A dictionary used by eval
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_19DifferentialAlgebra_24RegularDifferentialChain_6evdict_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_19DifferentialAlgebra_24RegularDifferentialChain_6evdict_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_19DifferentialAlgebra_24RegularDifferentialChain_6evdict___get__(((struct __pyx_obj_19DifferentialAlgebra_RegularDifferentialChain *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_19DifferentialAlgebra_24RegularDifferentialChain_6evdict___get__(struct __pyx_obj_19DifferentialAlgebra_RegularDifferentialChain *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 1);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->evdict);
  __pyx_r = __pyx_v_self->evdict;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_19DifferentialAlgebra_24RegularDifferentialChain_6evdict_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_19DifferentialAlgebra_24RegularDifferentialChain_6evdict_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_19DifferentialAlgebra_24RegularDifferentialChain_6evdict_2__set__(((struct __pyx_obj_19DifferentialAlgebra_RegularDifferentialChain *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_19DifferentialAlgebra_24RegularDifferentialChain_6evdict_2__set__(struct __pyx_obj_19DifferentialAlgebra_RegularDifferentialChain *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__", 1);
  __Pyx_INCREF(__pyx_v_value);
  __Pyx_GIVEREF(__pyx_v_value);
  __Pyx_GOTREF(__pyx_v_self->evdict);
  __Pyx_DECREF(__pyx_v_self->evdict);
  __pyx_v_self->evdict = __pyx_v_value;

  /* function exit code */
  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_19DifferentialAlgebra_24RegularDifferentialChain_6evdict_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_19DifferentialAlgebra_24RegularDifferentialChain_6evdict_5__del__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_19DifferentialAlgebra_24RegularDifferentialChain_6evdict_4__del__(((struct __pyx_obj_19DifferentialAlgebra_RegularDifferentialChain *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_19DifferentialAlgebra_24RegularDifferentialChain_6evdict_4__del__(struct __pyx_obj_19DifferentialAlgebra_RegularDifferentialChain *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__", 1);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->evdict);
  __Pyx_DECREF(__pyx_v_self->evdict);
  __pyx_v_self->evdict = Py_None;

  /* function exit code */
  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "self.regchain cannot be converted to a Python object for pickling"
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_19DifferentialAlgebra_24RegularDifferentialChain_47__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_19DifferentialAlgebra_24RegularDifferentialChain_47__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_19DifferentialAlgebra_24RegularDifferentialChain_47__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_19DifferentialAlgebra_24RegularDifferentialChain_47__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) {
    __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__reduce_cython__", 0))) return NULL;
  __pyx_r = __pyx_pf_19DifferentialAlgebra_24RegularDifferentialChain_46__reduce_cython__(((struct __pyx_obj_19DifferentialAlgebra_RegularDifferentialChain *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_19DifferentialAlgebra_24RegularDifferentialChain_46__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_19DifferentialAlgebra_RegularDifferentialChain *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 1);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError, "self.regchain cannot be converted to a Python object for pickling"             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "self.regchain cannot be converted to a Python object for pickling"
 */
  __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_self_regchain_cannot_be_converte, 0, 0);
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "self.regchain cannot be converted to a Python object for pickling"
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("DifferentialAlgebra.RegularDifferentialChain.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "self.regchain cannot be converted to a Python object for pickling"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "self.regchain cannot be converted to a Python object for pickling"
 */

/* Python wrapper */
static PyObject *__pyx_pw_19DifferentialAlgebra_24RegularDifferentialChain_49__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_19DifferentialAlgebra_24RegularDifferentialChain_49__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_19DifferentialAlgebra_24RegularDifferentialChain_49__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_19DifferentialAlgebra_24RegularDifferentialChain_49__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v___pyx_state = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_state,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 3, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__setstate_cython__") < 0)) __PYX_ERR(1, 3, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v___pyx_state = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 3, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("DifferentialAlgebra.RegularDifferentialChain.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_19DifferentialAlgebra_24RegularDifferentialChain_48__setstate_cython__(((struct __pyx_obj_19DifferentialAlgebra_RegularDifferentialChain *)__pyx_v_self), __pyx_v___pyx_state);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_19DifferentialAlgebra_24RegularDifferentialChain_48__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_19DifferentialAlgebra_RegularDifferentialChain *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setstate_cython__", 1);

  /* "(tree fragment)":4
 *     raise TypeError, "self.regchain cannot be converted to a Python object for pickling"
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "self.regchain cannot be converted to a Python object for pickling"             # <<<<<<<<<<<<<<
 */
  __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_self_regchain_cannot_be_converte, 0, 0);
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "self.regchain cannot be converted to a Python object for pickling"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "self.regchain cannot be converted to a Python object for pickling"
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("DifferentialAlgebra.RegularDifferentialChain.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "../../bmi/sympy/BaseFieldExtension.pyx":168
 * 
 * # __process_notation
 *     def __process_notation (self, notation) :             # <<<<<<<<<<<<<<
 *         cdef strnot
 *         if not isinstance (notation, str) :
 */

/* Python wrapper */
static PyObject *__pyx_pw_19DifferentialAlgebra_18BaseFieldExtension_1_BaseFieldExtension__process_notation(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_19DifferentialAlgebra_18BaseFieldExtension_1_BaseFieldExtension__process_notation = {"_BaseFieldExtension__process_notation", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_19DifferentialAlgebra_18BaseFieldExtension_1_BaseFieldExtension__process_notation, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_19DifferentialAlgebra_18BaseFieldExtension_1_BaseFieldExtension__process_notation(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_notation = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_BaseFieldExtension__process_notation (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_notation,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_notation)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(5, 168, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "_BaseFieldExtension__process_notation") < 0)) __PYX_ERR(5, 168, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_notation = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_BaseFieldExtension__process_notation", 1, 1, 1, __pyx_nargs); __PYX_ERR(5, 168, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("DifferentialAlgebra.BaseFieldExtension._BaseFieldExtension__process_notation", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_19DifferentialAlgebra_18BaseFieldExtension___process_notation(((struct __pyx_obj_19DifferentialAlgebra_BaseFieldExtension *)__pyx_v_self), __pyx_v_notation);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_19DifferentialAlgebra_18BaseFieldExtension___process_notation(struct __pyx_obj_19DifferentialAlgebra_BaseFieldExtension *__pyx_v_self, PyObject *__pyx_v_notation) {
  PyObject *__pyx_v_strnot = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  unsigned int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_BaseFieldExtension__process_notation", 1);

  /* "../../bmi/sympy/BaseFieldExtension.pyx":170
 *     def __process_notation (self, notation) :
 *         cdef strnot
 *         if not isinstance (notation, str) :             # <<<<<<<<<<<<<<
 *             strnot = self.notation
 *         else :
 */
  __pyx_t_1 = PyUnicode_Check(__pyx_v_notation); 
  __pyx_t_2 = (!__pyx_t_1);
  if (__pyx_t_2) {

    /* "../../bmi/sympy/BaseFieldExtension.pyx":171
 *         cdef strnot
 *         if not isinstance (notation, str) :
 *             strnot = self.notation             # <<<<<<<<<<<<<<
 *         else :
 *             strnot = ascii (notation)
 */
    __pyx_t_3 = __pyx_v_self->notation;
    __Pyx_INCREF(__pyx_t_3);
    __pyx_v_strnot = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "../../bmi/sympy/BaseFieldExtension.pyx":170
 *     def __process_notation (self, notation) :
 *         cdef strnot
 *         if not isinstance (notation, str) :             # <<<<<<<<<<<<<<
 *             strnot = self.notation
 *         else :
 */
    goto __pyx_L3;
  }

  /* "../../bmi/sympy/BaseFieldExtension.pyx":173
 *             strnot = self.notation
 *         else :
 *             strnot = ascii (notation)             # <<<<<<<<<<<<<<
 *             if strnot != BMI_IX_Derivative and strnot != BMI_IX_jet:
 *                 strnot = self.notation
 */
  /*else*/ {
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_ascii); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 173, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = NULL;
    __pyx_t_6 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
        __pyx_t_6 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_v_notation};
      __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6);
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 173, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
    __pyx_v_strnot = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "../../bmi/sympy/BaseFieldExtension.pyx":174
 *         else :
 *             strnot = ascii (notation)
 *             if strnot != BMI_IX_Derivative and strnot != BMI_IX_jet:             # <<<<<<<<<<<<<<
 *                 strnot = self.notation
 *         return strnot
 */
    __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v_19DifferentialAlgebra_BMI_IX_Derivative); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 174, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = (__Pyx_PyBytes_Equals(__pyx_v_strnot, __pyx_t_3, Py_NE)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(5, 174, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (__pyx_t_1) {
    } else {
      __pyx_t_2 = __pyx_t_1;
      goto __pyx_L5_bool_binop_done;
    }
    __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v_19DifferentialAlgebra_BMI_IX_jet); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 174, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = (__Pyx_PyBytes_Equals(__pyx_v_strnot, __pyx_t_3, Py_NE)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(5, 174, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_2 = __pyx_t_1;
    __pyx_L5_bool_binop_done:;
    if (__pyx_t_2) {

      /* "../../bmi/sympy/BaseFieldExtension.pyx":175
 *             strnot = ascii (notation)
 *             if strnot != BMI_IX_Derivative and strnot != BMI_IX_jet:
 *                 strnot = self.notation             # <<<<<<<<<<<<<<
 *         return strnot
 * 
 */
      __pyx_t_3 = __pyx_v_self->notation;
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_DECREF_SET(__pyx_v_strnot, __pyx_t_3);
      __pyx_t_3 = 0;

      /* "../../bmi/sympy/BaseFieldExtension.pyx":174
 *         else :
 *             strnot = ascii (notation)
 *             if strnot != BMI_IX_Derivative and strnot != BMI_IX_jet:             # <<<<<<<<<<<<<<
 *                 strnot = self.notation
 *         return strnot
 */
    }
  }
  __pyx_L3:;

  /* "../../bmi/sympy/BaseFieldExtension.pyx":176
 *             if strnot != BMI_IX_Derivative and strnot != BMI_IX_jet:
 *                 strnot = self.notation
 *         return strnot             # <<<<<<<<<<<<<<
 * 
 * # __init__
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_strnot);
  __pyx_r = __pyx_v_strnot;
  goto __pyx_L0;

  /* "../../bmi/sympy/BaseFieldExtension.pyx":168
 * 
 * # __process_notation
 *     def __process_notation (self, notation) :             # <<<<<<<<<<<<<<
 *         cdef strnot
 *         if not isinstance (notation, str) :
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("DifferentialAlgebra.BaseFieldExtension._BaseFieldExtension__process_notation", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_strnot);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "../../bmi/sympy/BaseFieldExtension.pyx":179
 * 
 * # __init__
 *     def __init__ (             # <<<<<<<<<<<<<<
 *             self,
 *             list generators = [],
 */

/* Python wrapper */
static int __pyx_pw_19DifferentialAlgebra_18BaseFieldExtension_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
PyDoc_STRVAR(__pyx_doc_19DifferentialAlgebra_18BaseFieldExtension_2__init__, "\n        The constructor\n\n        INPUT:\n\n            `generators` -- (default: []) a list of dependent variables\n            `relations`  -- (optional) a regular differential chain\n            `ring`       -- (optional) a differential ring\n\n        OUTPUT:\n\n            An extension F of the base field K of a differential ring,\n            defined by `generators` and `relations`.\n\n            If `ring` is not specified, F actually is the description\n            of a base field extension, which will be performed by a\n            future call to the RosenfeldGroebner algorithm.\n\n            If `relations` is not specified, then F is the differential\n            field, obtained by extending the field of the rational\n            numbers, by the elements of `generators`.\n\n            If `relations` is specified, then F is the differential\n            field of fractions of Q{X}/I where X denotes the variables\n            (dependent and independent) present in `generators`,\n            `relations`, and I denotes the differential ideal (which\n            needs to be prime) defined by `relations`.\n\n        NOTES:\n\n            The variables present in `generators` and `relations`\n            should belong to the lowest blocks of the ranking of the\n            differential ring, whose base field is extended.\n\n            See the class help page for more details.\n        ");
#if CYTHON_UPDATE_DESCRIPTOR_DOC
struct wrapperbase __pyx_wrapperbase_19DifferentialAlgebra_18BaseFieldExtension_2__init__;
#endif
static int __pyx_pw_19DifferentialAlgebra_18BaseFieldExtension_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_generators = 0;
  struct __pyx_obj_19DifferentialAlgebra_RegularDifferentialChain *__pyx_v_relations = 0;
  struct __pyx_obj_19DifferentialAlgebra_DifferentialRing *__pyx_v_ring = 0;
  PyObject *__pyx_v_notation = 0;
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[4] = {0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
  #endif
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_generators,&__pyx_n_s_relations_2,&__pyx_n_s_ring,&__pyx_n_s_notation,0};
    values[0] = __Pyx_Arg_NewRef_VARARGS(__pyx_k__72);

    /* "../../bmi/sympy/BaseFieldExtension.pyx":182
 *             self,
 *             list generators = [],
 *             RegularDifferentialChain relations = None,             # <<<<<<<<<<<<<<
 *             DifferentialRing ring = None,
 *             notation = BMI_IX_undefined):
 */
    values[1] = __Pyx_Arg_NewRef_VARARGS((PyObject *)((struct __pyx_obj_19DifferentialAlgebra_RegularDifferentialChain *)Py_None));

    /* "../../bmi/sympy/BaseFieldExtension.pyx":183
 *             list generators = [],
 *             RegularDifferentialChain relations = None,
 *             DifferentialRing ring = None,             # <<<<<<<<<<<<<<
 *             notation = BMI_IX_undefined):
 *         r"""
 */
    values[2] = __Pyx_Arg_NewRef_VARARGS((PyObject *)((struct __pyx_obj_19DifferentialAlgebra_DifferentialRing *)Py_None));
    values[3] = __Pyx_Arg_NewRef_VARARGS(__pyx_k__73);
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  4: values[3] = __Pyx_Arg_VARARGS(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_VARARGS(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_VARARGS(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_generators);
          if (value) { values[0] = __Pyx_Arg_NewRef_VARARGS(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(5, 179, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_relations_2);
          if (value) { values[1] = __Pyx_Arg_NewRef_VARARGS(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(5, 179, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_ring);
          if (value) { values[2] = __Pyx_Arg_NewRef_VARARGS(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(5, 179, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_notation);
          if (value) { values[3] = __Pyx_Arg_NewRef_VARARGS(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(5, 179, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__init__") < 0)) __PYX_ERR(5, 179, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  4: values[3] = __Pyx_Arg_VARARGS(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_VARARGS(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_generators = ((PyObject*)values[0]);
    __pyx_v_relations = ((struct __pyx_obj_19DifferentialAlgebra_RegularDifferentialChain *)values[1]);
    __pyx_v_ring = ((struct __pyx_obj_19DifferentialAlgebra_DifferentialRing *)values[2]);
    __pyx_v_notation = values[3];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 4, __pyx_nargs); __PYX_ERR(5, 179, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("DifferentialAlgebra.BaseFieldExtension.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_generators), (&PyList_Type), 1, "generators", 1))) __PYX_ERR(5, 181, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_relations), __pyx_ptype_19DifferentialAlgebra_RegularDifferentialChain, 1, "relations", 0))) __PYX_ERR(5, 182, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ring), __pyx_ptype_19DifferentialAlgebra_DifferentialRing, 1, "ring", 0))) __PYX_ERR(5, 183, __pyx_L1_error)
  __pyx_r = __pyx_pf_19DifferentialAlgebra_18BaseFieldExtension_2__init__(((struct __pyx_obj_19DifferentialAlgebra_BaseFieldExtension *)__pyx_v_self), __pyx_v_generators, __pyx_v_relations, __pyx_v_ring, __pyx_v_notation);

  /* "../../bmi/sympy/BaseFieldExtension.pyx":179
 * 
 * # __init__
 *     def __init__ (             # <<<<<<<<<<<<<<
 *             self,
 *             list generators = [],
 */

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = -1;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_19DifferentialAlgebra_18BaseFieldExtension_2__init__(struct __pyx_obj_19DifferentialAlgebra_BaseFieldExtension *__pyx_v_self, PyObject *__pyx_v_generators, struct __pyx_obj_19DifferentialAlgebra_RegularDifferentialChain *__pyx_v_relations, struct __pyx_obj_19DifferentialAlgebra_DifferentialRing *__pyx_v_ring, PyObject *__pyx_v_notation) {
  struct __pyx_obj_19DifferentialAlgebra_DifferentialRing *__pyx_v_R = 0;
  PyObject *__pyx_v_strgens = 0;
  PyObject *__pyx_v_strrels = 0;
  PyObject *__pyx_v_mesgerr = 0;
  ALGEB_string __pyx_v_A;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  unsigned int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  char *__pyx_t_9;
  char *__pyx_t_10;
  char *__pyx_t_11;
  char *__pyx_t_12;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 1);

  /* "../../bmi/sympy/BaseFieldExtension.pyx":225
 *         cdef bytes strgens, strrels, mesgerr
 *         cdef bmi_c.ALGEB_string A
 *         if (relations == None and ring == None):             # <<<<<<<<<<<<<<
 *             self.notation = BMI_IX_Derivative
 *             self.notation = self.__process_notation (notation)
 */
  __pyx_t_2 = PyObject_RichCompare(((PyObject *)__pyx_v_relations), Py_None, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 225, __pyx_L1_error)
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(5, 225, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_3) {
  } else {
    __pyx_t_1 = __pyx_t_3;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_2 = PyObject_RichCompare(((PyObject *)__pyx_v_ring), Py_None, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 225, __pyx_L1_error)
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(5, 225, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_1 = __pyx_t_3;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_1) {

    /* "../../bmi/sympy/BaseFieldExtension.pyx":226
 *         cdef bmi_c.ALGEB_string A
 *         if (relations == None and ring == None):
 *             self.notation = BMI_IX_Derivative             # <<<<<<<<<<<<<<
 *             self.notation = self.__process_notation (notation)
 *             R = DifferentialRing (derivations = [], blocks = generators, notation = self.notation)
 */
    __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v_19DifferentialAlgebra_BMI_IX_Derivative); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 226, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_2);
    __Pyx_GOTREF(__pyx_v_self->notation);
    __Pyx_DECREF(__pyx_v_self->notation);
    __pyx_v_self->notation = __pyx_t_2;
    __pyx_t_2 = 0;

    /* "../../bmi/sympy/BaseFieldExtension.pyx":227
 *         if (relations == None and ring == None):
 *             self.notation = BMI_IX_Derivative
 *             self.notation = self.__process_notation (notation)             # <<<<<<<<<<<<<<
 *             R = DifferentialRing (derivations = [], blocks = generators, notation = self.notation)
 *             self.rels_are_provided = False
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_BaseFieldExtension__process_not); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 227, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = NULL;
    __pyx_t_6 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
        __pyx_t_6 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_v_notation};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6);
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 227, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
    __Pyx_GIVEREF(__pyx_t_2);
    __Pyx_GOTREF(__pyx_v_self->notation);
    __Pyx_DECREF(__pyx_v_self->notation);
    __pyx_v_self->notation = __pyx_t_2;
    __pyx_t_2 = 0;

    /* "../../bmi/sympy/BaseFieldExtension.pyx":228
 *             self.notation = BMI_IX_Derivative
 *             self.notation = self.__process_notation (notation)
 *             R = DifferentialRing (derivations = [], blocks = generators, notation = self.notation)             # <<<<<<<<<<<<<<
 *             self.rels_are_provided = False
 *             self.rels = RegularDifferentialChain ([], R)
 */
    __pyx_t_2 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 228, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 228, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_derivations, __pyx_t_4) < 0) __PYX_ERR(5, 228, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_blocks, __pyx_v_generators) < 0) __PYX_ERR(5, 228, __pyx_L1_error)
    if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_notation, __pyx_v_self->notation) < 0) __PYX_ERR(5, 228, __pyx_L1_error)
    __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_19DifferentialAlgebra_DifferentialRing), __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 228, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_v_R = ((struct __pyx_obj_19DifferentialAlgebra_DifferentialRing *)__pyx_t_4);
    __pyx_t_4 = 0;

    /* "../../bmi/sympy/BaseFieldExtension.pyx":229
 *             self.notation = self.__process_notation (notation)
 *             R = DifferentialRing (derivations = [], blocks = generators, notation = self.notation)
 *             self.rels_are_provided = False             # <<<<<<<<<<<<<<
 *             self.rels = RegularDifferentialChain ([], R)
 *             self.gens = generators
 */
    __Pyx_INCREF(Py_False);
    __Pyx_GIVEREF(Py_False);
    __Pyx_GOTREF((PyObject *)__pyx_v_self->rels_are_provided);
    __Pyx_DECREF((PyObject *)__pyx_v_self->rels_are_provided);
    __pyx_v_self->rels_are_provided = ((PyBoolObject *)Py_False);

    /* "../../bmi/sympy/BaseFieldExtension.pyx":230
 *             R = DifferentialRing (derivations = [], blocks = generators, notation = self.notation)
 *             self.rels_are_provided = False
 *             self.rels = RegularDifferentialChain ([], R)             # <<<<<<<<<<<<<<
 *             self.gens = generators
 *             self.evdict = {}
 */
    __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 230, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 230, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_4);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_4)) __PYX_ERR(5, 230, __pyx_L1_error);
    __Pyx_INCREF((PyObject *)__pyx_v_R);
    __Pyx_GIVEREF((PyObject *)__pyx_v_R);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_v_R))) __PYX_ERR(5, 230, __pyx_L1_error);
    __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_19DifferentialAlgebra_RegularDifferentialChain), __pyx_t_2, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 230, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_GIVEREF(__pyx_t_4);
    __Pyx_GOTREF((PyObject *)__pyx_v_self->rels);
    __Pyx_DECREF((PyObject *)__pyx_v_self->rels);
    __pyx_v_self->rels = ((struct __pyx_obj_19DifferentialAlgebra_RegularDifferentialChain *)__pyx_t_4);
    __pyx_t_4 = 0;

    /* "../../bmi/sympy/BaseFieldExtension.pyx":231
 *             self.rels_are_provided = False
 *             self.rels = RegularDifferentialChain ([], R)
 *             self.gens = generators             # <<<<<<<<<<<<<<
 *             self.evdict = {}
 *         elif relations != None:
 */
    __Pyx_INCREF(__pyx_v_generators);
    __Pyx_GIVEREF(__pyx_v_generators);
    __Pyx_GOTREF(__pyx_v_self->gens);
    __Pyx_DECREF(__pyx_v_self->gens);
    __pyx_v_self->gens = __pyx_v_generators;

    /* "../../bmi/sympy/BaseFieldExtension.pyx":232
 *             self.rels = RegularDifferentialChain ([], R)
 *             self.gens = generators
 *             self.evdict = {}             # <<<<<<<<<<<<<<
 *         elif relations != None:
 *             if not isinstance (relations, RegularDifferentialChain):
 */
    __pyx_t_4 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 232, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_4);
    __Pyx_GOTREF(__pyx_v_self->evdict);
    __Pyx_DECREF(__pyx_v_self->evdict);
    __pyx_v_self->evdict = __pyx_t_4;
    __pyx_t_4 = 0;

    /* "../../bmi/sympy/BaseFieldExtension.pyx":225
 *         cdef bytes strgens, strrels, mesgerr
 *         cdef bmi_c.ALGEB_string A
 *         if (relations == None and ring == None):             # <<<<<<<<<<<<<<
 *             self.notation = BMI_IX_Derivative
 *             self.notation = self.__process_notation (notation)
 */
    goto __pyx_L3;
  }

  /* "../../bmi/sympy/BaseFieldExtension.pyx":233
 *             self.gens = generators
 *             self.evdict = {}
 *         elif relations != None:             # <<<<<<<<<<<<<<
 *             if not isinstance (relations, RegularDifferentialChain):
 *                 raise TypeError ('RegularDifferentialChain expected for relations keyword parameter')
 */
  __pyx_t_4 = PyObject_RichCompare(((PyObject *)__pyx_v_relations), Py_None, Py_NE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 233, __pyx_L1_error)
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(5, 233, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__pyx_t_1) {

    /* "../../bmi/sympy/BaseFieldExtension.pyx":234
 *             self.evdict = {}
 *         elif relations != None:
 *             if not isinstance (relations, RegularDifferentialChain):             # <<<<<<<<<<<<<<
 *                 raise TypeError ('RegularDifferentialChain expected for relations keyword parameter')
 *             self.rels_are_provided = True
 */
    __pyx_t_1 = __Pyx_TypeCheck(((PyObject *)__pyx_v_relations), __pyx_ptype_19DifferentialAlgebra_RegularDifferentialChain); 
    __pyx_t_3 = (!__pyx_t_1);
    if (unlikely(__pyx_t_3)) {

      /* "../../bmi/sympy/BaseFieldExtension.pyx":235
 *         elif relations != None:
 *             if not isinstance (relations, RegularDifferentialChain):
 *                 raise TypeError ('RegularDifferentialChain expected for relations keyword parameter')             # <<<<<<<<<<<<<<
 *             self.rels_are_provided = True
 *             self.rels = relations
 */
      __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__74, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 235, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_Raise(__pyx_t_4, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __PYX_ERR(5, 235, __pyx_L1_error)

      /* "../../bmi/sympy/BaseFieldExtension.pyx":234
 *             self.evdict = {}
 *         elif relations != None:
 *             if not isinstance (relations, RegularDifferentialChain):             # <<<<<<<<<<<<<<
 *                 raise TypeError ('RegularDifferentialChain expected for relations keyword parameter')
 *             self.rels_are_provided = True
 */
    }

    /* "../../bmi/sympy/BaseFieldExtension.pyx":236
 *             if not isinstance (relations, RegularDifferentialChain):
 *                 raise TypeError ('RegularDifferentialChain expected for relations keyword parameter')
 *             self.rels_are_provided = True             # <<<<<<<<<<<<<<
 *             self.rels = relations
 *             self.gens = generators
 */
    __Pyx_INCREF(Py_True);
    __Pyx_GIVEREF(Py_True);
    __Pyx_GOTREF((PyObject *)__pyx_v_self->rels_are_provided);
    __Pyx_DECREF((PyObject *)__pyx_v_self->rels_are_provided);
    __pyx_v_self->rels_are_provided = ((PyBoolObject *)Py_True);

    /* "../../bmi/sympy/BaseFieldExtension.pyx":237
 *                 raise TypeError ('RegularDifferentialChain expected for relations keyword parameter')
 *             self.rels_are_provided = True
 *             self.rels = relations             # <<<<<<<<<<<<<<
 *             self.gens = generators
 *             self.notation = relations.notation
 */
    __Pyx_INCREF((PyObject *)__pyx_v_relations);
    __Pyx_GIVEREF((PyObject *)__pyx_v_relations);
    __Pyx_GOTREF((PyObject *)__pyx_v_self->rels);
    __Pyx_DECREF((PyObject *)__pyx_v_self->rels);
    __pyx_v_self->rels = __pyx_v_relations;

    /* "../../bmi/sympy/BaseFieldExtension.pyx":238
 *             self.rels_are_provided = True
 *             self.rels = relations
 *             self.gens = generators             # <<<<<<<<<<<<<<
 *             self.notation = relations.notation
 *             self.notation = self.__process_notation (notation)
 */
    __Pyx_INCREF(__pyx_v_generators);
    __Pyx_GIVEREF(__pyx_v_generators);
    __Pyx_GOTREF(__pyx_v_self->gens);
    __Pyx_DECREF(__pyx_v_self->gens);
    __pyx_v_self->gens = __pyx_v_generators;

    /* "../../bmi/sympy/BaseFieldExtension.pyx":239
 *             self.rels = relations
 *             self.gens = generators
 *             self.notation = relations.notation             # <<<<<<<<<<<<<<
 *             self.notation = self.__process_notation (notation)
 *             self.evdict = relations.evdict
 */
    __pyx_t_4 = __pyx_v_relations->notation;
    __Pyx_INCREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_4);
    __Pyx_GOTREF(__pyx_v_self->notation);
    __Pyx_DECREF(__pyx_v_self->notation);
    __pyx_v_self->notation = __pyx_t_4;
    __pyx_t_4 = 0;

    /* "../../bmi/sympy/BaseFieldExtension.pyx":240
 *             self.gens = generators
 *             self.notation = relations.notation
 *             self.notation = self.__process_notation (notation)             # <<<<<<<<<<<<<<
 *             self.evdict = relations.evdict
 *             strrels = ascii (self._relations ())
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_BaseFieldExtension__process_not); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 240, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_5 = NULL;
    __pyx_t_6 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
        __pyx_t_6 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_v_notation};
      __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6);
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 240, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    __Pyx_GIVEREF(__pyx_t_4);
    __Pyx_GOTREF(__pyx_v_self->notation);
    __Pyx_DECREF(__pyx_v_self->notation);
    __pyx_v_self->notation = __pyx_t_4;
    __pyx_t_4 = 0;

    /* "../../bmi/sympy/BaseFieldExtension.pyx":241
 *             self.notation = relations.notation
 *             self.notation = self.__process_notation (notation)
 *             self.evdict = relations.evdict             # <<<<<<<<<<<<<<
 *             strrels = ascii (self._relations ())
 * # It is important to remove quotes around range indexed groups otherwise
 */
    __pyx_t_4 = __pyx_v_relations->evdict;
    __Pyx_INCREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_4);
    __Pyx_GOTREF(__pyx_v_self->evdict);
    __Pyx_DECREF(__pyx_v_self->evdict);
    __pyx_v_self->evdict = __pyx_t_4;
    __pyx_t_4 = 0;

    /* "../../bmi/sympy/BaseFieldExtension.pyx":242
 *             self.notation = self.__process_notation (notation)
 *             self.evdict = relations.evdict
 *             strrels = ascii (self._relations ())             # <<<<<<<<<<<<<<
 * # It is important to remove quotes around range indexed groups otherwise
 * #   they will be interpreted as plain strings
 */
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ascii); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 242, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_relations); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 242, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = NULL;
    __pyx_t_6 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
      if (likely(__pyx_t_8)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_7, function);
        __pyx_t_6 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_8, NULL};
      __pyx_t_5 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_6, 0+__pyx_t_6);
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 242, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    }
    __pyx_t_7 = NULL;
    __pyx_t_6 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
        __pyx_t_6 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_t_5};
      __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6);
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 242, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    if (!(likely(PyBytes_CheckExact(__pyx_t_4))||((__pyx_t_4) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_4))) __PYX_ERR(5, 242, __pyx_L1_error)
    __pyx_v_strrels = ((PyObject*)__pyx_t_4);
    __pyx_t_4 = 0;

    /* "../../bmi/sympy/BaseFieldExtension.pyx":245
 * # It is important to remove quotes around range indexed groups otherwise
 * #   they will be interpreted as plain strings
 *             strgens = ascii (generators)             # <<<<<<<<<<<<<<
 *             strgens = strgens.replace (b"'", b"")
 *             A = bmi_c.bmi_dapyx_base_field_generators (
 */
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ascii); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 245, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_5 = NULL;
    __pyx_t_6 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
        __pyx_t_6 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_v_generators};
      __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6);
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 245, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    if (!(likely(PyBytes_CheckExact(__pyx_t_4))||((__pyx_t_4) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_4))) __PYX_ERR(5, 245, __pyx_L1_error)
    __pyx_v_strgens = ((PyObject*)__pyx_t_4);
    __pyx_t_4 = 0;

    /* "../../bmi/sympy/BaseFieldExtension.pyx":246
 * #   they will be interpreted as plain strings
 *             strgens = ascii (generators)
 *             strgens = strgens.replace (b"'", b"")             # <<<<<<<<<<<<<<
 *             A = bmi_c.bmi_dapyx_base_field_generators (
 *                         strgens, strrels, self.rels.regchain,
 */
    __pyx_t_4 = __Pyx_CallUnboundCMethod2(&__pyx_umethod_PyBytes_Type_replace, __pyx_v_strgens, __pyx_kp_b__6, __pyx_kp_b__7); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 246, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    if (!(likely(PyBytes_CheckExact(__pyx_t_4))||((__pyx_t_4) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_4))) __PYX_ERR(5, 246, __pyx_L1_error)
    __Pyx_DECREF_SET(__pyx_v_strgens, ((PyObject*)__pyx_t_4));
    __pyx_t_4 = 0;

    /* "../../bmi/sympy/BaseFieldExtension.pyx":248
 *             strgens = strgens.replace (b"'", b"")
 *             A = bmi_c.bmi_dapyx_base_field_generators (
 *                         strgens, strrels, self.rels.regchain,             # <<<<<<<<<<<<<<
 *                         self.notation, self.notation, 0, 0)
 *             if bmi_c.bmi_dapyx_is_error (A):
 */
    if (unlikely(__pyx_v_strgens == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
      __PYX_ERR(5, 248, __pyx_L1_error)
    }
    __pyx_t_9 = __Pyx_PyBytes_AsWritableString(__pyx_v_strgens); if (unlikely((!__pyx_t_9) && PyErr_Occurred())) __PYX_ERR(5, 248, __pyx_L1_error)
    if (unlikely(__pyx_v_strrels == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
      __PYX_ERR(5, 248, __pyx_L1_error)
    }
    __pyx_t_10 = __Pyx_PyBytes_AsWritableString(__pyx_v_strrels); if (unlikely((!__pyx_t_10) && PyErr_Occurred())) __PYX_ERR(5, 248, __pyx_L1_error)

    /* "../../bmi/sympy/BaseFieldExtension.pyx":249
 *             A = bmi_c.bmi_dapyx_base_field_generators (
 *                         strgens, strrels, self.rels.regchain,
 *                         self.notation, self.notation, 0, 0)             # <<<<<<<<<<<<<<
 *             if bmi_c.bmi_dapyx_is_error (A):
 *                 mesgerr = bmi_c.bmi_dapyx_mesgerr (A)
 */
    __pyx_t_11 = __Pyx_PyObject_AsWritableString(__pyx_v_self->notation); if (unlikely((!__pyx_t_11) && PyErr_Occurred())) __PYX_ERR(5, 249, __pyx_L1_error)
    __pyx_t_12 = __Pyx_PyObject_AsWritableString(__pyx_v_self->notation); if (unlikely((!__pyx_t_12) && PyErr_Occurred())) __PYX_ERR(5, 249, __pyx_L1_error)

    /* "../../bmi/sympy/BaseFieldExtension.pyx":247
 *             strgens = ascii (generators)
 *             strgens = strgens.replace (b"'", b"")
 *             A = bmi_c.bmi_dapyx_base_field_generators (             # <<<<<<<<<<<<<<
 *                         strgens, strrels, self.rels.regchain,
 *                         self.notation, self.notation, 0, 0)
 */
    __pyx_v_A = bmi_dapyx_base_field_generators(__pyx_t_9, __pyx_t_10, __pyx_v_self->rels->regchain, __pyx_t_11, __pyx_t_12, 0, 0);

    /* "../../bmi/sympy/BaseFieldExtension.pyx":250
 *                         strgens, strrels, self.rels.regchain,
 *                         self.notation, self.notation, 0, 0)
 *             if bmi_c.bmi_dapyx_is_error (A):             # <<<<<<<<<<<<<<
 *                 mesgerr = bmi_c.bmi_dapyx_mesgerr (A)
 *                 bmi_c.bmi_balsa_clear_ALGEB (A)
 */
    __pyx_t_3 = (bmi_dapyx_is_error(__pyx_v_A) != 0);
    if (unlikely(__pyx_t_3)) {

      /* "../../bmi/sympy/BaseFieldExtension.pyx":251
 *                         self.notation, self.notation, 0, 0)
 *             if bmi_c.bmi_dapyx_is_error (A):
 *                 mesgerr = bmi_c.bmi_dapyx_mesgerr (A)             # <<<<<<<<<<<<<<
 *                 bmi_c.bmi_balsa_clear_ALGEB (A)
 *                 raise RuntimeError (str (mesgerr, 'utf-8'))
 */
      __pyx_t_4 = __Pyx_PyBytes_FromString(bmi_dapyx_mesgerr(__pyx_v_A)); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 251, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_v_mesgerr = ((PyObject*)__pyx_t_4);
      __pyx_t_4 = 0;

      /* "../../bmi/sympy/BaseFieldExtension.pyx":252
 *             if bmi_c.bmi_dapyx_is_error (A):
 *                 mesgerr = bmi_c.bmi_dapyx_mesgerr (A)
 *                 bmi_c.bmi_balsa_clear_ALGEB (A)             # <<<<<<<<<<<<<<
 *                 raise RuntimeError (str (mesgerr, 'utf-8'))
 *             self.gens = eval (A.value, globals (), self.evdict)
 */
      bmi_balsa_clear_ALGEB(__pyx_v_A);

      /* "../../bmi/sympy/BaseFieldExtension.pyx":253
 *                 mesgerr = bmi_c.bmi_dapyx_mesgerr (A)
 *                 bmi_c.bmi_balsa_clear_ALGEB (A)
 *                 raise RuntimeError (str (mesgerr, 'utf-8'))             # <<<<<<<<<<<<<<
 *             self.gens = eval (A.value, globals (), self.evdict)
 *         elif ring != None:
 */
      __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 253, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_INCREF(__pyx_v_mesgerr);
      __Pyx_GIVEREF(__pyx_v_mesgerr);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_mesgerr)) __PYX_ERR(5, 253, __pyx_L1_error);
      __Pyx_INCREF(__pyx_kp_u_utf_8);
      __Pyx_GIVEREF(__pyx_kp_u_utf_8);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_kp_u_utf_8)) __PYX_ERR(5, 253, __pyx_L1_error);
      __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)(&PyUnicode_Type)), __pyx_t_4, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 253, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_RuntimeError, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 253, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_Raise(__pyx_t_4, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __PYX_ERR(5, 253, __pyx_L1_error)

      /* "../../bmi/sympy/BaseFieldExtension.pyx":250
 *                         strgens, strrels, self.rels.regchain,
 *                         self.notation, self.notation, 0, 0)
 *             if bmi_c.bmi_dapyx_is_error (A):             # <<<<<<<<<<<<<<
 *                 mesgerr = bmi_c.bmi_dapyx_mesgerr (A)
 *                 bmi_c.bmi_balsa_clear_ALGEB (A)
 */
    }

    /* "../../bmi/sympy/BaseFieldExtension.pyx":254
 *                 bmi_c.bmi_balsa_clear_ALGEB (A)
 *                 raise RuntimeError (str (mesgerr, 'utf-8'))
 *             self.gens = eval (A.value, globals (), self.evdict)             # <<<<<<<<<<<<<<
 *         elif ring != None:
 *             if not isinstance (ring, DifferentialRing):
 */
    __pyx_t_4 = __Pyx_PyBytes_FromString(__pyx_v_A->value); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 254, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_2 = __Pyx_Globals(); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 254, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 254, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_4);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4)) __PYX_ERR(5, 254, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_2);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_2)) __PYX_ERR(5, 254, __pyx_L1_error);
    __Pyx_INCREF(__pyx_v_self->evdict);
    __Pyx_GIVEREF(__pyx_v_self->evdict);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_self->evdict)) __PYX_ERR(5, 254, __pyx_L1_error);
    __pyx_t_4 = 0;
    __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_eval, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 254, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (!(likely(PyList_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None) || __Pyx_RaiseUnexpectedTypeError("list", __pyx_t_2))) __PYX_ERR(5, 254, __pyx_L1_error)
    __Pyx_GIVEREF(__pyx_t_2);
    __Pyx_GOTREF(__pyx_v_self->gens);
    __Pyx_DECREF(__pyx_v_self->gens);
    __pyx_v_self->gens = ((PyObject*)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "../../bmi/sympy/BaseFieldExtension.pyx":233
 *             self.gens = generators
 *             self.evdict = {}
 *         elif relations != None:             # <<<<<<<<<<<<<<
 *             if not isinstance (relations, RegularDifferentialChain):
 *                 raise TypeError ('RegularDifferentialChain expected for relations keyword parameter')
 */
    goto __pyx_L3;
  }

  /* "../../bmi/sympy/BaseFieldExtension.pyx":255
 *                 raise RuntimeError (str (mesgerr, 'utf-8'))
 *             self.gens = eval (A.value, globals (), self.evdict)
 *         elif ring != None:             # <<<<<<<<<<<<<<
 *             if not isinstance (ring, DifferentialRing):
 *                 raise TypeError ('DifferentialRing expected for ring keyword parameter')
 */
  __pyx_t_2 = PyObject_RichCompare(((PyObject *)__pyx_v_ring), Py_None, Py_NE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 255, __pyx_L1_error)
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(5, 255, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_3) {

    /* "../../bmi/sympy/BaseFieldExtension.pyx":256
 *             self.gens = eval (A.value, globals (), self.evdict)
 *         elif ring != None:
 *             if not isinstance (ring, DifferentialRing):             # <<<<<<<<<<<<<<
 *                 raise TypeError ('DifferentialRing expected for ring keyword parameter')
 *             R = ring
 */
    __pyx_t_3 = __Pyx_TypeCheck(((PyObject *)__pyx_v_ring), __pyx_ptype_19DifferentialAlgebra_DifferentialRing); 
    __pyx_t_1 = (!__pyx_t_3);
    if (unlikely(__pyx_t_1)) {

      /* "../../bmi/sympy/BaseFieldExtension.pyx":257
 *         elif ring != None:
 *             if not isinstance (ring, DifferentialRing):
 *                 raise TypeError ('DifferentialRing expected for ring keyword parameter')             # <<<<<<<<<<<<<<
 *             R = ring
 *             self.rels_are_provided = False
 */
      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__75, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 257, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_Raise(__pyx_t_2, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __PYX_ERR(5, 257, __pyx_L1_error)

      /* "../../bmi/sympy/BaseFieldExtension.pyx":256
 *             self.gens = eval (A.value, globals (), self.evdict)
 *         elif ring != None:
 *             if not isinstance (ring, DifferentialRing):             # <<<<<<<<<<<<<<
 *                 raise TypeError ('DifferentialRing expected for ring keyword parameter')
 *             R = ring
 */
    }

    /* "../../bmi/sympy/BaseFieldExtension.pyx":258
 *             if not isinstance (ring, DifferentialRing):
 *                 raise TypeError ('DifferentialRing expected for ring keyword parameter')
 *             R = ring             # <<<<<<<<<<<<<<
 *             self.rels_are_provided = False
 *             self.rels = RegularDifferentialChain ([], R)
 */
    __Pyx_INCREF((PyObject *)__pyx_v_ring);
    __pyx_v_R = __pyx_v_ring;

    /* "../../bmi/sympy/BaseFieldExtension.pyx":259
 *                 raise TypeError ('DifferentialRing expected for ring keyword parameter')
 *             R = ring
 *             self.rels_are_provided = False             # <<<<<<<<<<<<<<
 *             self.rels = RegularDifferentialChain ([], R)
 *             self.gens = generators
 */
    __Pyx_INCREF(Py_False);
    __Pyx_GIVEREF(Py_False);
    __Pyx_GOTREF((PyObject *)__pyx_v_self->rels_are_provided);
    __Pyx_DECREF((PyObject *)__pyx_v_self->rels_are_provided);
    __pyx_v_self->rels_are_provided = ((PyBoolObject *)Py_False);

    /* "../../bmi/sympy/BaseFieldExtension.pyx":260
 *             R = ring
 *             self.rels_are_provided = False
 *             self.rels = RegularDifferentialChain ([], R)             # <<<<<<<<<<<<<<
 *             self.gens = generators
 *             self.notation = ring.notation
 */
    __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 260, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 260, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_2);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2)) __PYX_ERR(5, 260, __pyx_L1_error);
    __Pyx_INCREF((PyObject *)__pyx_v_R);
    __Pyx_GIVEREF((PyObject *)__pyx_v_R);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, ((PyObject *)__pyx_v_R))) __PYX_ERR(5, 260, __pyx_L1_error);
    __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_19DifferentialAlgebra_RegularDifferentialChain), __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 260, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_GIVEREF(__pyx_t_2);
    __Pyx_GOTREF((PyObject *)__pyx_v_self->rels);
    __Pyx_DECREF((PyObject *)__pyx_v_self->rels);
    __pyx_v_self->rels = ((struct __pyx_obj_19DifferentialAlgebra_RegularDifferentialChain *)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "../../bmi/sympy/BaseFieldExtension.pyx":261
 *             self.rels_are_provided = False
 *             self.rels = RegularDifferentialChain ([], R)
 *             self.gens = generators             # <<<<<<<<<<<<<<
 *             self.notation = ring.notation
 *             self.notation = self.__process_notation (notation)
 */
    __Pyx_INCREF(__pyx_v_generators);
    __Pyx_GIVEREF(__pyx_v_generators);
    __Pyx_GOTREF(__pyx_v_self->gens);
    __Pyx_DECREF(__pyx_v_self->gens);
    __pyx_v_self->gens = __pyx_v_generators;

    /* "../../bmi/sympy/BaseFieldExtension.pyx":262
 *             self.rels = RegularDifferentialChain ([], R)
 *             self.gens = generators
 *             self.notation = ring.notation             # <<<<<<<<<<<<<<
 *             self.notation = self.__process_notation (notation)
 *             self.evdict = ring.evdict
 */
    __pyx_t_2 = __pyx_v_ring->notation;
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_2);
    __Pyx_GOTREF(__pyx_v_self->notation);
    __Pyx_DECREF(__pyx_v_self->notation);
    __pyx_v_self->notation = __pyx_t_2;
    __pyx_t_2 = 0;

    /* "../../bmi/sympy/BaseFieldExtension.pyx":263
 *             self.gens = generators
 *             self.notation = ring.notation
 *             self.notation = self.__process_notation (notation)             # <<<<<<<<<<<<<<
 *             self.evdict = ring.evdict
 *             strrels = ascii (self._relations ())
 */
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_BaseFieldExtension__process_not); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 263, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_4 = NULL;
    __pyx_t_6 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
        __pyx_t_6 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_notation};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6);
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 263, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
    __Pyx_GIVEREF(__pyx_t_2);
    __Pyx_GOTREF(__pyx_v_self->notation);
    __Pyx_DECREF(__pyx_v_self->notation);
    __pyx_v_self->notation = __pyx_t_2;
    __pyx_t_2 = 0;

    /* "../../bmi/sympy/BaseFieldExtension.pyx":264
 *             self.notation = ring.notation
 *             self.notation = self.__process_notation (notation)
 *             self.evdict = ring.evdict             # <<<<<<<<<<<<<<
 *             strrels = ascii (self._relations ())
 * # It is important to remove quotes around range indexed groups otherwise
 */
    __pyx_t_2 = __pyx_v_ring->evdict;
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_2);
    __Pyx_GOTREF(__pyx_v_self->evdict);
    __Pyx_DECREF(__pyx_v_self->evdict);
    __pyx_v_self->evdict = __pyx_t_2;
    __pyx_t_2 = 0;

    /* "../../bmi/sympy/BaseFieldExtension.pyx":265
 *             self.notation = self.__process_notation (notation)
 *             self.evdict = ring.evdict
 *             strrels = ascii (self._relations ())             # <<<<<<<<<<<<<<
 * # It is important to remove quotes around range indexed groups otherwise
 * #   they will be interpreted as plain strings
 */
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_ascii); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 265, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_relations); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 265, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = NULL;
    __pyx_t_6 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
      if (likely(__pyx_t_8)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_7, function);
        __pyx_t_6 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_8, NULL};
      __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_6, 0+__pyx_t_6);
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 265, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    }
    __pyx_t_7 = NULL;
    __pyx_t_6 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
        __pyx_t_6 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_t_4};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6);
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 265, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
    if (!(likely(PyBytes_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_2))) __PYX_ERR(5, 265, __pyx_L1_error)
    __pyx_v_strrels = ((PyObject*)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "../../bmi/sympy/BaseFieldExtension.pyx":268
 * # It is important to remove quotes around range indexed groups otherwise
 * #   they will be interpreted as plain strings
 *             strgens = ascii (generators)             # <<<<<<<<<<<<<<
 *             strgens = strgens.replace (b"'", b"")
 *             A = bmi_c.bmi_dapyx_base_field_generators (
 */
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_ascii); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 268, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_4 = NULL;
    __pyx_t_6 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
        __pyx_t_6 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_generators};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6);
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 268, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
    if (!(likely(PyBytes_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_2))) __PYX_ERR(5, 268, __pyx_L1_error)
    __pyx_v_strgens = ((PyObject*)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "../../bmi/sympy/BaseFieldExtension.pyx":269
 * #   they will be interpreted as plain strings
 *             strgens = ascii (generators)
 *             strgens = strgens.replace (b"'", b"")             # <<<<<<<<<<<<<<
 *             A = bmi_c.bmi_dapyx_base_field_generators (
 *                         strgens, strrels, R.dring,
 */
    __pyx_t_2 = __Pyx_CallUnboundCMethod2(&__pyx_umethod_PyBytes_Type_replace, __pyx_v_strgens, __pyx_kp_b__6, __pyx_kp_b__7); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 269, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    if (!(likely(PyBytes_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_2))) __PYX_ERR(5, 269, __pyx_L1_error)
    __Pyx_DECREF_SET(__pyx_v_strgens, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "../../bmi/sympy/BaseFieldExtension.pyx":271
 *             strgens = strgens.replace (b"'", b"")
 *             A = bmi_c.bmi_dapyx_base_field_generators (
 *                         strgens, strrels, R.dring,             # <<<<<<<<<<<<<<
 *                         self.notation, self.notation, 0, 0)
 *             if bmi_c.bmi_dapyx_is_error (A):
 */
    if (unlikely(__pyx_v_strgens == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
      __PYX_ERR(5, 271, __pyx_L1_error)
    }
    __pyx_t_12 = __Pyx_PyBytes_AsWritableString(__pyx_v_strgens); if (unlikely((!__pyx_t_12) && PyErr_Occurred())) __PYX_ERR(5, 271, __pyx_L1_error)
    if (unlikely(__pyx_v_strrels == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
      __PYX_ERR(5, 271, __pyx_L1_error)
    }
    __pyx_t_11 = __Pyx_PyBytes_AsWritableString(__pyx_v_strrels); if (unlikely((!__pyx_t_11) && PyErr_Occurred())) __PYX_ERR(5, 271, __pyx_L1_error)

    /* "../../bmi/sympy/BaseFieldExtension.pyx":272
 *             A = bmi_c.bmi_dapyx_base_field_generators (
 *                         strgens, strrels, R.dring,
 *                         self.notation, self.notation, 0, 0)             # <<<<<<<<<<<<<<
 *             if bmi_c.bmi_dapyx_is_error (A):
 *                 mesgerr = bmi_c.bmi_dapyx_mesgerr (A)
 */
    __pyx_t_10 = __Pyx_PyObject_AsWritableString(__pyx_v_self->notation); if (unlikely((!__pyx_t_10) && PyErr_Occurred())) __PYX_ERR(5, 272, __pyx_L1_error)
    __pyx_t_9 = __Pyx_PyObject_AsWritableString(__pyx_v_self->notation); if (unlikely((!__pyx_t_9) && PyErr_Occurred())) __PYX_ERR(5, 272, __pyx_L1_error)

    /* "../../bmi/sympy/BaseFieldExtension.pyx":270
 *             strgens = ascii (generators)
 *             strgens = strgens.replace (b"'", b"")
 *             A = bmi_c.bmi_dapyx_base_field_generators (             # <<<<<<<<<<<<<<
 *                         strgens, strrels, R.dring,
 *                         self.notation, self.notation, 0, 0)
 */
    __pyx_v_A = bmi_dapyx_base_field_generators(__pyx_t_12, __pyx_t_11, __pyx_v_R->dring, __pyx_t_10, __pyx_t_9, 0, 0);

    /* "../../bmi/sympy/BaseFieldExtension.pyx":273
 *                         strgens, strrels, R.dring,
 *                         self.notation, self.notation, 0, 0)
 *             if bmi_c.bmi_dapyx_is_error (A):             # <<<<<<<<<<<<<<
 *                 mesgerr = bmi_c.bmi_dapyx_mesgerr (A)
 *                 bmi_c.bmi_balsa_clear_ALGEB (A)
 */
    __pyx_t_1 = (bmi_dapyx_is_error(__pyx_v_A) != 0);
    if (unlikely(__pyx_t_1)) {

      /* "../../bmi/sympy/BaseFieldExtension.pyx":274
 *                         self.notation, self.notation, 0, 0)
 *             if bmi_c.bmi_dapyx_is_error (A):
 *                 mesgerr = bmi_c.bmi_dapyx_mesgerr (A)             # <<<<<<<<<<<<<<
 *                 bmi_c.bmi_balsa_clear_ALGEB (A)
 *                 raise RuntimeError (str (mesgerr, 'utf-8'))
 */
      __pyx_t_2 = __Pyx_PyBytes_FromString(bmi_dapyx_mesgerr(__pyx_v_A)); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 274, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_v_mesgerr = ((PyObject*)__pyx_t_2);
      __pyx_t_2 = 0;

      /* "../../bmi/sympy/BaseFieldExtension.pyx":275
 *             if bmi_c.bmi_dapyx_is_error (A):
 *                 mesgerr = bmi_c.bmi_dapyx_mesgerr (A)
 *                 bmi_c.bmi_balsa_clear_ALGEB (A)             # <<<<<<<<<<<<<<
 *                 raise RuntimeError (str (mesgerr, 'utf-8'))
 *             self.gens = eval (A.value, globals (), self.evdict)
 */
      bmi_balsa_clear_ALGEB(__pyx_v_A);

      /* "../../bmi/sympy/BaseFieldExtension.pyx":276
 *                 mesgerr = bmi_c.bmi_dapyx_mesgerr (A)
 *                 bmi_c.bmi_balsa_clear_ALGEB (A)
 *                 raise RuntimeError (str (mesgerr, 'utf-8'))             # <<<<<<<<<<<<<<
 *             self.gens = eval (A.value, globals (), self.evdict)
 * 
 */
      __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 276, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_INCREF(__pyx_v_mesgerr);
      __Pyx_GIVEREF(__pyx_v_mesgerr);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_mesgerr)) __PYX_ERR(5, 276, __pyx_L1_error);
      __Pyx_INCREF(__pyx_kp_u_utf_8);
      __Pyx_GIVEREF(__pyx_kp_u_utf_8);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_kp_u_utf_8)) __PYX_ERR(5, 276, __pyx_L1_error);
      __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)(&PyUnicode_Type)), __pyx_t_2, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 276, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_RuntimeError, __pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 276, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_Raise(__pyx_t_2, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __PYX_ERR(5, 276, __pyx_L1_error)

      /* "../../bmi/sympy/BaseFieldExtension.pyx":273
 *                         strgens, strrels, R.dring,
 *                         self.notation, self.notation, 0, 0)
 *             if bmi_c.bmi_dapyx_is_error (A):             # <<<<<<<<<<<<<<
 *                 mesgerr = bmi_c.bmi_dapyx_mesgerr (A)
 *                 bmi_c.bmi_balsa_clear_ALGEB (A)
 */
    }

    /* "../../bmi/sympy/BaseFieldExtension.pyx":277
 *                 bmi_c.bmi_balsa_clear_ALGEB (A)
 *                 raise RuntimeError (str (mesgerr, 'utf-8'))
 *             self.gens = eval (A.value, globals (), self.evdict)             # <<<<<<<<<<<<<<
 * 
 *     def __repr__ (self):
 */
    __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v_A->value); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 277, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_5 = __Pyx_Globals(); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 277, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 277, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_2);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2)) __PYX_ERR(5, 277, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_5);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_5)) __PYX_ERR(5, 277, __pyx_L1_error);
    __Pyx_INCREF(__pyx_v_self->evdict);
    __Pyx_GIVEREF(__pyx_v_self->evdict);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_v_self->evdict)) __PYX_ERR(5, 277, __pyx_L1_error);
    __pyx_t_2 = 0;
    __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_eval, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 277, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (!(likely(PyList_CheckExact(__pyx_t_5))||((__pyx_t_5) == Py_None) || __Pyx_RaiseUnexpectedTypeError("list", __pyx_t_5))) __PYX_ERR(5, 277, __pyx_L1_error)
    __Pyx_GIVEREF(__pyx_t_5);
    __Pyx_GOTREF(__pyx_v_self->gens);
    __Pyx_DECREF(__pyx_v_self->gens);
    __pyx_v_self->gens = ((PyObject*)__pyx_t_5);
    __pyx_t_5 = 0;

    /* "../../bmi/sympy/BaseFieldExtension.pyx":255
 *                 raise RuntimeError (str (mesgerr, 'utf-8'))
 *             self.gens = eval (A.value, globals (), self.evdict)
 *         elif ring != None:             # <<<<<<<<<<<<<<
 *             if not isinstance (ring, DifferentialRing):
 *                 raise TypeError ('DifferentialRing expected for ring keyword parameter')
 */
  }
  __pyx_L3:;

  /* "../../bmi/sympy/BaseFieldExtension.pyx":179
 * 
 * # __init__
 *     def __init__ (             # <<<<<<<<<<<<<<
 *             self,
 *             list generators = [],
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("DifferentialAlgebra.BaseFieldExtension.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_R);
  __Pyx_XDECREF(__pyx_v_strgens);
  __Pyx_XDECREF(__pyx_v_strrels);
  __Pyx_XDECREF(__pyx_v_mesgerr);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "../../bmi/sympy/BaseFieldExtension.pyx":279
 *             self.gens = eval (A.value, globals (), self.evdict)
 * 
 *     def __repr__ (self):             # <<<<<<<<<<<<<<
 * #   The external representation
 *         return 'differential_field'
 */

/* Python wrapper */
static PyObject *__pyx_pw_19DifferentialAlgebra_18BaseFieldExtension_5__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_19DifferentialAlgebra_18BaseFieldExtension_5__repr__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_19DifferentialAlgebra_18BaseFieldExtension_4__repr__(((struct __pyx_obj_19DifferentialAlgebra_BaseFieldExtension *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_19DifferentialAlgebra_18BaseFieldExtension_4__repr__(CYTHON_UNUSED struct __pyx_obj_19DifferentialAlgebra_BaseFieldExtension *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__", 1);

  /* "../../bmi/sympy/BaseFieldExtension.pyx":281
 *     def __repr__ (self):
 * #   The external representation
 *         return 'differential_field'             # <<<<<<<<<<<<<<
 * 
 *     def _latex_ (self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_n_u_differential_field);
  __pyx_r = __pyx_n_u_differential_field;
  goto __pyx_L0;

  /* "../../bmi/sympy/BaseFieldExtension.pyx":279
 *             self.gens = eval (A.value, globals (), self.evdict)
 * 
 *     def __repr__ (self):             # <<<<<<<<<<<<<<
 * #   The external representation
 *         return 'differential_field'
 */

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "../../bmi/sympy/BaseFieldExtension.pyx":283
 *         return 'differential_field'
 * 
 *     def _latex_ (self):             # <<<<<<<<<<<<<<
 * #   The LaTeX representation
 *         return 'differential\\_field'
 */

/* Python wrapper */
static PyObject *__pyx_pw_19DifferentialAlgebra_18BaseFieldExtension_7_latex_(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_19DifferentialAlgebra_18BaseFieldExtension_7_latex_ = {"_latex_", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_19DifferentialAlgebra_18BaseFieldExtension_7_latex_, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_19DifferentialAlgebra_18BaseFieldExtension_7_latex_(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_latex_ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) {
    __Pyx_RaiseArgtupleInvalid("_latex_", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "_latex_", 0))) return NULL;
  __pyx_r = __pyx_pf_19DifferentialAlgebra_18BaseFieldExtension_6_latex_(((struct __pyx_obj_19DifferentialAlgebra_BaseFieldExtension *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_19DifferentialAlgebra_18BaseFieldExtension_6_latex_(CYTHON_UNUSED struct __pyx_obj_19DifferentialAlgebra_BaseFieldExtension *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_latex_", 1);

  /* "../../bmi/sympy/BaseFieldExtension.pyx":285
 *     def _latex_ (self):
 * #   The LaTeX representation
 *         return 'differential\\_field'             # <<<<<<<<<<<<<<
 * # generators
 *     def generators (self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_kp_u_differential__field);
  __pyx_r = __pyx_kp_u_differential__field;
  goto __pyx_L0;

  /* "../../bmi/sympy/BaseFieldExtension.pyx":283
 *         return 'differential_field'
 * 
 *     def _latex_ (self):             # <<<<<<<<<<<<<<
 * #   The LaTeX representation
 *         return 'differential\\_field'
 */

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "../../bmi/sympy/BaseFieldExtension.pyx":287
 *         return 'differential\\_field'
 * # generators
 *     def generators (self):             # <<<<<<<<<<<<<<
 *         r"""
 *         The list of generators of a base field extension
 */

/* Python wrapper */
static PyObject *__pyx_pw_19DifferentialAlgebra_18BaseFieldExtension_9generators(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_19DifferentialAlgebra_18BaseFieldExtension_8generators, " \n        The list of generators of a base field extension\n\n        INPUT:\n\n            Nothing\n\n        OUTPUT:\n\n            The list of generators\n\n        EXAMPLES:\n\n            >>> from sympy import *\n            >>> from DifferentialAlgebra import *\n            >>> init_printing (use_unicode = False, num_columns = 60)\n\n            >>> a,b = var ('a,b')\n            >>> R = DifferentialRing (derivations = [], blocks = [a,b])\n            >>> C = RegularDifferentialChain ([a**2 + 1], R)\n            >>> F = BaseFieldExtension (generators = [a,b], \n            ...                         relations = C)\n            >>> F.generators ()\n            [a, b]\n        ");
static PyMethodDef __pyx_mdef_19DifferentialAlgebra_18BaseFieldExtension_9generators = {"generators", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_19DifferentialAlgebra_18BaseFieldExtension_9generators, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_19DifferentialAlgebra_18BaseFieldExtension_8generators};
static PyObject *__pyx_pw_19DifferentialAlgebra_18BaseFieldExtension_9generators(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("generators (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) {
    __Pyx_RaiseArgtupleInvalid("generators", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "generators", 0))) return NULL;
  __pyx_r = __pyx_pf_19DifferentialAlgebra_18BaseFieldExtension_8generators(((struct __pyx_obj_19DifferentialAlgebra_BaseFieldExtension *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_19DifferentialAlgebra_18BaseFieldExtension_8generators(struct __pyx_obj_19DifferentialAlgebra_BaseFieldExtension *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("generators", 1);

  /* "../../bmi/sympy/BaseFieldExtension.pyx":314
 *         """
 * #
 *         return self.gens             # <<<<<<<<<<<<<<
 * # relations
 *     def relations (self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->gens);
  __pyx_r = __pyx_v_self->gens;
  goto __pyx_L0;

  /* "../../bmi/sympy/BaseFieldExtension.pyx":287
 *         return 'differential\\_field'
 * # generators
 *     def generators (self):             # <<<<<<<<<<<<<<
 *         r"""
 *         The list of generators of a base field extension
 */

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "../../bmi/sympy/BaseFieldExtension.pyx":316
 *         return self.gens
 * # relations
 *     def relations (self):             # <<<<<<<<<<<<<<
 *         r"""
 *         The regular differential chain defining the relations of a
 */

/* Python wrapper */
static PyObject *__pyx_pw_19DifferentialAlgebra_18BaseFieldExtension_11relations(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_19DifferentialAlgebra_18BaseFieldExtension_10relations, " \n        The regular differential chain defining the relations of a\n        base field extension\n\n        INPUT:\n\n            Nothing\n\n        OUTPUT:\n\n            A regular differential chain. If no relations were provided\n            at the field construction, the regular differential chain\n            is the zero chain.\n\n        EXAMPLES:\n\n            >>> from sympy import *\n            >>> from DifferentialAlgebra import *\n            >>> init_printing (use_unicode = False, num_columns = 60)\n\n            >>> a,b = var ('a,b')\n            >>> R = DifferentialRing (derivations = [], blocks = [a,b])\n            >>> C = RegularDifferentialChain ([a**2 + 1], R)\n            >>> F = BaseFieldExtension (generators = [a,b], \n            ...                         relations = C)\n            >>> F.relations ()\n            regular_differential_chain\n\n            >>> F.relations ().equations ()\n              2     \n            [a  + 1]\n        ");
static PyMethodDef __pyx_mdef_19DifferentialAlgebra_18BaseFieldExtension_11relations = {"relations", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_19DifferentialAlgebra_18BaseFieldExtension_11relations, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_19DifferentialAlgebra_18BaseFieldExtension_10relations};
static PyObject *__pyx_pw_19DifferentialAlgebra_18BaseFieldExtension_11relations(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("relations (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) {
    __Pyx_RaiseArgtupleInvalid("relations", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "relations", 0))) return NULL;
  __pyx_r = __pyx_pf_19DifferentialAlgebra_18BaseFieldExtension_10relations(((struct __pyx_obj_19DifferentialAlgebra_BaseFieldExtension *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_19DifferentialAlgebra_18BaseFieldExtension_10relations(struct __pyx_obj_19DifferentialAlgebra_BaseFieldExtension *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("relations", 1);

  /* "../../bmi/sympy/BaseFieldExtension.pyx":350
 *         """
 * #
 *         return self.rels             # <<<<<<<<<<<<<<
 * 
 * # _relations
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_self->rels);
  __pyx_r = ((PyObject *)__pyx_v_self->rels);
  goto __pyx_L0;

  /* "../../bmi/sympy/BaseFieldExtension.pyx":316
 *         return self.gens
 * # relations
 *     def relations (self):             # <<<<<<<<<<<<<<
 *         r"""
 *         The regular differential chain defining the relations of a
 */

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "../../bmi/sympy/BaseFieldExtension.pyx":353
 * 
 * # _relations
 *     def _relations (self):             # <<<<<<<<<<<<<<
 *         r"""
 *         The relations in a BMI compatible format, as a string
 */

/* Python wrapper */
static PyObject *__pyx_pw_19DifferentialAlgebra_18BaseFieldExtension_13_relations(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_19DifferentialAlgebra_18BaseFieldExtension_12_relations, " \n        The relations in a BMI compatible format, as a string\n\n        INPUT:\n\n            Nothing\n\n        OUTPUT:\n\n            A string\n\n        EXAMPLES:\n\n            >>> from sympy import *\n            >>> from DifferentialAlgebra import *\n            >>> a,b = var ('a,b')\n            >>> R = DifferentialRing (derivations = [], blocks = [a,b])\n            >>> C = RegularDifferentialChain ([a**2 + 1], R)\n            >>> F = BaseFieldExtension (generators = [a,b], \n            ...                         relations = C)\n        ");
static PyMethodDef __pyx_mdef_19DifferentialAlgebra_18BaseFieldExtension_13_relations = {"_relations", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_19DifferentialAlgebra_18BaseFieldExtension_13_relations, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_19DifferentialAlgebra_18BaseFieldExtension_12_relations};
static PyObject *__pyx_pw_19DifferentialAlgebra_18BaseFieldExtension_13_relations(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_relations (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) {
    __Pyx_RaiseArgtupleInvalid("_relations", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "_relations", 0))) return NULL;
  __pyx_r = __pyx_pf_19DifferentialAlgebra_18BaseFieldExtension_12_relations(((struct __pyx_obj_19DifferentialAlgebra_BaseFieldExtension *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_19DifferentialAlgebra_18BaseFieldExtension_12_relations(struct __pyx_obj_19DifferentialAlgebra_BaseFieldExtension *__pyx_v_self) {
  PyObject *__pyx_v_strrels = 0;
  PyObject *__pyx_v_strattr = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  unsigned int __pyx_t_5;
  Py_ssize_t __pyx_t_6;
  Py_UCS4 __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_relations", 1);

  /* "../../bmi/sympy/BaseFieldExtension.pyx":377
 * #
 *         cdef str strrels, strattr
 *         if self.rels_are_provided:             # <<<<<<<<<<<<<<
 *             strrels = str (self.rels.equations ())
 *             strattr = str (self.rels.attributes ())
 */
  __pyx_t_1 = __Pyx_PyObject_IsTrue(((PyObject *)__pyx_v_self->rels_are_provided)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(5, 377, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "../../bmi/sympy/BaseFieldExtension.pyx":378
 *         cdef str strrels, strattr
 *         if self.rels_are_provided:
 *             strrels = str (self.rels.equations ())             # <<<<<<<<<<<<<<
 *             strattr = str (self.rels.attributes ())
 *             strrels = strrels.replace ("'", "")
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->rels), __pyx_n_s_equations); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 378, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = NULL;
    __pyx_t_5 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
        __pyx_t_5 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 378, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
    __pyx_t_3 = __Pyx_PyObject_Unicode(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 378, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_v_strrels = ((PyObject*)__pyx_t_3);
    __pyx_t_3 = 0;

    /* "../../bmi/sympy/BaseFieldExtension.pyx":379
 *         if self.rels_are_provided:
 *             strrels = str (self.rels.equations ())
 *             strattr = str (self.rels.attributes ())             # <<<<<<<<<<<<<<
 *             strrels = strrels.replace ("'", "")
 *             strattr = strattr.replace ("'", "")
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->rels), __pyx_n_s_attributes); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 379, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = NULL;
    __pyx_t_5 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
        __pyx_t_5 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
      __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 379, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    __pyx_t_2 = __Pyx_PyObject_Unicode(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 379, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_strattr = ((PyObject*)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "../../bmi/sympy/BaseFieldExtension.pyx":380
 *             strrels = str (self.rels.equations ())
 *             strattr = str (self.rels.attributes ())
 *             strrels = strrels.replace ("'", "")             # <<<<<<<<<<<<<<
 *             strattr = strattr.replace ("'", "")
 *             return 'regchain (%s, %s)' % (strrels, strattr)
 */
    __pyx_t_2 = PyUnicode_Replace(__pyx_v_strrels, __pyx_kp_u__6, __pyx_kp_u__7, -1L); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 380, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF_SET(__pyx_v_strrels, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "../../bmi/sympy/BaseFieldExtension.pyx":381
 *             strattr = str (self.rels.attributes ())
 *             strrels = strrels.replace ("'", "")
 *             strattr = strattr.replace ("'", "")             # <<<<<<<<<<<<<<
 *             return 'regchain (%s, %s)' % (strrels, strattr)
 *         else:
 */
    __pyx_t_2 = PyUnicode_Replace(__pyx_v_strattr, __pyx_kp_u__6, __pyx_kp_u__7, -1L); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 381, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF_SET(__pyx_v_strattr, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "../../bmi/sympy/BaseFieldExtension.pyx":382
 *             strrels = strrels.replace ("'", "")
 *             strattr = strattr.replace ("'", "")
 *             return 'regchain (%s, %s)' % (strrels, strattr)             # <<<<<<<<<<<<<<
 *         else:
 *             return 'regchain ([], [])'
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = PyTuple_New(5); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 382, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_6 = 0;
    __pyx_t_7 = 127;
    __Pyx_INCREF(__pyx_kp_u_regchain);
    __pyx_t_6 += 10;
    __Pyx_GIVEREF(__pyx_kp_u_regchain);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_kp_u_regchain);
    __pyx_t_3 = __Pyx_PyUnicode_Unicode(__pyx_v_strrels); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 382, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_7 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3) > __pyx_t_7) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3) : __pyx_t_7;
    __pyx_t_6 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_3);
    __pyx_t_3 = 0;
    __Pyx_INCREF(__pyx_kp_u__76);
    __pyx_t_6 += 2;
    __Pyx_GIVEREF(__pyx_kp_u__76);
    PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_kp_u__76);
    __pyx_t_3 = __Pyx_PyUnicode_Unicode(__pyx_v_strattr); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 382, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_7 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3) > __pyx_t_7) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3) : __pyx_t_7;
    __pyx_t_6 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_2, 3, __pyx_t_3);
    __pyx_t_3 = 0;
    __Pyx_INCREF(__pyx_kp_u__67);
    __pyx_t_6 += 1;
    __Pyx_GIVEREF(__pyx_kp_u__67);
    PyTuple_SET_ITEM(__pyx_t_2, 4, __pyx_kp_u__67);
    __pyx_t_3 = __Pyx_PyUnicode_Join(__pyx_t_2, 5, __pyx_t_6, __pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 382, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "../../bmi/sympy/BaseFieldExtension.pyx":377
 * #
 *         cdef str strrels, strattr
 *         if self.rels_are_provided:             # <<<<<<<<<<<<<<
 *             strrels = str (self.rels.equations ())
 *             strattr = str (self.rels.attributes ())
 */
  }

  /* "../../bmi/sympy/BaseFieldExtension.pyx":384
 *             return 'regchain (%s, %s)' % (strrels, strattr)
 *         else:
 *             return 'regchain ([], [])'             # <<<<<<<<<<<<<<
 * 
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_kp_u_regchain_2);
    __pyx_r = __pyx_kp_u_regchain_2;
    goto __pyx_L0;
  }

  /* "../../bmi/sympy/BaseFieldExtension.pyx":353
 * 
 * # _relations
 *     def _relations (self):             # <<<<<<<<<<<<<<
 *         r"""
 *         The relations in a BMI compatible format, as a string
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("DifferentialAlgebra.BaseFieldExtension._relations", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_strrels);
  __Pyx_XDECREF(__pyx_v_strattr);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "../../bmi/sympy/BaseFieldExtension.pyx":161
 * #   The default notation
 * 
 *     cdef public object evdict             # <<<<<<<<<<<<<<
 * #   A dictionary used by eval
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_19DifferentialAlgebra_18BaseFieldExtension_6evdict_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_19DifferentialAlgebra_18BaseFieldExtension_6evdict_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_19DifferentialAlgebra_18BaseFieldExtension_6evdict___get__(((struct __pyx_obj_19DifferentialAlgebra_BaseFieldExtension *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_19DifferentialAlgebra_18BaseFieldExtension_6evdict___get__(struct __pyx_obj_19DifferentialAlgebra_BaseFieldExtension *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 1);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->evdict);
  __pyx_r = __pyx_v_self->evdict;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_19DifferentialAlgebra_18BaseFieldExtension_6evdict_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_19DifferentialAlgebra_18BaseFieldExtension_6evdict_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_19DifferentialAlgebra_18BaseFieldExtension_6evdict_2__set__(((struct __pyx_obj_19DifferentialAlgebra_BaseFieldExtension *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_19DifferentialAlgebra_18BaseFieldExtension_6evdict_2__set__(struct __pyx_obj_19DifferentialAlgebra_BaseFieldExtension *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__", 1);
  __Pyx_INCREF(__pyx_v_value);
  __Pyx_GIVEREF(__pyx_v_value);
  __Pyx_GOTREF(__pyx_v_self->evdict);
  __Pyx_DECREF(__pyx_v_self->evdict);
  __pyx_v_self->evdict = __pyx_v_value;

  /* function exit code */
  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_19DifferentialAlgebra_18BaseFieldExtension_6evdict_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_19DifferentialAlgebra_18BaseFieldExtension_6evdict_5__del__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_19DifferentialAlgebra_18BaseFieldExtension_6evdict_4__del__(((struct __pyx_obj_19DifferentialAlgebra_BaseFieldExtension *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_19DifferentialAlgebra_18BaseFieldExtension_6evdict_4__del__(struct __pyx_obj_19DifferentialAlgebra_BaseFieldExtension *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__", 1);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->evdict);
  __Pyx_DECREF(__pyx_v_self->evdict);
  __pyx_v_self->evdict = Py_None;

  /* function exit code */
  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

/* Python wrapper */
static PyObject *__pyx_pw_19DifferentialAlgebra_18BaseFieldExtension_15__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_19DifferentialAlgebra_18BaseFieldExtension_15__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_19DifferentialAlgebra_18BaseFieldExtension_15__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_19DifferentialAlgebra_18BaseFieldExtension_15__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) {
    __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__reduce_cython__", 0))) return NULL;
  __pyx_r = __pyx_pf_19DifferentialAlgebra_18BaseFieldExtension_14__reduce_cython__(((struct __pyx_obj_19DifferentialAlgebra_BaseFieldExtension *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_19DifferentialAlgebra_18BaseFieldExtension_14__reduce_cython__(struct __pyx_obj_19DifferentialAlgebra_BaseFieldExtension *__pyx_v_self) {
  PyObject *__pyx_v_state = 0;
  PyObject *__pyx_v__dict = 0;
  int __pyx_v_use_setstate;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 1);

  /* "(tree fragment)":5
 *     cdef object _dict
 *     cdef bint use_setstate
 *     state = (self.evdict, self.gens, self.notation, self.rels, self.rels_are_provided)             # <<<<<<<<<<<<<<
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 */
  __pyx_t_1 = PyTuple_New(5); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_self->evdict);
  __Pyx_GIVEREF(__pyx_v_self->evdict);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self->evdict)) __PYX_ERR(1, 5, __pyx_L1_error);
  __Pyx_INCREF(__pyx_v_self->gens);
  __Pyx_GIVEREF(__pyx_v_self->gens);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_self->gens)) __PYX_ERR(1, 5, __pyx_L1_error);
  __Pyx_INCREF(__pyx_v_self->notation);
  __Pyx_GIVEREF(__pyx_v_self->notation);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_self->notation)) __PYX_ERR(1, 5, __pyx_L1_error);
  __Pyx_INCREF((PyObject *)__pyx_v_self->rels);
  __Pyx_GIVEREF((PyObject *)__pyx_v_self->rels);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 3, ((PyObject *)__pyx_v_self->rels))) __PYX_ERR(1, 5, __pyx_L1_error);
  __Pyx_INCREF((PyObject *)__pyx_v_self->rels_are_provided);
  __Pyx_GIVEREF((PyObject *)__pyx_v_self->rels_are_provided);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 4, ((PyObject *)__pyx_v_self->rels_are_provided))) __PYX_ERR(1, 5, __pyx_L1_error);
  __pyx_v_state = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "(tree fragment)":6
 *     cdef bint use_setstate
 *     state = (self.evdict, self.gens, self.notation, self.rels, self.rels_are_provided)
 *     _dict = getattr(self, '__dict__', None)             # <<<<<<<<<<<<<<
 *     if _dict is not None:
 *         state += (_dict,)
 */
  __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 6, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v__dict = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "(tree fragment)":7
 *     state = (self.evdict, self.gens, self.notation, self.rels, self.rels_are_provided)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
  __pyx_t_2 = (__pyx_v__dict != Py_None);
  if (__pyx_t_2) {

    /* "(tree fragment)":8
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 *         state += (_dict,)             # <<<<<<<<<<<<<<
 *         use_setstate = True
 *     else:
 */
    __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_v__dict);
    __Pyx_GIVEREF(__pyx_v__dict);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict)) __PYX_ERR(1, 8, __pyx_L1_error);
    __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_3));
    __pyx_t_3 = 0;

    /* "(tree fragment)":9
 *     if _dict is not None:
 *         state += (_dict,)
 *         use_setstate = True             # <<<<<<<<<<<<<<
 *     else:
 *         use_setstate = self.evdict is not None or self.gens is not None or self.notation is not None or self.rels is not None or self.rels_are_provided is not None
 */
    __pyx_v_use_setstate = 1;

    /* "(tree fragment)":7
 *     state = (self.evdict, self.gens, self.notation, self.rels, self.rels_are_provided)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
    goto __pyx_L3;
  }

  /* "(tree fragment)":11
 *         use_setstate = True
 *     else:
 *         use_setstate = self.evdict is not None or self.gens is not None or self.notation is not None or self.rels is not None or self.rels_are_provided is not None             # <<<<<<<<<<<<<<
 *     if use_setstate:
 *         return __pyx_unpickle_BaseFieldExtension, (type(self), 0x472eff0, None), state
 */
  /*else*/ {
    __pyx_t_4 = (__pyx_v_self->evdict != Py_None);
    if (!__pyx_t_4) {
    } else {
      __pyx_t_2 = __pyx_t_4;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_4 = (__pyx_v_self->gens != ((PyObject*)Py_None));
    if (!__pyx_t_4) {
    } else {
      __pyx_t_2 = __pyx_t_4;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_4 = (__pyx_v_self->notation != Py_None);
    if (!__pyx_t_4) {
    } else {
      __pyx_t_2 = __pyx_t_4;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_4 = (((PyObject *)__pyx_v_self->rels) != Py_None);
    if (!__pyx_t_4) {
    } else {
      __pyx_t_2 = __pyx_t_4;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_4 = (((PyObject *)__pyx_v_self->rels_are_provided) != Py_None);
    __pyx_t_2 = __pyx_t_4;
    __pyx_L4_bool_binop_done:;
    __pyx_v_use_setstate = __pyx_t_2;
  }
  __pyx_L3:;

  /* "(tree fragment)":12
 *     else:
 *         use_setstate = self.evdict is not None or self.gens is not None or self.notation is not None or self.rels is not None or self.rels_are_provided is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_BaseFieldExtension, (type(self), 0x472eff0, None), state
 *     else:
 */
  if (__pyx_v_use_setstate) {

    /* "(tree fragment)":13
 *         use_setstate = self.evdict is not None or self.gens is not None or self.notation is not None or self.rels is not None or self.rels_are_provided is not None
 *     if use_setstate:
 *         return __pyx_unpickle_BaseFieldExtension, (type(self), 0x472eff0, None), state             # <<<<<<<<<<<<<<
 *     else:
 *         return __pyx_unpickle_BaseFieldExtension, (type(self), 0x472eff0, state)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_pyx_unpickle_BaseFieldExtensio); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))))) __PYX_ERR(1, 13, __pyx_L1_error);
    __Pyx_INCREF(__pyx_int_74641392);
    __Pyx_GIVEREF(__pyx_int_74641392);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_74641392)) __PYX_ERR(1, 13, __pyx_L1_error);
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None)) __PYX_ERR(1, 13, __pyx_L1_error);
    __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_3);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3)) __PYX_ERR(1, 13, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_1);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_state)) __PYX_ERR(1, 13, __pyx_L1_error);
    __pyx_t_3 = 0;
    __pyx_t_1 = 0;
    __pyx_r = __pyx_t_5;
    __pyx_t_5 = 0;
    goto __pyx_L0;

    /* "(tree fragment)":12
 *     else:
 *         use_setstate = self.evdict is not None or self.gens is not None or self.notation is not None or self.rels is not None or self.rels_are_provided is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_BaseFieldExtension, (type(self), 0x472eff0, None), state
 *     else:
 */
  }

  /* "(tree fragment)":15
 *         return __pyx_unpickle_BaseFieldExtension, (type(self), 0x472eff0, None), state
 *     else:
 *         return __pyx_unpickle_BaseFieldExtension, (type(self), 0x472eff0, state)             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_BaseFieldExtension__set_state(self, __pyx_state)
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_pyx_unpickle_BaseFieldExtensio); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))))) __PYX_ERR(1, 15, __pyx_L1_error);
    __Pyx_INCREF(__pyx_int_74641392);
    __Pyx_GIVEREF(__pyx_int_74641392);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_74641392)) __PYX_ERR(1, 15, __pyx_L1_error);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state)) __PYX_ERR(1, 15, __pyx_L1_error);
    __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_5);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5)) __PYX_ERR(1, 15, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_1);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1)) __PYX_ERR(1, 15, __pyx_L1_error);
    __pyx_t_5 = 0;
    __pyx_t_1 = 0;
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;
  }

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("DifferentialAlgebra.BaseFieldExtension.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_state);
  __Pyx_XDECREF(__pyx_v__dict);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_BaseFieldExtension, (type(self), 0x472eff0, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_BaseFieldExtension__set_state(self, __pyx_state)
 */

/* Python wrapper */
static PyObject *__pyx_pw_19DifferentialAlgebra_18BaseFieldExtension_17__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_19DifferentialAlgebra_18BaseFieldExtension_17__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_19DifferentialAlgebra_18BaseFieldExtension_17__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_19DifferentialAlgebra_18BaseFieldExtension_17__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v___pyx_state = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_state,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 16, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__setstate_cython__") < 0)) __PYX_ERR(1, 16, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v___pyx_state = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 16, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("DifferentialAlgebra.BaseFieldExtension.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_19DifferentialAlgebra_18BaseFieldExtension_16__setstate_cython__(((struct __pyx_obj_19DifferentialAlgebra_BaseFieldExtension *)__pyx_v_self), __pyx_v___pyx_state);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_19DifferentialAlgebra_18BaseFieldExtension_16__setstate_cython__(struct __pyx_obj_19DifferentialAlgebra_BaseFieldExtension *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setstate_cython__", 1);

  /* "(tree fragment)":17
 *         return __pyx_unpickle_BaseFieldExtension, (type(self), 0x472eff0, state)
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_BaseFieldExtension__set_state(self, __pyx_state)             # <<<<<<<<<<<<<<
 */
  if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(1, 17, __pyx_L1_error)
  __pyx_t_1 = __pyx_f_19DifferentialAlgebra___pyx_unpickle_BaseFieldExtension__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 17, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_BaseFieldExtension, (type(self), 0x472eff0, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_BaseFieldExtension__set_state(self, __pyx_state)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("DifferentialAlgebra.BaseFieldExtension.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "../../bmi/sympy/DenefLipshitzUple.pyx":33
 * #   There is no constructor
 * 
 *     def __repr__ (self):             # <<<<<<<<<<<<<<
 * #   The external representation
 *         return 'Denef_Lipshitz_Uple'
 */

/* Python wrapper */
static PyObject *__pyx_pw_19DifferentialAlgebra_17DenefLipshitzUple_1__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_19DifferentialAlgebra_17DenefLipshitzUple_1__repr__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_19DifferentialAlgebra_17DenefLipshitzUple___repr__(((struct __pyx_obj_19DifferentialAlgebra_DenefLipshitzUple *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_19DifferentialAlgebra_17DenefLipshitzUple___repr__(CYTHON_UNUSED struct __pyx_obj_19DifferentialAlgebra_DenefLipshitzUple *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__", 1);

  /* "../../bmi/sympy/DenefLipshitzUple.pyx":35
 *     def __repr__ (self):
 * #   The external representation
 *         return 'Denef_Lipshitz_Uple'             # <<<<<<<<<<<<<<
 * 
 *     def _latex_ (self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_n_u_Denef_Lipshitz_Uple);
  __pyx_r = __pyx_n_u_Denef_Lipshitz_Uple;
  goto __pyx_L0;

  /* "../../bmi/sympy/DenefLipshitzUple.pyx":33
 * #   There is no constructor
 * 
 *     def __repr__ (self):             # <<<<<<<<<<<<<<
 * #   The external representation
 *         return 'Denef_Lipshitz_Uple'
 */

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "../../bmi/sympy/DenefLipshitzUple.pyx":37
 *         return 'Denef_Lipshitz_Uple'
 * 
 *     def _latex_ (self):             # <<<<<<<<<<<<<<
 * #   The LaTeX representation
 *         return 'Denef\\_Lipshitz\\_Uple'
 */

/* Python wrapper */
static PyObject *__pyx_pw_19DifferentialAlgebra_17DenefLipshitzUple_3_latex_(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_19DifferentialAlgebra_17DenefLipshitzUple_3_latex_ = {"_latex_", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_19DifferentialAlgebra_17DenefLipshitzUple_3_latex_, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_19DifferentialAlgebra_17DenefLipshitzUple_3_latex_(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_latex_ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) {
    __Pyx_RaiseArgtupleInvalid("_latex_", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "_latex_", 0))) return NULL;
  __pyx_r = __pyx_pf_19DifferentialAlgebra_17DenefLipshitzUple_2_latex_(((struct __pyx_obj_19DifferentialAlgebra_DenefLipshitzUple *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_19DifferentialAlgebra_17DenefLipshitzUple_2_latex_(CYTHON_UNUSED struct __pyx_obj_19DifferentialAlgebra_DenefLipshitzUple *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_latex_", 1);

  /* "../../bmi/sympy/DenefLipshitzUple.pyx":39
 *     def _latex_ (self):
 * #   The LaTeX representation
 *         return 'Denef\\_Lipshitz\\_Uple'             # <<<<<<<<<<<<<<
 * 
 *     def __dealloc__ (self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_kp_u_Denef__Lipshitz__Uple);
  __pyx_r = __pyx_kp_u_Denef__Lipshitz__Uple;
  goto __pyx_L0;

  /* "../../bmi/sympy/DenefLipshitzUple.pyx":37
 *         return 'Denef_Lipshitz_Uple'
 * 
 *     def _latex_ (self):             # <<<<<<<<<<<<<<
 * #   The LaTeX representation
 *         return 'Denef\\_Lipshitz\\_Uple'
 */

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "../../bmi/sympy/DenefLipshitzUple.pyx":41
 *         return 'Denef\\_Lipshitz\\_Uple'
 * 
 *     def __dealloc__ (self):             # <<<<<<<<<<<<<<
 * #   The destructor
 *         bmi_c.bmi_balsa_decrement_nbref (self.DLuple)
 */

/* Python wrapper */
static void __pyx_pw_19DifferentialAlgebra_17DenefLipshitzUple_5__dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_pw_19DifferentialAlgebra_17DenefLipshitzUple_5__dealloc__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_pf_19DifferentialAlgebra_17DenefLipshitzUple_4__dealloc__(((struct __pyx_obj_19DifferentialAlgebra_DenefLipshitzUple *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

static void __pyx_pf_19DifferentialAlgebra_17DenefLipshitzUple_4__dealloc__(struct __pyx_obj_19DifferentialAlgebra_DenefLipshitzUple *__pyx_v_self) {

  /* "../../bmi/sympy/DenefLipshitzUple.pyx":43
 *     def __dealloc__ (self):
 * #   The destructor
 *         bmi_c.bmi_balsa_decrement_nbref (self.DLuple)             # <<<<<<<<<<<<<<
 *         bmi_c.bmi_balsa_clear_ALGEB (self.DLuple)
 * 
 */
  bmi_balsa_decrement_nbref(__pyx_v_self->DLuple);

  /* "../../bmi/sympy/DenefLipshitzUple.pyx":44
 * #   The destructor
 *         bmi_c.bmi_balsa_decrement_nbref (self.DLuple)
 *         bmi_c.bmi_balsa_clear_ALGEB (self.DLuple)             # <<<<<<<<<<<<<<
 * 
 * # __process_notation
 */
  bmi_balsa_clear_ALGEB(__pyx_v_self->DLuple);

  /* "../../bmi/sympy/DenefLipshitzUple.pyx":41
 *         return 'Denef\\_Lipshitz\\_Uple'
 * 
 *     def __dealloc__ (self):             # <<<<<<<<<<<<<<
 * #   The destructor
 *         bmi_c.bmi_balsa_decrement_nbref (self.DLuple)
 */

  /* function exit code */
}

/* "../../bmi/sympy/DenefLipshitzUple.pyx":47
 * 
 * # __process_notation
 *     def __process_notation (self, notation) :             # <<<<<<<<<<<<<<
 *         cdef strnot
 *         if not isinstance (notation, str) :
 */

/* Python wrapper */
static PyObject *__pyx_pw_19DifferentialAlgebra_17DenefLipshitzUple_7_DenefLipshitzUple__process_notation(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_19DifferentialAlgebra_17DenefLipshitzUple_7_DenefLipshitzUple__process_notation = {"_DenefLipshitzUple__process_notation", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_19DifferentialAlgebra_17DenefLipshitzUple_7_DenefLipshitzUple__process_notation, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_19DifferentialAlgebra_17DenefLipshitzUple_7_DenefLipshitzUple__process_notation(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_notation = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_DenefLipshitzUple__process_notation (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_notation,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_notation)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(6, 47, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "_DenefLipshitzUple__process_notation") < 0)) __PYX_ERR(6, 47, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_notation = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_DenefLipshitzUple__process_notation", 1, 1, 1, __pyx_nargs); __PYX_ERR(6, 47, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("DifferentialAlgebra.DenefLipshitzUple._DenefLipshitzUple__process_notation", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_19DifferentialAlgebra_17DenefLipshitzUple_6__process_notation(((struct __pyx_obj_19DifferentialAlgebra_DenefLipshitzUple *)__pyx_v_self), __pyx_v_notation);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_19DifferentialAlgebra_17DenefLipshitzUple_6__process_notation(struct __pyx_obj_19DifferentialAlgebra_DenefLipshitzUple *__pyx_v_self, PyObject *__pyx_v_notation) {
  PyObject *__pyx_v_strnot = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  unsigned int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_DenefLipshitzUple__process_notation", 1);

  /* "../../bmi/sympy/DenefLipshitzUple.pyx":49
 *     def __process_notation (self, notation) :
 *         cdef strnot
 *         if not isinstance (notation, str) :             # <<<<<<<<<<<<<<
 *             strnot = self.notation
 *         else :
 */
  __pyx_t_1 = PyUnicode_Check(__pyx_v_notation); 
  __pyx_t_2 = (!__pyx_t_1);
  if (__pyx_t_2) {

    /* "../../bmi/sympy/DenefLipshitzUple.pyx":50
 *         cdef strnot
 *         if not isinstance (notation, str) :
 *             strnot = self.notation             # <<<<<<<<<<<<<<
 *         else :
 *             strnot = ascii (notation)
 */
    __pyx_t_3 = __pyx_v_self->notation;
    __Pyx_INCREF(__pyx_t_3);
    __pyx_v_strnot = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "../../bmi/sympy/DenefLipshitzUple.pyx":49
 *     def __process_notation (self, notation) :
 *         cdef strnot
 *         if not isinstance (notation, str) :             # <<<<<<<<<<<<<<
 *             strnot = self.notation
 *         else :
 */
    goto __pyx_L3;
  }

  /* "../../bmi/sympy/DenefLipshitzUple.pyx":52
 *             strnot = self.notation
 *         else :
 *             strnot = ascii (notation)             # <<<<<<<<<<<<<<
 *             if strnot != BMI_IX_Derivative and strnot != BMI_IX_jet:
 *                 strnot = self.notation
 */
  /*else*/ {
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_ascii); if (unlikely(!__pyx_t_4)) __PYX_ERR(6, 52, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = NULL;
    __pyx_t_6 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
        __pyx_t_6 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_v_notation};
      __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6);
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 52, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
    __pyx_v_strnot = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "../../bmi/sympy/DenefLipshitzUple.pyx":53
 *         else :
 *             strnot = ascii (notation)
 *             if strnot != BMI_IX_Derivative and strnot != BMI_IX_jet:             # <<<<<<<<<<<<<<
 *                 strnot = self.notation
 *         return strnot
 */
    __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v_19DifferentialAlgebra_BMI_IX_Derivative); if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 53, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = (__Pyx_PyBytes_Equals(__pyx_v_strnot, __pyx_t_3, Py_NE)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(6, 53, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (__pyx_t_1) {
    } else {
      __pyx_t_2 = __pyx_t_1;
      goto __pyx_L5_bool_binop_done;
    }
    __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v_19DifferentialAlgebra_BMI_IX_jet); if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 53, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = (__Pyx_PyBytes_Equals(__pyx_v_strnot, __pyx_t_3, Py_NE)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(6, 53, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_2 = __pyx_t_1;
    __pyx_L5_bool_binop_done:;
    if (__pyx_t_2) {

      /* "../../bmi/sympy/DenefLipshitzUple.pyx":54
 *             strnot = ascii (notation)
 *             if strnot != BMI_IX_Derivative and strnot != BMI_IX_jet:
 *                 strnot = self.notation             # <<<<<<<<<<<<<<
 *         return strnot
 * 
 */
      __pyx_t_3 = __pyx_v_self->notation;
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_DECREF_SET(__pyx_v_strnot, __pyx_t_3);
      __pyx_t_3 = 0;

      /* "../../bmi/sympy/DenefLipshitzUple.pyx":53
 *         else :
 *             strnot = ascii (notation)
 *             if strnot != BMI_IX_Derivative and strnot != BMI_IX_jet:             # <<<<<<<<<<<<<<
 *                 strnot = self.notation
 *         return strnot
 */
    }
  }
  __pyx_L3:;

  /* "../../bmi/sympy/DenefLipshitzUple.pyx":55
 *             if strnot != BMI_IX_Derivative and strnot != BMI_IX_jet:
 *                 strnot = self.notation
 *         return strnot             # <<<<<<<<<<<<<<
 * 
 * # DenefLipshitz
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_strnot);
  __pyx_r = __pyx_v_strnot;
  goto __pyx_L0;

  /* "../../bmi/sympy/DenefLipshitzUple.pyx":47
 * 
 * # __process_notation
 *     def __process_notation (self, notation) :             # <<<<<<<<<<<<<<
 *         cdef strnot
 *         if not isinstance (notation, str) :
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("DifferentialAlgebra.DenefLipshitzUple._DenefLipshitzUple__process_notation", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_strnot);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "../../bmi/sympy/DenefLipshitzUple.pyx":58
 * 
 * # DenefLipshitz
 *     def DenefLipshitz (             # <<<<<<<<<<<<<<
 *             self,
 *             equations,
 */

/* Python wrapper */
static PyObject *__pyx_pw_19DifferentialAlgebra_17DenefLipshitzUple_9DenefLipshitz(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_19DifferentialAlgebra_17DenefLipshitzUple_8DenefLipshitz, "\n        The DenefLipshitz algorithm\n\n        INPUT:\n\n            `equations`  -- a list of differential polynomials, differential \n                              polynomial equations or inequations\n            `notation`   -- (default: 'undefined') a string\n            `timeout`    -- (default: 0) a nonnegative integer\n            `memout`     -- (default: 0) a nonnegative integer\n\n        OUTPUT:\n\n            A possibly empty list of DenefLipshitzUple describing\n            the formal power series solutions of the current\n            DenefLipshitzUple (self) enlarged with the further\n            constraints provided by `equations`.\n\n            If the list is empty, `equations` has no formal power\n            series solution.\n\n            If it is nonempty, each of its element provides at least\n            one formal power series solution.\n\n            See the DenefLipshitz method of the DifferentialRing class.\n\n        NOTE:\n\n            The method calls the BLAD bas_Denef_Lipshitz_resume\n            function.\n\n        EXAMPLES:\n\n            >>> from sympy import *\n            >>> from DifferentialAlgebra import *\n            >>> init_printing (use_unicode = False, num_columns = 60)\n            >>> x,q = var ('x,q')\n            >>> y = indexedbase ('y')\n\n        The differential indeterminate is y. The coefficients of its\n        formal power series solutions are ... > y[3] > y[2] > y[1]\n        > y[0]:\n\n            >>> R = DifferentialRing (blocks = [y,q,'(y)[oo:-1]'], \n            ...             derivations = [x], \n            ...             parameters = [q,'(y)[oo:-1]'], \n            ...             notation = 'jet')\n\n        The differential equation of the brachistochrone problem. Its\n        solutions are a family of cycloids and the singular solution\n        y(x) = 1:\n\n            >>> eqns = [ y*y[x]**2 + y - 1 ]\n\n        The list of the differential indeterminates for which formal\n        power serie""s solutions are sought.\n\n            >>> Y = [y]\n            >>> Ybar = { y['(x,k)'] : 'y[k]' }\n\n        The DenefLipshitz algorithms distingues three cases:\n\n            >>> DL = R.DenefLipshitz (eqns, Y, Ybar, q)\n            >>> DL\n            [Denef_Lipshitz_Uple, Denef_Lipshitz_Uple, Denef_Lipshitz_ >\n            |  \n            > Uple]\n\n        Let us focus on the second one, which corresponds to the\n        regular points of the general solution. The constraints are:\n\n            >>> U = DL[1]\n            >>> U.constraints ()\n                      2                       2                   2    >\n            [y[0]*y[1]  + y[0] - 1 = 0, 2*y[0] *y[2] + 1 = 0, y[x] *y  >\n            |  \n            >                                   \n            > + y - 1 = 0, y[0] != 0, y[1] != 0]\n\n        The associated (truncated) series depends on some parameters:\n\n            >>> U.series ()\n                     2                    \n                    x                     \n            {y: - ------- + x*y[1] + y[0]}\n                        2                 \n                  4*y[0]                  \n\n        The DenefLipshitz method of the DenefLipshitzUple class permits\n        to make initial values more precise:\n\n            >>> DL2 = U.DenefLipshitz([2*y[0]-1])\n            >>> DL2\n            [Denef_Lipshitz_Uple]\n\n            >>> DL2[0].series ()\n                   2            1 \n            {y: - x  + x*y[1] + -}\n                                2 \n        ");
static PyMethodDef __pyx_mdef_19DifferentialAlgebra_17DenefLipshitzUple_9DenefLipshitz = {"DenefLipshitz", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_19DifferentialAlgebra_17DenefLipshitzUple_9DenefLipshitz, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_19DifferentialAlgebra_17DenefLipshitzUple_8DenefLipshitz};
static PyObject *__pyx_pw_19DifferentialAlgebra_17DenefLipshitzUple_9DenefLipshitz(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_equations = 0;
  PyObject *__pyx_v_notation = 0;
  int __pyx_v_timeout;
  int __pyx_v_memout;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[4] = {0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("DenefLipshitz (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_equations,&__pyx_n_s_notation,&__pyx_n_s_timeout,&__pyx_n_s_memout,0};
    values[1] = __Pyx_Arg_NewRef_FASTCALL(__pyx_k__77);
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_equations)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(6, 58, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_notation);
          if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(6, 58, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_timeout);
          if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(6, 58, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_memout);
          if (value) { values[3] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(6, 58, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "DenefLipshitz") < 0)) __PYX_ERR(6, 58, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_equations = values[0];
    __pyx_v_notation = values[1];
    if (values[2]) {
      __pyx_v_timeout = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_timeout == (int)-1) && PyErr_Occurred())) __PYX_ERR(6, 62, __pyx_L3_error)
    } else {
      __pyx_v_timeout = ((int)0);
    }
    if (values[3]) {
      __pyx_v_memout = __Pyx_PyInt_As_int(values[3]); if (unlikely((__pyx_v_memout == (int)-1) && PyErr_Occurred())) __PYX_ERR(6, 63, __pyx_L3_error)
    } else {
      __pyx_v_memout = ((int)0);
    }
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("DenefLipshitz", 0, 1, 4, __pyx_nargs); __PYX_ERR(6, 58, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("DifferentialAlgebra.DenefLipshitzUple.DenefLipshitz", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_19DifferentialAlgebra_17DenefLipshitzUple_8DenefLipshitz(((struct __pyx_obj_19DifferentialAlgebra_DenefLipshitzUple *)__pyx_v_self), __pyx_v_equations, __pyx_v_notation, __pyx_v_timeout, __pyx_v_memout);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_19DifferentialAlgebra_17DenefLipshitzUple_8DenefLipshitz(struct __pyx_obj_19DifferentialAlgebra_DenefLipshitzUple *__pyx_v_self, PyObject *__pyx_v_equations, PyObject *__pyx_v_notation, int __pyx_v_timeout, int __pyx_v_memout) {
  PyObject *__pyx_v_result = 0;
  PyObject *__pyx_v_eqns = 0;
  PyObject *__pyx_v_ineq = 0;
  PyObject *__pyx_v_M = 0;
  struct __pyx_obj_19DifferentialAlgebra_DenefLipshitzUple *__pyx_v_U = 0;
  struct __pyx_obj_19DifferentialAlgebra_RegularDifferentialChain *__pyx_v_C = 0;
  ALGEB_listof_list __pyx_v_L;
  ALGEB_listof_string __pyx_v_L1;
  ALGEB_list __pyx_v_L2;
  ALGEB_list __pyx_v_L3;
  PyObject *__pyx_v_mesgerr = 0;
  PyObject *__pyx_v_streqns = 0;
  PyObject *__pyx_v_strineq = 0;
  PyObject *__pyx_v_strnot = 0;
  ba0_int_p __pyx_v_i;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  unsigned int __pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *(*__pyx_t_7)(PyObject *);
  char *__pyx_t_8;
  char *__pyx_t_9;
  char *__pyx_t_10;
  char *__pyx_t_11;
  ba0_int_p __pyx_t_12;
  ba0_int_p __pyx_t_13;
  ba0_int_p __pyx_t_14;
  int __pyx_t_15;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("DenefLipshitz", 1);

  /* "../../bmi/sympy/DenefLipshitzUple.pyx":174
 *         cdef strnot
 * #
 *         strnot = self.__process_notation (notation)             # <<<<<<<<<<<<<<
 *         if isinstance (equations, list):
 *             eqns, ineq = self.dring._process_equations (equations, strnot)
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_DenefLipshitzUple__process_nota); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 174, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_notation};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 174, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_v_strnot = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "../../bmi/sympy/DenefLipshitzUple.pyx":175
 * #
 *         strnot = self.__process_notation (notation)
 *         if isinstance (equations, list):             # <<<<<<<<<<<<<<
 *             eqns, ineq = self.dring._process_equations (equations, strnot)
 *         else:
 */
  __pyx_t_5 = PyList_Check(__pyx_v_equations); 
  if (__pyx_t_5) {

    /* "../../bmi/sympy/DenefLipshitzUple.pyx":176
 *         strnot = self.__process_notation (notation)
 *         if isinstance (equations, list):
 *             eqns, ineq = self.dring._process_equations (equations, strnot)             # <<<<<<<<<<<<<<
 *         else:
 *             eqns, ineq = self.dring._process_equations ([equations], strnot)
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->dring), __pyx_n_s_process_equations); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 176, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = NULL;
    __pyx_t_4 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
        __pyx_t_4 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_v_equations, __pyx_v_strnot};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 2+__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 176, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
      PyObject* sequence = __pyx_t_1;
      Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
      if (unlikely(size != 2)) {
        if (size > 2) __Pyx_RaiseTooManyValuesError(2);
        else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
        __PYX_ERR(6, 176, __pyx_L1_error)
      }
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      if (likely(PyTuple_CheckExact(sequence))) {
        __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); 
        __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); 
      } else {
        __pyx_t_2 = PyList_GET_ITEM(sequence, 0); 
        __pyx_t_3 = PyList_GET_ITEM(sequence, 1); 
      }
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      #else
      __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 176, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 176, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    } else {
      Py_ssize_t index = -1;
      __pyx_t_6 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(6, 176, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_7 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_6);
      index = 0; __pyx_t_2 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_2)) goto __pyx_L4_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_2);
      index = 1; __pyx_t_3 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_3)) goto __pyx_L4_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_3);
      if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_6), 2) < 0) __PYX_ERR(6, 176, __pyx_L1_error)
      __pyx_t_7 = NULL;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      goto __pyx_L5_unpacking_done;
      __pyx_L4_unpacking_failed:;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_7 = NULL;
      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
      __PYX_ERR(6, 176, __pyx_L1_error)
      __pyx_L5_unpacking_done:;
    }
    if (!(likely(PyList_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None) || __Pyx_RaiseUnexpectedTypeError("list", __pyx_t_2))) __PYX_ERR(6, 176, __pyx_L1_error)
    if (!(likely(PyList_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None) || __Pyx_RaiseUnexpectedTypeError("list", __pyx_t_3))) __PYX_ERR(6, 176, __pyx_L1_error)
    __pyx_v_eqns = ((PyObject*)__pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_v_ineq = ((PyObject*)__pyx_t_3);
    __pyx_t_3 = 0;

    /* "../../bmi/sympy/DenefLipshitzUple.pyx":175
 * #
 *         strnot = self.__process_notation (notation)
 *         if isinstance (equations, list):             # <<<<<<<<<<<<<<
 *             eqns, ineq = self.dring._process_equations (equations, strnot)
 *         else:
 */
    goto __pyx_L3;
  }

  /* "../../bmi/sympy/DenefLipshitzUple.pyx":178
 *             eqns, ineq = self.dring._process_equations (equations, strnot)
 *         else:
 *             eqns, ineq = self.dring._process_equations ([equations], strnot)             # <<<<<<<<<<<<<<
 *         streqns = ascii (eqns)
 *         strineq = ascii (ineq)
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->dring), __pyx_n_s_process_equations); if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 178, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 178, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_v_equations);
    __Pyx_GIVEREF(__pyx_v_equations);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 0, __pyx_v_equations)) __PYX_ERR(6, 178, __pyx_L1_error);
    __pyx_t_6 = NULL;
    __pyx_t_4 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
        __pyx_t_4 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[3] = {__pyx_t_6, __pyx_t_2, __pyx_v_strnot};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 2+__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 178, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
    if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
      PyObject* sequence = __pyx_t_1;
      Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
      if (unlikely(size != 2)) {
        if (size > 2) __Pyx_RaiseTooManyValuesError(2);
        else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
        __PYX_ERR(6, 178, __pyx_L1_error)
      }
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      if (likely(PyTuple_CheckExact(sequence))) {
        __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); 
        __pyx_t_2 = PyTuple_GET_ITEM(sequence, 1); 
      } else {
        __pyx_t_3 = PyList_GET_ITEM(sequence, 0); 
        __pyx_t_2 = PyList_GET_ITEM(sequence, 1); 
      }
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      #else
      __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 178, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_2 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 178, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    } else {
      Py_ssize_t index = -1;
      __pyx_t_6 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(6, 178, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_7 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_6);
      index = 0; __pyx_t_3 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_3)) goto __pyx_L6_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_3);
      index = 1; __pyx_t_2 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_2)) goto __pyx_L6_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_2);
      if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_6), 2) < 0) __PYX_ERR(6, 178, __pyx_L1_error)
      __pyx_t_7 = NULL;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      goto __pyx_L7_unpacking_done;
      __pyx_L6_unpacking_failed:;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_7 = NULL;
      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
      __PYX_ERR(6, 178, __pyx_L1_error)
      __pyx_L7_unpacking_done:;
    }
    if (!(likely(PyList_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None) || __Pyx_RaiseUnexpectedTypeError("list", __pyx_t_3))) __PYX_ERR(6, 178, __pyx_L1_error)
    if (!(likely(PyList_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None) || __Pyx_RaiseUnexpectedTypeError("list", __pyx_t_2))) __PYX_ERR(6, 178, __pyx_L1_error)
    __pyx_v_eqns = ((PyObject*)__pyx_t_3);
    __pyx_t_3 = 0;
    __pyx_v_ineq = ((PyObject*)__pyx_t_2);
    __pyx_t_2 = 0;
  }
  __pyx_L3:;

  /* "../../bmi/sympy/DenefLipshitzUple.pyx":179
 *         else:
 *             eqns, ineq = self.dring._process_equations ([equations], strnot)
 *         streqns = ascii (eqns)             # <<<<<<<<<<<<<<
 *         strineq = ascii (ineq)
 *         L = bmi_c.bmi_dapyx_DenefLipshitz_extend (
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ascii); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 179, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_eqns};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 179, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  if (!(likely(PyBytes_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_1))) __PYX_ERR(6, 179, __pyx_L1_error)
  __pyx_v_streqns = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "../../bmi/sympy/DenefLipshitzUple.pyx":180
 *             eqns, ineq = self.dring._process_equations ([equations], strnot)
 *         streqns = ascii (eqns)
 *         strineq = ascii (ineq)             # <<<<<<<<<<<<<<
 *         L = bmi_c.bmi_dapyx_DenefLipshitz_extend (
 *                 streqns, strineq, self.DLuple, self.notation,
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ascii); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 180, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_ineq};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 180, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  if (!(likely(PyBytes_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_1))) __PYX_ERR(6, 180, __pyx_L1_error)
  __pyx_v_strineq = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "../../bmi/sympy/DenefLipshitzUple.pyx":182
 *         strineq = ascii (ineq)
 *         L = bmi_c.bmi_dapyx_DenefLipshitz_extend (
 *                 streqns, strineq, self.DLuple, self.notation,             # <<<<<<<<<<<<<<
 *                 strnot, timeout, memout)
 * # Borrowed from DifferentialRing.DenefLipshitz
 */
  if (unlikely(__pyx_v_streqns == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
    __PYX_ERR(6, 182, __pyx_L1_error)
  }
  __pyx_t_8 = __Pyx_PyBytes_AsWritableString(__pyx_v_streqns); if (unlikely((!__pyx_t_8) && PyErr_Occurred())) __PYX_ERR(6, 182, __pyx_L1_error)
  if (unlikely(__pyx_v_strineq == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
    __PYX_ERR(6, 182, __pyx_L1_error)
  }
  __pyx_t_9 = __Pyx_PyBytes_AsWritableString(__pyx_v_strineq); if (unlikely((!__pyx_t_9) && PyErr_Occurred())) __PYX_ERR(6, 182, __pyx_L1_error)
  __pyx_t_10 = __Pyx_PyObject_AsWritableString(__pyx_v_self->notation); if (unlikely((!__pyx_t_10) && PyErr_Occurred())) __PYX_ERR(6, 182, __pyx_L1_error)

  /* "../../bmi/sympy/DenefLipshitzUple.pyx":183
 *         L = bmi_c.bmi_dapyx_DenefLipshitz_extend (
 *                 streqns, strineq, self.DLuple, self.notation,
 *                 strnot, timeout, memout)             # <<<<<<<<<<<<<<
 * # Borrowed from DifferentialRing.DenefLipshitz
 *         if bmi_c.bmi_dapyx_is_error (L):
 */
  __pyx_t_11 = __Pyx_PyObject_AsWritableString(__pyx_v_strnot); if (unlikely((!__pyx_t_11) && PyErr_Occurred())) __PYX_ERR(6, 183, __pyx_L1_error)

  /* "../../bmi/sympy/DenefLipshitzUple.pyx":181
 *         streqns = ascii (eqns)
 *         strineq = ascii (ineq)
 *         L = bmi_c.bmi_dapyx_DenefLipshitz_extend (             # <<<<<<<<<<<<<<
 *                 streqns, strineq, self.DLuple, self.notation,
 *                 strnot, timeout, memout)
 */
  __pyx_v_L = bmi_dapyx_DenefLipshitz_extend(__pyx_t_8, __pyx_t_9, __pyx_v_self->DLuple, __pyx_t_10, __pyx_t_11, __pyx_v_timeout, __pyx_v_memout);

  /* "../../bmi/sympy/DenefLipshitzUple.pyx":185
 *                 strnot, timeout, memout)
 * # Borrowed from DifferentialRing.DenefLipshitz
 *         if bmi_c.bmi_dapyx_is_error (L):             # <<<<<<<<<<<<<<
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (L)
 *             bmi_c.bmi_balsa_clear_ALGEB (L)
 */
  __pyx_t_5 = (bmi_dapyx_is_error(__pyx_v_L) != 0);
  if (unlikely(__pyx_t_5)) {

    /* "../../bmi/sympy/DenefLipshitzUple.pyx":186
 * # Borrowed from DifferentialRing.DenefLipshitz
 *         if bmi_c.bmi_dapyx_is_error (L):
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (L)             # <<<<<<<<<<<<<<
 *             bmi_c.bmi_balsa_clear_ALGEB (L)
 *             raise RuntimeError (str (mesgerr, 'utf-8'))
 */
    __pyx_t_1 = __Pyx_PyBytes_FromString(bmi_dapyx_mesgerr(__pyx_v_L)); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 186, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_v_mesgerr = ((PyObject*)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "../../bmi/sympy/DenefLipshitzUple.pyx":187
 *         if bmi_c.bmi_dapyx_is_error (L):
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (L)
 *             bmi_c.bmi_balsa_clear_ALGEB (L)             # <<<<<<<<<<<<<<
 *             raise RuntimeError (str (mesgerr, 'utf-8'))
 *         L1 = <bmi_c.ALGEB_listof_string>L.value.tab [1]
 */
    bmi_balsa_clear_ALGEB(__pyx_v_L);

    /* "../../bmi/sympy/DenefLipshitzUple.pyx":188
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (L)
 *             bmi_c.bmi_balsa_clear_ALGEB (L)
 *             raise RuntimeError (str (mesgerr, 'utf-8'))             # <<<<<<<<<<<<<<
 *         L1 = <bmi_c.ALGEB_listof_string>L.value.tab [1]
 *         L2 = <bmi_c.ALGEB_list>L.value.tab [2]
 */
    __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 188, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_v_mesgerr);
    __Pyx_GIVEREF(__pyx_v_mesgerr);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_mesgerr)) __PYX_ERR(6, 188, __pyx_L1_error);
    __Pyx_INCREF(__pyx_kp_u_utf_8);
    __Pyx_GIVEREF(__pyx_kp_u_utf_8);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_kp_u_utf_8)) __PYX_ERR(6, 188, __pyx_L1_error);
    __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)(&PyUnicode_Type)), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 188, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_RuntimeError, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 188, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(6, 188, __pyx_L1_error)

    /* "../../bmi/sympy/DenefLipshitzUple.pyx":185
 *                 strnot, timeout, memout)
 * # Borrowed from DifferentialRing.DenefLipshitz
 *         if bmi_c.bmi_dapyx_is_error (L):             # <<<<<<<<<<<<<<
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (L)
 *             bmi_c.bmi_balsa_clear_ALGEB (L)
 */
  }

  /* "../../bmi/sympy/DenefLipshitzUple.pyx":189
 *             bmi_c.bmi_balsa_clear_ALGEB (L)
 *             raise RuntimeError (str (mesgerr, 'utf-8'))
 *         L1 = <bmi_c.ALGEB_listof_string>L.value.tab [1]             # <<<<<<<<<<<<<<
 *         L2 = <bmi_c.ALGEB_list>L.value.tab [2]
 *         L3 = <bmi_c.ALGEB_list>L.value.tab [3]
 */
  __pyx_v_L1 = ((ALGEB_listof_string)(__pyx_v_L->value->tab[1]));

  /* "../../bmi/sympy/DenefLipshitzUple.pyx":190
 *             raise RuntimeError (str (mesgerr, 'utf-8'))
 *         L1 = <bmi_c.ALGEB_listof_string>L.value.tab [1]
 *         L2 = <bmi_c.ALGEB_list>L.value.tab [2]             # <<<<<<<<<<<<<<
 *         L3 = <bmi_c.ALGEB_list>L.value.tab [3]
 *         result = []
 */
  __pyx_v_L2 = ((ALGEB_list)(__pyx_v_L->value->tab[2]));

  /* "../../bmi/sympy/DenefLipshitzUple.pyx":191
 *         L1 = <bmi_c.ALGEB_listof_string>L.value.tab [1]
 *         L2 = <bmi_c.ALGEB_list>L.value.tab [2]
 *         L3 = <bmi_c.ALGEB_list>L.value.tab [3]             # <<<<<<<<<<<<<<
 *         result = []
 *         for i in range (1, L1.value.size) :
 */
  __pyx_v_L3 = ((ALGEB_list)(__pyx_v_L->value->tab[3]));

  /* "../../bmi/sympy/DenefLipshitzUple.pyx":192
 *         L2 = <bmi_c.ALGEB_list>L.value.tab [2]
 *         L3 = <bmi_c.ALGEB_list>L.value.tab [3]
 *         result = []             # <<<<<<<<<<<<<<
 *         for i in range (1, L1.value.size) :
 *             M = eval (L1.value.tab[i].value, globals (), self.evdict)
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 192, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_result = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "../../bmi/sympy/DenefLipshitzUple.pyx":193
 *         L3 = <bmi_c.ALGEB_list>L.value.tab [3]
 *         result = []
 *         for i in range (1, L1.value.size) :             # <<<<<<<<<<<<<<
 *             M = eval (L1.value.tab[i].value, globals (), self.evdict)
 * # The RegularDifferentialChain class contains a raw pointer which cannot
 */
  __pyx_t_12 = __pyx_v_L1->value->size;
  __pyx_t_13 = __pyx_t_12;
  for (__pyx_t_14 = 1; __pyx_t_14 < __pyx_t_13; __pyx_t_14+=1) {
    __pyx_v_i = __pyx_t_14;

    /* "../../bmi/sympy/DenefLipshitzUple.pyx":194
 *         result = []
 *         for i in range (1, L1.value.size) :
 *             M = eval (L1.value.tab[i].value, globals (), self.evdict)             # <<<<<<<<<<<<<<
 * # The RegularDifferentialChain class contains a raw pointer which cannot
 * #   be passed to a Python function as an argument. Thus ...
 */
    __pyx_t_1 = __Pyx_PyBytes_FromString((__pyx_v_L1->value->tab[__pyx_v_i])->value); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 194, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = __Pyx_Globals(); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 194, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 194, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_1);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1)) __PYX_ERR(6, 194, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_2);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2)) __PYX_ERR(6, 194, __pyx_L1_error);
    __Pyx_INCREF(__pyx_v_self->evdict);
    __Pyx_GIVEREF(__pyx_v_self->evdict);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_self->evdict)) __PYX_ERR(6, 194, __pyx_L1_error);
    __pyx_t_1 = 0;
    __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_eval, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 194, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (!(likely(PyList_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None) || __Pyx_RaiseUnexpectedTypeError("list", __pyx_t_2))) __PYX_ERR(6, 194, __pyx_L1_error)
    __Pyx_XDECREF_SET(__pyx_v_M, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "../../bmi/sympy/DenefLipshitzUple.pyx":197
 * # The RegularDifferentialChain class contains a raw pointer which cannot
 * #   be passed to a Python function as an argument. Thus ...
 *             C = RegularDifferentialChain.__new__ (RegularDifferentialChain)             # <<<<<<<<<<<<<<
 *             C.dring = self.dring
 *             C.notation = strnot
 */
    __pyx_t_2 = ((PyObject *)__pyx_tp_new_19DifferentialAlgebra_RegularDifferentialChain(((PyTypeObject *)__pyx_ptype_19DifferentialAlgebra_RegularDifferentialChain), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 197, __pyx_L1_error)
    __Pyx_GOTREF((PyObject *)__pyx_t_2);
    __Pyx_XDECREF_SET(__pyx_v_C, ((struct __pyx_obj_19DifferentialAlgebra_RegularDifferentialChain *)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "../../bmi/sympy/DenefLipshitzUple.pyx":198
 * #   be passed to a Python function as an argument. Thus ...
 *             C = RegularDifferentialChain.__new__ (RegularDifferentialChain)
 *             C.dring = self.dring             # <<<<<<<<<<<<<<
 *             C.notation = strnot
 *             C.evdict = self.evdict
 */
    __pyx_t_2 = ((PyObject *)__pyx_v_self->dring);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_2);
    __Pyx_GOTREF((PyObject *)__pyx_v_C->dring);
    __Pyx_DECREF((PyObject *)__pyx_v_C->dring);
    __pyx_v_C->dring = ((struct __pyx_obj_19DifferentialAlgebra_DifferentialRing *)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "../../bmi/sympy/DenefLipshitzUple.pyx":199
 *             C = RegularDifferentialChain.__new__ (RegularDifferentialChain)
 *             C.dring = self.dring
 *             C.notation = strnot             # <<<<<<<<<<<<<<
 *             C.evdict = self.evdict
 *             C.regchain = L2.value.tab[i]
 */
    __Pyx_INCREF(__pyx_v_strnot);
    __Pyx_GIVEREF(__pyx_v_strnot);
    __Pyx_GOTREF(__pyx_v_C->notation);
    __Pyx_DECREF(__pyx_v_C->notation);
    __pyx_v_C->notation = __pyx_v_strnot;

    /* "../../bmi/sympy/DenefLipshitzUple.pyx":200
 *             C.dring = self.dring
 *             C.notation = strnot
 *             C.evdict = self.evdict             # <<<<<<<<<<<<<<
 *             C.regchain = L2.value.tab[i]
 *             bmi_c.bmi_balsa_increment_nbref (C.regchain)
 */
    __pyx_t_2 = __pyx_v_self->evdict;
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_2);
    __Pyx_GOTREF(__pyx_v_C->evdict);
    __Pyx_DECREF(__pyx_v_C->evdict);
    __pyx_v_C->evdict = __pyx_t_2;
    __pyx_t_2 = 0;

    /* "../../bmi/sympy/DenefLipshitzUple.pyx":201
 *             C.notation = strnot
 *             C.evdict = self.evdict
 *             C.regchain = L2.value.tab[i]             # <<<<<<<<<<<<<<
 *             bmi_c.bmi_balsa_increment_nbref (C.regchain)
 * # Same remark for the DenefLipshitzUple class
 */
    __pyx_v_C->regchain = (__pyx_v_L2->value->tab[__pyx_v_i]);

    /* "../../bmi/sympy/DenefLipshitzUple.pyx":202
 *             C.evdict = self.evdict
 *             C.regchain = L2.value.tab[i]
 *             bmi_c.bmi_balsa_increment_nbref (C.regchain)             # <<<<<<<<<<<<<<
 * # Same remark for the DenefLipshitzUple class
 *             U = DenefLipshitzUple.__new__ (DenefLipshitzUple)
 */
    bmi_balsa_increment_nbref(__pyx_v_C->regchain);

    /* "../../bmi/sympy/DenefLipshitzUple.pyx":204
 *             bmi_c.bmi_balsa_increment_nbref (C.regchain)
 * # Same remark for the DenefLipshitzUple class
 *             U = DenefLipshitzUple.__new__ (DenefLipshitzUple)             # <<<<<<<<<<<<<<
 * #
 *             U.Y = M[0]
 */
    __pyx_t_2 = ((PyObject *)__pyx_tp_new_19DifferentialAlgebra_DenefLipshitzUple(((PyTypeObject *)__pyx_ptype_19DifferentialAlgebra_DenefLipshitzUple), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 204, __pyx_L1_error)
    __Pyx_GOTREF((PyObject *)__pyx_t_2);
    __Pyx_XDECREF_SET(__pyx_v_U, ((struct __pyx_obj_19DifferentialAlgebra_DenefLipshitzUple *)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "../../bmi/sympy/DenefLipshitzUple.pyx":206
 *             U = DenefLipshitzUple.__new__ (DenefLipshitzUple)
 * #
 *             U.Y = M[0]             # <<<<<<<<<<<<<<
 *             U.Ybar = M[1]
 *             U.x = M[2]
 */
    if (unlikely(__pyx_v_M == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(6, 206, __pyx_L1_error)
    }
    __pyx_t_2 = __Pyx_GetItemInt_List(__pyx_v_M, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 206, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    if (!(likely(PyList_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None) || __Pyx_RaiseUnexpectedTypeError("list", __pyx_t_2))) __PYX_ERR(6, 206, __pyx_L1_error)
    __Pyx_GIVEREF(__pyx_t_2);
    __Pyx_GOTREF(__pyx_v_U->Y);
    __Pyx_DECREF(__pyx_v_U->Y);
    __pyx_v_U->Y = ((PyObject*)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "../../bmi/sympy/DenefLipshitzUple.pyx":207
 * #
 *             U.Y = M[0]
 *             U.Ybar = M[1]             # <<<<<<<<<<<<<<
 *             U.x = M[2]
 *             U.order = M[3]
 */
    if (unlikely(__pyx_v_M == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(6, 207, __pyx_L1_error)
    }
    __pyx_t_2 = __Pyx_GetItemInt_List(__pyx_v_M, 1, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 207, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_2);
    __Pyx_GOTREF(__pyx_v_U->Ybar);
    __Pyx_DECREF(__pyx_v_U->Ybar);
    __pyx_v_U->Ybar = __pyx_t_2;
    __pyx_t_2 = 0;

    /* "../../bmi/sympy/DenefLipshitzUple.pyx":208
 *             U.Y = M[0]
 *             U.Ybar = M[1]
 *             U.x = M[2]             # <<<<<<<<<<<<<<
 *             U.order = M[3]
 *             U.kappa = M[4]
 */
    if (unlikely(__pyx_v_M == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(6, 208, __pyx_L1_error)
    }
    __pyx_t_2 = __Pyx_GetItemInt_List(__pyx_v_M, 2, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 208, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_2);
    __Pyx_GOTREF(__pyx_v_U->x);
    __Pyx_DECREF(__pyx_v_U->x);
    __pyx_v_U->x = __pyx_t_2;
    __pyx_t_2 = 0;

    /* "../../bmi/sympy/DenefLipshitzUple.pyx":209
 *             U.Ybar = M[1]
 *             U.x = M[2]
 *             U.order = M[3]             # <<<<<<<<<<<<<<
 *             U.kappa = M[4]
 *             U.C = C
 */
    if (unlikely(__pyx_v_M == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(6, 209, __pyx_L1_error)
    }
    __pyx_t_2 = __Pyx_GetItemInt_List(__pyx_v_M, 3, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 209, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    if (!(likely(PyList_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None) || __Pyx_RaiseUnexpectedTypeError("list", __pyx_t_2))) __PYX_ERR(6, 209, __pyx_L1_error)
    __Pyx_GIVEREF(__pyx_t_2);
    __Pyx_GOTREF(__pyx_v_U->order);
    __Pyx_DECREF(__pyx_v_U->order);
    __pyx_v_U->order = ((PyObject*)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "../../bmi/sympy/DenefLipshitzUple.pyx":210
 *             U.x = M[2]
 *             U.order = M[3]
 *             U.kappa = M[4]             # <<<<<<<<<<<<<<
 *             U.C = C
 *             U.S = M[5]
 */
    if (unlikely(__pyx_v_M == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(6, 210, __pyx_L1_error)
    }
    __pyx_t_2 = __Pyx_GetItemInt_List(__pyx_v_M, 4, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 210, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    if (!(likely(PyList_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None) || __Pyx_RaiseUnexpectedTypeError("list", __pyx_t_2))) __PYX_ERR(6, 210, __pyx_L1_error)
    __Pyx_GIVEREF(__pyx_t_2);
    __Pyx_GOTREF(__pyx_v_U->kappa);
    __Pyx_DECREF(__pyx_v_U->kappa);
    __pyx_v_U->kappa = ((PyObject*)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "../../bmi/sympy/DenefLipshitzUple.pyx":211
 *             U.order = M[3]
 *             U.kappa = M[4]
 *             U.C = C             # <<<<<<<<<<<<<<
 *             U.S = M[5]
 *             U.k = M[6]
 */
    __Pyx_INCREF((PyObject *)__pyx_v_C);
    __Pyx_GIVEREF((PyObject *)__pyx_v_C);
    __Pyx_GOTREF((PyObject *)__pyx_v_U->C);
    __Pyx_DECREF((PyObject *)__pyx_v_U->C);
    __pyx_v_U->C = __pyx_v_C;

    /* "../../bmi/sympy/DenefLipshitzUple.pyx":212
 *             U.kappa = M[4]
 *             U.C = C
 *             U.S = M[5]             # <<<<<<<<<<<<<<
 *             U.k = M[6]
 *             U.r = M[7]
 */
    if (unlikely(__pyx_v_M == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(6, 212, __pyx_L1_error)
    }
    __pyx_t_2 = __Pyx_GetItemInt_List(__pyx_v_M, 5, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 212, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    if (!(likely(PyList_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None) || __Pyx_RaiseUnexpectedTypeError("list", __pyx_t_2))) __PYX_ERR(6, 212, __pyx_L1_error)
    __Pyx_GIVEREF(__pyx_t_2);
    __Pyx_GOTREF(__pyx_v_U->S);
    __Pyx_DECREF(__pyx_v_U->S);
    __pyx_v_U->S = ((PyObject*)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "../../bmi/sympy/DenefLipshitzUple.pyx":213
 *             U.C = C
 *             U.S = M[5]
 *             U.k = M[6]             # <<<<<<<<<<<<<<
 *             U.r = M[7]
 *             U.q = M[8]
 */
    if (unlikely(__pyx_v_M == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(6, 213, __pyx_L1_error)
    }
    __pyx_t_2 = __Pyx_GetItemInt_List(__pyx_v_M, 6, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 213, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    if (!(likely(PyList_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None) || __Pyx_RaiseUnexpectedTypeError("list", __pyx_t_2))) __PYX_ERR(6, 213, __pyx_L1_error)
    __Pyx_GIVEREF(__pyx_t_2);
    __Pyx_GOTREF(__pyx_v_U->k);
    __Pyx_DECREF(__pyx_v_U->k);
    __pyx_v_U->k = ((PyObject*)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "../../bmi/sympy/DenefLipshitzUple.pyx":214
 *             U.S = M[5]
 *             U.k = M[6]
 *             U.r = M[7]             # <<<<<<<<<<<<<<
 *             U.q = M[8]
 *             U.A = M[9]
 */
    if (unlikely(__pyx_v_M == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(6, 214, __pyx_L1_error)
    }
    __pyx_t_2 = __Pyx_GetItemInt_List(__pyx_v_M, 7, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 214, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    if (!(likely(PyList_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None) || __Pyx_RaiseUnexpectedTypeError("list", __pyx_t_2))) __PYX_ERR(6, 214, __pyx_L1_error)
    __Pyx_GIVEREF(__pyx_t_2);
    __Pyx_GOTREF(__pyx_v_U->r);
    __Pyx_DECREF(__pyx_v_U->r);
    __pyx_v_U->r = ((PyObject*)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "../../bmi/sympy/DenefLipshitzUple.pyx":215
 *             U.k = M[6]
 *             U.r = M[7]
 *             U.q = M[8]             # <<<<<<<<<<<<<<
 *             U.A = M[9]
 *             U.gamma = M[10]
 */
    if (unlikely(__pyx_v_M == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(6, 215, __pyx_L1_error)
    }
    __pyx_t_2 = __Pyx_GetItemInt_List(__pyx_v_M, 8, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 215, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_2);
    __Pyx_GOTREF(__pyx_v_U->q);
    __Pyx_DECREF(__pyx_v_U->q);
    __pyx_v_U->q = __pyx_t_2;
    __pyx_t_2 = 0;

    /* "../../bmi/sympy/DenefLipshitzUple.pyx":216
 *             U.r = M[7]
 *             U.q = M[8]
 *             U.A = M[9]             # <<<<<<<<<<<<<<
 *             U.gamma = M[10]
 *             U.mu = M[11]
 */
    if (unlikely(__pyx_v_M == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(6, 216, __pyx_L1_error)
    }
    __pyx_t_2 = __Pyx_GetItemInt_List(__pyx_v_M, 9, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 216, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    if (!(likely(PyList_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None) || __Pyx_RaiseUnexpectedTypeError("list", __pyx_t_2))) __PYX_ERR(6, 216, __pyx_L1_error)
    __Pyx_GIVEREF(__pyx_t_2);
    __Pyx_GOTREF(__pyx_v_U->A);
    __Pyx_DECREF(__pyx_v_U->A);
    __pyx_v_U->A = ((PyObject*)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "../../bmi/sympy/DenefLipshitzUple.pyx":217
 *             U.q = M[8]
 *             U.A = M[9]
 *             U.gamma = M[10]             # <<<<<<<<<<<<<<
 *             U.mu = M[11]
 *             U.sigma = M[12]
 */
    if (unlikely(__pyx_v_M == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(6, 217, __pyx_L1_error)
    }
    __pyx_t_2 = __Pyx_GetItemInt_List(__pyx_v_M, 10, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 217, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    if (!(likely(PyList_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None) || __Pyx_RaiseUnexpectedTypeError("list", __pyx_t_2))) __PYX_ERR(6, 217, __pyx_L1_error)
    __Pyx_GIVEREF(__pyx_t_2);
    __Pyx_GOTREF(__pyx_v_U->gamma);
    __Pyx_DECREF(__pyx_v_U->gamma);
    __pyx_v_U->gamma = ((PyObject*)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "../../bmi/sympy/DenefLipshitzUple.pyx":218
 *             U.A = M[9]
 *             U.gamma = M[10]
 *             U.mu = M[11]             # <<<<<<<<<<<<<<
 *             U.sigma = M[12]
 *             U.beta = M[13]
 */
    if (unlikely(__pyx_v_M == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(6, 218, __pyx_L1_error)
    }
    __pyx_t_2 = __Pyx_GetItemInt_List(__pyx_v_M, 11, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 218, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    if (!(likely(PyList_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None) || __Pyx_RaiseUnexpectedTypeError("list", __pyx_t_2))) __PYX_ERR(6, 218, __pyx_L1_error)
    __Pyx_GIVEREF(__pyx_t_2);
    __Pyx_GOTREF(__pyx_v_U->mu);
    __Pyx_DECREF(__pyx_v_U->mu);
    __pyx_v_U->mu = ((PyObject*)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "../../bmi/sympy/DenefLipshitzUple.pyx":219
 *             U.gamma = M[10]
 *             U.mu = M[11]
 *             U.sigma = M[12]             # <<<<<<<<<<<<<<
 *             U.beta = M[13]
 *             U.delta = M[14]
 */
    if (unlikely(__pyx_v_M == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(6, 219, __pyx_L1_error)
    }
    __pyx_t_2 = __Pyx_GetItemInt_List(__pyx_v_M, 12, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 219, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    if (!(likely(PyList_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None) || __Pyx_RaiseUnexpectedTypeError("list", __pyx_t_2))) __PYX_ERR(6, 219, __pyx_L1_error)
    __Pyx_GIVEREF(__pyx_t_2);
    __Pyx_GOTREF(__pyx_v_U->sigma);
    __Pyx_DECREF(__pyx_v_U->sigma);
    __pyx_v_U->sigma = ((PyObject*)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "../../bmi/sympy/DenefLipshitzUple.pyx":220
 *             U.mu = M[11]
 *             U.sigma = M[12]
 *             U.beta = M[13]             # <<<<<<<<<<<<<<
 *             U.delta = M[14]
 * #
 */
    if (unlikely(__pyx_v_M == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(6, 220, __pyx_L1_error)
    }
    __pyx_t_2 = __Pyx_GetItemInt_List(__pyx_v_M, 13, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 220, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    if (!(likely(PyList_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None) || __Pyx_RaiseUnexpectedTypeError("list", __pyx_t_2))) __PYX_ERR(6, 220, __pyx_L1_error)
    __Pyx_GIVEREF(__pyx_t_2);
    __Pyx_GOTREF(__pyx_v_U->beta);
    __Pyx_DECREF(__pyx_v_U->beta);
    __pyx_v_U->beta = ((PyObject*)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "../../bmi/sympy/DenefLipshitzUple.pyx":221
 *             U.sigma = M[12]
 *             U.beta = M[13]
 *             U.delta = M[14]             # <<<<<<<<<<<<<<
 * #
 *             U.notation = strnot
 */
    if (unlikely(__pyx_v_M == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(6, 221, __pyx_L1_error)
    }
    __pyx_t_2 = __Pyx_GetItemInt_List(__pyx_v_M, 14, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 221, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    if (!(likely(PyList_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None) || __Pyx_RaiseUnexpectedTypeError("list", __pyx_t_2))) __PYX_ERR(6, 221, __pyx_L1_error)
    __Pyx_GIVEREF(__pyx_t_2);
    __Pyx_GOTREF(__pyx_v_U->delta);
    __Pyx_DECREF(__pyx_v_U->delta);
    __pyx_v_U->delta = ((PyObject*)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "../../bmi/sympy/DenefLipshitzUple.pyx":223
 *             U.delta = M[14]
 * #
 *             U.notation = strnot             # <<<<<<<<<<<<<<
 *             U.dring = self.dring
 *             U.evdict = self.evdict
 */
    __Pyx_INCREF(__pyx_v_strnot);
    __Pyx_GIVEREF(__pyx_v_strnot);
    __Pyx_GOTREF(__pyx_v_U->notation);
    __Pyx_DECREF(__pyx_v_U->notation);
    __pyx_v_U->notation = __pyx_v_strnot;

    /* "../../bmi/sympy/DenefLipshitzUple.pyx":224
 * #
 *             U.notation = strnot
 *             U.dring = self.dring             # <<<<<<<<<<<<<<
 *             U.evdict = self.evdict
 * #
 */
    __pyx_t_2 = ((PyObject *)__pyx_v_self->dring);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_2);
    __Pyx_GOTREF((PyObject *)__pyx_v_U->dring);
    __Pyx_DECREF((PyObject *)__pyx_v_U->dring);
    __pyx_v_U->dring = ((struct __pyx_obj_19DifferentialAlgebra_DifferentialRing *)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "../../bmi/sympy/DenefLipshitzUple.pyx":225
 *             U.notation = strnot
 *             U.dring = self.dring
 *             U.evdict = self.evdict             # <<<<<<<<<<<<<<
 * #
 *             U.DLuple = L3.value.tab[i]
 */
    __pyx_t_2 = __pyx_v_self->evdict;
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_2);
    __Pyx_GOTREF(__pyx_v_U->evdict);
    __Pyx_DECREF(__pyx_v_U->evdict);
    __pyx_v_U->evdict = __pyx_t_2;
    __pyx_t_2 = 0;

    /* "../../bmi/sympy/DenefLipshitzUple.pyx":227
 *             U.evdict = self.evdict
 * #
 *             U.DLuple = L3.value.tab[i]             # <<<<<<<<<<<<<<
 *             bmi_c.bmi_balsa_increment_nbref (U.DLuple)
 * #
 */
    __pyx_v_U->DLuple = (__pyx_v_L3->value->tab[__pyx_v_i]);

    /* "../../bmi/sympy/DenefLipshitzUple.pyx":228
 * #
 *             U.DLuple = L3.value.tab[i]
 *             bmi_c.bmi_balsa_increment_nbref (U.DLuple)             # <<<<<<<<<<<<<<
 * #
 *             result.append (U)
 */
    bmi_balsa_increment_nbref(__pyx_v_U->DLuple);

    /* "../../bmi/sympy/DenefLipshitzUple.pyx":230
 *             bmi_c.bmi_balsa_increment_nbref (U.DLuple)
 * #
 *             result.append (U)             # <<<<<<<<<<<<<<
 *         bmi_c.bmi_balsa_clear_ALGEB (L)
 *         return result
 */
    __pyx_t_15 = __Pyx_PyList_Append(__pyx_v_result, ((PyObject *)__pyx_v_U)); if (unlikely(__pyx_t_15 == ((int)-1))) __PYX_ERR(6, 230, __pyx_L1_error)
  }

  /* "../../bmi/sympy/DenefLipshitzUple.pyx":231
 * #
 *             result.append (U)
 *         bmi_c.bmi_balsa_clear_ALGEB (L)             # <<<<<<<<<<<<<<
 *         return result
 * 
 */
  bmi_balsa_clear_ALGEB(__pyx_v_L);

  /* "../../bmi/sympy/DenefLipshitzUple.pyx":232
 *             result.append (U)
 *         bmi_c.bmi_balsa_clear_ALGEB (L)
 *         return result             # <<<<<<<<<<<<<<
 * 
 * # constraints
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_result);
  __pyx_r = __pyx_v_result;
  goto __pyx_L0;

  /* "../../bmi/sympy/DenefLipshitzUple.pyx":58
 * 
 * # DenefLipshitz
 *     def DenefLipshitz (             # <<<<<<<<<<<<<<
 *             self,
 *             equations,
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("DifferentialAlgebra.DenefLipshitzUple.DenefLipshitz", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XDECREF(__pyx_v_eqns);
  __Pyx_XDECREF(__pyx_v_ineq);
  __Pyx_XDECREF(__pyx_v_M);
  __Pyx_XDECREF((PyObject *)__pyx_v_U);
  __Pyx_XDECREF((PyObject *)__pyx_v_C);
  __Pyx_XDECREF(__pyx_v_mesgerr);
  __Pyx_XDECREF(__pyx_v_streqns);
  __Pyx_XDECREF(__pyx_v_strineq);
  __Pyx_XDECREF(__pyx_v_strnot);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "../../bmi/sympy/DenefLipshitzUple.pyx":235
 * 
 * # constraints
 *     def constraints (             # <<<<<<<<<<<<<<
 *             self,
 *             notation = BMI_IX_undefined,
 */

/* Python wrapper */
static PyObject *__pyx_pw_19DifferentialAlgebra_17DenefLipshitzUple_11constraints(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_19DifferentialAlgebra_17DenefLipshitzUple_10constraints, "\n        The constraints of a DenefLipshitzUple\n\n        INPUT:\n\n            `notation`   -- (default: 'undefined') a string\n            `timeout`    -- (default: 0) a nonnegative integer\n            `memout`     -- (default: 0) a nonnegative integer\n\n        OUTPUT:\n\n            The list of the equations and inequations associated to a\n            DenefLipshitzUple. The equations form a regular differential\n            chain and are made of:\n\n            - the series defining differential equations\n\n            - polynomial equations constraining the series coefficients\n\n            The inequations only apply to the series coefficients.\n\n        EXAMPLES:\n\n            >>> from sympy import *\n            >>> from DifferentialAlgebra import *\n            >>> init_printing (use_unicode = False, num_columns = 60)\n\n            >>> x,q = var ('x,q')\n            >>> y = indexedbase ('y')\n            >>> R = DifferentialRing (blocks = [y,q,'(y)[oo:-1]'], \n            ...             derivations = [x], \n            ...             parameters = [q,'(y)[oo:-1]'], \n            ...             notation = 'jet')\n\n        The differential equation of the brachistochrone problem:\n\n            >>> eqns = [ y*y[x]**2 + y - 1 ]\n\n            >>> Y = [y]\n            >>> Ybar = { y['(x,k)'] : 'y[k]' }\n\n        The DenefLipshitz algorithms distingues three cases:\n\n            >>> DL = R.DenefLipshitz (eqns, Y, Ybar, q)\n            >>> DL\n            [Denef_Lipshitz_Uple, Denef_Lipshitz_Uple, Denef_Lipshitz_ >\n            |  \n            > Uple]\n\n        Here are the constraints of the first case. The differential\n        equation defines the constant function y(x) = 1. Initial values\n        are consistent:\n\n            >>> U = DL[0]\n            >>> U.constraints ()\n            [y[0] - 1 = 0, y[1] = 0, y - 1 = 0]\n\n        Here are the constraints of the second case. The differential\n        equation defines the general solution. T""he two inequations\n        show that this case applies to the regular points of the\n        general solution:\n\n            >>> U = DL[1]\n            >>> U.constraints ()\n                      2                       2                   2    >\n            [y[0]*y[1]  + y[0] - 1 = 0, 2*y[0] *y[2] + 1 = 0, y[x] *y  >\n            |  \n            >                                   \n            > + y - 1 = 0, y[0] != 0, y[1] != 0]\n\n        Here are the constraints of the third case. The differential\n        equation defines the general solution. The two first equations\n        show that the series starts from y[0] = 1 with a horizontal\n        tangent. The other equations show hat this case corresponds\n        to the branch of the cycloid starting from y[0] = 1:\n\n            >>> U = DL[2]\n            >>> U.constraints ()\n                                                                       >\n            [y[0] - 1 = 0, y[1] = 0, 2*y[2] + 1 = 0, y[3] = 0, 2*y[4]  >\n            |  \n            >              2                          \n            > + 1 = 0, y[x] *y + y - 1 = 0, y[2] != 0]\n        ");
static PyMethodDef __pyx_mdef_19DifferentialAlgebra_17DenefLipshitzUple_11constraints = {"constraints", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_19DifferentialAlgebra_17DenefLipshitzUple_11constraints, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_19DifferentialAlgebra_17DenefLipshitzUple_10constraints};
static PyObject *__pyx_pw_19DifferentialAlgebra_17DenefLipshitzUple_11constraints(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_notation = 0;
  int __pyx_v_timeout;
  int __pyx_v_memout;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[3] = {0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("constraints (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_notation,&__pyx_n_s_timeout,&__pyx_n_s_memout,0};
    values[0] = __Pyx_Arg_NewRef_FASTCALL(__pyx_k__78);
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_notation);
          if (value) { values[0] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(6, 235, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_timeout);
          if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(6, 235, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_memout);
          if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(6, 235, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "constraints") < 0)) __PYX_ERR(6, 235, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_notation = values[0];
    if (values[1]) {
      __pyx_v_timeout = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_timeout == (int)-1) && PyErr_Occurred())) __PYX_ERR(6, 238, __pyx_L3_error)
    } else {
      __pyx_v_timeout = ((int)0);
    }
    if (values[2]) {
      __pyx_v_memout = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_memout == (int)-1) && PyErr_Occurred())) __PYX_ERR(6, 239, __pyx_L3_error)
    } else {
      __pyx_v_memout = ((int)0);
    }
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("constraints", 0, 0, 3, __pyx_nargs); __PYX_ERR(6, 235, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("DifferentialAlgebra.DenefLipshitzUple.constraints", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_19DifferentialAlgebra_17DenefLipshitzUple_10constraints(((struct __pyx_obj_19DifferentialAlgebra_DenefLipshitzUple *)__pyx_v_self), __pyx_v_notation, __pyx_v_timeout, __pyx_v_memout);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_19DifferentialAlgebra_17DenefLipshitzUple_10constraints(struct __pyx_obj_19DifferentialAlgebra_DenefLipshitzUple *__pyx_v_self, PyObject *__pyx_v_notation, int __pyx_v_timeout, int __pyx_v_memout) {
  PyObject *__pyx_v_result = 0;
  ALGEB_string __pyx_v_L;
  PyObject *__pyx_v_mesgerr = 0;
  PyObject *__pyx_v_strnot = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  unsigned int __pyx_t_4;
  char *__pyx_t_5;
  char *__pyx_t_6;
  int __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("constraints", 1);

  /* "../../bmi/sympy/DenefLipshitzUple.pyx":330
 *         cdef strnot
 * #
 *         strnot = self.__process_notation (notation)             # <<<<<<<<<<<<<<
 *         L = bmi_c.bmi_dapyx_DenefLipshitz_constraints (
 *                 self.DLuple, self.notation,
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_DenefLipshitzUple__process_nota); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 330, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_notation};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 330, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_v_strnot = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "../../bmi/sympy/DenefLipshitzUple.pyx":332
 *         strnot = self.__process_notation (notation)
 *         L = bmi_c.bmi_dapyx_DenefLipshitz_constraints (
 *                 self.DLuple, self.notation,             # <<<<<<<<<<<<<<
 *                 strnot, timeout, memout)
 *         if bmi_c.bmi_dapyx_is_error (L):
 */
  __pyx_t_5 = __Pyx_PyObject_AsWritableString(__pyx_v_self->notation); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) __PYX_ERR(6, 332, __pyx_L1_error)

  /* "../../bmi/sympy/DenefLipshitzUple.pyx":333
 *         L = bmi_c.bmi_dapyx_DenefLipshitz_constraints (
 *                 self.DLuple, self.notation,
 *                 strnot, timeout, memout)             # <<<<<<<<<<<<<<
 *         if bmi_c.bmi_dapyx_is_error (L):
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (L)
 */
  __pyx_t_6 = __Pyx_PyObject_AsWritableString(__pyx_v_strnot); if (unlikely((!__pyx_t_6) && PyErr_Occurred())) __PYX_ERR(6, 333, __pyx_L1_error)

  /* "../../bmi/sympy/DenefLipshitzUple.pyx":331
 * #
 *         strnot = self.__process_notation (notation)
 *         L = bmi_c.bmi_dapyx_DenefLipshitz_constraints (             # <<<<<<<<<<<<<<
 *                 self.DLuple, self.notation,
 *                 strnot, timeout, memout)
 */
  __pyx_v_L = bmi_dapyx_DenefLipshitz_constraints(__pyx_v_self->DLuple, __pyx_t_5, __pyx_t_6, __pyx_v_timeout, __pyx_v_memout);

  /* "../../bmi/sympy/DenefLipshitzUple.pyx":334
 *                 self.DLuple, self.notation,
 *                 strnot, timeout, memout)
 *         if bmi_c.bmi_dapyx_is_error (L):             # <<<<<<<<<<<<<<
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (L)
 *             bmi_c.bmi_balsa_clear_ALGEB (L)
 */
  __pyx_t_7 = (bmi_dapyx_is_error(__pyx_v_L) != 0);
  if (unlikely(__pyx_t_7)) {

    /* "../../bmi/sympy/DenefLipshitzUple.pyx":335
 *                 strnot, timeout, memout)
 *         if bmi_c.bmi_dapyx_is_error (L):
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (L)             # <<<<<<<<<<<<<<
 *             bmi_c.bmi_balsa_clear_ALGEB (L)
 *             raise RuntimeError (str (mesgerr, 'utf-8'))
 */
    __pyx_t_1 = __Pyx_PyBytes_FromString(bmi_dapyx_mesgerr(__pyx_v_L)); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 335, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_v_mesgerr = ((PyObject*)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "../../bmi/sympy/DenefLipshitzUple.pyx":336
 *         if bmi_c.bmi_dapyx_is_error (L):
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (L)
 *             bmi_c.bmi_balsa_clear_ALGEB (L)             # <<<<<<<<<<<<<<
 *             raise RuntimeError (str (mesgerr, 'utf-8'))
 *         result = eval (L.value, globals (), self.evdict)
 */
    bmi_balsa_clear_ALGEB(__pyx_v_L);

    /* "../../bmi/sympy/DenefLipshitzUple.pyx":337
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (L)
 *             bmi_c.bmi_balsa_clear_ALGEB (L)
 *             raise RuntimeError (str (mesgerr, 'utf-8'))             # <<<<<<<<<<<<<<
 *         result = eval (L.value, globals (), self.evdict)
 *         bmi_c.bmi_balsa_clear_ALGEB (L)
 */
    __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 337, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_v_mesgerr);
    __Pyx_GIVEREF(__pyx_v_mesgerr);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_mesgerr)) __PYX_ERR(6, 337, __pyx_L1_error);
    __Pyx_INCREF(__pyx_kp_u_utf_8);
    __Pyx_GIVEREF(__pyx_kp_u_utf_8);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_kp_u_utf_8)) __PYX_ERR(6, 337, __pyx_L1_error);
    __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)(&PyUnicode_Type)), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 337, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_RuntimeError, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 337, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(6, 337, __pyx_L1_error)

    /* "../../bmi/sympy/DenefLipshitzUple.pyx":334
 *                 self.DLuple, self.notation,
 *                 strnot, timeout, memout)
 *         if bmi_c.bmi_dapyx_is_error (L):             # <<<<<<<<<<<<<<
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (L)
 *             bmi_c.bmi_balsa_clear_ALGEB (L)
 */
  }

  /* "../../bmi/sympy/DenefLipshitzUple.pyx":338
 *             bmi_c.bmi_balsa_clear_ALGEB (L)
 *             raise RuntimeError (str (mesgerr, 'utf-8'))
 *         result = eval (L.value, globals (), self.evdict)             # <<<<<<<<<<<<<<
 *         bmi_c.bmi_balsa_clear_ALGEB (L)
 *         return result
 */
  __pyx_t_1 = __Pyx_PyBytes_FromString(__pyx_v_L->value); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 338, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_Globals(); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 338, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 338, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_1);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1)) __PYX_ERR(6, 338, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_2);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2)) __PYX_ERR(6, 338, __pyx_L1_error);
  __Pyx_INCREF(__pyx_v_self->evdict);
  __Pyx_GIVEREF(__pyx_v_self->evdict);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_self->evdict)) __PYX_ERR(6, 338, __pyx_L1_error);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_eval, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 338, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (!(likely(PyList_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None) || __Pyx_RaiseUnexpectedTypeError("list", __pyx_t_2))) __PYX_ERR(6, 338, __pyx_L1_error)
  __pyx_v_result = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "../../bmi/sympy/DenefLipshitzUple.pyx":339
 *             raise RuntimeError (str (mesgerr, 'utf-8'))
 *         result = eval (L.value, globals (), self.evdict)
 *         bmi_c.bmi_balsa_clear_ALGEB (L)             # <<<<<<<<<<<<<<
 *         return result
 * 
 */
  bmi_balsa_clear_ALGEB(__pyx_v_L);

  /* "../../bmi/sympy/DenefLipshitzUple.pyx":340
 *         result = eval (L.value, globals (), self.evdict)
 *         bmi_c.bmi_balsa_clear_ALGEB (L)
 *         return result             # <<<<<<<<<<<<<<
 * 
 * # leading_polynomial
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_result);
  __pyx_r = __pyx_v_result;
  goto __pyx_L0;

  /* "../../bmi/sympy/DenefLipshitzUple.pyx":235
 * 
 * # constraints
 *     def constraints (             # <<<<<<<<<<<<<<
 *             self,
 *             notation = BMI_IX_undefined,
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("DifferentialAlgebra.DenefLipshitzUple.constraints", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XDECREF(__pyx_v_mesgerr);
  __Pyx_XDECREF(__pyx_v_strnot);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "../../bmi/sympy/DenefLipshitzUple.pyx":343
 * 
 * # leading_polynomial
 *     def leading_polynomial (             # <<<<<<<<<<<<<<
 *             self,
 *             notation = BMI_IX_undefined,
 */

/* Python wrapper */
static PyObject *__pyx_pw_19DifferentialAlgebra_17DenefLipshitzUple_13leading_polynomial(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_19DifferentialAlgebra_17DenefLipshitzUple_12leading_polynomial, "\n        The leading polynomials of a DenefLipshitzUple\n\n        INPUT:\n\n            `notation`   -- (default: 'undefined') a string\n            `timeout`    -- (default: 0) a nonnegative integer\n            `memout`     -- (default: 0) a nonnegative integer\n\n        OUTPUT:\n\n            A dictionary associating a triple (A(q), s, d) to each\n            differential indeterminate for which formal power series\n            solutions are sought.\n\n            The polynomial A(q) is (up to some constant factor), the\n            leading coefficient of y[q+s] in the (q+d)-th derivative\n            of the defining differential equation of the corresponding\n            differential indeterminate.\n\n            An important task achieved by the DenefLipshizt function\n            consists in determining the positive integer roots of A(q).\n\n        EXAMPLES:\n\n            >>> from sympy import *\n            >>> from DifferentialAlgebra import *\n            >>> init_printing (use_unicode = False, num_columns = 60)\n\n            >>> xi,q = var ('xi,q')\n            >>> x,y = indexedbase ('x,y')\n            >>> R = DifferentialRing (derivations = [xi], \n            ...             blocks = [[x,y],q,'(x,y)[oo:-1]'], \n            ...             parameters = [q,'(x,y)[oo:-1]'], \n            ...             notation='jet')\n\n        An autonomous system encoding a nonautonomous differential\n        equation (a change of variable expressing that x = xi has\n        been performed):\n\n            >>> eqns = [8*x*y*y[xi,xi] + 8*y[xi] + 8*y**2 \\\n            ...                         - 44*x**2 - x + 8, \\\n            ...                         x[xi] - 1, x[0]]\n\n            >>> Y = [x,y]\n            >>> Ybar = { x['(xi,k)'] : 'x[k]', y['(xi,k)'] : 'y[k]' }\n\n        The DenefLipshitz function distinguishes three cases:\n\n            >>> DL = R.DenefLipshitz (eqns, Y, Ybar, q)\n            >>> DL\n            [Denef_Lipshitz_Uple, Denef_Lipshitz_U""ple, Denef_Lipshitz_ >\n            |  \n            > Uple]\n\n        Let us compute the leading polynomial of the second one:\n\n            >>> U = DL[1]\n            >>> U.leading_polynomial ()\n            {x: (1, 3, 2), y: (q*y[0] + 4*y[0] + 1, 5, 4)}\n\n        If we assign (say) -1/5 to y[0] then the polynomial vanishes\n        at q = 1.  Thus the coefficient of y[1+5] in the (1+4)-th\n        prolongation equation vanishes.\n\n        Here are the constraints of U, for y[0] = -1/5:\n\n            >>> C = U.constraints ()\n            >>> [ c.subs ({y[0] : -1/Integer(5)}) for c in C ] \n                              26                    32*y[2]   291      >\n            [x[0] = 0, y[1] + -- = 0, x[1] - 1 = 0, ------- + --- = 0, >\n                              25                       5      125      >\n            |  \n            >            16*y[3]   26449                2048*y[4]   27 >\n            >  x[2] = 0, ------- - ----- = 0, x[3] = 0, --------- - -- >\n            >               5       625                    125         >\n            |  \n            > 2460601                1024*y[5]   46845365491           >\n            > ------- = 0, x[4] = 0, --------- - ----------- = 0, x[xi >\n            > 78125                     625        1953125             >\n            |  \n            >                                            2          2  >\n            > ] - 1 = 0, 8*y[xi, xi]*x*y + 8*y[xi] - 44*x  - x + 8*y   >\n            >                                                          >\n            |  \n            >               \n            > + 8 = 0, True]\n            >               \n\n        Let us compute the fifth prolongation equation. First\n        differentiate five times the differential equation and replace\n        x by xi. Result in P5:\n\n            >>> P5 = R.differentiate (eqns[0], xi**5)\n            >>> P5 = R.evaluate (P5, {x : xi})\n\n        We are concerned by the coefficient of y[6] in P5. It is\n        ""obtained by evaluating the coefficient of y[6] at xi = 0:\n\n            >>> lc_y6_in_P5 = P5.coeff (y[xi,xi,xi,xi,xi,xi])\n            >>> lc_y6_in_P5 = lc_y6_in_P5.subs ({xi : 0})\n            >>> lc_y6_in_P5\n            40*y + 8\n\n        In the prolongation process, the derivative y is evaluated at\n        y = y[0] for which we have assigned y[0] = -1/5. As predicted,\n        the coefficient vanishes:\n\n            >>> lc_y6_in_P5.subs ({y : -1/Integer(5)})\n            0\n        ");
static PyMethodDef __pyx_mdef_19DifferentialAlgebra_17DenefLipshitzUple_13leading_polynomial = {"leading_polynomial", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_19DifferentialAlgebra_17DenefLipshitzUple_13leading_polynomial, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_19DifferentialAlgebra_17DenefLipshitzUple_12leading_polynomial};
static PyObject *__pyx_pw_19DifferentialAlgebra_17DenefLipshitzUple_13leading_polynomial(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_notation = 0;
  int __pyx_v_timeout;
  int __pyx_v_memout;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[3] = {0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("leading_polynomial (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_notation,&__pyx_n_s_timeout,&__pyx_n_s_memout,0};
    values[0] = __Pyx_Arg_NewRef_FASTCALL(__pyx_k__79);
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_notation);
          if (value) { values[0] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(6, 343, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_timeout);
          if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(6, 343, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_memout);
          if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(6, 343, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "leading_polynomial") < 0)) __PYX_ERR(6, 343, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_notation = values[0];
    if (values[1]) {
      __pyx_v_timeout = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_timeout == (int)-1) && PyErr_Occurred())) __PYX_ERR(6, 346, __pyx_L3_error)
    } else {
      __pyx_v_timeout = ((int)0);
    }
    if (values[2]) {
      __pyx_v_memout = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_memout == (int)-1) && PyErr_Occurred())) __PYX_ERR(6, 347, __pyx_L3_error)
    } else {
      __pyx_v_memout = ((int)0);
    }
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("leading_polynomial", 0, 0, 3, __pyx_nargs); __PYX_ERR(6, 343, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("DifferentialAlgebra.DenefLipshitzUple.leading_polynomial", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_19DifferentialAlgebra_17DenefLipshitzUple_12leading_polynomial(((struct __pyx_obj_19DifferentialAlgebra_DenefLipshitzUple *)__pyx_v_self), __pyx_v_notation, __pyx_v_timeout, __pyx_v_memout);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_19DifferentialAlgebra_17DenefLipshitzUple_12leading_polynomial(struct __pyx_obj_19DifferentialAlgebra_DenefLipshitzUple *__pyx_v_self, PyObject *__pyx_v_notation, int __pyx_v_timeout, int __pyx_v_memout) {
  PyObject *__pyx_v_result = 0;
  ALGEB_string __pyx_v_L;
  PyObject *__pyx_v_mesgerr = 0;
  PyObject *__pyx_v_strnot = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  unsigned int __pyx_t_4;
  char *__pyx_t_5;
  char *__pyx_t_6;
  int __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("leading_polynomial", 1);

  /* "../../bmi/sympy/DenefLipshitzUple.pyx":465
 *         cdef strnot
 * #
 *         strnot = self.__process_notation (notation)             # <<<<<<<<<<<<<<
 *         L = bmi_c.bmi_dapyx_DenefLipshitz_leading_polynomial (
 *                 self.DLuple, self.notation,
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_DenefLipshitzUple__process_nota); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 465, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_notation};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 465, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_v_strnot = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "../../bmi/sympy/DenefLipshitzUple.pyx":467
 *         strnot = self.__process_notation (notation)
 *         L = bmi_c.bmi_dapyx_DenefLipshitz_leading_polynomial (
 *                 self.DLuple, self.notation,             # <<<<<<<<<<<<<<
 *                 strnot, timeout, memout)
 *         if bmi_c.bmi_dapyx_is_error (L):
 */
  __pyx_t_5 = __Pyx_PyObject_AsWritableString(__pyx_v_self->notation); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) __PYX_ERR(6, 467, __pyx_L1_error)

  /* "../../bmi/sympy/DenefLipshitzUple.pyx":468
 *         L = bmi_c.bmi_dapyx_DenefLipshitz_leading_polynomial (
 *                 self.DLuple, self.notation,
 *                 strnot, timeout, memout)             # <<<<<<<<<<<<<<
 *         if bmi_c.bmi_dapyx_is_error (L):
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (L)
 */
  __pyx_t_6 = __Pyx_PyObject_AsWritableString(__pyx_v_strnot); if (unlikely((!__pyx_t_6) && PyErr_Occurred())) __PYX_ERR(6, 468, __pyx_L1_error)

  /* "../../bmi/sympy/DenefLipshitzUple.pyx":466
 * #
 *         strnot = self.__process_notation (notation)
 *         L = bmi_c.bmi_dapyx_DenefLipshitz_leading_polynomial (             # <<<<<<<<<<<<<<
 *                 self.DLuple, self.notation,
 *                 strnot, timeout, memout)
 */
  __pyx_v_L = bmi_dapyx_DenefLipshitz_leading_polynomial(__pyx_v_self->DLuple, __pyx_t_5, __pyx_t_6, __pyx_v_timeout, __pyx_v_memout);

  /* "../../bmi/sympy/DenefLipshitzUple.pyx":469
 *                 self.DLuple, self.notation,
 *                 strnot, timeout, memout)
 *         if bmi_c.bmi_dapyx_is_error (L):             # <<<<<<<<<<<<<<
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (L)
 *             bmi_c.bmi_balsa_clear_ALGEB (L)
 */
  __pyx_t_7 = (bmi_dapyx_is_error(__pyx_v_L) != 0);
  if (unlikely(__pyx_t_7)) {

    /* "../../bmi/sympy/DenefLipshitzUple.pyx":470
 *                 strnot, timeout, memout)
 *         if bmi_c.bmi_dapyx_is_error (L):
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (L)             # <<<<<<<<<<<<<<
 *             bmi_c.bmi_balsa_clear_ALGEB (L)
 *             raise RuntimeError (str (mesgerr, 'utf-8'))
 */
    __pyx_t_1 = __Pyx_PyBytes_FromString(bmi_dapyx_mesgerr(__pyx_v_L)); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 470, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_v_mesgerr = ((PyObject*)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "../../bmi/sympy/DenefLipshitzUple.pyx":471
 *         if bmi_c.bmi_dapyx_is_error (L):
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (L)
 *             bmi_c.bmi_balsa_clear_ALGEB (L)             # <<<<<<<<<<<<<<
 *             raise RuntimeError (str (mesgerr, 'utf-8'))
 *         result = eval (L.value, globals (), self.evdict)
 */
    bmi_balsa_clear_ALGEB(__pyx_v_L);

    /* "../../bmi/sympy/DenefLipshitzUple.pyx":472
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (L)
 *             bmi_c.bmi_balsa_clear_ALGEB (L)
 *             raise RuntimeError (str (mesgerr, 'utf-8'))             # <<<<<<<<<<<<<<
 *         result = eval (L.value, globals (), self.evdict)
 *         bmi_c.bmi_balsa_clear_ALGEB (L)
 */
    __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 472, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_v_mesgerr);
    __Pyx_GIVEREF(__pyx_v_mesgerr);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_mesgerr)) __PYX_ERR(6, 472, __pyx_L1_error);
    __Pyx_INCREF(__pyx_kp_u_utf_8);
    __Pyx_GIVEREF(__pyx_kp_u_utf_8);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_kp_u_utf_8)) __PYX_ERR(6, 472, __pyx_L1_error);
    __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)(&PyUnicode_Type)), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 472, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_RuntimeError, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 472, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(6, 472, __pyx_L1_error)

    /* "../../bmi/sympy/DenefLipshitzUple.pyx":469
 *                 self.DLuple, self.notation,
 *                 strnot, timeout, memout)
 *         if bmi_c.bmi_dapyx_is_error (L):             # <<<<<<<<<<<<<<
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (L)
 *             bmi_c.bmi_balsa_clear_ALGEB (L)
 */
  }

  /* "../../bmi/sympy/DenefLipshitzUple.pyx":473
 *             bmi_c.bmi_balsa_clear_ALGEB (L)
 *             raise RuntimeError (str (mesgerr, 'utf-8'))
 *         result = eval (L.value, globals (), self.evdict)             # <<<<<<<<<<<<<<
 *         bmi_c.bmi_balsa_clear_ALGEB (L)
 *         return result
 */
  __pyx_t_1 = __Pyx_PyBytes_FromString(__pyx_v_L->value); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 473, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_Globals(); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 473, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 473, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_1);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1)) __PYX_ERR(6, 473, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_2);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2)) __PYX_ERR(6, 473, __pyx_L1_error);
  __Pyx_INCREF(__pyx_v_self->evdict);
  __Pyx_GIVEREF(__pyx_v_self->evdict);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_self->evdict)) __PYX_ERR(6, 473, __pyx_L1_error);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_eval, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 473, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (!(likely(PyDict_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None) || __Pyx_RaiseUnexpectedTypeError("dict", __pyx_t_2))) __PYX_ERR(6, 473, __pyx_L1_error)
  __pyx_v_result = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "../../bmi/sympy/DenefLipshitzUple.pyx":474
 *             raise RuntimeError (str (mesgerr, 'utf-8'))
 *         result = eval (L.value, globals (), self.evdict)
 *         bmi_c.bmi_balsa_clear_ALGEB (L)             # <<<<<<<<<<<<<<
 *         return result
 * 
 */
  bmi_balsa_clear_ALGEB(__pyx_v_L);

  /* "../../bmi/sympy/DenefLipshitzUple.pyx":475
 *         result = eval (L.value, globals (), self.evdict)
 *         bmi_c.bmi_balsa_clear_ALGEB (L)
 *         return result             # <<<<<<<<<<<<<<
 * 
 * # series
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_result);
  __pyx_r = __pyx_v_result;
  goto __pyx_L0;

  /* "../../bmi/sympy/DenefLipshitzUple.pyx":343
 * 
 * # leading_polynomial
 *     def leading_polynomial (             # <<<<<<<<<<<<<<
 *             self,
 *             notation = BMI_IX_undefined,
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("DifferentialAlgebra.DenefLipshitzUple.leading_polynomial", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XDECREF(__pyx_v_mesgerr);
  __Pyx_XDECREF(__pyx_v_strnot);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "../../bmi/sympy/DenefLipshitzUple.pyx":478
 * 
 * # series
 *     def series (             # <<<<<<<<<<<<<<
 *             self,
 *             list vars = [],
 */

/* Python wrapper */
static PyObject *__pyx_pw_19DifferentialAlgebra_17DenefLipshitzUple_15series(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_19DifferentialAlgebra_17DenefLipshitzUple_14series, "\n        The formal power series solutions of a DenefLipshitzUple\n\n        INPUT:\n\n            `vars`       -- (default: []) a list\n            `notation`   -- (default: 'undefined') a string\n            `timeout`    -- (default: 0) a nonnegative integer\n            `memout`     -- (default: 0) a nonnegative integer\n\n        OUTPUT:\n\n            A dictionary associating truncated formal power series\n            solutions to each differential indeterminate for which\n            formal power series are sought.\n\n            If nonempty, the list `vars` must contain series\n            coefficients in symbolic form, such as y[6], z[8]\n            providing prolongation limits: series are prolongated up\n            (and including) to these terms.\n\n            If the list is empty, the series only are prolongated\n            up to the highest series coefficients occurring in the\n            DenefLipshitzUple constraints.\n\n        EXAMPLES:\n\n            >>> from sympy import *\n            >>> from DifferentialAlgebra import *\n            >>> init_printing (use_unicode = False, num_columns = 60)\n\n            >>> x,q = var ('x,q')\n            >>> y = indexedbase ('y')\n            >>> R = DifferentialRing (blocks = [y,q,'(y)[oo:-1]'], \n            ...             derivations = [x], \n            ...             parameters = [q,'(y)[oo:-1]'], \n            ...             notation = 'jet')\n\n        The differential equation of the brachistochrone problem:\n\n            >>> eqns = [ y*y[x]**2 + y - 1 ]\n\n            >>> Y = [y]\n            >>> Ybar = { y['(x,k)'] : 'y[k]' }\n\n        The DenefLipshitz algorithms distingues three cases:\n\n            >>> DL = R.DenefLipshitz (eqns, Y, Ybar, q)\n            >>> DL\n            [Denef_Lipshitz_Uple, Denef_Lipshitz_Uple, Denef_Lipshitz_ >\n            |  \n            > Uple]\n\n        The series associated to the first case is y(x) = 1:\n\n            >>> U = DL[0]\n            >>> U.series"" ()\n            {y: 1}\n\n        The series associated to the third case corresponds to a branch\n        of a cycloid starting from y[0] = 1:\n\n            >>> U = DL[2]\n            >>> U.series ()\n                   4    2     \n                  x    x      \n            {y: - -- - -- + 1}\n                  48   4      \n\n        Since this series does not depend on any parameter, it is\n        possible to extend it to an arbitrary order:\n\n            >>> U.series ([y[9]])\n                      8       6    4    2     \n                  73*x    11*x    x    x      \n            {y: - ----- - ----- - -- - -- + 1}\n                  80640   2880    48   4      \n        ");
static PyMethodDef __pyx_mdef_19DifferentialAlgebra_17DenefLipshitzUple_15series = {"series", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_19DifferentialAlgebra_17DenefLipshitzUple_15series, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_19DifferentialAlgebra_17DenefLipshitzUple_14series};
static PyObject *__pyx_pw_19DifferentialAlgebra_17DenefLipshitzUple_15series(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_vars = 0;
  PyObject *__pyx_v_notation = 0;
  int __pyx_v_timeout;
  int __pyx_v_memout;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[4] = {0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("series (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_vars,&__pyx_n_s_notation,&__pyx_n_s_timeout,&__pyx_n_s_memout,0};
    values[0] = __Pyx_Arg_NewRef_FASTCALL(__pyx_k__80);
    values[1] = __Pyx_Arg_NewRef_FASTCALL(__pyx_k__81);
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_vars);
          if (value) { values[0] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(6, 478, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_notation);
          if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(6, 478, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_timeout);
          if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(6, 478, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_memout);
          if (value) { values[3] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(6, 478, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "series") < 0)) __PYX_ERR(6, 478, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_vars = ((PyObject*)values[0]);
    __pyx_v_notation = values[1];
    if (values[2]) {
      __pyx_v_timeout = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_timeout == (int)-1) && PyErr_Occurred())) __PYX_ERR(6, 482, __pyx_L3_error)
    } else {
      __pyx_v_timeout = ((int)0);
    }
    if (values[3]) {
      __pyx_v_memout = __Pyx_PyInt_As_int(values[3]); if (unlikely((__pyx_v_memout == (int)-1) && PyErr_Occurred())) __PYX_ERR(6, 483, __pyx_L3_error)
    } else {
      __pyx_v_memout = ((int)0);
    }
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("series", 0, 0, 4, __pyx_nargs); __PYX_ERR(6, 478, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("DifferentialAlgebra.DenefLipshitzUple.series", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_vars), (&PyList_Type), 1, "vars", 1))) __PYX_ERR(6, 480, __pyx_L1_error)
  __pyx_r = __pyx_pf_19DifferentialAlgebra_17DenefLipshitzUple_14series(((struct __pyx_obj_19DifferentialAlgebra_DenefLipshitzUple *)__pyx_v_self), __pyx_v_vars, __pyx_v_notation, __pyx_v_timeout, __pyx_v_memout);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_19DifferentialAlgebra_17DenefLipshitzUple_14series(struct __pyx_obj_19DifferentialAlgebra_DenefLipshitzUple *__pyx_v_self, PyObject *__pyx_v_vars, PyObject *__pyx_v_notation, int __pyx_v_timeout, int __pyx_v_memout) {
  PyObject *__pyx_v_result = 0;
  ALGEB_string __pyx_v_L;
  PyObject *__pyx_v_mesgerr = 0;
  PyObject *__pyx_v_strvars = 0;
  PyObject *__pyx_v_strnot = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  unsigned int __pyx_t_4;
  char *__pyx_t_5;
  char *__pyx_t_6;
  char *__pyx_t_7;
  int __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("series", 1);

  /* "../../bmi/sympy/DenefLipshitzUple.pyx":568
 *         cdef strnot
 * #
 *         strnot = self.__process_notation (notation)             # <<<<<<<<<<<<<<
 *         strvars = ascii (vars)
 *         L = bmi_c.bmi_dapyx_DenefLipshitz_series (
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_DenefLipshitzUple__process_nota); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 568, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_notation};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 568, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_v_strnot = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "../../bmi/sympy/DenefLipshitzUple.pyx":569
 * #
 *         strnot = self.__process_notation (notation)
 *         strvars = ascii (vars)             # <<<<<<<<<<<<<<
 *         L = bmi_c.bmi_dapyx_DenefLipshitz_series (
 *                 strvars, self.DLuple, self.notation,
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ascii); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 569, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_vars};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 569, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  if (!(likely(PyBytes_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_1))) __PYX_ERR(6, 569, __pyx_L1_error)
  __pyx_v_strvars = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "../../bmi/sympy/DenefLipshitzUple.pyx":571
 *         strvars = ascii (vars)
 *         L = bmi_c.bmi_dapyx_DenefLipshitz_series (
 *                 strvars, self.DLuple, self.notation,             # <<<<<<<<<<<<<<
 *                 strnot, timeout, memout)
 *         if bmi_c.bmi_dapyx_is_error (L):
 */
  if (unlikely(__pyx_v_strvars == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
    __PYX_ERR(6, 571, __pyx_L1_error)
  }
  __pyx_t_5 = __Pyx_PyBytes_AsWritableString(__pyx_v_strvars); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) __PYX_ERR(6, 571, __pyx_L1_error)
  __pyx_t_6 = __Pyx_PyObject_AsWritableString(__pyx_v_self->notation); if (unlikely((!__pyx_t_6) && PyErr_Occurred())) __PYX_ERR(6, 571, __pyx_L1_error)

  /* "../../bmi/sympy/DenefLipshitzUple.pyx":572
 *         L = bmi_c.bmi_dapyx_DenefLipshitz_series (
 *                 strvars, self.DLuple, self.notation,
 *                 strnot, timeout, memout)             # <<<<<<<<<<<<<<
 *         if bmi_c.bmi_dapyx_is_error (L):
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (L)
 */
  __pyx_t_7 = __Pyx_PyObject_AsWritableString(__pyx_v_strnot); if (unlikely((!__pyx_t_7) && PyErr_Occurred())) __PYX_ERR(6, 572, __pyx_L1_error)

  /* "../../bmi/sympy/DenefLipshitzUple.pyx":570
 *         strnot = self.__process_notation (notation)
 *         strvars = ascii (vars)
 *         L = bmi_c.bmi_dapyx_DenefLipshitz_series (             # <<<<<<<<<<<<<<
 *                 strvars, self.DLuple, self.notation,
 *                 strnot, timeout, memout)
 */
  __pyx_v_L = bmi_dapyx_DenefLipshitz_series(__pyx_t_5, __pyx_v_self->DLuple, __pyx_t_6, __pyx_t_7, __pyx_v_timeout, __pyx_v_memout);

  /* "../../bmi/sympy/DenefLipshitzUple.pyx":573
 *                 strvars, self.DLuple, self.notation,
 *                 strnot, timeout, memout)
 *         if bmi_c.bmi_dapyx_is_error (L):             # <<<<<<<<<<<<<<
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (L)
 *             bmi_c.bmi_balsa_clear_ALGEB (L)
 */
  __pyx_t_8 = (bmi_dapyx_is_error(__pyx_v_L) != 0);
  if (unlikely(__pyx_t_8)) {

    /* "../../bmi/sympy/DenefLipshitzUple.pyx":574
 *                 strnot, timeout, memout)
 *         if bmi_c.bmi_dapyx_is_error (L):
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (L)             # <<<<<<<<<<<<<<
 *             bmi_c.bmi_balsa_clear_ALGEB (L)
 *             raise RuntimeError (str (mesgerr, 'utf-8'))
 */
    __pyx_t_1 = __Pyx_PyBytes_FromString(bmi_dapyx_mesgerr(__pyx_v_L)); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 574, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_v_mesgerr = ((PyObject*)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "../../bmi/sympy/DenefLipshitzUple.pyx":575
 *         if bmi_c.bmi_dapyx_is_error (L):
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (L)
 *             bmi_c.bmi_balsa_clear_ALGEB (L)             # <<<<<<<<<<<<<<
 *             raise RuntimeError (str (mesgerr, 'utf-8'))
 *         result = eval (L.value, globals (), self.evdict)
 */
    bmi_balsa_clear_ALGEB(__pyx_v_L);

    /* "../../bmi/sympy/DenefLipshitzUple.pyx":576
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (L)
 *             bmi_c.bmi_balsa_clear_ALGEB (L)
 *             raise RuntimeError (str (mesgerr, 'utf-8'))             # <<<<<<<<<<<<<<
 *         result = eval (L.value, globals (), self.evdict)
 *         bmi_c.bmi_balsa_clear_ALGEB (L)
 */
    __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 576, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_v_mesgerr);
    __Pyx_GIVEREF(__pyx_v_mesgerr);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_mesgerr)) __PYX_ERR(6, 576, __pyx_L1_error);
    __Pyx_INCREF(__pyx_kp_u_utf_8);
    __Pyx_GIVEREF(__pyx_kp_u_utf_8);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_kp_u_utf_8)) __PYX_ERR(6, 576, __pyx_L1_error);
    __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)(&PyUnicode_Type)), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 576, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_RuntimeError, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 576, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(6, 576, __pyx_L1_error)

    /* "../../bmi/sympy/DenefLipshitzUple.pyx":573
 *                 strvars, self.DLuple, self.notation,
 *                 strnot, timeout, memout)
 *         if bmi_c.bmi_dapyx_is_error (L):             # <<<<<<<<<<<<<<
 *             mesgerr = bmi_c.bmi_dapyx_mesgerr (L)
 *             bmi_c.bmi_balsa_clear_ALGEB (L)
 */
  }

  /* "../../bmi/sympy/DenefLipshitzUple.pyx":577
 *             bmi_c.bmi_balsa_clear_ALGEB (L)
 *             raise RuntimeError (str (mesgerr, 'utf-8'))
 *         result = eval (L.value, globals (), self.evdict)             # <<<<<<<<<<<<<<
 *         bmi_c.bmi_balsa_clear_ALGEB (L)
 *         return result
 */
  __pyx_t_1 = __Pyx_PyBytes_FromString(__pyx_v_L->value); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 577, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_Globals(); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 577, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 577, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_1);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1)) __PYX_ERR(6, 577, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_2);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2)) __PYX_ERR(6, 577, __pyx_L1_error);
  __Pyx_INCREF(__pyx_v_self->evdict);
  __Pyx_GIVEREF(__pyx_v_self->evdict);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_self->evdict)) __PYX_ERR(6, 577, __pyx_L1_error);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_eval, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 577, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (!(likely(PyDict_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None) || __Pyx_RaiseUnexpectedTypeError("dict", __pyx_t_2))) __PYX_ERR(6, 577, __pyx_L1_error)
  __pyx_v_result = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "../../bmi/sympy/DenefLipshitzUple.pyx":578
 *             raise RuntimeError (str (mesgerr, 'utf-8'))
 *         result = eval (L.value, globals (), self.evdict)
 *         bmi_c.bmi_balsa_clear_ALGEB (L)             # <<<<<<<<<<<<<<
 *         return result
 */
  bmi_balsa_clear_ALGEB(__pyx_v_L);

  /* "../../bmi/sympy/DenefLipshitzUple.pyx":579
 *         result = eval (L.value, globals (), self.evdict)
 *         bmi_c.bmi_balsa_clear_ALGEB (L)
 *         return result             # <<<<<<<<<<<<<<
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_result);
  __pyx_r = __pyx_v_result;
  goto __pyx_L0;

  /* "../../bmi/sympy/DenefLipshitzUple.pyx":478
 * 
 * # series
 *     def series (             # <<<<<<<<<<<<<<
 *             self,
 *             list vars = [],
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("DifferentialAlgebra.DenefLipshitzUple.series", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XDECREF(__pyx_v_mesgerr);
  __Pyx_XDECREF(__pyx_v_strvars);
  __Pyx_XDECREF(__pyx_v_strnot);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "../../bmi/sympy/DenefLipshitzUple.pyx":10
 *     DenefLipshitzUple class.
 *     """
 *     cdef public list Y             # <<<<<<<<<<<<<<
 *     cdef public object Ybar
 *     cdef public object x
 */

/* Python wrapper */
static PyObject *__pyx_pw_19DifferentialAlgebra_17DenefLipshitzUple_1Y_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_19DifferentialAlgebra_17DenefLipshitzUple_1Y_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_19DifferentialAlgebra_17DenefLipshitzUple_1Y___get__(((struct __pyx_obj_19DifferentialAlgebra_DenefLipshitzUple *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_19DifferentialAlgebra_17DenefLipshitzUple_1Y___get__(struct __pyx_obj_19DifferentialAlgebra_DenefLipshitzUple *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 1);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->Y);
  __pyx_r = __pyx_v_self->Y;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_19DifferentialAlgebra_17DenefLipshitzUple_1Y_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_19DifferentialAlgebra_17DenefLipshitzUple_1Y_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_19DifferentialAlgebra_17DenefLipshitzUple_1Y_2__set__(((struct __pyx_obj_19DifferentialAlgebra_DenefLipshitzUple *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_19DifferentialAlgebra_17DenefLipshitzUple_1Y_2__set__(struct __pyx_obj_19DifferentialAlgebra_DenefLipshitzUple *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 1);
  if (!(likely(PyList_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None) || __Pyx_RaiseUnexpectedTypeError("list", __pyx_v_value))) __PYX_ERR(6, 10, __pyx_L1_error)
  __pyx_t_1 = __pyx_v_value;
  __Pyx_INCREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->Y);
  __Pyx_DECREF(__pyx_v_self->Y);
  __pyx_v_self->Y = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("DifferentialAlgebra.DenefLipshitzUple.Y.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_19DifferentialAlgebra_17DenefLipshitzUple_1Y_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_19DifferentialAlgebra_17DenefLipshitzUple_1Y_5__del__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_19DifferentialAlgebra_17DenefLipshitzUple_1Y_4__del__(((struct __pyx_obj_19DifferentialAlgebra_DenefLipshitzUple *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_19DifferentialAlgebra_17DenefLipshitzUple_1Y_4__del__(struct __pyx_obj_19DifferentialAlgebra_DenefLipshitzUple *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__", 1);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->Y);
  __Pyx_DECREF(__pyx_v_self->Y);
  __pyx_v_self->Y = ((PyObject*)Py_None);

  /* function exit code */
  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "../../bmi/sympy/DenefLipshitzUple.pyx":11
 *     """
 *     cdef public list Y
 *     cdef public object Ybar             # <<<<<<<<<<<<<<
 *     cdef public object x
 *     cdef public list order
 */

/* Python wrapper */
static PyObject *__pyx_pw_19DifferentialAlgebra_17DenefLipshitzUple_4Ybar_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_19DifferentialAlgebra_17DenefLipshitzUple_4Ybar_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_19DifferentialAlgebra_17DenefLipshitzUple_4Ybar___get__(((struct __pyx_obj_19DifferentialAlgebra_DenefLipshitzUple *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_19DifferentialAlgebra_17DenefLipshitzUple_4Ybar___get__(struct __pyx_obj_19DifferentialAlgebra_DenefLipshitzUple *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 1);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->Ybar);
  __pyx_r = __pyx_v_self->Ybar;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_19DifferentialAlgebra_17DenefLipshitzUple_4Ybar_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_19DifferentialAlgebra_17DenefLipshitzUple_4Ybar_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_19DifferentialAlgebra_17DenefLipshitzUple_4Ybar_2__set__(((struct __pyx_obj_19DifferentialAlgebra_DenefLipshitzUple *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_19DifferentialAlgebra_17DenefLipshitzUple_4Ybar_2__set__(struct __pyx_obj_19DifferentialAlgebra_DenefLipshitzUple *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__", 1);
  __Pyx_INCREF(__pyx_v_value);
  __Pyx_GIVEREF(__pyx_v_value);
  __Pyx_GOTREF(__pyx_v_self->Ybar);
  __Pyx_DECREF(__pyx_v_self->Ybar);
  __pyx_v_self->Ybar = __pyx_v_value;

  /* function exit code */
  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_19DifferentialAlgebra_17DenefLipshitzUple_4Ybar_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_19DifferentialAlgebra_17DenefLipshitzUple_4Ybar_5__del__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_19DifferentialAlgebra_17DenefLipshitzUple_4Ybar_4__del__(((struct __pyx_obj_19DifferentialAlgebra_DenefLipshitzUple *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_19DifferentialAlgebra_17DenefLipshitzUple_4Ybar_4__del__(struct __pyx_obj_19DifferentialAlgebra_DenefLipshitzUple *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__", 1);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->Ybar);
  __Pyx_DECREF(__pyx_v_self->Ybar);
  __pyx_v_self->Ybar = Py_None;

  /* function exit code */
  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "../../bmi/sympy/DenefLipshitzUple.pyx":12
 *     cdef public list Y
 *     cdef public object Ybar
 *     cdef public object x             # <<<<<<<<<<<<<<
 *     cdef public list order
 *     cdef public list kappa
 */

/* Python wrapper */
static PyObject *__pyx_pw_19DifferentialAlgebra_17DenefLipshitzUple_1x_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_19DifferentialAlgebra_17DenefLipshitzUple_1x_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_19DifferentialAlgebra_17DenefLipshitzUple_1x___get__(((struct __pyx_obj_19DifferentialAlgebra_DenefLipshitzUple *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_19DifferentialAlgebra_17DenefLipshitzUple_1x___get__(struct __pyx_obj_19DifferentialAlgebra_DenefLipshitzUple *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 1);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->x);
  __pyx_r = __pyx_v_self->x;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_19DifferentialAlgebra_17DenefLipshitzUple_1x_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_19DifferentialAlgebra_17DenefLipshitzUple_1x_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_19DifferentialAlgebra_17DenefLipshitzUple_1x_2__set__(((struct __pyx_obj_19DifferentialAlgebra_DenefLipshitzUple *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_19DifferentialAlgebra_17DenefLipshitzUple_1x_2__set__(struct __pyx_obj_19DifferentialAlgebra_DenefLipshitzUple *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__", 1);
  __Pyx_INCREF(__pyx_v_value);
  __Pyx_GIVEREF(__pyx_v_value);
  __Pyx_GOTREF(__pyx_v_self->x);
  __Pyx_DECREF(__pyx_v_self->x);
  __pyx_v_self->x = __pyx_v_value;

  /* function exit code */
  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_19DifferentialAlgebra_17DenefLipshitzUple_1x_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_19DifferentialAlgebra_17DenefLipshitzUple_1x_5__del__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_19DifferentialAlgebra_17DenefLipshitzUple_1x_4__del__(((struct __pyx_obj_19DifferentialAlgebra_DenefLipshitzUple *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_19DifferentialAlgebra_17DenefLipshitzUple_1x_4__del__(struct __pyx_obj_19DifferentialAlgebra_DenefLipshitzUple *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__", 1);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->x);
  __Pyx_DECREF(__pyx_v_self->x);
  __pyx_v_self->x = Py_None;

  /* function exit code */
  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "../../bmi/sympy/DenefLipshitzUple.pyx":13
 *     cdef public object Ybar
 *     cdef public object x
 *     cdef public list order             # <<<<<<<<<<<<<<
 *     cdef public list kappa
 *     cdef public RegularDifferentialChain C
 */

/* Python wrapper */
static PyObject *__pyx_pw_19DifferentialAlgebra_17DenefLipshitzUple_5order_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_19DifferentialAlgebra_17DenefLipshitzUple_5order_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_19DifferentialAlgebra_17DenefLipshitzUple_5order___get__(((struct __pyx_obj_19DifferentialAlgebra_DenefLipshitzUple *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_19DifferentialAlgebra_17DenefLipshitzUple_5order___get__(struct __pyx_obj_19DifferentialAlgebra_DenefLipshitzUple *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 1);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->order);
  __pyx_r = __pyx_v_self->order;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_19DifferentialAlgebra_17DenefLipshitzUple_5order_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_19DifferentialAlgebra_17DenefLipshitzUple_5order_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_19DifferentialAlgebra_17DenefLipshitzUple_5order_2__set__(((struct __pyx_obj_19DifferentialAlgebra_DenefLipshitzUple *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_19DifferentialAlgebra_17DenefLipshitzUple_5order_2__set__(struct __pyx_obj_19DifferentialAlgebra_DenefLipshitzUple *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 1);
  if (!(likely(PyList_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None) || __Pyx_RaiseUnexpectedTypeError("list", __pyx_v_value))) __PYX_ERR(6, 13, __pyx_L1_error)
  __pyx_t_1 = __pyx_v_value;
  __Pyx_INCREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->order);
  __Pyx_DECREF(__pyx_v_self->order);
  __pyx_v_self->order = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("DifferentialAlgebra.DenefLipshitzUple.order.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_19DifferentialAlgebra_17DenefLipshitzUple_5order_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_19DifferentialAlgebra_17DenefLipshitzUple_5order_5__del__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_19DifferentialAlgebra_17DenefLipshitzUple_5order_4__del__(((struct __pyx_obj_19DifferentialAlgebra_DenefLipshitzUple *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_19DifferentialAlgebra_17DenefLipshitzUple_5order_4__del__(struct __pyx_obj_19DifferentialAlgebra_DenefLipshitzUple *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__", 1);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->order);
  __Pyx_DECREF(__pyx_v_self->order);
  __pyx_v_self->order = ((PyObject*)Py_None);

  /* function exit code */
  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "../../bmi/sympy/DenefLipshitzUple.pyx":14
 *     cdef public object x
 *     cdef public list order
 *     cdef public list kappa             # <<<<<<<<<<<<<<
 *     cdef public RegularDifferentialChain C
 *     cdef public list S
 */

/* Python wrapper */
static PyObject *__pyx_pw_19DifferentialAlgebra_17DenefLipshitzUple_5kappa_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_19DifferentialAlgebra_17DenefLipshitzUple_5kappa_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_19DifferentialAlgebra_17DenefLipshitzUple_5kappa___get__(((struct __pyx_obj_19DifferentialAlgebra_DenefLipshitzUple *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_19DifferentialAlgebra_17DenefLipshitzUple_5kappa___get__(struct __pyx_obj_19DifferentialAlgebra_DenefLipshitzUple *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 1);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->kappa);
  __pyx_r = __pyx_v_self->kappa;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_19DifferentialAlgebra_17DenefLipshitzUple_5kappa_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_19DifferentialAlgebra_17DenefLipshitzUple_5kappa_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_19DifferentialAlgebra_17DenefLipshitzUple_5kappa_2__set__(((struct __pyx_obj_19DifferentialAlgebra_DenefLipshitzUple *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_19DifferentialAlgebra_17DenefLipshitzUple_5kappa_2__set__(struct __pyx_obj_19DifferentialAlgebra_DenefLipshitzUple *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 1);
  if (!(likely(PyList_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None) || __Pyx_RaiseUnexpectedTypeError("list", __pyx_v_value))) __PYX_ERR(6, 14, __pyx_L1_error)
  __pyx_t_1 = __pyx_v_value;
  __Pyx_INCREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->kappa);
  __Pyx_DECREF(__pyx_v_self->kappa);
  __pyx_v_self->kappa = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("DifferentialAlgebra.DenefLipshitzUple.kappa.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_19DifferentialAlgebra_17DenefLipshitzUple_5kappa_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_19DifferentialAlgebra_17DenefLipshitzUple_5kappa_5__del__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_19DifferentialAlgebra_17DenefLipshitzUple_5kappa_4__del__(((struct __pyx_obj_19DifferentialAlgebra_DenefLipshitzUple *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_19DifferentialAlgebra_17DenefLipshitzUple_5kappa_4__del__(struct __pyx_obj_19DifferentialAlgebra_DenefLipshitzUple *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__", 1);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->kappa);
  __Pyx_DECREF(__pyx_v_self->kappa);
  __pyx_v_self->kappa = ((PyObject*)Py_None);

  /* function exit code */
  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "../../bmi/sympy/DenefLipshitzUple.pyx":15
 *     cdef public list order
 *     cdef public list kappa
 *     cdef public RegularDifferentialChain C             # <<<<<<<<<<<<<<
 *     cdef public list S
 *     cdef public list k
 */

/* Python wrapper */
static PyObject *__pyx_pw_19DifferentialAlgebra_17DenefLipshitzUple_1C_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_19DifferentialAlgebra_17DenefLipshitzUple_1C_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_19DifferentialAlgebra_17DenefLipshitzUple_1C___get__(((struct __pyx_obj_19DifferentialAlgebra_DenefLipshitzUple *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_19DifferentialAlgebra_17DenefLipshitzUple_1C___get__(struct __pyx_obj_19DifferentialAlgebra_DenefLipshitzUple *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 1);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_self->C);
  __pyx_r = ((PyObject *)__pyx_v_self->C);
  goto __pyx_L0;

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_19DifferentialAlgebra_17DenefLipshitzUple_1C_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_19DifferentialAlgebra_17DenefLipshitzUple_1C_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_19DifferentialAlgebra_17DenefLipshitzUple_1C_2__set__(((struct __pyx_obj_19DifferentialAlgebra_DenefLipshitzUple *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_19DifferentialAlgebra_17DenefLipshitzUple_1C_2__set__(struct __pyx_obj_19DifferentialAlgebra_DenefLipshitzUple *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 1);
  if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_19DifferentialAlgebra_RegularDifferentialChain))))) __PYX_ERR(6, 15, __pyx_L1_error)
  __pyx_t_1 = __pyx_v_value;
  __Pyx_INCREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF((PyObject *)__pyx_v_self->C);
  __Pyx_DECREF((PyObject *)__pyx_v_self->C);
  __pyx_v_self->C = ((struct __pyx_obj_19DifferentialAlgebra_RegularDifferentialChain *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("DifferentialAlgebra.DenefLipshitzUple.C.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_19DifferentialAlgebra_17DenefLipshitzUple_1C_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_19DifferentialAlgebra_17DenefLipshitzUple_1C_5__del__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_19DifferentialAlgebra_17DenefLipshitzUple_1C_4__del__(((struct __pyx_obj_19DifferentialAlgebra_DenefLipshitzUple *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_19DifferentialAlgebra_17DenefLipshitzUple_1C_4__del__(struct __pyx_obj_19DifferentialAlgebra_DenefLipshitzUple *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__", 1);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF((PyObject *)__pyx_v_self->C);
  __Pyx_DECREF((PyObject *)__pyx_v_self->C);
  __pyx_v_self->C = ((struct __pyx_obj_19DifferentialAlgebra_RegularDifferentialChain *)Py_None);

  /* function exit code */
  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "../../bmi/sympy/DenefLipshitzUple.pyx":16
 *     cdef public list kappa
 *     cdef public RegularDifferentialChain C
 *     cdef public list S             # <<<<<<<<<<<<<<
 *     cdef public list k
 *     cdef public list r
 */

/* Python wrapper */
static PyObject *__pyx_pw_19DifferentialAlgebra_17DenefLipshitzUple_1S_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_19DifferentialAlgebra_17DenefLipshitzUple_1S_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_19DifferentialAlgebra_17DenefLipshitzUple_1S___get__(((struct __pyx_obj_19DifferentialAlgebra_DenefLipshitzUple *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_19DifferentialAlgebra_17DenefLipshitzUple_1S___get__(struct __pyx_obj_19DifferentialAlgebra_DenefLipshitzUple *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 1);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->S);
  __pyx_r = __pyx_v_self->S;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_19DifferentialAlgebra_17DenefLipshitzUple_1S_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_19DifferentialAlgebra_17DenefLipshitzUple_1S_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_19DifferentialAlgebra_17DenefLipshitzUple_1S_2__set__(((struct __pyx_obj_19DifferentialAlgebra_DenefLipshitzUple *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_19DifferentialAlgebra_17DenefLipshitzUple_1S_2__set__(struct __pyx_obj_19DifferentialAlgebra_DenefLipshitzUple *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 1);
  if (!(likely(PyList_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None) || __Pyx_RaiseUnexpectedTypeError("list", __pyx_v_value))) __PYX_ERR(6, 16, __pyx_L1_error)
  __pyx_t_1 = __pyx_v_value;
  __Pyx_INCREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->S);
  __Pyx_DECREF(__pyx_v_self->S);
  __pyx_v_self->S = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("DifferentialAlgebra.DenefLipshitzUple.S.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_19DifferentialAlgebra_17DenefLipshitzUple_1S_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_19DifferentialAlgebra_17DenefLipshitzUple_1S_5__del__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_19DifferentialAlgebra_17DenefLipshitzUple_1S_4__del__(((struct __pyx_obj_19DifferentialAlgebra_DenefLipshitzUple *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_19DifferentialAlgebra_17DenefLipshitzUple_1S_4__del__(struct __pyx_obj_19DifferentialAlgebra_DenefLipshitzUple *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__", 1);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->S);
  __Pyx_DECREF(__pyx_v_self->S);
  __pyx_v_self->S = ((PyObject*)Py_None);

  /* function exit code */
  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "../../bmi/sympy/DenefLipshitzUple.pyx":17
 *     cdef public RegularDifferentialChain C
 *     cdef public list S
 *     cdef public list k             # <<<<<<<<<<<<<<
 *     cdef public list r
 *     cdef public object q
 */

/* Python wrapper */
static PyObject *__pyx_pw_19DifferentialAlgebra_17DenefLipshitzUple_1k_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_19DifferentialAlgebra_17DenefLipshitzUple_1k_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_19DifferentialAlgebra_17DenefLipshitzUple_1k___get__(((struct __pyx_obj_19DifferentialAlgebra_DenefLipshitzUple *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_19DifferentialAlgebra_17DenefLipshitzUple_1k___get__(struct __pyx_obj_19DifferentialAlgebra_DenefLipshitzUple *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 1);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->k);
  __pyx_r = __pyx_v_self->k;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_19DifferentialAlgebra_17DenefLipshitzUple_1k_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_19DifferentialAlgebra_17DenefLipshitzUple_1k_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_19DifferentialAlgebra_17DenefLipshitzUple_1k_2__set__(((struct __pyx_obj_19DifferentialAlgebra_DenefLipshitzUple *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_19DifferentialAlgebra_17DenefLipshitzUple_1k_2__set__(struct __pyx_obj_19DifferentialAlgebra_DenefLipshitzUple *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 1);
  if (!(likely(PyList_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None) || __Pyx_RaiseUnexpectedTypeError("list", __pyx_v_value))) __PYX_ERR(6, 17, __pyx_L1_error)
  __pyx_t_1 = __pyx_v_value;
  __Pyx_INCREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->k);
  __Pyx_DECREF(__pyx_v_self->k);
  __pyx_v_self->k = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("DifferentialAlgebra.DenefLipshitzUple.k.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_19DifferentialAlgebra_17DenefLipshitzUple_1k_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_19DifferentialAlgebra_17DenefLipshitzUple_1k_5__del__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_19DifferentialAlgebra_17DenefLipshitzUple_1k_4__del__(((struct __pyx_obj_19DifferentialAlgebra_DenefLipshitzUple *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_19DifferentialAlgebra_17DenefLipshitzUple_1k_4__del__(struct __pyx_obj_19DifferentialAlgebra_DenefLipshitzUple *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__", 1);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->k);
  __Pyx_DECREF(__pyx_v_self->k);
  __pyx_v_self->k = ((PyObject*)Py_None);

  /* function exit code */
  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "../../bmi/sympy/DenefLipshitzUple.pyx":18
 *     cdef public list S
 *     cdef public list k
 *     cdef public list r             # <<<<<<<<<<<<<<
 *     cdef public object q
 *     cdef public list A
 */

/* Python wrapper */
static PyObject *__pyx_pw_19DifferentialAlgebra_17DenefLipshitzUple_1r_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_19DifferentialAlgebra_17DenefLipshitzUple_1r_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_19DifferentialAlgebra_17DenefLipshitzUple_1r___get__(((struct __pyx_obj_19DifferentialAlgebra_DenefLipshitzUple *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_19DifferentialAlgebra_17DenefLipshitzUple_1r___get__(struct __pyx_obj_19DifferentialAlgebra_DenefLipshitzUple *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 1);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->r);
  __pyx_r = __pyx_v_self->r;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_19DifferentialAlgebra_17DenefLipshitzUple_1r_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_19DifferentialAlgebra_17DenefLipshitzUple_1r_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_19DifferentialAlgebra_17DenefLipshitzUple_1r_2__set__(((struct __pyx_obj_19DifferentialAlgebra_DenefLipshitzUple *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_19DifferentialAlgebra_17DenefLipshitzUple_1r_2__set__(struct __pyx_obj_19DifferentialAlgebra_DenefLipshitzUple *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 1);
  if (!(likely(PyList_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None) || __Pyx_RaiseUnexpectedTypeError("list", __pyx_v_value))) __PYX_ERR(6, 18, __pyx_L1_error)
  __pyx_t_1 = __pyx_v_value;
  __Pyx_INCREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->r);
  __Pyx_DECREF(__pyx_v_self->r);
  __pyx_v_self->r = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("DifferentialAlgebra.DenefLipshitzUple.r.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_19DifferentialAlgebra_17DenefLipshitzUple_1r_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_19DifferentialAlgebra_17DenefLipshitzUple_1r_5__del__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_19DifferentialAlgebra_17DenefLipshitzUple_1r_4__del__(((struct __pyx_obj_19DifferentialAlgebra_DenefLipshitzUple *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_19DifferentialAlgebra_17DenefLipshitzUple_1r_4__del__(struct __pyx_obj_19DifferentialAlgebra_DenefLipshitzUple *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__", 1);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->r);
  __Pyx_DECREF(__pyx_v_self->r);
  __pyx_v_self->r = ((PyObject*)Py_None);

  /* function exit code */
  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "../../bmi/sympy/DenefLipshitzUple.pyx":19
 *     cdef public list k
 *     cdef public list r
 *     cdef public object q             # <<<<<<<<<<<<<<
 *     cdef public list A
 *     cdef public list gamma
 */

/* Python wrapper */
static PyObject *__pyx_pw_19DifferentialAlgebra_17DenefLipshitzUple_1q_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_19DifferentialAlgebra_17DenefLipshitzUple_1q_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_19DifferentialAlgebra_17DenefLipshitzUple_1q___get__(((struct __pyx_obj_19DifferentialAlgebra_DenefLipshitzUple *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_19DifferentialAlgebra_17DenefLipshitzUple_1q___get__(struct __pyx_obj_19DifferentialAlgebra_DenefLipshitzUple *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 1);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->q);
  __pyx_r = __pyx_v_self->q;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_19DifferentialAlgebra_17DenefLipshitzUple_1q_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_19DifferentialAlgebra_17DenefLipshitzUple_1q_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_19DifferentialAlgebra_17DenefLipshitzUple_1q_2__set__(((struct __pyx_obj_19DifferentialAlgebra_DenefLipshitzUple *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_19DifferentialAlgebra_17DenefLipshitzUple_1q_2__set__(struct __pyx_obj_19DifferentialAlgebra_DenefLipshitzUple *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__", 1);
  __Pyx_INCREF(__pyx_v_value);
  __Pyx_GIVEREF(__pyx_v_value);
  __Pyx_GOTREF(__pyx_v_self->q);
  __Pyx_DECREF(__pyx_v_self->q);
  __pyx_v_self->q = __pyx_v_value;

  /* function exit code */
  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_19DifferentialAlgebra_17DenefLipshitzUple_1q_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_19DifferentialAlgebra_17DenefLipshitzUple_1q_5__del__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_19DifferentialAlgebra_17DenefLipshitzUple_1q_4__del__(((struct __pyx_obj_19DifferentialAlgebra_DenefLipshitzUple *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_19DifferentialAlgebra_17DenefLipshitzUple_1q_4__del__(struct __pyx_obj_19DifferentialAlgebra_DenefLipshitzUple *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__", 1);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->q);
  __Pyx_DECREF(__pyx_v_self->q);
  __pyx_v_self->q = Py_None;

  /* function exit code */
  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "../../bmi/sympy/DenefLipshitzUple.pyx":20
 *     cdef public list r
 *     cdef public object q
 *     cdef public list A             # <<<<<<<<<<<<<<
 *     cdef public list gamma
 *     cdef public list mu
 */

/* Python wrapper */
static PyObject *__pyx_pw_19DifferentialAlgebra_17DenefLipshitzUple_1A_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_19DifferentialAlgebra_17DenefLipshitzUple_1A_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_19DifferentialAlgebra_17DenefLipshitzUple_1A___get__(((struct __pyx_obj_19DifferentialAlgebra_DenefLipshitzUple *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_19DifferentialAlgebra_17DenefLipshitzUple_1A___get__(struct __pyx_obj_19DifferentialAlgebra_DenefLipshitzUple *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 1);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->A);
  __pyx_r = __pyx_v_self->A;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_19DifferentialAlgebra_17DenefLipshitzUple_1A_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_19DifferentialAlgebra_17DenefLipshitzUple_1A_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_19DifferentialAlgebra_17DenefLipshitzUple_1A_2__set__(((struct __pyx_obj_19DifferentialAlgebra_DenefLipshitzUple *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_19DifferentialAlgebra_17DenefLipshitzUple_1A_2__set__(struct __pyx_obj_19DifferentialAlgebra_DenefLipshitzUple *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 1);
  if (!(likely(PyList_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None) || __Pyx_RaiseUnexpectedTypeError("list", __pyx_v_value))) __PYX_ERR(6, 20, __pyx_L1_error)
  __pyx_t_1 = __pyx_v_value;
  __Pyx_INCREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->A);
  __Pyx_DECREF(__pyx_v_self->A);
  __pyx_v_self->A = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("DifferentialAlgebra.DenefLipshitzUple.A.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_19DifferentialAlgebra_17DenefLipshitzUple_1A_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_19DifferentialAlgebra_17DenefLipshitzUple_1A_5__del__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_19DifferentialAlgebra_17DenefLipshitzUple_1A_4__del__(((struct __pyx_obj_19DifferentialAlgebra_DenefLipshitzUple *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_19DifferentialAlgebra_17DenefLipshitzUple_1A_4__del__(struct __pyx_obj_19DifferentialAlgebra_DenefLipshitzUple *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__", 1);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->A);
  __Pyx_DECREF(__pyx_v_self->A);
  __pyx_v_self->A = ((PyObject*)Py_None);

  /* function exit code */
  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "../../bmi/sympy/DenefLipshitzUple.pyx":21
 *     cdef public object q
 *     cdef public list A
 *     cdef public list gamma             # <<<<<<<<<<<<<<
 *     cdef public list mu
 *     cdef public list sigma
 */

/* Python wrapper */
static PyObject *__pyx_pw_19DifferentialAlgebra_17DenefLipshitzUple_5gamma_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_19DifferentialAlgebra_17DenefLipshitzUple_5gamma_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_19DifferentialAlgebra_17DenefLipshitzUple_5gamma___get__(((struct __pyx_obj_19DifferentialAlgebra_DenefLipshitzUple *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_19DifferentialAlgebra_17DenefLipshitzUple_5gamma___get__(struct __pyx_obj_19DifferentialAlgebra_DenefLipshitzUple *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 1);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->gamma);
  __pyx_r = __pyx_v_self->gamma;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_19DifferentialAlgebra_17DenefLipshitzUple_5gamma_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_19DifferentialAlgebra_17DenefLipshitzUple_5gamma_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_19DifferentialAlgebra_17DenefLipshitzUple_5gamma_2__set__(((struct __pyx_obj_19DifferentialAlgebra_DenefLipshitzUple *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_19DifferentialAlgebra_17DenefLipshitzUple_5gamma_2__set__(struct __pyx_obj_19DifferentialAlgebra_DenefLipshitzUple *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 1);
  if (!(likely(PyList_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None) || __Pyx_RaiseUnexpectedTypeError("list", __pyx_v_value))) __PYX_ERR(6, 21, __pyx_L1_error)
  __pyx_t_1 = __pyx_v_value;
  __Pyx_INCREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->gamma);
  __Pyx_DECREF(__pyx_v_self->gamma);
  __pyx_v_self->gamma = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("DifferentialAlgebra.DenefLipshitzUple.gamma.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_19DifferentialAlgebra_17DenefLipshitzUple_5gamma_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_19DifferentialAlgebra_17DenefLipshitzUple_5gamma_5__del__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_19DifferentialAlgebra_17DenefLipshitzUple_5gamma_4__del__(((struct __pyx_obj_19DifferentialAlgebra_DenefLipshitzUple *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_19DifferentialAlgebra_17DenefLipshitzUple_5gamma_4__del__(struct __pyx_obj_19DifferentialAlgebra_DenefLipshitzUple *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__", 1);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->gamma);
  __Pyx_DECREF(__pyx_v_self->gamma);
  __pyx_v_self->gamma = ((PyObject*)Py_None);

  /* function exit code */
  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "../../bmi/sympy/DenefLipshitzUple.pyx":22
 *     cdef public list A
 *     cdef public list gamma
 *     cdef public list mu             # <<<<<<<<<<<<<<
 *     cdef public list sigma
 *     cdef public list beta
 */

/* Python wrapper */
static PyObject *__pyx_pw_19DifferentialAlgebra_17DenefLipshitzUple_2mu_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_19DifferentialAlgebra_17DenefLipshitzUple_2mu_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_19DifferentialAlgebra_17DenefLipshitzUple_2mu___get__(((struct __pyx_obj_19DifferentialAlgebra_DenefLipshitzUple *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_19DifferentialAlgebra_17DenefLipshitzUple_2mu___get__(struct __pyx_obj_19DifferentialAlgebra_DenefLipshitzUple *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 1);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->mu);
  __pyx_r = __pyx_v_self->mu;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_19DifferentialAlgebra_17DenefLipshitzUple_2mu_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_19DifferentialAlgebra_17DenefLipshitzUple_2mu_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_19DifferentialAlgebra_17DenefLipshitzUple_2mu_2__set__(((struct __pyx_obj_19DifferentialAlgebra_DenefLipshitzUple *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_19DifferentialAlgebra_17DenefLipshitzUple_2mu_2__set__(struct __pyx_obj_19DifferentialAlgebra_DenefLipshitzUple *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 1);
  if (!(likely(PyList_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None) || __Pyx_RaiseUnexpectedTypeError("list", __pyx_v_value))) __PYX_ERR(6, 22, __pyx_L1_error)
  __pyx_t_1 = __pyx_v_value;
  __Pyx_INCREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->mu);
  __Pyx_DECREF(__pyx_v_self->mu);
  __pyx_v_self->mu = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("DifferentialAlgebra.DenefLipshitzUple.mu.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_19DifferentialAlgebra_17DenefLipshitzUple_2mu_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_19DifferentialAlgebra_17DenefLipshitzUple_2mu_5__del__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_19DifferentialAlgebra_17DenefLipshitzUple_2mu_4__del__(((struct __pyx_obj_19DifferentialAlgebra_DenefLipshitzUple *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_19DifferentialAlgebra_17DenefLipshitzUple_2mu_4__del__(struct __pyx_obj_19DifferentialAlgebra_DenefLipshitzUple *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__", 1);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->mu);
  __Pyx_DECREF(__pyx_v_self->mu);
  __pyx_v_self->mu = ((PyObject*)Py_None);

  /* function exit code */
  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "../../bmi/sympy/DenefLipshitzUple.pyx":23
 *     cdef public list gamma
 *     cdef public list mu
 *     cdef public list sigma             # <<<<<<<<<<<<<<
 *     cdef public list beta
 *     cdef public list delta
 */

/* Python wrapper */
static PyObject *__pyx_pw_19DifferentialAlgebra_17DenefLipshitzUple_5sigma_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_19DifferentialAlgebra_17DenefLipshitzUple_5sigma_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_19DifferentialAlgebra_17DenefLipshitzUple_5sigma___get__(((struct __pyx_obj_19DifferentialAlgebra_DenefLipshitzUple *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_19DifferentialAlgebra_17DenefLipshitzUple_5sigma___get__(struct __pyx_obj_19DifferentialAlgebra_DenefLipshitzUple *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 1);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->sigma);
  __pyx_r = __pyx_v_self->sigma;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_19DifferentialAlgebra_17DenefLipshitzUple_5sigma_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_19DifferentialAlgebra_17DenefLipshitzUple_5sigma_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_19DifferentialAlgebra_17DenefLipshitzUple_5sigma_2__set__(((struct __pyx_obj_19DifferentialAlgebra_DenefLipshitzUple *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_19DifferentialAlgebra_17DenefLipshitzUple_5sigma_2__set__(struct __pyx_obj_19DifferentialAlgebra_DenefLipshitzUple *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 1);
  if (!(likely(PyList_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None) || __Pyx_RaiseUnexpectedTypeError("list", __pyx_v_value))) __PYX_ERR(6, 23, __pyx_L1_error)
  __pyx_t_1 = __pyx_v_value;
  __Pyx_INCREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->sigma);
  __Pyx_DECREF(__pyx_v_self->sigma);
  __pyx_v_self->sigma = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("DifferentialAlgebra.DenefLipshitzUple.sigma.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_19DifferentialAlgebra_17DenefLipshitzUple_5sigma_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_19DifferentialAlgebra_17DenefLipshitzUple_5sigma_5__del__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_19DifferentialAlgebra_17DenefLipshitzUple_5sigma_4__del__(((struct __pyx_obj_19DifferentialAlgebra_DenefLipshitzUple *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_19DifferentialAlgebra_17DenefLipshitzUple_5sigma_4__del__(struct __pyx_obj_19DifferentialAlgebra_DenefLipshitzUple *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__", 1);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->sigma);
  __Pyx_DECREF(__pyx_v_self->sigma);
  __pyx_v_self->sigma = ((PyObject*)Py_None);

  /* function exit code */
  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "../../bmi/sympy/DenefLipshitzUple.pyx":24
 *     cdef public list mu
 *     cdef public list sigma
 *     cdef public list beta             # <<<<<<<<<<<<<<
 *     cdef public list delta
 *     cdef notation
 */

/* Python wrapper */
static PyObject *__pyx_pw_19DifferentialAlgebra_17DenefLipshitzUple_4beta_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_19DifferentialAlgebra_17DenefLipshitzUple_4beta_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_19DifferentialAlgebra_17DenefLipshitzUple_4beta___get__(((struct __pyx_obj_19DifferentialAlgebra_DenefLipshitzUple *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_19DifferentialAlgebra_17DenefLipshitzUple_4beta___get__(struct __pyx_obj_19DifferentialAlgebra_DenefLipshitzUple *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 1);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->beta);
  __pyx_r = __pyx_v_self->beta;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_19DifferentialAlgebra_17DenefLipshitzUple_4beta_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_19DifferentialAlgebra_17DenefLipshitzUple_4beta_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_19DifferentialAlgebra_17DenefLipshitzUple_4beta_2__set__(((struct __pyx_obj_19DifferentialAlgebra_DenefLipshitzUple *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_19DifferentialAlgebra_17DenefLipshitzUple_4beta_2__set__(struct __pyx_obj_19DifferentialAlgebra_DenefLipshitzUple *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 1);
  if (!(likely(PyList_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None) || __Pyx_RaiseUnexpectedTypeError("list", __pyx_v_value))) __PYX_ERR(6, 24, __pyx_L1_error)
  __pyx_t_1 = __pyx_v_value;
  __Pyx_INCREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->beta);
  __Pyx_DECREF(__pyx_v_self->beta);
  __pyx_v_self->beta = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("DifferentialAlgebra.DenefLipshitzUple.beta.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_19DifferentialAlgebra_17DenefLipshitzUple_4beta_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_19DifferentialAlgebra_17DenefLipshitzUple_4beta_5__del__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_19DifferentialAlgebra_17DenefLipshitzUple_4beta_4__del__(((struct __pyx_obj_19DifferentialAlgebra_DenefLipshitzUple *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_19DifferentialAlgebra_17DenefLipshitzUple_4beta_4__del__(struct __pyx_obj_19DifferentialAlgebra_DenefLipshitzUple *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__", 1);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->beta);
  __Pyx_DECREF(__pyx_v_self->beta);
  __pyx_v_self->beta = ((PyObject*)Py_None);

  /* function exit code */
  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "../../bmi/sympy/DenefLipshitzUple.pyx":25
 *     cdef public list sigma
 *     cdef public list beta
 *     cdef public list delta             # <<<<<<<<<<<<<<
 *     cdef notation
 *     cdef bmi_c.ALGEB DLuple
 */

/* Python wrapper */
static PyObject *__pyx_pw_19DifferentialAlgebra_17DenefLipshitzUple_5delta_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_19DifferentialAlgebra_17DenefLipshitzUple_5delta_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_19DifferentialAlgebra_17DenefLipshitzUple_5delta___get__(((struct __pyx_obj_19DifferentialAlgebra_DenefLipshitzUple *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_19DifferentialAlgebra_17DenefLipshitzUple_5delta___get__(struct __pyx_obj_19DifferentialAlgebra_DenefLipshitzUple *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 1);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->delta);
  __pyx_r = __pyx_v_self->delta;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_19DifferentialAlgebra_17DenefLipshitzUple_5delta_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_19DifferentialAlgebra_17DenefLipshitzUple_5delta_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_19DifferentialAlgebra_17DenefLipshitzUple_5delta_2__set__(((struct __pyx_obj_19DifferentialAlgebra_DenefLipshitzUple *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_19DifferentialAlgebra_17DenefLipshitzUple_5delta_2__set__(struct __pyx_obj_19DifferentialAlgebra_DenefLipshitzUple *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 1);
  if (!(likely(PyList_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None) || __Pyx_RaiseUnexpectedTypeError("list", __pyx_v_value))) __PYX_ERR(6, 25, __pyx_L1_error)
  __pyx_t_1 = __pyx_v_value;
  __Pyx_INCREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->delta);
  __Pyx_DECREF(__pyx_v_self->delta);
  __pyx_v_self->delta = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("DifferentialAlgebra.DenefLipshitzUple.delta.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_19DifferentialAlgebra_17DenefLipshitzUple_5delta_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_19DifferentialAlgebra_17DenefLipshitzUple_5delta_5__del__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_19DifferentialAlgebra_17DenefLipshitzUple_5delta_4__del__(((struct __pyx_obj_19DifferentialAlgebra_DenefLipshitzUple *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_19DifferentialAlgebra_17DenefLipshitzUple_5delta_4__del__(struct __pyx_obj_19DifferentialAlgebra_DenefLipshitzUple *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__", 1);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->delta);
  __Pyx_DECREF(__pyx_v_self->delta);
  __pyx_v_self->delta = ((PyObject*)Py_None);

  /* function exit code */
  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "self.DLuple cannot be converted to a Python object for pickling"
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_19DifferentialAlgebra_17DenefLipshitzUple_17__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_19DifferentialAlgebra_17DenefLipshitzUple_17__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_19DifferentialAlgebra_17DenefLipshitzUple_17__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_19DifferentialAlgebra_17DenefLipshitzUple_17__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) {
    __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__reduce_cython__", 0))) return NULL;
  __pyx_r = __pyx_pf_19DifferentialAlgebra_17DenefLipshitzUple_16__reduce_cython__(((struct __pyx_obj_19DifferentialAlgebra_DenefLipshitzUple *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_19DifferentialAlgebra_17DenefLipshitzUple_16__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_19DifferentialAlgebra_DenefLipshitzUple *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 1);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError, "self.DLuple cannot be converted to a Python object for pickling"             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "self.DLuple cannot be converted to a Python object for pickling"
 */
  __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_self_DLuple_cannot_be_converted, 0, 0);
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "self.DLuple cannot be converted to a Python object for pickling"
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("DifferentialAlgebra.DenefLipshitzUple.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "self.DLuple cannot be converted to a Python object for pickling"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "self.DLuple cannot be converted to a Python object for pickling"
 */

/* Python wrapper */
static PyObject *__pyx_pw_19DifferentialAlgebra_17DenefLipshitzUple_19__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_19DifferentialAlgebra_17DenefLipshitzUple_19__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_19DifferentialAlgebra_17DenefLipshitzUple_19__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_19DifferentialAlgebra_17DenefLipshitzUple_19__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v___pyx_state = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_state,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 3, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__setstate_cython__") < 0)) __PYX_ERR(1, 3, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v___pyx_state = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 3, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("DifferentialAlgebra.DenefLipshitzUple.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_19DifferentialAlgebra_17DenefLipshitzUple_18__setstate_cython__(((struct __pyx_obj_19DifferentialAlgebra_DenefLipshitzUple *)__pyx_v_self), __pyx_v___pyx_state);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_19DifferentialAlgebra_17DenefLipshitzUple_18__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_19DifferentialAlgebra_DenefLipshitzUple *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setstate_cython__", 1);

  /* "(tree fragment)":4
 *     raise TypeError, "self.DLuple cannot be converted to a Python object for pickling"
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "self.DLuple cannot be converted to a Python object for pickling"             # <<<<<<<<<<<<<<
 */
  __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_self_DLuple_cannot_be_converted, 0, 0);
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "self.DLuple cannot be converted to a Python object for pickling"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "self.DLuple cannot be converted to a Python object for pickling"
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("DifferentialAlgebra.DenefLipshitzUple.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __pyx_unpickle_BaseFieldExtension(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

/* Python wrapper */
static PyObject *__pyx_pw_19DifferentialAlgebra_7__pyx_unpickle_BaseFieldExtension(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_19DifferentialAlgebra_7__pyx_unpickle_BaseFieldExtension = {"__pyx_unpickle_BaseFieldExtension", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_19DifferentialAlgebra_7__pyx_unpickle_BaseFieldExtension, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_19DifferentialAlgebra_7__pyx_unpickle_BaseFieldExtension(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v___pyx_type = 0;
  long __pyx_v___pyx_checksum;
  PyObject *__pyx_v___pyx_state = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[3] = {0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__pyx_unpickle_BaseFieldExtension (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_type)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_checksum)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_BaseFieldExtension", 1, 3, 3, 1); __PYX_ERR(1, 1, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[2]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_BaseFieldExtension", 1, 3, 3, 2); __PYX_ERR(1, 1, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__pyx_unpickle_BaseFieldExtension") < 0)) __PYX_ERR(1, 1, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 3)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
      values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
    }
    __pyx_v___pyx_type = values[0];
    __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
    __pyx_v___pyx_state = values[2];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_BaseFieldExtension", 1, 3, 3, __pyx_nargs); __PYX_ERR(1, 1, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("DifferentialAlgebra.__pyx_unpickle_BaseFieldExtension", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_19DifferentialAlgebra_6__pyx_unpickle_BaseFieldExtension(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_19DifferentialAlgebra_6__pyx_unpickle_BaseFieldExtension(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_v___pyx_PickleError = 0;
  PyObject *__pyx_v___pyx_result = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  unsigned int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_BaseFieldExtension", 1);

  /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum not in (0x472eff0, 0x42c8ac3, 0x9bfe941):             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x472eff0, 0x42c8ac3, 0x9bfe941) = (evdict, gens, notation, rels, rels_are_provided))" % __pyx_checksum
 */
  __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_t_1, __pyx_tuple__82, Py_NE)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "(tree fragment)":5
 *     cdef object __pyx_result
 *     if __pyx_checksum not in (0x472eff0, 0x42c8ac3, 0x9bfe941):
 *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
 *         raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x472eff0, 0x42c8ac3, 0x9bfe941) = (evdict, gens, notation, rels, rels_are_provided))" % __pyx_checksum
 *     __pyx_result = BaseFieldExtension.__new__(__pyx_type)
 */
    __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_n_s_PickleError);
    __Pyx_GIVEREF(__pyx_n_s_PickleError);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_PickleError)) __PYX_ERR(1, 5, __pyx_L1_error);
    __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_1, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_t_1);
    __pyx_v___pyx_PickleError = __pyx_t_1;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "(tree fragment)":6
 *     if __pyx_checksum not in (0x472eff0, 0x42c8ac3, 0x9bfe941):
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x472eff0, 0x42c8ac3, 0x9bfe941) = (evdict, gens, notation, rels, rels_are_provided))" % __pyx_checksum             # <<<<<<<<<<<<<<
 *     __pyx_result = BaseFieldExtension.__new__(__pyx_type)
 *     if __pyx_state is not None:
 */
    __pyx_t_3 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_0x_x_vs_0, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_Raise(__pyx_v___pyx_PickleError, __pyx_t_1, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(1, 6, __pyx_L1_error)

    /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum not in (0x472eff0, 0x42c8ac3, 0x9bfe941):             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x472eff0, 0x42c8ac3, 0x9bfe941) = (evdict, gens, notation, rels, rels_are_provided))" % __pyx_checksum
 */
  }

  /* "(tree fragment)":7
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x472eff0, 0x42c8ac3, 0x9bfe941) = (evdict, gens, notation, rels, rels_are_provided))" % __pyx_checksum
 *     __pyx_result = BaseFieldExtension.__new__(__pyx_type)             # <<<<<<<<<<<<<<
 *     if __pyx_state is not None:
 *         __pyx_unpickle_BaseFieldExtension__set_state(<BaseFieldExtension> __pyx_result, __pyx_state)
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_19DifferentialAlgebra_BaseFieldExtension), __pyx_n_s_new); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v___pyx_type};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 7, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v___pyx_result = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "(tree fragment)":8
 *         raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x472eff0, 0x42c8ac3, 0x9bfe941) = (evdict, gens, notation, rels, rels_are_provided))" % __pyx_checksum
 *     __pyx_result = BaseFieldExtension.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_BaseFieldExtension__set_state(<BaseFieldExtension> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  __pyx_t_2 = (__pyx_v___pyx_state != Py_None);
  if (__pyx_t_2) {

    /* "(tree fragment)":9
 *     __pyx_result = BaseFieldExtension.__new__(__pyx_type)
 *     if __pyx_state is not None:
 *         __pyx_unpickle_BaseFieldExtension__set_state(<BaseFieldExtension> __pyx_result, __pyx_state)             # <<<<<<<<<<<<<<
 *     return __pyx_result
 * cdef __pyx_unpickle_BaseFieldExtension__set_state(BaseFieldExtension __pyx_result, tuple __pyx_state):
 */
    if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(1, 9, __pyx_L1_error)
    __pyx_t_1 = __pyx_f_19DifferentialAlgebra___pyx_unpickle_BaseFieldExtension__set_state(((struct __pyx_obj_19DifferentialAlgebra_BaseFieldExtension *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 9, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "(tree fragment)":8
 *         raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x472eff0, 0x42c8ac3, 0x9bfe941) = (evdict, gens, notation, rels, rels_are_provided))" % __pyx_checksum
 *     __pyx_result = BaseFieldExtension.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_BaseFieldExtension__set_state(<BaseFieldExtension> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  }

  /* "(tree fragment)":10
 *     if __pyx_state is not None:
 *         __pyx_unpickle_BaseFieldExtension__set_state(<BaseFieldExtension> __pyx_result, __pyx_state)
 *     return __pyx_result             # <<<<<<<<<<<<<<
 * cdef __pyx_unpickle_BaseFieldExtension__set_state(BaseFieldExtension __pyx_result, tuple __pyx_state):
 *     __pyx_result.evdict = __pyx_state[0]; __pyx_result.gens = __pyx_state[1]; __pyx_result.notation = __pyx_state[2]; __pyx_result.rels = __pyx_state[3]; __pyx_result.rels_are_provided = __pyx_state[4]
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v___pyx_result);
  __pyx_r = __pyx_v___pyx_result;
  goto __pyx_L0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_BaseFieldExtension(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("DifferentialAlgebra.__pyx_unpickle_BaseFieldExtension", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v___pyx_PickleError);
  __Pyx_XDECREF(__pyx_v___pyx_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":11
 *         __pyx_unpickle_BaseFieldExtension__set_state(<BaseFieldExtension> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_BaseFieldExtension__set_state(BaseFieldExtension __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result.evdict = __pyx_state[0]; __pyx_result.gens = __pyx_state[1]; __pyx_result.notation = __pyx_state[2]; __pyx_result.rels = __pyx_state[3]; __pyx_result.rels_are_provided = __pyx_state[4]
 *     if len(__pyx_state) > 5 and hasattr(__pyx_result, '__dict__'):
 */

static PyObject *__pyx_f_19DifferentialAlgebra___pyx_unpickle_BaseFieldExtension__set_state(struct __pyx_obj_19DifferentialAlgebra_BaseFieldExtension *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  unsigned int __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_BaseFieldExtension__set_state", 1);

  /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle_BaseFieldExtension__set_state(BaseFieldExtension __pyx_result, tuple __pyx_state):
 *     __pyx_result.evdict = __pyx_state[0]; __pyx_result.gens = __pyx_state[1]; __pyx_result.notation = __pyx_state[2]; __pyx_result.rels = __pyx_state[3]; __pyx_result.rels_are_provided = __pyx_state[4]             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 5 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[5])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->evdict);
  __Pyx_DECREF(__pyx_v___pyx_result->evdict);
  __pyx_v___pyx_result->evdict = __pyx_t_1;
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyList_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("list", __pyx_t_1))) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->gens);
  __Pyx_DECREF(__pyx_v___pyx_result->gens);
  __pyx_v___pyx_result->gens = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->notation);
  __Pyx_DECREF(__pyx_v___pyx_result->notation);
  __pyx_v___pyx_result->notation = __pyx_t_1;
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_19DifferentialAlgebra_RegularDifferentialChain))))) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF((PyObject *)__pyx_v___pyx_result->rels);
  __Pyx_DECREF((PyObject *)__pyx_v___pyx_result->rels);
  __pyx_v___pyx_result->rels = ((struct __pyx_obj_19DifferentialAlgebra_RegularDifferentialChain *)__pyx_t_1);
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_7cpython_4bool_bool))))) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF((PyObject *)__pyx_v___pyx_result->rels_are_provided);
  __Pyx_DECREF((PyObject *)__pyx_v___pyx_result->rels_are_provided);
  __pyx_v___pyx_result->rels_are_provided = ((PyBoolObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "(tree fragment)":13
 * cdef __pyx_unpickle_BaseFieldExtension__set_state(BaseFieldExtension __pyx_result, tuple __pyx_state):
 *     __pyx_result.evdict = __pyx_state[0]; __pyx_result.gens = __pyx_state[1]; __pyx_result.notation = __pyx_state[2]; __pyx_result.rels = __pyx_state[3]; __pyx_result.rels_are_provided = __pyx_state[4]
 *     if len(__pyx_state) > 5 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[5])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(1, 13, __pyx_L1_error)
  }
  __pyx_t_3 = __Pyx_PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
  __pyx_t_4 = (__pyx_t_3 > 5);
  if (__pyx_t_4) {
  } else {
    __pyx_t_2 = __pyx_t_4;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_4 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
  __pyx_t_2 = __pyx_t_4;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_2) {

    /* "(tree fragment)":14
 *     __pyx_result.evdict = __pyx_state[0]; __pyx_result.gens = __pyx_state[1]; __pyx_result.notation = __pyx_state[2]; __pyx_result.rels = __pyx_state[3]; __pyx_result.rels_are_provided = __pyx_state[4]
 *     if len(__pyx_state) > 5 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[5])             # <<<<<<<<<<<<<<
 */
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_update); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(__pyx_v___pyx_state == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 14, __pyx_L1_error)
    }
    __pyx_t_5 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 5, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_7 = NULL;
    __pyx_t_8 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_6, function);
        __pyx_t_8 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_t_5};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_8, 1+__pyx_t_8);
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 14, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "(tree fragment)":13
 * cdef __pyx_unpickle_BaseFieldExtension__set_state(BaseFieldExtension __pyx_result, tuple __pyx_state):
 *     __pyx_result.evdict = __pyx_state[0]; __pyx_result.gens = __pyx_state[1]; __pyx_result.notation = __pyx_state[2]; __pyx_result.rels = __pyx_state[3]; __pyx_result.rels_are_provided = __pyx_state[4]
 *     if len(__pyx_state) > 5 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[5])
 */
  }

  /* "(tree fragment)":11
 *         __pyx_unpickle_BaseFieldExtension__set_state(<BaseFieldExtension> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_BaseFieldExtension__set_state(BaseFieldExtension __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result.evdict = __pyx_state[0]; __pyx_result.gens = __pyx_state[1]; __pyx_result.notation = __pyx_state[2]; __pyx_result.rels = __pyx_state[3]; __pyx_result.rels_are_provided = __pyx_state[4]
 *     if len(__pyx_state) > 5 and hasattr(__pyx_result, '__dict__'):
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("DifferentialAlgebra.__pyx_unpickle_BaseFieldExtension__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_tp_new_19DifferentialAlgebra_DifferentialRing(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  struct __pyx_obj_19DifferentialAlgebra_DifferentialRing *p;
  PyObject *o;
  #if CYTHON_COMPILING_IN_LIMITED_API
  allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc);
  o = alloc_func(t, 0);
  #else
  if (likely(!__Pyx_PyType_HasFeature(t, Py_TPFLAGS_IS_ABSTRACT))) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  #endif
  p = ((struct __pyx_obj_19DifferentialAlgebra_DifferentialRing *)o);
  p->notation = ((PyObject*)Py_None); Py_INCREF(Py_None);
  p->evdict = Py_None; Py_INCREF(Py_None);
  return o;
}

static void __pyx_tp_dealloc_19DifferentialAlgebra_DifferentialRing(PyObject *o) {
  struct __pyx_obj_19DifferentialAlgebra_DifferentialRing *p = (struct __pyx_obj_19DifferentialAlgebra_DifferentialRing *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) {
    if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_19DifferentialAlgebra_DifferentialRing) {
      if (PyObject_CallFinalizerFromDealloc(o)) return;
    }
  }
  #endif
  PyObject_GC_UnTrack(o);
  {
    PyObject *etype, *eval, *etb;
    PyErr_Fetch(&etype, &eval, &etb);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
    __pyx_pw_19DifferentialAlgebra_16DifferentialRing_7__dealloc__(o);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
    PyErr_Restore(etype, eval, etb);
  }
  Py_CLEAR(p->notation);
  Py_CLEAR(p->evdict);
  #if CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY
  (*Py_TYPE(o)->tp_free)(o);
  #else
  {
    freefunc tp_free = (freefunc)PyType_GetSlot(Py_TYPE(o), Py_tp_free);
    if (tp_free) tp_free(o);
  }
  #endif
}

static int __pyx_tp_traverse_19DifferentialAlgebra_DifferentialRing(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_19DifferentialAlgebra_DifferentialRing *p = (struct __pyx_obj_19DifferentialAlgebra_DifferentialRing *)o;
  if (p->evdict) {
    e = (*v)(p->evdict, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_19DifferentialAlgebra_DifferentialRing(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_19DifferentialAlgebra_DifferentialRing *p = (struct __pyx_obj_19DifferentialAlgebra_DifferentialRing *)o;
  tmp = ((PyObject*)p->evdict);
  p->evdict = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_19DifferentialAlgebra_16DifferentialRing_evdict(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_19DifferentialAlgebra_16DifferentialRing_6evdict_1__get__(o);
}

static int __pyx_setprop_19DifferentialAlgebra_16DifferentialRing_evdict(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_19DifferentialAlgebra_16DifferentialRing_6evdict_3__set__(o, v);
  }
  else {
    return __pyx_pw_19DifferentialAlgebra_16DifferentialRing_6evdict_5__del__(o);
  }
}

static PyObject *__pyx_specialmethod___pyx_pw_19DifferentialAlgebra_16DifferentialRing_9__repr__(PyObject *self, CYTHON_UNUSED PyObject *arg) {
  return __pyx_pw_19DifferentialAlgebra_16DifferentialRing_9__repr__(self);
}

static PyMethodDef __pyx_methods_19DifferentialAlgebra_DifferentialRing[] = {
  {"_DifferentialRing__process_notation", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_19DifferentialAlgebra_16DifferentialRing_1_DifferentialRing__process_notation, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"_DifferentialRing__listof_symbols", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_19DifferentialAlgebra_16DifferentialRing_3_DifferentialRing__listof_symbols, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"__repr__", (PyCFunction)__pyx_specialmethod___pyx_pw_19DifferentialAlgebra_16DifferentialRing_9__repr__, METH_NOARGS|METH_COEXIST, 0},
  {"_latex", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_19DifferentialAlgebra_16DifferentialRing_11_latex, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"coeffs", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_19DifferentialAlgebra_16DifferentialRing_13coeffs, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_19DifferentialAlgebra_16DifferentialRing_12coeffs},
  {"equations", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_19DifferentialAlgebra_16DifferentialRing_15equations, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_19DifferentialAlgebra_16DifferentialRing_14equations},
  {"_DifferentialRing__process_evdict", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_19DifferentialAlgebra_16DifferentialRing_17_DifferentialRing__process_evdict, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_19DifferentialAlgebra_16DifferentialRing_16__process_evdict},
  {"_DifferentialRing__evaluate", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_19DifferentialAlgebra_16DifferentialRing_19_DifferentialRing__evaluate, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_19DifferentialAlgebra_16DifferentialRing_18__evaluate},
  {"evaluate", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_19DifferentialAlgebra_16DifferentialRing_21evaluate, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_19DifferentialAlgebra_16DifferentialRing_20evaluate},
  {"factor_derivative", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_19DifferentialAlgebra_16DifferentialRing_23factor_derivative, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_19DifferentialAlgebra_16DifferentialRing_22factor_derivative},
  {"indets", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_19DifferentialAlgebra_16DifferentialRing_25indets, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_19DifferentialAlgebra_16DifferentialRing_24indets},
  {"is_differential_fraction", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_19DifferentialAlgebra_16DifferentialRing_27is_differential_fraction, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_19DifferentialAlgebra_16DifferentialRing_26is_differential_fraction},
  {"is_constant", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_19DifferentialAlgebra_16DifferentialRing_29is_constant, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_19DifferentialAlgebra_16DifferentialRing_28is_constant},
  {"leading_derivative", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_19DifferentialAlgebra_16DifferentialRing_31leading_derivative, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_19DifferentialAlgebra_16DifferentialRing_30leading_derivative},
  {"leading_rank", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_19DifferentialAlgebra_16DifferentialRing_33leading_rank, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_19DifferentialAlgebra_16DifferentialRing_32leading_rank},
  {"initial", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_19DifferentialAlgebra_16DifferentialRing_35initial, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_19DifferentialAlgebra_16DifferentialRing_34initial},
  {"leading_coefficient", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_19DifferentialAlgebra_16DifferentialRing_37leading_coefficient, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_19DifferentialAlgebra_16DifferentialRing_36leading_coefficient},
  {"tail", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_19DifferentialAlgebra_16DifferentialRing_39tail, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_19DifferentialAlgebra_16DifferentialRing_38tail},
  {"separant", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_19DifferentialAlgebra_16DifferentialRing_41separant, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_19DifferentialAlgebra_16DifferentialRing_40separant},
  {"integrate", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_19DifferentialAlgebra_16DifferentialRing_43integrate, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_19DifferentialAlgebra_16DifferentialRing_42integrate},
  {"differentiate", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_19DifferentialAlgebra_16DifferentialRing_45differentiate, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_19DifferentialAlgebra_16DifferentialRing_44differentiate},
  {"differential_prem", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_19DifferentialAlgebra_16DifferentialRing_47differential_prem, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_19DifferentialAlgebra_16DifferentialRing_46differential_prem},
  {"normal_form", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_19DifferentialAlgebra_16DifferentialRing_49normal_form, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_19DifferentialAlgebra_16DifferentialRing_48normal_form},
  {"sort", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_19DifferentialAlgebra_16DifferentialRing_51sort, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_19DifferentialAlgebra_16DifferentialRing_50sort},
  {"DenefLipshitz", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_19DifferentialAlgebra_16DifferentialRing_53DenefLipshitz, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_19DifferentialAlgebra_16DifferentialRing_52DenefLipshitz},
  {"RosenfeldGroebner", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_19DifferentialAlgebra_16DifferentialRing_55RosenfeldGroebner, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_19DifferentialAlgebra_16DifferentialRing_54RosenfeldGroebner},
  {"_process_equations", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_19DifferentialAlgebra_16DifferentialRing_57_process_equations, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_19DifferentialAlgebra_16DifferentialRing_56_process_equations},
  {"_ranking", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_19DifferentialAlgebra_16DifferentialRing_59_ranking, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_19DifferentialAlgebra_16DifferentialRing_58_ranking},
  {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_19DifferentialAlgebra_16DifferentialRing_61__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_19DifferentialAlgebra_16DifferentialRing_63__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_19DifferentialAlgebra_DifferentialRing[] = {
  {(char *)"evdict", __pyx_getprop_19DifferentialAlgebra_16DifferentialRing_evdict, __pyx_setprop_19DifferentialAlgebra_16DifferentialRing_evdict, (char *)0, 0},
  {0, 0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_19DifferentialAlgebra_DifferentialRing_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_19DifferentialAlgebra_DifferentialRing},
  {Py_tp_repr, (void *)__pyx_pw_19DifferentialAlgebra_16DifferentialRing_9__repr__},
  {Py_tp_doc, (void *)PyDoc_STR("\n    The class DifferentialRing implements differential polynomial rings\n\n    Differential rings can be endowed with zero, one or many different\n    derivations.\n\n    Each derivation is denoted using a symbol and is associated to an\n    independent variable.\n\n    Differential rings are built over an alphabet of dependent variables\n    (called differential indeterminates by Ritt and Kolchin), which\n    are presented in a list of blocks.\n\n    Differential polynomials are plain polynomials, built over the\n    infinite alphabet of the derivatives of the dependent variables,\n    often called derivatives in this package, plus the finite set of\n    the independent variables.\n\n    Here is a basic example of an ordinary differential polynomial ring\n    in one differential indeterminate y and derivation with respect\n    to x.  The result of the command is a data structure displayed as\n    `differential_ring`:\n\n        >>> from sympy import *\n        >>> from DifferentialAlgebra import *\n        >>> init_printing (use_unicode=False, num_columns=68)\n        >>> x = var ('x')\n        >>> y = function ('y')\n        >>> DifferentialRing (derivations = [x], blocks = [y])\n        differential_ring\n\n    The rest of this documentation addresses:\n\n        - PARAMETERS\n\n        - RANGE INDEXED PARAMETERS\n\n        - RANKINGS\n\n        - NOTATIONS\n\n    PARAMETERS:\n\n    While building differential rings, it is possible to customize\n    the dependencies of the dependent variables with respect to\n    the independent variables. By default, each dependent variable\n    depends on all the independent variables but this can be customized\n    as follows.\n\n        >>> x,t,a,b = var ('x,t,a,b')\n        >>> y,z = function ('y,z')\n\n    The differential indetermnates a,b are defined as constant\n    parameters\n\n        >>> R = DifferentialRing (derivations = [x,t], \n        ...             blocks = [y,z,a,b], parameters = [a,b])\n        >>> R.diffe""rentiate (a*y(x,t) + z(x,t) + b, x)\n          d             d          \n        a*--(y(x, t)) + --(z(x, t))\n          dx            dx         \n\n    It is also possible to use the parameters argument to customize the\n    order of the independent variables while printing some differential\n    indeterminates:\n\n        >>> b = function('b')\n        >>> R = DifferentialRing (derivations = [x,t], \n        ...             blocks = [y,z,a,b], parameters = [a,'b(t,x)'])\n        >>> R.differentiate (a*y(x,t) + z(x,t) + b(t,x), x)\n          d             d             d          \n        a*--(y(x, t)) + --(b(t, x)) + --(z(x, t))\n          dx            dx            dx         \n\n    It is also possible to make some differential indeterminates depend\n    on a specific subset of the independent variables:\n\n        >>> R = DifferentialRing (derivations = [x,t], \n        ...             blocks = [y,z,a,b], parameters = [a,'b(t)'])\n        >>> R.differentiate (a*y(x,t) + z(x,t) + b(t), x)\n          d             d          \n        a*--(y(x, t)) + --(z(x, t))\n          dx            dx         \n\n        >>> R.differentiate (a*y(x,t) + z(x,t) + b(t), t)\n          d             d          d          \n        a*--(y(x, t)) + --(b(t)) + --(z(x, t))\n          dt            dt         dt         \n\n    RANGE INDEXED PARAMETERS:\n\n    It is possible to define parameters indexed over possibly infinite\n    ranges of integers. Observe the mandatory parentheses around the\n    range indexed parameter a:\n\n        >>> a,b = indexedbase ('a,b')\n        >>> R = DifferentialRing (derivations = [x,t], \n        ...                         blocks = [y,z,'(a)[oo:-1]'], \n        ...                         parameters = ['(a)[oo:-1]'])\n\n        >>> R.differentiate (a[109]*y(x,t) + z(x,t) + a[187], t)\n        d                    d          \n        --(y(x, t))*a[109] + --(z(x, t))\n        dt                   dt         \n\n    Here is a more complicated examp""le:\n\n        >>> R = DifferentialRing (derivations = [x,t], \n        ...                     blocks = [y,z,'(a,b)[oo:-1,0:100]'], \n        ...                     parameters = ['(a,b)[oo:-1,0:100]'])\n        >>> R.sort ([a[4,7], a[4,8], b[5,12], b[108,0], b[0,0]], \n        ...                                     mode = 'descending')\n        [b[108, 0], a[4, 7], a[4, 8], b[5, 12], b[0, 0]]\n\n    RANKINGS:\n\n    The list of blocks, together with the list of derivations, define\n    a so-called ranking. Observe that rankings apply to parameters\n    also and that parameters do not need to lie at the bottom of\n    the rankings.\n\n    A ranking is any total ordering over the set of the derivatives (in\n    this package, rankings are extended to the independent variables),\n    which satisfies the two axioms of rankings:\n\n    - Every derivative u is less than any of its proper derivatives.\n\n    - If u and v are derivatives such that u is less than v and x is\n      any independent variable, then the derivative of u with respect\n      to x is less than the derivative of v with respect to x.\n\n    In this package, rankings are defined by the list x[1] > ... >\n    x[p] of the independent variables plus a list b[1] >> ... >> b[n]\n    of blocks.  Each block b is defined by a list u[1] > ... > u[m]\n    of dependent variables. Any dependent variable must appear in\n    exactly one block.\n\n    The >> operator between blocks indicates a block elimination\n    ranking: if b[i] >> b[j] are two blocks, v[i] is any derivative\n    of any dependent variable occurring in b[i], and, v[j] is any\n    derivative of any dependent variable occurring in b[j], then v[i]\n    > v[j].\n\n    Within a given block b = u[1] > ... > u[m], in the ordinary\n    differential case (only one derivation), the derivatives are\n    ordered by the unique orderly ranking such that u[1] > ... > u[m]:\n    the derivatives of higher order are ranked above the derivatives\n    if lower order"" ; two derivatives having the same order are ranked\n    using the ordering defined by the list.\n\n        >>> x,a,b = var ('x,a,b')\n        >>> y,z = function ('y,z')\n\n    Mathematically, R is a differential ring, with a single derivation.\n    Among the four dependent variables listed in the block list,\n    two of them do not depend on any independent variable. They thus\n    should be viewed as parameters, in the usual sense. Following Ritt\n    and Kolchin notation, R = Q[x,a,b]{z,y} with derivation d/dx:\n\n        >>> R = DifferentialRing (derivations = [x], \n        ...             blocks = [z,y,a,b], parameters = [a,b])\n\n    Here is a differential polynomial which belongs to R\n\n        >>> poly = a*Derivative(y(x),x) + b + x*y(x) \\\n        ...                     + Derivative(z(x),x)**2 + z(x)\n\n    The ranking is a pure elimination ranking:\n\n        >>> R.sort (R.indets (poly, selection = 'all'), 'descending')\n         d               d                       \n        [--(z(x)), z(x), --(y(x)), y(x), a, b, x]\n         dx              dx                      \n\n    Mathematically, S and R define the same ring. The ranking of\n    S is different from that of R. Observe that parameters are not\n    necessarily listed at the bottom of the ranking:\n\n        >>> S = DifferentialRing (derivations = [x], \n        ...             blocks = [b,a,y,z], parameters = [a,b])\n\n    Mathematically, T, S and R define the same ring. The derivatives\n    of z and y are ranked orderly:\n\n        >>> T = DifferentialRing (derivations = [x], \n        ...             blocks = [[z,y],a,b], parameters = [a,b])\n\n    Last, here is an example of a partial ring. The ranking is orderly.\n    The dependent variable v does not depend on x:\n\n        >>> x,y = var ('x,y')\n        >>> u,v = function ('u,v')\n        >>> R = DifferentialRing (derivations = [x,y], \n        ...             blocks = [[u,v]], parameters = [v(y)])\n\n        >>> poly = u(x,y) + v(y)""\n        >>> R.sort (R.indets (poly, selection = 'all'), 'descending')\n        [u(x, y), v(y)]\n\n    NOTATIONS:\n\n    Available notations are:\n\n        - 'Derivative' (default)\n\n        - 'jet'\n\n        - 'jet' with a parameter\n\n    Due to sympy limitations, some methods of the DifferentialAlgebra\n    package are restricted to some notations.\n\n    The default notation is the Derivative notation. In this notation,\n    differential indeterminates which are not constant parameters\n    should be declared using `function` (see the above examples).\n\n    Another notation is the jet one, which provides shorter outputs.\n    In this notation, differential indeterminates should be declared\n    using `indexedbase`:\n\n        >>> x,y = var ('x,y')\n        >>> u,v = indexedbase ('u,v')\n        >>> R = DifferentialRing (derivations = [x,y], blocks = [[u,v]],\n        ...                 parameters = ['v(y)'], notation = 'jet')\n\n    Differentiations are denoted using subscripts: u[x] stands for\n    the derivative of u with respect to x:\n\n        >>> poly = u*u[x] + 2*v**2\n        >>> R.differentiate(poly, y)\n        u[x, y]*u + u[x]*u[y] + 4*v[y]*v\n\n    Yet another notation is the jet notation with a parameter.\n    It is the jet notation with a specific way for denoting order\n    zero derivatives. It may be useful because some sympy functions\n    do not accept expressions mixing indexedbase symbols such as u\n    and indexed ones such as u[x].\n\n        >>> R = DifferentialRing (derivations = [x,y], blocks = [[u,v]],\n        ...                 parameters = ['v(y)'], notation = 'jet(_)')\n        >>> R.differentiate (poly, y)\n        u[_]*u[x, y] + u[x]*u[y] + 4*v[_]*v[y]\n    ")},
  {Py_tp_traverse, (void *)__pyx_tp_traverse_19DifferentialAlgebra_DifferentialRing},
  {Py_tp_clear, (void *)__pyx_tp_clear_19DifferentialAlgebra_DifferentialRing},
  {Py_tp_methods, (void *)__pyx_methods_19DifferentialAlgebra_DifferentialRing},
  {Py_tp_getset, (void *)__pyx_getsets_19DifferentialAlgebra_DifferentialRing},
  {Py_tp_init, (void *)__pyx_pw_19DifferentialAlgebra_16DifferentialRing_5__init__},
  {Py_tp_new, (void *)__pyx_tp_new_19DifferentialAlgebra_DifferentialRing},
  {0, 0},
};
static PyType_Spec __pyx_type_19DifferentialAlgebra_DifferentialRing_spec = {
  "DifferentialAlgebra.DifferentialRing",
  sizeof(struct __pyx_obj_19DifferentialAlgebra_DifferentialRing),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
  __pyx_type_19DifferentialAlgebra_DifferentialRing_slots,
};
#else

static PyTypeObject __pyx_type_19DifferentialAlgebra_DifferentialRing = {
  PyVarObject_HEAD_INIT(0, 0)
  "DifferentialAlgebra.""DifferentialRing", /*tp_name*/
  sizeof(struct __pyx_obj_19DifferentialAlgebra_DifferentialRing), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_19DifferentialAlgebra_DifferentialRing, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  __pyx_pw_19DifferentialAlgebra_16DifferentialRing_9__repr__, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  PyDoc_STR("\n    The class DifferentialRing implements differential polynomial rings\n\n    Differential rings can be endowed with zero, one or many different\n    derivations.\n\n    Each derivation is denoted using a symbol and is associated to an\n    independent variable.\n\n    Differential rings are built over an alphabet of dependent variables\n    (called differential indeterminates by Ritt and Kolchin), which\n    are presented in a list of blocks.\n\n    Differential polynomials are plain polynomials, built over the\n    infinite alphabet of the derivatives of the dependent variables,\n    often called derivatives in this package, plus the finite set of\n    the independent variables.\n\n    Here is a basic example of an ordinary differential polynomial ring\n    in one differential indeterminate y and derivation with respect\n    to x.  The result of the command is a data structure displayed as\n    `differential_ring`:\n\n        >>> from sympy import *\n        >>> from DifferentialAlgebra import *\n        >>> init_printing (use_unicode=False, num_columns=68)\n        >>> x = var ('x')\n        >>> y = function ('y')\n        >>> DifferentialRing (derivations = [x], blocks = [y])\n        differential_ring\n\n    The rest of this documentation addresses:\n\n        - PARAMETERS\n\n        - RANGE INDEXED PARAMETERS\n\n        - RANKINGS\n\n        - NOTATIONS\n\n    PARAMETERS:\n\n    While building differential rings, it is possible to customize\n    the dependencies of the dependent variables with respect to\n    the independent variables. By default, each dependent variable\n    depends on all the independent variables but this can be customized\n    as follows.\n\n        >>> x,t,a,b = var ('x,t,a,b')\n        >>> y,z = function ('y,z')\n\n    The differential indetermnates a,b are defined as constant\n    parameters\n\n        >>> R = DifferentialRing (derivations = [x,t], \n        ...             blocks = [y,z,a,b], parameters = [a,b])\n        >>> R.diffe""rentiate (a*y(x,t) + z(x,t) + b, x)\n          d             d          \n        a*--(y(x, t)) + --(z(x, t))\n          dx            dx         \n\n    It is also possible to use the parameters argument to customize the\n    order of the independent variables while printing some differential\n    indeterminates:\n\n        >>> b = function('b')\n        >>> R = DifferentialRing (derivations = [x,t], \n        ...             blocks = [y,z,a,b], parameters = [a,'b(t,x)'])\n        >>> R.differentiate (a*y(x,t) + z(x,t) + b(t,x), x)\n          d             d             d          \n        a*--(y(x, t)) + --(b(t, x)) + --(z(x, t))\n          dx            dx            dx         \n\n    It is also possible to make some differential indeterminates depend\n    on a specific subset of the independent variables:\n\n        >>> R = DifferentialRing (derivations = [x,t], \n        ...             blocks = [y,z,a,b], parameters = [a,'b(t)'])\n        >>> R.differentiate (a*y(x,t) + z(x,t) + b(t), x)\n          d             d          \n        a*--(y(x, t)) + --(z(x, t))\n          dx            dx         \n\n        >>> R.differentiate (a*y(x,t) + z(x,t) + b(t), t)\n          d             d          d          \n        a*--(y(x, t)) + --(b(t)) + --(z(x, t))\n          dt            dt         dt         \n\n    RANGE INDEXED PARAMETERS:\n\n    It is possible to define parameters indexed over possibly infinite\n    ranges of integers. Observe the mandatory parentheses around the\n    range indexed parameter a:\n\n        >>> a,b = indexedbase ('a,b')\n        >>> R = DifferentialRing (derivations = [x,t], \n        ...                         blocks = [y,z,'(a)[oo:-1]'], \n        ...                         parameters = ['(a)[oo:-1]'])\n\n        >>> R.differentiate (a[109]*y(x,t) + z(x,t) + a[187], t)\n        d                    d          \n        --(y(x, t))*a[109] + --(z(x, t))\n        dt                   dt         \n\n    Here is a more complicated examp""le:\n\n        >>> R = DifferentialRing (derivations = [x,t], \n        ...                     blocks = [y,z,'(a,b)[oo:-1,0:100]'], \n        ...                     parameters = ['(a,b)[oo:-1,0:100]'])\n        >>> R.sort ([a[4,7], a[4,8], b[5,12], b[108,0], b[0,0]], \n        ...                                     mode = 'descending')\n        [b[108, 0], a[4, 7], a[4, 8], b[5, 12], b[0, 0]]\n\n    RANKINGS:\n\n    The list of blocks, together with the list of derivations, define\n    a so-called ranking. Observe that rankings apply to parameters\n    also and that parameters do not need to lie at the bottom of\n    the rankings.\n\n    A ranking is any total ordering over the set of the derivatives (in\n    this package, rankings are extended to the independent variables),\n    which satisfies the two axioms of rankings:\n\n    - Every derivative u is less than any of its proper derivatives.\n\n    - If u and v are derivatives such that u is less than v and x is\n      any independent variable, then the derivative of u with respect\n      to x is less than the derivative of v with respect to x.\n\n    In this package, rankings are defined by the list x[1] > ... >\n    x[p] of the independent variables plus a list b[1] >> ... >> b[n]\n    of blocks.  Each block b is defined by a list u[1] > ... > u[m]\n    of dependent variables. Any dependent variable must appear in\n    exactly one block.\n\n    The >> operator between blocks indicates a block elimination\n    ranking: if b[i] >> b[j] are two blocks, v[i] is any derivative\n    of any dependent variable occurring in b[i], and, v[j] is any\n    derivative of any dependent variable occurring in b[j], then v[i]\n    > v[j].\n\n    Within a given block b = u[1] > ... > u[m], in the ordinary\n    differential case (only one derivation), the derivatives are\n    ordered by the unique orderly ranking such that u[1] > ... > u[m]:\n    the derivatives of higher order are ranked above the derivatives\n    if lower order"" ; two derivatives having the same order are ranked\n    using the ordering defined by the list.\n\n        >>> x,a,b = var ('x,a,b')\n        >>> y,z = function ('y,z')\n\n    Mathematically, R is a differential ring, with a single derivation.\n    Among the four dependent variables listed in the block list,\n    two of them do not depend on any independent variable. They thus\n    should be viewed as parameters, in the usual sense. Following Ritt\n    and Kolchin notation, R = Q[x,a,b]{z,y} with derivation d/dx:\n\n        >>> R = DifferentialRing (derivations = [x], \n        ...             blocks = [z,y,a,b], parameters = [a,b])\n\n    Here is a differential polynomial which belongs to R\n\n        >>> poly = a*Derivative(y(x),x) + b + x*y(x) \\\n        ...                     + Derivative(z(x),x)**2 + z(x)\n\n    The ranking is a pure elimination ranking:\n\n        >>> R.sort (R.indets (poly, selection = 'all'), 'descending')\n         d               d                       \n        [--(z(x)), z(x), --(y(x)), y(x), a, b, x]\n         dx              dx                      \n\n    Mathematically, S and R define the same ring. The ranking of\n    S is different from that of R. Observe that parameters are not\n    necessarily listed at the bottom of the ranking:\n\n        >>> S = DifferentialRing (derivations = [x], \n        ...             blocks = [b,a,y,z], parameters = [a,b])\n\n    Mathematically, T, S and R define the same ring. The derivatives\n    of z and y are ranked orderly:\n\n        >>> T = DifferentialRing (derivations = [x], \n        ...             blocks = [[z,y],a,b], parameters = [a,b])\n\n    Last, here is an example of a partial ring. The ranking is orderly.\n    The dependent variable v does not depend on x:\n\n        >>> x,y = var ('x,y')\n        >>> u,v = function ('u,v')\n        >>> R = DifferentialRing (derivations = [x,y], \n        ...             blocks = [[u,v]], parameters = [v(y)])\n\n        >>> poly = u(x,y) + v(y)""\n        >>> R.sort (R.indets (poly, selection = 'all'), 'descending')\n        [u(x, y), v(y)]\n\n    NOTATIONS:\n\n    Available notations are:\n\n        - 'Derivative' (default)\n\n        - 'jet'\n\n        - 'jet' with a parameter\n\n    Due to sympy limitations, some methods of the DifferentialAlgebra\n    package are restricted to some notations.\n\n    The default notation is the Derivative notation. In this notation,\n    differential indeterminates which are not constant parameters\n    should be declared using `function` (see the above examples).\n\n    Another notation is the jet one, which provides shorter outputs.\n    In this notation, differential indeterminates should be declared\n    using `indexedbase`:\n\n        >>> x,y = var ('x,y')\n        >>> u,v = indexedbase ('u,v')\n        >>> R = DifferentialRing (derivations = [x,y], blocks = [[u,v]],\n        ...                 parameters = ['v(y)'], notation = 'jet')\n\n    Differentiations are denoted using subscripts: u[x] stands for\n    the derivative of u with respect to x:\n\n        >>> poly = u*u[x] + 2*v**2\n        >>> R.differentiate(poly, y)\n        u[x, y]*u + u[x]*u[y] + 4*v[y]*v\n\n    Yet another notation is the jet notation with a parameter.\n    It is the jet notation with a specific way for denoting order\n    zero derivatives. It may be useful because some sympy functions\n    do not accept expressions mixing indexedbase symbols such as u\n    and indexed ones such as u[x].\n\n        >>> R = DifferentialRing (derivations = [x,y], blocks = [[u,v]],\n        ...                 parameters = ['v(y)'], notation = 'jet(_)')\n        >>> R.differentiate (poly, y)\n        u[_]*u[x, y] + u[x]*u[y] + 4*v[_]*v[y]\n    "), /*tp_doc*/
  __pyx_tp_traverse_19DifferentialAlgebra_DifferentialRing, /*tp_traverse*/
  __pyx_tp_clear_19DifferentialAlgebra_DifferentialRing, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_19DifferentialAlgebra_DifferentialRing, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_19DifferentialAlgebra_DifferentialRing, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  __pyx_pw_19DifferentialAlgebra_16DifferentialRing_5__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_19DifferentialAlgebra_DifferentialRing, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  #if CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if __PYX_NEED_TP_PRINT_SLOT == 1
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030C0000
  0, /*tp_watched*/
  #endif
  #if PY_VERSION_HEX >= 0x030d00A4
  0, /*tp_versions_used*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};
#endif

static PyObject *__pyx_tp_new_19DifferentialAlgebra_RegularDifferentialChain(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  struct __pyx_obj_19DifferentialAlgebra_RegularDifferentialChain *p;
  PyObject *o;
  #if CYTHON_COMPILING_IN_LIMITED_API
  allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc);
  o = alloc_func(t, 0);
  #else
  if (likely(!__Pyx_PyType_HasFeature(t, Py_TPFLAGS_IS_ABSTRACT))) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  #endif
  p = ((struct __pyx_obj_19DifferentialAlgebra_RegularDifferentialChain *)o);
  p->dring = ((struct __pyx_obj_19DifferentialAlgebra_DifferentialRing *)Py_None); Py_INCREF(Py_None);
  p->notation = Py_None; Py_INCREF(Py_None);
  p->evdict = Py_None; Py_INCREF(Py_None);
  return o;
}

static void __pyx_tp_dealloc_19DifferentialAlgebra_RegularDifferentialChain(PyObject *o) {
  struct __pyx_obj_19DifferentialAlgebra_RegularDifferentialChain *p = (struct __pyx_obj_19DifferentialAlgebra_RegularDifferentialChain *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) {
    if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_19DifferentialAlgebra_RegularDifferentialChain) {
      if (PyObject_CallFinalizerFromDealloc(o)) return;
    }
  }
  #endif
  PyObject_GC_UnTrack(o);
  {
    PyObject *etype, *eval, *etb;
    PyErr_Fetch(&etype, &eval, &etb);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
    __pyx_pw_19DifferentialAlgebra_24RegularDifferentialChain_5__dealloc__(o);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
    PyErr_Restore(etype, eval, etb);
  }
  Py_CLEAR(p->dring);
  Py_CLEAR(p->notation);
  Py_CLEAR(p->evdict);
  #if CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY
  (*Py_TYPE(o)->tp_free)(o);
  #else
  {
    freefunc tp_free = (freefunc)PyType_GetSlot(Py_TYPE(o), Py_tp_free);
    if (tp_free) tp_free(o);
  }
  #endif
}

static int __pyx_tp_traverse_19DifferentialAlgebra_RegularDifferentialChain(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_19DifferentialAlgebra_RegularDifferentialChain *p = (struct __pyx_obj_19DifferentialAlgebra_RegularDifferentialChain *)o;
  if (p->dring) {
    e = (*v)(((PyObject *)p->dring), a); if (e) return e;
  }
  if (p->notation) {
    e = (*v)(p->notation, a); if (e) return e;
  }
  if (p->evdict) {
    e = (*v)(p->evdict, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_19DifferentialAlgebra_RegularDifferentialChain(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_19DifferentialAlgebra_RegularDifferentialChain *p = (struct __pyx_obj_19DifferentialAlgebra_RegularDifferentialChain *)o;
  tmp = ((PyObject*)p->dring);
  p->dring = ((struct __pyx_obj_19DifferentialAlgebra_DifferentialRing *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->notation);
  p->notation = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->evdict);
  p->evdict = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_19DifferentialAlgebra_24RegularDifferentialChain_evdict(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_19DifferentialAlgebra_24RegularDifferentialChain_6evdict_1__get__(o);
}

static int __pyx_setprop_19DifferentialAlgebra_24RegularDifferentialChain_evdict(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_19DifferentialAlgebra_24RegularDifferentialChain_6evdict_3__set__(o, v);
  }
  else {
    return __pyx_pw_19DifferentialAlgebra_24RegularDifferentialChain_6evdict_5__del__(o);
  }
}

static PyObject *__pyx_specialmethod___pyx_pw_19DifferentialAlgebra_24RegularDifferentialChain_7__repr__(PyObject *self, CYTHON_UNUSED PyObject *arg) {
  return __pyx_pw_19DifferentialAlgebra_24RegularDifferentialChain_7__repr__(self);
}

static PyMethodDef __pyx_methods_19DifferentialAlgebra_RegularDifferentialChain[] = {
  {"_RegularDifferentialChain__process_notation", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_19DifferentialAlgebra_24RegularDifferentialChain_1_RegularDifferentialChain__process_notation, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"__repr__", (PyCFunction)__pyx_specialmethod___pyx_pw_19DifferentialAlgebra_24RegularDifferentialChain_7__repr__, METH_NOARGS|METH_COEXIST, 0},
  {"_latex_", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_19DifferentialAlgebra_24RegularDifferentialChain_9_latex_, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"differential_ring", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_19DifferentialAlgebra_24RegularDifferentialChain_11differential_ring, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_19DifferentialAlgebra_24RegularDifferentialChain_10differential_ring},
  {"equations", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_19DifferentialAlgebra_24RegularDifferentialChain_13equations, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_19DifferentialAlgebra_24RegularDifferentialChain_12equations},
  {"attributes", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_19DifferentialAlgebra_24RegularDifferentialChain_15attributes, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_19DifferentialAlgebra_24RegularDifferentialChain_14attributes},
  {"leading_derivative", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_19DifferentialAlgebra_24RegularDifferentialChain_17leading_derivative, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_19DifferentialAlgebra_24RegularDifferentialChain_16leading_derivative},
  {"leading_rank", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_19DifferentialAlgebra_24RegularDifferentialChain_19leading_rank, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_19DifferentialAlgebra_24RegularDifferentialChain_18leading_rank},
  {"initial", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_19DifferentialAlgebra_24RegularDifferentialChain_21initial, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_19DifferentialAlgebra_24RegularDifferentialChain_20initial},
  {"leading_coefficient", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_19DifferentialAlgebra_24RegularDifferentialChain_23leading_coefficient, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_19DifferentialAlgebra_24RegularDifferentialChain_22leading_coefficient},
  {"tail", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_19DifferentialAlgebra_24RegularDifferentialChain_25tail, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_19DifferentialAlgebra_24RegularDifferentialChain_24tail},
  {"separant", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_19DifferentialAlgebra_24RegularDifferentialChain_27separant, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_19DifferentialAlgebra_24RegularDifferentialChain_26separant},
  {"indets", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_19DifferentialAlgebra_24RegularDifferentialChain_29indets, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_19DifferentialAlgebra_24RegularDifferentialChain_28indets},
  {"differential_prem", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_19DifferentialAlgebra_24RegularDifferentialChain_31differential_prem, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_19DifferentialAlgebra_24RegularDifferentialChain_30differential_prem},
  {"prem", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_19DifferentialAlgebra_24RegularDifferentialChain_33prem, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_19DifferentialAlgebra_24RegularDifferentialChain_32prem},
  {"resultant", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_19DifferentialAlgebra_24RegularDifferentialChain_35resultant, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_19DifferentialAlgebra_24RegularDifferentialChain_34resultant},
  {"change_ranking", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_19DifferentialAlgebra_24RegularDifferentialChain_37change_ranking, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_19DifferentialAlgebra_24RegularDifferentialChain_36change_ranking},
  {"normal_form", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_19DifferentialAlgebra_24RegularDifferentialChain_39normal_form, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_19DifferentialAlgebra_24RegularDifferentialChain_38normal_form},
  {"preparation_equation", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_19DifferentialAlgebra_24RegularDifferentialChain_41preparation_equation, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_19DifferentialAlgebra_24RegularDifferentialChain_40preparation_equation},
  {"_RegularDifferentialChain__number_of_equations", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_19DifferentialAlgebra_24RegularDifferentialChain_43_RegularDifferentialChain__number_of_equations, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_19DifferentialAlgebra_24RegularDifferentialChain_42__number_of_equations},
  {"RosenfeldGroebner", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_19DifferentialAlgebra_24RegularDifferentialChain_45RosenfeldGroebner, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_19DifferentialAlgebra_24RegularDifferentialChain_44RosenfeldGroebner},
  {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_19DifferentialAlgebra_24RegularDifferentialChain_47__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_19DifferentialAlgebra_24RegularDifferentialChain_49__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_19DifferentialAlgebra_RegularDifferentialChain[] = {
  {(char *)"evdict", __pyx_getprop_19DifferentialAlgebra_24RegularDifferentialChain_evdict, __pyx_setprop_19DifferentialAlgebra_24RegularDifferentialChain_evdict, (char *)0, 0},
  {0, 0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_19DifferentialAlgebra_RegularDifferentialChain_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_19DifferentialAlgebra_RegularDifferentialChain},
  {Py_tp_repr, (void *)__pyx_pw_19DifferentialAlgebra_24RegularDifferentialChain_7__repr__},
  {Py_tp_doc, (void *)PyDoc_STR("\n    The class implements regular differential chains.\n\n    A regular differential chain is a set of polynomial differential\n    equations in some simplified form. Regular differential chains\n    belong to (polynomial) differential rings. Each regular differential\n    chain describes a differential polynomial ideal.\n\n    They are usually produced, from raw systems of polynomial\n    differential equations, by the RosenfeldGroebner or the\n    DenefLipshitz algorithms. But they may also be produced by the\n    class constructor as explained above.\n\n    Regular differential chains can be viewed as the right\n    generalization of Ritt characteristic sets to non necessarily prime\n    ideals. A self-contained definition of regular differential chains\n    and a normal form algorithm are provided in [BL10]. An equivalence\n    theorem is provided in [BLPM19].\n\n    REFERENCES:\n\n    [BL10] Fran\303\247ois Boulier and Fran\303\247ois Lemaire. A Normal Form\n    Algorithm for Regular Differential Chains. Mathematics\n    in Computer Science 4(2), pp. 185-201. 2010.\n    https://doi.org/10.1007/s11786-010-0060-3\n\n    [BLPM19] Fran\303\247ois Boulier and Fran\303\247ois Lemaire and Adrien\n    Poteaux and Marc Moreno Maza. An Equivalence Theorem for Regular\n    Differential Chains. Journal of Symbolic Computation vol 93,\n    pp. 34-5. 2019 https://doi.org/10.1016/j.jsc.2018.04.011\n    hal.archives-ouvertes.fr/hal-01391768\n\n    EXAMPLES:\n\n    Create a DifferentialRing, then a RegularDifferentialChain:\n\n        >>> from sympy import *\n        >>> from DifferentialAlgebra import *\n        >>> init_printing (use_unicode = False, num_columns = 68)\n        >>> x,a,b = var ('x,a,b')\n\n    In the Derivative notation:\n\n        >>> y = function ('y')\n        >>> R = DifferentialRing (derivations = [x], blocks = [y,a,b], \n        ...                       parameters = [a,b])\n        >>> C = RegularDifferentialChain (\n        ...                     [De""rivative(y(x),x)**2 - a*y(x)], R)\n        >>> C\n        regular_differential_chain\n\n    In the jet notation:\n\n        >>> y = indexedbase ('y')\n        >>> R = DifferentialRing (derivations = [x], blocks = [y,a,b], \n        ...             parameters = [a,b], notation = 'jet')\n        >>> C = RegularDifferentialChain ([y[x]**2 - a*y], R)\n        >>> C\n        regular_differential_chain\n    ")},
  {Py_tp_traverse, (void *)__pyx_tp_traverse_19DifferentialAlgebra_RegularDifferentialChain},
  {Py_tp_clear, (void *)__pyx_tp_clear_19DifferentialAlgebra_RegularDifferentialChain},
  {Py_tp_methods, (void *)__pyx_methods_19DifferentialAlgebra_RegularDifferentialChain},
  {Py_tp_getset, (void *)__pyx_getsets_19DifferentialAlgebra_RegularDifferentialChain},
  {Py_tp_init, (void *)__pyx_pw_19DifferentialAlgebra_24RegularDifferentialChain_3__init__},
  {Py_tp_new, (void *)__pyx_tp_new_19DifferentialAlgebra_RegularDifferentialChain},
  {0, 0},
};
static PyType_Spec __pyx_type_19DifferentialAlgebra_RegularDifferentialChain_spec = {
  "DifferentialAlgebra.RegularDifferentialChain",
  sizeof(struct __pyx_obj_19DifferentialAlgebra_RegularDifferentialChain),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
  __pyx_type_19DifferentialAlgebra_RegularDifferentialChain_slots,
};
#else

static PyTypeObject __pyx_type_19DifferentialAlgebra_RegularDifferentialChain = {
  PyVarObject_HEAD_INIT(0, 0)
  "DifferentialAlgebra.""RegularDifferentialChain", /*tp_name*/
  sizeof(struct __pyx_obj_19DifferentialAlgebra_RegularDifferentialChain), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_19DifferentialAlgebra_RegularDifferentialChain, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  __pyx_pw_19DifferentialAlgebra_24RegularDifferentialChain_7__repr__, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  PyDoc_STR("\n    The class implements regular differential chains.\n\n    A regular differential chain is a set of polynomial differential\n    equations in some simplified form. Regular differential chains\n    belong to (polynomial) differential rings. Each regular differential\n    chain describes a differential polynomial ideal.\n\n    They are usually produced, from raw systems of polynomial\n    differential equations, by the RosenfeldGroebner or the\n    DenefLipshitz algorithms. But they may also be produced by the\n    class constructor as explained above.\n\n    Regular differential chains can be viewed as the right\n    generalization of Ritt characteristic sets to non necessarily prime\n    ideals. A self-contained definition of regular differential chains\n    and a normal form algorithm are provided in [BL10]. An equivalence\n    theorem is provided in [BLPM19].\n\n    REFERENCES:\n\n    [BL10] Fran\303\247ois Boulier and Fran\303\247ois Lemaire. A Normal Form\n    Algorithm for Regular Differential Chains. Mathematics\n    in Computer Science 4(2), pp. 185-201. 2010.\n    https://doi.org/10.1007/s11786-010-0060-3\n\n    [BLPM19] Fran\303\247ois Boulier and Fran\303\247ois Lemaire and Adrien\n    Poteaux and Marc Moreno Maza. An Equivalence Theorem for Regular\n    Differential Chains. Journal of Symbolic Computation vol 93,\n    pp. 34-5. 2019 https://doi.org/10.1016/j.jsc.2018.04.011\n    hal.archives-ouvertes.fr/hal-01391768\n\n    EXAMPLES:\n\n    Create a DifferentialRing, then a RegularDifferentialChain:\n\n        >>> from sympy import *\n        >>> from DifferentialAlgebra import *\n        >>> init_printing (use_unicode = False, num_columns = 68)\n        >>> x,a,b = var ('x,a,b')\n\n    In the Derivative notation:\n\n        >>> y = function ('y')\n        >>> R = DifferentialRing (derivations = [x], blocks = [y,a,b], \n        ...                       parameters = [a,b])\n        >>> C = RegularDifferentialChain (\n        ...                     [De""rivative(y(x),x)**2 - a*y(x)], R)\n        >>> C\n        regular_differential_chain\n\n    In the jet notation:\n\n        >>> y = indexedbase ('y')\n        >>> R = DifferentialRing (derivations = [x], blocks = [y,a,b], \n        ...             parameters = [a,b], notation = 'jet')\n        >>> C = RegularDifferentialChain ([y[x]**2 - a*y], R)\n        >>> C\n        regular_differential_chain\n    "), /*tp_doc*/
  __pyx_tp_traverse_19DifferentialAlgebra_RegularDifferentialChain, /*tp_traverse*/
  __pyx_tp_clear_19DifferentialAlgebra_RegularDifferentialChain, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_19DifferentialAlgebra_RegularDifferentialChain, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_19DifferentialAlgebra_RegularDifferentialChain, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  __pyx_pw_19DifferentialAlgebra_24RegularDifferentialChain_3__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_19DifferentialAlgebra_RegularDifferentialChain, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  #if CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if __PYX_NEED_TP_PRINT_SLOT == 1
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030C0000
  0, /*tp_watched*/
  #endif
  #if PY_VERSION_HEX >= 0x030d00A4
  0, /*tp_versions_used*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};
#endif

static PyObject *__pyx_tp_new_19DifferentialAlgebra_BaseFieldExtension(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  struct __pyx_obj_19DifferentialAlgebra_BaseFieldExtension *p;
  PyObject *o;
  #if CYTHON_COMPILING_IN_LIMITED_API
  allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc);
  o = alloc_func(t, 0);
  #else
  if (likely(!__Pyx_PyType_HasFeature(t, Py_TPFLAGS_IS_ABSTRACT))) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  #endif
  p = ((struct __pyx_obj_19DifferentialAlgebra_BaseFieldExtension *)o);
  p->rels_are_provided = ((PyBoolObject *)Py_None); Py_INCREF(Py_None);
  p->gens = ((PyObject*)Py_None); Py_INCREF(Py_None);
  p->notation = Py_None; Py_INCREF(Py_None);
  p->evdict = Py_None; Py_INCREF(Py_None);
  p->rels = ((struct __pyx_obj_19DifferentialAlgebra_RegularDifferentialChain *)Py_None); Py_INCREF(Py_None);
  return o;
}

static void __pyx_tp_dealloc_19DifferentialAlgebra_BaseFieldExtension(PyObject *o) {
  struct __pyx_obj_19DifferentialAlgebra_BaseFieldExtension *p = (struct __pyx_obj_19DifferentialAlgebra_BaseFieldExtension *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) {
    if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_19DifferentialAlgebra_BaseFieldExtension) {
      if (PyObject_CallFinalizerFromDealloc(o)) return;
    }
  }
  #endif
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->rels_are_provided);
  Py_CLEAR(p->gens);
  Py_CLEAR(p->notation);
  Py_CLEAR(p->evdict);
  Py_CLEAR(p->rels);
  #if CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY
  (*Py_TYPE(o)->tp_free)(o);
  #else
  {
    freefunc tp_free = (freefunc)PyType_GetSlot(Py_TYPE(o), Py_tp_free);
    if (tp_free) tp_free(o);
  }
  #endif
}

static int __pyx_tp_traverse_19DifferentialAlgebra_BaseFieldExtension(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_19DifferentialAlgebra_BaseFieldExtension *p = (struct __pyx_obj_19DifferentialAlgebra_BaseFieldExtension *)o;
  if (p->rels_are_provided) {
    e = (*v)(((PyObject *)p->rels_are_provided), a); if (e) return e;
  }
  if (p->gens) {
    e = (*v)(p->gens, a); if (e) return e;
  }
  if (p->notation) {
    e = (*v)(p->notation, a); if (e) return e;
  }
  if (p->evdict) {
    e = (*v)(p->evdict, a); if (e) return e;
  }
  if (p->rels) {
    e = (*v)(((PyObject *)p->rels), a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_19DifferentialAlgebra_BaseFieldExtension(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_19DifferentialAlgebra_BaseFieldExtension *p = (struct __pyx_obj_19DifferentialAlgebra_BaseFieldExtension *)o;
  tmp = ((PyObject*)p->rels_are_provided);
  p->rels_are_provided = ((PyBoolObject *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->gens);
  p->gens = ((PyObject*)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->notation);
  p->notation = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->evdict);
  p->evdict = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->rels);
  p->rels = ((struct __pyx_obj_19DifferentialAlgebra_RegularDifferentialChain *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_19DifferentialAlgebra_18BaseFieldExtension_evdict(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_19DifferentialAlgebra_18BaseFieldExtension_6evdict_1__get__(o);
}

static int __pyx_setprop_19DifferentialAlgebra_18BaseFieldExtension_evdict(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_19DifferentialAlgebra_18BaseFieldExtension_6evdict_3__set__(o, v);
  }
  else {
    return __pyx_pw_19DifferentialAlgebra_18BaseFieldExtension_6evdict_5__del__(o);
  }
}

static PyObject *__pyx_specialmethod___pyx_pw_19DifferentialAlgebra_18BaseFieldExtension_5__repr__(PyObject *self, CYTHON_UNUSED PyObject *arg) {
  return __pyx_pw_19DifferentialAlgebra_18BaseFieldExtension_5__repr__(self);
}

static PyMethodDef __pyx_methods_19DifferentialAlgebra_BaseFieldExtension[] = {
  {"_BaseFieldExtension__process_notation", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_19DifferentialAlgebra_18BaseFieldExtension_1_BaseFieldExtension__process_notation, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"__repr__", (PyCFunction)__pyx_specialmethod___pyx_pw_19DifferentialAlgebra_18BaseFieldExtension_5__repr__, METH_NOARGS|METH_COEXIST, 0},
  {"_latex_", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_19DifferentialAlgebra_18BaseFieldExtension_7_latex_, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"generators", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_19DifferentialAlgebra_18BaseFieldExtension_9generators, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_19DifferentialAlgebra_18BaseFieldExtension_8generators},
  {"relations", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_19DifferentialAlgebra_18BaseFieldExtension_11relations, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_19DifferentialAlgebra_18BaseFieldExtension_10relations},
  {"_relations", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_19DifferentialAlgebra_18BaseFieldExtension_13_relations, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_19DifferentialAlgebra_18BaseFieldExtension_12_relations},
  {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_19DifferentialAlgebra_18BaseFieldExtension_15__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_19DifferentialAlgebra_18BaseFieldExtension_17__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_19DifferentialAlgebra_BaseFieldExtension[] = {
  {(char *)"evdict", __pyx_getprop_19DifferentialAlgebra_18BaseFieldExtension_evdict, __pyx_setprop_19DifferentialAlgebra_18BaseFieldExtension_evdict, (char *)0, 0},
  {0, 0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_19DifferentialAlgebra_BaseFieldExtension_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_19DifferentialAlgebra_BaseFieldExtension},
  {Py_tp_repr, (void *)__pyx_pw_19DifferentialAlgebra_18BaseFieldExtension_5__repr__},
  {Py_tp_doc, (void *)PyDoc_STR("\n    The class implements base field extensions for differential rings\n\n    SUMMARY:\n\n    These field extensions are defined by generators and\n    relations.  They permit to control the splittings performed by\n    RosenfeldGroebner.\n\n    A base field extension F can be defined without specifying the\n    differential ring R = K{U} whose base field K is going to be\n    extended. Indeed, the actual extension of K is performed by the\n    RosenfeldGroebner algorithm.\n\n    The generators of the base field extension of a differential ring\n    must belong to the lowest blocks of the ranking.\n\n    EXAMPLES:\n\n    First create a differential ring with two parameters a, b. The\n    base field of R is K = Q(x), where Q denotes the field of the\n    rational numbers:\n\n        >>> from sympy import *\n        >>> from DifferentialAlgebra import *\n        >>> init_printing (use_unicode = False, num_columns = 64)\n\n        >>> x,a,b = var('x,a,b')\n        >>> y = function ('y')\n        >>> R = DifferentialRing (derivations = [x], blocks = [y,[a,b]], \n        ...                       parameters = [a,b])\n\n    Create now F = Q(a,b) a purely transcendental field extension of Q:\n\n        >>> F = BaseFieldExtension (generators = [a,b])\n        >>> F.generators ()\n        [a, b]\n\n        >>> F.relations ()\n        regular_differential_chain\n\n        >>> F.relations ().equations ()\n        []\n\n    Alternatively, since we know in advance that F is going to be\n    used as a base field extension of the sole ring R, it is safe to\n    specify the ring as an optional parameter, in order to check that\n    a and b lie at the bottom of the ranking of R:\n\n        >>> F = BaseFieldExtension (generators = [a,b], ring = R)\n        >>> F\n        differential_field\n\n    In the next example (F is not yet used), the RosenfeldGroebner\n    algorithm considers three cases:\n\n        >>> L = R.RosenfeldGroebner ([Derivative(y(x),x)**2-a*y(x)])\n        >>> [ C"".equations () for C in L ]\n                              2                         \n                    /d       \\                d         \n        [[-a*y(x) + |--(y(x))| ], [y(x)], [a, --(y(x))]]\n                    \\dx      /                dx        \n\n    In this variant, the RosenfeldGroebner algorithm is applied over\n    the base field F(x) = K(a,b) = Q(a,b,x), obtained by extending the\n    base field K of R with the two generators a and b.  The case which\n    considers the vanishing of a is omitted: as a nonzero element of\n    the base field, a cannot vanish:\n\n        >>> L = R.RosenfeldGroebner (\n        ...             [Derivative(y(x),x)**2-a*y(x)], basefield = F)\n        >>> [ C.equations () for C in L ]\n                              2          \n                    /d       \\           \n        [[-a*y(x) + |--(y(x))| ], [y(x)]]\n                    \\dx      /           \n\n    The next example illustrates field extensions defined by generators\n    and relations. Denote f(x,y) = tan(x+y**2). Then f(x,y) satisfies\n    the equations of the regular differential chain C. The differential\n    field F is generated (in the differential sense) by x, y and\n    f(x,y). The generator f(x,y) satisfies the relations of C:\n\n        >>> x,y = var ('x,y')\n        >>> f,u = function ('f,u')\n        >>> R = DifferentialRing (derivations = [x,y], \n        ...             blocks = [u,f], parameters = [u(x)])\n        >>> eqns = [Eq(Derivative(f(x,y),x),f(x,y)**2 + 1), \n        ...         Eq(Derivative(f(x,y),y), \n        ...         2*y*(f(x,y)**2 + 1))]\n        >>> C = RegularDifferentialChain (eqns, R, pretend=False)\n        >>> F = BaseFieldExtension (relations = C)\n        >>> F.generators ()\n        [f]\n\n        >>> F.relations ().equations ()\n                2               d               2         d            >\n        [- 2*y*f (x, y) - 2*y + --(f(x, y)), - f (x, y) + --(f(x, y))  >\n                                dy         ""               dx           >\n        |  \n        >     \n        > - 1]\n        >     \n\n    Again, the base field F permits to avoid some cases in the output\n    of f the RosenfeldGroebner algorithm. In the next example (F is\n    not used), three cases are computed:\n\n        >>> eqn = Eq(Derivative(u(x),x)**2-(f(x,y)**2+1)*u(x),0)\n        >>> L = R.RosenfeldGroebner ([eqns[0], eqns[1], eqn])\n        >>> [ C.equations () for C in L ]\n                                                                       >\n                 2               d               2         d           >\n        [[- 2*y*f (x, y) - 2*y + --(f(x, y)), - f (x, y) + --(f(x, y)) >\n                                 dy                        dx          >\n        |  \n        >                                          2                   >\n        >          2                     /d       \\            2       >\n        >  - 1, - f (x, y)*u(x) - u(x) + |--(u(x))| ], [- 2*y*f (x, y) >\n        >                                \\dx      /                    >\n        |  \n        >                                                              >\n        >          d               2         d                         >\n        >  - 2*y + --(f(x, y)), - f (x, y) + --(f(x, y)) - 1, u(x)], [ >\n        >          dy                        dx                        >\n        |  \n        >                         \n        >  2            d         \n        > f (x, y) + 1, --(u(x))]]\n        >               dx        \n\n    In the next variant, two cases only are computed. The\n    RosenfeldGroebner algorithm is run over F. As a nonzero element\n    of F, the polynomial f(x, y)**2 + 1 cannot vanish:\n\n        >>> L = R.RosenfeldGroebner ([eqn], basefield = F)\n        >>> [ C.equations () for C in L ]\n                                                                       >\n                 2               d               2         d           >\n        [[- 2*y*f (x, y) - 2*y + --(f(""x, y)), - f (x, y) + --(f(x, y)) >\n                                 dy                        dx          >\n        |  \n        >                                          2                   >\n        >          2                     /d       \\            2       >\n        >  - 1, - f (x, y)*u(x) - u(x) + |--(u(x))| ], [- 2*y*f (x, y) >\n        >                                \\dx      /                    >\n        |  \n        >                                                           \n        >          d               2         d                      \n        >  - 2*y + --(f(x, y)), - f (x, y) + --(f(x, y)) - 1, u(x)]]\n        >          dy                        dx                     \n    ")},
  {Py_tp_traverse, (void *)__pyx_tp_traverse_19DifferentialAlgebra_BaseFieldExtension},
  {Py_tp_clear, (void *)__pyx_tp_clear_19DifferentialAlgebra_BaseFieldExtension},
  {Py_tp_methods, (void *)__pyx_methods_19DifferentialAlgebra_BaseFieldExtension},
  {Py_tp_getset, (void *)__pyx_getsets_19DifferentialAlgebra_BaseFieldExtension},
  {Py_tp_init, (void *)__pyx_pw_19DifferentialAlgebra_18BaseFieldExtension_3__init__},
  {Py_tp_new, (void *)__pyx_tp_new_19DifferentialAlgebra_BaseFieldExtension},
  {0, 0},
};
static PyType_Spec __pyx_type_19DifferentialAlgebra_BaseFieldExtension_spec = {
  "DifferentialAlgebra.BaseFieldExtension",
  sizeof(struct __pyx_obj_19DifferentialAlgebra_BaseFieldExtension),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
  __pyx_type_19DifferentialAlgebra_BaseFieldExtension_slots,
};
#else

static PyTypeObject __pyx_type_19DifferentialAlgebra_BaseFieldExtension = {
  PyVarObject_HEAD_INIT(0, 0)
  "DifferentialAlgebra.""BaseFieldExtension", /*tp_name*/
  sizeof(struct __pyx_obj_19DifferentialAlgebra_BaseFieldExtension), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_19DifferentialAlgebra_BaseFieldExtension, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  __pyx_pw_19DifferentialAlgebra_18BaseFieldExtension_5__repr__, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  PyDoc_STR("\n    The class implements base field extensions for differential rings\n\n    SUMMARY:\n\n    These field extensions are defined by generators and\n    relations.  They permit to control the splittings performed by\n    RosenfeldGroebner.\n\n    A base field extension F can be defined without specifying the\n    differential ring R = K{U} whose base field K is going to be\n    extended. Indeed, the actual extension of K is performed by the\n    RosenfeldGroebner algorithm.\n\n    The generators of the base field extension of a differential ring\n    must belong to the lowest blocks of the ranking.\n\n    EXAMPLES:\n\n    First create a differential ring with two parameters a, b. The\n    base field of R is K = Q(x), where Q denotes the field of the\n    rational numbers:\n\n        >>> from sympy import *\n        >>> from DifferentialAlgebra import *\n        >>> init_printing (use_unicode = False, num_columns = 64)\n\n        >>> x,a,b = var('x,a,b')\n        >>> y = function ('y')\n        >>> R = DifferentialRing (derivations = [x], blocks = [y,[a,b]], \n        ...                       parameters = [a,b])\n\n    Create now F = Q(a,b) a purely transcendental field extension of Q:\n\n        >>> F = BaseFieldExtension (generators = [a,b])\n        >>> F.generators ()\n        [a, b]\n\n        >>> F.relations ()\n        regular_differential_chain\n\n        >>> F.relations ().equations ()\n        []\n\n    Alternatively, since we know in advance that F is going to be\n    used as a base field extension of the sole ring R, it is safe to\n    specify the ring as an optional parameter, in order to check that\n    a and b lie at the bottom of the ranking of R:\n\n        >>> F = BaseFieldExtension (generators = [a,b], ring = R)\n        >>> F\n        differential_field\n\n    In the next example (F is not yet used), the RosenfeldGroebner\n    algorithm considers three cases:\n\n        >>> L = R.RosenfeldGroebner ([Derivative(y(x),x)**2-a*y(x)])\n        >>> [ C"".equations () for C in L ]\n                              2                         \n                    /d       \\                d         \n        [[-a*y(x) + |--(y(x))| ], [y(x)], [a, --(y(x))]]\n                    \\dx      /                dx        \n\n    In this variant, the RosenfeldGroebner algorithm is applied over\n    the base field F(x) = K(a,b) = Q(a,b,x), obtained by extending the\n    base field K of R with the two generators a and b.  The case which\n    considers the vanishing of a is omitted: as a nonzero element of\n    the base field, a cannot vanish:\n\n        >>> L = R.RosenfeldGroebner (\n        ...             [Derivative(y(x),x)**2-a*y(x)], basefield = F)\n        >>> [ C.equations () for C in L ]\n                              2          \n                    /d       \\           \n        [[-a*y(x) + |--(y(x))| ], [y(x)]]\n                    \\dx      /           \n\n    The next example illustrates field extensions defined by generators\n    and relations. Denote f(x,y) = tan(x+y**2). Then f(x,y) satisfies\n    the equations of the regular differential chain C. The differential\n    field F is generated (in the differential sense) by x, y and\n    f(x,y). The generator f(x,y) satisfies the relations of C:\n\n        >>> x,y = var ('x,y')\n        >>> f,u = function ('f,u')\n        >>> R = DifferentialRing (derivations = [x,y], \n        ...             blocks = [u,f], parameters = [u(x)])\n        >>> eqns = [Eq(Derivative(f(x,y),x),f(x,y)**2 + 1), \n        ...         Eq(Derivative(f(x,y),y), \n        ...         2*y*(f(x,y)**2 + 1))]\n        >>> C = RegularDifferentialChain (eqns, R, pretend=False)\n        >>> F = BaseFieldExtension (relations = C)\n        >>> F.generators ()\n        [f]\n\n        >>> F.relations ().equations ()\n                2               d               2         d            >\n        [- 2*y*f (x, y) - 2*y + --(f(x, y)), - f (x, y) + --(f(x, y))  >\n                                dy         ""               dx           >\n        |  \n        >     \n        > - 1]\n        >     \n\n    Again, the base field F permits to avoid some cases in the output\n    of f the RosenfeldGroebner algorithm. In the next example (F is\n    not used), three cases are computed:\n\n        >>> eqn = Eq(Derivative(u(x),x)**2-(f(x,y)**2+1)*u(x),0)\n        >>> L = R.RosenfeldGroebner ([eqns[0], eqns[1], eqn])\n        >>> [ C.equations () for C in L ]\n                                                                       >\n                 2               d               2         d           >\n        [[- 2*y*f (x, y) - 2*y + --(f(x, y)), - f (x, y) + --(f(x, y)) >\n                                 dy                        dx          >\n        |  \n        >                                          2                   >\n        >          2                     /d       \\            2       >\n        >  - 1, - f (x, y)*u(x) - u(x) + |--(u(x))| ], [- 2*y*f (x, y) >\n        >                                \\dx      /                    >\n        |  \n        >                                                              >\n        >          d               2         d                         >\n        >  - 2*y + --(f(x, y)), - f (x, y) + --(f(x, y)) - 1, u(x)], [ >\n        >          dy                        dx                        >\n        |  \n        >                         \n        >  2            d         \n        > f (x, y) + 1, --(u(x))]]\n        >               dx        \n\n    In the next variant, two cases only are computed. The\n    RosenfeldGroebner algorithm is run over F. As a nonzero element\n    of F, the polynomial f(x, y)**2 + 1 cannot vanish:\n\n        >>> L = R.RosenfeldGroebner ([eqn], basefield = F)\n        >>> [ C.equations () for C in L ]\n                                                                       >\n                 2               d               2         d           >\n        [[- 2*y*f (x, y) - 2*y + --(f(""x, y)), - f (x, y) + --(f(x, y)) >\n                                 dy                        dx          >\n        |  \n        >                                          2                   >\n        >          2                     /d       \\            2       >\n        >  - 1, - f (x, y)*u(x) - u(x) + |--(u(x))| ], [- 2*y*f (x, y) >\n        >                                \\dx      /                    >\n        |  \n        >                                                           \n        >          d               2         d                      \n        >  - 2*y + --(f(x, y)), - f (x, y) + --(f(x, y)) - 1, u(x)]]\n        >          dy                        dx                     \n    "), /*tp_doc*/
  __pyx_tp_traverse_19DifferentialAlgebra_BaseFieldExtension, /*tp_traverse*/
  __pyx_tp_clear_19DifferentialAlgebra_BaseFieldExtension, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_19DifferentialAlgebra_BaseFieldExtension, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_19DifferentialAlgebra_BaseFieldExtension, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  __pyx_pw_19DifferentialAlgebra_18BaseFieldExtension_3__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_19DifferentialAlgebra_BaseFieldExtension, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  #if CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if __PYX_NEED_TP_PRINT_SLOT == 1
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030C0000
  0, /*tp_watched*/
  #endif
  #if PY_VERSION_HEX >= 0x030d00A4
  0, /*tp_versions_used*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};
#endif

static PyObject *__pyx_tp_new_19DifferentialAlgebra_DenefLipshitzUple(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  struct __pyx_obj_19DifferentialAlgebra_DenefLipshitzUple *p;
  PyObject *o;
  #if CYTHON_COMPILING_IN_LIMITED_API
  allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc);
  o = alloc_func(t, 0);
  #else
  if (likely(!__Pyx_PyType_HasFeature(t, Py_TPFLAGS_IS_ABSTRACT))) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  #endif
  p = ((struct __pyx_obj_19DifferentialAlgebra_DenefLipshitzUple *)o);
  p->Y = ((PyObject*)Py_None); Py_INCREF(Py_None);
  p->Ybar = Py_None; Py_INCREF(Py_None);
  p->x = Py_None; Py_INCREF(Py_None);
  p->order = ((PyObject*)Py_None); Py_INCREF(Py_None);
  p->kappa = ((PyObject*)Py_None); Py_INCREF(Py_None);
  p->C = ((struct __pyx_obj_19DifferentialAlgebra_RegularDifferentialChain *)Py_None); Py_INCREF(Py_None);
  p->S = ((PyObject*)Py_None); Py_INCREF(Py_None);
  p->k = ((PyObject*)Py_None); Py_INCREF(Py_None);
  p->r = ((PyObject*)Py_None); Py_INCREF(Py_None);
  p->q = Py_None; Py_INCREF(Py_None);
  p->A = ((PyObject*)Py_None); Py_INCREF(Py_None);
  p->gamma = ((PyObject*)Py_None); Py_INCREF(Py_None);
  p->mu = ((PyObject*)Py_None); Py_INCREF(Py_None);
  p->sigma = ((PyObject*)Py_None); Py_INCREF(Py_None);
  p->beta = ((PyObject*)Py_None); Py_INCREF(Py_None);
  p->delta = ((PyObject*)Py_None); Py_INCREF(Py_None);
  p->notation = Py_None; Py_INCREF(Py_None);
  p->dring = ((struct __pyx_obj_19DifferentialAlgebra_DifferentialRing *)Py_None); Py_INCREF(Py_None);
  p->evdict = Py_None; Py_INCREF(Py_None);
  return o;
}

static void __pyx_tp_dealloc_19DifferentialAlgebra_DenefLipshitzUple(PyObject *o) {
  struct __pyx_obj_19DifferentialAlgebra_DenefLipshitzUple *p = (struct __pyx_obj_19DifferentialAlgebra_DenefLipshitzUple *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) {
    if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_19DifferentialAlgebra_DenefLipshitzUple) {
      if (PyObject_CallFinalizerFromDealloc(o)) return;
    }
  }
  #endif
  PyObject_GC_UnTrack(o);
  {
    PyObject *etype, *eval, *etb;
    PyErr_Fetch(&etype, &eval, &etb);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
    __pyx_pw_19DifferentialAlgebra_17DenefLipshitzUple_5__dealloc__(o);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
    PyErr_Restore(etype, eval, etb);
  }
  Py_CLEAR(p->Y);
  Py_CLEAR(p->Ybar);
  Py_CLEAR(p->x);
  Py_CLEAR(p->order);
  Py_CLEAR(p->kappa);
  Py_CLEAR(p->C);
  Py_CLEAR(p->S);
  Py_CLEAR(p->k);
  Py_CLEAR(p->r);
  Py_CLEAR(p->q);
  Py_CLEAR(p->A);
  Py_CLEAR(p->gamma);
  Py_CLEAR(p->mu);
  Py_CLEAR(p->sigma);
  Py_CLEAR(p->beta);
  Py_CLEAR(p->delta);
  Py_CLEAR(p->notation);
  Py_CLEAR(p->dring);
  Py_CLEAR(p->evdict);
  #if CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY
  (*Py_TYPE(o)->tp_free)(o);
  #else
  {
    freefunc tp_free = (freefunc)PyType_GetSlot(Py_TYPE(o), Py_tp_free);
    if (tp_free) tp_free(o);
  }
  #endif
}

static int __pyx_tp_traverse_19DifferentialAlgebra_DenefLipshitzUple(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_19DifferentialAlgebra_DenefLipshitzUple *p = (struct __pyx_obj_19DifferentialAlgebra_DenefLipshitzUple *)o;
  if (p->Y) {
    e = (*v)(p->Y, a); if (e) return e;
  }
  if (p->Ybar) {
    e = (*v)(p->Ybar, a); if (e) return e;
  }
  if (p->x) {
    e = (*v)(p->x, a); if (e) return e;
  }
  if (p->order) {
    e = (*v)(p->order, a); if (e) return e;
  }
  if (p->kappa) {
    e = (*v)(p->kappa, a); if (e) return e;
  }
  if (p->C) {
    e = (*v)(((PyObject *)p->C), a); if (e) return e;
  }
  if (p->S) {
    e = (*v)(p->S, a); if (e) return e;
  }
  if (p->k) {
    e = (*v)(p->k, a); if (e) return e;
  }
  if (p->r) {
    e = (*v)(p->r, a); if (e) return e;
  }
  if (p->q) {
    e = (*v)(p->q, a); if (e) return e;
  }
  if (p->A) {
    e = (*v)(p->A, a); if (e) return e;
  }
  if (p->gamma) {
    e = (*v)(p->gamma, a); if (e) return e;
  }
  if (p->mu) {
    e = (*v)(p->mu, a); if (e) return e;
  }
  if (p->sigma) {
    e = (*v)(p->sigma, a); if (e) return e;
  }
  if (p->beta) {
    e = (*v)(p->beta, a); if (e) return e;
  }
  if (p->delta) {
    e = (*v)(p->delta, a); if (e) return e;
  }
  if (p->notation) {
    e = (*v)(p->notation, a); if (e) return e;
  }
  if (p->dring) {
    e = (*v)(((PyObject *)p->dring), a); if (e) return e;
  }
  if (p->evdict) {
    e = (*v)(p->evdict, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_19DifferentialAlgebra_DenefLipshitzUple(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_19DifferentialAlgebra_DenefLipshitzUple *p = (struct __pyx_obj_19DifferentialAlgebra_DenefLipshitzUple *)o;
  tmp = ((PyObject*)p->Y);
  p->Y = ((PyObject*)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->Ybar);
  p->Ybar = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->x);
  p->x = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->order);
  p->order = ((PyObject*)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->kappa);
  p->kappa = ((PyObject*)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->C);
  p->C = ((struct __pyx_obj_19DifferentialAlgebra_RegularDifferentialChain *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->S);
  p->S = ((PyObject*)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->k);
  p->k = ((PyObject*)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->r);
  p->r = ((PyObject*)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->q);
  p->q = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->A);
  p->A = ((PyObject*)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->gamma);
  p->gamma = ((PyObject*)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->mu);
  p->mu = ((PyObject*)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->sigma);
  p->sigma = ((PyObject*)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->beta);
  p->beta = ((PyObject*)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->delta);
  p->delta = ((PyObject*)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->notation);
  p->notation = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->dring);
  p->dring = ((struct __pyx_obj_19DifferentialAlgebra_DifferentialRing *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->evdict);
  p->evdict = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_19DifferentialAlgebra_17DenefLipshitzUple_Y(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_19DifferentialAlgebra_17DenefLipshitzUple_1Y_1__get__(o);
}

static int __pyx_setprop_19DifferentialAlgebra_17DenefLipshitzUple_Y(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_19DifferentialAlgebra_17DenefLipshitzUple_1Y_3__set__(o, v);
  }
  else {
    return __pyx_pw_19DifferentialAlgebra_17DenefLipshitzUple_1Y_5__del__(o);
  }
}

static PyObject *__pyx_getprop_19DifferentialAlgebra_17DenefLipshitzUple_Ybar(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_19DifferentialAlgebra_17DenefLipshitzUple_4Ybar_1__get__(o);
}

static int __pyx_setprop_19DifferentialAlgebra_17DenefLipshitzUple_Ybar(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_19DifferentialAlgebra_17DenefLipshitzUple_4Ybar_3__set__(o, v);
  }
  else {
    return __pyx_pw_19DifferentialAlgebra_17DenefLipshitzUple_4Ybar_5__del__(o);
  }
}

static PyObject *__pyx_getprop_19DifferentialAlgebra_17DenefLipshitzUple_x(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_19DifferentialAlgebra_17DenefLipshitzUple_1x_1__get__(o);
}

static int __pyx_setprop_19DifferentialAlgebra_17DenefLipshitzUple_x(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_19DifferentialAlgebra_17DenefLipshitzUple_1x_3__set__(o, v);
  }
  else {
    return __pyx_pw_19DifferentialAlgebra_17DenefLipshitzUple_1x_5__del__(o);
  }
}

static PyObject *__pyx_getprop_19DifferentialAlgebra_17DenefLipshitzUple_order(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_19DifferentialAlgebra_17DenefLipshitzUple_5order_1__get__(o);
}

static int __pyx_setprop_19DifferentialAlgebra_17DenefLipshitzUple_order(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_19DifferentialAlgebra_17DenefLipshitzUple_5order_3__set__(o, v);
  }
  else {
    return __pyx_pw_19DifferentialAlgebra_17DenefLipshitzUple_5order_5__del__(o);
  }
}

static PyObject *__pyx_getprop_19DifferentialAlgebra_17DenefLipshitzUple_kappa(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_19DifferentialAlgebra_17DenefLipshitzUple_5kappa_1__get__(o);
}

static int __pyx_setprop_19DifferentialAlgebra_17DenefLipshitzUple_kappa(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_19DifferentialAlgebra_17DenefLipshitzUple_5kappa_3__set__(o, v);
  }
  else {
    return __pyx_pw_19DifferentialAlgebra_17DenefLipshitzUple_5kappa_5__del__(o);
  }
}

static PyObject *__pyx_getprop_19DifferentialAlgebra_17DenefLipshitzUple_C(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_19DifferentialAlgebra_17DenefLipshitzUple_1C_1__get__(o);
}

static int __pyx_setprop_19DifferentialAlgebra_17DenefLipshitzUple_C(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_19DifferentialAlgebra_17DenefLipshitzUple_1C_3__set__(o, v);
  }
  else {
    return __pyx_pw_19DifferentialAlgebra_17DenefLipshitzUple_1C_5__del__(o);
  }
}

static PyObject *__pyx_getprop_19DifferentialAlgebra_17DenefLipshitzUple_S(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_19DifferentialAlgebra_17DenefLipshitzUple_1S_1__get__(o);
}

static int __pyx_setprop_19DifferentialAlgebra_17DenefLipshitzUple_S(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_19DifferentialAlgebra_17DenefLipshitzUple_1S_3__set__(o, v);
  }
  else {
    return __pyx_pw_19DifferentialAlgebra_17DenefLipshitzUple_1S_5__del__(o);
  }
}

static PyObject *__pyx_getprop_19DifferentialAlgebra_17DenefLipshitzUple_k(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_19DifferentialAlgebra_17DenefLipshitzUple_1k_1__get__(o);
}

static int __pyx_setprop_19DifferentialAlgebra_17DenefLipshitzUple_k(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_19DifferentialAlgebra_17DenefLipshitzUple_1k_3__set__(o, v);
  }
  else {
    return __pyx_pw_19DifferentialAlgebra_17DenefLipshitzUple_1k_5__del__(o);
  }
}

static PyObject *__pyx_getprop_19DifferentialAlgebra_17DenefLipshitzUple_r(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_19DifferentialAlgebra_17DenefLipshitzUple_1r_1__get__(o);
}

static int __pyx_setprop_19DifferentialAlgebra_17DenefLipshitzUple_r(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_19DifferentialAlgebra_17DenefLipshitzUple_1r_3__set__(o, v);
  }
  else {
    return __pyx_pw_19DifferentialAlgebra_17DenefLipshitzUple_1r_5__del__(o);
  }
}

static PyObject *__pyx_getprop_19DifferentialAlgebra_17DenefLipshitzUple_q(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_19DifferentialAlgebra_17DenefLipshitzUple_1q_1__get__(o);
}

static int __pyx_setprop_19DifferentialAlgebra_17DenefLipshitzUple_q(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_19DifferentialAlgebra_17DenefLipshitzUple_1q_3__set__(o, v);
  }
  else {
    return __pyx_pw_19DifferentialAlgebra_17DenefLipshitzUple_1q_5__del__(o);
  }
}

static PyObject *__pyx_getprop_19DifferentialAlgebra_17DenefLipshitzUple_A(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_19DifferentialAlgebra_17DenefLipshitzUple_1A_1__get__(o);
}

static int __pyx_setprop_19DifferentialAlgebra_17DenefLipshitzUple_A(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_19DifferentialAlgebra_17DenefLipshitzUple_1A_3__set__(o, v);
  }
  else {
    return __pyx_pw_19DifferentialAlgebra_17DenefLipshitzUple_1A_5__del__(o);
  }
}

static PyObject *__pyx_getprop_19DifferentialAlgebra_17DenefLipshitzUple_gamma(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_19DifferentialAlgebra_17DenefLipshitzUple_5gamma_1__get__(o);
}

static int __pyx_setprop_19DifferentialAlgebra_17DenefLipshitzUple_gamma(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_19DifferentialAlgebra_17DenefLipshitzUple_5gamma_3__set__(o, v);
  }
  else {
    return __pyx_pw_19DifferentialAlgebra_17DenefLipshitzUple_5gamma_5__del__(o);
  }
}

static PyObject *__pyx_getprop_19DifferentialAlgebra_17DenefLipshitzUple_mu(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_19DifferentialAlgebra_17DenefLipshitzUple_2mu_1__get__(o);
}

static int __pyx_setprop_19DifferentialAlgebra_17DenefLipshitzUple_mu(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_19DifferentialAlgebra_17DenefLipshitzUple_2mu_3__set__(o, v);
  }
  else {
    return __pyx_pw_19DifferentialAlgebra_17DenefLipshitzUple_2mu_5__del__(o);
  }
}

static PyObject *__pyx_getprop_19DifferentialAlgebra_17DenefLipshitzUple_sigma(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_19DifferentialAlgebra_17DenefLipshitzUple_5sigma_1__get__(o);
}

static int __pyx_setprop_19DifferentialAlgebra_17DenefLipshitzUple_sigma(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_19DifferentialAlgebra_17DenefLipshitzUple_5sigma_3__set__(o, v);
  }
  else {
    return __pyx_pw_19DifferentialAlgebra_17DenefLipshitzUple_5sigma_5__del__(o);
  }
}

static PyObject *__pyx_getprop_19DifferentialAlgebra_17DenefLipshitzUple_beta(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_19DifferentialAlgebra_17DenefLipshitzUple_4beta_1__get__(o);
}

static int __pyx_setprop_19DifferentialAlgebra_17DenefLipshitzUple_beta(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_19DifferentialAlgebra_17DenefLipshitzUple_4beta_3__set__(o, v);
  }
  else {
    return __pyx_pw_19DifferentialAlgebra_17DenefLipshitzUple_4beta_5__del__(o);
  }
}

static PyObject *__pyx_getprop_19DifferentialAlgebra_17DenefLipshitzUple_delta(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_19DifferentialAlgebra_17DenefLipshitzUple_5delta_1__get__(o);
}

static int __pyx_setprop_19DifferentialAlgebra_17DenefLipshitzUple_delta(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_19DifferentialAlgebra_17DenefLipshitzUple_5delta_3__set__(o, v);
  }
  else {
    return __pyx_pw_19DifferentialAlgebra_17DenefLipshitzUple_5delta_5__del__(o);
  }
}

static PyObject *__pyx_specialmethod___pyx_pw_19DifferentialAlgebra_17DenefLipshitzUple_1__repr__(PyObject *self, CYTHON_UNUSED PyObject *arg) {
  return __pyx_pw_19DifferentialAlgebra_17DenefLipshitzUple_1__repr__(self);
}

static PyMethodDef __pyx_methods_19DifferentialAlgebra_DenefLipshitzUple[] = {
  {"__repr__", (PyCFunction)__pyx_specialmethod___pyx_pw_19DifferentialAlgebra_17DenefLipshitzUple_1__repr__, METH_NOARGS|METH_COEXIST, 0},
  {"_latex_", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_19DifferentialAlgebra_17DenefLipshitzUple_3_latex_, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"_DenefLipshitzUple__process_notation", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_19DifferentialAlgebra_17DenefLipshitzUple_7_DenefLipshitzUple__process_notation, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"DenefLipshitz", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_19DifferentialAlgebra_17DenefLipshitzUple_9DenefLipshitz, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_19DifferentialAlgebra_17DenefLipshitzUple_8DenefLipshitz},
  {"constraints", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_19DifferentialAlgebra_17DenefLipshitzUple_11constraints, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_19DifferentialAlgebra_17DenefLipshitzUple_10constraints},
  {"leading_polynomial", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_19DifferentialAlgebra_17DenefLipshitzUple_13leading_polynomial, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_19DifferentialAlgebra_17DenefLipshitzUple_12leading_polynomial},
  {"series", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_19DifferentialAlgebra_17DenefLipshitzUple_15series, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_19DifferentialAlgebra_17DenefLipshitzUple_14series},
  {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_19DifferentialAlgebra_17DenefLipshitzUple_17__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_19DifferentialAlgebra_17DenefLipshitzUple_19__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_19DifferentialAlgebra_DenefLipshitzUple[] = {
  {(char *)"Y", __pyx_getprop_19DifferentialAlgebra_17DenefLipshitzUple_Y, __pyx_setprop_19DifferentialAlgebra_17DenefLipshitzUple_Y, (char *)0, 0},
  {(char *)"Ybar", __pyx_getprop_19DifferentialAlgebra_17DenefLipshitzUple_Ybar, __pyx_setprop_19DifferentialAlgebra_17DenefLipshitzUple_Ybar, (char *)0, 0},
  {(char *)"x", __pyx_getprop_19DifferentialAlgebra_17DenefLipshitzUple_x, __pyx_setprop_19DifferentialAlgebra_17DenefLipshitzUple_x, (char *)0, 0},
  {(char *)"order", __pyx_getprop_19DifferentialAlgebra_17DenefLipshitzUple_order, __pyx_setprop_19DifferentialAlgebra_17DenefLipshitzUple_order, (char *)0, 0},
  {(char *)"kappa", __pyx_getprop_19DifferentialAlgebra_17DenefLipshitzUple_kappa, __pyx_setprop_19DifferentialAlgebra_17DenefLipshitzUple_kappa, (char *)0, 0},
  {(char *)"C", __pyx_getprop_19DifferentialAlgebra_17DenefLipshitzUple_C, __pyx_setprop_19DifferentialAlgebra_17DenefLipshitzUple_C, (char *)0, 0},
  {(char *)"S", __pyx_getprop_19DifferentialAlgebra_17DenefLipshitzUple_S, __pyx_setprop_19DifferentialAlgebra_17DenefLipshitzUple_S, (char *)0, 0},
  {(char *)"k", __pyx_getprop_19DifferentialAlgebra_17DenefLipshitzUple_k, __pyx_setprop_19DifferentialAlgebra_17DenefLipshitzUple_k, (char *)0, 0},
  {(char *)"r", __pyx_getprop_19DifferentialAlgebra_17DenefLipshitzUple_r, __pyx_setprop_19DifferentialAlgebra_17DenefLipshitzUple_r, (char *)0, 0},
  {(char *)"q", __pyx_getprop_19DifferentialAlgebra_17DenefLipshitzUple_q, __pyx_setprop_19DifferentialAlgebra_17DenefLipshitzUple_q, (char *)0, 0},
  {(char *)"A", __pyx_getprop_19DifferentialAlgebra_17DenefLipshitzUple_A, __pyx_setprop_19DifferentialAlgebra_17DenefLipshitzUple_A, (char *)0, 0},
  {(char *)"gamma", __pyx_getprop_19DifferentialAlgebra_17DenefLipshitzUple_gamma, __pyx_setprop_19DifferentialAlgebra_17DenefLipshitzUple_gamma, (char *)0, 0},
  {(char *)"mu", __pyx_getprop_19DifferentialAlgebra_17DenefLipshitzUple_mu, __pyx_setprop_19DifferentialAlgebra_17DenefLipshitzUple_mu, (char *)0, 0},
  {(char *)"sigma", __pyx_getprop_19DifferentialAlgebra_17DenefLipshitzUple_sigma, __pyx_setprop_19DifferentialAlgebra_17DenefLipshitzUple_sigma, (char *)0, 0},
  {(char *)"beta", __pyx_getprop_19DifferentialAlgebra_17DenefLipshitzUple_beta, __pyx_setprop_19DifferentialAlgebra_17DenefLipshitzUple_beta, (char *)0, 0},
  {(char *)"delta", __pyx_getprop_19DifferentialAlgebra_17DenefLipshitzUple_delta, __pyx_setprop_19DifferentialAlgebra_17DenefLipshitzUple_delta, (char *)0, 0},
  {0, 0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_19DifferentialAlgebra_DenefLipshitzUple_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_19DifferentialAlgebra_DenefLipshitzUple},
  {Py_tp_repr, (void *)__pyx_pw_19DifferentialAlgebra_17DenefLipshitzUple_1__repr__},
  {Py_tp_doc, (void *)PyDoc_STR("\n    The class is a data structure for the DenefLipshitz algorithm\n\n    The DenefLipshitz algorithm returns a list of data structures.\n    Each of these data structures is bundled in an instance of the\n    DenefLipshitzUple class.\n    ")},
  {Py_tp_traverse, (void *)__pyx_tp_traverse_19DifferentialAlgebra_DenefLipshitzUple},
  {Py_tp_clear, (void *)__pyx_tp_clear_19DifferentialAlgebra_DenefLipshitzUple},
  {Py_tp_methods, (void *)__pyx_methods_19DifferentialAlgebra_DenefLipshitzUple},
  {Py_tp_getset, (void *)__pyx_getsets_19DifferentialAlgebra_DenefLipshitzUple},
  {Py_tp_new, (void *)__pyx_tp_new_19DifferentialAlgebra_DenefLipshitzUple},
  {0, 0},
};
static PyType_Spec __pyx_type_19DifferentialAlgebra_DenefLipshitzUple_spec = {
  "DifferentialAlgebra.DenefLipshitzUple",
  sizeof(struct __pyx_obj_19DifferentialAlgebra_DenefLipshitzUple),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
  __pyx_type_19DifferentialAlgebra_DenefLipshitzUple_slots,
};
#else

static PyTypeObject __pyx_type_19DifferentialAlgebra_DenefLipshitzUple = {
  PyVarObject_HEAD_INIT(0, 0)
  "DifferentialAlgebra.""DenefLipshitzUple", /*tp_name*/
  sizeof(struct __pyx_obj_19DifferentialAlgebra_DenefLipshitzUple), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_19DifferentialAlgebra_DenefLipshitzUple, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  __pyx_pw_19DifferentialAlgebra_17DenefLipshitzUple_1__repr__, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  PyDoc_STR("\n    The class is a data structure for the DenefLipshitz algorithm\n\n    The DenefLipshitz algorithm returns a list of data structures.\n    Each of these data structures is bundled in an instance of the\n    DenefLipshitzUple class.\n    "), /*tp_doc*/
  __pyx_tp_traverse_19DifferentialAlgebra_DenefLipshitzUple, /*tp_traverse*/
  __pyx_tp_clear_19DifferentialAlgebra_DenefLipshitzUple, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_19DifferentialAlgebra_DenefLipshitzUple, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_19DifferentialAlgebra_DenefLipshitzUple, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_19DifferentialAlgebra_DenefLipshitzUple, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  #if CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if __PYX_NEED_TP_PRINT_SLOT == 1
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030C0000
  0, /*tp_watched*/
  #endif
  #if PY_VERSION_HEX >= 0x030d00A4
  0, /*tp_versions_used*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};
#endif

static PyMethodDef __pyx_methods[] = {
  {0, 0, 0, 0}
};
#ifndef CYTHON_SMALL_CODE
#if defined(__clang__)
    #define CYTHON_SMALL_CODE
#elif defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))
    #define CYTHON_SMALL_CODE __attribute__((cold))
#else
    #define CYTHON_SMALL_CODE
#endif
#endif
/* #### Code section: pystring_table ### */

static int __Pyx_CreateStringTabAndInitStrings(void) {
  __Pyx_StringTabEntry __pyx_string_tab[] = {
    {&__pyx_kp_u_, __pyx_k_, sizeof(__pyx_k_), 0, 1, 0, 0},
    {&__pyx_kp_b_0, __pyx_k_0, sizeof(__pyx_k_0), 0, 0, 0, 0},
    {&__pyx_kp_u_050_0_1_050_051_133_range, __pyx_k_050_0_1_050_051_133_range, sizeof(__pyx_k_050_0_1_050_051_133_range), 0, 1, 0, 0},
    {&__pyx_kp_b_1, __pyx_k_1, sizeof(__pyx_k_1), 0, 0, 0, 0},
    {&__pyx_n_s_A, __pyx_k_A, sizeof(__pyx_k_A), 0, 0, 1, 1},
    {&__pyx_kp_u_A_selection_in_a_list_of_polyno, __pyx_k_A_selection_in_a_list_of_polyno, sizeof(__pyx_k_A_selection_in_a_list_of_polyno), 0, 1, 0, 0},
    {&__pyx_n_s_Add, __pyx_k_Add, sizeof(__pyx_k_Add), 0, 0, 1, 1},
    {&__pyx_n_s_BaseFieldExtension, __pyx_k_BaseFieldExtension, sizeof(__pyx_k_BaseFieldExtension), 0, 0, 1, 1},
    {&__pyx_n_s_BaseFieldExtension___process_not, __pyx_k_BaseFieldExtension___process_not, sizeof(__pyx_k_BaseFieldExtension___process_not), 0, 0, 1, 1},
    {&__pyx_n_s_BaseFieldExtension___reduce_cyth, __pyx_k_BaseFieldExtension___reduce_cyth, sizeof(__pyx_k_BaseFieldExtension___reduce_cyth), 0, 0, 1, 1},
    {&__pyx_n_s_BaseFieldExtension___setstate_cy, __pyx_k_BaseFieldExtension___setstate_cy, sizeof(__pyx_k_BaseFieldExtension___setstate_cy), 0, 0, 1, 1},
    {&__pyx_n_s_BaseFieldExtension__latex, __pyx_k_BaseFieldExtension__latex, sizeof(__pyx_k_BaseFieldExtension__latex), 0, 0, 1, 1},
    {&__pyx_n_s_BaseFieldExtension__process_not, __pyx_k_BaseFieldExtension__process_not, sizeof(__pyx_k_BaseFieldExtension__process_not), 0, 0, 1, 1},
    {&__pyx_n_s_BaseFieldExtension__relations, __pyx_k_BaseFieldExtension__relations, sizeof(__pyx_k_BaseFieldExtension__relations), 0, 0, 1, 1},
    {&__pyx_kp_u_BaseFieldExtension__relations_li, __pyx_k_BaseFieldExtension__relations_li, sizeof(__pyx_k_BaseFieldExtension__relations_li), 0, 1, 0, 0},
    {&__pyx_n_s_BaseFieldExtension_generators, __pyx_k_BaseFieldExtension_generators, sizeof(__pyx_k_BaseFieldExtension_generators), 0, 0, 1, 1},
    {&__pyx_kp_u_BaseFieldExtension_generators_li, __pyx_k_BaseFieldExtension_generators_li, sizeof(__pyx_k_BaseFieldExtension_generators_li), 0, 1, 0, 0},
    {&__pyx_n_s_BaseFieldExtension_relations, __pyx_k_BaseFieldExtension_relations, sizeof(__pyx_k_BaseFieldExtension_relations), 0, 0, 1, 1},
    {&__pyx_kp_u_BaseFieldExtension_relations_lin, __pyx_k_BaseFieldExtension_relations_lin, sizeof(__pyx_k_BaseFieldExtension_relations_lin), 0, 1, 0, 0},
    {&__pyx_n_s_C, __pyx_k_C, sizeof(__pyx_k_C), 0, 0, 1, 1},
    {&__pyx_kp_u_Change_of_ranking_for_regular_c, __pyx_k_Change_of_ranking_for_regular_c, sizeof(__pyx_k_Change_of_ranking_for_regular_c), 0, 1, 0, 0},
    {&__pyx_n_s_DRing, __pyx_k_DRing, sizeof(__pyx_k_DRing), 0, 0, 1, 1},
    {&__pyx_n_s_DenefLipshitz, __pyx_k_DenefLipshitz, sizeof(__pyx_k_DenefLipshitz), 0, 0, 1, 1},
    {&__pyx_n_s_DenefLipshitzUple, __pyx_k_DenefLipshitzUple, sizeof(__pyx_k_DenefLipshitzUple), 0, 0, 1, 1},
    {&__pyx_n_s_DenefLipshitzUple_DenefLipshitz, __pyx_k_DenefLipshitzUple_DenefLipshitz, sizeof(__pyx_k_DenefLipshitzUple_DenefLipshitz), 0, 0, 1, 1},
    {&__pyx_kp_u_DenefLipshitzUple_DenefLipshitz_2, __pyx_k_DenefLipshitzUple_DenefLipshitz_2, sizeof(__pyx_k_DenefLipshitzUple_DenefLipshitz_2), 0, 1, 0, 0},
    {&__pyx_n_s_DenefLipshitzUple___process_nota, __pyx_k_DenefLipshitzUple___process_nota, sizeof(__pyx_k_DenefLipshitzUple___process_nota), 0, 0, 1, 1},
    {&__pyx_n_s_DenefLipshitzUple___reduce_cytho, __pyx_k_DenefLipshitzUple___reduce_cytho, sizeof(__pyx_k_DenefLipshitzUple___reduce_cytho), 0, 0, 1, 1},
    {&__pyx_n_s_DenefLipshitzUple___setstate_cyt, __pyx_k_DenefLipshitzUple___setstate_cyt, sizeof(__pyx_k_DenefLipshitzUple___setstate_cyt), 0, 0, 1, 1},
    {&__pyx_n_s_DenefLipshitzUple__latex, __pyx_k_DenefLipshitzUple__latex, sizeof(__pyx_k_DenefLipshitzUple__latex), 0, 0, 1, 1},
    {&__pyx_n_s_DenefLipshitzUple__process_nota, __pyx_k_DenefLipshitzUple__process_nota, sizeof(__pyx_k_DenefLipshitzUple__process_nota), 0, 0, 1, 1},
    {&__pyx_n_s_DenefLipshitzUple_constraints, __pyx_k_DenefLipshitzUple_constraints, sizeof(__pyx_k_DenefLipshitzUple_constraints), 0, 0, 1, 1},
    {&__pyx_kp_u_DenefLipshitzUple_constraints_li, __pyx_k_DenefLipshitzUple_constraints_li, sizeof(__pyx_k_DenefLipshitzUple_constraints_li), 0, 1, 0, 0},
    {&__pyx_n_s_DenefLipshitzUple_leading_polyno, __pyx_k_DenefLipshitzUple_leading_polyno, sizeof(__pyx_k_DenefLipshitzUple_leading_polyno), 0, 0, 1, 1},
    {&__pyx_kp_u_DenefLipshitzUple_leading_polyno_2, __pyx_k_DenefLipshitzUple_leading_polyno_2, sizeof(__pyx_k_DenefLipshitzUple_leading_polyno_2), 0, 1, 0, 0},
    {&__pyx_n_s_DenefLipshitzUple_series, __pyx_k_DenefLipshitzUple_series, sizeof(__pyx_k_DenefLipshitzUple_series), 0, 0, 1, 1},
    {&__pyx_kp_u_DenefLipshitzUple_series_line_47, __pyx_k_DenefLipshitzUple_series_line_47, sizeof(__pyx_k_DenefLipshitzUple_series_line_47), 0, 1, 0, 0},
    {&__pyx_n_u_Denef_Lipshitz_Uple, __pyx_k_Denef_Lipshitz_Uple, sizeof(__pyx_k_Denef_Lipshitz_Uple), 0, 1, 0, 1},
    {&__pyx_kp_u_Denef__Lipshitz__Uple, __pyx_k_Denef__Lipshitz__Uple, sizeof(__pyx_k_Denef__Lipshitz__Uple), 0, 1, 0, 0},
    {&__pyx_n_s_Derivative, __pyx_k_Derivative, sizeof(__pyx_k_Derivative), 0, 0, 1, 1},
    {&__pyx_n_s_DifferentialAlgebra, __pyx_k_DifferentialAlgebra, sizeof(__pyx_k_DifferentialAlgebra), 0, 0, 1, 1},
    {&__pyx_n_s_DifferentialRing, __pyx_k_DifferentialRing, sizeof(__pyx_k_DifferentialRing), 0, 0, 1, 1},
    {&__pyx_n_s_DifferentialRing_DenefLipshitz, __pyx_k_DifferentialRing_DenefLipshitz, sizeof(__pyx_k_DifferentialRing_DenefLipshitz), 0, 0, 1, 1},
    {&__pyx_kp_u_DifferentialRing_DenefLipshitz_l, __pyx_k_DifferentialRing_DenefLipshitz_l, sizeof(__pyx_k_DifferentialRing_DenefLipshitz_l), 0, 1, 0, 0},
    {&__pyx_n_s_DifferentialRing_RosenfeldGroebn, __pyx_k_DifferentialRing_RosenfeldGroebn, sizeof(__pyx_k_DifferentialRing_RosenfeldGroebn), 0, 0, 1, 1},
    {&__pyx_kp_u_DifferentialRing_RosenfeldGroebn_2, __pyx_k_DifferentialRing_RosenfeldGroebn_2, sizeof(__pyx_k_DifferentialRing_RosenfeldGroebn_2), 0, 1, 0, 0},
    {&__pyx_n_s_DifferentialRing___evaluate, __pyx_k_DifferentialRing___evaluate, sizeof(__pyx_k_DifferentialRing___evaluate), 0, 0, 1, 1},
    {&__pyx_n_s_DifferentialRing___listof_symbol, __pyx_k_DifferentialRing___listof_symbol, sizeof(__pyx_k_DifferentialRing___listof_symbol), 0, 0, 1, 1},
    {&__pyx_n_s_DifferentialRing___process_evdic, __pyx_k_DifferentialRing___process_evdic, sizeof(__pyx_k_DifferentialRing___process_evdic), 0, 0, 1, 1},
    {&__pyx_n_s_DifferentialRing___process_notat, __pyx_k_DifferentialRing___process_notat, sizeof(__pyx_k_DifferentialRing___process_notat), 0, 0, 1, 1},
    {&__pyx_n_s_DifferentialRing___reduce_cython, __pyx_k_DifferentialRing___reduce_cython, sizeof(__pyx_k_DifferentialRing___reduce_cython), 0, 0, 1, 1},
    {&__pyx_n_s_DifferentialRing___setstate_cyth, __pyx_k_DifferentialRing___setstate_cyth, sizeof(__pyx_k_DifferentialRing___setstate_cyth), 0, 0, 1, 1},
    {&__pyx_n_s_DifferentialRing__evaluate, __pyx_k_DifferentialRing__evaluate, sizeof(__pyx_k_DifferentialRing__evaluate), 0, 0, 1, 1},
    {&__pyx_n_s_DifferentialRing__latex, __pyx_k_DifferentialRing__latex, sizeof(__pyx_k_DifferentialRing__latex), 0, 0, 1, 1},
    {&__pyx_n_s_DifferentialRing__listof_symbol, __pyx_k_DifferentialRing__listof_symbol, sizeof(__pyx_k_DifferentialRing__listof_symbol), 0, 0, 1, 1},
    {&__pyx_n_s_DifferentialRing__process_equati, __pyx_k_DifferentialRing__process_equati, sizeof(__pyx_k_DifferentialRing__process_equati), 0, 0, 1, 1},
    {&__pyx_n_s_DifferentialRing__process_evdic, __pyx_k_DifferentialRing__process_evdic, sizeof(__pyx_k_DifferentialRing__process_evdic), 0, 0, 1, 1},
    {&__pyx_n_s_DifferentialRing__process_notat, __pyx_k_DifferentialRing__process_notat, sizeof(__pyx_k_DifferentialRing__process_notat), 0, 0, 1, 1},
    {&__pyx_n_s_DifferentialRing__ranking, __pyx_k_DifferentialRing__ranking, sizeof(__pyx_k_DifferentialRing__ranking), 0, 0, 1, 1},
    {&__pyx_n_s_DifferentialRing_coeffs, __pyx_k_DifferentialRing_coeffs, sizeof(__pyx_k_DifferentialRing_coeffs), 0, 0, 1, 1},
    {&__pyx_kp_u_DifferentialRing_coeffs_line_375, __pyx_k_DifferentialRing_coeffs_line_375, sizeof(__pyx_k_DifferentialRing_coeffs_line_375), 0, 1, 0, 0},
    {&__pyx_n_s_DifferentialRing_differential_pr, __pyx_k_DifferentialRing_differential_pr, sizeof(__pyx_k_DifferentialRing_differential_pr), 0, 0, 1, 1},
    {&__pyx_kp_u_DifferentialRing_differential_pr_2, __pyx_k_DifferentialRing_differential_pr_2, sizeof(__pyx_k_DifferentialRing_differential_pr_2), 0, 1, 0, 0},
    {&__pyx_n_s_DifferentialRing_differentiate, __pyx_k_DifferentialRing_differentiate, sizeof(__pyx_k_DifferentialRing_differentiate), 0, 0, 1, 1},
    {&__pyx_kp_u_DifferentialRing_differentiate_l, __pyx_k_DifferentialRing_differentiate_l, sizeof(__pyx_k_DifferentialRing_differentiate_l), 0, 1, 0, 0},
    {&__pyx_n_s_DifferentialRing_equations, __pyx_k_DifferentialRing_equations, sizeof(__pyx_k_DifferentialRing_equations), 0, 0, 1, 1},
    {&__pyx_kp_u_DifferentialRing_equations_line, __pyx_k_DifferentialRing_equations_line, sizeof(__pyx_k_DifferentialRing_equations_line), 0, 1, 0, 0},
    {&__pyx_n_s_DifferentialRing_evaluate, __pyx_k_DifferentialRing_evaluate, sizeof(__pyx_k_DifferentialRing_evaluate), 0, 0, 1, 1},
    {&__pyx_kp_u_DifferentialRing_evaluate_line_7, __pyx_k_DifferentialRing_evaluate_line_7, sizeof(__pyx_k_DifferentialRing_evaluate_line_7), 0, 1, 0, 0},
    {&__pyx_kp_u_DifferentialRing_expected_for_ri, __pyx_k_DifferentialRing_expected_for_ri, sizeof(__pyx_k_DifferentialRing_expected_for_ri), 0, 1, 0, 0},
    {&__pyx_n_s_DifferentialRing_factor_derivati, __pyx_k_DifferentialRing_factor_derivati, sizeof(__pyx_k_DifferentialRing_factor_derivati), 0, 0, 1, 1},
    {&__pyx_kp_u_DifferentialRing_factor_derivati_2, __pyx_k_DifferentialRing_factor_derivati_2, sizeof(__pyx_k_DifferentialRing_factor_derivati_2), 0, 1, 0, 0},
    {&__pyx_n_s_DifferentialRing_indets, __pyx_k_DifferentialRing_indets, sizeof(__pyx_k_DifferentialRing_indets), 0, 0, 1, 1},
    {&__pyx_kp_u_DifferentialRing_indets_line_963, __pyx_k_DifferentialRing_indets_line_963, sizeof(__pyx_k_DifferentialRing_indets_line_963), 0, 1, 0, 0},
    {&__pyx_n_s_DifferentialRing_initial, __pyx_k_DifferentialRing_initial, sizeof(__pyx_k_DifferentialRing_initial), 0, 0, 1, 1},
    {&__pyx_kp_u_DifferentialRing_initial_line_13, __pyx_k_DifferentialRing_initial_line_13, sizeof(__pyx_k_DifferentialRing_initial_line_13), 0, 1, 0, 0},
    {&__pyx_n_s_DifferentialRing_integrate, __pyx_k_DifferentialRing_integrate, sizeof(__pyx_k_DifferentialRing_integrate), 0, 0, 1, 1},
    {&__pyx_kp_u_DifferentialRing_integrate_line, __pyx_k_DifferentialRing_integrate_line, sizeof(__pyx_k_DifferentialRing_integrate_line), 0, 1, 0, 0},
    {&__pyx_n_s_DifferentialRing_is_constant, __pyx_k_DifferentialRing_is_constant, sizeof(__pyx_k_DifferentialRing_is_constant), 0, 0, 1, 1},
    {&__pyx_kp_u_DifferentialRing_is_constant_lin, __pyx_k_DifferentialRing_is_constant_lin, sizeof(__pyx_k_DifferentialRing_is_constant_lin), 0, 1, 0, 0},
    {&__pyx_n_s_DifferentialRing_is_differential, __pyx_k_DifferentialRing_is_differential, sizeof(__pyx_k_DifferentialRing_is_differential), 0, 0, 1, 1},
    {&__pyx_kp_u_DifferentialRing_is_differential_2, __pyx_k_DifferentialRing_is_differential_2, sizeof(__pyx_k_DifferentialRing_is_differential_2), 0, 1, 0, 0},
    {&__pyx_n_s_DifferentialRing_leading_coeffic, __pyx_k_DifferentialRing_leading_coeffic, sizeof(__pyx_k_DifferentialRing_leading_coeffic), 0, 0, 1, 1},
    {&__pyx_kp_u_DifferentialRing_leading_coeffic_2, __pyx_k_DifferentialRing_leading_coeffic_2, sizeof(__pyx_k_DifferentialRing_leading_coeffic_2), 0, 1, 0, 0},
    {&__pyx_n_s_DifferentialRing_leading_derivat, __pyx_k_DifferentialRing_leading_derivat, sizeof(__pyx_k_DifferentialRing_leading_derivat), 0, 0, 1, 1},
    {&__pyx_kp_u_DifferentialRing_leading_derivat_2, __pyx_k_DifferentialRing_leading_derivat_2, sizeof(__pyx_k_DifferentialRing_leading_derivat_2), 0, 1, 0, 0},
    {&__pyx_n_s_DifferentialRing_leading_rank, __pyx_k_DifferentialRing_leading_rank, sizeof(__pyx_k_DifferentialRing_leading_rank), 0, 0, 1, 1},
    {&__pyx_kp_u_DifferentialRing_leading_rank_li, __pyx_k_DifferentialRing_leading_rank_li, sizeof(__pyx_k_DifferentialRing_leading_rank_li), 0, 1, 0, 0},
    {&__pyx_n_s_DifferentialRing_normal_form, __pyx_k_DifferentialRing_normal_form, sizeof(__pyx_k_DifferentialRing_normal_form), 0, 0, 1, 1},
    {&__pyx_kp_u_DifferentialRing_normal_form_lin, __pyx_k_DifferentialRing_normal_form_lin, sizeof(__pyx_k_DifferentialRing_normal_form_lin), 0, 1, 0, 0},
    {&__pyx_n_s_DifferentialRing_separant, __pyx_k_DifferentialRing_separant, sizeof(__pyx_k_DifferentialRing_separant), 0, 0, 1, 1},
    {&__pyx_kp_u_DifferentialRing_separant_line_1, __pyx_k_DifferentialRing_separant_line_1, sizeof(__pyx_k_DifferentialRing_separant_line_1), 0, 1, 0, 0},
    {&__pyx_n_s_DifferentialRing_sort, __pyx_k_DifferentialRing_sort, sizeof(__pyx_k_DifferentialRing_sort), 0, 0, 1, 1},
    {&__pyx_kp_u_DifferentialRing_sort_line_2161, __pyx_k_DifferentialRing_sort_line_2161, sizeof(__pyx_k_DifferentialRing_sort_line_2161), 0, 1, 0, 0},
    {&__pyx_n_s_DifferentialRing_tail, __pyx_k_DifferentialRing_tail, sizeof(__pyx_k_DifferentialRing_tail), 0, 0, 1, 1},
    {&__pyx_kp_u_DifferentialRing_tail_line_1513, __pyx_k_DifferentialRing_tail_line_1513, sizeof(__pyx_k_DifferentialRing_tail_line_1513), 0, 1, 0, 0},
    {&__pyx_kp_u_Differentiate_a_rational_differ, __pyx_k_Differentiate_a_rational_differ, sizeof(__pyx_k_Differentiate_a_rational_differ), 0, 1, 0, 0},
    {&__pyx_kp_b_Eq, __pyx_k_Eq, sizeof(__pyx_k_Eq), 0, 0, 0, 0},
    {&__pyx_n_s_Eq_2, __pyx_k_Eq_2, sizeof(__pyx_k_Eq_2), 0, 0, 1, 1},
    {&__pyx_n_s_Equality, __pyx_k_Equality, sizeof(__pyx_k_Equality), 0, 0, 1, 1},
    {&__pyx_kp_u_Evaluate_a_differential_fractio, __pyx_k_Evaluate_a_differential_fractio, sizeof(__pyx_k_Evaluate_a_differential_fractio), 0, 1, 0, 0},
    {&__pyx_kp_u_Extend_a_regular_differential_c, __pyx_k_Extend_a_regular_differential_c, sizeof(__pyx_k_Extend_a_regular_differential_c), 0, 1, 0, 0},
    {&__pyx_n_s_F, __pyx_k_F, sizeof(__pyx_k_F), 0, 0, 1, 1},
    {&__pyx_n_s_Function, __pyx_k_Function, sizeof(__pyx_k_Function), 0, 0, 1, 1},
    {&__pyx_kp_s_Incompatible_checksums_0x_x_vs_0, __pyx_k_Incompatible_checksums_0x_x_vs_0, sizeof(__pyx_k_Incompatible_checksums_0x_x_vs_0), 0, 0, 1, 0},
    {&__pyx_n_s_Indexed, __pyx_k_Indexed, sizeof(__pyx_k_Indexed), 0, 0, 1, 1},
    {&__pyx_n_s_IndexedBase, __pyx_k_IndexedBase, sizeof(__pyx_k_IndexedBase), 0, 0, 1, 1},
    {&__pyx_n_s_Integer, __pyx_k_Integer, sizeof(__pyx_k_Integer), 0, 0, 1, 1},
    {&__pyx_kp_u_Integrate_a_rational_differenti, __pyx_k_Integrate_a_rational_differenti, sizeof(__pyx_k_Integrate_a_rational_differenti), 0, 1, 0, 0},
    {&__pyx_n_s_L, __pyx_k_L, sizeof(__pyx_k_L), 0, 0, 1, 1},
    {&__pyx_n_s_L1, __pyx_k_L1, sizeof(__pyx_k_L1), 0, 0, 1, 1},
    {&__pyx_n_s_L2, __pyx_k_L2, sizeof(__pyx_k_L2), 0, 0, 1, 1},
    {&__pyx_n_s_L3, __pyx_k_L3, sizeof(__pyx_k_L3), 0, 0, 1, 1},
    {&__pyx_n_s_L_as_string, __pyx_k_L_as_string, sizeof(__pyx_k_L_as_string), 0, 0, 1, 1},
    {&__pyx_n_s_M, __pyx_k_M, sizeof(__pyx_k_M), 0, 0, 1, 1},
    {&__pyx_n_s_Mul, __pyx_k_Mul, sizeof(__pyx_k_Mul), 0, 0, 1, 1},
    {&__pyx_n_s_Ne, __pyx_k_Ne, sizeof(__pyx_k_Ne), 0, 0, 1, 1},
    {&__pyx_kp_u_None, __pyx_k_None, sizeof(__pyx_k_None), 0, 1, 0, 0},
    {&__pyx_n_s_NotImplementedError, __pyx_k_NotImplementedError, sizeof(__pyx_k_NotImplementedError), 0, 0, 1, 1},
    {&__pyx_n_s_P, __pyx_k_P, sizeof(__pyx_k_P), 0, 0, 1, 1},
    {&__pyx_n_s_PickleError, __pyx_k_PickleError, sizeof(__pyx_k_PickleError), 0, 0, 1, 1},
    {&__pyx_n_s_Pow, __pyx_k_Pow, sizeof(__pyx_k_Pow), 0, 0, 1, 1},
    {&__pyx_n_s_R, __pyx_k_R, sizeof(__pyx_k_R), 0, 0, 1, 1},
    {&__pyx_n_s_Rational, __pyx_k_Rational, sizeof(__pyx_k_Rational), 0, 0, 1, 1},
    {&__pyx_n_s_RegularDifferentialChain, __pyx_k_RegularDifferentialChain, sizeof(__pyx_k_RegularDifferentialChain), 0, 0, 1, 1},
    {&__pyx_n_s_RegularDifferentialChain_Rosenfe, __pyx_k_RegularDifferentialChain_Rosenfe, sizeof(__pyx_k_RegularDifferentialChain_Rosenfe), 0, 0, 1, 1},
    {&__pyx_kp_u_RegularDifferentialChain_Rosenfe_2, __pyx_k_RegularDifferentialChain_Rosenfe_2, sizeof(__pyx_k_RegularDifferentialChain_Rosenfe_2), 0, 1, 0, 0},
    {&__pyx_kp_u_RegularDifferentialChain__Regula, __pyx_k_RegularDifferentialChain__Regula, sizeof(__pyx_k_RegularDifferentialChain__Regula), 0, 1, 0, 0},
    {&__pyx_n_s_RegularDifferentialChain___numbe, __pyx_k_RegularDifferentialChain___numbe, sizeof(__pyx_k_RegularDifferentialChain___numbe), 0, 0, 1, 1},
    {&__pyx_n_s_RegularDifferentialChain___proce, __pyx_k_RegularDifferentialChain___proce, sizeof(__pyx_k_RegularDifferentialChain___proce), 0, 0, 1, 1},
    {&__pyx_n_s_RegularDifferentialChain___reduc, __pyx_k_RegularDifferentialChain___reduc, sizeof(__pyx_k_RegularDifferentialChain___reduc), 0, 0, 1, 1},
    {&__pyx_n_s_RegularDifferentialChain___setst, __pyx_k_RegularDifferentialChain___setst, sizeof(__pyx_k_RegularDifferentialChain___setst), 0, 0, 1, 1},
    {&__pyx_n_s_RegularDifferentialChain__latex, __pyx_k_RegularDifferentialChain__latex, sizeof(__pyx_k_RegularDifferentialChain__latex), 0, 0, 1, 1},
    {&__pyx_n_s_RegularDifferentialChain__numbe, __pyx_k_RegularDifferentialChain__numbe, sizeof(__pyx_k_RegularDifferentialChain__numbe), 0, 0, 1, 1},
    {&__pyx_n_s_RegularDifferentialChain__proce, __pyx_k_RegularDifferentialChain__proce, sizeof(__pyx_k_RegularDifferentialChain__proce), 0, 0, 1, 1},
    {&__pyx_n_s_RegularDifferentialChain_attribu, __pyx_k_RegularDifferentialChain_attribu, sizeof(__pyx_k_RegularDifferentialChain_attribu), 0, 0, 1, 1},
    {&__pyx_kp_u_RegularDifferentialChain_attribu_2, __pyx_k_RegularDifferentialChain_attribu_2, sizeof(__pyx_k_RegularDifferentialChain_attribu_2), 0, 1, 0, 0},
    {&__pyx_n_s_RegularDifferentialChain_change, __pyx_k_RegularDifferentialChain_change, sizeof(__pyx_k_RegularDifferentialChain_change), 0, 0, 1, 1},
    {&__pyx_kp_u_RegularDifferentialChain_change_2, __pyx_k_RegularDifferentialChain_change_2, sizeof(__pyx_k_RegularDifferentialChain_change_2), 0, 1, 0, 0},
    {&__pyx_n_s_RegularDifferentialChain_differe, __pyx_k_RegularDifferentialChain_differe, sizeof(__pyx_k_RegularDifferentialChain_differe), 0, 0, 1, 1},
    {&__pyx_n_s_RegularDifferentialChain_differe_2, __pyx_k_RegularDifferentialChain_differe_2, sizeof(__pyx_k_RegularDifferentialChain_differe_2), 0, 0, 1, 1},
    {&__pyx_kp_u_RegularDifferentialChain_differe_3, __pyx_k_RegularDifferentialChain_differe_3, sizeof(__pyx_k_RegularDifferentialChain_differe_3), 0, 1, 0, 0},
    {&__pyx_kp_u_RegularDifferentialChain_differe_4, __pyx_k_RegularDifferentialChain_differe_4, sizeof(__pyx_k_RegularDifferentialChain_differe_4), 0, 1, 0, 0},
    {&__pyx_n_s_RegularDifferentialChain_equatio, __pyx_k_RegularDifferentialChain_equatio, sizeof(__pyx_k_RegularDifferentialChain_equatio), 0, 0, 1, 1},
    {&__pyx_kp_u_RegularDifferentialChain_equatio_2, __pyx_k_RegularDifferentialChain_equatio_2, sizeof(__pyx_k_RegularDifferentialChain_equatio_2), 0, 1, 0, 0},
    {&__pyx_kp_u_RegularDifferentialChain_expecte, __pyx_k_RegularDifferentialChain_expecte, sizeof(__pyx_k_RegularDifferentialChain_expecte), 0, 1, 0, 0},
    {&__pyx_n_s_RegularDifferentialChain_indets, __pyx_k_RegularDifferentialChain_indets, sizeof(__pyx_k_RegularDifferentialChain_indets), 0, 0, 1, 1},
    {&__pyx_kp_u_RegularDifferentialChain_indets_2, __pyx_k_RegularDifferentialChain_indets_2, sizeof(__pyx_k_RegularDifferentialChain_indets_2), 0, 1, 0, 0},
    {&__pyx_n_s_RegularDifferentialChain_initial, __pyx_k_RegularDifferentialChain_initial, sizeof(__pyx_k_RegularDifferentialChain_initial), 0, 0, 1, 1},
    {&__pyx_kp_u_RegularDifferentialChain_initial_2, __pyx_k_RegularDifferentialChain_initial_2, sizeof(__pyx_k_RegularDifferentialChain_initial_2), 0, 1, 0, 0},
    {&__pyx_n_s_RegularDifferentialChain_leading, __pyx_k_RegularDifferentialChain_leading, sizeof(__pyx_k_RegularDifferentialChain_leading), 0, 0, 1, 1},
    {&__pyx_n_s_RegularDifferentialChain_leading_2, __pyx_k_RegularDifferentialChain_leading_2, sizeof(__pyx_k_RegularDifferentialChain_leading_2), 0, 0, 1, 1},
    {&__pyx_n_s_RegularDifferentialChain_leading_3, __pyx_k_RegularDifferentialChain_leading_3, sizeof(__pyx_k_RegularDifferentialChain_leading_3), 0, 0, 1, 1},
    {&__pyx_kp_u_RegularDifferentialChain_leading_4, __pyx_k_RegularDifferentialChain_leading_4, sizeof(__pyx_k_RegularDifferentialChain_leading_4), 0, 1, 0, 0},
    {&__pyx_kp_u_RegularDifferentialChain_leading_5, __pyx_k_RegularDifferentialChain_leading_5, sizeof(__pyx_k_RegularDifferentialChain_leading_5), 0, 1, 0, 0},
    {&__pyx_kp_u_RegularDifferentialChain_leading_6, __pyx_k_RegularDifferentialChain_leading_6, sizeof(__pyx_k_RegularDifferentialChain_leading_6), 0, 1, 0, 0},
    {&__pyx_n_s_RegularDifferentialChain_normal, __pyx_k_RegularDifferentialChain_normal, sizeof(__pyx_k_RegularDifferentialChain_normal), 0, 0, 1, 1},
    {&__pyx_kp_u_RegularDifferentialChain_normal_2, __pyx_k_RegularDifferentialChain_normal_2, sizeof(__pyx_k_RegularDifferentialChain_normal_2), 0, 1, 0, 0},
    {&__pyx_n_s_RegularDifferentialChain_prem, __pyx_k_RegularDifferentialChain_prem, sizeof(__pyx_k_RegularDifferentialChain_prem), 0, 0, 1, 1},
    {&__pyx_kp_u_RegularDifferentialChain_prem_li, __pyx_k_RegularDifferentialChain_prem_li, sizeof(__pyx_k_RegularDifferentialChain_prem_li), 0, 1, 0, 0},
    {&__pyx_n_s_RegularDifferentialChain_prepara, __pyx_k_RegularDifferentialChain_prepara, sizeof(__pyx_k_RegularDifferentialChain_prepara), 0, 0, 1, 1},
    {&__pyx_kp_u_RegularDifferentialChain_prepara_2, __pyx_k_RegularDifferentialChain_prepara_2, sizeof(__pyx_k_RegularDifferentialChain_prepara_2), 0, 1, 0, 0},
    {&__pyx_n_s_RegularDifferentialChain_resulta, __pyx_k_RegularDifferentialChain_resulta, sizeof(__pyx_k_RegularDifferentialChain_resulta), 0, 0, 1, 1},
    {&__pyx_kp_u_RegularDifferentialChain_resulta_2, __pyx_k_RegularDifferentialChain_resulta_2, sizeof(__pyx_k_RegularDifferentialChain_resulta_2), 0, 1, 0, 0},
    {&__pyx_n_s_RegularDifferentialChain_separan, __pyx_k_RegularDifferentialChain_separan, sizeof(__pyx_k_RegularDifferentialChain_separan), 0, 0, 1, 1},
    {&__pyx_kp_u_RegularDifferentialChain_separan_2, __pyx_k_RegularDifferentialChain_separan_2, sizeof(__pyx_k_RegularDifferentialChain_separan_2), 0, 1, 0, 0},
    {&__pyx_n_s_RegularDifferentialChain_tail, __pyx_k_RegularDifferentialChain_tail, sizeof(__pyx_k_RegularDifferentialChain_tail), 0, 0, 1, 1},
    {&__pyx_kp_u_RegularDifferentialChain_tail_li, __pyx_k_RegularDifferentialChain_tail_li, sizeof(__pyx_k_RegularDifferentialChain_tail_li), 0, 1, 0, 0},
    {&__pyx_kp_u_Ritt_s_reduction_algorithm_by_a, __pyx_k_Ritt_s_reduction_algorithm_by_a, sizeof(__pyx_k_Ritt_s_reduction_algorithm_by_a), 0, 1, 0, 0},
    {&__pyx_kp_u_Ritt_s_reduction_algorithm_by_a_2, __pyx_k_Ritt_s_reduction_algorithm_by_a_2, sizeof(__pyx_k_Ritt_s_reduction_algorithm_by_a_2), 0, 1, 0, 0},
    {&__pyx_n_s_RosenfeldGroebner, __pyx_k_RosenfeldGroebner, sizeof(__pyx_k_RosenfeldGroebner), 0, 0, 1, 1},
    {&__pyx_n_s_RuntimeError, __pyx_k_RuntimeError, sizeof(__pyx_k_RuntimeError), 0, 0, 1, 1},
    {&__pyx_kp_u_Sort_a_list_of_polynomials_acco, __pyx_k_Sort_a_list_of_polynomials_acco, sizeof(__pyx_k_Sort_a_list_of_polynomials_acco), 0, 1, 0, 0},
    {&__pyx_kp_u_Split_a_derivative_into_derivat, __pyx_k_Split_a_derivative_into_derivat, sizeof(__pyx_k_Split_a_derivative_into_derivat), 0, 1, 0, 0},
    {&__pyx_n_s_Symbol, __pyx_k_Symbol, sizeof(__pyx_k_Symbol), 0, 0, 1, 1},
    {&__pyx_kp_u_Test_if_a_rational_fraction_is, __pyx_k_Test_if_a_rational_fraction_is, sizeof(__pyx_k_Test_if_a_rational_fraction_is), 0, 1, 0, 0},
    {&__pyx_kp_u_Test_if_an_expression_is_a_rati, __pyx_k_Test_if_an_expression_is_a_rati, sizeof(__pyx_k_Test_if_an_expression_is_a_rati), 0, 1, 0, 0},
    {&__pyx_kp_u_The_DenefLipshitz_algorithm_INP, __pyx_k_The_DenefLipshitz_algorithm_INP, sizeof(__pyx_k_The_DenefLipshitz_algorithm_INP), 0, 1, 0, 0},
    {&__pyx_kp_u_The_DenefLipshitz_algorithm_INP_2, __pyx_k_The_DenefLipshitz_algorithm_INP_2, sizeof(__pyx_k_The_DenefLipshitz_algorithm_INP_2), 0, 1, 0, 0},
    {&__pyx_kp_u_The_Rosenfeld_Groebner_simplifi, __pyx_k_The_Rosenfeld_Groebner_simplifi, sizeof(__pyx_k_The_Rosenfeld_Groebner_simplifi), 0, 1, 0, 0},
    {&__pyx_kp_u_The_coefficients_and_monomials, __pyx_k_The_coefficients_and_monomials, sizeof(__pyx_k_The_coefficients_and_monomials), 0, 1, 0, 0},
    {&__pyx_kp_u_The_constraints_of_a_DenefLipsh, __pyx_k_The_constraints_of_a_DenefLipsh, sizeof(__pyx_k_The_constraints_of_a_DenefLipsh), 0, 1, 0, 0},
    {&__pyx_kp_u_The_embedding_differential_ring, __pyx_k_The_embedding_differential_ring, sizeof(__pyx_k_The_embedding_differential_ring), 0, 1, 0, 0},
    {&__pyx_kp_u_The_formal_power_series_solutio, __pyx_k_The_formal_power_series_solutio, sizeof(__pyx_k_The_formal_power_series_solutio), 0, 1, 0, 0},
    {&__pyx_kp_u_The_indeterminates_of_a_Differe, __pyx_k_The_indeterminates_of_a_Differe, sizeof(__pyx_k_The_indeterminates_of_a_Differe), 0, 1, 0, 0},
    {&__pyx_kp_u_The_indeterminates_of_a_Regular, __pyx_k_The_indeterminates_of_a_Regular, sizeof(__pyx_k_The_indeterminates_of_a_Regular), 0, 1, 0, 0},
    {&__pyx_kp_u_The_initial_of_a_polynomial_or, __pyx_k_The_initial_of_a_polynomial_or, sizeof(__pyx_k_The_initial_of_a_polynomial_or), 0, 1, 0, 0},
    {&__pyx_kp_u_The_initials_of_a_regular_diffe, __pyx_k_The_initials_of_a_regular_diffe, sizeof(__pyx_k_The_initials_of_a_regular_diffe), 0, 1, 0, 0},
    {&__pyx_kp_u_The_leading_coefficient_of_a_ra, __pyx_k_The_leading_coefficient_of_a_ra, sizeof(__pyx_k_The_leading_coefficient_of_a_ra), 0, 1, 0, 0},
    {&__pyx_kp_u_The_leading_coefficients_of_a_r, __pyx_k_The_leading_coefficients_of_a_r, sizeof(__pyx_k_The_leading_coefficients_of_a_r), 0, 1, 0, 0},
    {&__pyx_kp_u_The_leading_derivative_of_a_rat, __pyx_k_The_leading_derivative_of_a_rat, sizeof(__pyx_k_The_leading_derivative_of_a_rat), 0, 1, 0, 0},
    {&__pyx_kp_u_The_leading_derivatives_of_a_re, __pyx_k_The_leading_derivatives_of_a_re, sizeof(__pyx_k_The_leading_derivatives_of_a_re), 0, 1, 0, 0},
    {&__pyx_kp_u_The_leading_polynomials_of_a_De, __pyx_k_The_leading_polynomials_of_a_De, sizeof(__pyx_k_The_leading_polynomials_of_a_De), 0, 1, 0, 0},
    {&__pyx_kp_u_The_leading_rank_of_a_rational, __pyx_k_The_leading_rank_of_a_rational, sizeof(__pyx_k_The_leading_rank_of_a_rational), 0, 1, 0, 0},
    {&__pyx_kp_u_The_leading_ranks_of_a_regular, __pyx_k_The_leading_ranks_of_a_regular, sizeof(__pyx_k_The_leading_ranks_of_a_regular), 0, 1, 0, 0},
    {&__pyx_kp_u_The_list_of_attributes_of_a_Reg, __pyx_k_The_list_of_attributes_of_a_Reg, sizeof(__pyx_k_The_list_of_attributes_of_a_Reg), 0, 1, 0, 0},
    {&__pyx_kp_u_The_list_of_equations_of_a_regu, __pyx_k_The_list_of_equations_of_a_regu, sizeof(__pyx_k_The_list_of_equations_of_a_regu), 0, 1, 0, 0},
    {&__pyx_kp_u_The_list_of_generators_of_a_bas, __pyx_k_The_list_of_generators_of_a_bas, sizeof(__pyx_k_The_list_of_generators_of_a_bas), 0, 1, 0, 0},
    {&__pyx_kp_u_The_normal_form_of_a_rational_d, __pyx_k_The_normal_form_of_a_rational_d, sizeof(__pyx_k_The_normal_form_of_a_rational_d), 0, 1, 0, 0},
    {&__pyx_kp_u_The_normal_form_of_a_rational_d_2, __pyx_k_The_normal_form_of_a_rational_d_2, sizeof(__pyx_k_The_normal_form_of_a_rational_d_2), 0, 1, 0, 0},
    {&__pyx_kp_u_The_number_of_equations_of_a_re, __pyx_k_The_number_of_equations_of_a_re, sizeof(__pyx_k_The_number_of_equations_of_a_re), 0, 1, 0, 0},
    {&__pyx_kp_u_The_preparation_equation_of_a_p, __pyx_k_The_preparation_equation_of_a_p, sizeof(__pyx_k_The_preparation_equation_of_a_p), 0, 1, 0, 0},
    {&__pyx_kp_u_The_pseudo_remainder_of_a_fract, __pyx_k_The_pseudo_remainder_of_a_fract, sizeof(__pyx_k_The_pseudo_remainder_of_a_fract), 0, 1, 0, 0},
    {&__pyx_kp_u_The_regular_differential_chain, __pyx_k_The_regular_differential_chain, sizeof(__pyx_k_The_regular_differential_chain), 0, 1, 0, 0},
    {&__pyx_kp_u_The_relations_in_a_BMI_compatib, __pyx_k_The_relations_in_a_BMI_compatib, sizeof(__pyx_k_The_relations_in_a_BMI_compatib), 0, 1, 0, 0},
    {&__pyx_kp_u_The_resultant_of_a_differential, __pyx_k_The_resultant_of_a_differential, sizeof(__pyx_k_The_resultant_of_a_differential), 0, 1, 0, 0},
    {&__pyx_kp_u_The_separant_of_a_rational_frac, __pyx_k_The_separant_of_a_rational_frac, sizeof(__pyx_k_The_separant_of_a_rational_frac), 0, 1, 0, 0},
    {&__pyx_kp_u_The_separants_of_a_regular_diff, __pyx_k_The_separants_of_a_regular_diff, sizeof(__pyx_k_The_separants_of_a_regular_diff), 0, 1, 0, 0},
    {&__pyx_kp_u_The_tail_of_a_rational_fraction, __pyx_k_The_tail_of_a_rational_fraction, sizeof(__pyx_k_The_tail_of_a_rational_fraction), 0, 1, 0, 0},
    {&__pyx_kp_u_The_tails_of_a_regular_differen, __pyx_k_The_tails_of_a_regular_differen, sizeof(__pyx_k_The_tails_of_a_regular_differen), 0, 1, 0, 0},
    {&__pyx_n_s_TypeError, __pyx_k_TypeError, sizeof(__pyx_k_TypeError), 0, 0, 1, 1},
    {&__pyx_n_s_U, __pyx_k_U, sizeof(__pyx_k_U), 0, 0, 1, 1},
    {&__pyx_n_s_UndefinedFunction, __pyx_k_UndefinedFunction, sizeof(__pyx_k_UndefinedFunction), 0, 0, 1, 1},
    {&__pyx_n_s_Y, __pyx_k_Y, sizeof(__pyx_k_Y), 0, 0, 1, 1},
    {&__pyx_n_s_Ybar, __pyx_k_Ybar, sizeof(__pyx_k_Ybar), 0, 0, 1, 1},
    {&__pyx_kp_b__16, __pyx_k__16, sizeof(__pyx_k__16), 0, 0, 0, 0},
    {&__pyx_n_s__202, __pyx_k__202, sizeof(__pyx_k__202), 0, 0, 1, 1},
    {&__pyx_kp_b__6, __pyx_k__6, sizeof(__pyx_k__6), 0, 0, 0, 0},
    {&__pyx_kp_u__6, __pyx_k__6, sizeof(__pyx_k__6), 0, 1, 0, 0},
    {&__pyx_kp_b__65, __pyx_k__65, sizeof(__pyx_k__65), 0, 0, 0, 0},
    {&__pyx_kp_b__66, __pyx_k__66, sizeof(__pyx_k__66), 0, 0, 0, 0},
    {&__pyx_kp_b__67, __pyx_k__67, sizeof(__pyx_k__67), 0, 0, 0, 0},
    {&__pyx_kp_u__67, __pyx_k__67, sizeof(__pyx_k__67), 0, 1, 0, 0},
    {&__pyx_kp_b__7, __pyx_k__7, sizeof(__pyx_k__7), 0, 0, 0, 0},
    {&__pyx_kp_u__7, __pyx_k__7, sizeof(__pyx_k__7), 0, 1, 0, 0},
    {&__pyx_kp_u__76, __pyx_k__76, sizeof(__pyx_k__76), 0, 1, 0, 0},
    {&__pyx_kp_u__83, __pyx_k__83, sizeof(__pyx_k__83), 0, 1, 0, 0},
    {&__pyx_n_s__84, __pyx_k__84, sizeof(__pyx_k__84), 0, 0, 1, 1},
    {&__pyx_n_u_all, __pyx_k_all, sizeof(__pyx_k_all), 0, 1, 0, 1},
    {&__pyx_n_s_arg, __pyx_k_arg, sizeof(__pyx_k_arg), 0, 0, 1, 1},
    {&__pyx_n_s_args, __pyx_k_args, sizeof(__pyx_k_args), 0, 0, 1, 1},
    {&__pyx_n_s_ascii, __pyx_k_ascii, sizeof(__pyx_k_ascii), 0, 0, 1, 1},
    {&__pyx_n_s_asyncio_coroutines, __pyx_k_asyncio_coroutines, sizeof(__pyx_k_asyncio_coroutines), 0, 0, 1, 1},
    {&__pyx_n_s_attributes, __pyx_k_attributes, sizeof(__pyx_k_attributes), 0, 0, 1, 1},
    {&__pyx_n_u_autoreduced, __pyx_k_autoreduced, sizeof(__pyx_k_autoreduced), 0, 1, 0, 1},
    {&__pyx_n_s_base, __pyx_k_base, sizeof(__pyx_k_base), 0, 0, 1, 1},
    {&__pyx_n_s_basefield, __pyx_k_basefield, sizeof(__pyx_k_basefield), 0, 0, 1, 1},
    {&__pyx_n_s_blocks, __pyx_k_blocks, sizeof(__pyx_k_blocks), 0, 0, 1, 1},
    {&__pyx_n_s_casesplit, __pyx_k_casesplit, sizeof(__pyx_k_casesplit), 0, 0, 1, 1},
    {&__pyx_kp_u_casesplit_True, __pyx_k_casesplit_True, sizeof(__pyx_k_casesplit_True), 0, 1, 0, 0},
    {&__pyx_n_s_change_ranking, __pyx_k_change_ranking, sizeof(__pyx_k_change_ranking), 0, 0, 1, 1},
    {&__pyx_n_s_class_getitem, __pyx_k_class_getitem, sizeof(__pyx_k_class_getitem), 0, 0, 1, 1},
    {&__pyx_n_s_cline_in_traceback, __pyx_k_cline_in_traceback, sizeof(__pyx_k_cline_in_traceback), 0, 0, 1, 1},
    {&__pyx_n_s_coeffs, __pyx_k_coeffs, sizeof(__pyx_k_coeffs), 0, 0, 1, 1},
    {&__pyx_n_u_coherent, __pyx_k_coherent, sizeof(__pyx_k_coherent), 0, 1, 0, 1},
    {&__pyx_n_s_compile, __pyx_k_compile, sizeof(__pyx_k_compile), 0, 0, 1, 1},
    {&__pyx_n_s_congruence, __pyx_k_congruence, sizeof(__pyx_k_congruence), 0, 0, 1, 1},
    {&__pyx_n_s_constraints, __pyx_k_constraints, sizeof(__pyx_k_constraints), 0, 0, 1, 1},
    {&__pyx_n_s_control, __pyx_k_control, sizeof(__pyx_k_control), 0, 0, 1, 1},
    {&__pyx_n_s_copy, __pyx_k_copy, sizeof(__pyx_k_copy), 0, 0, 1, 1},
    {&__pyx_n_s_core, __pyx_k_core, sizeof(__pyx_k_core), 0, 0, 1, 1},
    {&__pyx_n_s_d, __pyx_k_d, sizeof(__pyx_k_d), 0, 0, 1, 1},
    {&__pyx_n_s_degree, __pyx_k_degree, sizeof(__pyx_k_degree), 0, 0, 1, 1},
    {&__pyx_n_u_degrevlexA, __pyx_k_degrevlexA, sizeof(__pyx_k_degrevlexA), 0, 1, 0, 1},
    {&__pyx_n_u_degrevlexB, __pyx_k_degrevlexB, sizeof(__pyx_k_degrevlexB), 0, 1, 0, 1},
    {&__pyx_n_s_derivation, __pyx_k_derivation, sizeof(__pyx_k_derivation), 0, 0, 1, 1},
    {&__pyx_n_s_derivations, __pyx_k_derivations, sizeof(__pyx_k_derivations), 0, 0, 1, 1},
    {&__pyx_n_u_derivations, __pyx_k_derivations, sizeof(__pyx_k_derivations), 0, 1, 0, 1},
    {&__pyx_n_s_derivative, __pyx_k_derivative, sizeof(__pyx_k_derivative), 0, 0, 1, 1},
    {&__pyx_n_s_ders, __pyx_k_ders, sizeof(__pyx_k_ders), 0, 0, 1, 1},
    {&__pyx_n_s_dico, __pyx_k_dico, sizeof(__pyx_k_dico), 0, 0, 1, 1},
    {&__pyx_n_s_dict, __pyx_k_dict, sizeof(__pyx_k_dict), 0, 0, 1, 1},
    {&__pyx_n_s_dict_2, __pyx_k_dict_2, sizeof(__pyx_k_dict_2), 0, 0, 1, 1},
    {&__pyx_n_u_differential, __pyx_k_differential, sizeof(__pyx_k_differential), 0, 1, 0, 1},
    {&__pyx_kp_u_differential__field, __pyx_k_differential__field, sizeof(__pyx_k_differential__field), 0, 1, 0, 0},
    {&__pyx_kp_u_differential__ring, __pyx_k_differential__ring, sizeof(__pyx_k_differential__ring), 0, 1, 0, 0},
    {&__pyx_n_u_differential_field, __pyx_k_differential_field, sizeof(__pyx_k_differential_field), 0, 1, 0, 1},
    {&__pyx_n_s_differential_prem, __pyx_k_differential_prem, sizeof(__pyx_k_differential_prem), 0, 0, 1, 1},
    {&__pyx_n_s_differential_ring, __pyx_k_differential_ring, sizeof(__pyx_k_differential_ring), 0, 0, 1, 1},
    {&__pyx_n_u_differential_ring, __pyx_k_differential_ring, sizeof(__pyx_k_differential_ring), 0, 1, 0, 1},
    {&__pyx_n_s_differentiate, __pyx_k_differentiate, sizeof(__pyx_k_differentiate), 0, 0, 1, 1},
    {&__pyx_n_s_dimlb, __pyx_k_dimlb, sizeof(__pyx_k_dimlb), 0, 0, 1, 1},
    {&__pyx_kp_u_disable, __pyx_k_disable, sizeof(__pyx_k_disable), 0, 1, 0, 0},
    {&__pyx_n_s_e, __pyx_k_e, sizeof(__pyx_k_e), 0, 0, 1, 1},
    {&__pyx_n_s_elt, __pyx_k_elt, sizeof(__pyx_k_elt), 0, 0, 1, 1},
    {&__pyx_kp_u_enable, __pyx_k_enable, sizeof(__pyx_k_enable), 0, 1, 0, 0},
    {&__pyx_n_s_eqns, __pyx_k_eqns, sizeof(__pyx_k_eqns), 0, 0, 1, 1},
    {&__pyx_n_s_equation, __pyx_k_equation, sizeof(__pyx_k_equation), 0, 0, 1, 1},
    {&__pyx_n_s_equations, __pyx_k_equations, sizeof(__pyx_k_equations), 0, 0, 1, 1},
    {&__pyx_n_s_eval, __pyx_k_eval, sizeof(__pyx_k_eval), 0, 0, 1, 1},
    {&__pyx_n_s_evaluate, __pyx_k_evaluate, sizeof(__pyx_k_evaluate), 0, 0, 1, 1},
    {&__pyx_n_s_evaluate_2, __pyx_k_evaluate_2, sizeof(__pyx_k_evaluate_2), 0, 0, 1, 1},
    {&__pyx_n_s_evdict, __pyx_k_evdict, sizeof(__pyx_k_evdict), 0, 0, 1, 1},
    {&__pyx_n_s_evdict0, __pyx_k_evdict0, sizeof(__pyx_k_evdict0), 0, 0, 1, 1},
    {&__pyx_n_s_evdict1, __pyx_k_evdict1, sizeof(__pyx_k_evdict1), 0, 0, 1, 1},
    {&__pyx_n_s_expr, __pyx_k_expr, sizeof(__pyx_k_expr), 0, 0, 1, 1},
    {&__pyx_n_s_f, __pyx_k_f, sizeof(__pyx_k_f), 0, 0, 1, 1},
    {&__pyx_n_s_factor_derivative, __pyx_k_factor_derivative, sizeof(__pyx_k_factor_derivative), 0, 0, 1, 1},
    {&__pyx_n_b_false, __pyx_k_false, sizeof(__pyx_k_false), 0, 0, 0, 1},
    {&__pyx_n_s_fullset, __pyx_k_fullset, sizeof(__pyx_k_fullset), 0, 0, 1, 1},
    {&__pyx_n_s_func, __pyx_k_func, sizeof(__pyx_k_func), 0, 0, 1, 1},
    {&__pyx_n_s_function, __pyx_k_function, sizeof(__pyx_k_function), 0, 0, 1, 1},
    {&__pyx_kp_u_gc, __pyx_k_gc, sizeof(__pyx_k_gc), 0, 1, 0, 0},
    {&__pyx_n_s_generators, __pyx_k_generators, sizeof(__pyx_k_generators), 0, 0, 1, 1},
    {&__pyx_n_s_getstate, __pyx_k_getstate, sizeof(__pyx_k_getstate), 0, 0, 1, 1},
    {&__pyx_n_u_grlexA, __pyx_k_grlexA, sizeof(__pyx_k_grlexA), 0, 1, 0, 1},
    {&__pyx_n_u_grlexB, __pyx_k_grlexB, sizeof(__pyx_k_grlexB), 0, 1, 0, 1},
    {&__pyx_n_s_groups, __pyx_k_groups, sizeof(__pyx_k_groups), 0, 0, 1, 1},
    {&__pyx_kp_s_home_boulier_DifferentialAlgebr, __pyx_k_home_boulier_DifferentialAlgebr, sizeof(__pyx_k_home_boulier_DifferentialAlgebr), 0, 0, 1, 0},
    {&__pyx_kp_s_home_boulier_DifferentialAlgebr_2, __pyx_k_home_boulier_DifferentialAlgebr_2, sizeof(__pyx_k_home_boulier_DifferentialAlgebr_2), 0, 0, 1, 0},
    {&__pyx_kp_s_home_boulier_DifferentialAlgebr_3, __pyx_k_home_boulier_DifferentialAlgebr_3, sizeof(__pyx_k_home_boulier_DifferentialAlgebr_3), 0, 0, 1, 0},
    {&__pyx_kp_s_home_boulier_DifferentialAlgebr_4, __pyx_k_home_boulier_DifferentialAlgebr_4, sizeof(__pyx_k_home_boulier_DifferentialAlgebr_4), 0, 0, 1, 0},
    {&__pyx_kp_s_home_boulier_DifferentialAlgebr_5, __pyx_k_home_boulier_DifferentialAlgebr_5, sizeof(__pyx_k_home_boulier_DifferentialAlgebr_5), 0, 0, 1, 0},
    {&__pyx_n_s_i, __pyx_k_i, sizeof(__pyx_k_i), 0, 0, 1, 1},
    {&__pyx_n_s_import, __pyx_k_import, sizeof(__pyx_k_import), 0, 0, 1, 1},
    {&__pyx_n_u_independent, __pyx_k_independent, sizeof(__pyx_k_independent), 0, 1, 0, 1},
    {&__pyx_kp_u_independent_variable_expected_fo, __pyx_k_independent_variable_expected_fo, sizeof(__pyx_k_independent_variable_expected_fo), 0, 1, 0, 0},
    {&__pyx_n_s_indets, __pyx_k_indets, sizeof(__pyx_k_indets), 0, 0, 1, 1},
    {&__pyx_n_s_indexed, __pyx_k_indexed, sizeof(__pyx_k_indexed), 0, 0, 1, 1},
    {&__pyx_n_s_indexedbase, __pyx_k_indexedbase, sizeof(__pyx_k_indexedbase), 0, 0, 1, 1},
    {&__pyx_n_s_indices, __pyx_k_indices, sizeof(__pyx_k_indices), 0, 0, 1, 1},
    {&__pyx_n_s_ineq, __pyx_k_ineq, sizeof(__pyx_k_ineq), 0, 0, 1, 1},
    {&__pyx_n_s_initial, __pyx_k_initial, sizeof(__pyx_k_initial), 0, 0, 1, 1},
    {&__pyx_n_s_initializing, __pyx_k_initializing, sizeof(__pyx_k_initializing), 0, 0, 1, 1},
    {&__pyx_n_s_integrate, __pyx_k_integrate, sizeof(__pyx_k_integrate), 0, 0, 1, 1},
    {&__pyx_n_s_is_constant, __pyx_k_is_constant, sizeof(__pyx_k_is_constant), 0, 0, 1, 1},
    {&__pyx_n_s_is_coroutine, __pyx_k_is_coroutine, sizeof(__pyx_k_is_coroutine), 0, 0, 1, 1},
    {&__pyx_n_s_is_differential_fraction, __pyx_k_is_differential_fraction, sizeof(__pyx_k_is_differential_fraction), 0, 0, 1, 1},
    {&__pyx_kp_u_isenabled, __pyx_k_isenabled, sizeof(__pyx_k_isenabled), 0, 1, 0, 0},
    {&__pyx_n_u_iter, __pyx_k_iter, sizeof(__pyx_k_iter), 0, 1, 0, 1},
    {&__pyx_n_s_iterated, __pyx_k_iterated, sizeof(__pyx_k_iterated), 0, 0, 1, 1},
    {&__pyx_n_s_key, __pyx_k_key, sizeof(__pyx_k_key), 0, 0, 1, 1},
    {&__pyx_n_s_latex, __pyx_k_latex, sizeof(__pyx_k_latex), 0, 0, 1, 1},
    {&__pyx_n_s_latex_2, __pyx_k_latex_2, sizeof(__pyx_k_latex_2), 0, 0, 1, 1},
    {&__pyx_n_s_leading_coefficient, __pyx_k_leading_coefficient, sizeof(__pyx_k_leading_coefficient), 0, 0, 1, 1},
    {&__pyx_n_s_leading_derivative, __pyx_k_leading_derivative, sizeof(__pyx_k_leading_derivative), 0, 0, 1, 1},
    {&__pyx_n_s_leading_polynomial, __pyx_k_leading_polynomial, sizeof(__pyx_k_leading_polynomial), 0, 0, 1, 1},
    {&__pyx_n_s_leading_rank, __pyx_k_leading_rank, sizeof(__pyx_k_leading_rank), 0, 0, 1, 1},
    {&__pyx_n_u_lex, __pyx_k_lex, sizeof(__pyx_k_lex), 0, 1, 0, 1},
    {&__pyx_n_s_lhs, __pyx_k_lhs, sizeof(__pyx_k_lhs), 0, 0, 1, 1},
    {&__pyx_n_s_listform, __pyx_k_listform, sizeof(__pyx_k_listform), 0, 0, 1, 1},
    {&__pyx_n_s_listof_symbols, __pyx_k_listof_symbols, sizeof(__pyx_k_listof_symbols), 0, 0, 1, 1},
    {&__pyx_n_s_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1},
    {&__pyx_n_s_match, __pyx_k_match, sizeof(__pyx_k_match), 0, 0, 1, 1},
    {&__pyx_n_s_memout, __pyx_k_memout, sizeof(__pyx_k_memout), 0, 0, 1, 1},
    {&__pyx_n_s_mesgerr, __pyx_k_mesgerr, sizeof(__pyx_k_mesgerr), 0, 0, 1, 1},
    {&__pyx_n_s_mode, __pyx_k_mode, sizeof(__pyx_k_mode), 0, 0, 1, 1},
    {&__pyx_n_s_name, __pyx_k_name, sizeof(__pyx_k_name), 0, 0, 1, 1},
    {&__pyx_n_s_nbz, __pyx_k_nbz, sizeof(__pyx_k_nbz), 0, 0, 1, 1},
    {&__pyx_n_s_new, __pyx_k_new, sizeof(__pyx_k_new), 0, 0, 1, 1},
    {&__pyx_n_s_newargs, __pyx_k_newargs, sizeof(__pyx_k_newargs), 0, 0, 1, 1},
    {&__pyx_n_s_newkey, __pyx_k_newkey, sizeof(__pyx_k_newkey), 0, 0, 1, 1},
    {&__pyx_n_s_newval, __pyx_k_newval, sizeof(__pyx_k_newval), 0, 0, 1, 1},
    {&__pyx_n_s_normal_form, __pyx_k_normal_form, sizeof(__pyx_k_normal_form), 0, 0, 1, 1},
    {&__pyx_n_u_normalized, __pyx_k_normalized, sizeof(__pyx_k_normalized), 0, 1, 0, 1},
    {&__pyx_n_s_notation, __pyx_k_notation, sizeof(__pyx_k_notation), 0, 0, 1, 1},
    {&__pyx_n_s_number_of_equations, __pyx_k_number_of_equations, sizeof(__pyx_k_number_of_equations), 0, 0, 1, 1},
    {&__pyx_n_s_oo, __pyx_k_oo, sizeof(__pyx_k_oo), 0, 0, 1, 1},
    {&__pyx_kp_u_ordinary_differential_ring_expec, __pyx_k_ordinary_differential_ring_expec, sizeof(__pyx_k_ordinary_differential_ring_expec), 0, 1, 0, 0},
    {&__pyx_n_s_parameters, __pyx_k_parameters, sizeof(__pyx_k_parameters), 0, 0, 1, 1},
    {&__pyx_n_s_pattern, __pyx_k_pattern, sizeof(__pyx_k_pattern), 0, 0, 1, 1},
    {&__pyx_n_s_pickle, __pyx_k_pickle, sizeof(__pyx_k_pickle), 0, 0, 1, 1},
    {&__pyx_n_s_polynomial, __pyx_k_polynomial, sizeof(__pyx_k_polynomial), 0, 0, 1, 1},
    {&__pyx_n_s_polynomials, __pyx_k_polynomials, sizeof(__pyx_k_polynomials), 0, 0, 1, 1},
    {&__pyx_n_s_prem, __pyx_k_prem, sizeof(__pyx_k_prem), 0, 0, 1, 1},
    {&__pyx_n_s_preparation_equation, __pyx_k_preparation_equation, sizeof(__pyx_k_preparation_equation), 0, 0, 1, 1},
    {&__pyx_n_s_pretend, __pyx_k_pretend, sizeof(__pyx_k_pretend), 0, 0, 1, 1},
    {&__pyx_n_s_prime, __pyx_k_prime, sizeof(__pyx_k_prime), 0, 0, 1, 1},
    {&__pyx_n_u_prime, __pyx_k_prime, sizeof(__pyx_k_prime), 0, 1, 0, 1},
    {&__pyx_n_u_primitive, __pyx_k_primitive, sizeof(__pyx_k_primitive), 0, 1, 0, 1},
    {&__pyx_n_s_process_equations, __pyx_k_process_equations, sizeof(__pyx_k_process_equations), 0, 0, 1, 1},
    {&__pyx_n_s_process_evdict, __pyx_k_process_evdict, sizeof(__pyx_k_process_evdict), 0, 0, 1, 1},
    {&__pyx_n_s_process_notation, __pyx_k_process_notation, sizeof(__pyx_k_process_notation), 0, 0, 1, 1},
    {&__pyx_n_s_pyx_PickleError, __pyx_k_pyx_PickleError, sizeof(__pyx_k_pyx_PickleError), 0, 0, 1, 1},
    {&__pyx_n_s_pyx_checksum, __pyx_k_pyx_checksum, sizeof(__pyx_k_pyx_checksum), 0, 0, 1, 1},
    {&__pyx_n_s_pyx_result, __pyx_k_pyx_result, sizeof(__pyx_k_pyx_result), 0, 0, 1, 1},
    {&__pyx_n_s_pyx_state, __pyx_k_pyx_state, sizeof(__pyx_k_pyx_state), 0, 0, 1, 1},
    {&__pyx_n_s_pyx_type, __pyx_k_pyx_type, sizeof(__pyx_k_pyx_type), 0, 0, 1, 1},
    {&__pyx_n_s_pyx_unpickle_BaseFieldExtensio, __pyx_k_pyx_unpickle_BaseFieldExtensio, sizeof(__pyx_k_pyx_unpickle_BaseFieldExtensio), 0, 0, 1, 1},
    {&__pyx_n_s_q, __pyx_k_q, sizeof(__pyx_k_q), 0, 0, 1, 1},
    {&__pyx_n_s_range, __pyx_k_range, sizeof(__pyx_k_range), 0, 0, 1, 1},
    {&__pyx_kp_b_rank_0, __pyx_k_rank_0, sizeof(__pyx_k_rank_0), 0, 0, 0, 0},
    {&__pyx_n_s_ranking, __pyx_k_ranking, sizeof(__pyx_k_ranking), 0, 0, 1, 1},
    {&__pyx_n_s_ranking_2, __pyx_k_ranking_2, sizeof(__pyx_k_ranking_2), 0, 0, 1, 1},
    {&__pyx_n_s_ratfrac, __pyx_k_ratfrac, sizeof(__pyx_k_ratfrac), 0, 0, 1, 1},
    {&__pyx_n_s_re, __pyx_k_re, sizeof(__pyx_k_re), 0, 0, 1, 1},
    {&__pyx_n_s_redset, __pyx_k_redset, sizeof(__pyx_k_redset), 0, 0, 1, 1},
    {&__pyx_n_s_reduce, __pyx_k_reduce, sizeof(__pyx_k_reduce), 0, 0, 1, 1},
    {&__pyx_n_s_reduce_cython, __pyx_k_reduce_cython, sizeof(__pyx_k_reduce_cython), 0, 0, 1, 1},
    {&__pyx_n_s_reduce_ex, __pyx_k_reduce_ex, sizeof(__pyx_k_reduce_ex), 0, 0, 1, 1},
    {&__pyx_kp_u_regchain, __pyx_k_regchain, sizeof(__pyx_k_regchain), 0, 1, 0, 0},
    {&__pyx_kp_u_regchain_2, __pyx_k_regchain_2, sizeof(__pyx_k_regchain_2), 0, 1, 0, 0},
    {&__pyx_kp_u_regular__differential__chain, __pyx_k_regular__differential__chain, sizeof(__pyx_k_regular__differential__chain), 0, 1, 0, 0},
    {&__pyx_n_u_regular_differential_chain, __pyx_k_regular_differential_chain, sizeof(__pyx_k_regular_differential_chain), 0, 1, 0, 1},
    {&__pyx_n_s_rel_op, __pyx_k_rel_op, sizeof(__pyx_k_rel_op), 0, 0, 1, 1},
    {&__pyx_n_s_relational, __pyx_k_relational, sizeof(__pyx_k_relational), 0, 0, 1, 1},
    {&__pyx_n_s_relations, __pyx_k_relations, sizeof(__pyx_k_relations), 0, 0, 1, 1},
    {&__pyx_n_s_relations_2, __pyx_k_relations_2, sizeof(__pyx_k_relations_2), 0, 0, 1, 1},
    {&__pyx_n_s_replace, __pyx_k_replace, sizeof(__pyx_k_replace), 0, 0, 1, 1},
    {&__pyx_n_s_result, __pyx_k_result, sizeof(__pyx_k_result), 0, 0, 1, 1},
    {&__pyx_n_s_resultant, __pyx_k_resultant, sizeof(__pyx_k_resultant), 0, 0, 1, 1},
    {&__pyx_n_s_rhs, __pyx_k_rhs, sizeof(__pyx_k_rhs), 0, 0, 1, 1},
    {&__pyx_n_s_ring, __pyx_k_ring, sizeof(__pyx_k_ring), 0, 0, 1, 1},
    {&__pyx_n_s_s, __pyx_k_s, sizeof(__pyx_k_s), 0, 0, 1, 1},
    {&__pyx_n_s_selection, __pyx_k_selection, sizeof(__pyx_k_selection), 0, 0, 1, 1},
    {&__pyx_n_s_self, __pyx_k_self, sizeof(__pyx_k_self), 0, 0, 1, 1},
    {&__pyx_kp_s_self_DLuple_cannot_be_converted, __pyx_k_self_DLuple_cannot_be_converted, sizeof(__pyx_k_self_DLuple_cannot_be_converted), 0, 0, 1, 0},
    {&__pyx_kp_s_self_dring_cannot_be_converted_t, __pyx_k_self_dring_cannot_be_converted_t, sizeof(__pyx_k_self_dring_cannot_be_converted_t), 0, 0, 1, 0},
    {&__pyx_kp_s_self_regchain_cannot_be_converte, __pyx_k_self_regchain_cannot_be_converte, sizeof(__pyx_k_self_regchain_cannot_be_converte), 0, 0, 1, 0},
    {&__pyx_n_s_separant, __pyx_k_separant, sizeof(__pyx_k_separant), 0, 0, 1, 1},
    {&__pyx_n_s_series, __pyx_k_series, sizeof(__pyx_k_series), 0, 0, 1, 1},
    {&__pyx_n_s_setstate, __pyx_k_setstate, sizeof(__pyx_k_setstate), 0, 0, 1, 1},
    {&__pyx_n_s_setstate_cython, __pyx_k_setstate_cython, sizeof(__pyx_k_setstate_cython), 0, 0, 1, 1},
    {&__pyx_n_s_singsol, __pyx_k_singsol, sizeof(__pyx_k_singsol), 0, 0, 1, 1},
    {&__pyx_n_s_solved, __pyx_k_solved, sizeof(__pyx_k_solved), 0, 0, 1, 1},
    {&__pyx_n_s_sort, __pyx_k_sort, sizeof(__pyx_k_sort), 0, 0, 1, 1},
    {&__pyx_n_s_spec, __pyx_k_spec, sizeof(__pyx_k_spec), 0, 0, 1, 1},
    {&__pyx_n_s_split, __pyx_k_split, sizeof(__pyx_k_split), 0, 0, 1, 1},
    {&__pyx_n_u_squarefree, __pyx_k_squarefree, sizeof(__pyx_k_squarefree), 0, 1, 0, 1},
    {&__pyx_n_s_startswith, __pyx_k_startswith, sizeof(__pyx_k_startswith), 0, 0, 1, 1},
    {&__pyx_n_s_state, __pyx_k_state, sizeof(__pyx_k_state), 0, 0, 1, 1},
    {&__pyx_n_s_strY, __pyx_k_strY, sizeof(__pyx_k_strY), 0, 0, 1, 1},
    {&__pyx_n_s_strYbar, __pyx_k_strYbar, sizeof(__pyx_k_strYbar), 0, 0, 1, 1},
    {&__pyx_n_s_strattr, __pyx_k_strattr, sizeof(__pyx_k_strattr), 0, 0, 1, 1},
    {&__pyx_n_s_strcontrol, __pyx_k_strcontrol, sizeof(__pyx_k_strcontrol), 0, 0, 1, 1},
    {&__pyx_n_s_strder, __pyx_k_strder, sizeof(__pyx_k_strder), 0, 0, 1, 1},
    {&__pyx_n_s_strders, __pyx_k_strders, sizeof(__pyx_k_strders), 0, 0, 1, 1},
    {&__pyx_n_s_strdimlb, __pyx_k_strdimlb, sizeof(__pyx_k_strdimlb), 0, 0, 1, 1},
    {&__pyx_n_s_streqns, __pyx_k_streqns, sizeof(__pyx_k_streqns), 0, 0, 1, 1},
    {&__pyx_n_s_strfull, __pyx_k_strfull, sizeof(__pyx_k_strfull), 0, 0, 1, 1},
    {&__pyx_n_s_strgens, __pyx_k_strgens, sizeof(__pyx_k_strgens), 0, 0, 1, 1},
    {&__pyx_n_s_strineq, __pyx_k_strineq, sizeof(__pyx_k_strineq), 0, 0, 1, 1},
    {&__pyx_n_s_string, __pyx_k_string, sizeof(__pyx_k_string), 0, 0, 1, 1},
    {&__pyx_kp_s_stringsource, __pyx_k_stringsource, sizeof(__pyx_k_stringsource), 0, 0, 1, 0},
    {&__pyx_n_s_strmode, __pyx_k_strmode, sizeof(__pyx_k_strmode), 0, 0, 1, 1},
    {&__pyx_n_s_strnot, __pyx_k_strnot, sizeof(__pyx_k_strnot), 0, 0, 1, 1},
    {&__pyx_n_s_strpoly, __pyx_k_strpoly, sizeof(__pyx_k_strpoly), 0, 0, 1, 1},
    {&__pyx_n_s_strq, __pyx_k_strq, sizeof(__pyx_k_strq), 0, 0, 1, 1},
    {&__pyx_n_s_strredset, __pyx_k_strredset, sizeof(__pyx_k_strredset), 0, 0, 1, 1},
    {&__pyx_n_s_strrels, __pyx_k_strrels, sizeof(__pyx_k_strrels), 0, 0, 1, 1},
    {&__pyx_n_s_strsel, __pyx_k_strsel, sizeof(__pyx_k_strsel), 0, 0, 1, 1},
    {&__pyx_n_s_strsingsol, __pyx_k_strsingsol, sizeof(__pyx_k_strsingsol), 0, 0, 1, 1},
    {&__pyx_n_s_strvar, __pyx_k_strvar, sizeof(__pyx_k_strvar), 0, 0, 1, 1},
    {&__pyx_n_s_strvars, __pyx_k_strvars, sizeof(__pyx_k_strvars), 0, 0, 1, 1},
    {&__pyx_n_s_strx, __pyx_k_strx, sizeof(__pyx_k_strx), 0, 0, 1, 1},
    {&__pyx_n_s_strzstring, __pyx_k_strzstring, sizeof(__pyx_k_strzstring), 0, 0, 1, 1},
    {&__pyx_n_s_subrankings, __pyx_k_subrankings, sizeof(__pyx_k_subrankings), 0, 0, 1, 1},
    {&__pyx_n_s_sympy, __pyx_k_sympy, sizeof(__pyx_k_sympy), 0, 0, 1, 1},
    {&__pyx_n_s_sys, __pyx_k_sys, sizeof(__pyx_k_sys), 0, 0, 1, 1},
    {&__pyx_n_s_tail, __pyx_k_tail, sizeof(__pyx_k_tail), 0, 0, 1, 1},
    {&__pyx_n_s_tensor, __pyx_k_tensor, sizeof(__pyx_k_tensor), 0, 0, 1, 1},
    {&__pyx_n_s_test, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1},
    {&__pyx_kp_u_the_variable_and_the_base_field, __pyx_k_the_variable_and_the_base_field, sizeof(__pyx_k_the_variable_and_the_base_field), 0, 1, 0, 0},
    {&__pyx_n_s_theta, __pyx_k_theta, sizeof(__pyx_k_theta), 0, 0, 1, 1},
    {&__pyx_n_s_timeout, __pyx_k_timeout, sizeof(__pyx_k_timeout), 0, 0, 1, 1},
    {&__pyx_n_b_true, __pyx_k_true, sizeof(__pyx_k_true), 0, 0, 0, 1},
    {&__pyx_n_s_update, __pyx_k_update, sizeof(__pyx_k_update), 0, 0, 1, 1},
    {&__pyx_n_s_use_setstate, __pyx_k_use_setstate, sizeof(__pyx_k_use_setstate), 0, 0, 1, 1},
    {&__pyx_kp_u_utf_8, __pyx_k_utf_8, sizeof(__pyx_k_utf_8), 0, 1, 0, 0},
    {&__pyx_n_s_var, __pyx_k_var, sizeof(__pyx_k_var), 0, 0, 1, 1},
    {&__pyx_n_s_variable, __pyx_k_variable, sizeof(__pyx_k_variable), 0, 0, 1, 1},
    {&__pyx_kp_u_variable_expected_for_q_found, __pyx_k_variable_expected_for_q_found, sizeof(__pyx_k_variable_expected_for_q_found), 0, 1, 0, 0},
    {&__pyx_n_s_vars, __pyx_k_vars, sizeof(__pyx_k_vars), 0, 0, 1, 1},
    {&__pyx_n_s_x, __pyx_k_x, sizeof(__pyx_k_x), 0, 0, 1, 1},
    {&__pyx_n_s_y, __pyx_k_y, sizeof(__pyx_k_y), 0, 0, 1, 1},
    {&__pyx_n_s_z, __pyx_k_z, sizeof(__pyx_k_z), 0, 0, 1, 1},
    {&__pyx_kp_u_z_d, __pyx_k_z_d, sizeof(__pyx_k_z_d), 0, 1, 0, 0},
    {&__pyx_n_s_zevdict, __pyx_k_zevdict, sizeof(__pyx_k_zevdict), 0, 0, 1, 1},
    {&__pyx_n_s_zstring, __pyx_k_zstring, sizeof(__pyx_k_zstring), 0, 0, 1, 1},
    {&__pyx_n_s_zsymb, __pyx_k_zsymb, sizeof(__pyx_k_zsymb), 0, 0, 1, 1},
    {&__pyx_n_s_zval, __pyx_k_zval, sizeof(__pyx_k_zval), 0, 0, 1, 1},
    {0, 0, 0, 0, 0, 0, 0}
  };
  return __Pyx_InitStrings(__pyx_string_tab);
}
/* #### Code section: cached_builtins ### */
static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(void) {
  __pyx_builtin_RuntimeError = __Pyx_GetBuiltinName(__pyx_n_s_RuntimeError); if (!__pyx_builtin_RuntimeError) __PYX_ERR(0, 348, __pyx_L1_error)
  __pyx_builtin_eval = __Pyx_GetBuiltinName(__pyx_n_s_eval); if (!__pyx_builtin_eval) __PYX_ERR(0, 557, __pyx_L1_error)
  __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) __PYX_ERR(0, 2481, __pyx_L1_error)
  __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s_TypeError); if (!__pyx_builtin_TypeError) __PYX_ERR(1, 2, __pyx_L1_error)
  __pyx_builtin_NotImplementedError = __Pyx_GetBuiltinName(__pyx_n_s_NotImplementedError); if (!__pyx_builtin_NotImplementedError) __PYX_ERR(2, 1420, __pyx_L1_error)
  return 0;
  __pyx_L1_error:;
  return -1;
}
/* #### Code section: cached_constants ### */

static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0);

  /* "../../bmi/sympy/DifferentialRing.pyx":354
 * # The dictionary to be used by eval
 *         subrankings = [sympy.IndexedBase(z) for z in \
 *                 ['lex', 'grlexA', 'grlexB', 'degrevlexA', 'degrevlexB']]             # <<<<<<<<<<<<<<
 *         pattern = re.compile (r'[\050]{0,1}([^\050\051]*).*[\133] *range')
 *         L = self.__listof_symbols ([derivations, blocks], \
 */
  __pyx_tuple__8 = PyTuple_Pack(5, __pyx_n_u_lex, __pyx_n_u_grlexA, __pyx_n_u_grlexB, __pyx_n_u_degrevlexA, __pyx_n_u_degrevlexB); if (unlikely(!__pyx_tuple__8)) __PYX_ERR(0, 354, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__8);
  __Pyx_GIVEREF(__pyx_tuple__8);

  /* "../../bmi/sympy/DifferentialRing.pyx":529
 *         strnot = self.__process_notation (notation)
 *         if variable != None and basefield != None:
 *             raise RuntimeError ('the variable and the base field must not be both specified')             # <<<<<<<<<<<<<<
 *         streqns = ascii (equation)
 *         if variable == None:
 */
  __pyx_tuple__10 = PyTuple_Pack(1, __pyx_kp_u_the_variable_and_the_base_field); if (unlikely(!__pyx_tuple__10)) __PYX_ERR(0, 529, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__10);
  __Pyx_GIVEREF(__pyx_tuple__10);

  /* "../../bmi/sympy/DifferentialRing.pyx":2454
 *         M = self.indets (selection = 'independent')
 *         if len(M) != 1 :
 *             raise RuntimeError ("ordinary differential ring expected")             # <<<<<<<<<<<<<<
 *         elif x is None :
 *             strx = ascii (M[0])
 */
  __pyx_tuple__34 = PyTuple_Pack(1, __pyx_kp_u_ordinary_differential_ring_expec); if (unlikely(!__pyx_tuple__34)) __PYX_ERR(0, 2454, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__34);
  __Pyx_GIVEREF(__pyx_tuple__34);

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":383
 *         dico = dict (
 *                 [
 *                         ('differential', 'differential'),             # <<<<<<<<<<<<<<
 *                         ('prime','prime'),
 *                         ('autoreduced','autoreduced'),
 */
  __pyx_tuple__42 = PyTuple_Pack(2, __pyx_n_u_differential, __pyx_n_u_differential); if (unlikely(!__pyx_tuple__42)) __PYX_ERR(2, 383, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__42);
  __Pyx_GIVEREF(__pyx_tuple__42);

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":384
 *                 [
 *                         ('differential', 'differential'),
 *                         ('prime','prime'),             # <<<<<<<<<<<<<<
 *                         ('autoreduced','autoreduced'),
 *                         ('squarefree','squarefree'),
 */
  __pyx_tuple__43 = PyTuple_Pack(2, __pyx_n_u_prime, __pyx_n_u_prime); if (unlikely(!__pyx_tuple__43)) __PYX_ERR(2, 384, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__43);
  __Pyx_GIVEREF(__pyx_tuple__43);

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":385
 *                         ('differential', 'differential'),
 *                         ('prime','prime'),
 *                         ('autoreduced','autoreduced'),             # <<<<<<<<<<<<<<
 *                         ('squarefree','squarefree'),
 *                         ('coherent','coherent'),
 */
  __pyx_tuple__44 = PyTuple_Pack(2, __pyx_n_u_autoreduced, __pyx_n_u_autoreduced); if (unlikely(!__pyx_tuple__44)) __PYX_ERR(2, 385, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__44);
  __Pyx_GIVEREF(__pyx_tuple__44);

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":386
 *                         ('prime','prime'),
 *                         ('autoreduced','autoreduced'),
 *                         ('squarefree','squarefree'),             # <<<<<<<<<<<<<<
 *                         ('coherent','coherent'),
 *                         ('primitive','primitive'),
 */
  __pyx_tuple__45 = PyTuple_Pack(2, __pyx_n_u_squarefree, __pyx_n_u_squarefree); if (unlikely(!__pyx_tuple__45)) __PYX_ERR(2, 386, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__45);
  __Pyx_GIVEREF(__pyx_tuple__45);

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":387
 *                         ('autoreduced','autoreduced'),
 *                         ('squarefree','squarefree'),
 *                         ('coherent','coherent'),             # <<<<<<<<<<<<<<
 *                         ('primitive','primitive'),
 *                         ('normalized','normalized')
 */
  __pyx_tuple__46 = PyTuple_Pack(2, __pyx_n_u_coherent, __pyx_n_u_coherent); if (unlikely(!__pyx_tuple__46)) __PYX_ERR(2, 387, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__46);
  __Pyx_GIVEREF(__pyx_tuple__46);

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":388
 *                         ('squarefree','squarefree'),
 *                         ('coherent','coherent'),
 *                         ('primitive','primitive'),             # <<<<<<<<<<<<<<
 *                         ('normalized','normalized')
 *                 ])
 */
  __pyx_tuple__47 = PyTuple_Pack(2, __pyx_n_u_primitive, __pyx_n_u_primitive); if (unlikely(!__pyx_tuple__47)) __PYX_ERR(2, 388, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__47);
  __Pyx_GIVEREF(__pyx_tuple__47);

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":389
 *                         ('coherent','coherent'),
 *                         ('primitive','primitive'),
 *                         ('normalized','normalized')             # <<<<<<<<<<<<<<
 *                 ])
 *         result = eval (A.value, dico)
 */
  __pyx_tuple__48 = PyTuple_Pack(2, __pyx_n_u_normalized, __pyx_n_u_normalized); if (unlikely(!__pyx_tuple__48)) __PYX_ERR(2, 389, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__48);
  __Pyx_GIVEREF(__pyx_tuple__48);

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":1420
 *         strnot = self.__process_notation (notation)
 *         if casesplit:
 *             raise NotImplementedError ('casesplit = True')             # <<<<<<<<<<<<<<
 *         if isinstance (equations, list):
 *             streqns = ascii (equations)
 */
  __pyx_tuple__63 = PyTuple_Pack(1, __pyx_kp_u_casesplit_True); if (unlikely(!__pyx_tuple__63)) __PYX_ERR(2, 1420, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__63);
  __Pyx_GIVEREF(__pyx_tuple__63);

  /* "../../bmi/sympy/BaseFieldExtension.pyx":235
 *         elif relations != None:
 *             if not isinstance (relations, RegularDifferentialChain):
 *                 raise TypeError ('RegularDifferentialChain expected for relations keyword parameter')             # <<<<<<<<<<<<<<
 *             self.rels_are_provided = True
 *             self.rels = relations
 */
  __pyx_tuple__74 = PyTuple_Pack(1, __pyx_kp_u_RegularDifferentialChain_expecte); if (unlikely(!__pyx_tuple__74)) __PYX_ERR(5, 235, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__74);
  __Pyx_GIVEREF(__pyx_tuple__74);

  /* "../../bmi/sympy/BaseFieldExtension.pyx":257
 *         elif ring != None:
 *             if not isinstance (ring, DifferentialRing):
 *                 raise TypeError ('DifferentialRing expected for ring keyword parameter')             # <<<<<<<<<<<<<<
 *             R = ring
 *             self.rels_are_provided = False
 */
  __pyx_tuple__75 = PyTuple_Pack(1, __pyx_kp_u_DifferentialRing_expected_for_ri); if (unlikely(!__pyx_tuple__75)) __PYX_ERR(5, 257, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__75);
  __Pyx_GIVEREF(__pyx_tuple__75);

  /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum not in (0x472eff0, 0x42c8ac3, 0x9bfe941):             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x472eff0, 0x42c8ac3, 0x9bfe941) = (evdict, gens, notation, rels, rels_are_provided))" % __pyx_checksum
 */
  __pyx_tuple__82 = PyTuple_Pack(3, __pyx_int_74641392, __pyx_int_70027971, __pyx_int_163572033); if (unlikely(!__pyx_tuple__82)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__82);
  __Pyx_GIVEREF(__pyx_tuple__82);

  /* "DifferentialAlgebra.pyx":659
 * from cpython cimport bool
 * 
 * def ascii (s) :             # <<<<<<<<<<<<<<
 *     if isinstance (s, bytes) :
 *         return s
 */
  __pyx_tuple__85 = PyTuple_Pack(1, __pyx_n_s_s); if (unlikely(!__pyx_tuple__85)) __PYX_ERR(4, 659, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__85);
  __Pyx_GIVEREF(__pyx_tuple__85);
  __pyx_codeobj__86 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__85, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_boulier_DifferentialAlgebr, __pyx_n_s_ascii, 659, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__86)) __PYX_ERR(4, 659, __pyx_L1_error)

  /* "DifferentialAlgebra.pyx":668
 * from sympy import var, Symbol, Derivative, Eq, Ne, Integer, Rational, oo, Add, Mul, Pow, degree
 * 
 * def function (s) :             # <<<<<<<<<<<<<<
 *     L = re.split (r'[, ]+', s)
 *     if len(L) == 1 :
 */
  __pyx_tuple__87 = PyTuple_Pack(3, __pyx_n_s_s, __pyx_n_s_L, __pyx_n_s_z); if (unlikely(!__pyx_tuple__87)) __PYX_ERR(4, 668, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__87);
  __Pyx_GIVEREF(__pyx_tuple__87);
  __pyx_codeobj__88 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__87, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_boulier_DifferentialAlgebr, __pyx_n_s_function, 668, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__88)) __PYX_ERR(4, 668, __pyx_L1_error)

  /* "DifferentialAlgebra.pyx":675
 *         return tuple ([sympy.Function(z) for z in L])
 * 
 * def indexedbase (s) :             # <<<<<<<<<<<<<<
 *     L = re.split (r'[, ]+', s)
 *     if len(L) == 1 :
 */
  __pyx_codeobj__89 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__87, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_boulier_DifferentialAlgebr, __pyx_n_s_indexedbase, 675, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__89)) __PYX_ERR(4, 675, __pyx_L1_error)

  /* "../../bmi/sympy/DifferentialRing.pyx":257
 * 
 * # __process_notation
 *     def __process_notation (self, notation) :             # <<<<<<<<<<<<<<
 *         cdef strnot
 *         if not isinstance (notation, str) :
 */
  __pyx_tuple__90 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_notation, __pyx_n_s_strnot); if (unlikely(!__pyx_tuple__90)) __PYX_ERR(0, 257, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__90);
  __Pyx_GIVEREF(__pyx_tuple__90);
  __pyx_codeobj__91 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__90, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_boulier_DifferentialAlgebr_2, __pyx_n_s_process_notation, 257, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__91)) __PYX_ERR(0, 257, __pyx_L1_error)

  /* "../../bmi/sympy/DifferentialRing.pyx":269
 * 
 * # __listof_symbols
 *     def __listof_symbols (self, expr, subrankings, pattern) :             # <<<<<<<<<<<<<<
 *         cdef L
 *         if expr is None :
 */
  __pyx_tuple__92 = PyTuple_Pack(12, __pyx_n_s_self, __pyx_n_s_expr, __pyx_n_s_subrankings, __pyx_n_s_pattern, __pyx_n_s_L, __pyx_n_s_e, __pyx_n_s_f, __pyx_n_s_e, __pyx_n_s_z, __pyx_n_s_e, __pyx_n_s_f, __pyx_n_s_e); if (unlikely(!__pyx_tuple__92)) __PYX_ERR(0, 269, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__92);
  __Pyx_GIVEREF(__pyx_tuple__92);
  __pyx_codeobj__93 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 12, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__92, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_boulier_DifferentialAlgebr_2, __pyx_n_s_listof_symbols, 269, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__93)) __PYX_ERR(0, 269, __pyx_L1_error)

  /* "../../bmi/sympy/DifferentialRing.pyx":370
 *         return 'differential_ring'
 * 
 *     def _latex (self):             # <<<<<<<<<<<<<<
 * #   The LaTeX representation
 *         return 'differential\\_ring'
 */
  __pyx_tuple__94 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__94)) __PYX_ERR(0, 370, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__94);
  __Pyx_GIVEREF(__pyx_tuple__94);
  __pyx_codeobj__95 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__94, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_boulier_DifferentialAlgebr_2, __pyx_n_s_latex, 370, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__95)) __PYX_ERR(0, 370, __pyx_L1_error)

  /* "../../bmi/sympy/DifferentialRing.pyx":375
 * 
 * # coeffs
 *     def coeffs (             # <<<<<<<<<<<<<<
 *             self,
 *             equation,
 */
  __pyx_tuple__96 = PyTuple_Pack(13, __pyx_n_s_self, __pyx_n_s_equation, __pyx_n_s_variable, __pyx_n_s_basefield, __pyx_n_s_notation, __pyx_n_s_result, __pyx_n_s_streqns, __pyx_n_s_strvar, __pyx_n_s_strgens, __pyx_n_s_strrels, __pyx_n_s_mesgerr, __pyx_n_s_A, __pyx_n_s_strnot); if (unlikely(!__pyx_tuple__96)) __PYX_ERR(0, 375, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__96);
  __Pyx_GIVEREF(__pyx_tuple__96);
  __pyx_codeobj__97 = (PyObject*)__Pyx_PyCode_New(5, 0, 0, 13, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__96, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_boulier_DifferentialAlgebr_2, __pyx_n_s_coeffs, 375, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__97)) __PYX_ERR(0, 375, __pyx_L1_error)

  /* "../../bmi/sympy/DifferentialRing.pyx":562
 * 
 * # equations
 *     def equations (             # <<<<<<<<<<<<<<
 *             self,
 *             equations,
 */
  __pyx_tuple__98 = PyTuple_Pack(11, __pyx_n_s_self, __pyx_n_s_equations, __pyx_n_s_solved, __pyx_n_s_selection, __pyx_n_s_notation, __pyx_n_s_result, __pyx_n_s_streqns, __pyx_n_s_strsel, __pyx_n_s_mesgerr, __pyx_n_s_A, __pyx_n_s_strnot); if (unlikely(!__pyx_tuple__98)) __PYX_ERR(0, 562, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__98);
  __Pyx_GIVEREF(__pyx_tuple__98);
  __pyx_codeobj__99 = (PyObject*)__Pyx_PyCode_New(5, 0, 0, 11, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__98, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_boulier_DifferentialAlgebr_2, __pyx_n_s_equations, 562, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__99)) __PYX_ERR(0, 562, __pyx_L1_error)

  /* "../../bmi/sympy/DifferentialRing.pyx":698
 * 
 * # __process_evdict
 *     def __process_evdict (             # <<<<<<<<<<<<<<
 *             self,
 *             evdict0) :
 */
  __pyx_tuple__100 = PyTuple_Pack(10, __pyx_n_s_self, __pyx_n_s_evdict0, __pyx_n_s_evdict, __pyx_n_s_key, __pyx_n_s_A, __pyx_n_s_mesgerr, __pyx_n_s_result, __pyx_n_s_newkey, __pyx_n_s_theta, __pyx_n_s_y); if (unlikely(!__pyx_tuple__100)) __PYX_ERR(0, 698, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__100);
  __Pyx_GIVEREF(__pyx_tuple__100);
  __pyx_codeobj__101 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 10, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__100, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_boulier_DifferentialAlgebr_2, __pyx_n_s_process_evdict, 698, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__101)) __PYX_ERR(0, 698, __pyx_L1_error)

  /* "../../bmi/sympy/DifferentialRing.pyx":741
 * 
 * # __evaluate
 *     def __evaluate (             # <<<<<<<<<<<<<<
 *             self,
 *             P,
 */
  __pyx_tuple__102 = PyTuple_Pack(13, __pyx_n_s_self, __pyx_n_s_P, __pyx_n_s_evdict, __pyx_n_s_newargs, __pyx_n_s_theta, __pyx_n_s_y, __pyx_n_s_result, __pyx_n_s_ders, __pyx_n_s_x, __pyx_n_s_d, __pyx_n_s_arg, __pyx_n_s_arg, __pyx_n_s_arg); if (unlikely(!__pyx_tuple__102)) __PYX_ERR(0, 741, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__102);
  __Pyx_GIVEREF(__pyx_tuple__102);
  __pyx_codeobj__103 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 13, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__102, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_boulier_DifferentialAlgebr_2, __pyx_n_s_evaluate_2, 741, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__103)) __PYX_ERR(0, 741, __pyx_L1_error)

  /* "../../bmi/sympy/DifferentialRing.pyx":779
 * 
 * # evaluate
 *     def evaluate (             # <<<<<<<<<<<<<<
 *             self,
 *             P,
 */
  __pyx_tuple__104 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_P, __pyx_n_s_evdict, __pyx_n_s_evdict1); if (unlikely(!__pyx_tuple__104)) __PYX_ERR(0, 779, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__104);
  __Pyx_GIVEREF(__pyx_tuple__104);
  __pyx_codeobj__105 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__104, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_boulier_DifferentialAlgebr_2, __pyx_n_s_evaluate, 779, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__105)) __PYX_ERR(0, 779, __pyx_L1_error)

  /* "../../bmi/sympy/DifferentialRing.pyx":880
 * 
 * # factor_derivative
 *     def factor_derivative (             # <<<<<<<<<<<<<<
 *             self,
 *             derivative,
 */
  __pyx_tuple__106 = PyTuple_Pack(8, __pyx_n_s_self, __pyx_n_s_derivative, __pyx_n_s_notation, __pyx_n_s_result, __pyx_n_s_strder, __pyx_n_s_mesgerr, __pyx_n_s_A, __pyx_n_s_strnot); if (unlikely(!__pyx_tuple__106)) __PYX_ERR(0, 880, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__106);
  __Pyx_GIVEREF(__pyx_tuple__106);
  __pyx_codeobj__107 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 8, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__106, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_boulier_DifferentialAlgebr_2, __pyx_n_s_factor_derivative, 880, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__107)) __PYX_ERR(0, 880, __pyx_L1_error)

  /* "../../bmi/sympy/DifferentialRing.pyx":963
 * 
 * # indets
 *     def indets (             # <<<<<<<<<<<<<<
 *                 self,
 *                 equations = None,
 */
  __pyx_tuple__108 = PyTuple_Pack(12, __pyx_n_s_self, __pyx_n_s_equations, __pyx_n_s_selection, __pyx_n_s_derivation, __pyx_n_s_notation, __pyx_n_s_result, __pyx_n_s_streqns, __pyx_n_s_strder, __pyx_n_s_strsel, __pyx_n_s_mesgerr, __pyx_n_s_L, __pyx_n_s_strnot); if (unlikely(!__pyx_tuple__108)) __PYX_ERR(0, 963, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__108);
  __Pyx_GIVEREF(__pyx_tuple__108);
  __pyx_codeobj__109 = (PyObject*)__Pyx_PyCode_New(5, 0, 0, 12, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__108, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_boulier_DifferentialAlgebr_2, __pyx_n_s_indets, 963, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__109)) __PYX_ERR(0, 963, __pyx_L1_error)

  /* "../../bmi/sympy/DifferentialRing.pyx":1063
 * 
 * # is_differential_fraction
 *     def is_differential_fraction (             # <<<<<<<<<<<<<<
 *             self,
 *             equations,
 */
  __pyx_tuple__110 = PyTuple_Pack(8, __pyx_n_s_self, __pyx_n_s_equations, __pyx_n_s_notation, __pyx_n_s_result, __pyx_n_s_streqns, __pyx_n_s_strders, __pyx_n_s_A, __pyx_n_s_strnot); if (unlikely(!__pyx_tuple__110)) __PYX_ERR(0, 1063, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__110);
  __Pyx_GIVEREF(__pyx_tuple__110);
  __pyx_codeobj__111 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 8, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__110, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_boulier_DifferentialAlgebr_2, __pyx_n_s_is_differential_fraction, 1063, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__111)) __PYX_ERR(0, 1063, __pyx_L1_error)

  /* "../../bmi/sympy/DifferentialRing.pyx":1111
 * 
 * # is_constant
 *     def is_constant (             # <<<<<<<<<<<<<<
 *             self,
 *             ratfrac,
 */
  __pyx_tuple__112 = PyTuple_Pack(10, __pyx_n_s_self, __pyx_n_s_ratfrac, __pyx_n_s_derivation, __pyx_n_s_notation, __pyx_n_s_result, __pyx_n_s_streqns, __pyx_n_s_strder, __pyx_n_s_mesgerr, __pyx_n_s_A, __pyx_n_s_strnot); if (unlikely(!__pyx_tuple__112)) __PYX_ERR(0, 1111, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__112);
  __Pyx_GIVEREF(__pyx_tuple__112);
  __pyx_codeobj__113 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 10, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__112, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_boulier_DifferentialAlgebr_2, __pyx_n_s_is_constant, 1111, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__113)) __PYX_ERR(0, 1111, __pyx_L1_error)

  /* "../../bmi/sympy/DifferentialRing.pyx":1173
 * 
 * # leading_derivative
 *     def leading_derivative (             # <<<<<<<<<<<<<<
 *             self,
 *             equations,
 */
  __pyx_tuple__114 = PyTuple_Pack(8, __pyx_n_s_self, __pyx_n_s_equations, __pyx_n_s_notation, __pyx_n_s_result, __pyx_n_s_streqns, __pyx_n_s_mesgerr, __pyx_n_s_A, __pyx_n_s_strnot); if (unlikely(!__pyx_tuple__114)) __PYX_ERR(0, 1173, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__114);
  __Pyx_GIVEREF(__pyx_tuple__114);
  __pyx_codeobj__115 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 8, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__114, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_boulier_DifferentialAlgebr_2, __pyx_n_s_leading_derivative, 1173, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__115)) __PYX_ERR(0, 1173, __pyx_L1_error)

  /* "../../bmi/sympy/DifferentialRing.pyx":1239
 * 
 * # leading_rank
 *     def leading_rank (             # <<<<<<<<<<<<<<
 *             self,
 *             equations,
 */
  __pyx_tuple__116 = PyTuple_Pack(9, __pyx_n_s_self, __pyx_n_s_equations, __pyx_n_s_listform, __pyx_n_s_notation, __pyx_n_s_result, __pyx_n_s_streqns, __pyx_n_s_mesgerr, __pyx_n_s_A, __pyx_n_s_strnot); if (unlikely(!__pyx_tuple__116)) __PYX_ERR(0, 1239, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__116);
  __Pyx_GIVEREF(__pyx_tuple__116);
  __pyx_codeobj__117 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 9, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__116, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_boulier_DifferentialAlgebr_2, __pyx_n_s_leading_rank, 1239, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__117)) __PYX_ERR(0, 1239, __pyx_L1_error)

  /* "../../bmi/sympy/DifferentialRing.pyx":1335
 * 
 * # initial
 *     def initial (             # <<<<<<<<<<<<<<
 *             self,
 *             equations,
 */
  __pyx_tuple__118 = PyTuple_Pack(9, __pyx_n_s_self, __pyx_n_s_equations, __pyx_n_s_notation, __pyx_n_s_result, __pyx_n_s_streqns, __pyx_n_s_strvar, __pyx_n_s_mesgerr, __pyx_n_s_A, __pyx_n_s_strnot); if (unlikely(!__pyx_tuple__118)) __PYX_ERR(0, 1335, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__118);
  __Pyx_GIVEREF(__pyx_tuple__118);
  __pyx_codeobj__119 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 9, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__118, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_boulier_DifferentialAlgebr_2, __pyx_n_s_initial, 1335, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__119)) __PYX_ERR(0, 1335, __pyx_L1_error)

  /* "../../bmi/sympy/DifferentialRing.pyx":1408
 * 
 * # leading_coefficient
 *     def leading_coefficient (             # <<<<<<<<<<<<<<
 *             self,
 *             equations,
 */
  __pyx_tuple__120 = PyTuple_Pack(10, __pyx_n_s_self, __pyx_n_s_equations, __pyx_n_s_variable, __pyx_n_s_notation, __pyx_n_s_result, __pyx_n_s_streqns, __pyx_n_s_strvar, __pyx_n_s_mesgerr, __pyx_n_s_A, __pyx_n_s_strnot); if (unlikely(!__pyx_tuple__120)) __PYX_ERR(0, 1408, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__120);
  __Pyx_GIVEREF(__pyx_tuple__120);
  __pyx_codeobj__121 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 10, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__120, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_boulier_DifferentialAlgebr_2, __pyx_n_s_leading_coefficient, 1408, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__121)) __PYX_ERR(0, 1408, __pyx_L1_error)

  /* "../../bmi/sympy/DifferentialRing.pyx":1513
 * 
 * # tail
 *     def tail (             # <<<<<<<<<<<<<<
 *             self,
 *             equations,
 */
  __pyx_codeobj__122 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 10, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__120, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_boulier_DifferentialAlgebr_2, __pyx_n_s_tail, 1513, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__122)) __PYX_ERR(0, 1513, __pyx_L1_error)

  /* "../../bmi/sympy/DifferentialRing.pyx":1635
 * 
 * # separant
 *     def separant (             # <<<<<<<<<<<<<<
 *             self,
 *             equations,
 */
  __pyx_codeobj__123 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 10, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__120, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_boulier_DifferentialAlgebr_2, __pyx_n_s_separant, 1635, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__123)) __PYX_ERR(0, 1635, __pyx_L1_error)

  /* "../../bmi/sympy/DifferentialRing.pyx":1735
 * 
 * # integrate
 *     def integrate (             # <<<<<<<<<<<<<<
 *             self,
 *             equations,
 */
  __pyx_tuple__124 = PyTuple_Pack(11, __pyx_n_s_self, __pyx_n_s_equations, __pyx_n_s_variable, __pyx_n_s_iterated, __pyx_n_s_notation, __pyx_n_s_result, __pyx_n_s_streqns, __pyx_n_s_strvar, __pyx_n_s_mesgerr, __pyx_n_s_A, __pyx_n_s_strnot); if (unlikely(!__pyx_tuple__124)) __PYX_ERR(0, 1735, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__124);
  __Pyx_GIVEREF(__pyx_tuple__124);
  __pyx_codeobj__125 = (PyObject*)__Pyx_PyCode_New(5, 0, 0, 11, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__124, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_boulier_DifferentialAlgebr_2, __pyx_n_s_integrate, 1735, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__125)) __PYX_ERR(0, 1735, __pyx_L1_error)

  /* "../../bmi/sympy/DifferentialRing.pyx":1854
 * 
 * # differentiate
 *     def differentiate (             # <<<<<<<<<<<<<<
 *             self,
 *             equations,
 */
  __pyx_tuple__126 = PyTuple_Pack(11, __pyx_n_s_self, __pyx_n_s_equations, __pyx_n_s_notation, __pyx_n_s_args, __pyx_n_s_result, __pyx_n_s_streqns, __pyx_n_s_strders, __pyx_n_s_mesgerr, __pyx_n_s_A, __pyx_n_s_strnot, __pyx_n_s_arg); if (unlikely(!__pyx_tuple__126)) __PYX_ERR(0, 1854, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__126);
  __Pyx_GIVEREF(__pyx_tuple__126);
  __pyx_codeobj__127 = (PyObject*)__Pyx_PyCode_New(2, 0, 1, 11, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__126, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_boulier_DifferentialAlgebr_2, __pyx_n_s_differentiate, 1854, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__127)) __PYX_ERR(0, 1854, __pyx_L1_error)

  /* "../../bmi/sympy/DifferentialRing.pyx":1936
 * 
 * # differential_prem
 *     def differential_prem (             # <<<<<<<<<<<<<<
 *              self,
 *              polynomial,
 */
  __pyx_tuple__128 = PyTuple_Pack(12, __pyx_n_s_self, __pyx_n_s_polynomial, __pyx_n_s_redset, __pyx_n_s_mode, __pyx_n_s_notation, __pyx_n_s_result, __pyx_n_s_streqns, __pyx_n_s_strredset, __pyx_n_s_mesgerr, __pyx_n_s_strmode, __pyx_n_s_L, __pyx_n_s_strnot); if (unlikely(!__pyx_tuple__128)) __PYX_ERR(0, 1936, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__128);
  __Pyx_GIVEREF(__pyx_tuple__128);
  __pyx_codeobj__129 = (PyObject*)__Pyx_PyCode_New(5, 0, 0, 12, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__128, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_boulier_DifferentialAlgebr_2, __pyx_n_s_differential_prem, 1936, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__129)) __PYX_ERR(0, 1936, __pyx_L1_error)

  /* "../../bmi/sympy/DifferentialRing.pyx":2067
 * 
 * # normal_form
 *     def normal_form (             # <<<<<<<<<<<<<<
 *             self,
 *             equations,
 */
  __pyx_tuple__130 = PyTuple_Pack(10, __pyx_n_s_self, __pyx_n_s_equations, __pyx_n_s_notation, __pyx_n_s_result, __pyx_n_s_arg, __pyx_n_s_streqns, __pyx_n_s_strders, __pyx_n_s_mesgerr, __pyx_n_s_A, __pyx_n_s_strnot); if (unlikely(!__pyx_tuple__130)) __PYX_ERR(0, 2067, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__130);
  __Pyx_GIVEREF(__pyx_tuple__130);
  __pyx_codeobj__131 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 10, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__130, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_boulier_DifferentialAlgebr_2, __pyx_n_s_normal_form, 2067, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__131)) __PYX_ERR(0, 2067, __pyx_L1_error)

  /* "../../bmi/sympy/DifferentialRing.pyx":2161
 * 
 * # sort
 *     def sort (             # <<<<<<<<<<<<<<
 *             self,
 *             list polynomials,
 */
  __pyx_tuple__132 = PyTuple_Pack(10, __pyx_n_s_self, __pyx_n_s_polynomials, __pyx_n_s_mode, __pyx_n_s_notation, __pyx_n_s_result, __pyx_n_s_streqns, __pyx_n_s_mesgerr, __pyx_n_s_strmode, __pyx_n_s_L, __pyx_n_s_strnot); if (unlikely(!__pyx_tuple__132)) __PYX_ERR(0, 2161, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__132);
  __Pyx_GIVEREF(__pyx_tuple__132);
  __pyx_codeobj__133 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 10, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__132, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_boulier_DifferentialAlgebr_2, __pyx_n_s_sort, 2161, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__133)) __PYX_ERR(0, 2161, __pyx_L1_error)

  /* "../../bmi/sympy/DifferentialRing.pyx":2252
 * 
 * # DenefLipshitz
 *     def DenefLipshitz (             # <<<<<<<<<<<<<<
 *             self,
 *             equations,
 */
  __pyx_tuple__134 = PyTuple_Pack(32, __pyx_n_s_self, __pyx_n_s_equations, __pyx_n_s_Y, __pyx_n_s_Ybar, __pyx_n_s_q, __pyx_n_s_x, __pyx_n_s_attributes, __pyx_n_s_control, __pyx_n_s_notation, __pyx_n_s_timeout, __pyx_n_s_memout, __pyx_n_s_result, __pyx_n_s_eqns, __pyx_n_s_ineq, __pyx_n_s_M, __pyx_n_s_U, __pyx_n_s_C, __pyx_n_s_L, __pyx_n_s_L1, __pyx_n_s_L2, __pyx_n_s_L3, __pyx_n_s_mesgerr, __pyx_n_s_streqns, __pyx_n_s_strineq, __pyx_n_s_strattr, __pyx_n_s_strY, __pyx_n_s_strYbar, __pyx_n_s_strq, __pyx_n_s_strx, __pyx_n_s_strcontrol, __pyx_n_s_strnot, __pyx_n_s_i); if (unlikely(!__pyx_tuple__134)) __PYX_ERR(0, 2252, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__134);
  __Pyx_GIVEREF(__pyx_tuple__134);
  __pyx_codeobj__135 = (PyObject*)__Pyx_PyCode_New(11, 0, 0, 32, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__134, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_boulier_DifferentialAlgebr_2, __pyx_n_s_DenefLipshitz, 2252, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__135)) __PYX_ERR(0, 2252, __pyx_L1_error)

  /* "../../bmi/sympy/DifferentialRing.pyx":2523
 * 
 * # RosenfeldGroebner
 *     def RosenfeldGroebner (             # <<<<<<<<<<<<<<
 *             self,
 *             equations,
 */
  __pyx_tuple__136 = PyTuple_Pack(25, __pyx_n_s_self, __pyx_n_s_equations, __pyx_n_s_basefield, __pyx_n_s_attributes, __pyx_n_s_singsol, __pyx_n_s_dimlb, __pyx_n_s_notation, __pyx_n_s_timeout, __pyx_n_s_memout, __pyx_n_s_result, __pyx_n_s_eqns, __pyx_n_s_ineq, __pyx_n_s_F, __pyx_n_s_C, __pyx_n_s_L, __pyx_n_s_mesgerr, __pyx_n_s_streqns, __pyx_n_s_strineq, __pyx_n_s_strgens, __pyx_n_s_strrels, __pyx_n_s_strattr, __pyx_n_s_strsingsol, __pyx_n_s_strdimlb, __pyx_n_s_strnot, __pyx_n_s_i); if (unlikely(!__pyx_tuple__136)) __PYX_ERR(0, 2523, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__136);
  __Pyx_GIVEREF(__pyx_tuple__136);
  __pyx_codeobj__137 = (PyObject*)__Pyx_PyCode_New(9, 0, 0, 25, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__136, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_boulier_DifferentialAlgebr_2, __pyx_n_s_RosenfeldGroebner, 2523, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__137)) __PYX_ERR(0, 2523, __pyx_L1_error)

  /* "../../bmi/sympy/DifferentialRing.pyx":2777
 * 
 * # _process_equations
 *     def _process_equations (self, list L, strnot):             # <<<<<<<<<<<<<<
 *         r"""
 *         Split a list into equations and inequations
 */
  __pyx_tuple__138 = PyTuple_Pack(8, __pyx_n_s_self, __pyx_n_s_L, __pyx_n_s_strnot, __pyx_n_s_P, __pyx_n_s_L_as_string, __pyx_n_s_mesgerr, __pyx_n_s_eqns, __pyx_n_s_ineq); if (unlikely(!__pyx_tuple__138)) __PYX_ERR(0, 2777, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__138);
  __Pyx_GIVEREF(__pyx_tuple__138);
  __pyx_codeobj__139 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 8, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__138, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_boulier_DifferentialAlgebr_2, __pyx_n_s_process_equations, 2777, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__139)) __PYX_ERR(0, 2777, __pyx_L1_error)

  /* "../../bmi/sympy/DifferentialRing.pyx":2820
 * 
 * # _ranking
 *     def _ranking (self):             # <<<<<<<<<<<<<<
 *         r"""
 *         The ranking of a DifferentialRing
 */
  __pyx_tuple__140 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_result, __pyx_n_s_mesgerr, __pyx_n_s_L); if (unlikely(!__pyx_tuple__140)) __PYX_ERR(0, 2820, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__140);
  __Pyx_GIVEREF(__pyx_tuple__140);
  __pyx_codeobj__141 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__140, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_boulier_DifferentialAlgebr_2, __pyx_n_s_ranking, 2820, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__141)) __PYX_ERR(0, 2820, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "self.dring cannot be converted to a Python object for pickling"
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_codeobj__142 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__94, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__142)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "self.dring cannot be converted to a Python object for pickling"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "self.dring cannot be converted to a Python object for pickling"
 */
  __pyx_tuple__143 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__143)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__143);
  __Pyx_GIVEREF(__pyx_tuple__143);
  __pyx_codeobj__144 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__143, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__144)) __PYX_ERR(1, 3, __pyx_L1_error)

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":77
 * 
 * # __process_notation
 *     def __process_notation (self, notation) :             # <<<<<<<<<<<<<<
 *         cdef strnot
 *         if not isinstance (notation, str) :
 */
  __pyx_codeobj__145 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__90, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_boulier_DifferentialAlgebr_3, __pyx_n_s_process_notation, 77, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__145)) __PYX_ERR(2, 77, __pyx_L1_error)

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":170
 *         return 'regular_differential_chain'
 * 
 *     def _latex_ (self):             # <<<<<<<<<<<<<<
 * #   The LaTeX representation
 *         return 'regular\\_differential\\_chain'
 */
  __pyx_codeobj__146 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__94, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_boulier_DifferentialAlgebr_3, __pyx_n_s_latex_2, 170, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__146)) __PYX_ERR(2, 170, __pyx_L1_error)

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":175
 * 
 * # differential_ring
 *     def differential_ring (self):             # <<<<<<<<<<<<<<
 *         r"""
 *         The embedding differential ring of a regular differential chain
 */
  __pyx_codeobj__147 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__94, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_boulier_DifferentialAlgebr_3, __pyx_n_s_differential_ring, 175, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__147)) __PYX_ERR(2, 175, __pyx_L1_error)

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":212
 * 
 * # equations
 *     def equations (             # <<<<<<<<<<<<<<
 *             self,
 *             bool solved = False,
 */
  __pyx_tuple__148 = PyTuple_Pack(9, __pyx_n_s_self, __pyx_n_s_solved, __pyx_n_s_selection, __pyx_n_s_notation, __pyx_n_s_result, __pyx_n_s_strsel, __pyx_n_s_mesgerr, __pyx_n_s_A, __pyx_n_s_strnot); if (unlikely(!__pyx_tuple__148)) __PYX_ERR(2, 212, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__148);
  __Pyx_GIVEREF(__pyx_tuple__148);
  __pyx_codeobj__149 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 9, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__148, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_boulier_DifferentialAlgebr_3, __pyx_n_s_equations, 212, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__149)) __PYX_ERR(2, 212, __pyx_L1_error)

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":339
 * 
 * # attributes
 *     def attributes (self):             # <<<<<<<<<<<<<<
 *         r"""
 *         The list of attributes of a RegularDifferentialChain
 */
  __pyx_tuple__150 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_result, __pyx_n_s_mesgerr, __pyx_n_s_dico, __pyx_n_s_A); if (unlikely(!__pyx_tuple__150)) __PYX_ERR(2, 339, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__150);
  __Pyx_GIVEREF(__pyx_tuple__150);
  __pyx_codeobj__151 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__150, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_boulier_DifferentialAlgebr_3, __pyx_n_s_attributes, 339, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__151)) __PYX_ERR(2, 339, __pyx_L1_error)

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":396
 * 
 * # leading_derivative
 *     def leading_derivative (             # <<<<<<<<<<<<<<
 *             self,
 *             bool fullset = False,
 */
  __pyx_tuple__152 = PyTuple_Pack(8, __pyx_n_s_self, __pyx_n_s_fullset, __pyx_n_s_notation, __pyx_n_s_result, __pyx_n_s_streqns, __pyx_n_s_mesgerr, __pyx_n_s_A, __pyx_n_s_strnot); if (unlikely(!__pyx_tuple__152)) __PYX_ERR(2, 396, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__152);
  __Pyx_GIVEREF(__pyx_tuple__152);
  __pyx_codeobj__153 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 8, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__152, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_boulier_DifferentialAlgebr_3, __pyx_n_s_leading_derivative, 396, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__153)) __PYX_ERR(2, 396, __pyx_L1_error)

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":452
 * 
 * # leading_rank
 *     def leading_rank (             # <<<<<<<<<<<<<<
 *             self,
 *             bool fullset = False,
 */
  __pyx_tuple__154 = PyTuple_Pack(9, __pyx_n_s_self, __pyx_n_s_fullset, __pyx_n_s_listform, __pyx_n_s_notation, __pyx_n_s_result, __pyx_n_s_streqns, __pyx_n_s_mesgerr, __pyx_n_s_A, __pyx_n_s_strnot); if (unlikely(!__pyx_tuple__154)) __PYX_ERR(2, 452, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__154);
  __Pyx_GIVEREF(__pyx_tuple__154);
  __pyx_codeobj__155 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 9, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__154, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_boulier_DifferentialAlgebr_3, __pyx_n_s_leading_rank, 452, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__155)) __PYX_ERR(2, 452, __pyx_L1_error)

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":514
 * 
 * # initial
 *     def initial (             # <<<<<<<<<<<<<<
 *             self,
 *             bool fullset = False,
 */
  __pyx_tuple__156 = PyTuple_Pack(9, __pyx_n_s_self, __pyx_n_s_fullset, __pyx_n_s_notation, __pyx_n_s_result, __pyx_n_s_streqns, __pyx_n_s_strvar, __pyx_n_s_mesgerr, __pyx_n_s_A, __pyx_n_s_strnot); if (unlikely(!__pyx_tuple__156)) __PYX_ERR(2, 514, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__156);
  __Pyx_GIVEREF(__pyx_tuple__156);
  __pyx_codeobj__157 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 9, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__156, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_boulier_DifferentialAlgebr_3, __pyx_n_s_initial, 514, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__157)) __PYX_ERR(2, 514, __pyx_L1_error)

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":572
 * 
 * # leading_coefficient
 *     def leading_coefficient (             # <<<<<<<<<<<<<<
 *             self,
 *             variable = None,
 */
  __pyx_tuple__158 = PyTuple_Pack(10, __pyx_n_s_self, __pyx_n_s_variable, __pyx_n_s_fullset, __pyx_n_s_notation, __pyx_n_s_result, __pyx_n_s_streqns, __pyx_n_s_strvar, __pyx_n_s_mesgerr, __pyx_n_s_A, __pyx_n_s_strnot); if (unlikely(!__pyx_tuple__158)) __PYX_ERR(2, 572, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__158);
  __Pyx_GIVEREF(__pyx_tuple__158);
  __pyx_codeobj__159 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 10, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__158, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_boulier_DifferentialAlgebr_3, __pyx_n_s_leading_coefficient, 572, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__159)) __PYX_ERR(2, 572, __pyx_L1_error)

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":646
 * 
 * # tail
 *     def tail (             # <<<<<<<<<<<<<<
 *             self,
 *             variable = None,
 */
  __pyx_codeobj__160 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 10, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__158, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_boulier_DifferentialAlgebr_3, __pyx_n_s_tail, 646, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__160)) __PYX_ERR(2, 646, __pyx_L1_error)

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":721
 * 
 * # separant
 *     def separant (             # <<<<<<<<<<<<<<
 *             self,
 *             variable = None,
 */
  __pyx_codeobj__161 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 10, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__158, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_boulier_DifferentialAlgebr_3, __pyx_n_s_separant, 721, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__161)) __PYX_ERR(2, 721, __pyx_L1_error)

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":796
 * 
 * # indets
 *     def indets (             # <<<<<<<<<<<<<<
 *                 self,
 *                 selection = BMI_IX_derivs,
 */
  __pyx_tuple__162 = PyTuple_Pack(11, __pyx_n_s_self, __pyx_n_s_selection, __pyx_n_s_fullset, __pyx_n_s_notation, __pyx_n_s_result, __pyx_n_s_streqns, __pyx_n_s_strfull, __pyx_n_s_mesgerr, __pyx_n_s_strsel, __pyx_n_s_L, __pyx_n_s_strnot); if (unlikely(!__pyx_tuple__162)) __PYX_ERR(2, 796, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__162);
  __Pyx_GIVEREF(__pyx_tuple__162);
  __pyx_codeobj__163 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 11, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__162, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_boulier_DifferentialAlgebr_3, __pyx_n_s_indets, 796, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__163)) __PYX_ERR(2, 796, __pyx_L1_error)

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":885
 * 
 * # differential_prem
 *     def differential_prem (             # <<<<<<<<<<<<<<
 *              self,
 *              polynomial,
 */
  __pyx_tuple__164 = PyTuple_Pack(10, __pyx_n_s_self, __pyx_n_s_polynomial, __pyx_n_s_mode, __pyx_n_s_notation, __pyx_n_s_result, __pyx_n_s_streqns, __pyx_n_s_mesgerr, __pyx_n_s_strmode, __pyx_n_s_L, __pyx_n_s_strnot); if (unlikely(!__pyx_tuple__164)) __PYX_ERR(2, 885, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__164);
  __Pyx_GIVEREF(__pyx_tuple__164);
  __pyx_codeobj__165 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 10, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__164, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_boulier_DifferentialAlgebr_3, __pyx_n_s_differential_prem, 885, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__165)) __PYX_ERR(2, 885, __pyx_L1_error)

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":1022
 * 
 * # prem
 *     def prem (             # <<<<<<<<<<<<<<
 *             self,
 *             ratfrac,
 */
  __pyx_tuple__166 = PyTuple_Pack(10, __pyx_n_s_self, __pyx_n_s_ratfrac, __pyx_n_s_notation, __pyx_n_s_timeout, __pyx_n_s_memout, __pyx_n_s_result, __pyx_n_s_streqns, __pyx_n_s_mesgerr, __pyx_n_s_L, __pyx_n_s_strnot); if (unlikely(!__pyx_tuple__166)) __PYX_ERR(2, 1022, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__166);
  __Pyx_GIVEREF(__pyx_tuple__166);
  __pyx_codeobj__167 = (PyObject*)__Pyx_PyCode_New(5, 0, 0, 10, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__166, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_boulier_DifferentialAlgebr_3, __pyx_n_s_prem, 1022, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__167)) __PYX_ERR(2, 1022, __pyx_L1_error)

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":1111
 * 
 * # resultant
 *     def resultant (             # <<<<<<<<<<<<<<
 *             self,
 *             ratfrac,
 */
  __pyx_codeobj__168 = (PyObject*)__Pyx_PyCode_New(5, 0, 0, 10, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__166, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_boulier_DifferentialAlgebr_3, __pyx_n_s_resultant, 1111, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__168)) __PYX_ERR(2, 1111, __pyx_L1_error)

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":1211
 * # change_ranking
 * # pardi
 *     def change_ranking (             # <<<<<<<<<<<<<<
 *             self,
 *             DifferentialRing R = None,
 */
  __pyx_tuple__169 = PyTuple_Pack(11, __pyx_n_s_self, __pyx_n_s_R, __pyx_n_s_prime, __pyx_n_s_notation, __pyx_n_s_timeout, __pyx_n_s_memout, __pyx_n_s_L, __pyx_n_s_mesgerr, __pyx_n_s_ranking_2, __pyx_n_s_C, __pyx_n_s_strnot); if (unlikely(!__pyx_tuple__169)) __PYX_ERR(2, 1211, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__169);
  __Pyx_GIVEREF(__pyx_tuple__169);
  __pyx_codeobj__170 = (PyObject*)__Pyx_PyCode_New(6, 0, 0, 11, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__169, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_boulier_DifferentialAlgebr_3, __pyx_n_s_change_ranking, 1211, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__170)) __PYX_ERR(2, 1211, __pyx_L1_error)

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":1331
 * 
 * # normal_form
 *     def normal_form (             # <<<<<<<<<<<<<<
 *             self,
 *             equations,
 */
  __pyx_tuple__171 = PyTuple_Pack(11, __pyx_n_s_self, __pyx_n_s_equations, __pyx_n_s_casesplit, __pyx_n_s_notation, __pyx_n_s_result, __pyx_n_s_elt, __pyx_n_s_streqns, __pyx_n_s_mesgerr, __pyx_n_s_A, __pyx_n_s_strnot, __pyx_n_s_elt); if (unlikely(!__pyx_tuple__171)) __PYX_ERR(2, 1331, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__171);
  __Pyx_GIVEREF(__pyx_tuple__171);
  __pyx_codeobj__172 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 11, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__171, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_boulier_DifferentialAlgebr_3, __pyx_n_s_normal_form, 1331, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__172)) __PYX_ERR(2, 1331, __pyx_L1_error)

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":1440
 * 
 * # preparation_equation
 *     def preparation_equation (             # <<<<<<<<<<<<<<
 *             self,
 *             polynomial,
 */
  __pyx_tuple__173 = PyTuple_Pack(21, __pyx_n_s_self, __pyx_n_s_polynomial, __pyx_n_s_basefield, __pyx_n_s_congruence, __pyx_n_s_zstring, __pyx_n_s_notation, __pyx_n_s_result, __pyx_n_s_nbz, __pyx_n_s_i, __pyx_n_s_zevdict, __pyx_n_s_zsymb, __pyx_n_s_zval, __pyx_n_s_mesgerr, __pyx_n_s_strpoly, __pyx_n_s_strgens, __pyx_n_s_strrels, __pyx_n_s_newval, __pyx_n_s_strzstring, __pyx_n_s_A, __pyx_n_s_strnot, __pyx_n_s_F); if (unlikely(!__pyx_tuple__173)) __PYX_ERR(2, 1440, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__173);
  __Pyx_GIVEREF(__pyx_tuple__173);
  __pyx_codeobj__174 = (PyObject*)__Pyx_PyCode_New(6, 0, 0, 21, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__173, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_boulier_DifferentialAlgebr_3, __pyx_n_s_preparation_equation, 1440, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__174)) __PYX_ERR(2, 1440, __pyx_L1_error)

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":1711
 * 
 * # __number_of_equations
 *     def __number_of_equations (self):             # <<<<<<<<<<<<<<
 *         r"""
 *         The number of equations of a regular differential chain
 */
  __pyx_tuple__175 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_A, __pyx_n_s_mesgerr, __pyx_n_s_result); if (unlikely(!__pyx_tuple__175)) __PYX_ERR(2, 1711, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__175);
  __Pyx_GIVEREF(__pyx_tuple__175);
  __pyx_codeobj__176 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__175, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_boulier_DifferentialAlgebr_3, __pyx_n_s_number_of_equations, 1711, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__176)) __PYX_ERR(2, 1711, __pyx_L1_error)

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":1753
 * 
 * # RosenfeldGroebner
 *     def RosenfeldGroebner (             # <<<<<<<<<<<<<<
 *             self,
 *             equations,
 */
  __pyx_codeobj__177 = (PyObject*)__Pyx_PyCode_New(9, 0, 0, 25, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__136, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_boulier_DifferentialAlgebr_3, __pyx_n_s_RosenfeldGroebner, 1753, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__177)) __PYX_ERR(2, 1753, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "self.regchain cannot be converted to a Python object for pickling"
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_codeobj__178 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__94, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__178)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "self.regchain cannot be converted to a Python object for pickling"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "self.regchain cannot be converted to a Python object for pickling"
 */
  __pyx_codeobj__179 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__143, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__179)) __PYX_ERR(1, 3, __pyx_L1_error)

  /* "../../bmi/sympy/BaseFieldExtension.pyx":168
 * 
 * # __process_notation
 *     def __process_notation (self, notation) :             # <<<<<<<<<<<<<<
 *         cdef strnot
 *         if not isinstance (notation, str) :
 */
  __pyx_codeobj__180 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__90, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_boulier_DifferentialAlgebr_4, __pyx_n_s_process_notation, 168, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__180)) __PYX_ERR(5, 168, __pyx_L1_error)

  /* "../../bmi/sympy/BaseFieldExtension.pyx":283
 *         return 'differential_field'
 * 
 *     def _latex_ (self):             # <<<<<<<<<<<<<<
 * #   The LaTeX representation
 *         return 'differential\\_field'
 */
  __pyx_codeobj__181 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__94, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_boulier_DifferentialAlgebr_4, __pyx_n_s_latex_2, 283, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__181)) __PYX_ERR(5, 283, __pyx_L1_error)

  /* "../../bmi/sympy/BaseFieldExtension.pyx":287
 *         return 'differential\\_field'
 * # generators
 *     def generators (self):             # <<<<<<<<<<<<<<
 *         r"""
 *         The list of generators of a base field extension
 */
  __pyx_codeobj__182 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__94, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_boulier_DifferentialAlgebr_4, __pyx_n_s_generators, 287, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__182)) __PYX_ERR(5, 287, __pyx_L1_error)

  /* "../../bmi/sympy/BaseFieldExtension.pyx":316
 *         return self.gens
 * # relations
 *     def relations (self):             # <<<<<<<<<<<<<<
 *         r"""
 *         The regular differential chain defining the relations of a
 */
  __pyx_codeobj__183 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__94, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_boulier_DifferentialAlgebr_4, __pyx_n_s_relations_2, 316, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__183)) __PYX_ERR(5, 316, __pyx_L1_error)

  /* "../../bmi/sympy/BaseFieldExtension.pyx":353
 * 
 * # _relations
 *     def _relations (self):             # <<<<<<<<<<<<<<
 *         r"""
 *         The relations in a BMI compatible format, as a string
 */
  __pyx_tuple__184 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_strrels, __pyx_n_s_strattr); if (unlikely(!__pyx_tuple__184)) __PYX_ERR(5, 353, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__184);
  __Pyx_GIVEREF(__pyx_tuple__184);
  __pyx_codeobj__185 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__184, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_boulier_DifferentialAlgebr_4, __pyx_n_s_relations, 353, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__185)) __PYX_ERR(5, 353, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_tuple__186 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_state, __pyx_n_s_dict_2, __pyx_n_s_use_setstate); if (unlikely(!__pyx_tuple__186)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__186);
  __Pyx_GIVEREF(__pyx_tuple__186);
  __pyx_codeobj__187 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__186, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__187)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_BaseFieldExtension, (type(self), 0x472eff0, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_BaseFieldExtension__set_state(self, __pyx_state)
 */
  __pyx_codeobj__188 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__143, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 16, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__188)) __PYX_ERR(1, 16, __pyx_L1_error)

  /* "../../bmi/sympy/DenefLipshitzUple.pyx":37
 *         return 'Denef_Lipshitz_Uple'
 * 
 *     def _latex_ (self):             # <<<<<<<<<<<<<<
 * #   The LaTeX representation
 *         return 'Denef\\_Lipshitz\\_Uple'
 */
  __pyx_codeobj__189 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__94, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_boulier_DifferentialAlgebr_5, __pyx_n_s_latex_2, 37, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__189)) __PYX_ERR(6, 37, __pyx_L1_error)

  /* "../../bmi/sympy/DenefLipshitzUple.pyx":47
 * 
 * # __process_notation
 *     def __process_notation (self, notation) :             # <<<<<<<<<<<<<<
 *         cdef strnot
 *         if not isinstance (notation, str) :
 */
  __pyx_codeobj__190 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__90, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_boulier_DifferentialAlgebr_5, __pyx_n_s_process_notation, 47, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__190)) __PYX_ERR(6, 47, __pyx_L1_error)

  /* "../../bmi/sympy/DenefLipshitzUple.pyx":58
 * 
 * # DenefLipshitz
 *     def DenefLipshitz (             # <<<<<<<<<<<<<<
 *             self,
 *             equations,
 */
  __pyx_tuple__191 = PyTuple_Pack(20, __pyx_n_s_self, __pyx_n_s_equations, __pyx_n_s_notation, __pyx_n_s_timeout, __pyx_n_s_memout, __pyx_n_s_result, __pyx_n_s_eqns, __pyx_n_s_ineq, __pyx_n_s_M, __pyx_n_s_U, __pyx_n_s_C, __pyx_n_s_L, __pyx_n_s_L1, __pyx_n_s_L2, __pyx_n_s_L3, __pyx_n_s_mesgerr, __pyx_n_s_streqns, __pyx_n_s_strineq, __pyx_n_s_strnot, __pyx_n_s_i); if (unlikely(!__pyx_tuple__191)) __PYX_ERR(6, 58, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__191);
  __Pyx_GIVEREF(__pyx_tuple__191);
  __pyx_codeobj__192 = (PyObject*)__Pyx_PyCode_New(5, 0, 0, 20, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__191, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_boulier_DifferentialAlgebr_5, __pyx_n_s_DenefLipshitz, 58, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__192)) __PYX_ERR(6, 58, __pyx_L1_error)

  /* "../../bmi/sympy/DenefLipshitzUple.pyx":235
 * 
 * # constraints
 *     def constraints (             # <<<<<<<<<<<<<<
 *             self,
 *             notation = BMI_IX_undefined,
 */
  __pyx_tuple__193 = PyTuple_Pack(8, __pyx_n_s_self, __pyx_n_s_notation, __pyx_n_s_timeout, __pyx_n_s_memout, __pyx_n_s_result, __pyx_n_s_L, __pyx_n_s_mesgerr, __pyx_n_s_strnot); if (unlikely(!__pyx_tuple__193)) __PYX_ERR(6, 235, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__193);
  __Pyx_GIVEREF(__pyx_tuple__193);
  __pyx_codeobj__194 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 8, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__193, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_boulier_DifferentialAlgebr_5, __pyx_n_s_constraints, 235, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__194)) __PYX_ERR(6, 235, __pyx_L1_error)

  /* "../../bmi/sympy/DenefLipshitzUple.pyx":343
 * 
 * # leading_polynomial
 *     def leading_polynomial (             # <<<<<<<<<<<<<<
 *             self,
 *             notation = BMI_IX_undefined,
 */
  __pyx_codeobj__195 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 8, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__193, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_boulier_DifferentialAlgebr_5, __pyx_n_s_leading_polynomial, 343, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__195)) __PYX_ERR(6, 343, __pyx_L1_error)

  /* "../../bmi/sympy/DenefLipshitzUple.pyx":478
 * 
 * # series
 *     def series (             # <<<<<<<<<<<<<<
 *             self,
 *             list vars = [],
 */
  __pyx_tuple__196 = PyTuple_Pack(10, __pyx_n_s_self, __pyx_n_s_vars, __pyx_n_s_notation, __pyx_n_s_timeout, __pyx_n_s_memout, __pyx_n_s_result, __pyx_n_s_L, __pyx_n_s_mesgerr, __pyx_n_s_strvars, __pyx_n_s_strnot); if (unlikely(!__pyx_tuple__196)) __PYX_ERR(6, 478, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__196);
  __Pyx_GIVEREF(__pyx_tuple__196);
  __pyx_codeobj__197 = (PyObject*)__Pyx_PyCode_New(5, 0, 0, 10, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__196, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_boulier_DifferentialAlgebr_5, __pyx_n_s_series, 478, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__197)) __PYX_ERR(6, 478, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "self.DLuple cannot be converted to a Python object for pickling"
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_codeobj__198 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__94, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__198)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "self.DLuple cannot be converted to a Python object for pickling"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "self.DLuple cannot be converted to a Python object for pickling"
 */
  __pyx_codeobj__199 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__143, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__199)) __PYX_ERR(1, 3, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __pyx_unpickle_BaseFieldExtension(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */
  __pyx_tuple__200 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__200)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__200);
  __Pyx_GIVEREF(__pyx_tuple__200);
  __pyx_codeobj__201 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__200, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_BaseFieldExtensio, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__201)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_RefNannyFinishContext();
  return 0;
  __pyx_L1_error:;
  __Pyx_RefNannyFinishContext();
  return -1;
}
/* #### Code section: init_constants ### */

static CYTHON_SMALL_CODE int __Pyx_InitConstants(void) {
  __pyx_umethod_PyBytes_Type_replace.type = (PyObject*)&PyBytes_Type;
  __pyx_umethod_PyBytes_Type_replace.method_name = &__pyx_n_s_replace;
  if (__Pyx_CreateStringTabAndInitStrings() < 0) __PYX_ERR(4, 1, __pyx_L1_error);
  __pyx_int_0 = PyInt_FromLong(0); if (unlikely(!__pyx_int_0)) __PYX_ERR(4, 1, __pyx_L1_error)
  __pyx_int_1 = PyInt_FromLong(1); if (unlikely(!__pyx_int_1)) __PYX_ERR(4, 1, __pyx_L1_error)
  __pyx_int_70027971 = PyInt_FromLong(70027971L); if (unlikely(!__pyx_int_70027971)) __PYX_ERR(4, 1, __pyx_L1_error)
  __pyx_int_74641392 = PyInt_FromLong(74641392L); if (unlikely(!__pyx_int_74641392)) __PYX_ERR(4, 1, __pyx_L1_error)
  __pyx_int_163572033 = PyInt_FromLong(163572033L); if (unlikely(!__pyx_int_163572033)) __PYX_ERR(4, 1, __pyx_L1_error)
  return 0;
  __pyx_L1_error:;
  return -1;
}
/* #### Code section: init_globals ### */

static CYTHON_SMALL_CODE int __Pyx_InitGlobals(void) {
  return 0;
}
/* #### Code section: init_module ### */

static CYTHON_SMALL_CODE int __Pyx_modinit_global_init_code(void); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_variable_export_code(void); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_function_export_code(void); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_type_init_code(void); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_type_import_code(void); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_variable_import_code(void); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_function_import_code(void); /*proto*/

static int __Pyx_modinit_global_init_code(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_modinit_global_init_code", 0);
  /*--- Global init code ---*/
  __Pyx_RefNannyFinishContext();
  return 0;
}

static int __Pyx_modinit_variable_export_code(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_modinit_variable_export_code", 0);
  /*--- Variable export code ---*/
  __Pyx_RefNannyFinishContext();
  return 0;
}

static int __Pyx_modinit_function_export_code(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_modinit_function_export_code", 0);
  /*--- Function export code ---*/
  __Pyx_RefNannyFinishContext();
  return 0;
}

static int __Pyx_modinit_type_init_code(void) {
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0);
  /*--- Type init code ---*/
  #if CYTHON_USE_TYPE_SPECS
  __pyx_ptype_19DifferentialAlgebra_DifferentialRing = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_19DifferentialAlgebra_DifferentialRing_spec, NULL); if (unlikely(!__pyx_ptype_19DifferentialAlgebra_DifferentialRing)) __PYX_ERR(0, 2, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_19DifferentialAlgebra_DifferentialRing_spec, __pyx_ptype_19DifferentialAlgebra_DifferentialRing) < 0) __PYX_ERR(0, 2, __pyx_L1_error)
  #else
  __pyx_ptype_19DifferentialAlgebra_DifferentialRing = &__pyx_type_19DifferentialAlgebra_DifferentialRing;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_ptype_19DifferentialAlgebra_DifferentialRing) < 0) __PYX_ERR(0, 2, __pyx_L1_error)
  #endif
  #if PY_MAJOR_VERSION < 3
  __pyx_ptype_19DifferentialAlgebra_DifferentialRing->tp_print = 0;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_19DifferentialAlgebra_DifferentialRing->tp_dictoffset && __pyx_ptype_19DifferentialAlgebra_DifferentialRing->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_ptype_19DifferentialAlgebra_DifferentialRing->tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  #endif
  #if CYTHON_UPDATE_DESCRIPTOR_DOC
  {
    PyObject *wrapper = PyObject_GetAttrString((PyObject *)__pyx_ptype_19DifferentialAlgebra_DifferentialRing, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(0, 2, __pyx_L1_error)
    if (__Pyx_IS_TYPE(wrapper, &PyWrapperDescr_Type)) {
      __pyx_wrapperbase_19DifferentialAlgebra_16DifferentialRing_4__init__ = *((PyWrapperDescrObject *)wrapper)->d_base;
      __pyx_wrapperbase_19DifferentialAlgebra_16DifferentialRing_4__init__.doc = __pyx_doc_19DifferentialAlgebra_16DifferentialRing_4__init__;
      ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_19DifferentialAlgebra_16DifferentialRing_4__init__;
    }
  }
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_DifferentialRing, (PyObject *) __pyx_ptype_19DifferentialAlgebra_DifferentialRing) < 0) __PYX_ERR(0, 2, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_19DifferentialAlgebra_DifferentialRing) < 0) __PYX_ERR(0, 2, __pyx_L1_error)
  #endif
  #if CYTHON_USE_TYPE_SPECS
  __pyx_ptype_19DifferentialAlgebra_RegularDifferentialChain = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_19DifferentialAlgebra_RegularDifferentialChain_spec, NULL); if (unlikely(!__pyx_ptype_19DifferentialAlgebra_RegularDifferentialChain)) __PYX_ERR(2, 2, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_19DifferentialAlgebra_RegularDifferentialChain_spec, __pyx_ptype_19DifferentialAlgebra_RegularDifferentialChain) < 0) __PYX_ERR(2, 2, __pyx_L1_error)
  #else
  __pyx_ptype_19DifferentialAlgebra_RegularDifferentialChain = &__pyx_type_19DifferentialAlgebra_RegularDifferentialChain;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_ptype_19DifferentialAlgebra_RegularDifferentialChain) < 0) __PYX_ERR(2, 2, __pyx_L1_error)
  #endif
  #if PY_MAJOR_VERSION < 3
  __pyx_ptype_19DifferentialAlgebra_RegularDifferentialChain->tp_print = 0;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_19DifferentialAlgebra_RegularDifferentialChain->tp_dictoffset && __pyx_ptype_19DifferentialAlgebra_RegularDifferentialChain->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_ptype_19DifferentialAlgebra_RegularDifferentialChain->tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  #endif
  #if CYTHON_UPDATE_DESCRIPTOR_DOC
  {
    PyObject *wrapper = PyObject_GetAttrString((PyObject *)__pyx_ptype_19DifferentialAlgebra_RegularDifferentialChain, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(2, 2, __pyx_L1_error)
    if (__Pyx_IS_TYPE(wrapper, &PyWrapperDescr_Type)) {
      __pyx_wrapperbase_19DifferentialAlgebra_24RegularDifferentialChain_2__init__ = *((PyWrapperDescrObject *)wrapper)->d_base;
      __pyx_wrapperbase_19DifferentialAlgebra_24RegularDifferentialChain_2__init__.doc = __pyx_doc_19DifferentialAlgebra_24RegularDifferentialChain_2__init__;
      ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_19DifferentialAlgebra_24RegularDifferentialChain_2__init__;
    }
  }
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_RegularDifferentialChain, (PyObject *) __pyx_ptype_19DifferentialAlgebra_RegularDifferentialChain) < 0) __PYX_ERR(2, 2, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_19DifferentialAlgebra_RegularDifferentialChain) < 0) __PYX_ERR(2, 2, __pyx_L1_error)
  #endif
  #if CYTHON_USE_TYPE_SPECS
  __pyx_ptype_19DifferentialAlgebra_BaseFieldExtension = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_19DifferentialAlgebra_BaseFieldExtension_spec, NULL); if (unlikely(!__pyx_ptype_19DifferentialAlgebra_BaseFieldExtension)) __PYX_ERR(5, 2, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_19DifferentialAlgebra_BaseFieldExtension_spec, __pyx_ptype_19DifferentialAlgebra_BaseFieldExtension) < 0) __PYX_ERR(5, 2, __pyx_L1_error)
  #else
  __pyx_ptype_19DifferentialAlgebra_BaseFieldExtension = &__pyx_type_19DifferentialAlgebra_BaseFieldExtension;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_ptype_19DifferentialAlgebra_BaseFieldExtension) < 0) __PYX_ERR(5, 2, __pyx_L1_error)
  #endif
  #if PY_MAJOR_VERSION < 3
  __pyx_ptype_19DifferentialAlgebra_BaseFieldExtension->tp_print = 0;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_19DifferentialAlgebra_BaseFieldExtension->tp_dictoffset && __pyx_ptype_19DifferentialAlgebra_BaseFieldExtension->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_ptype_19DifferentialAlgebra_BaseFieldExtension->tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  #endif
  #if CYTHON_UPDATE_DESCRIPTOR_DOC
  {
    PyObject *wrapper = PyObject_GetAttrString((PyObject *)__pyx_ptype_19DifferentialAlgebra_BaseFieldExtension, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(5, 2, __pyx_L1_error)
    if (__Pyx_IS_TYPE(wrapper, &PyWrapperDescr_Type)) {
      __pyx_wrapperbase_19DifferentialAlgebra_18BaseFieldExtension_2__init__ = *((PyWrapperDescrObject *)wrapper)->d_base;
      __pyx_wrapperbase_19DifferentialAlgebra_18BaseFieldExtension_2__init__.doc = __pyx_doc_19DifferentialAlgebra_18BaseFieldExtension_2__init__;
      ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_19DifferentialAlgebra_18BaseFieldExtension_2__init__;
    }
  }
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_BaseFieldExtension, (PyObject *) __pyx_ptype_19DifferentialAlgebra_BaseFieldExtension) < 0) __PYX_ERR(5, 2, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_19DifferentialAlgebra_BaseFieldExtension) < 0) __PYX_ERR(5, 2, __pyx_L1_error)
  #endif
  #if CYTHON_USE_TYPE_SPECS
  __pyx_ptype_19DifferentialAlgebra_DenefLipshitzUple = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_19DifferentialAlgebra_DenefLipshitzUple_spec, NULL); if (unlikely(!__pyx_ptype_19DifferentialAlgebra_DenefLipshitzUple)) __PYX_ERR(6, 2, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_19DifferentialAlgebra_DenefLipshitzUple_spec, __pyx_ptype_19DifferentialAlgebra_DenefLipshitzUple) < 0) __PYX_ERR(6, 2, __pyx_L1_error)
  #else
  __pyx_ptype_19DifferentialAlgebra_DenefLipshitzUple = &__pyx_type_19DifferentialAlgebra_DenefLipshitzUple;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_ptype_19DifferentialAlgebra_DenefLipshitzUple) < 0) __PYX_ERR(6, 2, __pyx_L1_error)
  #endif
  #if PY_MAJOR_VERSION < 3
  __pyx_ptype_19DifferentialAlgebra_DenefLipshitzUple->tp_print = 0;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_19DifferentialAlgebra_DenefLipshitzUple->tp_dictoffset && __pyx_ptype_19DifferentialAlgebra_DenefLipshitzUple->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_ptype_19DifferentialAlgebra_DenefLipshitzUple->tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_DenefLipshitzUple, (PyObject *) __pyx_ptype_19DifferentialAlgebra_DenefLipshitzUple) < 0) __PYX_ERR(6, 2, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_19DifferentialAlgebra_DenefLipshitzUple) < 0) __PYX_ERR(6, 2, __pyx_L1_error)
  #endif
  __Pyx_RefNannyFinishContext();
  return 0;
  __pyx_L1_error:;
  __Pyx_RefNannyFinishContext();
  return -1;
}

static int __Pyx_modinit_type_import_code(void) {
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__Pyx_modinit_type_import_code", 0);
  /*--- Type import code ---*/
  __pyx_t_1 = PyImport_ImportModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 9, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_ptype_7cpython_4type_type = __Pyx_ImportType_3_0_11(__pyx_t_1, __Pyx_BUILTIN_MODULE_NAME, "type", 
  #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
  sizeof(PyTypeObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_11(PyTypeObject),
  #elif CYTHON_COMPILING_IN_LIMITED_API
  sizeof(PyTypeObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_11(PyTypeObject),
  #else
  sizeof(PyHeapTypeObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_11(PyHeapTypeObject),
  #endif
  __Pyx_ImportType_CheckSize_Warn_3_0_11); if (!__pyx_ptype_7cpython_4type_type) __PYX_ERR(7, 9, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyImport_ImportModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 8, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_ptype_7cpython_4bool_bool = __Pyx_ImportType_3_0_11(__pyx_t_1, __Pyx_BUILTIN_MODULE_NAME, "bool", sizeof(PyBoolObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_11(PyBoolObject),__Pyx_ImportType_CheckSize_Warn_3_0_11); if (!__pyx_ptype_7cpython_4bool_bool) __PYX_ERR(8, 8, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyImport_ImportModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 15, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_ptype_7cpython_7complex_complex = __Pyx_ImportType_3_0_11(__pyx_t_1, __Pyx_BUILTIN_MODULE_NAME, "complex", sizeof(PyComplexObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_11(PyComplexObject),__Pyx_ImportType_CheckSize_Warn_3_0_11); if (!__pyx_ptype_7cpython_7complex_complex) __PYX_ERR(9, 15, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_RefNannyFinishContext();
  return 0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_RefNannyFinishContext();
  return -1;
}

static int __Pyx_modinit_variable_import_code(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_modinit_variable_import_code", 0);
  /*--- Variable import code ---*/
  __Pyx_RefNannyFinishContext();
  return 0;
}

static int __Pyx_modinit_function_import_code(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_modinit_function_import_code", 0);
  /*--- Function import code ---*/
  __Pyx_RefNannyFinishContext();
  return 0;
}


#if PY_MAJOR_VERSION >= 3
#if CYTHON_PEP489_MULTI_PHASE_INIT
static PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def); /*proto*/
static int __pyx_pymod_exec_DifferentialAlgebra(PyObject* module); /*proto*/
static PyModuleDef_Slot __pyx_moduledef_slots[] = {
  {Py_mod_create, (void*)__pyx_pymod_create},
  {Py_mod_exec, (void*)__pyx_pymod_exec_DifferentialAlgebra},
  {0, NULL}
};
#endif

#ifdef __cplusplus
namespace {
  struct PyModuleDef __pyx_moduledef =
  #else
  static struct PyModuleDef __pyx_moduledef =
  #endif
  {
      PyModuleDef_HEAD_INIT,
      "DifferentialAlgebra",
      __pyx_k_The_DifferentialAlgebra_Module, /* m_doc */
    #if CYTHON_PEP489_MULTI_PHASE_INIT
      0, /* m_size */
    #elif CYTHON_USE_MODULE_STATE
      sizeof(__pyx_mstate), /* m_size */
    #else
      -1, /* m_size */
    #endif
      __pyx_methods /* m_methods */,
    #if CYTHON_PEP489_MULTI_PHASE_INIT
      __pyx_moduledef_slots, /* m_slots */
    #else
      NULL, /* m_reload */
    #endif
    #if CYTHON_USE_MODULE_STATE
      __pyx_m_traverse, /* m_traverse */
      __pyx_m_clear, /* m_clear */
      NULL /* m_free */
    #else
      NULL, /* m_traverse */
      NULL, /* m_clear */
      NULL /* m_free */
    #endif
  };
  #ifdef __cplusplus
} /* anonymous namespace */
#endif
#endif

#ifndef CYTHON_NO_PYINIT_EXPORT
#define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC
#elif PY_MAJOR_VERSION < 3
#ifdef __cplusplus
#define __Pyx_PyMODINIT_FUNC extern "C" void
#else
#define __Pyx_PyMODINIT_FUNC void
#endif
#else
#ifdef __cplusplus
#define __Pyx_PyMODINIT_FUNC extern "C" PyObject *
#else
#define __Pyx_PyMODINIT_FUNC PyObject *
#endif
#endif


#if PY_MAJOR_VERSION < 3
__Pyx_PyMODINIT_FUNC initDifferentialAlgebra(void) CYTHON_SMALL_CODE; /*proto*/
__Pyx_PyMODINIT_FUNC initDifferentialAlgebra(void)
#else
__Pyx_PyMODINIT_FUNC PyInit_DifferentialAlgebra(void) CYTHON_SMALL_CODE; /*proto*/
__Pyx_PyMODINIT_FUNC PyInit_DifferentialAlgebra(void)
#if CYTHON_PEP489_MULTI_PHASE_INIT
{
  return PyModuleDef_Init(&__pyx_moduledef);
}
static CYTHON_SMALL_CODE int __Pyx_check_single_interpreter(void) {
    #if PY_VERSION_HEX >= 0x030700A1
    static PY_INT64_T main_interpreter_id = -1;
    PY_INT64_T current_id = PyInterpreterState_GetID(PyThreadState_Get()->interp);
    if (main_interpreter_id == -1) {
        main_interpreter_id = current_id;
        return (unlikely(current_id == -1)) ? -1 : 0;
    } else if (unlikely(main_interpreter_id != current_id))
    #else
    static PyInterpreterState *main_interpreter = NULL;
    PyInterpreterState *current_interpreter = PyThreadState_Get()->interp;
    if (!main_interpreter) {
        main_interpreter = current_interpreter;
    } else if (unlikely(main_interpreter != current_interpreter))
    #endif
    {
        PyErr_SetString(
            PyExc_ImportError,
            "Interpreter change detected - this module can only be loaded into one interpreter per process.");
        return -1;
    }
    return 0;
}
#if CYTHON_COMPILING_IN_LIMITED_API
static CYTHON_SMALL_CODE int __Pyx_copy_spec_to_module(PyObject *spec, PyObject *module, const char* from_name, const char* to_name, int allow_none)
#else
static CYTHON_SMALL_CODE int __Pyx_copy_spec_to_module(PyObject *spec, PyObject *moddict, const char* from_name, const char* to_name, int allow_none)
#endif
{
    PyObject *value = PyObject_GetAttrString(spec, from_name);
    int result = 0;
    if (likely(value)) {
        if (allow_none || value != Py_None) {
#if CYTHON_COMPILING_IN_LIMITED_API
            result = PyModule_AddObject(module, to_name, value);
#else
            result = PyDict_SetItemString(moddict, to_name, value);
#endif
        }
        Py_DECREF(value);
    } else if (PyErr_ExceptionMatches(PyExc_AttributeError)) {
        PyErr_Clear();
    } else {
        result = -1;
    }
    return result;
}
static CYTHON_SMALL_CODE PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def) {
    PyObject *module = NULL, *moddict, *modname;
    CYTHON_UNUSED_VAR(def);
    if (__Pyx_check_single_interpreter())
        return NULL;
    if (__pyx_m)
        return __Pyx_NewRef(__pyx_m);
    modname = PyObject_GetAttrString(spec, "name");
    if (unlikely(!modname)) goto bad;
    module = PyModule_NewObject(modname);
    Py_DECREF(modname);
    if (unlikely(!module)) goto bad;
#if CYTHON_COMPILING_IN_LIMITED_API
    moddict = module;
#else
    moddict = PyModule_GetDict(module);
    if (unlikely(!moddict)) goto bad;
#endif
    if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "loader", "__loader__", 1) < 0)) goto bad;
    if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "origin", "__file__", 1) < 0)) goto bad;
    if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "parent", "__package__", 1) < 0)) goto bad;
    if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "submodule_search_locations", "__path__", 0) < 0)) goto bad;
    return module;
bad:
    Py_XDECREF(module);
    return NULL;
}


static CYTHON_SMALL_CODE int __pyx_pymod_exec_DifferentialAlgebra(PyObject *__pyx_pyinit_module)
#endif
#endif
{
  int stringtab_initialized = 0;
  #if CYTHON_USE_MODULE_STATE
  int pystate_addmodule_run = 0;
  #endif
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannyDeclarations
  #if CYTHON_PEP489_MULTI_PHASE_INIT
  if (__pyx_m) {
    if (__pyx_m == __pyx_pyinit_module) return 0;
    PyErr_SetString(PyExc_RuntimeError, "Module 'DifferentialAlgebra' has already been imported. Re-initialisation is not supported.");
    return -1;
  }
  #elif PY_MAJOR_VERSION >= 3
  if (__pyx_m) return __Pyx_NewRef(__pyx_m);
  #endif
  /*--- Module creation code ---*/
  #if CYTHON_PEP489_MULTI_PHASE_INIT
  __pyx_m = __pyx_pyinit_module;
  Py_INCREF(__pyx_m);
  #else
  #if PY_MAJOR_VERSION < 3
  __pyx_m = Py_InitModule4("DifferentialAlgebra", __pyx_methods, __pyx_k_The_DifferentialAlgebra_Module, 0, PYTHON_API_VERSION); Py_XINCREF(__pyx_m);
  if (unlikely(!__pyx_m)) __PYX_ERR(4, 1, __pyx_L1_error)
  #elif CYTHON_USE_MODULE_STATE
  __pyx_t_1 = PyModule_Create(&__pyx_moduledef); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 1, __pyx_L1_error)
  {
    int add_module_result = PyState_AddModule(__pyx_t_1, &__pyx_moduledef);
    __pyx_t_1 = 0; /* transfer ownership from __pyx_t_1 to "DifferentialAlgebra" pseudovariable */
    if (unlikely((add_module_result < 0))) __PYX_ERR(4, 1, __pyx_L1_error)
    pystate_addmodule_run = 1;
  }
  #else
  __pyx_m = PyModule_Create(&__pyx_moduledef);
  if (unlikely(!__pyx_m)) __PYX_ERR(4, 1, __pyx_L1_error)
  #endif
  #endif
  CYTHON_UNUSED_VAR(__pyx_t_1);
  __pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) __PYX_ERR(4, 1, __pyx_L1_error)
  Py_INCREF(__pyx_d);
  __pyx_b = __Pyx_PyImport_AddModuleRef(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_b)) __PYX_ERR(4, 1, __pyx_L1_error)
  __pyx_cython_runtime = __Pyx_PyImport_AddModuleRef((const char *) "cython_runtime"); if (unlikely(!__pyx_cython_runtime)) __PYX_ERR(4, 1, __pyx_L1_error)
  if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) __PYX_ERR(4, 1, __pyx_L1_error)
  #if CYTHON_REFNANNY
__Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny");
if (!__Pyx_RefNanny) {
  PyErr_Clear();
  __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny");
  if (!__Pyx_RefNanny)
      Py_FatalError("failed to import 'refnanny' module");
}
#endif
  __Pyx_RefNannySetupContext("__Pyx_PyMODINIT_FUNC PyInit_DifferentialAlgebra(void)", 0);
  if (__Pyx_check_binary_version(__PYX_LIMITED_VERSION_HEX, __Pyx_get_runtime_version(), CYTHON_COMPILING_IN_LIMITED_API) < 0) __PYX_ERR(4, 1, __pyx_L1_error)
  #ifdef __Pxy_PyFrame_Initialize_Offsets
  __Pxy_PyFrame_Initialize_Offsets();
  #endif
  __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) __PYX_ERR(4, 1, __pyx_L1_error)
  __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) __PYX_ERR(4, 1, __pyx_L1_error)
  __pyx_empty_unicode = PyUnicode_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_unicode)) __PYX_ERR(4, 1, __pyx_L1_error)
  #ifdef __Pyx_CyFunction_USED
  if (__pyx_CyFunction_init(__pyx_m) < 0) __PYX_ERR(4, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_FusedFunction_USED
  if (__pyx_FusedFunction_init(__pyx_m) < 0) __PYX_ERR(4, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_Coroutine_USED
  if (__pyx_Coroutine_init(__pyx_m) < 0) __PYX_ERR(4, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_Generator_USED
  if (__pyx_Generator_init(__pyx_m) < 0) __PYX_ERR(4, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_AsyncGen_USED
  if (__pyx_AsyncGen_init(__pyx_m) < 0) __PYX_ERR(4, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_StopAsyncIteration_USED
  if (__pyx_StopAsyncIteration_init(__pyx_m) < 0) __PYX_ERR(4, 1, __pyx_L1_error)
  #endif
  /*--- Library function declarations ---*/
  /*--- Threads initialization code ---*/
  #if defined(WITH_THREAD) && PY_VERSION_HEX < 0x030700F0 && defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS
  PyEval_InitThreads();
  #endif
  /*--- Initialize various global constants etc. ---*/
  if (__Pyx_InitConstants() < 0) __PYX_ERR(4, 1, __pyx_L1_error)
  stringtab_initialized = 1;
  if (__Pyx_InitGlobals() < 0) __PYX_ERR(4, 1, __pyx_L1_error)
  #if PY_MAJOR_VERSION < 3 && (__PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT)
  if (__Pyx_init_sys_getdefaultencoding_params() < 0) __PYX_ERR(4, 1, __pyx_L1_error)
  #endif
  if (__pyx_module_is_main_DifferentialAlgebra) {
    if (PyObject_SetAttr(__pyx_m, __pyx_n_s_name, __pyx_n_s_main) < 0) __PYX_ERR(4, 1, __pyx_L1_error)
  }
  #if PY_MAJOR_VERSION >= 3
  {
    PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) __PYX_ERR(4, 1, __pyx_L1_error)
    if (!PyDict_GetItemString(modules, "DifferentialAlgebra")) {
      if (unlikely((PyDict_SetItemString(modules, "DifferentialAlgebra", __pyx_m) < 0))) __PYX_ERR(4, 1, __pyx_L1_error)
    }
  }
  #endif
  /*--- Builtin init code ---*/
  if (__Pyx_InitCachedBuiltins() < 0) __PYX_ERR(4, 1, __pyx_L1_error)
  /*--- Constants init code ---*/
  if (__Pyx_InitCachedConstants() < 0) __PYX_ERR(4, 1, __pyx_L1_error)
  /*--- Global type/function init code ---*/
  (void)__Pyx_modinit_global_init_code();
  (void)__Pyx_modinit_variable_export_code();
  (void)__Pyx_modinit_function_export_code();
  if (unlikely((__Pyx_modinit_type_init_code() < 0))) __PYX_ERR(4, 1, __pyx_L1_error)
  if (unlikely((__Pyx_modinit_type_import_code() < 0))) __PYX_ERR(4, 1, __pyx_L1_error)
  (void)__Pyx_modinit_variable_import_code();
  (void)__Pyx_modinit_function_import_code();
  /*--- Execution code ---*/
  #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
  if (__Pyx_patch_abc() < 0) __PYX_ERR(4, 1, __pyx_L1_error)
  #endif

  /* "DifferentialAlgebra.pyx":653
 * # Used to be useful in sage 5.3 and former releases.
 * # include "sage/ext/python_ref.pxi"
 * import sys             # <<<<<<<<<<<<<<
 * import string
 * import re
 */
  __pyx_t_2 = __Pyx_ImportDottedModule(__pyx_n_s_sys, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 653, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_sys, __pyx_t_2) < 0) __PYX_ERR(4, 653, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "DifferentialAlgebra.pyx":654
 * # include "sage/ext/python_ref.pxi"
 * import sys
 * import string             # <<<<<<<<<<<<<<
 * import re
 * 
 */
  __pyx_t_2 = __Pyx_ImportDottedModule(__pyx_n_s_string, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 654, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_string, __pyx_t_2) < 0) __PYX_ERR(4, 654, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "DifferentialAlgebra.pyx":655
 * import sys
 * import string
 * import re             # <<<<<<<<<<<<<<
 * 
 * from cpython cimport bool
 */
  __pyx_t_2 = __Pyx_ImportDottedModule(__pyx_n_s_re, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 655, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_re, __pyx_t_2) < 0) __PYX_ERR(4, 655, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "DifferentialAlgebra.pyx":659
 * from cpython cimport bool
 * 
 * def ascii (s) :             # <<<<<<<<<<<<<<
 *     if isinstance (s, bytes) :
 *         return s
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_19DifferentialAlgebra_1ascii, 0, __pyx_n_s_ascii, NULL, __pyx_n_s_DifferentialAlgebra, __pyx_d, ((PyObject *)__pyx_codeobj__86)); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 659, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_ascii, __pyx_t_2) < 0) __PYX_ERR(4, 659, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "DifferentialAlgebra.pyx":665
 *         return str (s).encode ('ascii')
 * 
 * import sympy             # <<<<<<<<<<<<<<
 * from sympy import var, Symbol, Derivative, Eq, Ne, Integer, Rational, oo, Add, Mul, Pow, degree
 * 
 */
  __pyx_t_2 = __Pyx_ImportDottedModule(__pyx_n_s_sympy, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 665, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_sympy, __pyx_t_2) < 0) __PYX_ERR(4, 665, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "DifferentialAlgebra.pyx":666
 * 
 * import sympy
 * from sympy import var, Symbol, Derivative, Eq, Ne, Integer, Rational, oo, Add, Mul, Pow, degree             # <<<<<<<<<<<<<<
 * 
 * def function (s) :
 */
  __pyx_t_2 = PyList_New(12); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 666, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_n_s_var);
  __Pyx_GIVEREF(__pyx_n_s_var);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_var)) __PYX_ERR(4, 666, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_s_Symbol);
  __Pyx_GIVEREF(__pyx_n_s_Symbol);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 1, __pyx_n_s_Symbol)) __PYX_ERR(4, 666, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_s_Derivative);
  __Pyx_GIVEREF(__pyx_n_s_Derivative);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 2, __pyx_n_s_Derivative)) __PYX_ERR(4, 666, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_s_Eq_2);
  __Pyx_GIVEREF(__pyx_n_s_Eq_2);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 3, __pyx_n_s_Eq_2)) __PYX_ERR(4, 666, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_s_Ne);
  __Pyx_GIVEREF(__pyx_n_s_Ne);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 4, __pyx_n_s_Ne)) __PYX_ERR(4, 666, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_s_Integer);
  __Pyx_GIVEREF(__pyx_n_s_Integer);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 5, __pyx_n_s_Integer)) __PYX_ERR(4, 666, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_s_Rational);
  __Pyx_GIVEREF(__pyx_n_s_Rational);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 6, __pyx_n_s_Rational)) __PYX_ERR(4, 666, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_s_oo);
  __Pyx_GIVEREF(__pyx_n_s_oo);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 7, __pyx_n_s_oo)) __PYX_ERR(4, 666, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_s_Add);
  __Pyx_GIVEREF(__pyx_n_s_Add);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 8, __pyx_n_s_Add)) __PYX_ERR(4, 666, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_s_Mul);
  __Pyx_GIVEREF(__pyx_n_s_Mul);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 9, __pyx_n_s_Mul)) __PYX_ERR(4, 666, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_s_Pow);
  __Pyx_GIVEREF(__pyx_n_s_Pow);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 10, __pyx_n_s_Pow)) __PYX_ERR(4, 666, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_s_degree);
  __Pyx_GIVEREF(__pyx_n_s_degree);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 11, __pyx_n_s_degree)) __PYX_ERR(4, 666, __pyx_L1_error);
  __pyx_t_3 = __Pyx_Import(__pyx_n_s_sympy, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 666, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_var); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 666, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_var, __pyx_t_2) < 0) __PYX_ERR(4, 666, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_Symbol); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 666, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_Symbol, __pyx_t_2) < 0) __PYX_ERR(4, 666, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_Derivative); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 666, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_Derivative, __pyx_t_2) < 0) __PYX_ERR(4, 666, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_Eq_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 666, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_Eq_2, __pyx_t_2) < 0) __PYX_ERR(4, 666, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_Ne); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 666, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_Ne, __pyx_t_2) < 0) __PYX_ERR(4, 666, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_Integer); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 666, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_Integer, __pyx_t_2) < 0) __PYX_ERR(4, 666, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_Rational); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 666, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_Rational, __pyx_t_2) < 0) __PYX_ERR(4, 666, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_oo); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 666, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_oo, __pyx_t_2) < 0) __PYX_ERR(4, 666, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_Add); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 666, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_Add, __pyx_t_2) < 0) __PYX_ERR(4, 666, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_Mul); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 666, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_Mul, __pyx_t_2) < 0) __PYX_ERR(4, 666, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_Pow); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 666, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_Pow, __pyx_t_2) < 0) __PYX_ERR(4, 666, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_degree); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 666, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_degree, __pyx_t_2) < 0) __PYX_ERR(4, 666, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "DifferentialAlgebra.pyx":668
 * from sympy import var, Symbol, Derivative, Eq, Ne, Integer, Rational, oo, Add, Mul, Pow, degree
 * 
 * def function (s) :             # <<<<<<<<<<<<<<
 *     L = re.split (r'[, ]+', s)
 *     if len(L) == 1 :
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_19DifferentialAlgebra_3function, 0, __pyx_n_s_function, NULL, __pyx_n_s_DifferentialAlgebra, __pyx_d, ((PyObject *)__pyx_codeobj__88)); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 668, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_function, __pyx_t_3) < 0) __PYX_ERR(4, 668, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "DifferentialAlgebra.pyx":675
 *         return tuple ([sympy.Function(z) for z in L])
 * 
 * def indexedbase (s) :             # <<<<<<<<<<<<<<
 *     L = re.split (r'[, ]+', s)
 *     if len(L) == 1 :
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_19DifferentialAlgebra_5indexedbase, 0, __pyx_n_s_indexedbase, NULL, __pyx_n_s_DifferentialAlgebra, __pyx_d, ((PyObject *)__pyx_codeobj__89)); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 675, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_indexedbase, __pyx_t_3) < 0) __PYX_ERR(4, 675, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "bmi_strings.pyx":3
 * # File automatically generated
 * 
 * cdef char* BMI_IX_small = "small"             # <<<<<<<<<<<<<<
 * cdef char* BMI_IX_large = "large"
 * cdef char* BMI_IX_equations = "Equations"
 */
  __pyx_v_19DifferentialAlgebra_BMI_IX_small = ((char *)"small");

  /* "bmi_strings.pyx":4
 * 
 * cdef char* BMI_IX_small = "small"
 * cdef char* BMI_IX_large = "large"             # <<<<<<<<<<<<<<
 * cdef char* BMI_IX_equations = "Equations"
 * cdef char* BMI_IX_ordering = "Ranking"
 */
  __pyx_v_19DifferentialAlgebra_BMI_IX_large = ((char *)"large");

  /* "bmi_strings.pyx":5
 * cdef char* BMI_IX_small = "small"
 * cdef char* BMI_IX_large = "large"
 * cdef char* BMI_IX_equations = "Equations"             # <<<<<<<<<<<<<<
 * cdef char* BMI_IX_ordering = "Ranking"
 * cdef char* BMI_IX_notation = "Notation"
 */
  __pyx_v_19DifferentialAlgebra_BMI_IX_equations = ((char *)"Equations");

  /* "bmi_strings.pyx":6
 * cdef char* BMI_IX_large = "large"
 * cdef char* BMI_IX_equations = "Equations"
 * cdef char* BMI_IX_ordering = "Ranking"             # <<<<<<<<<<<<<<
 * cdef char* BMI_IX_notation = "Notation"
 * cdef char* BMI_IX_jet = "jet"
 */
  __pyx_v_19DifferentialAlgebra_BMI_IX_ordering = ((char *)"Ranking");

  /* "bmi_strings.pyx":7
 * cdef char* BMI_IX_equations = "Equations"
 * cdef char* BMI_IX_ordering = "Ranking"
 * cdef char* BMI_IX_notation = "Notation"             # <<<<<<<<<<<<<<
 * cdef char* BMI_IX_jet = "jet"
 * cdef char* BMI_IX_tjet = "tjet"
 */
  __pyx_v_19DifferentialAlgebra_BMI_IX_notation = ((char *)"Notation");

  /* "bmi_strings.pyx":8
 * cdef char* BMI_IX_ordering = "Ranking"
 * cdef char* BMI_IX_notation = "Notation"
 * cdef char* BMI_IX_jet = "jet"             # <<<<<<<<<<<<<<
 * cdef char* BMI_IX_tjet = "tjet"
 * cdef char* BMI_IX_jet0 = "jet0"
 */
  __pyx_v_19DifferentialAlgebra_BMI_IX_jet = ((char *)"jet");

  /* "bmi_strings.pyx":9
 * cdef char* BMI_IX_notation = "Notation"
 * cdef char* BMI_IX_jet = "jet"
 * cdef char* BMI_IX_tjet = "tjet"             # <<<<<<<<<<<<<<
 * cdef char* BMI_IX_jet0 = "jet0"
 * cdef char* BMI_IX_diff = "diff"
 */
  __pyx_v_19DifferentialAlgebra_BMI_IX_tjet = ((char *)"tjet");

  /* "bmi_strings.pyx":10
 * cdef char* BMI_IX_jet = "jet"
 * cdef char* BMI_IX_tjet = "tjet"
 * cdef char* BMI_IX_jet0 = "jet0"             # <<<<<<<<<<<<<<
 * cdef char* BMI_IX_diff = "diff"
 * cdef char* BMI_IX_udif = "Diff"
 */
  __pyx_v_19DifferentialAlgebra_BMI_IX_jet0 = ((char *)"jet0");

  /* "bmi_strings.pyx":11
 * cdef char* BMI_IX_tjet = "tjet"
 * cdef char* BMI_IX_jet0 = "jet0"
 * cdef char* BMI_IX_diff = "diff"             # <<<<<<<<<<<<<<
 * cdef char* BMI_IX_udif = "Diff"
 * cdef char* BMI_IX_D = "D"
 */
  __pyx_v_19DifferentialAlgebra_BMI_IX_diff = ((char *)"diff");

  /* "bmi_strings.pyx":12
 * cdef char* BMI_IX_jet0 = "jet0"
 * cdef char* BMI_IX_diff = "diff"
 * cdef char* BMI_IX_udif = "Diff"             # <<<<<<<<<<<<<<
 * cdef char* BMI_IX_D = "D"
 * cdef char* BMI_IX_Derivative = "Derivative"
 */
  __pyx_v_19DifferentialAlgebra_BMI_IX_udif = ((char *)"Diff");

  /* "bmi_strings.pyx":13
 * cdef char* BMI_IX_diff = "diff"
 * cdef char* BMI_IX_udif = "Diff"
 * cdef char* BMI_IX_D = "D"             # <<<<<<<<<<<<<<
 * cdef char* BMI_IX_Derivative = "Derivative"
 * cdef char* BMI_IX_undefined = "undefined"
 */
  __pyx_v_19DifferentialAlgebra_BMI_IX_D = ((char *)"D");

  /* "bmi_strings.pyx":14
 * cdef char* BMI_IX_udif = "Diff"
 * cdef char* BMI_IX_D = "D"
 * cdef char* BMI_IX_Derivative = "Derivative"             # <<<<<<<<<<<<<<
 * cdef char* BMI_IX_undefined = "undefined"
 * cdef char* BMI_IX_type = "Type"
 */
  __pyx_v_19DifferentialAlgebra_BMI_IX_Derivative = ((char *)"Derivative");

  /* "bmi_strings.pyx":15
 * cdef char* BMI_IX_D = "D"
 * cdef char* BMI_IX_Derivative = "Derivative"
 * cdef char* BMI_IX_undefined = "undefined"             # <<<<<<<<<<<<<<
 * cdef char* BMI_IX_type = "Type"
 * cdef char* BMI_IX_regchain = "RegularDifferentialChain"
 */
  __pyx_v_19DifferentialAlgebra_BMI_IX_undefined = ((char *)"undefined");

  /* "bmi_strings.pyx":16
 * cdef char* BMI_IX_Derivative = "Derivative"
 * cdef char* BMI_IX_undefined = "undefined"
 * cdef char* BMI_IX_type = "Type"             # <<<<<<<<<<<<<<
 * cdef char* BMI_IX_regchain = "RegularDifferentialChain"
 * cdef char* BMI_IX_dring = "DifferentialRing"
 */
  __pyx_v_19DifferentialAlgebra_BMI_IX_type = ((char *)"Type");

  /* "bmi_strings.pyx":17
 * cdef char* BMI_IX_undefined = "undefined"
 * cdef char* BMI_IX_type = "Type"
 * cdef char* BMI_IX_regchain = "RegularDifferentialChain"             # <<<<<<<<<<<<<<
 * cdef char* BMI_IX_dring = "DifferentialRing"
 * cdef char* BMI_IX_DLuple = "DenefLipshitzUple"
 */
  __pyx_v_19DifferentialAlgebra_BMI_IX_regchain = ((char *)"RegularDifferentialChain");

  /* "bmi_strings.pyx":18
 * cdef char* BMI_IX_type = "Type"
 * cdef char* BMI_IX_regchain = "RegularDifferentialChain"
 * cdef char* BMI_IX_dring = "DifferentialRing"             # <<<<<<<<<<<<<<
 * cdef char* BMI_IX_DLuple = "DenefLipshitzUple"
 * cdef char* BMI_IX_ascending = "ascending"
 */
  __pyx_v_19DifferentialAlgebra_BMI_IX_dring = ((char *)"DifferentialRing");

  /* "bmi_strings.pyx":19
 * cdef char* BMI_IX_regchain = "RegularDifferentialChain"
 * cdef char* BMI_IX_dring = "DifferentialRing"
 * cdef char* BMI_IX_DLuple = "DenefLipshitzUple"             # <<<<<<<<<<<<<<
 * cdef char* BMI_IX_ascending = "ascending"
 * cdef char* BMI_IX_descending = "descending"
 */
  __pyx_v_19DifferentialAlgebra_BMI_IX_DLuple = ((char *)"DenefLipshitzUple");

  /* "bmi_strings.pyx":20
 * cdef char* BMI_IX_dring = "DifferentialRing"
 * cdef char* BMI_IX_DLuple = "DenefLipshitzUple"
 * cdef char* BMI_IX_ascending = "ascending"             # <<<<<<<<<<<<<<
 * cdef char* BMI_IX_descending = "descending"
 * cdef char* BMI_IX_leader = "leader"
 */
  __pyx_v_19DifferentialAlgebra_BMI_IX_ascending = ((char *)"ascending");

  /* "bmi_strings.pyx":21
 * cdef char* BMI_IX_DLuple = "DenefLipshitzUple"
 * cdef char* BMI_IX_ascending = "ascending"
 * cdef char* BMI_IX_descending = "descending"             # <<<<<<<<<<<<<<
 * cdef char* BMI_IX_leader = "leader"
 * cdef char* BMI_IX_order = "order"
 */
  __pyx_v_19DifferentialAlgebra_BMI_IX_descending = ((char *)"descending");

  /* "bmi_strings.pyx":22
 * cdef char* BMI_IX_ascending = "ascending"
 * cdef char* BMI_IX_descending = "descending"
 * cdef char* BMI_IX_leader = "leader"             # <<<<<<<<<<<<<<
 * cdef char* BMI_IX_order = "order"
 * cdef char* BMI_IX_rank = "rank"
 */
  __pyx_v_19DifferentialAlgebra_BMI_IX_leader = ((char *)"leader");

  /* "bmi_strings.pyx":23
 * cdef char* BMI_IX_descending = "descending"
 * cdef char* BMI_IX_leader = "leader"
 * cdef char* BMI_IX_order = "order"             # <<<<<<<<<<<<<<
 * cdef char* BMI_IX_rank = "rank"
 * cdef char* BMI_IX_eq = "equal"
 */
  __pyx_v_19DifferentialAlgebra_BMI_IX_order = ((char *)"order");

  /* "bmi_strings.pyx":24
 * cdef char* BMI_IX_leader = "leader"
 * cdef char* BMI_IX_order = "order"
 * cdef char* BMI_IX_rank = "rank"             # <<<<<<<<<<<<<<
 * cdef char* BMI_IX_eq = "equal"
 * cdef char* BMI_IX_ne = "different"
 */
  __pyx_v_19DifferentialAlgebra_BMI_IX_rank = ((char *)"rank");

  /* "bmi_strings.pyx":25
 * cdef char* BMI_IX_order = "order"
 * cdef char* BMI_IX_rank = "rank"
 * cdef char* BMI_IX_eq = "equal"             # <<<<<<<<<<<<<<
 * cdef char* BMI_IX_ne = "different"
 * cdef char* BMI_IX_gt = "greater"
 */
  __pyx_v_19DifferentialAlgebra_BMI_IX_eq = ((char *)"equal");

  /* "bmi_strings.pyx":26
 * cdef char* BMI_IX_rank = "rank"
 * cdef char* BMI_IX_eq = "equal"
 * cdef char* BMI_IX_ne = "different"             # <<<<<<<<<<<<<<
 * cdef char* BMI_IX_gt = "greater"
 * cdef char* BMI_IX_ge = "greatereq"
 */
  __pyx_v_19DifferentialAlgebra_BMI_IX_ne = ((char *)"different");

  /* "bmi_strings.pyx":27
 * cdef char* BMI_IX_eq = "equal"
 * cdef char* BMI_IX_ne = "different"
 * cdef char* BMI_IX_gt = "greater"             # <<<<<<<<<<<<<<
 * cdef char* BMI_IX_ge = "greatereq"
 * cdef char* BMI_IX_lt = "less"
 */
  __pyx_v_19DifferentialAlgebra_BMI_IX_gt = ((char *)"greater");

  /* "bmi_strings.pyx":28
 * cdef char* BMI_IX_ne = "different"
 * cdef char* BMI_IX_gt = "greater"
 * cdef char* BMI_IX_ge = "greatereq"             # <<<<<<<<<<<<<<
 * cdef char* BMI_IX_lt = "less"
 * cdef char* BMI_IX_le = "lesseq"
 */
  __pyx_v_19DifferentialAlgebra_BMI_IX_ge = ((char *)"greatereq");

  /* "bmi_strings.pyx":29
 * cdef char* BMI_IX_gt = "greater"
 * cdef char* BMI_IX_ge = "greatereq"
 * cdef char* BMI_IX_lt = "less"             # <<<<<<<<<<<<<<
 * cdef char* BMI_IX_le = "lesseq"
 * cdef char* BMI_IX_identical = "identical"
 */
  __pyx_v_19DifferentialAlgebra_BMI_IX_lt = ((char *)"less");

  /* "bmi_strings.pyx":30
 * cdef char* BMI_IX_ge = "greatereq"
 * cdef char* BMI_IX_lt = "less"
 * cdef char* BMI_IX_le = "lesseq"             # <<<<<<<<<<<<<<
 * cdef char* BMI_IX_identical = "identical"
 * cdef char* BMI_IX_deriv = "derivative"
 */
  __pyx_v_19DifferentialAlgebra_BMI_IX_le = ((char *)"lesseq");

  /* "bmi_strings.pyx":31
 * cdef char* BMI_IX_lt = "less"
 * cdef char* BMI_IX_le = "lesseq"
 * cdef char* BMI_IX_identical = "identical"             # <<<<<<<<<<<<<<
 * cdef char* BMI_IX_deriv = "derivative"
 * cdef char* BMI_IX_proper = "proper"
 */
  __pyx_v_19DifferentialAlgebra_BMI_IX_identical = ((char *)"identical");

  /* "bmi_strings.pyx":32
 * cdef char* BMI_IX_le = "lesseq"
 * cdef char* BMI_IX_identical = "identical"
 * cdef char* BMI_IX_deriv = "derivative"             # <<<<<<<<<<<<<<
 * cdef char* BMI_IX_proper = "proper"
 * cdef char* BMI_IX_depvars = "depvars"
 */
  __pyx_v_19DifferentialAlgebra_BMI_IX_deriv = ((char *)"derivative");

  /* "bmi_strings.pyx":33
 * cdef char* BMI_IX_identical = "identical"
 * cdef char* BMI_IX_deriv = "derivative"
 * cdef char* BMI_IX_proper = "proper"             # <<<<<<<<<<<<<<
 * cdef char* BMI_IX_depvars = "depvars"
 * cdef char* BMI_IX_indepvars = "indepvars"
 */
  __pyx_v_19DifferentialAlgebra_BMI_IX_proper = ((char *)"proper");

  /* "bmi_strings.pyx":34
 * cdef char* BMI_IX_deriv = "derivative"
 * cdef char* BMI_IX_proper = "proper"
 * cdef char* BMI_IX_depvars = "depvars"             # <<<<<<<<<<<<<<
 * cdef char* BMI_IX_indepvars = "indepvars"
 * cdef char* BMI_IX_derivs = "derivatives"
 */
  __pyx_v_19DifferentialAlgebra_BMI_IX_depvars = ((char *)"depvars");

  /* "bmi_strings.pyx":35
 * cdef char* BMI_IX_proper = "proper"
 * cdef char* BMI_IX_depvars = "depvars"
 * cdef char* BMI_IX_indepvars = "indepvars"             # <<<<<<<<<<<<<<
 * cdef char* BMI_IX_derivs = "derivatives"
 * cdef char* BMI_IX_allvars = "allvars"
 */
  __pyx_v_19DifferentialAlgebra_BMI_IX_indepvars = ((char *)"indepvars");

  /* "bmi_strings.pyx":36
 * cdef char* BMI_IX_depvars = "depvars"
 * cdef char* BMI_IX_indepvars = "indepvars"
 * cdef char* BMI_IX_derivs = "derivatives"             # <<<<<<<<<<<<<<
 * cdef char* BMI_IX_allvars = "allvars"
 * cdef char* BMI_IX_params = "parameters"
 */
  __pyx_v_19DifferentialAlgebra_BMI_IX_derivs = ((char *)"derivatives");

  /* "bmi_strings.pyx":37
 * cdef char* BMI_IX_indepvars = "indepvars"
 * cdef char* BMI_IX_derivs = "derivatives"
 * cdef char* BMI_IX_allvars = "allvars"             # <<<<<<<<<<<<<<
 * cdef char* BMI_IX_params = "parameters"
 * cdef char* BMI_IX_constants = "constants"
 */
  __pyx_v_19DifferentialAlgebra_BMI_IX_allvars = ((char *)"allvars");

  /* "bmi_strings.pyx":38
 * cdef char* BMI_IX_derivs = "derivatives"
 * cdef char* BMI_IX_allvars = "allvars"
 * cdef char* BMI_IX_params = "parameters"             # <<<<<<<<<<<<<<
 * cdef char* BMI_IX_constants = "constants"
 * cdef char* BMI_IX_fully = "full"
 */
  __pyx_v_19DifferentialAlgebra_BMI_IX_params = ((char *)"parameters");

  /* "bmi_strings.pyx":39
 * cdef char* BMI_IX_allvars = "allvars"
 * cdef char* BMI_IX_params = "parameters"
 * cdef char* BMI_IX_constants = "constants"             # <<<<<<<<<<<<<<
 * cdef char* BMI_IX_fully = "full"
 * cdef char* BMI_IX_partially = "partial"
 */
  __pyx_v_19DifferentialAlgebra_BMI_IX_constants = ((char *)"constants");

  /* "bmi_strings.pyx":40
 * cdef char* BMI_IX_params = "parameters"
 * cdef char* BMI_IX_constants = "constants"
 * cdef char* BMI_IX_fully = "full"             # <<<<<<<<<<<<<<
 * cdef char* BMI_IX_partially = "partial"
 * cdef char* BMI_IX_algebraically = "algebraic"
 */
  __pyx_v_19DifferentialAlgebra_BMI_IX_fully = ((char *)"full");

  /* "bmi_strings.pyx":41
 * cdef char* BMI_IX_constants = "constants"
 * cdef char* BMI_IX_fully = "full"
 * cdef char* BMI_IX_partially = "partial"             # <<<<<<<<<<<<<<
 * cdef char* BMI_IX_algebraically = "algebraic"
 * cdef char* BMI_IX_all = "all"
 */
  __pyx_v_19DifferentialAlgebra_BMI_IX_partially = ((char *)"partial");

  /* "bmi_strings.pyx":42
 * cdef char* BMI_IX_fully = "full"
 * cdef char* BMI_IX_partially = "partial"
 * cdef char* BMI_IX_algebraically = "algebraic"             # <<<<<<<<<<<<<<
 * cdef char* BMI_IX_all = "all"
 * cdef char* BMI_IX_none = "none"
 */
  __pyx_v_19DifferentialAlgebra_BMI_IX_algebraically = ((char *)"algebraic");

  /* "bmi_strings.pyx":43
 * cdef char* BMI_IX_partially = "partial"
 * cdef char* BMI_IX_algebraically = "algebraic"
 * cdef char* BMI_IX_all = "all"             # <<<<<<<<<<<<<<
 * cdef char* BMI_IX_none = "none"
 * cdef char* BMI_IX_essential = "essential"
 */
  __pyx_v_19DifferentialAlgebra_BMI_IX_all = ((char *)"all");

  /* "bmi_strings.pyx":44
 * cdef char* BMI_IX_algebraically = "algebraic"
 * cdef char* BMI_IX_all = "all"
 * cdef char* BMI_IX_none = "none"             # <<<<<<<<<<<<<<
 * cdef char* BMI_IX_essential = "essential"
 * cdef char* BMI_IX_nocase = "nocase"
 */
  __pyx_v_19DifferentialAlgebra_BMI_IX_none = ((char *)"none");

  /* "bmi_strings.pyx":45
 * cdef char* BMI_IX_all = "all"
 * cdef char* BMI_IX_none = "none"
 * cdef char* BMI_IX_essential = "essential"             # <<<<<<<<<<<<<<
 * cdef char* BMI_IX_nocase = "nocase"
 * cdef char* BMI_IX_safecase = "safecase"
 */
  __pyx_v_19DifferentialAlgebra_BMI_IX_essential = ((char *)"essential");

  /* "bmi_strings.pyx":46
 * cdef char* BMI_IX_none = "none"
 * cdef char* BMI_IX_essential = "essential"
 * cdef char* BMI_IX_nocase = "nocase"             # <<<<<<<<<<<<<<
 * cdef char* BMI_IX_safecase = "safecase"
 * cdef char* BMI_IX_odecase = "odecase"
 */
  __pyx_v_19DifferentialAlgebra_BMI_IX_nocase = ((char *)"nocase");

  /* "bmi_strings.pyx":47
 * cdef char* BMI_IX_essential = "essential"
 * cdef char* BMI_IX_nocase = "nocase"
 * cdef char* BMI_IX_safecase = "safecase"             # <<<<<<<<<<<<<<
 * cdef char* BMI_IX_odecase = "odecase"
 * cdef char* BMI_IX_pdecase = "pdecase"
 */
  __pyx_v_19DifferentialAlgebra_BMI_IX_safecase = ((char *)"safecase");

  /* "bmi_strings.pyx":48
 * cdef char* BMI_IX_nocase = "nocase"
 * cdef char* BMI_IX_safecase = "safecase"
 * cdef char* BMI_IX_odecase = "odecase"             # <<<<<<<<<<<<<<
 * cdef char* BMI_IX_pdecase = "pdecase"
 * cdef char* BMI_IX_single = "single"
 */
  __pyx_v_19DifferentialAlgebra_BMI_IX_odecase = ((char *)"odecase");

  /* "bmi_strings.pyx":49
 * cdef char* BMI_IX_safecase = "safecase"
 * cdef char* BMI_IX_odecase = "odecase"
 * cdef char* BMI_IX_pdecase = "pdecase"             # <<<<<<<<<<<<<<
 * cdef char* BMI_IX_single = "single"
 * cdef char* BMI_IX_vector = "vector"
 */
  __pyx_v_19DifferentialAlgebra_BMI_IX_pdecase = ((char *)"pdecase");

  /* "bmi_strings.pyx":50
 * cdef char* BMI_IX_odecase = "odecase"
 * cdef char* BMI_IX_pdecase = "pdecase"
 * cdef char* BMI_IX_single = "single"             # <<<<<<<<<<<<<<
 * cdef char* BMI_IX_vector = "vector"
 */
  __pyx_v_19DifferentialAlgebra_BMI_IX_single = ((char *)"single");

  /* "bmi_strings.pyx":51
 * cdef char* BMI_IX_pdecase = "pdecase"
 * cdef char* BMI_IX_single = "single"
 * cdef char* BMI_IX_vector = "vector"             # <<<<<<<<<<<<<<
 */
  __pyx_v_19DifferentialAlgebra_BMI_IX_vector = ((char *)"vector");

  /* "../../bmi/sympy/DifferentialRing.pyx":257
 * 
 * # __process_notation
 *     def __process_notation (self, notation) :             # <<<<<<<<<<<<<<
 *         cdef strnot
 *         if not isinstance (notation, str) :
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_19DifferentialAlgebra_16DifferentialRing_1_DifferentialRing__process_notation, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_DifferentialRing___process_notat, NULL, __pyx_n_s_DifferentialAlgebra, __pyx_d, ((PyObject *)__pyx_codeobj__91)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 257, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_19DifferentialAlgebra_DifferentialRing, __pyx_n_s_DifferentialRing__process_notat, __pyx_t_3) < 0) __PYX_ERR(0, 257, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_19DifferentialAlgebra_DifferentialRing);

  /* "../../bmi/sympy/DifferentialRing.pyx":269
 * 
 * # __listof_symbols
 *     def __listof_symbols (self, expr, subrankings, pattern) :             # <<<<<<<<<<<<<<
 *         cdef L
 *         if expr is None :
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_19DifferentialAlgebra_16DifferentialRing_3_DifferentialRing__listof_symbols, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_DifferentialRing___listof_symbol, NULL, __pyx_n_s_DifferentialAlgebra, __pyx_d, ((PyObject *)__pyx_codeobj__93)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 269, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_19DifferentialAlgebra_DifferentialRing, __pyx_n_s_DifferentialRing__listof_symbol, __pyx_t_3) < 0) __PYX_ERR(0, 269, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_19DifferentialAlgebra_DifferentialRing);

  /* "../../bmi/sympy/DifferentialRing.pyx":302
 *     def __init__ (
 *                 self,
 *                 list derivations = [],             # <<<<<<<<<<<<<<
 *                 list blocks = [],
 *                 list parameters = [],
 */
  __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 302, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_k__2 = ((PyObject*)__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_3);
  __pyx_t_3 = 0;

  /* "../../bmi/sympy/DifferentialRing.pyx":303
 *                 self,
 *                 list derivations = [],
 *                 list blocks = [],             # <<<<<<<<<<<<<<
 *                 list parameters = [],
 *                 notation = BMI_IX_undefined):
 */
  __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 303, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_k__3 = ((PyObject*)__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_3);
  __pyx_t_3 = 0;

  /* "../../bmi/sympy/DifferentialRing.pyx":304
 *                 list derivations = [],
 *                 list blocks = [],
 *                 list parameters = [],             # <<<<<<<<<<<<<<
 *                 notation = BMI_IX_undefined):
 *         r"""
 */
  __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 304, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_k__4 = ((PyObject*)__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_3);
  __pyx_t_3 = 0;

  /* "../../bmi/sympy/DifferentialRing.pyx":305
 *                 list blocks = [],
 *                 list parameters = [],
 *                 notation = BMI_IX_undefined):             # <<<<<<<<<<<<<<
 *         r"""
 *         Constructor of DifferentialRing
 */
  __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v_19DifferentialAlgebra_BMI_IX_undefined); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 305, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_k__5 = __pyx_t_3;
  __Pyx_GIVEREF(__pyx_t_3);
  __pyx_t_3 = 0;

  /* "../../bmi/sympy/DifferentialRing.pyx":370
 *         return 'differential_ring'
 * 
 *     def _latex (self):             # <<<<<<<<<<<<<<
 * #   The LaTeX representation
 *         return 'differential\\_ring'
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_19DifferentialAlgebra_16DifferentialRing_11_latex, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_DifferentialRing__latex, NULL, __pyx_n_s_DifferentialAlgebra, __pyx_d, ((PyObject *)__pyx_codeobj__95)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 370, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_19DifferentialAlgebra_DifferentialRing, __pyx_n_s_latex, __pyx_t_3) < 0) __PYX_ERR(0, 370, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_19DifferentialAlgebra_DifferentialRing);

  /* "../../bmi/sympy/DifferentialRing.pyx":380
 *             variable = None,
 *             BaseFieldExtension basefield = None,
 *             notation = BMI_IX_undefined):             # <<<<<<<<<<<<<<
 *         r"""
 *         The coefficients and monomials of a differential fraction
 */
  __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v_19DifferentialAlgebra_BMI_IX_undefined); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 380, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_k__9 = __pyx_t_3;
  __Pyx_GIVEREF(__pyx_t_3);
  __pyx_t_3 = 0;

  /* "../../bmi/sympy/DifferentialRing.pyx":379
 *             equation,
 *             variable = None,
 *             BaseFieldExtension basefield = None,             # <<<<<<<<<<<<<<
 *             notation = BMI_IX_undefined):
 *         r"""
 */
  __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v_19DifferentialAlgebra_BMI_IX_undefined); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 380, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "../../bmi/sympy/DifferentialRing.pyx":375
 * 
 * # coeffs
 *     def coeffs (             # <<<<<<<<<<<<<<
 *             self,
 *             equation,
 */
  __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 375, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, Py_None)) __PYX_ERR(0, 375, __pyx_L1_error);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, Py_None)) __PYX_ERR(0, 375, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_3);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_t_3)) __PYX_ERR(0, 375, __pyx_L1_error);
  __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_19DifferentialAlgebra_16DifferentialRing_13coeffs, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_DifferentialRing_coeffs, NULL, __pyx_n_s_DifferentialAlgebra, __pyx_d, ((PyObject *)__pyx_codeobj__97)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 375, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_3, __pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_19DifferentialAlgebra_DifferentialRing, __pyx_n_s_coeffs, __pyx_t_3) < 0) __PYX_ERR(0, 375, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_19DifferentialAlgebra_DifferentialRing);

  /* "../../bmi/sympy/DifferentialRing.pyx":567
 *             bool solved = False,
 *             selection = None,
 *             notation = BMI_IX_undefined):             # <<<<<<<<<<<<<<
 *         r"""
 *         A selection in a list of polynomials
 */
  __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v_19DifferentialAlgebra_BMI_IX_undefined); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 567, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_k__11 = __pyx_t_3;
  __Pyx_GIVEREF(__pyx_t_3);
  __pyx_t_3 = 0;

  /* "../../bmi/sympy/DifferentialRing.pyx":566
 *             equations,
 *             bool solved = False,
 *             selection = None,             # <<<<<<<<<<<<<<
 *             notation = BMI_IX_undefined):
 *         r"""
 */
  __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v_19DifferentialAlgebra_BMI_IX_undefined); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 567, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "../../bmi/sympy/DifferentialRing.pyx":562
 * 
 * # equations
 *     def equations (             # <<<<<<<<<<<<<<
 *             self,
 *             equations,
 */
  __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 562, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(Py_False);
  __Pyx_GIVEREF(Py_False);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, Py_False)) __PYX_ERR(0, 562, __pyx_L1_error);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, Py_None)) __PYX_ERR(0, 562, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_3);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_t_3)) __PYX_ERR(0, 562, __pyx_L1_error);
  __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_19DifferentialAlgebra_16DifferentialRing_15equations, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_DifferentialRing_equations, NULL, __pyx_n_s_DifferentialAlgebra, __pyx_d, ((PyObject *)__pyx_codeobj__99)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 562, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_3, __pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_19DifferentialAlgebra_DifferentialRing, __pyx_n_s_equations, __pyx_t_3) < 0) __PYX_ERR(0, 562, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_19DifferentialAlgebra_DifferentialRing);

  /* "../../bmi/sympy/DifferentialRing.pyx":698
 * 
 * # __process_evdict
 *     def __process_evdict (             # <<<<<<<<<<<<<<
 *             self,
 *             evdict0) :
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_19DifferentialAlgebra_16DifferentialRing_17_DifferentialRing__process_evdict, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_DifferentialRing___process_evdic, NULL, __pyx_n_s_DifferentialAlgebra, __pyx_d, ((PyObject *)__pyx_codeobj__101)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 698, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_19DifferentialAlgebra_DifferentialRing, __pyx_n_s_DifferentialRing__process_evdic, __pyx_t_3) < 0) __PYX_ERR(0, 698, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_19DifferentialAlgebra_DifferentialRing);

  /* "../../bmi/sympy/DifferentialRing.pyx":741
 * 
 * # __evaluate
 *     def __evaluate (             # <<<<<<<<<<<<<<
 *             self,
 *             P,
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_19DifferentialAlgebra_16DifferentialRing_19_DifferentialRing__evaluate, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_DifferentialRing___evaluate, NULL, __pyx_n_s_DifferentialAlgebra, __pyx_d, ((PyObject *)__pyx_codeobj__103)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 741, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_19DifferentialAlgebra_DifferentialRing, __pyx_n_s_DifferentialRing__evaluate, __pyx_t_3) < 0) __PYX_ERR(0, 741, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_19DifferentialAlgebra_DifferentialRing);

  /* "../../bmi/sympy/DifferentialRing.pyx":779
 * 
 * # evaluate
 *     def evaluate (             # <<<<<<<<<<<<<<
 *             self,
 *             P,
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_19DifferentialAlgebra_16DifferentialRing_21evaluate, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_DifferentialRing_evaluate, NULL, __pyx_n_s_DifferentialAlgebra, __pyx_d, ((PyObject *)__pyx_codeobj__105)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 779, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_19DifferentialAlgebra_DifferentialRing, __pyx_n_s_evaluate, __pyx_t_3) < 0) __PYX_ERR(0, 779, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_19DifferentialAlgebra_DifferentialRing);

  /* "../../bmi/sympy/DifferentialRing.pyx":883
 *             self,
 *             derivative,
 *             notation = BMI_IX_undefined):             # <<<<<<<<<<<<<<
 *         r"""
 *         Split a derivative into derivation operator and variable
 */
  __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v_19DifferentialAlgebra_BMI_IX_undefined); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 883, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_k__12 = __pyx_t_3;
  __Pyx_GIVEREF(__pyx_t_3);
  __pyx_t_3 = 0;

  /* "../../bmi/sympy/DifferentialRing.pyx":880
 * 
 * # factor_derivative
 *     def factor_derivative (             # <<<<<<<<<<<<<<
 *             self,
 *             derivative,
 */
  __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v_19DifferentialAlgebra_BMI_IX_undefined); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 883, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 880, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_3);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3)) __PYX_ERR(0, 880, __pyx_L1_error);
  __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_19DifferentialAlgebra_16DifferentialRing_23factor_derivative, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_DifferentialRing_factor_derivati, NULL, __pyx_n_s_DifferentialAlgebra, __pyx_d, ((PyObject *)__pyx_codeobj__107)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 880, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_3, __pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_19DifferentialAlgebra_DifferentialRing, __pyx_n_s_factor_derivative, __pyx_t_3) < 0) __PYX_ERR(0, 880, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_19DifferentialAlgebra_DifferentialRing);

  /* "../../bmi/sympy/DifferentialRing.pyx":966
 *                 self,
 *                 equations = None,
 *                 selection = BMI_IX_derivs,             # <<<<<<<<<<<<<<
 *                 derivation = None,
 *                 notation = BMI_IX_undefined):
 */
  __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v_19DifferentialAlgebra_BMI_IX_derivs); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 966, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_k__13 = __pyx_t_3;
  __Pyx_GIVEREF(__pyx_t_3);
  __pyx_t_3 = 0;

  /* "../../bmi/sympy/DifferentialRing.pyx":968
 *                 selection = BMI_IX_derivs,
 *                 derivation = None,
 *                 notation = BMI_IX_undefined):             # <<<<<<<<<<<<<<
 *         r"""
 *         The indeterminates of a DifferentialRing or a rational fraction
 */
  __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v_19DifferentialAlgebra_BMI_IX_undefined); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 968, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_k__14 = __pyx_t_3;
  __Pyx_GIVEREF(__pyx_t_3);
  __pyx_t_3 = 0;

  /* "../../bmi/sympy/DifferentialRing.pyx":966
 *                 self,
 *                 equations = None,
 *                 selection = BMI_IX_derivs,             # <<<<<<<<<<<<<<
 *                 derivation = None,
 *                 notation = BMI_IX_undefined):
 */
  __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v_19DifferentialAlgebra_BMI_IX_derivs); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 966, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "../../bmi/sympy/DifferentialRing.pyx":968
 *                 selection = BMI_IX_derivs,
 *                 derivation = None,
 *                 notation = BMI_IX_undefined):             # <<<<<<<<<<<<<<
 *         r"""
 *         The indeterminates of a DifferentialRing or a rational fraction
 */
  __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v_19DifferentialAlgebra_BMI_IX_undefined); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 968, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);

  /* "../../bmi/sympy/DifferentialRing.pyx":963
 * 
 * # indets
 *     def indets (             # <<<<<<<<<<<<<<
 *                 self,
 *                 equations = None,
 */
  __pyx_t_4 = PyTuple_New(4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 963, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, Py_None)) __PYX_ERR(0, 963, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_3);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3)) __PYX_ERR(0, 963, __pyx_L1_error);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 2, Py_None)) __PYX_ERR(0, 963, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_2);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 3, __pyx_t_2)) __PYX_ERR(0, 963, __pyx_L1_error);
  __pyx_t_3 = 0;
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_19DifferentialAlgebra_16DifferentialRing_25indets, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_DifferentialRing_indets, NULL, __pyx_n_s_DifferentialAlgebra, __pyx_d, ((PyObject *)__pyx_codeobj__109)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 963, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_t_4);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_19DifferentialAlgebra_DifferentialRing, __pyx_n_s_indets, __pyx_t_2) < 0) __PYX_ERR(0, 963, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_19DifferentialAlgebra_DifferentialRing);

  /* "../../bmi/sympy/DifferentialRing.pyx":1066
 *             self,
 *             equations,
 *             notation = BMI_IX_undefined):             # <<<<<<<<<<<<<<
 *         r"""
 *         Test if an expression is a rational differential fraction
 */
  __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v_19DifferentialAlgebra_BMI_IX_undefined); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1066, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_k__15 = __pyx_t_2;
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;

  /* "../../bmi/sympy/DifferentialRing.pyx":1063
 * 
 * # is_differential_fraction
 *     def is_differential_fraction (             # <<<<<<<<<<<<<<
 *             self,
 *             equations,
 */
  __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v_19DifferentialAlgebra_BMI_IX_undefined); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1066, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1063, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_2);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2)) __PYX_ERR(0, 1063, __pyx_L1_error);
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_19DifferentialAlgebra_16DifferentialRing_27is_differential_fraction, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_DifferentialRing_is_differential, NULL, __pyx_n_s_DifferentialAlgebra, __pyx_d, ((PyObject *)__pyx_codeobj__111)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1063, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_t_4);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_19DifferentialAlgebra_DifferentialRing, __pyx_n_s_is_differential_fraction, __pyx_t_2) < 0) __PYX_ERR(0, 1063, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_19DifferentialAlgebra_DifferentialRing);

  /* "../../bmi/sympy/DifferentialRing.pyx":1115
 *             ratfrac,
 *             derivation = None,
 *             notation = BMI_IX_undefined):             # <<<<<<<<<<<<<<
 *         r"""
 *         Test if a rational fraction is constant
 */
  __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v_19DifferentialAlgebra_BMI_IX_undefined); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1115, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_k__17 = __pyx_t_2;
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;

  /* "../../bmi/sympy/DifferentialRing.pyx":1114
 *             self,
 *             ratfrac,
 *             derivation = None,             # <<<<<<<<<<<<<<
 *             notation = BMI_IX_undefined):
 *         r"""
 */
  __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v_19DifferentialAlgebra_BMI_IX_undefined); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1115, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);

  /* "../../bmi/sympy/DifferentialRing.pyx":1111
 * 
 * # is_constant
 *     def is_constant (             # <<<<<<<<<<<<<<
 *             self,
 *             ratfrac,
 */
  __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1111, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, Py_None)) __PYX_ERR(0, 1111, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_2);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_2)) __PYX_ERR(0, 1111, __pyx_L1_error);
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_19DifferentialAlgebra_16DifferentialRing_29is_constant, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_DifferentialRing_is_constant, NULL, __pyx_n_s_DifferentialAlgebra, __pyx_d, ((PyObject *)__pyx_codeobj__113)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1111, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_t_4);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_19DifferentialAlgebra_DifferentialRing, __pyx_n_s_is_constant, __pyx_t_2) < 0) __PYX_ERR(0, 1111, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_19DifferentialAlgebra_DifferentialRing);

  /* "../../bmi/sympy/DifferentialRing.pyx":1176
 *             self,
 *             equations,
 *             notation = BMI_IX_undefined):             # <<<<<<<<<<<<<<
 *         r"""
 *         The leading derivative of a rational fraction
 */
  __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v_19DifferentialAlgebra_BMI_IX_undefined); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1176, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_k__18 = __pyx_t_2;
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;

  /* "../../bmi/sympy/DifferentialRing.pyx":1173
 * 
 * # leading_derivative
 *     def leading_derivative (             # <<<<<<<<<<<<<<
 *             self,
 *             equations,
 */
  __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v_19DifferentialAlgebra_BMI_IX_undefined); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1176, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1173, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_2);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2)) __PYX_ERR(0, 1173, __pyx_L1_error);
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_19DifferentialAlgebra_16DifferentialRing_31leading_derivative, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_DifferentialRing_leading_derivat, NULL, __pyx_n_s_DifferentialAlgebra, __pyx_d, ((PyObject *)__pyx_codeobj__115)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1173, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_t_4);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_19DifferentialAlgebra_DifferentialRing, __pyx_n_s_leading_derivative, __pyx_t_2) < 0) __PYX_ERR(0, 1173, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_19DifferentialAlgebra_DifferentialRing);

  /* "../../bmi/sympy/DifferentialRing.pyx":1243
 *             equations,
 *             bool listform = False,
 *             notation = BMI_IX_undefined):             # <<<<<<<<<<<<<<
 *         r"""
 *         The leading rank of a rational fraction
 */
  __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v_19DifferentialAlgebra_BMI_IX_undefined); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1243, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_k__19 = __pyx_t_2;
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;

  /* "../../bmi/sympy/DifferentialRing.pyx":1242
 *             self,
 *             equations,
 *             bool listform = False,             # <<<<<<<<<<<<<<
 *             notation = BMI_IX_undefined):
 *         r"""
 */
  __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v_19DifferentialAlgebra_BMI_IX_undefined); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1243, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);

  /* "../../bmi/sympy/DifferentialRing.pyx":1239
 * 
 * # leading_rank
 *     def leading_rank (             # <<<<<<<<<<<<<<
 *             self,
 *             equations,
 */
  __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1239, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_INCREF(Py_False);
  __Pyx_GIVEREF(Py_False);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, Py_False)) __PYX_ERR(0, 1239, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_2);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_2)) __PYX_ERR(0, 1239, __pyx_L1_error);
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_19DifferentialAlgebra_16DifferentialRing_33leading_rank, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_DifferentialRing_leading_rank, NULL, __pyx_n_s_DifferentialAlgebra, __pyx_d, ((PyObject *)__pyx_codeobj__117)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1239, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_t_4);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_19DifferentialAlgebra_DifferentialRing, __pyx_n_s_leading_rank, __pyx_t_2) < 0) __PYX_ERR(0, 1239, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_19DifferentialAlgebra_DifferentialRing);

  /* "../../bmi/sympy/DifferentialRing.pyx":1338
 *             self,
 *             equations,
 *             notation = BMI_IX_undefined):             # <<<<<<<<<<<<<<
 *         r"""
 *         The initial of a polynomial or a rational fraction
 */
  __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v_19DifferentialAlgebra_BMI_IX_undefined); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1338, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_k__20 = __pyx_t_2;
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;

  /* "../../bmi/sympy/DifferentialRing.pyx":1335
 * 
 * # initial
 *     def initial (             # <<<<<<<<<<<<<<
 *             self,
 *             equations,
 */
  __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v_19DifferentialAlgebra_BMI_IX_undefined); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1338, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1335, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_2);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2)) __PYX_ERR(0, 1335, __pyx_L1_error);
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_19DifferentialAlgebra_16DifferentialRing_35initial, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_DifferentialRing_initial, NULL, __pyx_n_s_DifferentialAlgebra, __pyx_d, ((PyObject *)__pyx_codeobj__119)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1335, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_t_4);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_19DifferentialAlgebra_DifferentialRing, __pyx_n_s_initial, __pyx_t_2) < 0) __PYX_ERR(0, 1335, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_19DifferentialAlgebra_DifferentialRing);

  /* "../../bmi/sympy/DifferentialRing.pyx":1412
 *             equations,
 *             variable = None,
 *             notation = BMI_IX_undefined):             # <<<<<<<<<<<<<<
 *         r"""
 *         The leading coefficient of a rational fraction
 */
  __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v_19DifferentialAlgebra_BMI_IX_undefined); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1412, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_k__21 = __pyx_t_2;
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;

  /* "../../bmi/sympy/DifferentialRing.pyx":1411
 *             self,
 *             equations,
 *             variable = None,             # <<<<<<<<<<<<<<
 *             notation = BMI_IX_undefined):
 *         r"""
 */
  __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v_19DifferentialAlgebra_BMI_IX_undefined); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1412, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);

  /* "../../bmi/sympy/DifferentialRing.pyx":1408
 * 
 * # leading_coefficient
 *     def leading_coefficient (             # <<<<<<<<<<<<<<
 *             self,
 *             equations,
 */
  __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1408, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, Py_None)) __PYX_ERR(0, 1408, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_2);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_2)) __PYX_ERR(0, 1408, __pyx_L1_error);
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_19DifferentialAlgebra_16DifferentialRing_37leading_coefficient, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_DifferentialRing_leading_coeffic, NULL, __pyx_n_s_DifferentialAlgebra, __pyx_d, ((PyObject *)__pyx_codeobj__121)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1408, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_t_4);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_19DifferentialAlgebra_DifferentialRing, __pyx_n_s_leading_coefficient, __pyx_t_2) < 0) __PYX_ERR(0, 1408, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_19DifferentialAlgebra_DifferentialRing);

  /* "../../bmi/sympy/DifferentialRing.pyx":1517
 *             equations,
 *             variable = None,
 *             notation = BMI_IX_undefined):             # <<<<<<<<<<<<<<
 *         r"""
 *         The tail of a rational fraction
 */
  __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v_19DifferentialAlgebra_BMI_IX_undefined); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1517, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_k__22 = __pyx_t_2;
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;

  /* "../../bmi/sympy/DifferentialRing.pyx":1516
 *             self,
 *             equations,
 *             variable = None,             # <<<<<<<<<<<<<<
 *             notation = BMI_IX_undefined):
 *         r"""
 */
  __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v_19DifferentialAlgebra_BMI_IX_undefined); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1517, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);

  /* "../../bmi/sympy/DifferentialRing.pyx":1513
 * 
 * # tail
 *     def tail (             # <<<<<<<<<<<<<<
 *             self,
 *             equations,
 */
  __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1513, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, Py_None)) __PYX_ERR(0, 1513, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_2);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_2)) __PYX_ERR(0, 1513, __pyx_L1_error);
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_19DifferentialAlgebra_16DifferentialRing_39tail, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_DifferentialRing_tail, NULL, __pyx_n_s_DifferentialAlgebra, __pyx_d, ((PyObject *)__pyx_codeobj__122)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1513, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_t_4);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_19DifferentialAlgebra_DifferentialRing, __pyx_n_s_tail, __pyx_t_2) < 0) __PYX_ERR(0, 1513, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_19DifferentialAlgebra_DifferentialRing);

  /* "../../bmi/sympy/DifferentialRing.pyx":1639
 *             equations,
 *             variable = None,
 *             notation = BMI_IX_undefined):             # <<<<<<<<<<<<<<
 *         r"""
 *         The separant of a rational fraction
 */
  __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v_19DifferentialAlgebra_BMI_IX_undefined); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1639, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_k__23 = __pyx_t_2;
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;

  /* "../../bmi/sympy/DifferentialRing.pyx":1638
 *             self,
 *             equations,
 *             variable = None,             # <<<<<<<<<<<<<<
 *             notation = BMI_IX_undefined):
 *         r"""
 */
  __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v_19DifferentialAlgebra_BMI_IX_undefined); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1639, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);

  /* "../../bmi/sympy/DifferentialRing.pyx":1635
 * 
 * # separant
 *     def separant (             # <<<<<<<<<<<<<<
 *             self,
 *             equations,
 */
  __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1635, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, Py_None)) __PYX_ERR(0, 1635, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_2);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_2)) __PYX_ERR(0, 1635, __pyx_L1_error);
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_19DifferentialAlgebra_16DifferentialRing_41separant, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_DifferentialRing_separant, NULL, __pyx_n_s_DifferentialAlgebra, __pyx_d, ((PyObject *)__pyx_codeobj__123)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1635, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_t_4);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_19DifferentialAlgebra_DifferentialRing, __pyx_n_s_separant, __pyx_t_2) < 0) __PYX_ERR(0, 1635, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_19DifferentialAlgebra_DifferentialRing);

  /* "../../bmi/sympy/DifferentialRing.pyx":1740
 *             variable,
 *             bool iterated = True,
 *             notation = BMI_IX_undefined):             # <<<<<<<<<<<<<<
 *         r"""
 *         Integrate a rational differential fraction
 */
  __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v_19DifferentialAlgebra_BMI_IX_undefined); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1740, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_k__24 = __pyx_t_2;
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;

  /* "../../bmi/sympy/DifferentialRing.pyx":1739
 *             equations,
 *             variable,
 *             bool iterated = True,             # <<<<<<<<<<<<<<
 *             notation = BMI_IX_undefined):
 *         r"""
 */
  __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v_19DifferentialAlgebra_BMI_IX_undefined); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1740, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);

  /* "../../bmi/sympy/DifferentialRing.pyx":1735
 * 
 * # integrate
 *     def integrate (             # <<<<<<<<<<<<<<
 *             self,
 *             equations,
 */
  __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1735, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_INCREF(Py_True);
  __Pyx_GIVEREF(Py_True);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, Py_True)) __PYX_ERR(0, 1735, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_2);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_2)) __PYX_ERR(0, 1735, __pyx_L1_error);
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_19DifferentialAlgebra_16DifferentialRing_43integrate, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_DifferentialRing_integrate, NULL, __pyx_n_s_DifferentialAlgebra, __pyx_d, ((PyObject *)__pyx_codeobj__125)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1735, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_t_4);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_19DifferentialAlgebra_DifferentialRing, __pyx_n_s_integrate, __pyx_t_2) < 0) __PYX_ERR(0, 1735, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_19DifferentialAlgebra_DifferentialRing);

  /* "../../bmi/sympy/DifferentialRing.pyx":1858
 *             equations,
 *             *args,
 *             notation = BMI_IX_undefined):             # <<<<<<<<<<<<<<
 *         r"""
 *         Differentiate a rational differential fraction
 */
  __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v_19DifferentialAlgebra_BMI_IX_undefined); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1858, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_k__25 = __pyx_t_2;
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;

  /* "../../bmi/sympy/DifferentialRing.pyx":1854
 * 
 * # differentiate
 *     def differentiate (             # <<<<<<<<<<<<<<
 *             self,
 *             equations,
 */
  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1854, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);

  /* "../../bmi/sympy/DifferentialRing.pyx":1858
 *             equations,
 *             *args,
 *             notation = BMI_IX_undefined):             # <<<<<<<<<<<<<<
 *         r"""
 *         Differentiate a rational differential fraction
 */
  __pyx_t_4 = __Pyx_PyBytes_FromString(__pyx_v_19DifferentialAlgebra_BMI_IX_undefined); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1858, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_notation, __pyx_t_4) < 0) __PYX_ERR(0, 1854, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "../../bmi/sympy/DifferentialRing.pyx":1854
 * 
 * # differentiate
 *     def differentiate (             # <<<<<<<<<<<<<<
 *             self,
 *             equations,
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_19DifferentialAlgebra_16DifferentialRing_45differentiate, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_DifferentialRing_differentiate, NULL, __pyx_n_s_DifferentialAlgebra, __pyx_d, ((PyObject *)__pyx_codeobj__127)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1854, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_CyFunction_SetDefaultsKwDict(__pyx_t_4, __pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_19DifferentialAlgebra_DifferentialRing, __pyx_n_s_differentiate, __pyx_t_4) < 0) __PYX_ERR(0, 1854, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  PyType_Modified(__pyx_ptype_19DifferentialAlgebra_DifferentialRing);

  /* "../../bmi/sympy/DifferentialRing.pyx":1940
 *              polynomial,
 *              list redset,
 *              mode = BMI_IX_fully,             # <<<<<<<<<<<<<<
 *              notation = BMI_IX_undefined):
 *         r"""
 */
  __pyx_t_4 = __Pyx_PyBytes_FromString(__pyx_v_19DifferentialAlgebra_BMI_IX_fully); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1940, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_k__26 = __pyx_t_4;
  __Pyx_GIVEREF(__pyx_t_4);
  __pyx_t_4 = 0;

  /* "../../bmi/sympy/DifferentialRing.pyx":1941
 *              list redset,
 *              mode = BMI_IX_fully,
 *              notation = BMI_IX_undefined):             # <<<<<<<<<<<<<<
 *         r"""
 *         Ritt's reduction algorithm by a set of polynomials
 */
  __pyx_t_4 = __Pyx_PyBytes_FromString(__pyx_v_19DifferentialAlgebra_BMI_IX_undefined); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1941, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_k__27 = __pyx_t_4;
  __Pyx_GIVEREF(__pyx_t_4);
  __pyx_t_4 = 0;

  /* "../../bmi/sympy/DifferentialRing.pyx":1940
 *              polynomial,
 *              list redset,
 *              mode = BMI_IX_fully,             # <<<<<<<<<<<<<<
 *              notation = BMI_IX_undefined):
 *         r"""
 */
  __pyx_t_4 = __Pyx_PyBytes_FromString(__pyx_v_19DifferentialAlgebra_BMI_IX_fully); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1940, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);

  /* "../../bmi/sympy/DifferentialRing.pyx":1941
 *              list redset,
 *              mode = BMI_IX_fully,
 *              notation = BMI_IX_undefined):             # <<<<<<<<<<<<<<
 *         r"""
 *         Ritt's reduction algorithm by a set of polynomials
 */
  __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v_19DifferentialAlgebra_BMI_IX_undefined); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1941, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);

  /* "../../bmi/sympy/DifferentialRing.pyx":1936
 * 
 * # differential_prem
 *     def differential_prem (             # <<<<<<<<<<<<<<
 *              self,
 *              polynomial,
 */
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1936, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_4);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4)) __PYX_ERR(0, 1936, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_2);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2)) __PYX_ERR(0, 1936, __pyx_L1_error);
  __pyx_t_4 = 0;
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_19DifferentialAlgebra_16DifferentialRing_47differential_prem, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_DifferentialRing_differential_pr, NULL, __pyx_n_s_DifferentialAlgebra, __pyx_d, ((PyObject *)__pyx_codeobj__129)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1936, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_t_3);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_19DifferentialAlgebra_DifferentialRing, __pyx_n_s_differential_prem, __pyx_t_2) < 0) __PYX_ERR(0, 1936, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_19DifferentialAlgebra_DifferentialRing);

  /* "../../bmi/sympy/DifferentialRing.pyx":2070
 *             self,
 *             equations,
 *             notation = BMI_IX_undefined):             # <<<<<<<<<<<<<<
 *         r"""
 *         The normal form of a rational differential fraction
 */
  __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v_19DifferentialAlgebra_BMI_IX_undefined); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2070, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_k__28 = __pyx_t_2;
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;

  /* "../../bmi/sympy/DifferentialRing.pyx":2067
 * 
 * # normal_form
 *     def normal_form (             # <<<<<<<<<<<<<<
 *             self,
 *             equations,
 */
  __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v_19DifferentialAlgebra_BMI_IX_undefined); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2070, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2067, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_2);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2)) __PYX_ERR(0, 2067, __pyx_L1_error);
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_19DifferentialAlgebra_16DifferentialRing_49normal_form, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_DifferentialRing_normal_form, NULL, __pyx_n_s_DifferentialAlgebra, __pyx_d, ((PyObject *)__pyx_codeobj__131)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2067, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_t_3);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_19DifferentialAlgebra_DifferentialRing, __pyx_n_s_normal_form, __pyx_t_2) < 0) __PYX_ERR(0, 2067, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_19DifferentialAlgebra_DifferentialRing);

  /* "../../bmi/sympy/DifferentialRing.pyx":2164
 *             self,
 *             list polynomials,
 *             mode = BMI_IX_ascending,             # <<<<<<<<<<<<<<
 *             notation = BMI_IX_undefined):
 *         r"""
 */
  __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v_19DifferentialAlgebra_BMI_IX_ascending); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2164, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_k__29 = __pyx_t_2;
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;

  /* "../../bmi/sympy/DifferentialRing.pyx":2165
 *             list polynomials,
 *             mode = BMI_IX_ascending,
 *             notation = BMI_IX_undefined):             # <<<<<<<<<<<<<<
 *         r"""
 *         Sort a list of polynomials according to their leading monomials
 */
  __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v_19DifferentialAlgebra_BMI_IX_undefined); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2165, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_k__30 = __pyx_t_2;
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;

  /* "../../bmi/sympy/DifferentialRing.pyx":2164
 *             self,
 *             list polynomials,
 *             mode = BMI_IX_ascending,             # <<<<<<<<<<<<<<
 *             notation = BMI_IX_undefined):
 *         r"""
 */
  __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v_19DifferentialAlgebra_BMI_IX_ascending); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2164, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);

  /* "../../bmi/sympy/DifferentialRing.pyx":2165
 *             list polynomials,
 *             mode = BMI_IX_ascending,
 *             notation = BMI_IX_undefined):             # <<<<<<<<<<<<<<
 *         r"""
 *         Sort a list of polynomials according to their leading monomials
 */
  __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v_19DifferentialAlgebra_BMI_IX_undefined); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2165, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "../../bmi/sympy/DifferentialRing.pyx":2161
 * 
 * # sort
 *     def sort (             # <<<<<<<<<<<<<<
 *             self,
 *             list polynomials,
 */
  __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2161, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_2);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2)) __PYX_ERR(0, 2161, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_3);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3)) __PYX_ERR(0, 2161, __pyx_L1_error);
  __pyx_t_2 = 0;
  __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_19DifferentialAlgebra_16DifferentialRing_51sort, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_DifferentialRing_sort, NULL, __pyx_n_s_DifferentialAlgebra, __pyx_d, ((PyObject *)__pyx_codeobj__133)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2161, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_3, __pyx_t_4);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_19DifferentialAlgebra_DifferentialRing, __pyx_n_s_sort, __pyx_t_3) < 0) __PYX_ERR(0, 2161, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_19DifferentialAlgebra_DifferentialRing);

  /* "../../bmi/sympy/DifferentialRing.pyx":2259
 *             q,
 *             x = None,
 *             list attributes = [             # <<<<<<<<<<<<<<
 *                     'differential', 'autoreduced', 'primitive',
 *                     'squarefree', 'normalized', 'coherent'],
 */
  __pyx_t_3 = PyList_New(6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2259, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_n_u_differential);
  __Pyx_GIVEREF(__pyx_n_u_differential);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 0, __pyx_n_u_differential)) __PYX_ERR(0, 2259, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_u_autoreduced);
  __Pyx_GIVEREF(__pyx_n_u_autoreduced);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 1, __pyx_n_u_autoreduced)) __PYX_ERR(0, 2259, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_u_primitive);
  __Pyx_GIVEREF(__pyx_n_u_primitive);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 2, __pyx_n_u_primitive)) __PYX_ERR(0, 2259, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_u_squarefree);
  __Pyx_GIVEREF(__pyx_n_u_squarefree);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 3, __pyx_n_u_squarefree)) __PYX_ERR(0, 2259, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_u_normalized);
  __Pyx_GIVEREF(__pyx_n_u_normalized);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 4, __pyx_n_u_normalized)) __PYX_ERR(0, 2259, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_u_coherent);
  __Pyx_GIVEREF(__pyx_n_u_coherent);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 5, __pyx_n_u_coherent)) __PYX_ERR(0, 2259, __pyx_L1_error);
  __pyx_k__31 = ((PyObject*)__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_3);
  __pyx_t_3 = 0;

  /* "../../bmi/sympy/DifferentialRing.pyx":2262
 *                     'differential', 'autoreduced', 'primitive',
 *                     'squarefree', 'normalized', 'coherent'],
 *             control = BMI_IX_vector,             # <<<<<<<<<<<<<<
 *             notation = BMI_IX_undefined,
 *             int timeout = 0,
 */
  __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v_19DifferentialAlgebra_BMI_IX_vector); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2262, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_k__32 = __pyx_t_3;
  __Pyx_GIVEREF(__pyx_t_3);
  __pyx_t_3 = 0;

  /* "../../bmi/sympy/DifferentialRing.pyx":2263
 *                     'squarefree', 'normalized', 'coherent'],
 *             control = BMI_IX_vector,
 *             notation = BMI_IX_undefined,             # <<<<<<<<<<<<<<
 *             int timeout = 0,
 *             int memout = 0):
 */
  __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v_19DifferentialAlgebra_BMI_IX_undefined); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2263, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_k__33 = __pyx_t_3;
  __Pyx_GIVEREF(__pyx_t_3);
  __pyx_t_3 = 0;

  /* "../../bmi/sympy/DifferentialRing.pyx":2259
 *             q,
 *             x = None,
 *             list attributes = [             # <<<<<<<<<<<<<<
 *                     'differential', 'autoreduced', 'primitive',
 *                     'squarefree', 'normalized', 'coherent'],
 */
  __pyx_t_3 = PyList_New(6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2259, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_n_u_differential);
  __Pyx_GIVEREF(__pyx_n_u_differential);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 0, __pyx_n_u_differential)) __PYX_ERR(0, 2259, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_u_autoreduced);
  __Pyx_GIVEREF(__pyx_n_u_autoreduced);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 1, __pyx_n_u_autoreduced)) __PYX_ERR(0, 2259, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_u_primitive);
  __Pyx_GIVEREF(__pyx_n_u_primitive);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 2, __pyx_n_u_primitive)) __PYX_ERR(0, 2259, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_u_squarefree);
  __Pyx_GIVEREF(__pyx_n_u_squarefree);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 3, __pyx_n_u_squarefree)) __PYX_ERR(0, 2259, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_u_normalized);
  __Pyx_GIVEREF(__pyx_n_u_normalized);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 4, __pyx_n_u_normalized)) __PYX_ERR(0, 2259, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_u_coherent);
  __Pyx_GIVEREF(__pyx_n_u_coherent);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 5, __pyx_n_u_coherent)) __PYX_ERR(0, 2259, __pyx_L1_error);

  /* "../../bmi/sympy/DifferentialRing.pyx":2262
 *                     'differential', 'autoreduced', 'primitive',
 *                     'squarefree', 'normalized', 'coherent'],
 *             control = BMI_IX_vector,             # <<<<<<<<<<<<<<
 *             notation = BMI_IX_undefined,
 *             int timeout = 0,
 */
  __pyx_t_4 = __Pyx_PyBytes_FromString(__pyx_v_19DifferentialAlgebra_BMI_IX_vector); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2262, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);

  /* "../../bmi/sympy/DifferentialRing.pyx":2263
 *                     'squarefree', 'normalized', 'coherent'],
 *             control = BMI_IX_vector,
 *             notation = BMI_IX_undefined,             # <<<<<<<<<<<<<<
 *             int timeout = 0,
 *             int memout = 0):
 */
  __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v_19DifferentialAlgebra_BMI_IX_undefined); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2263, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);

  /* "../../bmi/sympy/DifferentialRing.pyx":2252
 * 
 * # DenefLipshitz
 *     def DenefLipshitz (             # <<<<<<<<<<<<<<
 *             self,
 *             equations,
 */
  __pyx_t_5 = PyTuple_New(6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2252, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, Py_None)) __PYX_ERR(0, 2252, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_3);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_3)) __PYX_ERR(0, 2252, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_4);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_4)) __PYX_ERR(0, 2252, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_2);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 3, __pyx_t_2)) __PYX_ERR(0, 2252, __pyx_L1_error);
  __Pyx_INCREF(__pyx_int_0);
  __Pyx_GIVEREF(__pyx_int_0);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 4, __pyx_int_0)) __PYX_ERR(0, 2252, __pyx_L1_error);
  __Pyx_INCREF(__pyx_int_0);
  __Pyx_GIVEREF(__pyx_int_0);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 5, __pyx_int_0)) __PYX_ERR(0, 2252, __pyx_L1_error);
  __pyx_t_3 = 0;
  __pyx_t_4 = 0;
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_19DifferentialAlgebra_16DifferentialRing_53DenefLipshitz, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_DifferentialRing_DenefLipshitz, NULL, __pyx_n_s_DifferentialAlgebra, __pyx_d, ((PyObject *)__pyx_codeobj__135)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2252, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_t_5);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_19DifferentialAlgebra_DifferentialRing, __pyx_n_s_DenefLipshitz, __pyx_t_2) < 0) __PYX_ERR(0, 2252, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_19DifferentialAlgebra_DifferentialRing);

  /* "../../bmi/sympy/DifferentialRing.pyx":2527
 *             equations,
 *             BaseFieldExtension basefield = None,
 *             list attributes = [             # <<<<<<<<<<<<<<
 *                     'differential', 'autoreduced', 'primitive',
 *                     'squarefree', 'normalized', 'coherent'],
 */
  __pyx_t_2 = PyList_New(6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2527, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_n_u_differential);
  __Pyx_GIVEREF(__pyx_n_u_differential);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_u_differential)) __PYX_ERR(0, 2527, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_u_autoreduced);
  __Pyx_GIVEREF(__pyx_n_u_autoreduced);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 1, __pyx_n_u_autoreduced)) __PYX_ERR(0, 2527, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_u_primitive);
  __Pyx_GIVEREF(__pyx_n_u_primitive);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 2, __pyx_n_u_primitive)) __PYX_ERR(0, 2527, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_u_squarefree);
  __Pyx_GIVEREF(__pyx_n_u_squarefree);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 3, __pyx_n_u_squarefree)) __PYX_ERR(0, 2527, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_u_normalized);
  __Pyx_GIVEREF(__pyx_n_u_normalized);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 4, __pyx_n_u_normalized)) __PYX_ERR(0, 2527, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_u_coherent);
  __Pyx_GIVEREF(__pyx_n_u_coherent);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 5, __pyx_n_u_coherent)) __PYX_ERR(0, 2527, __pyx_L1_error);
  __pyx_k__35 = ((PyObject*)__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;

  /* "../../bmi/sympy/DifferentialRing.pyx":2530
 *                     'differential', 'autoreduced', 'primitive',
 *                     'squarefree', 'normalized', 'coherent'],
 *             singsol = BMI_IX_all,             # <<<<<<<<<<<<<<
 *             dimlb = BMI_IX_safecase,
 *             notation = BMI_IX_undefined,
 */
  __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v_19DifferentialAlgebra_BMI_IX_all); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2530, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_k__36 = __pyx_t_2;
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;

  /* "../../bmi/sympy/DifferentialRing.pyx":2531
 *                     'squarefree', 'normalized', 'coherent'],
 *             singsol = BMI_IX_all,
 *             dimlb = BMI_IX_safecase,             # <<<<<<<<<<<<<<
 *             notation = BMI_IX_undefined,
 *             int timeout = 0,
 */
  __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v_19DifferentialAlgebra_BMI_IX_safecase); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2531, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_k__37 = __pyx_t_2;
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;

  /* "../../bmi/sympy/DifferentialRing.pyx":2532
 *             singsol = BMI_IX_all,
 *             dimlb = BMI_IX_safecase,
 *             notation = BMI_IX_undefined,             # <<<<<<<<<<<<<<
 *             int timeout = 0,
 *             int memout = 0):
 */
  __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v_19DifferentialAlgebra_BMI_IX_undefined); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2532, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_k__38 = __pyx_t_2;
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;

  /* "../../bmi/sympy/DifferentialRing.pyx":2527
 *             equations,
 *             BaseFieldExtension basefield = None,
 *             list attributes = [             # <<<<<<<<<<<<<<
 *                     'differential', 'autoreduced', 'primitive',
 *                     'squarefree', 'normalized', 'coherent'],
 */
  __pyx_t_2 = PyList_New(6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2527, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_n_u_differential);
  __Pyx_GIVEREF(__pyx_n_u_differential);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_u_differential)) __PYX_ERR(0, 2527, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_u_autoreduced);
  __Pyx_GIVEREF(__pyx_n_u_autoreduced);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 1, __pyx_n_u_autoreduced)) __PYX_ERR(0, 2527, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_u_primitive);
  __Pyx_GIVEREF(__pyx_n_u_primitive);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 2, __pyx_n_u_primitive)) __PYX_ERR(0, 2527, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_u_squarefree);
  __Pyx_GIVEREF(__pyx_n_u_squarefree);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 3, __pyx_n_u_squarefree)) __PYX_ERR(0, 2527, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_u_normalized);
  __Pyx_GIVEREF(__pyx_n_u_normalized);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 4, __pyx_n_u_normalized)) __PYX_ERR(0, 2527, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_u_coherent);
  __Pyx_GIVEREF(__pyx_n_u_coherent);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 5, __pyx_n_u_coherent)) __PYX_ERR(0, 2527, __pyx_L1_error);

  /* "../../bmi/sympy/DifferentialRing.pyx":2530
 *                     'differential', 'autoreduced', 'primitive',
 *                     'squarefree', 'normalized', 'coherent'],
 *             singsol = BMI_IX_all,             # <<<<<<<<<<<<<<
 *             dimlb = BMI_IX_safecase,
 *             notation = BMI_IX_undefined,
 */
  __pyx_t_5 = __Pyx_PyBytes_FromString(__pyx_v_19DifferentialAlgebra_BMI_IX_all); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2530, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);

  /* "../../bmi/sympy/DifferentialRing.pyx":2531
 *                     'squarefree', 'normalized', 'coherent'],
 *             singsol = BMI_IX_all,
 *             dimlb = BMI_IX_safecase,             # <<<<<<<<<<<<<<
 *             notation = BMI_IX_undefined,
 *             int timeout = 0,
 */
  __pyx_t_4 = __Pyx_PyBytes_FromString(__pyx_v_19DifferentialAlgebra_BMI_IX_safecase); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2531, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);

  /* "../../bmi/sympy/DifferentialRing.pyx":2532
 *             singsol = BMI_IX_all,
 *             dimlb = BMI_IX_safecase,
 *             notation = BMI_IX_undefined,             # <<<<<<<<<<<<<<
 *             int timeout = 0,
 *             int memout = 0):
 */
  __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v_19DifferentialAlgebra_BMI_IX_undefined); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2532, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "../../bmi/sympy/DifferentialRing.pyx":2523
 * 
 * # RosenfeldGroebner
 *     def RosenfeldGroebner (             # <<<<<<<<<<<<<<
 *             self,
 *             equations,
 */
  __pyx_t_6 = PyTuple_New(7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2523, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 0, Py_None)) __PYX_ERR(0, 2523, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_2);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_2)) __PYX_ERR(0, 2523, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_5);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_t_5)) __PYX_ERR(0, 2523, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_4);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 3, __pyx_t_4)) __PYX_ERR(0, 2523, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_3);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 4, __pyx_t_3)) __PYX_ERR(0, 2523, __pyx_L1_error);
  __Pyx_INCREF(__pyx_int_0);
  __Pyx_GIVEREF(__pyx_int_0);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 5, __pyx_int_0)) __PYX_ERR(0, 2523, __pyx_L1_error);
  __Pyx_INCREF(__pyx_int_0);
  __Pyx_GIVEREF(__pyx_int_0);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 6, __pyx_int_0)) __PYX_ERR(0, 2523, __pyx_L1_error);
  __pyx_t_2 = 0;
  __pyx_t_5 = 0;
  __pyx_t_4 = 0;
  __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_19DifferentialAlgebra_16DifferentialRing_55RosenfeldGroebner, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_DifferentialRing_RosenfeldGroebn, NULL, __pyx_n_s_DifferentialAlgebra, __pyx_d, ((PyObject *)__pyx_codeobj__137)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2523, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_3, __pyx_t_6);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_19DifferentialAlgebra_DifferentialRing, __pyx_n_s_RosenfeldGroebner, __pyx_t_3) < 0) __PYX_ERR(0, 2523, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_19DifferentialAlgebra_DifferentialRing);

  /* "../../bmi/sympy/DifferentialRing.pyx":2777
 * 
 * # _process_equations
 *     def _process_equations (self, list L, strnot):             # <<<<<<<<<<<<<<
 *         r"""
 *         Split a list into equations and inequations
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_19DifferentialAlgebra_16DifferentialRing_57_process_equations, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_DifferentialRing__process_equati, NULL, __pyx_n_s_DifferentialAlgebra, __pyx_d, ((PyObject *)__pyx_codeobj__139)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2777, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_19DifferentialAlgebra_DifferentialRing, __pyx_n_s_process_equations, __pyx_t_3) < 0) __PYX_ERR(0, 2777, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_19DifferentialAlgebra_DifferentialRing);

  /* "../../bmi/sympy/DifferentialRing.pyx":2820
 * 
 * # _ranking
 *     def _ranking (self):             # <<<<<<<<<<<<<<
 *         r"""
 *         The ranking of a DifferentialRing
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_19DifferentialAlgebra_16DifferentialRing_59_ranking, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_DifferentialRing__ranking, NULL, __pyx_n_s_DifferentialAlgebra, __pyx_d, ((PyObject *)__pyx_codeobj__141)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2820, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_19DifferentialAlgebra_DifferentialRing, __pyx_n_s_ranking, __pyx_t_3) < 0) __PYX_ERR(0, 2820, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_19DifferentialAlgebra_DifferentialRing);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "self.dring cannot be converted to a Python object for pickling"
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_19DifferentialAlgebra_16DifferentialRing_61__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_DifferentialRing___reduce_cython, NULL, __pyx_n_s_DifferentialAlgebra, __pyx_d, ((PyObject *)__pyx_codeobj__142)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_3) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "self.dring cannot be converted to a Python object for pickling"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "self.dring cannot be converted to a Python object for pickling"
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_19DifferentialAlgebra_16DifferentialRing_63__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_DifferentialRing___setstate_cyth, NULL, __pyx_n_s_DifferentialAlgebra, __pyx_d, ((PyObject *)__pyx_codeobj__144)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_3) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":77
 * 
 * # __process_notation
 *     def __process_notation (self, notation) :             # <<<<<<<<<<<<<<
 *         cdef strnot
 *         if not isinstance (notation, str) :
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_19DifferentialAlgebra_24RegularDifferentialChain_1_RegularDifferentialChain__process_notation, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_RegularDifferentialChain___proce, NULL, __pyx_n_s_DifferentialAlgebra, __pyx_d, ((PyObject *)__pyx_codeobj__145)); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 77, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_19DifferentialAlgebra_RegularDifferentialChain, __pyx_n_s_RegularDifferentialChain__proce, __pyx_t_3) < 0) __PYX_ERR(2, 77, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_19DifferentialAlgebra_RegularDifferentialChain);

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":92
 *             list equations,
 *             DifferentialRing DRing,
 *             list attributes = [             # <<<<<<<<<<<<<<
 *                 'differential', 'autoreduced', 'primitive',
 *                 'squarefree', 'normalized', 'coherent'],
 */
  __pyx_t_3 = PyList_New(6); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 92, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_n_u_differential);
  __Pyx_GIVEREF(__pyx_n_u_differential);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 0, __pyx_n_u_differential)) __PYX_ERR(2, 92, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_u_autoreduced);
  __Pyx_GIVEREF(__pyx_n_u_autoreduced);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 1, __pyx_n_u_autoreduced)) __PYX_ERR(2, 92, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_u_primitive);
  __Pyx_GIVEREF(__pyx_n_u_primitive);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 2, __pyx_n_u_primitive)) __PYX_ERR(2, 92, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_u_squarefree);
  __Pyx_GIVEREF(__pyx_n_u_squarefree);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 3, __pyx_n_u_squarefree)) __PYX_ERR(2, 92, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_u_normalized);
  __Pyx_GIVEREF(__pyx_n_u_normalized);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 4, __pyx_n_u_normalized)) __PYX_ERR(2, 92, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_u_coherent);
  __Pyx_GIVEREF(__pyx_n_u_coherent);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 5, __pyx_n_u_coherent)) __PYX_ERR(2, 92, __pyx_L1_error);
  __pyx_k__39 = ((PyObject*)__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_3);
  __pyx_t_3 = 0;

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":96
 *                 'squarefree', 'normalized', 'coherent'],
 *             bool pretend = True,
 *             notation = BMI_IX_undefined,             # <<<<<<<<<<<<<<
 *             int timeout = 0,
 *             int memout = 0):
 */
  __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v_19DifferentialAlgebra_BMI_IX_undefined); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 96, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_k__40 = __pyx_t_3;
  __Pyx_GIVEREF(__pyx_t_3);
  __pyx_t_3 = 0;

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":170
 *         return 'regular_differential_chain'
 * 
 *     def _latex_ (self):             # <<<<<<<<<<<<<<
 * #   The LaTeX representation
 *         return 'regular\\_differential\\_chain'
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_19DifferentialAlgebra_24RegularDifferentialChain_9_latex_, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_RegularDifferentialChain__latex, NULL, __pyx_n_s_DifferentialAlgebra, __pyx_d, ((PyObject *)__pyx_codeobj__146)); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 170, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_19DifferentialAlgebra_RegularDifferentialChain, __pyx_n_s_latex_2, __pyx_t_3) < 0) __PYX_ERR(2, 170, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_19DifferentialAlgebra_RegularDifferentialChain);

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":175
 * 
 * # differential_ring
 *     def differential_ring (self):             # <<<<<<<<<<<<<<
 *         r"""
 *         The embedding differential ring of a regular differential chain
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_19DifferentialAlgebra_24RegularDifferentialChain_11differential_ring, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_RegularDifferentialChain_differe, NULL, __pyx_n_s_DifferentialAlgebra, __pyx_d, ((PyObject *)__pyx_codeobj__147)); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 175, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_19DifferentialAlgebra_RegularDifferentialChain, __pyx_n_s_differential_ring, __pyx_t_3) < 0) __PYX_ERR(2, 175, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_19DifferentialAlgebra_RegularDifferentialChain);

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":216
 *             bool solved = False,
 *             selection = None,
 *             notation = BMI_IX_undefined):             # <<<<<<<<<<<<<<
 *         r"""
 *         The list of equations of a regular differential chain
 */
  __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v_19DifferentialAlgebra_BMI_IX_undefined); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 216, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_k__41 = __pyx_t_3;
  __Pyx_GIVEREF(__pyx_t_3);
  __pyx_t_3 = 0;

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":215
 *             self,
 *             bool solved = False,
 *             selection = None,             # <<<<<<<<<<<<<<
 *             notation = BMI_IX_undefined):
 *         r"""
 */
  __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v_19DifferentialAlgebra_BMI_IX_undefined); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 216, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":212
 * 
 * # equations
 *     def equations (             # <<<<<<<<<<<<<<
 *             self,
 *             bool solved = False,
 */
  __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 212, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_INCREF(Py_False);
  __Pyx_GIVEREF(Py_False);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 0, Py_False)) __PYX_ERR(2, 212, __pyx_L1_error);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 1, Py_None)) __PYX_ERR(2, 212, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_3);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_t_3)) __PYX_ERR(2, 212, __pyx_L1_error);
  __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_19DifferentialAlgebra_24RegularDifferentialChain_13equations, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_RegularDifferentialChain_equatio, NULL, __pyx_n_s_DifferentialAlgebra, __pyx_d, ((PyObject *)__pyx_codeobj__149)); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 212, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_3, __pyx_t_6);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_19DifferentialAlgebra_RegularDifferentialChain, __pyx_n_s_equations, __pyx_t_3) < 0) __PYX_ERR(2, 212, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_19DifferentialAlgebra_RegularDifferentialChain);

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":339
 * 
 * # attributes
 *     def attributes (self):             # <<<<<<<<<<<<<<
 *         r"""
 *         The list of attributes of a RegularDifferentialChain
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_19DifferentialAlgebra_24RegularDifferentialChain_15attributes, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_RegularDifferentialChain_attribu, NULL, __pyx_n_s_DifferentialAlgebra, __pyx_d, ((PyObject *)__pyx_codeobj__151)); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 339, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_19DifferentialAlgebra_RegularDifferentialChain, __pyx_n_s_attributes, __pyx_t_3) < 0) __PYX_ERR(2, 339, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_19DifferentialAlgebra_RegularDifferentialChain);

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":399
 *             self,
 *             bool fullset = False,
 *             notation = BMI_IX_undefined):             # <<<<<<<<<<<<<<
 *         r"""
 *         The leading derivatives of a regular differential chain
 */
  __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v_19DifferentialAlgebra_BMI_IX_undefined); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 399, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_k__49 = __pyx_t_3;
  __Pyx_GIVEREF(__pyx_t_3);
  __pyx_t_3 = 0;

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":398
 *     def leading_derivative (
 *             self,
 *             bool fullset = False,             # <<<<<<<<<<<<<<
 *             notation = BMI_IX_undefined):
 *         r"""
 */
  __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v_19DifferentialAlgebra_BMI_IX_undefined); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 399, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":396
 * 
 * # leading_derivative
 *     def leading_derivative (             # <<<<<<<<<<<<<<
 *             self,
 *             bool fullset = False,
 */
  __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 396, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_INCREF(Py_False);
  __Pyx_GIVEREF(Py_False);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 0, Py_False)) __PYX_ERR(2, 396, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_3);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_3)) __PYX_ERR(2, 396, __pyx_L1_error);
  __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_19DifferentialAlgebra_24RegularDifferentialChain_17leading_derivative, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_RegularDifferentialChain_leading, NULL, __pyx_n_s_DifferentialAlgebra, __pyx_d, ((PyObject *)__pyx_codeobj__153)); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 396, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_3, __pyx_t_6);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_19DifferentialAlgebra_RegularDifferentialChain, __pyx_n_s_leading_derivative, __pyx_t_3) < 0) __PYX_ERR(2, 396, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_19DifferentialAlgebra_RegularDifferentialChain);

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":456
 *             bool fullset = False,
 *             bool listform = False,
 *             notation = BMI_IX_undefined):             # <<<<<<<<<<<<<<
 *         r"""
 *         The leading ranks of a regular differential chain
 */
  __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v_19DifferentialAlgebra_BMI_IX_undefined); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 456, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_k__50 = __pyx_t_3;
  __Pyx_GIVEREF(__pyx_t_3);
  __pyx_t_3 = 0;

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":455
 *             self,
 *             bool fullset = False,
 *             bool listform = False,             # <<<<<<<<<<<<<<
 *             notation = BMI_IX_undefined):
 *         r"""
 */
  __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v_19DifferentialAlgebra_BMI_IX_undefined); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 456, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":452
 * 
 * # leading_rank
 *     def leading_rank (             # <<<<<<<<<<<<<<
 *             self,
 *             bool fullset = False,
 */
  __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 452, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_INCREF(Py_False);
  __Pyx_GIVEREF(Py_False);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 0, Py_False)) __PYX_ERR(2, 452, __pyx_L1_error);
  __Pyx_INCREF(Py_False);
  __Pyx_GIVEREF(Py_False);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 1, Py_False)) __PYX_ERR(2, 452, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_3);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_t_3)) __PYX_ERR(2, 452, __pyx_L1_error);
  __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_19DifferentialAlgebra_24RegularDifferentialChain_19leading_rank, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_RegularDifferentialChain_leading_2, NULL, __pyx_n_s_DifferentialAlgebra, __pyx_d, ((PyObject *)__pyx_codeobj__155)); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 452, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_3, __pyx_t_6);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_19DifferentialAlgebra_RegularDifferentialChain, __pyx_n_s_leading_rank, __pyx_t_3) < 0) __PYX_ERR(2, 452, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_19DifferentialAlgebra_RegularDifferentialChain);

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":517
 *             self,
 *             bool fullset = False,
 *             notation = BMI_IX_undefined):             # <<<<<<<<<<<<<<
 *         r"""
 *         The initials of a regular differential chain
 */
  __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v_19DifferentialAlgebra_BMI_IX_undefined); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 517, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_k__51 = __pyx_t_3;
  __Pyx_GIVEREF(__pyx_t_3);
  __pyx_t_3 = 0;

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":516
 *     def initial (
 *             self,
 *             bool fullset = False,             # <<<<<<<<<<<<<<
 *             notation = BMI_IX_undefined):
 *         r"""
 */
  __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v_19DifferentialAlgebra_BMI_IX_undefined); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 517, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":514
 * 
 * # initial
 *     def initial (             # <<<<<<<<<<<<<<
 *             self,
 *             bool fullset = False,
 */
  __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 514, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_INCREF(Py_False);
  __Pyx_GIVEREF(Py_False);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 0, Py_False)) __PYX_ERR(2, 514, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_3);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_3)) __PYX_ERR(2, 514, __pyx_L1_error);
  __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_19DifferentialAlgebra_24RegularDifferentialChain_21initial, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_RegularDifferentialChain_initial, NULL, __pyx_n_s_DifferentialAlgebra, __pyx_d, ((PyObject *)__pyx_codeobj__157)); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 514, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_3, __pyx_t_6);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_19DifferentialAlgebra_RegularDifferentialChain, __pyx_n_s_initial, __pyx_t_3) < 0) __PYX_ERR(2, 514, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_19DifferentialAlgebra_RegularDifferentialChain);

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":576
 *             variable = None,
 *             bool fullset = False,
 *             notation = BMI_IX_undefined):             # <<<<<<<<<<<<<<
 *         r"""
 *         The leading coefficients of a regular differential chain
 */
  __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v_19DifferentialAlgebra_BMI_IX_undefined); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 576, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_k__52 = __pyx_t_3;
  __Pyx_GIVEREF(__pyx_t_3);
  __pyx_t_3 = 0;

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":575
 *             self,
 *             variable = None,
 *             bool fullset = False,             # <<<<<<<<<<<<<<
 *             notation = BMI_IX_undefined):
 *         r"""
 */
  __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v_19DifferentialAlgebra_BMI_IX_undefined); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 576, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":572
 * 
 * # leading_coefficient
 *     def leading_coefficient (             # <<<<<<<<<<<<<<
 *             self,
 *             variable = None,
 */
  __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 572, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 0, Py_None)) __PYX_ERR(2, 572, __pyx_L1_error);
  __Pyx_INCREF(Py_False);
  __Pyx_GIVEREF(Py_False);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 1, Py_False)) __PYX_ERR(2, 572, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_3);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_t_3)) __PYX_ERR(2, 572, __pyx_L1_error);
  __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_19DifferentialAlgebra_24RegularDifferentialChain_23leading_coefficient, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_RegularDifferentialChain_leading_3, NULL, __pyx_n_s_DifferentialAlgebra, __pyx_d, ((PyObject *)__pyx_codeobj__159)); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 572, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_3, __pyx_t_6);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_19DifferentialAlgebra_RegularDifferentialChain, __pyx_n_s_leading_coefficient, __pyx_t_3) < 0) __PYX_ERR(2, 572, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_19DifferentialAlgebra_RegularDifferentialChain);

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":650
 *             variable = None,
 *             bool fullset = False,
 *             notation = BMI_IX_undefined):             # <<<<<<<<<<<<<<
 *         r"""
 *         The tails of a regular differential chain
 */
  __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v_19DifferentialAlgebra_BMI_IX_undefined); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 650, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_k__53 = __pyx_t_3;
  __Pyx_GIVEREF(__pyx_t_3);
  __pyx_t_3 = 0;

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":649
 *             self,
 *             variable = None,
 *             bool fullset = False,             # <<<<<<<<<<<<<<
 *             notation = BMI_IX_undefined):
 *         r"""
 */
  __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v_19DifferentialAlgebra_BMI_IX_undefined); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 650, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":646
 * 
 * # tail
 *     def tail (             # <<<<<<<<<<<<<<
 *             self,
 *             variable = None,
 */
  __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 646, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 0, Py_None)) __PYX_ERR(2, 646, __pyx_L1_error);
  __Pyx_INCREF(Py_False);
  __Pyx_GIVEREF(Py_False);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 1, Py_False)) __PYX_ERR(2, 646, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_3);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_t_3)) __PYX_ERR(2, 646, __pyx_L1_error);
  __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_19DifferentialAlgebra_24RegularDifferentialChain_25tail, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_RegularDifferentialChain_tail, NULL, __pyx_n_s_DifferentialAlgebra, __pyx_d, ((PyObject *)__pyx_codeobj__160)); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 646, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_3, __pyx_t_6);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_19DifferentialAlgebra_RegularDifferentialChain, __pyx_n_s_tail, __pyx_t_3) < 0) __PYX_ERR(2, 646, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_19DifferentialAlgebra_RegularDifferentialChain);

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":725
 *             variable = None,
 *             bool fullset = False,
 *             notation = BMI_IX_undefined):             # <<<<<<<<<<<<<<
 *         r"""
 *         The separants of a regular differential chain
 */
  __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v_19DifferentialAlgebra_BMI_IX_undefined); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 725, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_k__54 = __pyx_t_3;
  __Pyx_GIVEREF(__pyx_t_3);
  __pyx_t_3 = 0;

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":724
 *             self,
 *             variable = None,
 *             bool fullset = False,             # <<<<<<<<<<<<<<
 *             notation = BMI_IX_undefined):
 *         r"""
 */
  __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v_19DifferentialAlgebra_BMI_IX_undefined); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 725, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":721
 * 
 * # separant
 *     def separant (             # <<<<<<<<<<<<<<
 *             self,
 *             variable = None,
 */
  __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 721, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 0, Py_None)) __PYX_ERR(2, 721, __pyx_L1_error);
  __Pyx_INCREF(Py_False);
  __Pyx_GIVEREF(Py_False);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 1, Py_False)) __PYX_ERR(2, 721, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_3);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_t_3)) __PYX_ERR(2, 721, __pyx_L1_error);
  __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_19DifferentialAlgebra_24RegularDifferentialChain_27separant, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_RegularDifferentialChain_separan, NULL, __pyx_n_s_DifferentialAlgebra, __pyx_d, ((PyObject *)__pyx_codeobj__161)); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 721, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_3, __pyx_t_6);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_19DifferentialAlgebra_RegularDifferentialChain, __pyx_n_s_separant, __pyx_t_3) < 0) __PYX_ERR(2, 721, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_19DifferentialAlgebra_RegularDifferentialChain);

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":798
 *     def indets (
 *                 self,
 *                 selection = BMI_IX_derivs,             # <<<<<<<<<<<<<<
 *                 bool fullset = False,
 *                 notation = BMI_IX_undefined):
 */
  __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v_19DifferentialAlgebra_BMI_IX_derivs); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 798, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_k__55 = __pyx_t_3;
  __Pyx_GIVEREF(__pyx_t_3);
  __pyx_t_3 = 0;

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":800
 *                 selection = BMI_IX_derivs,
 *                 bool fullset = False,
 *                 notation = BMI_IX_undefined):             # <<<<<<<<<<<<<<
 *         r"""
 *         The indeterminates of a RegularDifferentialChain
 */
  __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v_19DifferentialAlgebra_BMI_IX_undefined); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 800, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_k__56 = __pyx_t_3;
  __Pyx_GIVEREF(__pyx_t_3);
  __pyx_t_3 = 0;

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":798
 *     def indets (
 *                 self,
 *                 selection = BMI_IX_derivs,             # <<<<<<<<<<<<<<
 *                 bool fullset = False,
 *                 notation = BMI_IX_undefined):
 */
  __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v_19DifferentialAlgebra_BMI_IX_derivs); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 798, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":800
 *                 selection = BMI_IX_derivs,
 *                 bool fullset = False,
 *                 notation = BMI_IX_undefined):             # <<<<<<<<<<<<<<
 *         r"""
 *         The indeterminates of a RegularDifferentialChain
 */
  __pyx_t_6 = __Pyx_PyBytes_FromString(__pyx_v_19DifferentialAlgebra_BMI_IX_undefined); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 800, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":796
 * 
 * # indets
 *     def indets (             # <<<<<<<<<<<<<<
 *                 self,
 *                 selection = BMI_IX_derivs,
 */
  __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 796, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_3);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3)) __PYX_ERR(2, 796, __pyx_L1_error);
  __Pyx_INCREF(Py_False);
  __Pyx_GIVEREF(Py_False);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, Py_False)) __PYX_ERR(2, 796, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_6);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_t_6)) __PYX_ERR(2, 796, __pyx_L1_error);
  __pyx_t_3 = 0;
  __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_19DifferentialAlgebra_24RegularDifferentialChain_29indets, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_RegularDifferentialChain_indets, NULL, __pyx_n_s_DifferentialAlgebra, __pyx_d, ((PyObject *)__pyx_codeobj__163)); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 796, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_6, __pyx_t_4);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_19DifferentialAlgebra_RegularDifferentialChain, __pyx_n_s_indets, __pyx_t_6) < 0) __PYX_ERR(2, 796, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  PyType_Modified(__pyx_ptype_19DifferentialAlgebra_RegularDifferentialChain);

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":888
 *              self,
 *              polynomial,
 *              mode = BMI_IX_fully,             # <<<<<<<<<<<<<<
 *              notation = BMI_IX_undefined):
 *         r"""
 */
  __pyx_t_6 = __Pyx_PyBytes_FromString(__pyx_v_19DifferentialAlgebra_BMI_IX_fully); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 888, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_k__57 = __pyx_t_6;
  __Pyx_GIVEREF(__pyx_t_6);
  __pyx_t_6 = 0;

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":889
 *              polynomial,
 *              mode = BMI_IX_fully,
 *              notation = BMI_IX_undefined):             # <<<<<<<<<<<<<<
 *         r"""
 *         Ritt's reduction algorithm by a regular differential chain
 */
  __pyx_t_6 = __Pyx_PyBytes_FromString(__pyx_v_19DifferentialAlgebra_BMI_IX_undefined); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 889, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_k__58 = __pyx_t_6;
  __Pyx_GIVEREF(__pyx_t_6);
  __pyx_t_6 = 0;

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":888
 *              self,
 *              polynomial,
 *              mode = BMI_IX_fully,             # <<<<<<<<<<<<<<
 *              notation = BMI_IX_undefined):
 *         r"""
 */
  __pyx_t_6 = __Pyx_PyBytes_FromString(__pyx_v_19DifferentialAlgebra_BMI_IX_fully); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 888, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":889
 *              polynomial,
 *              mode = BMI_IX_fully,
 *              notation = BMI_IX_undefined):             # <<<<<<<<<<<<<<
 *         r"""
 *         Ritt's reduction algorithm by a regular differential chain
 */
  __pyx_t_4 = __Pyx_PyBytes_FromString(__pyx_v_19DifferentialAlgebra_BMI_IX_undefined); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 889, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":885
 * 
 * # differential_prem
 *     def differential_prem (             # <<<<<<<<<<<<<<
 *              self,
 *              polynomial,
 */
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 885, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_6);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_6)) __PYX_ERR(2, 885, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_4);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_4)) __PYX_ERR(2, 885, __pyx_L1_error);
  __pyx_t_6 = 0;
  __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_19DifferentialAlgebra_24RegularDifferentialChain_31differential_prem, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_RegularDifferentialChain_differe_2, NULL, __pyx_n_s_DifferentialAlgebra, __pyx_d, ((PyObject *)__pyx_codeobj__165)); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 885, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_t_3);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_19DifferentialAlgebra_RegularDifferentialChain, __pyx_n_s_differential_prem, __pyx_t_4) < 0) __PYX_ERR(2, 885, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  PyType_Modified(__pyx_ptype_19DifferentialAlgebra_RegularDifferentialChain);

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":1025
 *             self,
 *             ratfrac,
 *             notation = BMI_IX_undefined,             # <<<<<<<<<<<<<<
 *             int timeout = 0,
 *             int memout = 0):
 */
  __pyx_t_4 = __Pyx_PyBytes_FromString(__pyx_v_19DifferentialAlgebra_BMI_IX_undefined); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1025, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_k__59 = __pyx_t_4;
  __Pyx_GIVEREF(__pyx_t_4);
  __pyx_t_4 = 0;

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":1022
 * 
 * # prem
 *     def prem (             # <<<<<<<<<<<<<<
 *             self,
 *             ratfrac,
 */
  __pyx_t_4 = __Pyx_PyBytes_FromString(__pyx_v_19DifferentialAlgebra_BMI_IX_undefined); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1025, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1022, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_4);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4)) __PYX_ERR(2, 1022, __pyx_L1_error);
  __Pyx_INCREF(__pyx_int_0);
  __Pyx_GIVEREF(__pyx_int_0);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_int_0)) __PYX_ERR(2, 1022, __pyx_L1_error);
  __Pyx_INCREF(__pyx_int_0);
  __Pyx_GIVEREF(__pyx_int_0);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_int_0)) __PYX_ERR(2, 1022, __pyx_L1_error);
  __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_19DifferentialAlgebra_24RegularDifferentialChain_33prem, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_RegularDifferentialChain_prem, NULL, __pyx_n_s_DifferentialAlgebra, __pyx_d, ((PyObject *)__pyx_codeobj__167)); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1022, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_t_3);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_19DifferentialAlgebra_RegularDifferentialChain, __pyx_n_s_prem, __pyx_t_4) < 0) __PYX_ERR(2, 1022, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  PyType_Modified(__pyx_ptype_19DifferentialAlgebra_RegularDifferentialChain);

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":1114
 *             self,
 *             ratfrac,
 *             notation = BMI_IX_undefined,             # <<<<<<<<<<<<<<
 *             int timeout = 0,
 *             int memout = 0):
 */
  __pyx_t_4 = __Pyx_PyBytes_FromString(__pyx_v_19DifferentialAlgebra_BMI_IX_undefined); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1114, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_k__60 = __pyx_t_4;
  __Pyx_GIVEREF(__pyx_t_4);
  __pyx_t_4 = 0;

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":1111
 * 
 * # resultant
 *     def resultant (             # <<<<<<<<<<<<<<
 *             self,
 *             ratfrac,
 */
  __pyx_t_4 = __Pyx_PyBytes_FromString(__pyx_v_19DifferentialAlgebra_BMI_IX_undefined); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1114, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1111, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_4);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4)) __PYX_ERR(2, 1111, __pyx_L1_error);
  __Pyx_INCREF(__pyx_int_0);
  __Pyx_GIVEREF(__pyx_int_0);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_int_0)) __PYX_ERR(2, 1111, __pyx_L1_error);
  __Pyx_INCREF(__pyx_int_0);
  __Pyx_GIVEREF(__pyx_int_0);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_int_0)) __PYX_ERR(2, 1111, __pyx_L1_error);
  __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_19DifferentialAlgebra_24RegularDifferentialChain_35resultant, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_RegularDifferentialChain_resulta, NULL, __pyx_n_s_DifferentialAlgebra, __pyx_d, ((PyObject *)__pyx_codeobj__168)); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1111, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_t_3);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_19DifferentialAlgebra_RegularDifferentialChain, __pyx_n_s_resultant, __pyx_t_4) < 0) __PYX_ERR(2, 1111, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  PyType_Modified(__pyx_ptype_19DifferentialAlgebra_RegularDifferentialChain);

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":1215
 *             DifferentialRing R = None,
 *             bool prime = False,
 *             notation = BMI_IX_undefined,             # <<<<<<<<<<<<<<
 *             int timeout = 0,
 *             int memout = 0):
 */
  __pyx_t_4 = __Pyx_PyBytes_FromString(__pyx_v_19DifferentialAlgebra_BMI_IX_undefined); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1215, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_k__61 = __pyx_t_4;
  __Pyx_GIVEREF(__pyx_t_4);
  __pyx_t_4 = 0;

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":1214
 *             self,
 *             DifferentialRing R = None,
 *             bool prime = False,             # <<<<<<<<<<<<<<
 *             notation = BMI_IX_undefined,
 *             int timeout = 0,
 */
  __pyx_t_4 = __Pyx_PyBytes_FromString(__pyx_v_19DifferentialAlgebra_BMI_IX_undefined); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1215, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":1211
 * # change_ranking
 * # pardi
 *     def change_ranking (             # <<<<<<<<<<<<<<
 *             self,
 *             DifferentialRing R = None,
 */
  __pyx_t_3 = PyTuple_New(5); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1211, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, Py_None)) __PYX_ERR(2, 1211, __pyx_L1_error);
  __Pyx_INCREF(Py_False);
  __Pyx_GIVEREF(Py_False);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, Py_False)) __PYX_ERR(2, 1211, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_4);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_t_4)) __PYX_ERR(2, 1211, __pyx_L1_error);
  __Pyx_INCREF(__pyx_int_0);
  __Pyx_GIVEREF(__pyx_int_0);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 3, __pyx_int_0)) __PYX_ERR(2, 1211, __pyx_L1_error);
  __Pyx_INCREF(__pyx_int_0);
  __Pyx_GIVEREF(__pyx_int_0);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 4, __pyx_int_0)) __PYX_ERR(2, 1211, __pyx_L1_error);
  __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_19DifferentialAlgebra_24RegularDifferentialChain_37change_ranking, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_RegularDifferentialChain_change, NULL, __pyx_n_s_DifferentialAlgebra, __pyx_d, ((PyObject *)__pyx_codeobj__170)); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1211, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_t_3);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_19DifferentialAlgebra_RegularDifferentialChain, __pyx_n_s_change_ranking, __pyx_t_4) < 0) __PYX_ERR(2, 1211, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  PyType_Modified(__pyx_ptype_19DifferentialAlgebra_RegularDifferentialChain);

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":1335
 *             equations,
 *             bool casesplit = False,
 *             notation = BMI_IX_undefined):             # <<<<<<<<<<<<<<
 *         r"""
 *         The normal form of a rational differential fraction
 */
  __pyx_t_4 = __Pyx_PyBytes_FromString(__pyx_v_19DifferentialAlgebra_BMI_IX_undefined); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1335, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_k__62 = __pyx_t_4;
  __Pyx_GIVEREF(__pyx_t_4);
  __pyx_t_4 = 0;

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":1334
 *             self,
 *             equations,
 *             bool casesplit = False,             # <<<<<<<<<<<<<<
 *             notation = BMI_IX_undefined):
 *         r"""
 */
  __pyx_t_4 = __Pyx_PyBytes_FromString(__pyx_v_19DifferentialAlgebra_BMI_IX_undefined); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1335, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":1331
 * 
 * # normal_form
 *     def normal_form (             # <<<<<<<<<<<<<<
 *             self,
 *             equations,
 */
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1331, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(Py_False);
  __Pyx_GIVEREF(Py_False);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, Py_False)) __PYX_ERR(2, 1331, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_4);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_4)) __PYX_ERR(2, 1331, __pyx_L1_error);
  __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_19DifferentialAlgebra_24RegularDifferentialChain_39normal_form, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_RegularDifferentialChain_normal, NULL, __pyx_n_s_DifferentialAlgebra, __pyx_d, ((PyObject *)__pyx_codeobj__172)); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1331, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_t_3);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_19DifferentialAlgebra_RegularDifferentialChain, __pyx_n_s_normal_form, __pyx_t_4) < 0) __PYX_ERR(2, 1331, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  PyType_Modified(__pyx_ptype_19DifferentialAlgebra_RegularDifferentialChain);

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":1446
 *             bool congruence = False,
 *             zstring = 'z%d',
 *             notation = BMI_IX_undefined):             # <<<<<<<<<<<<<<
 *         r"""
 *         The preparation equation of a polynomial
 */
  __pyx_t_4 = __Pyx_PyBytes_FromString(__pyx_v_19DifferentialAlgebra_BMI_IX_undefined); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1446, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_k__64 = __pyx_t_4;
  __Pyx_GIVEREF(__pyx_t_4);
  __pyx_t_4 = 0;

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":1444
 *             polynomial,
 *             BaseFieldExtension basefield = None,
 *             bool congruence = False,             # <<<<<<<<<<<<<<
 *             zstring = 'z%d',
 *             notation = BMI_IX_undefined):
 */
  __pyx_t_4 = __Pyx_PyBytes_FromString(__pyx_v_19DifferentialAlgebra_BMI_IX_undefined); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1446, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":1440
 * 
 * # preparation_equation
 *     def preparation_equation (             # <<<<<<<<<<<<<<
 *             self,
 *             polynomial,
 */
  __pyx_t_3 = PyTuple_New(4); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1440, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, Py_None)) __PYX_ERR(2, 1440, __pyx_L1_error);
  __Pyx_INCREF(Py_False);
  __Pyx_GIVEREF(Py_False);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, Py_False)) __PYX_ERR(2, 1440, __pyx_L1_error);
  __Pyx_INCREF(__pyx_kp_u_z_d);
  __Pyx_GIVEREF(__pyx_kp_u_z_d);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_kp_u_z_d)) __PYX_ERR(2, 1440, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_4);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 3, __pyx_t_4)) __PYX_ERR(2, 1440, __pyx_L1_error);
  __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_19DifferentialAlgebra_24RegularDifferentialChain_41preparation_equation, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_RegularDifferentialChain_prepara, NULL, __pyx_n_s_DifferentialAlgebra, __pyx_d, ((PyObject *)__pyx_codeobj__174)); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1440, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_t_3);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_19DifferentialAlgebra_RegularDifferentialChain, __pyx_n_s_preparation_equation, __pyx_t_4) < 0) __PYX_ERR(2, 1440, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  PyType_Modified(__pyx_ptype_19DifferentialAlgebra_RegularDifferentialChain);

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":1711
 * 
 * # __number_of_equations
 *     def __number_of_equations (self):             # <<<<<<<<<<<<<<
 *         r"""
 *         The number of equations of a regular differential chain
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_19DifferentialAlgebra_24RegularDifferentialChain_43_RegularDifferentialChain__number_of_equations, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_RegularDifferentialChain___numbe, NULL, __pyx_n_s_DifferentialAlgebra, __pyx_d, ((PyObject *)__pyx_codeobj__176)); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1711, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_19DifferentialAlgebra_RegularDifferentialChain, __pyx_n_s_RegularDifferentialChain__numbe, __pyx_t_4) < 0) __PYX_ERR(2, 1711, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  PyType_Modified(__pyx_ptype_19DifferentialAlgebra_RegularDifferentialChain);

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":1757
 *             equations,
 *             BaseFieldExtension basefield = None,
 *             list attributes = [             # <<<<<<<<<<<<<<
 *                     'differential', 'autoreduced', 'primitive',
 *                     'squarefree', 'normalized', 'coherent'],
 */
  __pyx_t_4 = PyList_New(6); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1757, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_INCREF(__pyx_n_u_differential);
  __Pyx_GIVEREF(__pyx_n_u_differential);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 0, __pyx_n_u_differential)) __PYX_ERR(2, 1757, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_u_autoreduced);
  __Pyx_GIVEREF(__pyx_n_u_autoreduced);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 1, __pyx_n_u_autoreduced)) __PYX_ERR(2, 1757, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_u_primitive);
  __Pyx_GIVEREF(__pyx_n_u_primitive);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 2, __pyx_n_u_primitive)) __PYX_ERR(2, 1757, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_u_squarefree);
  __Pyx_GIVEREF(__pyx_n_u_squarefree);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 3, __pyx_n_u_squarefree)) __PYX_ERR(2, 1757, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_u_normalized);
  __Pyx_GIVEREF(__pyx_n_u_normalized);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 4, __pyx_n_u_normalized)) __PYX_ERR(2, 1757, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_u_coherent);
  __Pyx_GIVEREF(__pyx_n_u_coherent);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 5, __pyx_n_u_coherent)) __PYX_ERR(2, 1757, __pyx_L1_error);
  __pyx_k__68 = ((PyObject*)__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_4);
  __pyx_t_4 = 0;

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":1760
 *                     'differential', 'autoreduced', 'primitive',
 *                     'squarefree', 'normalized', 'coherent'],
 *             singsol = BMI_IX_all,             # <<<<<<<<<<<<<<
 *             dimlb = BMI_IX_safecase,
 *             notation = BMI_IX_undefined,
 */
  __pyx_t_4 = __Pyx_PyBytes_FromString(__pyx_v_19DifferentialAlgebra_BMI_IX_all); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1760, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_k__69 = __pyx_t_4;
  __Pyx_GIVEREF(__pyx_t_4);
  __pyx_t_4 = 0;

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":1761
 *                     'squarefree', 'normalized', 'coherent'],
 *             singsol = BMI_IX_all,
 *             dimlb = BMI_IX_safecase,             # <<<<<<<<<<<<<<
 *             notation = BMI_IX_undefined,
 *             int timeout = 0,
 */
  __pyx_t_4 = __Pyx_PyBytes_FromString(__pyx_v_19DifferentialAlgebra_BMI_IX_safecase); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1761, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_k__70 = __pyx_t_4;
  __Pyx_GIVEREF(__pyx_t_4);
  __pyx_t_4 = 0;

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":1762
 *             singsol = BMI_IX_all,
 *             dimlb = BMI_IX_safecase,
 *             notation = BMI_IX_undefined,             # <<<<<<<<<<<<<<
 *             int timeout = 0,
 *             int memout = 0):
 */
  __pyx_t_4 = __Pyx_PyBytes_FromString(__pyx_v_19DifferentialAlgebra_BMI_IX_undefined); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1762, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_k__71 = __pyx_t_4;
  __Pyx_GIVEREF(__pyx_t_4);
  __pyx_t_4 = 0;

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":1757
 *             equations,
 *             BaseFieldExtension basefield = None,
 *             list attributes = [             # <<<<<<<<<<<<<<
 *                     'differential', 'autoreduced', 'primitive',
 *                     'squarefree', 'normalized', 'coherent'],
 */
  __pyx_t_4 = PyList_New(6); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1757, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_INCREF(__pyx_n_u_differential);
  __Pyx_GIVEREF(__pyx_n_u_differential);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 0, __pyx_n_u_differential)) __PYX_ERR(2, 1757, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_u_autoreduced);
  __Pyx_GIVEREF(__pyx_n_u_autoreduced);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 1, __pyx_n_u_autoreduced)) __PYX_ERR(2, 1757, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_u_primitive);
  __Pyx_GIVEREF(__pyx_n_u_primitive);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 2, __pyx_n_u_primitive)) __PYX_ERR(2, 1757, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_u_squarefree);
  __Pyx_GIVEREF(__pyx_n_u_squarefree);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 3, __pyx_n_u_squarefree)) __PYX_ERR(2, 1757, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_u_normalized);
  __Pyx_GIVEREF(__pyx_n_u_normalized);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 4, __pyx_n_u_normalized)) __PYX_ERR(2, 1757, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_u_coherent);
  __Pyx_GIVEREF(__pyx_n_u_coherent);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 5, __pyx_n_u_coherent)) __PYX_ERR(2, 1757, __pyx_L1_error);

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":1760
 *                     'differential', 'autoreduced', 'primitive',
 *                     'squarefree', 'normalized', 'coherent'],
 *             singsol = BMI_IX_all,             # <<<<<<<<<<<<<<
 *             dimlb = BMI_IX_safecase,
 *             notation = BMI_IX_undefined,
 */
  __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v_19DifferentialAlgebra_BMI_IX_all); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 1760, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":1761
 *                     'squarefree', 'normalized', 'coherent'],
 *             singsol = BMI_IX_all,
 *             dimlb = BMI_IX_safecase,             # <<<<<<<<<<<<<<
 *             notation = BMI_IX_undefined,
 *             int timeout = 0,
 */
  __pyx_t_6 = __Pyx_PyBytes_FromString(__pyx_v_19DifferentialAlgebra_BMI_IX_safecase); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 1761, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":1762
 *             singsol = BMI_IX_all,
 *             dimlb = BMI_IX_safecase,
 *             notation = BMI_IX_undefined,             # <<<<<<<<<<<<<<
 *             int timeout = 0,
 *             int memout = 0):
 */
  __pyx_t_5 = __Pyx_PyBytes_FromString(__pyx_v_19DifferentialAlgebra_BMI_IX_undefined); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1762, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);

  /* "../../bmi/sympy/RegularDifferentialChain.pyx":1753
 * 
 * # RosenfeldGroebner
 *     def RosenfeldGroebner (             # <<<<<<<<<<<<<<
 *             self,
 *             equations,
 */
  __pyx_t_2 = PyTuple_New(7); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1753, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, Py_None)) __PYX_ERR(2, 1753, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_4);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_4)) __PYX_ERR(2, 1753, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_3);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_t_3)) __PYX_ERR(2, 1753, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_6);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 3, __pyx_t_6)) __PYX_ERR(2, 1753, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_5);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 4, __pyx_t_5)) __PYX_ERR(2, 1753, __pyx_L1_error);
  __Pyx_INCREF(__pyx_int_0);
  __Pyx_GIVEREF(__pyx_int_0);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 5, __pyx_int_0)) __PYX_ERR(2, 1753, __pyx_L1_error);
  __Pyx_INCREF(__pyx_int_0);
  __Pyx_GIVEREF(__pyx_int_0);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 6, __pyx_int_0)) __PYX_ERR(2, 1753, __pyx_L1_error);
  __pyx_t_4 = 0;
  __pyx_t_3 = 0;
  __pyx_t_6 = 0;
  __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_19DifferentialAlgebra_24RegularDifferentialChain_45RosenfeldGroebner, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_RegularDifferentialChain_Rosenfe, NULL, __pyx_n_s_DifferentialAlgebra, __pyx_d, ((PyObject *)__pyx_codeobj__177)); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 1753, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_5, __pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_19DifferentialAlgebra_RegularDifferentialChain, __pyx_n_s_RosenfeldGroebner, __pyx_t_5) < 0) __PYX_ERR(2, 1753, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  PyType_Modified(__pyx_ptype_19DifferentialAlgebra_RegularDifferentialChain);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "self.regchain cannot be converted to a Python object for pickling"
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_19DifferentialAlgebra_24RegularDifferentialChain_47__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_RegularDifferentialChain___reduc, NULL, __pyx_n_s_DifferentialAlgebra, __pyx_d, ((PyObject *)__pyx_codeobj__178)); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_5) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "self.regchain cannot be converted to a Python object for pickling"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "self.regchain cannot be converted to a Python object for pickling"
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_19DifferentialAlgebra_24RegularDifferentialChain_49__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_RegularDifferentialChain___setst, NULL, __pyx_n_s_DifferentialAlgebra, __pyx_d, ((PyObject *)__pyx_codeobj__179)); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_5) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "../../bmi/sympy/BaseFieldExtension.pyx":168
 * 
 * # __process_notation
 *     def __process_notation (self, notation) :             # <<<<<<<<<<<<<<
 *         cdef strnot
 *         if not isinstance (notation, str) :
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_19DifferentialAlgebra_18BaseFieldExtension_1_BaseFieldExtension__process_notation, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_BaseFieldExtension___process_not, NULL, __pyx_n_s_DifferentialAlgebra, __pyx_d, ((PyObject *)__pyx_codeobj__180)); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 168, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_19DifferentialAlgebra_BaseFieldExtension, __pyx_n_s_BaseFieldExtension__process_not, __pyx_t_5) < 0) __PYX_ERR(5, 168, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  PyType_Modified(__pyx_ptype_19DifferentialAlgebra_BaseFieldExtension);

  /* "../../bmi/sympy/BaseFieldExtension.pyx":181
 *     def __init__ (
 *             self,
 *             list generators = [],             # <<<<<<<<<<<<<<
 *             RegularDifferentialChain relations = None,
 *             DifferentialRing ring = None,
 */
  __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 181, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_k__72 = ((PyObject*)__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_5);
  __pyx_t_5 = 0;

  /* "../../bmi/sympy/BaseFieldExtension.pyx":184
 *             RegularDifferentialChain relations = None,
 *             DifferentialRing ring = None,
 *             notation = BMI_IX_undefined):             # <<<<<<<<<<<<<<
 *         r"""
 *         The constructor
 */
  __pyx_t_5 = __Pyx_PyBytes_FromString(__pyx_v_19DifferentialAlgebra_BMI_IX_undefined); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 184, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_k__73 = __pyx_t_5;
  __Pyx_GIVEREF(__pyx_t_5);
  __pyx_t_5 = 0;

  /* "../../bmi/sympy/BaseFieldExtension.pyx":283
 *         return 'differential_field'
 * 
 *     def _latex_ (self):             # <<<<<<<<<<<<<<
 * #   The LaTeX representation
 *         return 'differential\\_field'
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_19DifferentialAlgebra_18BaseFieldExtension_7_latex_, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_BaseFieldExtension__latex, NULL, __pyx_n_s_DifferentialAlgebra, __pyx_d, ((PyObject *)__pyx_codeobj__181)); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 283, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_19DifferentialAlgebra_BaseFieldExtension, __pyx_n_s_latex_2, __pyx_t_5) < 0) __PYX_ERR(5, 283, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  PyType_Modified(__pyx_ptype_19DifferentialAlgebra_BaseFieldExtension);

  /* "../../bmi/sympy/BaseFieldExtension.pyx":287
 *         return 'differential\\_field'
 * # generators
 *     def generators (self):             # <<<<<<<<<<<<<<
 *         r"""
 *         The list of generators of a base field extension
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_19DifferentialAlgebra_18BaseFieldExtension_9generators, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_BaseFieldExtension_generators, NULL, __pyx_n_s_DifferentialAlgebra, __pyx_d, ((PyObject *)__pyx_codeobj__182)); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 287, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_19DifferentialAlgebra_BaseFieldExtension, __pyx_n_s_generators, __pyx_t_5) < 0) __PYX_ERR(5, 287, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  PyType_Modified(__pyx_ptype_19DifferentialAlgebra_BaseFieldExtension);

  /* "../../bmi/sympy/BaseFieldExtension.pyx":316
 *         return self.gens
 * # relations
 *     def relations (self):             # <<<<<<<<<<<<<<
 *         r"""
 *         The regular differential chain defining the relations of a
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_19DifferentialAlgebra_18BaseFieldExtension_11relations, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_BaseFieldExtension_relations, NULL, __pyx_n_s_DifferentialAlgebra, __pyx_d, ((PyObject *)__pyx_codeobj__183)); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 316, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_19DifferentialAlgebra_BaseFieldExtension, __pyx_n_s_relations_2, __pyx_t_5) < 0) __PYX_ERR(5, 316, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  PyType_Modified(__pyx_ptype_19DifferentialAlgebra_BaseFieldExtension);

  /* "../../bmi/sympy/BaseFieldExtension.pyx":353
 * 
 * # _relations
 *     def _relations (self):             # <<<<<<<<<<<<<<
 *         r"""
 *         The relations in a BMI compatible format, as a string
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_19DifferentialAlgebra_18BaseFieldExtension_13_relations, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_BaseFieldExtension__relations, NULL, __pyx_n_s_DifferentialAlgebra, __pyx_d, ((PyObject *)__pyx_codeobj__185)); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 353, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_19DifferentialAlgebra_BaseFieldExtension, __pyx_n_s_relations, __pyx_t_5) < 0) __PYX_ERR(5, 353, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  PyType_Modified(__pyx_ptype_19DifferentialAlgebra_BaseFieldExtension);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_19DifferentialAlgebra_18BaseFieldExtension_15__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_BaseFieldExtension___reduce_cyth, NULL, __pyx_n_s_DifferentialAlgebra, __pyx_d, ((PyObject *)__pyx_codeobj__187)); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_19DifferentialAlgebra_BaseFieldExtension, __pyx_n_s_reduce_cython, __pyx_t_5) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  PyType_Modified(__pyx_ptype_19DifferentialAlgebra_BaseFieldExtension);

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_BaseFieldExtension, (type(self), 0x472eff0, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_BaseFieldExtension__set_state(self, __pyx_state)
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_19DifferentialAlgebra_18BaseFieldExtension_17__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_BaseFieldExtension___setstate_cy, NULL, __pyx_n_s_DifferentialAlgebra, __pyx_d, ((PyObject *)__pyx_codeobj__188)); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_19DifferentialAlgebra_BaseFieldExtension, __pyx_n_s_setstate_cython, __pyx_t_5) < 0) __PYX_ERR(1, 16, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  PyType_Modified(__pyx_ptype_19DifferentialAlgebra_BaseFieldExtension);

  /* "../../bmi/sympy/DenefLipshitzUple.pyx":37
 *         return 'Denef_Lipshitz_Uple'
 * 
 *     def _latex_ (self):             # <<<<<<<<<<<<<<
 * #   The LaTeX representation
 *         return 'Denef\\_Lipshitz\\_Uple'
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_19DifferentialAlgebra_17DenefLipshitzUple_3_latex_, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_DenefLipshitzUple__latex, NULL, __pyx_n_s_DifferentialAlgebra, __pyx_d, ((PyObject *)__pyx_codeobj__189)); if (unlikely(!__pyx_t_5)) __PYX_ERR(6, 37, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_19DifferentialAlgebra_DenefLipshitzUple, __pyx_n_s_latex_2, __pyx_t_5) < 0) __PYX_ERR(6, 37, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  PyType_Modified(__pyx_ptype_19DifferentialAlgebra_DenefLipshitzUple);

  /* "../../bmi/sympy/DenefLipshitzUple.pyx":47
 * 
 * # __process_notation
 *     def __process_notation (self, notation) :             # <<<<<<<<<<<<<<
 *         cdef strnot
 *         if not isinstance (notation, str) :
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_19DifferentialAlgebra_17DenefLipshitzUple_7_DenefLipshitzUple__process_notation, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_DenefLipshitzUple___process_nota, NULL, __pyx_n_s_DifferentialAlgebra, __pyx_d, ((PyObject *)__pyx_codeobj__190)); if (unlikely(!__pyx_t_5)) __PYX_ERR(6, 47, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_19DifferentialAlgebra_DenefLipshitzUple, __pyx_n_s_DenefLipshitzUple__process_nota, __pyx_t_5) < 0) __PYX_ERR(6, 47, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  PyType_Modified(__pyx_ptype_19DifferentialAlgebra_DenefLipshitzUple);

  /* "../../bmi/sympy/DenefLipshitzUple.pyx":61
 *             self,
 *             equations,
 *             notation = BMI_IX_undefined,             # <<<<<<<<<<<<<<
 *             int timeout = 0,
 *             int memout = 0):
 */
  __pyx_t_5 = __Pyx_PyBytes_FromString(__pyx_v_19DifferentialAlgebra_BMI_IX_undefined); if (unlikely(!__pyx_t_5)) __PYX_ERR(6, 61, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_k__77 = __pyx_t_5;
  __Pyx_GIVEREF(__pyx_t_5);
  __pyx_t_5 = 0;

  /* "../../bmi/sympy/DenefLipshitzUple.pyx":58
 * 
 * # DenefLipshitz
 *     def DenefLipshitz (             # <<<<<<<<<<<<<<
 *             self,
 *             equations,
 */
  __pyx_t_5 = __Pyx_PyBytes_FromString(__pyx_v_19DifferentialAlgebra_BMI_IX_undefined); if (unlikely(!__pyx_t_5)) __PYX_ERR(6, 61, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 58, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_5);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_5)) __PYX_ERR(6, 58, __pyx_L1_error);
  __Pyx_INCREF(__pyx_int_0);
  __Pyx_GIVEREF(__pyx_int_0);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_0)) __PYX_ERR(6, 58, __pyx_L1_error);
  __Pyx_INCREF(__pyx_int_0);
  __Pyx_GIVEREF(__pyx_int_0);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_int_0)) __PYX_ERR(6, 58, __pyx_L1_error);
  __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_19DifferentialAlgebra_17DenefLipshitzUple_9DenefLipshitz, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_DenefLipshitzUple_DenefLipshitz, NULL, __pyx_n_s_DifferentialAlgebra, __pyx_d, ((PyObject *)__pyx_codeobj__192)); if (unlikely(!__pyx_t_5)) __PYX_ERR(6, 58, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_5, __pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_19DifferentialAlgebra_DenefLipshitzUple, __pyx_n_s_DenefLipshitz, __pyx_t_5) < 0) __PYX_ERR(6, 58, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  PyType_Modified(__pyx_ptype_19DifferentialAlgebra_DenefLipshitzUple);

  /* "../../bmi/sympy/DenefLipshitzUple.pyx":237
 *     def constraints (
 *             self,
 *             notation = BMI_IX_undefined,             # <<<<<<<<<<<<<<
 *             int timeout = 0,
 *             int memout = 0):
 */
  __pyx_t_5 = __Pyx_PyBytes_FromString(__pyx_v_19DifferentialAlgebra_BMI_IX_undefined); if (unlikely(!__pyx_t_5)) __PYX_ERR(6, 237, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_k__78 = __pyx_t_5;
  __Pyx_GIVEREF(__pyx_t_5);
  __pyx_t_5 = 0;

  /* "../../bmi/sympy/DenefLipshitzUple.pyx":235
 * 
 * # constraints
 *     def constraints (             # <<<<<<<<<<<<<<
 *             self,
 *             notation = BMI_IX_undefined,
 */
  __pyx_t_5 = __Pyx_PyBytes_FromString(__pyx_v_19DifferentialAlgebra_BMI_IX_undefined); if (unlikely(!__pyx_t_5)) __PYX_ERR(6, 237, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 235, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_5);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_5)) __PYX_ERR(6, 235, __pyx_L1_error);
  __Pyx_INCREF(__pyx_int_0);
  __Pyx_GIVEREF(__pyx_int_0);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_0)) __PYX_ERR(6, 235, __pyx_L1_error);
  __Pyx_INCREF(__pyx_int_0);
  __Pyx_GIVEREF(__pyx_int_0);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_int_0)) __PYX_ERR(6, 235, __pyx_L1_error);
  __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_19DifferentialAlgebra_17DenefLipshitzUple_11constraints, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_DenefLipshitzUple_constraints, NULL, __pyx_n_s_DifferentialAlgebra, __pyx_d, ((PyObject *)__pyx_codeobj__194)); if (unlikely(!__pyx_t_5)) __PYX_ERR(6, 235, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_5, __pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_19DifferentialAlgebra_DenefLipshitzUple, __pyx_n_s_constraints, __pyx_t_5) < 0) __PYX_ERR(6, 235, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  PyType_Modified(__pyx_ptype_19DifferentialAlgebra_DenefLipshitzUple);

  /* "../../bmi/sympy/DenefLipshitzUple.pyx":345
 *     def leading_polynomial (
 *             self,
 *             notation = BMI_IX_undefined,             # <<<<<<<<<<<<<<
 *             int timeout = 0,
 *             int memout = 0):
 */
  __pyx_t_5 = __Pyx_PyBytes_FromString(__pyx_v_19DifferentialAlgebra_BMI_IX_undefined); if (unlikely(!__pyx_t_5)) __PYX_ERR(6, 345, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_k__79 = __pyx_t_5;
  __Pyx_GIVEREF(__pyx_t_5);
  __pyx_t_5 = 0;

  /* "../../bmi/sympy/DenefLipshitzUple.pyx":343
 * 
 * # leading_polynomial
 *     def leading_polynomial (             # <<<<<<<<<<<<<<
 *             self,
 *             notation = BMI_IX_undefined,
 */
  __pyx_t_5 = __Pyx_PyBytes_FromString(__pyx_v_19DifferentialAlgebra_BMI_IX_undefined); if (unlikely(!__pyx_t_5)) __PYX_ERR(6, 345, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 343, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_5);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_5)) __PYX_ERR(6, 343, __pyx_L1_error);
  __Pyx_INCREF(__pyx_int_0);
  __Pyx_GIVEREF(__pyx_int_0);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_0)) __PYX_ERR(6, 343, __pyx_L1_error);
  __Pyx_INCREF(__pyx_int_0);
  __Pyx_GIVEREF(__pyx_int_0);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_int_0)) __PYX_ERR(6, 343, __pyx_L1_error);
  __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_19DifferentialAlgebra_17DenefLipshitzUple_13leading_polynomial, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_DenefLipshitzUple_leading_polyno, NULL, __pyx_n_s_DifferentialAlgebra, __pyx_d, ((PyObject *)__pyx_codeobj__195)); if (unlikely(!__pyx_t_5)) __PYX_ERR(6, 343, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_5, __pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_19DifferentialAlgebra_DenefLipshitzUple, __pyx_n_s_leading_polynomial, __pyx_t_5) < 0) __PYX_ERR(6, 343, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  PyType_Modified(__pyx_ptype_19DifferentialAlgebra_DenefLipshitzUple);

  /* "../../bmi/sympy/DenefLipshitzUple.pyx":480
 *     def series (
 *             self,
 *             list vars = [],             # <<<<<<<<<<<<<<
 *             notation = BMI_IX_undefined,
 *             int timeout = 0,
 */
  __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(6, 480, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_k__80 = ((PyObject*)__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_5);
  __pyx_t_5 = 0;

  /* "../../bmi/sympy/DenefLipshitzUple.pyx":481
 *             self,
 *             list vars = [],
 *             notation = BMI_IX_undefined,             # <<<<<<<<<<<<<<
 *             int timeout = 0,
 *             int memout = 0):
 */
  __pyx_t_5 = __Pyx_PyBytes_FromString(__pyx_v_19DifferentialAlgebra_BMI_IX_undefined); if (unlikely(!__pyx_t_5)) __PYX_ERR(6, 481, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_k__81 = __pyx_t_5;
  __Pyx_GIVEREF(__pyx_t_5);
  __pyx_t_5 = 0;

  /* "../../bmi/sympy/DenefLipshitzUple.pyx":480
 *     def series (
 *             self,
 *             list vars = [],             # <<<<<<<<<<<<<<
 *             notation = BMI_IX_undefined,
 *             int timeout = 0,
 */
  __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(6, 480, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);

  /* "../../bmi/sympy/DenefLipshitzUple.pyx":481
 *             self,
 *             list vars = [],
 *             notation = BMI_IX_undefined,             # <<<<<<<<<<<<<<
 *             int timeout = 0,
 *             int memout = 0):
 */
  __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v_19DifferentialAlgebra_BMI_IX_undefined); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 481, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);

  /* "../../bmi/sympy/DenefLipshitzUple.pyx":478
 * 
 * # series
 *     def series (             # <<<<<<<<<<<<<<
 *             self,
 *             list vars = [],
 */
  __pyx_t_6 = PyTuple_New(4); if (unlikely(!__pyx_t_6)) __PYX_ERR(6, 478, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_5);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5)) __PYX_ERR(6, 478, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_2);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_2)) __PYX_ERR(6, 478, __pyx_L1_error);
  __Pyx_INCREF(__pyx_int_0);
  __Pyx_GIVEREF(__pyx_int_0);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_int_0)) __PYX_ERR(6, 478, __pyx_L1_error);
  __Pyx_INCREF(__pyx_int_0);
  __Pyx_GIVEREF(__pyx_int_0);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 3, __pyx_int_0)) __PYX_ERR(6, 478, __pyx_L1_error);
  __pyx_t_5 = 0;
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_19DifferentialAlgebra_17DenefLipshitzUple_15series, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_DenefLipshitzUple_series, NULL, __pyx_n_s_DifferentialAlgebra, __pyx_d, ((PyObject *)__pyx_codeobj__197)); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 478, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_t_6);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_19DifferentialAlgebra_DenefLipshitzUple, __pyx_n_s_series, __pyx_t_2) < 0) __PYX_ERR(6, 478, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_19DifferentialAlgebra_DenefLipshitzUple);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "self.DLuple cannot be converted to a Python object for pickling"
 * def __setstate_cython__(self, __pyx_state):
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_19DifferentialAlgebra_17DenefLipshitzUple_17__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_DenefLipshitzUple___reduce_cytho, NULL, __pyx_n_s_DifferentialAlgebra, __pyx_d, ((PyObject *)__pyx_codeobj__198)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "self.DLuple cannot be converted to a Python object for pickling"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "self.DLuple cannot be converted to a Python object for pickling"
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_19DifferentialAlgebra_17DenefLipshitzUple_19__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_DenefLipshitzUple___setstate_cyt, NULL, __pyx_n_s_DifferentialAlgebra, __pyx_d, ((PyObject *)__pyx_codeobj__199)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_2) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_BaseFieldExtension(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_19DifferentialAlgebra_7__pyx_unpickle_BaseFieldExtension, 0, __pyx_n_s_pyx_unpickle_BaseFieldExtensio, NULL, __pyx_n_s_DifferentialAlgebra, __pyx_d, ((PyObject *)__pyx_codeobj__201)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_BaseFieldExtensio, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "DifferentialAlgebra.pyx":1
 * r"""             # <<<<<<<<<<<<<<
 * The DifferentialAlgebra Module
 * 
 */
  __pyx_t_2 = __Pyx_PyDict_NewPresized(45); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_DifferentialRing_coeffs_line_375, __pyx_kp_u_The_coefficients_and_monomials) < 0) __PYX_ERR(4, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_DifferentialRing_equations_line, __pyx_kp_u_A_selection_in_a_list_of_polyno) < 0) __PYX_ERR(4, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_DifferentialRing_evaluate_line_7, __pyx_kp_u_Evaluate_a_differential_fractio) < 0) __PYX_ERR(4, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_DifferentialRing_factor_derivati_2, __pyx_kp_u_Split_a_derivative_into_derivat) < 0) __PYX_ERR(4, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_DifferentialRing_indets_line_963, __pyx_kp_u_The_indeterminates_of_a_Differe) < 0) __PYX_ERR(4, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_DifferentialRing_is_differential_2, __pyx_kp_u_Test_if_an_expression_is_a_rati) < 0) __PYX_ERR(4, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_DifferentialRing_is_constant_lin, __pyx_kp_u_Test_if_a_rational_fraction_is) < 0) __PYX_ERR(4, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_DifferentialRing_leading_derivat_2, __pyx_kp_u_The_leading_derivative_of_a_rat) < 0) __PYX_ERR(4, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_DifferentialRing_leading_rank_li, __pyx_kp_u_The_leading_rank_of_a_rational) < 0) __PYX_ERR(4, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_DifferentialRing_initial_line_13, __pyx_kp_u_The_initial_of_a_polynomial_or) < 0) __PYX_ERR(4, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_DifferentialRing_leading_coeffic_2, __pyx_kp_u_The_leading_coefficient_of_a_ra) < 0) __PYX_ERR(4, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_DifferentialRing_tail_line_1513, __pyx_kp_u_The_tail_of_a_rational_fraction) < 0) __PYX_ERR(4, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_DifferentialRing_separant_line_1, __pyx_kp_u_The_separant_of_a_rational_frac) < 0) __PYX_ERR(4, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_DifferentialRing_integrate_line, __pyx_kp_u_Integrate_a_rational_differenti) < 0) __PYX_ERR(4, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_DifferentialRing_differentiate_l, __pyx_kp_u_Differentiate_a_rational_differ) < 0) __PYX_ERR(4, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_DifferentialRing_differential_pr_2, __pyx_kp_u_Ritt_s_reduction_algorithm_by_a) < 0) __PYX_ERR(4, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_DifferentialRing_normal_form_lin, __pyx_kp_u_The_normal_form_of_a_rational_d) < 0) __PYX_ERR(4, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_DifferentialRing_sort_line_2161, __pyx_kp_u_Sort_a_list_of_polynomials_acco) < 0) __PYX_ERR(4, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_DifferentialRing_DenefLipshitz_l, __pyx_kp_u_The_DenefLipshitz_algorithm_INP) < 0) __PYX_ERR(4, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_DifferentialRing_RosenfeldGroebn_2, __pyx_kp_u_The_Rosenfeld_Groebner_simplifi) < 0) __PYX_ERR(4, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_RegularDifferentialChain_differe_3, __pyx_kp_u_The_embedding_differential_ring) < 0) __PYX_ERR(4, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_RegularDifferentialChain_equatio_2, __pyx_kp_u_The_list_of_equations_of_a_regu) < 0) __PYX_ERR(4, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_RegularDifferentialChain_attribu_2, __pyx_kp_u_The_list_of_attributes_of_a_Reg) < 0) __PYX_ERR(4, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_RegularDifferentialChain_leading_4, __pyx_kp_u_The_leading_derivatives_of_a_re) < 0) __PYX_ERR(4, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_RegularDifferentialChain_leading_5, __pyx_kp_u_The_leading_ranks_of_a_regular) < 0) __PYX_ERR(4, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_RegularDifferentialChain_initial_2, __pyx_kp_u_The_initials_of_a_regular_diffe) < 0) __PYX_ERR(4, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_RegularDifferentialChain_leading_6, __pyx_kp_u_The_leading_coefficients_of_a_r) < 0) __PYX_ERR(4, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_RegularDifferentialChain_tail_li, __pyx_kp_u_The_tails_of_a_regular_differen) < 0) __PYX_ERR(4, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_RegularDifferentialChain_separan_2, __pyx_kp_u_The_separants_of_a_regular_diff) < 0) __PYX_ERR(4, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_RegularDifferentialChain_indets_2, __pyx_kp_u_The_indeterminates_of_a_Regular) < 0) __PYX_ERR(4, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_RegularDifferentialChain_differe_4, __pyx_kp_u_Ritt_s_reduction_algorithm_by_a_2) < 0) __PYX_ERR(4, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_RegularDifferentialChain_prem_li, __pyx_kp_u_The_pseudo_remainder_of_a_fract) < 0) __PYX_ERR(4, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_RegularDifferentialChain_resulta_2, __pyx_kp_u_The_resultant_of_a_differential) < 0) __PYX_ERR(4, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_RegularDifferentialChain_change_2, __pyx_kp_u_Change_of_ranking_for_regular_c) < 0) __PYX_ERR(4, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_RegularDifferentialChain_normal_2, __pyx_kp_u_The_normal_form_of_a_rational_d_2) < 0) __PYX_ERR(4, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_RegularDifferentialChain_prepara_2, __pyx_kp_u_The_preparation_equation_of_a_p) < 0) __PYX_ERR(4, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_RegularDifferentialChain__Regula, __pyx_kp_u_The_number_of_equations_of_a_re) < 0) __PYX_ERR(4, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_RegularDifferentialChain_Rosenfe_2, __pyx_kp_u_Extend_a_regular_differential_c) < 0) __PYX_ERR(4, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_BaseFieldExtension_generators_li, __pyx_kp_u_The_list_of_generators_of_a_bas) < 0) __PYX_ERR(4, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_BaseFieldExtension_relations_lin, __pyx_kp_u_The_regular_differential_chain) < 0) __PYX_ERR(4, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_BaseFieldExtension__relations_li, __pyx_kp_u_The_relations_in_a_BMI_compatib) < 0) __PYX_ERR(4, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_DenefLipshitzUple_DenefLipshitz_2, __pyx_kp_u_The_DenefLipshitz_algorithm_INP_2) < 0) __PYX_ERR(4, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_DenefLipshitzUple_constraints_li, __pyx_kp_u_The_constraints_of_a_DenefLipsh) < 0) __PYX_ERR(4, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_DenefLipshitzUple_leading_polyno_2, __pyx_kp_u_The_leading_polynomials_of_a_De) < 0) __PYX_ERR(4, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_DenefLipshitzUple_series_line_47, __pyx_kp_u_The_formal_power_series_solutio) < 0) __PYX_ERR(4, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_2) < 0) __PYX_ERR(4, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /*--- Wrapped vars code ---*/

  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  if (__pyx_m) {
    if (__pyx_d && stringtab_initialized) {
      __Pyx_AddTraceback("init DifferentialAlgebra", __pyx_clineno, __pyx_lineno, __pyx_filename);
    }
    #if !CYTHON_USE_MODULE_STATE
    Py_CLEAR(__pyx_m);
    #else
    Py_DECREF(__pyx_m);
    if (pystate_addmodule_run) {
      PyObject *tp, *value, *tb;
      PyErr_Fetch(&tp, &value, &tb);
      PyState_RemoveModule(&__pyx_moduledef);
      PyErr_Restore(tp, value, tb);
    }
    #endif
  } else if (!PyErr_Occurred()) {
    PyErr_SetString(PyExc_ImportError, "init DifferentialAlgebra");
  }
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  #if CYTHON_PEP489_MULTI_PHASE_INIT
  return (__pyx_m != NULL) ? 0 : -1;
  #elif PY_MAJOR_VERSION >= 3
  return __pyx_m;
  #else
  return;
  #endif
}
/* #### Code section: cleanup_globals ### */
/* #### Code section: cleanup_module ### */
/* #### Code section: main_method ### */
/* #### Code section: utility_code_pragmas ### */
#ifdef _MSC_VER
#pragma warning( push )
/* Warning 4127: conditional expression is constant
 * Cython uses constant conditional expressions to allow in inline functions to be optimized at
 * compile-time, so this warning is not useful
 */
#pragma warning( disable : 4127 )
#endif



/* #### Code section: utility_code_def ### */

/* --- Runtime support code --- */
/* Refnanny */
#if CYTHON_REFNANNY
static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) {
    PyObject *m = NULL, *p = NULL;
    void *r = NULL;
    m = PyImport_ImportModule(modname);
    if (!m) goto end;
    p = PyObject_GetAttrString(m, "RefNannyAPI");
    if (!p) goto end;
    r = PyLong_AsVoidPtr(p);
end:
    Py_XDECREF(p);
    Py_XDECREF(m);
    return (__Pyx_RefNannyAPIStruct *)r;
}
#endif

/* PyErrExceptionMatches */
#if CYTHON_FAST_THREAD_STATE
static int __Pyx_PyErr_ExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) {
    Py_ssize_t i, n;
    n = PyTuple_GET_SIZE(tuple);
#if PY_MAJOR_VERSION >= 3
    for (i=0; i<n; i++) {
        if (exc_type == PyTuple_GET_ITEM(tuple, i)) return 1;
    }
#endif
    for (i=0; i<n; i++) {
        if (__Pyx_PyErr_GivenExceptionMatches(exc_type, PyTuple_GET_ITEM(tuple, i))) return 1;
    }
    return 0;
}
static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err) {
    int result;
    PyObject *exc_type;
#if PY_VERSION_HEX >= 0x030C00A6
    PyObject *current_exception = tstate->current_exception;
    if (unlikely(!current_exception)) return 0;
    exc_type = (PyObject*) Py_TYPE(current_exception);
    if (exc_type == err) return 1;
#else
    exc_type = tstate->curexc_type;
    if (exc_type == err) return 1;
    if (unlikely(!exc_type)) return 0;
#endif
    #if CYTHON_AVOID_BORROWED_REFS
    Py_INCREF(exc_type);
    #endif
    if (unlikely(PyTuple_Check(err))) {
        result = __Pyx_PyErr_ExceptionMatchesTuple(exc_type, err);
    } else {
        result = __Pyx_PyErr_GivenExceptionMatches(exc_type, err);
    }
    #if CYTHON_AVOID_BORROWED_REFS
    Py_DECREF(exc_type);
    #endif
    return result;
}
#endif

/* PyErrFetchRestore */
#if CYTHON_FAST_THREAD_STATE
static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
#if PY_VERSION_HEX >= 0x030C00A6
    PyObject *tmp_value;
    assert(type == NULL || (value != NULL && type == (PyObject*) Py_TYPE(value)));
    if (value) {
        #if CYTHON_COMPILING_IN_CPYTHON
        if (unlikely(((PyBaseExceptionObject*) value)->traceback != tb))
        #endif
            PyException_SetTraceback(value, tb);
    }
    tmp_value = tstate->current_exception;
    tstate->current_exception = value;
    Py_XDECREF(tmp_value);
    Py_XDECREF(type);
    Py_XDECREF(tb);
#else
    PyObject *tmp_type, *tmp_value, *tmp_tb;
    tmp_type = tstate->curexc_type;
    tmp_value = tstate->curexc_value;
    tmp_tb = tstate->curexc_traceback;
    tstate->curexc_type = type;
    tstate->curexc_value = value;
    tstate->curexc_traceback = tb;
    Py_XDECREF(tmp_type);
    Py_XDECREF(tmp_value);
    Py_XDECREF(tmp_tb);
#endif
}
static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
#if PY_VERSION_HEX >= 0x030C00A6
    PyObject* exc_value;
    exc_value = tstate->current_exception;
    tstate->current_exception = 0;
    *value = exc_value;
    *type = NULL;
    *tb = NULL;
    if (exc_value) {
        *type = (PyObject*) Py_TYPE(exc_value);
        Py_INCREF(*type);
        #if CYTHON_COMPILING_IN_CPYTHON
        *tb = ((PyBaseExceptionObject*) exc_value)->traceback;
        Py_XINCREF(*tb);
        #else
        *tb = PyException_GetTraceback(exc_value);
        #endif
    }
#else
    *type = tstate->curexc_type;
    *value = tstate->curexc_value;
    *tb = tstate->curexc_traceback;
    tstate->curexc_type = 0;
    tstate->curexc_value = 0;
    tstate->curexc_traceback = 0;
#endif
}
#endif

/* PyObjectGetAttrStr */
#if CYTHON_USE_TYPE_SLOTS
static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) {
    PyTypeObject* tp = Py_TYPE(obj);
    if (likely(tp->tp_getattro))
        return tp->tp_getattro(obj, attr_name);
#if PY_MAJOR_VERSION < 3
    if (likely(tp->tp_getattr))
        return tp->tp_getattr(obj, PyString_AS_STRING(attr_name));
#endif
    return PyObject_GetAttr(obj, attr_name);
}
#endif

/* PyObjectGetAttrStrNoError */
#if __PYX_LIMITED_VERSION_HEX < 0x030d00A1
static void __Pyx_PyObject_GetAttrStr_ClearAttributeError(void) {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    if (likely(__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError)))
        __Pyx_PyErr_Clear();
}
#endif
static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name) {
    PyObject *result;
#if __PYX_LIMITED_VERSION_HEX >= 0x030d00A1
    (void) PyObject_GetOptionalAttr(obj, attr_name, &result);
    return result;
#else
#if CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_TYPE_SLOTS && PY_VERSION_HEX >= 0x030700B1
    PyTypeObject* tp = Py_TYPE(obj);
    if (likely(tp->tp_getattro == PyObject_GenericGetAttr)) {
        return _PyObject_GenericGetAttrWithDict(obj, attr_name, NULL, 1);
    }
#endif
    result = __Pyx_PyObject_GetAttrStr(obj, attr_name);
    if (unlikely(!result)) {
        __Pyx_PyObject_GetAttrStr_ClearAttributeError();
    }
    return result;
#endif
}

/* GetBuiltinName */
static PyObject *__Pyx_GetBuiltinName(PyObject *name) {
    PyObject* result = __Pyx_PyObject_GetAttrStrNoError(__pyx_b, name);
    if (unlikely(!result) && !PyErr_Occurred()) {
        PyErr_Format(PyExc_NameError,
#if PY_MAJOR_VERSION >= 3
            "name '%U' is not defined", name);
#else
            "name '%.200s' is not defined", PyString_AS_STRING(name));
#endif
    }
    return result;
}

/* TupleAndListFromArray */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE void __Pyx_copy_object_array(PyObject *const *CYTHON_RESTRICT src, PyObject** CYTHON_RESTRICT dest, Py_ssize_t length) {
    PyObject *v;
    Py_ssize_t i;
    for (i = 0; i < length; i++) {
        v = dest[i] = src[i];
        Py_INCREF(v);
    }
}
static CYTHON_INLINE PyObject *
__Pyx_PyTuple_FromArray(PyObject *const *src, Py_ssize_t n)
{
    PyObject *res;
    if (n <= 0) {
        Py_INCREF(__pyx_empty_tuple);
        return __pyx_empty_tuple;
    }
    res = PyTuple_New(n);
    if (unlikely(res == NULL)) return NULL;
    __Pyx_copy_object_array(src, ((PyTupleObject*)res)->ob_item, n);
    return res;
}
static CYTHON_INLINE PyObject *
__Pyx_PyList_FromArray(PyObject *const *src, Py_ssize_t n)
{
    PyObject *res;
    if (n <= 0) {
        return PyList_New(0);
    }
    res = PyList_New(n);
    if (unlikely(res == NULL)) return NULL;
    __Pyx_copy_object_array(src, ((PyListObject*)res)->ob_item, n);
    return res;
}
#endif

/* BytesEquals */
static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals) {
#if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API
    return PyObject_RichCompareBool(s1, s2, equals);
#else
    if (s1 == s2) {
        return (equals == Py_EQ);
    } else if (PyBytes_CheckExact(s1) & PyBytes_CheckExact(s2)) {
        const char *ps1, *ps2;
        Py_ssize_t length = PyBytes_GET_SIZE(s1);
        if (length != PyBytes_GET_SIZE(s2))
            return (equals == Py_NE);
        ps1 = PyBytes_AS_STRING(s1);
        ps2 = PyBytes_AS_STRING(s2);
        if (ps1[0] != ps2[0]) {
            return (equals == Py_NE);
        } else if (length == 1) {
            return (equals == Py_EQ);
        } else {
            int result;
#if CYTHON_USE_UNICODE_INTERNALS && (PY_VERSION_HEX < 0x030B0000)
            Py_hash_t hash1, hash2;
            hash1 = ((PyBytesObject*)s1)->ob_shash;
            hash2 = ((PyBytesObject*)s2)->ob_shash;
            if (hash1 != hash2 && hash1 != -1 && hash2 != -1) {
                return (equals == Py_NE);
            }
#endif
            result = memcmp(ps1, ps2, (size_t)length);
            return (equals == Py_EQ) ? (result == 0) : (result != 0);
        }
    } else if ((s1 == Py_None) & PyBytes_CheckExact(s2)) {
        return (equals == Py_NE);
    } else if ((s2 == Py_None) & PyBytes_CheckExact(s1)) {
        return (equals == Py_NE);
    } else {
        int result;
        PyObject* py_result = PyObject_RichCompare(s1, s2, equals);
        if (!py_result)
            return -1;
        result = __Pyx_PyObject_IsTrue(py_result);
        Py_DECREF(py_result);
        return result;
    }
#endif
}

/* UnicodeEquals */
static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals) {
#if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API
    return PyObject_RichCompareBool(s1, s2, equals);
#else
#if PY_MAJOR_VERSION < 3
    PyObject* owned_ref = NULL;
#endif
    int s1_is_unicode, s2_is_unicode;
    if (s1 == s2) {
        goto return_eq;
    }
    s1_is_unicode = PyUnicode_CheckExact(s1);
    s2_is_unicode = PyUnicode_CheckExact(s2);
#if PY_MAJOR_VERSION < 3
    if ((s1_is_unicode & (!s2_is_unicode)) && PyString_CheckExact(s2)) {
        owned_ref = PyUnicode_FromObject(s2);
        if (unlikely(!owned_ref))
            return -1;
        s2 = owned_ref;
        s2_is_unicode = 1;
    } else if ((s2_is_unicode & (!s1_is_unicode)) && PyString_CheckExact(s1)) {
        owned_ref = PyUnicode_FromObject(s1);
        if (unlikely(!owned_ref))
            return -1;
        s1 = owned_ref;
        s1_is_unicode = 1;
    } else if (((!s2_is_unicode) & (!s1_is_unicode))) {
        return __Pyx_PyBytes_Equals(s1, s2, equals);
    }
#endif
    if (s1_is_unicode & s2_is_unicode) {
        Py_ssize_t length;
        int kind;
        void *data1, *data2;
        if (unlikely(__Pyx_PyUnicode_READY(s1) < 0) || unlikely(__Pyx_PyUnicode_READY(s2) < 0))
            return -1;
        length = __Pyx_PyUnicode_GET_LENGTH(s1);
        if (length != __Pyx_PyUnicode_GET_LENGTH(s2)) {
            goto return_ne;
        }
#if CYTHON_USE_UNICODE_INTERNALS
        {
            Py_hash_t hash1, hash2;
        #if CYTHON_PEP393_ENABLED
            hash1 = ((PyASCIIObject*)s1)->hash;
            hash2 = ((PyASCIIObject*)s2)->hash;
        #else
            hash1 = ((PyUnicodeObject*)s1)->hash;
            hash2 = ((PyUnicodeObject*)s2)->hash;
        #endif
            if (hash1 != hash2 && hash1 != -1 && hash2 != -1) {
                goto return_ne;
            }
        }
#endif
        kind = __Pyx_PyUnicode_KIND(s1);
        if (kind != __Pyx_PyUnicode_KIND(s2)) {
            goto return_ne;
        }
        data1 = __Pyx_PyUnicode_DATA(s1);
        data2 = __Pyx_PyUnicode_DATA(s2);
        if (__Pyx_PyUnicode_READ(kind, data1, 0) != __Pyx_PyUnicode_READ(kind, data2, 0)) {
            goto return_ne;
        } else if (length == 1) {
            goto return_eq;
        } else {
            int result = memcmp(data1, data2, (size_t)(length * kind));
            #if PY_MAJOR_VERSION < 3
            Py_XDECREF(owned_ref);
            #endif
            return (equals == Py_EQ) ? (result == 0) : (result != 0);
        }
    } else if ((s1 == Py_None) & s2_is_unicode) {
        goto return_ne;
    } else if ((s2 == Py_None) & s1_is_unicode) {
        goto return_ne;
    } else {
        int result;
        PyObject* py_result = PyObject_RichCompare(s1, s2, equals);
        #if PY_MAJOR_VERSION < 3
        Py_XDECREF(owned_ref);
        #endif
        if (!py_result)
            return -1;
        result = __Pyx_PyObject_IsTrue(py_result);
        Py_DECREF(py_result);
        return result;
    }
return_eq:
    #if PY_MAJOR_VERSION < 3
    Py_XDECREF(owned_ref);
    #endif
    return (equals == Py_EQ);
return_ne:
    #if PY_MAJOR_VERSION < 3
    Py_XDECREF(owned_ref);
    #endif
    return (equals == Py_NE);
#endif
}

/* fastcall */
#if CYTHON_METH_FASTCALL
static CYTHON_INLINE PyObject * __Pyx_GetKwValue_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues, PyObject *s)
{
    Py_ssize_t i, n = PyTuple_GET_SIZE(kwnames);
    for (i = 0; i < n; i++)
    {
        if (s == PyTuple_GET_ITEM(kwnames, i)) return kwvalues[i];
    }
    for (i = 0; i < n; i++)
    {
        int eq = __Pyx_PyUnicode_Equals(s, PyTuple_GET_ITEM(kwnames, i), Py_EQ);
        if (unlikely(eq != 0)) {
            if (unlikely(eq < 0)) return NULL;
            return kwvalues[i];
        }
    }
    return NULL;
}
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000
CYTHON_UNUSED static PyObject *__Pyx_KwargsAsDict_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues) {
    Py_ssize_t i, nkwargs = PyTuple_GET_SIZE(kwnames);
    PyObject *dict;
    dict = PyDict_New();
    if (unlikely(!dict))
        return NULL;
    for (i=0; i<nkwargs; i++) {
        PyObject *key = PyTuple_GET_ITEM(kwnames, i);
        if (unlikely(PyDict_SetItem(dict, key, kwvalues[i]) < 0))
            goto bad;
    }
    return dict;
bad:
    Py_DECREF(dict);
    return NULL;
}
#endif
#endif

/* RaiseDoubleKeywords */
static void __Pyx_RaiseDoubleKeywordsError(
    const char* func_name,
    PyObject* kw_name)
{
    PyErr_Format(PyExc_TypeError,
        #if PY_MAJOR_VERSION >= 3
        "%s() got multiple values for keyword argument '%U'", func_name, kw_name);
        #else
        "%s() got multiple values for keyword argument '%s'", func_name,
        PyString_AsString(kw_name));
        #endif
}

/* ParseKeywords */
static int __Pyx_ParseOptionalKeywords(
    PyObject *kwds,
    PyObject *const *kwvalues,
    PyObject **argnames[],
    PyObject *kwds2,
    PyObject *values[],
    Py_ssize_t num_pos_args,
    const char* function_name)
{
    PyObject *key = 0, *value = 0;
    Py_ssize_t pos = 0;
    PyObject*** name;
    PyObject*** first_kw_arg = argnames + num_pos_args;
    int kwds_is_tuple = CYTHON_METH_FASTCALL && likely(PyTuple_Check(kwds));
    while (1) {
        Py_XDECREF(key); key = NULL;
        Py_XDECREF(value); value = NULL;
        if (kwds_is_tuple) {
            Py_ssize_t size;
#if CYTHON_ASSUME_SAFE_MACROS
            size = PyTuple_GET_SIZE(kwds);
#else
            size = PyTuple_Size(kwds);
            if (size < 0) goto bad;
#endif
            if (pos >= size) break;
#if CYTHON_AVOID_BORROWED_REFS
            key = __Pyx_PySequence_ITEM(kwds, pos);
            if (!key) goto bad;
#elif CYTHON_ASSUME_SAFE_MACROS
            key = PyTuple_GET_ITEM(kwds, pos);
#else
            key = PyTuple_GetItem(kwds, pos);
            if (!key) goto bad;
#endif
            value = kwvalues[pos];
            pos++;
        }
        else
        {
            if (!PyDict_Next(kwds, &pos, &key, &value)) break;
#if CYTHON_AVOID_BORROWED_REFS
            Py_INCREF(key);
#endif
        }
        name = first_kw_arg;
        while (*name && (**name != key)) name++;
        if (*name) {
            values[name-argnames] = value;
#if CYTHON_AVOID_BORROWED_REFS
            Py_INCREF(value);
            Py_DECREF(key);
#endif
            key = NULL;
            value = NULL;
            continue;
        }
#if !CYTHON_AVOID_BORROWED_REFS
        Py_INCREF(key);
#endif
        Py_INCREF(value);
        name = first_kw_arg;
        #if PY_MAJOR_VERSION < 3
        if (likely(PyString_Check(key))) {
            while (*name) {
                if ((CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**name) == PyString_GET_SIZE(key))
                        && _PyString_Eq(**name, key)) {
                    values[name-argnames] = value;
#if CYTHON_AVOID_BORROWED_REFS
                    value = NULL;
#endif
                    break;
                }
                name++;
            }
            if (*name) continue;
            else {
                PyObject*** argname = argnames;
                while (argname != first_kw_arg) {
                    if ((**argname == key) || (
                            (CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**argname) == PyString_GET_SIZE(key))
                             && _PyString_Eq(**argname, key))) {
                        goto arg_passed_twice;
                    }
                    argname++;
                }
            }
        } else
        #endif
        if (likely(PyUnicode_Check(key))) {
            while (*name) {
                int cmp = (
                #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
                    (__Pyx_PyUnicode_GET_LENGTH(**name) != __Pyx_PyUnicode_GET_LENGTH(key)) ? 1 :
                #endif
                    PyUnicode_Compare(**name, key)
                );
                if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
                if (cmp == 0) {
                    values[name-argnames] = value;
#if CYTHON_AVOID_BORROWED_REFS
                    value = NULL;
#endif
                    break;
                }
                name++;
            }
            if (*name) continue;
            else {
                PyObject*** argname = argnames;
                while (argname != first_kw_arg) {
                    int cmp = (**argname == key) ? 0 :
                    #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
                        (__Pyx_PyUnicode_GET_LENGTH(**argname) != __Pyx_PyUnicode_GET_LENGTH(key)) ? 1 :
                    #endif
                        PyUnicode_Compare(**argname, key);
                    if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
                    if (cmp == 0) goto arg_passed_twice;
                    argname++;
                }
            }
        } else
            goto invalid_keyword_type;
        if (kwds2) {
            if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad;
        } else {
            goto invalid_keyword;
        }
    }
    Py_XDECREF(key);
    Py_XDECREF(value);
    return 0;
arg_passed_twice:
    __Pyx_RaiseDoubleKeywordsError(function_name, key);
    goto bad;
invalid_keyword_type:
    PyErr_Format(PyExc_TypeError,
        "%.200s() keywords must be strings", function_name);
    goto bad;
invalid_keyword:
    #if PY_MAJOR_VERSION < 3
    PyErr_Format(PyExc_TypeError,
        "%.200s() got an unexpected keyword argument '%.200s'",
        function_name, PyString_AsString(key));
    #else
    PyErr_Format(PyExc_TypeError,
        "%s() got an unexpected keyword argument '%U'",
        function_name, key);
    #endif
bad:
    Py_XDECREF(key);
    Py_XDECREF(value);
    return -1;
}

/* RaiseArgTupleInvalid */
static void __Pyx_RaiseArgtupleInvalid(
    const char* func_name,
    int exact,
    Py_ssize_t num_min,
    Py_ssize_t num_max,
    Py_ssize_t num_found)
{
    Py_ssize_t num_expected;
    const char *more_or_less;
    if (num_found < num_min) {
        num_expected = num_min;
        more_or_less = "at least";
    } else {
        num_expected = num_max;
        more_or_less = "at most";
    }
    if (exact) {
        more_or_less = "exactly";
    }
    PyErr_Format(PyExc_TypeError,
                 "%.200s() takes %.8s %" CYTHON_FORMAT_SSIZE_T "d positional argument%.1s (%" CYTHON_FORMAT_SSIZE_T "d given)",
                 func_name, more_or_less, num_expected,
                 (num_expected == 1) ? "" : "s", num_found);
}

/* PyDictVersioning */
#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS
static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj) {
    PyObject *dict = Py_TYPE(obj)->tp_dict;
    return likely(dict) ? __PYX_GET_DICT_VERSION(dict) : 0;
}
static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj) {
    PyObject **dictptr = NULL;
    Py_ssize_t offset = Py_TYPE(obj)->tp_dictoffset;
    if (offset) {
#if CYTHON_COMPILING_IN_CPYTHON
        dictptr = (likely(offset > 0)) ? (PyObject **) ((char *)obj + offset) : _PyObject_GetDictPtr(obj);
#else
        dictptr = _PyObject_GetDictPtr(obj);
#endif
    }
    return (dictptr && *dictptr) ? __PYX_GET_DICT_VERSION(*dictptr) : 0;
}
static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version) {
    PyObject *dict = Py_TYPE(obj)->tp_dict;
    if (unlikely(!dict) || unlikely(tp_dict_version != __PYX_GET_DICT_VERSION(dict)))
        return 0;
    return obj_dict_version == __Pyx_get_object_dict_version(obj);
}
#endif

/* GetModuleGlobalName */
#if CYTHON_USE_DICT_VERSIONS
static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value)
#else
static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name)
#endif
{
    PyObject *result;
#if !CYTHON_AVOID_BORROWED_REFS
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1 && PY_VERSION_HEX < 0x030d0000
    result = _PyDict_GetItem_KnownHash(__pyx_d, name, ((PyASCIIObject *) name)->hash);
    __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
    if (likely(result)) {
        return __Pyx_NewRef(result);
    } else if (unlikely(PyErr_Occurred())) {
        return NULL;
    }
#elif CYTHON_COMPILING_IN_LIMITED_API
    if (unlikely(!__pyx_m)) {
        return NULL;
    }
    result = PyObject_GetAttr(__pyx_m, name);
    if (likely(result)) {
        return result;
    }
#else
    result = PyDict_GetItem(__pyx_d, name);
    __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
    if (likely(result)) {
        return __Pyx_NewRef(result);
    }
#endif
#else
    result = PyObject_GetItem(__pyx_d, name);
    __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
    if (likely(result)) {
        return __Pyx_NewRef(result);
    }
    PyErr_Clear();
#endif
    return __Pyx_GetBuiltinName(name);
}

/* PyFunctionFastCall */
#if CYTHON_FAST_PYCALL && !CYTHON_VECTORCALL
static PyObject* __Pyx_PyFunction_FastCallNoKw(PyCodeObject *co, PyObject **args, Py_ssize_t na,
                                               PyObject *globals) {
    PyFrameObject *f;
    PyThreadState *tstate = __Pyx_PyThreadState_Current;
    PyObject **fastlocals;
    Py_ssize_t i;
    PyObject *result;
    assert(globals != NULL);
    /* XXX Perhaps we should create a specialized
       PyFrame_New() that doesn't take locals, but does
       take builtins without sanity checking them.
       */
    assert(tstate != NULL);
    f = PyFrame_New(tstate, co, globals, NULL);
    if (f == NULL) {
        return NULL;
    }
    fastlocals = __Pyx_PyFrame_GetLocalsplus(f);
    for (i = 0; i < na; i++) {
        Py_INCREF(*args);
        fastlocals[i] = *args++;
    }
    result = PyEval_EvalFrameEx(f,0);
    ++tstate->recursion_depth;
    Py_DECREF(f);
    --tstate->recursion_depth;
    return result;
}
static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *kwargs) {
    PyCodeObject *co = (PyCodeObject *)PyFunction_GET_CODE(func);
    PyObject *globals = PyFunction_GET_GLOBALS(func);
    PyObject *argdefs = PyFunction_GET_DEFAULTS(func);
    PyObject *closure;
#if PY_MAJOR_VERSION >= 3
    PyObject *kwdefs;
#endif
    PyObject *kwtuple, **k;
    PyObject **d;
    Py_ssize_t nd;
    Py_ssize_t nk;
    PyObject *result;
    assert(kwargs == NULL || PyDict_Check(kwargs));
    nk = kwargs ? PyDict_Size(kwargs) : 0;
    #if PY_MAJOR_VERSION < 3
    if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object"))) {
        return NULL;
    }
    #else
    if (unlikely(Py_EnterRecursiveCall(" while calling a Python object"))) {
        return NULL;
    }
    #endif
    if (
#if PY_MAJOR_VERSION >= 3
            co->co_kwonlyargcount == 0 &&
#endif
            likely(kwargs == NULL || nk == 0) &&
            co->co_flags == (CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE)) {
        if (argdefs == NULL && co->co_argcount == nargs) {
            result = __Pyx_PyFunction_FastCallNoKw(co, args, nargs, globals);
            goto done;
        }
        else if (nargs == 0 && argdefs != NULL
                 && co->co_argcount == Py_SIZE(argdefs)) {
            /* function called with no arguments, but all parameters have
               a default value: use default values as arguments .*/
            args = &PyTuple_GET_ITEM(argdefs, 0);
            result =__Pyx_PyFunction_FastCallNoKw(co, args, Py_SIZE(argdefs), globals);
            goto done;
        }
    }
    if (kwargs != NULL) {
        Py_ssize_t pos, i;
        kwtuple = PyTuple_New(2 * nk);
        if (kwtuple == NULL) {
            result = NULL;
            goto done;
        }
        k = &PyTuple_GET_ITEM(kwtuple, 0);
        pos = i = 0;
        while (PyDict_Next(kwargs, &pos, &k[i], &k[i+1])) {
            Py_INCREF(k[i]);
            Py_INCREF(k[i+1]);
            i += 2;
        }
        nk = i / 2;
    }
    else {
        kwtuple = NULL;
        k = NULL;
    }
    closure = PyFunction_GET_CLOSURE(func);
#if PY_MAJOR_VERSION >= 3
    kwdefs = PyFunction_GET_KW_DEFAULTS(func);
#endif
    if (argdefs != NULL) {
        d = &PyTuple_GET_ITEM(argdefs, 0);
        nd = Py_SIZE(argdefs);
    }
    else {
        d = NULL;
        nd = 0;
    }
#if PY_MAJOR_VERSION >= 3
    result = PyEval_EvalCodeEx((PyObject*)co, globals, (PyObject *)NULL,
                               args, (int)nargs,
                               k, (int)nk,
                               d, (int)nd, kwdefs, closure);
#else
    result = PyEval_EvalCodeEx(co, globals, (PyObject *)NULL,
                               args, (int)nargs,
                               k, (int)nk,
                               d, (int)nd, closure);
#endif
    Py_XDECREF(kwtuple);
done:
    Py_LeaveRecursiveCall();
    return result;
}
#endif

/* PyObjectCall */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) {
    PyObject *result;
    ternaryfunc call = Py_TYPE(func)->tp_call;
    if (unlikely(!call))
        return PyObject_Call(func, arg, kw);
    #if PY_MAJOR_VERSION < 3
    if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
        return NULL;
    #else
    if (unlikely(Py_EnterRecursiveCall(" while calling a Python object")))
        return NULL;
    #endif
    result = (*call)(func, arg, kw);
    Py_LeaveRecursiveCall();
    if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
        PyErr_SetString(
            PyExc_SystemError,
            "NULL result without error in PyObject_Call");
    }
    return result;
}
#endif

/* PyObjectCallMethO */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) {
    PyObject *self, *result;
    PyCFunction cfunc;
    cfunc = __Pyx_CyOrPyCFunction_GET_FUNCTION(func);
    self = __Pyx_CyOrPyCFunction_GET_SELF(func);
    #if PY_MAJOR_VERSION < 3
    if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
        return NULL;
    #else
    if (unlikely(Py_EnterRecursiveCall(" while calling a Python object")))
        return NULL;
    #endif
    result = cfunc(self, arg);
    Py_LeaveRecursiveCall();
    if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
        PyErr_SetString(
            PyExc_SystemError,
            "NULL result without error in PyObject_Call");
    }
    return result;
}
#endif

/* PyObjectFastCall */
#if PY_VERSION_HEX < 0x03090000 || CYTHON_COMPILING_IN_LIMITED_API
static PyObject* __Pyx_PyObject_FastCall_fallback(PyObject *func, PyObject **args, size_t nargs, PyObject *kwargs) {
    PyObject *argstuple;
    PyObject *result = 0;
    size_t i;
    argstuple = PyTuple_New((Py_ssize_t)nargs);
    if (unlikely(!argstuple)) return NULL;
    for (i = 0; i < nargs; i++) {
        Py_INCREF(args[i]);
        if (__Pyx_PyTuple_SET_ITEM(argstuple, (Py_ssize_t)i, args[i]) < 0) goto bad;
    }
    result = __Pyx_PyObject_Call(func, argstuple, kwargs);
  bad:
    Py_DECREF(argstuple);
    return result;
}
#endif
static CYTHON_INLINE PyObject* __Pyx_PyObject_FastCallDict(PyObject *func, PyObject **args, size_t _nargs, PyObject *kwargs) {
    Py_ssize_t nargs = __Pyx_PyVectorcall_NARGS(_nargs);
#if CYTHON_COMPILING_IN_CPYTHON
    if (nargs == 0 && kwargs == NULL) {
        if (__Pyx_CyOrPyCFunction_Check(func) && likely( __Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_NOARGS))
            return __Pyx_PyObject_CallMethO(func, NULL);
    }
    else if (nargs == 1 && kwargs == NULL) {
        if (__Pyx_CyOrPyCFunction_Check(func) && likely( __Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_O))
            return __Pyx_PyObject_CallMethO(func, args[0]);
    }
#endif
    #if PY_VERSION_HEX < 0x030800B1
    #if CYTHON_FAST_PYCCALL
    if (PyCFunction_Check(func)) {
        if (kwargs) {
            return _PyCFunction_FastCallDict(func, args, nargs, kwargs);
        } else {
            return _PyCFunction_FastCallKeywords(func, args, nargs, NULL);
        }
    }
    #if PY_VERSION_HEX >= 0x030700A1
    if (!kwargs && __Pyx_IS_TYPE(func, &PyMethodDescr_Type)) {
        return _PyMethodDescr_FastCallKeywords(func, args, nargs, NULL);
    }
    #endif
    #endif
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(func)) {
        return __Pyx_PyFunction_FastCallDict(func, args, nargs, kwargs);
    }
    #endif
    #endif
    if (kwargs == NULL) {
        #if CYTHON_VECTORCALL
        #if PY_VERSION_HEX < 0x03090000
        vectorcallfunc f = _PyVectorcall_Function(func);
        #else
        vectorcallfunc f = PyVectorcall_Function(func);
        #endif
        if (f) {
            return f(func, args, (size_t)nargs, NULL);
        }
        #elif defined(__Pyx_CyFunction_USED) && CYTHON_BACKPORT_VECTORCALL
        if (__Pyx_CyFunction_CheckExact(func)) {
            __pyx_vectorcallfunc f = __Pyx_CyFunction_func_vectorcall(func);
            if (f) return f(func, args, (size_t)nargs, NULL);
        }
        #endif
    }
    if (nargs == 0) {
        return __Pyx_PyObject_Call(func, __pyx_empty_tuple, kwargs);
    }
    #if PY_VERSION_HEX >= 0x03090000 && !CYTHON_COMPILING_IN_LIMITED_API
    return PyObject_VectorcallDict(func, args, (size_t)nargs, kwargs);
    #else
    return __Pyx_PyObject_FastCall_fallback(func, args, (size_t)nargs, kwargs);
    #endif
}

/* GetItemInt */
static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) {
    PyObject *r;
    if (unlikely(!j)) return NULL;
    r = PyObject_GetItem(o, j);
    Py_DECREF(j);
    return r;
}
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i,
                                                              CYTHON_NCP_UNUSED int wraparound,
                                                              CYTHON_NCP_UNUSED int boundscheck) {
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    Py_ssize_t wrapped_i = i;
    if (wraparound & unlikely(i < 0)) {
        wrapped_i += PyList_GET_SIZE(o);
    }
    if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyList_GET_SIZE(o)))) {
        PyObject *r = PyList_GET_ITEM(o, wrapped_i);
        Py_INCREF(r);
        return r;
    }
    return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
#else
    return PySequence_GetItem(o, i);
#endif
}
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,
                                                              CYTHON_NCP_UNUSED int wraparound,
                                                              CYTHON_NCP_UNUSED int boundscheck) {
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    Py_ssize_t wrapped_i = i;
    if (wraparound & unlikely(i < 0)) {
        wrapped_i += PyTuple_GET_SIZE(o);
    }
    if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyTuple_GET_SIZE(o)))) {
        PyObject *r = PyTuple_GET_ITEM(o, wrapped_i);
        Py_INCREF(r);
        return r;
    }
    return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
#else
    return PySequence_GetItem(o, i);
#endif
}
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, int is_list,
                                                     CYTHON_NCP_UNUSED int wraparound,
                                                     CYTHON_NCP_UNUSED int boundscheck) {
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS && CYTHON_USE_TYPE_SLOTS
    if (is_list || PyList_CheckExact(o)) {
        Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyList_GET_SIZE(o);
        if ((!boundscheck) || (likely(__Pyx_is_valid_index(n, PyList_GET_SIZE(o))))) {
            PyObject *r = PyList_GET_ITEM(o, n);
            Py_INCREF(r);
            return r;
        }
    }
    else if (PyTuple_CheckExact(o)) {
        Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyTuple_GET_SIZE(o);
        if ((!boundscheck) || likely(__Pyx_is_valid_index(n, PyTuple_GET_SIZE(o)))) {
            PyObject *r = PyTuple_GET_ITEM(o, n);
            Py_INCREF(r);
            return r;
        }
    } else {
        PyMappingMethods *mm = Py_TYPE(o)->tp_as_mapping;
        PySequenceMethods *sm = Py_TYPE(o)->tp_as_sequence;
        if (mm && mm->mp_subscript) {
            PyObject *r, *key = PyInt_FromSsize_t(i);
            if (unlikely(!key)) return NULL;
            r = mm->mp_subscript(o, key);
            Py_DECREF(key);
            return r;
        }
        if (likely(sm && sm->sq_item)) {
            if (wraparound && unlikely(i < 0) && likely(sm->sq_length)) {
                Py_ssize_t l = sm->sq_length(o);
                if (likely(l >= 0)) {
                    i += l;
                } else {
                    if (!PyErr_ExceptionMatches(PyExc_OverflowError))
                        return NULL;
                    PyErr_Clear();
                }
            }
            return sm->sq_item(o, i);
        }
    }
#else
    if (is_list || !PyMapping_Check(o)) {
        return PySequence_GetItem(o, i);
    }
#endif
    return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
}

/* GetAttr */
static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *o, PyObject *n) {
#if CYTHON_USE_TYPE_SLOTS
#if PY_MAJOR_VERSION >= 3
    if (likely(PyUnicode_Check(n)))
#else
    if (likely(PyString_Check(n)))
#endif
        return __Pyx_PyObject_GetAttrStr(o, n);
#endif
    return PyObject_GetAttr(o, n);
}

/* HasAttr */
static CYTHON_INLINE int __Pyx_HasAttr(PyObject *o, PyObject *n) {
    PyObject *r;
    if (unlikely(!__Pyx_PyBaseString_Check(n))) {
        PyErr_SetString(PyExc_TypeError,
                        "hasattr(): attribute name must be string");
        return -1;
    }
    r = __Pyx_GetAttr(o, n);
    if (!r) {
        PyErr_Clear();
        return 0;
    } else {
        Py_DECREF(r);
        return 1;
    }
}

/* ArgTypeTest */
static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact)
{
    __Pyx_TypeName type_name;
    __Pyx_TypeName obj_type_name;
    if (unlikely(!type)) {
        PyErr_SetString(PyExc_SystemError, "Missing type object");
        return 0;
    }
    else if (exact) {
        #if PY_MAJOR_VERSION == 2
        if ((type == &PyBaseString_Type) && likely(__Pyx_PyBaseString_CheckExact(obj))) return 1;
        #endif
    }
    else {
        if (likely(__Pyx_TypeCheck(obj, type))) return 1;
    }
    type_name = __Pyx_PyType_GetName(type);
    obj_type_name = __Pyx_PyType_GetName(Py_TYPE(obj));
    PyErr_Format(PyExc_TypeError,
        "Argument '%.200s' has incorrect type (expected " __Pyx_FMT_TYPENAME
        ", got " __Pyx_FMT_TYPENAME ")", name, type_name, obj_type_name);
    __Pyx_DECREF_TypeName(type_name);
    __Pyx_DECREF_TypeName(obj_type_name);
    return 0;
}

/* RaiseUnexpectedTypeError */
static int
__Pyx_RaiseUnexpectedTypeError(const char *expected, PyObject *obj)
{
    __Pyx_TypeName obj_type_name = __Pyx_PyType_GetName(Py_TYPE(obj));
    PyErr_Format(PyExc_TypeError, "Expected %s, got " __Pyx_FMT_TYPENAME,
                 expected, obj_type_name);
    __Pyx_DECREF_TypeName(obj_type_name);
    return 0;
}

/* UnpackUnboundCMethod */
static PyObject *__Pyx_SelflessCall(PyObject *method, PyObject *args, PyObject *kwargs) {
    PyObject *result;
    PyObject *selfless_args = PyTuple_GetSlice(args, 1, PyTuple_Size(args));
    if (unlikely(!selfless_args)) return NULL;
    result = PyObject_Call(method, selfless_args, kwargs);
    Py_DECREF(selfless_args);
    return result;
}
static PyMethodDef __Pyx_UnboundCMethod_Def = {
     "CythonUnboundCMethod",
     __PYX_REINTERPRET_FUNCION(PyCFunction, __Pyx_SelflessCall),
     METH_VARARGS | METH_KEYWORDS,
     NULL
};
static int __Pyx_TryUnpackUnboundCMethod(__Pyx_CachedCFunction* target) {
    PyObject *method;
    method = __Pyx_PyObject_GetAttrStr(target->type, *target->method_name);
    if (unlikely(!method))
        return -1;
    target->method = method;
#if CYTHON_COMPILING_IN_CPYTHON
    #if PY_MAJOR_VERSION >= 3
    if (likely(__Pyx_TypeCheck(method, &PyMethodDescr_Type)))
    #else
    if (likely(!__Pyx_CyOrPyCFunction_Check(method)))
    #endif
    {
        PyMethodDescrObject *descr = (PyMethodDescrObject*) method;
        target->func = descr->d_method->ml_meth;
        target->flag = descr->d_method->ml_flags & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_STACKLESS);
    } else
#endif
#if CYTHON_COMPILING_IN_PYPY
#else
    if (PyCFunction_Check(method))
#endif
    {
        PyObject *self;
        int self_found;
#if CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_PYPY
        self = PyObject_GetAttrString(method, "__self__");
        if (!self) {
            PyErr_Clear();
        }
#else
        self = PyCFunction_GET_SELF(method);
#endif
        self_found = (self && self != Py_None);
#if CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_PYPY
        Py_XDECREF(self);
#endif
        if (self_found) {
            PyObject *unbound_method = PyCFunction_New(&__Pyx_UnboundCMethod_Def, method);
            if (unlikely(!unbound_method)) return -1;
            Py_DECREF(method);
            target->method = unbound_method;
        }
    }
    return 0;
}

/* CallUnboundCMethod2 */
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030600B1
static CYTHON_INLINE PyObject *__Pyx_CallUnboundCMethod2(__Pyx_CachedCFunction *cfunc, PyObject *self, PyObject *arg1, PyObject *arg2) {
    if (likely(cfunc->func)) {
        PyObject *args[2] = {arg1, arg2};
        if (cfunc->flag == METH_FASTCALL) {
            #if PY_VERSION_HEX >= 0x030700A0
            return (*(__Pyx_PyCFunctionFast)(void*)(PyCFunction)cfunc->func)(self, args, 2);
            #else
            return (*(__Pyx_PyCFunctionFastWithKeywords)(void*)(PyCFunction)cfunc->func)(self, args, 2, NULL);
            #endif
        }
        #if PY_VERSION_HEX >= 0x030700A0
        if (cfunc->flag == (METH_FASTCALL | METH_KEYWORDS))
            return (*(__Pyx_PyCFunctionFastWithKeywords)(void*)(PyCFunction)cfunc->func)(self, args, 2, NULL);
        #endif
    }
    return __Pyx__CallUnboundCMethod2(cfunc, self, arg1, arg2);
}
#endif
static PyObject* __Pyx__CallUnboundCMethod2(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg1, PyObject* arg2){
    PyObject *args, *result = NULL;
    if (unlikely(!cfunc->func && !cfunc->method) && unlikely(__Pyx_TryUnpackUnboundCMethod(cfunc) < 0)) return NULL;
#if CYTHON_COMPILING_IN_CPYTHON
    if (cfunc->func && (cfunc->flag & METH_VARARGS)) {
        args = PyTuple_New(2);
        if (unlikely(!args)) goto bad;
        Py_INCREF(arg1);
        PyTuple_SET_ITEM(args, 0, arg1);
        Py_INCREF(arg2);
        PyTuple_SET_ITEM(args, 1, arg2);
        if (cfunc->flag & METH_KEYWORDS)
            result = (*(PyCFunctionWithKeywords)(void*)(PyCFunction)cfunc->func)(self, args, NULL);
        else
            result = (*cfunc->func)(self, args);
    } else {
        args = PyTuple_New(3);
        if (unlikely(!args)) goto bad;
        Py_INCREF(self);
        PyTuple_SET_ITEM(args, 0, self);
        Py_INCREF(arg1);
        PyTuple_SET_ITEM(args, 1, arg1);
        Py_INCREF(arg2);
        PyTuple_SET_ITEM(args, 2, arg2);
        result = __Pyx_PyObject_Call(cfunc->method, args, NULL);
    }
#else
    args = PyTuple_Pack(3, self, arg1, arg2);
    if (unlikely(!args)) goto bad;
    result = __Pyx_PyObject_Call(cfunc->method, args, NULL);
#endif
bad:
    Py_XDECREF(args);
    return result;
}

/* PyObjectCallOneArg */
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
    PyObject *args[2] = {NULL, arg};
    return __Pyx_PyObject_FastCall(func, args+1, 1 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET);
}

/* RaiseException */
#if PY_MAJOR_VERSION < 3
static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) {
    __Pyx_PyThreadState_declare
    CYTHON_UNUSED_VAR(cause);
    Py_XINCREF(type);
    if (!value || value == Py_None)
        value = NULL;
    else
        Py_INCREF(value);
    if (!tb || tb == Py_None)
        tb = NULL;
    else {
        Py_INCREF(tb);
        if (!PyTraceBack_Check(tb)) {
            PyErr_SetString(PyExc_TypeError,
                "raise: arg 3 must be a traceback or None");
            goto raise_error;
        }
    }
    if (PyType_Check(type)) {
#if CYTHON_COMPILING_IN_PYPY
        if (!value) {
            Py_INCREF(Py_None);
            value = Py_None;
        }
#endif
        PyErr_NormalizeException(&type, &value, &tb);
    } else {
        if (value) {
            PyErr_SetString(PyExc_TypeError,
                "instance exception may not have a separate value");
            goto raise_error;
        }
        value = type;
        type = (PyObject*) Py_TYPE(type);
        Py_INCREF(type);
        if (!PyType_IsSubtype((PyTypeObject *)type, (PyTypeObject *)PyExc_BaseException)) {
            PyErr_SetString(PyExc_TypeError,
                "raise: exception class must be a subclass of BaseException");
            goto raise_error;
        }
    }
    __Pyx_PyThreadState_assign
    __Pyx_ErrRestore(type, value, tb);
    return;
raise_error:
    Py_XDECREF(value);
    Py_XDECREF(type);
    Py_XDECREF(tb);
    return;
}
#else
static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) {
    PyObject* owned_instance = NULL;
    if (tb == Py_None) {
        tb = 0;
    } else if (tb && !PyTraceBack_Check(tb)) {
        PyErr_SetString(PyExc_TypeError,
            "raise: arg 3 must be a traceback or None");
        goto bad;
    }
    if (value == Py_None)
        value = 0;
    if (PyExceptionInstance_Check(type)) {
        if (value) {
            PyErr_SetString(PyExc_TypeError,
                "instance exception may not have a separate value");
            goto bad;
        }
        value = type;
        type = (PyObject*) Py_TYPE(value);
    } else if (PyExceptionClass_Check(type)) {
        PyObject *instance_class = NULL;
        if (value && PyExceptionInstance_Check(value)) {
            instance_class = (PyObject*) Py_TYPE(value);
            if (instance_class != type) {
                int is_subclass = PyObject_IsSubclass(instance_class, type);
                if (!is_subclass) {
                    instance_class = NULL;
                } else if (unlikely(is_subclass == -1)) {
                    goto bad;
                } else {
                    type = instance_class;
                }
            }
        }
        if (!instance_class) {
            PyObject *args;
            if (!value)
                args = PyTuple_New(0);
            else if (PyTuple_Check(value)) {
                Py_INCREF(value);
                args = value;
            } else
                args = PyTuple_Pack(1, value);
            if (!args)
                goto bad;
            owned_instance = PyObject_Call(type, args, NULL);
            Py_DECREF(args);
            if (!owned_instance)
                goto bad;
            value = owned_instance;
            if (!PyExceptionInstance_Check(value)) {
                PyErr_Format(PyExc_TypeError,
                             "calling %R should have returned an instance of "
                             "BaseException, not %R",
                             type, Py_TYPE(value));
                goto bad;
            }
        }
    } else {
        PyErr_SetString(PyExc_TypeError,
            "raise: exception class must be a subclass of BaseException");
        goto bad;
    }
    if (cause) {
        PyObject *fixed_cause;
        if (cause == Py_None) {
            fixed_cause = NULL;
        } else if (PyExceptionClass_Check(cause)) {
            fixed_cause = PyObject_CallObject(cause, NULL);
            if (fixed_cause == NULL)
                goto bad;
        } else if (PyExceptionInstance_Check(cause)) {
            fixed_cause = cause;
            Py_INCREF(fixed_cause);
        } else {
            PyErr_SetString(PyExc_TypeError,
                            "exception causes must derive from "
                            "BaseException");
            goto bad;
        }
        PyException_SetCause(value, fixed_cause);
    }
    PyErr_SetObject(type, value);
    if (tb) {
      #if PY_VERSION_HEX >= 0x030C00A6
        PyException_SetTraceback(value, tb);
      #elif CYTHON_FAST_THREAD_STATE
        PyThreadState *tstate = __Pyx_PyThreadState_Current;
        PyObject* tmp_tb = tstate->curexc_traceback;
        if (tb != tmp_tb) {
            Py_INCREF(tb);
            tstate->curexc_traceback = tb;
            Py_XDECREF(tmp_tb);
        }
#else
        PyObject *tmp_type, *tmp_value, *tmp_tb;
        PyErr_Fetch(&tmp_type, &tmp_value, &tmp_tb);
        Py_INCREF(tb);
        PyErr_Restore(tmp_type, tmp_value, tb);
        Py_XDECREF(tmp_tb);
#endif
    }
bad:
    Py_XDECREF(owned_instance);
    return;
}
#endif

/* KeywordStringCheck */
static int __Pyx_CheckKeywordStrings(
    PyObject *kw,
    const char* function_name,
    int kw_allowed)
{
    PyObject* key = 0;
    Py_ssize_t pos = 0;
#if CYTHON_COMPILING_IN_PYPY
    if (!kw_allowed && PyDict_Next(kw, &pos, &key, 0))
        goto invalid_keyword;
    return 1;
#else
    if (CYTHON_METH_FASTCALL && likely(PyTuple_Check(kw))) {
        Py_ssize_t kwsize;
#if CYTHON_ASSUME_SAFE_MACROS
        kwsize = PyTuple_GET_SIZE(kw);
#else
        kwsize = PyTuple_Size(kw);
        if (kwsize < 0) return 0;
#endif
        if (unlikely(kwsize == 0))
            return 1;
        if (!kw_allowed) {
#if CYTHON_ASSUME_SAFE_MACROS
            key = PyTuple_GET_ITEM(kw, 0);
#else
            key = PyTuple_GetItem(kw, pos);
            if (!key) return 0;
#endif
            goto invalid_keyword;
        }
#if PY_VERSION_HEX < 0x03090000
        for (pos = 0; pos < kwsize; pos++) {
#if CYTHON_ASSUME_SAFE_MACROS
            key = PyTuple_GET_ITEM(kw, pos);
#else
            key = PyTuple_GetItem(kw, pos);
            if (!key) return 0;
#endif
            if (unlikely(!PyUnicode_Check(key)))
                goto invalid_keyword_type;
        }
#endif
        return 1;
    }
    while (PyDict_Next(kw, &pos, &key, 0)) {
        #if PY_MAJOR_VERSION < 3
        if (unlikely(!PyString_Check(key)))
        #endif
            if (unlikely(!PyUnicode_Check(key)))
                goto invalid_keyword_type;
    }
    if (!kw_allowed && unlikely(key))
        goto invalid_keyword;
    return 1;
invalid_keyword_type:
    PyErr_Format(PyExc_TypeError,
        "%.200s() keywords must be strings", function_name);
    return 0;
#endif
invalid_keyword:
    #if PY_MAJOR_VERSION < 3
    PyErr_Format(PyExc_TypeError,
        "%.200s() got an unexpected keyword argument '%.200s'",
        function_name, PyString_AsString(key));
    #else
    PyErr_Format(PyExc_TypeError,
        "%s() got an unexpected keyword argument '%U'",
        function_name, key);
    #endif
    return 0;
}

/* Globals */
static PyObject* __Pyx_Globals(void) {
    return __Pyx_NewRef(__pyx_d);
}

/* UnicodeConcatInPlace */
# if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
static int
__Pyx_unicode_modifiable(PyObject *unicode)
{
    if (Py_REFCNT(unicode) != 1)
        return 0;
    if (!PyUnicode_CheckExact(unicode))
        return 0;
    if (PyUnicode_CHECK_INTERNED(unicode))
        return 0;
    return 1;
}
static CYTHON_INLINE PyObject *__Pyx_PyUnicode_ConcatInPlaceImpl(PyObject **p_left, PyObject *right
        #if CYTHON_REFNANNY
        , void* __pyx_refnanny
        #endif
    ) {
    PyObject *left = *p_left;
    Py_ssize_t left_len, right_len, new_len;
    if (unlikely(__Pyx_PyUnicode_READY(left) == -1))
        return NULL;
    if (unlikely(__Pyx_PyUnicode_READY(right) == -1))
        return NULL;
    left_len = PyUnicode_GET_LENGTH(left);
    if (left_len == 0) {
        Py_INCREF(right);
        return right;
    }
    right_len = PyUnicode_GET_LENGTH(right);
    if (right_len == 0) {
        Py_INCREF(left);
        return left;
    }
    if (unlikely(left_len > PY_SSIZE_T_MAX - right_len)) {
        PyErr_SetString(PyExc_OverflowError,
                        "strings are too large to concat");
        return NULL;
    }
    new_len = left_len + right_len;
    if (__Pyx_unicode_modifiable(left)
            && PyUnicode_CheckExact(right)
            && PyUnicode_KIND(right) <= PyUnicode_KIND(left)
            && !(PyUnicode_IS_ASCII(left) && !PyUnicode_IS_ASCII(right))) {
        int ret;
        __Pyx_GIVEREF(*p_left);
        ret = PyUnicode_Resize(p_left, new_len);
        __Pyx_GOTREF(*p_left);
        if (unlikely(ret != 0))
            return NULL;
        #if PY_VERSION_HEX >= 0x030d0000
        if (unlikely(PyUnicode_CopyCharacters(*p_left, left_len, right, 0, right_len) < 0)) return NULL;
        #else
        _PyUnicode_FastCopyCharacters(*p_left, left_len, right, 0, right_len);
        #endif
        __Pyx_INCREF(*p_left);
        __Pyx_GIVEREF(*p_left);
        return *p_left;
    } else {
        return __Pyx_PyUnicode_Concat(left, right);
    }
  }
#endif

/* ObjectGetItem */
#if CYTHON_USE_TYPE_SLOTS
static PyObject *__Pyx_PyObject_GetIndex(PyObject *obj, PyObject *index) {
    PyObject *runerr = NULL;
    Py_ssize_t key_value;
    key_value = __Pyx_PyIndex_AsSsize_t(index);
    if (likely(key_value != -1 || !(runerr = PyErr_Occurred()))) {
        return __Pyx_GetItemInt_Fast(obj, key_value, 0, 1, 1);
    }
    if (PyErr_GivenExceptionMatches(runerr, PyExc_OverflowError)) {
        __Pyx_TypeName index_type_name = __Pyx_PyType_GetName(Py_TYPE(index));
        PyErr_Clear();
        PyErr_Format(PyExc_IndexError,
            "cannot fit '" __Pyx_FMT_TYPENAME "' into an index-sized integer", index_type_name);
        __Pyx_DECREF_TypeName(index_type_name);
    }
    return NULL;
}
static PyObject *__Pyx_PyObject_GetItem_Slow(PyObject *obj, PyObject *key) {
    __Pyx_TypeName obj_type_name;
    if (likely(PyType_Check(obj))) {
        PyObject *meth = __Pyx_PyObject_GetAttrStrNoError(obj, __pyx_n_s_class_getitem);
        if (!meth) {
            PyErr_Clear();
        } else {
            PyObject *result = __Pyx_PyObject_CallOneArg(meth, key);
            Py_DECREF(meth);
            return result;
        }
    }
    obj_type_name = __Pyx_PyType_GetName(Py_TYPE(obj));
    PyErr_Format(PyExc_TypeError,
        "'" __Pyx_FMT_TYPENAME "' object is not subscriptable", obj_type_name);
    __Pyx_DECREF_TypeName(obj_type_name);
    return NULL;
}
static PyObject *__Pyx_PyObject_GetItem(PyObject *obj, PyObject *key) {
    PyTypeObject *tp = Py_TYPE(obj);
    PyMappingMethods *mm = tp->tp_as_mapping;
    PySequenceMethods *sm = tp->tp_as_sequence;
    if (likely(mm && mm->mp_subscript)) {
        return mm->mp_subscript(obj, key);
    }
    if (likely(sm && sm->sq_item)) {
        return __Pyx_PyObject_GetIndex(obj, key);
    }
    return __Pyx_PyObject_GetItem_Slow(obj, key);
}
#endif

/* RaiseTooManyValuesToUnpack */
static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected) {
    PyErr_Format(PyExc_ValueError,
                 "too many values to unpack (expected %" CYTHON_FORMAT_SSIZE_T "d)", expected);
}

/* RaiseNeedMoreValuesToUnpack */
static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) {
    PyErr_Format(PyExc_ValueError,
                 "need more than %" CYTHON_FORMAT_SSIZE_T "d value%.1s to unpack",
                 index, (index == 1) ? "" : "s");
}

/* IterFinish */
static CYTHON_INLINE int __Pyx_IterFinish(void) {
    PyObject* exc_type;
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    exc_type = __Pyx_PyErr_CurrentExceptionType();
    if (unlikely(exc_type)) {
        if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration)))
            return -1;
        __Pyx_PyErr_Clear();
        return 0;
    }
    return 0;
}

/* UnpackItemEndCheck */
static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected) {
    if (unlikely(retval)) {
        Py_DECREF(retval);
        __Pyx_RaiseTooManyValuesError(expected);
        return -1;
    }
    return __Pyx_IterFinish();
}

/* PyIntCompare */
static CYTHON_INLINE int __Pyx_PyInt_BoolEqObjC(PyObject *op1, PyObject *op2, long intval, long inplace) {
    CYTHON_MAYBE_UNUSED_VAR(intval);
    CYTHON_UNUSED_VAR(inplace);
    if (op1 == op2) {
        return 1;
    }
    #if PY_MAJOR_VERSION < 3
    if (likely(PyInt_CheckExact(op1))) {
        const long b = intval;
        long a = PyInt_AS_LONG(op1);
        return (a == b);
    }
    #endif
    #if CYTHON_USE_PYLONG_INTERNALS
    if (likely(PyLong_CheckExact(op1))) {
        int unequal;
        unsigned long uintval;
        Py_ssize_t size = __Pyx_PyLong_DigitCount(op1);
        const digit* digits = __Pyx_PyLong_Digits(op1);
        if (intval == 0) {
            return (__Pyx_PyLong_IsZero(op1) == 1);
        } else if (intval < 0) {
            if (__Pyx_PyLong_IsNonNeg(op1))
                return 0;
            intval = -intval;
        } else {
            if (__Pyx_PyLong_IsNeg(op1))
                return 0;
        }
        uintval = (unsigned long) intval;
#if PyLong_SHIFT * 4 < SIZEOF_LONG*8
        if (uintval >> (PyLong_SHIFT * 4)) {
            unequal = (size != 5) || (digits[0] != (uintval & (unsigned long) PyLong_MASK))
                 | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[3] != ((uintval >> (3 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[4] != ((uintval >> (4 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK));
        } else
#endif
#if PyLong_SHIFT * 3 < SIZEOF_LONG*8
        if (uintval >> (PyLong_SHIFT * 3)) {
            unequal = (size != 4) || (digits[0] != (uintval & (unsigned long) PyLong_MASK))
                 | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[3] != ((uintval >> (3 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK));
        } else
#endif
#if PyLong_SHIFT * 2 < SIZEOF_LONG*8
        if (uintval >> (PyLong_SHIFT * 2)) {
            unequal = (size != 3) || (digits[0] != (uintval & (unsigned long) PyLong_MASK))
                 | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK));
        } else
#endif
#if PyLong_SHIFT * 1 < SIZEOF_LONG*8
        if (uintval >> (PyLong_SHIFT * 1)) {
            unequal = (size != 2) || (digits[0] != (uintval & (unsigned long) PyLong_MASK))
                 | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK));
        } else
#endif
            unequal = (size != 1) || (((unsigned long) digits[0]) != (uintval & (unsigned long) PyLong_MASK));
        return (unequal == 0);
    }
    #endif
    if (PyFloat_CheckExact(op1)) {
        const long b = intval;
#if CYTHON_COMPILING_IN_LIMITED_API
        double a = __pyx_PyFloat_AsDouble(op1);
#else
        double a = PyFloat_AS_DOUBLE(op1);
#endif
        return ((double)a == (double)b);
    }
    return __Pyx_PyObject_IsTrueAndDecref(
        PyObject_RichCompare(op1, op2, Py_EQ));
}

/* GetTopmostException */
#if CYTHON_USE_EXC_INFO_STACK && CYTHON_FAST_THREAD_STATE
static _PyErr_StackItem *
__Pyx_PyErr_GetTopmostException(PyThreadState *tstate)
{
    _PyErr_StackItem *exc_info = tstate->exc_info;
    while ((exc_info->exc_value == NULL || exc_info->exc_value == Py_None) &&
           exc_info->previous_item != NULL)
    {
        exc_info = exc_info->previous_item;
    }
    return exc_info;
}
#endif

/* SaveResetException */
#if CYTHON_FAST_THREAD_STATE
static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
  #if CYTHON_USE_EXC_INFO_STACK && PY_VERSION_HEX >= 0x030B00a4
    _PyErr_StackItem *exc_info = __Pyx_PyErr_GetTopmostException(tstate);
    PyObject *exc_value = exc_info->exc_value;
    if (exc_value == NULL || exc_value == Py_None) {
        *value = NULL;
        *type = NULL;
        *tb = NULL;
    } else {
        *value = exc_value;
        Py_INCREF(*value);
        *type = (PyObject*) Py_TYPE(exc_value);
        Py_INCREF(*type);
        *tb = PyException_GetTraceback(exc_value);
    }
  #elif CYTHON_USE_EXC_INFO_STACK
    _PyErr_StackItem *exc_info = __Pyx_PyErr_GetTopmostException(tstate);
    *type = exc_info->exc_type;
    *value = exc_info->exc_value;
    *tb = exc_info->exc_traceback;
    Py_XINCREF(*type);
    Py_XINCREF(*value);
    Py_XINCREF(*tb);
  #else
    *type = tstate->exc_type;
    *value = tstate->exc_value;
    *tb = tstate->exc_traceback;
    Py_XINCREF(*type);
    Py_XINCREF(*value);
    Py_XINCREF(*tb);
  #endif
}
static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
  #if CYTHON_USE_EXC_INFO_STACK && PY_VERSION_HEX >= 0x030B00a4
    _PyErr_StackItem *exc_info = tstate->exc_info;
    PyObject *tmp_value = exc_info->exc_value;
    exc_info->exc_value = value;
    Py_XDECREF(tmp_value);
    Py_XDECREF(type);
    Py_XDECREF(tb);
  #else
    PyObject *tmp_type, *tmp_value, *tmp_tb;
    #if CYTHON_USE_EXC_INFO_STACK
    _PyErr_StackItem *exc_info = tstate->exc_info;
    tmp_type = exc_info->exc_type;
    tmp_value = exc_info->exc_value;
    tmp_tb = exc_info->exc_traceback;
    exc_info->exc_type = type;
    exc_info->exc_value = value;
    exc_info->exc_traceback = tb;
    #else
    tmp_type = tstate->exc_type;
    tmp_value = tstate->exc_value;
    tmp_tb = tstate->exc_traceback;
    tstate->exc_type = type;
    tstate->exc_value = value;
    tstate->exc_traceback = tb;
    #endif
    Py_XDECREF(tmp_type);
    Py_XDECREF(tmp_value);
    Py_XDECREF(tmp_tb);
  #endif
}
#endif

/* GetException */
#if CYTHON_FAST_THREAD_STATE
static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb)
#else
static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb)
#endif
{
    PyObject *local_type = NULL, *local_value, *local_tb = NULL;
#if CYTHON_FAST_THREAD_STATE
    PyObject *tmp_type, *tmp_value, *tmp_tb;
  #if PY_VERSION_HEX >= 0x030C00A6
    local_value = tstate->current_exception;
    tstate->current_exception = 0;
    if (likely(local_value)) {
        local_type = (PyObject*) Py_TYPE(local_value);
        Py_INCREF(local_type);
        local_tb = PyException_GetTraceback(local_value);
    }
  #else
    local_type = tstate->curexc_type;
    local_value = tstate->curexc_value;
    local_tb = tstate->curexc_traceback;
    tstate->curexc_type = 0;
    tstate->curexc_value = 0;
    tstate->curexc_traceback = 0;
  #endif
#else
    PyErr_Fetch(&local_type, &local_value, &local_tb);
#endif
    PyErr_NormalizeException(&local_type, &local_value, &local_tb);
#if CYTHON_FAST_THREAD_STATE && PY_VERSION_HEX >= 0x030C00A6
    if (unlikely(tstate->current_exception))
#elif CYTHON_FAST_THREAD_STATE
    if (unlikely(tstate->curexc_type))
#else
    if (unlikely(PyErr_Occurred()))
#endif
        goto bad;
    #if PY_MAJOR_VERSION >= 3
    if (local_tb) {
        if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0))
            goto bad;
    }
    #endif
    Py_XINCREF(local_tb);
    Py_XINCREF(local_type);
    Py_XINCREF(local_value);
    *type = local_type;
    *value = local_value;
    *tb = local_tb;
#if CYTHON_FAST_THREAD_STATE
    #if CYTHON_USE_EXC_INFO_STACK
    {
        _PyErr_StackItem *exc_info = tstate->exc_info;
      #if PY_VERSION_HEX >= 0x030B00a4
        tmp_value = exc_info->exc_value;
        exc_info->exc_value = local_value;
        tmp_type = NULL;
        tmp_tb = NULL;
        Py_XDECREF(local_type);
        Py_XDECREF(local_tb);
      #else
        tmp_type = exc_info->exc_type;
        tmp_value = exc_info->exc_value;
        tmp_tb = exc_info->exc_traceback;
        exc_info->exc_type = local_type;
        exc_info->exc_value = local_value;
        exc_info->exc_traceback = local_tb;
      #endif
    }
    #else
    tmp_type = tstate->exc_type;
    tmp_value = tstate->exc_value;
    tmp_tb = tstate->exc_traceback;
    tstate->exc_type = local_type;
    tstate->exc_value = local_value;
    tstate->exc_traceback = local_tb;
    #endif
    Py_XDECREF(tmp_type);
    Py_XDECREF(tmp_value);
    Py_XDECREF(tmp_tb);
#else
    PyErr_SetExcInfo(local_type, local_value, local_tb);
#endif
    return 0;
bad:
    *type = 0;
    *value = 0;
    *tb = 0;
    Py_XDECREF(local_type);
    Py_XDECREF(local_value);
    Py_XDECREF(local_tb);
    return -1;
}

/* PyObjectCallNoArg */
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) {
    PyObject *arg[2] = {NULL, NULL};
    return __Pyx_PyObject_FastCall(func, arg + 1, 0 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET);
}

/* PyIntBinop */
#if !CYTHON_COMPILING_IN_PYPY
static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check) {
    CYTHON_MAYBE_UNUSED_VAR(intval);
    CYTHON_MAYBE_UNUSED_VAR(inplace);
    CYTHON_UNUSED_VAR(zerodivision_check);
    #if PY_MAJOR_VERSION < 3
    if (likely(PyInt_CheckExact(op1))) {
        const long b = intval;
        long x;
        long a = PyInt_AS_LONG(op1);
        
            x = (long)((unsigned long)a + (unsigned long)b);
            if (likely((x^a) >= 0 || (x^b) >= 0))
                return PyInt_FromLong(x);
            return PyLong_Type.tp_as_number->nb_add(op1, op2);
    }
    #endif
    #if CYTHON_USE_PYLONG_INTERNALS
    if (likely(PyLong_CheckExact(op1))) {
        const long b = intval;
        long a, x;
#ifdef HAVE_LONG_LONG
        const PY_LONG_LONG llb = intval;
        PY_LONG_LONG lla, llx;
#endif
        if (unlikely(__Pyx_PyLong_IsZero(op1))) {
            return __Pyx_NewRef(op2);
        }
        if (likely(__Pyx_PyLong_IsCompact(op1))) {
            a = __Pyx_PyLong_CompactValue(op1);
        } else {
            const digit* digits = __Pyx_PyLong_Digits(op1);
            const Py_ssize_t size = __Pyx_PyLong_SignedDigitCount(op1);
            switch (size) {
                case -2:
                    if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                        a = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    #ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
                        lla = -(PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
                    #endif
                    }
                    CYTHON_FALLTHROUGH;
                case 2:
                    if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                        a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    #ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
                        lla = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
                    #endif
                    }
                    CYTHON_FALLTHROUGH;
                case -3:
                    if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                        a = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    #ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
                        lla = -(PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
                    #endif
                    }
                    CYTHON_FALLTHROUGH;
                case 3:
                    if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                        a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    #ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
                        lla = (PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
                    #endif
                    }
                    CYTHON_FALLTHROUGH;
                case -4:
                    if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
                        a = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    #ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
                        lla = -(PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
                    #endif
                    }
                    CYTHON_FALLTHROUGH;
                case 4:
                    if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
                        a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    #ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
                        lla = (PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
                    #endif
                    }
                    CYTHON_FALLTHROUGH;
                default: return PyLong_Type.tp_as_number->nb_add(op1, op2);
            }
        }
                x = a + b;
            return PyLong_FromLong(x);
#ifdef HAVE_LONG_LONG
        long_long:
                llx = lla + llb;
            return PyLong_FromLongLong(llx);
#endif
        
        
    }
    #endif
    if (PyFloat_CheckExact(op1)) {
        const long b = intval;
#if CYTHON_COMPILING_IN_LIMITED_API
        double a = __pyx_PyFloat_AsDouble(op1);
#else
        double a = PyFloat_AS_DOUBLE(op1);
#endif
            double result;
            
            PyFPE_START_PROTECT("add", return NULL)
            result = ((double)a) + (double)b;
            PyFPE_END_PROTECT(result)
            return PyFloat_FromDouble(result);
    }
    return (inplace ? PyNumber_InPlaceAdd : PyNumber_Add)(op1, op2);
}
#endif

/* PyUnicode_Unicode */
static CYTHON_INLINE PyObject* __Pyx_PyUnicode_Unicode(PyObject *obj) {
    if (unlikely(obj == Py_None))
        obj = __pyx_kp_u_None;
    return __Pyx_NewRef(obj);
}

/* JoinPyUnicode */
static PyObject* __Pyx_PyUnicode_Join(PyObject* value_tuple, Py_ssize_t value_count, Py_ssize_t result_ulength,
                                      Py_UCS4 max_char) {
#if CYTHON_USE_UNICODE_INTERNALS && CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    PyObject *result_uval;
    int result_ukind, kind_shift;
    Py_ssize_t i, char_pos;
    void *result_udata;
    CYTHON_MAYBE_UNUSED_VAR(max_char);
#if CYTHON_PEP393_ENABLED
    result_uval = PyUnicode_New(result_ulength, max_char);
    if (unlikely(!result_uval)) return NULL;
    result_ukind = (max_char <= 255) ? PyUnicode_1BYTE_KIND : (max_char <= 65535) ? PyUnicode_2BYTE_KIND : PyUnicode_4BYTE_KIND;
    kind_shift = (result_ukind == PyUnicode_4BYTE_KIND) ? 2 : result_ukind - 1;
    result_udata = PyUnicode_DATA(result_uval);
#else
    result_uval = PyUnicode_FromUnicode(NULL, result_ulength);
    if (unlikely(!result_uval)) return NULL;
    result_ukind = sizeof(Py_UNICODE);
    kind_shift = (result_ukind == 4) ? 2 : result_ukind - 1;
    result_udata = PyUnicode_AS_UNICODE(result_uval);
#endif
    assert(kind_shift == 2 || kind_shift == 1 || kind_shift == 0);
    char_pos = 0;
    for (i=0; i < value_count; i++) {
        int ukind;
        Py_ssize_t ulength;
        void *udata;
        PyObject *uval = PyTuple_GET_ITEM(value_tuple, i);
        if (unlikely(__Pyx_PyUnicode_READY(uval)))
            goto bad;
        ulength = __Pyx_PyUnicode_GET_LENGTH(uval);
        if (unlikely(!ulength))
            continue;
        if (unlikely((PY_SSIZE_T_MAX >> kind_shift) - ulength < char_pos))
            goto overflow;
        ukind = __Pyx_PyUnicode_KIND(uval);
        udata = __Pyx_PyUnicode_DATA(uval);
        if (!CYTHON_PEP393_ENABLED || ukind == result_ukind) {
            memcpy((char *)result_udata + (char_pos << kind_shift), udata, (size_t) (ulength << kind_shift));
        } else {
            #if PY_VERSION_HEX >= 0x030d0000
            if (unlikely(PyUnicode_CopyCharacters(result_uval, char_pos, uval, 0, ulength) < 0)) goto bad;
            #elif CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030300F0 || defined(_PyUnicode_FastCopyCharacters)
            _PyUnicode_FastCopyCharacters(result_uval, char_pos, uval, 0, ulength);
            #else
            Py_ssize_t j;
            for (j=0; j < ulength; j++) {
                Py_UCS4 uchar = __Pyx_PyUnicode_READ(ukind, udata, j);
                __Pyx_PyUnicode_WRITE(result_ukind, result_udata, char_pos+j, uchar);
            }
            #endif
        }
        char_pos += ulength;
    }
    return result_uval;
overflow:
    PyErr_SetString(PyExc_OverflowError, "join() result is too long for a Python string");
bad:
    Py_DECREF(result_uval);
    return NULL;
#else
    CYTHON_UNUSED_VAR(max_char);
    CYTHON_UNUSED_VAR(result_ulength);
    CYTHON_UNUSED_VAR(value_count);
    return PyUnicode_Join(__pyx_empty_unicode, value_tuple);
#endif
}

/* GetAttr3 */
#if __PYX_LIMITED_VERSION_HEX < 0x030d00A1
static PyObject *__Pyx_GetAttr3Default(PyObject *d) {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    if (unlikely(!__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError)))
        return NULL;
    __Pyx_PyErr_Clear();
    Py_INCREF(d);
    return d;
}
#endif
static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *o, PyObject *n, PyObject *d) {
    PyObject *r;
#if __PYX_LIMITED_VERSION_HEX >= 0x030d00A1
    int res = PyObject_GetOptionalAttr(o, n, &r);
    return (res != 0) ? r : __Pyx_NewRef(d);
#else
  #if CYTHON_USE_TYPE_SLOTS
    if (likely(PyString_Check(n))) {
        r = __Pyx_PyObject_GetAttrStrNoError(o, n);
        if (unlikely(!r) && likely(!PyErr_Occurred())) {
            r = __Pyx_NewRef(d);
        }
        return r;
    }
  #endif
    r = PyObject_GetAttr(o, n);
    return (likely(r)) ? r : __Pyx_GetAttr3Default(d);
#endif
}

/* ExtTypeTest */
static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) {
    __Pyx_TypeName obj_type_name;
    __Pyx_TypeName type_name;
    if (unlikely(!type)) {
        PyErr_SetString(PyExc_SystemError, "Missing type object");
        return 0;
    }
    if (likely(__Pyx_TypeCheck(obj, type)))
        return 1;
    obj_type_name = __Pyx_PyType_GetName(Py_TYPE(obj));
    type_name = __Pyx_PyType_GetName(type);
    PyErr_Format(PyExc_TypeError,
                 "Cannot convert " __Pyx_FMT_TYPENAME " to " __Pyx_FMT_TYPENAME,
                 obj_type_name, type_name);
    __Pyx_DECREF_TypeName(obj_type_name);
    __Pyx_DECREF_TypeName(type_name);
    return 0;
}

/* Import */
static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) {
    PyObject *module = 0;
    PyObject *empty_dict = 0;
    PyObject *empty_list = 0;
    #if PY_MAJOR_VERSION < 3
    PyObject *py_import;
    py_import = __Pyx_PyObject_GetAttrStr(__pyx_b, __pyx_n_s_import);
    if (unlikely(!py_import))
        goto bad;
    if (!from_list) {
        empty_list = PyList_New(0);
        if (unlikely(!empty_list))
            goto bad;
        from_list = empty_list;
    }
    #endif
    empty_dict = PyDict_New();
    if (unlikely(!empty_dict))
        goto bad;
    {
        #if PY_MAJOR_VERSION >= 3
        if (level == -1) {
            if (strchr(__Pyx_MODULE_NAME, '.') != NULL) {
                module = PyImport_ImportModuleLevelObject(
                    name, __pyx_d, empty_dict, from_list, 1);
                if (unlikely(!module)) {
                    if (unlikely(!PyErr_ExceptionMatches(PyExc_ImportError)))
                        goto bad;
                    PyErr_Clear();
                }
            }
            level = 0;
        }
        #endif
        if (!module) {
            #if PY_MAJOR_VERSION < 3
            PyObject *py_level = PyInt_FromLong(level);
            if (unlikely(!py_level))
                goto bad;
            module = PyObject_CallFunctionObjArgs(py_import,
                name, __pyx_d, empty_dict, from_list, py_level, (PyObject *)NULL);
            Py_DECREF(py_level);
            #else
            module = PyImport_ImportModuleLevelObject(
                name, __pyx_d, empty_dict, from_list, level);
            #endif
        }
    }
bad:
    Py_XDECREF(empty_dict);
    Py_XDECREF(empty_list);
    #if PY_MAJOR_VERSION < 3
    Py_XDECREF(py_import);
    #endif
    return module;
}

/* ImportFrom */
static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name) {
    PyObject* value = __Pyx_PyObject_GetAttrStr(module, name);
    if (unlikely(!value) && PyErr_ExceptionMatches(PyExc_AttributeError)) {
        const char* module_name_str = 0;
        PyObject* module_name = 0;
        PyObject* module_dot = 0;
        PyObject* full_name = 0;
        PyErr_Clear();
        module_name_str = PyModule_GetName(module);
        if (unlikely(!module_name_str)) { goto modbad; }
        module_name = PyUnicode_FromString(module_name_str);
        if (unlikely(!module_name)) { goto modbad; }
        module_dot = PyUnicode_Concat(module_name, __pyx_kp_u__83);
        if (unlikely(!module_dot)) { goto modbad; }
        full_name = PyUnicode_Concat(module_dot, name);
        if (unlikely(!full_name)) { goto modbad; }
        #if PY_VERSION_HEX < 0x030700A1 || (CYTHON_COMPILING_IN_PYPY && PYPY_VERSION_NUM  < 0x07030400)
        {
            PyObject *modules = PyImport_GetModuleDict();
            if (unlikely(!modules))
                goto modbad;
            value = PyObject_GetItem(modules, full_name);
        }
        #else
        value = PyImport_GetModule(full_name);
        #endif
      modbad:
        Py_XDECREF(full_name);
        Py_XDECREF(module_dot);
        Py_XDECREF(module_name);
    }
    if (unlikely(!value)) {
        PyErr_Format(PyExc_ImportError,
        #if PY_MAJOR_VERSION < 3
            "cannot import name %.230s", PyString_AS_STRING(name));
        #else
            "cannot import name %S", name);
        #endif
    }
    return value;
}

/* FixUpExtensionType */
#if CYTHON_USE_TYPE_SPECS
static int __Pyx_fix_up_extension_type_from_spec(PyType_Spec *spec, PyTypeObject *type) {
#if PY_VERSION_HEX > 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API
    CYTHON_UNUSED_VAR(spec);
    CYTHON_UNUSED_VAR(type);
#else
    const PyType_Slot *slot = spec->slots;
    while (slot && slot->slot && slot->slot != Py_tp_members)
        slot++;
    if (slot && slot->slot == Py_tp_members) {
        int changed = 0;
#if !(PY_VERSION_HEX <= 0x030900b1 && CYTHON_COMPILING_IN_CPYTHON)
        const
#endif
            PyMemberDef *memb = (PyMemberDef*) slot->pfunc;
        while (memb && memb->name) {
            if (memb->name[0] == '_' && memb->name[1] == '_') {
#if PY_VERSION_HEX < 0x030900b1
                if (strcmp(memb->name, "__weaklistoffset__") == 0) {
                    assert(memb->type == T_PYSSIZET);
                    assert(memb->flags == READONLY);
                    type->tp_weaklistoffset = memb->offset;
                    changed = 1;
                }
                else if (strcmp(memb->name, "__dictoffset__") == 0) {
                    assert(memb->type == T_PYSSIZET);
                    assert(memb->flags == READONLY);
                    type->tp_dictoffset = memb->offset;
                    changed = 1;
                }
#if CYTHON_METH_FASTCALL
                else if (strcmp(memb->name, "__vectorcalloffset__") == 0) {
                    assert(memb->type == T_PYSSIZET);
                    assert(memb->flags == READONLY);
#if PY_VERSION_HEX >= 0x030800b4
                    type->tp_vectorcall_offset = memb->offset;
#else
                    type->tp_print = (printfunc) memb->offset;
#endif
                    changed = 1;
                }
#endif
#else
                if ((0));
#endif
#if PY_VERSION_HEX <= 0x030900b1 && CYTHON_COMPILING_IN_CPYTHON
                else if (strcmp(memb->name, "__module__") == 0) {
                    PyObject *descr;
                    assert(memb->type == T_OBJECT);
                    assert(memb->flags == 0 || memb->flags == READONLY);
                    descr = PyDescr_NewMember(type, memb);
                    if (unlikely(!descr))
                        return -1;
                    if (unlikely(PyDict_SetItem(type->tp_dict, PyDescr_NAME(descr), descr) < 0)) {
                        Py_DECREF(descr);
                        return -1;
                    }
                    Py_DECREF(descr);
                    changed = 1;
                }
#endif
            }
            memb++;
        }
        if (changed)
            PyType_Modified(type);
    }
#endif
    return 0;
}
#endif

/* PyObjectGetMethod */
static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method) {
    PyObject *attr;
#if CYTHON_UNPACK_METHODS && CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_PYTYPE_LOOKUP
    __Pyx_TypeName type_name;
    PyTypeObject *tp = Py_TYPE(obj);
    PyObject *descr;
    descrgetfunc f = NULL;
    PyObject **dictptr, *dict;
    int meth_found = 0;
    assert (*method == NULL);
    if (unlikely(tp->tp_getattro != PyObject_GenericGetAttr)) {
        attr = __Pyx_PyObject_GetAttrStr(obj, name);
        goto try_unpack;
    }
    if (unlikely(tp->tp_dict == NULL) && unlikely(PyType_Ready(tp) < 0)) {
        return 0;
    }
    descr = _PyType_Lookup(tp, name);
    if (likely(descr != NULL)) {
        Py_INCREF(descr);
#if defined(Py_TPFLAGS_METHOD_DESCRIPTOR) && Py_TPFLAGS_METHOD_DESCRIPTOR
        if (__Pyx_PyType_HasFeature(Py_TYPE(descr), Py_TPFLAGS_METHOD_DESCRIPTOR))
#elif PY_MAJOR_VERSION >= 3
        #ifdef __Pyx_CyFunction_USED
        if (likely(PyFunction_Check(descr) || __Pyx_IS_TYPE(descr, &PyMethodDescr_Type) || __Pyx_CyFunction_Check(descr)))
        #else
        if (likely(PyFunction_Check(descr) || __Pyx_IS_TYPE(descr, &PyMethodDescr_Type)))
        #endif
#else
        #ifdef __Pyx_CyFunction_USED
        if (likely(PyFunction_Check(descr) || __Pyx_CyFunction_Check(descr)))
        #else
        if (likely(PyFunction_Check(descr)))
        #endif
#endif
        {
            meth_found = 1;
        } else {
            f = Py_TYPE(descr)->tp_descr_get;
            if (f != NULL && PyDescr_IsData(descr)) {
                attr = f(descr, obj, (PyObject *)Py_TYPE(obj));
                Py_DECREF(descr);
                goto try_unpack;
            }
        }
    }
    dictptr = _PyObject_GetDictPtr(obj);
    if (dictptr != NULL && (dict = *dictptr) != NULL) {
        Py_INCREF(dict);
        attr = __Pyx_PyDict_GetItemStr(dict, name);
        if (attr != NULL) {
            Py_INCREF(attr);
            Py_DECREF(dict);
            Py_XDECREF(descr);
            goto try_unpack;
        }
        Py_DECREF(dict);
    }
    if (meth_found) {
        *method = descr;
        return 1;
    }
    if (f != NULL) {
        attr = f(descr, obj, (PyObject *)Py_TYPE(obj));
        Py_DECREF(descr);
        goto try_unpack;
    }
    if (likely(descr != NULL)) {
        *method = descr;
        return 0;
    }
    type_name = __Pyx_PyType_GetName(tp);
    PyErr_Format(PyExc_AttributeError,
#if PY_MAJOR_VERSION >= 3
                 "'" __Pyx_FMT_TYPENAME "' object has no attribute '%U'",
                 type_name, name);
#else
                 "'" __Pyx_FMT_TYPENAME "' object has no attribute '%.400s'",
                 type_name, PyString_AS_STRING(name));
#endif
    __Pyx_DECREF_TypeName(type_name);
    return 0;
#else
    attr = __Pyx_PyObject_GetAttrStr(obj, name);
    goto try_unpack;
#endif
try_unpack:
#if CYTHON_UNPACK_METHODS
    if (likely(attr) && PyMethod_Check(attr) && likely(PyMethod_GET_SELF(attr) == obj)) {
        PyObject *function = PyMethod_GET_FUNCTION(attr);
        Py_INCREF(function);
        Py_DECREF(attr);
        *method = function;
        return 1;
    }
#endif
    *method = attr;
    return 0;
}

/* PyObjectCallMethod0 */
static PyObject* __Pyx_PyObject_CallMethod0(PyObject* obj, PyObject* method_name) {
    PyObject *method = NULL, *result = NULL;
    int is_method = __Pyx_PyObject_GetMethod(obj, method_name, &method);
    if (likely(is_method)) {
        result = __Pyx_PyObject_CallOneArg(method, obj);
        Py_DECREF(method);
        return result;
    }
    if (unlikely(!method)) goto bad;
    result = __Pyx_PyObject_CallNoArg(method);
    Py_DECREF(method);
bad:
    return result;
}

/* ValidateBasesTuple */
#if CYTHON_COMPILING_IN_CPYTHON || CYTHON_COMPILING_IN_LIMITED_API || CYTHON_USE_TYPE_SPECS
static int __Pyx_validate_bases_tuple(const char *type_name, Py_ssize_t dictoffset, PyObject *bases) {
    Py_ssize_t i, n;
#if CYTHON_ASSUME_SAFE_MACROS
    n = PyTuple_GET_SIZE(bases);
#else
    n = PyTuple_Size(bases);
    if (n < 0) return -1;
#endif
    for (i = 1; i < n; i++)
    {
#if CYTHON_AVOID_BORROWED_REFS
        PyObject *b0 = PySequence_GetItem(bases, i);
        if (!b0) return -1;
#elif CYTHON_ASSUME_SAFE_MACROS
        PyObject *b0 = PyTuple_GET_ITEM(bases, i);
#else
        PyObject *b0 = PyTuple_GetItem(bases, i);
        if (!b0) return -1;
#endif
        PyTypeObject *b;
#if PY_MAJOR_VERSION < 3
        if (PyClass_Check(b0))
        {
            PyErr_Format(PyExc_TypeError, "base class '%.200s' is an old-style class",
                         PyString_AS_STRING(((PyClassObject*)b0)->cl_name));
#if CYTHON_AVOID_BORROWED_REFS
            Py_DECREF(b0);
#endif
            return -1;
        }
#endif
        b = (PyTypeObject*) b0;
        if (!__Pyx_PyType_HasFeature(b, Py_TPFLAGS_HEAPTYPE))
        {
            __Pyx_TypeName b_name = __Pyx_PyType_GetName(b);
            PyErr_Format(PyExc_TypeError,
                "base class '" __Pyx_FMT_TYPENAME "' is not a heap type", b_name);
            __Pyx_DECREF_TypeName(b_name);
#if CYTHON_AVOID_BORROWED_REFS
            Py_DECREF(b0);
#endif
            return -1;
        }
        if (dictoffset == 0)
        {
            Py_ssize_t b_dictoffset = 0;
#if CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY
            b_dictoffset = b->tp_dictoffset;
#else
            PyObject *py_b_dictoffset = PyObject_GetAttrString((PyObject*)b, "__dictoffset__");
            if (!py_b_dictoffset) goto dictoffset_return;
            b_dictoffset = PyLong_AsSsize_t(py_b_dictoffset);
            Py_DECREF(py_b_dictoffset);
            if (b_dictoffset == -1 && PyErr_Occurred()) goto dictoffset_return;
#endif
            if (b_dictoffset) {
                {
                    __Pyx_TypeName b_name = __Pyx_PyType_GetName(b);
                    PyErr_Format(PyExc_TypeError,
                        "extension type '%.200s' has no __dict__ slot, "
                        "but base type '" __Pyx_FMT_TYPENAME "' has: "
                        "either add 'cdef dict __dict__' to the extension type "
                        "or add '__slots__ = [...]' to the base type",
                        type_name, b_name);
                    __Pyx_DECREF_TypeName(b_name);
                }
#if !(CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY)
              dictoffset_return:
#endif
#if CYTHON_AVOID_BORROWED_REFS
                Py_DECREF(b0);
#endif
                return -1;
            }
        }
#if CYTHON_AVOID_BORROWED_REFS
        Py_DECREF(b0);
#endif
    }
    return 0;
}
#endif

/* PyType_Ready */
static int __Pyx_PyType_Ready(PyTypeObject *t) {
#if CYTHON_USE_TYPE_SPECS || !(CYTHON_COMPILING_IN_CPYTHON || CYTHON_COMPILING_IN_LIMITED_API) || defined(PYSTON_MAJOR_VERSION)
    (void)__Pyx_PyObject_CallMethod0;
#if CYTHON_USE_TYPE_SPECS
    (void)__Pyx_validate_bases_tuple;
#endif
    return PyType_Ready(t);
#else
    int r;
    PyObject *bases = __Pyx_PyType_GetSlot(t, tp_bases, PyObject*);
    if (bases && unlikely(__Pyx_validate_bases_tuple(t->tp_name, t->tp_dictoffset, bases) == -1))
        return -1;
#if PY_VERSION_HEX >= 0x03050000 && !defined(PYSTON_MAJOR_VERSION)
    {
        int gc_was_enabled;
    #if PY_VERSION_HEX >= 0x030A00b1
        gc_was_enabled = PyGC_Disable();
        (void)__Pyx_PyObject_CallMethod0;
    #else
        PyObject *ret, *py_status;
        PyObject *gc = NULL;
        #if PY_VERSION_HEX >= 0x030700a1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM+0 >= 0x07030400)
        gc = PyImport_GetModule(__pyx_kp_u_gc);
        #endif
        if (unlikely(!gc)) gc = PyImport_Import(__pyx_kp_u_gc);
        if (unlikely(!gc)) return -1;
        py_status = __Pyx_PyObject_CallMethod0(gc, __pyx_kp_u_isenabled);
        if (unlikely(!py_status)) {
            Py_DECREF(gc);
            return -1;
        }
        gc_was_enabled = __Pyx_PyObject_IsTrue(py_status);
        Py_DECREF(py_status);
        if (gc_was_enabled > 0) {
            ret = __Pyx_PyObject_CallMethod0(gc, __pyx_kp_u_disable);
            if (unlikely(!ret)) {
                Py_DECREF(gc);
                return -1;
            }
            Py_DECREF(ret);
        } else if (unlikely(gc_was_enabled == -1)) {
            Py_DECREF(gc);
            return -1;
        }
    #endif
        t->tp_flags |= Py_TPFLAGS_HEAPTYPE;
#if PY_VERSION_HEX >= 0x030A0000
        t->tp_flags |= Py_TPFLAGS_IMMUTABLETYPE;
#endif
#else
        (void)__Pyx_PyObject_CallMethod0;
#endif
    r = PyType_Ready(t);
#if PY_VERSION_HEX >= 0x03050000 && !defined(PYSTON_MAJOR_VERSION)
        t->tp_flags &= ~Py_TPFLAGS_HEAPTYPE;
    #if PY_VERSION_HEX >= 0x030A00b1
        if (gc_was_enabled)
            PyGC_Enable();
    #else
        if (gc_was_enabled) {
            PyObject *tp, *v, *tb;
            PyErr_Fetch(&tp, &v, &tb);
            ret = __Pyx_PyObject_CallMethod0(gc, __pyx_kp_u_enable);
            if (likely(ret || r == -1)) {
                Py_XDECREF(ret);
                PyErr_Restore(tp, v, tb);
            } else {
                Py_XDECREF(tp);
                Py_XDECREF(v);
                Py_XDECREF(tb);
                r = -1;
            }
        }
        Py_DECREF(gc);
    #endif
    }
#endif
    return r;
#endif
}

/* PyObject_GenericGetAttrNoDict */
#if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
static PyObject *__Pyx_RaiseGenericGetAttributeError(PyTypeObject *tp, PyObject *attr_name) {
    __Pyx_TypeName type_name = __Pyx_PyType_GetName(tp);
    PyErr_Format(PyExc_AttributeError,
#if PY_MAJOR_VERSION >= 3
                 "'" __Pyx_FMT_TYPENAME "' object has no attribute '%U'",
                 type_name, attr_name);
#else
                 "'" __Pyx_FMT_TYPENAME "' object has no attribute '%.400s'",
                 type_name, PyString_AS_STRING(attr_name));
#endif
    __Pyx_DECREF_TypeName(type_name);
    return NULL;
}
static CYTHON_INLINE PyObject* __Pyx_PyObject_GenericGetAttrNoDict(PyObject* obj, PyObject* attr_name) {
    PyObject *descr;
    PyTypeObject *tp = Py_TYPE(obj);
    if (unlikely(!PyString_Check(attr_name))) {
        return PyObject_GenericGetAttr(obj, attr_name);
    }
    assert(!tp->tp_dictoffset);
    descr = _PyType_Lookup(tp, attr_name);
    if (unlikely(!descr)) {
        return __Pyx_RaiseGenericGetAttributeError(tp, attr_name);
    }
    Py_INCREF(descr);
    #if PY_MAJOR_VERSION < 3
    if (likely(PyType_HasFeature(Py_TYPE(descr), Py_TPFLAGS_HAVE_CLASS)))
    #endif
    {
        descrgetfunc f = Py_TYPE(descr)->tp_descr_get;
        if (unlikely(f)) {
            PyObject *res = f(descr, obj, (PyObject *)tp);
            Py_DECREF(descr);
            return res;
        }
    }
    return descr;
}
#endif

/* PyObject_GenericGetAttr */
#if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_name) {
    if (unlikely(Py_TYPE(obj)->tp_dictoffset)) {
        return PyObject_GenericGetAttr(obj, attr_name);
    }
    return __Pyx_PyObject_GenericGetAttrNoDict(obj, attr_name);
}
#endif

/* SetupReduce */
#if !CYTHON_COMPILING_IN_LIMITED_API
static int __Pyx_setup_reduce_is_named(PyObject* meth, PyObject* name) {
  int ret;
  PyObject *name_attr;
  name_attr = __Pyx_PyObject_GetAttrStrNoError(meth, __pyx_n_s_name);
  if (likely(name_attr)) {
      ret = PyObject_RichCompareBool(name_attr, name, Py_EQ);
  } else {
      ret = -1;
  }
  if (unlikely(ret < 0)) {
      PyErr_Clear();
      ret = 0;
  }
  Py_XDECREF(name_attr);
  return ret;
}
static int __Pyx_setup_reduce(PyObject* type_obj) {
    int ret = 0;
    PyObject *object_reduce = NULL;
    PyObject *object_getstate = NULL;
    PyObject *object_reduce_ex = NULL;
    PyObject *reduce = NULL;
    PyObject *reduce_ex = NULL;
    PyObject *reduce_cython = NULL;
    PyObject *setstate = NULL;
    PyObject *setstate_cython = NULL;
    PyObject *getstate = NULL;
#if CYTHON_USE_PYTYPE_LOOKUP
    getstate = _PyType_Lookup((PyTypeObject*)type_obj, __pyx_n_s_getstate);
#else
    getstate = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_getstate);
    if (!getstate && PyErr_Occurred()) {
        goto __PYX_BAD;
    }
#endif
    if (getstate) {
#if CYTHON_USE_PYTYPE_LOOKUP
        object_getstate = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_getstate);
#else
        object_getstate = __Pyx_PyObject_GetAttrStrNoError((PyObject*)&PyBaseObject_Type, __pyx_n_s_getstate);
        if (!object_getstate && PyErr_Occurred()) {
            goto __PYX_BAD;
        }
#endif
        if (object_getstate != getstate) {
            goto __PYX_GOOD;
        }
    }
#if CYTHON_USE_PYTYPE_LOOKUP
    object_reduce_ex = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto __PYX_BAD;
#else
    object_reduce_ex = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto __PYX_BAD;
#endif
    reduce_ex = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce_ex); if (unlikely(!reduce_ex)) goto __PYX_BAD;
    if (reduce_ex == object_reduce_ex) {
#if CYTHON_USE_PYTYPE_LOOKUP
        object_reduce = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto __PYX_BAD;
#else
        object_reduce = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto __PYX_BAD;
#endif
        reduce = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce); if (unlikely(!reduce)) goto __PYX_BAD;
        if (reduce == object_reduce || __Pyx_setup_reduce_is_named(reduce, __pyx_n_s_reduce_cython)) {
            reduce_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_reduce_cython);
            if (likely(reduce_cython)) {
                ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce, reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
                ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
            } else if (reduce == object_reduce || PyErr_Occurred()) {
                goto __PYX_BAD;
            }
            setstate = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_setstate);
            if (!setstate) PyErr_Clear();
            if (!setstate || __Pyx_setup_reduce_is_named(setstate, __pyx_n_s_setstate_cython)) {
                setstate_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_setstate_cython);
                if (likely(setstate_cython)) {
                    ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate, setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
                    ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
                } else if (!setstate || PyErr_Occurred()) {
                    goto __PYX_BAD;
                }
            }
            PyType_Modified((PyTypeObject*)type_obj);
        }
    }
    goto __PYX_GOOD;
__PYX_BAD:
    if (!PyErr_Occurred()) {
        __Pyx_TypeName type_obj_name =
            __Pyx_PyType_GetName((PyTypeObject*)type_obj);
        PyErr_Format(PyExc_RuntimeError,
            "Unable to initialize pickling for " __Pyx_FMT_TYPENAME, type_obj_name);
        __Pyx_DECREF_TypeName(type_obj_name);
    }
    ret = -1;
__PYX_GOOD:
#if !CYTHON_USE_PYTYPE_LOOKUP
    Py_XDECREF(object_reduce);
    Py_XDECREF(object_reduce_ex);
    Py_XDECREF(object_getstate);
    Py_XDECREF(getstate);
#endif
    Py_XDECREF(reduce);
    Py_XDECREF(reduce_ex);
    Py_XDECREF(reduce_cython);
    Py_XDECREF(setstate);
    Py_XDECREF(setstate_cython);
    return ret;
}
#endif

/* TypeImport */
#ifndef __PYX_HAVE_RT_ImportType_3_0_11
#define __PYX_HAVE_RT_ImportType_3_0_11
static PyTypeObject *__Pyx_ImportType_3_0_11(PyObject *module, const char *module_name, const char *class_name,
    size_t size, size_t alignment, enum __Pyx_ImportType_CheckSize_3_0_11 check_size)
{
    PyObject *result = 0;
    char warning[200];
    Py_ssize_t basicsize;
    Py_ssize_t itemsize;
#if CYTHON_COMPILING_IN_LIMITED_API
    PyObject *py_basicsize;
    PyObject *py_itemsize;
#endif
    result = PyObject_GetAttrString(module, class_name);
    if (!result)
        goto bad;
    if (!PyType_Check(result)) {
        PyErr_Format(PyExc_TypeError,
            "%.200s.%.200s is not a type object",
            module_name, class_name);
        goto bad;
    }
#if !CYTHON_COMPILING_IN_LIMITED_API
    basicsize = ((PyTypeObject *)result)->tp_basicsize;
    itemsize = ((PyTypeObject *)result)->tp_itemsize;
#else
    py_basicsize = PyObject_GetAttrString(result, "__basicsize__");
    if (!py_basicsize)
        goto bad;
    basicsize = PyLong_AsSsize_t(py_basicsize);
    Py_DECREF(py_basicsize);
    py_basicsize = 0;
    if (basicsize == (Py_ssize_t)-1 && PyErr_Occurred())
        goto bad;
    py_itemsize = PyObject_GetAttrString(result, "__itemsize__");
    if (!py_itemsize)
        goto bad;
    itemsize = PyLong_AsSsize_t(py_itemsize);
    Py_DECREF(py_itemsize);
    py_itemsize = 0;
    if (itemsize == (Py_ssize_t)-1 && PyErr_Occurred())
        goto bad;
#endif
    if (itemsize) {
        if (size % alignment) {
            alignment = size % alignment;
        }
        if (itemsize < (Py_ssize_t)alignment)
            itemsize = (Py_ssize_t)alignment;
    }
    if ((size_t)(basicsize + itemsize) < size) {
        PyErr_Format(PyExc_ValueError,
            "%.200s.%.200s size changed, may indicate binary incompatibility. "
            "Expected %zd from C header, got %zd from PyObject",
            module_name, class_name, size, basicsize+itemsize);
        goto bad;
    }
    if (check_size == __Pyx_ImportType_CheckSize_Error_3_0_11 &&
            ((size_t)basicsize > size || (size_t)(basicsize + itemsize) < size)) {
        PyErr_Format(PyExc_ValueError,
            "%.200s.%.200s size changed, may indicate binary incompatibility. "
            "Expected %zd from C header, got %zd-%zd from PyObject",
            module_name, class_name, size, basicsize, basicsize+itemsize);
        goto bad;
    }
    else if (check_size == __Pyx_ImportType_CheckSize_Warn_3_0_11 && (size_t)basicsize > size) {
        PyOS_snprintf(warning, sizeof(warning),
            "%s.%s size changed, may indicate binary incompatibility. "
            "Expected %zd from C header, got %zd from PyObject",
            module_name, class_name, size, basicsize);
        if (PyErr_WarnEx(NULL, warning, 0) < 0) goto bad;
    }
    return (PyTypeObject *)result;
bad:
    Py_XDECREF(result);
    return NULL;
}
#endif

/* ImportDottedModule */
#if PY_MAJOR_VERSION >= 3
static PyObject *__Pyx__ImportDottedModule_Error(PyObject *name, PyObject *parts_tuple, Py_ssize_t count) {
    PyObject *partial_name = NULL, *slice = NULL, *sep = NULL;
    if (unlikely(PyErr_Occurred())) {
        PyErr_Clear();
    }
    if (likely(PyTuple_GET_SIZE(parts_tuple) == count)) {
        partial_name = name;
    } else {
        slice = PySequence_GetSlice(parts_tuple, 0, count);
        if (unlikely(!slice))
            goto bad;
        sep = PyUnicode_FromStringAndSize(".", 1);
        if (unlikely(!sep))
            goto bad;
        partial_name = PyUnicode_Join(sep, slice);
    }
    PyErr_Format(
#if PY_MAJOR_VERSION < 3
        PyExc_ImportError,
        "No module named '%s'", PyString_AS_STRING(partial_name));
#else
#if PY_VERSION_HEX >= 0x030600B1
        PyExc_ModuleNotFoundError,
#else
        PyExc_ImportError,
#endif
        "No module named '%U'", partial_name);
#endif
bad:
    Py_XDECREF(sep);
    Py_XDECREF(slice);
    Py_XDECREF(partial_name);
    return NULL;
}
#endif
#if PY_MAJOR_VERSION >= 3
static PyObject *__Pyx__ImportDottedModule_Lookup(PyObject *name) {
    PyObject *imported_module;
#if PY_VERSION_HEX < 0x030700A1 || (CYTHON_COMPILING_IN_PYPY && PYPY_VERSION_NUM  < 0x07030400)
    PyObject *modules = PyImport_GetModuleDict();
    if (unlikely(!modules))
        return NULL;
    imported_module = __Pyx_PyDict_GetItemStr(modules, name);
    Py_XINCREF(imported_module);
#else
    imported_module = PyImport_GetModule(name);
#endif
    return imported_module;
}
#endif
#if PY_MAJOR_VERSION >= 3
static PyObject *__Pyx_ImportDottedModule_WalkParts(PyObject *module, PyObject *name, PyObject *parts_tuple) {
    Py_ssize_t i, nparts;
    nparts = PyTuple_GET_SIZE(parts_tuple);
    for (i=1; i < nparts && module; i++) {
        PyObject *part, *submodule;
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        part = PyTuple_GET_ITEM(parts_tuple, i);
#else
        part = PySequence_ITEM(parts_tuple, i);
#endif
        submodule = __Pyx_PyObject_GetAttrStrNoError(module, part);
#if !(CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS)
        Py_DECREF(part);
#endif
        Py_DECREF(module);
        module = submodule;
    }
    if (unlikely(!module)) {
        return __Pyx__ImportDottedModule_Error(name, parts_tuple, i);
    }
    return module;
}
#endif
static PyObject *__Pyx__ImportDottedModule(PyObject *name, PyObject *parts_tuple) {
#if PY_MAJOR_VERSION < 3
    PyObject *module, *from_list, *star = __pyx_n_s__84;
    CYTHON_UNUSED_VAR(parts_tuple);
    from_list = PyList_New(1);
    if (unlikely(!from_list))
        return NULL;
    Py_INCREF(star);
    PyList_SET_ITEM(from_list, 0, star);
    module = __Pyx_Import(name, from_list, 0);
    Py_DECREF(from_list);
    return module;
#else
    PyObject *imported_module;
    PyObject *module = __Pyx_Import(name, NULL, 0);
    if (!parts_tuple || unlikely(!module))
        return module;
    imported_module = __Pyx__ImportDottedModule_Lookup(name);
    if (likely(imported_module)) {
        Py_DECREF(module);
        return imported_module;
    }
    PyErr_Clear();
    return __Pyx_ImportDottedModule_WalkParts(module, name, parts_tuple);
#endif
}
static PyObject *__Pyx_ImportDottedModule(PyObject *name, PyObject *parts_tuple) {
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030400B1
    PyObject *module = __Pyx__ImportDottedModule_Lookup(name);
    if (likely(module)) {
        PyObject *spec = __Pyx_PyObject_GetAttrStrNoError(module, __pyx_n_s_spec);
        if (likely(spec)) {
            PyObject *unsafe = __Pyx_PyObject_GetAttrStrNoError(spec, __pyx_n_s_initializing);
            if (likely(!unsafe || !__Pyx_PyObject_IsTrue(unsafe))) {
                Py_DECREF(spec);
                spec = NULL;
            }
            Py_XDECREF(unsafe);
        }
        if (likely(!spec)) {
            PyErr_Clear();
            return module;
        }
        Py_DECREF(spec);
        Py_DECREF(module);
    } else if (PyErr_Occurred()) {
        PyErr_Clear();
    }
#endif
    return __Pyx__ImportDottedModule(name, parts_tuple);
}

/* FetchSharedCythonModule */
static PyObject *__Pyx_FetchSharedCythonABIModule(void) {
    return __Pyx_PyImport_AddModuleRef((char*) __PYX_ABI_MODULE_NAME);
}

/* FetchCommonType */
static int __Pyx_VerifyCachedType(PyObject *cached_type,
                               const char *name,
                               Py_ssize_t basicsize,
                               Py_ssize_t expected_basicsize) {
    if (!PyType_Check(cached_type)) {
        PyErr_Format(PyExc_TypeError,
            "Shared Cython type %.200s is not a type object", name);
        return -1;
    }
    if (basicsize != expected_basicsize) {
        PyErr_Format(PyExc_TypeError,
            "Shared Cython type %.200s has the wrong size, try recompiling",
            name);
        return -1;
    }
    return 0;
}
#if !CYTHON_USE_TYPE_SPECS
static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type) {
    PyObject* abi_module;
    const char* object_name;
    PyTypeObject *cached_type = NULL;
    abi_module = __Pyx_FetchSharedCythonABIModule();
    if (!abi_module) return NULL;
    object_name = strrchr(type->tp_name, '.');
    object_name = object_name ? object_name+1 : type->tp_name;
    cached_type = (PyTypeObject*) PyObject_GetAttrString(abi_module, object_name);
    if (cached_type) {
        if (__Pyx_VerifyCachedType(
              (PyObject *)cached_type,
              object_name,
              cached_type->tp_basicsize,
              type->tp_basicsize) < 0) {
            goto bad;
        }
        goto done;
    }
    if (!PyErr_ExceptionMatches(PyExc_AttributeError)) goto bad;
    PyErr_Clear();
    if (PyType_Ready(type) < 0) goto bad;
    if (PyObject_SetAttrString(abi_module, object_name, (PyObject *)type) < 0)
        goto bad;
    Py_INCREF(type);
    cached_type = type;
done:
    Py_DECREF(abi_module);
    return cached_type;
bad:
    Py_XDECREF(cached_type);
    cached_type = NULL;
    goto done;
}
#else
static PyTypeObject *__Pyx_FetchCommonTypeFromSpec(PyObject *module, PyType_Spec *spec, PyObject *bases) {
    PyObject *abi_module, *cached_type = NULL;
    const char* object_name = strrchr(spec->name, '.');
    object_name = object_name ? object_name+1 : spec->name;
    abi_module = __Pyx_FetchSharedCythonABIModule();
    if (!abi_module) return NULL;
    cached_type = PyObject_GetAttrString(abi_module, object_name);
    if (cached_type) {
        Py_ssize_t basicsize;
#if CYTHON_COMPILING_IN_LIMITED_API
        PyObject *py_basicsize;
        py_basicsize = PyObject_GetAttrString(cached_type, "__basicsize__");
        if (unlikely(!py_basicsize)) goto bad;
        basicsize = PyLong_AsSsize_t(py_basicsize);
        Py_DECREF(py_basicsize);
        py_basicsize = 0;
        if (unlikely(basicsize == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad;
#else
        basicsize = likely(PyType_Check(cached_type)) ? ((PyTypeObject*) cached_type)->tp_basicsize : -1;
#endif
        if (__Pyx_VerifyCachedType(
              cached_type,
              object_name,
              basicsize,
              spec->basicsize) < 0) {
            goto bad;
        }
        goto done;
    }
    if (!PyErr_ExceptionMatches(PyExc_AttributeError)) goto bad;
    PyErr_Clear();
    CYTHON_UNUSED_VAR(module);
    cached_type = __Pyx_PyType_FromModuleAndSpec(abi_module, spec, bases);
    if (unlikely(!cached_type)) goto bad;
    if (unlikely(__Pyx_fix_up_extension_type_from_spec(spec, (PyTypeObject *) cached_type) < 0)) goto bad;
    if (PyObject_SetAttrString(abi_module, object_name, cached_type) < 0) goto bad;
done:
    Py_DECREF(abi_module);
    assert(cached_type == NULL || PyType_Check(cached_type));
    return (PyTypeObject *) cached_type;
bad:
    Py_XDECREF(cached_type);
    cached_type = NULL;
    goto done;
}
#endif

/* PyVectorcallFastCallDict */
#if CYTHON_METH_FASTCALL
static PyObject *__Pyx_PyVectorcall_FastCallDict_kw(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, size_t nargs, PyObject *kw)
{
    PyObject *res = NULL;
    PyObject *kwnames;
    PyObject **newargs;
    PyObject **kwvalues;
    Py_ssize_t i, pos;
    size_t j;
    PyObject *key, *value;
    unsigned long keys_are_strings;
    Py_ssize_t nkw = PyDict_GET_SIZE(kw);
    newargs = (PyObject **)PyMem_Malloc((nargs + (size_t)nkw) * sizeof(args[0]));
    if (unlikely(newargs == NULL)) {
        PyErr_NoMemory();
        return NULL;
    }
    for (j = 0; j < nargs; j++) newargs[j] = args[j];
    kwnames = PyTuple_New(nkw);
    if (unlikely(kwnames == NULL)) {
        PyMem_Free(newargs);
        return NULL;
    }
    kwvalues = newargs + nargs;
    pos = i = 0;
    keys_are_strings = Py_TPFLAGS_UNICODE_SUBCLASS;
    while (PyDict_Next(kw, &pos, &key, &value)) {
        keys_are_strings &= Py_TYPE(key)->tp_flags;
        Py_INCREF(key);
        Py_INCREF(value);
        PyTuple_SET_ITEM(kwnames, i, key);
        kwvalues[i] = value;
        i++;
    }
    if (unlikely(!keys_are_strings)) {
        PyErr_SetString(PyExc_TypeError, "keywords must be strings");
        goto cleanup;
    }
    res = vc(func, newargs, nargs, kwnames);
cleanup:
    Py_DECREF(kwnames);
    for (i = 0; i < nkw; i++)
        Py_DECREF(kwvalues[i]);
    PyMem_Free(newargs);
    return res;
}
static CYTHON_INLINE PyObject *__Pyx_PyVectorcall_FastCallDict(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, size_t nargs, PyObject *kw)
{
    if (likely(kw == NULL) || PyDict_GET_SIZE(kw) == 0) {
        return vc(func, args, nargs, NULL);
    }
    return __Pyx_PyVectorcall_FastCallDict_kw(func, vc, args, nargs, kw);
}
#endif

/* CythonFunctionShared */
#if CYTHON_COMPILING_IN_LIMITED_API
static CYTHON_INLINE int __Pyx__IsSameCyOrCFunction(PyObject *func, void *cfunc) {
    if (__Pyx_CyFunction_Check(func)) {
        return PyCFunction_GetFunction(((__pyx_CyFunctionObject*)func)->func) == (PyCFunction) cfunc;
    } else if (PyCFunction_Check(func)) {
        return PyCFunction_GetFunction(func) == (PyCFunction) cfunc;
    }
    return 0;
}
#else
static CYTHON_INLINE int __Pyx__IsSameCyOrCFunction(PyObject *func, void *cfunc) {
    return __Pyx_CyOrPyCFunction_Check(func) && __Pyx_CyOrPyCFunction_GET_FUNCTION(func) == (PyCFunction) cfunc;
}
#endif
static CYTHON_INLINE void __Pyx__CyFunction_SetClassObj(__pyx_CyFunctionObject* f, PyObject* classobj) {
#if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API
    __Pyx_Py_XDECREF_SET(
        __Pyx_CyFunction_GetClassObj(f),
            ((classobj) ? __Pyx_NewRef(classobj) : NULL));
#else
    __Pyx_Py_XDECREF_SET(
        ((PyCMethodObject *) (f))->mm_class,
        (PyTypeObject*)((classobj) ? __Pyx_NewRef(classobj) : NULL));
#endif
}
static PyObject *
__Pyx_CyFunction_get_doc(__pyx_CyFunctionObject *op, void *closure)
{
    CYTHON_UNUSED_VAR(closure);
    if (unlikely(op->func_doc == NULL)) {
#if CYTHON_COMPILING_IN_LIMITED_API
        op->func_doc = PyObject_GetAttrString(op->func, "__doc__");
        if (unlikely(!op->func_doc)) return NULL;
#else
        if (((PyCFunctionObject*)op)->m_ml->ml_doc) {
#if PY_MAJOR_VERSION >= 3
            op->func_doc = PyUnicode_FromString(((PyCFunctionObject*)op)->m_ml->ml_doc);
#else
            op->func_doc = PyString_FromString(((PyCFunctionObject*)op)->m_ml->ml_doc);
#endif
            if (unlikely(op->func_doc == NULL))
                return NULL;
        } else {
            Py_INCREF(Py_None);
            return Py_None;
        }
#endif
    }
    Py_INCREF(op->func_doc);
    return op->func_doc;
}
static int
__Pyx_CyFunction_set_doc(__pyx_CyFunctionObject *op, PyObject *value, void *context)
{
    CYTHON_UNUSED_VAR(context);
    if (value == NULL) {
        value = Py_None;
    }
    Py_INCREF(value);
    __Pyx_Py_XDECREF_SET(op->func_doc, value);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_name(__pyx_CyFunctionObject *op, void *context)
{
    CYTHON_UNUSED_VAR(context);
    if (unlikely(op->func_name == NULL)) {
#if CYTHON_COMPILING_IN_LIMITED_API
        op->func_name = PyObject_GetAttrString(op->func, "__name__");
#elif PY_MAJOR_VERSION >= 3
        op->func_name = PyUnicode_InternFromString(((PyCFunctionObject*)op)->m_ml->ml_name);
#else
        op->func_name = PyString_InternFromString(((PyCFunctionObject*)op)->m_ml->ml_name);
#endif
        if (unlikely(op->func_name == NULL))
            return NULL;
    }
    Py_INCREF(op->func_name);
    return op->func_name;
}
static int
__Pyx_CyFunction_set_name(__pyx_CyFunctionObject *op, PyObject *value, void *context)
{
    CYTHON_UNUSED_VAR(context);
#if PY_MAJOR_VERSION >= 3
    if (unlikely(value == NULL || !PyUnicode_Check(value)))
#else
    if (unlikely(value == NULL || !PyString_Check(value)))
#endif
    {
        PyErr_SetString(PyExc_TypeError,
                        "__name__ must be set to a string object");
        return -1;
    }
    Py_INCREF(value);
    __Pyx_Py_XDECREF_SET(op->func_name, value);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_qualname(__pyx_CyFunctionObject *op, void *context)
{
    CYTHON_UNUSED_VAR(context);
    Py_INCREF(op->func_qualname);
    return op->func_qualname;
}
static int
__Pyx_CyFunction_set_qualname(__pyx_CyFunctionObject *op, PyObject *value, void *context)
{
    CYTHON_UNUSED_VAR(context);
#if PY_MAJOR_VERSION >= 3
    if (unlikely(value == NULL || !PyUnicode_Check(value)))
#else
    if (unlikely(value == NULL || !PyString_Check(value)))
#endif
    {
        PyErr_SetString(PyExc_TypeError,
                        "__qualname__ must be set to a string object");
        return -1;
    }
    Py_INCREF(value);
    __Pyx_Py_XDECREF_SET(op->func_qualname, value);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_dict(__pyx_CyFunctionObject *op, void *context)
{
    CYTHON_UNUSED_VAR(context);
    if (unlikely(op->func_dict == NULL)) {
        op->func_dict = PyDict_New();
        if (unlikely(op->func_dict == NULL))
            return NULL;
    }
    Py_INCREF(op->func_dict);
    return op->func_dict;
}
static int
__Pyx_CyFunction_set_dict(__pyx_CyFunctionObject *op, PyObject *value, void *context)
{
    CYTHON_UNUSED_VAR(context);
    if (unlikely(value == NULL)) {
        PyErr_SetString(PyExc_TypeError,
               "function's dictionary may not be deleted");
        return -1;
    }
    if (unlikely(!PyDict_Check(value))) {
        PyErr_SetString(PyExc_TypeError,
               "setting function's dictionary to a non-dict");
        return -1;
    }
    Py_INCREF(value);
    __Pyx_Py_XDECREF_SET(op->func_dict, value);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_globals(__pyx_CyFunctionObject *op, void *context)
{
    CYTHON_UNUSED_VAR(context);
    Py_INCREF(op->func_globals);
    return op->func_globals;
}
static PyObject *
__Pyx_CyFunction_get_closure(__pyx_CyFunctionObject *op, void *context)
{
    CYTHON_UNUSED_VAR(op);
    CYTHON_UNUSED_VAR(context);
    Py_INCREF(Py_None);
    return Py_None;
}
static PyObject *
__Pyx_CyFunction_get_code(__pyx_CyFunctionObject *op, void *context)
{
    PyObject* result = (op->func_code) ? op->func_code : Py_None;
    CYTHON_UNUSED_VAR(context);
    Py_INCREF(result);
    return result;
}
static int
__Pyx_CyFunction_init_defaults(__pyx_CyFunctionObject *op) {
    int result = 0;
    PyObject *res = op->defaults_getter((PyObject *) op);
    if (unlikely(!res))
        return -1;
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    op->defaults_tuple = PyTuple_GET_ITEM(res, 0);
    Py_INCREF(op->defaults_tuple);
    op->defaults_kwdict = PyTuple_GET_ITEM(res, 1);
    Py_INCREF(op->defaults_kwdict);
    #else
    op->defaults_tuple = __Pyx_PySequence_ITEM(res, 0);
    if (unlikely(!op->defaults_tuple)) result = -1;
    else {
        op->defaults_kwdict = __Pyx_PySequence_ITEM(res, 1);
        if (unlikely(!op->defaults_kwdict)) result = -1;
    }
    #endif
    Py_DECREF(res);
    return result;
}
static int
__Pyx_CyFunction_set_defaults(__pyx_CyFunctionObject *op, PyObject* value, void *context) {
    CYTHON_UNUSED_VAR(context);
    if (!value) {
        value = Py_None;
    } else if (unlikely(value != Py_None && !PyTuple_Check(value))) {
        PyErr_SetString(PyExc_TypeError,
                        "__defaults__ must be set to a tuple object");
        return -1;
    }
    PyErr_WarnEx(PyExc_RuntimeWarning, "changes to cyfunction.__defaults__ will not "
                 "currently affect the values used in function calls", 1);
    Py_INCREF(value);
    __Pyx_Py_XDECREF_SET(op->defaults_tuple, value);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_defaults(__pyx_CyFunctionObject *op, void *context) {
    PyObject* result = op->defaults_tuple;
    CYTHON_UNUSED_VAR(context);
    if (unlikely(!result)) {
        if (op->defaults_getter) {
            if (unlikely(__Pyx_CyFunction_init_defaults(op) < 0)) return NULL;
            result = op->defaults_tuple;
        } else {
            result = Py_None;
        }
    }
    Py_INCREF(result);
    return result;
}
static int
__Pyx_CyFunction_set_kwdefaults(__pyx_CyFunctionObject *op, PyObject* value, void *context) {
    CYTHON_UNUSED_VAR(context);
    if (!value) {
        value = Py_None;
    } else if (unlikely(value != Py_None && !PyDict_Check(value))) {
        PyErr_SetString(PyExc_TypeError,
                        "__kwdefaults__ must be set to a dict object");
        return -1;
    }
    PyErr_WarnEx(PyExc_RuntimeWarning, "changes to cyfunction.__kwdefaults__ will not "
                 "currently affect the values used in function calls", 1);
    Py_INCREF(value);
    __Pyx_Py_XDECREF_SET(op->defaults_kwdict, value);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_kwdefaults(__pyx_CyFunctionObject *op, void *context) {
    PyObject* result = op->defaults_kwdict;
    CYTHON_UNUSED_VAR(context);
    if (unlikely(!result)) {
        if (op->defaults_getter) {
            if (unlikely(__Pyx_CyFunction_init_defaults(op) < 0)) return NULL;
            result = op->defaults_kwdict;
        } else {
            result = Py_None;
        }
    }
    Py_INCREF(result);
    return result;
}
static int
__Pyx_CyFunction_set_annotations(__pyx_CyFunctionObject *op, PyObject* value, void *context) {
    CYTHON_UNUSED_VAR(context);
    if (!value || value == Py_None) {
        value = NULL;
    } else if (unlikely(!PyDict_Check(value))) {
        PyErr_SetString(PyExc_TypeError,
                        "__annotations__ must be set to a dict object");
        return -1;
    }
    Py_XINCREF(value);
    __Pyx_Py_XDECREF_SET(op->func_annotations, value);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_annotations(__pyx_CyFunctionObject *op, void *context) {
    PyObject* result = op->func_annotations;
    CYTHON_UNUSED_VAR(context);
    if (unlikely(!result)) {
        result = PyDict_New();
        if (unlikely(!result)) return NULL;
        op->func_annotations = result;
    }
    Py_INCREF(result);
    return result;
}
static PyObject *
__Pyx_CyFunction_get_is_coroutine(__pyx_CyFunctionObject *op, void *context) {
    int is_coroutine;
    CYTHON_UNUSED_VAR(context);
    if (op->func_is_coroutine) {
        return __Pyx_NewRef(op->func_is_coroutine);
    }
    is_coroutine = op->flags & __Pyx_CYFUNCTION_COROUTINE;
#if PY_VERSION_HEX >= 0x03050000
    if (is_coroutine) {
        PyObject *module, *fromlist, *marker = __pyx_n_s_is_coroutine;
        fromlist = PyList_New(1);
        if (unlikely(!fromlist)) return NULL;
        Py_INCREF(marker);
#if CYTHON_ASSUME_SAFE_MACROS
        PyList_SET_ITEM(fromlist, 0, marker);
#else
        if (unlikely(PyList_SetItem(fromlist, 0, marker) < 0)) {
            Py_DECREF(marker);
            Py_DECREF(fromlist);
            return NULL;
        }
#endif
        module = PyImport_ImportModuleLevelObject(__pyx_n_s_asyncio_coroutines, NULL, NULL, fromlist, 0);
        Py_DECREF(fromlist);
        if (unlikely(!module)) goto ignore;
        op->func_is_coroutine = __Pyx_PyObject_GetAttrStr(module, marker);
        Py_DECREF(module);
        if (likely(op->func_is_coroutine)) {
            return __Pyx_NewRef(op->func_is_coroutine);
        }
ignore:
        PyErr_Clear();
    }
#endif
    op->func_is_coroutine = __Pyx_PyBool_FromLong(is_coroutine);
    return __Pyx_NewRef(op->func_is_coroutine);
}
#if CYTHON_COMPILING_IN_LIMITED_API
static PyObject *
__Pyx_CyFunction_get_module(__pyx_CyFunctionObject *op, void *context) {
    CYTHON_UNUSED_VAR(context);
    return PyObject_GetAttrString(op->func, "__module__");
}
static int
__Pyx_CyFunction_set_module(__pyx_CyFunctionObject *op, PyObject* value, void *context) {
    CYTHON_UNUSED_VAR(context);
    return PyObject_SetAttrString(op->func, "__module__", value);
}
#endif
static PyGetSetDef __pyx_CyFunction_getsets[] = {
    {(char *) "func_doc", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0},
    {(char *) "__doc__",  (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0},
    {(char *) "func_name", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0},
    {(char *) "__name__", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0},
    {(char *) "__qualname__", (getter)__Pyx_CyFunction_get_qualname, (setter)__Pyx_CyFunction_set_qualname, 0, 0},
    {(char *) "func_dict", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0},
    {(char *) "__dict__", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0},
    {(char *) "func_globals", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0},
    {(char *) "__globals__", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0},
    {(char *) "func_closure", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0},
    {(char *) "__closure__", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0},
    {(char *) "func_code", (getter)__Pyx_CyFunction_get_code, 0, 0, 0},
    {(char *) "__code__", (getter)__Pyx_CyFunction_get_code, 0, 0, 0},
    {(char *) "func_defaults", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0},
    {(char *) "__defaults__", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0},
    {(char *) "__kwdefaults__", (getter)__Pyx_CyFunction_get_kwdefaults, (setter)__Pyx_CyFunction_set_kwdefaults, 0, 0},
    {(char *) "__annotations__", (getter)__Pyx_CyFunction_get_annotations, (setter)__Pyx_CyFunction_set_annotations, 0, 0},
    {(char *) "_is_coroutine", (getter)__Pyx_CyFunction_get_is_coroutine, 0, 0, 0},
#if CYTHON_COMPILING_IN_LIMITED_API
    {"__module__", (getter)__Pyx_CyFunction_get_module, (setter)__Pyx_CyFunction_set_module, 0, 0},
#endif
    {0, 0, 0, 0, 0}
};
static PyMemberDef __pyx_CyFunction_members[] = {
#if !CYTHON_COMPILING_IN_LIMITED_API
    {(char *) "__module__", T_OBJECT, offsetof(PyCFunctionObject, m_module), 0, 0},
#endif
#if CYTHON_USE_TYPE_SPECS
    {(char *) "__dictoffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_dict), READONLY, 0},
#if CYTHON_METH_FASTCALL
#if CYTHON_BACKPORT_VECTORCALL
    {(char *) "__vectorcalloffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_vectorcall), READONLY, 0},
#else
#if !CYTHON_COMPILING_IN_LIMITED_API
    {(char *) "__vectorcalloffset__", T_PYSSIZET, offsetof(PyCFunctionObject, vectorcall), READONLY, 0},
#endif
#endif
#endif
#if PY_VERSION_HEX < 0x030500A0 || CYTHON_COMPILING_IN_LIMITED_API
    {(char *) "__weaklistoffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_weakreflist), READONLY, 0},
#else
    {(char *) "__weaklistoffset__", T_PYSSIZET, offsetof(PyCFunctionObject, m_weakreflist), READONLY, 0},
#endif
#endif
    {0, 0, 0,  0, 0}
};
static PyObject *
__Pyx_CyFunction_reduce(__pyx_CyFunctionObject *m, PyObject *args)
{
    CYTHON_UNUSED_VAR(args);
#if PY_MAJOR_VERSION >= 3
    Py_INCREF(m->func_qualname);
    return m->func_qualname;
#else
    return PyString_FromString(((PyCFunctionObject*)m)->m_ml->ml_name);
#endif
}
static PyMethodDef __pyx_CyFunction_methods[] = {
    {"__reduce__", (PyCFunction)__Pyx_CyFunction_reduce, METH_VARARGS, 0},
    {0, 0, 0, 0}
};
#if PY_VERSION_HEX < 0x030500A0 || CYTHON_COMPILING_IN_LIMITED_API
#define __Pyx_CyFunction_weakreflist(cyfunc) ((cyfunc)->func_weakreflist)
#else
#define __Pyx_CyFunction_weakreflist(cyfunc) (((PyCFunctionObject*)cyfunc)->m_weakreflist)
#endif
static PyObject *__Pyx_CyFunction_Init(__pyx_CyFunctionObject *op, PyMethodDef *ml, int flags, PyObject* qualname,
                                       PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) {
#if !CYTHON_COMPILING_IN_LIMITED_API
    PyCFunctionObject *cf = (PyCFunctionObject*) op;
#endif
    if (unlikely(op == NULL))
        return NULL;
#if CYTHON_COMPILING_IN_LIMITED_API
    op->func = PyCFunction_NewEx(ml, (PyObject*)op, module);
    if (unlikely(!op->func)) return NULL;
#endif
    op->flags = flags;
    __Pyx_CyFunction_weakreflist(op) = NULL;
#if !CYTHON_COMPILING_IN_LIMITED_API
    cf->m_ml = ml;
    cf->m_self = (PyObject *) op;
#endif
    Py_XINCREF(closure);
    op->func_closure = closure;
#if !CYTHON_COMPILING_IN_LIMITED_API
    Py_XINCREF(module);
    cf->m_module = module;
#endif
    op->func_dict = NULL;
    op->func_name = NULL;
    Py_INCREF(qualname);
    op->func_qualname = qualname;
    op->func_doc = NULL;
#if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API
    op->func_classobj = NULL;
#else
    ((PyCMethodObject*)op)->mm_class = NULL;
#endif
    op->func_globals = globals;
    Py_INCREF(op->func_globals);
    Py_XINCREF(code);
    op->func_code = code;
    op->defaults_pyobjects = 0;
    op->defaults_size = 0;
    op->defaults = NULL;
    op->defaults_tuple = NULL;
    op->defaults_kwdict = NULL;
    op->defaults_getter = NULL;
    op->func_annotations = NULL;
    op->func_is_coroutine = NULL;
#if CYTHON_METH_FASTCALL
    switch (ml->ml_flags & (METH_VARARGS | METH_FASTCALL | METH_NOARGS | METH_O | METH_KEYWORDS | METH_METHOD)) {
    case METH_NOARGS:
        __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_NOARGS;
        break;
    case METH_O:
        __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_O;
        break;
    case METH_METHOD | METH_FASTCALL | METH_KEYWORDS:
        __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD;
        break;
    case METH_FASTCALL | METH_KEYWORDS:
        __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS;
        break;
    case METH_VARARGS | METH_KEYWORDS:
        __Pyx_CyFunction_func_vectorcall(op) = NULL;
        break;
    default:
        PyErr_SetString(PyExc_SystemError, "Bad call flags for CyFunction");
        Py_DECREF(op);
        return NULL;
    }
#endif
    return (PyObject *) op;
}
static int
__Pyx_CyFunction_clear(__pyx_CyFunctionObject *m)
{
    Py_CLEAR(m->func_closure);
#if CYTHON_COMPILING_IN_LIMITED_API
    Py_CLEAR(m->func);
#else
    Py_CLEAR(((PyCFunctionObject*)m)->m_module);
#endif
    Py_CLEAR(m->func_dict);
    Py_CLEAR(m->func_name);
    Py_CLEAR(m->func_qualname);
    Py_CLEAR(m->func_doc);
    Py_CLEAR(m->func_globals);
    Py_CLEAR(m->func_code);
#if !CYTHON_COMPILING_IN_LIMITED_API
#if PY_VERSION_HEX < 0x030900B1
    Py_CLEAR(__Pyx_CyFunction_GetClassObj(m));
#else
    {
        PyObject *cls = (PyObject*) ((PyCMethodObject *) (m))->mm_class;
        ((PyCMethodObject *) (m))->mm_class = NULL;
        Py_XDECREF(cls);
    }
#endif
#endif
    Py_CLEAR(m->defaults_tuple);
    Py_CLEAR(m->defaults_kwdict);
    Py_CLEAR(m->func_annotations);
    Py_CLEAR(m->func_is_coroutine);
    if (m->defaults) {
        PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m);
        int i;
        for (i = 0; i < m->defaults_pyobjects; i++)
            Py_XDECREF(pydefaults[i]);
        PyObject_Free(m->defaults);
        m->defaults = NULL;
    }
    return 0;
}
static void __Pyx__CyFunction_dealloc(__pyx_CyFunctionObject *m)
{
    if (__Pyx_CyFunction_weakreflist(m) != NULL)
        PyObject_ClearWeakRefs((PyObject *) m);
    __Pyx_CyFunction_clear(m);
    __Pyx_PyHeapTypeObject_GC_Del(m);
}
static void __Pyx_CyFunction_dealloc(__pyx_CyFunctionObject *m)
{
    PyObject_GC_UnTrack(m);
    __Pyx__CyFunction_dealloc(m);
}
static int __Pyx_CyFunction_traverse(__pyx_CyFunctionObject *m, visitproc visit, void *arg)
{
    Py_VISIT(m->func_closure);
#if CYTHON_COMPILING_IN_LIMITED_API
    Py_VISIT(m->func);
#else
    Py_VISIT(((PyCFunctionObject*)m)->m_module);
#endif
    Py_VISIT(m->func_dict);
    Py_VISIT(m->func_name);
    Py_VISIT(m->func_qualname);
    Py_VISIT(m->func_doc);
    Py_VISIT(m->func_globals);
    Py_VISIT(m->func_code);
#if !CYTHON_COMPILING_IN_LIMITED_API
    Py_VISIT(__Pyx_CyFunction_GetClassObj(m));
#endif
    Py_VISIT(m->defaults_tuple);
    Py_VISIT(m->defaults_kwdict);
    Py_VISIT(m->func_is_coroutine);
    if (m->defaults) {
        PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m);
        int i;
        for (i = 0; i < m->defaults_pyobjects; i++)
            Py_VISIT(pydefaults[i]);
    }
    return 0;
}
static PyObject*
__Pyx_CyFunction_repr(__pyx_CyFunctionObject *op)
{
#if PY_MAJOR_VERSION >= 3
    return PyUnicode_FromFormat("<cyfunction %U at %p>",
                                op->func_qualname, (void *)op);
#else
    return PyString_FromFormat("<cyfunction %s at %p>",
                               PyString_AsString(op->func_qualname), (void *)op);
#endif
}
static PyObject * __Pyx_CyFunction_CallMethod(PyObject *func, PyObject *self, PyObject *arg, PyObject *kw) {
#if CYTHON_COMPILING_IN_LIMITED_API
    PyObject *f = ((__pyx_CyFunctionObject*)func)->func;
    PyObject *py_name = NULL;
    PyCFunction meth;
    int flags;
    meth = PyCFunction_GetFunction(f);
    if (unlikely(!meth)) return NULL;
    flags = PyCFunction_GetFlags(f);
    if (unlikely(flags < 0)) return NULL;
#else
    PyCFunctionObject* f = (PyCFunctionObject*)func;
    PyCFunction meth = f->m_ml->ml_meth;
    int flags = f->m_ml->ml_flags;
#endif
    Py_ssize_t size;
    switch (flags & (METH_VARARGS | METH_KEYWORDS | METH_NOARGS | METH_O)) {
    case METH_VARARGS:
        if (likely(kw == NULL || PyDict_Size(kw) == 0))
            return (*meth)(self, arg);
        break;
    case METH_VARARGS | METH_KEYWORDS:
        return (*(PyCFunctionWithKeywords)(void*)meth)(self, arg, kw);
    case METH_NOARGS:
        if (likely(kw == NULL || PyDict_Size(kw) == 0)) {
#if CYTHON_ASSUME_SAFE_MACROS
            size = PyTuple_GET_SIZE(arg);
#else
            size = PyTuple_Size(arg);
            if (unlikely(size < 0)) return NULL;
#endif
            if (likely(size == 0))
                return (*meth)(self, NULL);
#if CYTHON_COMPILING_IN_LIMITED_API
            py_name = __Pyx_CyFunction_get_name((__pyx_CyFunctionObject*)func, NULL);
            if (!py_name) return NULL;
            PyErr_Format(PyExc_TypeError,
                "%.200S() takes no arguments (%" CYTHON_FORMAT_SSIZE_T "d given)",
                py_name, size);
            Py_DECREF(py_name);
#else
            PyErr_Format(PyExc_TypeError,
                "%.200s() takes no arguments (%" CYTHON_FORMAT_SSIZE_T "d given)",
                f->m_ml->ml_name, size);
#endif
            return NULL;
        }
        break;
    case METH_O:
        if (likely(kw == NULL || PyDict_Size(kw) == 0)) {
#if CYTHON_ASSUME_SAFE_MACROS
            size = PyTuple_GET_SIZE(arg);
#else
            size = PyTuple_Size(arg);
            if (unlikely(size < 0)) return NULL;
#endif
            if (likely(size == 1)) {
                PyObject *result, *arg0;
                #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                arg0 = PyTuple_GET_ITEM(arg, 0);
                #else
                arg0 = __Pyx_PySequence_ITEM(arg, 0); if (unlikely(!arg0)) return NULL;
                #endif
                result = (*meth)(self, arg0);
                #if !(CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS)
                Py_DECREF(arg0);
                #endif
                return result;
            }
#if CYTHON_COMPILING_IN_LIMITED_API
            py_name = __Pyx_CyFunction_get_name((__pyx_CyFunctionObject*)func, NULL);
            if (!py_name) return NULL;
            PyErr_Format(PyExc_TypeError,
                "%.200S() takes exactly one argument (%" CYTHON_FORMAT_SSIZE_T "d given)",
                py_name, size);
            Py_DECREF(py_name);
#else
            PyErr_Format(PyExc_TypeError,
                "%.200s() takes exactly one argument (%" CYTHON_FORMAT_SSIZE_T "d given)",
                f->m_ml->ml_name, size);
#endif
            return NULL;
        }
        break;
    default:
        PyErr_SetString(PyExc_SystemError, "Bad call flags for CyFunction");
        return NULL;
    }
#if CYTHON_COMPILING_IN_LIMITED_API
    py_name = __Pyx_CyFunction_get_name((__pyx_CyFunctionObject*)func, NULL);
    if (!py_name) return NULL;
    PyErr_Format(PyExc_TypeError, "%.200S() takes no keyword arguments",
                 py_name);
    Py_DECREF(py_name);
#else
    PyErr_Format(PyExc_TypeError, "%.200s() takes no keyword arguments",
                 f->m_ml->ml_name);
#endif
    return NULL;
}
static CYTHON_INLINE PyObject *__Pyx_CyFunction_Call(PyObject *func, PyObject *arg, PyObject *kw) {
    PyObject *self, *result;
#if CYTHON_COMPILING_IN_LIMITED_API
    self = PyCFunction_GetSelf(((__pyx_CyFunctionObject*)func)->func);
    if (unlikely(!self) && PyErr_Occurred()) return NULL;
#else
    self = ((PyCFunctionObject*)func)->m_self;
#endif
    result = __Pyx_CyFunction_CallMethod(func, self, arg, kw);
    return result;
}
static PyObject *__Pyx_CyFunction_CallAsMethod(PyObject *func, PyObject *args, PyObject *kw) {
    PyObject *result;
    __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *) func;
#if CYTHON_METH_FASTCALL
     __pyx_vectorcallfunc vc = __Pyx_CyFunction_func_vectorcall(cyfunc);
    if (vc) {
#if CYTHON_ASSUME_SAFE_MACROS
        return __Pyx_PyVectorcall_FastCallDict(func, vc, &PyTuple_GET_ITEM(args, 0), (size_t)PyTuple_GET_SIZE(args), kw);
#else
        (void) &__Pyx_PyVectorcall_FastCallDict;
        return PyVectorcall_Call(func, args, kw);
#endif
    }
#endif
    if ((cyfunc->flags & __Pyx_CYFUNCTION_CCLASS) && !(cyfunc->flags & __Pyx_CYFUNCTION_STATICMETHOD)) {
        Py_ssize_t argc;
        PyObject *new_args;
        PyObject *self;
#if CYTHON_ASSUME_SAFE_MACROS
        argc = PyTuple_GET_SIZE(args);
#else
        argc = PyTuple_Size(args);
        if (unlikely(!argc) < 0) return NULL;
#endif
        new_args = PyTuple_GetSlice(args, 1, argc);
        if (unlikely(!new_args))
            return NULL;
        self = PyTuple_GetItem(args, 0);
        if (unlikely(!self)) {
            Py_DECREF(new_args);
#if PY_MAJOR_VERSION > 2
            PyErr_Format(PyExc_TypeError,
                         "unbound method %.200S() needs an argument",
                         cyfunc->func_qualname);
#else
            PyErr_SetString(PyExc_TypeError,
                            "unbound method needs an argument");
#endif
            return NULL;
        }
        result = __Pyx_CyFunction_CallMethod(func, self, new_args, kw);
        Py_DECREF(new_args);
    } else {
        result = __Pyx_CyFunction_Call(func, args, kw);
    }
    return result;
}
#if CYTHON_METH_FASTCALL
static CYTHON_INLINE int __Pyx_CyFunction_Vectorcall_CheckArgs(__pyx_CyFunctionObject *cyfunc, Py_ssize_t nargs, PyObject *kwnames)
{
    int ret = 0;
    if ((cyfunc->flags & __Pyx_CYFUNCTION_CCLASS) && !(cyfunc->flags & __Pyx_CYFUNCTION_STATICMETHOD)) {
        if (unlikely(nargs < 1)) {
            PyErr_Format(PyExc_TypeError, "%.200s() needs an argument",
                         ((PyCFunctionObject*)cyfunc)->m_ml->ml_name);
            return -1;
        }
        ret = 1;
    }
    if (unlikely(kwnames) && unlikely(PyTuple_GET_SIZE(kwnames))) {
        PyErr_Format(PyExc_TypeError,
                     "%.200s() takes no keyword arguments", ((PyCFunctionObject*)cyfunc)->m_ml->ml_name);
        return -1;
    }
    return ret;
}
static PyObject * __Pyx_CyFunction_Vectorcall_NOARGS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames)
{
    __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func;
    PyMethodDef* def = ((PyCFunctionObject*)cyfunc)->m_ml;
#if CYTHON_BACKPORT_VECTORCALL
    Py_ssize_t nargs = (Py_ssize_t)nargsf;
#else
    Py_ssize_t nargs = PyVectorcall_NARGS(nargsf);
#endif
    PyObject *self;
    switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, kwnames)) {
    case 1:
        self = args[0];
        args += 1;
        nargs -= 1;
        break;
    case 0:
        self = ((PyCFunctionObject*)cyfunc)->m_self;
        break;
    default:
        return NULL;
    }
    if (unlikely(nargs != 0)) {
        PyErr_Format(PyExc_TypeError,
            "%.200s() takes no arguments (%" CYTHON_FORMAT_SSIZE_T "d given)",
            def->ml_name, nargs);
        return NULL;
    }
    return def->ml_meth(self, NULL);
}
static PyObject * __Pyx_CyFunction_Vectorcall_O(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames)
{
    __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func;
    PyMethodDef* def = ((PyCFunctionObject*)cyfunc)->m_ml;
#if CYTHON_BACKPORT_VECTORCALL
    Py_ssize_t nargs = (Py_ssize_t)nargsf;
#else
    Py_ssize_t nargs = PyVectorcall_NARGS(nargsf);
#endif
    PyObject *self;
    switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, kwnames)) {
    case 1:
        self = args[0];
        args += 1;
        nargs -= 1;
        break;
    case 0:
        self = ((PyCFunctionObject*)cyfunc)->m_self;
        break;
    default:
        return NULL;
    }
    if (unlikely(nargs != 1)) {
        PyErr_Format(PyExc_TypeError,
            "%.200s() takes exactly one argument (%" CYTHON_FORMAT_SSIZE_T "d given)",
            def->ml_name, nargs);
        return NULL;
    }
    return def->ml_meth(self, args[0]);
}
static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames)
{
    __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func;
    PyMethodDef* def = ((PyCFunctionObject*)cyfunc)->m_ml;
#if CYTHON_BACKPORT_VECTORCALL
    Py_ssize_t nargs = (Py_ssize_t)nargsf;
#else
    Py_ssize_t nargs = PyVectorcall_NARGS(nargsf);
#endif
    PyObject *self;
    switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, NULL)) {
    case 1:
        self = args[0];
        args += 1;
        nargs -= 1;
        break;
    case 0:
        self = ((PyCFunctionObject*)cyfunc)->m_self;
        break;
    default:
        return NULL;
    }
    return ((__Pyx_PyCFunctionFastWithKeywords)(void(*)(void))def->ml_meth)(self, args, nargs, kwnames);
}
static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames)
{
    __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func;
    PyMethodDef* def = ((PyCFunctionObject*)cyfunc)->m_ml;
    PyTypeObject *cls = (PyTypeObject *) __Pyx_CyFunction_GetClassObj(cyfunc);
#if CYTHON_BACKPORT_VECTORCALL
    Py_ssize_t nargs = (Py_ssize_t)nargsf;
#else
    Py_ssize_t nargs = PyVectorcall_NARGS(nargsf);
#endif
    PyObject *self;
    switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, NULL)) {
    case 1:
        self = args[0];
        args += 1;
        nargs -= 1;
        break;
    case 0:
        self = ((PyCFunctionObject*)cyfunc)->m_self;
        break;
    default:
        return NULL;
    }
    return ((__Pyx_PyCMethod)(void(*)(void))def->ml_meth)(self, cls, args, (size_t)nargs, kwnames);
}
#endif
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_CyFunctionType_slots[] = {
    {Py_tp_dealloc, (void *)__Pyx_CyFunction_dealloc},
    {Py_tp_repr, (void *)__Pyx_CyFunction_repr},
    {Py_tp_call, (void *)__Pyx_CyFunction_CallAsMethod},
    {Py_tp_traverse, (void *)__Pyx_CyFunction_traverse},
    {Py_tp_clear, (void *)__Pyx_CyFunction_clear},
    {Py_tp_methods, (void *)__pyx_CyFunction_methods},
    {Py_tp_members, (void *)__pyx_CyFunction_members},
    {Py_tp_getset, (void *)__pyx_CyFunction_getsets},
    {Py_tp_descr_get, (void *)__Pyx_PyMethod_New},
    {0, 0},
};
static PyType_Spec __pyx_CyFunctionType_spec = {
    __PYX_TYPE_MODULE_PREFIX "cython_function_or_method",
    sizeof(__pyx_CyFunctionObject),
    0,
#ifdef Py_TPFLAGS_METHOD_DESCRIPTOR
    Py_TPFLAGS_METHOD_DESCRIPTOR |
#endif
#if (defined(_Py_TPFLAGS_HAVE_VECTORCALL) && CYTHON_METH_FASTCALL)
    _Py_TPFLAGS_HAVE_VECTORCALL |
#endif
    Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_BASETYPE,
    __pyx_CyFunctionType_slots
};
#else
static PyTypeObject __pyx_CyFunctionType_type = {
    PyVarObject_HEAD_INIT(0, 0)
    __PYX_TYPE_MODULE_PREFIX "cython_function_or_method",
    sizeof(__pyx_CyFunctionObject),
    0,
    (destructor) __Pyx_CyFunction_dealloc,
#if !CYTHON_METH_FASTCALL
    0,
#elif CYTHON_BACKPORT_VECTORCALL
    (printfunc)offsetof(__pyx_CyFunctionObject, func_vectorcall),
#else
    offsetof(PyCFunctionObject, vectorcall),
#endif
    0,
    0,
#if PY_MAJOR_VERSION < 3
    0,
#else
    0,
#endif
    (reprfunc) __Pyx_CyFunction_repr,
    0,
    0,
    0,
    0,
    __Pyx_CyFunction_CallAsMethod,
    0,
    0,
    0,
    0,
#ifdef Py_TPFLAGS_METHOD_DESCRIPTOR
    Py_TPFLAGS_METHOD_DESCRIPTOR |
#endif
#if defined(_Py_TPFLAGS_HAVE_VECTORCALL) && CYTHON_METH_FASTCALL
    _Py_TPFLAGS_HAVE_VECTORCALL |
#endif
    Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_BASETYPE,
    0,
    (traverseproc) __Pyx_CyFunction_traverse,
    (inquiry) __Pyx_CyFunction_clear,
    0,
#if PY_VERSION_HEX < 0x030500A0
    offsetof(__pyx_CyFunctionObject, func_weakreflist),
#else
    offsetof(PyCFunctionObject, m_weakreflist),
#endif
    0,
    0,
    __pyx_CyFunction_methods,
    __pyx_CyFunction_members,
    __pyx_CyFunction_getsets,
    0,
    0,
    __Pyx_PyMethod_New,
    0,
    offsetof(__pyx_CyFunctionObject, func_dict),
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
#if PY_VERSION_HEX >= 0x030400a1
    0,
#endif
#if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
    0,
#endif
#if __PYX_NEED_TP_PRINT_SLOT
    0,
#endif
#if PY_VERSION_HEX >= 0x030C0000
    0,
#endif
#if PY_VERSION_HEX >= 0x030d00A4
    0,
#endif
#if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
    0,
#endif
};
#endif
static int __pyx_CyFunction_init(PyObject *module) {
#if CYTHON_USE_TYPE_SPECS
    __pyx_CyFunctionType = __Pyx_FetchCommonTypeFromSpec(module, &__pyx_CyFunctionType_spec, NULL);
#else
    CYTHON_UNUSED_VAR(module);
    __pyx_CyFunctionType = __Pyx_FetchCommonType(&__pyx_CyFunctionType_type);
#endif
    if (unlikely(__pyx_CyFunctionType == NULL)) {
        return -1;
    }
    return 0;
}
static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *func, size_t size, int pyobjects) {
    __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
    m->defaults = PyObject_Malloc(size);
    if (unlikely(!m->defaults))
        return PyErr_NoMemory();
    memset(m->defaults, 0, size);
    m->defaults_pyobjects = pyobjects;
    m->defaults_size = size;
    return m->defaults;
}
static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *func, PyObject *tuple) {
    __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
    m->defaults_tuple = tuple;
    Py_INCREF(tuple);
}
static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *func, PyObject *dict) {
    __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
    m->defaults_kwdict = dict;
    Py_INCREF(dict);
}
static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *func, PyObject *dict) {
    __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
    m->func_annotations = dict;
    Py_INCREF(dict);
}

/* CythonFunction */
static PyObject *__Pyx_CyFunction_New(PyMethodDef *ml, int flags, PyObject* qualname,
                                      PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) {
    PyObject *op = __Pyx_CyFunction_Init(
        PyObject_GC_New(__pyx_CyFunctionObject, __pyx_CyFunctionType),
        ml, flags, qualname, closure, module, globals, code
    );
    if (likely(op)) {
        PyObject_GC_Track(op);
    }
    return op;
}

/* CLineInTraceback */
#ifndef CYTHON_CLINE_IN_TRACEBACK
static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line) {
    PyObject *use_cline;
    PyObject *ptype, *pvalue, *ptraceback;
#if CYTHON_COMPILING_IN_CPYTHON
    PyObject **cython_runtime_dict;
#endif
    CYTHON_MAYBE_UNUSED_VAR(tstate);
    if (unlikely(!__pyx_cython_runtime)) {
        return c_line;
    }
    __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback);
#if CYTHON_COMPILING_IN_CPYTHON
    cython_runtime_dict = _PyObject_GetDictPtr(__pyx_cython_runtime);
    if (likely(cython_runtime_dict)) {
        __PYX_PY_DICT_LOOKUP_IF_MODIFIED(
            use_cline, *cython_runtime_dict,
            __Pyx_PyDict_GetItemStr(*cython_runtime_dict, __pyx_n_s_cline_in_traceback))
    } else
#endif
    {
      PyObject *use_cline_obj = __Pyx_PyObject_GetAttrStrNoError(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback);
      if (use_cline_obj) {
        use_cline = PyObject_Not(use_cline_obj) ? Py_False : Py_True;
        Py_DECREF(use_cline_obj);
      } else {
        PyErr_Clear();
        use_cline = NULL;
      }
    }
    if (!use_cline) {
        c_line = 0;
        (void) PyObject_SetAttr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback, Py_False);
    }
    else if (use_cline == Py_False || (use_cline != Py_True && PyObject_Not(use_cline) != 0)) {
        c_line = 0;
    }
    __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback);
    return c_line;
}
#endif

/* CodeObjectCache */
#if !CYTHON_COMPILING_IN_LIMITED_API
static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) {
    int start = 0, mid = 0, end = count - 1;
    if (end >= 0 && code_line > entries[end].code_line) {
        return count;
    }
    while (start < end) {
        mid = start + (end - start) / 2;
        if (code_line < entries[mid].code_line) {
            end = mid;
        } else if (code_line > entries[mid].code_line) {
             start = mid + 1;
        } else {
            return mid;
        }
    }
    if (code_line <= entries[mid].code_line) {
        return mid;
    } else {
        return mid + 1;
    }
}
static PyCodeObject *__pyx_find_code_object(int code_line) {
    PyCodeObject* code_object;
    int pos;
    if (unlikely(!code_line) || unlikely(!__pyx_code_cache.entries)) {
        return NULL;
    }
    pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
    if (unlikely(pos >= __pyx_code_cache.count) || unlikely(__pyx_code_cache.entries[pos].code_line != code_line)) {
        return NULL;
    }
    code_object = __pyx_code_cache.entries[pos].code_object;
    Py_INCREF(code_object);
    return code_object;
}
static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) {
    int pos, i;
    __Pyx_CodeObjectCacheEntry* entries = __pyx_code_cache.entries;
    if (unlikely(!code_line)) {
        return;
    }
    if (unlikely(!entries)) {
        entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry));
        if (likely(entries)) {
            __pyx_code_cache.entries = entries;
            __pyx_code_cache.max_count = 64;
            __pyx_code_cache.count = 1;
            entries[0].code_line = code_line;
            entries[0].code_object = code_object;
            Py_INCREF(code_object);
        }
        return;
    }
    pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
    if ((pos < __pyx_code_cache.count) && unlikely(__pyx_code_cache.entries[pos].code_line == code_line)) {
        PyCodeObject* tmp = entries[pos].code_object;
        entries[pos].code_object = code_object;
        Py_DECREF(tmp);
        return;
    }
    if (__pyx_code_cache.count == __pyx_code_cache.max_count) {
        int new_max = __pyx_code_cache.max_count + 64;
        entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc(
            __pyx_code_cache.entries, ((size_t)new_max) * sizeof(__Pyx_CodeObjectCacheEntry));
        if (unlikely(!entries)) {
            return;
        }
        __pyx_code_cache.entries = entries;
        __pyx_code_cache.max_count = new_max;
    }
    for (i=__pyx_code_cache.count; i>pos; i--) {
        entries[i] = entries[i-1];
    }
    entries[pos].code_line = code_line;
    entries[pos].code_object = code_object;
    __pyx_code_cache.count++;
    Py_INCREF(code_object);
}
#endif

/* AddTraceback */
#include "compile.h"
#include "frameobject.h"
#include "traceback.h"
#if PY_VERSION_HEX >= 0x030b00a6 && !CYTHON_COMPILING_IN_LIMITED_API
  #ifndef Py_BUILD_CORE
    #define Py_BUILD_CORE 1
  #endif
  #include "internal/pycore_frame.h"
#endif
#if CYTHON_COMPILING_IN_LIMITED_API
static PyObject *__Pyx_PyCode_Replace_For_AddTraceback(PyObject *code, PyObject *scratch_dict,
                                                       PyObject *firstlineno, PyObject *name) {
    PyObject *replace = NULL;
    if (unlikely(PyDict_SetItemString(scratch_dict, "co_firstlineno", firstlineno))) return NULL;
    if (unlikely(PyDict_SetItemString(scratch_dict, "co_name", name))) return NULL;
    replace = PyObject_GetAttrString(code, "replace");
    if (likely(replace)) {
        PyObject *result;
        result = PyObject_Call(replace, __pyx_empty_tuple, scratch_dict);
        Py_DECREF(replace);
        return result;
    }
    PyErr_Clear();
    #if __PYX_LIMITED_VERSION_HEX < 0x030780000
    {
        PyObject *compiled = NULL, *result = NULL;
        if (unlikely(PyDict_SetItemString(scratch_dict, "code", code))) return NULL;
        if (unlikely(PyDict_SetItemString(scratch_dict, "type", (PyObject*)(&PyType_Type)))) return NULL;
        compiled = Py_CompileString(
            "out = type(code)(\n"
            "  code.co_argcount, code.co_kwonlyargcount, code.co_nlocals, code.co_stacksize,\n"
            "  code.co_flags, code.co_code, code.co_consts, code.co_names,\n"
            "  code.co_varnames, code.co_filename, co_name, co_firstlineno,\n"
            "  code.co_lnotab)\n", "<dummy>", Py_file_input);
        if (!compiled) return NULL;
        result = PyEval_EvalCode(compiled, scratch_dict, scratch_dict);
        Py_DECREF(compiled);
        if (!result) PyErr_Print();
        Py_DECREF(result);
        result = PyDict_GetItemString(scratch_dict, "out");
        if (result) Py_INCREF(result);
        return result;
    }
    #else
    return NULL;
    #endif
}
static void __Pyx_AddTraceback(const char *funcname, int c_line,
                               int py_line, const char *filename) {
    PyObject *code_object = NULL, *py_py_line = NULL, *py_funcname = NULL, *dict = NULL;
    PyObject *replace = NULL, *getframe = NULL, *frame = NULL;
    PyObject *exc_type, *exc_value, *exc_traceback;
    int success = 0;
    if (c_line) {
        (void) __pyx_cfilenm;
        (void) __Pyx_CLineForTraceback(__Pyx_PyThreadState_Current, c_line);
    }
    PyErr_Fetch(&exc_type, &exc_value, &exc_traceback);
    code_object = Py_CompileString("_getframe()", filename, Py_eval_input);
    if (unlikely(!code_object)) goto bad;
    py_py_line = PyLong_FromLong(py_line);
    if (unlikely(!py_py_line)) goto bad;
    py_funcname = PyUnicode_FromString(funcname);
    if (unlikely(!py_funcname)) goto bad;
    dict = PyDict_New();
    if (unlikely(!dict)) goto bad;
    {
        PyObject *old_code_object = code_object;
        code_object = __Pyx_PyCode_Replace_For_AddTraceback(code_object, dict, py_py_line, py_funcname);
        Py_DECREF(old_code_object);
    }
    if (unlikely(!code_object)) goto bad;
    getframe = PySys_GetObject("_getframe");
    if (unlikely(!getframe)) goto bad;
    if (unlikely(PyDict_SetItemString(dict, "_getframe", getframe))) goto bad;
    frame = PyEval_EvalCode(code_object, dict, dict);
    if (unlikely(!frame) || frame == Py_None) goto bad;
    success = 1;
  bad:
    PyErr_Restore(exc_type, exc_value, exc_traceback);
    Py_XDECREF(code_object);
    Py_XDECREF(py_py_line);
    Py_XDECREF(py_funcname);
    Py_XDECREF(dict);
    Py_XDECREF(replace);
    if (success) {
        PyTraceBack_Here(
            (struct _frame*)frame);
    }
    Py_XDECREF(frame);
}
#else
static PyCodeObject* __Pyx_CreateCodeObjectForTraceback(
            const char *funcname, int c_line,
            int py_line, const char *filename) {
    PyCodeObject *py_code = NULL;
    PyObject *py_funcname = NULL;
    #if PY_MAJOR_VERSION < 3
    PyObject *py_srcfile = NULL;
    py_srcfile = PyString_FromString(filename);
    if (!py_srcfile) goto bad;
    #endif
    if (c_line) {
        #if PY_MAJOR_VERSION < 3
        py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
        if (!py_funcname) goto bad;
        #else
        py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
        if (!py_funcname) goto bad;
        funcname = PyUnicode_AsUTF8(py_funcname);
        if (!funcname) goto bad;
        #endif
    }
    else {
        #if PY_MAJOR_VERSION < 3
        py_funcname = PyString_FromString(funcname);
        if (!py_funcname) goto bad;
        #endif
    }
    #if PY_MAJOR_VERSION < 3
    py_code = __Pyx_PyCode_New(
        0,
        0,
        0,
        0,
        0,
        0,
        __pyx_empty_bytes, /*PyObject *code,*/
        __pyx_empty_tuple, /*PyObject *consts,*/
        __pyx_empty_tuple, /*PyObject *names,*/
        __pyx_empty_tuple, /*PyObject *varnames,*/
        __pyx_empty_tuple, /*PyObject *freevars,*/
        __pyx_empty_tuple, /*PyObject *cellvars,*/
        py_srcfile,   /*PyObject *filename,*/
        py_funcname,  /*PyObject *name,*/
        py_line,
        __pyx_empty_bytes  /*PyObject *lnotab*/
    );
    Py_DECREF(py_srcfile);
    #else
    py_code = PyCode_NewEmpty(filename, funcname, py_line);
    #endif
    Py_XDECREF(py_funcname);
    return py_code;
bad:
    Py_XDECREF(py_funcname);
    #if PY_MAJOR_VERSION < 3
    Py_XDECREF(py_srcfile);
    #endif
    return NULL;
}
static void __Pyx_AddTraceback(const char *funcname, int c_line,
                               int py_line, const char *filename) {
    PyCodeObject *py_code = 0;
    PyFrameObject *py_frame = 0;
    PyThreadState *tstate = __Pyx_PyThreadState_Current;
    PyObject *ptype, *pvalue, *ptraceback;
    if (c_line) {
        c_line = __Pyx_CLineForTraceback(tstate, c_line);
    }
    py_code = __pyx_find_code_object(c_line ? -c_line : py_line);
    if (!py_code) {
        __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback);
        py_code = __Pyx_CreateCodeObjectForTraceback(
            funcname, c_line, py_line, filename);
        if (!py_code) {
            /* If the code object creation fails, then we should clear the
               fetched exception references and propagate the new exception */
            Py_XDECREF(ptype);
            Py_XDECREF(pvalue);
            Py_XDECREF(ptraceback);
            goto bad;
        }
        __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback);
        __pyx_insert_code_object(c_line ? -c_line : py_line, py_code);
    }
    py_frame = PyFrame_New(
        tstate,            /*PyThreadState *tstate,*/
        py_code,           /*PyCodeObject *code,*/
        __pyx_d,    /*PyObject *globals,*/
        0                  /*PyObject *locals*/
    );
    if (!py_frame) goto bad;
    __Pyx_PyFrame_SetLineNumber(py_frame, py_line);
    PyTraceBack_Here(py_frame);
bad:
    Py_XDECREF(py_code);
    Py_XDECREF(py_frame);
}
#endif

/* CIntFromPyVerify */
#define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\
    __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0)
#define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\
    __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1)
#define __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, exc)\
    {\
        func_type value = func_value;\
        if (sizeof(target_type) < sizeof(func_type)) {\
            if (unlikely(value != (func_type) (target_type) value)) {\
                func_type zero = 0;\
                if (exc && unlikely(value == (func_type)-1 && PyErr_Occurred()))\
                    return (target_type) -1;\
                if (is_unsigned && unlikely(value < zero))\
                    goto raise_neg_overflow;\
                else\
                    goto raise_overflow;\
            }\
        }\
        return (target_type) value;\
    }

/* CIntFromPy */
static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const int neg_one = (int) -1, const_zero = (int) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if ((sizeof(int) < sizeof(long))) {
            __PYX_VERIFY_RETURN_INT(int, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (int) val;
        }
    }
#endif
    if (unlikely(!PyLong_Check(x))) {
        int val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (int) -1;
        val = __Pyx_PyInt_As_int(tmp);
        Py_DECREF(tmp);
        return val;
    }
    if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
        if (unlikely(__Pyx_PyLong_IsNeg(x))) {
            goto raise_neg_overflow;
        } else if (__Pyx_PyLong_IsCompact(x)) {
            __PYX_VERIFY_RETURN_INT(int, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x))
        } else {
            const digit* digits = __Pyx_PyLong_Digits(x);
            assert(__Pyx_PyLong_DigitCount(x) > 1);
            switch (__Pyx_PyLong_DigitCount(x)) {
                case 2:
                    if ((8 * sizeof(int) > 1 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(int) >= 2 * PyLong_SHIFT)) {
                            return (int) (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if ((8 * sizeof(int) > 2 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(int) >= 3 * PyLong_SHIFT)) {
                            return (int) (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if ((8 * sizeof(int) > 3 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(int) >= 4 * PyLong_SHIFT)) {
                            return (int) (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
                        }
                    }
                    break;
            }
        }
#endif
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7
        if (unlikely(Py_SIZE(x) < 0)) {
            goto raise_neg_overflow;
        }
#else
        {
            int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
            if (unlikely(result < 0))
                return (int) -1;
            if (unlikely(result == 1))
                goto raise_neg_overflow;
        }
#endif
        if ((sizeof(int) <= sizeof(unsigned long))) {
            __PYX_VERIFY_RETURN_INT_EXC(int, unsigned long, PyLong_AsUnsignedLong(x))
#ifdef HAVE_LONG_LONG
        } else if ((sizeof(int) <= sizeof(unsigned PY_LONG_LONG))) {
            __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
#endif
        }
    } else {
#if CYTHON_USE_PYLONG_INTERNALS
        if (__Pyx_PyLong_IsCompact(x)) {
            __PYX_VERIFY_RETURN_INT(int, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x))
        } else {
            const digit* digits = __Pyx_PyLong_Digits(x);
            assert(__Pyx_PyLong_DigitCount(x) > 1);
            switch (__Pyx_PyLong_SignedDigitCount(x)) {
                case -2:
                    if ((8 * sizeof(int) - 1 > 1 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) {
                            return (int) (((int)-1)*(((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if ((8 * sizeof(int) > 1 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) {
                            return (int) ((((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) {
                            return (int) (((int)-1)*(((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if ((8 * sizeof(int) > 2 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) {
                            return (int) ((((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(int) - 1 > 4 * PyLong_SHIFT)) {
                            return (int) (((int)-1)*(((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if ((8 * sizeof(int) > 3 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(int) - 1 > 4 * PyLong_SHIFT)) {
                            return (int) ((((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
            }
        }
#endif
        if ((sizeof(int) <= sizeof(long))) {
            __PYX_VERIFY_RETURN_INT_EXC(int, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
        } else if ((sizeof(int) <= sizeof(PY_LONG_LONG))) {
            __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x))
#endif
        }
    }
    {
        int val;
        int ret = -1;
#if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API
        Py_ssize_t bytes_copied = PyLong_AsNativeBytes(
            x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0));
        if (unlikely(bytes_copied == -1)) {
        } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) {
            goto raise_overflow;
        } else {
            ret = 0;
        }
#elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray)
        int one = 1; int is_little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&val;
        ret = _PyLong_AsByteArray((PyLongObject *)x,
                                    bytes, sizeof(val),
                                    is_little, !is_unsigned);
#else
        PyObject *v;
        PyObject *stepval = NULL, *mask = NULL, *shift = NULL;
        int bits, remaining_bits, is_negative = 0;
        int chunk_size = (sizeof(long) < 8) ? 30 : 62;
        if (likely(PyLong_CheckExact(x))) {
            v = __Pyx_NewRef(x);
        } else {
            v = PyNumber_Long(x);
            if (unlikely(!v)) return (int) -1;
            assert(PyLong_CheckExact(v));
        }
        {
            int result = PyObject_RichCompareBool(v, Py_False, Py_LT);
            if (unlikely(result < 0)) {
                Py_DECREF(v);
                return (int) -1;
            }
            is_negative = result == 1;
        }
        if (is_unsigned && unlikely(is_negative)) {
            Py_DECREF(v);
            goto raise_neg_overflow;
        } else if (is_negative) {
            stepval = PyNumber_Invert(v);
            Py_DECREF(v);
            if (unlikely(!stepval))
                return (int) -1;
        } else {
            stepval = v;
        }
        v = NULL;
        val = (int) 0;
        mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done;
        shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done;
        for (bits = 0; bits < (int) sizeof(int) * 8 - chunk_size; bits += chunk_size) {
            PyObject *tmp, *digit;
            long idigit;
            digit = PyNumber_And(stepval, mask);
            if (unlikely(!digit)) goto done;
            idigit = PyLong_AsLong(digit);
            Py_DECREF(digit);
            if (unlikely(idigit < 0)) goto done;
            val |= ((int) idigit) << bits;
            tmp = PyNumber_Rshift(stepval, shift);
            if (unlikely(!tmp)) goto done;
            Py_DECREF(stepval); stepval = tmp;
        }
        Py_DECREF(shift); shift = NULL;
        Py_DECREF(mask); mask = NULL;
        {
            long idigit = PyLong_AsLong(stepval);
            if (unlikely(idigit < 0)) goto done;
            remaining_bits = ((int) sizeof(int) * 8) - bits - (is_unsigned ? 0 : 1);
            if (unlikely(idigit >= (1L << remaining_bits)))
                goto raise_overflow;
            val |= ((int) idigit) << bits;
        }
        if (!is_unsigned) {
            if (unlikely(val & (((int) 1) << (sizeof(int) * 8 - 1))))
                goto raise_overflow;
            if (is_negative)
                val = ~val;
        }
        ret = 0;
    done:
        Py_XDECREF(shift);
        Py_XDECREF(mask);
        Py_XDECREF(stepval);
#endif
        if (unlikely(ret))
            return (int) -1;
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to int");
    return (int) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to int");
    return (int) -1;
}

/* CIntFromPy */
static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const long neg_one = (long) -1, const_zero = (long) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if ((sizeof(long) < sizeof(long))) {
            __PYX_VERIFY_RETURN_INT(long, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (long) val;
        }
    }
#endif
    if (unlikely(!PyLong_Check(x))) {
        long val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (long) -1;
        val = __Pyx_PyInt_As_long(tmp);
        Py_DECREF(tmp);
        return val;
    }
    if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
        if (unlikely(__Pyx_PyLong_IsNeg(x))) {
            goto raise_neg_overflow;
        } else if (__Pyx_PyLong_IsCompact(x)) {
            __PYX_VERIFY_RETURN_INT(long, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x))
        } else {
            const digit* digits = __Pyx_PyLong_Digits(x);
            assert(__Pyx_PyLong_DigitCount(x) > 1);
            switch (__Pyx_PyLong_DigitCount(x)) {
                case 2:
                    if ((8 * sizeof(long) > 1 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(long) >= 2 * PyLong_SHIFT)) {
                            return (long) (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if ((8 * sizeof(long) > 2 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(long) >= 3 * PyLong_SHIFT)) {
                            return (long) (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if ((8 * sizeof(long) > 3 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(long) >= 4 * PyLong_SHIFT)) {
                            return (long) (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
                        }
                    }
                    break;
            }
        }
#endif
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7
        if (unlikely(Py_SIZE(x) < 0)) {
            goto raise_neg_overflow;
        }
#else
        {
            int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
            if (unlikely(result < 0))
                return (long) -1;
            if (unlikely(result == 1))
                goto raise_neg_overflow;
        }
#endif
        if ((sizeof(long) <= sizeof(unsigned long))) {
            __PYX_VERIFY_RETURN_INT_EXC(long, unsigned long, PyLong_AsUnsignedLong(x))
#ifdef HAVE_LONG_LONG
        } else if ((sizeof(long) <= sizeof(unsigned PY_LONG_LONG))) {
            __PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
#endif
        }
    } else {
#if CYTHON_USE_PYLONG_INTERNALS
        if (__Pyx_PyLong_IsCompact(x)) {
            __PYX_VERIFY_RETURN_INT(long, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x))
        } else {
            const digit* digits = __Pyx_PyLong_Digits(x);
            assert(__Pyx_PyLong_DigitCount(x) > 1);
            switch (__Pyx_PyLong_SignedDigitCount(x)) {
                case -2:
                    if ((8 * sizeof(long) - 1 > 1 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) {
                            return (long) (((long)-1)*(((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if ((8 * sizeof(long) > 1 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) {
                            return (long) ((((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) {
                            return (long) (((long)-1)*(((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if ((8 * sizeof(long) > 2 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) {
                            return (long) ((((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(long) - 1 > 4 * PyLong_SHIFT)) {
                            return (long) (((long)-1)*(((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if ((8 * sizeof(long) > 3 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(long) - 1 > 4 * PyLong_SHIFT)) {
                            return (long) ((((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
            }
        }
#endif
        if ((sizeof(long) <= sizeof(long))) {
            __PYX_VERIFY_RETURN_INT_EXC(long, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
        } else if ((sizeof(long) <= sizeof(PY_LONG_LONG))) {
            __PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x))
#endif
        }
    }
    {
        long val;
        int ret = -1;
#if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API
        Py_ssize_t bytes_copied = PyLong_AsNativeBytes(
            x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0));
        if (unlikely(bytes_copied == -1)) {
        } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) {
            goto raise_overflow;
        } else {
            ret = 0;
        }
#elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray)
        int one = 1; int is_little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&val;
        ret = _PyLong_AsByteArray((PyLongObject *)x,
                                    bytes, sizeof(val),
                                    is_little, !is_unsigned);
#else
        PyObject *v;
        PyObject *stepval = NULL, *mask = NULL, *shift = NULL;
        int bits, remaining_bits, is_negative = 0;
        int chunk_size = (sizeof(long) < 8) ? 30 : 62;
        if (likely(PyLong_CheckExact(x))) {
            v = __Pyx_NewRef(x);
        } else {
            v = PyNumber_Long(x);
            if (unlikely(!v)) return (long) -1;
            assert(PyLong_CheckExact(v));
        }
        {
            int result = PyObject_RichCompareBool(v, Py_False, Py_LT);
            if (unlikely(result < 0)) {
                Py_DECREF(v);
                return (long) -1;
            }
            is_negative = result == 1;
        }
        if (is_unsigned && unlikely(is_negative)) {
            Py_DECREF(v);
            goto raise_neg_overflow;
        } else if (is_negative) {
            stepval = PyNumber_Invert(v);
            Py_DECREF(v);
            if (unlikely(!stepval))
                return (long) -1;
        } else {
            stepval = v;
        }
        v = NULL;
        val = (long) 0;
        mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done;
        shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done;
        for (bits = 0; bits < (int) sizeof(long) * 8 - chunk_size; bits += chunk_size) {
            PyObject *tmp, *digit;
            long idigit;
            digit = PyNumber_And(stepval, mask);
            if (unlikely(!digit)) goto done;
            idigit = PyLong_AsLong(digit);
            Py_DECREF(digit);
            if (unlikely(idigit < 0)) goto done;
            val |= ((long) idigit) << bits;
            tmp = PyNumber_Rshift(stepval, shift);
            if (unlikely(!tmp)) goto done;
            Py_DECREF(stepval); stepval = tmp;
        }
        Py_DECREF(shift); shift = NULL;
        Py_DECREF(mask); mask = NULL;
        {
            long idigit = PyLong_AsLong(stepval);
            if (unlikely(idigit < 0)) goto done;
            remaining_bits = ((int) sizeof(long) * 8) - bits - (is_unsigned ? 0 : 1);
            if (unlikely(idigit >= (1L << remaining_bits)))
                goto raise_overflow;
            val |= ((long) idigit) << bits;
        }
        if (!is_unsigned) {
            if (unlikely(val & (((long) 1) << (sizeof(long) * 8 - 1))))
                goto raise_overflow;
            if (is_negative)
                val = ~val;
        }
        ret = 0;
    done:
        Py_XDECREF(shift);
        Py_XDECREF(mask);
        Py_XDECREF(stepval);
#endif
        if (unlikely(ret))
            return (long) -1;
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to long");
    return (long) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to long");
    return (long) -1;
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const long neg_one = (long) -1, const_zero = (long) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(long) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(long) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(long) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
#endif
        }
    }
    {
        unsigned char *bytes = (unsigned char *)&value;
#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4
        if (is_unsigned) {
            return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1);
        } else {
            return PyLong_FromNativeBytes(bytes, sizeof(value), -1);
        }
#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
        int one = 1; int little = (int)*(unsigned char *)&one;
        return _PyLong_FromByteArray(bytes, sizeof(long),
                                     little, !is_unsigned);
#else
        int one = 1; int little = (int)*(unsigned char *)&one;
        PyObject *from_bytes, *result = NULL;
        PyObject *py_bytes = NULL, *arg_tuple = NULL, *kwds = NULL, *order_str = NULL;
        from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes");
        if (!from_bytes) return NULL;
        py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(long));
        if (!py_bytes) goto limited_bad;
        order_str = PyUnicode_FromString(little ? "little" : "big");
        if (!order_str) goto limited_bad;
        arg_tuple = PyTuple_Pack(2, py_bytes, order_str);
        if (!arg_tuple) goto limited_bad;
        if (!is_unsigned) {
            kwds = PyDict_New();
            if (!kwds) goto limited_bad;
            if (PyDict_SetItemString(kwds, "signed", __Pyx_NewRef(Py_True))) goto limited_bad;
        }
        result = PyObject_Call(from_bytes, arg_tuple, kwds);
        limited_bad:
        Py_XDECREF(kwds);
        Py_XDECREF(arg_tuple);
        Py_XDECREF(order_str);
        Py_XDECREF(py_bytes);
        Py_XDECREF(from_bytes);
        return result;
#endif
    }
}

/* CIntFromPy */
static CYTHON_INLINE bool __Pyx_PyInt_As_bool(PyObject *x) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const bool neg_one = (bool) -1, const_zero = (bool) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if ((sizeof(bool) < sizeof(long))) {
            __PYX_VERIFY_RETURN_INT(bool, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (bool) val;
        }
    }
#endif
    if (unlikely(!PyLong_Check(x))) {
        bool val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (bool) -1;
        val = __Pyx_PyInt_As_bool(tmp);
        Py_DECREF(tmp);
        return val;
    }
    if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
        if (unlikely(__Pyx_PyLong_IsNeg(x))) {
            goto raise_neg_overflow;
        } else if (__Pyx_PyLong_IsCompact(x)) {
            __PYX_VERIFY_RETURN_INT(bool, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x))
        } else {
            const digit* digits = __Pyx_PyLong_Digits(x);
            assert(__Pyx_PyLong_DigitCount(x) > 1);
            switch (__Pyx_PyLong_DigitCount(x)) {
                case 2:
                    if ((8 * sizeof(bool) > 1 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(bool, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(bool) >= 2 * PyLong_SHIFT)) {
                            return (bool) (((((bool)digits[1]) << PyLong_SHIFT) | (bool)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if ((8 * sizeof(bool) > 2 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(bool, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(bool) >= 3 * PyLong_SHIFT)) {
                            return (bool) (((((((bool)digits[2]) << PyLong_SHIFT) | (bool)digits[1]) << PyLong_SHIFT) | (bool)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if ((8 * sizeof(bool) > 3 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(bool, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(bool) >= 4 * PyLong_SHIFT)) {
                            return (bool) (((((((((bool)digits[3]) << PyLong_SHIFT) | (bool)digits[2]) << PyLong_SHIFT) | (bool)digits[1]) << PyLong_SHIFT) | (bool)digits[0]));
                        }
                    }
                    break;
            }
        }
#endif
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7
        if (unlikely(Py_SIZE(x) < 0)) {
            goto raise_neg_overflow;
        }
#else
        {
            int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
            if (unlikely(result < 0))
                return (bool) -1;
            if (unlikely(result == 1))
                goto raise_neg_overflow;
        }
#endif
        if ((sizeof(bool) <= sizeof(unsigned long))) {
            __PYX_VERIFY_RETURN_INT_EXC(bool, unsigned long, PyLong_AsUnsignedLong(x))
#ifdef HAVE_LONG_LONG
        } else if ((sizeof(bool) <= sizeof(unsigned PY_LONG_LONG))) {
            __PYX_VERIFY_RETURN_INT_EXC(bool, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
#endif
        }
    } else {
#if CYTHON_USE_PYLONG_INTERNALS
        if (__Pyx_PyLong_IsCompact(x)) {
            __PYX_VERIFY_RETURN_INT(bool, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x))
        } else {
            const digit* digits = __Pyx_PyLong_Digits(x);
            assert(__Pyx_PyLong_DigitCount(x) > 1);
            switch (__Pyx_PyLong_SignedDigitCount(x)) {
                case -2:
                    if ((8 * sizeof(bool) - 1 > 1 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(bool, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(bool) - 1 > 2 * PyLong_SHIFT)) {
                            return (bool) (((bool)-1)*(((((bool)digits[1]) << PyLong_SHIFT) | (bool)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if ((8 * sizeof(bool) > 1 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(bool, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(bool) - 1 > 2 * PyLong_SHIFT)) {
                            return (bool) ((((((bool)digits[1]) << PyLong_SHIFT) | (bool)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if ((8 * sizeof(bool) - 1 > 2 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(bool, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(bool) - 1 > 3 * PyLong_SHIFT)) {
                            return (bool) (((bool)-1)*(((((((bool)digits[2]) << PyLong_SHIFT) | (bool)digits[1]) << PyLong_SHIFT) | (bool)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if ((8 * sizeof(bool) > 2 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(bool, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(bool) - 1 > 3 * PyLong_SHIFT)) {
                            return (bool) ((((((((bool)digits[2]) << PyLong_SHIFT) | (bool)digits[1]) << PyLong_SHIFT) | (bool)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if ((8 * sizeof(bool) - 1 > 3 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(bool, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(bool) - 1 > 4 * PyLong_SHIFT)) {
                            return (bool) (((bool)-1)*(((((((((bool)digits[3]) << PyLong_SHIFT) | (bool)digits[2]) << PyLong_SHIFT) | (bool)digits[1]) << PyLong_SHIFT) | (bool)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if ((8 * sizeof(bool) > 3 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(bool, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(bool) - 1 > 4 * PyLong_SHIFT)) {
                            return (bool) ((((((((((bool)digits[3]) << PyLong_SHIFT) | (bool)digits[2]) << PyLong_SHIFT) | (bool)digits[1]) << PyLong_SHIFT) | (bool)digits[0])));
                        }
                    }
                    break;
            }
        }
#endif
        if ((sizeof(bool) <= sizeof(long))) {
            __PYX_VERIFY_RETURN_INT_EXC(bool, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
        } else if ((sizeof(bool) <= sizeof(PY_LONG_LONG))) {
            __PYX_VERIFY_RETURN_INT_EXC(bool, PY_LONG_LONG, PyLong_AsLongLong(x))
#endif
        }
    }
    {
        bool val;
        int ret = -1;
#if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API
        Py_ssize_t bytes_copied = PyLong_AsNativeBytes(
            x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0));
        if (unlikely(bytes_copied == -1)) {
        } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) {
            goto raise_overflow;
        } else {
            ret = 0;
        }
#elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray)
        int one = 1; int is_little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&val;
        ret = _PyLong_AsByteArray((PyLongObject *)x,
                                    bytes, sizeof(val),
                                    is_little, !is_unsigned);
#else
        PyObject *v;
        PyObject *stepval = NULL, *mask = NULL, *shift = NULL;
        int bits, remaining_bits, is_negative = 0;
        int chunk_size = (sizeof(long) < 8) ? 30 : 62;
        if (likely(PyLong_CheckExact(x))) {
            v = __Pyx_NewRef(x);
        } else {
            v = PyNumber_Long(x);
            if (unlikely(!v)) return (bool) -1;
            assert(PyLong_CheckExact(v));
        }
        {
            int result = PyObject_RichCompareBool(v, Py_False, Py_LT);
            if (unlikely(result < 0)) {
                Py_DECREF(v);
                return (bool) -1;
            }
            is_negative = result == 1;
        }
        if (is_unsigned && unlikely(is_negative)) {
            Py_DECREF(v);
            goto raise_neg_overflow;
        } else if (is_negative) {
            stepval = PyNumber_Invert(v);
            Py_DECREF(v);
            if (unlikely(!stepval))
                return (bool) -1;
        } else {
            stepval = v;
        }
        v = NULL;
        val = (bool) 0;
        mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done;
        shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done;
        for (bits = 0; bits < (int) sizeof(bool) * 8 - chunk_size; bits += chunk_size) {
            PyObject *tmp, *digit;
            long idigit;
            digit = PyNumber_And(stepval, mask);
            if (unlikely(!digit)) goto done;
            idigit = PyLong_AsLong(digit);
            Py_DECREF(digit);
            if (unlikely(idigit < 0)) goto done;
            val |= ((bool) idigit) << bits;
            tmp = PyNumber_Rshift(stepval, shift);
            if (unlikely(!tmp)) goto done;
            Py_DECREF(stepval); stepval = tmp;
        }
        Py_DECREF(shift); shift = NULL;
        Py_DECREF(mask); mask = NULL;
        {
            long idigit = PyLong_AsLong(stepval);
            if (unlikely(idigit < 0)) goto done;
            remaining_bits = ((int) sizeof(bool) * 8) - bits - (is_unsigned ? 0 : 1);
            if (unlikely(idigit >= (1L << remaining_bits)))
                goto raise_overflow;
            val |= ((bool) idigit) << bits;
        }
        if (!is_unsigned) {
            if (unlikely(val & (((bool) 1) << (sizeof(bool) * 8 - 1))))
                goto raise_overflow;
            if (is_negative)
                val = ~val;
        }
        ret = 0;
    done:
        Py_XDECREF(shift);
        Py_XDECREF(mask);
        Py_XDECREF(stepval);
#endif
        if (unlikely(ret))
            return (bool) -1;
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to bool");
    return (bool) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to bool");
    return (bool) -1;
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_ba0_int_p(ba0_int_p value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const ba0_int_p neg_one = (ba0_int_p) -1, const_zero = (ba0_int_p) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(ba0_int_p) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(ba0_int_p) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(ba0_int_p) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(ba0_int_p) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(ba0_int_p) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
#endif
        }
    }
    {
        unsigned char *bytes = (unsigned char *)&value;
#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4
        if (is_unsigned) {
            return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1);
        } else {
            return PyLong_FromNativeBytes(bytes, sizeof(value), -1);
        }
#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
        int one = 1; int little = (int)*(unsigned char *)&one;
        return _PyLong_FromByteArray(bytes, sizeof(ba0_int_p),
                                     little, !is_unsigned);
#else
        int one = 1; int little = (int)*(unsigned char *)&one;
        PyObject *from_bytes, *result = NULL;
        PyObject *py_bytes = NULL, *arg_tuple = NULL, *kwds = NULL, *order_str = NULL;
        from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes");
        if (!from_bytes) return NULL;
        py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(ba0_int_p));
        if (!py_bytes) goto limited_bad;
        order_str = PyUnicode_FromString(little ? "little" : "big");
        if (!order_str) goto limited_bad;
        arg_tuple = PyTuple_Pack(2, py_bytes, order_str);
        if (!arg_tuple) goto limited_bad;
        if (!is_unsigned) {
            kwds = PyDict_New();
            if (!kwds) goto limited_bad;
            if (PyDict_SetItemString(kwds, "signed", __Pyx_NewRef(Py_True))) goto limited_bad;
        }
        result = PyObject_Call(from_bytes, arg_tuple, kwds);
        limited_bad:
        Py_XDECREF(kwds);
        Py_XDECREF(arg_tuple);
        Py_XDECREF(order_str);
        Py_XDECREF(py_bytes);
        Py_XDECREF(from_bytes);
        return result;
#endif
    }
}

/* CIntFromPy */
static CYTHON_INLINE ba0_int_p __Pyx_PyInt_As_ba0_int_p(PyObject *x) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const ba0_int_p neg_one = (ba0_int_p) -1, const_zero = (ba0_int_p) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if ((sizeof(ba0_int_p) < sizeof(long))) {
            __PYX_VERIFY_RETURN_INT(ba0_int_p, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (ba0_int_p) val;
        }
    }
#endif
    if (unlikely(!PyLong_Check(x))) {
        ba0_int_p val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (ba0_int_p) -1;
        val = __Pyx_PyInt_As_ba0_int_p(tmp);
        Py_DECREF(tmp);
        return val;
    }
    if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
        if (unlikely(__Pyx_PyLong_IsNeg(x))) {
            goto raise_neg_overflow;
        } else if (__Pyx_PyLong_IsCompact(x)) {
            __PYX_VERIFY_RETURN_INT(ba0_int_p, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x))
        } else {
            const digit* digits = __Pyx_PyLong_Digits(x);
            assert(__Pyx_PyLong_DigitCount(x) > 1);
            switch (__Pyx_PyLong_DigitCount(x)) {
                case 2:
                    if ((8 * sizeof(ba0_int_p) > 1 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(ba0_int_p, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(ba0_int_p) >= 2 * PyLong_SHIFT)) {
                            return (ba0_int_p) (((((ba0_int_p)digits[1]) << PyLong_SHIFT) | (ba0_int_p)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if ((8 * sizeof(ba0_int_p) > 2 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(ba0_int_p, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(ba0_int_p) >= 3 * PyLong_SHIFT)) {
                            return (ba0_int_p) (((((((ba0_int_p)digits[2]) << PyLong_SHIFT) | (ba0_int_p)digits[1]) << PyLong_SHIFT) | (ba0_int_p)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if ((8 * sizeof(ba0_int_p) > 3 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(ba0_int_p, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(ba0_int_p) >= 4 * PyLong_SHIFT)) {
                            return (ba0_int_p) (((((((((ba0_int_p)digits[3]) << PyLong_SHIFT) | (ba0_int_p)digits[2]) << PyLong_SHIFT) | (ba0_int_p)digits[1]) << PyLong_SHIFT) | (ba0_int_p)digits[0]));
                        }
                    }
                    break;
            }
        }
#endif
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7
        if (unlikely(Py_SIZE(x) < 0)) {
            goto raise_neg_overflow;
        }
#else
        {
            int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
            if (unlikely(result < 0))
                return (ba0_int_p) -1;
            if (unlikely(result == 1))
                goto raise_neg_overflow;
        }
#endif
        if ((sizeof(ba0_int_p) <= sizeof(unsigned long))) {
            __PYX_VERIFY_RETURN_INT_EXC(ba0_int_p, unsigned long, PyLong_AsUnsignedLong(x))
#ifdef HAVE_LONG_LONG
        } else if ((sizeof(ba0_int_p) <= sizeof(unsigned PY_LONG_LONG))) {
            __PYX_VERIFY_RETURN_INT_EXC(ba0_int_p, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
#endif
        }
    } else {
#if CYTHON_USE_PYLONG_INTERNALS
        if (__Pyx_PyLong_IsCompact(x)) {
            __PYX_VERIFY_RETURN_INT(ba0_int_p, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x))
        } else {
            const digit* digits = __Pyx_PyLong_Digits(x);
            assert(__Pyx_PyLong_DigitCount(x) > 1);
            switch (__Pyx_PyLong_SignedDigitCount(x)) {
                case -2:
                    if ((8 * sizeof(ba0_int_p) - 1 > 1 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(ba0_int_p, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(ba0_int_p) - 1 > 2 * PyLong_SHIFT)) {
                            return (ba0_int_p) (((ba0_int_p)-1)*(((((ba0_int_p)digits[1]) << PyLong_SHIFT) | (ba0_int_p)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if ((8 * sizeof(ba0_int_p) > 1 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(ba0_int_p, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(ba0_int_p) - 1 > 2 * PyLong_SHIFT)) {
                            return (ba0_int_p) ((((((ba0_int_p)digits[1]) << PyLong_SHIFT) | (ba0_int_p)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if ((8 * sizeof(ba0_int_p) - 1 > 2 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(ba0_int_p, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(ba0_int_p) - 1 > 3 * PyLong_SHIFT)) {
                            return (ba0_int_p) (((ba0_int_p)-1)*(((((((ba0_int_p)digits[2]) << PyLong_SHIFT) | (ba0_int_p)digits[1]) << PyLong_SHIFT) | (ba0_int_p)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if ((8 * sizeof(ba0_int_p) > 2 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(ba0_int_p, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(ba0_int_p) - 1 > 3 * PyLong_SHIFT)) {
                            return (ba0_int_p) ((((((((ba0_int_p)digits[2]) << PyLong_SHIFT) | (ba0_int_p)digits[1]) << PyLong_SHIFT) | (ba0_int_p)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if ((8 * sizeof(ba0_int_p) - 1 > 3 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(ba0_int_p, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(ba0_int_p) - 1 > 4 * PyLong_SHIFT)) {
                            return (ba0_int_p) (((ba0_int_p)-1)*(((((((((ba0_int_p)digits[3]) << PyLong_SHIFT) | (ba0_int_p)digits[2]) << PyLong_SHIFT) | (ba0_int_p)digits[1]) << PyLong_SHIFT) | (ba0_int_p)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if ((8 * sizeof(ba0_int_p) > 3 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(ba0_int_p, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(ba0_int_p) - 1 > 4 * PyLong_SHIFT)) {
                            return (ba0_int_p) ((((((((((ba0_int_p)digits[3]) << PyLong_SHIFT) | (ba0_int_p)digits[2]) << PyLong_SHIFT) | (ba0_int_p)digits[1]) << PyLong_SHIFT) | (ba0_int_p)digits[0])));
                        }
                    }
                    break;
            }
        }
#endif
        if ((sizeof(ba0_int_p) <= sizeof(long))) {
            __PYX_VERIFY_RETURN_INT_EXC(ba0_int_p, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
        } else if ((sizeof(ba0_int_p) <= sizeof(PY_LONG_LONG))) {
            __PYX_VERIFY_RETURN_INT_EXC(ba0_int_p, PY_LONG_LONG, PyLong_AsLongLong(x))
#endif
        }
    }
    {
        ba0_int_p val;
        int ret = -1;
#if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API
        Py_ssize_t bytes_copied = PyLong_AsNativeBytes(
            x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0));
        if (unlikely(bytes_copied == -1)) {
        } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) {
            goto raise_overflow;
        } else {
            ret = 0;
        }
#elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray)
        int one = 1; int is_little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&val;
        ret = _PyLong_AsByteArray((PyLongObject *)x,
                                    bytes, sizeof(val),
                                    is_little, !is_unsigned);
#else
        PyObject *v;
        PyObject *stepval = NULL, *mask = NULL, *shift = NULL;
        int bits, remaining_bits, is_negative = 0;
        int chunk_size = (sizeof(long) < 8) ? 30 : 62;
        if (likely(PyLong_CheckExact(x))) {
            v = __Pyx_NewRef(x);
        } else {
            v = PyNumber_Long(x);
            if (unlikely(!v)) return (ba0_int_p) -1;
            assert(PyLong_CheckExact(v));
        }
        {
            int result = PyObject_RichCompareBool(v, Py_False, Py_LT);
            if (unlikely(result < 0)) {
                Py_DECREF(v);
                return (ba0_int_p) -1;
            }
            is_negative = result == 1;
        }
        if (is_unsigned && unlikely(is_negative)) {
            Py_DECREF(v);
            goto raise_neg_overflow;
        } else if (is_negative) {
            stepval = PyNumber_Invert(v);
            Py_DECREF(v);
            if (unlikely(!stepval))
                return (ba0_int_p) -1;
        } else {
            stepval = v;
        }
        v = NULL;
        val = (ba0_int_p) 0;
        mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done;
        shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done;
        for (bits = 0; bits < (int) sizeof(ba0_int_p) * 8 - chunk_size; bits += chunk_size) {
            PyObject *tmp, *digit;
            long idigit;
            digit = PyNumber_And(stepval, mask);
            if (unlikely(!digit)) goto done;
            idigit = PyLong_AsLong(digit);
            Py_DECREF(digit);
            if (unlikely(idigit < 0)) goto done;
            val |= ((ba0_int_p) idigit) << bits;
            tmp = PyNumber_Rshift(stepval, shift);
            if (unlikely(!tmp)) goto done;
            Py_DECREF(stepval); stepval = tmp;
        }
        Py_DECREF(shift); shift = NULL;
        Py_DECREF(mask); mask = NULL;
        {
            long idigit = PyLong_AsLong(stepval);
            if (unlikely(idigit < 0)) goto done;
            remaining_bits = ((int) sizeof(ba0_int_p) * 8) - bits - (is_unsigned ? 0 : 1);
            if (unlikely(idigit >= (1L << remaining_bits)))
                goto raise_overflow;
            val |= ((ba0_int_p) idigit) << bits;
        }
        if (!is_unsigned) {
            if (unlikely(val & (((ba0_int_p) 1) << (sizeof(ba0_int_p) * 8 - 1))))
                goto raise_overflow;
            if (is_negative)
                val = ~val;
        }
        ret = 0;
    done:
        Py_XDECREF(shift);
        Py_XDECREF(mask);
        Py_XDECREF(stepval);
#endif
        if (unlikely(ret))
            return (ba0_int_p) -1;
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to ba0_int_p");
    return (ba0_int_p) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to ba0_int_p");
    return (ba0_int_p) -1;
}

/* FormatTypeName */
#if CYTHON_COMPILING_IN_LIMITED_API
static __Pyx_TypeName
__Pyx_PyType_GetName(PyTypeObject* tp)
{
    PyObject *name = __Pyx_PyObject_GetAttrStr((PyObject *)tp,
                                               __pyx_n_s_name);
    if (unlikely(name == NULL) || unlikely(!PyUnicode_Check(name))) {
        PyErr_Clear();
        Py_XDECREF(name);
        name = __Pyx_NewRef(__pyx_n_s__202);
    }
    return name;
}
#endif

/* FastTypeChecks */
#if CYTHON_COMPILING_IN_CPYTHON
static int __Pyx_InBases(PyTypeObject *a, PyTypeObject *b) {
    while (a) {
        a = __Pyx_PyType_GetSlot(a, tp_base, PyTypeObject*);
        if (a == b)
            return 1;
    }
    return b == &PyBaseObject_Type;
}
static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b) {
    PyObject *mro;
    if (a == b) return 1;
    mro = a->tp_mro;
    if (likely(mro)) {
        Py_ssize_t i, n;
        n = PyTuple_GET_SIZE(mro);
        for (i = 0; i < n; i++) {
            if (PyTuple_GET_ITEM(mro, i) == (PyObject *)b)
                return 1;
        }
        return 0;
    }
    return __Pyx_InBases(a, b);
}
static CYTHON_INLINE int __Pyx_IsAnySubtype2(PyTypeObject *cls, PyTypeObject *a, PyTypeObject *b) {
    PyObject *mro;
    if (cls == a || cls == b) return 1;
    mro = cls->tp_mro;
    if (likely(mro)) {
        Py_ssize_t i, n;
        n = PyTuple_GET_SIZE(mro);
        for (i = 0; i < n; i++) {
            PyObject *base = PyTuple_GET_ITEM(mro, i);
            if (base == (PyObject *)a || base == (PyObject *)b)
                return 1;
        }
        return 0;
    }
    return __Pyx_InBases(cls, a) || __Pyx_InBases(cls, b);
}
#if PY_MAJOR_VERSION == 2
static int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject* exc_type2) {
    PyObject *exception, *value, *tb;
    int res;
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ErrFetch(&exception, &value, &tb);
    res = exc_type1 ? PyObject_IsSubclass(err, exc_type1) : 0;
    if (unlikely(res == -1)) {
        PyErr_WriteUnraisable(err);
        res = 0;
    }
    if (!res) {
        res = PyObject_IsSubclass(err, exc_type2);
        if (unlikely(res == -1)) {
            PyErr_WriteUnraisable(err);
            res = 0;
        }
    }
    __Pyx_ErrRestore(exception, value, tb);
    return res;
}
#else
static CYTHON_INLINE int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject *exc_type2) {
    if (exc_type1) {
        return __Pyx_IsAnySubtype2((PyTypeObject*)err, (PyTypeObject*)exc_type1, (PyTypeObject*)exc_type2);
    } else {
        return __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type2);
    }
}
#endif
static int __Pyx_PyErr_GivenExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) {
    Py_ssize_t i, n;
    assert(PyExceptionClass_Check(exc_type));
    n = PyTuple_GET_SIZE(tuple);
#if PY_MAJOR_VERSION >= 3
    for (i=0; i<n; i++) {
        if (exc_type == PyTuple_GET_ITEM(tuple, i)) return 1;
    }
#endif
    for (i=0; i<n; i++) {
        PyObject *t = PyTuple_GET_ITEM(tuple, i);
        #if PY_MAJOR_VERSION < 3
        if (likely(exc_type == t)) return 1;
        #endif
        if (likely(PyExceptionClass_Check(t))) {
            if (__Pyx_inner_PyErr_GivenExceptionMatches2(exc_type, NULL, t)) return 1;
        } else {
        }
    }
    return 0;
}
static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject* exc_type) {
    if (likely(err == exc_type)) return 1;
    if (likely(PyExceptionClass_Check(err))) {
        if (likely(PyExceptionClass_Check(exc_type))) {
            return __Pyx_inner_PyErr_GivenExceptionMatches2(err, NULL, exc_type);
        } else if (likely(PyTuple_Check(exc_type))) {
            return __Pyx_PyErr_GivenExceptionMatchesTuple(err, exc_type);
        } else {
        }
    }
    return PyErr_GivenExceptionMatches(err, exc_type);
}
static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *exc_type1, PyObject *exc_type2) {
    assert(PyExceptionClass_Check(exc_type1));
    assert(PyExceptionClass_Check(exc_type2));
    if (likely(err == exc_type1 || err == exc_type2)) return 1;
    if (likely(PyExceptionClass_Check(err))) {
        return __Pyx_inner_PyErr_GivenExceptionMatches2(err, exc_type1, exc_type2);
    }
    return (PyErr_GivenExceptionMatches(err, exc_type1) || PyErr_GivenExceptionMatches(err, exc_type2));
}
#endif

/* CheckBinaryVersion */
static unsigned long __Pyx_get_runtime_version(void) {
#if __PYX_LIMITED_VERSION_HEX >= 0x030B00A4
    return Py_Version & ~0xFFUL;
#else
    const char* rt_version = Py_GetVersion();
    unsigned long version = 0;
    unsigned long factor = 0x01000000UL;
    unsigned int digit = 0;
    int i = 0;
    while (factor) {
        while ('0' <= rt_version[i] && rt_version[i] <= '9') {
            digit = digit * 10 + (unsigned int) (rt_version[i] - '0');
            ++i;
        }
        version += factor * digit;
        if (rt_version[i] != '.')
            break;
        digit = 0;
        factor >>= 8;
        ++i;
    }
    return version;
#endif
}
static int __Pyx_check_binary_version(unsigned long ct_version, unsigned long rt_version, int allow_newer) {
    const unsigned long MAJOR_MINOR = 0xFFFF0000UL;
    if ((rt_version & MAJOR_MINOR) == (ct_version & MAJOR_MINOR))
        return 0;
    if (likely(allow_newer && (rt_version & MAJOR_MINOR) > (ct_version & MAJOR_MINOR)))
        return 1;
    {
        char message[200];
        PyOS_snprintf(message, sizeof(message),
                      "compile time Python version %d.%d "
                      "of module '%.100s' "
                      "%s "
                      "runtime version %d.%d",
                       (int) (ct_version >> 24), (int) ((ct_version >> 16) & 0xFF),
                       __Pyx_MODULE_NAME,
                       (allow_newer) ? "was newer than" : "does not match",
                       (int) (rt_version >> 24), (int) ((rt_version >> 16) & 0xFF)
       );
        return PyErr_WarnEx(NULL, message, 1);
    }
}

/* InitStrings */
#if PY_MAJOR_VERSION >= 3
static int __Pyx_InitString(__Pyx_StringTabEntry t, PyObject **str) {
    if (t.is_unicode | t.is_str) {
        if (t.intern) {
            *str = PyUnicode_InternFromString(t.s);
        } else if (t.encoding) {
            *str = PyUnicode_Decode(t.s, t.n - 1, t.encoding, NULL);
        } else {
            *str = PyUnicode_FromStringAndSize(t.s, t.n - 1);
        }
    } else {
        *str = PyBytes_FromStringAndSize(t.s, t.n - 1);
    }
    if (!*str)
        return -1;
    if (PyObject_Hash(*str) == -1)
        return -1;
    return 0;
}
#endif
static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) {
    while (t->p) {
        #if PY_MAJOR_VERSION >= 3
        __Pyx_InitString(*t, t->p);
        #else
        if (t->is_unicode) {
            *t->p = PyUnicode_DecodeUTF8(t->s, t->n - 1, NULL);
        } else if (t->intern) {
            *t->p = PyString_InternFromString(t->s);
        } else {
            *t->p = PyString_FromStringAndSize(t->s, t->n - 1);
        }
        if (!*t->p)
            return -1;
        if (PyObject_Hash(*t->p) == -1)
            return -1;
        #endif
        ++t;
    }
    return 0;
}

#include <string.h>
static CYTHON_INLINE Py_ssize_t __Pyx_ssize_strlen(const char *s) {
    size_t len = strlen(s);
    if (unlikely(len > (size_t) PY_SSIZE_T_MAX)) {
        PyErr_SetString(PyExc_OverflowError, "byte string is too long");
        return -1;
    }
    return (Py_ssize_t) len;
}
static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char* c_str) {
    Py_ssize_t len = __Pyx_ssize_strlen(c_str);
    if (unlikely(len < 0)) return NULL;
    return __Pyx_PyUnicode_FromStringAndSize(c_str, len);
}
static CYTHON_INLINE PyObject* __Pyx_PyByteArray_FromString(const char* c_str) {
    Py_ssize_t len = __Pyx_ssize_strlen(c_str);
    if (unlikely(len < 0)) return NULL;
    return PyByteArray_FromStringAndSize(c_str, len);
}
static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject* o) {
    Py_ssize_t ignore;
    return __Pyx_PyObject_AsStringAndSize(o, &ignore);
}
#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
#if !CYTHON_PEP393_ENABLED
static const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
    char* defenc_c;
    PyObject* defenc = _PyUnicode_AsDefaultEncodedString(o, NULL);
    if (!defenc) return NULL;
    defenc_c = PyBytes_AS_STRING(defenc);
#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
    {
        char* end = defenc_c + PyBytes_GET_SIZE(defenc);
        char* c;
        for (c = defenc_c; c < end; c++) {
            if ((unsigned char) (*c) >= 128) {
                PyUnicode_AsASCIIString(o);
                return NULL;
            }
        }
    }
#endif
    *length = PyBytes_GET_SIZE(defenc);
    return defenc_c;
}
#else
static CYTHON_INLINE const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
    if (unlikely(__Pyx_PyUnicode_READY(o) == -1)) return NULL;
#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
    if (likely(PyUnicode_IS_ASCII(o))) {
        *length = PyUnicode_GET_LENGTH(o);
        return PyUnicode_AsUTF8(o);
    } else {
        PyUnicode_AsASCIIString(o);
        return NULL;
    }
#else
    return PyUnicode_AsUTF8AndSize(o, length);
#endif
}
#endif
#endif
static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
    if (
#if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
            __Pyx_sys_getdefaultencoding_not_ascii &&
#endif
            PyUnicode_Check(o)) {
        return __Pyx_PyUnicode_AsStringAndSize(o, length);
    } else
#endif
#if (!CYTHON_COMPILING_IN_PYPY && !CYTHON_COMPILING_IN_LIMITED_API) || (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE))
    if (PyByteArray_Check(o)) {
        *length = PyByteArray_GET_SIZE(o);
        return PyByteArray_AS_STRING(o);
    } else
#endif
    {
        char* result;
        int r = PyBytes_AsStringAndSize(o, &result, length);
        if (unlikely(r < 0)) {
            return NULL;
        } else {
            return result;
        }
    }
}
static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) {
   int is_true = x == Py_True;
   if (is_true | (x == Py_False) | (x == Py_None)) return is_true;
   else return PyObject_IsTrue(x);
}
static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject* x) {
    int retval;
    if (unlikely(!x)) return -1;
    retval = __Pyx_PyObject_IsTrue(x);
    Py_DECREF(x);
    return retval;
}
static PyObject* __Pyx_PyNumber_IntOrLongWrongResultType(PyObject* result, const char* type_name) {
    __Pyx_TypeName result_type_name = __Pyx_PyType_GetName(Py_TYPE(result));
#if PY_MAJOR_VERSION >= 3
    if (PyLong_Check(result)) {
        if (PyErr_WarnFormat(PyExc_DeprecationWarning, 1,
                "__int__ returned non-int (type " __Pyx_FMT_TYPENAME ").  "
                "The ability to return an instance of a strict subclass of int is deprecated, "
                "and may be removed in a future version of Python.",
                result_type_name)) {
            __Pyx_DECREF_TypeName(result_type_name);
            Py_DECREF(result);
            return NULL;
        }
        __Pyx_DECREF_TypeName(result_type_name);
        return result;
    }
#endif
    PyErr_Format(PyExc_TypeError,
                 "__%.4s__ returned non-%.4s (type " __Pyx_FMT_TYPENAME ")",
                 type_name, type_name, result_type_name);
    __Pyx_DECREF_TypeName(result_type_name);
    Py_DECREF(result);
    return NULL;
}
static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x) {
#if CYTHON_USE_TYPE_SLOTS
  PyNumberMethods *m;
#endif
  const char *name = NULL;
  PyObject *res = NULL;
#if PY_MAJOR_VERSION < 3
  if (likely(PyInt_Check(x) || PyLong_Check(x)))
#else
  if (likely(PyLong_Check(x)))
#endif
    return __Pyx_NewRef(x);
#if CYTHON_USE_TYPE_SLOTS
  m = Py_TYPE(x)->tp_as_number;
  #if PY_MAJOR_VERSION < 3
  if (m && m->nb_int) {
    name = "int";
    res = m->nb_int(x);
  }
  else if (m && m->nb_long) {
    name = "long";
    res = m->nb_long(x);
  }
  #else
  if (likely(m && m->nb_int)) {
    name = "int";
    res = m->nb_int(x);
  }
  #endif
#else
  if (!PyBytes_CheckExact(x) && !PyUnicode_CheckExact(x)) {
    res = PyNumber_Int(x);
  }
#endif
  if (likely(res)) {
#if PY_MAJOR_VERSION < 3
    if (unlikely(!PyInt_Check(res) && !PyLong_Check(res))) {
#else
    if (unlikely(!PyLong_CheckExact(res))) {
#endif
        return __Pyx_PyNumber_IntOrLongWrongResultType(res, name);
    }
  }
  else if (!PyErr_Occurred()) {
    PyErr_SetString(PyExc_TypeError,
                    "an integer is required");
  }
  return res;
}
static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) {
  Py_ssize_t ival;
  PyObject *x;
#if PY_MAJOR_VERSION < 3
  if (likely(PyInt_CheckExact(b))) {
    if (sizeof(Py_ssize_t) >= sizeof(long))
        return PyInt_AS_LONG(b);
    else
        return PyInt_AsSsize_t(b);
  }
#endif
  if (likely(PyLong_CheckExact(b))) {
    #if CYTHON_USE_PYLONG_INTERNALS
    if (likely(__Pyx_PyLong_IsCompact(b))) {
        return __Pyx_PyLong_CompactValue(b);
    } else {
      const digit* digits = __Pyx_PyLong_Digits(b);
      const Py_ssize_t size = __Pyx_PyLong_SignedDigitCount(b);
      switch (size) {
         case 2:
           if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
             return (Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case -2:
           if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
             return -(Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case 3:
           if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
             return (Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case -3:
           if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
             return -(Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case 4:
           if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
             return (Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case -4:
           if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
             return -(Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
      }
    }
    #endif
    return PyLong_AsSsize_t(b);
  }
  x = PyNumber_Index(b);
  if (!x) return -1;
  ival = PyInt_AsSsize_t(x);
  Py_DECREF(x);
  return ival;
}
static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject* o) {
  if (sizeof(Py_hash_t) == sizeof(Py_ssize_t)) {
    return (Py_hash_t) __Pyx_PyIndex_AsSsize_t(o);
#if PY_MAJOR_VERSION < 3
  } else if (likely(PyInt_CheckExact(o))) {
    return PyInt_AS_LONG(o);
#endif
  } else {
    Py_ssize_t ival;
    PyObject *x;
    x = PyNumber_Index(o);
    if (!x) return -1;
    ival = PyInt_AsLong(x);
    Py_DECREF(x);
    return ival;
  }
}
static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b) {
  return b ? __Pyx_NewRef(Py_True) : __Pyx_NewRef(Py_False);
}
static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) {
    return PyInt_FromSize_t(ival);
}


/* #### Code section: utility_code_pragmas_end ### */
#ifdef _MSC_VER
#pragma warning( pop )
#endif



/* #### Code section: end ### */
#endif /* Py_PYTHON_H */
