-
Notifications
You must be signed in to change notification settings - Fork 339
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Termination checker still incompatible with univalence #5910
Comments
I don't know why this was not labelled with |
NB: Since this reproducer does a match of @nad wrote:
Could you please do this? Currently we cannot place the safe label here, being short of a reproducer. |
Path can be converted to {-# OPTIONS --safe --cubical #-}
open import Cubical.Foundations.Prelude
open import Cubical.Foundations.Isomorphism
data Zero : Set where
data Id (X : Set) : Set where
i : X → Id X
mutual
data WOne : Set where wrap : Id FOne -> WOne
FOne = Zero -> WOne
data _<->_ (X : Set) : Set -> Set₁ where
Refl : X <-> X
isom : Iso WOne FOne
isom =
iso
(λ _ ())
(λ f → wrap (i f))
(λ _ → funExt λ ())
(λ { (wrap (i _)) → cong (λ f → wrap (i f)) (funExt λ ()) })
eq : WOne <-> FOne
eq = subst (λ X → WOne <-> X) (isoToPath isom) Refl
noo : (X : Set) -> (WOne <-> X) -> Id X -> Zero
noo .WOne Refl (i (wrap f)) = noo FOne eq f
absurd : Zero
absurd = noo FOne eq (i \ ()) |
Thanks, @szumixie ! |
mutual
noo : (X : Set) -> (WOne <-> X) -> Id X -> Zero
noo .WOne Refl (i (wrap f)) = noo FOne iso f The pattern
However, we cannot commute |
It seems for indices, the necessary checks are in place? {-# OPTIONS --cubical-compatible #-}
data E1 : Set where
data E2 : Set where
data Indexed : Set → Set₁ where
e2 : Indexed E2
data _<->_ (X : Set) : Set -> Set₁ where
Refl : X <-> X
oops : (X : Set) → X <-> E1 → Indexed X → Set
oops .E1 Refl i = {!!} Pattern match on
although if you ask me it should bind a transport pattern. |
Intriguingly (to me at least), this already raises a termination error: {-# OPTIONS --without-K #-}
data Zero : Set where
record Unit : Set where
constructor tt
data Id (X : Set) : Set where
i : X → Id X
data _<->_ (X : Set) : Set -> Set₁ where
Refl : X <-> X
postulate
iso : ∀{X} → Id X <-> X
noo : (X Y : Set) -> (Id X <-> Y) -> Y -> Zero
noo X .(Id X) Refl (i x) = noo X X iso x
absurd : Zero
absurd = noo Unit Unit iso tt
|
Likely because there is a workaround in place for #1023, but it was shown to be incomplete in the current issue. |
This isn't a problem with |
The new type-based termination checker has not been released yet. I don't think we should "force" people to use it before it has seen considerable use. |
Reported by @Saizan. Lifted from:
The text was updated successfully, but these errors were encountered: