mirror of
https://github.com/SinTan1729/lean-talk-sp24.git
synced 2024-12-25 05:18:37 -06:00
new: Added some more basic examples
This commit is contained in:
parent
a7bde3532c
commit
5e9f400cba
2 changed files with 21 additions and 0 deletions
|
@ -1,5 +1,6 @@
|
|||
-- This module serves as the root of the `«LeanTalkSP24»` library.
|
||||
-- Import modules here that should be built as part of the library.
|
||||
import «LeanTalkSP24».basics
|
||||
import «LeanTalkSP24».basics2
|
||||
import «LeanTalkSP24».infinitely_many_primes
|
||||
import «LeanTalkSP24».polynomial_over_field_dim_one
|
||||
|
|
20
LeanTalkSP24/basics2.lean
Normal file
20
LeanTalkSP24/basics2.lean
Normal file
|
@ -0,0 +1,20 @@
|
|||
import Mathlib.Tactic
|
||||
|
||||
open Finset
|
||||
|
||||
theorem sum_first_n {n : ℕ} : 2 * (range (n + 1)).sum id = n * (n + 1) := by
|
||||
induction' n with d hd
|
||||
· simp
|
||||
· rw [sum_range_succ, mul_add, hd, id.def, Nat.succ_eq_add_one]
|
||||
linarith
|
||||
|
||||
open Set
|
||||
variable {α : Type _}
|
||||
variable {s t u : Set α}
|
||||
|
||||
example : s ∪ s ∩ t = s := by
|
||||
ext x; constructor
|
||||
rintro (xs | xsti)
|
||||
· trivial
|
||||
· exact And.left xsti
|
||||
exact Or.inl
|
Loading…
Reference in a new issue