Created
November 6, 2022 11:59
-
-
Save laMudri/9a23d29ab3a800f5d93e856dd34876b8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# OPTIONS --cubical #-} | |
module Scratch where | |
open import Cubical.Foundations.Everything | |
open import Cubical.Data.Equality | |
module _ {a} {A : Type a} where | |
data View {x : A} : {y : A} → x ≡ y → Type a where | |
vrefl : View refl | |
view : ∀ {x y} (p : x ≡ y) → View p | |
view = J (λ y p → View p) vrefl | |
-- Test: | |
test : ∀ {x y z : A} → x ≡ y → y ≡ z → x ≡ z | |
test p q with vrefl ← view p = q | |
test2 : isSet A → ∀ {x y : A} (p : x ≡ y) (q : y ≡ x) → test p q ≡ refl | |
test2 set p q with vrefl ← view p = set _ _ q refl |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment