Documentation
  • Introduction
  • Why Ampersand?
    • The Business Rules Manifesto and Ampersand
  • Tutorial
    • Example system: Enrollment
    • Conceptual Model: Enrollment
    • Your tool: RAP4
    • Making your first Ampersand script
  • Reactive programming
  • The language Ampersand
    • How to read syntax statements
    • Truth
    • Atoms
    • The CONCEPT statement
    • The RELATION statement
    • The MEANING statement
    • The PURPOSE statement
    • The CLASSIFY statement
    • The RULE statement
    • Terms
      • Semantics
      • Semantics in logic
        • Primitive terms
        • Boolean operators
        • Relational operators
        • Residual operators
      • Semantics in natural language
        • Primitive terms in natural language
        • Boolean operators in natural language
        • Relational operators in natural language
        • Residual operators in natural language
      • Semantics in sets
        • Primitive terms in set theory
        • Boolean operators in set theory
        • Relational operators in set theory
      • Semantics of terms, defined algebraically
        • Boolean operators in algebra
        • Relational operators in algebra
      • Semantics visualized
        • Semantics of boolean operators visualized
        • Semantics of relational operators visualized
        • Semantics of residuals visualized
    • Context
    • Module
    • Best Practices
    • Syntactical Conventions
      • The CONCEPT statement
      • The RELATION statement
      • The RULE statement
      • The CONTEXT statement
      • The INCLUDE statement
      • Explanation
      • Patterns
      • Population
        • Population in spreadsheets
      • The PURPOSE statement
      • The IDENT statement
      • The TABLE statement
      • Language support
    • The INCLUDE statement
    • Patterns
    • Services
      • Example: Client
      • Example: Login
      • Syntax and meaning
      • Explanation
      • Layout of user interfaces
        • Your own widgets (HTML and CSS)
      • CRUD
    • Population
      • Population in spreadsheets
    • The ENFORCE statement
    • The IDENT statement
    • The TABLE statement
    • Language support
    • Current date
    • The Preprocessor
    • Design considerations
  • Running the Ampersand compiler
    • Configuration
    • Commands (vs. 4.0.0 and later)
    • Options (up to vs. 3.17.4)
  • Architecture of an Ampersand Application
    • Backend framework
    • Hooks
    • Extensions
      • The ExecEngine
  • Deploying your Ampersand script
    • Compiler
    • Deploy your own web application on your laptop
    • Prototype multi-stage build
    • Prototype database
  • Reusing Available Modules
    • Modules
    • Security
    • SIAM (Sessions, Identity and Access Management) Module
  • Exercises
    • Delivery
    • VOG (in Dutch)
  • Installing Ampersand
    • Deploying your Prototype
    • Installing the tools manually
  • Modeling
    • Domain Driven Design
    • Data modeling
    • Legal modeling
    • Architecture modeling
    • Metamodeling
    • Limitations of Ampersand
  • Configuring your application
  • The Excel Importer
  • Plans
    • Current State
    • NoSQL storage
    • API documentation
    • OWL and RDFS input
    • Refactor the front-end
  • Research
Powered by GitBook
On this page
  • Purpose of boolean operators
  • Meaning
  • Union
  • Intersection
  • Difference
  • Natural language templates
  • Other explanation
Export as PDF
  1. The language Ampersand
  2. Terms
  3. Semantics in natural language

Boolean operators in natural language

Purpose of boolean operators

To say things such as pair ("peter","macbook") is either in relation ownsa or wantsa, requires us to use boolean operators ∪\cup ∪, ∩\cap∩, and −- − .

Meaning

Let us explain the meaning of relational operators ∪\cup ∪, ∩\cap∩, and −- − by means of examples.

Assume we have a relation, ownsa[Person*LaptopType], which contains the persons who own a particular type of laptop. A fact "peter" ownsa "macbook" means that Peter owns a MacBook.

Also assume another relation wantsa[Person*LaptopType], which contains the persons who want a particular type of laptop. A fact "peter" wantsa "macbook" means that Peter wants a MacBook.

Union

The sentence: "Peter owns a MacBook or Peter wants a MacBook." is represented as "peter" (ownsa ∪\cup∪ wantsa) "macbook".

Intersection

The sentence: "Peter owns a MacBook and Peter wants a MacBook." is represented as "peter" (label ∩\cap∩ colour) "macbook".

Difference

The sentence: "Peter owns a MacBook and Peter does not want a MacBook." is represented as "peter" (label −-− colour) "macbook".

Natural language templates

Formally

Natural language template

a r b or a s b.

a r b and a s b.

a r b and nota s b.

Other explanation

PreviousPrimitive terms in natural languageNextRelational operators in natural language

Last updated 5 years ago

There is a pattern to this. A computer can generate a literal translation from the formula to natural language. However, that translation looks clumsy, verbose and elaborate. It is up to you to turn that in normal language. For examples . The systematic translation is given in the following table:

Would you like a different explanation of the relational operators? explains the boolean operators in terms of set theory. An explanation in logic is given . for some algebraic rules about boolean operators. If you want to see it explained visually in Venn-diagrams, .

a (r∪s) ba\ (r\cup s)\ ba (r∪s) b
a (r∩s) ba\ (r\cap s)\ ba (r∩s) b
a (r−s) ba\ (r-s)\ ba (r−s) b
click here
This page
here
Click here
click here