<rss version="2.0">
  <channel>
    <title>logic on Context may be all you need</title>
    <link>https://matt.thompson.gr/categories/logic/</link>
    <description></description>
    
    <language>en</language>
    
    <lastBuildDate>Thu, 13 Aug 2026 12:59:30 +0200</lastBuildDate>
    
    <item>
      <title>[IA Series 11/n] The Grammar of Logic — A Term Sheet</title>
      <link>https://matt.thompson.gr/2026/08/13/125930.html</link>
      <pubDate>Thu, 13 Aug 2026 12:59:30 +0200</pubDate>
      
      <guid>http://thompsonson.micro.blog/2026/08/13/125930.html</guid>
      <description>&lt;p&gt;&lt;em&gt;This is a term sheet for the grammar of logic, in the same spirit as the original &lt;a href=&#34;https://matt.thompson.gr/2025/05/16/ia-series-n-intelligent-agents.html&#34;&gt;Intelligent Agents Term Sheet&lt;/a&gt;. Most terms come from Russell and Norvig&amp;rsquo;s &amp;lsquo;Artificial Intelligence: A Modern Approach&amp;rsquo; (Chapters 7-8) and the standard literature on formal logic.&lt;/em&gt;&lt;/p&gt;
&lt;h2 id=&#34;introduction&#34;&gt;Introduction&lt;/h2&gt;
&lt;p&gt;The ontology work has kept using a vocabulary I never formally defined — predicates, derived rules, well-formedness — all of it written in the language of logic. Before going further I wanted a term sheet for the &lt;em&gt;grammar&lt;/em&gt; of that language: what the symbols are, what strings count as well-formed, and what a well-formed formula means. This post is that term sheet. It is deliberately lean; the aim is a shared vocabulary, not a textbook.&lt;/p&gt;
&lt;h2 id=&#34;the-grammar--core-terminology&#34;&gt;The Grammar — Core Terminology&lt;/h2&gt;
&lt;h3 id=&#34;the-symbols&#34;&gt;The symbols&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Formal language&lt;/strong&gt;: A set of strings built from an alphabet according to formation rules.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Alphabet&lt;/strong&gt;: The symbols a formal language is built from — logical constants, variables, predicates, functions, and punctuation.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Connectives&lt;/strong&gt;: The logical constants that combine sentences.
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Negation (¬)&lt;/strong&gt;: &lt;em&gt;not&lt;/em&gt; — flips a sentence&amp;rsquo;s truth value.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Conjunction (∧)&lt;/strong&gt;: &lt;em&gt;and&lt;/em&gt; — true only when both sides are true.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Disjunction (∨)&lt;/strong&gt;: &lt;em&gt;or&lt;/em&gt; — true when at least one side is true.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Implication (⇒)&lt;/strong&gt;: &lt;em&gt;if &amp;hellip; then &amp;hellip;&lt;/em&gt; — false only when the antecedent is true and the consequent is false.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Biconditional (⇔)&lt;/strong&gt;: &lt;em&gt;if and only if&lt;/em&gt; — true when both sides agree in truth value.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Quantifiers&lt;/strong&gt;: The logical constants that range over objects.
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Universal (∀)&lt;/strong&gt;: &lt;em&gt;for all&lt;/em&gt;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Existential (∃)&lt;/strong&gt;: &lt;em&gt;there exists&lt;/em&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Equality (=)&lt;/strong&gt;: a predicate asserting two terms denote the same object.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Parentheses&lt;/strong&gt;: grouping, and the grammar&amp;rsquo;s only punctuation.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;terms&#34;&gt;Terms&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Term&lt;/strong&gt;: An expression that refers to an object — a constant, a variable, or a function applied to terms.
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Constant symbol&lt;/strong&gt;: Names a specific object (e.g., &lt;code&gt;pr-42&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Variable symbol&lt;/strong&gt;: Ranges over objects (e.g., &lt;code&gt;x&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Function symbol&lt;/strong&gt;: Maps objects to objects (e.g., &lt;code&gt;parent(x)&lt;/code&gt;).&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;predicates-and-sentences&#34;&gt;Predicates and sentences&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Predicate symbol&lt;/strong&gt;: A relation over objects. Applied to terms it yields an atomic sentence.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Atomic sentence (atom)&lt;/strong&gt;: A predicate applied to terms — the smallest well-formed sentence (e.g., &lt;code&gt;merged(pr-42)&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Compound sentence&lt;/strong&gt;: Atoms combined with connectives and quantifiers.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Well-formed formula (wff)&lt;/strong&gt;: A string that obeys the formation rules — the grammar&amp;rsquo;s definition of a legal sentence.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Sentence&lt;/strong&gt;: A well-formed formula with no free variables (a closed formula) — a claim that has a definite truth value in a model.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;scope-and-binding&#34;&gt;Scope and binding&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Scope&lt;/strong&gt;: The part of a formula governed by a quantifier.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Bound variable&lt;/strong&gt;: A variable within the scope of its own quantifier.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Free variable&lt;/strong&gt;: A variable not bound by any quantifier. A formula with free variables is &lt;em&gt;open&lt;/em&gt;; it has no definite truth value until the variables are assigned.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;the-grammar-stated&#34;&gt;The Grammar, stated&lt;/h2&gt;
&lt;p&gt;The formation rules, in BNF — this is the grammar of logic proper:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;Sentence         → AtomicSentence | ComplexSentence
AtomicSentence   → Predicate(Term, ...) | Term = Term
ComplexSentence  → ( Sentence )
                 | ¬ Sentence
                 | Sentence ∧ Sentence
                 | Sentence ∨ Sentence
                 | Sentence ⇒ Sentence
                 | Sentence ⇔ Sentence
                 | Quantifier Variable, ... Sentence
Term             → Function(Term, ...) | Constant | Variable
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Everything else is not a sentence of the language — no matter how plausible it reads.&lt;/p&gt;
&lt;p&gt;This grammar declares facts — predicates and the sentences built from them. Actions, operations with preconditions and effects, are the &lt;em&gt;planning&lt;/em&gt; half, written over this grammar&amp;rsquo;s sentences rather than inside it.&lt;/p&gt;
&lt;h2 id=&#34;semantics--meaning&#34;&gt;Semantics — Meaning&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Interpretation&lt;/strong&gt;: An assignment of meaning to a language — a domain plus a mapping that names the constants, predicates, and functions in it.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Model&lt;/strong&gt;: An interpretation that makes a given sentence (or set of sentences) true.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Determination&lt;/strong&gt;: A sentence has no intrinsic truth. The grammar determines what is well-formed; truth is determined relative to an interpretation, and which interpretation is intended is &lt;em&gt;attributed&lt;/em&gt; — chosen by a human modeling the world, not discovered. No truth without a model; no model without an attributed interpretation.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Domain (universe)&lt;/strong&gt;: The set of objects an interpretation ranges over.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Truth value&lt;/strong&gt;: True or false — what a sentence receives relative to an interpretation.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Truth table&lt;/strong&gt;: A complete enumeration of a connective&amp;rsquo;s truth behaviour for all combinations of its arguments.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Satisfaction&lt;/strong&gt;: A formula is satisfied by an interpretation when it is true in it.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Entailment (⊨)&lt;/strong&gt;: &lt;em&gt;KB ⊨ α&lt;/em&gt; — every model of the knowledge base is also a model of α. The semantic notion of logical consequence.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Validity&lt;/strong&gt;: A sentence true in &lt;em&gt;every&lt;/em&gt; interpretation (a tautology).&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Satisfiability&lt;/strong&gt;: A sentence true in &lt;em&gt;some&lt;/em&gt; interpretation.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Contingency&lt;/strong&gt;: A sentence true in some interpretations and false in others — neither valid nor contradictory.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Contradiction (unsatisfiability)&lt;/strong&gt;: A sentence true in &lt;em&gt;no&lt;/em&gt; interpretation.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Logical equivalence (≡)&lt;/strong&gt;: Two sentences true in exactly the same interpretations.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;reasoning--using-the-grammar&#34;&gt;Reasoning — Using the Grammar&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Knowledge base (KB)&lt;/strong&gt;: The set of sentences an agent holds to be true.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Inference&lt;/strong&gt;: Deriving new sentences from existing ones.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Derivation (⊢)&lt;/strong&gt;: &lt;em&gt;KB ⊢ α&lt;/em&gt; — α is reachable from the KB by applying inference rules. The syntactic notion of proof.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Sound inference&lt;/strong&gt;: Never derives a false conclusion — every derived sentence is entailed.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Complete inference&lt;/strong&gt;: Can derive every entailed sentence.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Inference rules&lt;/strong&gt;: The grammar&amp;rsquo;s rewrite moves — e.g., &lt;strong&gt;modus ponens&lt;/strong&gt; (&lt;em&gt;if&lt;/em&gt; α ⇒ β &lt;em&gt;and&lt;/em&gt; α &lt;em&gt;then&lt;/em&gt; β), &lt;strong&gt;conjunction introduction&lt;/strong&gt; (α, β ⊢ α ∧ β), &lt;strong&gt;resolution&lt;/strong&gt; (a complete rule for propositional and first-order clauses).&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Entailment vs derivation&lt;/strong&gt;: Entailment (⊨) says what is &lt;em&gt;true given&lt;/em&gt; the KB; derivation (⊢) says what is &lt;em&gt;provable from&lt;/em&gt; it.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Soundness theorem&lt;/strong&gt;: If ⊢ then ⊨ — the proof system never lies.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Completeness theorem&lt;/strong&gt;: If ⊨ then ⊢ — everything true is provable.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Decidability&lt;/strong&gt;: Whether a proof procedure is guaranteed to terminate with an answer. Propositional entailment is decidable; first-order entailment is not in general.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;closing&#34;&gt;Closing&lt;/h2&gt;
&lt;p&gt;The grammar is the substrate the world ontology is written in: predicates are atomic sentences, Kinds classify how their truth is determined, and a &lt;code&gt;derived&lt;/code&gt; predicate is an entailment stated by a rule. This term sheet names the pieces so that work can be described precisely.&lt;/p&gt;
</description>
    </item>
    
  </channel>
</rss>