Prev Up Next
Go backward to E.2.4 List_with_Order
Go up to E.2 Generic Structured Specifications
Go forward to E.2.6 Non_Empty_List

E.2.5 Nat_List_with_Reverse_Orders

spec
Ordered_Nat =
 
Nat then
preds
__ < __ , __ > __ : Nat × Nat
vars
m,n : Nat
·
zero < n
·
¬ (succ m < zero)
·
succ m < succ n <=> m < n
·
m > n <=> n < m
end
spec
Nat_List_with_Reverse_Orders =
 
List_with_Order [ Ordered_Nat fit Elem |-> Nat, __ < __ |-> __ < __ ]
and
 
List_with_Order [ Ordered_Nat fit Elem |-> Nat, __ < __ |-> __ > __ ]
then
 
axiom
forall l : List[Nat] · order[__ > __](l) = reverse(order[__ < __](l))
end

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

Prev Up Next