-
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
30 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import Mathlib.Tactic.GCongr | ||
|
||
variable (a b c d: Nat) | ||
|
||
-- ANCHOR: first | ||
example (h1 : a ≤ b) (h2 : c ≤ d) : a + c ≤ b + d := by | ||
rel [h1, h2] | ||
-- ANCHOR_END: first | ||
|
||
|
||
-- ANCHOR: guess | ||
example (x: Int) (h1 : a ≤ b) : x ^ 2 * a ≤ x ^ 2 * b := by | ||
rel [h1] | ||
-- ANCHOR_END: guess |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# rel | ||
|
||
needs: `import Mathlib.Tactic.GCongr` | ||
|
||
`rel` は,不等式を代入して適用し,不等式を示します.関係(relation)を示すことからその名前があるようです. | ||
|
||
```lean | ||
{{#include ../Examples/Rel.lean:first}} | ||
``` | ||
|
||
`rel` は,たとえば整数 `x: Int` に対して `0 ≤ x ^ 2` であることを自動的に適用するなど, 多少の推論を行います. | ||
|
||
```lean | ||
{{#include ../Examples/Rel.lean:guess}} | ||
``` |