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/L01_Induction.lean

38 lines
694 B
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 Mathlib
set_option tactic.hygienic false
Game "TestGame"
World "Induction"
Level 1
Title "Induktion"
Introduction
"
Dieses Kapitel enthält noch ein paar Übungen zur Induktion.
"
Statement
"Zeige dass $5^n + 7$ durch $4$ teilbar ist."
(n : ) : 4 5^n + 7 := by
induction n
simp
rcases n_ih
rw [Nat.pow_succ, Nat.mul_succ, add_assoc, h, mul_comm, ←mul_add]
simp
--NewLemmas Nat.pow_succ, Nat.mul_succ, add_assoc, mul_comm, ←mul_add
-- example (n : ) : Even (n^2 + n) := by
-- induction n
-- simp
-- rw [Nat.succ_eq_add_one]
-- rcases n_ih with ⟨x, h⟩
-- use x + n_1 + 1
-- ring_nf at *
-- rw [←h]
-- ring