How can i change working of forall in agda? -


i working pair of stream of rationals, lets (l,r) l , r stream of rationals. there 3 conditions l , r both have satisfy valid. have written code as..

iscut_ : cut → set iscut x = (p q : pair ) →                if((((p mem (getlc x)) ∨ (p mem (getrc x)))) ∧                  ((not (p mem getlc x)) ∨ (not (p mem getrc x))) ∧                  (not (p <pair q) ∨ ((p mem getlc x) ∨ (q mem getrc x))))then ⊤               else ⊥ 

i wanted change return type of function bool. here cut means (l, r) , mem membership.

the problem coming forall p q expect return type set. how should handle desired result.

you can write this:

iscut : cut → (p q : pair) → bool iscut x p q = (((p mem (getlc x)) ∨ (p mem (getrc x))))             ∧ ((not (p mem getlc x)) ∨ (not (p mem getrc x)))             ∧ (not (p <pair q) ∨ ((p mem getlc x) ∨ (q mem getrc x)))) 

Comments

Popular posts from this blog

facebook - android ACTION_SEND to share with specific application only -

python - Creating a new virtualenv gives a permissions error -

javascript - cocos2d-js draw circle not instantly -