Skip to Content.
Sympa Menu

coq-club - [Coq-Club] Strict positivity description in CIC spec

coq-club AT inria.fr

Subject: The Coq mailing list

List archive

[Coq-Club] Strict positivity description in CIC spec


Chronological Thread 
  • From: "William J. Bowman" <wjb AT williamjbowman.com>
  • To: Coq Club <coq-club AT inria.fr>
  • Subject: [Coq-Club] Strict positivity description in CIC spec
  • Date: Tue, 6 Aug 2019 23:00:25 -0400
  • Authentication-results: mail2-smtp-roc.national.inria.fr; spf=None smtp.pra=wjb AT williamjbowman.com; spf=None smtp.mailfrom=wjb AT williamjbowman.com; spf=None smtp.helo=postmaster AT williamjbowman.com
  • Ironport-phdr: 9a23:rh6UNRIDsFhsfCVtLdmcpTZWNBhigK39O0sv0rFitYgeLvzxwZ3uMQTl6Ol3ixeRBMOHsqgC0rOP+P69EUU7or+5+EgYd5JNUxJXwe43pCcHRPC/NEvgMfTxZDY7FskRHHVs/nW8LFQHUJ2mPw6arXK99yMdFQviPgRpOOv1BpTSj8Oq3Oyu5pHfeQpFiCejbb9oMRm6sBjdusYXjIZiN6081gbHrnxUdupM2GhmP0iTnxHy5sex+J5s7SFdsO8/+sBDTKv3Yb02QaRXAzo6PW814tbrtQTYQguU+nQcSGQWnQFWDAXD8Rr3Q43+sir+tup6xSmaIcj7Rq06VDi+86tmTgLjhTwZPDAl7m7Yls1wjLpaoB2/oRx/35XUa5yROPZnY6/RYc8WSW9HU81MVSJOH5m8YpMBAeQBI+hWsorzqFQSohSjCwahH//vxiNSi3PqwaE3yfotHAfb1wIgBdIOt3HUoc37OKgSUOC1yK3IzTTZYPNTxDzz7JLEeQ08rPGLU7NwdNDeyU8hGwjYiViRp47lMCiO2+UDsmib6+5gVeO1hG4iqQF+uT+vx8kpiobTgIIZ0EzL9SJ8wIssI9CzVUB1YdmhEJRKtiGaMZN7QsIkQ2FyuSY10KcKuZChfCUM1Z8pxAbfZuSaf4WM/B7vTvudLDd4iX5/e7+yhAy+/VW9xuD9TsW4zUpGoylfntTOrHwByQDf5tSdRvZ5+EqqxCyB2BrJ6u5eJEA5jarbJIAlwr43jpcSv0XDHivymEX3lqCWc0ck9fOv6+XpZ7XpvJmcO5VohQH5N6Qigs2/AeImPQgSR2WX5OCx2KP58UHkQLhHjuc6n6ravZzAOMgXu6+0DxdQ0ok56ha/Czmm0M4fnXkCNF9EdhCHgJPyNlDAIfD4CfO/g1W2nzduxfDJJbrhA5vILnfZlrftZ6py60lZyAYr19BQ+4pUCq0dIPL0QkL+qNvYDgYgPwOox+bnFc5y25gFWWOPB6+ZKLndvUWJ5uIpOemMZZUatCzzK/g/tLbSiioSnkZVVq2019NDY3ehW/9iPk+xYHz2g95HH31c7SQkS+m/wmKDVTpSbnP6feR0zDYkDYugR8+XWYKnqKOA2CO6F5hUbGdZD1mKV3zvctPXCL83dCuOL5o5wXQ/Xr+7RtpkjEn27VOo+/9cNuPRvxYgm9f7ztEvv7/MlBU29DVxDc6azGSESSd/mWZaH2ZnjpA6mlR0zxK46YY9hvVZEdJJ4PYTClUlNJrYzuV/Cdr1RQfIeJGCT1P0Goz7UwF0dco4xpo1W2g4G9imiUqbjTWrB7sUnrmJDpsr96vamXP2IpQlxg==

I just finished implementing the CIC positivity checker as specified in the
Coq
docs, but the docs seem under specified about how the strict positivity
algorithm should work.

https://coq.inria.fr/doc/language/cic.html#positivity-condition

If I try to implement the rules as specified, I get stuck in an infinite loop
when checking nested inductive types.

Consider rose trees:

Inductive List (A : Set) : Set :=
| nil : List A
| cons : A -> List A -> List A.

Inductive Rose (A : Set) : Set :=
| rose : (List (Rose A)) -> Rose A.

I must show `Rose` occurs strictly positively in `(List (Rose A))`, from the
type of the constructor `rose`.

Loop:
To show that `Rose` occurs strictly positively in `List (Rose A)`,
since `List (Rose A)` is of the form `(I p_0 ... p_m u ...)` and `List` is not
mutually inductive, we must show the nested positivity condition for each
constructor of `List` after instantiating the types of the constructors with
the
parameter `(Rose A)`.

There are two cases:
- nil : `(List (Rose A))` satisfies nested positivity w.r.t. `Rose` trivially.

- cons : `Rose A -> List (Rose A) -> List (Rose A)`
To show this satisfies nested positivity w.r.t. `Rose`, we must show that
`Rose`
occurs strictly positively in `List (Rose A)`.
goto Loop


For now, I've "fixed" this by allowing myself to assume strict positivity
holds
for `List (Rose A)` while checking nested positivity.
This seems okay, in a vague, intuitive, "something something greatest
fixpoints?" kind of way, but I'd like to be a little more formal than that.

Does anyone know what's missing from the Coq docs or what reference I should
look at?

I usually start from the Coq docs as they have the most readable and complete
CIC spec in one place.
I tried reading the Coq kernel code but.. failed.
I also tried Paulin-Mohring's "Inductive Definitions in the system Coq Rules
and
Properties", but can't find anything about nested inductive types.

--
William J. Bowman



Archive powered by MHonArc 2.6.18.

Top of Page