Skip to content

Instantly share code, notes, and snippets.

@MarcelineVQ
Created January 17, 2020 22:10
Show Gist options
  • Save MarcelineVQ/0f6ede3f1420d62470c8d37b7575438c to your computer and use it in GitHub Desktop.
Save MarcelineVQ/0f6ede3f1420d62470c8d37b7575438c to your computer and use it in GitHub Desktop.
module _ where
open import Data.Nat
open import Data.Bool
open import Relation.Binary.PropositionalEquality
data Tree : Set where
Leaf : Tree
Node : Tree -> Tree -> ℕ -> Tree
nonempty : Tree -> Bool
nonempty Leaf = false
nonempty _ = true
left : (t : Tree) -> {T (nonempty t)} -> Tree
left Leaf {()}
left (Node l _ _) {_} = l
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment