Skip to content

Commit

Permalink
Fix some incorrect README stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
cjdrake committed Mar 29, 2015
1 parent a0b8d25 commit 26eef37
Showing 1 changed file with 9 additions and 15 deletions.
24 changes: 9 additions & 15 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -169,19 +169,19 @@ Investigate Boolean identities::
# Idempotence
>>> a | a
a
>>> a & a
>>> And(a, a)
a

# Identity
>>> a | 0
>>> Or(a, 0)
a
>>> a & 1
>>> And(a, 1)
a

# Dominance
>>> a | 1
>>> Or(a, 1)
1
>>> a & 0
>>> And(a, 0)
0

# Commutativity
Expand All @@ -191,9 +191,9 @@ Investigate Boolean identities::
True

# Associativity
>>> a | (b | c)
>>> Or(a, Or(b, c))
Or(a, b, c)
>>> a & (b & c)
>>> And(a, And(b, c))
And(a, b, c)

# Distributive
Expand All @@ -208,12 +208,6 @@ Investigate Boolean identities::
>>> Not(a & b).to_nnf()
Or(~a, ~b)

# Absorption
>>> (a | (a & b)).absorb()
a
>>> (a & (a | b)).absorb()
a

Perform Shannon expansions::

>>> a.expand(b)
Expand Down Expand Up @@ -325,8 +319,8 @@ of two-level covers of Boolean functions.

Use the ``espresso_exprs`` function to minimize multiple expressions::

>>> f1 = ~a & ~b & ~c | ~a & ~b & c | a & ~b & c | a & b & c | a & b & ~c
>>> f2 = ~a & ~b & c | a & ~b & c
>>> f1 = Or(~a & ~b & ~c, ~a & ~b & c, a & ~b & c, a & b & c, a & b & ~c)
>>> f2 = Or(~a & ~b & c, a & ~b & c)
>>> f1m, f2m = espresso_exprs(f1, f2)
>>> f1m
Or(And(~a, ~b), And(a, b), And(~b, c))
Expand Down

0 comments on commit 26eef37

Please sign in to comment.