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/Induction/L04_SumOdd.lean

31 lines
518 B
Plaintext

2 years ago
import TestGame.Metadata
import Mathlib.Tactic.Ring
import Mathlib
Game "TestGame"
World "Induction"
Level 4
Title "Bernoulli Ungleichung"
Introduction
"
Hier nochmals eine Übung zur Induktion.
"
2 years ago
open BigOperators
2 years ago
Statement
"Zeige folgende Gleichung zur Summe aller ungeraden Zahlen:
$\\sum_{i = 0}^n (2n + 1) = n ^ 2$."
(n : ) : (∑ i : Fin n, (2 * (i : ) + 1)) = n ^ 2 := by
induction' n with n hn
simp
2 years ago
rw [Fin.sum_univ_castSucc]
simp
rw [hn, Nat.succ_eq_add_one]
ring
2 years ago
NewTactics ring