sbv-5.14: SMT Based Verification: Symbolic Haskell theorem prover using SMT solving.

Copyright | (c) Levent Erkok
License | BSD3
Maintainer | erkokl@gmail.com
Stability | experimental
Safe Haskell | None
Language | Haskell2010

Data.SBV.Examples.Puzzles.DogCatMouse

Description

Puzzle: Spend exactly 100 dollars and buy exactly 100 animals. Dogs cost 15 dollars, cats cost 1 dollar, and mice cost 25 cents each. You have to buy at least one of each. How many of each should you buy?

Synopsis

- puzzle :: IO AllSatResult

# Documentation

puzzle :: IO AllSatResult Source #

Prints the only solution:

    >>> puzzle
    Solution #1:
      dog   =  3 :: Integer
      cat   = 41 :: Integer
      mouse = 56 :: Integer
    This is the only solution.