Graphical interface (IDE) for Coq. It is written in OCaml.
Questions tagged [coqide]
103 questions
1
vote
2 answers
Importing a Module in Coq
I have the following folder structure:
- BaseDefs.v
- UsingBaseDefs.v
Here, BaseDefs.v contains definitions that I want to use in UsingBaseDefs.v. I tried to use the coqc BaseDefs.v command from the terminal and then I tried to import the module…

Tilman Zuckmantel
- 643
- 1
- 6
- 18
1
vote
3 answers
How to avoid "Cannot guess decreasing argument of fix." in Coq
(* Define a function sum_digits such that its input is an int, the base of which is b and its
output is the sum of all its digits *)
Definition sum_digits (digits : nat) (base : nat) : nat :=
let fix aux (sum : nat) (x_value : nat) : nat :=
…

Arnie2C_A
- 15
- 3
1
vote
1 answer
how to create a polymorphe couple such as "( a : type A, b : type B ) " in lambda-calculus
I am working on a project in Lambda-calculus and i am trying to code polymorphe couple with coqide
but a have a problem coding the constructor that respect the type pprod
Definition pprod : Set -> Set -> Set := fun A B => forall T : Set , (A -> B…

t1kumi
- 23
- 3
1
vote
1 answer
Error: Cannot interpret this number as a value of type nat
My current goal is:
x - 1 + 1 = x
I tried to use rewrite -> (Nat.add_comm (-1) 1). to change the current goal to x + 1 - 1, but it gave me the error Error: Cannot interpret this number as a value of type nat. How can I solve this question?

Serene M
- 17
- 1
1
vote
1 answer
Error message: Not the right number of missing arguments (expected 1)
I faced error message when running the following code.
Require Import Coq.Lists.List.
Import ListNotations.
Theorem con_not_com :
exists A (l1 l2 : list A), l1 ++ l2 <> l2 ++ l1.
Proof.
exists bool [true] [false].
I'm wondering how I can…

Serene M
- 17
- 1
1
vote
1 answer
Rbar / Rbar_le / coquelicot lemma
I am learning Coq via the Coq 8.12.0 reference manual, and have trouble proving the following lemma.
From Coq Require Import Lia Reals Lra List.
Lemma lemma1 : forall (x y:Rbar), Rbar_le x 0 -> Rbar_le y 0
-> Rbar_le (Rbar_plus x y)…

Kathy
- 25
- 5
1
vote
4 answers
Cannot find a physical path bound to logical path matching suffix <> and prefix Coquelicot
I've recently installed Coq version 8.12.2 with opam. I have installed all the packages of Coq using the following command :
opam repo add coq-released https://coq.inria.fr/opam/released
But when I try to compile packages in Coqide, it doesn't…

Kathy
- 25
- 5
1
vote
0 answers
How to solve coq list assignments on length alternate append theorem and sub list length theorem
I am trying to solve coq list assignments on length alternate append theorem and sub list length theorem. I want to prove these Lemmas through coq proof assist,.
How can I achieve this?
Fixpoint length (l:natlist) : nat :=
match l with
| nil => O
|…

shafiq ahmad
- 11
- 2
1
vote
1 answer
Can we define recursive definitions in Coq?
I know Coq allows to define mutually recursive inductive types. But is there a way to write the recursive definitions in Coq?
For example, I want to write a definition as:
Definition myDefinition A := forall B C, (myDefinition B) \/ (A =…

Baber
- 301
- 2
- 6
- 17
1
vote
1 answer
How to prove a*b*c=a*(b*c) in Coq?
Im trying to prove the above question. I have been given a definition of an induction:
Definition nat_ind
(p : nat -> Prop)
(basis : p 0)
(step : forall n, p n -> p (S n)) :
forall n, p n := fix f n :=
match n return p n with
…

Karlo Kampić
- 11
- 4
1
vote
0 answers
Adressing CoqIDE 8.11's "illegal begin of vernac" error with Functional Scheme
I am somehow new to Coq, using CoqIDE 8.11, and can't see what I've done wrong here. I've checked the documentation but did not manage to find a solution to my problem.
With
Functional Scheme insert_ind := Induction for insert Sort Prop.
Check…

Narmondil
- 27
- 6
1
vote
2 answers
Discriminate goal in Coq
I have two conditions for nat numbers:
H: a < b
H1: b < a
How to discriminate goal?
Does exist any tactics for < ?

he11boy
- 71
- 3
1
vote
1 answer
How to Manually Set up a Library in GitHub for Use in CoqIDE?
I need to use a library in GitHub different from Coq's standard library. But I do not know how to manually set it up so that I can use it in CoqIDE.
I need to use this library in CoqIDE. I have downloaded and saved the folder to my computer, but…

LyX2394
- 121
- 1
- 5
1
vote
1 answer
How to launch `coqide` on Ubuntu?
I have installed coq and CoqIDE via opam, following the instructions here.
As noted in the instruction, each time I have to
export OPAMROOT=~/opam-coq.8.9.0
eval `opam config env`
before launching CoqIDE via coqide.
Otherwise, it…

hengxin
- 1,867
- 2
- 21
- 42
1
vote
1 answer
How to check equality between two integers in Coq?
I'm trying to check the equality between two integers in Coq, but I get this error: "The term "first = second" has type "Prop" which is not a (co-)inductive type.". Is there any library in Coq that provides equality checking? Here is my code:…

Spielzeug
- 37
- 4