Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@Lysxia
Created August 14, 2020 13:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Lysxia/e2686c6de1c4224f32b57f3674a30018 to your computer and use it in GitHub Desktop.
Save Lysxia/e2686c6de1c4224f32b57f3674a30018 to your computer and use it in GitHub Desktop.
module Main
import Data.Nat
data Stack_ : Nat -> Type -> Type where
Two : (1 _ : Stack_ (2 * i) a) -> Stack_ i a
data Debits_ : Nat -> Stack_ i a -> Type where
DTwo : (1 _ : Debits_ (i + acc) s) -> Debits_ acc (Two s)
draise_ : LTE acc acc' -> (1 _ : Debits_ {i} {a} acc s) -> Debits_ {i} acc' s
draise_ n (DTwo s) = DTwo (draise_ m s) where
m : LTE (i + acc) (i + acc')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment