Implementation

by MmcM / Sage