Skip to Content.
Sympa Menu

coq-club - [Coq-Club] Error: "Only structural decreasing is supported for a non-Program Fixpoint"

coq-club AT inria.fr

Subject: The Coq mailing list

List archive

[Coq-Club] Error: "Only structural decreasing is supported for a non-Program Fixpoint"


Chronological Thread 
  • From: Morgan Sinclaire <morgansinclaire AT boisestate.edu>
  • To: coq-club AT inria.fr
  • Subject: [Coq-Club] Error: "Only structural decreasing is supported for a non-Program Fixpoint"
  • Date: Thu, 11 Jul 2019 15:46:51 -0600
  • Authentication-results: mail2-smtp-roc.national.inria.fr; spf=None smtp.pra=morgansinclaire AT boisestate.edu; spf=Pass smtp.mailfrom=morgansinclaire AT boisestate.edu; spf=None smtp.helo=postmaster AT mail-wm1-f52.google.com
  • Ironport-phdr: 9a23:G1rvQhyBectPxY/XCy+O+j09IxM/srCxBDY+r6Qd1OwVIJqq85mqBkHD//Il1AaPAdyBra4UwLOI6OjJYi8p2d65qncMcZhBBVcuqP49uEgeOvODElDxN/XwbiY3T4xoXV5h+GynYwAOQJ6tL1LdrWev4jEMBx7xKRR6JvjvGo7Vks+7y/2+94fcbglVmjaxe7x/IRa5oQnMt8Qbj5ZpJ7osxBfOvnZGYfldy3lyJVKUkRb858Ow84Bm/i9Npf8v9NNOXLvjcaggQrNWEDopM2Yu5M32rhbDVheA5mEdUmoNjBVFBRXO4QzgUZfwtiv6sfd92DWfMMbrQ704RSiu4qF2QxLulSwJNSM28HvPh8N/jKxVrhGvqQFhzYHIe4yaLuZyc7nHcN8GWWZMXMBcXDFBDIOmaIsPCvIMM+Ffr4nnqFsBtx2+DhSxCuPuzD9Hmnv20rc70+Q7Dw7NwQstH9cJsHTOo9X6LqESUfu0zKnO0TrDa+lZ2Tbn6IfWaR0uuvaMXbNrccXP0kkvCxnKjkmOpoD/ITyay/kNvnGd4uF9Vuyvk3Yqpx9trjWr3MshiYnEipgIxlza9ih12oY4KcO+RUVme9CrCoFQuDufN4ZuQsMtXWVouCEix70Do5G7fSwKxI0pxh7advCLaoaI7xL9WOqLLjd4g3VleL27hxms60Sv1ur8Vsys3FZLqCpKjMXMu2gT2xDP7sWLUPhw80e71TqSyQze6ftILEAqmabDLp4u2L8wlp4dsUTZGS/2nV37jKqRdkU+9ein8eLnYq7npp+aK4B0jhvxMqU0msOhGuk3KQ8OX2mA+euiz73j4Vf2QKlUgfEsjKbWrY3aKdwBpqGlGw9Vzpoj6xGnAji619QYhGALI05BeBKalIfkIErOIfD9DfenmVugijZrx/bcPr3gGJrBNHbDkK2yNYp6vkVb0U84yc1Vz5NSELAIZvzpCWHrs9mNKxgjPAWyi93mDt5534IEVCrbB6iDP6rUql6O7eYmIvOBTIUSuS3wMOQs+/OogHMkzwxONZK11IcaPSjrVs9tJF+UNCK134UxVFwStw97d9TEzV2PVTkJOiS3VqM4oy4+UceoUN2FSYeqj7iMmiy8G88OPzwUOhW3CX7tMr68dbIUcivLfJ1rlT0fWKO9QpMskxyiqV2ikus1Hq/v4iQd8Knb+p1w7uzXmws18GUqXc6a0nqAVH19gm5OSjMrjvly

Summary: I've received the error message "Only structural decreasing is supported for a non-Program Fixpoint", I have little clue what it means, and googling this message turned up no actual results. In particular I don't get what it means exactly by "structural decreasing" and "non-Program".

~~~

I have defined a Type called "ptree", which is an infinitary tree with a certain complicated structure, and I'm defining a function (which I'll just call F) that takes in a (P : ptree) as well as some simpler inputs, and returns a ptree. Abstracting away some other details, the definitions look roughly like this:

Inductive ptree : Type :=
| node : nat -> ptree
| cons : nat -> ptree -> ptree
[...]
.
 
Fixpoint F (P : ptree) [...] : ptree :=
match P with
| node n => P
| cons n P' => cons n (F (F P'))
[...]
end.

Now, when I define F like this, I get the familiar "Cannot guess decreasing argument of fix" because of the double application of F. If I change "F (F P')" to "F P'" then the issue goes away, so on some level Coq recognizes that P gets simpler at each stage. However, when I try to tell Coq this by changing the first line to:

Fixpoint F (P : ptree) [...] {measure P} : ptree :=

Then I instead get the error message:

Only structural decreasing is supported for a non-Program Fixpoint

And I don't understand what this means, or how to tell Coq to recognize that P is simplifying, just like in the case where we have the single application F P' instead.

(I believe I know of a way to avoid this double application of F in my situation, but that workaround is tedious, and besides I'm quite interested in understanding what's going on here).



Archive powered by MHonArc 2.6.18.

Top of Page