Coq: Prop versus Set in Type(n)

点点圈 提交于 2019-12-03 12:10:42

Type : Type is inconsistent.

Impredicative Set with excluded middle implies proof irrelevance, so impredicative Set with proof relevance, e.g. true <> false, refutes excluded middle, which intuitionism isn't supposed to do.

Therefore we leave impredicativity in Prop and the rest of the type hierarchy gives us predicativity.

By the way,

forall P : nat1 -> Prop, P z1 -> (forall n : nat1, P n -> P (s1 n)) -> forall n : nat1, P n

is provable. Don't ask me what's the benefit of Coq only automatically proving that other weaker induction principle...

Also, have you read this chapter of CPDT?

Just read about this in an hour. This is because Coq will assume equality of two proof object of a same Prop. This is an axiom and is called proof irrelevance.

https://coq.inria.fr/library/Coq.Logic.ProofIrrelevance.html

It just thinks a predicate over Prop (Here P) doesn't really need to have some proof passed as its argument (or hypothesis) and removed it.

Consider this. Because of every nat1 are the same, whenever we try to proof some property P, we can just abstract over some nat1, while use the axiom to rewrite it to required ones. Thus Coq generated the "simplified" version of induction principle.

To generate the "full" version, you can use

Scheme nat1_ind_full := Induction for nat1 Sort Prop.

ref. Different induction principles for Prop and Type

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!