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/Inequality/L03_Pos.lean

55 lines
1.3 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
Game "TestGame"
World "Inequality"
Level 3
Title "Kleinergleich"
Introduction
"
Es gibt zwei intrinsische Möglichkeiten, zu sagen dass `(n : )` nicht Null ist:
`n ≠ 0` oder `0 < n`.
Das folgende Lemma kannst du immer brauchen um zwischen den beiden zu wechseln.
Note: `0 < n` wird in Lemmanamen oft mit `_pos` beschrieben anstatt `zero_lt`, siehe z.B.
`Nat.succ_pos`.
"
Statement zero_lt_iff
"$0 < n$ und $n \\ne 0$ sind äquivalente Aussagen."
(n : ) : 0 < n ↔ n ≠ 0 := by
constructor
intro h
by_contra g
rw [g] at h
contradiction
intro h
induction n
contradiction
apply Nat.succ_pos
NewLemmas Nat.succ_pos
Hint (n : ) (h : 0 < n) : n ≠ 0 =>
"An dieser Stelle fürst du am besten einen Beweis durch Widerspruch."
HiddenHint (n : ) (h : 0 < n) : n ≠ 0 =>
"Das macht man mit `by_contra`."
Hint (n : ) (h : 0 < n) (g : n = 0) : False =>
"Brauche `rw [_] at _` um eine Annahme `0 < 0` zu erzeugen."
HiddenHint (h : 0 < 0) : False =>
"Mit `contradiction` schliesst du den Widerspruchsbeweis."
Hint (n : ) (h : n ≠ 0) : 0 < n =>
"Diese Richtung beweist du am besten per Induktion."
HiddenHint (n : ) (h : n ≠ 0) : 0 < n =>
"Starte mit `induction n`."
Hint (m : ) : 0 < Nat.succ m =>
"Hier kannst du das Lemma `Nat.succ_pos` anwenden."