The assumptions behind disabling error recovery for the `apply` tactic no longer seem to hold, since tactic combinators like `first` themselves disable error recovery when it makes sense. This addresses part of #3831 Breaking change: `elabTermForApply` no longer uses `withoutRecover`. Tactics using `elabTermForApply` should evaluate whether it makes sense to wrap it with `withoutRecover`, which is generally speaking when it's used to elaborate identifiers.
20 lines
596 B
Text
20 lines
596 B
Text
example (p q r s: Prop) (h1: p -> s) (h2: q -> s) (h3: r -> s)
|
|
: ((p \/ q) -> s) /\ (r -> s) := by {
|
|
constructor <;> intro h <;>
|
|
(try (apply Or.elim h <;> intro h)) <;>
|
|
revert h <;> assumption;
|
|
}
|
|
|
|
example (p q r s: Prop) (h1: p -> s) (h2: q -> s) (h3: r -> s)
|
|
: ((p \/ q) -> s) /\ (r -> s) := by {
|
|
constructor <;> intro h <;>
|
|
(try (apply h.elim <;> intro h)) <;>
|
|
revert h <;> assumption;
|
|
}
|
|
|
|
/-!
|
|
Verify that `withoutRecover` is not necessary for `apply`.
|
|
This is because `first` enables it itself.
|
|
-/
|
|
example (p : Prop) (h : p) : p := by
|
|
first | apply bogusTerm | assumption
|