coq-club AT inria.fr
Subject: The Coq mailing list
List archive
- From: Jason -Zhong Sheng- Hu <fdhzs2010 AT hotmail.com>
- To: Jake <jake.waksbaum AT gmail.com>
- Cc: "coq-club AT inria.fr" <coq-club AT inria.fr>
- Subject: Re: [Coq-Club] Induction on Permutation
- Date: Fri, 15 Mar 2019 03:52:36 +0000
- Accept-language: en-CA, en-US
- Authentication-results: mail2-smtp-roc.national.inria.fr; spf=None smtp.pra=fdhzs2010 AT hotmail.com; spf=Pass smtp.mailfrom=fdhzs2010 AT hotmail.com; spf=Pass smtp.helo=postmaster AT NAM05-CO1-obe.outbound.protection.outlook.com
- Ironport-phdr: 9a23:ItgfhhZ+z2LAZXTsegOkbyz/LSx+4OfEezUN459isYplN5qZr8+7bnLW6fgltlLVR4KTs6sC17OO9fi5EUU7or+5+EgYd5JNUxJXwe43pCcHRPC/NEvgMfTxZDY7FskRHHVs/nW8LFQHUJ2mPw6arXK99yMdFQviPgRpOOv1BpTSj8Oq3Oyu5pHfeQpFiCehbb9oMBm6sBjau9ULj4dlNqs/0AbCrGFSe+RRy2NoJFaTkAj568yt4pNt8Dletuw4+cJYXqr0Y6o3TbpDDDQ7KG81/9HktQPCTQSU+HQRVHgdnwdSDAjE6BH6WYrxsjf/u+Fg1iSWIdH6QLYpUjmk8qxlSgLniD0fOjA57m/Zl9BwgqxYrhKvpRNw34HbbZqPO/ZiYq/QZ88WSXZfUstXSidPApm8b4wKD+cZOehXtZL9p1wIrRCjHAWjB+PvyjhOhn/5wKY0zuQhHh/A3AwvBt4FrXbarMjoP6oVX+C60anIzDTYb/9IxTvx9ZTEfwshofGLQbJwdNDeyUgrFw/fklqQronlMiqT2+8QsGab9/JtWO2zh2I9rwx9vCKjytoih4XTho8Z1EjI9Stnz4s2OdG1TUt2bsC4HJZUtSyXMop7Tt4sTmxqvSs3yaMKtJymcyUPy5kr2QPTa/KBfoOV+BzsTvyRLi19hH99eLKwmRKy8U+4x+PkSsS610pGoypcntTSr34BygXf6s+cRfRj5Euh3iuP1xzI5eFDPEA0k7fUJ4Q5wr4qkZoTrVrMETPqmEX3i6+WcF8o+u+16+T7ZrXmoZicN4xuhg7iNaQun9SzAeU+MgcQQ2iW4eux2KH58UD9XrlGlOA6n6fDvJ3aO8gXvqu5DBVU0oYn5Ra/FTCm0NEAkHkJMV1FeBOGj5P3N13SPfz0Eeyyg1SrkDd3wvDJJLzhApHXInffl7fheK5x61RAxwor0dBf+5VUB6kdL/L0Q0/9rcDXDhskMwOv2OvnE9V81oYGWW2VGKOZMaXSsUWJ5u01OeWMapUV637BLK0H7v3jxSs7kFwQO7ag3oAdYW29NvtjKkSdJ3Hrh4FSP30Nu18cRfftjhXHYz5UYXn6ZKIx4D5+QKK7RdPNSoC/m+bZhX+THppKY2lHDhaHFnK+JNbMYOsFdC/HepwpqTcDT7X0E9ZwhyHrjxfzzv9cFsSR/yQZsZz5090svL/Tkg03/D1wSc+a1jPUFj0mriYzXzYzmZtHjwll0F7aivp4hOBdHN1XofhOV1VibMOO/6lBE9n3Hzn5UJKJRVKhHor0JxgUFo906PhXJkF3FpOlkwzJ2DesD/kNjbuXCZco86XamX/sO8J6zHWA364k3QAr
I guess I didn't wrap my head around fully, but my counterexample should be valid.
Let me fix my premise: consider a setoid S, and x, y are in the same equivalence class, and x != y propositionally.
then the theorem you are trying to prove is not closed under transitivity because [x, y] => [y, x] => [x, y] is an example, so it cannot be established by direct induction.
From: Jake <jake.waksbaum AT gmail.com>
Sent: March 14, 2019 11:26 PM
To: Jason -Zhong Sheng- Hu
Cc: coq-club AT inria.fr
Subject: Re: [Coq-Club] Induction on Permutation
Sent: March 14, 2019 11:26 PM
To: Jason -Zhong Sheng- Hu
Cc: coq-club AT inria.fr
Subject: Re: [Coq-Club] Induction on Permutation
Thanks for your response Jason! I think I wasn't clear about what I meant by stable. In the case you mentioned, because x != y, they can be swapped freely.
The stability I'm talking about is in reference to stable sorts, so we say that a permutation p is stable on a list xs when if i < j and xs[i] = xs[j] for some equivalence relation then p(i) < p(j). For sorts we define the equivalence relation
by saying x = y iff x <= y and y <= x. So the fact that x != y means that the stability requirement doesn't care if they're swapped.
In fact, stability only really makes sense if we're using a notion of equivalence that isn't propositional equality because otherwise, even if two equal elements are swapped, we can't tell the difference between them. So under propositional
equality every permutation is stable.
Please let me know if I've misunderstood your counterexample or if my explanation is unclear.
Thanks,
Jake
On Thu, Mar 14, 2019, 20:55 Jason -Zhong Sheng- Hu <fdhzs2010 AT hotmail.com> wrote:
Hi Jake,
I didn't look deep into your problem, but I guess I can try to explain why this proof cannot work.
Consider the following list, [x, y]. For the sake of it, let's forget about setoids and just work with propositional equality. Let x != y in this case.
I can definitely conclude [x, y] is both a permutation and a stable permutation of itself.
Now consider use of transtivity, which goes like this,
[x, y] => [y, x] => [x, y]
Clearly, [x, y] and [y, x] are not stable. The fact that you can apply a stable filter to the end results doesn't prevent the internal structure of permutation from violating it, so the theorem is simply not closed under transitivity and you cannot prove such fixpoint exists.
Hope that makes sense. I have no idea how to prove your particular theorem without looking into it. Sorry about that. My wild guess is StableFilter is a too shallow restriction on the lists, and therefore something stronger might help.
From: coq-club-request AT inria.fr <coq-club-request AT inria.fr> on behalf of Jake <jake.waksbaum AT gmail.com>
Sent: March 14, 2019 8:32 PM
To: coq-club AT inria.fr
Subject: [Coq-Club] Induction on PermutationWhen doing induction on Permutation, I often get stuck in the transitive case because my induction hypothesis is not of the correct form. Is there a trick one can use to avoid this issue?
The simplest example I can find that I've encountered recently is proving the following theorem about the equivalence of two definitions of stable permutations:
Theorem perm_stable_stable_perm {A} `{E : EqDec A} : forall l l' : list A,Permutation l l' -> StableFilter l l' -> StablePerm l l'.
This is the form that I often have issues with: there is Permutation and some other information. In the transitive case, that other information isn't available in the right way. In this example, in the transitive case we have the following hypotheses:
HP1 : Permutation l l'HP2 : Permutation l' l''IHHP1 : StableFilter l l' -> StablePerm l l'IHHP2 : StableFilter l' l'' -> StablePerm l' l''HS : StableFilter l l''============================StablePerm l l''
From here, we're stuck because we need to know StableFilter l l' and StableFilter l' l'' to apply our induction hypotheses, but we simply cannot conclude that from HP1, HP2, and HS.
I've attached the full file with all the definitions. For this specific theorem, I have worked around this issue by doing induction on the length of the lists. However, this type of issue comes up a lot when I'm working the Permutation and StablePerm because they both have transitive cases. I'm curious if there is a good way of dealing with this this, because otherwise it severely reduces the usefulness of these inductive predicates by making induction on them difficult.
- [Coq-Club] Induction on Permutation, Jake, 03/15/2019
- Re: [Coq-Club] Induction on Permutation, Jason -Zhong Sheng- Hu, 03/15/2019
- Re: [Coq-Club] Induction on Permutation, Jake, 03/15/2019
- Re: [Coq-Club] Induction on Permutation, Jason -Zhong Sheng- Hu, 03/15/2019
- Re: [Coq-Club] Induction on Permutation, Favonia, 03/15/2019
- Re: [Coq-Club] Induction on Permutation, Jake, 03/15/2019
- Re: [Coq-Club] Induction on Permutation, Jason -Zhong Sheng- Hu, 03/16/2019
- Re: [Coq-Club] Induction on Permutation, Jake, 03/15/2019
- Re: [Coq-Club] Induction on Permutation, Favonia, 03/15/2019
- Re: [Coq-Club] Induction on Permutation, Jason -Zhong Sheng- Hu, 03/15/2019
- Re: [Coq-Club] Induction on Permutation, Jake, 03/15/2019
- Re: [Coq-Club] Induction on Permutation, Jason -Zhong Sheng- Hu, 03/15/2019
Archive powered by MHonArc 2.6.18.