Skip to Content.
Sympa Menu

coq-club - Re: [Coq-Club] [Agda] Re: [HoTT] newbie questions about homotopy theory & advantage of UF/Coq

coq-club AT inria.fr

Subject: The Coq mailing list

List archive

Re: [Coq-Club] [Agda] Re: [HoTT] newbie questions about homotopy theory & advantage of UF/Coq


Chronological Thread 
  • From: Andreas Abel <andreas.abel AT ifi.lmu.de>
  • To: Conor McBride <conor AT strictlypositive.org>, Altenkirch Thorsten <psztxa AT exmail.nottingham.ac.uk>
  • Cc: Maxime Dénès <mail AT maximedenes.fr>, Abhishek Anand <abhishek.anand.iitg AT gmail.com>, coq-club Club <coq-club AT inria.fr>, "agda AT lists.chalmers.se" <agda AT lists.chalmers.se>
  • Subject: Re: [Coq-Club] [Agda] Re: [HoTT] newbie questions about homotopy theory & advantage of UF/Coq
  • Date: Wed, 08 Jan 2014 18:53:56 +0100

Conor,

that's on the latest darcs version of Agda, I guess?

At least my own version of --without-K rejects your match on Refl:

The indices
WOne
X
are not constructors (or literals) applied to variables (note that
parameters count as constructor arguments)
when checking that the pattern Refl has type WOne <-> X

But you say it is justified, is it?

Cheers,
Andreas

On 07.01.2014 17:42, Conor McBride wrote:
>> Very good. Agda is right and Coq got it wrong. As I said previosuly the
>> definition of loop implicitely uses K.
>
> Not so fast! The code below is accepted using the --without-K flag, and
> the elimination that noo does is a based path induction, IIUC.
>
> Conor
>
> {-# OPTIONS --without-K #-}
>
> module BadWithoutK where
>
> data Zero : Set where
>
> data WOne : Set where
> wrap : (Zero -> WOne) -> WOne
>
> data _<->_ (X : Set) : Set -> Set where
> Refl : X <-> X
>
> postulate
> myIso : WOne <-> (Zero -> WOne)
>
> moo : WOne -> Zero
> noo : (X : Set) -> (WOne <-> X) -> X -> Zero
>
> moo (wrap f) = noo (Zero -> WOne) myIso f
> noo .WOne Refl x = moo x
>
> bad : Zero
> bad = moo (wrap \ ())

--
Andreas Abel <>< Du bist der geliebte Mensch.

Theoretical Computer Science, University of Munich
Oettingenstr. 67, D-80538 Munich, GERMANY

andreas.abel AT ifi.lmu.de
http://www2.tcs.ifi.lmu.de/~abel/
{-# OPTIONS --without-K #-}

data Zero : Set where

data WOne : Set where
wrap : (Zero -> WOne) -> WOne

data _<->_ (X : Set) : Set -> Set where
Refl : X <-> X

postulate
myIso : WOne <-> (Zero -> WOne)

moo : WOne -> Zero
noo : (X : Set) -> (WOne <-> X) -> X -> Zero

moo (wrap f) = noo (Zero -> WOne) myIso f
noo .WOne Refl x = moo x

bad : Zero
bad = moo (wrap \ ())



Archive powered by MHonArc 2.6.18.

Top of Page