MAJ terminée. Nous sommes passés en version 14.6.2 . Pour consulter les "releases notes" associées c'est ici :

Commit 8f71d7f5 by MARCHE Claude

more proofs in euler

parent 106abed1
 ... ... @@ -43,21 +43,31 @@ theory SumMultiple 5 * n5 * (n5+1) - 15 * n15 * (n15+1)) 2 (* lemma mod_15 : forall n:int. n >= 0 -> mod n 15 = 0 <-> (mod n 3 = 0 /\ mod n 5 = 0) *) predicate p (n:int) = sum_multiple_3_5_lt (n+1) = closed_formula n lemma Closed_formula_0: p 0 lemma Closed_formula_n_1: lemma Closed_formula_n: forall n:int. n > 0 -> p (n-1) -> mod n 3 <> 0 /\ mod n 5 <> 0 -> p n lemma Closed_formula_n_2: lemma Closed_formula_n_3: forall n:int. n > 0 -> p (n-1) -> mod n 3 = 0 /\ mod n 5 <> 0 -> p n lemma Closed_formula_n_5: forall n:int. n > 0 -> p (n-1) -> mod n 3 <> 0 /\ mod n 5 = 0 -> p n lemma Closed_formula_n_15: forall n:int. n > 0 -> p (n-1) -> mod n 3 = 0 \/ mod n 5 = 0 -> p n mod n 3 = 0 /\ mod n 5 = 0 -> p n clone int.Induction as I with predicate p = p ... ...
 (* This file is generated by Why3's Coq driver *) (* Beware! Only edit allowed sections below *) Require Import ZArith. Require Import Rbase. Require Import Zdiv. Axiom Abs_le : forall (x:Z) (y:Z), ((Zabs x) <= y)%Z <-> (((-y)%Z <= x)%Z /\ (x <= y)%Z). Parameter sum_multiple_3_5_lt: Z -> Z. Axiom SumEmpty : ((sum_multiple_3_5_lt 0%Z) = 0%Z). Axiom SumNo : forall (n:Z), (0%Z <= n)%Z -> (((~ ((Zmod n 3%Z) = 0%Z)) /\ ~ ((Zmod n 5%Z) = 0%Z)) -> ((sum_multiple_3_5_lt (n + 1%Z)%Z) = (sum_multiple_3_5_lt n))). Axiom SumYes : forall (n:Z), (0%Z <= n)%Z -> ((((Zmod n 3%Z) = 0%Z) \/ ((Zmod n 5%Z) = 0%Z)) -> ((sum_multiple_3_5_lt (n + 1%Z)%Z) = ((sum_multiple_3_5_lt n) + n)%Z)). (* YOU MAY EDIT THE CONTEXT BELOW *) (* DO NOT EDIT BELOW *) Theorem div_minus1_1 : forall (x:Z) (y:Z), ((0%Z <= x)%Z /\ (0%Z < y)%Z) -> (((Zmod (x + 1%Z)%Z y) = 0%Z) -> ((Zdiv (x + 1%Z)%Z y) = ((Zdiv x y) + 1%Z)%Z)). (* YOU MAY EDIT THE PROOF BELOW *) intros x y (Hx,Hy) H. pose (q := ((x+1)/ y)%Z). assert (h2: (x = y * q - 1)%Z). replace x with (x+1-1)%Z by omega. rewrite (Z_div_mod_eq (x+1) y); auto with zarith. rewrite H. subst q; omega. rewrite h2; clear h2. replace (y * q - 1 + 1)%Z with (y*q)%Z by omega. rewrite Zmult_comm. rewrite Z_div_mult; auto with zarith. replace (q*y-1)%Z with (q*y+(-1))%Z by omega. rewrite Z_div_plus_full_l; auto with zarith. assert (h:(y=1 \/ y > 1)%Z) by omega. destruct h. subst q y. replace (-1 / 1)%Z with (-1)%Z. omega. rewrite Zdiv_1_r; auto. replace (-1)%Z with (-(1))%Z; auto with zarith. rewrite (Z_div_nz_opp_full 1 y). rewrite Zdiv_1_l; auto with zarith. rewrite Zmod_1_l; auto with zarith. Qed. (* DO NOT EDIT BELOW *)
 ... ...
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!