Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
AVA
FloVer
Commits
8f094df0
Commit
8f094df0
authored
Feb 28, 2018
by
Heiko Becker
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Start working on coq 8.7.2 port
parent
1aa71784
Changes
2
Hide whitespace changes
Inline
Sidebyside
Showing
2 changed files
with
41 additions
and
53 deletions
+41
53
coq/Infra/RealRationalProps.v
coq/Infra/RealRationalProps.v
+40
52
coq/Infra/RealSimps.v
coq/Infra/RealSimps.v
+1
1
No files found.
coq/Infra/RealRationalProps.v
View file @
8f094df0
...
@@ 48,63 +48,51 @@ Qed.
...
@@ 48,63 +48,51 @@ Qed.
Lemma
Q2R_max
(
a
:
Q
)
(
b
:
Q
)
:
Lemma
Q2R_max
(
a
:
Q
)
(
b
:
Q
)
:
Rmax
(
Q2R
a
)
(
Q2R
b
)
=
Q2R
(
Qmax
a
b
).
Rmax
(
Q2R
a
)
(
Q2R
b
)
=
Q2R
(
Qmax
a
b
).
Proof
.
Proof
.
apply
Q
.
max_case_strong
.
destruct
(
Qlt_le_dec
a
b
).

intros
c
d
eq_c_d
Rmax_x
.

pose
proof
(
Qlt_Rlt
_
_
q
)
as
Rlt_H
.
rewrite
Rmax_x
.
rewrite
Rmax_right
;
try
lra
.
unfold
Q2R
.
f_equal
.
unfold
Qmax
.
unfold
GenericMinMax
.
gmax
.
rewrite
<
RMicromega
.
Rinv_elim
.
rewrite
Qlt_alt
in
*
.
setoid_rewrite
Rmult_comm
at
1.
rewrite
q
;
auto
.
+
rewrite
<
Rmult_assoc
.

pose
proof
(
Qle_Rle
_
_
q
)
as
Rle_H
.
rewrite
<
RMicromega
.
Rinv_elim
.
hnf
in
Rle_H
.
rewrite
<
mult_IZR
.
destruct
Rle_H
.
rewrite
eq_c_d
.
+
rewrite
Rmax_left
;
try
lra
.
rewrite
mult_IZR
.
apply
Rlt_Qlt
in
H
.
rewrite
Rmult_comm
;
auto
.
f_equal
;
unfold
Qmax
.
unfold
GenericMinMax
.
gmax
.
hnf
;
intros
.
rewrite
Qgt_alt
in
*
.
pose
proof
(
pos_INR_nat_of_P
(
Qden
d
)).
rewrite
H
;
auto
.
simpl
in
H
.
+
rewrite
Rmax_left
;
try
lra
.
rewrite
H
in
H0
.
f_equal
.
lra
.
unfold
Qmax
,
GenericMinMax
.
gmax
.
+
simpl
;
hnf
;
intros
.
apply
eqR_Qeq
in
H
.
pose
proof
(
pos_INR_nat_of_P
(
Qden
c
)).
symmetry
in
H
.
rewrite
H
in
H0
;
lra
.
rewrite
Qeq_alt
in
H
.
rewrite
H
;
auto
.

intros
less
.
apply
Qle_Rle
in
less
.
assert
(
Rmax
(
Q2R
a
)
(
Q2R
b
)
=
Q2R
a
)
by
(
apply
Rmax_left
;
auto
).
rewrite
H
;
auto
.

intros
less
.
apply
Qle_Rle
in
less
.
assert
(
Rmax
(
Q2R
a
)
(
Q2R
b
)
=
Q2R
b
)
by
(
apply
Rmax_right
;
auto
).
rewrite
H
;
auto
.
Qed
.
Qed
.
Lemma
Q2R_min
(
a
:
Q
)
(
b
:
Q
)
:
Lemma
Q2R_min
(
a
:
Q
)
(
b
:
Q
)
:
Rmin
(
Q2R
a
)
(
Q2R
b
)
=
Q2R
(
Qmin
a
b
).
Rmin
(
Q2R
a
)
(
Q2R
b
)
=
Q2R
(
Qmin
a
b
).
Proof
.
Proof
.
apply
Q
.
min_case_strong
.
destruct
(
Qlt_le_dec
a
b
).

intros
c
d
eq_c_d
Rmin_x
.

pose
proof
(
Qlt_Rlt
_
_
q
)
as
Rlt_H
.
rewrite
Rmin_x
.
rewrite
Rmin_left
;
try
lra
.
unfold
Q2R
.
f_equal
.
unfold
Qmin
.
unfold
GenericMinMax
.
gmin
.
rewrite
<
RMicromega
.
Rinv_elim
.
rewrite
Qlt_alt
in
*
.
setoid_rewrite
Rmult_comm
at
1.
rewrite
q
;
auto
.
+
rewrite
<
Rmult_assoc
.

pose
proof
(
Qle_Rle
_
_
q
)
as
Rle_H
.
rewrite
<
RMicromega
.
Rinv_elim
.
hnf
in
Rle_H
.
rewrite
<
mult_IZR
.
destruct
Rle_H
.
rewrite
eq_c_d
.
+
rewrite
Rmin_right
;
try
lra
.
rewrite
mult_IZR
.
apply
Rlt_Qlt
in
H
.
rewrite
Rmult_comm
;
auto
.
f_equal
;
unfold
Qmin
.
unfold
GenericMinMax
.
gmin
.
hnf
;
intros
.
rewrite
Qgt_alt
in
*
.
pose
proof
(
pos_INR_nat_of_P
(
Qden
d
)).
rewrite
H
;
auto
.
simpl
in
H
.
+
rewrite
Rmin_left
;
try
lra
.
rewrite
H
in
H0
.
f_equal
.
lra
.
unfold
Qmin
,
GenericMinMax
.
gmin
.
+
simpl
;
hnf
;
intros
.
apply
eqR_Qeq
in
H
.
pose
proof
(
pos_INR_nat_of_P
(
Qden
c
)).
symmetry
in
H
.
rewrite
H
in
H0
;
lra
.
rewrite
Qeq_alt
in
H
.
rewrite
H
;
auto
.

intros
less
.
apply
Qle_Rle
in
less
.
assert
(
Rmin
(
Q2R
a
)
(
Q2R
b
)
=
Q2R
a
)
by
(
apply
Rmin_left
;
auto
).
rewrite
H
;
auto
.

intros
less
.
apply
Qle_Rle
in
less
.
assert
(
Rmin
(
Q2R
a
)
(
Q2R
b
)
=
Q2R
b
)
by
(
apply
Rmin_right
;
auto
).
rewrite
H
;
auto
.
Qed
.
Qed
.
Lemma
maxAbs_impl_RmaxAbs
(
ivlo
:
Q
)
(
ivhi
:
Q
)
:
Lemma
maxAbs_impl_RmaxAbs
(
ivlo
:
Q
)
(
ivhi
:
Q
)
:
...
...
coq/Infra/RealSimps.v
View file @
8f094df0
...
@@ 77,7 +77,7 @@ Lemma Rabs_0_impl_eq (d:R):
...
@@ 77,7 +77,7 @@ Lemma Rabs_0_impl_eq (d:R):
Proof
.
Proof
.
intros
abs_leq_0
.
intros
abs_leq_0
.
pose
proof
(
Rabs_pos
d
)
as
abs_geq_0
.
pose
proof
(
Rabs_pos
d
)
as
abs_geq_0
.
pose
proof
(
Rle_antisym
(
Rabs
d
)
R
0
abs_leq_0
abs_geq_0
)
as
Rabs_eq
.
pose
proof
(
Rle_antisym
(
Rabs
d
)
0
%
R
abs_leq_0
abs_geq_0
)
as
Rabs_eq
.
rewrite
<
Rabs_R0
in
Rabs_eq
.
rewrite
<
Rabs_R0
in
Rabs_eq
.
apply
Rsqr_eq_asb_1
in
Rabs_eq
.
apply
Rsqr_eq_asb_1
in
Rabs_eq
.
rewrite
Rsqr_0
in
Rabs_eq
.
rewrite
Rsqr_0
in
Rabs_eq
.
...
...
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