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

42 lines
1.0 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 Mathlib
Game "Adam"
World "Inequality"
Level 1
Title "Induktion"
set_option tactic.hygienic false
Introduction
"
Hier lernst du Induktion und Ungleichungen kennen. Beides essenziele Grundlagen, die du
für spätere Aufgaben brauchst.
Die Leantaktik `induction n` führt einen Induktionsbeweis über `(n : )`. Hier zuerst
ein abstraktes Beispiel.
"
Statement
"Sei $P(n)$ eine logische Aussage über die natürliche Zahl.
Agenommen $P(0)$ ist wahr und $P(m) \\Rightarrow P(m+1)$ für alle $m$,
dann gilt $P(n)$ für alle $n \\in \\mathbb{N}.$"
(n : ) (P : → Prop) (h_base : P 0) (h_step : ∀ m, P m → P m.succ) : P n := by
induction n
assumption
apply h_step
assumption
Hint (P : → Prop) : P Nat.zero =>
"Das ist die Induktionsverankerung, hier musst du $P(0)$ zeigen."
Hint (P : → Prop) (m : ) (hi : P m) : P (Nat.succ m) =>
"An der Stelle kommt der Beweis $P(m) \\Rightarrow P(m+1)$.
In diesem Beispiel kannst du `apply` benützen."
NewTactic induction