Commit 97038d6c by Robbert Krebbers

### Simplify `iAssumptionInv`.

parent 694425f0
 ... @@ -1871,17 +1871,14 @@ Tactic Notation "iMod" open_constr(lem) "as" "%" simple_intropattern(pat) := ... @@ -1871,17 +1871,14 @@ Tactic Notation "iMod" open_constr(lem) "as" "%" simple_intropattern(pat) := namespace [N]. To do so, we check whether for each hypothesis namespace [N]. To do so, we check whether for each hypothesis ["H":P] we can find an instance of [IntoInv P N] *) ["H":P] we can find an instance of [IntoInv P N] *) Tactic Notation "iAssumptionInv" constr(N) := Tactic Notation "iAssumptionInv" constr(N) := let rec find Γ i P := let rec find Γ i := lazymatch Γ with lazymatch Γ with | Esnoc ?Γ ?j ?P' => | Esnoc ?Γ ?j ?P' => first [(let H := constr:(_: IntoInv P' N) in first [let H := constr:(_: IntoInv P' N) in unify i j|find Γ i] unify P P'; unify i j)|find Γ i P] end in end in match goal with lazymatch goal with | |- envs_lookup_delete _ ?i (Envs ?Γp ?Γs) = Some (_, ?P, _) => | |- envs_lookup_delete _ ?i (Envs ?Γp ?Γs) = Some _ => first [is_evar i; fail 1 | env_reflexivity] first [find Γp i|find Γs i]; env_reflexivity | |- envs_lookup_delete _ ?i (Envs ?Γp ?Γs) = Some (_, ?P, _) => is_evar i; first [find Γp i P | find Γs i P]; env_reflexivity end. end. (* The argument [select] is the namespace [N] or hypothesis name ["H"] of the (* The argument [select] is the namespace [N] or hypothesis name ["H"] of the ... ...
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!