MathGroup Archive 2001

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Logic and Truth Tables with Mathematica?


When you say a truth table, do you mean something like this?

VariableTable[vars_]:=Array[(Table[Part[vars,i]->(Part[List[##],i]==2),{i,1,Length[vars]}])&,Table[2,{i,1,Length[vars]}]]

TruthTable[expr_,vars_]:=ReplaceAll[expr,VariableTable[vars]]

No idea about the book

heathw at in-tch.com wrote:

> Hi,
> Can Mathematica, given a relation such as P->Q generate the truth table?
> Is there a book available that talks about Mathematica and logic?
> Thanks,
> Heath

--

Ignacio Rodriguez Ramirez de Arellano
Unidad de RMN
Universidad Complutense
Paseo Juan XXIII, 1
Madrid 28040, Spain

Tel. 34-91-394-3288
Fax  34-91-394-3245
e-mail: ignacio at sgirmn.pluri.ucm.es





  • Prev by Date: Re: Logic and Truth Tables with Mathematica?
  • Next by Date: Re: Clearing cache
  • Previous by thread: Re: Logic and Truth Tables with Mathematica?
  • Next by thread: Re: Logic and Truth Tables with Mathematica?