Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Why3
why3
Commits
5e956b50
Commit
5e956b50
authored
Feb 17, 2011
by
Jean-Christophe Filliâtre
Browse files
added theory list.ListRich
parent
854a61f0
Changes
2
Hide whitespace changes
Inline
Side-by-side
examples/programs/vstte10_aqueue.mlw
View file @
5e956b50
...
...
@@ -4,11 +4,7 @@ module M
Problem 5: amortized queue *)
use import int.Int
use export list.List
use export list.Length
use export list.Append
use export list.Reverse
use export list.HdTl
use export list.ListRich
type queue 'a = Q (front : list 'a) (lenf : int)
(rear : list 'a) (lenr : int)
...
...
theories/list.why
View file @
5e956b50
...
...
@@ -58,9 +58,13 @@ theory HdTl "head and tail"
| Cons _ t -> Some t
end
(* TODO: move these lemmas into another theory? *)
use import Nth
end
theory NthHdTl
use import int.Int
use import Nth
use import HdTl
lemma Nth_tl :
forall l1 l2 : list 'a. tl l1 = Some l2 ->
...
...
@@ -219,3 +223,17 @@ end
theory Fold
(* TODO (a la Map) *)
end
theory ListRich
use export List
use export Length
use export Mem
use export Nth
use export HdTl
use export NthHdTl
use export Append
use export Reverse
use export Sorted
use export NumOcc
use export Permut
end
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment