Jump to content

Syntax (logic): Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
see also
expand
Line 1: Line 1:
[[File:Formal languages.png|thumb|300px|right|This diagram shows the syntactic entities which may be constructed from [[formal language]]s. The [[symbol (formal)|symbols]] and [[string (computer science)|strings of symbols]] may be broadly divided into [[nonsense]] and [[well-formed formula]]s. A formal language can be thought of as identical to the set of its well-formed formulas. The set of well-formed formulas may be broadly divided into [[theorem]]s and non-theorems. However, quite often, a formal system will simply define all of its well-formed formula as theorems.]]
In [[logic]], '''syntax''' comprises the rules governing the composition of texts in a [[formal language]] that constitute the [[well-formed formula|properly formed formula]]s (WFFs) of a logical system. In providing an [[interpretation (logic)|interpretation]], it does not make sense to assign a meaning to texts that are not well-formed formulas.

In [[logic]], '''syntax''' is anything having to do with [[formal language]]s or [[formal system]]s without regard to any [[interpretation (logic)|interpretation]] or [[meaning (linguistics)|meaning]] given to them. The [[symbol (formal)|symbols]], [[well-formed formula|formulas]], [[formal system|system]]s, [[theorem]]s, [[formal proof|proofs]], and [[interpretation (logic)|interpretations]] expressed in formal languages are syntactic entities whose properties may be studied without regard to any meaning they may be given, and, in fact, need not be given any.

Syntax is usually associated with the rules (or grammar) governing the composition of texts in a formal language that constitute the [[well-formed formula]]s of a formal system.


In [[computer science]], the term [[Syntax of programming languages|syntax]] refers to the rules governing the composition of meaningful texts in a formal language, such as a [[programming language]], that is, those texts for which it makes sense to define the [[semantics]] or meaning, or otherwise provide an interpretation.
In [[computer science]], the term [[Syntax of programming languages|syntax]] refers to the rules governing the composition of meaningful texts in a formal language, such as a [[programming language]], that is, those texts for which it makes sense to define the [[semantics]] or meaning, or otherwise provide an interpretation.

== Syntactic entities ==
=== Symbols ===
{{Main|Symbol (formal)}}

A symbol is an [[idea]], [[abstraction]] or [[concept]], [[Type-token distinction|tokens]] of which may be marks or a configuration of marks which form a particular pattern. Symbols of a formal language need not be symbols of anything. For instance there are [[logical constant]]s which do not refer to any idea, but rather serve as a form of punctuation in the language (e.g. parentheses). A symbol or string of symbols may comprise a well-formed formula if the formulation is consistent with the formation rules of the language. Symbols of a formal language must be capable of being specified without any reference to any interpretation of them.

=== Formal language ===
{{Main|Formal language}}

A ''formal language'' is a syntactic entity which consists of a [[Set (mathematics)|set]] of finite [[string (computer science)|strings]] of [[symbol (formal) |symbol]]s which are its words (usually called its [[well-formed formula]]s). Which strings of symbols are words is determined by fiat by the creator of the language, usually by specifying a set of [[formation rule]]s. Such a language can be defined without [[reference]] to any [[meaning (linguistics)|meaning]]s of any of its expressions; it can exist before any [[Interpretation (logic)|interpretation]] is assigned to it – that is, before it has any meaning.

=== Formation rules ===
{{main|Formation rule}}

A ''formation rules'') are a precise description of which [[string (computer science)|strings]] of [[symbol (formal) |symbol]]s are the [[well-formed formula]]s of a formal language. It is synonymous with the set of [[String (computer science)|strings]] over the [[alphabet]] of the formal language which constitute well formed formulas. However, it does not describe their [[semantics]] (i.e. what they mean).

=== Formal systems ===
{{main|Formal system}}

A ''formal system'' (also called a ''logical calculus'', or a ''logical system'') consists of a formal language together with a [[deductive apparatus]] (also called a ''deductive system''). The deductive apparatus may consist of a set of [[transformation rule]]s (also called ''inference rules'') or a set of [[axiom]]s, or have both. A formal system is used to [[Proof theory|derive]] one expression from one or more other expressions. Formal systems, like other syntactic entities may be defined without any [[Interpretation (logic)|interpretation]] given to it (as being, for instance, a system of arithmetic).

=== Interpretations ===
{{main|Formal semantics|Interpretation (logic)}}

An ''interpretation'' of a formal system is the assignment of meanings to the symbols, and [[truth value]]s to the sentences of a formal system. The study of interpretations is called [[formal semantics]]. ''Giving an interpretation'' is synonymous with ''constructing a [[Structure (mathematical logic)|model]]. An interpretation is expressed in a [[metalanguage]], which may itself be a formal language, and as such itself is a syntactic entity.


==See also==
==See also==

Revision as of 23:54, 14 September 2009

This diagram shows the syntactic entities which may be constructed from formal languages. The symbols and strings of symbols may be broadly divided into nonsense and well-formed formulas. A formal language can be thought of as identical to the set of its well-formed formulas. The set of well-formed formulas may be broadly divided into theorems and non-theorems. However, quite often, a formal system will simply define all of its well-formed formula as theorems.

In logic, syntax is anything having to do with formal languages or formal systems without regard to any interpretation or meaning given to them. The symbols, formulas, systems, theorems, proofs, and interpretations expressed in formal languages are syntactic entities whose properties may be studied without regard to any meaning they may be given, and, in fact, need not be given any.

Syntax is usually associated with the rules (or grammar) governing the composition of texts in a formal language that constitute the well-formed formulas of a formal system.

In computer science, the term syntax refers to the rules governing the composition of meaningful texts in a formal language, such as a programming language, that is, those texts for which it makes sense to define the semantics or meaning, or otherwise provide an interpretation.

Syntactic entities

Symbols

A symbol is an idea, abstraction or concept, tokens of which may be marks or a configuration of marks which form a particular pattern. Symbols of a formal language need not be symbols of anything. For instance there are logical constants which do not refer to any idea, but rather serve as a form of punctuation in the language (e.g. parentheses). A symbol or string of symbols may comprise a well-formed formula if the formulation is consistent with the formation rules of the language. Symbols of a formal language must be capable of being specified without any reference to any interpretation of them.

Formal language

A formal language is a syntactic entity which consists of a set of finite strings of symbols which are its words (usually called its well-formed formulas). Which strings of symbols are words is determined by fiat by the creator of the language, usually by specifying a set of formation rules. Such a language can be defined without reference to any meanings of any of its expressions; it can exist before any interpretation is assigned to it – that is, before it has any meaning.

Formation rules

A formation rules) are a precise description of which strings of symbols are the well-formed formulas of a formal language. It is synonymous with the set of strings over the alphabet of the formal language which constitute well formed formulas. However, it does not describe their semantics (i.e. what they mean).

Formal systems

A formal system (also called a logical calculus, or a logical system) consists of a formal language together with a deductive apparatus (also called a deductive system). The deductive apparatus may consist of a set of transformation rules (also called inference rules) or a set of axioms, or have both. A formal system is used to derive one expression from one or more other expressions. Formal systems, like other syntactic entities may be defined without any interpretation given to it (as being, for instance, a system of arithmetic).

Interpretations

An interpretation of a formal system is the assignment of meanings to the symbols, and truth values to the sentences of a formal system. The study of interpretations is called formal semantics. Giving an interpretation is synonymous with constructing a model. An interpretation is expressed in a metalanguage, which may itself be a formal language, and as such itself is a syntactic entity.

See also