Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
F
FloVer
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
5
Issues
5
List
Boards
Labels
Service Desk
Milestones
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
AVA
FloVer
Commits
44cc2e02
Commit
44cc2e02
authored
Jun 11, 2018
by
Nikita Zyuzin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix issues notes in comments to
#10
parent
0bf463c6
Changes
6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
307 additions
and
352 deletions
+307
-352
coq/AffineArith.v
coq/AffineArith.v
+132
-170
coq/AffineArithQ.v
coq/AffineArithQ.v
+141
-173
coq/AffineValidation.v
coq/AffineValidation.v
+8
-8
coq/Infra/Ltacs.v
coq/Infra/Ltacs.v
+4
-1
coq/Infra/RationalSimps.v
coq/Infra/RationalSimps.v
+12
-0
coq/Infra/RealSimps.v
coq/Infra/RealSimps.v
+10
-0
No files found.
coq/AffineArith.v
View file @
44cc2e02
This diff is collapsed.
Click to expand it.
coq/AffineArithQ.v
View file @
44cc2e02
This diff is collapsed.
Click to expand it.
coq/AffineValidation.v
View file @
44cc2e02
...
...
@@ -587,8 +587,8 @@ Proof.
try
(
field_simplify
in
Hlt
;
assert
(
h
=
l
)
as
Hz
by
lra
;
apply
eqR_Qeq
in
Hz
;
lra
).
-
rewrite
Rdiv_abs_le_bounds
;
try
lra
.
assert
(
0
<
h
-
l
)
%
R
as
H1
by
lra
.
R
rewrite
(
vR
-
h
/
2
-
l
/
2
=
vR
-
(
h
+
l
)
/
2
)
%
R
.
R
rewrite
(
1
*
(
h
/
2
+
l
/
2
-
l
)
=
(
h
-
l
)
/
2
)
%
R
.
field_
rewrite
(
vR
-
h
/
2
-
l
/
2
=
vR
-
(
h
+
l
)
/
2
)
%
R
.
field_
rewrite
(
1
*
(
h
/
2
+
l
/
2
-
l
)
=
(
h
-
l
)
/
2
)
%
R
.
apply
Rabs_Rle_condition
;
lra
.
}
pose
(
noise
:=
exist
(
fun
x
=>
-
(
1
)
<=
x
<=
1
)
%
R
noise_expression
Hnoise
).
...
...
@@ -625,8 +625,8 @@ Proof.
try
(
field_simplify
in
Hlt
;
assert
(
h
=
l
)
as
Hz
by
lra
;
apply
eqR_Qeq
in
Hz
;
lra
).
-
rewrite
Rdiv_abs_le_bounds
;
try
lra
.
assert
(
0
<
h
-
l
)
%
R
as
H1
by
lra
.
R
rewrite
(
vR
-
h
/
2
-
l
/
2
=
vR
-
(
h
+
l
)
/
2
)
%
R
.
R
rewrite
(
1
*
(
h
/
2
+
l
/
2
-
l
)
=
(
h
-
l
)
/
2
)
%
R
.
field_
rewrite
(
vR
-
h
/
2
-
l
/
2
=
vR
-
(
h
+
l
)
/
2
)
%
R
.
field_
rewrite
(
1
*
(
h
/
2
+
l
/
2
-
l
)
=
(
h
-
l
)
/
2
)
%
R
.
apply
Rabs_Rle_condition
;
lra
.
}
pose
(
noise
:=
exist
(
fun
x
=>
-
(
1
)
<=
x
<=
1
)
%
R
noise_expression
Hnoise
).
...
...
@@ -890,9 +890,9 @@ Proof.
simpl
.
rewrite
Qeq_bool_refl
.
apply
andb_true_intro
.
split
;
rewrite
Qle_bool_iff
;
simpl
;
field_simplify
;
Q
rewrite
((
2
#
1
)
*
v
*
/
(
2
#
1
)
==
v
).
*
now
Q
rewrite
(
fst
i
/
1
==
fst
i
).
*
now
Q
rewrite
(
snd
i
/
1
==
snd
i
).
split
;
rewrite
Qle_bool_iff
;
simpl
;
field_simplify
;
field_
rewrite
((
2
#
1
)
*
v
*
/
(
2
#
1
)
==
v
).
*
now
field_
rewrite
(
fst
i
/
1
==
fst
i
).
*
now
field_
rewrite
(
snd
i
/
1
==
snd
i
).
}
assert
(
fresh
noise
(
fromIntv
(
v
,
v
)
noise
))
by
(
unfold
fromIntv
;
simpl
ivlo
;
simpl
ivhi
;
rewrite
Qeq_bool_refl
;
...
...
@@ -906,7 +906,7 @@ Proof.
simpl
.
rewrite
Q2R_plus
.
rewrite
Q2R_div
;
try
lra
.
unfold
af_evals
,
Ropt_eq
;
simpl
.
unfold
af_evals
;
simpl
.
lra
.
}
assert
(
FloverMap
.
find
(
elt
:=
affine_form
Q
)
(
Const
m
v
)
(
FloverMap
.
add
(
Const
m
v
)
(
fromIntv
(
v
,
v
)
noise
)
iexpmap
)
=
Some
(
fromIntv
(
v
,
v
)
noise
))
...
...
coq/Infra/Ltacs.v
View file @
44cc2e02
...
...
@@ -186,7 +186,10 @@ Ltac telling_rewrite pat hyp :=
Tactic
Notation
"unify asm"
open_constr
(
pat
)
hyp
(
H
)
:=
telling_rewrite
pat
H
.
Ltac
Qrewrite
H
:=
(
*
Takes
a
field
-
structure
equality
expression
,
tries
to
rewrite
the
*
)
(
*
the
left
side
in
the
goal
with
right
if
the
equality
holds
*
)
Ltac
field_rewrite
H
:=
let
tmp
:=
fresh
"tmp"
in
assert
H
as
tmp
by
(
try
field
;
try
lra
);
rewrite
tmp
;
clear
tmp
.
Ltac
destruct_ex
H
pat
:=
...
...
coq/Infra/RationalSimps.v
View file @
44cc2e02
...
...
@@ -252,3 +252,15 @@ Proof.
rewrite
Qabs_Qle_condition
in
abs_leq_0
.
lra
.
Qed
.
Lemma
Qabs_bounded
(
x
y
:
Q
)
:
-
(
1
)
<=
x
<=
1
->
Qabs
(
x
*
y
)
<=
Qabs
y
.
Proof
.
intros
.
rewrite
Qabs_Qmult
.
assert
(
Qabs
y
==
1
*
Qabs
y
)
as
tmp
by
lra
;
rewrite
tmp
at
2
;
clear
tmp
.
eapply
Qmult_le_compat_r
.
-
apply
Qabs_Qle_condition
;
auto
.
-
apply
Qabs_nonneg
.
Qed
.
coq/Infra/RealSimps.v
View file @
44cc2e02
...
...
@@ -88,6 +88,16 @@ Proof.
apply
Rsqr_0_uniq
in
Rabs_eq
;
assumption
.
Qed
.
Lemma
Rabs_bounded
(
x
y
:
R
)
:
(
-
1
<=
x
<=
1
)
%
R
->
(
Rabs
(
x
*
y
)
<=
Rabs
y
)
%
R
.
Proof
.
intros
.
rewrite
Rabs_mult
.
assert
(
Rabs
y
=
1
*
Rabs
y
)
%
R
as
tmp
by
lra
;
rewrite
tmp
at
2
;
clear
tmp
.
eapply
Rmult_le_compat_r
;
eauto
using
Rabs_pos
,
Rabs_le
.
Qed
.
Lemma
RmaxAbs_peel_Rabs
a
b
:
Rmax
(
Rabs
a
)
(
Rabs
b
)
=
Rabs
(
Rmax
(
Rabs
a
)
(
Rabs
b
)).
Proof
.
...
...
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