2
$\begingroup$

I'm working on a software problem and trying to describe it in symbolic logic so that I can get my head around it.

I have

$isnt(n) := \mathbf{F} \neq \emptyset \wedge \forall f \in \mathbf{F} : P(n,f) $

Basically, I'm checking n against all elements in F, unless F is empty.

Is there a way to simplify this so as to have no conjunctions (or disjunctions) outside of the quantifiers

  • 0
    @D$a$ncrum$b$: Right, well then I don't think that answers to the question as you've phrased it are likely to be very help$f$ul to you. Could you please have a look at my answer and let me know why that's not how you want to do it (if it's not)?2012-05-11

2 Answers 2

3

I don't understand why you're asking for what you seem to be asking for. Surely the efficient way to define the function is something like:

if $F = \emptyset$ then return false;
else for $f\in F$ do
for $f\in F$, if $P(n,f)$ = false then return false;
return true;

  • 0
    Well, it is the natural and efficient way to do it. =]2012-05-11
3

So you can nest quantifiers, but you can't use conjunctions or disjunctions outside the quantifiers. So how about

$ \exists f\in\mathbf{F}\ \forall g\in\mathbf{F}: P(n,f)\wedge P(n,g) $

  • 1
    @MartianInvader: That's better. =]2012-05-11