home *** CD-ROM | disk | FTP | other *** search
/ The C Users' Group Library 1994 August / wc-cdrom-cusersgrouplibrary-1994-08.iso / listings / v_08_07 / 8n07077a < prev    next >
Text File  |  1990-06-19  |  674b  |  27 lines

  1. Boolean : Type is
  2. const
  3.     TRUE  : Boolean
  4.     FALSE : Boolean
  5. ops
  6.     not     : nil -> Boolean
  7.     or      : Boolean -> Boolean
  8.     and     : Boolean -> Boolean
  9.     implies : Boolean -> Boolean
  10.     iseq    : Boolean -> Boolean   # equivalence
  11. eqn
  12.     # idempotence of not
  13.     'not( 'not(x)) = x
  14.     'not( TRUE) = FALSE
  15.     # associativity of or
  16.     x.or( y.or( z)) = (x.or(y)).or(z)
  17.     # commutativity of or
  18.     x.or( y) = y.or( x)
  19.     x.or( TRUE) = TRUE
  20.     x.or( FALSE) = x
  21.     # definition of and
  22.     'and( x, y) = (x.not.or( y.not )).not
  23.     # implication
  24.     x.implies( y) = x.not.or( y)
  25.     x.iseq( y) = x.implies( y).and( y.implies( x))
  26.  
  27.