Skip to content

Deductive Logic Expression in Mathematical Models ​

A conventional mathematical program is normally written as an objective and a set of equalities or inequalities. That representation is ideal for a solver, but it does not fully express why a business rule holds, which premises it needs, or what it implies. A deductive-logic representation treats every constraint as a proposition function over candidate solutions, giving domain knowledge, mathematics, and executable code a shared semantics.

1. From standard form to predicate form ​

A conventional linear model can be written as:

min/maxcTxs.t.Ax ρ b,x∈X,

where each row of ρ is ≤, =, or ≥. The deductive form does not require every rule to already be a linear inequality:

optx∈Xf(x)s.t.⋀p∈Cp(x).
  • X: the candidate universe, including variable types, domains, and modeling premises;
  • f:X→R: the objective evaluation function;
  • C: a set of constraint predicates;
  • p:X→{true,false}: the truth of one domain proposition for a candidate.

The feasible set is:

F(C)={x∈X|⋀p∈Cp(x)}.

The optimum set of a minimization problem is:

Bestmin(f,C)={x∈F(C)|∀x′∈F(C), f(x)≤f(x′)}.

For maximization, replace the final ≤ with ≥. This definition separates “feasible” from “at least as good as every other feasible candidate,” which supports reasoning about optimality, critical constraints, and infeasibility.

2. A concrete constraint is also a predicate ​

A concrete mathematical-programming constraint can be represented by:

p=(g,ρ,b),p(x)≡[g(x) ρ b],

where g:X→R is a symbolic expression and ρ∈{≤,=,≥}. For example:

∑i∈Iwixi≤W

corresponds to:

pcapacity(x)≡[∑i∈Iwixi≤W].

During domain analysis, the predicate can remain abstract:

pcapacity(x)≡“solution x does not exceed resource capacity.”

Formal design must prove that the concrete numerical predicate is equivalent to this domain predicate under declared premises. It is not enough to replace the sentence with a plausible formula.

3. Connectives and quantifiers ​

Standard logic composes domain rules:

FormMeaningModeling example
p∧qBoth rules holdCapacity and time windows both hold
p∨qAt least one holdsUse an owned or outsourced resource
¬pThe rule does not holdForbid a combination
p⇒qThe consequent is required when the antecedent holdsAn active server may carry flow
p⇔qBoth sides have the same meaningAn indicator matches a business state
∀i∈I:piEvery object satisfies the ruleEvery demand is covered
∃i∈I:piAt least one object satisfies itSelect at least one plan

OSPF logical function symbols can compile some propositions into linear or quadratic models, but logical semantics and numerical implementation should remain separately documented. Big-M constants, auxiliaries, and bounds are compilation choices, not the domain rule itself.

4. Premises, definitions, and constraints ​

Distinguish three kinds of statements:

  1. Premises/assumptions define the candidate universe X, such as nonnegative demand, unique indices, and consistent capacity units;
  2. Definitions name a domain concept, such as “node assigned” being the sum of assignment variables;
  3. Constraints filter feasible candidates, such as at most one server on each node.

Encoding a premise as a decision constraint can conceal invalid input data. Leaving a definition as an anonymous local expression loses cross-context reuse and traceability.

Defining an intermediate value z means:

∀x∈X,z(x)=g(x).

A named intermediate value is therefore not an approximate cache. It is an equivalent definition that other predicates may reference.

5. Service-placement example ​

Let xis∈{0,1} indicate whether service s is placed on node i. The Route context publishes:

NodeAssignedi=∑s∈Sxis,ServiceAssigneds=∑i∈Nxis.

Two domain rules become:

pnode(x)≡∀i∈N:NodeAssignedi≤1,pservice(x)≡∀s∈S:ServiceAssigneds≤1.

In the Bandwidth context, “a node cannot produce net outflow unless it hosts a service” is:

∀i∈N:¬Deployedi⇒OutFlowi=0.

If Deployedi is equivalent to the binary state derived from NodeAssignedi and 0≤OutFlowi≤Ui is known, the familiar linear form follows:

OutFlowi≤UiDeployedi.

The bound Ui must be valid and justified. An arbitrary huge M can be numerically unstable and, when too small, logically nonequivalent.

6. Deduction in a knowledge base ​

Let K be the existing predicate set and q a conclusion. Define:

K⊨q⟺∀x∈X:(⋀p∈Kp(x))⇒q(x).

This relation answers:

  • implication: whether existing rules entail a conclusion;
  • redundancy: if K⊨q, adding q does not change the feasible region;
  • conflict: if K⊨¬q, the new rule is incompatible with current knowledge;
  • equivalence: K⊨(q⇔r) means two expressions agree under the premises;
  • refinement: an implementation predicate is more concrete while preserving required equivalence.

Consistency is satisfiability, not merely the absence of an obvious pairwise conflict:

SAT(K)⟺∃x∈X:⋀p∈Kp(x).

7. From a symbolic constraint to an executable predicate ​

Tests, callbacks, and diagnostics can evaluate a concrete inequality as a predicate. Floating-point code must use an explicit tolerance:

kotlin
fun satisfied(
    lhs: Flt64,
    relation: Relation,
    rhs: Flt64,
    tolerance: Flt64
): Boolean = when (relation) {
    LessEqual -> lhs <= rhs + tolerance
    Equal -> abs(lhs - rhs) <= tolerance
    GreaterEqual -> lhs + tolerance >= rhs
}

Keep these concepts separate:

  • exact semantics: g(x)ρb in documentation and proof;
  • solver tolerance: backend primal-feasibility rules;
  • business tolerance: acceptable operational deviation;
  • display precision: number formatting.

One “number of displayed decimal places” cannot replace all four.

8. Traceable representation ​

Maintain a record for each rule:

FieldExample
Domain statementAt most one service is placed on each node
Predicate IDroute.node_assignment
PreconditionsNode and service sets are deduplicated
Formal predicate∀i,∑sxis≤1
Intermediate valuesNodeAssignedi
Executable ownerNodeAssignmentLimit pipeline
EvidenceBoundary unit tests, model snapshot, and small known optimum

This mapping lets requirements, mathematical, code, and test reviews discuss the same semantics.

9. Boundaries of the method ​

  • A predicate representation does not turn a general MILP into an automatically proved theorem.
  • A solver's feasible status means the compiled constraints hold within numerical tolerance; it does not mean the domain rules are complete.
  • Logical equivalence is meaningful only under an explicit universe X and premises K.
  • Linearizing nonlinear logic requires finite bounds and correct strict/non-strict boundary treatment.
  • A callback that observes only the current candidate must handle missing values, nonintegral candidates, and solve-stage differences.

10. Next steps ​