This commit is contained in:
Thomas Baruchel 2023-01-23 20:11:13 +01:00
parent 0a9f4f3bb5
commit 603a34db78
2 changed files with 41 additions and 3 deletions

View File

@ -10,8 +10,7 @@
But some powerful theorems are provided here:
- tm_step_cubefree (there is no cube in the sequence)
- tm_step_square_size (all squared factors of odd
length have length 1 or 3).
- tm_step_square_size (about length of squared factrs)
- tm_step_square_pos (length of the prefix has the same
parity than the length of the factor being squared)
*)
@ -742,7 +741,6 @@ Proof.
Qed.
Theorem tm_step_square_size : forall (n k j : nat) (hd a tl : list bool),
tm_step (S n) = hd ++ a ++ a ++ tl
-> length a = (S (Nat.double k)) * 2^j

View File

@ -1058,8 +1058,48 @@ Le lemme repeating_patterns se base sur les huit premiers termes de TM :
(* le premier nouveau sous cas est lh mod 4 = 2 en H1
FTFT TFTF FTFT TFTF (µ de FF TT FF TT) pourquoi impossible ?
c'est un carré ???
c'est un palindrome fait avec un carré de palindrome ?
morphisme de FFTTFFTT sans doute impossible (testé)
*)
unfold hd' in H. destruct hd. inversion P.
rewrite app_removelast_last
with (l := (removelast (removelast (removelast (b3::b5::b7::b10::hd)))))
(d := false) in H.
pose (b11 := last (removelast (removelast
(removelast (b3 :: b5 :: b7 :: b10 :: hd)))) false).
fold b11 in H. rewrite <- app_assoc in H.
pose (hd'' := removelast (removelast (removelast
(removelast (b3 :: b5 :: b7 :: b10 :: hd))))).
fold hd'' in H.
(* proof that b11 <> b1 *)
assert ({b11=b1} + {~ b11=b1}). apply bool_dec. destruct H9. rewrite e1 in H.
assert (even (length hd'') = false).
replace ( hd'' ++ [b1] ++ [b1] ++ [b0] ++ [b1] ++
b1 :: b0 :: b1 :: b0 :: b0 :: b1 :: b0 :: b1 :: b1 :: b0 :: b1 :: tl)
with (hd'' ++ [b1;b1;b0] ++ [b1;b1;b0]
++ b1::b0::b0::b1::b0::b1::b1::b0::b1::tl) in H.
assert (odd (length [b1;b1;b0]) = true). reflexivity.
generalize H9. generalize H. apply tm_step_odd_prefix_square.
reflexivity. unfold hd'' in H9.
rewrite removelast_firstn_len in H9. rewrite Y'' in H9.
rewrite firstn_length_le in H9. simpl in H9.
replace (b3::b5::b7::b10::hd) with ([b3;b5;b7;b10] ++ hd) in Q.
rewrite app_length in Q. rewrite Nat.even_add in Q. rewrite H9 in Q.
inversion Q. reflexivity. rewrite Y''. apply Nat.le_pred_l.
Lemma tm_step_odd_prefix_square : forall (n : nat) (hd a tl : list bool),
tm_step n = hd ++ a ++ a ++ tl
-> odd (length a) = true -> even (length hd) = false.
Theorem tm_step_square_pos : forall (n : nat) (hd a tl : list bool),
tm_step n = hd ++ a ++ a ++ tl
-> 0 < length a -> even (length (hd ++ a)) = true.