Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
AVA
FloVer
Commits
e1c27762
Commit
e1c27762
authored
Aug 15, 2016
by
Heiko Becker
Browse files
Big cleanup in Coq dev
parent
43840665
Changes
23
Hide whitespace changes
Inline
Side-by-side
coq/
a
bs
_er
r.v
→
coq/
A
bs
oluteErro
r.v
View file @
e1c27762
...
...
@@ -3,7 +3,8 @@
used
to
verify
analsysis
result
in
the
final
theorem
of
a
certificate
.
**
)
Require
Import
Coq
.
Reals
.
Reals
.
Require
Import
Daisy
.
daisy_lang
Daisy
.
exps
Daisy
.
Infra
.
abbrevs
Daisy
.
newIntervalArith
.
Require
Import
Daisy
.
Infra
.
Abbrevs
Daisy
.
Infra
.
RealConstruction
.
Require
Import
Daisy
.
IntervalArith
Daisy
.
Expressions
Daisy
.
Commands
.
Definition
abs_env
:
Type
:=
exp
R
->
interval
->
err
->
Prop
.
...
...
coq/
daisy_lang
.v
→
coq/
Commands
.v
View file @
e1c27762
...
...
@@ -2,7 +2,7 @@
Formalization
of
the
Abstract
Syntax
Tree
of
a
subset
used
in
the
Daisy
framework
**
)
Require
Import
Coq
.
Reals
.
Reals
.
Require
Import
Daisy
.
e
xps
.
Require
Import
Daisy
.
E
xp
ression
s
.
(
**
Next
define
what
a
program
is
.
Currently
no
loops
,
only
conditionals
and
assignments
...
...
coq/
e
xps.v
→
coq/
E
xp
ression
s.v
View file @
e1c27762
...
...
@@ -2,7 +2,7 @@
Formalization
of
the
base
expression
language
for
the
daisy
framework
**
)
Require
Import
Coq
.
Reals
.
Reals
Interval
.
Interval_tactic
.
Require
Import
Daisy
.
realConvers
ion
.
Require
Import
Daisy
.
Infra
.
RealConstruct
ion
.
Set
Implicit
Arguments
.
(
**
Expressions
will
use
binary
operators
.
...
...
@@ -138,7 +138,7 @@ Proof.
-
apply
Rabs_pos
.
-
assert
(
Rabs
machineEpsilon
=
machineEpsilon
).
+
unfold
machineEpsilon
.
unfold
realFromNum
,
negPow
.
unfold
realFromNum
,
neg
ative
Pow
er
.
unfold
Rabs
.
destruct
Rcase_abs
;
auto
.
exfalso
.
...
...
@@ -155,7 +155,9 @@ Lemma var_abs_err_bounded (n:nat) (nR:R) (nF:R) (cenv:nat->R) (nlo:R) (nhi:R):
Proof
.
intros
[
lo_le_env
env_le_hi
]
eval_real
eval_float
.
inversion
eval_real
;
subst
.
rewrite
perturb_0_val
.
(
*
rewrite
perturb_0_val
.
*
)
Admitted
.
(
**
Using
the
parametric
expressions
,
define
boolean
expressions
for
conditionals
**
)
...
...
coq/Infra/
a
bbrevs.v
→
coq/Infra/
A
bbrevs.v
View file @
e1c27762
File moved
coq/Infra/RealConstruction.v
0 → 100644
View file @
e1c27762
Require
Import
Coq
.
Reals
.
Reals
.
(
**
Abbreviations
for
construction
proper
real
numbers
from
injected
natural
numbers
**
)
Definition
negativePower
(
base
:
R
)
(
exp
:
nat
)
:
R
:=
1
/
(
pow
base
exp
).
Definition
realFromNum
(
n
:
R
)
(
unitsBehindColon
:
nat
)
(
exp
:
nat
)
:=
(
n
*
(
negativePower
(
10
)
%
R
unitsBehindColon
)
*
(
negativePower
(
2
)
%
R
exp
))
%
R
.
\ No newline at end of file
coq/Infra/abbrevs.v.d
deleted
100644 → 0
View file @
43840665
Infra
/
abbrevs
.
vo
Infra
/
abbrevs
.
glob
Infra
/
abbrevs
.
v
.
beautified
:
Infra
/
abbrevs
.
v
Infra
/
abbrevs
.
vio
:
Infra
/
abbrevs
.
v
coq/
new
IntervalArith.v
→
coq/IntervalArith.v
View file @
e1c27762
...
...
@@ -3,7 +3,7 @@
TODO:
Package
this
into
a
class
or
module
that
depends
only
on
proving
the
existence
of
basic
operators
instead
**
)
Require
Import
Coq
.
Reals
.
Reals
Coq
.
micromega
.
Psatz
.
Require
Import
Daisy
.
Infra
.
a
bbrevs
.
Require
Import
Daisy
.
Infra
.
A
bbrevs
Daisy
.
Expressions
.
(
**
Intervals
are
a
type
,
consisting
of
a
pair
of
two
real
numbers
Additionally
add
some
constructing
and
destructing
definitions
for
encapsulation
and
...
...
@@ -185,8 +185,7 @@ Proof.
unfold
substractInterval
.
intros
a
b
.
intros
contained_1
contained_I2
.
rewrite
Rsub_eq_Ropp_plus
.
rewrite
simpl_eq
.
rewrite
Rsub_eq_Ropp_Rplus
.
apply
additionIsValid
;
auto
.
apply
negationIsValid
;
auto
.
Qed
.
...
...
coq/
s
imple
_d
oppler.v
→
coq/
S
imple
D
oppler.v
View file @
e1c27762
Require
Import
Coq
.
Reals
.
Reals
Interval
.
Interval_tactic
Coq
.
micromega
.
Psatz
.
Require
Import
Daisy
.
a
bs
_err
Daisy
.
daisy_lang
Daisy
.
new
IntervalArith
Daisy
.
e
xps
Daisy
.
realConvers
ion
.
Require
Import
Daisy
.
A
bs
oluteError
Daisy
.
Commands
Daisy
.
IntervalArith
Daisy
.
E
xp
ression
s
Daisy
.
Infra
.
RealConstruct
ion
.
(
*
[
Info
]
...
...
@@ -69,18 +69,18 @@ Proof.
apply
(
AbsErrConst
cst1
(
mkInterval
cst1
cst1
)
errCst1
);
[
constructor
|
].
unfold
isSoundErr
;
simpl
.
unfold
errCst1
,
cst1
,
machineEpsilon
.
assert
(
1657
/
5
>=
0
)
%
R
by
(
unfold
realFromNum
,
negPow
;
interval
).
assert
(
1657
/
5
>=
0
)
%
R
by
(
unfold
realFromNum
,
neg
ative
Pow
er
;
interval
).
unfold
Rabs
;
destruct
Rcase_abs
as
[
lt_plus
|
ge_plus
];
[
exfalso
;
apply
Rlt_not_le
in
lt_plus
;
apply
lt_plus
;
apply
Rge_le
in
H
;
auto
|
].
rewrite
Rmax_left
;
[
|
apply
Req_le
;
auto
].
unfold
realFromNum
,
negPow
.
unfold
realFromNum
,
neg
ative
Pow
er
.
interval
.
+
apply
(
AbsErrVar
u
(
mkInterval
(
-
100
)
(
100
))
errVaru
);
[
constructor
|
].
unfold
isSoundErr
;
simpl
.
unfold
machineEpsilon
,
errVaru
.
unfold
realFromNum
.
unfold
negPow
.
unfold
neg
ative
Pow
er
.
assert
(
Rabs
(
-
100
)
=
100
%
R
)
by
(
unfold
Rabs
;
destruct
Rcase_abs
;
lra
).
rewrite
H
.
assert
(
Rabs
100
=
100
)
%
R
by
(
unfold
Rabs
;
destruct
Rcase_abs
;
lra
).
...
...
@@ -106,7 +106,7 @@ Proof.
apply
Req_le
;
auto
.
*
unfold
isSoundErr
;
simpl
.
unfold
lowerBoundAddUCst
,
upperBoundAddUCst
,
errAddUCst
.
unfold
machineEpsilon
,
realFromNum
,
negPow
.
unfold
machineEpsilon
,
realFromNum
,
neg
ative
Pow
er
.
assert
(
0
<=
(
1157
/
5
))
%
R
by
interval
.
assert
(
0
<=
(
2157
/
5
))
%
R
by
interval
.
repeat
rewrite
Rabs_pos_eq
;
auto
.
...
...
@@ -131,11 +131,11 @@ Proof.
by
(
apply
additionIsValid
;
auto
).
assert
(
contained
(
errCst1
)
(
mkInterval
(
-
errCst1
)
(
errCst1
)))
as
errCst1Contained
.
+
unfold
contained
;
simpl
;
split
.
*
unfold
errCst1
.
unfold
realFromNum
.
unfold
negPow
.
interval
.
*
unfold
errCst1
.
unfold
realFromNum
.
unfold
neg
ative
Pow
er
.
interval
.
*
apply
Req_le
;
auto
.
+
assert
(
contained
(
errVaru
)
(
mkInterval
(
-
errVaru
)
(
errVaru
)))
as
errVaruContained
by
(
split
;
[
simpl
;
unfold
errVaru
,
realFromNum
,
negPow
;
interval
|
apply
Req_le
;
auto
]).
by
(
split
;
[
simpl
;
unfold
errVaru
,
realFromNum
,
neg
ative
Pow
er
;
interval
|
apply
Req_le
;
auto
]).
assert
(
contained
(
cst1
+
errCst1
)
(
addInterval
(
mkInterval
cst1
cst1
)
(
mkInterval
(
-
errCst1
)
(
errCst1
))))
as
floatCst1Contained
by
(
apply
additionIsValid
;
auto
).
...
...
@@ -149,7 +149,7 @@ Proof.
by
(
apply
additionIsValid
;
auto
).
assert
(
contained
errAddUCst
(
mkInterval
(
-
errAddUCst
)
errAddUCst
))
as
errAddUCstContained
by
(
split
;
[
simpl
;
unfold
errAddUCst
,
realFromNum
,
negPow
;
interval
|
apply
Req_le
;
auto
]).
by
(
split
;
[
simpl
;
unfold
errAddUCst
,
realFromNum
,
neg
ative
Pow
er
;
interval
|
apply
Req_le
;
auto
]).
assert
(
contained
((
cst1
+
errCst1
)
+
(
cenv
u
+
errVaru
)
+
errAddUCst
)
(
addInterval
(
addInterval
(
addInterval
(
mkInterval
cst1
cst1
)
(
mkInterval
(
-
errCst1
)
(
errCst1
)))
...
...
coq/_CoqProject
View file @
e1c27762
-R ./ Daisy
Infra/abbrevs.v
exps.v
daisy_lang.v
newIntervalArith.v
interval_arith.v
abs_err.v
simple_doppler.v
realConversion.v
-R . Daisy
./Expressions.v
./AbsoluteError.v
./Infra/Abbrevs.v
./Infra/RealConstruction.v
./Commands.v
./IntervalArith.v
./SimpleDoppler.v
coq/abstraction_thm.v
→
coq/
attic/
abstraction_thm.v
View file @
e1c27762
File moved
coq/interval_arith.v
→
coq/
attic/
interval_arith.v
View file @
e1c27762
File moved
coq/toy_example.v
→
coq/
attic/
toy_example.v
View file @
e1c27762
File moved
coq/configure_coq.sh
0 → 100755
View file @
e1c27762
#!/bin/sh
echo
"-R . Daisy"
>
_CoqProject
find
.
-path
./attic
-prune
-o
-name
"*.v"
-print
>>
_CoqProject
coq/realConversion.v
deleted
100644 → 0
View file @
43840665
Require
Import
Coq
.
Reals
.
Reals
.
(
**
Abbreviations
for
construction
proper
real
numbers
from
injected
natural
numbers
**
)
Definition
negPow
(
base
:
R
)
(
exp
:
nat
)
:
R
:=
1
/
(
pow
base
exp
).
Definition
realFromNum
(
n
:
R
)
(
unitsBehindColon
:
nat
)
(
exp
:
nat
)
:=
(
n
*
(
negPow
(
10
)
%
R
unitsBehindColon
)
*
(
negPow
(
2
)
%
R
exp
))
%
R
.
\ No newline at end of file
hol/
a
bs
_er
r.hl
→
hol/
A
bs
oluteErro
r.hl
View file @
e1c27762
File moved
hol/
daisy_lang.hl
→
hol/
Commands.v
View file @
e1c27762
File moved
hol/
e
xps.hl
→
hol/
E
xp
ression
s.hl
View file @
e1c27762
File moved
hol/
i
nterval
_a
rith.hl
→
hol/
I
nterval
A
rith.hl
View file @
e1c27762
File moved
hol/
s
imple
_d
oppler.hl
→
hol/
S
imple
D
oppler.hl
View file @
e1c27762
File moved
hol/daisy_ann.hl
→
hol/
attic/
daisy_ann.hl
View file @
e1c27762
File moved
Prev
1
2
Next
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