Skip to content

Commit

Permalink
inductive を定義するとき、where を省略しない
Browse files Browse the repository at this point in the history
  • Loading branch information
Seasawher committed Nov 13, 2024
1 parent 1f29f9f commit 40a53d5
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions LeanByExample/Reference/Declarative/AddAesopRules.lean
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,12 @@ example (P : Prop) (hp : P) : MyAnd P P := by
section --#

/-- 自前で定義したリスト -/
inductive MyList (α : Type)
inductive MyList (α : Type) where
| nil
| cons (head : α) (tail : MyList α)

/-- リストが空ではないことを表す述語 -/
inductive NonEmpty {α : Type} : MyList α → Prop
/-- リストが空ではないことを表す帰納的述語 -/
inductive NonEmpty {α : Type} : MyList α → Prop where
| cons x xs : NonEmpty (MyList.cons x xs)

local add_aesop_rules safe apply [NonEmpty.cons]
Expand Down Expand Up @@ -137,7 +137,7 @@ end --#
-/
section --#

/-- 自前で定義した偶数を表す命題 -/
/-- 自前で定義した偶数を表す帰納的述語 -/
inductive Even : Nat → Prop where
| zero : Even 0
| succ m : Even m → Even (m + 2)
Expand Down

0 comments on commit 40a53d5

Please sign in to comment.