|
1 | 1 | # Tactics |
2 | 2 |
|
3 | | -Mathlib version: `6a263ebffc52b615a6cda0fc9a15d3879d674d10` |
| 3 | +Mathlib version: `90f5d6d994d62d023ec24dc2fac75d053e04c801` |
4 | 4 |
|
5 | 5 | ## \#adaptation_note |
6 | 6 | Defined in: `«tactic#adaptation_note_»` |
@@ -1061,8 +1061,11 @@ Defined in: `byContra!` |
1061 | 1061 | If the target of the main goal is a proposition `p`, |
1062 | 1062 | `by_contra!` reduces the goal to proving `False` using the additional hypothesis `this : ¬ p`. |
1063 | 1063 | `by_contra! h` can be used to name the hypothesis `h : ¬ p`. |
1064 | | -The hypothesis `¬ p` will be negation normalized using `push_neg`. |
| 1064 | +The hypothesis `¬ p` will be normalized using `push_neg`. |
1065 | 1065 | For instance, `¬ a < b` will be changed to `b ≤ a`. |
| 1066 | +`by_contra!` can be used with `rcases` patterns. |
| 1067 | +For instance, `by_contra! rfl` on `⊢ s.Nonempty` will substitute the equality `s = ∅`, |
| 1068 | +and `by_contra! ⟨hp, hq⟩` on `⊢ ¬ p ∨ ¬ q` will introduce `hp : p` and `hq : q`. |
1066 | 1069 | `by_contra! h : q` will normalize negations in `¬ p`, normalize negations in `q`, |
1067 | 1070 | and then check that the two normalized forms are equal. |
1068 | 1071 | The resulting hypothesis is the pre-normalized form, `q`. |
@@ -2719,15 +2722,15 @@ Patterns can be used like in the `intro` tactic. Example, given a goal |
2719 | 2722 | Defined in: `Mathlib.Tactic.GCongr.tacticGcongr___With___` |
2720 | 2723 |
|
2721 | 2724 | The `gcongr` tactic applies "generalized congruence" rules, reducing a relational goal |
2722 | | -between a LHS and RHS. For example, |
| 2725 | +between an LHS and RHS. For example, |
2723 | 2726 | ``` |
2724 | 2727 | example {a b x c d : ℝ} (h1 : a + 1 ≤ b + 1) (h2 : c + 2 ≤ d + 2) : |
2725 | 2728 | x ^ 2 * a + c ≤ x ^ 2 * b + d := by |
2726 | 2729 | gcongr |
2727 | 2730 | · linarith |
2728 | 2731 | · linarith |
2729 | 2732 | ``` |
2730 | | -This example has the goal of proving the relation `≤` between a LHS and RHS both of the pattern |
| 2733 | +This example has the goal of proving the relation `≤` between an LHS and RHS both of the pattern |
2731 | 2734 | ``` |
2732 | 2735 | x ^ 2 * ?_ + ?_ |
2733 | 2736 | ``` |
|
0 commit comments