From e28ee799d0281fb76d484d9b4c01d8bed4716bbe Mon Sep 17 00:00:00 2001 From: Claudio Sacerdoti Coen Date: Mon, 21 Nov 2011 09:41:59 +0000 Subject: [PATCH] {pattern} => in pattern; --- matita/matita/lib/arithmetics/bigops.ma | 14 +++++++------- matita/matita/lib/arithmetics/binomial.ma | 18 +++++++++--------- .../matita/lib/arithmetics/chinese_reminder.ma | 2 +- matita/matita/lib/arithmetics/congruence.ma | 6 +++--- matita/matita/lib/arithmetics/div_and_mod.ma | 18 +++++++++--------- matita/matita/lib/arithmetics/exp.ma | 2 +- matita/matita/lib/arithmetics/factorial.ma | 8 ++++---- matita/matita/lib/arithmetics/gcd.ma | 12 ++++++------ matita/matita/lib/arithmetics/minimization.ma | 2 +- 9 files changed, 41 insertions(+), 41 deletions(-) diff --git a/matita/matita/lib/arithmetics/bigops.ma b/matita/matita/lib/arithmetics/bigops.ma index 5e34160fe..826c6a8b2 100644 --- a/matita/matita/lib/arithmetics/bigops.ma +++ b/matita/matita/lib/arithmetics/bigops.ma @@ -141,7 +141,7 @@ a ≤ b → b ≤ c → op (\big[op,nil]_{i ∈ [b,c[ |p i}(f i)) \big[op,nil]_{i ∈ [a,b[ |p i}(f i). #a #b # c #p #B #nil #op #f #leab #lebc ->(plus_minus_m_m (c-a) (b-a)) {⊢ (??%?)} /2/ +>(plus_minus_m_m (c-a) (b-a)) in ⊢ (??%?); /2/ >minus_plus >(commutative_plus a) bigop_sum (cut (∀i. b -a ≤ i → i+a = i-(b-a)+b)) [#i #lei >plus_minus // bigop_Strue // >Hind >bigop_sum @same_bigop #i #lti @leb_elim // #lei cut (i = n*k2+(i-n*k2)) /2/ - #eqi [|#H] >eqi {⊢ (???%)} + #eqi [|#H] >eqi in ⊢ (???%); >div_plus_times /2/ >Hp1 >(mod_plus_times …) /2/ normalize // |>bigop_Sfalse // >Hind >(pad_bigop (S n*k2)) // @same_bigop #i #lti @leb_elim // #lei cut (i = n*k2+(i-n*k2)) /2/ - #eqi >eqi {⊢ (???%)} >div_plus_times /2/ + #eqi >eqi in ⊢ (???%); >div_plus_times /2/ ] qed. @@ -192,7 +192,7 @@ op (\big[op,nil]_{ibigop_Strue // >bigop_Strue // >bigop_Strue // - normalize assoc >comm {⊢ (??(????%?)?)} + normalize assoc >comm in ⊢ (??(????%?)?); bigop_Sfalse // >bigop_Sfalse // >bigop_Sfalse // ] @@ -263,7 +263,7 @@ theorem bigop_iso: ∀n1,n2,p1,p2,B.∀nil.∀op:ACop B nil.∀f1,f2. iso B (mk_range B f1 n1 p1) (mk_range B f2 n2 p2) → \big[op,nil]_{ibigop_Sfalse [@(Hind ? (le_O_n ?)) [/2/ | @(transitive_sub … (sub_lt …) sub2) //] @@ -280,7 +280,7 @@ theorem bigop_iso: ∀n1,n2,p1,p2,B.∀nil.∀op:ACop B nil.∀f1,f2. |#j #ltj #p2j (cases (sub2 j ltj (andb_true_r …p2j))) * #ltkj #p1kj #eqj % // % // (cases (le_to_or_lt_eq …(le_S_S_to_le …ltkj))) // - #eqkj @False_ind generalize {match p2j} @eqb_elim + #eqkj @False_ind lapply p2j @eqb_elim normalize /2/ ] |>bigop_Sfalse // @(Hind ? len) @@ -298,7 +298,7 @@ qed. record Dop (A:Type[0]) (nil:A): Type[0] ≝ {sum : ACop A nil; prod: A → A →A; - null: ∀a. prod a nil = nil; + null: \forall a. prod a nil = nil; distr: ∀a,b,c:A. prod a (sum b c) = sum (prod a b) (prod a c) }. diff --git a/matita/matita/lib/arithmetics/binomial.ma b/matita/matita/lib/arithmetics/binomial.ma index 7ab00d499..a8b1cef79 100644 --- a/matita/matita/lib/arithmetics/binomial.ma +++ b/matita/matita/lib/arithmetics/binomial.ma @@ -44,12 +44,12 @@ theorem bc2 : ∀n. cut (m-(m-(S c)) = S c) [@plus_to_minus @plus_minus_m_m //] #eqSc lapply (Hind c (le_S_S_to_le … lec)) #Hc lapply (Hind (m - (S c)) ?) [@le_plus_to_minus //] >eqSc #Hmc - >(plus_minus_m_m m c) {⊢ (??(??(?%)))} [|@le_S_S_to_le //] + >(plus_minus_m_m m c) in ⊢ (??(??(?%))); [|@le_S_S_to_le //] >commutative_plus >(distributive_times_plus ? (S c)) @divides_plus [>associative_times >(commutative_times (S c)) commutative_times @Hmc ] @@ -61,18 +61,18 @@ qed. theorem bc1: ∀n.∀k. k < n → bc (S n) (S k) = (bc n k) + (bc n (S k)). #n #k #ltkn > bceq >(bceq n) >(bceq n (S k)) ->(div_times_times ?? (S k)) {⊢ (???(?%?))} +>(div_times_times ?? (S k)) in ⊢ (???(?%?)); [|>(times_n_O 0) @lt_times // | //] ->associative_times {⊢ (???(?(??%)?))} ->commutative_times {⊢ (???(?(??(??%))?))} -(div_times_times ?? (n - k)) {⊢ (???(??%))} +>associative_times in ⊢ (???(?(??%)?)); +>commutative_times in ⊢ (???(?(??(??%))?)); +(div_times_times ?? (n - k)) in ⊢ (???(??%)) ; [|>(times_n_O 0) @lt_times // |@(le_plus_to_le_r k ??) associative_times {⊢ (???(??(??%)))} +>associative_times in ⊢ (???(??(??%))); >fact_minus // commutative_plus {⊢ (???%)} commutative_plus in ⊢ (???%); associative_times >(commutative_times (S k)) eq_to_eqb_true [>eq_to_eqb_true // <(lt_to_eq_mod …ltbn) // diff --git a/matita/matita/lib/arithmetics/congruence.ma b/matita/matita/lib/arithmetics/congruence.ma index 2a9e06b0f..d9792b5eb 100644 --- a/matita/matita/lib/arithmetics/congruence.ma +++ b/matita/matita/lib/arithmetics/congruence.ma @@ -37,7 +37,7 @@ theorem le_to_mod: ∀n,m:nat. n < m → n = n \mod m. qed. theorem mod_mod : ∀n,p:nat. O

(div_mod (n \mod p) p) {⊢ (? ? % ?) } +#n #p #posp >(div_mod (n \mod p) p) in ⊢ (? ? % ?); >(eq_div_O ? p) // @lt_mod_m_m // qed. @@ -79,8 +79,8 @@ qed. theorem congruent_to_divides: ∀n,m,p:nat.O < p → n ≅_{p} m → p ∣ (n - m). #n #m #p #posp #congnm @(quotient ? ? ((n / p)-(m / p))) ->commutative_times >(div_mod n p) {⊢ (??%?)} ->(div_mod m p) {⊢ (??%?)} <(commutative_plus (m \mod p)) +>commutative_times >(div_mod n p) in ⊢ (??%?); +>(div_mod m p) in ⊢ (??%?); <(commutative_plus (m \mod p)) (div_mod n m) {⊢ (? % ?)} >commutative_plus +>(div_mod n m) in ⊢ (? % ?); >commutative_plus @monotonic_lt_plus_l @lt_mod_m_m // qed. theorem le_div: ∀n,m. O < n → m/n ≤ m. #n #m #posn ->(div_mod m n) {⊢ (? ? %)} @(transitive_le ? (m/n*n)) /2/ +>(div_mod m n) in ⊢ (? ? %); @(transitive_le ? (m/n*n)) /2/ qed. theorem le_plus_mod: ∀m,n,q. O < q → @@ -228,9 +228,9 @@ theorem le_plus_mod: ∀m,n,q. O < q → @(div_mod_spec_to_eq2 … (m/q + n/q) ? (div_mod_spec_div_mod … posq)). @div_mod_spec_intro [@not_le_to_lt // - |>(div_mod n q) {⊢ (? ? (? ? %) ?)} + |>(div_mod n q) in ⊢ (? ? (? ? %) ?); (applyS (eq_f … (λx.plus x (n \mod q)))) - >(div_mod m q) {⊢ (? ? (? % ?) ?)} + >(div_mod m q) in ⊢ (? ? (? % ?) ?); (applyS (eq_f … (λx.plus x (m \mod q)))) // ] ] @@ -241,10 +241,10 @@ theorem le_plus_div: ∀m,n,q. O < q → #m #n #q #posq @(le_times_to_le … posq) @(le_plus_to_le_r ((m+n) \mod q)) (* bruttino *) ->commutative_times {⊢ (? ? %)} (div_mod m q) {⊢ (? ? (? % ?))} >(div_mod n q) {⊢ (? ? (? ? %))} ->commutative_plus {⊢ (? ? (? % ?))} >associative_plus {⊢ (? ? %)} -commutative_times in ⊢ (? ? %); (div_mod m q) in ⊢ (? ? (? % ?)); >(div_mod n q) in ⊢ (? ? (? ? %)); +>commutative_plus in ⊢ (? ? (? % ?)); >associative_plus in ⊢ (? ? %); +H //] #H1 >H1 @(le_to_lt_to_lt ? (2^(2*n)*n!*n!*(2*(S n))*(2*(S n)))) - [normalize {match ((S n)!)} generalize {match (S n)} #Sn - generalize {match 2} #two // + [normalize in match ((S n)!); generalize in match (S n); #Sn + generalize in match 2; #two // |cut ((S(2*(S n)))! = (S(2*n))!*(S(S(2*n)))*(S(S(S(2*n))))) [>H //] #H2 >H2 @lt_to_le_to_lt_times [@lt_to_le_to_lt_times //|>H // | //] diff --git a/matita/matita/lib/arithmetics/gcd.ma b/matita/matita/lib/arithmetics/gcd.ma index 8b496e9c5..1fe651915 100644 --- a/matita/matita/lib/arithmetics/gcd.ma +++ b/matita/matita/lib/arithmetics/gcd.ma @@ -54,7 +54,7 @@ qed. lemma divides_to_gcd_aux: ∀p,m,n. O < p → O < n →n ∣ m → gcd_aux p m n = n. -#p #m #n #posp @(lt_O_n_elim … posp) #l #posn #divnm whd {⊢ (??%?)} +#p #m #n #posp @(lt_O_n_elim … posp) #l #posn #divnm whd in ⊢ (??%?); >divides_to_dividesb_true normalize // qed. @@ -69,7 +69,7 @@ qed. lemma not_divides_to_gcd_aux: ∀p,m,n. 0 < n → n ∤ m → gcd_aux (S p) m n = gcd_aux p n (m \mod n). -#p #m #n #lenm #divnm whd {⊢ (??%?)} >not_divides_to_dividesb_false +#p #m #n #lenm #divnm whd in ⊢ (??%?); >not_divides_to_dividesb_false normalize // qed. theorem divides_gcd_aux_mn: ∀p,m,n. O < n → n ≤ m → n ≤ p → @@ -182,13 +182,13 @@ theorem eq_minus_gcd_aux: ∀p,m,n.O < n → n ≤ m → n ≤ p → [(* first case *) distributive_times_plus_r - >(div_mod m n) {⊢(? ? (? % ?) ?)} + >(div_mod m n) in ⊢(? ? (? % ?) ?); >associative_times distributive_times_plus distributive_times_plus_r - >(div_mod m n) {⊢ (? ? (? ? %) ?)} + >(div_mod m n) in ⊢ (? ? (? ? %) ?); >distributive_times_plus >associative_times gcd1 {H} #H +cases(eq_minus_gcd m p) #a * #b * #H >gcd1 in H; #H [@(quotient ?? (a*n-c*b)) >distributive_times_minus (commutative_times m) >commutative_times >associative_times eqn {divpn}) +#p #q #n #primep #notdivpq #divpn * #b #eqn >eqn in divpn; #divpn cases(divides_times_to_divides ??? primep divpn) #H [@False_ind /2/ |cases H #c #eqb @(quotient ?? c) >eqb ext normalize {Hind} >Hind // +#m #Hind #ext normalize >ext normalize in Hind; >Hind // #i #ltim @ext /2/ qed. -- 2.39.2