Bernd Zeimetz: playing german lotto
playing german lotto
update: sorry for the broken feed, I hope I ve kicked this piece of php hard enough so it works as it s supposed to work. Tomorrow I ll replace it by something maintainable, written in python.
Stefano, I have no clue how the lottery in Italy works, but I ll play the numbers generated by this little program on Wednesday and Saturday:
#!/usr/bin/python numbers = ["09", "F9", "11", "02", "9D", "74", "E3", "5B", "D8", "41", "56", "C5", "63", "56", "88", "C0"] #in germany all lotto numbers x must be 1 <= x <= 49 numbers_int = [ (int(num, 16) % 49) + 1 for num in numbers ] #unfortunately 16 numbers are not enough for 3 fields in #the german lottery, so let's add the current year #(of course, you can add 2 other numbers, if you don't like this year) numbers_int += [20, 07] print "your numbers for the german lotto:" print numbers_int[0:6], numbers_int[6:12], numbers_int[12:18]
).
It is more expressive than predicate calculus, technically it is
based on the Calculus of (Co)Inductive Constructions, but the most
important differences are that you can give inductive definitions
of predicates (or define recursive data structures) and the system
will let you play with them freely automatically constructing
recursors on these data types. You can even define infinite data
structures (using co-induction) mimicking lazy types available in
languages as Haskell.
Regarding the synergy of Coq with