Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
why3
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
125
Issues
125
List
Boards
Labels
Service Desk
Milestones
Merge Requests
17
Merge Requests
17
Operations
Operations
Incidents
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Why3
why3
Commits
05334a87
Commit
05334a87
authored
Apr 27, 2010
by
Andrei Paskevich
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
provide the definition of abs, max, min in int.why
parent
aabcab86
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
10 deletions
+7
-10
theories/int.why
theories/int.why
+7
-10
No files found.
theories/int.why
View file @
05334a87
...
...
@@ -21,10 +21,7 @@ theory Abs
use import Int
logic abs(int) : int
axiom Pos: forall x:int. x >= 0 -> abs(x) = x
axiom Neg: forall x:int. x <= 0 -> abs(x) = -x
logic abs(x:int) : int = if x >= 0 then x else -x
lemma Abs_pos: forall x:int. abs(x) >= 0
...
...
@@ -35,13 +32,13 @@ theory MinMax
use import Int
logic min(
int,int) : int
logic max(
int,int) : int
logic min(
x:int,y:int) : int = if x <= y then x else y
logic max(
x:int,y:int) : int = if x <= y then y else x
axiom
Max_is_ge : forall x,y:int. max(x,y) >= x and max(x,y) >= y
axiom
Max_is_some : forall x,y:int. max(x,y) = x or max(x,y) = y
axiom
Min_is_le : forall x,y:int. min(x,y) <= x and min(x,y) <= y
axiom
Min_is_some : forall x,y:int. min(x,y) = x or min(x,y) = y
lemma
Max_is_ge : forall x,y:int. max(x,y) >= x and max(x,y) >= y
lemma
Max_is_some : forall x,y:int. max(x,y) = x or max(x,y) = y
lemma
Min_is_le : forall x,y:int. min(x,y) <= x and min(x,y) <= y
lemma
Min_is_some : forall x,y:int. min(x,y) = x or min(x,y) = y
end
*)
...
...
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