You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{-# OPTIONS --prop --rewriting #-}open importAgda.Builtin.Natopen importAgda.Builtin.Equality{-# BUILTIN REWRITE _≡_ #-}data_≐_ {ℓ} {A :Set ℓ} (x : A) : A →Prop ℓ whererefl : x ≐ x
postulatesubst :∀ {ℓ ℓ′} {A :Set ℓ} (P : A →Set ℓ′)
→ (x y : A) → x ≐ y → P x → P y
subst-rew :∀ {ℓ ℓ′} {A :Set ℓ} (P : A →Set ℓ′)
→ {x : A} (e : x ≐ x) (p : P x) → subst P x x e p ≡ p
{-# REWRITE subst-rew #-}dataBox (A :Prop) :Setwherebox : A -> Box A
foo : (A :Prop)(x y : A)(P : Box A →Set)(p : P (box x)) → subst P (box x) (box y) refl p ≐ p
foo A x y P p = refl -- refl does not type check
The problem is that the rewriting implementation uses untyped equality for checking the non-linear parts of patterns, which doesn't do the right thing in the presence of Prop's.
The text was updated successfully, but these errors were encountered:
Reported by Simon Boulier:
The problem is that the rewriting implementation uses untyped equality for checking the non-linear parts of patterns, which doesn't do the right thing in the presence of Prop's.
The text was updated successfully, but these errors were encountered: