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
fb2b1efa
Commit
fb2b1efa
authored
Jan 09, 2013
by
Jean-Christophe Filliâtre
Browse files
new theory list.Prefix
parent
8b293634
Changes
1
Hide whitespace changes
Inline
Side-by-side
theories/list.why
View file @
fb2b1efa
...
...
@@ -341,6 +341,20 @@ theory Distinct
end
theory Prefix
use export List
use import int.Int
function prefix (n: int) (l: list 'a) : list 'a =
if n <= 0 then Nil else
match l with
| Nil -> Nil
| Cons x r -> Cons x (prefix (n-1) r)
end
end
(** {2 Induction on lists} *)
theory Induction
...
...
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