Update
This commit is contained in:
parent
efb81d2bba
commit
3371e25740
@ -1528,11 +1528,10 @@ Lemma tm_step_square_rev_even'' :
|
|||||||
forall (m n : nat) (hd a tl : list bool),
|
forall (m n : nat) (hd a tl : list bool),
|
||||||
tm_step n = hd ++ a ++ a ++ tl
|
tm_step n = hd ++ a ++ a ++ tl
|
||||||
-> length a = 2^m
|
-> length a = 2^m
|
||||||
-> even m = true
|
-> (even m = true <-> a = rev a).
|
||||||
-> length (hd ++ a) mod 2^(S m) = 0.
|
|
||||||
Proof.
|
Proof.
|
||||||
intros m n hd a tl. intros H I J.
|
intros m n hd a tl. intros H I.
|
||||||
assert (a = rev a).
|
split. intro J.
|
||||||
assert (( (a = rev a /\ exists j,
|
assert (( (a = rev a /\ exists j,
|
||||||
length a = 2^(Nat.double j) \/ length a = 3 * 2^(Nat.double j))
|
length a = 2^(Nat.double j) \/ length a = 3 * 2^(Nat.double j))
|
||||||
\/ (a = map negb (rev a) /\ exists j,
|
\/ (a = map negb (rev a) /\ exists j,
|
||||||
@ -1555,6 +1554,22 @@ Proof.
|
|||||||
rewrite Nat.mul_cancel_r in H1. inversion H1.
|
rewrite Nat.mul_cancel_r in H1. inversion H1.
|
||||||
apply Nat.pow_nonzero. easy. lia. reflexivity. lia. lia. lia.
|
apply Nat.pow_nonzero. easy. lia. reflexivity. lia. lia. lia.
|
||||||
|
|
||||||
|
intro J.
|
||||||
|
generalize J. generalize I. generalize H.
|
||||||
|
apply tm_step_square_rev_even.
|
||||||
|
Qed.
|
||||||
|
|
||||||
|
Lemma tm_step_square_rev_even''' :
|
||||||
|
forall (m n : nat) (hd a tl : list bool),
|
||||||
|
tm_step n = hd ++ a ++ a ++ tl
|
||||||
|
-> length a = 2^m
|
||||||
|
-> even m = true
|
||||||
|
-> length (hd ++ a) mod 2^(S m) = 0.
|
||||||
|
Proof.
|
||||||
|
intros m n hd a tl. intros H I J.
|
||||||
|
assert (a = rev a).
|
||||||
|
rewrite tm_step_square_rev_even''
|
||||||
|
with (n := n) (hd := hd) (a := a) (tl := tl) (m := m) in J; assumption.
|
||||||
generalize H0. generalize I. generalize H.
|
generalize H0. generalize I. generalize H.
|
||||||
apply tm_step_square_rev_even'.
|
apply tm_step_square_rev_even'.
|
||||||
Qed.
|
Qed.
|
||||||
|
Loading…
Reference in New Issue
Block a user