def get_local_ops(self): res = list() for f in self.get_formula_list(): for op in f.body: if op.type <> Operation.VARIABLE and op not in Operation.get_globals() and op not in res: res.append(op) return res
def from_dict(dic): vars = [Operation(k, 0, dic["var_print_schemes"][k], k, Operation.VARIABLE) for k in dic["var_print_schemes"]] spec_ops = [Operation.from_dict(k) for k in dic["spec_ops"]] return Theorem(Formula.from_list(dic["formula"], Operation.get_globals() + vars + spec_ops), dic["id"], dic["folder"], operations=spec_ops)