unicode_fol_kit.satisfies_so¶
- unicode_fol_kit.satisfies_so(formula, structure, assignment=None, pred_binding=None)[source]¶
Return whether
structuresatisfiesformula(second-order Tarski).assignmentmaps object-variable names to individuals (as insemantics.tarski.satisfies());pred_bindingmaps a bound predicate-variable name to its current relation (a set of argument tuples). Both default to empty and are threaded immutably.Recursion:
Atom
A(t1..tk): ifAis currently bound (A in pred_binding), it is true iff the tuple of evaluated term values is inpred_binding[A](an arity-0 boundAis true iff() in pred_binding[A]). Otherwise satisfaction falls back to the structure exactly assemantics.tarski.satisfies()does — including=as identity and≠as non-identity.Not/And/Or/Xor/Implies/Iff: the classical truth tables.
Quantifier / SortedQuantifier (object-level): range over the domain (or the named sort), threading the same
pred_binding.SecondOrderQuantifier
∀P/k φ/∃P/k φ: rangePover every relationR ⊆ domain ** k(the powerset of allk-tuples).∀holds iffφholds for all suchR;∃iff for some. See the module docstring for the2 ** (n ** k)complexity.
- Raises:
ValueError – on a Łukasiewicz node (use the fuzzy evaluator), an unknown quantifier type / node type, or when a
∀P/∃Pwould enumerate more thanMAX_RELATIONSrelations (a clear error instead of a hang — see the module docstring for the2 ** (n ** k)cost).NotImplementedError – on a lambda or modal node — these are out of scope for second-order predicate semantics (lambda: beta-reduce and lambda-eliminate first).
- Parameters:
- Return type: