coq-club AT inria.fr
Subject: The Coq mailing list
List archive
- From: Pierre Courtieu <pierre.courtieu AT gmail.com>
- To: Coq Club <coq-club AT inria.fr>
- Subject: Re: [Coq-Club] Coq's performance over destruct tactic
- Date: Fri, 11 May 2018 10:21:06 +0200
- Authentication-results: mail2-smtp-roc.national.inria.fr; spf=None smtp.pra=pierre.courtieu AT gmail.com; spf=Pass smtp.mailfrom=pierre.courtieu AT gmail.com; spf=None smtp.helo=postmaster AT mail-oi0-f42.google.com
- Ironport-phdr: 9a23:7xmLJxeCOM0/ywYKB9pEOCx1lGMj4u6mDksu8pMizoh2WeGdxcuyZR7h7PlgxGXEQZ/co6odzbaO6Oa4ASQp2tWoiDg6aptCVhsI2409vjcLJ4q7M3D9N+PgdCcgHc5PBxdP9nC/NlVJSo6lPwWB6nK94iQPFRrhKAF7Ovr6GpLIj8Swyuu+54Dfbx9HiTahb75+Ngm6oRnMvcQKnIVuLbo8xAHUqXVSYeRWwm1oJVOXnxni48q74YBu/SdNtf8/7sBMSar1cbg2QrxeFzQmLns65Nb3uhnZTAuA/WUTX2MLmRdVGQfF7RX6XpDssivms+d2xSeXMdHqQb0yRD+v9LlgRgP2hygbNj456GDXhdJ2jKJHuxKquhhzz5fJbI2JKPZye6XQds4YS2VcRMZcTyNOAo2+YIUPAeQPPvtWoZfhqFUBtha+GRCsCfnzxjNUmnP736s32PkhHwHc2wwgGsoDvm7VrNrrLqcSS/66x7TWwDXEcvNWwyv96InWfRA8vPqBWqpwccvPxkk1DQPKkE+cppDiPzOIzOQNr2mb4PR9Ve+0hG4nrht+ojmrxss2lobJgYcVx0nC+C5kw4g1PcW1RFBnbdOgCpddtCGXO5FoTs8/QGxkoik3xqMAtJWmZiYF0o4nyATaa/Gfc4iH/BbjVOGJLDd9nn1leba/iw+18Uih1uHwT8e03VlUoiZfndnMsXcN1xPX6seZUPdy4kCh2TOX2wDS7OFLP1w0mLLFJ5I9xrM8jJkevETZEiPohUn7j7Wae0o69uSw7uToeLTmppuSN49ujQH+N7wjmtS+AesmKAgORXaU9f6g273k4E35WqlKjvwonanEq53aKsEbqbS4Aw9RyIos9xG/DzK+3NQCgXYHNE5FeA6Aj4XxJ17OJ+n4Ae6jjFSojTdk3OvLPqbhA5XINnjMiq3tfbd7605GyQo818pT55xOCuJJHPWmcUjo/PfcExVxZwez2qPsDMh3/oIYQ2OGRKGDZvD8q1iNs9ouLvOWacc+vyvnN/ko+ra6lX40g0UQO6KuwIELaX2lNvtjKkSdJ3Hrh4FSQi8xogMiQbmy2xW5WjlJaiP3Bvpkv2BpOMedFY7GA7uVrvmE1Sa/EIdRYzkfWF+JGHbsMY6DXqVVMX7AEopaijUBEIOZZco5zxj37V31zrNmKqzf/ShK7cu+hugw3PXakFQJzRIxD8mZ1DvQHWR9n2dNQD5uma4j+wpyzVCM1aU+iPtdR4Re
Please understand what you are doing: THE 3 TACTICS DO NOT PERFORM THE SAME
NUMBER OF CASE ANALYSIS AT ALL. So you are not measuring the speed of
destruct, you are measuring the level of smartness of the three different
proofs you build. See below an explanation of what each tactic does on the
first example.
Le ven. 11 mai 2018 à 08:52, Wilayat Khan
<wilayatk AT gmail.com>
a écrit :
> Hello Courtieu
> I just ran destruct on the same functions using both Coq8.8 and Coq8.3
and there wasn't so much difference in time (i did not record the actual
numbers, though). Anyway, enclosed are the results of few experiments on
Coq8.8 using destruct in three different ways.The three values in row
'Proof time', are for the Coq8.8 it takes to close proof when destruct is
used with
> a) all variables in destruct, such as destruct a, b, c....;simpl;auto
This generate ~16000 different subgoals and calls "simpl;auto." on each.
You are building a (stupid) proof with 16000 different cases.
> b) group of 8 variables, such as
> try (destruct a,b,c,d,e,f,g,h; simpl; auto);
> (destruct i,j,k,l,m,n,o,p; simpl; auto);
> (destruct p,q,r,s,t; simpl; auto).
This builds a proof with 256 cases only, no surprise that it is performed
faster. More precisely: the first "destruct a,b,c,d,e,f,g,h; simpl; auto"
generate 2^8=256 goals and calls simpl;auto on each, WHICH SOLVES ALL
SUBGOALS. The remaining tactics: "(destruct i,j,k,l,m,n,o,p; simpl; auto);
(destruct p,q,r,s,t; simpl; auto)." IS NEVER EXECUTED because there are no
remaining subgoals.
You can check this:
Variables a b c d e f g h i j k l m n x y:bool.
Require Import List.
Notation "x + y" := (andb x y) (at level 50, left associativity)
:bool_scope.
Notation "x * y" := (orb x y) (at level 40, left associativity) :bool_scope.
Open Scope bool_scope.
Lemma foo1: a*b*c*d*e*f*g*h*i = a*b*c*d*e*f*g*h*i.
try(destruct a,b,c,d,e,f,g,h; simpl; auto).
(* No more subgoals *)
> c) tactic DestructMatchArg, respectively.
For this one I need to see your script, but if there is a call to
reflexivity somewhere THEN IT SOLVES THE GOAL IMMEDIATELY and probably
almost no case analysis is perfomed at all.
Pierre
- [Coq-Club] Coq's performance over destruct tactic, Wilayat Khan, 05/08/2018
- Re: [Coq-Club] Coq's performance over destruct tactic, Maxime Dénès, 05/08/2018
- Re: [Coq-Club] Coq's performance over destruct tactic, Wilayat Khan, 05/11/2018
- Re: [Coq-Club] Coq's performance over destruct tactic, Pierre Courtieu, 05/11/2018
- Re: [Coq-Club] Coq's performance over destruct tactic, Wilayat Khan, 05/11/2018
- Re: [Coq-Club] Coq's performance over destruct tactic, Pierre Courtieu, 05/11/2018
- RE: [Coq-Club] Coq's performance over destruct tactic, Soegtrop, Michael, 05/11/2018
- Re: [Coq-Club] Coq's performance over destruct tactic, Wilayat Khan, 05/11/2018
- Re: [Coq-Club] Coq's performance over destruct tactic, Pierre Courtieu, 05/11/2018
- Re: [Coq-Club] Coq's performance over destruct tactic, Wilayat Khan, 05/11/2018
- RE: [Coq-Club] Coq's performance over destruct tactic, Soegtrop, Michael, 05/08/2018
- <Possible follow-up(s)>
- Re: [Coq-Club] Coq's performance over destruct tactic, Soegtrop, Michael, 05/09/2018
- Re: [Coq-Club] Coq's performance over destruct tactic, Pierre Courtieu, 05/09/2018
- Re: [Coq-Club] Coq's performance over destruct tactic, Maxime Dénès, 05/08/2018
Archive powered by MHonArc 2.6.18.