Skip to Content.
Sympa Menu

coq-club - [Coq-Club] how many type indexes for a particular type?

coq-club AT inria.fr

Subject: The Coq mailing list

List archive

[Coq-Club] how many type indexes for a particular type?


Chronological Thread 
  • From: Jonathan Leivent <jonikelee AT gmail.com>
  • To: Coq Club <coq-club AT inria.fr>
  • Subject: [Coq-Club] how many type indexes for a particular type?
  • Date: Wed, 20 Jul 2016 16:24:12 -0400
  • Authentication-results: mail2-smtp-roc.national.inria.fr; spf=None smtp.pra=jonikelee AT gmail.com; spf=Pass smtp.mailfrom=jonikelee AT gmail.com; spf=None smtp.helo=postmaster AT mail-qk0-f172.google.com
  • Ironport-phdr: 9a23:7EYUrxP6MINY1MkzlyEl6mtUPXoX/o7sNwtQ0KIMzox0KPrzrarrMEGX3/hxlliBBdydsKMczbeN+Pm8ASQp2tWoiDg6aptCVhsI2409vjcLJ4q7M3D9N+PgdCcgHc5PBxdP9nC/NlVJSo6lPwWB6kO74TNaIBjjLw09fr2zQd+KyZnsnLnuo9X6WEZhvHKFe7R8LRG7/036l/I9ps9cEJs30QbDuXBSeu5blitCLFOXmAvgtI/rpMYwuwwZgf8q9tZBXKPmZOx4COUAVHV1e1wysebsrFHoSRaFri8XVXxTmR5VCSDE6gv7V9H/qH2pmPB63Xy4Osv/UbA9X3yG4qZ1RRn0wHMFMDg482zTh8FYg6dSoRbnrBt6ld2HKLqJPeZzK/uONegRQnBMC4MID3RM

Is there any way accessible via Ltac that one can get the count of the number of indexes for a particular inductive type? Not the total number of parameters - just the indexes.

Examining the inductive type doesn't tell you which of that type's args are indexes or just parameters.

Examining the constructors usually helps some, because the point where the args of the constructors differ from each other or the args of the type indicates that there are no more non-indexes after that point. But, there may be indexes that don't vary. Hence, in:

Inductive Foo : nat -> Set := foo(n : nat) : Foo n.

Inductive Bar(n : nat) : Set := bar.

Foo and Bar have the same type nat -> Set, and their constructors foo and bar have similar type structure as well (modulo Foo/Bar). Yet, Foo has a type index while Bar doesn't.

-- Jonathan





Archive powered by MHonArc 2.6.18.

Top of Page