Update
This commit is contained in:
parent
773caecd3c
commit
258bfc5251
75
thue-morse.v
75
thue-morse.v
@ -978,10 +978,79 @@ Proof.
|
||||
Qed.
|
||||
|
||||
|
||||
Prouver l'énoncé du concours général
|
||||
(parmi les n premiers termes avec n pairs, il y en a autant de chaque)
|
||||
Lemma tm_step_cube2 : forall (n : nat) (a hd tl: list bool),
|
||||
tm_step n = hd ++ a ++ a ++ a ++ tl
|
||||
-> 0 < length a
|
||||
-> even (length hd) = even (length tl).
|
||||
Proof.
|
||||
intros n a hd tl. intros H J.
|
||||
destruct n.
|
||||
- assert (3 <= length (a ++ a ++ a)).
|
||||
rewrite app_length. rewrite app_length.
|
||||
rewrite <- Nat.le_succ_l in J.
|
||||
assert (2 <= length a + length a).
|
||||
generalize J. generalize J. apply Nat.add_le_mono.
|
||||
generalize H0. generalize J. apply Nat.add_le_mono.
|
||||
assert (length (tm_step 0) = length (tm_step 0)). reflexivity.
|
||||
rewrite H in H1 at 2.
|
||||
assert (0 <= length hd). apply Nat.le_0_l.
|
||||
assert (0 + 3 <= length hd + length (a ++ a ++ a)).
|
||||
generalize H0. generalize H2. apply Nat.add_le_mono.
|
||||
simpl in H3. rewrite <- app_length in H3.
|
||||
assert (0 <= length tl). apply Nat.le_0_l.
|
||||
assert (3 + 0 <= length (hd ++ a ++ a ++ a) + length (tl)).
|
||||
generalize H4. generalize H3. apply Nat.add_le_mono.
|
||||
rewrite <- app_length in H5. rewrite Nat.add_0_r in H5.
|
||||
replace ((hd++a++a++a)++tl) with (hd++a++a++a++tl) in H5.
|
||||
rewrite <- H1 in H5. simpl in H5. apply le_S_n in H5.
|
||||
apply Nat.nle_succ_0 in H5. contradiction H5.
|
||||
rewrite app_assoc_reverse. rewrite app_inv_head_iff.
|
||||
rewrite app_assoc_reverse. rewrite app_inv_head_iff.
|
||||
rewrite app_assoc_reverse. reflexivity.
|
||||
- assert (Nat.Even (length (tm_step (S n)))).
|
||||
rewrite tm_size_power2. rewrite Nat.pow_succ_r'.
|
||||
apply Nat.Even_mul_l. apply Nat.EvenT_Even.
|
||||
apply Nat.EvenT_2. apply Nat.EvenT_0.
|
||||
rewrite H in H0. rewrite app_length in H0. rewrite app_length in H0.
|
||||
rewrite Nat.add_shuffle3 in H0.
|
||||
assert (I := H). apply tm_step_cube1 in I.
|
||||
apply Nat.even_EvenT in I. apply Nat.EvenT_Even in I.
|
||||
assert (Nat.Even (length hd + length (a ++ a ++ tl))).
|
||||
generalize I. generalize H0. apply Nat.Even_add_Even_inv_r.
|
||||
rewrite app_length in H1. rewrite Nat.add_shuffle3 in H1.
|
||||
assert (Nat.Even (length hd + length (a ++ tl))).
|
||||
generalize I. generalize H1. apply Nat.Even_add_Even_inv_r.
|
||||
rewrite app_length in H2. rewrite Nat.add_shuffle3 in H2.
|
||||
assert (Nat.Even (length hd + length tl)).
|
||||
generalize I. generalize H2. apply Nat.Even_add_Even_inv_r.
|
||||
|
||||
apply Nat.Even_EvenT in H3. apply Nat.EvenT_even in H3.
|
||||
rewrite Nat.even_add in H3.
|
||||
destruct (even (length hd)); destruct (even (length tl)).
|
||||
reflexivity. simpl in H3. inversion H3.
|
||||
simpl in H3. inversion H3. reflexivity.
|
||||
Qed.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Lemma tm_step_cube2 : forall (n : nat) (a hd tl: list bool),
|
||||
tm_step n = hd ++ a ++ a ++ a ++ tl -> even (length hd) = false
|
||||
-> 0 < length a
|
||||
-> hd_error a = hd_error tl.
|
||||
Proof.
|
||||
|
||||
|
||||
|
||||
(hd + [a] + [a] + [a])
|
||||
-> prouver que le premier caractère qui suit hd suit aussi le troisième a
|
||||
quand hd est de taille impaire
|
||||
[hd + false] + /a+false/
|
||||
|
||||
Prouver que si un cube existe il est de taille paire
|
||||
|
||||
Prouver que si un cube existe de taille k, il existe aussi un cube
|
||||
de même taille précédé par un préfixe de taille pair (par décalage éventuel de 1)
|
||||
|
Loading…
Reference in New Issue
Block a user