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/Implication/L06_Iff.lean

44 lines
1.2 KiB
Plaintext

2 years ago
import TestGame.Metadata
Game "TestGame"
World "Implication"
Level 6
2 years ago
Title "Genau dann wenn"
Introduction
"
Genau-dann-wenn, $A \\Leftrightarrow B$, wird als `A ↔ B` (`\\iff`) geschrieben.
`A ↔ B` ist eine Struktur (ähnlich wie das logische UND), die aus zwei Teilen besteht:
2 years ago
- `mp`: die Implikation $A \\Rightarrow B$.
- `mpr`: die Implikation $B \\Rightarrow A$.
Hat man ein $\\Leftrightarrow$ im Goal, nimmt man dieses ebenfalls mit der Taktik
`constructor` auseinander und zeigt dann beide Richtungen einzeln.
2 years ago
"
Statement
"Zeige dass `B ↔ C`."
2 years ago
(A B : Prop) (mp : A → B) (mpr : B → A) : A ↔ B := by
constructor
assumption
assumption
Hint (A : Prop) (B : Prop) : A ↔ B =>
"Eine Struktur wie `A ↔ B` kann man mit `constructor` zerlegen."
Hint (A : Prop) (B : Prop) (h : A → B) : A → B =>
"Such mal in den Annahmen."
2 years ago
Conclusion
"
Die Taktik `constructor` heisst so, weil `↔` als \"Struktur\" definiert ist, die
aus mehreren Einzelteilen besteht: `⟨A → B, B → A⟩`. Man sagt also Lean, es soll versuchen,
ob das Goal aus solchen Einzelteilen \"konstruiert\" werden kann.
"
2 years ago
Tactics constructor assumption
2 years ago
-- TODO : `case mpr =>` ist mathematisch noch sinnvoll.