From ffe34220d80cba65eccf2396fba7f692cc6448c8 Mon Sep 17 00:00:00 2001 From: Ferruccio Guidi Date: Thu, 25 Aug 2011 13:20:47 +0000 Subject: [PATCH] - weakening leq, we proved cpr_bind_dx - we imple,ented some statistics in the Makefile --- .../lambda-delta/Basic-2/reduction/cpr.ma | 21 ++++++----- .../lambda-delta/Basic-2/substitution/drop.ma | 2 +- .../lambda-delta/Basic-2/substitution/leq.ma | 25 ++----------- matita/matita/contribs/lambda-delta/Makefile | 37 ++++++++++++++++++- 4 files changed, 51 insertions(+), 34 deletions(-) diff --git a/matita/matita/contribs/lambda-delta/Basic-2/reduction/cpr.ma b/matita/matita/contribs/lambda-delta/Basic-2/reduction/cpr.ma index 090c6cf6f..245cadff9 100644 --- a/matita/matita/contribs/lambda-delta/Basic-2/reduction/cpr.ma +++ b/matita/matita/contribs/lambda-delta/Basic-2/reduction/cpr.ma @@ -33,18 +33,19 @@ lemma cpr_tps: ∀L,T1,T2,d,e. L ⊢ T1 [d, e] ≫ T2 → L ⊢ T1 ⇒ T2. lemma cpr_refl: ∀L,T. L ⊢ T ⇒ T. /2/ qed. -(* -(* NOTE: new property *) -lemma cpr_bind: ∀I,L,V1,V2,T1,T2. - V1 ⇒ V2 → L. 𝕓{I} V2 ⊢ T1 ⇒ T2 → L ⊢ 𝕓{I} V1. T1 ⇒ 𝕓{I} V2. T2. + +lemma cpr_bind_sn: ∀I,L,V1,V2,T1,T2. L ⊢ V1 ⇒ V2 → T1 ⇒ T2 → + L ⊢ 𝕓{I} V1. T1 ⇒ 𝕓{I} V2. T2. +#I #L #V1 #V2 #T1 #T2 * /3 width=5/ +qed. + +lemma cpr_bind_dx: ∀I,L,V1,V2,T1,T2. V1 ⇒ V2 → L. 𝕓{I} V2 ⊢ T1 ⇒ T2 → + L ⊢ 𝕓{I} V1. T1 ⇒ 𝕓{I} V2. T2. #I #L #V1 #V2 #T1 #T2 #HV12 * #T #HT1 normalize #HT2 elim (tps_split_up … HT2 1 ? ?) -HT2 // #T0 (plus_minus_m_m d 1) /2/ +#L1 #L2 #d #e #HL12 #Hd >(plus_minus_m_m d 1) /2/ qed. -lemma leq_fwd_length: ∀L1,L2,d,e. L1 [d, e] ≈ L2 → |L1| = |L2|. -#L1 #L2 #d #e #H elim H -H L1 L2 d e; normalize // -qed. - (* Basic inversion lemmas ***************************************************) - -lemma leq_inv_sort1_aux: ∀L1,L2,d,e. L1 [d, e] ≈ L2 → L1 = ⋆ → L2 = ⋆. -#L1 #L2 #d #e #H elim H -H L1 L2 d e -[ // -| #L1 #L2 #I1 #I2 #V1 #V2 #_ #_ #H destruct -| #L1 #L2 #I #V #e #_ #_ #H destruct -| #L1 #L2 #I1 #I2 #V1 #V2 #d #e #_ #_ #H destruct -qed. - -lemma leq_inv_sort1: ∀L2,d,e. ⋆ [d, e] ≈ L2 → L2 = ⋆. -/2 width=5/ qed. - -lemma leq_inv_sort2: ∀L1,d,e. L1 [d, e] ≈ ⋆ → L1 = ⋆. -/3/ qed. diff --git a/matita/matita/contribs/lambda-delta/Makefile b/matita/matita/contribs/lambda-delta/Makefile index b435949e3..978291c7d 100644 --- a/matita/matita/contribs/lambda-delta/Makefile +++ b/matita/matita/contribs/lambda-delta/Makefile @@ -5,8 +5,43 @@ XOA = xoa.native CONF = Ground-2/xoa.conf.xml TARGETS = Ground-2/xoa_natation.ma Ground-2/xoa.ma -all: $(TARGETS) +all: + +xoa: $(TARGETS) $(TARGETS): $(CONF) @echo " EXEC $(XOA) $(CONF)" $(H)MATITA_RT_BASE_DIR=../.. $(XOA_DIR)/$(XOA) $(CONF) + +stats: MAS = $(shell find -name "*.ma") + +stats: CHARS = $(shell cat $(MAS) | wc -c) + +stats: + @printf '\e[1;40;35m' + @printf '%-8s %6i' Chars $(CHARS) + @printf ' %-8s %5i' Lines `cat $(MAS) | wc -l` + @printf ' %-6s %3i' Pages `echo $$(($(CHARS) / 5120))` + @printf '\e[0m\n' + @printf '\e[1;40;36m' + @printf '%-8s %6i' Sources `ls $(MAS) | wc -l` + @printf ' %-27s' '' +# @printf ' %-8s %5i' Objs `ls *.vo | wc -l` +# @printf ' %-6s %3i' Files `ls *.v | wc -l` + @printf '\e[0m\n' + @printf '\e[1;40;32m' + @printf '%-8s %6i' Theorems `grep theorem $(MAS) | wc -l` + @printf ' %-8s %5i' Lemmas `grep lemma $(MAS) | wc -l` + @printf ' %-6s %3i' Proofs `grep qed $(MAS) | wc -l` +# @printf ' %-9s %3i' Generated `grep Derive *.v | wc -l` + @printf '\e[0m\n' + @printf '\e[1;40;33m' + @printf '%-8s %6i' Defs `grep "definition\|let rec\|inductive\|record" $(MAS) | wc -l` + @printf ' %-27s' '' +# @printf ' %-8s %5i' Local `grep "Local" *.v | wc -l` + @printf '\e[0m\n' + @printf '\e[1;40;31m' + @printf '%-8s %6i' Axioms `grep axiom $(MAS) | wc -l` + @printf ' %-8s %5i' Comments `grep "(\*[^*]*$$" $(MAS) | wc -l` + @printf ' %-6s %3i' Marks `grep "(\*\*)" $(MAS) | wc -l` + @printf '\e[0m\n' -- 2.39.2