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:
where each row of
: the candidate universe, including variable types, domains, and modeling premises; : the objective evaluation function; : a set of constraint predicates; : the truth of one domain proposition for a candidate.
The feasible set is:
The optimum set of a minimization problem is:
For maximization, replace the final
2. A concrete constraint is also a predicate
A concrete mathematical-programming constraint can be represented by:
where
corresponds to:
During domain analysis, the predicate can remain abstract:
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:
| Form | Meaning | Modeling example |
|---|---|---|
| Both rules hold | Capacity and time windows both hold | |
| At least one holds | Use an owned or outsourced resource | |
| The rule does not hold | Forbid a combination | |
| The consequent is required when the antecedent holds | An active server may carry flow | |
| Both sides have the same meaning | An indicator matches a business state | |
| Every object satisfies the rule | Every demand is covered | |
| At least one object satisfies it | Select 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:
- Premises/assumptions define the candidate universe
, such as nonnegative demand, unique indices, and consistent capacity units; - Definitions name a domain concept, such as “node assigned” being the sum of assignment variables;
- 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
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
Two domain rules become:
In the Bandwidth context, “a node cannot produce net outflow unless it hosts a service” is:
If
The bound
6. Deduction in a knowledge base
Let
This relation answers:
- implication: whether existing rules entail a conclusion;
- redundancy: if
, adding does not change the feasible region; - conflict: if
, the new rule is incompatible with current knowledge; - equivalence:
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:
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:
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:
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:
| Field | Example |
|---|---|
| Domain statement | At most one service is placed on each node |
| Predicate ID | route.node_assignment |
| Preconditions | Node and service sets are deduplicated |
| Formal predicate | |
| Intermediate values | |
| Executable owner | NodeAssignmentLimit pipeline |
| Evidence | Boundary 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
and premises . - 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.