Skip to content

Commit

Permalink
refine 追加
Browse files Browse the repository at this point in the history
  • Loading branch information
Seasawher committed Sep 24, 2023
1 parent 7fd9b06 commit b5de393
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 0 deletions.
1 change: 1 addition & 0 deletions Examples.lean
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import Examples.Induction
import Examples.Intro
import Examples.LeftRight
import Examples.Linarith
import Examples.Refine
import Examples.Rel
import Examples.Rfl
import Examples.Ring
Expand Down
12 changes: 12 additions & 0 deletions Examples/Refine.lean
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
variable (P Q : Prop)

-- ANCHOR: first
example (hP: P) (hQ: Q) : P ∧ Q := by
-- 穴埋め形式で証明を作ることができる
refine ⟨?_, hQ⟩

-- ゴールが `⊢ P` になる
show P

exact hP
-- ANCHOR_END: first
1 change: 1 addition & 0 deletions src/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
- [intro: 含意→や全称∀を示す](./intro.md)
- [left, right: 論理和∨を示す](./left_right.md)
- [linarith: 線形不等式を示す](./linarith.md)
- [refine: プレースホルダを使う](./refine.md)
- [rel: 不等式を使う](./rel.md)
- [rfl: 定義そのまま](./rfl.md)
- [ring: 環の等式を示す](./ring.md)
Expand Down
7 changes: 7 additions & 0 deletions src/refine.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# refine

`refine``exact` と同様に機能しますが,プレースホルダを受け入れて新しいゴールを生成するという違いがあります.

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

0 comments on commit b5de393

Please sign in to comment.