You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
lean4game/server/testgame/TestGame/Levels/LeftOvers/L14_NotNot.lean

34 lines
908 B
Plaintext

2 years ago
import TestGame.Metadata
import Mathlib
Game "TestGame"
World "Implication"
Level 20
2 years ago
Title "Nicht-nicht"
2 years ago
Introduction
"
Wenn man ein Nicht (`¬`) im Goal hat, will man meistens einen Widerspruch starten,
wie im nächsten Level dann gezeigt wird. Manchmal aber hat man Terme der Form
2 years ago
`¬ (¬ A)`, in welchem Fall das Lemma `not_not` nützlich ist, welches du mit
`rw` oder `apply` benützen kannst.
2 years ago
"
Statement
2 years ago
"Zeige, dass $\\neg(\\neg A)$ äquivalent zu $A$ ist."
(A : Prop) : ¬ (¬ A) ↔ A := by
rw [not_not]
2 years ago
2 years ago
Message (A : Prop) : ¬ (¬ A) ↔ A => "Da `not_not` ein Lemma der Form `X ↔ Y` ist,
kannst du wahlweise `rw [not_not]` oder `apply not_not` benützen.
- `rw` ersetzt `¬ (¬ A)` mit `A` und schliesst dann `A ↔ A` mit `rfl`.
- `apply` hingegen funktioniert hier nur, weil das gesamte Goal
genau mit der Aussage des Lemmas übereinstimmt.
"
Tactics rw apply
2 years ago
Lemmas not_not