X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=matita%2Fmatita%2Flib%2Farithmetics%2Fgcd.ma;h=1fe651915a8f146f1e2d5ad71103c2dbc5a4fe8b;hb=64a752136a679bcab14a9cd01823c18b7cc991de;hp=86b0600beb3862e763f257d9f9d624686574f8c4;hpb=53452958508001e7af3090695b619fe92135fb9e;p=helm.git diff --git a/matita/matita/lib/arithmetics/gcd.ma b/matita/matita/lib/arithmetics/gcd.ma index 86b0600be..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 normalize +#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 normalize >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 → @@ -157,8 +157,8 @@ qed. (* a particular case of the previous theorem, with c=1 *) theorem divides_d_gcd: ∀m,n,d. - d ∣ m → d ∣ n → d ∣ gcd n m. -/2/ (* bello *) + d ∣ m → d ∣ n → d ∣ gcd n m. +#m #n #d #divdn #divdn applyS (divides_d_times_gcd m n d 1) // qed. theorem eq_minus_gcd_aux: ∀p,m,n.O < n → n ≤ m → n ≤ p → @@ -182,15 +182,15 @@ theorem eq_minus_gcd_aux: ∀p,m,n.O < n → n ≤ m → n ≤ p → [(* first case *) distributive_times_plus_r - >(div_mod m n) in ⊢(? ? (? % ?) ?) + >(div_mod m n) in ⊢(? ? (? % ?) ?); >associative_times distributive_times_plus - distributive_times_plus_r - >(div_mod m n) in ⊢ (? ? (? ? %) ?) + >(div_mod m n) in ⊢ (? ? (? ? %) ?); >distributive_times_plus >associative_times - gcd1 in 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 in 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