Questions tagged [coqide]

Graphical interface (IDE) for Coq. It is written in OCaml.

103 questions
0
votes
5 answers

How do I prove false from a false hypothesis?

I have a hypothesis that is clearly wrong and I would like to use that to prove False. In this case I have Hx: 0 * 0 = 2 and I have False in my goal. How would I start to do it? Image from CoqIDE:
LeBaguette
  • 11
  • 1
0
votes
2 answers

Why Coq doesn't allow a theorem with admits to end with QED in Linux and Windows?

I am using Coq 8.10.0. Following proof script seems to work in Mac (ignoring warning): Lemma plus_comm : forall (n m : nat), n + m = m + n. Proof. intros. - admit. Qed. But the same proof script isn't accepted in Linux (Ubuntu) and Windows. It…
Baber
  • 301
  • 2
  • 6
  • 17
0
votes
1 answer

Simulation of global and local variables in Coq

I'm trying to simulate global and local variables in Coq, but I don't even know how to start. Is there anybody that can give me a hint or some pieces of advice? I read a lot of documentation about this programming language, but I can't figure it…
0
votes
1 answer

Coq - How to prove eqb_neq?

I'm trying to prove eqb_neq: Theorem eqb_neq : forall x y : nat, x =? y = false <-> x <> y. This is my current proof status: During the proof I reached a final step where I just need to prove the additional helper theorem: Theorem…
jonb
  • 845
  • 1
  • 13
  • 36
0
votes
1 answer

Allow potentially infinite loops in Coq

I'm asking your help because I would like to know if it would be possible to allow the definition of potentially infinite fixpoints in Coq, just to check if the current definition eventually produces an output. I've tried the new Unset Guard…
Lucien David
  • 310
  • 2
  • 9
0
votes
1 answer

How to prove n + S m = S (n + m) in Coq

So, I am trying to learn Coq using the "Introduction to Computational Logic" script and I have been given an excercise. It is to prove the following: "forall a b, a + S b = S (a + b)". I am given a definition of "nat_ind": (p : nat -> Prop) …
0
votes
1 answer

coqc: -Q.PLF: no such file or directory

I am trying to compile a file hw5.v in coq which is in the plf folder of software foundations. I want to resolve the bindings and hence I use the command : coqc -Q.PLF hw5.v But it does not compile and gives the error as coqc: -Q.PLF: no such file…
Curious Person
  • 111
  • 1
  • 1
  • 7
0
votes
2 answers

How do destruct list in Coq (nil or not nil)

I want to destruct my object of type list on two cases like: H: lst = nil. H: lst <> nil
he11boy
  • 71
  • 3
0
votes
1 answer

Browse definition in Coq-IDE

In the Isabelle proof assistant, one can click Ctrl+click on a term and the IDE redirects him to the relevant definition. Can this be done with CoqIde? With Proof-General?
user1868607
  • 2,558
  • 1
  • 17
  • 38
0
votes
1 answer

coqIDE is not properly connecting files in project and is not compiling

I'm new to using coq/coqIDE and I'm not computer savvy either so I don't know whats wrong or what to call the issue. I was trying to go through the Software Foundations book, but coqIDE isn't working right. I'm using the latest windows 10, and…
Sigma
  • 1
  • 2
0
votes
3 answers

get field from Record Types in Coq

I am new to Coq. I have a record type and one definition: Record t : Type := T { width : nat; }. Definition indent shift f := match f with | T w => T (w + shift) end. I want to proof a trivial lemma: Lemma lemma : forall…
he11boy
  • 71
  • 3
0
votes
1 answer

How to import theorems from Coq.Numbers.NatInt.NZDiv?

In this doc link there are useful theorems about division. I tried importing it using Require Import in CoqIDE 8.9.0, however while the import succeeds, the following code fails with The reference div_lt_upper_bound was not found in the current…
Joald
  • 1,114
  • 10
  • 32
0
votes
3 answers

How to prove something by using a definition?

If I define multiplication like this (drugi_c), how do I prove e.g. X*0=0? (How to prove something by the definition?) Fixpoint drugi_c(x y: nat): nat:= match x, y with | _, O => O | O, _ => O | S O, _ => y | _,S O => x | S x', S y' =>…
0
votes
2 answers

Explanation transitivity of equal coq

I have a proof which is already proved. Lemma Equal_Trans : forall T : Type, forall y x z: T, Equal x y -> Equal y z -> Equal x z. And secondly, I have the correction of the addition commutativity proof. Lemma Add_com : forall x x': Nat,…
StFcm
  • 1
0
votes
0 answers

Basics.vo contains library Basics and not library Metalib.Basics

I am getting the error "Basics.vo contains library Basics and not library Metalib.Basics" in CoqIDE 4.5. I am following Software Foundations and importing Basics as 'Require Export Basics.'. Also I compiled the Basics using the same CoqIDE. In the…
Baber
  • 301
  • 2
  • 6
  • 17