Skip to Content.
Sympa Menu

coq-club - [Coq-Club] Questions about two theorems

coq-club AT inria.fr

Subject: The Coq mailing list

List archive

[Coq-Club] Questions about two theorems


Chronological Thread 
  • From: "John Wiegley" <johnw AT newartisans.com>
  • To: coq-club AT inria.fr
  • Subject: [Coq-Club] Questions about two theorems
  • Date: Mon, 15 Sep 2014 04:05:23 +0100
  • Organization: New Artisans LLC

Hello,

I'm finding the following theorem difficult, and wonder if anyone could offer
guidance or solution:

Theorem fin_list : forall n (l : list (fin n)), NoDup l -> length l <= n.

I started by induction on "NoDup l", but I'm not sure how to relate length l
and fin n. I arrive here:

n : nat
x : fin n
l : list (fin n)
H : ~ In x l
H0 : NoDup l
IHNoDup : length l <= n
============================
length (x :: l) <= n

We should know that length l < n, because a member of the set is not present,
but I can't see a way to derive this fact.

Thanks,
John



Archive powered by MHonArc 2.6.18.

Top of Page