<p><strong>Summary.</strong> A logical framework is a meta-language for the formalisation of deductive systems, where deductions become syntactic objects.</p>

<p>Of course what counts as a meta-language is quite vague, and it is helpful to understand the historical development of logical frameworks.
The first logical framework was de Bruijn's Automath (1), which is based on $\lambda$-calculus. Many of the ideas from the Automath language family have found their way into modern logical frameworks. Martin-L&ouml;f's work on constructive type-theories, also based on $\lambda$-calculi, has also been influential.</p>

<p>Edinburgh's LF (2) is a very influential logical framework.
Edinburgh LF is what you get when you enrich the simply typed $\lambda$-calculus with type-dependency. That's all. In order to make type-dependency precise, one needs to replace the function space operator $A \rightarrow B$ on types with type-abstraction, usually written $\Pi x^A. B$, and introduce the kind of types, as well as kind abstraction.
In terms of rules, the key is in the elimiation rule for $A \rightarrow B$, resp. $\Pi x^A. B$:</p>

<p>$$
\newcommand{\TYPES}[3]{#1 \vdash #2 : #3}
\newcommand{\SUBST}[2]{\{#1/#2\}}
\frac{
   \TYPES{\Gamma}{\color{red}{M}}{A \rightarrow B} 
      \qquad
   \TYPES{\Gamma}{\color{red}{N}}{A}  }{
 \TYPES{\Gamma}{\color{red}{MN}}{B}   }
      \qquad
\frac{
   \TYPES{\Gamma}{{\color{red}M}}{\Pi x^A. B} 
      \qquad
   \TYPES{\Gamma}{\color{red}{N}}{A}  }{
 \TYPES{\Gamma}{{\color{red}{MN}}}{B\SUBST{{\color{red}N}}{x}}   }
$$</p>

<p>On the left we have the rule for the simply typed $\lambda$-calculus, on the right the
rule that generalises the left with type dependency. We see that a value 'flows' into the
type in the conclusion on the right.</p>

<p>I think the interactive proof assistant Isabelle uses intuitionistic second order logic based on $\lambda$-calculus, without any numbers or recursive data types as logical framework. Various others have been proposed.</p>

<p>One advantage of using $\lambda$-calculi as logical framework  is that binding constructs like universal quantifiers can be implemented using the framework's $\lambda$-binder. Note that most logical frameworks are expressively weak: the frameworks  support object-level reasoning, but are insufficient to perform much meta-theoretic reasoning beyond the fact that a particular object-level statement is a theorem. In fact the metal-logic is usually so weak that even proving the deduction theorem for a Hilbert-style object logic is impossible. Of course nothing prevents you from using more powerful type-theories as a logical framework.</p>

<p>For these practical and historical reasons, most logical frameworks in use today are typed $\lambda$-calculi, i.e. type-theories. See (3, 4) for more in-depth discussions of logical frameworks.</p>

<ol>
<li><p>N. de Bruijn: The Mathematical Language AUTOMATH, Its Usage, and Some of Its Extensions.</p></li>
<li><p>R. F. Harper, F. Honsell, G. Plotkin: <a href="http://homepages.inf.ed.ac.uk/gdp/publications/Framework_Def_Log.pdf">A Framework for Defining Logics</a>.</p></li>
<li><p>F. Pfenning: Logical frameworks.</p></li>
<li><p>F. Pfenning: <a href="https://www.cs.cmu.edu/~fp/papers/mdorf01.pdf">Logical frameworks -- A Brief Introduction</a>.</p></li>
</ol>

CC BY-SA 3.0
2015-02-19T10:19:33.360Z
Do you know about any introductory books about proof assistants (logical frameworks) suitable for someone who already know basics of simply typed lambda calculus and first order logic?
Trismegistos
CC BY-SA 3.0
2015-02-19T10:27:12.103Z
@Trismegistos I'm afraid I don't. I suggest to learn a specific assistant. Agda is the easiest to get into  as it's basically Haskell, but with dependent types. In my experience, the logical framework is not as important as other dimensions of proof assistants. For example Isabelle is a generic prover that you can instantiate with different logics, so really exposes the logical framework. But Isabelle/HOL is the only instantiation used in practise. This is because all proof tactics, all prover support has been written for the HOL object logic. And usability of a prover depends on those.
Martin Berger
CC BY-SA 3.0
2015-02-18T20:42:36.623Z
2015-02-18T22:03:15.937Z
2015-02-18T22:03:15.937Z
Martin Berger
<p>What is the difference between logical framework and type theory? Both of them have types, terms, and are based on dependently typed lambda calculus. </p>

<p>We have Edinburg LF which is based on lambda-pi calculus, however, it seems to me that there's some subtle difference there.</p>

<lo.logic><type-theory>
Logical framework vs type theory
Konstantin Solomatov
# Logical framework vs type theory

(Asked by: username_0 on 2015-02-18)

What is the difference between logical framework and type theory? Both of them have types, terms, and are based on dependently typed lambda calculus.

We have Edinburg LF which is based on lambda-pi calculus, however, it seems to me that there's some subtle difference there.

**Tags:** lo.logic, type-theory


---

## 1 answers

### Answer by username_1 on 2015-02-18. Score: 12 | Accepted answer

**Summary.** A logical framework is a meta-language for the formalisation of deductive systems, where deductions become syntactic objects.

Of course what counts as a meta-language is quite vague, and it is helpful to understand the historical development of logical frameworks.
The first logical framework was de Bruijn's Automath (1), which is based on $\lambda$-calculus. Many of the ideas from the Automath language family have found their way into modern logical frameworks. Martin-Löf's work on constructive type-theories, also based on $\lambda$-calculi, has also been influential.

Edinburgh's LF (2) is a very influential logical framework.
Edinburgh LF is what you get when you enrich the simply typed $\lambda$-calculus with type-dependency. That's all. In order to make type-dependency precise, one needs to replace the function space operator $A \rightarrow B$ on types with type-abstraction, usually written $\Pi x^A. B$, and introduce the kind of types, as well as kind abstraction.
In terms of rules, the key is in the elimiation rule for $A \rightarrow B$, resp. $\Pi x^A. B$:

$$
\newcommand{\TYPES}[3]{#1 \vdash #2 : #3}
\newcommand{\SUBST}[2]{\{#1/#2\}}
\frac{
\TYPES{\Gamma}{\color{red}{M}}{A \rightarrow B}
\qquad
\TYPES{\Gamma}{\color{red}{N}}{A} }{
\TYPES{\Gamma}{\color{red}{MN}}{B} }
\qquad
\frac{
\TYPES{\Gamma}{{\color{red}M}}{\Pi x^A. B}
\qquad
\TYPES{\Gamma}{\color{red}{N}}{A} }{
\TYPES{\Gamma}{{\color{red}{MN}}}{B\SUBST{{\color{red}N}}{x}} }
$$

On the left we have the rule for the simply typed $\lambda$-calculus, on the right the
rule that generalises the left with type dependency. We see that a value 'flows' into the
type in the conclusion on the right.

I think the interactive proof assistant Isabelle uses intuitionistic second order logic based on $\lambda$-calculus, without any numbers or recursive data types as logical framework. Various others have been proposed.

One advantage of using $\lambda$-calculi as logical framework is that binding constructs like universal quantifiers can be implemented using the framework's $\lambda$-binder. Note that most logical frameworks are expressively weak: the frameworks support object-level reasoning, but are insufficient to perform much meta-theoretic reasoning beyond the fact that a particular object-level statement is a theorem. In fact the metal-logic is usually so weak that even proving the deduction theorem for a Hilbert-style object logic is impossible. Of course nothing prevents you from using more powerful type-theories as a logical framework.

For these practical and historical reasons, most logical frameworks in use today are typed $\lambda$-calculi, i.e. type-theories. See (3, 4) for more in-depth discussions of logical frameworks.

1. N. de Bruijn: The Mathematical Language AUTOMATH, Its Usage, and Some of Its Extensions.
2. R. F. Harper, F. Honsell, G. Plotkin: [A Framework for Defining Logics](http://homepages.inf.ed.ac.uk/gdp/publications/Framework_Def_Log.pdf).
3. F. Pfenning: Logical frameworks.
4. F. Pfenning: [Logical frameworks -- A Brief Introduction](https://www.cs.cmu.edu/~fp/papers/mdorf01.pdf).

> **Comments:**
> **username_2**: Do you know about any introductory books about proof assistants (logical frameworks) suitable for someone who already know basics of simply typed lambda calculus and first order logic?  
> **username_1**: @username_2 I'm afraid I don't. I suggest to learn a specific assistant. Agda is the easiest to get into  as it's basically Haskell, but with dependent types. In my experience, the logical framework is not as important as other dimensions of proof assistants. For example Isabelle is a generic prover that you can instantiate with different logics, so really exposes the logical framework. But Isabelle/HOL is the only instantiation used in practise. This is because all proof tactics, all prover support has been written for the HOL object logic. And usability of a prover depends on those.  

---

