Commit 1ab6c843 authored by Michael Sammler's avatar Michael Sammler
Browse files

add via_vm_compute

parent 6695e9e0
Pipeline #51770 passed with stage
in 14 minutes and 13 seconds
......@@ -47,3 +47,19 @@ Class CanSolve (P : Prop) : Prop := can_solve: P.
Definition shelve_hint (P : Prop) : Prop := P.
Typeclasses Opaque shelve_hint.
Arguments shelve_hint : simpl never.
(** * [via_vm_compute]
[via_vm_compute f a] is equivalent to [f a] but tells the automation that it should
be reduced using [vm_compute]
*)
Definition via_vm_compute_def {A B} (f : A B) (x : A) : B :=
f x.
Definition via_vm_compute_aux : seal (@via_vm_compute_def). by eexists. Qed.
Definition via_vm_compute := unseal via_vm_compute_aux.
Definition via_vm_compute_eq' : @via_vm_compute = @via_vm_compute_def :=
seal_eq via_vm_compute_aux.
Arguments via_vm_compute {_ _} _ _.
Lemma via_vm_compute_eq {A B} (f : A B) x:
via_vm_compute f x = f x.
Proof. rewrite via_vm_compute_eq'. done. Qed.
......@@ -658,7 +658,13 @@ Ltac liSideCond :=
| |- ?P _ =>
lazymatch P with
| shelve_hint _ => split; [ unfold shelve_hint; shelve |]
| _ => first [ progress normalize_goal_and |
| _ => first [
match P with
| context [via_vm_compute ?f ?a] =>
rewrite (via_vm_compute_eq f a);
vm_compute (f a)
end |
progress normalize_goal_and |
lazymatch P with
| context [protected _] => first [
split; [ solve_protected_eq |]; unfold_instantiated_evars
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment