Skip to content

Commit

Permalink
Add some more lemmas
Browse files Browse the repository at this point in the history
  • Loading branch information
shrouxm committed Dec 6, 2016
1 parent 4d3e1fb commit 149b271
Show file tree
Hide file tree
Showing 2 changed files with 915 additions and 783 deletions.
20 changes: 20 additions & 0 deletions lemmas.v
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,15 @@ Require Export Arith.EqNat.
Require Export Program.Equality.
Require Export Coq.Logic.ProofIrrelevance.

Ltac inverts n :=
match n with
| S ?n' => match goal with
| [ H : _ |- _ ] => try (inversion H; subst; inverts n')
| _ => idtac
end
| _ => idtac
end.

Module E.
Require Coq.Sets.Ensembles.
Include Ensembles.
Expand Down Expand Up @@ -523,3 +532,14 @@ Proof.
simpl. destruct (P (f a)); try reflexivity; assumption.
Qed.
Hint Resolve existsb_map.

Lemma In_set_from_list_In_list : forall {A} l (a : A),
set_In a (set_from_list l) <-> In a l.
Proof.
induction l; split; intros; inverts 2; subst; eauto.
- right. apply IHl. eauto.
- left. reflexivity.
Qed.
Hint Resolve In_set_from_list_In_list.

Hint Resolve nth_error_In.
Loading

0 comments on commit 149b271

Please sign in to comment.