Initial checkout
Some checks failed
Lean Action CI / build (push) Has been cancelled

This commit is contained in:
Stefan Kebekus
2025-09-15 14:41:27 +02:00
parent a7dfc781fd
commit ea169e4c3e
6 changed files with 132 additions and 2 deletions

View File

@@ -1 +1 @@
import ColloquiumLean.Basic
import ColloquiumLean.ContinuousLimitSolution

View File

@@ -1 +0,0 @@
def hello := "world"

View File

@@ -0,0 +1,22 @@
import Mathlib
open Real
-- Definition: Function (f : ) is continuous at (x₀ : )
def continuous_at (f : ) (x₀ : ) :=
ε > 0, δ > 0, x, |x - x₀| < δ |f x - f x₀| < ε
-- Definition: Sequence (u : ) converges to limit (l : )
def seq_limit (u : ) (l : ) :=
ε > 0, N, n N, |u n - l| < ε
-- In the following, f is a function, u is a sequence, and x₀ a real number
variable
{f : } {u : } {x₀ : }
lemma continuity_and_limits
(hyp_f : continuous_at f x₀) (hyp_u : seq_limit u x₀) :
seq_limit (f u) (f x₀) := by
sorry

View File

@@ -0,0 +1,35 @@
-- Library Import: Basic facts about real numbers
import Mathlib.Data.Real.Basic
open Real
-- Definition: Function (f : ) is continuous at (x₀ : )
def continuous (f : ) (x₀ : ) :=
ε > 0, δ > 0, x, |x - x₀| < δ |f x - f x₀| < ε
-- Definition: Sequence (u : ) converges to limit (l : )
def limit (u : ) (l : ) :=
ε > 0, N, n N, |u n - l| < ε
-- In the following, f is a function, u is a sequence, and x₀ a real number
variable {f : } {u : } {x₀ : }
-- Theorem: If f is continuous at x₀ and the sequence u converges to x₀, then
-- the sequence f ∘ u converges to f x₀.
theorem continuity_and_limits
(hyp_f : continuous f x₀) (hyp_u : limit u x₀) :
limit (f u) (f x₀) := by
unfold limit at *
unfold continuous at *
intro ε
obtain δ, h₁δ, h₂δ := hyp_f ε
obtain N, hN := hyp_u δ h₁δ
use N
intro n hn
apply h₂δ
apply hN
exact hn

View File

@@ -0,0 +1,35 @@
import Mathlib
open Real
variable
{x : } {y : }
-- Definition: Function (f : ) is continuous at (x₀ : )
def continuous_at (f : ) (x₀ : ) :=
ε > 0, δ > 0, x, |x - x₀| < δ |f x - f x₀| < ε
-- Three lemmas from the lean mathematical library
example : 0 < x 0 < x := sqrt_pos.2
example : x ^ 2 < y (-y < x) (x < y) := sq_lt
example : |x| < y -y < x x < y := abs_lt
-- The square function
def squareFct : := fun x x ^ 2
theorem continuous_at_squareFct :
continuous_at squareFct 0 := by
unfold continuous_at
intro e he
use e
constructor
· apply sqrt_pos.2
exact he
· intro x hx
simp_all [squareFct]
apply sq_lt.2
apply abs_lt.1
exact hx

View File

@@ -0,0 +1,39 @@
-- Library Import: Basic facts about real numbers and the root function
import Mathlib.Data.Real.Sqrt
open Real
-- In the following, x and y are real numbers
variable {x : } {y : }
-- Definition: Function (f : ) is continuous at (x₀ : )
def continuous (f : ) (x₀ : ) :=
ε > 0, δ > 0, x, |x - x₀| < δ |f x - f x₀| < ε
-- Definition: The square function
def squareFct : := fun x x ^ 2
-- Reminder: Three facts from the library that we will use.
example : 0 < x 0 < x := sqrt_pos.2
example : x ^ 2 < y (-y < x) (x < y) := sq_lt
example : |x| < y -y < x x < y := abs_lt
-- Theorem: The square function is continuous at x₀ = 0
theorem ContinuousAt_sq :
continuous squareFct 0 := by
unfold continuous
intro ε
use ε
constructor
· apply sqrt_pos.2
exact
· intro x hx
simp_all [squareFct]
apply sq_lt.2
exact abs_lt.1 hx