coq-club AT inria.fr
Subject: The Coq mailing list
List archive
- From: Adam Chlipala <adamc AT csail.mit.edu>
- To: coq-club AT inria.fr
- Subject: Re: [Coq-Club] Is non-strict positivity ever okay?
- Date: Tue, 14 Apr 2020 20:44:02 -0400
- Authentication-results: mail2-smtp-roc.national.inria.fr; spf=None smtp.pra=adamc AT csail.mit.edu; spf=Pass smtp.mailfrom=adamc AT csail.mit.edu; spf=None smtp.helo=postmaster AT outgoing-stata.csail.mit.edu
- Ironport-phdr: 9a23:L593wBCSITAkQigGuLIWUyQJP3N1i/DPJgcQr6AfoPdwSPvzpsbcNUDSrc9gkEXOFd2Cra4d1qyN6eu7BSRAuc/H7CleNsQUFlcssoY/oU8JOIa9E0r1LfrnPWQRPf9pcxtbxUy9KlVfA83kZlff8TWY5D8WHQjjZ0IufrymUoHdgN6q2O+s5pbdfxtHhCanYbN1MR66sRjdutMZjId/Kqs90BXErmVHd+lYym5jOFafkwrh6suq85Nv7itdt+g9+8JcVKnxYrg1Q6FfADk6PG8549HmuwPeRgWV/HscVWsWkhtMAwfb6RzxQ4n8vCjnuOdjwSeWJcL5Q6w6VjSk9KdrVQTniDwbOD4j8WHYkdJ/gaRGqx+8vRN/worUYIaINPpie67WYN0XSXZdUstXSidMBJ63YYkSAOobJetWspfzp1UOoxW9CwejCuzgxT1UiXLtx6I2z/4sHBva0AEuH98DtmnfotXvNKcVVOC41LXFwijZYPNTxDzw9ojIchQgofGUR71wddDewlQoGgzfk1qfs4nlMC+O2+sRqGiU9etgVea1h24iqgFxviKjydkxhYnUn48YzE3P+yZhwIstONG0Vk12bcSqHZdMrS2WKZF6Tt0/T210oCo21KEKtJ6hcCQU1Jgr2gTTZ+GDfoSS7B/vSuCcKipiin1/YrKwnROy/FCgyuLiUsm0105Hri1YktnQuXAN0B3T6s6ISvdk5UehxSyA1xzJ5e1ePU80jrDUK58lwrIqk5oTsFjDEjXol0rrka+abkQk+u625OT7erjqu4GQOoxuhgzwLqgigNKzDf4mPgQTQ2SX4eG826fi/U39TrVKlPo2kqzBvZ/AOMsUvKu5DBNO34k/8BawFTam0NACkXkCLVJFZAiLgJb0NFHTOPz4F+uwg0ywkDd3wPDLJqHuApLULnTajLjheat95FVHxQoozdFf4opUBasbLPLyXE/xrt3YAQUjPwy62ea0QOl6g4gZQCeEBrKTGKLUq16BoOw1cMeWY4pAkTr0LrAO5/rvlXY9kBdJdKWg2JA/Y2uxH/AgJkSFJ3fgn4FSQi8xogMiQbmy2xW5WjlJaiPqBvNu1nQAEIujSLz7aMWoib2F0j28G8QLNGtdA1GIV3Lpa8OJV+peMXvPcP8kqSQNUP2ac6Fk1Ryqs1Simb16MuXT+ysX8In/3cR8oebInBA2szl1E4KQ33zfFzgozFNNfCc/2eVEmWI40k2KiPUqiOdRFNgV4vJVFAo2KMyEwg==
Put another way, we can certainly
imagine an alternative "Inductive" that allows arbitrary recursive
uses of the same predicate, so long as a designated argument has
decreased in size. However, what we've just described is
"Fixpoint"! "Inductive" has no such criteria attached to it. It
is not clear how to maintain the great expressive power of
"Inductive" while combining its validity checking with a rule
based on an argument decreasing in size -- without just saying
"Inductive" should fold in the behavior of "Fixpoint" as a special
case, which doesn't sound useful, if we are going to have both
commands anyway.
For concreteness in your example, I
think Dominique is suggesting
Fixpoint satisfies {A : Type} (xs :
list A) (f : Formula) : Prop :=
match f with
| FAtomic f => exists xs' x, xs = xs' ++ [x] /\ f x = true
| FNeg f => ~satisfies xs f
end.
match f with
| FAtomic f => exists xs' x, xs = xs' ++ [x] /\ f x = true
| FNeg f => ~satisfies xs f
end.
On 4/14/20 7:09 PM, Dominique
Larchey-Wendling wrote:
No problem in defining a Fixpoint to Prop. Fixpoint does
not imply computable.
De:
"Agnishom Chattopadhyay" <agnishom AT cmi.ac.in>
À: "coq-club" <coq-club AT inria.fr>
Envoyé: Mercredi 15 Avril 2020 01:05:04
Objet: Re: [Coq-Club] Is non-strict positivity ever okay?
À: "coq-club" <coq-club AT inria.fr>
Envoyé: Mercredi 15 Avril 2020 01:05:04
Objet: Re: [Coq-Club] Is non-strict positivity ever okay?
Not really. I am trying to define a relation between
my models and my formulae. This is a semantic notion and
in some cases may even be uncomputable. So, I do not
really want a Formula -> Bool, but rather some kind
of Prop
On Tue, Apr 14, 2020 at
5:56 PM Dominique Larchey-Wendling <dominique.larchey-wendling AT loria.fr>
wrote:
Usually one uses a Fixpoint instead of an
inductive definition for formula satisfaction.
D.
De:
"Agnishom Chattopadhyay" <agnishom AT cmi.ac.in>
À: "coq-club" <coq-club AT inria.fr>
Envoyé: Mercredi 15 Avril 2020 00:30:39
Objet: [Coq-Club] Is non-strict positivity ever okay?
À: "coq-club" <coq-club AT inria.fr>
Envoyé: Mercredi 15 Avril 2020 00:30:39
Objet: [Coq-Club] Is non-strict positivity ever okay?
Sorry for the click-baity title.
I have a situation where I want to define
the semantics of some formulae like
textbooks usually do:
Inductive Formula {A: Type} : Type :=
| FAtomic: (A -> bool) -> Formula
| FNeg: Formula -> Formula
.
Inductive satisfies {A : Type} : list A -> Formula -> Prop :=
| sat_atomic : forall (f : A -> bool) x xs, f x = true
-> satisfies (xs ++ [x]) (FAtomic f)
| sat_neg : forall xs f, ((satisfies xs f) -> False)
-> satisfies xs (FNeg f)
.
| FAtomic: (A -> bool) -> Formula
| FNeg: Formula -> Formula
.
Inductive satisfies {A : Type} : list A -> Formula -> Prop :=
| sat_atomic : forall (f : A -> bool) x xs, f x = true
-> satisfies (xs ++ [x]) (FAtomic f)
| sat_neg : forall xs f, ((satisfies xs f) -> False)
-> satisfies xs (FNeg f)
.
The last clause in the inductive
predicate does not go through since it puts
`satisfies` in a negative position.
I'd however think that this is not so bad
because: (1) This is a standard way to
define the semantics of negation and also
(2) the second argument of satisfies is
structurally bigger in the result.
Is there any chance I can convince Coq of
(2) or some other reason that would make it
work?
I have tried interchanging the order of
the arguments of satisfies but that did not
help.
--Agnishom
- [Coq-Club] Is non-strict positivity ever okay?, Agnishom Chattopadhyay, 04/15/2020
- Re: [Coq-Club] Is non-strict positivity ever okay?, Dominique Larchey-Wendling, 04/15/2020
- Re: [Coq-Club] Is non-strict positivity ever okay?, Agnishom Chattopadhyay, 04/15/2020
- Re: [Coq-Club] Is non-strict positivity ever okay?, Dominique Larchey-Wendling, 04/15/2020
- Re: [Coq-Club] Is non-strict positivity ever okay?, Adam Chlipala, 04/15/2020
- Re: [Coq-Club] Is non-strict positivity ever okay?, Agnishom Chattopadhyay, 04/15/2020
- Re: [Coq-Club] Is non-strict positivity ever okay?, Jason -Zhong Sheng- Hu, 04/15/2020
- Re: [Coq-Club] Is non-strict positivity ever okay?, Jason Gross, 04/15/2020
- Re: [Coq-Club] Is non-strict positivity ever okay?, Dominique Larchey-Wendling, 04/15/2020
- Re: [Coq-Club] Is non-strict positivity ever okay?, Thorsten Altenkirch, 04/15/2020
- Re: [Coq-Club] Is non-strict positivity ever okay?, Agnishom Chattopadhyay, 04/15/2020
- Re: [Coq-Club] Is non-strict positivity ever okay?, Adam Chlipala, 04/15/2020
- Re: [Coq-Club] Is non-strict positivity ever okay?, Thorsten Altenkirch, 04/15/2020
- Re: [Coq-Club] Is non-strict positivity ever okay?, Dominique Larchey-Wendling, 04/15/2020
- Re: [Coq-Club] Is non-strict positivity ever okay?, Agnishom Chattopadhyay, 04/15/2020
- Re: [Coq-Club] Is non-strict positivity ever okay?, Dominique Larchey-Wendling, 04/15/2020
Archive powered by MHonArc 2.6.18.