Formalizing Object Equivalence in Machine Knitting