I was following (incomplete) examples in Coq 8.5p1 's reference manual in chapter 11 about the mathematical/declarative proof language. In the example below for iterated equalities (~=
and =~
), I got a warning Insufficient Justification
for rewriting 4
into 2+2
, and eventually got an error saying:
No more subgoals, but there are non-instantiated existential variables:
?Goal : [x : R H : x = 2 _eq0 : 4 = x * x |- 2 + 2 = 4]
You can use Grab Existential Variables.
Example:
Goal forall x, x = 2 -> x + x = x * x.
Proof.
proof. Show.
let x:R.
assume H: (x = 2). Show.
have ( 4 = 4). Show.
~= (2*2). Show.
~= (x*x) by H. Show.
=~ (2+2). Show. (*Problem Here: Insufficient Justification*)
=~ H':(x + x) by H.
thus thesis by H'.
end proof.
Fail Qed.
I'm not familiar with the mathematical proof language in Coq and couldn't understand why this happens. Can someone help explain how to fix the error?
--EDIT-- @Vinz
I had these random imports before the example:
Require Import Reals.
Require Import Fourier.
Require
or library you use to have such a syntax ? – Vinz