For #7 move failing test to new file issue7.py, recast using Shape, add more tests.
For #7 fix broken D rule, now have n=8 OK.  But n=9 fails so algorithm is wrong.
For #7 refactor c_rule and d_rule into rule_factory, to make it easier to watch for particular contributions.