From: Enrico Tassi Date: Mon, 23 Jun 2008 16:11:47 +0000 (+0000) Subject: more work, but russell too slow X-Git-Tag: make_still_working~4998 X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=commitdiff_plain;h=25aa80d913c903fcc270d05464cf3084b12d52a8;p=helm.git more work, but russell too slow --- diff --git a/helm/software/matita/contribs/dama/dama/cprop_connectives.ma b/helm/software/matita/contribs/dama/dama/cprop_connectives.ma index aabf6e79e..a0a701694 100644 --- a/helm/software/matita/contribs/dama/dama/cprop_connectives.ma +++ b/helm/software/matita/contribs/dama/dama/cprop_connectives.ma @@ -54,7 +54,8 @@ interpretation "pair pi2" 'pi2a x = (second _ _ x). interpretation "pair pi1" 'pi1b x y = (first _ _ x y). interpretation "pair pi2" 'pi2b x y = (second _ _ x y). -notation "hvbox(\langle a, break b\rangle)" left associative with precedence 70 for @{ 'pair $a $b}. +notation "hvbox(\langle term 19 a, break term 19 b\rangle)" +with precedence 90 for @{ 'pair $a $b}. interpretation "pair" 'pair a b = (pair _ _ a b). inductive exT (A:Type) (P:A→CProp) : CProp ≝ diff --git a/helm/software/matita/contribs/dama/dama/depends b/helm/software/matita/contribs/dama/dama/depends index 3299c9a2f..7bd17218a 100644 --- a/helm/software/matita/contribs/dama/dama/depends +++ b/helm/software/matita/contribs/dama/dama/depends @@ -1,24 +1,24 @@ -sandwich.ma ordered_uniform.ma -property_sigma.ma ordered_uniform.ma russell_support.ma -uniform.ma supremum.ma bishop_set.ma ordered_set.ma +ordered_set.ma cprop_connectives.ma +cprop_connectives.ma logic/equality.ma +bishop_set_rewrite.ma bishop_set.ma sequence.ma nat/nat.ma -ordered_uniform.ma uniform.ma +uniform.ma supremum.ma supremum.ma datatypes/constructors.ma nat/plus.ma nat_ordered_set.ma sequence.ma -property_exhaustivity.ma ordered_uniform.ma property_sigma.ma -bishop_set_rewrite.ma bishop_set.ma -cprop_connectives.ma logic/equality.ma nat_ordered_set.ma bishop_set.ma nat/compare.ma +property_sigma.ma ordered_uniform.ma russell_support.ma +ordered_uniform.ma uniform.ma +property_exhaustivity.ma ordered_uniform.ma property_sigma.ma lebesgue.ma property_exhaustivity.ma sandwich.ma -ordered_set.ma cprop_connectives.ma +sandwich.ma ordered_uniform.ma russell_support.ma cprop_connectives.ma nat/nat.ma -models/nat_lebesgue.ma lebesgue.ma models/nat_order_continuous.ma +models/nat_order_continuous.ma models/nat_dedekind_sigma_complete.ma models/nat_ordered_uniform.ma models/nat_ordered_uniform.ma bishop_set_rewrite.ma models/nat_uniform.ma ordered_uniform.ma -models/discrete_uniformity.ma bishop_set_rewrite.ma uniform.ma models/q_function.ma Q/q/q.ma cprop_connectives.ma list/list.ma -models/nat_uniform.ma models/discrete_uniformity.ma nat_ordered_set.ma +models/discrete_uniformity.ma bishop_set_rewrite.ma uniform.ma +models/nat_lebesgue.ma lebesgue.ma models/nat_order_continuous.ma models/nat_dedekind_sigma_complete.ma models/nat_uniform.ma nat/le_arith.ma russell_support.ma supremum.ma -models/nat_order_continuous.ma models/nat_dedekind_sigma_complete.ma models/nat_ordered_uniform.ma +models/nat_uniform.ma models/discrete_uniformity.ma nat_ordered_set.ma Q/q/q.ma datatypes/constructors.ma list/list.ma diff --git a/helm/software/matita/contribs/dama/dama/depends.png b/helm/software/matita/contribs/dama/dama/depends.png index 487d6f8d0..a45e35369 100644 Binary files a/helm/software/matita/contribs/dama/dama/depends.png and b/helm/software/matita/contribs/dama/dama/depends.png differ diff --git a/helm/software/matita/contribs/dama/dama/models/nat_lebesgue.ma b/helm/software/matita/contribs/dama/dama/models/nat_lebesgue.ma index 7e059c03d..8b062b6de 100644 --- a/helm/software/matita/contribs/dama/dama/models/nat_lebesgue.ma +++ b/helm/software/matita/contribs/dama/dama/models/nat_lebesgue.ma @@ -21,7 +21,7 @@ theorem nat_lebesgue_oc: ∀x:ℕ.a order_converges x → x ∈ [l,u] ∧ ∀h:x ∈ [l,u]. - uniform_converge {[l,u]} (⌊n,〈a n,H n〉⌋) 〈x,h〉. + uniform_converge {[l,u]} ⌊n,〈a n,H n〉⌋ 〈x,h〉. intros; apply lebesgue_oc; [apply nat_us_is_oc] assumption; qed. diff --git a/helm/software/matita/contribs/dama/dama/models/q_function.ma b/helm/software/matita/contribs/dama/dama/models/q_function.ma index df368bf90..a1ed8fa00 100644 --- a/helm/software/matita/contribs/dama/dama/models/q_function.ma +++ b/helm/software/matita/contribs/dama/dama/models/q_function.ma @@ -47,26 +47,49 @@ definition qle ≝ λa,b:ℚ.a = b ∨ a < b. interpretation "Q less or equal than" 'le x y = (qle x y). -notation "'nth'" left associative with precedence 70 for @{'nth}. -notation < "\nth \nbsp l \nbsp d \nbsp i" left associative with precedence 70 for @{'nth_appl $l $d $i}. +notation "'nth'" with precedence 90 for @{'nth}. +notation < "'nth' \nbsp l \nbsp d \nbsp i" with precedence 71 +for @{'nth_appl $l $d $i}. interpretation "list nth" 'nth = (cic:/matita/list/list/nth.con _). interpretation "list nth" 'nth_appl l d i = (cic:/matita/list/list/nth.con _ l d i). -notation < "\rationals \sup 2" non associative with precedence 40 for @{'q2}. +notation < "\rationals \sup 2" non associative with precedence 90 for @{'q2}. interpretation "Q x Q" 'q2 = (product Q Q). -let rec mk_list (A:Type) (def:nat→A) (n:nat) on n ≝ +let rec make_list (A:Type) (def:nat→A) (n:nat) on n ≝ match n with [ O ⇒ [] - | S m ⇒ def m :: mk_list A def m]. + | S m ⇒ def m :: make_list A def m]. -interpretation "mk_list appl" 'mk_list f n = (mk_list f n). -interpretation "mk_list" 'mk_list = mk_list. -notation < "\mk_list \nbsp f \nbsp n" left associative with precedence 70 for @{'mk_list_appl $f $n}. -notation "'mk_list'" left associative with precedence 70 for @{'mk_list}. +notation "'mk_list'" with precedence 90 for @{'mk_list}. +interpretation "'mk_list'" 'mk_list = (make_list _). +notation < "'mk_list' \nbsp f \nbsp n" +with precedence 71 for @{'mk_list_appl $f $n}. +interpretation "'mk_list' appl" 'mk_list_appl f n = (make_list _ f n). alias symbol "pair" = "pair". -definition q00 : ℚ × ℚ ≝ 〈OQ,OQ〉. +definition q0 : ℚ × ℚ ≝ 〈OQ,OQ〉. +notation < "0 \sub \rationals" with precedence 90 for @{'q0}. +interpretation "q0" 'q0 = q0. + +notation < "[ \rationals \sup 2]" with precedence 90 for @{'lq2}. +interpretation "lq2" 'lq2 = (list (product Q Q)). +notation < "[ \rationals \sup 2] \sup 2" with precedence 90 for @{'lq22}. +interpretation "lq22" 'lq22 = (product (list (product Q Q)) (list (product Q Q))). + + +notation "'len'" with precedence 90 for @{'len}. +interpretation "len" 'len = length. +notation < "'len' \nbsp l" with precedence 70 for @{'len_appl $l}. +interpretation "len appl" 'len_appl l = (length _ l). + +alias symbol "pi1" = "exT fst". +definition eject ≝ + λP.λp:∃x:(list (ℚ × ℚ)) × (list (ℚ × ℚ)).P x.match p with [ex_introT p _ ⇒ p]. +coercion cic:/matita/dama/models/q_function/eject.con. +definition inject ≝ + λP.λp:(list (ℚ × ℚ)) × (list (ℚ × ℚ)).λh:P p. ex_introT ? P p h. +coercion cic:/matita/dama/models/q_function/inject.con 0 1 nocomposites. alias symbol "pi2" = "pair pi2". alias symbol "pi1" = "pair pi1". @@ -74,14 +97,42 @@ alias symbol "pair" = "pair". definition rebase: q_f → q_f → ∃p:q_f × q_f.∀i. - fst (nth (bars (fst p)) q00 i) = - fst (nth (bars (snd p)) q00 i). + fst (nth (bars (fst p)) q0 i) = + fst (nth (bars (snd p)) q0 i). intros (f1 f2); cases f1 (s1 l1); cases f2 (s2 l2); clear f1 f2; letin aux ≝ ( -let rec aux (l1,l2:list (ℚ × ℚ)) on l1 : (list (ℚ × ℚ)) × (list (ℚ × ℚ)) ≝ +let rec aux (l1,l2:list (ℚ × ℚ)) (n:nat) on n : (list (ℚ × ℚ)) × (list (ℚ × ℚ)) ≝ +match n with +[ O ⇒ 〈[],[]〉 +| S m ⇒ match l1 with - [ nil ⇒ 〈mk_list (λi.〈fst (nth l2 q00 i),OQ〉) (length ? l2),l2〉 - | cons he tl ⇒ 〈[],[]〉] in aux); + [ nil ⇒ + let copy_l2_with_0 ≝ mk_list (λi.〈fst (nth l2 q0 i),OQ〉) (length ? l2) in + 〈copy_l2_with_0, l2〉 + | cons he1 tl1 ⇒〈[],[]〉 (* + match l2 with + [ nil ⇒ + let copy_l1_with_0 ≝ mk_list (λi.〈fst (nth l1 q0 i),OQ〉) (length ? l1) in + 〈l1, copy_l1_with_0〉 + | cons he2 tl2 ⇒ + let base1 ≝ fst he1 in + let base2 ≝ fst he2 in + let height1 ≝ snd he1 in + let height2 ≝ snd he2 in + match q_cmp base1 base2 with + [ q_eq _ ⇒ + let rc ≝ aux tl1 tl2 m in + 〈he1 :: fst rc,he2 :: snd rc〉 + | q_lt _ ⇒ + let rest ≝ base2 - base1 in + let rc ≝ aux tl1 (〈rest,height2〉 :: tl2) m in + 〈〈base1,height1〉 :: fst rc,〈base1,height2〉 :: snd rc〉 + | q_gt _ ⇒ + let rest ≝ base1 - base2 in + let rc ≝ aux (〈rest,height1〉 :: tl1) tl2 m in + 〈〈base2,height1〉 :: fst rc,〈base2,height2〉 :: snd rc〉 +]]*)]] +in aux : ∀l1,l2,m.∃p.True); cases (q_cmp s1 s2); [1: apply (mk_q_f s1); diff --git a/helm/software/matita/contribs/dama/dama/sequence.ma b/helm/software/matita/contribs/dama/dama/sequence.ma index 39c40194b..d3acf437f 100644 --- a/helm/software/matita/contribs/dama/dama/sequence.ma +++ b/helm/software/matita/contribs/dama/dama/sequence.ma @@ -22,13 +22,13 @@ definition fun_of_seq: ∀O:Type.sequence O → nat → O ≝ coercion cic:/matita/dama/sequence/fun_of_seq.con 1. -notation < "hvbox((\lfloor p \rfloor) \sub ident i)" with precedence 70 +notation < "hvbox((\lfloor term 19 p \rfloor) \sub ident i)" with precedence 90 for @{ 'sequence (\lambda ${ident i} : $t . $p)}. -notation > "hvbox((\lfloor p \rfloor) \sub ident i)" with precedence 70 +notation > "hvbox((\lfloor term 19 p \rfloor) \sub ident i)" with precedence 90 for @{ 'sequence (\lambda ${ident i} . $p)}. -notation > "hvbox(\lfloor ident i, p \rfloor)" with precedence 70 +notation > "hvbox(\lfloor ident i, term 19 p \rfloor)" with precedence 90 for @{ 'sequence (\lambda ${ident i} . $p)}. notation "a \sub i" left associative with precedence 70 diff --git a/helm/software/matita/contribs/dama/dama/supremum.ma b/helm/software/matita/contribs/dama/dama/supremum.ma index 6d5879a83..f53cdc458 100644 --- a/helm/software/matita/contribs/dama/dama/supremum.ma +++ b/helm/software/matita/contribs/dama/dama/supremum.ma @@ -220,7 +220,7 @@ definition order_converge ≝ (λl,u.∀i:nat. (l i) is_infimum ⌊w,a (w+i)⌋ ∧ (u i) is_supremum ⌊w,a (w+i)⌋). -notation < "a \nbsp (\circ \atop (\horbar\triangleright)) \nbsp x" non associative with precedence 45 +notation < "a \nbsp (\cir \atop (\horbar\triangleright)) \nbsp x" non associative with precedence 45 for @{'order_converge $a $x}. notation > "a 'order_converges' x" non associative with precedence 45 for @{'order_converge $a $x}.