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/adam/Adam/Levels/SetTheory/L12_Insert.lean

36 lines
914 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 Adam.Metadata
import Mathlib.Data.Set.Basic
Game "Adam"
World "SetTheory"
Level 12
Title "Konkrete Mengen"
Introduction
"
Nun schauen wir uns konkrete Mengen an. Man schreibt diese mit
geschweiften Klammern: `{0, 4, 117, 3}`. Meistens muss man
den Typ explizit angeben, weil lein nicht weiss, ob man mit `Set` (Mengen)
oder `Finset` (endliche Mengen) arbeiten möchte: `({4, 9} : Set )`.
`Finset` schauen wir uns später an.
Um mit expliziten Mengen zu arbeiten, ist die Implementationsweise wichtig.
Intern ist eine Menge `{0, 9, 5, 2}` iterativ als Vereinigung von
Singletons definiert: `{0} ( {9} ( {5} {2} ))`.
Die folgende Aufgabe ist entsprechend mit `rfl` lösbar.
"
open Set
Statement
"Die Menge $\\{4, 9\\}}$ ist per Definition \\{4}\\cup\\{9\\}." :
({4, 9} : Set ) = Set.insert 4 {9} := by
rfl
NewTactic constructor intro rw assumption rcases simp tauto trivial