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
119
Issues
119
List
Boards
Labels
Service Desk
Milestones
Merge Requests
16
Merge Requests
16
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
df70e910
Commit
df70e910
authored
Jun 01, 2018
by
Jean-Christophe Filliâtre
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
new theory int.WFltof
parent
c7df83f7
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
23 deletions
+21
-23
stdlib/int.mlw
stdlib/int.mlw
+21
-0
stdlib/relations.mlw
stdlib/relations.mlw
+0
-23
No files found.
stdlib/int.mlw
View file @
df70e910
...
...
@@ -566,3 +566,24 @@ module Fibonacci
fib (n-1) + fib (n-2)
end
module WFltof
use import Int
use import relations.WellFounded
type t
function f t : int
axiom f_nonneg: forall x. 0 <= f x
predicate ltof (x y: t) = f x < f y
let rec lemma acc_ltof (n: int)
requires { 0 <= n }
ensures { forall x. f x < n -> acc ltof x }
variant { n }
= if n > 0 then acc_ltof (n-1)
lemma wf_ltof: well_founded ltof
end
stdlib/relations.mlw
View file @
df70e910
...
...
@@ -169,26 +169,3 @@ module WellFounded
end
(* the following module introduces a circular dependency *)
(*
module WFltof
use import int.Int
use import WellFounded
type t
function f t : int
axiom f_nonneg: forall x. 0 <= f x
predicate ltof (x y: t) = f x < f y
let rec lemma acc_ltof (n: int)
requires { 0 <= n }
ensures { forall x. f x < n -> acc ltof x }
variant { n }
= if n > 0 then acc_ltof (n-1)
lemma wf_ltof: well_founded ltof
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