Can we assign cardinals in Coq to Prop
, Set
and each Type_i
? I only see the definition of finite cardinals in Coq's library, so maybe we need that of big cardinals to begin with.
According to the proof-irrelevance semantics, for example exposed here, Set
and the Type_i
form an increasing sequence of inaccessible cardinals. Can this be proven in Coq ?
Prop
seems more complex because of impredicativity. Proof-irrelevance means we identify all proofs of the same P : Prop
, and interpret Prop
itself as the pair {false, true}
. So the cardinal of Prop
would be 2. However, for any two proofs p1 p2 : P
, Coq does not accept eq_refl p1
as a proof of p1 = p2
. So Coq does not completely identify p1
and p2
. And on the other hand, impredicativity means that for any A : Type
and P : Prop
, A -> P
is of type Prop
. That makes a lot more inhabitants than in Set
.
If this is too hard, can Coq prove that Prop
and Set
are uncountable ? By Cantor's theorem, Coq easily proves that there is not surjection nat -> (nat -> Prop)
. This does not seem very far from proving there is not surjection nat -> Prop
. But then we need the filter Prop -> (nat -> Prop)
, that isolates which Prop
's have a free nat
variable. Can we define this filter in Coq, since we cannot pattern-match on Prop
?