-
Notifications
You must be signed in to change notification settings - Fork 1
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
5 changed files
with
134 additions
and
6 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
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,20 @@ | ||
import ConcreteSemantics.SmallStep | ||
import Mathlib.Logic.Relation | ||
|
||
/-- コマンドと状態を組にしたもの。configuration -/ | ||
abbrev Config := Stmt × State | ||
|
||
/-- SmallStep の二項関係バージョン -/ | ||
abbrev smallStepBin (conf₁ conf₂ : Config) : Prop := SmallStep conf₁.1 conf₁.2 conf₂.1 conf₂.2 | ||
|
||
open Relation | ||
|
||
/-- `smallStepBin` という二項関係の反射的推移的閉包 -/ | ||
def smallStepStar : Config → Config → Prop := ReflTransGen smallStepBin | ||
|
||
@[inherit_doc] infix:30 " ⇒* " => smallStepStar | ||
|
||
#check sillyLoop | ||
|
||
example : (sillyLoop, (fun _ => 0)["x" ↦ 1]) ⇒* (skip, (fun _ => 0)) := by | ||
sorry |
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 @@ | ||
/- # small step に応用するための aesop ラッパーを作る | ||
`aesop` をカスタマイズして、`small_step` というタクティクを作成する。 | ||
-/ | ||
import Aesop | ||
|
||
-- SmallStepRules という名前のルールセットを登録する | ||
declare_aesop_rule_sets [SmallStepRules] | ||
|
||
/-- `SmallStep` 用の aesop ラッパー -/ | ||
macro "small_step" : tactic => do `(tactic| aesop (rule_sets := [SmallStepRules])) | ||
|
||
/-- `small_step` が使用した補題を生成する -/ | ||
macro "small_step?" : tactic => `(tactic| aesop? (rule_sets := [SmallStepRules])) |
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