diff options
author | Yuchen Pei <baconp@gmail.com> | 2017-07-17 07:52:03 -0400 |
---|---|---|
committer | Yuchen Pei <baconp@gmail.com> | 2017-07-17 07:52:03 -0400 |
commit | 3a73960fe269cfae8c4c6da9b51c6dc70f53a542 (patch) | |
tree | b19034ab80161205660afa0cc059cd7f0117e3e0 /Math/Combinatorics/PitmanTransform.hs | |
parent | f1ad02cf7a29e3ad007bf58ac13ea8da96bfcd39 (diff) |
checkpoint
Diffstat (limited to 'Math/Combinatorics/PitmanTransform.hs')
-rw-r--r-- | Math/Combinatorics/PitmanTransform.hs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/Math/Combinatorics/PitmanTransform.hs b/Math/Combinatorics/PitmanTransform.hs index e6eea85..0379bce 100644 --- a/Math/Combinatorics/PitmanTransform.hs +++ b/Math/Combinatorics/PitmanTransform.hs @@ -15,6 +15,7 @@ import RobinsonSchensted import Math.Algebra.Field.Base (Q)-- for Q import Math.Algebra.LinearAlgebra import Prelude hiding ( (*>), Word ) +import Test.QuickCheck import qualified Data.List as L --pitman :: (Fractional a, Ord a) => Type -> Int -> [a] -> [a] @@ -65,3 +66,11 @@ gTPFromInt (GTP xs) = GTP $ fmap (fmap fromIntegral) xs prop_Pitman_RobinsonSchensted_sanitise :: [Int] -> Word Int prop_Pitman_RobinsonSchensted_sanitise = W . (fmap (\t -> abs t + 1)) + + +randomQMatrix :: Int -> Gen [[Q]] +randomQMatrix n = vectorOf 20 (vector n) + +prop_Pitman_WeylChamber :: Int -> Property +prop_Pitman_WeylChamber m = let (t, n) = int2TypeInt m in + forAll (randomQMatrix $ dimensionOfHostSpace t n) (\xs -> isInWeylChamber $ pitman t n xs) |