Discrete Math with Programming: A Principled Approach
Yanhong A. Liu, Matthew Castelllana

TL;DR
This paper presents a principled approach to teaching discrete mathematics by extending Python with logic and set operations, enabling precise expression and direct execution of mathematical concepts.
Contribution
It introduces a novel language extension for Python that unifies mathematical notation with executable code, especially supporting predicate logic and set comprehension.
Findings
Enhanced understanding of discrete math concepts through programming
Direct execution of mathematical statements improves learning outcomes
The approach facilitates declarative and algorithmic programming integration
Abstract
Discrete mathematics is the foundation of computer science. It focuses on concepts and reasoning methods that are studied using math notations. It has long been argued that discrete math is better taught with programming, which takes concepts and computing methods and turns them into executable programs. What has been lacking is a principled approach that supports all central concepts of discrete math -- especially predicate logic -- and that directly and precisely connects math notations with executable programs. This paper introduces such an approach. It is based on the use of a powerful language that extends the Python programming language with proper logic quantification ("for all" and "exists some"), as well as declarative set comprehension (also known as set builder) and aggregation (e.g., sum and product). Math and logical statements can be expressed precisely at a high level and…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Code & Models
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsLogic, programming, and type systems · Parallel Computing and Optimization Techniques · Formal Methods in Verification
