groff
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [Groff] Propositional Logic


From: Ted Harding
Subject: RE: [Groff] Propositional Logic
Date: Sun, 11 Oct 2009 22:20:53 +0100 (BST)

On 11-Oct-09 19:55:21, Paul O'Leary McCann wrote:
> Is there a way to use propositional logic symbols? I've checked around
> and looked at eqn, but the best solution I've come up with is unicode
> symbols and heirloom troff. -POLM

It would help if you could say which symbols you want to use
(since there is some variance in usage). Perhaps you could point
to say a PDF file somewhere which has the symbols you want.

A few are already available in the PostScript Symbol set, for example
(my names);

AND (upward-pointing wedge)
OR (downward-pointing wedge)
cup (union symbol)
cap (intersection symbol)
forall (inverted A)
thereis (backwards E)
in, i.e. "member of" (like a skinny epsilon)
notin (like "in" with a stroke)
subset
prsubset (proper subset)
supset (superset)
prsupset (proper superset)
emptyset


and others can often be constructed (e.g. "¬" in a suitable size).

I don't have much use for the full range of logic symbols myself,
since I mainly do "ordinary" mathematical work, but I have embodied
a few in my 'eqnrc' file (in groff's tmac directory).
Here are some entries:

define subset %{ type "binary" vcenter "\(ib" }%
define prsubset %{ type "binary" vcenter "\(sb" }%
define supset %{ type "binary" vcenter "\(ip" }%
define prsupset %{ type "binary" vcenter "\(sp" }%
define emptyset %{ type "ordinary" "\(es" }%
define cup %{ type "binary" "\(cu" }%
define cap %{ type "binary" "\(ca" }%
define AND %{ type "binary" "\(AN" }%
define OR %{ type "binary" "\(OR" }%

sdefine forall %{ type "operator" "\(fa" }%
sdefine thereis %{ type "operator" "\(te" }%
sdefine suchthat %{ type "operator" vcenter roman ":" }%
sdefine in %{ type "binary" vcenter "\(mo" }%
sdefine notin %{ type "binary" vcenter "\(nm" }%


So you could write something like

.EQ
forall x in A suchthat x ^>^ 0
~~ thereis y in B suchthat y notin C
.EN

You can also easily define arrows, extended arrows, double arrows,
extended double arrows, and reversals of these, etc., for implications.

Let us know what you're after, and we'll try to come up with the goods!

Ted.

--------------------------------------------------------------------
E-Mail: (Ted Harding) <address@hidden>
Fax-to-email: +44 (0)870 094 0861
Date: 11-Oct-09                                       Time: 22:20:50
------------------------------ XFMail ------------------------------




reply via email to

[Prev in Thread] Current Thread [Next in Thread]