Is it possible to derive induction for the church-encoded Nat?

前端 未结 3 1764
Happy的楠姐
Happy的楠姐 2021-01-02 16:48

I was just wondering if it is possible to derive induction for the church-encoded Nat type on Idris, Agda, Coq and similar. Notice this is a different issue from doing it on

相关标签:
3条回答
  • 2021-01-02 17:25

    I think there is no formal proof that it's impossible, but generally expected that it can't be done. See e.g. the introduction to this paper by Aaron Stump.

    0 讨论(0)
  • 2021-01-02 17:27

    It is known not to be provable because there are models of the calculus of constructions where the impredicative encoding of the natural numbers is not initial (i.e. doesn't satisfy induction). It does follow from relational parametricity as Phil Wadler has shown long time ago. Hence combining Wadler with internal relational parametricity ala Moulin and Bernardy may do the trick.

    0 讨论(0)
  • 2021-01-02 17:32

    Here's a related question I asked about homotopy type theory. I am also a little out my depth here, so take all this with a grain of salt.

    I've proved that CN is isomorphic to Nat iff the free theorm for CN holds. Furthermore, it's known that there are no free theorems under the law of excluded middle (in HoTT). I.e. with LEM, you could could define CNs such as

    foo : CN
    foo T z s = if T is Bool then not z else z
    

    which is not a proper church natural and would not be covered by the induction principle. Because excluded middle and HoTT are consistent with the type theories you are asking about (as far as I know), it follows that there will not be a proof of ind.

    0 讨论(0)
提交回复
热议问题