# Tag Info

## Hot answers tagged coq

### What should a proof of correctness for a typechecker actually be proving?

That's a good question! It asks what we expect from types in a typed language. First note that we can type any programing language with the unitype: just pick a letter, say ...
• 26.6k
Accepted

• 31.6k
Accepted

### What exactly is "large elimination"?

You are incorrect about the definition of large elimination: it refers to the ability to build values of type $\mathrm{Type}$ by eliminating an inductive value. The canonical example: ...
• 13.2k

### Formal semantics of OCaml in Coq

You could be interested in Jacques Garrigue's A Certified Implementation of ML with Structural Polymorphism and Recursive Types, which establishes the soundness of static and dynamic semantics and ...
• 1,882
Accepted

### Law of excluded middle in MLTT

Law of excluded middle does not make intuitionistic logic inconsistent; intuitionistic logic is in many regards a subset of classical logic (of course classical logic can't have proof objects and ...
• 1,131
Accepted

### What's wrong with this LEAN proof?

Your example is not true, that's why you cannot prove it. If we assume your example is true (which we do using the sorry tactic), then we can prove ...
Accepted

### Impredicativity + large eliminations (with no excluded middle) in Coq

No: strong elimination of large inductive types (SELIT) is itself inconsistent because it breaks the layering of universes by trivially allowing you to smuggle a large value in a Prop box and take it ...
• 382
Accepted

### How does axiom K contradict univalence?

You will certainly find it natural that most types, like structures, admit different isomorphisms. Just take the type $\textbf{2}$, with inhabitants $0_\textbf{2}$ and $1_\textbf{2}$. It admits 2 ...
• 176
Accepted

### f_equal isn't doing anything

The f_equal tactic does not do anything because what you are trying to prove is not true. You assumed that the first components (...
• 26.6k

### Has the compactness theorem for FOL been formalized in Coq/Isabelle/etc?

Compactness for FOL was done in HOL by John Harrison, and reported at TPHOLs 1998. See Formalizing basic first order model theory.
Accepted

### How to prove that a circular prop is uninhabited?

You should use False instead of 1>2 in the conclusion of the theorem. Using indirect ways of denoting an impossible ...
Accepted

### Representations of Planar Graphs in Coq

The obvious resource for planar graphs in Coq would be the (modern port of) the four color theorem in Coq/SSReflect, by Georges Gonthier (and others) which obviously does need to define planar graphs. ...
• 13.2k
Accepted

### Universe polymorphism: the inference of universes and their constraints

It's complicated because universe constraints are simplified during inference (in order to avoid an explosion of constraints). Have a look at: Matthieu Sozeau and Nicolas Tabareau: Universe ...
• 26.6k
Accepted

### Equality of decidable proofs?

As Neel points out if you work under the "propositions are types" then you can easily come up with a type whose equality cannot be shown decidable (but it is of course consistent to assume that all ...
• 26.6k

### What should a proof of correctness for a typechecker actually be proving?

There are a few different things you could mean by "prove that my typechecker works". Which, I suppose, is part of what your question is asking ;) One half of this question is proving that your type ...
• 720
Accepted

### Defining finite sets inductively in a proof assistant?

There are many variants of finite sets in constructive mathematics. One that can be defined using just inductive definitions, and is therefore amenable to formalization in type theory, is the ...
• 26.6k

### How can you build a coinductive memoization table for recursive functions over binary trees?

It's easy enough to get the recursion pattern to work with sized types. Hopefully the sharing is preserved through compilation![1] ...
• 141

### Representations of Planar Graphs in Coq

I just wanted to make some additional comments not already covered by Cody's nice answer, and also address question (2). First, Gonthier goes into detail about the representation of planar maps used ...
• 4,319

### How to prove that a circular prop is uninhabited?

I think you need induction here to help you show that there is no term like C2 (C1 (C2 (C1 .... I also think you need to strengthen your induction hypothesis, ...
• 11k

### How would I go about learning the underlying theory of the Coq proof assistant?

The current Software Foundations book does explain all this later on: https://softwarefoundations.cis.upenn.edu/lf-current/ProofObjects.html So if you're following the book, just read on :)