<p>It looks to me that you can encode the word problem for groups within the theory of categories in the following way. Pick an object $X$, and then for each generator of the group introduce two morphisms $x,x&#39; : X \to X$, and assume the equalities $x \circ x&#39; = 1_X$ and $x&#39; \circ x = 1_X$. Then you can define the unit to be the identity map, the composition to be the group multiplication, and the negation of a string $x\circ y\circ z$ to be the reverse primed string $z&#39; \circ y&#39; \circ x&#39;$. Hence this problem is undecidable.</p>

<p>However, the word problem is solvable for many specific groups, so if you have more details about the problem this may help. In particular, one idea from the theory of groups which might help you a lot is that absolute presentations of finitely generated groups are solvable -- the inequations can prune the search space enough to make the theory decidable.</p>

<p>EDIT: One additional thought I had is that adding irrelations might still be a useful tool for you, even if the concrete models you're interested validate the equations. This is because in categorical situations you often only want "nice" equations, for some value of nice, and you can use the inequations to rule out solutions that are too evil for you. Your decision procedure might still be incomplete, but you might get a more natural characterization of the solutions it can find than "we search possible proof-trees to a depth of 7". </p>

<p>Good luck; that functor thing you're doing looks pretty cool!</p>

CC BY-SA 2.5
2011-01-06T15:59:41.773Z
Wonderful! I've updated the wording to account for that, I'll look into that idea of absolute presentations. Thanks.
quanta
CC BY-SA 2.5
2011-01-06T13:33:27.180Z
2011-01-06T16:00:17.997Z
2011-01-06T16:00:17.997Z
Neel Krishnaswami
<p>One reference: <a href="http://www.cs.cornell.edu/~kozen/papers/06ijcar-categories.pdf" rel="nofollow">Automating Proofs in Category Theory</a> by Dexter Kozen, Christoph Kreitz, and Eva Richter.</p>

CC BY-SA 2.5
2011-01-06T17:11:24.210Z
2011-01-06T17:11:24.210Z
Noam Zeilberger
<p>I have the following typed theory</p>

<pre><code>|- 1_X : X -&gt; X
f : A -&gt; B, g : B -&gt; C |- compose(g,f) : A -&gt; C
F, f : A -&gt; B |- apply(F,f) : F(A) -&gt; F(B)
</code></pre>

<p>with equations for all terms:</p>

<pre><code>f : A -&gt; B, g : B -&gt; C, h : C -&gt; D |- compose(h,compose(f,g)) = compose(compose(h,f),g)
f : A -&gt; B |- compose(f,1_A) = f
f : A -&gt; B |- compose(1_B,f) = f
F |- apply(F,1_X) = 1_F(X)
f, f : A -&gt; B, g : B -&gt; C |- apply(F,compose(g,f)) = compose(apply(F,g),apply(F,f))
</code></pre>

<p>I am looking for a semi-decision procedure that will be able to prove equations in this theory given a set of hypothetical equations. It is also not clear whether a complete decision procedure exists or not: <strike>There doesn't seem to be any way to encode the word problem for groups into it.</strike> Neel Krishnaswami showed how to encode the word problem into this, so the general problem is undecidable. The associativity and identity subtheory can easily be decided using a monoid model of the theory, while the full problem is harder than congruence closure. Any references or pointers would be most welcome!</p>

<hr>

<p>Here is an explicit example of something we would hope to be able to automatically proved:</p>

<pre><code>f : X -&gt; Y, F, G,
a : F(X) -&gt; G(X), b : G(X) -&gt; F(X),
c : F(Y) -&gt; G(Y), d : G(Y) -&gt; F(Y),
compose(a,b) = 1_F(X), compose(b,a) = 1_G(X),
compose(c,d) = 1_F(Y), compose(d,c) = 1_G(Y),
compose(c,apply(F,f)) = compose(apply(G,f),a)
|- compose(d,apply(G,f)) = compose(apply(F,f),b)
</code></pre>

<lo.logic><pl.programming-languages><type-theory><ct.category-theory><automated-theorem-proving>
Are there semi-decision procedures for this theory?
quanta
# Are there semi-decision procedures for this theory?

(Asked by: username_0 on 2011-01-06)

I have the following typed theory
|- 1_X : X -> X
f : A -> B, g : B -> C |- compose(g,f) : A -> C
F, f : A -> B |- apply(F,f) : F(A) -> F(B)

with equations for all terms:
f : A -> B, g : B -> C, h : C -> D |- compose(h,compose(f,g)) = compose(compose(h,f),g)
f : A -> B |- compose(f,1_A) = f
f : A -> B |- compose(1_B,f) = f
F |- apply(F,1_X) = 1_F(X)
f, f : A -> B, g : B -> C |- apply(F,compose(g,f)) = compose(apply(F,g),apply(F,f))

I am looking for a semi-decision procedure that will be able to prove equations in this theory given a set of hypothetical equations. It is also not clear whether a complete decision procedure exists or not: There doesn't seem to be any way to encode the word problem for groups into it. username_1 showed how to encode the word problem into this, so the general problem is undecidable. The associativity and identity subtheory can easily be decided using a monoid model of the theory, while the full problem is harder than congruence closure. Any references or pointers would be most welcome!

Here is an explicit example of something we would hope to be able to automatically proved:
f : X -> Y, F, G,
a : F(X) -> G(X), b : G(X) -> F(X),
c : F(Y) -> G(Y), d : G(Y) -> F(Y),
compose(a,b) = 1_F(X), compose(b,a) = 1_G(X),
compose(c,d) = 1_F(Y), compose(d,c) = 1_G(Y),
compose(c,apply(F,f)) = compose(apply(G,f),a)
|- compose(d,apply(G,f)) = compose(apply(F,f),b)

**Tags:** lo.logic, pl.programming-languages, type-theory, ct.category-theory, automated-theorem-proving


---

## 2 answers

### Answer by username_1 on 2011-01-06. Score: 7

It looks to me that you can encode the word problem for groups within the theory of categories in the following way. Pick an object $X$, and then for each generator of the group introduce two morphisms $x,x' : X \to X$, and assume the equalities $x \circ x' = 1\_X$ and $x' \circ x = 1\_X$. Then you can define the unit to be the identity map, the composition to be the group multiplication, and the negation of a string $x\circ y\circ z$ to be the reverse primed string $z' \circ y' \circ x'$. Hence this problem is undecidable.

However, the word problem is solvable for many specific groups, so if you have more details about the problem this may help. In particular, one idea from the theory of groups which might help you a lot is that absolute presentations of finitely generated groups are solvable -- the inequations can prune the search space enough to make the theory decidable.

EDIT: One additional thought I had is that adding irrelations might still be a useful tool for you, even if the concrete models you're interested validate the equations. This is because in categorical situations you often only want "nice" equations, for some value of nice, and you can use the inequations to rule out solutions that are too evil for you. Your decision procedure might still be incomplete, but you might get a more natural characterization of the solutions it can find than "we search possible proof-trees to a depth of 7".

Good luck; that functor thing you're doing looks pretty cool!

> **Comments:**
> **username_0**: Wonderful! I've updated the wording to account for that, I'll look into that idea of absolute presentations. Thanks.  

---

### Answer by username_2 on 2011-01-06. Score: 6

One reference: [Automating Proofs in Category Theory](http://www.cs.cornell.edu/~kozen/papers/06ijcar-categories.pdf) by Dexter Kozen, Christoph Kreitz, and Eva Richter.


---

