TITLE: Encoding fuzzy logic with the topos of set-valued sheaves
QUESTION [7 upvotes]: One of the canonical examples used by Barr & Wells in order to motivate the use of topoi is that we can construct a theory for fuzzy logic and fuzzy set theory as set-valued sheaves on a poset (Heyting algebra) of confidence values for the fuzziness. Doing this constructs a fuzzy theory where both the membership and equality relations have more truth values than just true and false.
How would one construct a ternary approach using this mindset? In other words, is there an easy way to see a sheaf on a poset with three values as a fuzzy set theory for the truth values (true, maybe, false)? Or is this formulation even the wrong approach? Do I want a different Heyting algebra, so that the subobject classifier ends up having three elements?

REPLY [7 votes]: First I must warn you that there is a difference between fuzzy logics and topos theory.  There are some categories of fuzzy sets which are almost toposes, but not quite - they form a quasitopos, which is like a topos, but epi + mono need not imply iso.  There is a construction of such a quasitopos in Johnstone's Sketches of an Elephant - Vol 1 A2.6.4(e).
Now for the three valued logic I think a good example is a time-like logic.  Suppose you have a fixed point T in time.  This gives you two regions of time - before T and after T.  Our logic will have three truth values - always true, true after T but not before, and never true.  Note that we don't have a case "true before T, but not after", since once something is true, it is always true from that time on.  Like knowledge of mathematical theorems (assuming there are no mistakes!).
The topos with this logic is the arrow category of set: Set$^\to$.  Objects consist of Set functions $A \to B$, and morphism consist of pairs of set functions forming a commutative square.
For other three valued logics look at different Heyting algebras, but pay close attention to the implication operation, as it is a vital part of topos logic.  For the true, false, maybe case I am not sure on how to construct a Heyting algebra which reflects this logic.