FissoreD / coq-elpi

Coq plugin embedding elpi
GNU Lesser General Public License v2.1
0 stars 0 forks source link

Force links when input of a subsequent premise #6

Closed FissoreD closed 1 month ago

FissoreD commented 1 month ago
TC.Pending_mode "+".
Class A (i: nat -> nat -> nat).

Global Hint Mode A + : typeclass_instances.

Axiom (f : nat -> nat -> nat).
Instance instA: A f := {}.

Class B (i: nat).
Instance instB : forall R, A R -> forall x y, B (R x y) := {}.

Goal B (f 2 3).
  apply _.
Qed.

The problem:

  1. R x y is a potential beta producing the link $X =_\beta R\ x\ y$
  2. This link is not triggered, when $X$ is assigned to f 2 3 since we still hope someone "correctily" instantiate $R$
  3. $R$ is still flexible and the recursive call $A\ R` is made
  4. The first arg of $A$ should be not flexible
  5. Here the failure...
FissoreD commented 1 month ago

here the test