Complete solver for strict orders (transitive+irreflexive relations) for Rocq.
The solver works for any relation that implements the Transitive and Irreflexive classes. These are implicitly implemented if you instead implement the StrictOrder class.
To invoke the solver, use strict_order rel, where rel is your strict order relation.
The solver will close the goal in two cases:
- If your goal is of the form
rel a band it is provable from yourrel c dpremises - If your
rel c dpremises lead to a contradiction
See Tests.v for example usages and supported use-cases.
From Ltac2 Require Import Ltac2.
From StrictOrderSolver Require Import Solver.
From Stdlib Require Import Classes.RelationClasses.
Axiom rel : nat -> nat -> Prop.
Instance SO : StrictOrder rel. Admitted.
Goal forall a b c d e,
rel a e -> rel a b -> rel c d -> rel b c -> rel a d.
Proof.
intros.
strict_order rel.
Qed.- Add the Rocq opam repository
opam repo add rocq-released https://rocq-prover.org/opam/released- Install as a dependency (or add
strict-order-solverto yourdune-project/.opamfile)
opam install strict-order-solver- Add
StrictOrderSolverto your Rocq theories (in dune, it is therocq.theory (theories)stanza)