Type this Python sketch of the nonmonotonic "unless"/default rule "birds fly unless abnormal" — note how adding a fact later DEFEATS a prior conclusion.
Type this Python sketch of the nonmonotonic "unless"/default rule "birds fly unless abnormal" — note how adding a fact later DEFEATS a prior conclusion.
Answer
def flies(x, beliefs): # default: birds fly UNLESS believed abnormal if ("bird", x) in beliefs and ("abnormal", x) not in beliefs: return True # defeasible conclusion return False beliefs = {("bird", "tweety")} flies("tweety", beliefs) # True beliefs.add(("abnormal", "tweety")) # new fact retracts it flies("tweety", beliefs) # now False -- nonmonotonic
The conclusion flies(tweety) holds only while abnormal(tweety) is NOT believed. Adding abnormal(tweety) defeats it — the hallmark of defeasible, nonmonotonic reasoning. A real TMS would record this dependency so the retraction is automatic and surgical.