Prev Up Next
Go backward to 1.2 MONOID
Go up to 1 Specifications from the Bremen Proposal
Go forward to 1.4 SIG1

1.3 NAT

spec
NAT =
free
{
sorts
Nat;
Zero,Pos < Nat
ops
zero : Zero;
suc__ : Nat -> Pos }
then
op
pre__ : Pos -> Nat
var
x : Nat
·
pre(suc x)=x
then local
pred
odd__ : Nat
var
x : Nat
·
¬ odd zero
·
odd(suc x) <=> ¬ odd x
within
sort
Odd = { n:Nat · odd n }

CoFI Document: CASL/SyntaxExamples --Version 0.99-- 17 February 1998.
Comments to cofi-language@brics.dk

Prev Up Next