the Use of implication constraints

funcImplication - ExternalLangDef to specify logical implication.

The implication is a function that takes two logical operands: antecedents and consequences, can take the following values:

Prerequisite Consequence Result
0 0 1
0 1 1
1 0 0
1 1 1

Logically, the implication “If a, then b” is equal to “(not a) or b”. For example, a constraint of the form: “If nickname = snow leopard, then gender = male” would lead to the conclusion all cats with the male sex and all (not snow leopard).

Example

All Ivans Ivanovs and not Ivanov

var langDef = new ExternalLangDef();
Function function = langDef.GetFunction(langDef.funcImplication,
                    langDef.GetFunction(langDef.funcEQ, new VariableDef(langDef.StringType, Last name),"Ivanov"),
                    langDef.GetFunction(langDef.funcEQ, new VariableDef(langDef.StringType, "Name"), "Ivan"));