logic circuit

#Contents#
* table of contents
{:toc}

## Idea

A *logic circuit* is a circuit composed of [[logic gates]].

## Related concepts

* [[quantum circuit]]

## References

Textbook accounts:

* J. Gibson: *Electronic Logic Circuits*, Routledge (1992) [[ISBN:9780415502863](https://www.routledge.com/Electronic-Logic-Circuits/Gibson/p/book/9780415502863)]

*  Jan Friso Groote, Rolf Morel, Julien Schmaltz, Adam Watkins, *Logic Gates, Circuits, Processors, Compilers and Computers*, Springer (2021) [[doi:10.1007/978-3-030-68553-9](https://doi.org/10.1007/978-3-030-68553-9)]

See also:

* Dan R. Ghica, George Kaye, David Sprunger, _A compositional theory of digital circuits_ ([arXiv:2201.10456](https://arxiv.org/abs/2201.10456))

[[!redirects digital circuit]]
[[!redirects digital logic circuit]]
[[!redirects logic circuits]]
[[!redirects digital circuits]]
[[!redirects digital logic circuits]]


logic gate

+-- {: .rightHandSide}
+-- {: .toc .clickDown tabindex="0"}
### Context
#### Computation
+-- {: .hide}
[[!include constructivism - contents]]
=--
=--
=--

#Contents#
* table of contents
{:toc}

## Idea
 {#Idea}

Broadly, a *logic gate* is a [[function]]
of [[tuples]] of [[truth values]], hence a
[[map]]
between [[cartesian products]] $\mathrm{Bool}^n$ of [[Booleans]] $Bool \,\coloneqq\, \{false, true\} \;\simeq\; \{0,1\}$.

\begin{imagefromfile}
    "file_name": "GenericLogicGate-221026.jpg",
    "width": "640",
    "unit": "px",
    "margin": {
        "top": -20,
        "bottom": 20,
        "right": 0,
        "left": 10
    }
\end{imagefromfile}

Specifically, one calls such a function a *logic gate* if it is thought of as potentially implemented as a basic operation performed by a [[computing]] machine -- in which case the [[truth values]] are also called *[[bits]]*.

As such, typical logic gates are Boolean functions between a *small* number of [[bits]], with more complicated such functions thought as obtained by composing a given set of logic gates into  [[logic circuit|logic circuits]].

Analogously there are [[quantum logic gates]] compiled into [[quantum circuits]].

## Examples

A list of some basic logic and gates and their [[reversible computation|reversible]] and [[quantum logic gate]] versions:

\linebreak

**[[NOT]]:**

\begin{imagefromfile}
    "file_name": "NOT_LogicGate-221025.jpg",
    "width": "600",
    "unit": "px",
    "margin": {
        "top": -20,
        "bottom": 20,
        "right": 0,
        "left": 10
    }
\end{imagefromfile}

\linebreak

\linebreak

**[[XOR]]** and **[[CNOT]]:**

\begin{imagefromfile}
    "file_name": "CNOTGates-221026c.jpg",
    "width": "750",
    "unit": "px",
    "margin": {
        "top": -20,
        "bottom": 20,
        "right": 0,
        "left": 10
    }
\end{imagefromfile}

\linebreak

\linebreak

**[[AND]]**:

\begin{imagefromfile}
    "file_name": "ANDGates-221026b.jpg",
    "width": "770",
    "unit": "px",
    "margin": {
        "top": -20,
        "bottom": 20,
        "right": 0,
        "left": 10
    }
\end{imagefromfile}

(...)

## Related concepts

* [[formal logic]]

* [[quantum logic gate]]

## References

Textbook accounts:

*  Jan Friso Groote, Rolf Morel, Julien Schmaltz, Adam Watkins, *Logic Gates, Circuits, Processors, Compilers and Computers*, Springer (2021) [[doi:10.1007/978-3-030-68553-9](https://doi.org/10.1007/978-3-030-68553-9)]

* John Bird, Chapter 7 of: *Bird's Higher Engineering Mathematics*, Routledge (2021) [[ISBN:9781003124221](https://www.taylorfrancis.com/chapters/mono/10.1201/9781003124221-7/boolean-algebra-logic-circuits-john-bird)]

See also:

* Wikipedia, _[Logic gate](http://en.wikipedia.org/wiki/Logic_gate)_

[[!redirects logic gates]]


logic of regular categories > history

< [[logic of regular categories]]


logic of regular categories > history II

< [[logic of regular categories]]


logic programming

## Idea

A logic programming language is a kind of programming language where programs are roughly a signatures for a logical theory paired with a formula in the generated theory. The implementation of the language is a kind of proof search mechanism.

This provides an alternative relationship between [[logic]] and [[programming]] to the one in [[functional programming]]. In functional programming, [[types]] correspond to propositions and programs correspond to proofs, and computation proceeds by finding some kind of normal form for the proof. In logic programming, the program itself is a proposition and the computation proceeds by searching for proofs of the proposition. In categorical terms, functional programs denote morphisms of a category, whereas logic programs denote objects of a category.


logic symbols -- table

| $\phantom{-}$symbol$\phantom{-}$ | $\phantom{-}$in [[logic]]$\phantom{-}$ |
|--------|---------|
| $\phantom{A}$$\in$ | $\phantom{A}$[[element]] [[relation]] |
| $\phantom{A}$$\,:$ | $\phantom{A}$[[type|typing]] [[relation]] |
| $\phantom{A}$$=$ |  $\phantom{A}$[[equality]] |
| $\phantom{A}$$\vdash$$\phantom{A}$ | $\phantom{A}$[[entailment]]  / [[sequent]]$\phantom{A}$ |
| $\phantom{A}$$\top$$\phantom{A}$ | $\phantom{A}$[[true]]  / [[top]]$\phantom{A}$ |
| $\phantom{A}$$\bot$$\phantom{A}$ | $\phantom{A}$[[false]] / [[bottom]]$\phantom{A}$ |
| $\phantom{A}$$\Rightarrow$ | $\phantom{A}$[[implication]] |
| $\phantom{A}$$\Leftrightarrow$ | $\phantom{A}$[[logical equivalence]] |
| $\phantom{A}$$\not$ | $\phantom{A}$[[negation]] |
| $\phantom{A}$$\neq$ | $\phantom{A}$[[negation]] of [[equality]] / [[apartness]]$\phantom{A}$ |
| $\phantom{A}$$\notin$ | $\phantom{A}$[[negation]] of [[element]] [[relation]] $\phantom{A}$ |
| $\phantom{A}$$\not \not$ | $\phantom{A}$[[double negation|negation of negation]]$\phantom{A}$ |
| $\phantom{A}$$\exists$ | $\phantom{A}$[[existential quantification]]$\phantom{A}$ |
| $\phantom{A}$$\forall$ | $\phantom{A}$[[universal quantification]]$\phantom{A}$ |
| $\phantom{A}$$\wedge$ | $\phantom{A}$[[logical conjunction]] |
| $\phantom{A}$$\vee$ | $\phantom{A}$[[logical disjunction]] |
|  |  |
| **symbol** | **in [[type theory]] ([[propositions as types]])**  |
| $\phantom{A}$$\to$ | $\phantom{A}$[[function type]] ([[implication]]) |
| $\phantom{A}$$\times$ | $\phantom{A}$[[product type]] ([[conjunction]]) |
| $\phantom{A}$$+$ | $\phantom{A}$[[sum type]] ([[disjunction]]) |
| $\phantom{A}$$0$ | $\phantom{A}$[[empty type]] ([[false]]) |
| $\phantom{A}$$1$ | $\phantom{A}$[[unit type]] ([[true]]) |
| $\phantom{A}$$=$ |  $\phantom{A}$[[identity type]] ([[equality]]) |
| $\phantom{A}$$\simeq$ | $\phantom{A}$[[equivalence of types]] ([[logical equivalence]]) |
| $\phantom{A}$$\sum$ | $\phantom{A}$[[dependent sum type]] ([[existential quantifier]]) |
| $\phantom{A}$$\prod$ | $\phantom{A}$[[dependent product type]] ([[universal quantifier]])|
|  |  |
| **symbol** | **in [[linear logic]]**  |
| $\phantom{A}$$\multimap$$\phantom{A}$ | $\phantom{A}$[[linear implication]]$\phantom{A}$ |
| $\phantom{A}$$\otimes$$\phantom{A}$ | $\phantom{A}$[[multiplicative conjunction]]$\phantom{A}$ |
| $\phantom{A}$$\oplus$$\phantom{A}$ | $\phantom{A}$[[additive disjunction]]$\phantom{A}$ |
| $\phantom{A}$$\&$$\phantom{A}$ | $\phantom{A}$[[additive conjunction]]$\phantom{A}$ |
| $\phantom{A}$$\invamp$$\phantom{A}$ | $\phantom{A}$[[multiplicative disjunction]]$\phantom{A}$ |
| $\phantom{A}$$\;!$$\phantom{A}$ | $\phantom{A}$[[exponential conjunction]]$\phantom{A}$ |


logical conjunction

+-- {: .rightHandSide}
+-- {: .toc .clickDown tabindex="0"}
###Context###
#### $(0,1)$-Category theory
+--{: .hide}
[[!include (0,1)-category theory - contents]]
=--
=--
=--

# Logical conjunction
* table of contents
{: toc}

## Definitions

In [[logic]], logical conjunction is the [[meet]] in the [[poset]] of [[truth values]].

Assuming that (as in [[classical logic]]) the only truth values are true ($T$) and false ($F$), then the conjunction $p \wedge q$ of the truth values $p$ and $q$ may be defined by a truth table:

|$p$|$q$| |$p \wedge q$|
|---|---|-|------------|
|$T$|$T$| |$T$|
|$T$|$F$| |$F$|
|$F$|$T$| |$F$|
|$F$|$F$| |$F$|

That is, $p \wedge q$ is true if and only if $p$ and $q$ are both true.  Conjunction also exists in nearly every non-classical logic.

More generally, if $p$ and $q$ are any two [[relations]] on the same domain, then we define their conjunction pointwise, thinking of a relation as a [[function]] to truth values.  If instead we think of a relation as a [[subset]] of its domain, then conjunction becomes [[intersection]].

## Remarks

Conjunction is [[de Morgan duality|de Morgan dual]] to [[disjunction]].

Like any meet, conjunction is an associative operation, so we can take the conjunction of any finite positive whole number of truth values; the conjunction is true if and only if all of the individual truth values are true.  Conjunction also has an [[identity element]], which is the [[truth|true]] truth value.  Some logics allow a notion of infinitary conjunction.  Indexed conjunction is [[universal quantification]].

As truth values form a poset, which is a degenerate kind of [[category]], so truth values under conjunction form a [[meet-semilattice]], which is a degenerate kind of [[cartesian monoidal category]].  Self-referentially, a [[poset]] is (up to [[equivalence of categories|equivalence]]) simply a [[category enriched]] over the cartesian monoidal category of truth values.  With [[implication]] as [[internal hom]], truth values form a [[closed cartesian category]].

In the context of [[substructural logics]] such as [[linear logic]], the conjunction defined above is also called __additive conjunction__ to disambiguate it from the [[multiplicative conjunction]].

## Rules of inference

That conjunction is a [[meet]] means that $p \wedge q$ may be proved in a [[context]] $\Gamma$ if and only if both $p$ and $q$ may be proved in $\Gamma$.  This directly yields the [[rule of inference|introduction and elimination rules]] for conjunction in [[natural deduction]]:
$$ \begin {gathered}
   \frac { \Gamma \vdash p ; \; \Gamma \vdash q } { \Gamma \vdash p \wedge q } \; \text {introduction} \\
   \frac { \Gamma \vdash p \wedge q } { \Gamma \vdash p } \; \text {elimination 0} \\
   \frac { \Gamma \vdash p \wedge q } { \Gamma \vdash q } \; \text {elimination 1} \\
\end {gathered} $$

Alternatively, we may use these slightly more complicated (but fewer) inductive forms:
$$ \begin {gathered}
   \frac { \Gamma \vdash p ; \; \Gamma \vdash q } { \Gamma \vdash p \wedge q } \; \text {introduction} \\
   \frac { \Gamma , p , q \vdash r } { \Gamma , p \wedge q , \vdash r } \; \text {elimination} \\
\end {gathered} $$

In [[sequent calculus]], the same ideas become these rules:
$$ \begin {gathered}
   \frac { \Gamma \vdash \Delta , p , \Sigma ; \; \Gamma \vdash \Delta , q , \Sigma } { \Gamma \vdash \Delta , p \wedge q , \Sigma } \; \text {right additive} \\
   \frac { \Gamma , p , \Delta \vdash \Sigma } { \Gamma , p \wedge q , \Delta \vdash \Sigma } \; \text {left additive 0} \\
   \frac { \Gamma , q , \Delta \vdash \Sigma } { \Gamma , p \wedge q , \Delta \vdash \Sigma } \; \text {left additive 1} \\
\end {gathered} $$

Equivalently, we can use the following rules with weakened contexts:
$$ \begin {gathered}
   \frac { \Gamma \vdash \Delta , p ; \; \Sigma \vdash q , \Pi } { \Gamma , \Sigma \vdash \Delta , p \wedge q , \Pi } \; \text {right multiplicative} \\
   \frac { \Gamma , p , q , \Delta \vdash \Sigma } { \Gamma , p \wedge q , \Delta \vdash \Sigma } \text {left multiplicative} \\
\end {gathered} $$

The rules above are written so as to remain valid in logics without the [[exchange rule]].  In [[linear logic]], the first batch of sequent rules apply to additive conjunction (interpret $p \wedge q$ in these rules as $p \& q$), while the second batch of rules apply to multiplicative conjunction (interpret $p \wedge q$ in those rules as $p \otimes q$).

## As a logic gate
 {#AsALogicGate}

Logical conjunction as

1. a [[logic gate]],

1. a [[reversible computation|reversible]] logic gate and

1. a (reversible) [[quantum logic gate]]:

\begin{imagefromfile}
    "file_name": "ANDGates-221026b.jpg",
    "width": "770",
    "unit": "px",
    "margin": {
        "top": -20,
        "bottom": 20,
        "right": 0,
        "left": 10
    }
\end{imagefromfile}

## Related concepts

* in [[linear logic]]: _[[multiplicative conjunction]]_

[[!include logic symbols -- table]]

[[!redirects and]]
[[!redirects AND]]
[[!redirects logical conjunction]]
[[!redirects logical conjunctions]]
[[!redirects additive conjunction]]
[[!redirects additive conjunctions]]


logical connective

+-- {: .rightHandSide}
+-- {: .toc .clickDown tabindex="0"}
###Context###
#### $(0,1)$-Category theory
+--{: .hide}
[[!include (0,1)-category theory - contents]]
=--
=--
=--

#Contents#
* table of contents
{:toc}

## Idea
 {#Idea}

In [[formal logic]], a *logical connective* is a [[type formation]] rule which from given ([[sets]] and) [[propositions]] forms new [[propositions]].

For example, the logical connective "AND" combines a [[pair]] of propositions $P_1$, $P_2$ to a new proposition $P_1 \wedge P_2$.

To the extent that propositions are regarded as [[functions]] from [[sets]]/[[types]] $S$ (whose [[elements]]/[[terms]] they are propositions about) to the [[set]]/[[type]] of [[truth values]] (the [[type of propositions]])

$$
  \frac{
    \Gamma
    ,\;\;
    s \colon S
    \;\;\;
    \vdash
    \;\;\;
    P(s) \colon Prop
  }{
    \Gamma
    \;\;\;
    \vdash
    \;\;\;
    P \,\colon\, S \to Prop
  }
$$

one may regard logical connectives as forming the resulting functions. This is what is expressed by the notorious *truth tables* of classical logic.

## Examples

[[!include logic symbols -- table]]

## Related concepts

* *the [intuitionistic interpretation of connectives](intuitionistic+logic#ConstructiveInterpretationOfConnectives)

[[!redirects logical connective]]
[[!redirects logical connectives]]
[[!redirects connectives]]


logical equivalence

+-- {: .rightHandSide}
+-- {: .toc .clickDown tabindex="0"}
### Context
#### Equality and Equivalence
+-- {: .hide}
[[!include equality and equivalence - contents]]
=--
=--
=--

#Contents#
* table of contents
{:toc}

## Idea

Logical equivalence is the [[equivalence]] of [[propositions]] in [[logic]].

## Related concepts

[[!include logic symbols -- table]]

[[!include types and logic - table]]

## References

See also

* Wikipedia, _[Logical equivalence](https://en.wikipedia.org/wiki/Logical_equivalence)_

* Wikipedia, _[If and only if](https://en.wikipedia.org/wiki/If_and_only_if)_

[[!redirects logical equivalence]]
[[!redirects logical equivalences]]

[[!redirects logically equivalent]]

[[!redirects if and only if]]
[[!redirects iff]]


logical framework

+-- {: .rightHandSide}
+-- {: .toc .clickDown tabindex="0"}
### Context
#### Deduction and Induction
+-- {: .hide}
[[!include deduction and induction - contents]]
=--
#### Type theory
+-- {: .hide}
[[!include type theory - contents]]
=--
#### Foundations
+-- {: .hide}
[[!include foundations - contents]]
=--
=--
=--

# Contents
* table of contents
{: toc}

## Idea

A _logical framework_ is a formal [[metalanguage]] for [[deductive systems]], such as [[logic]], [[natural deduction]], [[type theories]], [[sequent calculus]], etc.  Of course, like any formal system, these systems can be described in any sufficiently strong metalanguage.  However, all logical systems of this type share certain distinguishing features, so it is helpful to have a particular metalanguage which is well-adapted to describing systems with those features.

Much of the description below is taken from [(Harper)](#Harper).

## Overview

The sentences of a logical framework are called [[judgments]].  It turns out that in deductive systems, there are two kinds of non-basic forms that arise very commonly, which we may call

* *[[hypothetical judgments]]*: one judgment is a logical consequence of some others.
* *generic judgments*: a judgment that is made generally for all values of some parameters, each ranging over a "domain" or "syntactic category".  (Note that a "syntactic category" in this sense is unrelated to the notion of [[syntactic category]] that is a [[category]] built out of syntax; here we mean "category" in its informal sense of a subgrouping, so that for instance we have one syntactic category of "types" and another of "terms".)

These two forms turn out to have many parallel features, e.g. [[reflexivity]] and [[transitivity]] of hypothetical judgments correspond to [[variable]]-use and [[substitution]] in generic judgments.  Appealing to the [[propositions as types]] principle, therefore, it is convenient to describe a system in which they are actually both instances of the same thing.  That is, we identify the notion of *evidence for a judgment* with the notion of *object of a syntactic category*.

This leads to a notion that we will call an _LF-type_.  Thus we will have types such as

* The _LF-type of evidence for some judgment_.
* The _LF-type of objects of a syntactic category_.

We will also have some general type-forming operations.  Perhaps surprisingly, it turns out that

* _[[dependent product types]]_

are all that we need.

There is a potential confusion of terminology, because these *LF-types* in a logical framework (being itself a [[type theory]]) are distinct from the objects that may be called "types" in any particular logic we might be talking about *inside* the logical framework.  Thus, for instance, when formalizing [[Martin-Lof type theory]] in a logical framework, there is an "LF-type" which is the type of objects of the syntactic category of MLTT-types.  This is furthermore distinct from a [[type of types]], which is itself an object of the syntactic category of MLTT-types, i.e. a term belonging to the LF-type of such.

The type theory of a logical framework often includes a second layer called *LF-kinds*, which enables us to classify families of LF-types.  For instance, the universe $Type$ of all LF-types is an LF-kind, as is the collection $A\to\Type$ of all families of LF-types dependent on some LF-type $A$.  The LF-types and LF-kinds together are very similar to a [[pure type system]] with two sorts $Type$ and $Kind$, with axiom $Type:Kind$ and rules $(Type,Kind)$ and $(Type,Type)$, although there are some minor technical differences such as the treatment of definitional equality (PTS's generally use untyped conversion, whereas logical frameworks are often formulated in a way so that only canonical forms exist).

Thus, we might have the following hierarchy of "universes", which we summarize to fix the notation:

* $Kind$, the sort of LF-kinds
* $Type$, the LF-kind of LF-types, i.e. $Type:Kind$.
* $tp$ or $type$, the LF-type of *all* types in some object theory being discussed in LF, i.e. $tp : Type$.
* $\mathcal{U}_i$, a type-of-types in such an object-theory, i.e. $\mathcal{U}_i:tp$.

Once we have set up the logical framework as a language, there are then two approaches to describing a given logic inside of it.  See ([Harper](#Harper)), and the other [references](#References), for more details.

### Synthetic presentations {#Synthetic}

In a synthetic presentation, we use LF-types to represent the syntactic objects and judgments of the [[object theory]].  Thus, if the object theory is a type theory, then in LF we have things like:

* an LF-type $tp$ of object-theory types
* an LF-type $tm$ of object-theory terms
* a dependent LF-type $of : tm \to tp \to Type$ expressing the object-theory typing judgment.  That is, for each object-theory term $a:tm$ and each object-theory type $A:tp$, we have an LF-type $of(a,A)$ expressing the object-theory judgment "$a:A$" that $a$ is of type $A$.  According to [[propositions as types]] (at the level of the metatheory, sometimes called "judgments as types"), the elements of $of(a,A)$ are "proofs" that $a:A$.

Note that we do not have to explicitly carry around an ambient context, as we sometimes do when presenting type theories in a more explicit style of a [[deductive system]].  This is because the notions of hypothetical and generic judgments are built into the logical framework and handled automatically by *its* contexts.  We will discuss this further [below](#HOAS).

Synthetic presentations are preferred by the school of [Harper-Honsell-Plotkin](#HHP) and are generally used with implementations such as [[Twelf]].  They are very flexible and can be used to represent many different object-theories.  Moreover, they generally support an **adequacy theorem**, that there is a compositional bijection between the syntactic objects of the object-theory, as usually presented, and the canonical forms of appropriate LF-type in its LF-presentation.  Here "compositional" means that the bijection respects substitution.

Note that the adequacy theorem is a correspondence at the level of *syntax*; it does not even incorporate the object-theory notion of definitional equality!  Two object-theory terms such as $(\lambda x.x)y$ and $y$ that are definitionally equal (by [[beta-reduction]]) are syntactically distinct, and hence also correspond to distinct syntactic entities in the LF-encoding.  The definitional equality that relates them is represented by an element of the LF-type $defeq(\dots)$ encoding the definitional-equality judgment of the object-theory.  This is appropriate because such LF-encodings are used, among other things, for the *study of the syntax* of the object-theory, e.g. for proving properties of its definitional equality.

However, synthetic presentations do not make maximal use of the framework in the case when the object-theory is also a type theory whose judgments are "analytic".  Here "synthetic" means roughly "requires evidence" whereas "analytic" means roughly "obvious".

### Analytic presentation {#Analytic}

An analytic presentation is only possible for certain kinds of object-theories, generally those which are type theories similar to LF itself.  In this case, we represent object-theory types by LF-types themselves.  Thus we still have the LF-type $tp$ of object-theory types, but instead of the LF-type $tm$ of terms and the dependent LF-type $of$ representing the object-theory typing judgment, we have

* a dependent LF-type $el : tp \to Type$

which assigns to each object-theory type, the LF-type of its elements.  In other words, the typing judgment of the object-theory is encoded *by the typing judgment* of the meta-theory.

Now we have to make a choice about how to represent the definitional equality of the object-theory.  A consistent choice is to also represent it by the definitional equality of the meta-theory.  That is, in addition to merely giving "axioms" such as $tp$ and $el$, we must give *equations* representing the rules of the object-theory as [[equalities]] in the logical framework.  For instance, we must have a [[beta-reduction]] rule such as

    app A B (lam A B F) M = F M

If the object-theory is itself a dependent type theory whose only definitional equalities are beta-reductions like this, then if we make the coercion $el$ implicit, we can think of the resulting encoding as analogous to a [[pure type system]] with *three* sorts, $tp$, $Type$, and $Kind$, with $tp:Type$ and $Type:Kind$.

However, from a practical point-of-view, rather than extending the logical framework with ad hoc definitional equalities to represent a particular object-theory, often what is actually done is that equality is defined as another type family with explicitly-introduced constructors.  In other words, we use the analytic representation of types, but the synthetic representation of definitional equality.  For example, in [[Twelf]], the above equation could be represented by first assuming an LF-type family

    eq : {A:tp} el A -> el A -> type

(Twelf uses braces as notation for the [[dependent product]]), and then postulating a constant

    beta : {A:tp} {B:tp} eq (app A B (lam A B F)) (F M)

in addition to the other axioms of equality.

The analytic encoding is associated with [Martin-Lof](#ML).  While convenient for the description of rules in type theories, it is often less appropriate for the purposes of metatheoretic analysis.

For instance, in the hybrid style with the LF-type family $eq$, the terms in $el(A)$ will involve explicit coercions along equalities in $eq$.  This destroys the adequacy theorem, since coercions along definitional equalities are generally silent in the usual presentation of a theory.  Moreover, one must assert explicitly that dependent types respect definitional equalities, and for multiply-dependent types this requires [[dependent products]] in the object-theory.

On the other hand, the "fully analytic" version where definitional equalities in the object-theory are also definitional equalities in the meta-theory involves adding additional equations to the meta-theory, which in general can make it impossible to reason about.  One needs a decision procedure for these equalities even to be able to check proofs.

Thus, analytic approaches are less general and flexible; they are best adapted to *describing* the rules and semantics of a dependent type theory, whereas synthetic approaches are better for reasoning about syntax and for studying more general object-theories.

### Higher-order abstract syntax
 {#HOAS}

In both synthetic and analytic presentations, we use [[higher-order abstract syntax]] ([[HOAS]]).  Roughly, this means that *variables* in the object-theory are not terms of some LF-type, but are represented by actual LF-variables.  For instance, when describing a type theory containing [[function types]] synthetically, we would have

* an LF-term $arr : tp \to tp \to tp$, where for object-theory types $A:tp$ and $B:tp$, the term $arr(A,B):tp$ represents their function-type
* an LF-term $app : tm \to tm \to tm$, where $app(f,a)$ represents the function application $f(a)$
* an LF-term $lam : (tm \to tm) \to tm$, representing lambda abstraction.

The point is that the argument of $lam$ (the "body" of the lambda abstraction) is not a "term containing a free variable $x$" but rather an LF-function from object-theory terms to object-theory terms.  This is intended to be the function "substitute" which knows about the body of the lambda-abstraction, and when given an argument it substitutes it for the variable in that body and returns the result.

This approach completely avoids dealing with the problems of variable binding and substitution in the object language, by making use of the binding and substitution in the metalanguage LF.  One might say that the variables in LF are the "universal notion of variable" which is merely reused by all object-theories.

### The power of weak frameworks

It may be tempting to think of the LF-types such as $tp$ and $tm$ as [[inductive type|inductively]] defined by their specified constructors (such as $arr$ for $tp$, and $app$ and $lam$ for $tm$).  However, this is incorrect; LF does not have inductive types.  In fact, this weakness is essential in order to guarantee "adequacy" of the HOAS encoding.

Suppose, for instance, that $tm$ were inductively defined inside of LF.  Then we could define a function $tm\to tm$ by pattern-matching on the structure of $tm$, doing one thing if $tm$ were a lambda-abstraction and another thing if it were a function application.  But such a function is definitely *not* the sort of thing that we want to be able to pass to the LF-function $lam$!  By disallowing such matching, though, we can guarantee that the only functions $tm\to tm$ we can define and pass to $lam$ correspond to "substituting in a fixed term" as we intended.

As an even simpler example, suppose we consider an object-theory containing just one LF-type $nat$ together with constructors $z : nat$ and $s : nat \to nat$.  Although we would like to think of $nat$ as representing the natural numbers, because of the lack of an induction principle, the LF-type $nat \to nat$ certainly cannot be shown to contain all the functions from natural numbers to natural numbers (essentially, we can only construct the constant functions and those incrementing their argument by a fixed constant).  On the other hand, to some extent it is possible to get around this restriction by taking a _relational_ rather than a functional point-of-view.  For example, addition of natural numbers can be defined as a type family

    add : nat -> nat -> nat -> type

together with a pair of constructors

    add/z : {N:nat} add z N N.
    add/s : {M:nat}{N:nat}{P:nat} add M N P -> add (s M) N (s P).

Now, it is still not possible to prove _inside_ LF that $add$ is a total functional relation (i.e., that for all `M:nat` and `N:nat` there exists a unique `P:nat` such that `add M N P`).  However, in this case that is certainly easy to verify by inspection, and the [[Twelf]] proof assistant has facilities for verifying such properties automatically (though in general checking totality is better supported than checking uniqueness).

There are tricks one can play in order to use a HOAS-like representation even in a framework that has true inductive types such as [[Coq]].  For instance, [XORN18](#XORN18) uses "parametrized HOAS" in which the higher-order functions take as domain an *arbitrary*, unspecified, type, thereby eliminating the possibility of defining functions inductively over elements of any specific type.  However, this apparently requires [[parametricity]] axioms in order to work, which are consistent, but false in natural set-theoretic and categorical models.

## Implementations

One of the uses of a logical framework is that as a type theory itself, it can be implemented in a computer.  This provides a convenient system in which one can "program" the rules of any other specific type theory or logic which one wants to study.

For a list of logical framework implementations, see _[Specific logical Frameworks and Implementations](http://www.cs.cmu.edu/~fp/lfs-impl.html)_.

Historically, the first logical framework implementation was [[Automath]].
The goal of the Automath project was to provide a tool for the
formalization of mathematics without [[foundations|foundational]] prejudice.
Many modern logical frameworks carry influences of this.

Then inspired by the development of [[Martin-Löf dependent type theory]] was the [[Edinburgh Logical Framework]] (ELF).  The [[logic]] and [[type theory]]-approaches were later combined in the [[Elf]] language. This gave rise to [[Twelf]].

[[Isabelle]] is a logical framework that does not have dependent types, but instead works in a "predicate logic" framework with only one layer of dependency, proof-irrelevant propositions over a base [[simply typed lambda calculus]].  Unlike Twelf, it is designed for practical use in working *in* object-languages rather than proving meta-theorems about them.  Its most common application is to [[higher-order logic]], but there are also Isabelle formulations of [[first-order logic]], [[ZFC]], and a general library for [[sequent calculus]].

## References
 {#References}

The original logical framework using a synthetic approach was introduced in

* {#HHP} [[Robert Harper]], [[Furio Honsell]], [[Gordon Plotkin]], _A framework for defining logics_, J. ACM __40__:1 (1993) 143--184 [[doi:10.1145/138027.138060](https://doi.org/10.1145/138027.138060)]

while the analytic version was proposed by

* [[Per Martin-Lof]], _On the meanings of the logical constants and the justifications of the logical laws_
 {#ML}

General overview:

* [[Frank Pfenning]], _Logical frameworks -- a brief introduction_ (2002) [[pdf](http://www.cs.cmu.edu/~fp/papers/mdorf01.pdf)]

* [[Frank Pfenning]], _Logical frameworks_, chapter 17 in: Alan Robinson and Andrei Voronkov (eds.): _Handbook of Automated Reasoning_ (1999) 1063-1147 [[ps](http://www-2.cs.cmu.edu/twelf/notes/handbook00.ps)]

* [[Frank Pfenning]], _Logical frameworks web site_ ([web](http://www.cs.cmu.edu/~fp/lfs.html)), including an extensive bibliography and a list of implementations

* Randy Pollack, _Some recent logical frameworks_ (2010) ([pdf](http://homepages.inf.ed.ac.uk/rpollack/export/canonicalLF_talk.pdf))

* [[UF-IAS-2012]], _[Logical frameworks](http://uf-ias-2012.wikispaces.com/Logical+Frameworks)_.

* {#Harper} [[Robert Harper]], _[Notes on logical frameworks](http://www.cs.cmu.edu/~rwh/papers/lfias/lf.pdf)_

A number of examples of encoding object-theories into LF can be found in

* Arnon Avron, Furio Honsell, Ian A. Mason, and Robert Pollack, _Using typed lambda calculus to implement formal systems on a machine_

Other references:

* Bruno Xavier, Carlos Olarte, Giselle Reis, Vivek Nigam, *Mechanizing Linear Logic in Coq*, [pdf](http://www.cs.cmu.edu/~iliano/projects/metaCLF2/inc/dl/papers/lsfa17.pdf)
 {#XORN18}

* Mary Southern, Gopalan Nadathur, *Towards a Logic for Reasoning About LF Specifications*, [arxiv](https://arxiv.org/abs/1806.10199)

[[!redirects logical frameworks]]


logical functor

+-- {: .rightHandSide}
+-- {: .toc .clickDown tabindex="0"}
### Context
#### Topos Theory
+-- {: .hide}
[[!include topos theory - contents]]
=--
=--
=--

#Contents#
* table of contents
{:toc}

## Idea

A _logical morphism_ or _logical functor_ is a [[homomorphism]] between [[elementary topos]]es that preserves the structure of a topos as a context for [[logic]]: a functor which preserves all the elementary topos structure, including in particular [[power objects]], but not necessarily any infinitary structure (such as present additionally in a [[sheaf topos]]).

If instead a topos is regarded as a context for [[geometry]] or specifically [[geometric logic]], then the notion of [[homomorphism]] preserving this is that of a  _[[geometric morphism]]_.

## Definition

Since all the elementary topos structure follows from having [[finite limits]] and [[power objects]], it suffices to define a logical functor to preserve these, up to [[isomorphism]].  It then follows that it is also a [[locally cartesian closed functor]], a [[Heyting functor]], etc.

+-- {: .num_defn}
###### Definition

Let $\mathcal{E}$ be an [[elementary topos]]. Write $\Omega \in \mathcal{E}$ for the [[subobject classifier]]. For each [[object]] $A \in \mathcal{E}$ write

$$
  P A \coloneqq \Omega^A
$$

for the [[exponential object]]. Write

$$
  \in_A \hookrightarrow P A \times A
$$

for the [[subobject]] classified by the [[evaluation map]] $ev : P A \times A \to \Omega$.

=--

This exhibits $P A$ as a [[power object]] for $A$.

+-- {: .num_defn}
###### Definition

A [[functor]] $F : \mathcal{E} \to \mathcal{F}$ between [[elementary toposes]] is called a **logical morphism** if

1. $F$ preserves finite [[limits]];

1. for every object $A \in \mathcal{E}$

   * the canonical morphism

     $$
       \phi_A : F(P A) \to P (F A)
     $$

     is an [[isomorphism]]; this is the [[name of the relation]]

     $$
       F(\in_A) \hookrightarrow F(P A \times A) \simeq F(P A) \times F A
     $$

     (using that [[cartesian functor]]s preserve both [[product]]s as well as [[monomorphism]])

   * equivalently: $F(P A)$ equipped with the [[relation]] $F(\in_A)$ is a [[power object]] for $F(A)$ in $\mathcal{F}$.

=--

The notion of logical functors between [[topos]]es is in contrast to [[geometric morphism]]s between toposes: the former preserve the structure of an [[elementary topos]], the latter those of a [[sheaf topos]].

But both can be combined:

+-- {: .num_defn #AtomicGeometricMorphism}
###### Definition

A [[geometric morphism]] whose [[inverse image]] is a logical functor
is called an [[atomic geometric morphism]].

=--

+-- {: .num_remark}
###### Remark

The other case, that the [[direct image]] of a geometric morphism is a logical functor is not of interest. See cor. \ref{LogicalMorphismsAsDirectImages} below.

=--

## Properties

### General

+-- {: .num_prop #LeftRightAdjoint}
###### Proposition

A logical functor has a [[left adjoint]] precisely if it has a [[right adjoint]].

=--

This appears as ([Johnstone, cor. A2.2.10](#Johnstone)).

+-- {: .proof}
###### Proof

For $F : \mathcal{E} \to \mathcal{F}$ a logical functor, we have by definition a [[diagram]]

$$
  \array{
     \mathcal{E}^{op} &\stackrel{F^{op}}{\to}& \mathcal{F}^{op}
     \\
     {}^{\mathllap{P}}\downarrow &\swArrow_{\simeq}& \downarrow^{\mathrlap{P}}
     \\
     \mathcal{E} &\stackrel{F}{\to}& \mathcal{F}
  }
$$

in [[Cat]]. This satisfies the assumptions of the [[adjoint lifting theorem]] and hence $F$ has a right adjoint precisely if $F^{op}$ does. But a right adjoint of $F^{op}$ is a left adjoint of $F$, and vice versa.

=--

+-- {: .num_prop #PresMono}
###### Proposition
If a logical functor $F : \mathcal{E} \to \mathcal{F}$ has a left adjoint $L$, then $L$ preserves [[monomorphisms]], and indeed induces a bijection between subobjects of $A\in \mathcal{F}$ and subobjects of $L A\in \mathcal{E}$.
=--
+-- {: .proof}
###### Proof
Since $F(\Omega_{\mathcal{E}}) = \Omega_{\mathcal{F}}$, we have a bijection
$$ Sub_{\mathcal{F}}(A) \cong \mathcal{F}(A,\Omega_{\mathcal{F}}) \cong \mathcal{E}(L A,\Omega_{\mathcal{E}}) \cong Sub_{\mathcal{E}}(L A).$$
It remains to check that this bijection is implemented by the action of $L$, which can be done with [[partial map classifiers]]; see ([Johnstone, Lemma A2.4.8](#Johnstone)).
=--

+-- {: .num_prop #CharPullback}
###### Proposition
For a logical functor $F : \mathcal{E} \to \mathcal{F}$ having a left adjoint $L$, the following are equivalent:

1. The induced functor $L':\mathcal{F} \to \mathcal{E}/L 1$ is an [[equivalence of categories]], i.e. the adjunction $L\dashv F$ can be identified with the pullback adjunction $\mathcal{E}/B \rightleftarrows \mathcal{E}$ for some $B$ (namely $L1$).
1. $L$ is [[conservative functor|conservative]].
1. $L$ is [[faithful functor|faithful]].
1. $L$ preserves [[equalizers]].
1. $L$ preserves [[pullbacks]].
=--
This appears as ([Johnstone, Prop. A2.3.8](#Johnstone)).
+-- {: .proof}
###### Proof
The left adjoint of pullback has all the other properties.  Any pullback-preserving functor preserves equalizers.  An equalizer-preserving functor is faithful as soon as it reflects invertibility of monomorphisms, which follows from Proposition \ref{PresMono} above.  A faithful functor reflects monos and epis, hence is conservative once its domain is [[balanced category|balanced]].

Finally, if $L$ is conservative then so is $L'$, and its right adjoint $F'$ (given by $F$ followed by pullback along $\eta : 1 \to F L 1$) is also logical, hence cartesian closed.  Thus, $L'\dashv F'$ is a [[Hopf adjunction]] for the cartesian monoidal structures, and $L'$ preserves the terminal object.  Now the counit of $L'\dashv F'$ can be factored as
$$ L' F' A \cong L'(1\times F' A) \xrightarrow{\cong} L' 1 \times A \cong 1\times A\cong A $$
so it is an isomorphism.  By the triangle identity, $L'(\eta)$ is an isomorphism, but $L'$ is conservative, hence the unit $\eta$ is also an isomorphism, and $L'\dashv F'$ is an equivalence.
=--

This appears as ([Johnstone, cor. A2.2.10](#Johnstone)).

+-- {: .num_cor #LogicalMorphismsRightAdjointToCartesianFunctors}
###### Corollary
If a logical functor is [[right adjoint]] to a [[left exact functor]], then it is an [[equivalence of categories]].
=--

This appears as ([Johnstone, scholium 2.3.9](#Johnstone)).

### Preserved structures

In particular, a logical functor preserves the truth of all sentences in the [[internal logic]].  If it is moreover [[conservative functor|conservative]], then it also *reflects* the truth of such sentences.  For example, the [[transfer principle]] of [[nonstandard analysis]] can be stated as the fact that a certain functor is logical and conservative.

### Relation to geometric morphisms

The difference between geometric and logical functors between toposes is, in a certain sense, a [[categorification]] of the difference between a [[homomorphism]] of [[frames]] and a homomorphism of [[Heyting algebras]].  When the latter are [[complete lattice|complete]], these are the same objects with the same [[isomorphisms]] but different morphisms.

However, while frame homomorphisms naturally categorified by geometric functors, a more precise categorification of Heyting algebra homomorphisms would be [[Heyting functors]], which preserve the internal first-order logic, but not the higher-order logic as logical functors do.

+-- {: .num_prop #LogicalMorphismsAsDirectImages}
###### Proposition

A logical functor is the [[direct image]] of a [[geometric morphism]] precisely if it is an [[equivalence of categories|equivalence]].

=--

+-- {: .proof}
###### Proof

Since by definition the direct image of a geometric morphism has a [[left adjoint]] that preserves [[finite limits]].

=--

But logical inverse images are of interest. Recall from def. \ref{AtomicGeometricMorphism} above that a [[geometric morphism]] with logical inverse image is called an [[atomic geometric morphism]].

+-- {: .num_cor}
###### Corollary

Every [[atomic geometric morphism]] is an [[essential geometric morphism]].

=--

+-- {: .proof}
###### Proof

By prop. \ref{LeftRightAdjoint}.

=--

The following is the main source of examples of atomic geometric morphisms.

+-- {: .num_prop}
###### Proposition

The [[inverse image]] of any [[base change geometric morphism]], hence in particular of any [[etale geometric morphism]], is a [[logical morphism]].

=--

+-- {: .proof}
###### Proof

The inverse image is given by [[pullback]] along the given morphism.

=--

+-- {: .num_prop}
###### Remark

When considering the [[internal logic]] of a given [[topos]] $\mathcal{E}$ relations, [[predicate]]s/[[proposition]]s about [[variable]]s of [[type]] $A \in ob \mathcal{E}$ are [[subobject]]s of $A$. Application of function symbols to such expressions corresponds to pullback along the morphism representing the function symbol. The above says that this is, indeed, a _logical operation_.

=--

## Examples

* The inclusion [[FinSet]] $\hookrightarrow$ [[Set]] is logical.

* More generally, for any [[small category]] $C$ the inclusion

  $$
    [C^{op}, FinSet] \hookrightarrow [C^{op}, Set]
  $$

  into the [[presheaf topos]] is logical.

* For $G$ a [[group]] and $\mathbf{B}G$ its [[delooping]] [[groupoid]], the [[forgetful functor]]

  $$
    [\mathbf{B}G, Set] \to Set
  $$

  from [[permutation representation]]s to [[Set]] is logical.

## References

Section A2.1 in

* [[Peter Johnstone]], _[[Sketches of an Elephant]]_
 {#Johnstone}

Section IV.2, page 170 of

* [[Saunders MacLane]], [[Ieke Moerdijk]], _[[Sheaves in Geometry and Logic]]_
 {#MacLaneMoerdijk}

[[!redirects logical functor]]
[[!redirects logical functors]]
[[!redirects logical morphism]]
[[!redirects logical morphisms]]


logical graph

The material previously on this page is now located at the [Online Encyclopedia of Integer Sequences Wiki](https://oeis.org/wiki/Logical_Graphs).

[[!redirects Logical Graph]]


logical relation

+-- {: .rightHandSide}
+-- {: .toc .clickDown tabindex="0"}
### Context
#### Type theory
+-- {: .hide}
[[!include type theory - contents]]
=--
#### Relations
+-- {: .hide}
[[!include relations - contents]]
=--
=--
=--

#Contents#
* table of contents
{:toc}

## Idea

In [[proof theory]] and the theory of [[programming languages]], the term _logical relations_ refers to a certain style of argument used in proving results such as [[strong normalization]] or [[observational equivalence]].  Although there is no precise definition, typically a logical relation (or _logical predicate_) corresponds to a _family_ of (sometimes unary) [[relations]] defined by induction on [[types]], and such that the definition of the relation at a particular type mirrors the logical structure of that type in an appropriate sense. This methodology goes by many names historically, such as _Tait's method of computability_ and _reducibility candidates_.

## Example

As originally described by ([Tait 1967](#Tait67)) (and presented in ([Girard 1990](#Girard90))), logical predicates can be used to prove strong normalization for the [[simply-typed lambda calculus]].  The idea is to define a family of predicates $RED_T$ over terms, indexed by types $T$, such that:

* ($T = X$ an atomic type): $t \in RED_X$ iff $t$ is strongly normalizing

* ($T = U \to V$ a function type): $t \in RED_{U \to V}$ iff $\forall u$, $u \in RED_U$ implies $t(u) \in RED_V$.

By induction on $T$, one establishes the following three conditions:

1. if $t \in RED_T$, then $t$ is strongly normalizing

1. if $t \in RED_T$ and $t \to t'$, then $t' \in RED_T$

1. if $t$ is _neutral_ (i.e., either a variable or application) and for all $t \to t'$ we have $t' \in RED_T$, then $t \in RED_T$

Finally, one proves the "fundamental lemma"

* if $t:T$ then $t \in RED_T$

which by condition (1) implies that every simply-typed term is strongly normalizing.

## Related concepts

* [[programming language]], [[computer science]]
* [[synthetic Tait computability]]
* [[parametricity]]

## References

* {#Tait67} W. W. Tait. _Intensional Interpretations of Functionals of Finite Type I_, JSL 32:2, June 1967. ([JSTOR](http://www.jstor.org/stable/2271658))

* {#Plotkin73} [[Gordon Plotkin]]. _Lambda-definability and logical relations_, unpublished manuscript, Edinburgh 1973. ([pdf](http://homepages.inf.ed.ac.uk/gdp/publications/logical_relations_1973.pdf))

* {#Reynolds83} [[John C. Reynolds]], _Types, Abstraction and Parametric Polymorphism_ Information Processing 83(1) (1983), pp. 513-523.

* {#Girard90} [[Jean-Yves Girard]], [[Yves Lafont]], and [[Paul Taylor]], _Proofs and Types_, 1990. ([web](http://www.paultaylor.eu/stable/Proofs+Types))

For a recent perspective:

* {#Hermida13} [[Claudio Hermida]], [[Uday Reddy]], E. Robinson, section 2 of _Logical Relations and Parametricity - A Reynolds Programme for Category Theory and Programming Languages_, Electronic Notes in Theoretical Computer Science (2013) ([pdf](http://www.cs.bham.ac.uk/~udr/papers/logical-relations-and-parametricity.pdf))

See also

* Patricia Johann, [[Neil Ghani]], _Logical Relations for Program Verification_, research proposal ([pdf](https://personal.cis.strath.ac.uk/neil.ghani/lrpv.pdf))
  {#JohannGhani}

* [[Thierry Coquand]], from slide 63 on in _Equality and dependent type theory_ ([pdf](http://www.cse.chalmers.se/~coquand/equality.pdf))

* Florian Rabe, Kristina Sojakova, _Logical Relations for a Logical Framework_ ([pdf](http://kwarc.info/frabe/Research/RS_logrels_12.pdf))

* Carsten Schürmann, Jeffrey Sarnat, _Structural logical relations_ ([pdf](http://www.twelf.org/slr/slr.pdf))

* Lau Skorstengaard, _An Introduction to Logical Relations: Proving Program Properties Using Logical Relations_, ([pdf](http://cs.au.dk/~lask/main.pdf))

* Karl Crary, _Logical Relations and a Case Study in Equivalence Checking_, in Benjamin Pierce (ed.), _Advanced Topics in Types and Programming Languages_

* Amal Ahmed, _Lectures on logical relations at OPLSS 2015_, ([lecture recordings](https://www.cs.uoregon.edu/research/summerschool/summer15/curriculum.html))

Further discussion:

* StackExchange discussion, _[What are differences between logical relations and simulations?](http://cstheory.stackexchange.com/questions/5427/what-are-the-differences-between-logical-relations-and-simulations)_

* TYPES mailing list thread on the [origin of the term "logical relation"](http://lists.seas.upenn.edu/pipermail/types-list/2006/001042.html)

[[!redirects logical relations]]
[[!redirects logical predicate]]
[[!redirects logical predicates]]
[[!redirects Tait computability]]
[[!redirects reducibility candidates]]


logical scheme

+-- {: .rightHandSide}
+-- {: .toc .clickDown tabindex="0"}
### Context
#### Type theory
+-- {: .hide}
[[!include type theory - contents]]
=--
#### Model theory
+-- {: .hide}
[[!include model theory - contents]]
=--
=--
=--

#Contents#
* table of contents
{:toc}

### Idea

**Logical schemes** are geometric entities which relate to [[first-order logical theories]] in much the same way that algebraic [[schemes]] relate to [[commutative rings]]. They are used to establish a [[categorification]] of [[Stone duality]] relating first-order theories and their categories of models. This is an alternative to the approach via [[ultracategories]]. In this framework [[conceptual completeness]] can be established.

### References

* [[Spencer Breiner]], _Scheme representation for first-order logic_, ([arXiv:1402.2600](http://arxiv.org/abs/1402.2600))

* [[Steve Awodey]], _Sheaf Representations and Duality in Logic_, ([arXiv:2001.09195](https://arxiv.org/abs/2001.09195))

[[!redirects logical schemes]]


logical topology

+-- {: .rightHandSide}
+-- {: .toc .clickDown tabindex="0"}
###Context###
#### Synthetic differential geometry
+--{: .hide}
[[!include synthetic differential geometry - contents]]
=--
#### Topology
+--{: .hide}
[[!include topology - contents]]
=--
=--
=--

#Contents#
* table of contents
{:toc}

## Idea

Given a given [[intuitionistic logic]] framework, such as a [[type theory]], the _logical topology_ ([Penon 81](#Penon81)) on a given object ([[type]]) $X$ is that whose [[open subsets]] are the sets $U$ for which any $X - \{x\}$ and $U$ cover $X$. This implies that an open subset contains for every point $x$ also the collection of points that are indistinguishable from it in [[classical logic]], hence that are [[double negation|not not]] equal to $x$.

The notion of Penon open is closely related to that of Zariski open. Consider the affine line $\mathbb{A} : \text{fpRing} \to \text{Set}$ as the forgetful functor from finitely presented rings to sets. The (category theorists') big Zariski topos is the largest subtopos of this topos of functors in which $\mathbb{A}$ is a local ring. A ring is local if for all $y$, either $y$ or $1- y$ is invertible; equivalently, we may ask that either $y$ or $x - y$ is invertible for a given invertible element $x$, by homogeneity. In this case, the locality of $\mathbb{A}$ is equivalent to the subset $\mathbb{G}_m \hookrightarrow \mathbb{A}$ of invertible elements being logically open.

## Related concepts

* [[synthetic differential topology]]

## References

The concept was introduced in

* {#Penon81} [[Jacques Penon]], _Infinitésimaux et intuitionnisme_,  Cahiers de Topologie et Géométrie Différentielle Catégoriques, Volume 22 (1981) no. 1, p. 67-72 ([numdam:CTGDC_1981__22_1_67_0](http://www.numdam.org/item/?id=CTGDC_1981__22_1_67_0))

Review in the context of [[cohesive toposes]], [[modal type theory]] and [[cohesive homotopy type theory]] includes

* [[David Myers]], _Logical Topology and Axiomatic Cohesion_, talk at _[Geometry in Modal Homotopy Type Theory](https://felix-cherubini.de/modal-workshop.html)_ 2019 ([pdf slides](https://felix-cherubini.de/myers-slides.pdf), [video recording](https://youtu.be/GbzQMsr3Jf4))

[[!redirects logical topologies]]


logicality and invariance

#Contents#
* table of contents
{:toc}

## Idea

A prominent idea in the effort to isolate what are the properly [[logic|logical]] concepts we deploy has been to use the notion of [[invariant|invariance]]. The thought here is that logical concepts are those that remain invariant under arbitrary [[permutations]] of the corresponding domain of objects of the universe of discourse. This approach has been seen by some, notably [[Friederich Mautner]] and [[Alfred Tarski]], as an extension of the [[Erlangen program]] of [[Felix Klein]], which looked to distinguish geometries by their invariance under different [transformation groups](action#ActionsOfAGroup). Just as [[Euclidean geometry|Euclidean]] concepts are preserved by Euclidean transformations of space, and [[topology|topological]] ones are preserved by [[homeomorphisms]], so here logical concepts are those preserved by any permutation.

Tarski's informal definition ([Ln](#Ln)) is reproduced here,
>Now suppose we continue this idea, and consider still wider classes of transformations.
>In the extreme case, we would consider the class of all one-one transformations
>of the space, or universe of discourse, or 'world', onto itself. What will be the
>science which deals with the notions invariant under this widest class of transformations?
>Here we will have very few notions, all of a very general character. I suggest that
>they are the logical notions, that we call a notion 'logical' if it is invariant under all
>possible one-one transformations of the world onto itself.

Logic is now to be seen as the maximally invariant theory.

Tarski goes on to point out that using this method to distinguish between logical and mathematical concepts, the result is dependent on the chosen foundational theory. When [[Bertrand Russell|Russell's]] theory of types is chosen, as used by Whitehead and him in _Principia Mathematica_, then the membership relation is a logical concept. However, using a [[material set theory]], such as [[ZFC]], then it is not.

## Cases of invariance in logical systems

### Propositional logic

In the [[propositional logic|propositional]] case, consider the [[symmetric group]], $S_n$, [[group action|acting]] on a [[set]], $X$, of [[cardinality]] $n$. Then it also acts on all [[Cartesian product|cartesian powers]], $X^k$. Subsets of $X^k$ are $k$-ary [[relations]], and those invariant (as [[subsets]]) under $S_n$ are [[unions]] of the [[orbits]] of its action. The idea then is that such relations are invariant if and only if they are definable using only logical constants.

### Simple type theory

Johan van Benthem proposed ([JvB](#JvB)) such a treatment for a certain [[simple type theory]]. Here there is a type of individuals, $e$, a type of truth values, $t$, and it is closed under function types. For instance, invariant elements of the type $((e, t), t)$ include the [[quantifiers]].

Van Benthem demonstrates that types possessing an invariant element are precisely those of either of the forms

1. $(a_1, (a_2, \ldots,(a_n, t)\ldots)),$

1. $(a_1, (a_2, \ldots,(a_n, e)\ldots)),$ where at least one of the $a_i$ fails to have an invariant element.

### Homotopy type theory

[[Steve Awodey]] ([ULL](#ULL)) has argued that [[homotopy type theory]] should be seen in a similar light as expressing invariance under the broader notion of [[equivalence]] (see also at *[[principle of equivalence]]*). In ([UPL](#UPL)) he speaks of what he calls the _Tarski-Grothendieck Thesis_:

> If a statement, concept, or construction is purely logical, then it should  be invariant under all equivalences of the structures involved. A statement that is not invariant must involve some non-logical specifics, pertaining not to general logical form but to some particular aspects of the objects bearing the structure.  If it is the hallmark of a logical concept that it should pertain only to general, formal structure and not to any specific features of  the objects bearing that structure, then this formal character may be witnessed  by the fact that the concept is invariant under all equivalence transformations.

One way to understand this formally is in terms of type formation that is invariant under type equivalence. So given a type $A: \mathcal{U}$, we have for instance

* [[dependent sum type]] and [[dependent product type]] formation in
$$(X: BAut(A)) \to (X \to \mathcal{U}) \to \mathcal{U},$$

* list type formation and [[n-truncation modality|truncation]] $\| X\|_n$ in
$$(X: BAut(A)) \to \mathcal{U},$$

* [[identity type]] formation in
$$(X: BAut(A)) \to X \to (X \to \mathcal{U}),$$

and so on.

Types formed from two or more types may be treated similarly, so that the formation of [[sum type]], [[product type]] and [[function type]] are invariant elements of

* $(X: BAut(A)) \to (Y: BAut(B)) \to \mathcal{U}.$

In this way, any concept expressible in [[homotopy type theory]], and compatible with the [[univalence axiom]], is to be counted as logical.

## Related concepts

* [[principle of equivalence]]

## References

* John MacFarlane, _Logical Constants:Permutation invariance_, [SEP](http://plato.stanford.edu/entries/logical-constants/#PerInv)

* F. I. Mautner, _An Extension of Klein's Erlanger Program: Logic as Invariant-Theory_, American Journal of Mathematics, Vol. 68, No. 3 (Jul., 1946), pp. 345-384 (based on [[Hermann Weyl]]'s formulation of the program in _Classical Groups_, pp. 13-18) ([JSTOR](https://www.jstor.org/stable/2371821)).

* {#Ln} [[Alfred Tarski]], 1986, _What are Logical Notions?_, History and Philosophy of Logic, 7: 143–154. (Transcript of a 1966 talk, ed. J. Corcoran.) doi:[10.1080/01445348608837096](http://dx.doi.org/10.1080/01445348608837096)

* {#Quine51} [[Willard Quine]], 1951, _Two Dogmas of Empiricism_, The Philosophical Review, 60(1): 20–43. Reprinted in Quine _From a Logical Point of View_, New York: Harper, 1953, pp. 20–46.

* V. McGee, 1996, _Logical Operations_, Journal of Philosophical Logic, 25: 567–580

* Denis Bonnay, _Logicality and Invariance_, [lecture series](http://lumiere.ens.fr/~dbonnay/) (under 'Enseignement')

* Denis Bonnay, _Logicality and Invariance_, Bulletin of Symbolic Logic 14 (1):29-68 (2006), [pdf](http://lumiere.ens.fr/~dbonnay/files/Papers/bonnaylogicalityandinvariance.pdf)

* {#JvB} Johan van Benthem, _Logical constants across varying types_, Notre Dame J. Formal Logic 30 (1989), no. 3, 315--342, ([pdf](http://www.illc.uva.nl/lgc/translation/papers/LogicalConstants.pdf))

* {#ULL} [[Steve Awodey]], _Univalence as a logical law_, talk at [conference](https://hottatbristol.wordpress.com/), Bristol 15 Sept 2016.

* {#UPL} [[Steve Awodey]], _Univalence as a Principle of Logic_, ([preprint](https://www.andrew.cmu.edu/user/awodey/preprints/uapl.pdf))


logos

The term "logos" is used

* by [[Heraclitus]] for _[[logos (in philosophy)]]_, something that later was discussed as "logic" in [[Hegel]]'s _[[Science of Logic]]_.

* in [Freyd-Scedrov](#FreydScedrov) as a synonym for _[[Heyting category]]_;

* in [Joyal 08](#Joyal08) as a synonym for _[[quasi-category]]_ ([[(∞,1)-category]], cf. also *[[Joyal locus]]*);

* in [Joyal 2015](#Joyal15), [Anel & Joyal 2019](#AnelJoyal19), [ABFJ 2023 p. 3](#ABFJ23) for the [[formal duality|formal dual]] of a [[topos]], namely for an object of the [[opposite category|opposite]] of the category of [[toposes]]. This is along the same lines as the classical [[formal duality]] between [[frames]] and [[locales]] ([[(0,1)-toposes]]) and extends immediately to  [[(infinity,1)-topos|$(\infty,1)$-toposes]] whose [[formal duality|formal duals]] are hence "$(\infty,1)$-logoi" or "$\infty$-logoi", for short;

* in [Anel 2019](#Anel19) for a [[cartesian closed (infinity,1)-category|cartesian closed $\infty$-category]] with [[finite (infinity,1)-limits|finite $\infty$-limits]] and [[van Kampen colimits]] in size bounded by some [[inaccessible cardinal]].

## References

* {#FreydScedrov} [[Peter Freyd]], Andre Scedrov, _[[Categories, Allegories]]_

* {#Joyal08} [[André Joyal]], _Notes on Logoi_, 2008 ([pdf](http://www.math.uchicago.edu/~may/IMA/JOYAL/Joyal.pdf))

* {#Joyal15} [[André Joyal]], _A crash course in topos theory : the big picture_, lecture series at Topos à l'IHÉS, 2015 [Video 1](https://www.youtube.com/watch?v=Ro8KoFFdtS4), [Video 2](https://www.youtube.com/watch?v=4vxzK4LjFlY), [Video 3](https://www.youtube.com/watch?v=u_cl0qiJxWY), [Video 4](https://www.youtube.com/watch?v=xzyxgJBNW8w).

* {#AnelJoyal19} [[Mathieu Anel]], [[André Joyal]], *Topo-logie*, in *[[New Spaces for Mathematics and Physics]]*, Cambridge University Press (2021) 155-257 [[doi:10.1017/9781108854429.007](https://doi.org/10.1017/9781108854429.007), [pdf](http://mathieu.anel.free.fr/mat/doc/Anel-Joyal-Topo-logie.pdf)]

* {#Anel19} [[Mathieu Anel]], *Descent and Univalence*, talk at [HoTTEST](https://www.uwo.ca/math/faculty/kapulkin/seminars/hottest.html) (May 2019) [[slides](https://www.uwo.ca/math/faculty/kapulkin/seminars/hottestfiles/Anel-2019-05-2-HoTTEST.pdf), [video](https://www.youtube.com/watch?v=86s0BCB3HGo)]

* {#ABFJ23} [[Mathieu Anel]], [[Georg Biedermann]], [[Eric Finster]], [[André Joyal]], *Left-exact Localizations of ∞-Topoi III: The Acyclic Product* [[arXiv:2308.15573](https://arxiv.org/abs/2308.15573)]

Discussion of relation to [[taoism]]:

* {#Butti13} Elena Butti, _A comparison between Heraclitus' "Logos" and Lao-Tzu's "Tao"_, Ephemeris (2013) [[[Butti13.pdf:file]]]

category: disambiguation

[[!redirects logos]]
[[!redirects logoses]]
[[!redirects logoi]]


logos (in philosophy)

+-- {: .rightHandSide}
+-- {: .toc .clickDown tabindex="0"}
### Context
#### Philosophy
+-- {: .hide}
[[!include philosophy - contents]]
=--
=--
=--

#Contents#
* table of contents
{:toc}

## Idea

A notion in [[philosophy]], originally  described by [[Heraclitus]] such ([WL](#WikipediaLogos)):

> all things come to pass in accordance with the Logos

About this remarked [[Georg Hegel]] (in _[[Lectures on the History of Philosophy]] Volume I._, [cit](http://en.wikipedia.org/wiki/Georg_Wilhelm_Friedrich_Hegel#Heraclitus)):

> Heraclitus is the one who first declared the nature of the infinite and first grasped nature as in itself infinite, that is, its essence as process. The origin of philosophy is to be dated from Heraclitus. His is the persistent Idea that is the same in all philosophers up to the present day, as it was the Idea of Plato and Aristotle."

> ...there is no proposition of Heraclitus which I have not adopted in my logic.

Here "my logic" refers to what Hegel lays out in _[[Science of Logic]]_, where indeed "logic" is used more like what Heraclitus' _Logos_ seems to refer to (see also [Heidegger 58](#Heidegger58)), rather than [[mathematical logic]]. There Hegel relates it  to the _[[Nous]]_ of [[Anaxagoras]] ([Hegel, Science of Logic, §54](Science+of+Logic#54)).

## Related concepts

* [[nous]]

* [[道德經]]

* [[hermeticism]]

## References

* Wikipedia, _[Heraclitus -- Logos](http://en.wikipedia.org/wiki/Heraclitus#Logos)_
 {#WikipediaLogos}

* [[Georg Hegel]], _[[Science of Logic]]_

* [[Martin Heidegger]], _Hegel and the Greeks_, Conference of the Academy of Sciences at Heidelberg, July 26, 1958 ([web](http://www.morec.com/hegelgre.htm))
  {#Heidegger58}


long exact sequence in chain homology

+-- {: .rightHandSide}
+-- {: .toc .clickDown tabindex="0"}
###Context###
#### Homological algebra
+--{: .hide}
[[!include homological algebra - contents]]
=--
#### Cohomology
+--{: .hide}
[[!include cohomology - contents]]
=--
=--
=--

#Contents#
* table of contents
{:toc}

## Idea

Let $\mathcal{A}$ be an [[abelian category]] and write $Ch_\bullet(\mathcal{A})$ for its [[category of chain complexes]]. Under forming [[chain homology]]

$$
  H_0 : Ch_\bullet(\mathcal{A}) \to \mathcal{A}
$$

in some (any) fixed degree, a [[homotopy fiber sequence]] in $Ch_\bullet(\mathcal{A})$ is sent to a [[long exact sequence]] in $\mathcal{A}$. This is the _homology long exact sequence_.

Often this is considered specifically for the case that the fiber sequence in $Ch_\bullet(\mathcal{A})$ is that induced from a [[short exact sequence]] in $\mathcal{A}$. In this case the further map (that which makes the sequence "long") is called the [[connecting homomorphism]].

## Statement

(...)

For the moment see still at _[[fiber sequence]]_, for instance the section
_[long exact sequence in cohomology](fiber%20sequence#LongSequCoh)_ there.

## Properties

### Relation to homotopy fiber sequences
 {#RelationToHomotopyFiberSequences}

We discuss the relation of homology long exact sequences to [[homotopy cofiber sequences]] of chain complexes. Technical details corresponding to the following survey are at _[[mapping cone]]_ in the section _[Mapping cone -- Homology exact sequences and fiber sequences](http://ncatlab.org/nlab/show/mapping+cone#HomologyExactSequencesAndFiberSequences)_.

$\,$

While the notion of a [[short exact sequence]] of [[chain complexes]] is very useful for computations, it does not have invariant meaning if one considers chain complexes as objects in (abelian) [[homotopy theory]], where one takes into account [[chain homotopies]] between [[chain maps]] and takes [[equivalence]] of chain complexes not to be given by [[isomorphism]], but by [[quasi-isomorphism]].

For if a [[chain map]] $A_\bullet \to B_\bullet$ is the degreewise [[kernel]] of a chain map $B_\bullet \to C_\bullet$, then if $\hat A_\bullet \stackrel{\simeq}{\to} A_\bullet$ is a [[quasi-isomorphism]] (for instance a [[projective resolution]] of $A_\bullet$) then of course the composite chain map $\hat A_\bullet \to B_\bullet$ is in general far from being the degreewise kernel of $C_\bullet$. Hence the notion of degreewise kernels of chain maps and hence that of short exact sequences is not meaningful in the homotopy theory of chain complexes in $\mathcal{A}$ (for instance: not in the [[derived category]] of $\mathcal{A}$).

That short exact sequences of chain complexes nevertheless play an important role in [[homological algebra]] is due to what might be called a "technical coincidence":

+-- {: .num_prop }
###### Proposition

If $A_\bullet \to B_\bullet \to C_\bullet$ is a
[[short exact sequence]] of [[chain complexes]], then the [[commuting square]]

$$
  \array{
     A_\bullet &\to& 0
     \\
     \downarrow && \downarrow
     \\
     B_\bullet &\to& C_\bullet
  }
$$

is not only a [[pullback]] square in $Ch_\bullet(\mathcal{A})$, exhibiting $A_\bullet$ as the [[fiber]] of $B_\bullet \to C_\bullet$ over $0 \in C_\bullet$, it is in fact also a _[[homotopy pullback]]_.

=--

This means it is [[universal property|universal]] not just among commuting such squares, but also among such squares which commute possibly only up to a [[chain homotopy]] $\phi$:

$$
  \array{
     Q_\bullet &\to& 0
     \\
     \downarrow &\swArrow_{\phi}& \downarrow
     \\
     B_\bullet &\to& C_\bullet
  }
$$

and with morphisms between such squares being maps $A_\bullet \to A'_\bullet$ correspondingly with further chain homotopies filling all diagrams in sight.

+-- {: .proof}
###### Proof

This follows from using the basic property (see at [exact sequence -- Definition](exact+sequence#Definition)) that in a short exact sequence $A_\bullet \to B_\bullet \to C_\bullet$ the morphism on the right is a degreewise [[surjection]]
together with a basic result in the theory of [[model categories]] or in fact that of [[categories of fibrant objects]] which is discussed in detail at _[[homotopy pullback]]_ and also at _[[factorization lemma]]_:

by the existence of the [[projective model structure on chain complexes]], we may regard every chain complex as a [[fibrant object]] and every degreewise surjection as a [[fibration]]. By the basic theorem discussed at [Homotopy pullback -- Properties -- General](homotopy%20pullback#ConstructionsGeneral) these are sufficient conditions for the ordinary pullback as above to produce a chain complex that represents the homotopy-correct [[homotopy pullback]] (which, beware, is defined up "weak chain homology equivalence" only, hence up to [[zig-zags]] of [[quasi-isomorphism]]).

=--

Equivalently, we have the formally dual result, proved using instead the existence of the [[injective model structure on chain complexes]]:

+-- {: .num_prop }
###### Proposition

If $A_\bullet \to B_\bullet \to C_\bullet$ is a
[[short exact sequence]] of [[chain complexes]], then the [[commuting square]]

$$
  \array{
     A_\bullet &\to& 0
     \\
     \downarrow && \downarrow
     \\
     B_\bullet &\to& C_\bullet
  }
$$

is not only a [[pushout]] square in $Ch_\bullet(\mathcal{A})$, exhibiting $C_\bullet$ as the [[cofiber]] of $A_\bullet \to B_\bullet$ over $0 \in C_\bullet$, it is in fact also a _[[homotopy pushout]]_.

=--

But a central difference between [[fibers]]/[[cofibers]] on the one hand and [[homotopy fibers]]/[[homotopy cofibers]] on the other is that while the (co)fiber of a (co)fiber is necessarily trivial, the homotopy (co)fiber of a homotopy (co)fiber is in general far from trivial: it is instead the [[looping]] $\Omega(-)$  or [[suspension]] $\Sigma(-)$ of the codomain/domain of the original morphism: by the [[pasting law]] for homotopy pullbacks the [[pasting]] composite of successive [[homotopy cofibers]] of a given morphism $f : A_\bullet \to B_\bullet$ looks like this:

$$
  \array{
     A_\bullet &\stackrel{f}{\to}& B_\bullet &\to& 0
     \\
     \downarrow &\swArrow_{\mathrlap{\phi}}& \downarrow &\swArrow& \downarrow
     \\
     0 &\to& cone(f) &\to& A[1]_{\bullet} &\stackrel{}{\to}& 0
     \\
     && \downarrow &\swArrow& \downarrow^{\mathrlap{f[1]}}  &\swArrow& \downarrow
     \\
     && 0 &\to& B[1] &\to& cone(f)[1]_\bullet &\to& \cdots
     \\
     && && \downarrow && \downarrow &\ddots&
     \\
     && && \vdots && &&
  }
$$

here

* $cone(f)$ is a specific representative of the [[homotopy cofiber]] of $f$ called the _[[mapping cone]]_ of $f$, whose construction comes with an explicit [[chain homotopy]] $\phi$ as indicated, hence $cone(f)$ is homology-equivalence to $C_\bullet$ above, but is in general a "bigger" model of the homotopy cofiber;

* $A[1]$ etc. is the [[suspension of a chain complex]] of $A$, hence the same chain complex but pushed up in degree by one.

This is discussed in detail at _[[mapping cone]]_, see the section _[mapping cone - for chain complexes](mapping%20cone#InChainComplexes)_.

In conclusion we get from every morphim of chain complexes a
long **[[homotopy cofiber sequence]]**

$$
    \cdots
  \to
     A_\bullet \stackrel{f}{\to}B_\bullet
  \stackrel{}{\to}
  cone(f)
   \stackrel{}{\to}
  A[1]_\bullet
   \stackrel{f[1]}{\to}
  B[1]_\bullet
   \stackrel{}{\to}
  cone(f)[1]_\bullet
   \to
  \cdots
  \,.
$$

And applying the [[chain homology]] functor to this yields the long exact sequence in chain homology which is traditionally said to be associated to the short exact sequence $A_\bullet \to B_\bullet \to C_\bullet$.

In conclusion this means that it is not really the passage to homology groups which "makes a short exact sequence become long". It's rather that passing to homology groups is a shadow of passing to chain complexes regarded up to quasi-isomorphism, and _this_ is what makes every short exact sequence be realized as but a special presentation of a stage in a long [[homotopy fiber sequence]].

## Related concepts

* [[Gysin sequence]]

* [[Serre long exact sequence]]

* [[long exact sequence of homotopy groups]]

* [[long exact sequence in homology]]

  * [[long exact sequence in generalized homology]]

## References

Lecture notes:

* Robert Ash, _The long exact homology sequence and applications_ ([pdf](http://www.math.uiuc.edu/~r-ash/Algebra/Supplement.pdf))

[[!redirects long exact sequences in chain homology]]

[[!redirects long exact sequence in chain cohomology]]
[[!redirects long exact sequences in chain cohomology]]


long exact sequence in generalized homology

+-- {: .rightHandSide}
+-- {: .toc .clickDown tabindex="0"}
###Context###
#### Algebraic topology
+--{: .hide}
[[!include algebraic topology - contents]]
=--
=--
=--

#Contents#
* table of contents
{:toc}

## Idea

The [[homology groups]]/[[cohomology groups]] of a ([[reduced homology|reduced]]) [[Whitehead-generalized homology theory]]/[[Whitehead-generalized cohomology theory|cohomology theory]] evaluated on an [[long homotopy cofiber sequence]] of [[pointed homotopy types|pointed spaces]] form a [[long exact sequence]] of [[abelian groups]].

## Definition

Let $X \overset{f}{\longrightarrow} Y$ be a [[morphism]] of [[pointed homotopy types]] (typically presented as a [[continuous function]] of [[pointed topological spaces]] or a morphism of [[pointed object|pointed]] [[simplicial sets]]) and write

\[
  \label{HomotopyCofiberSequenceOfSpaces}
  \cdots
  \to
  X
    \overset{f}{\longrightarrow}
  Y
    \longrightarrow
  C_f
    \overset{\delta}{\longrightarrow}
  \Sigma X
    \overset{ \Sigma f }{ \longrightarrow }
  \Sigma Y
    \to
  \cdots
\]

for its induced long [[homotopy cofiber sequence]], where $C_f \coloneqq cof(f)$ denotes the [[homotopy cofiber]] of $f$ and $\Sigma(-)$ is [[reduced suspension]].
(If $f$ is presented by an inclusion/[[cofibration]] of [[cell complexes]] in the [[classical model structure on topological spaces]] or the [[classical model structure on simplicial sets]] then $C_f \,\simeq\, Y/X$ is represented simply by the [[quotient space]] of $Y$ by $X$ under $f$. )

Now for $E$ a [[Whitehead-generalized homology theory]] its evaluation on the sequence (eq:HomotopyCofiberSequenceOfSpaces) yields a [[long exact sequence]] of [[abelian groups]] -- the [[reduced homology|reduced]] $E$-[[homology groups]]:

$$
  \cdots
  \to
  \widetilde  E_\bullet(X)
    \overset{f_\ast}{\longrightarrow}
  \widetilde  E_\bullet(Y)
    \longrightarrow
  \widetilde  E_\bullet(C_f)
    \overset{\delta_\ast}{\longrightarrow}
  \widetilde  E_{\bullet-1}(X)
    \overset{ \Sigma f_\ast }{ \longrightarrow }
  \widetilde  E_{\bullet-1}(Y)
    \to
  \cdots
$$

[[duality|Dually]], for $E$ a [[Whitehead-generalized cohomology theory]] its evaluation on the sequence (eq:HomotopyCofiberSequenceOfSpaces) yields a [[contravariant functor|contravariant]] [[long exact sequence]] of [[abelian groups]]  -- the $E$-[[cohomology groups]]:

$$
  \cdots
    \leftarrow
  \widetilde  E^\bullet(X)
    \overset{f^\ast}{\longleftarrow}
  \widetilde  E^\bullet(Y)
    \longleftarrow
  \widetilde  E^\bullet(C_f)
    \overset{\delta^\ast}{\longleftarrow}
  \widetilde  E_{\bullet-1}(X)
    \overset{ \Sigma f^\ast }{ \longleftarrow}
  \widetilde  E^{\bullet-1}(Y)
    \leftarrow
  \cdots
$$

Here $f^\ast$ denotes [[pullback in cohomology]] and $\delta^\ast$ is known as a _[[connecting homomorphism]]_.

That we have these _long exact sequences in (co)homology_ is, depending on perspective:

* an _[[axiom]]_ in [[Whitehead-generalized homology theory]]/[[Whitehead-generalized cohomology theory|cohomology theory]];

* a consequence of the [[long exact sequence of homotopy groups]] under the identifications

  * $\widetilde E_\bullet(X) \;\simeq\; \pi_\bullet \big( \Sigma^\infty X \wedge E  \big)$

  * $\widetilde E^\bullet(X) \;\simeq\; \pi_{-\bullet} Maps\big( \Sigma^\infty X, E \big)$,

  where

  * $E$ denotes now the [[spectrum]] [[Brown representability theorem|representing]] the (co)homology theory,

  * $\pi_\bullet(-)$ denotes the [[homotopy groups of spectra]],

  * applied here to [[smash product of spectra]] $(-)\wedge E$ and to [[mapping spectra]] $Maps(-,E)$, respectively.

The second perspective, via [[Brown representability theorem|representing]] [[spectra]], makes manifest that we also have long exact sequences over a fixed space $X$, but now induced from a [[homotopy cofiber sequence]] (equivalently a [[homotopy fiber sequence]] by [this Prop.](Spectrum#InSpectraHomotopyFiberSequencesAreHomotopyCofiberSequences))

$$
  \cdots
  \to
  E
    \overset{\phi}{\longrightarrow}
  F
    \overset{}{\longrightarrow}
  G
   \overset{}{\longrightarrow}
  \Sigma E
  \to \cdots
$$

of [[cohomology operations]] of [[coefficient]] theories  (of [[spectra]]), in that

$$
  \cdots
  \to
  \widetilde E_\bullet(X)
    \overset{\phi_\ast}{\longrightarrow}
  \widetilde  F_\bullet(X)
    \overset{}{\longrightarrow}
  \widetilde  G_\bullet(X)
  \to
  \cdots
$$

and

$$
  \cdots
  \to
  \widetilde  E^\bullet(X)
    \overset{\phi_\ast}{\longrightarrow}
  \widetilde F^\bullet(X)
    \overset{}{\longrightarrow}
  \widetilde  G^\bullet(X)
  \to
  \cdots
$$

are [[long exact sequences]] of [[abelian groups]].

## Related concepts
 {#RelatedConcepts}

* [[long exact sequence in homology]]

  * [[long exact sequence in chain homology]]

* [[long exact sequence of homotopy groups]]

* On a [[homotopy fiber sequence]] of spaces (instead of a cofiber sequence) there is, in general, no exact sequence of cohomolgy groups; but instead there is

  * the [[Serre spectral sequence]].

  However, in special cases this reduces again to a long exact sequence in cohomology:

  * the [[Serre long exact sequence]] for sufficiently highly connected base and fiber spaces;

  * the [[Thom-Gysin sequence]] for [[spherical fibrations]].

## References

Textbook accounts:

* {#Adams74} [[Frank Adams]], p. 197 in: _[[Stable homotopy and generalised homology]]_, Chicago Lectures in Mathematics, The University of Chicago Press 1974 ([ucp:bo21302708](https://www.press.uchicago.edu/ucp/books/book/chicago/S/bo21302708.html), [pdf](https://www.uio.no/studier/emner/matnat/math/MAT9580/v17/documents/adams-shgh.pdf))

For more references see those at _[[Whitehead-generalized cohomology theory]]_.

[[!redirects long exact sequences in generalized homology]]

[[!redirects long exact sequence in generalized cohomology]]
[[!redirects long exact sequences in generalized cohomology]]

[[!redirects long exact sequence of generalized homology groups]]
[[!redirects long exact sequences of generalized homology groups]]

[[!redirects long exact sequence of generalized cohomology groups]]
[[!redirects long exact sequences of generalized cohomology groups]]


long exact sequence in homology

+-- {: .rightHandSide}
+-- {: .toc .clickDown tabindex="0"}
###Context###
#### Homological algebra
+--{: .hide}
[[!include homological algebra - contents]]
=--
#### Algebraic topology
+--{: .hide}
[[!include algebraic topology - contents]]
=--
=--
=--

#Contents#
* table of contents
{:toc}

## Idea

A [[long exact sequence]] of [[homology groups]] (dually: of [[cohomology groups]]);

see:

* [[long exact sequence in chain homology]]

* [[long exact sequence in generalized homology]]

* ...

## Related concepts

* [[long exact sequence of homotopy groups]]

* [[Serre spectral sequence]]

category: disambiguation

[[!redirects long exact sequences in homology]]

[[!redirects long exact sequence in cohomology]]
[[!redirects long exact sequences in cohomology]]

[[!redirects homology exact sequence]]
[[!redirects homology exact sequences]]

[[!redirects cohomology exact sequence]]
[[!redirects cohomology exact sequences]]

[[!redirects homology long exact sequence]]
[[!redirects homology long exact sequences]]

[[!redirects cohomology long exact sequence]]
[[!redirects cohomology long exact sequences]]


long exact sequence of homotopy groups

+-- {: .rightHandSide}
+-- {: .toc .clickDown tabindex="0"}
###Context###
#### Homotopy theory
+--{: .hide}
[[!include homotopy - contents]]
=--
=--
=--

#Contents#
* table of contents
{:toc}

## Idea

For $Y \to Z$ a morphism of [[pointed object|pointed]] [[∞-groupoid]]s and $X \to Y$ its [[homotopy fiber]], there is a [[long exact sequence]] of [[homotopy group]]s

$$
  \cdots \to \pi_{n+1}(Z) \to \pi_n(X) \to \pi_n(Y) \to \pi_n(Z) \to \pi_{n-1}(X) \to \cdots
  \,.
$$

In terms of [[presentable (infinity,1)-category|presentations]] this means:

for $Y \to Z$ a [[fibration]] in the [[classical model structure on topological spaces]] or in the [[classical model structure on simplicial sets]], and for $X \to Y$ the ordinary [[fiber]] of [[topological spaces]] or [[simplicial sets]], respectively, we have such a long exact sequence.

For background and details see [[fibration sequence]].

## Related concepts

* [[long exact sequence in homology]]

  * [[long exact sequence in chain homology]]

  * [[long exact sequence in generalized homology]]

* [[fiber sequence]]

* [[Gysin sequence]]

* [[Serre long exact sequence]]

* Given a [[tower of homotopy fibers]] such as a [[Whitehead tower]] or [[Adams resolution]], the long exact sequences of homotopy groups for each stage combine to yield an [[exact couple]]. The corresponding [[spectral sequence]] is the _[[Adams spectral sequence]]_.

## References

The observation of long exact sequences of homotopy groups for [[homotopy fiber sequences]] originates (according to [Switzer 75, p. 35](#Switzer75)) in

* M. G. Barratt, _Track groups I, II_. Proc. London Math. Soc. 5, 71-106, 285-329 (1955).

The first exhaustive study of these is due to

* {#Puppe58} [[Dieter Puppe]], _Homotopiemengen und ihre induzierten Abbildungen I_, Math. Z. 69,  299-344 (1958).

whence the terminology _Puppe sequences_.

Textbook accounts:

* [[Norman Steenrod]], Thm. 17.4 in: _The topology of fibre bundles_, Princeton Mathematical Series 14, Princeton Univ. Press, 1951 ([jstor:j.ctt1bpm9t5](https://www.jstor.org/stable/j.ctt1bpm9t5))

* {#Switzer75} [[Robert Switzer]], around 2.59 in: _Algebraic Topology - Homotopy and Homology_, Die  Grundlehren der Mathematischen Wissenschaften in Einzeldarstellungen, Vol. 212, Springer-Verlag, New York, N. Y., 1975 ([doi:10.1007/978-3-642-61923-6](https://link.springer.com/book/10.1007/978-3-642-61923-6))

* {#Kochmann96} [[Stanley Kochmann]], Corollary 3.2.7 in: _[[Bordism, Stable Homotopy and Adams Spectral Sequences]]_, AMS 1996

* {#tomDieck2008} [[Tammo tom Dieck]],  Thm. 6.1.2 in: _Algebraic topology_, European Mathematical Society, Zürich (2008) ([doi:10.4171/048](https://www.ems-ph.org/books/book.php?proj_nr=86), [pdf](https://www.maths.ed.ac.uk/~v1ranick/papers/diecktop.pdf))

See also:

* Wikipedia, _[Long exact sequence of a fibration](http://en.wikipedia.org/wiki/Homotopy_group#Long_exact_sequence_of_a_fibration)_

In the generality of [[categorical homotopy groups in an (infinity,1)-topos|categorical homotopy groups in an $(\infty,1)$-topos]]:

* [[Jacob Lurie]], Rem. 6.5.1.5 of: _[[Higher Topos Theory]]_, Annals of Mathematics Studies 170, Princeton University Press 2009 ([pup:8957](https://press.princeton.edu/titles/8957.html), [pdf](https://www.math.ias.edu/~lurie/papers/HTT.pdf))

[[!redirects long exact sequences of homotopy groups]]


long line

+-- {: .rightHandSide}
+-- {: .toc .clickDown tabindex="0"}
###Context###
#### Topology
+--{: .hide}
[[!include topology - contents]]
=--
=--
=--

# Contents
* table of contents
{: toc}

## Idea

The ordinary "[[line]]" $\mathbb{R}$ (i.e. the [[real numbers]] equipped with their [[Euclidean space|Euclidean]] [[metric topology]]) may be thought of as the result of gluing a [[countable set]]  of copies of the [[half-open interval]] $[0, 1)$ end-to-end in both directions. A _long line_ is similarly obtained by gluing an _[[uncountable set]]_ of copies of $[0, 1)$ end-to-end in both directions, and is demonstrably "longer" than an ordinary line on account of a number of peculiar properties.

The long line is a source of many counterexamples in [[topology]].

## Definition

+-- {: .num_defn}
###### Definition

Let $\omega_1$ be the [[first uncountable ordinal]], and consider the [[half-open interval]] $[0, 1)$ as an [[total order|totally ordered set]]. A **long ray** is the ordered set $\omega_1 \times [0, 1)$ taken in the [[lexicographic order]]; as a [[topological space|space]], it is given the [[order topology]]. The **long line** is the space obtained by gluing two long rays together at their initial points.

=--

The long line is a line in the sense of being a $1$-dimensional [[locally Euclidean space]] (without boundary) that is not closed (so not a [[circle]]).  However, it is not [[paracompact space|paracompact]], so it is not [[homeomorphic]] to the [[real line]] (even though it is [[Hausdorff space|Hausdorff]]).

## Properties

All the assertions below apply to both the long line and the long ray. We write $L$ to cover both cases even if we only treat one.

1. Every [[continuous function]] $f\colon L \to \mathbb{R}$ is eventually constant, i.e., there exists $x \in L$ and $c \in \mathbb{R}$ such that $f(y) = c$ whenever $y \geq x$ (and similarly $f$ is constant for all sufficiently small $x$).

2. $L$ is a [[normal space|normal]] ($T_4$) space, but the [[Tychonoff product]] $L \times \bar{L}$ with its one-point [[compactification]] is not normal. (See for example [Munkres](#Munk).)

3. Every continuous map $L \to L$ has a [[fixed point]].

4. $L$ is [[sequentially compact space|sequentially compact]] but not [[compact space|compact]]. (Being sequentially compact, they are also [[countably compact spaces]].) Thus, the image $f(L)$ under a continuous map $f: L \to \mathbb{R}$, being sequentially compact, is a compact subspace of $\mathbb{R}$.

5. The long ray/line is not [[contractible space|contractible]]. Proof sketch for the long ray: Suppose $H \colon I \times L \to L$ is a homotopy such that $H(0, -)$ is constant and $H(1, -)$ is the identity. For each $t \in [0, 1]$ the image $\im H(t, -)$ is an interval (either bounded or unbounded), since $L$ is [[connected space|connected]]. One may show the set
$$S = \{t \in I: \im H(t, -)\;  \text{is bounded}\}$$
is both closed and open. It also contains $0$, hence is all of $I$. But $S$ can't contain $t = 1$, contradiction.

Let us flesh out this sketched proof. First we show $S$ is closed. Denote the bottom element of $L$ by $\bot$. If $t_n$ is a sequence in $S$ with limit point $t \in I$, then $H(\{t_n\} \times L) \subseteq [\bot, b_n]$ for some sequence of bounds $b_n \in L$; this sequence has an upper bound $b \in L$. Then $H(\{t_n\} \times L) \subseteq [\bot, b]$ for all $n \in \mathbb{N}$, which is the same as saying $\bigcup_n \{t_n\} \times L \subseteq H^{-1}([\bot, b])$. Now $\{t\} \times L$ is included within the closure of the union, which is included within the closed set $H^{-1}([\bot, b])$. But $\{t\} \times L \subseteq H^{-1}([\bot, b])$ means $H(\{t\} \times L) \subseteq [\bot, b]$; hence $t \in S$.

Now we show $S$ is open. This uses a [[countably compact space|countably compact]] version of the [[tube lemma]]. If $t \in S$, then we can find $b \in L$ such that $\{t\} \times L \subseteq H^{-1}([\bot, b))$, where the right side is open in $I \times L$. Let $B_r(t) \subseteq I$ denote the open [[ball]] of radius $r$ centered at $t$, and for $c \lt d$ in $L$ let $(c, d)$ denote the open interval between $c$ and $d$. Consider the collection $T$ of all triples $(n, c, d) \in \mathbb{N} \times L \times L$ such that

$$U_{n, c, d} \coloneqq B_{1/n}(t) \times (c, d) \subseteq H^{-1}([\bot, b)).$$

For each fixed $n \in \mathbb{N}$, put $U_n = \bigcup_{(n, c, d) \in T} (c, d)$. The $U_n$ form a countable [[open cover]] of $L$, since for every $x \in L$ there is a $U_{n, c, d}$ containing the pair $(t, x)$. Since $L$ is countably compact, there is a finite subcover $U_{n_1}, \ldots, U_{n_k}$. Putting $n = \max \{n_1, \ldots, n_k\}$, we see

$$B_{1/n}(t) \times L = B_{1/n}(t) \times \bigcup_{i=1}^k U_{n_i} = \bigcup_{i=1}^k B_{1/n}(t) \times U_{n_i} \subseteq \bigcup_{i=1}^k B_{1/n_i}(t) \times U_{n_i} \subseteq H^{-1}([\bot, b))$$

from which it immediately follows that $B_{1/n}(t) \subseteq S$.

## Related concepts

* [[line with two origins]]

## References

* Steen and Seebach, _Counterexamples in Topology_. Springer-Verlag, New York, 1978. Reprinted by Dover Publications, New York, 1995.

* [[James Munkres]], _Topology_ (2nd edition). Prentice-Hall, 2000.

See also

* Wikipedia, _[Long line (topology)](https://en.wikipedia.org/wiki/Long_line_%28topology%29)_

[[!redirects long line]]
[[!redirects long lines]]
[[!redirects long ray]]
[[!redirects long rays]]


Long March

The title refers to a document 'La Longue Marche à travers la Théorie de Galois" by [[Alexander Grothendieck]]. He wrote the 'Long March' between January and June 1981. It consists of about 1600 manuscript pages, and nearly as much again in various addenda and developments. The central objects considered in the
_Long March_ are the moduli spaces of Riemann surfaces of genus $g$ with $n$
marked points.

(For the moment, this entry is a 'stub' and the topic  is discussed in a bit more detail in a subentry to [[Galois theory]], although that directs here!)

* [Article by Leila Schneps](https://webusers.imj-prg.fr/~leila.schneps/SchnepsLM.pdf)

* [Project of transcription](https://agrothendieck.github.io/divers/galois.pdf)

category: reference


long-range entanglement

+-- {: .rightHandSide}
+-- {: .toc .clickDown tabindex="0"}
###Context###
#### Quantum systems
+--{: .hide}
[[!include quantum systems -- contents]]
=--
#### Measure and probability theory
+-- {: .hide}
[[!include measure theory - contents]]
=--
=--
=--

#Contents#
* table of contents
{:toc}

## Idea

(...) non-vanishing size-independent ("[[topological entanglement entropy|topological]]") contribution to the [[entanglement entropy]], witnessing *[[topological order]]* (...)

(..) contrast to [[short-range entanglement]] (...)

## References

[[!include topological entanglement entropy -- references]]

[[!redirects long range entanglement]]


longitude of a link component

+-- {: .rightHandSide}
+-- {: .toc .clickDown tabindex="0"}
###Context###
#### Knot theory
+--{: .hide}
[[!include knot theory - contents]]
=--
=--
=--

\tableofcontents

\section{Introduction}

The _longitude_ of a [[knot]], or more generally of a component of a [[link]], plays a crucial role in the link-theoretic approach to [[3-manifolds]] by means of the [[Lickorish-Wallace theorem]] and the [[Kirby calculus]]. It can be defined either geometrically or combinatorially.

\section{Combinatorial definition}

The longitude of a knot or of a link component can be defined purely within [[diagrammatic knot theory]]. We describe this in this section.

\begin{defn} \label{DefinitionLongitudeOfALinkComponent} Let $C$ be a component of a [[link diagram]] $L$, viewed as defining a link with the [[blackboard framing]]. Pick an [[orientation of a link diagram|orientation]] of $L$, and pick a point $p$ of $C$. The _longitude_ of $C$ with respect to $p$ and the chosen orientation of $L$ is the [[word]] in the [[free group]] of the set of [[arc of a link diagram|arcs]] of $L$ defined inductively as follows.

1) Begin at $p$ with the empty word.

2) Walk along $L$ following the orientation of $L$ until one reaches a crossing of $L$ which one approaches by means of an under-edge (one does not stop at crossings which one approaches and leaves by means of over-edges). If the orientations of the crossings are as follows, add $a$ to the end of the word obtained thus far.

\begin{centre}

\begin{tikzpicture}

\draw[->, semithick] (0,1) -- (0,-1);
\draw[shorten >= 0.5em, semithick] (-1,0) -- (0,0);
\draw[->, shorten <= 0.5em, semithick] (0,0) -- (1,0);

\node[anchor=north] at (0,-1) {$a$};

\end{tikzpicture}

\end{centre}

If the orientations of the arcs of the crossing are instead as follows, add  $a^{-1}$ to the end of the word obtained thus far.

\begin{centre}

\begin{tikzpicture}

\draw[<-, semithick] (0,1) -- (0,-1);
\draw[shorten >= 0.5em, semithick] (-1,0) -- (0,0);
\draw[->, shorten <= 0.5em, semithick] (0,0) -- (1,0);

\node[anchor=north] at (0,-1) {$a$};

\end{tikzpicture}

\end{centre}

The arc $a$ is not required to, and may not, belong to $C$.

3) Repeat Step 2) until we return to $p$.

\end{defn}

\begin{rmk} There is an alternative definition if one works with [[framed link diagrams]], which involves first replacing one's original link diagram with one to which a certain number of twists (i.e. [[R1 move|R1 moves]]) have been applied according to the framing, and then using Definition \ref{DefinitionLongitudeOfALinkComponent}. \end{rmk}

\begin{example} Consider the [[trefoil]] with a chosen point $p$ and orientation as shown below. Labels have been chosen for the arcs.

\begin{centre}

\begin{tikzpicture}

\usetikzlibrary{decorations.markings}

\path (-2.5,-2.5) -- (-2.5,1.5) -- (3.5,1.5) -- (2.5,-2.5) -- (2.5,-2.5);

\draw[semithick, shorten <= 0.5em, shorten >= 0.5em] (2,0) -- (0,0) -- (0,-1) -- (1,-1);
\draw[semithick, shorten <= 0.5em, shorten >= 0.5em] (1,-1) -- (2,-1) -- (2,1) -- (1,1) -- (1,0);
\draw[semithick, shorten <= 0.5em, shorten >= 0.5em] (1,0) -- (1,-2) -- (3,-2) -- (3,0) -- (2,0);

\filldraw[black] (0,-0.5) circle (2pt);

\node[anchor=south] at (0.5,0) {$a$};
\node[anchor=north] at (1.6,-1) {$b$};
\node[anchor=east] at (1,-1.6) {$c$};

\node at (-0.25, -0.5) {$p$};

\path[decoration = { markings, mark=at position 0.5 with {\arrow[scale=2]{>}}}, postaction = {decorate}] (2,-1) -- (2,0);
\path[decoration = { markings, mark=at position 0.5 with {\arrow[scale=2]{>}}}, postaction = {decorate}] (2,1) -- (1,1);
\path[decoration = { markings, mark=at position 0.5 with {\arrow[scale=2]{>}}}, postaction = {decorate}] (2,0) -- (1,0);
\path[decoration = { markings, mark=at position 0.5 with {\arrow[scale=2]{>}}}, postaction = {decorate}] (1,-2) -- (3,-2);
\path[decoration = { markings, mark=at position 0.5 with {\arrow[scale=2]{>}}}, postaction = {decorate}] (0,-1) -- (1,-1);
\path[decoration = { markings, mark=at position 0.5 with {\arrow[scale=2]{>}}}, postaction = {decorate}] (3,-2) -- (3,0);

\end{tikzpicture}

\end{centre}

The longitude of the trefoil with respect to $p$ and this orientation is then $c a b$.

\end{example}

\begin{example} Consider the [[Hopf link]], in which both components have been equipped with a chosen point and an orientation as shown below. Labels have been chosen for the arcs.

\begin{centre}

\begin{tikzpicture}

\usetikzlibrary{decorations.markings}

\path (-1.5, -2.5) -- (-1.5, 1.5) -- (2.5, 1.5) -- (2.5, -2.5) -- (-1.5, -2.5);

\draw[semithick, shorten <= 0.5em, shorten >= 0.5em] (0,-1) -- (1,-1) -- (1,1) -- (-1,1) -- (-1,-1) -- (0,-1);
\draw[semithick, shorten <= 0.5em, shorten >= 0.5em] (1,0) -- (0,0) -- (0,-2) -- (2,-2) -- (2,0) -- (1,0);

\filldraw[black] (0,1) circle (2pt);
\filldraw[black] (2,-1) circle (2pt);

\node[anchor=east] at (-1,-0.5) {$a$};
\node[anchor=north] at (1,-2) {$b$};

\path[decoration = { markings, mark=at position 0.5 with {\arrow[scale=2]{>}}}, postaction = {decorate}] (-1,-1) -- (-1,1);
\path[decoration = { markings, mark=at position 0.65 with {\arrow[scale=2]{<}}}, postaction = {decorate}] (0,-1) -- (1,-1);
\path[decoration = { markings, mark=at position 0.5 with {\arrow[scale=2]{<}}}, postaction = {decorate}] (0,-2) -- (0,-1);
\path[decoration = { markings, mark=at position 0.55 with {\arrow[scale=2]{>}}}, postaction = {decorate}] (2,0) -- (1,0);

\end{tikzpicture}

\end{centre}

The longitude of the component to which the arc $a$ belongs is $b^{-1}$. The longitude of the component to which the arc $b$ belongs is $a^{-1}$.

\end{example}

\begin{rmk} The longitude of a component of an oriented link diagram is unique up to [[rotation permutation]]: the longitude obtained using any one choice of $p$ is a rotation permutation of the longitude obtained using any other choice of $p$.

When it comes to 3-manifolds, for example when describing the [[fundamental group]], everything is typically invariant under rotation permutation. Thus it is usual to speak of _the_ longitude of a component of an oriented link diagram. \end{rmk}

category: knot theory

[[!redirects longitude of a knot]]


loop

* in [[topology]]: **[[loop (topology)]]**

  a closed [[path]] in a [[topological space]];

* in [[algebra]]: **[[loop (algebra)]]**

  a [[quasigroup]] with [[identity element]]

category: disambiguation

[[!redirects loops]]


loop (algebra)

> This entry is about loops in [[algebra]]. For loops in [[topology]] see *[[loop (topology)]]*.

***

+-- {: .rightHandSide}
+-- {: .toc .clickDown tabindex="0"}
###Context###
#### Algebra
+--{: .hide}
[[!include higher algebra - contents]]
=--
=--
=--

#Contents#
* table of contents
{:toc}

## Idea

In [[algebra]] a *loop* is a [[quasigroup]] with (two-sided) [[identity element]].

## Definition

### With multiplication, divisions and identities

A __left loop__ is a [[unital magma]] $(G, (-)\cdot(-):G\times G\to G,1:G)$ equipped with a __left division__ $(-)\backslash(-):G \times G \to G$  such that $x \cdot (x \backslash y) = y$ and $x \backslash (x \cdot y) = y$. A __right loop__ is a [[unital magma]] $(G, (-)\cdot(-):G\times G\to G,1:G)$ equipped with a __right division__ $(-)/(-):G \times G \to G$ such that $(x / y) \cdot y = x$ and $(x \cdot y) / y = x$. A __two-sided loop__ or just a __loop__ is a unital magma that is both a left loop and a right loop.

### With multiplication, inverses, and identity

Equivalently, one could speak of left and right [[inverse elements]] instead of left and right division:

A __left loop__ is a [[unital magma]] $(G, (-)\cdot(-):G\times G\to G,1:G)$ equipped with a __left inverse__ $^{-1}(-):G \to G$ such that $x \cdot (^{-1}x \cdot y) = y$ and $^{-1}x \cdot (x \cdot y) = y$. A __right loop__ is a [[unital magma]] $(G, (-)\cdot(-):G\times G\to G,1:G)$ equipped with a __right inverse__ $(-)^{-1}:G \to G$ such that $(x \cdot y^{-1}) \cdot y = x$ and $(x \cdot y) \cdot y^{-1} = x$. A __two-sided loop__ or just a __loop__ is a unital magma that is both a left loop and a right loop. One then defines __left division__ to be $x \backslash y = {^{-1}}x \cdot y$ and __right division__ to be $x / y = x \cdot y^{-1}$.

### With divisions and identity

There is another definition of a loop using only division and identity:

A __left loop__ is a [[pointed]] [[magma]] $(G,\backslash,1)$ such that:

  * For all $a$ and $b$ in $G$, $a\backslash a=1$
  * For all $a$ in $G$, $(a\backslash 1)\backslash 1=a$

A __right loop__ is a [[pointed]] [[magma]] $(G,/)$ such that:

  * For all $a$ and $b$ in $G$, $a/a=1$
  * For all $a$ in $G$, $1/(1/a)=a$

A __loop__ is a left and right loop as defined above $(G,\backslash,/,1)$ such that $a/(1/b) = (a\backslash 1)\backslash b$ for all $a$ and $b$ in $G$.

## Properties

Loops are described by a Lawvere theory.

Note that, even in a loop, left and right inverses need not agree.  See [the discussion on the English Wikipedia](http://secure.wikimedia.org/wikipedia/en/wiki/Quasigroup#Inverse_properties) for convenient inverse properties. A loop with a two-sided inverse is a [[nonassociative group]].

## Examples

*  Any [[group]] is a loop.

* Any [[nonassociative group]] is a loop.

*  The nonzero elements of a (not necessarily associative) unital [[division algebra]] (such as the [[octonion]]s) form a quasigroup; this fact is basically the definition of 'division algebra'.
* [[code loop]]s are loops which are central extensions of abelian groups (actually vector spaces over the finite field $\mathbb{F}_2$) by $\mathbb{Z}_2$.

* A [[Moufang loop]] is a loop.

## Applications

Local analytic loops have interesting induced structure on the tangent space at the identity, generalizing the Lie algebra of a group, see [[Sabinin algebra]]. Sabinin algebras are closely related to the local study of affine connections on manifolds. They include some known important classes of nonassociative algebras, namely Lie algebras, Mal'cev algebras, Lie triple systems (related to the study of [[symmetric space]]s), Bol algebras as simplest cases.

## Related concepts

* [[Moufang loop]]

* [[possibly empty loop]]

* [[nonassociative group]]

[[!include oidification - table]]

## Literature

* [[Kenneth Kunen]], _Quasigroups, loops, and associative laws_, J. Algebra __185__ (1) (1996), pp. 194–204

* Péter T. Nagy, Karl Strambach, _Loops as invariant sections in groups, and their geometry_, Canad. J. Math. __46__(1994), 1027-1056 [doi](http://dx.doi.org/10.4153/CJM-1994-059-8)

* Lev Vasilʹevich Sabinin, _Smooth quasigroups and loops: forty-five years of incredible growth_, Commentationes Mathematicae Universitatis Carolinae __41__ (2000), No. 2, 377--400 [cdml](http://dml.cz/dmlcz/119171) [pdf](http://dml.cz/dmlcz/119171)

See also:

* Wikipedia, *[Loops](https://en.wikipedia.org/wiki/Quasigroup#Loops)*