Wolfram ResearchPRODUCTSPURCHASEFOR USERSCOMPANYOUR SITES
THIS IS DOCUMENTATION FOR AN OBSOLETE PRODUCT.
SEE THE DOCUMENTATION CENTER FOR THE LATEST INFORMATION.

Documentation / Mathematica / Built-in Functions / Programming / Functional Programming /

Further Examples: Distribute

This expresses the distributive law of multiplication over addition.

In[1]:=

Out[1]=

Here is an equivalent way to write the input.

In[2]:=

Out[2]=

This is how taking a power distributes over addition.

In[3]:=

Out[3]=

We can generalize this to an arbitrary function.

In[4]:=

Out[4]=

Here we distribute over a product instead of a sum (two variations).

In[5]:=

Out[5]=

In[6]:=

Out[6]=

This does the same thing as PowerExpand.

In[7]:=

Out[7]=

In[8]:=

Out[8]=

This defines the function Tuples which gives the list of all n-tuples formed from elements of the list lst.

In[9]:=

In[10]:=

Out[10]=

The defined function Subsums gives all possible sums of sublists of a list.

In[11]:=

In[12]:=

Out[12]=

The defined function PowerSet gives a sorted list of all subsets of a list.

In[13]:=

In[14]:=

Out[14]=

The defined function TruthTable gives the truth table corresponding to a logical expression. DisplayTruthTable displays the output from TruthTable in tabular form.

In[15]:=

In[16]:=

This gives the truth table for Implies[Or[A, B], C].

In[17]:=

Out[17]=



Any questions about topics on this page? Click here to get an individual response.Buy NowMore Information


 © 2009 Wolfram Research, Inc.  Terms of Use  Privacy Policy | [ja] |
Sign up for our newsletter: