Files
NNG/Game/Levels/Multiplication/Level_1.lean
2023-08-11 15:06:01 +02:00

38 lines
769 B
Lean4
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import Game.MyNat.Multiplication
import Game.Levels.Addition
World "Multiplication"
Level 1
Title "zero_mul"
open MyNat
Introduction
"
As a side note, the lemmas about addition are still available in your inventory
in the lemma tab \"Add\" while the new lemmas about multiplication appear in the
tab \"Mul\".
We are given `mul_zero`, and the first thing to prove is `zero_mul`.
Like `zero_add`, we of course prove it by induction.
"
/-- For all natural numbers $m$, we have $ 0 \\cdot m = 0$. -/
Statement MyNat.zero_mul
(m : ) : 0 * m = 0 := by
induction m
· rw [mul_zero]
rfl
· rw [mul_succ]
rw [n_ih]
Branch
simp
rw [add_zero]
rfl
NewTactic simp
NewLemma MyNat.mul_zero MyNat.mul_succ
NewDefinition Mul
LemmaTab "Mul"