MathGroup Archive 2001

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

Search the Archive

Re: Logic and Truth Tables with Mathematica?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg29846] Re: Logic and Truth Tables with Mathematica?
  • From: Ignacio Rodriguez <ignacio at sgirmn.pluri.ucm.es>
  • Date: Fri, 13 Jul 2001 04:19:26 -0400 (EDT)
  • Organization: UCM
  • References: <9iji4d$ris$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

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?