Prev Up Next
Go backward to E.1.2 Monoid
Go up to E.1 Simple Structured Specifications
Go forward to E.1.4 Elem

E.1.3 Nat

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

CoFI Document: CASL/Summary-v1.0 -- Version: 1.0 -- 22 October 1998.
Comments to cofi-language@brics.dk

Prev Up Next