rzach / multlog

M. Ultlog, the genius many-valued logic expert
https://logic.at/multlog
7 stars 1 forks source link

Improve isIso testing #19

Open rzach opened 3 years ago

rzach commented 3 years ago

Currently isIso simply enumerates all permutations of the truth values of the target logic, maps the source logic to the permutation, and then test if the map respects the operations. This guarantees that every n! isomorphisms are considered, which is not necessary: say a 1-1 map f of a subset of V to V' is a partial iso if f([]v) = []'(f(v)). If f fails the congruence test, ie, either for some v \in dom(f),

then no 1-1 map expanding f to all of V can be an isomorphism. So instead of enumerating all 1-1 maps (permutations), we enumerate all partial 1-1 maps, fail if they violate the two conditions above, else add another element of v to dom(f).

rzach commented 3 years ago

Gotten started in commit 50804ccc9b48fc55c6111bd857861fbdb63e5c6b which is already pretty fast