     
     public var degree: Int {
         return factors.sum{ e in e.degree }
-    }
-    
-    internal func μ(at: (Int, Int), to: Int) -> KhTensorElement {
-//        let (i, j) = at
-//        let (e1, e2) = (factors[i], factors[j])
-        //        switch (e1, e2) {
-        //        case (.I, .I):
-        //        }
-        fatalError()
-    }
-    
-    internal func Δ(at i: Int, _ newState: LinkSpliceState) -> [KhTensorElement] {
-        //        let (e1, e2) =
-        fatalError()
     }
     
     public static func ==(b1: KhTensorElement, b2: KhTensorElement) -> Bool {

public struct KhChainSummand: Equatable, CustomStringConvertible {
    public let link: Link
    public let state: LinkSpliceState
    public let basis: [KhTensorElement]
    public let shifted: Int
    
    public init(link L: Link, state: LinkSpliceState, shifted: Int = 0) {
        let spliced = L.spliced(by: state)
        let basis = KhChainSummand.generate(state: state, power: spliced.components)
        self.init(link: spliced, state: state, basis: basis, shifted: shifted)
    }
    
    internal init(link: Link, state: LinkSpliceState, basis: [KhTensorElement], shifted: Int) {
        self.link = link
        self.state = state
        self.basis = basis
        self.shifted = shifted
    }
    
    public func shift(_ n: Int) -> KhChainSummand {
        return KhChainSummand(link: link, state: state, basis: basis, shifted: shifted + n)
    }
    
    internal static func generate(state: LinkSpliceState, power n: Int) -> [KhTensorElement] {

    
    public var description: String {
        let n = Int( log2( Double(basis.count) ) )
        return Format.term(1, "V", n) + (shifted != 0 ? "{\(shifted)}" : "") + Format.sub(state.description)
    }
}

