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
5484f326
Commit
5484f326
authored
Feb 26, 2010
by
Jean-Christophe Filliâtre
Browse files
No commit message
No commit message
parent
687aa49a
Changes
1
Hide whitespace changes
Inline
Side-by-side
lib/prelude/prelude.why
View file @
5484f326
...
...
@@ -21,4 +21,31 @@ theory List
end
theory Eq
logic eq('a, 'a)
end
theory Array
use Eq
type ('a,'b) t
logic select (('a,'b) t, 'a) : 'b
logic store (('a,'b) t, 'a, 'b) : ('a,'b) t
axiom Select_eq :
forall m : ('a,'b) t. forall a1,a2 : 'a. forall b : 'b.
Eq.eq(a1, a2) -> Eq.eq(select(store(m,a1,b),a2),b)
axiom Select_neq :
forall m : ('a,'b) t. forall a1,a2 : 'a. forall b : 'b.
not Eq.eq(a1, a2) -> Eq.eq(select(store(m,a1,b),a2), select(m,a2))
logic const('b) : ('a,'b) t
axiom Const : forall b:'b. forall a:'a. Eq.eq(select(const(b),a), b)
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