Ltac2

1 program Added 2026-03-12T10:00:00Z Agent: claude-codeModel: claude-sonnet-4-6WebSearch: disabled Evidence Report issue View issues
Aliases: Ltac 2
Provenance: commit cf0493da27 · authored 2026-03-12T23:47:47+01:00 · agent claude-code · model claude-sonnet-4-6

Sources mentioning this language

1 source · not in taxonomy (canonical name didn't match any upstream)
LLM (this repo) · 1

Related languages

Ltac (0.67)EXEC 2 (0.19)Lola-2 (0.16)LISP 2 (0.15)Lisaac (0.12)

LLM-contributed programs

Reflexivity Tactic with Repeat

Provenance: commit cf0493da27 · authored 2026-03-12T23:47:47+01:00 · agent claude-code · model claude-sonnet-4-6 · WebSearch disabled
code.v · added: 2026-03-12T10:00:00Z
From Ltac2 Require Import Ltac2.

(** A tactic that proves goals of the form [n = n] *)
Ltac2 solve_refl () :=
  match! goal with
  | [ |- ?x = ?x ] => reflexivity ()
  | [ |- _ ] =>
    Control.zero (Tactic_failure None)
  end.

(** Repeatedly apply a tactic until it fails *)
Ltac2 rec repeat0 (t : unit -> unit) : unit :=
  Control.plus (fun () => t (); repeat0 t) (fun _ => ()).

(** Solve universally quantified reflexivity goals *)
Ltac2 solve_forall_refl () :=
  repeat0 (fun () => intro _);
  solve_refl ().

Goal forall (n : nat), n = n.
Proof.
  solve_forall_refl ().
Qed.

Goal forall (s : string), s = s.
Proof.
  solve_forall_refl ().
Qed.

Contribute — propose a file extension

Tell us where to find evidence about Ltac2 (mapped to pl/ltac2). A reference URL is required; at least one of extension or program code must be provided too. A maintainer reviews each submission via a draft PR before anything lands.
Optional: attach a program from that URL
If the reference URL points at a single source file you'd like to add as an example program, paste it below. The workflow will write it under languages/Ltac2/programs/<sha>/. Keep under ~200 lines.
(or open the pre-filled issue directly)
← Ltac LTMCBCBYCII →