Created
January 17, 2020 22:10
-
-
Save MarcelineVQ/0f6ede3f1420d62470c8d37b7575438c to your computer and use it in GitHub Desktop.
This file contains hidden or 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
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