Skip to Content.
Sympa Menu

coq-club - Re: [Coq-Club] or in ltac tryif

coq-club AT inria.fr

Subject: The Coq mailing list

List archive

Re: [Coq-Club] or in ltac tryif


Chronological Thread 
  • From: Jason Gross <jasongross9 AT gmail.com>
  • To: coq-club <coq-club AT inria.fr>
  • Subject: Re: [Coq-Club] or in ltac tryif
  • Date: Sun, 15 Dec 2019 13:15:25 -0500
  • Authentication-results: mail3-smtp-sop.national.inria.fr; spf=None smtp.pra=jasongross9 AT gmail.com; spf=Pass smtp.mailfrom=jasongross9 AT gmail.com; spf=None smtp.helo=postmaster AT mail-ed1-f42.google.com
  • Ironport-phdr: 9a23:4nASyBL+ZHg2q4mTUNmcpTZWNBhigK39O0sv0rFitYgRLP3xwZ3uMQTl6Ol3ixeRBMOHsqkC0bKN+Pm5AyQp2tWoiDg6aptCVhsI2409vjcLJ4q7M3D9N+PgdCcgHc5PBxdP9nC/NlVJSo6lPwWB6nK94iQPFRrhKAF7Ovr6GpLIj8Swyuu+54Dfbx9HiTagb75+Ngu6oRnfu8UZnIduN7g9wQbVr3VVfOhb2XlmLk+JkRbm4cew8p9j8yBOtP8k6sVNT6b0cbkmQLJBFDgpPHw768PttRnYUAuA/WAcXXkMkhpJGAfK8hf3VYrsvyTgt+p93C6aPdDqTb0xRD+v4btnRAPuhSwaMTMy7WPZhdFqjK9Drx2hqR5wzY7abo+WKfRwYL/ScMgASmZdRMtcTTBNDp++YoYJEuEPPfxYr474p1YWqRWxHxKsBOTpyjRVh3H2x6o60/86EQrb2wEgHcgBsG/TrNXzO6cSS+e1zLLTzTjHdP5W1jL955LJchAlu/2DQbVwcc/IxEQpCgjLgFKQqYn/MDOU0OQAq3SU7+16VeKplWEnrwVxriKxycgxl4nEgJ8exFPc9Shh3oo5Odm1RFR4bNOkCpdcqT2WOohsTs4tXW1lvjsxxKcctp6hZicKzYwqxx7BZPyDdIiF+hfjW/yQITd8nX5qZq+wiwur/UiuxeDwSNO40FlNripCndnMsm4C2wbP5ciAT/tx5kah2TCR2ADP8uxIP1w4mK7BJ5MiwrM8jIQfvVjAEyPsl0j6kreadkA+9eip7+TnbK/mppiZN4JsiAHxKL8umsu5AeQ3KAgOWHOb+f+42bD48k35Ra9FjvwykqXDrJ/aIsEbqrajAwBJyoYj9wq/DzC+3dsEmnkHNUtJdw6Dj4j0IF7DO+v4DPe6g1S0ijhn3fHGPrv7ApXMNHfPirnhfawuo3JbnQE01JVU449eQuUKJ+u2UUvsvvTZCAU4Okq62bC0Js9609Y8UHmIBOe2KqTJqhfc5Os0JO+DfogOo2fVJP0s5vqohng8zwxONZK11IcaPSjrVs9tJF+UNCK13oUxVFwStw97d9TEzUWYWGcKNXm3VqM4oDo8DdD+VNqRdsWWmLWEmRyDMNhWa2RBUA3eFH7pc8CJV65JZn7IZMBmlTMAWP6qTIpzjUj/5j+/8KJuK6/vwgNdsJvi0NZv4OiKzEM98DV1C4KW1GTfFmw=

You can write "first [ has_evar L | has_evar R ]" or "has_evar L + has_evar R" or "tryif has_evar L then idtac else has_evar R".  You can make a tactic notation for any of these; I think `Tactic Notation tactic3(A) "or" tactic3(B)` should work.  Additionally, you may want to wrap the construction in "once"; I know "+" is multi-success (and am not sure about the others), so if you use "+" and don't wrap it in "once" then if you later fail, Coq will end up evaluating all the clauses if the "or" even if the first one succeeds.

On Sun, Dec 15, 2019, 11:17 Abhishek Anand <abhishek.anand.iitg AT gmail.com> wrote:
Is there a way in Ltac to denote the logical disjunction of the conditionals fed to tryif?

I have
      tryif has_evar L
      then fail
      else
        tryif has_evar R
        then fail
        else some_tac.

I wish I could write it as:
      tryif (has_evar L or has_evar R)
      then fail
      else some_tac.

Thanks,



Archive powered by MHonArc 2.6.18.

Top of Page