# Ltac2 reference?

**URL:** <https://discourse.rocq-prover.org/t/ltac2-reference/622>\
**Category:** Using Rocq\
**Created:** [February 16, 2020, 1:35am UTC](https://discourse.rocq-prover.org/t/ltac2-reference/622 "2020-02-16T01:35:03Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![lilred](https://avatars.discourse-cdn.com/v4/letter/l/aca169/32.png) [@lilred](https://discourse.rocq-prover.org/u/lilred)\
**Post date:** [February 16, 2020, 1:35am UTC](https://discourse.rocq-prover.org/t/ltac2-reference/622/1 "2020-02-16T01:35:03Z")

</div>

I entered `Require Import Ltac2.Ltac2` and it broke a bunch of stuff in my Coq script, for example `easy` and `intuition` invocations. I’m aware that I can use `ltac1:(...)` to make it work, but I’m guessing that this is not the “blessed” way to do things in Ltac2? If so I would love to learn more about Ltac2. Where should I start?

Thank you in advance.

---

<div class="post-metadata">

**Author:** ![Zimmi48](https://sea1.discourse-cdn.com/flex001/user_avatar/discourse.rocq-prover.org/zimmi48/32/7_2.png) [@Zimmi48](https://discourse.rocq-prover.org/u/Zimmi48)\
**Post date:** [February 19, 2020, 6:32pm UTC](https://discourse.rocq-prover.org/t/ltac2-reference/622/2 "2020-02-19T18:32:36Z")

</div>

Hi,

The only documentation of Ltac2 so far is the one in the reference manual: [Ltac2 — Coq 8.18.0 documentation](https://coq.inria.fr/refman/proof-engine/ltac2.html)

One important point that I want to attract your attention to is the following one: [Ltac2 — Coq 8.18.0 documentation](https://coq.inria.fr/refman/proof-engine/ltac2.html#switching-between-ltac-languages)

> We recommend using the [`Default Proof Mode`](https://coq.inria.fr/refman/proof-engine/proof-handling.html#coq:opt.default-proof-mode) option to switch between tactic languages with a proof-based granularity. This allows to incrementally port the proof scripts.

In particular, calling `Set Default Proof Mode "Classic".` will allow you to write some Ltac1 scripts including all the tactics you are used to and `Set Default Proof Mode "Ltac2".` will allow you to switch to a fully Ltac2 mode. Even in “Classic” (Ltac1) mode, you can rely on the tactics you have defined using Ltac2 constructs. You can bind them in `Tactic Notations`.

A number of tactics are not exported as syntax in the Ltac2 plugin yet: you are encouraged to open issues every time you encounter an example of this. As a workaround, you can use `Ltac2 Notation` to redefine the syntax for these existing but unexported tactics.

Thank you for testing Ltac2!

---

<div class="post-metadata">

**Author:** ![tchajed](https://sea1.discourse-cdn.com/flex001/user_avatar/discourse.rocq-prover.org/tchajed/32/51_2.png) [@tchajed](https://discourse.rocq-prover.org/u/tchajed)\
**Post date:** [February 26, 2020, 12:58pm UTC](https://discourse.rocq-prover.org/t/ltac2-reference/622/3 "2020-02-26T12:58:44Z")

</div>

I’ve also been learning Ltac2 and documenting a number of experiments here: [https://github.com/tchajed/coq-ltac2-experiments](https://github.com/tchajed/coq-ltac2-experiments).

I haven’t yet written up a guide to Ltac2, but you’ll at least find more code examples.

---

<div class="post-metadata">

**Author:** ![Zimmi48](https://sea1.discourse-cdn.com/flex001/user_avatar/discourse.rocq-prover.org/zimmi48/32/7_2.png) [@Zimmi48](https://discourse.rocq-prover.org/u/Zimmi48)\
**Post date:** [February 26, 2020, 1:31pm UTC](https://discourse.rocq-prover.org/t/ltac2-reference/622/4 "2020-02-26T13:31:20Z")

</div>

BTW, feel free to contribute to improving the reference manual, for instance by adding more examples!

---

<div class="post-metadata">

**Author:** ![tchajed](https://sea1.discourse-cdn.com/flex001/user_avatar/discourse.rocq-prover.org/tchajed/32/51_2.png) [@tchajed](https://discourse.rocq-prover.org/u/tchajed)\
**Post date:** [March 24, 2020, 6:39pm UTC](https://discourse.rocq-prover.org/t/ltac2-reference/622/5 "2020-03-24T18:39:44Z")

</div>

I actually did write an Ltac2 tutorial, if you’re interested in a guided tour through a few features: [https://github.com/tchajed/ltac2-tutorial](https://github.com/tchajed/ltac2-tutorial).
