This commit is contained in:
Thomas Baruchel 2023-10-30 10:30:22 +01:00
parent ab46174c21
commit 9cdf76a97f

View File

@ -138,25 +138,34 @@ Proof.
intro s. assert({subsequence2 l s} + {~ subsequence2 l s}). apply IHl.
destruct H0.
left. unfold subsequence2. unfold subsequence2 in s0. destruct s0.
(*
left. destruct s0.
destruct H0. exists (false::x). split. simpl. rewrite H0. reflexivity.
simpl. assumption.
destruct s. left. apply subsequence2_nil_r.
assert ({T=a}+{T<>a}). apply H. destruct H0.
rewrite e.
*)
rewrite <- subsequence2_cons_eq with (a := a) in s0.
apply subsequence2_cons_r in s0. left. assumption.
destruct s. left. apply subsequence2_nil_r.
assert ({T=a}+{T<>a}). apply H. destruct H0. rewrite e.
destruct IHl with (s := s).
left. rewrite subsequence2_cons_eq. assumption.
right. rewrite subsequence2_cons_eq. assumption.
right. unfold not in n. unfold not. intro I.
destruct I. destruct H0. destruct x.
symmetry in H1. apply nil_cons in H1. contradiction H1.
destruct b.
inversion H1. rewrite H3 in n0. contradiction n0. reflexivity.
intro l0. destruct l0. right. apply subsequence2_nil_cons_r.
assert ({ subsequence2 l0 s } + { ~ subsequence2 l0 s }). apply IHs.
assert (subsequence2 l (T::s)). exists x. split.
inversion H0. reflexivity. assumption. apply n in H2. contradiction H2.
Qed.
Theorem subsequence2_dec :