summaryrefslogtreecommitdiff
path: root/example.txt
diff options
context:
space:
mode:
authorTom Smeding <tom@tomsmeding.com>2024-01-09 22:36:53 +0100
committerTom Smeding <tom@tomsmeding.com>2024-01-09 22:36:53 +0100
commit07a64a3096b1e48fd240d19e51f3448dd9402787 (patch)
treedbd41d6c7a3fc76a89b18197d12e04dcf4cba550 /example.txt
parent870351e3a2f735678bd21d80083f0327b21fc588 (diff)
Some W-type notes
Diffstat (limited to 'example.txt')
-rw-r--r--example.txt27
1 files changed, 27 insertions, 0 deletions
diff --git a/example.txt b/example.txt
index 29ab618..21990a4 100644
--- a/example.txt
+++ b/example.txt
@@ -3,3 +3,30 @@ id = \(l : Level) -> \(a : Set l) -> \(x : a) -> x
unitfoo : (_ : One) -> One
unitfoo = \(Unit : One) -> Unit
+
+-- W-types: https://cs.stackexchange.com/a/55674/45548
+-- for any n : Level, B : Set ? and any A : B -> Set ?, the following is allowed:
+-- data[W] T : Set n where
+-- c : (x : B) -> (_ : A x -> T) -> T
+
+-- TODO: how parametric can n/n1/n2 be?
+
+-- data Nat : Set 0 where
+-- zero : Nat
+-- succ : Nat -> Nat
+-- ~>
+-- B = One + One
+-- A (inj1 Unit) = Void
+-- A (inj2 Unit) = One
+-- data[W] Nat : Set 0 where
+-- c : (x : B) -> (_ : A x -> Nat) -> Nat
+
+-- data List (C : Set 0) : Set 0 where
+-- nil : List C
+-- cons : C -> List C -> List C
+-- ~>
+-- B =
+-- data[W] List (C : Set 0) : Set 0 where
+-- c :
+
+-- data Vec (A : Set 0) : Nat ->