Skip to content

Commit

Permalink
linarith 追加
Browse files Browse the repository at this point in the history
  • Loading branch information
Seasawher committed Sep 23, 2023
1 parent 38e3a90 commit ec4e23f
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 0 deletions.
10 changes: 10 additions & 0 deletions Examples/Linarith.lean
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import Mathlib.Tactic.Linarith

import Std.Data.Rat

variable (x y z : ℚ)

-- ANCHOR: first
example (h1 : 2 * x < 3 * y) (h2 : -4 * x + 2 * z < 0): 12 * y - 4 * z ≥ 0 := by
linarith
-- ANCHOR_END: first
1 change: 1 addition & 0 deletions src/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
- [induction: 帰納法](./induction.md)
- [intro: 含意→や全称∀を示す](./intro.md)
- [left, right: 論理和∨を示す](./left_right.md)
- [linarith: 線形不等式を示す](./linarith.md)
- [rel: 不等式を使う](./rel.md)
- [rfl: 定義そのまま](./rfl.md)
- [ring: 環の等式を示す](./ring.md)
Expand Down
9 changes: 9 additions & 0 deletions src/linarith.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# linarith

needs: `import Mathlib.Tactic.Linarith`

`linarith` は線形算術(linear arithmetic)からその名前があると考えられるタクティクです.ローカルコンテキストの仮定を読んで,線形な不等式を導くことができます.

```lean
{{#include ../Examples/Linarith.lean:first}}
```

0 comments on commit ec4e23f

Please sign in to comment.