Mercurial > hg > Papers > 2021 > soto-prosym
comparison Paper/src/agda/cmp.agda.replaced @ 2:9176dff8f38a
ADD while loop description
author | soto <soto@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Fri, 05 Nov 2021 15:19:08 +0900 |
parents | |
children | 339fb67b4375 |
comparison
equal
deleted
inserted
replaced
1:3910f4639344 | 2:9176dff8f38a |
---|---|
1 module cmp where | |
2 | |
3 open import Data.Nat | |
4 open import Data.Nat.Properties as NatProp -- <-cmp | |
5 open import Relation.Binary | |
6 | |
7 compare_test : @$\mathbb{N}$@ @$\rightarrow$@ @$\mathbb{N}$@ @$\rightarrow$@ @$\mathbb{N}$@ | |
8 compare_test x y with <-cmp x y | |
9 ... | tri< a @$\neg$@b @$\neg$@c = y | |
10 ... | tri≈ @$\neg$@a b @$\neg$@c = x | |
11 ... | tri> @$\neg$@a @$\neg$@b c = x | |
12 | |
13 -- test = compare_test 7 2 | |
14 -- 7 | |
15 |