new: Added some more basic examples

This commit is contained in:
Sayantan Santra 2024-02-07 02:55:41 -06:00
parent a7bde3532c
commit 5e9f400cba
Signed by: SinTan1729
GPG key ID: EB3E68BFBA25C85F
2 changed files with 21 additions and 0 deletions

View file

@ -1,5 +1,6 @@
-- This module serves as the root of the `«LeanTalkSP24»` library. -- This module serves as the root of the `«LeanTalkSP24»` library.
-- Import modules here that should be built as part of the library. -- Import modules here that should be built as part of the library.
import «LeanTalkSP24».basics import «LeanTalkSP24».basics
import «LeanTalkSP24».basics2
import «LeanTalkSP24».infinitely_many_primes import «LeanTalkSP24».infinitely_many_primes
import «LeanTalkSP24».polynomial_over_field_dim_one import «LeanTalkSP24».polynomial_over_field_dim_one

20
LeanTalkSP24/basics2.lean Normal file
View 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