[ generalize in match Hcut;
apply andb_elim;
elim (le s s1);
- [ change with (ordered A le (s1::l2) = true \to ordered A le (s1::l2) = true).
+ [ simplify;
+ fold simplify (ordered ? le (s1::l2));
intros; assumption;
| simplify;
intros (Habsurd);
ordered A le l = true \to ordered A le (insert A le x l) = true.
intros 5 (A le H l x).
elim l;
- [ 2: change with (ordered A le (match le x s with
- [ true ⇒ x::(s::l1) | false ⇒ s::(insert A le x l1) ]) = true).
+ [ 2: simplify;
apply (bool_elim ? (le x s));
[ intros;
- change with ((le x s \land ordered A le (s::l1)) = true);
+ simplify;
+ fold simplify (ordered ? le (s::l1));
apply andb_elim;
rewrite > H3;
assumption;
[ simplify;
rewrite > (H x a H2);
reflexivity;
- | change with ((ordered A le (a::match le x s with
- [ true ⇒ x::s::l2 | false ⇒ s::(insert A le x l2) ])) = true).
+ | simplify in \vdash (? ? (? ? ? %) ?);
apply (bool_elim ? (le x s));
[ intros;
- change with ((le a x \land (le x s \land ordered A le (s::l2))) = true).
+ simplify;
+ fold simplify (ordered A le (s::l2));
apply andb_elim;
rewrite > (H x a H3);
- change with ((le x s \land ordered A le (s::l2)) = true).
+ simplify;
+ fold simplify (ordered A le (s::l2));
apply andb_elim;
rewrite > H4;
apply (ordered_injective A le (a::s::l2));
assumption;
| intros;
- change with ((le a s \land ordered A le (s::(insert A le x l2))) = true);
+ simplify;
+ fold simplify (ordered A le (s::(insert A le x l2)));
apply andb_elim;
- change in H2 with ((le a s \land ordered A le (s::l2)) = true);
+ simplify in H2;
+ fold simplify (ordered A le (s::l2)) in H2;
generalize in match H2;
apply (andb_elim (le a s));
elim (le a s);