Following discussions on the coq-club it was discovered that Agda's current
--without-K does not guarantee compatibility with univalence. My version of
--without-K DOES rule out the bad use of Refl in the following test case, an
argument for accepting my patch (see issue 865).
-- Andreas, 2014-01-10
-- Code by Jesper Cockx and Conor McBride and folks from the Coq-club
{-# OPTIONS --without-K #-}
-- An empty type.
data Zero : Set where
-- A unit type as W-type.
mutual
data WOne : Set where wrap : FOne -> WOne
FOne = Zero -> WOne
-- Type equality.
data _<->_ (X : Set) : Set -> Set where
Refl : X <-> X
-- This postulate is compatible with univalence:
postulate
iso : WOne <-> FOne
-- But accepting that is incompatible with univalence:
noo : (X : Set) -> (WOne <-> X) -> X -> Zero
noo .WOne Refl (wrap f) = noo FOne iso f
-- Matching against Refl silently applies the conversion
-- FOne -> WOne to f. But this conversion corresponds
-- to an application of wrap. Thus, f, which is really
-- (wrap f), should not be considered a subterm of (wrap f)
-- by the termination checker.
-- At least, if we want to be compatible with univalence.
absurd : Zero
absurd = noo FOne iso (\ ())
Original issue reported on code.google.com by andreas....@gmail.com on 10 Jan 2014 at 8:27
Following discussions on the coq-club it was discovered that Agda's current
--without-K does not guarantee compatibility with univalence. My version of
--without-K DOES rule out the bad use of Refl in the following test case, an
argument for accepting my patch (see issue 865).
Original issue reported on code.google.com by
andreas....@gmail.comon 10 Jan 2014 at 8:27