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/Sum/L05_SumComm.lean

37 lines
768 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 TestGame.Options.BigOperators
import Mathlib.Algebra.BigOperators.Fin
import Mathlib.Tactic.Ring
import TestGame.Options.ArithSum
set_option tactic.hygienic false
open BigOperators
Game "TestGame"
World "Sum"
Level 5
Title "Summe vertauschen"
Introduction
"
Verschachtelte endliche Summen kann man beliebig tauschen.
$$\\sum_{i=0}^n\\sum_{j=0}^m a_{ij} = \\sum_{j=0}^m\\sum_{i=0}^n a_{ij}$$
Dieses Lemma heisst `Finset.sum_comm`
"
Statement
"Zeige dass
$\\sum_{i=0}^n\\sum_{j=0}^m 2^i (1 + j) = \\sum_{j=0}^m\\sum_{i=0}^n 2^i (1 + j)$."
(n m : ) : ∑ i : Fin n, ∑ j : Fin m, ( 2^i * (1 + j) : ) =
∑ j : Fin m, ∑ i : Fin n, ( 2^i * (1 + j) : ) := by
rw [Finset.sum_comm]
NewLemmas Finset.sum_comm