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
5459fb63
Commit
5459fb63
authored
Oct 03, 2011
by
Guillaume Melquiond
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add realization of real.Abs.
parent
ff115c6a
Changes
1
Hide whitespace changes
Inline
Sidebyside
Showing
1 changed file
with
72 additions
and
0 deletions
+72
0
realizations/coq/real/Abs.v
realizations/coq/real/Abs.v
+72
0
No files found.
realizations/coq/real/Abs.v
0 → 100644
View file @
5459fb63
(
*
This
file
is
generated
by
Why3
'
s
Coq
driver
*
)
(
*
Beware
!
Only
edit
allowed
sections
below
*
)
Require
Import
ZArith
.
Require
Import
Rbase
.
Require
Import
Rbasic_fun
.
(
*
Add
Rec
LoadPath
"/home/guillaume/bin/why3/share/why3/theories"
.
*
)
(
*
Add
Rec
LoadPath
"/home/guillaume/bin/why3/share/why3/modules"
.
*
)
Require
real
.
Real
.
Definition
abs
:
R
>
R
.
(
*
YOU
MAY
EDIT
THE
PROOF
BELOW
*
)
exact
Rabs
.
Defined
.
(
*
DO
NOT
EDIT
BELOW
*
)
(
*
YOU
MAY
EDIT
THE
CONTEXT
BELOW
*
)
(
*
DO
NOT
EDIT
BELOW
*
)
Lemma
abs_def
:
forall
(
x
:
R
),
((
0
%
R
<=
x
)
%
R
>
((
abs
x
)
=
x
))
/
\
((
~
(
0
%
R
<=
x
)
%
R
)
>
((
abs
x
)
=
(

x
)
%
R
)).
(
*
YOU
MAY
EDIT
THE
PROOF
BELOW
*
)
split
;
intros
H
.
apply
Rabs_right
.
now
apply
Rle_ge
.
apply
Rabs_left
.
now
apply
Rnot_le_lt
.
Qed
.
(
*
DO
NOT
EDIT
BELOW
*
)
(
*
YOU
MAY
EDIT
THE
CONTEXT
BELOW
*
)
(
*
DO
NOT
EDIT
BELOW
*
)
Lemma
Abs_le
:
forall
(
x
:
R
)
(
y
:
R
),
((
abs
x
)
<=
y
)
%
R
<>
(((

y
)
%
R
<=
x
)
%
R
/
\
(
x
<=
y
)
%
R
).
(
*
YOU
MAY
EDIT
THE
PROOF
BELOW
*
)
intros
x
y
.
unfold
abs
,
Rabs
.
case
Rcase_abs
;
intros
H
;
(
split
;
[
intros
H0
;
split

intros
(
H0
,
H1
)]).
rewrite
<
(
Ropp_involutive
x
).
now
apply
Ropp_le_contravar
.
apply
Rlt_le
.
apply
Rlt_le_trans
with
(
1
:=
H
).
apply
Rle_trans
with
(
2
:=
H0
).
rewrite
<
Ropp_0
.
apply
Ropp_le_contravar
.
now
apply
Rlt_le
.
rewrite
<
(
Ropp_involutive
y
).
now
apply
Ropp_le_contravar
.
apply
Rge_le
in
H
.
apply
Rle_trans
with
(
2
:=
H
).
apply
Rle_trans
with
(
Ropp
x
).
now
apply
Ropp_le_contravar
.
rewrite
<
Ropp_0
.
now
apply
Ropp_le_contravar
.
exact
H0
.
exact
H1
.
Qed
.
(
*
DO
NOT
EDIT
BELOW
*
)
(
*
YOU
MAY
EDIT
THE
CONTEXT
BELOW
*
)
(
*
DO
NOT
EDIT
BELOW
*
)
Lemma
Abs_pos
:
forall
(
x
:
R
),
(
0
%
R
<=
(
abs
x
))
%
R
.
(
*
YOU
MAY
EDIT
THE
PROOF
BELOW
*
)
exact
Rabs_pos
.
Qed
.
(
*
DO
NOT
EDIT
BELOW
*
)
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