414 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
1
vote
1
answer
59
views
How to understand `(elimTF andP top)`?
Section 5.1.3 "Using views in intro patterns" of the book "Mathematical Components" explain how the view intro-pattern works as follows.
First, we have a lemma andP which relates (...
0
votes
2
answers
124
views
Prove that an element of fin 1 is exactly 0
I have an inductive type
Inductive fin : nat -> Set :=
| First : forall n, fin (S n)
| Next : forall n, fin n -> fin (S n).
Coq cannot deduce that if something is of type fin 1 then it must be ...
1
vote
3
answers
87
views
In Coq (or Rocq), can't a lemma with a universal conclusion be applied to other premises?
When I prove with Coq (or Rocq), I find that sometimes if a hypothesis is "P" and another is "P -> forall x, Q x", I cannot make "forall x, Q x" a new premise by modus ...
0
votes
0
answers
40
views
How do I proceed with the else branch of my Priority Queue insertion proof in Coq?
I am working on proving the correctness of a Priority Queue implementation in Coq.
I am getting stuck in the else branch of my insert theoreom. (I had to change my OG inductive hypothesis to better ...
1
vote
1
answer
67
views
How can I rewrite or use my IH when Coq won't unify my goal with it?
Im trying to prove a correctness theorem for insert into a list-based priority queue. Here's the insert function, the inductive property, and the proof I'm working with:
Fixpoint insert (x : nat) (l : ...
0
votes
0
answers
75
views
why can't i weaken my goal in coq? (beginner)
I'm quite new to Coq, I have done several projects in OCaml before and I'm doing this as a preparation for a course I'm taking next semester.
A friend recommended the exercise of proofing the ...
0
votes
1
answer
113
views
Theorem for lambda calculus
I have to solve this exercise:
Formulate and prove a confluence theorem for lambda calculus (ie, prove that if a λ-expression e reduces to both e1 and e2, then there exists e' such that e1 and e2 ...
0
votes
1
answer
98
views
how to prove 2 step induction of list in coq using fix tactic
I want to prove 2 step induction for list by using fix tactic
In the following attempt to prove it I made goal structurally smaller(by applying pxy to the goal) before calling self, so I expect that ...
0
votes
2
answers
104
views
How to prove theorems about mutual inductive types by using tactics in Coq?
Consider following mutual inductive proposition
Inductive TypeA : Prop :=
| ConstructorA : TypeB -> TypeA
with TypeB : Prop :=
| ConstructorB : TypeA -> TypeB.
Here is proof of ~TypeA in ...
1
vote
2
answers
71
views
How can I prove the injectivity of plus?
Here's what I'm trying to prove: Theorem add_n_injective : forall n m p, n + m = n + p -> m = p.
I've tried Coq's built-in tactices, but they don't work. Is there an easy way to prove this?
Here's ...
0
votes
1
answer
66
views
Why does Coq solve_in_Union tactic fail directly but works through assertion of identical goal?
I have a puzzling situation in Coq where I'm working with relations and ensembles. I have defined coercions between them and a tactic to solve membership goals:
Require Import Lia Reals Lra ...
0
votes
1
answer
106
views
Proving non-linear equations and inequalities involving rational numbers in Coq
I'm trying to formalize a stable-coin protocol using the Coq Interactive Theorem Prover. The proofs I have involve a lot of manipulation of linear and non-linear equations involving rational numbers. ...
1
vote
1
answer
73
views
Ltac for deterministic rewriting/sorting of operands
I would like to create Coq tactics for solving a wide range of equality subgoals that may be solved by using a mix of rewrite rules such as associativity and commutativity of operators.
Although this ...
0
votes
2
answers
151
views
Stuck at a simple inequality of natural number proof in Coq
I want to prove the inversion of inequality on negation, in natural numbers:
forall i j : nat, i <= j -> forall w : nat, i <= w -> j <= w -> w - i >= w - j.
I attempt to prove ...
2
votes
0
answers
144
views
How to prove `A =~ Star re -> B =~ Star re -> A ++ B =~ Star re.` in Coq
I need to prove
A =~ Star re ->
B =~ Star re ->
A ++ B =~ Star re.
in order to prove Pumping Lemma. These are the available match rules:
Inductive exp_match {T} : list T -> reg_exp T -&...