Skip to Content.
Sympa Menu

coq-club - RE: [Coq-Club] Getting "computing" proof terms with dependent types / reduction of matches with single pattern

coq-club AT inria.fr

Subject: The Coq mailing list

List archive

RE: [Coq-Club] Getting "computing" proof terms with dependent types / reduction of matches with single pattern


Chronological Thread 
  • From: "Soegtrop, Michael" <michael.soegtrop AT intel.com>
  • To: "coq-club AT inria.fr" <coq-club AT inria.fr>
  • Subject: RE: [Coq-Club] Getting "computing" proof terms with dependent types / reduction of matches with single pattern
  • Date: Wed, 7 Sep 2016 16:52:31 +0000
  • Accept-language: de-DE, en-US
  • Authentication-results: mail3-smtp-sop.national.inria.fr; spf=None smtp.pra=michael.soegtrop AT intel.com; spf=Pass smtp.mailfrom=michael.soegtrop AT intel.com; spf=None smtp.helo=postmaster AT mga14.intel.com
  • Ironport-phdr: 9a23:q7rydRfni69k0xU3xCNUqNy5lGMj4u6mDksu8pMizoh2WeGdxc6zZR7h7PlgxGXEQZ/co6odzbGH6ua+ACdZucrJ8ChbNscdD1ld0YRetjdjKfbNMVf8Iv/uYn5yN+V5f3ghwUuGN1NIEt31fVzYry76xzcTHhLiKVg9fbytScbshsi6n9q/54fUK10RwmHsOPUsdV7v9VmZ9pFPx9AzcuBpklqBi0ALUtwe/XlvK1OXkkS0zeaL17knzR5tvek8/dVLS6TwcvdwZ7VZCDM7LzJ9v5Wz5lGQBTeIszEXVXxTmR5VCSDE6gv7V9H/qGGy4uF6wWyROdD8ZbEyQzWrqalxHkzGkiACYnQC92zYltZ3lOYThROqpxVyx8ScNISUP/p3c6ebZtQXSnZbWd55VipdD4f6ZIwKWblSdd1EppXw8gNd5SC1AhOhUbvi

Dear Guillaume,

thanks a lot for the detailed explanation! To double check if I got it now,
let me describe it with my own words:

When typing individual cases, the "in" clause (eq _ t) is unified with the
type of the unification result of the match argument (H) and the pattern for
this case (eq_refl).
The unification of (H : @eq Set nat bool) and (@eq_refl x : @eq Set x x)
gives (@eq_refl nat : @eq Set nat nat).
Unification of (@eq Set nat nat) with the in clause (eq _ t) gives t=nat, so
the return type must be nat, which is the case for the term "1".

The type of the match statement is obtained by unifying the type of the match
argument (@eq Set nat bool) with the in clause (eq _ t) which gives t=bool,
so the match statement has type bool.

If I got this right, the unification of (H : @eq Set nat bool) and (@eq_refl
x : @eq Set x x) works, because the last argument of eq is a (forall _ : A)
and not a type family parameter, but I must admit I don't fully understand
what (@eq Set x x) and (@eq Set x) are then (as yet).

Best regards,

Michael

Intel Deutschland GmbH
Registered Address: Am Campeon 10-12, 85579 Neubiberg, Germany
Tel: +49 89 99 8853-0, www.intel.de
Managing Directors: Christin Eisenschmid, Christian Lamprechter
Chairperson of the Supervisory Board: Nicole Lau
Registered Office: Munich
Commercial Register: Amtsgericht Muenchen HRB 186928



Archive powered by MHonArc 2.6.18.

Top of Page