Welcome to our interactive online textbook for learning Discrete Mathematics with SageMath. View the most recent version of the textbook at https://sagemathoer-ccc.github.io/sage-discrete-math/Discrete-Math-with-SageMath.html
We are developing essential resources for students to use mathematical software effectively. Our goal is to streamline the learning process with SageMath. This approach helps students focus more on mathematics and reduces the friction of learning how to code. Our resources are designed for all math students, regardless of programming experience.
SageMath is a free, open-source mathematics software system based on Python. It integrates well-known open-source packages that include NumPy, SciPy, matplotlib, Sympy, Maxima, GAP, FLINT, R, and many others. SageMath is fulfilling the need for a robust and free alternative to proprietary software like Magma, Maple, Mathematica, and Matlab.
Our first textbook focuses on discrete mathematics. SageMath allows students to explore and visualize complex concepts, boosting their understanding and skills in this essential subject.
We invite you to contribute to our project.
If you encounter any bugs or typos, have suggestions for improvements, or have questions about the project, please submit an issue. Here's how:
To contribute to the codebase or content, you'll need to clone the repository and create a feature branch to work on your changes:
GitHub Codespaces allows you to develop in a cloud-based development environment. To set up a codespace in a development container for this project:
After setting up a codespace or cloning the repository to your local machine, you can start making changes to the project. PreTeXt uses XML to structure the content and SageMath for interactive code cells. You can learn more about PreTeXt here.
You can refer to an overview of features and syntax in the PreTeXt documentation.
The quick reference is also helpful.
After making changes, open a terminal and run the following command to build the HTML for the project.
pretext build
The build
command will inform you of any errors in the project. View the project in your browser with the following command:
pretext view
To generate the pdf version locally (saved under /output/print/main.pdf
)
pretext build print
Note that LaTeX
engine and all font dependencies would need to be installed -instructions varies per OS. Alternatively, .devcontainer.json
is configured with the necessary dependencies to build the pdf version.
If you are happy with your changes, you can commit them to your branch and submit a pull request.
After making your changes in the feature branch, you're ready to submit a pull request for review:
The project maintainers will review your pull request and may request changes or merge it into the main project. Your contributions are appreciated and crucial in making this resource more comprehensive and valuable for math education.