Commit a3856292 authored by Heiko Becker's avatar Heiko Becker

Alpha renaming of theorems

parent 4c6362dc
......@@ -244,7 +244,7 @@ Proof.
rewrite absenv_e2 in valid_bounds_e2.
simpl in valid_bounds_e2.
pose proof (distance_gives_iv nR2 nF2 (Q2R err2) (Q2R e2lo, Q2R e2hi) valid_bounds_e2 err2_bounded).
pose proof (IntervalArith.additionIsValid _ _ _ _ H1 H2).
pose proof (IntervalArith.interval_addition_valid _ _ _ _ H1 H2).
unfold IntervalArith.contained in H3.
destruct H3.
subst; simpl in *.
......@@ -324,7 +324,7 @@ Proof.
rewrite absenv_e2 in valid_bounds_e2.
simpl in valid_bounds_e2.
pose proof (distance_gives_iv nR2 nF2 (Q2R err2) (Q2R e2lo, Q2R e2hi) valid_bounds_e2 err2_bounded).
pose proof (IntervalArith.subtractionIsValid _ _ _ _ H1 H2).
pose proof (IntervalArith.interval_subtraction_valid _ _ _ _ H1 H2).
unfold IntervalArith.contained in H3.
destruct H3.
subst; simpl in *.
......@@ -1774,7 +1774,7 @@ Proof.
assert (IVhi (widenInterval (Q2R e2lo, Q2R e2hi) (Q2R err2)) < 0 \/ 0 < IVlo (widenInterval (Q2R e2lo, Q2R e2hi) (Q2R err2)))%R
as no_div_zero_widen
by (unfold widenInterval in *; simpl in *; rewrite Q2R_plus, Q2R_minus in no_div_zero_float; auto).
pose proof (IntervalArith.divisionIsValid _ _ _ _ no_div_zero_widen valid_bounds_e1_err valid_bounds_e2_err) as valid_div_float.
pose proof (IntervalArith.interval_division_valid _ _ _ _ no_div_zero_widen valid_bounds_e1_err valid_bounds_e2_err) as valid_div_float.
unfold IntervalArith.contained, widenInterval in *; simpl in *.
assert (e2lo - err2 == 0 -> False).
* hnf; intros.
......
......@@ -167,7 +167,7 @@ Qed.
Definition addInterval (iv1:interval) (iv2:interval) :=
absIntvUpd Rplus iv1 iv2.
Lemma additionIsValid iv1 iv2:
Lemma interval_addition_valid iv1 iv2:
validIntervalAdd iv1 iv2 (addInterval iv1 iv2).
Proof.
unfold validIntervalAdd.
......@@ -190,14 +190,14 @@ Qed.
Definition subtractInterval (iv1:interval) (iv2:interval) :=
addInterval iv1 (negateInterval iv2).
Corollary subtractionIsValid iv1 iv2:
Corollary interval_subtraction_valid iv1 iv2:
validIntervalSub iv1 iv2 (subtractInterval iv1 iv2).
Proof.
unfold subtractInterval.
intros a b.
intros contained_1 contained_iv2.
rewrite Rsub_eq_Ropp_Rplus.
apply additionIsValid; auto.
apply interval_addition_valid; auto.
apply interval_negation_valid; auto.
Qed.
......@@ -285,7 +285,7 @@ Qed.
Definition divideInterval (iv1:interval) (iv2:interval) :=
multInterval iv1 (mkInterval (/ (IVhi iv2)) (/ (IVlo iv2))).
Corollary divisionIsValid a b iv1 iv2:
Corollary interval_division_valid a b iv1 iv2:
(IVhi iv2 < 0 \/ 0 < IVlo iv2 -> contained a iv1 -> contained b iv2 -> contained (a / b) (divideInterval iv1 iv2))%R.
Proof.
intros nodiv0 c_a c_b.
......
......@@ -219,7 +219,7 @@ Qed.
Definition addIntv (iv1:intv) (iv2:intv) :=
absIvUpd Qplus iv1 iv2.
Lemma additionIsValid iv1 iv2:
Lemma interval_addition_valid iv1 iv2:
validIntvAdd iv1 iv2 (addIntv iv1 iv2).
Proof.
unfold validIntvAdd.
......@@ -242,14 +242,14 @@ Qed.
Definition subtractIntv (I1:intv) (I2:intv) :=
addIntv I1 (negateIntv I2).
Corollary subtractionIsValid iv1 iv2:
Corollary interval_subtraction_valid iv1 iv2:
validIntvSub iv1 iv2 (subtractIntv iv1 iv2).
Proof.
unfold subtractIntv.
intros a b.
intros contained_1 contained_I2.
rewrite Qsub_eq_Qopp_Qplus.
apply additionIsValid; auto.
apply interval_addition_valid; auto.
apply intv_negation_valid; auto.
Qed.
......@@ -348,7 +348,7 @@ Qed.
Definition divideIntv (I1:intv) (I2:intv) :=
multIntv I1 (mkIntv (/ (ivhi I2)) (/ (ivlo I2))).
Corollary divisionIsValid a b (I1:intv) (I2:intv) :
Corollary interval_division_valid a b (I1:intv) (I2:intv) :
ivhi I2 < 0 \/ 0 < ivlo I2 -> contained a I1 -> contained b I2 -> contained (a / b) (divideIntv I1 I2).
Proof.
intros nodiv0 c_a c_b.
......
......@@ -318,7 +318,7 @@ Proof.
rewrite absenv_f1 in IHf1.
rewrite absenv_f2 in IHf2.
destruct b; simpl in *.
+ pose proof (additionIsValid (Q2R (fst iv1),Q2R (snd iv1)) (Q2R (fst iv2), Q2R (snd iv2))) as valid_add.
+ pose proof (interval_addition_valid (Q2R (fst iv1),Q2R (snd iv1)) (Q2R (fst iv2), Q2R (snd iv2))) as valid_add.
unfold validIntervalAdd in valid_add.
specialize (valid_add v1 v2 IHf1 IHf2).
unfold contained in valid_add.
......@@ -343,7 +343,7 @@ Proof.
repeat rewrite <- Q2R_plus in valid_add_hi.
rewrite <- Q2R_max4 in valid_add_hi.
unfold absIvUpd; auto. }
+ pose proof (subtractionIsValid (Q2R (fst iv1),Q2R (snd iv1)) (Q2R (fst iv2), Q2R (snd iv2))) as valid_sub.
+ pose proof (interval_subtraction_valid (Q2R (fst iv1),Q2R (snd iv1)) (Q2R (fst iv2), Q2R (snd iv2))) as valid_sub.
specialize (valid_sub v1 v2 IHf1 IHf2).
unfold contained in valid_sub.
unfold isSupersetIntv in valid_bin.
......@@ -393,7 +393,7 @@ Proof.
repeat rewrite <- Q2R_mult in valid_mul_hi.
rewrite <- Q2R_max4 in valid_mul_hi.
unfold absIvUpd; auto.
+ pose proof (divisionIsValid v1 v2 (Q2R (fst iv1), Q2R (snd iv1)) (Q2R (fst iv2),Q2R (snd iv2))) as valid_div.
+ pose proof (interval_division_valid v1 v2 (Q2R (fst iv1), Q2R (snd iv1)) (Q2R (fst iv2),Q2R (snd iv2))) as valid_div.
unfold contained in valid_div.
unfold isSupersetIntv in valid_bin.
apply andb_prop_elim in valid_bin; destruct valid_bin as [valid_bin nodiv0].
......
#############################################################################
## v # The Coq Proof Assistant ##
## <O___,, # INRIA - CNRS - LIX - LRI - PPS ##
## \VV/ # ##
## // # Makefile automagically generated by coq_makefile V8.5pl2 ##
#############################################################################
# WARNING
#
# This Makefile has been automagically generated
# Edit at your own risks !
#
# END OF WARNING
#
# This Makefile was generated by the command line :
# coq_makefile -f _CoqProject -o Makefile
#
.DEFAULT_GOAL := all
# This Makefile may take arguments passed as environment variables:
# COQBIN to specify the directory where Coq binaries resides;
# TIMECMD set a command to log .v compilation time;
# TIMED if non empty, use the default time command as TIMECMD;
# ZDEBUG/COQDEBUG to specify debug flags for ocamlc&ocamlopt/coqc;
# DSTROOT to specify a prefix to install path.
# Here is a hack to make $(eval $(shell works:
define donewline
endef
includecmdwithout@ = $(eval $(subst @,$(donewline),$(shell { $(1) | tr -d '\r' | tr '\n' '@'; })))
$(call includecmdwithout@,$(COQBIN)coqtop -config)
TIMED=
TIMECMD?=
STDTIME?=/usr/bin/time -f "$* (user: %U mem: %M ko)"
TIMER=$(if $(TIMED), $(STDTIME), $(TIMECMD))
vo_to_obj = $(addsuffix .o,\
$(filter-out Warning: Error:,\
$(shell $(COQBIN)coqtop -q -noinit -batch -quiet -print-mod-uid $(1))))
##########################
# #
# Libraries definitions. #
# #
##########################
COQLIBS?=\
-R "." Daisy
COQCHKLIBS?=\
-R "." Daisy
COQDOCLIBS?=\
-R "." Daisy
##########################
# #
# Variables definitions. #
# #
##########################
OPT?=
COQDEP?="$(COQBIN)coqdep" -c
COQFLAGS?=-q $(OPT) $(COQLIBS) $(OTHERFLAGS) $(COQ_XML)
COQCHKFLAGS?=-silent -o
COQDOCFLAGS?=-interpolate -utf8
COQC?=$(TIMER) "$(COQBIN)coqc"
GALLINA?="$(COQBIN)gallina"
COQDOC?="$(COQBIN)coqdoc"
COQCHK?="$(COQBIN)coqchk"
COQMKTOP?="$(COQBIN)coqmktop"
##################
# #
# Install Paths. #
# #
##################
ifdef USERINSTALL
XDG_DATA_HOME?="$(HOME)/.local/share"
COQLIBINSTALL=$(XDG_DATA_HOME)/coq
COQDOCINSTALL=$(XDG_DATA_HOME)/doc/coq
else
COQLIBINSTALL="${COQLIB}user-contrib"
COQDOCINSTALL="${DOCDIR}user-contrib"
COQTOPINSTALL="${COQLIB}toploop"
endif
######################
# #
# Files dispatching. #
# #
######################
VFILES:=Expressions.v\
IntervalArith.v\
Environments.v\
output/certificate_DivisionSimple_divisionSimple.v\
output/certificate_Doppler_doppler.v\
Commands.v\
CertificateChecker.v\
IntervalValidation.v\
ErrorBounds.v\
IntervalArithQ.v\
ErrorValidation.v\
Infra/RealSimps.v\
Infra/Ltacs.v\
Infra/Abbrevs.v\
Infra/RationalSimps.v\
Infra/RealRationalProps.v\
Infra/ExpressionAbbrevs.v
ifneq ($(filter-out archclean clean cleanall printenv,$(MAKECMDGOALS)),)
-include $(addsuffix .d,$(VFILES))
else
ifeq ($(MAKECMDGOALS),)
-include $(addsuffix .d,$(VFILES))
endif
endif
.SECONDARY: $(addsuffix .d,$(VFILES))
VO=vo
VOFILES:=$(VFILES:.v=.$(VO))
GLOBFILES:=$(VFILES:.v=.glob)
GFILES:=$(VFILES:.v=.g)
HTMLFILES:=$(VFILES:.v=.html)
GHTMLFILES:=$(VFILES:.v=.g.html)
OBJFILES=$(call vo_to_obj,$(VOFILES))
ALLNATIVEFILES=$(OBJFILES:.o=.cmi) $(OBJFILES:.o=.cmo) $(OBJFILES:.o=.cmx) $(OBJFILES:.o=.cmxs)
NATIVEFILES=$(foreach f, $(ALLNATIVEFILES), $(wildcard $f))
ifeq '$(HASNATDYNLINK)' 'true'
HASNATDYNLINK_OR_EMPTY := yes
else
HASNATDYNLINK_OR_EMPTY :=
endif
#######################################
# #
# Definition of the toplevel targets. #
# #
#######################################
all: $(VOFILES)
quick: $(VOFILES:.vo=.vio)
vio2vo:
$(COQC) $(COQDEBUG) $(COQFLAGS) -schedule-vio2vo $(J) $(VOFILES:%.vo=%.vio)
checkproofs:
$(COQC) $(COQDEBUG) $(COQFLAGS) -schedule-vio-checking $(J) $(VOFILES:%.vo=%.vio)
gallina: $(GFILES)
html: $(GLOBFILES) $(VFILES)
- mkdir -p html
$(COQDOC) -toc $(COQDOCFLAGS) -html $(COQDOCLIBS) -d html $(VFILES)
gallinahtml: $(GLOBFILES) $(VFILES)
- mkdir -p html
$(COQDOC) -toc $(COQDOCFLAGS) -html -g $(COQDOCLIBS) -d html $(VFILES)
all.ps: $(VFILES)
$(COQDOC) -toc $(COQDOCFLAGS) -ps $(COQDOCLIBS) -o $@ `$(COQDEP) -sort -suffix .v $^`
all-gal.ps: $(VFILES)
$(COQDOC) -toc $(COQDOCFLAGS) -ps -g $(COQDOCLIBS) -o $@ `$(COQDEP) -sort -suffix .v $^`
all.pdf: $(VFILES)
$(COQDOC) -toc $(COQDOCFLAGS) -pdf $(COQDOCLIBS) -o $@ `$(COQDEP) -sort -suffix .v $^`
all-gal.pdf: $(VFILES)
$(COQDOC) -toc $(COQDOCFLAGS) -pdf -g $(COQDOCLIBS) -o $@ `$(COQDEP) -sort -suffix .v $^`
validate: $(VOFILES)
$(COQCHK) $(COQCHKFLAGS) $(COQCHKLIBS) $(notdir $(^:.vo=))
beautify: $(VFILES:=.beautified)
for file in $^; do mv $${file%.beautified} $${file%beautified}old && mv $${file} $${file%.beautified}; done
@echo 'Do not do "make clean" until you are sure that everything went well!'
@echo 'If there were a problem, execute "for file in $$(find . -name \*.v.old -print); do mv $${file} $${file%.old}; done" in your shell/'
.PHONY: all archclean beautify byte clean cleanall gallina gallinahtml html install install-doc install-natdynlink install-toploop opt printenv quick uninstall userinstall validate vio2vo
####################
# #
# Special targets. #
# #
####################
byte:
$(MAKE) all "OPT:=-byte"
opt:
$(MAKE) all "OPT:=-opt"
userinstall:
+$(MAKE) USERINSTALL=true install
install:
cd "." && for i in $(VOFILES) $(VFILES) $(GLOBFILES) $(NATIVEFILES) $(CMOFILES) $(CMIFILES) $(CMAFILES); do \
install -d "`dirname "$(DSTROOT)"$(COQLIBINSTALL)/Daisy/$$i`"; \
install -m 0644 $$i "$(DSTROOT)"$(COQLIBINSTALL)/Daisy/$$i; \
done
install-doc:
install -d "$(DSTROOT)"$(COQDOCINSTALL)/Daisy/html
for i in html/*; do \
install -m 0644 $$i "$(DSTROOT)"$(COQDOCINSTALL)/Daisy/$$i;\
done
uninstall_me.sh: Makefile
echo '#!/bin/sh' > $@
printf 'cd "$${DSTROOT}"$(COQLIBINSTALL)/Daisy && rm -f $(VOFILES) $(VFILES) $(GLOBFILES) $(NATIVEFILES) $(CMOFILES) $(CMIFILES) $(CMAFILES) && find . -type d -and -empty -delete\ncd "$${DSTROOT}"$(COQLIBINSTALL) && find "Daisy" -maxdepth 0 -and -empty -exec rmdir -p \{\} \;\n' >> "$@"
printf 'cd "$${DSTROOT}"$(COQDOCINSTALL)/Daisy \\\n' >> "$@"
printf '&& rm -f $(shell find "html" -maxdepth 1 -and -type f -print)\n' >> "$@"
printf 'cd "$${DSTROOT}"$(COQDOCINSTALL) && find Daisy/html -maxdepth 0 -and -empty -exec rmdir -p \{\} \;\n' >> "$@"
chmod +x $@
uninstall: uninstall_me.sh
sh $<
.merlin:
@echo 'FLG -rectypes' > .merlin
@echo "B $(COQLIB) kernel" >> .merlin
@echo "B $(COQLIB) lib" >> .merlin
@echo "B $(COQLIB) library" >> .merlin
@echo "B $(COQLIB) parsing" >> .merlin
@echo "B $(COQLIB) pretyping" >> .merlin
@echo "B $(COQLIB) interp" >> .merlin
@echo "B $(COQLIB) printing" >> .merlin
@echo "B $(COQLIB) intf" >> .merlin
@echo "B $(COQLIB) proofs" >> .merlin
@echo "B $(COQLIB) tactics" >> .merlin
@echo "B $(COQLIB) tools" >> .merlin
@echo "B $(COQLIB) toplevel" >> .merlin
@echo "B $(COQLIB) stm" >> .merlin
@echo "B $(COQLIB) grammar" >> .merlin
@echo "B $(COQLIB) config" >> .merlin
clean::
rm -f $(OBJFILES) $(OBJFILES:.o=.native) $(NATIVEFILES)
find . -name .coq-native -type d -empty -delete
rm -f $(VOFILES) $(VOFILES:.vo=.vio) $(GFILES) $(VFILES:.v=.v.d) $(VFILES:=.beautified) $(VFILES:=.old)
rm -f all.ps all-gal.ps all.pdf all-gal.pdf all.glob $(VFILES:.v=.glob) $(VFILES:.v=.tex) $(VFILES:.v=.g.tex) all-mli.tex
- rm -rf html mlihtml uninstall_me.sh
cleanall:: clean
rm -f $(patsubst %.v,.%.aux,$(VFILES))
archclean::
rm -f *.cmx *.o
printenv:
@"$(COQBIN)coqtop" -config
@echo 'CAMLC = $(CAMLC)'
@echo 'CAMLOPTC = $(CAMLOPTC)'
@echo 'PP = $(PP)'
@echo 'COQFLAGS = $(COQFLAGS)'
@echo 'COQLIBINSTALL = $(COQLIBINSTALL)'
@echo 'COQDOCINSTALL = $(COQDOCINSTALL)'
Makefile: _CoqProject
mv -f $@ $@.bak
"$(COQBIN)coq_makefile" -f $< -o $@
###################
# #
# Implicit rules. #
# #
###################
$(VOFILES): %.vo: %.v
$(COQC) $(COQDEBUG) $(COQFLAGS) $<
$(GLOBFILES): %.glob: %.v
$(COQC) $(COQDEBUG) $(COQFLAGS) $<
$(VFILES:.v=.vio): %.vio: %.v
$(COQC) -quick $(COQDEBUG) $(COQFLAGS) $<
$(GFILES): %.g: %.v
$(GALLINA) $<
$(VFILES:.v=.tex): %.tex: %.v
$(COQDOC) $(COQDOCFLAGS) -latex $< -o $@
$(HTMLFILES): %.html: %.v %.glob
$(COQDOC) $(COQDOCFLAGS) -html $< -o $@
$(VFILES:.v=.g.tex): %.g.tex: %.v
$(COQDOC) $(COQDOCFLAGS) -latex -g $< -o $@
$(GHTMLFILES): %.g.html: %.v %.glob
$(COQDOC) $(COQDOCFLAGS) -html -g $< -o $@
$(addsuffix .d,$(VFILES)): %.v.d: %.v
$(COQDEP) $(COQLIBS) "$<" > "$@" || ( RV=$$?; rm -f "$@"; exit $${RV} )
$(addsuffix .beautified,$(VFILES)): %.v.beautified:
$(COQC) $(COQDEBUG) $(COQFLAGS) -beautify $*.v
# WARNING
#
# This Makefile has been automagically generated
# Edit at your own risks !
#
# END OF WARNING
ifeq ($(wildcard time.rb)$(wildcard .timing),time.rb.timing)
export TIMECMD=@./time.rb $(if $(findstring j,$(MAKEFLAGS)),--parallel,)
endif
......@@ -202,7 +202,7 @@ Proof.
assert (contained (cst1) (mkInterval cst1 cst1)) as cst1Contained by (apply validPointInterval).
assert (contained (cenv u + cst1) (addInterval (mkInterval (-100) (100)) (mkInterval cst1 cst1)))
as containedAdd
by (apply additionIsValid; auto).
by (apply interval_addition_valid; auto).
unfold contained in *; simpl in *.
destruct uContained, cst1Contained, containedAdd.
assert (Rabs cst1 = cst1) by (assert (0 <= cst1)%R by (unfold cst1; interval); rewrite Rabs_pos_eq; auto).
......@@ -333,7 +333,7 @@ Qed.
assert (contained (cst1) (mkInterval cst1 cst1)) as cst1Contained by (apply validPointInterval).
assert (contained (cenv u + cst1) (addInterval (mkInterval (-100) (100)) (mkInterval cst1 cst1)))
as containedAdd
by (apply additionIsValid; auto).
by (apply interval_addition_valid; auto).
unfold contained in *; simpl in *.
destruct uContained, cst1Contained, containedAdd.
assert (Rabs cst1 = cst1) by (assert (0 <= cst1)%R by (unfold cst1; interval); rewrite Rabs_pos_eq; auto).
......
......@@ -258,7 +258,7 @@ Proof.
assert (contained (cst1) (mkInterval cst1 cst1)) as cst1Contained by (apply validPointInterval).
assert (contained (cenv u + cst1) (addInterval (mkInterval (-100) (100)) (mkInterval cst1 cst1)))
as containedAdd
by (apply additionIsValid; auto).
by (apply interval_addition_valid; auto).
unfold contained in *; simpl in *.
destruct uContained, cst1Contained, containedAdd.
assert (Rabs cst1 = cst1) by (assert (0 <= cst1)%R by (unfold cst1; interval); rewrite Rabs_pos_eq; auto).
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment