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/Negation/L04_Contra.lean

36 lines
1.1 KiB
Plaintext

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

import TestGame.Metadata
import Std.Tactic.RCases
import Mathlib.Tactic.LeftRight
Game "TestGame"
World "Predicate"
Level 2
Title "Widerspruch"
Introduction
"
Im weiteren kann man auch Widersprüche erhalten, wenn man Annahmen der Form
`A ≠ A` (`\\ne`) hat, oder Aussagen der Form
`A = B` hat, wo Lean weiss, dass `A` und `B` unterschiedlich sind, wie zum Beispiel `0 = 1` in ``.
*Bemerkung:* `X ≠ Y` muss man als `¬ (X = Y)` lesen, und auch so behandeln.
"
Statement
"Angenommen man hat $a = b = c$ und $a \\ne c$ natürliche Zahlen $a, b, c$.
Zeige, dass man daraus jede beliebige Aussage beweisen kann."
(A : Prop) (a b c : ) (g₁ : a = b) (g₂ : b = c) (h : a ≠ c) : A := by
rw [g₁] at h
contradiction
Message (A : Prop) (a : ) (b : ) (c : ) (g₁ : a = b) (g₂ : b = c) (h : a ≠ c) : A =>
"Benütze `rw [...] at ...` um zwei Aussagen zu bekommen die genau das Gegenteil
aussagen."
Hint (A : Prop) (a : ) (b : ) (g₁ : a = b) (h : a ≠ b) : A =>
"`X ≠ Y` muss man als `¬ (X = Y)` lesen. Deshalb findet `contradiction` hier direkt
einen Widerspruch."
Tactics contradiction