Posts

2024-02-11: Symbolic algebra and typing

2023-08-01: Population waves

2023-05-18: Math of telephone billing mystery

2023-05-05: Franklin and DNA More information…

2023-04-25: On angle and dimension

2023-02-20: On Leonardo da Vinci and Gravity

2022-04-29: Fabricating Evidence to catch Carmen Sandiego

2022-03-04: Probabilistic law of the excluded middle

2020-05-04: Archimedes and the sphere

2019-05-16: Glow worms return

2019-04-11: Original memetic sin

2019-01-31: The theory of weight

2018-11-06: Origins of telephone network theory

2018-10-24: Modern thought

2018-09-10: Feeding a controversy

2018-06-11: Glow worm distribution

2018-04-23: Outlawing risk

2017-08-22: A rebuttal on the beauty in applying math

2017-04-22: Free googles book library

2016-11-02: In search of Theodore von Karman

2016-09-25: Amath Timeline

2016-02-24: Math errors and risk reporting

2016-02-20: Apple VS FBI

2016-02-19: More Zika may be better than less

2016-02-17: Dependent Non-Commuting Random Variable Systems

2016-01-14: Life at the multifurcation

2015-09-28: AI ain't that smart

2015-06-24: Mathematical Epidemiology citation tree

2015-03-31: Too much STEM is bad

2015-03-24: Dawn of the CRISPR age

2015-02-12: A Comment on How Biased Dispersal can Preclude Competitive Exclusion

2015-02-09: Hamilton's selfish-herd paradox

2015-02-08: Risks and values of microparasite research

2014-11-10: Vaccine mandates and bioethics

2014-10-18: Ebola, travel, president

2014-10-17: Ebola comments

2014-10-12: Ebola numbers

2014-09-23: More stochastic than?

2014-08-17: Feynman's missing method for third-orders?

2014-07-31: CIA spies even on congress

2014-07-16: Rehm on vaccines

2014-06-21: Kurtosis, 4th order diffusion, and wave speed

2014-06-20: Random dispersal speeds invasions

2014-05-06: Preservation of information asymetry in Academia

2014-04-16: Dual numbers are really just calculus infinitessimals

2014-04-14: More on fairer markets

2014-03-18: It's a mad mad mad mad prisoner's dilemma

2014-03-05: Integration techniques: Fourier--Laplace Commutation

2014-02-25: Fiber-bundles for root-polishing in two dimensions

2014-02-17: Is life a simulation or a dream?

2014-01-30: PSU should be infosocialist

2014-01-12: The dark house of math

2014-01-11: Inconsistencies hinder pylab adoption

2013-12-24: Cuvier and the birth of extinction

2013-12-17: Risk Resonance

2013-12-15: The cult of the Levy flight

2013-12-09: 2013 Flu Shots at PSU

2013-12-02: Amazon sucker-punches 60 minutes

2013-11-26: Zombies are REAL, Dr. Tyson!

2013-11-22: Crying wolf over synthetic biology?

2013-11-21: Tilting Drake's Equation

2013-11-18: Why \(1^{\infty} eq 1\)

2013-11-15: Adobe leaks of PSU data + NSA success accounting

2013-11-14: 60 Minutes misreport on Benghazi

2013-11-11: Making fairer trading markets

2013-11-10: L'Hopital's Rule for Multidimensional Systems

2013-11-09: Using infinitessimals in vector calculus

2013-11-08: Functional Calculus

2013-11-03: Elementary mathematical theory of the health poverty trap

2013-11-02: Proof of the circle area formula using elementary methods

Blog – multiplying

Symbolic algebra and typing

Incomplete thoughts.

If you start from scratch, asking yourself “How would I build a tool to help me perform classical mathematical computations more efficiently?” One of the challengies that quickly arrises is figuring out how to represent classical expressions in their full generality.

Last week, I was doing some prep work for class, and wanted to extend sympy to allow perplex and dual number systems, the same way it handles imaginary numbers. In the abstract, this didn’t seem like it should be so hard a task – these number systems have allot of similarities to complex numbers, and pretty much all of the properties I was interested in could be defined in terms of one new variable for each.

The task turned out to be more difficult than I’d hoped. In sympy, many of the properties of the imaginary unit \(i\) are hard-wired into the code in ways that don’t reveal themselves until you start making changes intended to chage the behavior of \(i\).

I am not an expert in computational algebra, but I have made some contributions. One of the major break-throughs in computational symbolic algebra was the leveraging of object-oriented type structures to implement expression representations. Using object-based representations allows arbitrary expression trees and atomic variable properties, freeing algorithms of the burdens of representation.

While sympy’s class-structure for computational algebra seems revolutionary when you first learn to parse it, the overall implementation of sympy turns out to have some overall weaknesses. I think we need a re-implementation, based on multiple dispatch and more robust term typing.

Multiple dispatch is a language tool that allows functions to be called based on a name AND the types of its arguments. Thus, you can write multiplication between different objects and expect the language to make the appropriate interprettation without the usuer having to make explicit reference.

The big question is typing – we see a growing need for stronger typing in python, but typing carries its own downsides and dangers, and it remains unclear to me how to implement typing so that is both comprehensive, generalizable, and concise.