coq-club AT inria.fr
Subject: The Coq mailing list
List archive
Re: [Coq-Club] Type error for user-defined induction principle for inductive type
Chronological Thread
- From: Jerome Hugues <jhugues AT andrew.cmu.edu>
- To: "coq-club AT inria.fr" <coq-club AT inria.fr>
- Subject: Re: [Coq-Club] Type error for user-defined induction principle for inductive type
- Date: Fri, 29 Jan 2021 22:22:05 +0000
- Accept-language: en-US
- Authentication-results: mail3-smtp-sop.national.inria.fr; spf=None smtp.pra=jhugues AT andrew.cmu.edu; spf=Pass smtp.mailfrom=jhugues AT andrew.cmu.edu; spf=None smtp.helo=postmaster AT relay-exchange.andrew.cmu.edu
- Ironport-phdr: 9a23:Z9JO0BOr5Ft/b9R+n0sl6mtUPXoX/o7sNwtQ0KIMzox0I//7rarrMEGX3/hxlliBBdydt6sVzbGM+Pm6AyRAuc/H7CldNsQUFlcssoY/p0QYGsmLCEn2frbBThcRO4B8bmJj5GyxKkNPGczzNBX4q3y26iMOSF2kbVImbuv6FZTPgMupyuu854PcYxlShDq6fLh+MAi6oR/eu8ULhYZuMKg8xgXGrndVZeha235jKVaPkxrh/Mu984Nv/iZKt/4968JMVLjxcrglQ7BfEDkoKX0+6tfxtRnEQwuP538cXXsTnxFVHQXL7wz0U4novCfiueVzxCeVPcvtTbApQjui9LtkSAXpiCgcKTE09nzch9Fqg6JapBKhoAF/w5LRbYqIOvdyYr/RcNUHTmdHQ81fVTFOApmkYoUPEeQPIPpYoYf+qVsArxS+BBWjCuzgxTJTmn/5xqg63/g9HQ3a3gEtGc8FvnTOrNXyMacfSeS7w7fSzTXEavNZxyr25orVchAuvPGDQ6lwetfWxEktFwPFk1qQqZH7MDOOzekCqW6b4Pd6Ve2xhW8rsR1+oj2yxss2lIbGm58Vx0nC+C5kz4k7Oce2R1RnYd64DpRQrSeaOpN4T80tQmxmtzs3xqMYtZOnYiUEyJspyhzRZvGafYaF/x3uWPuSLDp8hH9oZbKyihW2/EW+1uDwStW43EpLoyRFlNTHq3MD1wTL58SaVPdw/V2t1SiV2wzO9u1JIVo4mbfFJ5Mu2rI8i4QfvEfZEiPogkn7g7Gael8r9+Sw9ujrfLbrqoWCO4Nulw3zMqYjlta8DOk6NAUFQnKV9v6m1LL5+E30WLVKgeMykqneqJ3aP9oUpqqjDA5Vy4os9Rm+ACum0NsCm3kHI0xKdAidgIjvJl7OOu73DPmlj1uwlTdr2urKMaP8DZXQNnTDkbHhcqhh60NE1QY/09NS64hKBr0bPf7/Rk/8uMbFAhMnPAG42+PnB8981oMaV2KPGKiZMKbKvF+K5uIvPuaMZJILtzbmMPUq/fjugmIjmVADc6ilx4cYaHWlHvh8PUqWfGfsjs8bEWgWpgo+UPDqiFqaXDFPYHayRrsw6S0/CIK7FojOXZutgbyE3CejBJJafGFGClaWEXfpbYqIQfkMaDjBavNmx3YPUqHkQIs83zmvshX7wvxpNKCcriYfrNfo0MV/z+zVjxA7szJuWZezyWaIGkN5hGQNSncWwa9irFc1nlWDzKdljudwHNpf/f5WFAw/KNjRw/EsWIO6YR7IYtrcEAXued6hGzxkFotgke9LWF50HpCZtj6G2iOrB7EPkLnSWs499K7G0me3LMNgjXvKyft41gR0co50LWSjw5VH2U3TCorOyBzLjauufLVZ0T7G9G6FwmfItUdUSgNvF67AQDYSalaE9Y2ltHOHdKenDPEcCiUE0dSLc/UYY9vll1hZAvzmJZLTb3/jw2o=
Thanks for the suggestion
I tried this, but this still produces the same error on nil => I (see rewrite
below)
The error changed to
The term "I" has type "True" while it is expected to have type
"All Ps ?l@{ls:=ls0; l0:=nil}".
which is a similar error message with different variable names due to the
renaming
Fixpoint componentInstance_ind' (c : componentInstance) : Pc c :=
match c with
| component_instance n ls =>
component_case n ls
((fix subcomponentInstance_ind (ls : list subcomponentInstance) : All
(Ps) (ls) :=
match ls with
| nil => I (* True *) (* All Ps nil *)
| subcomponent_instance _ c' :: ls' => (componentInstance_ind' c') /\
(subcomponentInstance_ind ls')
end)
ls)
end.
On 1/29/21, 5:14 PM, "coq-club-request AT inria.fr on behalf of Gaëtan Gilbert"
<coq-club-request AT inria.fr on behalf of gaetan.gilbert AT skyskimmer.net> wrote:
Didn't check but I think
((fix subcomponentInstance_ind (lsi : list subcomponentInstance) :
All (Ps) (ls) :=
should be ... : All Ps lsi, not ... : All Ps ls
Then I would just shadow ls to reduce typo possibilities
Gaëtan Gilbert
On 29/01/2021 22:58, Jerome Hugues wrote:
> ((fix subcomponentInstance_ind (lsi : list subcomponentInstance) :
All (Ps) (ls) :=
>
- [Coq-Club] Type error for user-defined induction principle for inductive type, Jerome Hugues, 01/29/2021
- Re: [Coq-Club] Type error for user-defined induction principle for inductive type, Gaëtan Gilbert, 01/29/2021
- Re: [Coq-Club] Type error for user-defined induction principle for inductive type, Jerome Hugues, 01/29/2021
- Re: [Coq-Club] Type error for user-defined induction principle for inductive type, Jason Gross, 01/30/2021
- Re: [Coq-Club] Type error for user-defined induction principle for inductive type, Jerome Hugues, 01/30/2021
- Re: [Coq-Club] Type error for user-defined induction principle for inductive type, Jason Gross, 01/30/2021
- Re: [Coq-Club] Type error for user-defined induction principle for inductive type, Jerome Hugues, 01/29/2021
- Re: [Coq-Club] Type error for user-defined induction principle for inductive type, Gaëtan Gilbert, 01/29/2021
Archive powered by MHonArc 2.6.19+.