In intuitionistic type theory, the notion of proving that two objects are not identical or belong to different types is usually approached through negation. One common way to prove non-identity or non-membership is by showing that assuming the opposite leads to a contradiction.
To illustrate this, let's consider a simple example. Suppose we want to prove that two natural numbers, n
and m
, are not equal. In intuitionistic type theory, the type of natural numbers is usually defined inductively. We can use pattern matching to define functions over natural numbers.
Here's an example proof in Agda, a dependently typed programming language based on intuitionistic type theory:
agda