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/adam/Adam/Levels/Contradiction/L06_Summary.lean

57 lines
1.8 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 Adam.Metadata
import Std.Tactic.RCases
import Mathlib.Tactic.Contrapose
import Mathlib.Tactic.Use
import Mathlib.Tactic.Ring
import Adam.ToBePorted
Game "Adam"
World "Contradiction"
Level 6
Title "Contradiction"
Introduction
"
**Du**: Sag mal Robo, das hätte ich aber auch als Widerspruch anstatt Kontraposition
beweisen können?
**Robo**: Klar. `contrapose` ist eine Kontraposition, `by_contra` ein Widerspruchsbeweis.
Probiers doch einfach!
In diesem Kapitel hast du also folgende Taktiken kennengelernt:
Als Vergleich zwischen Beweisen \"per Widerspruch\"
und \"per Kontraposition\", beweise die Gleiche Aufgabe indem
du mit `by_contra` einen Widerspruch suchst.
"
open Nat
Statement (n : ) (h : Odd (n ^ 2)) : Odd n := by
Hint "**Robo**: Fang diesmal mit `by_contra g` an!"
by_contra g
Hint "**Robo**: Jetzt würde ich einen Widerspruch zu `Odd (n ^ 2)` führen."
Hint "**Robo**: Also `suffices g : ¬ Odd (n ^ 2)`."
suffices d : ¬ Odd (n ^ 2)
contradiction
rw [←even_iff_not_odd] at *
apply even_square
assumption
DisabledTactic contrapose revert
Conclusion "**Robo**: Bravo! Hier nochmals ein Überblick, was wir jetzt alles auf diesem
Mond gelernt haben:
| | Taktik | Beispiel |
|:------|:----------------|:-------------------------------------------------------|
| 177 | `have` | Zwischenresultat annehmen. |
| 18 | `suffices` | Zwischenresultat annehmen. |
| 19 | `by_contra` | Widerspruch. (startet einen Widerspruch) |
| *3* | `contradiction` | *(Schliesst einen Widerspruchsbeweis)* |
| 20 | `contrapose` | Kontraposition. |
| *9* | `revert` | Nützlich um danach `contrapose` anzuwenden. |
"