# Tag Info

Accepted

### How do you get the Calculus of Constructions from the other points in the Lambda Cube?

First, to reiterate one of cody's points, the Calculus of Inductive Constructions (which Coq's kernel is based on) is very different from the Calculus of Constructions. It is best thought of as ...

### How do you get the Calculus of Constructions from the other points in the Lambda Cube?

I've often wanted to try and summarize each dimension of the $\lambda$-cube and what they represent, so I'll give this one a shot. But first, one should probably try to dis-entangle various issues. ...
Accepted

### Eta expansion in the pattern lambda calculus

This is not a complete answer; it is a comment that got too large. If you extend typed lambda calculus with products with projective eliminators (ie, product eliminators ...
Accepted

### Is simply typed lambda calculus equivalent to primitive recursive functions

The simply-typed λ-calculus with β-equality at type (o → o) → o → o (which can be seen as type of the natural numbers, whenever o is any base type) can define exactly the extended polynomials (= ...

### Calculus of Constructions: compress expression to its smallest form

As Andrej has said, the problem is undecidable if you allow replacing one term by another, extensionally equal one. However, you might be interested in optimal sharing of expressions, in the following ...
Accepted

### Structural equality of Pi Types with heterogeneous equality?

I am not aware that J or K exists for heterogeneous equality. It does not need an elimination principle, because it can be simply defined as a sigma type: ...
Accepted

### Understanding the Proof of Strong Normalization of the Calculus of Constructions

Unfortunately, I'm not sure there are more beginner friendly resources than Geuvers' account. You might try this note from Chris Casinghino which gives an account of several proofs in excruciating ...
Accepted

### Typing of substitution in a bidirectional type system

The key observation is that whether the substitution theorem holds, depends on the definition of substitution. For the usual definition of substitution of terms for variables, the substitution ...

### Typing of substitution in a bidirectional type system

One solution is indeed to restrict to substituting with synthesizing expressions. You can only hope to replace variables with terms of the same mode (i.e. inferrable terms), anything else just won't ...
Accepted

### Complexity of type inference in the simply typed lambda calculus

Type inference for simply typed lambda calculus is complete for polynomial time, as elegantly explained in section 1 of Harry Mairson's Linear lambda calculus and PTIME-completeness. To be a bit more ...
Accepted

### Termination checking for Scott-encodings in System F with positive-recursive types

I'll first point you to Types for the Scott Numerals by Plotkin, Cardelli and Abadi, where they show how to encode Scott numerals in plain old system F. This at least shows that you can write the "...

### Calculus of Constructions: compress expression to its smallest form

Let me insist on the viewpoint touched upon by cody's answer. As far a see it, the question of finding a smallest $\lambda$-term equivalent to another $\lambda$-term is not really interesting, even ...
Accepted

### Enumerating all simply typed lambda terms of a given type

This question has been considered several times in the academic community, from the practical: Yakushev & Jeuring, Enumerating Well-Typed Terms Generically Fetsher & al, Making Random ...

### What is a canonical term of $\text{Id}_A(x,y)$ if $x$ is not jugdmentally identical to $y$?

Yes, in general $\mathrm{Id}_{A}(x, y)$ will not have a canonical form. Consider the case when $x$ and $y$ are distinct free variables -- obviously you can postulate that $x$ and $y$ are equal, but ...

### Type checking, Hypothetical judgments, meaning explanations and computational type theory

Part of the problem is we cannot say that we have a checker for categorical judgments, because these often reduce to hypothetical judgments. For instance, the categorical judgment $M\in A\to B$ ...

### Is there an efficient beta-equivalence algorithm?

I'd like to point out that if: the terms $M$ and $N$ are strongly normalizing (as the question allows), and one considers the complexity as depending also on the number $k_M$ and $k_N$ of beta-steps ...

### Model of MLTT with $\eta$ rule where function extensionality fails

The simplest one that I know about is the $\text{Set}$-based polynomial model ("container" model). Here, every context is interpreted as a family of sets, i.e. a $Q : \text{Set}$ together ...

### Complexity of convertibility in simply typed λ-calculus with sums

(Gabriel Scherer reporting.) I'm not a complexity person, so my answer will be partial. Here is what I can tell in short amount of thinking: You mention that the arrow(,product) case is TOWER-...
Accepted

### Lambda-calculus: Beta-equivalent terms have the same type

The answer depends on what you mean by "simply-typed $\lambda$-calculus". There are two possibilities: Church-style: in this formulation, terms explicitly carry their type and reduction/...

### Can typed lambda calculi express *all* algorithms below a given complexity?

Two complements to Damiano's answer: in the simply typed λ-calculus, the expressible functions depend very much on the input and output representations, and for instance there is a way to make all ...

### Program inversion algorithms for higher-order programs

There hasn't been a huge amount of work in this space, but what work there is, is pretty interesting. Torben Mogensen has worked on this problem. Here are two papers of his. The first paper gives ...

### Moggi's computational metalanguage

It is an interesting problem to figure out what bothers the OP. First of all, it is not at all the case that the equation put forward by the OP says "different computations have the same value". For ...
Accepted

### Decidability of rank-k polymorphism vs. System F

The conclusion of [Kfoury & Tiuryn 1992] says (emphasis mine): We prove that [...] for every $k\ge 3$ there is a typing of constants that assigns types in $S(1)$ such that the type ...
### What arithmetical theorems can plain $\lambda \Pi$ reason about?
As Andrej notes, $\lambda\Pi$ is a conservative extension of first-order logic which means: Adding the axioms of PA to $\lambda\Pi$ gives exactly the same arithmetic theorems as PA. However, ...