-
Notifications
You must be signed in to change notification settings - Fork 13
Closed
Labels
Description
エラーになる例。
/-
(kernel) arg #2 of 'HFS.power' has a non positive occurrence of the datatypes being declared
-/
inductive HFS : Nat → Type where
| empty : HFS 0
| power {n : Nat} : (HFS n → Prop) → HFS (n + 1)strictly positive の制約を守らないと矛盾が示せるという例
unsafe inductive Bad where
| mk : (Bad → Bad) → Bad
unsafe def Bad.toFun (b : Bad) : Bad → Bad :=
match b with
| Bad.mk f => f
unsafe def selfApply (b : Bad) : Bad := b.toFun b
unsafe def omega : Bad := selfApply (Bad.mk selfApply)
unsafe def bad_contradiction (b : Bad) : False := by
induction b
case mk f ih =>
exact ih omega
unsafe example : False := bad_contradiction omega