A decidable object in a topos has a decomposition , with representing inequality. In the internal logic of a topos, equality on is decidable. These categorical complements behave well under pullback.
For a subobject , pull back the displayed decomposition along . The diagonal pulls back to , while pulls back to its complement. Hence every subobject of a decidable object is decidable; the subobject itself need not be complemented in .
For two decidable objects, the diagonals of and give four disjoint summands of , according as each coordinate pair is equal or unequal. The both-equal summand is , and the other three give its complement. The terminal object is decidable, so induction gives closure under finite products, including the empty product.
For a family of decidable objects with an existing coproduct , products distribute over this coproduct, giving
The coproduct injections in a topos are disjoint. The diagonal consists of in each summand, and has complement
Consequently every existing coproduct of decidable objects is decidable, including the initial object. In a Grothendieck topos all small coproducts exist. No assertion that arbitrary products preserve decidability is used.