Questions tagged [calculus-of-constructions]
14 questions
12
votes
2 answers
Universal/existential quantification?
I'm struggling to understand the purpose of universal and existential quantification of types. I'm playing around with writing a toy language based on the calculus of constructions. I've been reading about Morte and Henk to help me get a better…
oconnor0
- 403
- 2
- 8
6
votes
1 answer
What is the difference between ∀ and Π in the Calculus of Constructions?
As I've learned, the Calculus of Constructions has only two binders - $\lambda$ and $\Pi$. Morte, for example, has $\forall$ as a mere alias of $\Pi$. Yet, on the paper Self Types for Dependently Typed Lambda Encodings, there are types such…
MaiaVictor
- 4,199
- 2
- 18
- 34
6
votes
1 answer
Where are C++ templates inside of the lambda cube?
C++ templates have type variables and can express lambdas, so they must have System F embedded. But is that exactly where they are located in the lambda cube? Can C++ templates produce new types or express dependent types?
(I originally posted this…
ArtIntoNihonjin.
- 71
- 2
- 11
5
votes
1 answer
What types are propositions?
In the propositions-as-types paradigm, we are still faced with the question : what types are propositions ? I currently know 3 different answers :
Coq's sort Prop and its typing rule that asserts it is closed under products indexed by abtirary…
V. Semeria
- 153
- 5
5
votes
1 answer
What untyped term inhabits induction on natural numbers in CoC?
Induction on Church-encoded natural numbers (which I will call indNat) can not be defined within the Calculus of Constructions.
If we assumed indNat as an axiom, is there an untyped term that would have the semantics of the induction function? What…
Labbekak
- 575
- 3
- 11
5
votes
1 answer
Why 'let' can not be reduce to a lambda application in (extended) Calculus of Constructions
I do not understand the difference highlighted in the chapter 2.5 of the book Theorem Proving in Lean:
Notice that the meaning of the expression let a := t1 in t2 is very similar to the meaning of (λ a, t2) t1, but the two are not the same. In the…
user3368561
- 485
- 3
- 9
3
votes
0 answers
Calculus of constructions, type-in-type and recursion
Does adding type-in-type to the calculus of constructions lead to (general) recursion? Such that one can write the Y combinator.
Labbekak
- 575
- 3
- 11
2
votes
1 answer
Understanding the definition of Positivity Constraints in Coq
In Interactive Theorem Proving and Program Development the authors explain constraints on constructors of inductive types in Coq.
For inductive type $T$, a constructor must have the form $t_1 \rightarrow t_2 \rightarrow ... \rightarrow t_l…
Mark
- 215
- 1
- 6
2
votes
1 answer
Type Theory and Principia Mathematica Part IV "Relation Arithmetic"
As
type theory is a principle focus of modern computer science,
its origins are in Bertrand Russel's theory of types,
Principia Mathematica is both the origin of and is expressed in the theory of types, and
relational databases are among the…
James Bowery
- 396
- 2
- 10
2
votes
0 answers
What is a simple explanation of how the calculus of inductive constructions is an extension of simply typed lambda calculus?
I’m doing some basic studying of lambda calculus and Coq and I’d like some supporting explanation about the relationship between lambda calculus and the calculus of inductive constructions.
This lambda cube shows how lambda calculus can be extended…
Julius Hamilton
- 172
- 7
2
votes
0 answers
What can we have in exchange if we drop subtyping from definition of Calculus of Inductive Constructions?
If we remove subtyping (https://coq.inria.fr/distrib/current/refman/language/cic.html#subtyping-rules) from CIC we will lose some expressive power. But is that power necessary for a programming language?
If we demand programmer to write e.g. Type(1)…
Maciej Poleski
- 21
- 1
2
votes
1 answer
Deriving recursive definition from function specification
Given this function specification, where name xs is bound to a list, # denotes its cardinality and . is the list index operator...
$$\left( \sum i: 0 \leq i < \#xs: xs.i * (i + 1) \right)$$
I need to derive a recursive function using induction.
Base…
F. Zer
- 139
- 4
1
vote
0 answers
Lambda calculus and runtime inspection of the term
This is possibly related to reflection and quoting but I don't want to assume anything beforehand. Here is my requirement.
My typed lambda calculus (Curry style) is a simpler variant of Calculus of Constructions (CoC). Is it possible to write an…
Ram
- 31
- 3
0
votes
0 answers
Where can I find a list of logics with their corresponding calculus and computation phenomena?
I was watching some lectures by Prof. Pfenning on Proof Theory. Between 5:30 and 15:00, he gave a list for some different kinds of judgments along with their calculus and computation phenomena that they can represent or model. I am looking for a…
geeko
- 109
- 1