Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Why3
why3
Commits
50722e60
Commit
50722e60
authored
Nov 18, 2010
by
Jean-Christophe Filliâtre
Browse files
mergesort_list still in progress
parent
659146bb
Changes
3
Hide whitespace changes
Inline
Side-by-side
examples/programs/mergesort_list.mlw
View file @
50722e60
...
...
@@ -8,6 +8,10 @@
lemma Permut_append:
forall l1 l2 k1 k2 : list 'a.
permut l1 k1 -> permut l2 k2 -> permut (append l1 l2) (append k1 k2)
lemma Permut_cons_append:
forall x : 'a, l1 l2 : list 'a.
permut (append (Cons x l1) l2) (append l1 (Cons x l2))
}
let split l0 =
...
...
tests/test-jcf.why
View file @
50722e60
...
...
@@ -3,13 +3,11 @@
theory Test
use
ex
port
int.In
t
use
im
port
list.Lis
t
use real.Real as R
logic ( *. ) (x:real) (y:real) : real = R.(*) x y
logic p (list 'a)
logic power (x : real) (n : int) : real =
if n = 0 then 1.0 else x *. power x (n-1)
goal G : p (Nil : list 'a) -> not (p (Nil : list 'b)) -> false
end
...
...
theories/list.why
View file @
50722e60
...
...
@@ -12,7 +12,7 @@ theory Length
logic length (l : list 'a) : int =
match l with
| Nil -> 0
| Cons _ r -> 1 + length
(r)
| Cons _ r -> 1 + length
r
end
lemma Length_nonnegative : forall l:list 'a. length(l) >= 0
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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