unicode_fol_kit.rel_countermodel¶
- unicode_fol_kit.rel_countermodel(formula, max_worlds=2)[source]¶
Return
(model, world)whereformulafails at a normal world, or None.EXHAUSTIVE search over every simplified Routley–Meyer interpretation with
|W| ≤ max_worldsworlds and exactly ONE normal world"w0": every involution for*, everyR ⊆ (W∖N) × W × W, and every valuation of the formula’s atoms. The returned countermodel is verified withrel_satisfies()before it is returned (the search’s failure check is that call), so a non-None result definitively refutes validity in B.One normal world is WLOG for countermodel existence: if
φfails at a normal worldw0of any interpretation, demote every other normal worldwto non-normal and add the triplesR(w, x, x)for allx— the demoted →-clause with those triples coincides with the normal-world clause, the other clauses never mentionN, so every truth value is preserved andw0(relabelled first) still refutesφ. The search enumerates ALLR, so it covers that transformed interpretation.The space is EXPONENTIAL: about
inv(n) · 2^((n-1)·n²) · 2^(n·a)interpretations fornworlds andaatoms.max_worlds=2with ≤ 3 atoms is ~2·16·64 ≈ 2000 models (well under a second);max_worlds=3with 3 atoms is already ≈ 5·10⁸ — keep the bound tiny.