Skip to Content.
Sympa Menu

coq-club - [Coq-Club] Re:How to define combination in coq

coq-club AT inria.fr

Subject: The Coq mailing list

List archive

[Coq-Club] Re:How to define combination in coq


chronological Thread 
  • From: ��ӣ <phoebezz AT 163.com>
  • To: coq-club AT inria.fr
  • Subject: [Coq-Club] Re:How to define combination in coq
  • Date: Wed, 9 Nov 2011 12:02:40 +0800 (CST)

Hi guys:
   Thank you  very much for all your guidance. 
   I read something about list combination in Caml and rewrote the function 'comb' in coq. But I found it didn't meet my demand.
   So I try to wrote another function 'combList' and tested it successfully. However, I think my definition of 'combList' is too complex that I used another 3 auxiliary function in the definition. It troubles me a lot when I try to prove some lemmas relates to it .  So can you help me to simplify  'combList'?  Thanks!
    The related codes are in the attachment .
 
Best,
Phoebe
   
  
 



-------- Forwarding messages --------
From: "×óÓ£" <phoebezz AT 163.com>
Date: 2011-11-06 21:47:43
To: coq-club AT inria.fr
Subject: How to define combination in coq
Hi guys,

          I'm trying to define a function to compute the combination of sets, which pick an element from every set and combine into another set. Let ci be the number of element in set i .The total number of elements in result set will be

  ¦°ci  (0<i<n)

for example
 Definition  sets :={{"a","b"},{"c","d"},{"e"}}
  combination (sets)  = {{¡°a¡±,"c","e"},{"a","d","e"},{¡°b¡±,"c","e"},{"b","d","e"}}

Can you give me some guidance about the definition of combination function? Thank you very much.




Attachment: combine.v
Description: Binary data




Archive powered by MhonArc 2.6.16.

Top of Page