New answers tagged

0

I am now experimenting with this at: https://github.com/barrycarter/bcapps/blob/master/MATHEMATICA/bc-solve-mathematica-104993.m which is currently just one line: card[HoldPattern[Union[a_,b_]]] = card[a] + card[b] - card[Intersection[a,b]] which yields this error: Intersection::normal: Nonatomic expression expected at position 1 in Intersection[a, ...


5

If you apply BooleanConvert to each sentence it will reduce it to the disjunctive normal form. Then you can apply the SameQ test, BooleanConvert[(((a) ∨ (b ∧ c)))] === BooleanConvert[((a ∨ b) ∧ (a ∨ c))] (* True *) Or you could make a function, booleanCompare[sentences__] := SameQ @@ (BooleanConvert /@ {sentences}) booleanCompare[((a) ∨ (b ∧ c)), ((a ...


4

I think this is what you are looking for: BooleanTable[Xor[p, p || q], {p}, {q}] // TableForm



Top 50 recent answers are included