SageMathOER-CCC / sage-discrete-math

An open textbook for Discrete Mathematics with SageMath, as taught at the City Colleges of Chicago
https://sagemathoer-ccc.github.io/sage-discrete-math/
Other
2 stars 2 forks source link

Simplify Bool #121

Closed Samuel-Lubliner closed 2 months ago

Samuel-Lubliner commented 2 months ago

Closes #105

In general I think our book should stick to built in Sage methods. However, when a Sage method is not available, we can leverage Sage’s integration with Python. sympy is a clear choice becuase SageCells already has the sympy package installed!

I made use of <sage auto-evaluate="yes"> so function definitions run on page load.

While I do have an import statment for from sympy.logic.boolalg import to_dnf I removed the Sage from sage.logic.propcalc import formula because it adds clarity to where the methods come from at the expense of a little extra typing. Some mixed opinions on importing sage https://wiki.sagemath.org/import

I also added a little bit of Sage history I discovered while reading the source code and papers because I think it is interesting to understand the through processes behind implementations.