added a coefficient-based purity generator in puritygen.jl