coq-club AT inria.fr
Subject: The Coq mailing list
List archive
- From: Hugo Carvalho <hugoccomp AT gmail.com>
- To: coq-club <coq-club AT inria.fr>
- Subject: [Coq-Club] Pigeonhole Principle without excluded middle (or decidable type)
- Date: Mon, 17 Nov 2014 02:12:08 -0300
Hi club!
Require ClassicalFacts.
Inductive appears_in {X:Type} (a:X) : list X -> Prop :=
| ai_here : forall l, appears_in a (a::l)
| ai_later : forall b l, appears_in a l -> appears_in a (b::l).
Inductive repeats {X:Type} : list X -> Prop :=
| rep_base : forall l x, appears_in x l -> repeats (x::l)
| rep_step : forall l x, repeats l -> repeats (x::l).
Theorem pigeonhole_principle: forall (X:Type) (l1 l2:list X),
ClassicalFacts.excluded_middle ->
(forall x, appears_in x l1 -> appears_in x l2) ->
length l2 < length l1 ->
repeats l1.
Proof.
Inductive member {X:Type} (a:X) : list X -> Type :=
| HFirst : forall l, member a (a::l)
| HNext : forall b l, member a l -> member a (b::l).
Theorem pigeonhole_principle: forall (X:Type) (l1 l2:list X),
(forall x, member x l1 -> member x l2) ->
length l2 < length l1 ->
repeats l1.
Proof.
- [Coq-Club] Pigeonhole Principle without excluded middle (or decidable type), Hugo Carvalho, 11/17/2014
- Re: [Coq-Club] Pigeonhole Principle without excluded middle (or decidable type), Pierre-Marie Pédrot, 11/17/2014
- Re: [Coq-Club] Pigeonhole Principle without excluded middle (or decidable type), Kyle Stemen, 11/18/2014
- Re: [Coq-Club] Pigeonhole Principle without excluded middle (or decidable type), Kyle Stemen, 11/18/2014
Archive powered by MHonArc 2.6.18.