I have a Program Fixpoint with measure for which I have proved all obligations. When I try to check it, it fails:
Error: The reference trivial_program_fixpoint2 was not found in the current environment.
I have narrowed the error to the use of a non default tactic to prove obligations.
In the code below, the first Program
is defined. Once I choose a non default tactic to prove Obligation
s, the Program
doesn't get defined even though there are no Obligation
's left to prove. I would expect trivial_program_fixpoint2
to be defined after Qed
.
I have looked in the documentation but I don't see anything that suggests that using a tactic different than default would change what I am seeing.
Coq version used:
The Coq Proof Assistant, version 8.15+alpha compiled with OCaml 4.09.1
Below is code to reproduce the problem.
From Coq Require Export Arith.
Require Import Program.Wf.
Program Fixpoint trivial_program_fixpoint (n : nat) {measure n}: nat :=
match n with
0 => 0
| m => m
end.
Check trivial_program_fixpoint.
Obligation Tactic := intros.
Program Fixpoint trivial_program_fixpoint2 (n : nat) {measure n}: nat :=
match n with
0 => 0
| m => m
end.
Next Obligation.
intuition. discriminate.
Qed.
Check trivial_program_fixpoint2.