From 76b1bdd8bd3fc9be3b218d8e5ea37a39dd4c2476 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