You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This PR update's @adomani's bug fix in #512 to the current manual, and
corrects a related bug — the mentions of `grind` should be `grind!`,
given that grind now has minimal-indexing and maximal-indexing variants.
Copy file name to clipboardExpand all lines: Manual/Grind/EMatching.lean
+5-5Lines changed: 5 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -685,18 +685,18 @@ axiom q : Nat → Nat
685
685
```
686
686
687
687
```lean (name := h1)
688
-
@[grind!? →] theoremh₁ (w : 7 = p (q x)) : p (x + 1) = q x := sorry
688
+
@[grind!? →] theoremh₁ (w : p (q x) = 7) : p (x + 1) = q x := sorry
689
689
```
690
690
```leanOutput h1
691
691
h₁: [q #1]
692
692
```
693
693
The pattern is `q x`.
694
694
Counting from the right, parameter `#0` is the premise `w` and parameter `#1` is the implicit parameter `x`.
695
695
696
-
Why did `@[grind →]`? select `q #1`?
697
-
The attribute `@[grind →]` finds patterns by traversing the hypotheses (that is, parameters whose types are propositions) from left to right.
698
-
In this case, there's only a single hypothesis: `7 = p (q x)`.
699
-
The heuristic described above says that {attr}`grind` will search for a minimal {tech}[indexable] subexpression which {tech}[covers] a previously uncovered parameter.
696
+
Why did `@[grind! →]`? select `q #1`?
697
+
The attribute `@[grind! →]` finds patterns by traversing the hypotheses (that is, parameters whose types are propositions) from left to right.
698
+
In this case, there's only a single hypothesis: `p (q x) = 7`.
699
+
The heuristic described above says that {attr}`grind!` will search for a minimal {tech}[indexable] subexpression which {tech}[covers] a previously uncovered parameter.
700
700
There's just one uncovered parameter, namely `x`.
701
701
The whole hypothesis `p (q x) = 7` can't be used because {tactic}`grind` will not index on equality.
702
702
The right-hand side `7` is not helpful, because it doesn't determine the value of `x`.
0 commit comments