aboutsummaryrefslogtreecommitdiff
path: root/src/CHAD/Lemmas.hs
diff options
context:
space:
mode:
authorTom Smeding <tom@tomsmeding.com>2025-11-10 21:49:45 +0100
committerTom Smeding <tom@tomsmeding.com>2025-11-10 21:50:25 +0100
commit174af2ba568de66e0d890825b8bda930b8e7bb96 (patch)
tree5a20f52662e87ff7cf6a6bef5db0713aa6c7884e /src/CHAD/Lemmas.hs
parent92bca235e3aaa287286b6af082d3fce585825a35 (diff)
Move module hierarchy under CHAD.
Diffstat (limited to 'src/CHAD/Lemmas.hs')
-rw-r--r--src/CHAD/Lemmas.hs21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/CHAD/Lemmas.hs b/src/CHAD/Lemmas.hs
new file mode 100644
index 0000000..55ef042
--- /dev/null
+++ b/src/CHAD/Lemmas.hs
@@ -0,0 +1,21 @@
+{-# LANGUAGE DataKinds #-}
+{-# LANGUAGE PolyKinds #-}
+{-# LANGUAGE TypeFamilies #-}
+{-# LANGUAGE TypeOperators #-}
+
+{-# LANGUAGE AllowAmbiguousTypes #-}
+module CHAD.Lemmas (module CHAD.Lemmas, (:~:)(Refl)) where
+
+import Data.Type.Equality
+import Unsafe.Coerce (unsafeCoerce)
+
+
+type family Append a b where
+ Append '[] l = l
+ Append (x : xs) l = x : Append xs l
+
+lemAppendNil :: Append a '[] :~: a
+lemAppendNil = unsafeCoerce Refl
+
+lemAppendAssoc :: Append a (Append b c) :~: Append (Append a b) c
+lemAppendAssoc = unsafeCoerce Refl