First-Order Logic (FOL) Syntax Guide
Supported Notation Formats
Our system supports two primary notation formats for FOL expressions:
1. BFO Standard Notation (Recommended)
Uses instance_of(x, Class, t)
syntax with explicit temporal parameter.
This is the preferred format that allows for temporal reasoning.
forall x, t (instance_of(x, continuant, t) -> exists_at(x, t))
2. Traditional Notation
Uses Class(x)
syntax without explicit temporal parameter.
This simplified format is more limited but easier to write.
forall x (Continuant(x) -> exists t (Exists_at(x, t)))
Syntax Elements
Element | Symbol | Description | Example |
---|---|---|---|
Universal Quantifier | forall |
For all values of the variable | forall x (P(x)) |
Existential Quantifier | exists |
There exists at least one value of the variable | exists x (P(x)) |
Implication | -> |
If...then... relationship | P(x) -> Q(x) |
Conjunction | & |
Logical AND | P(x) & Q(x) |
Disjunction | | |
Logical OR | P(x) | Q(x) |
Negation | - |
Logical NOT | -P(x) |
Biconditional | <-> |
If and only if (equivalent to) | P(x) <-> Q(x) |
Parentheses | () |
Group expressions and establish precedence | (P(x) & Q(x)) -> R(x) |
Multiple Variable Quantification
For multiple variables in quantifiers, use any of these formats:
forall x, t (P(x, t))
- Comma-separated variables (automatically preprocessed)forall x forall t (P(x, t))
- Separate quantifiers
forall x, t
format, our system automatically converts it to forall x forall t
for compatibility with the parser.
Working with BFO Terms
When writing FOL expressions, you can use any BFO classes and relations. Here are some common BFO terms:
Common BFO Classes
entity
- The root class of all BFO entitiescontinuant
- Entities that persist through timeoccurrent
- Entities that unfold in timeindependent_continuant
- Continuants that don't require bearersmaterial_entity
- Physical objectsprocess
- Occurrents with temporal parts
Common BFO Relations
instance_of
- Relates an individual to a classexists_at
- Temporal existence of a continuantpart_of
- Mereological part relationhas_part
- Inverse of part_oflocated_in
- Spatial location
CLIF Notation (Common Logic Interchange Format)
CLIF (Common Logic Interchange Format) is a standardized syntax for expressing first-order logic that is more machine-friendly and serves as an ISO standard (ISO/IEC 24707).
CLIF Syntax Basics
- Uses parenthesized prefix notation
- Variables start with a question mark or capital letter
- Quantifiers:
(forall (?x) ...)
and(exists (?x) ...)
- Connectives:
and
,or
,not
,implies
,iff
Example in CLIF
(forall (?x ?t)
(if (instance_of ?x continuant ?t)
(exists_at ?x ?t)))
Common Errors
Error | Example | Solution |
---|---|---|
Missing parentheses | forall x P(x) -> Q(x) |
forall x (P(x) -> Q(x)) |
Incorrect case for BFO terms | instance_of(x, Continuant, t) |
instance_of(x, continuant, t) |
Free variables (not bound by a quantifier) | P(x) -> Q(y) |
forall x (P(x) -> exists y (Q(y))) |
Mixed notation formats | forall x (Continuant(x) & instance_of(x, entity, t)) |
Stick to one format: forall x,t (instance_of(x, continuant, t) & instance_of(x, entity, t)) |
Examples
Valid FOL Expressions
-
forall x,t (instance_of(x, material_entity, t) -> instance_of(x, independent_continuant, t))
All material entities are independent continuants
-
forall x,t (instance_of(x, process, t) -> instance_of(x, occurrent, t))
All processes are occurrents
-
forall x,t,u (instance_of(x, continuant, t) & instance_of(x, continuant, u) -> exists_at(x, t) & exists_at(x, u))
A continuant exists at all times at which it is a continuant
-
forall x,t (instance_of(x, process, t) -> exists y,u (instance_of(y, continuant, u) & participates_in(y, x, u) & part_of(u, t)))
All processes have at least one continuant participant