Skip to Content.
Sympa Menu

coq-club - Re: [Coq-Club] Need help with Finite proof involving existentials

coq-club AT inria.fr

Subject: The Coq mailing list

List archive

Re: [Coq-Club] Need help with Finite proof involving existentials


Chronological Thread 
  • From: Jason Gross <jagro AT google.com>
  • To: coq-club AT inria.fr, Frédéric Besson <frederic.besson AT inria.fr>
  • Subject: Re: [Coq-Club] Need help with Finite proof involving existentials
  • Date: Mon, 01 Aug 2016 17:00:05 +0000
  • Authentication-results: mail3-smtp-sop.national.inria.fr; spf=None smtp.pra=jagro AT google.com; spf=Pass smtp.mailfrom=jagro AT google.com; spf=None smtp.helo=postmaster AT mail-ua0-f175.google.com
  • Ironport-phdr: 9a23:S71gxxwfgEK+GifXCy+O+j09IxM/srCxBDY+r6Qd0eMVIJqq85mqBkHD//Il1AaPBtSDra0ZwLOO7+jJYi8p2d65qncMcZhBBVcuqP49uEgeOvODElDxN/XwbiY3T4xoXV5h+GynYwAOQJ6tL2PbrnD61zMOABK3bVMzfbWtXNGPxJ3vi6ibwN76W01wnj2zYLd/fl2djD76kY0ou7ZkMbs70RDTo3FFKKx8zGJsIk+PzV6nvp/jtLYqySlbuuog+shcSu26Ov1gFf0LRAghZmsy/YjgsQTJZQqJ/HoVFGsM1lJmGYnJbQv7Vd/bvzDhsew1jCeAMMH7V7E/Hz6v9LxsTjfpjj0GPng36jeEpNZ3ifd5qQmmoVRQ2YnPe8nBNvNxZKT1ctQdSm5MGM1WUnoSUcuHc4ITAr9Zbq5jpI7nqg5L9EPmCA==

You are already lost when you [apply Exists_preserves_finite_conj]:

Lemma Map_Finite_subgoal_False (A := unit) (B := nat) : (forall r : Ensemble (A * B),
   Finite (A * B) r -> Finite (A * B) (fun x : A * B => exists b : B, In (A * B) r (fst x, b))) -> Finite (unit * nat) (Full_set _).
Proof.
  intro H.
  unfold Map, Lookup, In, A, B in *.
  specialize (H (Add _ (Empty_set _) (tt, 0))). 
  let T := match type of H with ?T -> _ => T end in
  assert (H' : T).
  { constructor; [ constructor | intro H' ].
    hnf in H'.
    destruct H'. }
  specialize (H H'); clear H'.
  eapply Finite_downward_closed; [ eassumption | ].
  intros [ [] ?] ?; hnf.
  eexists; right; constructor.
Qed.

You need to use the fact that there is a surjection from [r] onto your conclusion ensemble: map [p] to [(fst p, f (fst p) (snd p))].  Then prove that if you have a surjection [X ↠ Y], then [Finite X -> Finite Y].

-Jason


On Mon, Aug 1, 2016 at 9:22 AM John Wiegley <johnw AT newartisans.com> wrote:
>>>>> "FB" == Frédéric Besson <frederic.besson AT inria.fr> writes:

> If you go by induction over Finite0, for the base case, you need to prove:
>   Finite (A * B)
>     (fun x : A * B =>
>      exists b : B, In (A * B) (Empty_set (A * B)) (fst x, b))
> This is morally an empty set — but unless you allow functional extensionality —
> I doubt this is provably equal to Empty_set (A * B).

Hi Frédéric,

The base case is actually quite easily shown:

  inversion Finite0.
    eapply Finite_downward_closed; eauto with sets.
    intros ? H0; inversion H0; inversion H1.

Here is the full example, so you can see what I'm trying to prove and why:


I'm trying to create a mapping function for ensembles, and to show that
mapping over a finite ensemble must always result in a finite ensemble.

--
John Wiegley                  GPG fingerprint = 4710 CF98 AF9B 327B B80F
http://newartisans.com                          60E1 46C4 BD1A 7AC1 4BA2



Archive powered by MHonArc 2.6.18.

Top of Page