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/Prime/L03_Dvd.lean

30 lines
729 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.Tactic.Ring
Game "TestGame"
World "Prime"
Level 3
Title "Teilbarkeit"
Introduction
"
Die Aussage \"$m$ teilt $n$.\" wird in Lean als `m | n` (`\\|`) geschrieben.
**Wichtig:** `` (Teilbarkeit) ist ein spezielles Unicode Symbol, das nicht dem
senkrechten Strich auf der Tastatur (`|`) entspricht. Man erhält es mit `\\|`.
`m n` bedeutet `∃ c, n = m * c`, das heisst, man kann damit genau gleich umgehen
wie mit einem `∃`-Quantifier.
"
Statement dvd_add
"Wenn $m$ ein Teiler von $n$ und $k$ ist, dann teilt es die Summe."
(n m k : ) (h : m n) (g : m k) : m n + k := by
rcases h with ⟨x, h⟩
rcases g with ⟨y, g⟩
use x + y
rw [h, g]
ring