You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
TacticNotation "lhs" tactic3(tac) :=
let R := match goal with |- ?R _ _ => constr:(R) endinlet pre_transitivity_proof_term_head := constr:(_ : Transitive R) inlet transitivity_proof_term_head := (eval hnf in pre_transitivity_proof_term_head) in
nrefine (pre_transitivity_proof_term_head _ _ _ ltac:(tac) _).
It didn't work out too well for the following reasons:
Doing a typeclass search every time is a lot of wasted work.
In some situations we implicitly assume that the goal will resolve to paths.
The universe levels cause unification issues.
The proof terms are a bit more complex.
My next suggestion would be to hard code the transitivity proofs for each kind of relation we want this to work on in order to solve (1) but then we get stuck on (2).
(3) is really tricky to understand when things go wrong.
(4) isn't great as Coq spends more and more time unfolding terms that it shouldn't need to.
We could instead introduce variants of lhs like lhsE for Equiv, lhsC` for wildcat etc. That way we wouldn't have issues 1-4, however then we would have even more tactics.
These tactics currently operate on one side of a path type, but should be adapted to work for other transitive relations, such as
$==
,==
,<~>
, etc.The text was updated successfully, but these errors were encountered: