From df48c12f6efc63f49c34b85ad99219df691410ea Mon Sep 17 00:00:00 2001 From: Hongrui Fang Date: Wed, 5 Apr 2023 22:22:45 +0800 Subject: [PATCH] fix subvalue check --- agora/Agora/Utils.hs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/agora/Agora/Utils.hs b/agora/Agora/Utils.hs index 662e3d2..25178d4 100644 --- a/agora/Agora/Utils.hs +++ b/agora/Agora/Utils.hs @@ -176,13 +176,13 @@ psubtractSortedValue = phoistAcyclic $ plam $ \a b -> # (pfmap # pnegate) # pto b -pisPositiveValue :: +pisNonNegativeValue :: forall (kg :: KeyGuarantees) (am :: AmountGuarantees) (s :: S). Term s (PValue kg am :--> PBool) -pisPositiveValue = +pisNonNegativeValue = phoistAcyclic $ plam $ - (AssocMap.pall # (AssocMap.pall # plam (0 #<)) #) + (AssocMap.pall # (AssocMap.pall # plam (0 #<=)) #) . pto pisSubValueOf :: @@ -194,7 +194,7 @@ pisSubValueOf :: :--> PBool ) pisSubValueOf = phoistAcyclic $ plam $ \vl vr -> - pisPositiveValue + pisNonNegativeValue #$ psubtractSortedValue # vl # vr