diff 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
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Paper/src/agda/cmp.agda.replaced	Fri Nov 05 15:19:08 2021 +0900
@@ -0,0 +1,15 @@
+module cmp where
+
+open import Data.Nat
+open import Data.Nat.Properties as NatProp -- <-cmp
+open import Relation.Binary
+
+compare_test : @$\mathbb{N}$@ @$\rightarrow$@ @$\mathbb{N}$@ @$\rightarrow$@ @$\mathbb{N}$@
+compare_test x y with <-cmp x y
+... | tri< a @$\neg$@b @$\neg$@c = y
+... | tri≈ @$\neg$@a b @$\neg$@c = x
+... | tri> @$\neg$@a @$\neg$@b c = x
+
+-- test = compare_test 7 2
+-- 7
+