The definition for the booleans true/false and their link with the propositional types True/False is described in Coq.Bool.Bool :
Inductive bool : Set := true : bool | false : bool
Definition Is_true (b:bool) :=
match b with
| true => True
| false => False
end.
When it comes to the bool type, I more or less understand their purpose and function, but that is not the case for the Prop types. This question gives a good example of my confusion. As presented there, the following is not a valid definition:
Definition inv (a: Prop): Prop := match a with | False => True | True => False end.
Resulting in "Pattern "True" is redundant in this clause.". The same definition with bool types on the other hand, compiles fine:
Definition inv (a: bool): bool :=
match a with
| false => true
| true => false
end.
Ptival's answer explains well why this happens in the pattern-matching sense: "False is not a data constructor [...]". Indeed, that is clear by examining True and False:
Print True.
Print False.
Inductive True : Prop := I : True
Inductive False : Prop :=
In that case however, my question becomes: why? If they are not the same as true/false, then what are they? Specifically:
- What is the purpose of creating the booleans
trueandfalsefrom the propositionalTrueandFalse, instead of merging them into one primitive construct? - If the
PropversionsTrue/Falsedon't mean the same as theboolversionstrue/false, then what do they actually mean and what are the they supposed to represent in contrast with their boolean variants?