Tag Info

New answers tagged

1

I have a couple of ideas that might be improvements over what you are doing but they are neither fully realized nor tested. Consider this answer a work in progress. Matrix operations The first is to operate on the truth table itself with matrix operations. Probably this will be faster in some cases and slower in others than what you are doing now. I do ...


0

Here is an answer that is about as klugy as it can be, but very explicitly implements a binary relation. A binary relation on a list of variables (V) is a subset (S) of the set of all pairs {Vi,Vj}. V and S are external to all functions. There are three Boolean properties: reflexive, symmetric and transitive. Tilde[a,b] inserts {a,b} into S, and makes any ...


4

Note that "~" is used in Mathematica for infix form of operators and it isn't the same as Tilde which could be inputted as [Esc]~[Esc] ClearAll@Tilde Tilde /: Tilde[x_, x_] := True SetAttributes[Tilde, Orderless] Tilde /: Tilde[x_, y_ ] && Tilde[y_, z_ ] := Tilde[x, z] I added one more defenition to Tilde for the case when x, y are not the same ...



Top 50 recent answers are included