Metadata-Version: 2.1
Name: symcollab-algebra
Version: 0.1.1
Summary: UNKNOWN
Home-page: https://github.com/symcollab/cryptosolve
License: UNKNOWN
Platform: UNKNOWN
Description-Content-Type: text/markdown
Requires-Dist: matplotlib (~=3.1.1)
Requires-Dist: mypy (~=0.740)
Requires-Dist: mypy-extensions (~=0.4.0)
Requires-Dist: networkx (~=2.3)
Requires-Dist: numpy (~=1.17.0)
Requires-Dist: sympy (==1.4)

# Algebra Library

A free algebra library that contains the necessary components to encode an equation.

It also includes a way to print the equation or turn it into a directed acyclic graph (DAG)

## Classes Included

- Constant
- Variable
- Function
- FuncTerm
- Equation

To clean up type annotations, I defined a `Term` to mean any of the above.

A FuncTerm is an instantiation of a function with terms as its arguments.

An equation takes two terms and sets them equal to each other. 

## Directed Acyclic Graph (DAG)

A DAG can be created from a term. What it generates resembles a tree. The "top" will be a function (for a non-trivial term) and each function points to its arguments. The "leaves" would be a constant or a variable.

For example, take the term `f(g(x, a), g(x, a))`

![img](example_graph.png)

The function `f` has two arguments, both of which is `g(x,a)`. Therefore, `f` points to `g`.  Since both the arguments are `g(x,a)`, we just have one node `g` that points to `x` and `a`.

