-- | Michael Buchler. \"Relative Saturation of Subsets and Interval
-- Cycles as a Means for Determining Set-Class Similarity\". PhD
-- thesis, University of Rochester, 1998
module Music.Theory.Metric.Buchler_1998 where

import Data.Int {- base -}
import Data.List {- base -}
import Data.Ratio {- base -}

import qualified Music.Theory.List as T
import qualified Music.Theory.Z as T
import qualified Music.Theory.Z.Forte_1973 as T
import qualified Music.Theory.Set.List as T

-- | Predicate for list with cardinality /n/.
of_c :: Integral n => n -> [a] -> Bool
of_c :: forall n a. Integral n => n -> [a] -> Bool
of_c n
n = (forall a. Eq a => a -> a -> Bool
== n
n) forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall i a. Num i => [a] -> i
genericLength

-- | Set classes of cardinality /n/.
--
-- > sc_table_n 2 == [[0,1],[0,2],[0,3],[0,4],[0,5],[0,6]]
sc_table_n :: (Integral n) => n -> [[Int8]]
sc_table_n :: forall n. Integral n => n -> [[Int8]]
sc_table_n n
n = forall a. (a -> Bool) -> [a] -> [a]
filter (forall n a. Integral n => n -> [a] -> Bool
of_c n
n) (forall a b. (a -> b) -> [a] -> [b]
map forall a b. (a, b) -> b
snd forall n. Num n => SC_Table n
T.sc_table)

-- | Minima and maxima of ICV of SCs of cardinality /n/.
--
-- > icv_minmax 5 == ([0,0,0,1,0,0],[4,4,4,4,4,2])
icv_minmax :: (Integral n, Integral b) => n -> ([b], [b])
icv_minmax :: forall n b. (Integral n, Integral b) => n -> ([b], [b])
icv_minmax n
n =
    let t :: [[Int8]]
t = forall n. Integral n => n -> [[Int8]]
sc_table_n n
n
        i :: [[b]]
i = forall a. [[a]] -> [[a]]
transpose (forall a b. (a -> b) -> [a] -> [b]
map (forall i n. (Integral i, Num n) => Z i -> [i] -> [n]
T.z_icv forall i. Num i => Z i
T.z12) [[Int8]]
t)
    in (forall a b. (a -> b) -> [a] -> [b]
map forall (t :: * -> *) a. (Foldable t, Ord a) => t a -> a
minimum [[b]]
i,forall a b. (a -> b) -> [a] -> [b]
map forall (t :: * -> *) a. (Foldable t, Ord a) => t a -> a
maximum [[b]]
i)

data R = MIN | MAX deriving (R -> R -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: R -> R -> Bool
$c/= :: R -> R -> Bool
== :: R -> R -> Bool
$c== :: R -> R -> Bool
Eq,Int -> R -> ShowS
[R] -> ShowS
R -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [R] -> ShowS
$cshowList :: [R] -> ShowS
show :: R -> String
$cshow :: R -> String
showsPrec :: Int -> R -> ShowS
$cshowsPrec :: Int -> R -> ShowS
Show)
type D n = (R,n)

-- | Pretty printer for 'R'.
--
-- > map r_pp [MIN,MAX] == ["+","-"]
r_pp :: R -> String
r_pp :: R -> String
r_pp R
r =
    case R
r of
      R
MIN -> String
"+"
      R
MAX -> String
"-"

-- | 'SATV' element measure with given funtion.
satv_f :: (Integral n) => ((n,n,n) -> D n) -> [Int8] -> [D n]
satv_f :: forall n. Integral n => ((n, n, n) -> D n) -> [Int8] -> [D n]
satv_f (n, n, n) -> D n
f [Int8]
p =
    let n :: Int
n = forall (t :: * -> *) a. Foldable t => t a -> Int
length [Int8]
p
        i :: [n]
i = forall i n. (Integral i, Num n) => Z i -> [i] -> [n]
T.z_icv forall i. Num i => Z i
T.z12 [Int8]
p
        ([n]
l,[n]
r) = forall n b. (Integral n, Integral b) => n -> ([b], [b])
icv_minmax Int
n
    in forall a b. (a -> b) -> [a] -> [b]
map (n, n, n) -> D n
f (forall a b c. [a] -> [b] -> [c] -> [(a, b, c)]
zip3 [n]
l [n]
i [n]
r)

-- | Pretty printer for SATV element.
--
-- > satv_e_pp (satv_a [0,1,2,6,7,8]) == "<-1,+2,+0,+0,-1,-0>"
satv_e_pp :: Show i => [D i] -> String
satv_e_pp :: forall i. Show i => [D i] -> String
satv_e_pp =
    let f :: (R, a) -> String
f (R
i,a
j) = R -> String
r_pp R
i forall a. [a] -> [a] -> [a]
++ forall a. Show a => a -> String
show a
j
    in forall a. (a, a) -> [a] -> [a]
T.bracket (Char
'<',Char
'>') forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a. [a] -> [[a]] -> [a]
intercalate String
"," forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a b. (a -> b) -> [a] -> [b]
map forall {a}. Show a => (R, a) -> String
f

type SATV i = ([D i],[D i])

-- | Pretty printer for 'SATV'.
satv_pp :: Show i => SATV i -> String
satv_pp :: forall i. Show i => SATV i -> String
satv_pp ([D i]
i,[D i]
j) = forall a. (a, a) -> [a] -> [a]
T.bracket (Char
'(',Char
')') (forall i. Show i => [D i] -> String
satv_e_pp [D i]
i forall a. [a] -> [a] -> [a]
++ String
"," forall a. [a] -> [a] -> [a]
++ forall i. Show i => [D i] -> String
satv_e_pp [D i]
j)

-- | @SATVa@ measure.
--
-- > satv_e_pp (satv_a [0,1,2,6,7,8]) == "<-1,+2,+0,+0,-1,-0>"
-- > satv_e_pp (satv_a [0,1,2,3,4]) == "<-0,-1,-2,+0,+0,+0>"
satv_a :: Integral i => [Int8] -> [D i]
satv_a :: forall i. Integral i => [Int8] -> [D i]
satv_a =
    let f :: (b, b, b) -> (R, b)
f (b
l,b
i,b
r) = let l' :: b
l' = forall a. Num a => a -> a
abs (b
i forall a. Num a => a -> a -> a
- b
l)
                        r' :: b
r' = forall a. Num a => a -> a
abs (b
i forall a. Num a => a -> a -> a
- b
r)
                    in case forall a. Ord a => a -> a -> Ordering
compare b
l' b
r' of
                         Ordering
LT -> (R
MIN,b
l')
                         Ordering
_ -> (R
MAX,b
r')
    in forall n. Integral n => ((n, n, n) -> D n) -> [Int8] -> [D n]
satv_f forall {b}. (Ord b, Num b) => (b, b, b) -> (R, b)
f

-- | @SATVb@ measure.
--
-- > satv_e_pp (satv_b [0,1,2,6,7,8]) == "<+4,-4,-5,-4,+4,+3>"
-- > satv_e_pp (satv_b [0,1,2,3,4]) == "<+4,+3,+2,-3,-4,-2>"
satv_b :: Integral i => [Int8] -> [D i]
satv_b :: forall i. Integral i => [Int8] -> [D i]
satv_b =
    let f :: (b, b, b) -> (R, b)
f (b
l,b
i,b
r) = let l' :: b
l' = forall a. Num a => a -> a
abs (b
i forall a. Num a => a -> a -> a
- b
l)
                        r' :: b
r' = forall a. Num a => a -> a
abs (b
i forall a. Num a => a -> a -> a
- b
r)
                    in case forall a. Ord a => a -> a -> Ordering
compare b
l' b
r' of
                         Ordering
LT -> (R
MAX,b
r')
                         Ordering
_ -> (R
MIN,b
l')
    in forall n. Integral n => ((n, n, n) -> D n) -> [Int8] -> [D n]
satv_f forall {b}. (Ord b, Num b) => (b, b, b) -> (R, b)
f

-- | 'SATV' measure.
--
-- > satv_pp (satv [0,3,6,9]) == "(<+0,+0,-0,+0,+0,-0>,<-3,-3,+4,-3,-3,+2>)"
-- > satv_pp (satv [0,1,3,4,8]) == "(<-2,+1,-2,-1,-2,+0>,<+2,-3,+2,+2,+2,-2>)"
-- > satv_pp (satv [0,1,2,6,7,8]) == "(<-1,+2,+0,+0,-1,-0>,<+4,-4,-5,-4,+4,+3>)"
-- > satv_pp (satv [0,4]) == "(<+0,+0,+0,-0,+0,+0>,<-1,-1,-1,+1,-1,-1>)"
-- > satv_pp (satv [0,1,3,4,6,9]) == "(<+2,+2,-0,+0,+2,-1>,<-3,-4,+5,-4,-3,+2>)"
-- > satv_pp (satv [0,1,3,6,7,9]) == "(<+2,+2,-1,+0,+2,-0>,<-3,-4,+4,-4,-3,+3>)"
-- > satv_pp (satv [0,1,2,3,6]) == "(<-1,-2,-2,+0,+1,-1>,<+3,+2,+2,-3,-3,+1>)"
-- > satv_pp (satv [0,1,2,3,4,6]) == "(<-1,-2,-2,+0,+1,+1>,<+4,+4,+3,-4,-4,-2>)"
-- > satv_pp (satv [0,1,3,6,8]) == "(<+1,-2,-2,+0,-1,-1>,<-3,+2,+2,-3,+3,+1>)"
-- > satv_pp (satv [0,2,3,5,7,9]) == "(<+1,-2,-2,+0,-1,+1>,<-4,+4,+3,-4,+4,-2>)"
satv :: Integral i => [Int8] -> SATV i
satv :: forall i. Integral i => [Int8] -> SATV i
satv [Int8]
p = (forall i. Integral i => [Int8] -> [D i]
satv_a [Int8]
p,forall i. Integral i => [Int8] -> [D i]
satv_b [Int8]
p)

-- | 'SATV' reorganised by 'R'.
--
-- > satv_minmax (satv [0,1,2,6,7,8]) == ([4,2,0,0,4,3],[1,4,5,4,1,0])
satv_minmax :: SATV i -> ([i],[i])
satv_minmax :: forall i. SATV i -> ([i], [i])
satv_minmax ([D i]
p,[D i]
q) =
    let f :: (R, a) -> (a, a) -> (a, a)
f (R
i,a
j) (a
_,a
k) = if R
i forall a. Eq a => a -> a -> Bool
== R
MIN then (a
j,a
k) else (a
k,a
j)
    in forall a b. [(a, b)] -> ([a], [b])
unzip (forall a b c. (a -> b -> c) -> [a] -> [b] -> [c]
zipWith forall {a} {a}. (R, a) -> (a, a) -> (a, a)
f [D i]
p [D i]
q)

-- | Absolute difference.
abs_dif :: Num a => a -> a -> a
abs_dif :: forall a. Num a => a -> a -> a
abs_dif a
i a
j = forall a. Num a => a -> a
abs (a
i forall a. Num a => a -> a -> a
- a
j)

-- | Sum of numerical components of @a@ and @b@ parts of 'SATV'.
--
-- > satv_n_sum (satv [0,1,2,6,7,8]) == [5,6,5,4,5,3]
-- > satv_n_sum (satv [0,3,6,9]) == [3,3,4,3,3,2]
satv_n_sum :: Num c => SATV c -> [c]
satv_n_sum :: forall c. Num c => SATV c -> [c]
satv_n_sum ([D c]
i,[D c]
j) = forall a b c. (a -> b -> c) -> [a] -> [b] -> [c]
zipWith forall a. Num a => a -> a -> a
(+) (forall a b. (a -> b) -> [a] -> [b]
map forall a b. (a, b) -> b
snd [D c]
i) (forall a b. (a -> b) -> [a] -> [b]
map forall a b. (a, b) -> b
snd [D c]
j)

-- > two_part_difference_vector (satv_a [0,1,2,6,7,8]) (satv [0,3,6,9]) == [2,2,4,0,2,0]
two_part_difference_vector :: (Integral i) => [D i] -> SATV i -> [i]
two_part_difference_vector :: forall i. Integral i => [D i] -> SATV i -> [i]
two_part_difference_vector [D i]
i SATV i
j =
    let ([i]
p,[i]
q) = forall i. SATV i -> ([i], [i])
satv_minmax SATV i
j
        f :: (R, b) -> Int -> i
f (R
r,b
_) Int
k = if R
r forall a. Eq a => a -> a -> Bool
== R
MIN then [i]
pforall a. [a] -> Int -> a
!!Int
k else [i]
qforall a. [a] -> Int -> a
!!Int
k
        z :: [i]
z = forall a b c. (a -> b -> c) -> [a] -> [b] -> [c]
zipWith forall {b}. (R, b) -> Int -> i
f [D i]
i [Int
0..]
    in forall a b c. (a -> b -> c) -> [a] -> [b] -> [c]
zipWith forall a. Num a => a -> a -> a
abs_dif (forall a b. (a -> b) -> [a] -> [b]
map forall a b. (a, b) -> b
snd [D i]
i) [i]
z

-- > two_part_difference_vector_set (satv [0,4]) (satv [0,1,3,4,6,9]) == ([2,2,5,4,2,2],[2,2,1,1,2,0])
two_part_difference_vector_set :: (Integral i) => SATV i -> SATV i -> ([i],[i])
two_part_difference_vector_set :: forall i. Integral i => SATV i -> SATV i -> ([i], [i])
two_part_difference_vector_set SATV i
i SATV i
j =
        (forall i. Integral i => [D i] -> SATV i -> [i]
two_part_difference_vector (forall a b. (a, b) -> a
fst SATV i
i) SATV i
j
        ,forall i. Integral i => [D i] -> SATV i -> [i]
two_part_difference_vector (forall a b. (a, b) -> a
fst SATV i
j) SATV i
i)

-- | @SATSIM@ metric.
--
-- > satsim [0,1,2,6,7,8] [0,3,6,9] == 25/46
-- > satsim [0,4] [0,1,3,4,6,9] == 25/34
-- > satsim [0,4] [0,1,3,6,7,9] == 25/34
-- > satsim [0,1,2,3,6] [0,1,2,3,4,6] == 1/49
-- > satsim [0,1,3,6,8] [0,2,3,5,7,9] == 1/49
-- > satsim [0,1,2,3,4] [0,1,4,5,7] == 8/21
-- > satsim [0,1,2,3,4] [0,2,4,6,8] == 4/7
-- > satsim [0,1,4,5,7] [0,2,4,6,8] == 4/7
satsim :: Integral a => [Int8] -> [Int8] -> Ratio a
satsim :: forall a. Integral a => [Int8] -> [Int8] -> Ratio a
satsim [Int8]
p [Int8]
q =
    let i :: SATV a
i = forall i. Integral i => [Int8] -> SATV i
satv [Int8]
p
        j :: SATV a
j = forall i. Integral i => [Int8] -> SATV i
satv [Int8]
q
        ([a]
d1,[a]
d2) = forall i. Integral i => SATV i -> SATV i -> ([i], [i])
two_part_difference_vector_set SATV a
i SATV a
j
        d :: a
d = forall (t :: * -> *) a. (Foldable t, Num a) => t a -> a
sum [a]
d1 forall a. Num a => a -> a -> a
+ forall (t :: * -> *) a. (Foldable t, Num a) => t a -> a
sum [a]
d2
        ([a]
n1,[a]
n2) = (forall c. Num c => SATV c -> [c]
satv_n_sum SATV a
i,forall c. Num c => SATV c -> [c]
satv_n_sum SATV a
j)
        n :: a
n = forall (t :: * -> *) a. (Foldable t, Num a) => t a -> a
sum [a]
n1 forall a. Num a => a -> a -> a
+ forall (t :: * -> *) a. (Foldable t, Num a) => t a -> a
sum [a]
n2
    in if a
n forall a. Eq a => a -> a -> Bool
== a
0 then forall a. HasCallStack => String -> a
error (forall a. Show a => a -> String
show (String
"satsim",[Int8]
p,[Int8]
q)) else a
d forall a. Integral a => a -> a -> Ratio a
% a
n

-- | Table of 'satsim' measures for all @SC@ pairs.
--
-- > length satsim_table == 24310
satsim_table :: Integral i => [(([Int8],[Int8]),Ratio i)]
satsim_table :: forall i. Integral i => [(([Int8], [Int8]), Ratio i)]
satsim_table =
    let f :: ([Int8], [Int8]) -> (([Int8], [Int8]), Ratio a)
f ([Int8]
i,[Int8]
j) = (([Int8]
i,[Int8]
j),forall a. Integral a => [Int8] -> [Int8] -> Ratio a
satsim [Int8]
i [Int8]
j)
        t :: [[Int8]]
t = forall a. (a -> Bool) -> [a] -> [a]
filter ((forall (t :: * -> *) a. (Foldable t, Eq a) => a -> t a -> Bool
`notElem` [Int
0,Int
1,Int
12]) forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall (t :: * -> *) a. Foldable t => t a -> Int
length) (forall a b. (a -> b) -> [a] -> [b]
map forall a b. (a, b) -> b
snd forall n. Num n => SC_Table n
T.sc_table)
    in forall a b. (a -> b) -> [a] -> [b]
map forall {a}.
Integral a =>
([Int8], [Int8]) -> (([Int8], [Int8]), Ratio a)
f (forall a. [a] -> [(a, a)]
T.pairs [[Int8]]
t)

-- | Histogram of values at 'satsim_table'.
--
-- > satsim_table_histogram == T.histogram (map snd satsim_table)
satsim_table_histogram :: Integral i => [(Ratio i,i)]
satsim_table_histogram :: forall i. Integral i => [(Ratio i, i)]
satsim_table_histogram = [(Ratio i
0,i
132),(Ratio i
1forall a. Fractional a => a -> a -> a
/Ratio i
49,i
4),(Ratio i
1forall a. Fractional a => a -> a -> a
/Ratio i
30,i
4),(Ratio i
2forall a. Fractional a => a -> a -> a
/Ratio i
49,i
16),(Ratio i
2forall a. Fractional a => a -> a -> a
/Ratio i
39,i
16),(Ratio i
18,i
8),(Ratio i
2forall a. Fractional a => a -> a -> a
/Ratio i
33,i
12),(Ratio i
3forall a. Fractional a => a -> a -> a
/Ratio i
49,i
30),(Ratio i
15,i
12),(Ratio i
14,i
144),(Ratio i
13,i
56),(Ratio i
4forall a. Fractional a => a -> a -> a
/Ratio i
49,i
72),(Ratio i
2forall a. Fractional a => a -> a -> a
/Ratio i
23,i
14),(Ratio i
2forall a. Fractional a => a -> a -> a
/Ratio i
21,i
304),(Ratio i
10,i
6),(Ratio i
5forall a. Fractional a => a -> a -> a
/Ratio i
49,i
132),(Ratio i
4forall a. Fractional a => a -> a -> a
/Ratio i
39,i
160),(Ratio i
1forall a. Fractional a => a -> a -> a
/Ratio i
9,i
264),(Ratio i
4forall a. Fractional a => a -> a -> a
/Ratio i
33,i
16),(Ratio i
6forall a. Fractional a => a -> a -> a
/Ratio i
49,i
152),(Ratio i
1forall a. Fractional a => a -> a -> a
/Ratio i
8,i
12),(Ratio i
5forall a. Fractional a => a -> a -> a
/Ratio i
39,i
108),(Ratio i
3forall a. Fractional a => a -> a -> a
/Ratio i
23,i
4),(Ratio i
25,i
44),(Ratio i
1forall a. Fractional a => a -> a -> a
/Ratio i
7,i
487),(Ratio i
7forall a. Fractional a => a -> a -> a
/Ratio i
46,i
6),(Ratio i
23,i
132),(Ratio i
8forall a. Fractional a => a -> a -> a
/Ratio i
49,i
304),(Ratio i
1forall a. Fractional a => a -> a -> a
/Ratio i
6,i
116),(Ratio i
4forall a. Fractional a => a -> a -> a
/Ratio i
23,i
86),(Ratio i
7forall a. Fractional a => a -> a -> a
/Ratio i
40,i
6),(Ratio i
7forall a. Fractional a => a -> a -> a
/Ratio i
39,i
444),(Ratio i
21,i
48),(Ratio i
9forall a. Fractional a => a -> a -> a
/Ratio i
49,i
208),(Ratio i
4forall a. Fractional a => a -> a -> a
/Ratio i
21,i
1116),(Ratio i
9forall a. Fractional a => a -> a -> a
/Ratio i
46,i
84),(Ratio i
1forall a. Fractional a => a -> a -> a
/Ratio i
5,i
68),(Ratio i
10forall a. Fractional a => a -> a -> a
/Ratio i
49,i
298),(Ratio i
8forall a. Fractional a => a -> a -> a
/Ratio i
39,i
472),(Ratio i
5forall a. Fractional a => a -> a -> a
/Ratio i
24,i
4),(Ratio i
7forall a. Fractional a => a -> a -> a
/Ratio i
33,i
88),(Ratio i
34,i
394),(Ratio i
5forall a. Fractional a => a -> a -> a
/Ratio i
23,i
176),(Ratio i
2forall a. Fractional a => a -> a -> a
/Ratio i
9,i
516),(Ratio i
11forall a. Fractional a => a -> a -> a
/Ratio i
49,i
378),(Ratio i
9forall a. Fractional a => a -> a -> a
/Ratio i
40,i
8),(Ratio i
33,i
176),(Ratio i
7forall a. Fractional a => a -> a -> a
/Ratio i
30,i
116),(Ratio i
11forall a. Fractional a => a -> a -> a
/Ratio i
46,i
172),(Ratio i
8forall a. Fractional a => a -> a -> a
/Ratio i
33,i
64),(Ratio i
12forall a. Fractional a => a -> a -> a
/Ratio i
49,i
314),(Ratio i
1forall a. Fractional a => a -> a -> a
/Ratio i
4,i
10),(Ratio i
10forall a. Fractional a => a -> a -> a
/Ratio i
39,i
336),(Ratio i
7forall a. Fractional a => a -> a -> a
/Ratio i
27,i
4),(Ratio i
6forall a. Fractional a => a -> a -> a
/Ratio i
23,i
276),(Ratio i
9forall a. Fractional a => a -> a -> a
/Ratio i
34,i
2),(Ratio i
13forall a. Fractional a => a -> a -> a
/Ratio i
49,i
374),(Ratio i
45,i
124),(Ratio i
31,i
192),(Ratio i
11forall a. Fractional a => a -> a -> a
/Ratio i
40,i
4),(Ratio i
58,i
56),(Ratio i
11forall a. Fractional a => a -> a -> a
/Ratio i
39,i
376),(Ratio i
13forall a. Fractional a => a -> a -> a
/Ratio i
46,i
298),(Ratio i
2forall a. Fractional a => a -> a -> a
/Ratio i
7,i
1297),(Ratio i
7forall a. Fractional a => a -> a -> a
/Ratio i
24,i
48),(Ratio i
8forall a. Fractional a => a -> a -> a
/Ratio i
27,i
8),(Ratio i
30,i
226),(Ratio i
10forall a. Fractional a => a -> a -> a
/Ratio i
33,i
148),(Ratio i
7forall a. Fractional a => a -> a -> a
/Ratio i
23,i
204),(Ratio i
15forall a. Fractional a => a -> a -> a
/Ratio i
49,i
228),(Ratio i
43,i
384),(Ratio i
11forall a. Fractional a => a -> a -> a
/Ratio i
34,i
6),(Ratio i
13forall a. Fractional a => a -> a -> a
/Ratio i
40,i
50),(Ratio i
15forall a. Fractional a => a -> a -> a
/Ratio i
46,i
272),(Ratio i
16forall a. Fractional a => a -> a -> a
/Ratio i
49,i
196),(Ratio i
1forall a. Fractional a => a -> a -> a
/Ratio i
3,i
1528),(Ratio i
17forall a. Fractional a => a -> a -> a
/Ratio i
49,i
132),(Ratio i
8forall a. Fractional a => a -> a -> a
/Ratio i
23,i
230),(Ratio i
7forall a. Fractional a => a -> a -> a
/Ratio i
20,i
128),(Ratio i
67,i
6),(Ratio i
54,i
82),(Ratio i
14forall a. Fractional a => a -> a -> a
/Ratio i
39,i
144),(Ratio i
41,i
160),(Ratio i
11forall a. Fractional a => a -> a -> a
/Ratio i
30,i
168),(Ratio i
18forall a. Fractional a => a -> a -> a
/Ratio i
49,i
74),(Ratio i
17forall a. Fractional a => a -> a -> a
/Ratio i
46,i
228),(Ratio i
10forall a. Fractional a => a -> a -> a
/Ratio i
27,i
32),(Ratio i
3forall a. Fractional a => a -> a -> a
/Ratio i
8,i
238),(Ratio i
8forall a. Fractional a => a -> a -> a
/Ratio i
21,i
412),(Ratio i
53,i
160),(Ratio i
19forall a. Fractional a => a -> a -> a
/Ratio i
49,i
84),(Ratio i
78,i
76),(Ratio i
9forall a. Fractional a => a -> a -> a
/Ratio i
23,i
94),(Ratio i
13forall a. Fractional a => a -> a -> a
/Ratio i
33,i
284),(Ratio i
2forall a. Fractional a => a -> a -> a
/Ratio i
5,i
310),(Ratio i
11forall a. Fractional a => a -> a -> a
/Ratio i
27,i
44),(Ratio i
20forall a. Fractional a => a -> a -> a
/Ratio i
49,i
76),(Ratio i
16forall a. Fractional a => a -> a -> a
/Ratio i
39,i
376),(Ratio i
77,i
14),(Ratio i
19forall a. Fractional a => a -> a -> a
/Ratio i
46,i
150),(Ratio i
52,i
128),(Ratio i
14forall a. Fractional a => a -> a -> a
/Ratio i
33,i
156),(Ratio i
17forall a. Fractional a => a -> a -> a
/Ratio i
40,i
154),(Ratio i
3forall a. Fractional a => a -> a -> a
/Ratio i
7,i
81),(Ratio i
13forall a. Fractional a => a -> a -> a
/Ratio i
30,i
108),(Ratio i
10forall a. Fractional a => a -> a -> a
/Ratio i
23,i
114),(Ratio i
17forall a. Fractional a => a -> a -> a
/Ratio i
39,i
236),(Ratio i
15forall a. Fractional a => a -> a -> a
/Ratio i
34,i
4),(Ratio i
4forall a. Fractional a => a -> a -> a
/Ratio i
9,i
460),(Ratio i
22forall a. Fractional a => a -> a -> a
/Ratio i
49,i
10),(Ratio i
9forall a. Fractional a => a -> a -> a
/Ratio i
20,i
96),(Ratio i
51,i
172),(Ratio i
21forall a. Fractional a => a -> a -> a
/Ratio i
46,i
124),(Ratio i
11forall a. Fractional a => a -> a -> a
/Ratio i
24,i
144),(Ratio i
63,i
112),(Ratio i
75,i
84),(Ratio i
23forall a. Fractional a => a -> a -> a
/Ratio i
49,i
6),(Ratio i
87,i
28),(Ratio i
19forall a. Fractional a => a -> a -> a
/Ratio i
40,i
96),(Ratio i
10forall a. Fractional a => a -> a -> a
/Ratio i
21,i
84),(Ratio i
11forall a. Fractional a => a -> a -> a
/Ratio i
23,i
28),(Ratio i
13forall a. Fractional a => a -> a -> a
/Ratio i
27,i
188),(Ratio i
16forall a. Fractional a => a -> a -> a
/Ratio i
33,i
52),(Ratio i
19forall a. Fractional a => a -> a -> a
/Ratio i
39,i
160),(Ratio i
24forall a. Fractional a => a -> a -> a
/Ratio i
49,i
8),(Ratio i
1forall a. Fractional a => a -> a -> a
/Ratio i
2,i
545),(Ratio i
25forall a. Fractional a => a -> a -> a
/Ratio i
49,i
2),(Ratio i
20forall a. Fractional a => a -> a -> a
/Ratio i
39,i
144),(Ratio i
17forall a. Fractional a => a -> a -> a
/Ratio i
33,i
100),(Ratio i
14forall a. Fractional a => a -> a -> a
/Ratio i
27,i
296),(Ratio i
12forall a. Fractional a => a -> a -> a
/Ratio i
23,i
64),(Ratio i
21forall a. Fractional a => a -> a -> a
/Ratio i
40,i
42),(Ratio i
97,i
48),(Ratio i
85,i
56),(Ratio i
15forall a. Fractional a => a -> a -> a
/Ratio i
28,i
1),(Ratio i
73,i
64),(Ratio i
13forall a. Fractional a => a -> a -> a
/Ratio i
24,i
32),(Ratio i
25forall a. Fractional a => a -> a -> a
/Ratio i
46,i
66),(Ratio i
61,i
36),(Ratio i
11forall a. Fractional a => a -> a -> a
/Ratio i
20,i
18),(Ratio i
27forall a. Fractional a => a -> a -> a
/Ratio i
49,i
24),(Ratio i
5forall a. Fractional a => a -> a -> a
/Ratio i
9,i
192),(Ratio i
19forall a. Fractional a => a -> a -> a
/Ratio i
34,i
132),(Ratio i
22forall a. Fractional a => a -> a -> a
/Ratio i
39,i
24),(Ratio i
13forall a. Fractional a => a -> a -> a
/Ratio i
23,i
18),(Ratio i
17forall a. Fractional a => a -> a -> a
/Ratio i
30,i
40),(Ratio i
4forall a. Fractional a => a -> a -> a
/Ratio i
7,i
176),(Ratio i
23forall a. Fractional a => a -> a -> a
/Ratio i
40,i
32),(Ratio i
19forall a. Fractional a => a -> a -> a
/Ratio i
33,i
16),(Ratio i
72,i
28),(Ratio i
27forall a. Fractional a => a -> a -> a
/Ratio i
46,i
56),(Ratio i
107,i
84),(Ratio i
23forall a. Fractional a => a -> a -> a
/Ratio i
39,i
20),(Ratio i
29forall a. Fractional a => a -> a -> a
/Ratio i
49,i
26),(Ratio i
16forall a. Fractional a => a -> a -> a
/Ratio i
27,i
72),(Ratio i
3forall a. Fractional a => a -> a -> a
/Ratio i
5,i
14),(Ratio i
20forall a. Fractional a => a -> a -> a
/Ratio i
33,i
4),(Ratio i
14forall a. Fractional a => a -> a -> a
/Ratio i
23,i
10),(Ratio i
30forall a. Fractional a => a -> a -> a
/Ratio i
49,i
24),(Ratio i
21forall a. Fractional a => a -> a -> a
/Ratio i
34,i
120),(Ratio i
5forall a. Fractional a => a -> a -> a
/Ratio i
8,i
28),(Ratio i
17forall a. Fractional a => a -> a -> a
/Ratio i
27,i
36),(Ratio i
31forall a. Fractional a => a -> a -> a
/Ratio i
49,i
22),(Ratio i
71,i
16),(Ratio i
94,i
22),(Ratio i
117,i
72),(Ratio i
13forall a. Fractional a => a -> a -> a
/Ratio i
20,i
4),(Ratio i
32forall a. Fractional a => a -> a -> a
/Ratio i
49,i
14),(Ratio i
2forall a. Fractional a => a -> a -> a
/Ratio i
3,i
14),(Ratio i
27forall a. Fractional a => a -> a -> a
/Ratio i
40,i
6),(Ratio i
23forall a. Fractional a => a -> a -> a
/Ratio i
34,i
14),(Ratio i
19forall a. Fractional a => a -> a -> a
/Ratio i
28,i
1),(Ratio i
70,i
4),(Ratio i
19forall a. Fractional a => a -> a -> a
/Ratio i
27,i
4),(Ratio i
127,i
24),(Ratio i
5forall a. Fractional a => a -> a -> a
/Ratio i
7,i
10),(Ratio i
25forall a. Fractional a => a -> a -> a
/Ratio i
34,i
4),(Ratio i
3forall a. Fractional a => a -> a -> a
/Ratio i
4,i
7),(Ratio i
7forall a. Fractional a => a -> a -> a
/Ratio i
9,i
12),(Ratio i
114,i
4),(Ratio i
17forall a. Fractional a => a -> a -> a
/Ratio i
21,i
4),(Ratio i
23forall a. Fractional a => a -> a -> a
/Ratio i
28,i
7),(Ratio i
5forall a. Fractional a => a -> a -> a
/Ratio i
6,i
20),(Ratio i
6forall a. Fractional a => a -> a -> a
/Ratio i
7,i
11),(Ratio i
8forall a. Fractional a => a -> a -> a
/Ratio i
9,i
12),(Ratio i
25forall a. Fractional a => a -> a -> a
/Ratio i
28,i
16),(Ratio i
19forall a. Fractional a => a -> a -> a
/Ratio i
21,i
38),(Ratio i
112,i
4),(Ratio i
134,i
7),(Ratio i
178,i
18),(Ratio i
20forall a. Fractional a => a -> a -> a
/Ratio i
21,i
12),(Ratio i
1,i
32)]

-- Local Variables:
-- truncate-lines:t
-- End: