Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Why3
why3
Commits
8f3ec6cd
Commit
8f3ec6cd
authored
Sep 03, 2012
by
Guillaume Melquiond
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add a Coq realization for int.Div2.
parent
a1c9da89
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
1 deletion
+22
-1
Makefile.in
Makefile.in
+1
-1
lib/coq/int/Div2.v
lib/coq/int/Div2.v
+21
-0
No files found.
Makefile.in
View file @
8f3ec6cd
...
...
@@ -865,7 +865,7 @@ endif
ifeq
(@enable_coq_libs@,yes)
COQLIBS_INT_FILES
=
Abs ComputerDivision EuclideanDivision Int MinMax Power
COQLIBS_INT_FILES
=
Abs ComputerDivision
Div2
EuclideanDivision Int MinMax Power
COQLIBS_INT_ALL_FILES
=
Exponentiation
$(COQLIBS_INT_FILES)
COQLIBS_INT
=
$(
addprefix
lib/coq/int/,
$(COQLIBS_INT_ALL_FILES)
)
...
...
lib/coq/int/Div2.v
0 → 100644
View file @
8f3ec6cd
(
*
This
file
is
generated
by
Why3
'
s
Coq
driver
*
)
(
*
Beware
!
Only
edit
allowed
sections
below
*
)
Require
Import
BuiltIn
.
Require
BuiltIn
.
Require
int
.
Int
.
Require
Import
int
.
EuclideanDivision
.
(
*
Why3
goal
*
)
Lemma
div2
:
forall
(
x
:
Z
),
exists
y
:
Z
,
(
x
=
(
2
%
Z
*
y
)
%
Z
)
\
/
(
x
=
((
2
%
Z
*
y
)
%
Z
+
1
%
Z
)
%
Z
).
Proof
.
intros
x
.
exists
(
div
x
2
).
refine
(
_
(
Mod_bound
x
2
_
)
(
Div_mod
x
2
_
))
;
try
easy
.
intros
H1
H2
.
simpl
in
H1
.
omega
.
Qed
.
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