coq-club AT inria.fr
Subject: The Coq mailing list
List archive
- From: Jasper Hugunin <jasper AT hugunin.net>
- To: coq-club AT inria.fr
- Subject: Re: [Coq-Club] : Lexicographic order well foundedness
- Date: Wed, 25 Aug 2021 17:49:00 -0700
- Authentication-results: mail3-smtp-sop.national.inria.fr; spf=None smtp.pra=jasper AT hugunin.net; spf=None smtp.mailfrom=jasper AT hugunin.net; spf=None smtp.helo=postmaster AT mail-pg1-f179.google.com
- Ironport-hdrordr: A9a23:6arsl6tJqeokqaxs06LhzKgu7skDT9V00zEX/kB9WHVpm62j5rmTdZEgvyMc5wxhPU3I9erwWpVoBEmslqKdgrNxAV7BZniDhILAFugLhrcKgQeBJ8SUzJ876U4PSdkZNDQyNzRHZATBjTVQ3+xO/DBPys6Vuds=
- Ironport-phdr: A9a23:CkU4VxHC2S1ltAcs4N+Bg51Gf8RMhN3EVzX9CrIZgr5DOp6u447ldBSGo6k31BmYBM6GtLptsKn/i+jYQ2sO4JKM4jgpUadncFs7s/gQhBEqG8WfCEf2f7bAZi0+G9leBhc+pynoeUdaF9zjaFLMv3a88SAdGgnlNQpyO+/5BpPeg9642uys55HfeQFFiCeybb5yLhi9sBncuNQRjYZ+MKg61wHHomFPe+RYxGNoIUyckhPh7cqu/5Bt7jpdtes5+8FPTav1caI4TadFDDs9KGA6+NfrtRjYQgSR4HYXT3gbnQBJAwjB6xH6Q4vxvy7nvedzxCWWIcv7Rq0yVD+/7alkVQXohT8IOD438m7ZisJ+gqFGrhy/uxNy2JTbbJ2POfdkYq/RYdEXSGxcVchRTSxBBYa8YpMLAeUbJuZYt5fyp0ETphW8GAmsC/7vyjlJhn/wwKY31OYhHhvd3Aw4Ad0Oqm/ZrNXoNKcdTOC1yqjIzTPZY/NQxzj99JHFfxY8qv6DQbx+a9DeyVUzFwzblFWQr5ToMTyL2ukRsWWX8eVuW+KuhmI5qQx9vDehytowh4TGm44Yzl/J+Dh6zYg1K9O0VkB1bNG5HZVfqyyXN4R4TM0mTmxupS00xLoGuZuhcygLzpQq3wTQa+aGc4iU4hLvTuiQITl+iXl4e7y/nw6//Va8xuD4TMW501ZHojBbntXRtn0BzQHf58qDR/Z740yvwyyA1xrJ5eFBOU00lbTUK5omwrMok5ocq0XDHivvlEXug6+aa1wo+ua15+nlZrjqvJCcN4hzigHxNqQhhNazDvg/MggLR2Sb+OK826P//UDhXrlGkvk7nrPavZ3aP8gXuLO1Dg9P3oo+6RuyCy+q0NECknkGKFJFdgiHj4/sO1zWIvD3F+y/g0yynzdx3P3GPqDhAprQLnjFkbfhe6xx60hCxwov1dxf/Y5bCqkdIPLvXU/8rMDXDhggMwCt3+nnDMh92ZgFVGKUAq6ZNbvSvkWS6uIuJemMfo4VtyznJ/gr/f69xUM+zFQaZOyi2YYdQHG+BPVvZUuDMlT2hdJUM24RpgckBMz3h0CEUDgbM3S7RLox/Bk7FY27C4bFAIagnOrSj2+AApRKazUeWRi3GnDyetDcMx/pQCKPLdJnkzpCU7W9GddJPf6GtBL11rxmKKzS9zFK7foLNfBw7uzX0Ak9rHl6VpvMlW6KSG5wkyUDQDpkhMhC
The simple answer is that you want lexprod (Lexicographic order) rather than symprod (Symmetric product), defined in Relations.Relation_Operators.
lexprod has the definition you expect.
Best,
- Jasper Hugunin
On Wed, Aug 25, 2021 at 5:22 PM Wendlasida Ouedraogo <ouedraogo.tertius AT gmail.com> wrote:
Dear List, I am trying to write some functions in coq whose termination proofs use lexicographic order. My minimized problem is :-------------------------Require Import FunInd.
Require Import Recdef Coq.Arith.Wf_nat ZArith Coq.ZArith.Zwf Omega.
Require Import Relations.Relation_Operators.Function test (x: string * nat) {wf (symprod string nat (ltof string length) (ltof nat (fun id => id)) ) x} :=
match x with
| (EmptyString, 0) => 0
| (EmptyString, S n) => test (EmptyString, n)
| ((String a s), n) => test (s, n + 1)
end.---------------I cannot prove that the function terminates. It seems that the problem is due to the fact that in Relations.Relation_Operators.v, symprod is defined like following:Inductive symprod : A * B -> A * B -> Prop :=
| left_sym :
forall x x':A, leA x x' -> forall y:B, symprod (x, y) (x', y)
| right_sym :
forall y y':B, leB y y' -> forall x:A, symprod (x, y) (x, y').instead of :Inductive symprod : A * B -> A * B -> Prop :=
| left_sym :
forall x x':A, leA x x' -> forall y y':B, symprod (x, y) (x', y')
| right_sym :
forall y y':B, leB y y' -> forall x:A, symprod (x, y) (x, y').-------------------Any ideas ?--Regards,M. Wendlasida OUEDRAOGO
- [Coq-Club] : Lexicographic order well foundedness, Wendlasida Ouedraogo, 08/26/2021
- Re: [Coq-Club] : Lexicographic order well foundedness, Jasper Hugunin, 08/26/2021
- Re: [Coq-Club] : Lexicographic order well foundedness, Castéran Pierre, 08/26/2021
- Re: [Coq-Club] : Lexicographic order well foundedness, Wendlasida Ouedraogo, 08/26/2021
- Re: [Coq-Club] : Lexicographic order well foundedness, Castéran Pierre, 08/26/2021
- Re: [Coq-Club] : Lexicographic order well foundedness, Wendlasida Ouedraogo, 08/26/2021
- Re: [Coq-Club] : Lexicographic order well foundedness, Castéran Pierre, 08/26/2021
- Re: [Coq-Club] : Lexicographic order well foundedness, Jasper Hugunin, 08/26/2021
Archive powered by MHonArc 2.6.19+.