Skip to content

Commit f6f330e

Browse files
authored
Merge pull request #525 from Seasawher/auto-update-branch
2 parents aea7bb3 + 048f940 commit f6f330e

File tree

5 files changed

+26
-24
lines changed

5 files changed

+26
-24
lines changed

docs/attributes.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Attributes
22

3-
Mathlib version: `de7ac7cb70710498104300af3c811b05efbb48c6`
3+
Mathlib version: `ac48e6adc8b30cd28a5e3d428a25300457ae7243`
44

55
## Std.Internal.tree_tac
66
simp theorems used by internal DTreeMap lemmas
@@ -784,6 +784,11 @@ or more generally of the form `∀ i h h' j h'', f₁ i j ≈ f₂ i j` (say) fo
784784
pair `f₁`/`f₂`. (Other antecedents are considered to generate "side goals".) The index of the
785785
"varying argument" pair corresponding to each "main" antecedent is recorded.
786786
787+
If a lemma such as `add_le_add : a ≤ b → c ≤ d → a + c ≤ b + d` has been tagged with `gcongr`,
788+
then a direct consequence like `a ≤ b → a + c ≤ b + c` does *not* need to be tagged.
789+
However, if a more specific lemma has fewer side conditions, it should also be tagged with `gcongr`.
790+
For example, `mul_le_mul_of_nonneg_right` and `mul_le_mul_of_nonneg_left` are both tagged.
791+
787792
Lemmas involving `<` or `≤` can also be marked `@[bound]` for use in the related `bound` tactic.
788793
789794
## gcongr_forward

docs/commands.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Commands
22

3-
Mathlib version: `de7ac7cb70710498104300af3c811b05efbb48c6`
3+
Mathlib version: `ac48e6adc8b30cd28a5e3d428a25300457ae7243`
44

55
## \#adaptation_note
66
Defined in: `adaptationNoteCmd`

docs/options.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Options
22

3-
Mathlib version: `de7ac7cb70710498104300af3c811b05efbb48c6`
3+
Mathlib version: `ac48e6adc8b30cd28a5e3d428a25300457ae7243`
44

55
## Elab.async
66
type: `Bool`
@@ -1082,6 +1082,13 @@ default: `true`
10821082

10831083
enable the tactic analysis framework
10841084

1085+
## linter.tacticAnalysis.dummy
1086+
type: `Bool`
1087+
1088+
default: `false`
1089+
1090+
1091+
10851092
## linter.tacticAnalysis.introMerge
10861093
type: `Bool`
10871094

docs/tactics.md

Lines changed: 9 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Tactics
22

3-
Mathlib version: `de7ac7cb70710498104300af3c811b05efbb48c6`
3+
Mathlib version: `ac48e6adc8b30cd28a5e3d428a25300457ae7243`
44

55
## \#adaptation_note
66
Defined in: `«tactic#adaptation_note_»`
@@ -2888,24 +2888,8 @@ A macro for a common simplification when rewriting with ghost component equation
28882888
## grewrite
28892889
Defined in: `Mathlib.Tactic.grewriteSeq`
28902890

2891-
`grewrite [e]` works just like `rewrite [e]`, but `e` can be a relation other than `=` or ``.
2892-
2893-
For example,
2894-
```lean
2895-
variable {a b c d n : ℤ}
2896-
2897-
example (h₁ : a < b) (h₂ : b ≤ c) : a + d ≤ c + d := by
2898-
grewrite [h₁, h₂]; rfl
2899-
2900-
example (h : a ≡ b [ZMOD n]) : a ^ 2 ≡ b ^ 2 [ZMOD n] := by
2901-
grewrite [h]; rfl
2902-
2903-
example (h₁ : a ∣ b) (h₂ : b ∣ a ^ 2 * c) : a ∣ b ^ 2 * c := by
2904-
grewrite [h₁] at *
2905-
exact h₂
2906-
```
2907-
To be able to use `grewrite`, the relevant lemmas need to be tagged with `@[gcongr]`.
2908-
To rewrite inside a transitive relation, you can also give it an `IsTrans` instance.
2891+
`grewrite [e]` is like `grw [e]`, but it doesn't try to close the goal with `rfl`.
2892+
This is analogous to `rw` and `rewrite`, where `rewrite` doesn't try to close the goal with `rfl`.
29092893

29102894
## grind
29112895
Defined in: `Lean.Parser.Tactic.grind`
@@ -3228,6 +3212,9 @@ example (h₁ : a ∣ b) (h₂ : b ∣ a ^ 2 * c) : a ∣ b ^ 2 * c := by
32283212
grw [h₁] at *
32293213
exact h₂
32303214
```
3215+
To rewrite only in the `n`-th position, use `nth_grw n`.
3216+
This is useful when `grw` tries to rewrite in a position that is not valid for the given relation.
3217+
32313218
To be able to use `grw`, the relevant lemmas need to be tagged with `@[gcongr]`.
32323219
To rewrite inside a transitive relation, you can also give it an `IsTrans` instance.
32333220

@@ -6053,6 +6040,9 @@ built in for `push Not`, so that it can preserve binder names, and so that `¬ (
60536040
transformed to either `p → ¬ q` (the default) or `¬ p ∨ ¬ q`. To get `¬ p ∨ ¬ q`, use
60546041
`set_option push_neg.use_distrib true`.
60556042

6043+
Tactics that introduce a negation usually have a version that automatically calls `push_neg` on
6044+
that negation. These include `by_cases!`, `contrapose!` and `by_contra!`.
6045+
60566046
Another example: given a hypothesis
60576047
```lean
60586048
h : ¬ ∀ ε > 0, ∃ δ > 0, ∀ x, |x - x₀| ≤ δ → |f x - y₀| ≤ ε

lake-manifest.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"type": "git",
66
"subDir": null,
77
"scope": "",
8-
"rev": "de7ac7cb70710498104300af3c811b05efbb48c6",
8+
"rev": "ac48e6adc8b30cd28a5e3d428a25300457ae7243",
99
"name": "mathlib",
1010
"manifestFile": "lake-manifest.json",
1111
"inputRev": "master",
@@ -75,7 +75,7 @@
7575
"type": "git",
7676
"subDir": null,
7777
"scope": "leanprover-community",
78-
"rev": "754186a55901dcfdfd4a15f0e4217d8dce65ac37",
78+
"rev": "091ff2379c7f0998aba1dc031a578810d44b9f3f",
7979
"name": "batteries",
8080
"manifestFile": "lake-manifest.json",
8181
"inputRev": "main",

0 commit comments

Comments
 (0)