Update
This commit is contained in:
parent
2786ad33bd
commit
8065518a98
@ -202,21 +202,20 @@ Proof.
|
|||||||
reflexivity. rewrite tm_size_power2. easy.
|
reflexivity. rewrite tm_size_power2. easy.
|
||||||
Qed.
|
Qed.
|
||||||
|
|
||||||
|
|
||||||
Lemma tm_step_repunit_index : forall (n : nat),
|
Lemma tm_step_repunit_index : forall (n : nat),
|
||||||
nth_error (tm_step n) (2^n - 1) = Some (odd n).
|
nth_error (tm_step n) (2^n - 1) = Some (odd n).
|
||||||
Proof.
|
Proof.
|
||||||
intro n.
|
intro n.
|
||||||
|
assert (H: 2 ^ n - 1 < length (tm_step n)). rewrite tm_size_power2.
|
||||||
|
rewrite Nat.sub_1_r. apply Nat.lt_pred_l. apply Nat.pow_nonzero. easy.
|
||||||
|
|
||||||
rewrite nth_error_nth' with (d := false).
|
rewrite nth_error_nth' with (d := false).
|
||||||
replace (tm_step n) with (rev (rev (tm_step n))).
|
replace (tm_step n) with (rev (rev (tm_step n))).
|
||||||
rewrite rev_nth. rewrite rev_length. rewrite tm_size_power2.
|
rewrite rev_nth. rewrite rev_length. rewrite tm_size_power2.
|
||||||
rewrite Nat.sub_1_r. rewrite Nat.succ_pred_pos. rewrite Nat.sub_diag.
|
rewrite Nat.sub_1_r. rewrite Nat.succ_pred_pos. rewrite Nat.sub_diag.
|
||||||
rewrite tm_step_end_1. reflexivity.
|
rewrite tm_step_end_1. reflexivity.
|
||||||
rewrite <- Nat.neq_0_lt_0. apply Nat.pow_nonzero. easy.
|
rewrite <- Nat.neq_0_lt_0. apply Nat.pow_nonzero. easy.
|
||||||
rewrite rev_length. rewrite tm_size_power2.
|
rewrite rev_length. assumption. apply rev_involutive. assumption.
|
||||||
rewrite Nat.sub_1_r. apply Nat.lt_pred_l. apply Nat.pow_nonzero. easy.
|
|
||||||
apply rev_involutive. rewrite tm_size_power2.
|
|
||||||
rewrite Nat.sub_1_r. apply Nat.lt_pred_l. apply Nat.pow_nonzero. easy.
|
|
||||||
Qed.
|
Qed.
|
||||||
|
|
||||||
Lemma list_app_length_lt : forall (l l1 l2 : list bool) (b : bool),
|
Lemma list_app_length_lt : forall (l l1 l2 : list bool) (b : bool),
|
||||||
|
Loading…
Reference in New Issue
Block a user