diff --git a/common/Common/Sequence/Arithmetic.tex b/common/Common/Sequence/Arithmetic.tex index e8d6223..1f8d833 100644 --- a/common/Common/Sequence/Arithmetic.tex +++ b/common/Common/Sequence/Arithmetic.tex @@ -3,6 +3,11 @@ \usepackage{hyperref} \newtheorem{theorem}{Theorem} +\newtheorem{custominner}{Theorem} +\newenvironment{custom}[1]{% + \renewcommand\thecustominner{#1}% + \custominner +}{\endcustominner} \begin{document} diff --git a/common/Common/Sequence/Geometric.tex b/common/Common/Sequence/Geometric.tex index 5aea705..bfba35a 100644 --- a/common/Common/Sequence/Geometric.tex +++ b/common/Common/Sequence/Geometric.tex @@ -3,6 +3,11 @@ \usepackage{hyperref} \newtheorem{theorem}{Theorem} +\newtheorem{custominner}{Theorem} +\newenvironment{custom}[1]{% + \renewcommand\thecustominner{#1}% + \custominner +}{\endcustominner} \begin{document} diff --git a/mathematical-introduction-logic/Enderton/Chapter0.tex b/mathematical-introduction-logic/Enderton/Chapter0.tex index c69f9af..95133b9 100644 --- a/mathematical-introduction-logic/Enderton/Chapter0.tex +++ b/mathematical-introduction-logic/Enderton/Chapter0.tex @@ -3,6 +3,11 @@ \usepackage{hyperref} \newtheorem{theorem}{Theorem} +\newtheorem{custominner}{Theorem} +\newenvironment{custom}[1]{% + \renewcommand\thecustominner{#1}% + \custominner +}{\endcustominner} \begin{document} diff --git a/one-variable-calculus/Apostol.lean b/one-variable-calculus/Apostol.lean index e99d3a6..d056714 100644 --- a/one-variable-calculus/Apostol.lean +++ b/one-variable-calculus/Apostol.lean @@ -1 +1 @@ -def hello := "world" \ No newline at end of file +import Apostol.Chapter_I_3_10 diff --git a/one-variable-calculus/Apostol/Chapter_I_3_10.lean b/one-variable-calculus/Apostol/Chapter_I_3_10.lean new file mode 100644 index 0000000..494a93b --- /dev/null +++ b/one-variable-calculus/Apostol/Chapter_I_3_10.lean @@ -0,0 +1,60 @@ +import Mathlib.Data.PNat.Basic +import Mathlib.Data.Real.Basic +import Mathlib.Order.Basic +import Mathlib.Tactic.LibrarySearch + +#check Archimedean + +namespace Real + +/-- +Every real should be less than or equal to the absolute value of its ceiling. +-/ +lemma leq_nat_abs_ceil_self (x : ℝ) : x ≤ Int.natAbs ⌈x⌉ := by + by_cases h : x ≥ 0 + · let k : ℤ := ⌈x⌉ + unfold Int.natAbs + have k' : k = ⌈x⌉ := rfl + rw [←k'] + have _ : k ≥ 0 := by -- Hint for match below + rw [k', ge_iff_le] + exact Int.ceil_nonneg (ge_iff_le.mp h) + match k with + | Int.ofNat m => calc x + _ ≤ ⌈x⌉ := Int.le_ceil x + _ = Int.ofNat m := by rw [←k'] + · have h' : ((Int.natAbs ⌈x⌉) : ℝ) ≥ 0 := by simp + calc x + _ ≤ 0 := le_of_lt (lt_of_not_le h) + _ ≤ ↑(Int.natAbs ⌈x⌉) := GE.ge.le h' + +/-- +Theorem 1.29 + +For every real `x` there exists a positive integer `n` such that `n > x`. +-/ +theorem exists_pnat_geq_self (x : ℝ) : ∃ n : ℕ+, ↑n > x := by + let x' : ℕ+ := ⟨Int.natAbs ⌈x⌉ + 1, by simp⟩ + have h : x < x' := calc x + _ ≤ Int.natAbs ⌈x⌉ := leq_nat_abs_ceil_self x + _ < ↑↑(Int.natAbs ⌈x⌉ + 1) := by simp + _ = x' := rfl + exact ⟨x', h⟩ + +/-- +Theorem 1.30 + +If `x > 0` and if `y` is an arbitrary real number, there exists a positive +integer `n` such that `nx > y`. + +This is known as the *Archimedean Property of the Reals*. +-/ +theorem pos_imp_exists_pnat_mul_self_geq {x y : ℝ} + : x > 0 → ∃ n : ℕ+, n * x > y := by + intro hx + let ⟨n, p⟩ := exists_pnat_geq_self (y / x) + have p' := mul_lt_mul_of_pos_right p hx + rw [div_mul, div_self (show x ≠ 0 from LT.lt.ne' hx), div_one] at p' + exact ⟨n, p'⟩ + +end Real \ No newline at end of file diff --git a/one-variable-calculus/Apostol/Chapter_I_3_10.tex b/one-variable-calculus/Apostol/Chapter_I_3_10.tex new file mode 100644 index 0000000..7e4c684 --- /dev/null +++ b/one-variable-calculus/Apostol/Chapter_I_3_10.tex @@ -0,0 +1,38 @@ +\documentclass{article} +\usepackage{amsfonts, amsthm} +\usepackage{hyperref} + +\newtheorem{theorem}{Theorem} +\newtheorem{custominner}{Theorem} +\newenvironment{custom}[1]{% + \renewcommand\thecustominner{#1}% + \custominner +}{\endcustominner} + +\begin{document} + +\begin{custom}{1.29} + +For every real $x$ there exists a positive integer $n$ such that $n > x$. + +\end{custom} + +\begin{proof} + +\href{Chapter_I_3_10.lean}{Apostol.Chapter\_I\_3\_10.Real.exists\_pnat\_geq\_self} + +\end{proof} + +\begin{custom}{1.30}[Archimedean Property of the Reals] + +If $x > 0$ and if $y$ is an arbitrary real number, there exists a positive integer $n$ such that $nx > y$. + +\end{custom} + +\begin{proof} + +\href{Chapter_I_3_10.lean}{Apostol.Chapter\_I\_3\_10.Real.pos\_imp\_exists\_pnat\_mul\_self\_geq} + +\end{proof} + +\end{document} diff --git a/one-variable-calculus/README.md b/one-variable-calculus/README.md new file mode 100644 index 0000000..3fdafc8 --- /dev/null +++ b/one-variable-calculus/README.md @@ -0,0 +1,4 @@ +# One-Variable Calculus, with an Introduction to Linear Algebra + +Apostol, Tom M. Calculus, Vol. 1: One-Variable Calculus, with an Introduction to +Linear Algebra. 2nd ed. Vol. 1. 2 vols. Wiley, 1991. \ No newline at end of file