Give you access to the Mathematical Components library
computablewe represent it as a computable function (a program), not as an inductive relation
simpleconcept in type theory
Last, the proofs of these predicates are irrelevant (i.e. unique). This means that we can form subtypes without problems. E.g. the in habitants of the subtype of prime numbers { x | prime x = true } are pairs, the number (relevant) and the proof (always erefl true). Hence when we compare these pairs we can ignore the proof part, that is, prime numbers behave exactly as numbers.
A way to see this is that we are using Coq as a logical framework and that we are setting up an environment where one can reason classically (as in set theory, EM, subsets..) but also take advantage of computations as valid reasoning steps (unlike set theory TT manipulates effective programs)
statesomething
truth tableproofs, it is handy to combine calls to case with ;, as we do in the last line.
up tocomputation
Things to know:
up todefinitions like commutative. The pattern (_ + _ = _ + _) won't work. It's sad, it may be fidex one day, but now you know it. Search for
Cif you need a commutativity law.
is_true (a == b) <-> a = b