What are the requirements that a computer function must fulfill in order to be considered "monotonous"?

What are the requirements that a computer function / procedure / predicate must fulfill in order to be considered "monotone"?

Let A be some thing ,
Let B be some thing ,
Let R be a monotonic relationship between A and B ,
Let R_ be a non-monotonic relationship between A and B ,
Let R become false if R_ is true ,
Let R_ become true if R is false ,
Let C be a constraint in consideration of R ,
Let C become false if R_ is true ,
Let D be the collection of constraints C (upon relationship R) .

**What is D ?**

I reviewed some literature, for example. Wikipedia article “ monotonous function ”. What interests me most is the practical set of criteria that I can apply when pragmatically related to computer programming. What are some tips and tricks that I must follow when creating and developing my functions so that they are more "monotonous"?

+4
source share
1

, "" .

, , : , , . , , .

Prolog . Prolog, , .

, , , .

, Prolog , . , , Prolog:

f(a).
f(b).
f(c).

:

?- setof(., f(X), [_,_]).
false.

, strikethrough:

f(a) :- false.
f(b).
f(c).

Prolog , , , , -, case.

:

?- setof(X, f(X), [_,_]).
true.

, setof/3 , !

+3

Source: https://habr.com/ru/post/1674441/


All Articles