         for s in done {
             let a1 = g(f(s)) - C(s)
             let a2 = h(C(s).boundary()) + h(s).boundary()
-            assert(a1 == a2, "(gf - 1)(\(s)) = \(a1),\n(h∂ + ∂h)(\(s)) = \(a2)\n\nf:\(fTable),\n\nh:\(hTable)\n\n")
+            assert(a1 == a2, "(gf - 1)(\(s)) = \(a1),\n(h∂ + ∂h)(\(s)) = \(a2)\n")
         }
         
         for s in generators {
             let b1 = f(g(s))
-            assert(b1 == C(s), "fg(\(s)) = \(b1)\n\nf:\(fTable),\nh:\(hTable)\n\n")
+            assert(b1 == C(s), "fg(\(s)) = \(b1)\n")
         }
         
         for s in generators.filter({ diff[$0] == nil}) {
             let b = g(s).boundary()
-            assert(b == C.zero, "∂s = \(b), should be 0.")
+            assert(b == C.zero, "∂s = \(b), should be 0.\n")
         }
     }
 }

        return c.sum{ (s, a) in a * g(s) }
    }
    
    internal func h(_ s: S) -> C {
        return hTable[s] ?? C.zero
    }
    
    internal func h(_ c: C) -> C {
        return c.sum{ (s, a) in a * h(s) }
    }
    
    internal func isZero(_ c: C) -> Bool {

            } else {
                log("\tadd: \(s) with diff: \(f_bs)")
                
                fTable[s] = C(s)
                generators.append(s)
                relations.append(f_bs)
                diff[s] = f_bs
            }
        }
        
        done.insert(s)
        
        log("\tgenerators: \(generators)")
        log("")
        log("\tf: \(fTable)")
        log("\th: \(hTable)")
        log("")
        
//        assertChainContraction()
