ntqr.algebra
============

.. py:module:: ntqr.algebra

.. autoapi-nested-parse::

   Functions for algebraic manipulation of axiom expressions.

   @author: Andrés Corrada-Emmanuel.



Functions
---------

.. autoapisummary::

   ntqr.algebra.extract_coefficents
   ntqr.algebra.extract_constant


Module Contents
---------------

.. py:function:: extract_coefficents(expr: sympy.UnevaluatedExpr, vars: collections.abc.Sequence[sympy.Symbol]) -> collections.abc.Sequence[int]

   Extract vars coefficients from expr.

   Assumes that 'expr' is a linear equation.

   :param expr: Linear expression.
   :type expr: sympy.UnevaluatedExpr
   :param vars: Variables for which we have their coefficient in expr.
   :type vars: Sequence[sympy.Symbol]

   :returns: The integer coefficients, following the same order as 'vars'.
   :rtype: Sequence[int]


.. py:function:: extract_constant(expr: sympy.UnevaluatedExpr) -> int

   Extracts the constant term in 'expr.'

   Returns the value of the constant term in expr.

   :param expr: An algebraic expression.
   :type expr: sympy.UnevaluatedExpr

   :returns: The integer value of the constant term.
   :rtype: int


