Changes
46 changed files (+438/-2299)
-
-
@@ -2,6 +2,7 @@ import Mathlib.Tacticimport Mathlib.Data.Real.Basic namespace C02S04 section variable (a b c d : ℝ)
-
-
-
@@ -2,6 +2,7 @@ import Mathlib.Tacticimport Mathlib.Data.Real.Basic namespace C02S04 section variable (a b c d : ℝ)
-
-
-
@@ -2,6 +2,7 @@ import Mathlib.Tacticimport Mathlib.Data.Real.Basic namespace C03S01 #check ∀ x : ℝ, 0 ≤ x → |x| = x #check ∀ x y ε : ℝ, 0 < ε → ε ≤ 1 → |x| < ε → |y| < ε → |x * y| < ε
-
-
-
@@ -2,6 +2,7 @@ import Mathlib.Tacticimport Mathlib.Data.Real.Basic namespace C03S02 example : ∃ x : ℝ, 2 < x ∧ x < 3 := by use 5 / 2 norm_num
-
@@ -34,8 +35,8 @@ sectionvariable {f g : ℝ → ℝ} example (ubf : FnHasUb f) (ubg : FnHasUb g) : FnHasUb fun x ↦ f x + g x := by cases' ubf with a ubfa cases' ubg with b ubgb rcases ubf with ⟨a, ubfa⟩ rcases ubg with ⟨b, ubgb⟩ use a + b apply fnUb_add ubfa ubgb
-
@@ -45,11 +46,6 @@ example (lbf : FnHasLb f) (lbg : FnHasLb g) : FnHasLb fun x ↦ f x + g x := byexample {c : ℝ} (ubf : FnHasUb f) (h : c ≥ 0) : FnHasUb fun x ↦ c * f x := by sorry example (ubf : FnHasUb f) (ubg : FnHasUb g) : FnHasUb fun x ↦ f x + g x := by rcases ubf with ⟨a, ubfa⟩ rcases ubg with ⟨b, ubgb⟩ exact ⟨a + b, fnUb_add ubfa ubgb⟩ example : FnHasUb f → FnHasUb g → FnHasUb fun x ↦ f x + g x := by rintro ⟨a, ubfa⟩ ⟨b, ubgb⟩ exact ⟨a + b, fnUb_add ubfa ubgb⟩
-
@@ -59,6 +55,35 @@ example : FnHasUb f → FnHasUb g → FnHasUb fun x ↦ f x + g x :=end example (ubf : FnHasUb f) (ubg : FnHasUb g) : FnHasUb fun x ↦ f x + g x := by obtain ⟨a, ubfa⟩ := ubf obtain ⟨b, ubgb⟩ := ubg exact ⟨a + b, fnUb_add ubfa ubgb⟩ example (ubf : FnHasUb f) (ubg : FnHasUb g) : FnHasUb fun x ↦ f x + g x := by cases ubf case intro a ubfa => cases ubg case intro b ubgb => exact ⟨a + b, fnUb_add ubfa ubgb⟩ example (ubf : FnHasUb f) (ubg : FnHasUb g) : FnHasUb fun x ↦ f x + g x := by cases ubf next a ubfa => cases ubg next b ubgb => exact ⟨a + b, fnUb_add ubfa ubgb⟩ example (ubf : FnHasUb f) (ubg : FnHasUb g) : FnHasUb fun x ↦ f x + g x := by match ubf, ubg with | ⟨a, ubfa⟩, ⟨b, ubgb⟩ => exact ⟨a + b, fnUb_add ubfa ubgb⟩ example (ubf : FnHasUb f) (ubg : FnHasUb g) : FnHasUb fun x ↦ f x + g x := match ubf, ubg with | ⟨a, ubfa⟩, ⟨b, ubgb⟩ => ⟨a + b, fnUb_add ubfa ubgb⟩ section variable {α : Type _} [CommRing α]
-
@@ -87,8 +112,8 @@ sectionvariable {a b c : ℕ} example (divab : a ∣ b) (divbc : b ∣ c) : a ∣ c := by cases' divab with d beq cases' divbc with e ceq rcases divab with ⟨d, beq⟩ rcases divbc with ⟨e, ceq⟩ rw [ceq, beq] use d * e; ring
-
@@ -114,7 +139,7 @@ example (x y : ℝ) (h : x - y ≠ 0) : (x ^ 2 - y ^ 2) / (x - y) = x + y := byring example {f : ℝ → ℝ} (h : Surjective f) : ∃ x, f x ^ 2 = 4 := by cases' h 2 with x hx rcases h 2 with ⟨x, hx⟩ use x rw [hx] norm_num
-
-
-
@@ -2,6 +2,7 @@ import Mathlib.Tacticimport Mathlib.Data.Real.Basic namespace C03S03 section variable (a b : ℝ)
-
@@ -26,8 +27,8 @@ variable (f : ℝ → ℝ)example (h : ∀ a, ∃ x, f x > a) : ¬FnHasUb f := by intro fnub cases' fnub with a fnuba cases' h a with x hx rcases fnub with ⟨a, fnuba⟩ rcases h a with ⟨x, hx⟩ have : f x ≤ a := fnuba x linarith
-
@@ -102,7 +103,7 @@ example (h : ¬∀ a, ∃ x, f x > a) : FnHasUb f := byexact h example (h : ¬FnHasUb f) : ∀ a, ∃ x, f x > a := by simp only [FnHasUb, FnUb] at h dsimp only [FnHasUb, FnUb] at h push_neg at h exact h
-
-
-
@@ -3,6 +3,7 @@ import Mathlib.Data.Real.Basicimport Mathlib.Data.Nat.Prime namespace C03S04 example {x y : ℝ} (h₀ : x ≤ y) (h₁ : ¬y ≤ x) : x ≤ y ∧ x ≠ y := by constructor · assumption
-
@@ -20,7 +21,7 @@ example {x y : ℝ} (h₀ : x ≤ y) (h₁ : ¬y ≤ x) : x ≤ y ∧ x ≠ y :=⟨h₀, h⟩ example {x y : ℝ} (h : x ≤ y ∧ x ≠ y) : ¬y ≤ x := by cases' h with h₀ h₁ rcases h with ⟨h₀, h₁⟩ contrapose! h₁ exact le_antisymm h₀ h₁
-
@@ -31,6 +32,29 @@ example {x y : ℝ} : x ≤ y ∧ x ≠ y → ¬y ≤ x := byexample {x y : ℝ} : x ≤ y ∧ x ≠ y → ¬y ≤ x := fun ⟨h₀, h₁⟩ h' ↦ h₁ (le_antisymm h₀ h') example {x y : ℝ} (h : x ≤ y ∧ x ≠ y) : ¬y ≤ x := by have ⟨h₀, h₁⟩ := h contrapose! h₁ exact le_antisymm h₀ h₁ example {x y : ℝ} (h : x ≤ y ∧ x ≠ y) : ¬y ≤ x := by cases h case intro h₀ h₁ => contrapose! h₁ exact le_antisymm h₀ h₁ example {x y : ℝ} (h : x ≤ y ∧ x ≠ y) : ¬y ≤ x := by cases h next h₀ h₁ => contrapose! h₁ exact le_antisymm h₀ h₁ example {x y : ℝ} (h : x ≤ y ∧ x ≠ y) : ¬y ≤ x := by match h with | ⟨h₀, h₁⟩ => contrapose! h₁ exact le_antisymm h₀ h₁ example {x y : ℝ} (h : x ≤ y ∧ x ≠ y) : ¬y ≤ x := by intro h' apply h.right
-
-
-
@@ -2,6 +2,7 @@ import Mathlib.Tacticimport Mathlib.Data.Real.Basic namespace C03S05 section variable {x y : ℝ}
-
@@ -21,13 +22,39 @@ example (h : y < -1) : y > 0 ∨ y < -1 :=Or.inr h example : x < |y| → x < y ∨ x < -y := by cases' le_or_gt 0 y with h h rcases le_or_gt 0 y with h | h · rw [abs_of_nonneg h] intro h left exact h rw [abs_of_neg h] intro h; right; exact h intro h; left; exact h . rw [abs_of_neg h] intro h; right; exact h example : x < |y| → x < y ∨ x < -y := by cases le_or_gt 0 y case inl h => rw [abs_of_nonneg h] intro h; left; exact h case inr h => rw [abs_of_neg h] intro h; right; exact h example : x < |y| → x < y ∨ x < -y := by cases le_or_gt 0 y next h => rw [abs_of_nonneg h] intro h; left; exact h next h => rw [abs_of_neg h] intro h; right; exact h example : x < |y| → x < y ∨ x < -y := by match le_or_gt 0 y with | Or.inl h => rw [abs_of_nonneg h] intro h; left; exact h | Or.inr h => rw [abs_of_neg h] intro h; right; exact h namespace MyAbs
-
@@ -51,18 +78,18 @@ end MyAbsend example {x : ℝ} (h : x ≠ 0) : x < 0 ∨ x > 0 := by rcases lt_trichotomy x 0 with (xlt | xeq | xgt) rcases lt_trichotomy x 0 with xlt | xeq | xgt · left exact xlt · contradiction right; exact xgt . right; exact xgt example {m n k : ℕ} (h : m ∣ n ∨ m ∣ k) : m ∣ n * k := by rcases h with (⟨a, rfl⟩ | ⟨b, rfl⟩) rcases h with ⟨a, rfl⟩ | ⟨b, rfl⟩ · rw [mul_assoc] apply dvd_mul_right rw [mul_comm, mul_assoc] apply dvd_mul_right . rw [mul_comm, mul_assoc] apply dvd_mul_right example {z : ℝ} (h : ∃ x y, z = x ^ 2 + y ^ 2 ∨ z = x ^ 2 + y ^ 2 + 1) : z ≥ 0 := by sorry
-
@@ -89,7 +116,7 @@ example (P : Prop) : ¬¬P → P := byintro h cases em P · assumption contradiction . contradiction example (P : Prop) : ¬¬P → P := by intro h
-
-
-
@@ -2,6 +2,7 @@ import Mathlib.Tacticimport Mathlib.Data.Real.Basic namespace C03S06 def ConvergesTo (s : ℕ → ℝ) (a : ℝ) := ∀ ε > 0, ∃ N, ∀ n ≥ N, |s n - a| < ε
-
@@ -31,8 +32,8 @@ theorem convergesTo_add {s t : ℕ → ℝ} {a b : ℝ}intro ε εpos dsimp -- this line is not needed but cleans up the goal a bit. have ε2pos : 0 < ε / 2 := by linarith cases' cs (ε / 2) ε2pos with Ns hs cases' ct (ε / 2) ε2pos with Nt ht rcases cs (ε / 2) ε2pos with ⟨Ns, hs⟩ rcases ct (ε / 2) ε2pos with ⟨Nt, ht⟩ use max Ns Nt sorry
-
@@ -49,7 +50,7 @@ theorem convergesTo_mul_const {s : ℕ → ℝ} {a : ℝ} (c : ℝ) (cs : Convertheorem exists_abs_le_of_convergesTo {s : ℕ → ℝ} {a : ℝ} (cs : ConvergesTo s a) : ∃ N b, ∀ n, N ≤ n → |s n| < b := by cases' cs 1 zero_lt_one with N h rcases cs 1 zero_lt_one with ⟨N, h⟩ use N, |a| + 1 sorry
-
@@ -60,7 +61,7 @@ theorem aux {s t : ℕ → ℝ} {a : ℝ} (cs : ConvergesTo s a) (ct : Convergesrcases exists_abs_le_of_convergesTo cs with ⟨N₀, B, h₀⟩ have Bpos : 0 < B := lt_of_le_of_lt (abs_nonneg _) (h₀ N₀ (le_refl _)) have pos₀ : ε / B > 0 := div_pos εpos Bpos cases' ct _ pos₀ with N₁ h₁ rcases ct _ pos₀ with ⟨N₁, h₁⟩ sorry theorem convergesTo_mul {s t : ℕ → ℝ} {a b : ℝ}
-
@@ -84,8 +85,8 @@ theorem convergesTo_unique {s : ℕ → ℝ} {a b : ℝ}have εpos : ε > 0 := by change |a - b| / 2 > 0 linarith cases' sa ε εpos with Na hNa cases' sb ε εpos with Nb hNb rcases sa ε εpos with ⟨Na, hNa⟩ rcases sb ε εpos with ⟨Nb, hNb⟩ let N := max Na Nb have absa : |s N - a| < ε := by sorry have absb : |s N - b| < ε := by sorry
-
-
-
@@ -2,6 +2,7 @@ import Mathlib.Tacticimport Mathlib.Data.Real.Basic namespace C03S01 def FnUb (f : ℝ → ℝ) (a : ℝ) : Prop := ∀ x, f x ≤ a
-
-
-
@@ -2,6 +2,7 @@ import Mathlib.Tacticimport Mathlib.Data.Real.Basic namespace C03S02 def FnUb (f : ℝ → ℝ) (a : ℝ) : Prop := ∀ x, f x ≤ a
-
@@ -23,14 +24,14 @@ sectionvariable {f g : ℝ → ℝ} example (lbf : FnHasLb f) (lbg : FnHasLb g) : FnHasLb fun x ↦ f x + g x := by cases' lbf with a lbfa cases' lbg with b lbgb rcases lbf with ⟨a, lbfa⟩ rcases lbg with ⟨b, lbgb⟩ use a + b intro x exact add_le_add (lbfa x) (lbgb x) example {c : ℝ} (ubf : FnHasUb f) (h : c ≥ 0) : FnHasUb fun x ↦ c * f x := by cases' ubf with a lbfa rcases ubf with ⟨a, lbfa⟩ use c * a intro x exact mul_le_mul_of_nonneg_left (lbfa x) h
-
-
-
@@ -2,6 +2,7 @@ import Mathlib.Tacticimport Mathlib.Data.Real.Basic namespace C03S03 section variable (a b : ℝ)
-
-
-
@@ -3,8 +3,9 @@ import Mathlib.Data.Real.Basicimport Mathlib.Data.Nat.Prime namespace C03S04 example {m n : ℕ} (h : m ∣ n ∧ m ≠ n) : m ∣ n ∧ ¬n ∣ m := by cases' h with h0 h1 rcases h with ⟨h0, h1⟩ constructor · exact h0 intro h2
-
-
-
@@ -2,6 +2,7 @@ import Mathlib.Tacticimport Mathlib.Data.Real.Basic namespace C03S05 section variable {x y : ℝ}
-
@@ -9,64 +10,64 @@ variable {x y : ℝ}namespace MyAbs theorem le_abs_self (x : ℝ) : x ≤ |x| := by cases' le_or_gt 0 x with h h rcases le_or_gt 0 x with h | h · rw [abs_of_nonneg h] rw [abs_of_neg h] linarith . rw [abs_of_neg h] linarith theorem neg_le_abs_self (x : ℝ) : -x ≤ |x| := by cases' le_or_gt 0 x with h h rcases le_or_gt 0 x with h | h · rw [abs_of_nonneg h] linarith rw [abs_of_neg h] . rw [abs_of_neg h] theorem abs_add (x y : ℝ) : |x + y| ≤ |x| + |y| := by cases' le_or_gt 0 (x + y) with h h rcases le_or_gt 0 (x + y) with h | h · rw [abs_of_nonneg h] linarith [le_abs_self x, le_abs_self y] rw [abs_of_neg h] linarith [neg_le_abs_self x, neg_le_abs_self y] . rw [abs_of_neg h] linarith [neg_le_abs_self x, neg_le_abs_self y] theorem lt_abs : x < |y| ↔ x < y ∨ x < -y := by cases' le_or_gt 0 y with h h rcases le_or_gt 0 y with h | h · rw [abs_of_nonneg h] constructor · intro h' left exact h' intro h' cases' h' with h' h' · exact h' linarith . intro h' rcases h' with h' | h' · exact h' . linarith rw [abs_of_neg h] constructor · intro h' right exact h' intro h' cases' h' with h' h' · linarith exact h' . intro h' rcases h' with h' | h' · linarith . exact h' theorem abs_lt : |x| < y ↔ -y < x ∧ x < y := by cases' le_or_gt 0 x with h h rcases le_or_gt 0 x with h | h · rw [abs_of_nonneg h] constructor · intro h' constructor · linarith exact h' intro h' cases' h' with h1 h2 exact h2 rw [abs_of_neg h] constructor · intro h' . intro h' rcases h' with ⟨h1, h2⟩ exact h2 . rw [abs_of_neg h] constructor · linarith linarith intro h' linarith · intro h' constructor · linarith . linarith . intro h' linarith end MyAbs
-
@@ -80,22 +81,22 @@ example {x : ℝ} (h : x ^ 2 = 1) : x = 1 ∨ x = -1 := byhave h'' : (x + 1) * (x - 1) = 0 := by rw [← h'] ring cases' eq_zero_or_eq_zero_of_mul_eq_zero h'' with h1 h1 rcases eq_zero_or_eq_zero_of_mul_eq_zero h'' with h1 | h1 · right exact eq_neg_iff_add_eq_zero.mpr h1 left exact eq_of_sub_eq_zero h1 . left exact eq_of_sub_eq_zero h1 example {x y : ℝ} (h : x ^ 2 = y ^ 2) : x = y ∨ x = -y := by have h' : x ^ 2 - y ^ 2 = 0 := by rw [h, sub_self] have h'' : (x + y) * (x - y) = 0 := by rw [← h'] ring cases' eq_zero_or_eq_zero_of_mul_eq_zero h'' with h1 h1 rcases eq_zero_or_eq_zero_of_mul_eq_zero h'' with h1 | h1 · right exact eq_neg_iff_add_eq_zero.mpr h1 left exact eq_of_sub_eq_zero h1 . left exact eq_of_sub_eq_zero h1 section variable {R : Type _} [CommRing R] [IsDomain R]
-
@@ -106,22 +107,22 @@ example (h : x ^ 2 = 1) : x = 1 ∨ x = -1 := byhave h'' : (x + 1) * (x - 1) = 0 := by rw [← h'] ring cases' eq_zero_or_eq_zero_of_mul_eq_zero h'' with h1 h1 rcases eq_zero_or_eq_zero_of_mul_eq_zero h'' with h1 | h1 · right exact eq_neg_iff_add_eq_zero.mpr h1 left exact eq_of_sub_eq_zero h1 . left exact eq_of_sub_eq_zero h1 example (h : x ^ 2 = y ^ 2) : x = y ∨ x = -y := by have h' : x ^ 2 - y ^ 2 = 0 := by rw [h, sub_self] have h'' : (x + y) * (x - y) = 0 := by rw [← h'] ring cases' eq_zero_or_eq_zero_of_mul_eq_zero h'' with h1 h1 rcases eq_zero_or_eq_zero_of_mul_eq_zero h'' with h1 | h1 · right exact eq_neg_iff_add_eq_zero.mpr h1 left exact eq_of_sub_eq_zero h1 . left exact eq_of_sub_eq_zero h1 end
-
@@ -131,10 +132,10 @@ example (P Q : Prop) : P → Q ↔ ¬P ∨ Q := byby_cases h' : P · right exact h h' left exact h' . left exact h' rintro (h | h) · intro h' exact absurd h' h intro exact h . intro exact h
-
-
-
@@ -2,6 +2,7 @@ import Mathlib.Tacticimport Mathlib.Data.Real.Basic namespace C03S06 def ConvergesTo (s : ℕ → ℝ) (a : ℝ) := ∀ ε > 0, ∃ N, ∀ n ≥ N, |s n - a| < ε
-
@@ -18,8 +19,8 @@ theorem convergesTo_add {s t : ℕ → ℝ} {a b : ℝ}intro ε εpos dsimp have ε2pos : 0 < ε / 2 := by linarith cases' cs (ε / 2) ε2pos with Ns hs cases' ct (ε / 2) ε2pos with Nt ht rcases cs (ε / 2) ε2pos with ⟨Ns, hs⟩ rcases ct (ε / 2) ε2pos with ⟨Nt, ht⟩ use max Ns Nt intro n hn have ngeNs : n ≥ Ns := le_of_max_le_left hn
-
@@ -44,7 +45,7 @@ theorem convergesTo_mul_const {s : ℕ → ℝ} {a : ℝ} (c : ℝ) (cs : Converintro ε εpos dsimp have εcpos : 0 < ε / |c| := by apply div_pos εpos acpos cases' cs (ε / |c|) εcpos with Ns hs rcases cs (ε / |c|) εcpos with ⟨Ns, hs⟩ use Ns intro n ngt calc
-
@@ -54,7 +55,7 @@ theorem convergesTo_mul_const {s : ℕ → ℝ} {a : ℝ} (c : ℝ) (cs : Convertheorem exists_abs_le_of_convergesTo {s : ℕ → ℝ} {a : ℝ} (cs : ConvergesTo s a) : ∃ N b, ∀ n, N ≤ n → |s n| < b := by cases' cs 1 zero_lt_one with N h rcases cs 1 zero_lt_one with ⟨N, h⟩ use N, |a| + 1 intro n ngt calc
-
@@ -71,7 +72,7 @@ theorem aux {s t : ℕ → ℝ} {a : ℝ} (cs : ConvergesTo s a) (ct : Convergesrcases exists_abs_le_of_convergesTo cs with ⟨N₀, B, h₀⟩ have Bpos : 0 < B := lt_of_le_of_lt (abs_nonneg _) (h₀ N₀ (le_refl _)) have pos₀ : ε / B > 0 := div_pos εpos Bpos cases' ct _ pos₀ with N₁ h₁ rcases ct _ pos₀ with ⟨N₁, h₁⟩ use max N₀ N₁ intro n ngt have ngeN₀ : n ≥ N₀ := le_of_max_le_left ngt
-
@@ -107,8 +108,8 @@ theorem convergesTo_unique {s : ℕ → ℝ} {a b : ℝ}have εpos : ε > 0 := by change |a - b| / 2 > 0 linarith cases' sa ε εpos with Na hNa cases' sb ε εpos with Nb hNb rcases sa ε εpos with ⟨Na, hNa⟩ rcases sb ε εpos with ⟨Nb, hNb⟩ let N := max Na Nb have absa : |s N - a| < ε := by apply hNa
-
-
-
@@ -34,19 +34,18 @@ example : s ∩ (t ∪ u) ⊆ s ∩ t ∪ s ∩ u := byintro x hx have xs : x ∈ s := hx.1 have xtu : x ∈ t ∪ u := hx.2 cases' xtu with xt xu rcases xtu with xt | xu · left show x ∈ s ∩ t exact ⟨xs, xt⟩ right show x ∈ s ∩ u exact ⟨xs, xu⟩ . right show x ∈ s ∩ u exact ⟨xs, xu⟩ example : s ∩ (t ∪ u) ⊆ s ∩ t ∪ s ∩ u := by rintro x ⟨xs, xt | xu⟩ · left exact ⟨xs, xt⟩ right; exact ⟨xs, xu⟩ · left; exact ⟨xs, xt⟩ . right; exact ⟨xs, xu⟩ example : s ∩ t ∪ s ∩ u ⊆ s ∩ (t ∪ u) := by sorry
-
@@ -59,10 +58,9 @@ example : (s \ t) \ u ⊆ s \ (t ∪ u) := by· exact xs intro xtu -- x ∈ t ∨ x ∈ u cases' xtu with xt xu · show False exact xnt xt show False; exact xnu xu rcases xtu with xt | xu · show False; exact xnt xt . show False; exact xnu xu example : (s \ t) \ u ⊆ s \ (t ∪ u) := by rintro x ⟨⟨xs, xnt⟩, xnu⟩
-
@@ -75,9 +73,8 @@ example : s ∩ t = t ∩ s := byext x simp only [mem_inter_iff] constructor · rintro ⟨xs, xt⟩ exact ⟨xt, xs⟩ rintro ⟨xt, xs⟩; exact ⟨xs, xt⟩ · rintro ⟨xs, xt⟩; exact ⟨xt, xs⟩ . rintro ⟨xt, xs⟩; exact ⟨xs, xt⟩ example : s ∩ t = t ∩ s := Set.ext fun x ↦ ⟨fun ⟨xs, xt⟩ ↦ ⟨xt, xs⟩, fun ⟨xt, xs⟩ ↦ ⟨xs, xt⟩⟩
-
@@ -86,9 +83,8 @@ example : s ∩ t = t ∩ s := by ext x; simp [and_comm]example : s ∩ t = t ∩ s := by apply Subset.antisymm · rintro x ⟨xs, xt⟩ exact ⟨xt, xs⟩ rintro x ⟨xt, xs⟩; exact ⟨xs, xt⟩ · rintro x ⟨xs, xt⟩; exact ⟨xt, xs⟩ . rintro x ⟨xt, xs⟩; exact ⟨xs, xt⟩ example : s ∩ t = t ∩ s := Subset.antisymm sorry sorry
-
-
-
@@ -67,7 +67,7 @@ theorem sb_surjective (hf : Injective f) (hg : Injective g) : Surjective (sbFunby_cases gyA : g y ∈ A · rw [A_def, sbSet, mem_iUnion] at gyA rcases gyA with ⟨n, hn⟩ cases' n with n rcases n with _ | n · simp [sbAux] at hn simp [sbAux] at hn rcases hn with ⟨x, xmem, hx⟩
-
@@ -95,4 +95,3 @@ variable (g : β → α) (x : α)#check (invFun_eq : (∃ y, g y = x) → g (invFun g x) = x) end
-
-
-
@@ -10,10 +10,8 @@ open Setexample : s ∩ t ∪ s ∩ u ⊆ s ∩ (t ∪ u) := by rintro x (⟨xs, xt⟩ | ⟨xs, xu⟩) · use xs left exact xt use xs; right; exact xu · use xs; left; exact xt . use xs; right; exact xu example : s \ (t ∪ u) ⊆ (s \ t) \ u := by rintro x ⟨xs, xntu⟩
-
@@ -32,21 +30,21 @@ example : s ∩ (s ∪ t) = s := byext x; constructor · rintro ⟨xs, _⟩ exact xs intro xs use xs; left; exact xs . intro xs use xs; left; exact xs example : s ∪ s ∩ t = s := by ext x; constructor · rintro (xs | ⟨xs, xt⟩) <;> exact xs intro xs; left; exact xs . intro xs; left; exact xs example : s \ t ∪ t = s ∪ t := by ext x; constructor · rintro (⟨xs, nxt⟩ | xt) · left exact xs right exact xt . right exact xt by_cases h : x ∈ t · intro right
-
@@ -65,26 +63,26 @@ example : s \ t ∪ t \ s = (s ∪ t) \ (s ∩ t) := byexact xs rintro ⟨_, xt⟩ contradiction constructor right exact xt rintro ⟨xs, _⟩ contradiction . constructor right exact xt rintro ⟨xs, _⟩ contradiction rintro ⟨xs | xt, nxst⟩ · left use xs intro xt apply nxst constructor <;> assumption right; use xt; intro xs apply nxst constructor <;> assumption . right; use xt; intro xs apply nxst constructor <;> assumption example : { n | Nat.Prime n } ∩ { n | n > 2 } ⊆ { n | ¬Even n } := by intro n simp intro nprime cases' Nat.Prime.eq_two_or_odd nprime with h h rcases Nat.Prime.eq_two_or_odd nprime with h | h · rw [h] intro linarith
-
-
-
@@ -70,7 +70,7 @@ theorem sb_surjective (hf : Injective f) (hg : Injective g) : Surjective (sbFunby_cases gyA : g y ∈ A · rw [A_def, sbSet, mem_iUnion] at gyA rcases gyA with ⟨n, hn⟩ cases' n with n rcases n with _ | n · simp [sbAux] at hn simp [sbAux] at hn rcases hn with ⟨x, xmem, hx⟩
-
-
-
@@ -103,7 +103,7 @@ example {m n p : ℕ} (nnz : n ≠ 0) (prime_p : p.Prime) : m ^ 2 ≠ p * n ^ 2example {m n k r : ℕ} (nnz : n ≠ 0) (pow_eq : m ^ k = r * n ^ k) {p : ℕ} (prime_p : p.Prime) : k ∣ r.factorization p := by cases' r with r rcases r with _ | r · simp have npow_nz : n ^ k ≠ 0 := fun npowz ↦ nnz (pow_eq_zero npowz) have eq1 : (m ^ k).factorization p = k * m.factorization p := by
-
-
-
@@ -41,13 +41,13 @@ theorem dvd_fac {i n : ℕ} (ipos : 0 < i) (ile : i ≤ n) : i ∣ fac n := byinduction' n with n ih · exact absurd ipos (not_lt_of_ge ile) rw [fac] cases' Nat.of_le_succ ile with h h rcases Nat.of_le_succ ile with h | h · apply dvd_mul_of_dvd_right (ih h) rw [h] apply dvd_mul_right theorem pow_two_le_fac (n : ℕ) : 2 ^ (n - 1) ≤ fac n := by cases' n with n rcases n with _ | n · simp [fac] sorry section
-
-
-
@@ -5,6 +5,7 @@ import Mathlib.Tacticopen BigOperators namespace C05S03 theorem two_le {m : ℕ} (h0 : m ≠ 0) (h1 : m ≠ 1) : 2 ≤ m := by cases m; contradiction case succ m =>
-
@@ -194,7 +195,7 @@ theorem exists_prime_factor_mod_4_eq_3 {n : Nat} (h : n % 4 = 3) :have : m % 4 = 3 ∨ n / m % 4 = 3 := by apply mod_4_eq_3_or_mod_4_eq_3 rw [neq, h] cases' this with h1 h1 rcases this with h1 | h1 . sorry . sorry example (m n : ℕ) (s : Finset ℕ) (h : m ∈ erase s n) : m ≠ n ∧ m ∈ s := by
-
@@ -207,14 +208,14 @@ example (m n : ℕ) (s : Finset ℕ) (h : m ∈ erase s n) : m ≠ n ∧ m ∈ stheorem primes_mod_4_eq_3_infinite : ∀ n, ∃ p > n, Nat.Prime p ∧ p % 4 = 3 := by by_contra h push_neg at h cases' h with n hn rcases h with ⟨n, hn⟩ have : ∃ s : Finset Nat, ∀ p : ℕ, p.Prime ∧ p % 4 = 3 ↔ p ∈ s := by apply ex_finset_of_bounded use n contrapose! hn rcases hn with ⟨p, ⟨pp, p4⟩, pltn⟩ exact ⟨p, pltn, pp, p4⟩ cases' this with s hs rcases this with ⟨s, hs⟩ have h₁ : ((4 * ∏ i in erase s 3, i) + 3) % 4 = 3 := by sorry rcases exists_prime_factor_mod_4_eq_3 h₁ with ⟨p, pp, pdvd, p4eq⟩
-
-
-
@@ -88,7 +88,7 @@ example {m n p : ℕ} (nnz : n ≠ 0) (prime_p : p.Prime) : m ^ 2 ≠ p * n ^ 2example {m n k r : ℕ} (nnz : n ≠ 0) (pow_eq : m ^ k = r * n ^ k) {p : ℕ} (prime_p : p.Prime) : k ∣ r.factorization p := by cases' r with r rcases r with _ | r · simp have npow_nz : n ^ k ≠ 0 := fun npowz ↦ nnz (pow_eq_zero npowz) have eq1 : (m ^ k).factorization p = k * m.factorization p := by
-
-
-
@@ -7,7 +7,7 @@ def fac : ℕ → ℕ| n + 1 => (n + 1) * fac n theorem pow_two_le_fac (n : ℕ) : 2 ^ (n - 1) ≤ fac n := by cases' n with n rcases n with _ | n · simp [fac] induction' n with n ih · simp [fac]
-
-
-
@@ -5,6 +5,7 @@ import Mathlib.Tacticopen BigOperators namespace C05S03 theorem two_le {m : ℕ} (h0 : m ≠ 0) (h1 : m ≠ 1) : 2 ≤ m := by cases m; contradiction case succ m =>
-
@@ -95,7 +96,7 @@ theorem mem_of_dvd_prod_primes {s : Finset ℕ} {p : ℕ} (prime_p : p.Prime) :linarith [prime_p.two_le] simp [Finset.prod_insert ans, prime_p.dvd_mul] at h₀ h₁ rw [mem_insert] cases' h₁ with h₁ h₁ rcases h₁ with h₁ | h₁ · left exact prime_p.eq_of_dvd_of_prime h₀.1 h₁ right
-
@@ -183,7 +184,7 @@ theorem exists_prime_factor_mod_4_eq_3 {n : Nat} (h : n % 4 = 3) :have : m % 4 = 3 ∨ n / m % 4 = 3 := by apply mod_4_eq_3_or_mod_4_eq_3 rw [neq, h] cases' this with h1 h1 rcases this with h1 | h1 · by_cases mp : m.Prime · use m exact ⟨mp, mdvdn, h1⟩
-
@@ -201,14 +202,14 @@ theorem exists_prime_factor_mod_4_eq_3 {n : Nat} (h : n % 4 = 3) :theorem primes_mod_4_eq_3_infinite : ∀ n, ∃ p > n, Nat.Prime p ∧ p % 4 = 3 := by by_contra h push_neg at h cases' h with n hn rcases h with ⟨n, hn⟩ have : ∃ s : Finset Nat, ∀ p : ℕ, p.Prime ∧ p % 4 = 3 ↔ p ∈ s := by apply ex_finset_of_bounded use n contrapose! hn rcases hn with ⟨p, ⟨pp, p4⟩, pltn⟩ exact ⟨p, pltn, pp, p4⟩ cases' this with s hs rcases this with ⟨s, hs⟩ have h₁ : ((4 * ∏ i in erase s 3, i) + 3) % 4 = 3 := by rw [add_comm, Nat.add_mul_mod_self_left] norm_num
-
-
-
@@ -1,120 +0,0 @@import Mathlib.Tactic import Mathlib.Data.Nat.Factorization.Basic import Mathlib.Data.Nat.Prime #print Nat.coprime example (m n : Nat) (h : m.coprime n) : m.gcd n = 1 := h example (m n : Nat) (h : m.coprime n) : m.gcd n = 1 := by rw [Nat.coprime] at h exact h example : Nat.coprime 12 7 := by norm_num example : Nat.gcd 12 8 = 4 := by norm_num #check Nat.prime_def_lt example (p : ℕ) (prime_p : Nat.Prime p) : 2 ≤ p ∧ ∀ m : ℕ, m < p → m ∣ p → m = 1 := by rwa [Nat.prime_def_lt] at prime_p #check Nat.Prime.eq_one_or_self_of_dvd example (p : ℕ) (prime_p : Nat.Prime p) : ∀ m : ℕ, m ∣ p → m = 1 ∨ m = p := prime_p.eq_one_or_self_of_dvd example : Nat.Prime 17 := by norm_num -- commonly used example : Nat.Prime 2 := Nat.prime_two example : Nat.Prime 3 := Nat.prime_three #check Nat.Prime.dvd_mul #check Nat.Prime.dvd_mul Nat.prime_two #check Nat.prime_two.dvd_mul theorem even_of_even_sqr {m : ℕ} (h : 2 ∣ m ^ 2) : 2 ∣ m := by rw [pow_two, Nat.prime_two.dvd_mul] at h cases h <;> assumption example {m : ℕ} (h : 2 ∣ m ^ 2) : 2 ∣ m := Nat.Prime.dvd_of_dvd_pow Nat.prime_two h example (a b c : Nat) (h : a * b = a * c) (h' : a ≠ 0) : b = c := -- apply? suggests the following: (mul_right_inj' h').mp h example {m n : ℕ} (coprime_mn : m.coprime n) : m ^ 2 ≠ 2 * n ^ 2 := by intro sqr_eq have : 2 ∣ m := by sorry obtain ⟨k, meq⟩ := dvd_iff_exists_eq_mul_left.mp this have : 2 * (2 * k ^ 2) = 2 * n ^ 2 := by rw [← sqr_eq, meq] ring have : 2 * k ^ 2 = n ^ 2 := sorry have : 2 ∣ n := by sorry have : 2 ∣ m.gcd n := by sorry have : 2 ∣ 1 := by sorry norm_num at this example {m n p : ℕ} (coprime_mn : m.coprime n) (prime_p : p.Prime) : m ^ 2 ≠ p * n ^ 2 := by sorry #check Nat.factors #check Nat.prime_of_mem_factors #check Nat.prod_factors #check Nat.factors_unique theorem factorization_mul' {m n : ℕ} (mnez : m ≠ 0) (nnez : n ≠ 0) (p : ℕ) : (m * n).factorization p = m.factorization p + n.factorization p := by rw [Nat.factorization_mul mnez nnez] rfl theorem factorization_pow' (n k p : ℕ) : (n ^ k).factorization p = k * n.factorization p := by rw [Nat.factorization_pow] rfl theorem Nat.Prime.factorization' {p : ℕ} (prime_p : p.Prime) : p.factorization p = 1 := by rw [prime_p.factorization] simp example {m n p : ℕ} (nnz : n ≠ 0) (prime_p : p.Prime) : m ^ 2 ≠ p * n ^ 2 := by intro sqr_eq have nsqr_nez : n ^ 2 ≠ 0 := by simpa have eq1 : Nat.factorization (m ^ 2) p = 2 * m.factorization p := by sorry have eq2 : (p * n ^ 2).factorization p = 2 * n.factorization p + 1 := by sorry have : 2 * m.factorization p % 2 = (2 * n.factorization p + 1) % 2 := by rw [← eq1, sqr_eq, eq2] rw [add_comm, Nat.add_mul_mod_self_left, Nat.mul_mod_right] at this norm_num at this example {m n k r : ℕ} (nnz : n ≠ 0) (pow_eq : m ^ k = r * n ^ k) {p : ℕ} (prime_p : p.Prime) : k ∣ r.factorization p := by cases' r with r · simp have npow_nz : n ^ k ≠ 0 := fun npowz ↦ nnz (pow_eq_zero npowz) have eq1 : (m ^ k).factorization p = k * m.factorization p := by sorry have eq2 : (r.succ * n ^ k).factorization p = k * n.factorization p + r.succ.factorization p := by sorry have : r.succ.factorization p = k * m.factorization p - k * n.factorization p := by rw [← eq1, pow_eq, eq2, add_comm, Nat.add_sub_cancel] rw [this] sorry #check multiplicity
-
-
-
@@ -1,147 +0,0 @@import Mathlib.Data.Nat.GCD.Basic import Mathlib.Algebra.BigOperators.Basic import Mathlib.Tactic example (n : Nat) : n.succ ≠ Nat.zero := Nat.succ_ne_zero n example (m n : Nat) (h : m.succ = n.succ) : m = n := Nat.succ.inj h def fac : ℕ → ℕ | 0 => 1 | n + 1 => (n + 1) * fac n example : fac 0 = 1 := rfl example : fac 0 = 1 := by rw [fac] example : fac 0 = 1 := by simp [fac] example (n : ℕ) : fac (n + 1) = (n + 1) * fac n := rfl example (n : ℕ) : fac (n + 1) = (n + 1) * fac n := by rw [fac] example (n : ℕ) : fac (n + 1) = (n + 1) * fac n := by simp [fac] theorem fac_pos (n : ℕ) : 0 < fac n := by induction' n with n ih · rw [fac] exact zero_lt_one rw [fac] exact mul_pos n.succ_pos ih theorem dvd_fac {i n : ℕ} (ipos : 0 < i) (ile : i ≤ n) : i ∣ fac n := by induction' n with n ih · exact absurd ipos (not_lt_of_ge ile) rw [fac] cases' Nat.of_le_succ ile with h h · apply dvd_mul_of_dvd_right (ih h) rw [h] apply dvd_mul_right theorem pow_two_le_fac (n : ℕ) : 2 ^ (n - 1) ≤ fac n := by cases' n with n · simp [fac] sorry section variable {α : Type _} (s : Finset ℕ) (f : ℕ → ℕ) (n : ℕ) #check Finset.sum s f #check Finset.prod s f open BigOperators open Finset example : s.sum f = ∑ x in s, f x := rfl example : s.prod f = ∏ x in s, f x := rfl example : (range n).sum f = ∑ x in range n, f x := rfl example : (range n).prod f = ∏ x in range n, f x := rfl example (f : ℕ → ℕ) : (∑ x in range 0, f x) = 0 := Finset.sum_range_zero f example (f : ℕ → ℕ) (n : ℕ) : (∑ x in range n.succ, f x) = (∑ x in range n, f x) + f n := Finset.sum_range_succ f n example (f : ℕ → ℕ) : (∏ x in range 0, f x) = 1 := Finset.prod_range_zero f example (f : ℕ → ℕ) (n : ℕ) : (∏ x in range n.succ, f x) = (∏ x in range n, f x) * f n := Finset.prod_range_succ f n example (n : ℕ) : fac n = ∏ i in range n, (i + 1) := by induction' n with n ih · rw [fac, prod_range_zero] rw [fac, ih, prod_range_succ, mul_comm] example (a b c d e f : ℕ) : a * (b * c * f * (d * e)) = d * (a * f * e) * (c * b) := by simp [mul_assoc, mul_comm, mul_left_comm] theorem sum_id (n : ℕ) : (∑ i in range (n + 1), i) = n * (n + 1) / 2 := by symm; apply Nat.div_eq_of_eq_mul_right (by norm_num : 0 < 2) induction' n with n ih · simp rw [Finset.sum_range_succ, mul_add 2, ← ih, Nat.succ_eq_add_one] ring theorem sum_sqr (n : ℕ) : (∑ i in range (n + 1), i ^ 2) = n * (n + 1) * (2 * n + 1) / 6 := by sorry end inductive MyNat | zero : MyNat | succ : MyNat → MyNat namespace MyNat def add : MyNat → MyNat → MyNat | x, zero => x | x, succ y => succ (add x y) def mul : MyNat → MyNat → MyNat | x, zero => zero | x, succ y => add (mul x y) x theorem zero_add (n : MyNat) : add zero n = n := by induction' n with n ih · rfl rw [add, ih] theorem succ_add (m n : MyNat) : add (succ m) n = succ (add m n) := by induction' n with n ih · rfl rw [add, ih] rfl theorem add_comm (m n : MyNat) : add m n = add n m := by induction' n with n ih · rw [zero_add] rfl rw [add, succ_add, ih] theorem add_assoc (m n k : MyNat) : add (add m n) k = add m (add n k) := by sorry theorem mul_add (m n k : MyNat) : mul m (add n k) = add (mul m n) (mul m k) := by sorry theorem zero_mul (n : MyNat) : mul zero n = zero := by sorry theorem succ_mul (m n : MyNat) : mul (succ m) n = add (mul m n) n := by sorry theorem mul_comm (m n : MyNat) : mul m n = mul n m := by sorry end MyNat
-
-
-
@@ -1,232 +0,0 @@import Mathlib.Data.Nat.Prime import Mathlib.Algebra.BigOperators.Order import Mathlib.Tactic open BigOperators namespace C05S03 theorem two_le {m : ℕ} (h0 : m ≠ 0) (h1 : m ≠ 1) : 2 ≤ m := by cases m; contradiction case succ m => cases m; contradiction repeat' apply Nat.succ_le_succ apply zero_le example {m : ℕ} (h0 : m ≠ 0) (h1 : m ≠ 1) : 2 ≤ m := by by_contra h push_neg at h interval_cases m <;> contradiction example {m : ℕ} (h0 : m ≠ 0) (h1 : m ≠ 1) : 2 ≤ m := by by_contra h push_neg at h revert h0 h1 revert h m decide theorem exists_prime_factor {n : Nat} (h : 2 ≤ n) : ∃ p : Nat, p.Prime ∧ p ∣ n := by by_cases np : n.Prime · use n, np induction' n using Nat.strong_induction_on with n ih dsimp at ih rw [Nat.prime_def_lt] at np push_neg at np rcases np h with ⟨m, mltn, mdvdn, mne1⟩ have : m ≠ 0 := by intro mz rw [mz, zero_dvd_iff] at mdvdn linarith have mgt2 : 2 ≤ m := two_le this mne1 by_cases mp : m.Prime · use m, mp exact mdvdn . rcases ih m mltn mgt2 mp with ⟨p, pp, pdvd⟩ use p, pp apply pdvd.trans mdvdn theorem primes_infinite : ∀ n, ∃ p > n, Nat.Prime p := by intro n have : 2 ≤ Nat.factorial (n + 1) + 1 := by sorry rcases exists_prime_factor this with ⟨p, pp, pdvd⟩ refine' ⟨p, _, pp⟩ show p > n by_contra ple push_neg at ple have : p ∣ Nat.factorial (n + 1) := by sorry have : p ∣ 1 := by sorry show False sorry open Finset section variable {α : Type _} [DecidableEq α] (r s t : Finset α) example : r ∩ (s ∪ t) ⊆ r ∩ s ∪ r ∩ t := by rw [subset_iff] intro x rw [mem_inter, mem_union, mem_union, mem_inter, mem_inter] tauto example : r ∩ (s ∪ t) ⊆ r ∩ s ∪ r ∩ t := by simp [subset_iff] intro x tauto example : r ∩ s ∪ r ∩ t ⊆ r ∩ (s ∪ t) := by simp [subset_iff] intro x tauto example : r ∩ s ∪ r ∩ t = r ∩ (s ∪ t) := by ext x simp tauto end section variable {α : Type _} [DecidableEq α] (r s t : Finset α) example : (r ∪ s) ∩ (r ∪ t) = r ∪ s ∩ t := by sorry example : (r \ s) \ t = r \ (s ∪ t) := by sorry end example (s : Finset ℕ) (n : ℕ) (h : n ∈ s) : n ∣ ∏ i in s, i := Finset.dvd_prod_of_mem _ h theorem _root_.Nat.Prime.eq_of_dvd_of_prime {p q : ℕ} (prime_p : Nat.Prime p) (prime_q : Nat.Prime q) (h : p ∣ q) : p = q := by sorry theorem mem_of_dvd_prod_primes {s : Finset ℕ} {p : ℕ} (prime_p : p.Prime) : (∀ n ∈ s, Nat.Prime n) → (p ∣ ∏ n in s, n) → p ∈ s := by intro h₀ h₁ induction' s using Finset.induction_on with a s ans ih · simp at h₁ linarith [prime_p.two_le] simp [Finset.prod_insert ans, prime_p.dvd_mul] at h₀ h₁ rw [mem_insert] sorry example (s : Finset ℕ) (x : ℕ) : x ∈ s.filter Nat.Prime ↔ x ∈ s ∧ x.Prime := mem_filter theorem primes_infinite' : ∀ s : Finset Nat, ∃ p, Nat.Prime p ∧ p ∉ s := by intro s by_contra h push_neg at h set s' := s.filter Nat.Prime with s'_def have mem_s' : ∀ {n : ℕ}, n ∈ s' ↔ n.Prime := by intro n simp [s'_def] apply h have : 2 ≤ (∏ i in s', i) + 1 := by sorry rcases exists_prime_factor this with ⟨p, pp, pdvd⟩ have : p ∣ ∏ i in s', i := by sorry have : p ∣ 1 := by convert Nat.dvd_sub' pdvd this simp show False sorry theorem bounded_of_ex_finset (Q : ℕ → Prop) : (∃ s : Finset ℕ, ∀ k, Q k → k ∈ s) → ∃ n, ∀ k, Q k → k < n := by rintro ⟨s, hs⟩ use s.sup id + 1 intro k Qk apply Nat.lt_succ_of_le show id k ≤ s.sup id apply le_sup (hs k Qk) theorem ex_finset_of_bounded (Q : ℕ → Prop) [DecidablePred Q] : (∃ n, ∀ k, Q k → k ≤ n) → ∃ s : Finset ℕ, ∀ k, Q k ↔ k ∈ s := by rintro ⟨n, hn⟩ use (range (n + 1)).filter Q intro k simp [Nat.lt_succ_iff] exact hn k example : 27 % 4 = 3 := by norm_num example (n : ℕ) : (4 * n + 3) % 4 = 3 := by rw [add_comm, Nat.add_mul_mod_self_left] norm_num theorem mod_4_eq_3_or_mod_4_eq_3 {m n : ℕ} (h : m * n % 4 = 3) : m % 4 = 3 ∨ n % 4 = 3 := by revert h rw [Nat.mul_mod] have : m % 4 < 4 := Nat.mod_lt m (by norm_num) interval_cases hm : m % 4 <;> simp [hm] have : n % 4 < 4 := Nat.mod_lt n (by norm_num) interval_cases hn : n % 4 <;> simp [hn] theorem two_le_of_mod_4_eq_3 {n : ℕ} (h : n % 4 = 3) : 2 ≤ n := by apply two_le <;> · intro neq rw [neq] at h norm_num at h theorem aux {m n : ℕ} (h₀ : m ∣ n) (h₁ : 2 ≤ m) (h₂ : m < n) : n / m ∣ n ∧ n / m < n := by sorry theorem exists_prime_factor_mod_4_eq_3 {n : Nat} (h : n % 4 = 3) : ∃ p : Nat, p.Prime ∧ p ∣ n ∧ p % 4 = 3 := by by_cases np : n.Prime · use n exact ⟨np, dvd_rfl, h⟩ induction' n using Nat.strong_induction_on with n ih dsimp at ih rw [Nat.prime_def_lt] at np push_neg at np rcases np (two_le_of_mod_4_eq_3 h) with ⟨m, mltn, mdvdn, mne1⟩ have mge2 : 2 ≤ m := by apply two_le _ mne1 intro mz rw [mz, zero_dvd_iff] at mdvdn linarith have neq : m * (n / m) = n := Nat.mul_div_cancel' mdvdn have : m % 4 = 3 ∨ n / m % 4 = 3 := by apply mod_4_eq_3_or_mod_4_eq_3 rw [neq, h] cases' this with h1 h1 . sorry . sorry example (m n : ℕ) (s : Finset ℕ) (h : m ∈ erase s n) : m ≠ n ∧ m ∈ s := by rwa [mem_erase] at h example (m n : ℕ) (s : Finset ℕ) (h : m ∈ erase s n) : m ≠ n ∧ m ∈ s := by simp at h assumption theorem primes_mod_4_eq_3_infinite : ∀ n, ∃ p > n, Nat.Prime p ∧ p % 4 = 3 := by by_contra h push_neg at h cases' h with n hn have : ∃ s : Finset Nat, ∀ p : ℕ, p.Prime ∧ p % 4 = 3 ↔ p ∈ s := by apply ex_finset_of_bounded use n contrapose! hn rcases hn with ⟨p, ⟨pp, p4⟩, pltn⟩ exact ⟨p, pltn, pp, p4⟩ cases' this with s hs have h₁ : ((4 * ∏ i in erase s 3, i) + 3) % 4 = 3 := by sorry rcases exists_prime_factor_mod_4_eq_3 h₁ with ⟨p, pp, pdvd, p4eq⟩ have ps : p ∈ s := by sorry have pne3 : p ≠ 3 := by sorry have : p ∣ 4 * ∏ i in erase s 3, i := by sorry have : p ∣ 3 := by sorry have : p = 3 := by sorry contradiction
-
-
-
@@ -1,104 +0,0 @@import Mathlib.Tactic import Mathlib.Data.Nat.Factorization.Basic import Mathlib.Data.Nat.Prime theorem even_of_even_sqr {m : ℕ} (h : 2 ∣ m ^ 2) : 2 ∣ m := by rw [pow_two, Nat.prime_two.dvd_mul] at h cases h <;> assumption example {m n : ℕ} (coprime_mn : m.coprime n) : m ^ 2 ≠ 2 * n ^ 2 := by intro sqr_eq have : 2 ∣ m := by apply even_of_even_sqr rw [sqr_eq] apply dvd_mul_right obtain ⟨k, meq⟩ := dvd_iff_exists_eq_mul_left.mp this have : 2 * (2 * k ^ 2) = 2 * n ^ 2 := by rw [← sqr_eq, meq] ring have : 2 * k ^ 2 = n ^ 2 := (mul_right_inj' (by norm_num)).mp this have : 2 ∣ n := by apply even_of_even_sqr rw [← this] apply dvd_mul_right have : 2 ∣ m.gcd n := by apply Nat.dvd_gcd <;> assumption have : 2 ∣ 1 := by convert this symm exact coprime_mn norm_num at this example {m n p : ℕ} (coprime_mn : m.coprime n) (prime_p : p.Prime) : m ^ 2 ≠ p * n ^ 2 := by intro sqr_eq have : p ∣ m := by apply prime_p.dvd_of_dvd_pow rw [sqr_eq] apply dvd_mul_right obtain ⟨k, meq⟩ := dvd_iff_exists_eq_mul_left.mp this have : p * (p * k ^ 2) = p * n ^ 2 := by rw [← sqr_eq, meq] ring have : p * k ^ 2 = n ^ 2 := by apply (mul_right_inj' _).mp this exact prime_p.ne_zero have : p ∣ n := by apply prime_p.dvd_of_dvd_pow rw [← this] apply dvd_mul_right have : p ∣ Nat.gcd m n := by apply Nat.dvd_gcd <;> assumption have : p ∣ 1 := by convert this symm exact coprime_mn have : 2 ≤ 1 := by apply prime_p.two_le.trans exact Nat.le_of_dvd zero_lt_one this norm_num at this theorem factorization_mul' {m n : ℕ} (mnez : m ≠ 0) (nnez : n ≠ 0) (p : ℕ) : (m * n).factorization p = m.factorization p + n.factorization p := by rw [Nat.factorization_mul mnez nnez] rfl theorem factorization_pow' (n k p : ℕ) : (n ^ k).factorization p = k * n.factorization p := by rw [Nat.factorization_pow] rfl theorem Nat.Prime.factorization' {p : ℕ} (prime_p : p.Prime) : p.factorization p = 1 := by rw [prime_p.factorization] simp example {m n p : ℕ} (nnz : n ≠ 0) (prime_p : p.Prime) : m ^ 2 ≠ p * n ^ 2 := by intro sqr_eq have nsqr_nez : n ^ 2 ≠ 0 := by simpa have eq1 : Nat.factorization (m ^ 2) p = 2 * m.factorization p := by rw [factorization_pow'] have eq2 : (p * n ^ 2).factorization p = 2 * n.factorization p + 1 := by rw [factorization_mul' prime_p.ne_zero nsqr_nez, prime_p.factorization', factorization_pow', add_comm] have : 2 * m.factorization p % 2 = (2 * n.factorization p + 1) % 2 := by rw [← eq1, sqr_eq, eq2] rw [add_comm, Nat.add_mul_mod_self_left, Nat.mul_mod_right] at this norm_num at this example {m n k r : ℕ} (nnz : n ≠ 0) (pow_eq : m ^ k = r * n ^ k) {p : ℕ} (prime_p : p.Prime) : k ∣ r.factorization p := by cases' r with r · simp have npow_nz : n ^ k ≠ 0 := fun npowz ↦ nnz (pow_eq_zero npowz) have eq1 : (m ^ k).factorization p = k * m.factorization p := by rw [factorization_pow'] have eq2 : (r.succ * n ^ k).factorization p = k * n.factorization p + r.succ.factorization p := by rw [factorization_mul' r.succ_ne_zero npow_nz, factorization_pow', add_comm] have : r.succ.factorization p = k * m.factorization p - k * n.factorization p := by rw [← eq1, pow_eq, eq2, add_comm, Nat.add_sub_cancel] rw [this] apply Nat.dvd_sub' <;> apply Nat.dvd_mul_right
-
-
-
@@ -1,97 +0,0 @@import Mathlib.Data.Nat.GCD.Basic import Mathlib.Algebra.BigOperators.Basic import Mathlib.Tactic def fac : ℕ → ℕ | 0 => 1 | n + 1 => (n + 1) * fac n theorem pow_two_le_fac (n : ℕ) : 2 ^ (n - 1) ≤ fac n := by cases' n with n · simp [fac] induction' n with n ih · simp [fac] simp at * rw [pow_succ, fac] apply Nat.mul_le_mul _ ih repeat' apply Nat.succ_le_succ apply zero_le section variable {α : Type _} (s : Finset ℕ) (f : ℕ → ℕ) (n : ℕ) open BigOperators open Finset theorem sum_sqr (n : ℕ) : (∑ i in range (n + 1), i ^ 2) = n * (n + 1) * (2 * n + 1) / 6 := by symm; apply Nat.div_eq_of_eq_mul_right (by norm_num : 0 < 6) induction' n with n ih · simp rw [Finset.sum_range_succ, mul_add 6, ← ih, Nat.succ_eq_add_one] ring end inductive MyNat | zero : MyNat | succ : MyNat → MyNat namespace MyNat def add : MyNat → MyNat → MyNat | x, zero => x | x, succ y => succ (add x y) def mul : MyNat → MyNat → MyNat | x, zero => zero | x, succ y => add (mul x y) x theorem zero_add (n : MyNat) : add zero n = n := by induction' n with n ih · rfl rw [add, ih] theorem succ_add (m n : MyNat) : add (succ m) n = succ (add m n) := by induction' n with n ih · rfl rw [add, ih] rfl theorem add_comm (m n : MyNat) : add m n = add n m := by induction' n with n ih · rw [zero_add] rfl rw [add, succ_add, ih] theorem add_assoc (m n k : MyNat) : add (add m n) k = add m (add n k) := by induction' k with k ih · rfl rw [add, ih] rfl theorem mul_add (m n k : MyNat) : mul m (add n k) = add (mul m n) (mul m k) := by induction' k with k ih · rfl rw [add, mul, mul, ih, add_assoc] theorem zero_mul (n : MyNat) : mul zero n = zero := by induction' n with n ih · rfl rw [mul, ih] rfl theorem succ_mul (m n : MyNat) : mul (succ m) n = add (mul m n) n := by induction' n with n ih · rfl rw [mul, mul, ih, add_assoc, add_assoc, add_comm n, succ_add] rfl theorem mul_comm (m n : MyNat) : mul m n = mul n m := by induction' n with n ih · rw [zero_mul] rfl rw [mul, ih, succ_mul] end MyNat
-
-
-
@@ -1,241 +0,0 @@import Mathlib.Data.Nat.Prime import Mathlib.Algebra.BigOperators.Order import Mathlib.Tactic open BigOperators namespace C05S03 theorem two_le {m : ℕ} (h0 : m ≠ 0) (h1 : m ≠ 1) : 2 ≤ m := by cases m; contradiction case succ m => cases m; contradiction repeat' apply Nat.succ_le_succ apply zero_le theorem exists_prime_factor {n : Nat} (h : 2 ≤ n) : ∃ p : Nat, p.Prime ∧ p ∣ n := by by_cases np : n.Prime · use n, np induction' n using Nat.strong_induction_on with n ih dsimp at ih rw [Nat.prime_def_lt] at np push_neg at np rcases np h with ⟨m, mltn, mdvdn, mne1⟩ have : m ≠ 0 := by intro mz rw [mz, zero_dvd_iff] at mdvdn linarith have mgt2 : 2 ≤ m := two_le this mne1 by_cases mp : m.Prime · use m, mp exact mdvdn . rcases ih m mltn mgt2 mp with ⟨p, pp, pdvd⟩ use p, pp apply pdvd.trans mdvdn theorem primes_infinite : ∀ n, ∃ p > n, Nat.Prime p := by intro n have : 2 ≤ Nat.factorial (n + 1) + 1 := by apply Nat.succ_le_succ exact Nat.succ_le_of_lt (Nat.factorial_pos _) rcases exists_prime_factor this with ⟨p, pp, pdvd⟩ refine' ⟨p, _, pp⟩ show p > n by_contra ple push_neg at ple have : p ∣ Nat.factorial (n + 1) := by apply Nat.dvd_factorial apply pp.pos linarith have : p ∣ 1 := by convert Nat.dvd_sub' pdvd this simp show False have := Nat.le_of_dvd zero_lt_one this linarith [pp.two_le] open Finset section variable {α : Type _} [DecidableEq α] (r s t : Finset α) example : (r ∪ s) ∩ (r ∪ t) = r ∪ s ∩ t := by ext x rw [mem_inter, mem_union, mem_union, mem_union, mem_inter] tauto example : (r ∪ s) ∩ (r ∪ t) = r ∪ s ∩ t := by ext x simp tauto example : (r \ s) \ t = r \ (s ∪ t) := by ext x rw [mem_sdiff, mem_sdiff, mem_sdiff, mem_union] tauto example : (r \ s) \ t = r \ (s ∪ t) := by ext x simp tauto end theorem _root_.Nat.Prime.eq_of_dvd_of_prime {p q : ℕ} (prime_p : Nat.Prime p) (prime_q : Nat.Prime q) (h : p ∣ q) : p = q := by cases prime_q.eq_one_or_self_of_dvd _ h · linarith [prime_p.two_le] assumption theorem mem_of_dvd_prod_primes {s : Finset ℕ} {p : ℕ} (prime_p : p.Prime) : (∀ n ∈ s, Nat.Prime n) → (p ∣ ∏ n in s, n) → p ∈ s := by intro h₀ h₁ induction' s using Finset.induction_on with a s ans ih · simp at h₁ linarith [prime_p.two_le] simp [Finset.prod_insert ans, prime_p.dvd_mul] at h₀ h₁ rw [mem_insert] cases' h₁ with h₁ h₁ · left exact prime_p.eq_of_dvd_of_prime h₀.1 h₁ right exact ih h₀.2 h₁ theorem primes_infinite' : ∀ s : Finset Nat, ∃ p, Nat.Prime p ∧ p ∉ s := by intro s by_contra h push_neg at h set s' := s.filter Nat.Prime with s'_def have mem_s' : ∀ {n : ℕ}, n ∈ s' ↔ n.Prime := by intro n simp [s'_def] apply h have : 2 ≤ (∏ i in s', i) + 1 := by apply Nat.succ_le_succ apply Nat.succ_le_of_lt apply Finset.prod_pos intro n ns' apply (mem_s'.mp ns').pos rcases exists_prime_factor this with ⟨p, pp, pdvd⟩ have : p ∣ ∏ i in s', i := by apply dvd_prod_of_mem rw [mem_s'] apply pp have : p ∣ 1 := by convert Nat.dvd_sub' pdvd this simp show False have := Nat.le_of_dvd zero_lt_one this linarith [pp.two_le] theorem bounded_of_ex_finset (Q : ℕ → Prop) : (∃ s : Finset ℕ, ∀ k, Q k → k ∈ s) → ∃ n, ∀ k, Q k → k < n := by rintro ⟨s, hs⟩ use s.sup id + 1 intro k Qk apply Nat.lt_succ_of_le show id k ≤ s.sup id apply le_sup (hs k Qk) theorem ex_finset_of_bounded (Q : ℕ → Prop) [DecidablePred Q] : (∃ n, ∀ k, Q k → k ≤ n) → ∃ s : Finset ℕ, ∀ k, Q k ↔ k ∈ s := by rintro ⟨n, hn⟩ use (range (n + 1)).filter Q intro k simp [Nat.lt_succ_iff] exact hn k theorem mod_4_eq_3_or_mod_4_eq_3 {m n : ℕ} (h : m * n % 4 = 3) : m % 4 = 3 ∨ n % 4 = 3 := by revert h rw [Nat.mul_mod] have : m % 4 < 4 := Nat.mod_lt m (by norm_num) interval_cases hm : m % 4 <;> simp [hm] have : n % 4 < 4 := Nat.mod_lt n (by norm_num) interval_cases hn : n % 4 <;> simp [hn] theorem two_le_of_mod_4_eq_3 {n : ℕ} (h : n % 4 = 3) : 2 ≤ n := by apply two_le <;> · intro neq rw [neq] at h norm_num at h theorem aux {m n : ℕ} (h₀ : m ∣ n) (h₁ : 2 ≤ m) (h₂ : m < n) : n / m ∣ n ∧ n / m < n := by constructor · exact Nat.div_dvd_of_dvd h₀ exact Nat.div_lt_self (lt_of_le_of_lt (zero_le _) h₂) h₁ theorem exists_prime_factor_mod_4_eq_3 {n : Nat} (h : n % 4 = 3) : ∃ p : Nat, p.Prime ∧ p ∣ n ∧ p % 4 = 3 := by by_cases np : n.Prime · use n exact ⟨np, dvd_rfl, h⟩ induction' n using Nat.strong_induction_on with n ih dsimp at ih rw [Nat.prime_def_lt] at np push_neg at np rcases np (two_le_of_mod_4_eq_3 h) with ⟨m, mltn, mdvdn, mne1⟩ have mge2 : 2 ≤ m := by apply two_le _ mne1 intro mz rw [mz, zero_dvd_iff] at mdvdn linarith have neq : m * (n / m) = n := Nat.mul_div_cancel' mdvdn have : m % 4 = 3 ∨ n / m % 4 = 3 := by apply mod_4_eq_3_or_mod_4_eq_3 rw [neq, h] cases' this with h1 h1 · by_cases mp : m.Prime · use m exact ⟨mp, mdvdn, h1⟩ rcases ih m mltn h1 mp with ⟨p, pp, pdvd, p4eq⟩ use p exact ⟨pp, pdvd.trans mdvdn, p4eq⟩ obtain ⟨nmdvdn, nmltn⟩ := aux mdvdn mge2 mltn by_cases nmp : (n / m).Prime · use n / m exact ⟨nmp, nmdvdn, h1⟩ rcases ih (n / m) nmltn h1 nmp with ⟨p, pp, pdvd, p4eq⟩ use p exact ⟨pp, pdvd.trans nmdvdn, p4eq⟩ theorem primes_mod_4_eq_3_infinite : ∀ n, ∃ p > n, Nat.Prime p ∧ p % 4 = 3 := by by_contra h push_neg at h cases' h with n hn have : ∃ s : Finset Nat, ∀ p : ℕ, p.Prime ∧ p % 4 = 3 ↔ p ∈ s := by apply ex_finset_of_bounded use n contrapose! hn rcases hn with ⟨p, ⟨pp, p4⟩, pltn⟩ exact ⟨p, pltn, pp, p4⟩ cases' this with s hs have h₁ : ((4 * ∏ i in erase s 3, i) + 3) % 4 = 3 := by rw [add_comm, Nat.add_mul_mod_self_left] norm_num rcases exists_prime_factor_mod_4_eq_3 h₁ with ⟨p, pp, pdvd, p4eq⟩ have ps : p ∈ s := by rw [← hs p] exact ⟨pp, p4eq⟩ have pne3 : p ≠ 3 := by intro peq rw [peq, ← Nat.dvd_add_iff_left (dvd_refl 3)] at pdvd rw [Nat.prime_three.dvd_mul] at pdvd norm_num at pdvd have : 3 ∈ s.erase 3 := by apply mem_of_dvd_prod_primes Nat.prime_three _ pdvd intro n simp [← hs n] tauto simp at this have : p ∣ 4 * ∏ i in erase s 3, i := by apply dvd_trans _ (dvd_mul_left _ _) apply dvd_prod_of_mem simp constructor <;> assumption have : p ∣ 3 := by convert Nat.dvd_sub' pdvd this simp have : p = 3 := by apply pp.eq_of_dvd_of_prime Nat.prime_three this contradiction
-
-
-
@@ -2,6 +2,7 @@ import Mathlib.Tacticimport Mathlib.Data.Real.Basic namespace C06S02 structure Group₁ (α : Type _) where mul : α → α → α one : α
-
-
-
@@ -2,6 +2,7 @@ import Mathlib.Tacticimport Mathlib.Data.Real.Basic namespace C06S02 structure AddGroup₁ (α : Type _) where add : α → α → α zero : α
-
-
MIL/C07_Topology/S01_Filters.lean (deleted)
-
@@ -1,105 +0,0 @@import Mathlib.Topology.Instances.Real open Set Filter Topology def principal {α : Type _} (s : Set α) : Filter α where sets := { t | s ⊆ t } univ_sets := sorry sets_of_superset := sorry inter_sets := sorry example : Filter ℕ := { sets := { s | ∃ a, ∀ b, a ≤ b → b ∈ s } univ_sets := sorry sets_of_superset := sorry inter_sets := sorry } def Tendsto₁ {X Y : Type _} (f : X → Y) (F : Filter X) (G : Filter Y) := ∀ V ∈ G, f ⁻¹' V ∈ F def Tendsto₂ {X Y : Type _} (f : X → Y) (F : Filter X) (G : Filter Y) := map f F ≤ G example {X Y : Type _} (f : X → Y) (F : Filter X) (G : Filter Y) : Tendsto₂ f F G ↔ Tendsto₁ f F G := Iff.rfl #check (@Filter.map_mono : ∀ {α β} {m : α → β}, Monotone (map m)) #check (@Filter.map_map : ∀ {α β γ} {f : Filter α} {m : α → β} {m' : β → γ}, map m' (map m f) = map (m' ∘ m) f) example {X Y Z : Type _} {F : Filter X} {G : Filter Y} {H : Filter Z} {f : X → Y} {g : Y → Z} (hf : Tendsto₁ f F G) (hg : Tendsto₁ g G H) : Tendsto₁ (g ∘ f) F H := sorry variable (f : ℝ → ℝ) (x₀ y₀ : ℝ) #check comap ((↑) : ℚ → ℝ) (𝓝 x₀) #check Tendsto (f ∘ (↑)) (comap ((↑) : ℚ → ℝ) (𝓝 x₀)) (𝓝 y₀) section variable {α β γ : Type _} (F : Filter α) {m : γ → β} {n : β → α} #check (comap_comap : comap m (comap n F) = comap (n ∘ m) F) end example : 𝓝 (x₀, y₀) = 𝓝 x₀ ×ᶠ 𝓝 y₀ := nhds_prod_eq #check le_inf_iff example (f : ℕ → ℝ × ℝ) (x₀ y₀ : ℝ) : Tendsto f atTop (𝓝 (x₀, y₀)) ↔ Tendsto (Prod.fst ∘ f) atTop (𝓝 x₀) ∧ Tendsto (Prod.snd ∘ f) atTop (𝓝 y₀) := sorry example (x₀ : ℝ) : HasBasis (𝓝 x₀) (fun ε : ℝ => 0 < ε) fun ε => Ioo (x₀ - ε) (x₀ + ε) := nhds_basis_Ioo_pos x₀ example (u : ℕ → ℝ) (x₀ : ℝ) : Tendsto u atTop (𝓝 x₀) ↔ ∀ ε > 0, ∃ N, ∀ n ≥ N, u n ∈ Ioo (x₀ - ε) (x₀ + ε) := by have : atTop.HasBasis (fun _ : ℕ => True) Ici := atTop_basis rw [this.tendsto_iff (nhds_basis_Ioo_pos x₀)] simp example (P Q : ℕ → Prop) (hP : ∀ᶠ n in atTop, P n) (hQ : ∀ᶠ n in atTop, Q n) : ∀ᶠ n in atTop, P n ∧ Q n := hP.and hQ example (u v : ℕ → ℝ) (h : ∀ᶠ n in atTop, u n = v n) (x₀ : ℝ) : Tendsto u atTop (𝓝 x₀) ↔ Tendsto v atTop (𝓝 x₀) := tendsto_congr' h example (u v : ℕ → ℝ) (h : u =ᶠ[atTop] v) (x₀ : ℝ) : Tendsto u atTop (𝓝 x₀) ↔ Tendsto v atTop (𝓝 x₀) := tendsto_congr' h #check @eventually_of_forall #check @Eventually.mono #check @Eventually.and example (P Q R : ℕ → Prop) (hP : ∀ᶠ n in atTop, P n) (hQ : ∀ᶠ n in atTop, Q n) (hR : ∀ᶠ n in atTop, P n ∧ Q n → R n) : ∀ᶠ n in atTop, R n := by apply (hP.and (hQ.and hR)).mono rintro n ⟨h, h', h''⟩ exact h'' ⟨h, h'⟩ example (P Q R : ℕ → Prop) (hP : ∀ᶠ n in atTop, P n) (hQ : ∀ᶠ n in atTop, Q n) (hR : ∀ᶠ n in atTop, P n ∧ Q n → R n) : ∀ᶠ n in atTop, R n := by filter_upwards [hP, hQ, hR] intro n h h' h'' exact h'' ⟨h, h'⟩ #check mem_closure_iff_clusterPt #check le_principal_iff #check neBot_of_le example (u : ℕ → ℝ) (M : Set ℝ) (x : ℝ) (hux : Tendsto u atTop (𝓝 x)) (huM : ∀ᶠ n in atTop, u n ∈ M) : x ∈ closure M := sorry
-
-
MIL/C07_Topology/S02_Metric_Spaces.lean (deleted)
-
@@ -1,206 +0,0 @@import Mathlib.Topology.Instances.Real import Mathlib.Analysis.NormedSpace.BanachSteinhaus open Set Filter open Topology Filter variable {X : Type _} [MetricSpace X] (a b c : X) #check (dist a b : ℝ) #check (dist_nonneg : 0 ≤ dist a b) #check (dist_eq_zero : dist a b = 0 ↔ a = b) #check (dist_comm a b : dist a b = dist b a) #check (dist_triangle a b c : dist a c ≤ dist a b + dist b c) -- Note the next three lines are not quoted, their purpose is to make sure those things don't get renamed while we're looking elsewhere. #check EMetricSpace #check PseudoMetricSpace #check PseudoEMetricSpace example {u : ℕ → X} {a : X} : Tendsto u atTop (𝓝 a) ↔ ∀ ε > 0, ∃ N, ∀ n ≥ N, dist (u n) a < ε := Metric.tendsto_atTop example {X Y : Type _} [MetricSpace X] [MetricSpace Y] {f : X → Y} : Continuous f ↔ ∀ x : X, ∀ ε > 0, ∃ δ > 0, ∀ x', dist x' x < δ → dist (f x') (f x) < ε := Metric.continuous_iff example {X Y : Type _} [MetricSpace X] [MetricSpace Y] {f : X → Y} (hf : Continuous f) : Continuous fun p : X × X => dist (f p.1) (f p.2) := by continuity example {X Y : Type _} [MetricSpace X] [MetricSpace Y] {f : X → Y} (hf : Continuous f) : Continuous fun p : X × X => dist (f p.1) (f p.2) := continuous_dist.comp ((hf.comp continuous_fst).prod_mk (hf.comp continuous_snd)) example {X Y : Type _} [MetricSpace X] [MetricSpace Y] {f : X → Y} (hf : Continuous f) : Continuous fun p : X × X => dist (f p.1) (f p.2) := by apply Continuous.dist exact hf.comp continuous_fst exact hf.comp continuous_snd example {X Y : Type _} [MetricSpace X] [MetricSpace Y] {f : X → Y} (hf : Continuous f) : Continuous fun p : X × X => dist (f p.1) (f p.2) := (hf.comp continuous_fst).dist (hf.comp continuous_snd) example {X Y : Type _} [MetricSpace X] [MetricSpace Y] {f : X → Y} (hf : Continuous f) : Continuous fun p : X × X => dist (f p.1) (f p.2) := hf.fst'.dist hf.snd' example {f : ℝ → X} (hf : Continuous f) : Continuous fun x : ℝ => f (x ^ 2 + x) := sorry example {X Y : Type _} [MetricSpace X] [MetricSpace Y] (f : X → Y) (a : X) : ContinuousAt f a ↔ ∀ ε > 0, ∃ δ > 0, ∀ {x}, dist x a < δ → dist (f x) (f a) < ε := Metric.continuousAt_iff variable (r : ℝ) example : Metric.ball a r = { b | dist b a < r } := rfl example : Metric.closedBall a r = { b | dist b a ≤ r } := rfl example (hr : 0 < r) : a ∈ Metric.ball a r := Metric.mem_ball_self hr example (hr : 0 ≤ r) : a ∈ Metric.closedBall a r := Metric.mem_closedBall_self hr example (s : Set X) : IsOpen s ↔ ∀ x ∈ s, ∃ ε > 0, Metric.ball x ε ⊆ s := Metric.isOpen_iff example {s : Set X} : IsClosed s ↔ IsOpen (sᶜ) := isOpen_compl_iff.symm example {s : Set X} (hs : IsClosed s) {u : ℕ → X} (hu : Tendsto u atTop (𝓝 a)) (hus : ∀ n, u n ∈ s) : a ∈ s := hs.mem_of_tendsto hu (eventually_of_forall hus) example {s : Set X} : a ∈ closure s ↔ ∀ ε > 0, ∃ b ∈ s, a ∈ Metric.ball b ε := Metric.mem_closure_iff example {u : ℕ → X} (hu : Tendsto u atTop (𝓝 a)) {s : Set X} (hs : ∀ n, u n ∈ s) : a ∈ closure s := sorry example {x : X} {s : Set X} : s ∈ 𝓝 x ↔ ∃ ε > 0, Metric.ball x ε ⊆ s := Metric.nhds_basis_ball.mem_iff example {x : X} {s : Set X} : s ∈ 𝓝 x ↔ ∃ ε > 0, Metric.closedBall x ε ⊆ s := Metric.nhds_basis_closedBall.mem_iff example : IsCompact (Set.Icc 0 1 : Set ℝ) := isCompact_Icc example {s : Set X} (hs : IsCompact s) {u : ℕ → X} (hu : ∀ n, u n ∈ s) : ∃ a ∈ s, ∃ φ : ℕ → ℕ, StrictMono φ ∧ Tendsto (u ∘ φ) atTop (𝓝 a) := hs.tendsto_subseq hu example {s : Set X} (hs : IsCompact s) (hs' : s.Nonempty) {f : X → ℝ} (hfs : ContinuousOn f s) : ∃ x ∈ s, ∀ y ∈ s, f x ≤ f y := hs.exists_forall_le hs' hfs example {s : Set X} (hs : IsCompact s) (hs' : s.Nonempty) {f : X → ℝ} (hfs : ContinuousOn f s) : ∃ x ∈ s, ∀ y ∈ s, f y ≤ f x := hs.exists_forall_ge hs' hfs example {s : Set X} (hs : IsCompact s) : IsClosed s := hs.isClosed example {X : Type _} [MetricSpace X] [CompactSpace X] : IsCompact (univ : Set X) := isCompact_univ #check IsCompact.isClosed example {X : Type _} [MetricSpace X] {Y : Type _} [MetricSpace Y] {f : X → Y} : UniformContinuous f ↔ ∀ ε > 0, ∃ δ > 0, ∀ {a b : X}, dist a b < δ → dist (f a) (f b) < ε := Metric.uniformContinuous_iff example {X : Type _} [MetricSpace X] [CompactSpace X] {Y : Type _} [MetricSpace Y] {f : X → Y} (hf : Continuous f) : UniformContinuous f := sorry example (u : ℕ → X) : CauchySeq u ↔ ∀ ε > 0, ∃ N : ℕ, ∀ m ≥ N, ∀ n ≥ N, dist (u m) (u n) < ε := Metric.cauchySeq_iff example (u : ℕ → X) : CauchySeq u ↔ ∀ ε > 0, ∃ N : ℕ, ∀ n ≥ N, dist (u n) (u N) < ε := Metric.cauchySeq_iff' example [CompleteSpace X] (u : ℕ → X) (hu : CauchySeq u) : ∃ x, Tendsto u atTop (𝓝 x) := cauchySeq_tendsto_of_complete hu open BigOperators open Finset theorem cauchySeq_of_le_geometric_two' {u : ℕ → X} (hu : ∀ n : ℕ, dist (u n) (u (n + 1)) ≤ (1 / 2) ^ n) : CauchySeq u := by rw [Metric.cauchySeq_iff'] intro ε ε_pos obtain ⟨N, hN⟩ : ∃ N : ℕ, 1 / 2 ^ N * 2 < ε := by sorry use N intro n hn obtain ⟨k, rfl : n = N + k⟩ := le_iff_exists_add.mp hn calc dist (u (N + k)) (u N) = dist (u (N + 0)) (u (N + k)) := sorry _ ≤ ∑ i in range k, dist (u (N + i)) (u (N + (i + 1))) := sorry _ ≤ ∑ i in range k, (1 / 2 : ℝ) ^ (N + i) := sorry _ = 1 / 2 ^ N * ∑ i in range k, (1 / 2) ^ i := sorry _ ≤ 1 / 2 ^ N * 2 := sorry _ < ε := sorry open Metric example [CompleteSpace X] (f : ℕ → Set X) (ho : ∀ n, IsOpen (f n)) (hd : ∀ n, Dense (f n)) : Dense (⋂ n, f n) := by let B : ℕ → ℝ := fun n => (1 / 2) ^ n have Bpos : ∀ n, 0 < B n sorry /- Translate the density assumption into two functions `center` and `radius` associating to any n, x, δ, δpos a center and a positive radius such that `closedBall center radius` is included both in `f n` and in `closedBall x δ`. We can also require `radius ≤ (1/2)^(n+1)`, to ensure we get a Cauchy sequence later. -/ have : ∀ (n : ℕ) (x : X), ∀ δ > 0, ∃ y : X, ∃ r > 0, r ≤ B (n + 1) ∧ closedBall y r ⊆ closedBall x δ ∩ f n := by sorry choose! center radius Hpos HB Hball using this intro x rw [mem_closure_iff_nhds_basis nhds_basis_closedBall] intro ε εpos /- `ε` is positive. We have to find a point in the ball of radius `ε` around `x` belonging to all `f n`. For this, we construct inductively a sequence `F n = (c n, r n)` such that the closed ball `closedBall (c n) (r n)` is included in the previous ball and in `f n`, and such that `r n` is small enough to ensure that `c n` is a Cauchy sequence. Then `c n` converges to a limit which belongs to all the `f n`. -/ let F : ℕ → X × ℝ := fun n => Nat.recOn n (Prod.mk x (min ε (B 0))) fun n p => Prod.mk (center n p.1 p.2) (radius n p.1 p.2) let c : ℕ → X := fun n => (F n).1 let r : ℕ → ℝ := fun n => (F n).2 have rpos : ∀ n, 0 < r n := by sorry have rB : ∀ n, r n ≤ B n := by sorry have incl : ∀ n, closedBall (c (n + 1)) (r (n + 1)) ⊆ closedBall (c n) (r n) ∩ f n := by sorry have cdist : ∀ n, dist (c n) (c (n + 1)) ≤ B n := by sorry have : CauchySeq c := cauchySeq_of_le_geometric_two' cdist -- as the sequence `c n` is Cauchy in a complete space, it converges to a limit `y`. rcases cauchySeq_tendsto_of_complete this with ⟨y, ylim⟩ -- this point `y` will be the desired point. We will check that it belongs to all -- `f n` and to `ball x ε`. use y have I : ∀ n, ∀ m ≥ n, closedBall (c m) (r m) ⊆ closedBall (c n) (r n) := by sorry have yball : ∀ n, y ∈ closedBall (c n) (r n) := by sorry sorry
-
-
-
@@ -1,155 +0,0 @@import Mathlib.Topology.Instances.Real import Mathlib.Analysis.NormedSpace.BanachSteinhaus open Set Filter Topology section variable {X : Type _} [TopologicalSpace X] example : IsOpen (univ : Set X) := isOpen_univ example : IsOpen (∅ : Set X) := isOpen_empty example {ι : Type _} {s : ι → Set X} (hs : ∀ i, IsOpen <| s i) : IsOpen (⋃ i, s i) := isOpen_iUnion hs example {ι : Type _} [Fintype ι] {s : ι → Set X} (hs : ∀ i, IsOpen <| s i) : IsOpen (⋂ i, s i) := isOpen_iInter hs variable {Y : Type _} [TopologicalSpace Y] example {f : X → Y} : Continuous f ↔ ∀ s, IsOpen s → IsOpen (f ⁻¹' s) := continuous_def example {f : X → Y} {x : X} : ContinuousAt f x ↔ map f (𝓝 x) ≤ 𝓝 (f x) := Iff.rfl example {f : X → Y} {x : X} : ContinuousAt f x ↔ ∀ U ∈ 𝓝 (f x), ∀ᶠ x in 𝓝 x, f x ∈ U := Iff.rfl example {x : X} {s : Set X} : s ∈ 𝓝 x ↔ ∃ t, t ⊆ s ∧ IsOpen t ∧ x ∈ t := mem_nhds_iff example (x : X) : pure x ≤ 𝓝 x := pure_le_nhds x example (x : X) (P : X → Prop) (h : ∀ᶠ y in 𝓝 x, P y) : P x := pure_le_nhds x h example {P : X → Prop} {x : X} (h : ∀ᶠ y in 𝓝 x, P y) : ∀ᶠ y in 𝓝 x, ∀ᶠ z in 𝓝 y, P z := eventually_eventually_nhds.mpr h #check TopologicalSpace.mkOfNhds #check TopologicalSpace.nhds_mkOfNhds example {α : Type _} (n : α → Filter α) (H₀ : ∀ a, pure a ≤ n a) (H : ∀ a : α, ∀ p : α → Prop, (∀ᶠ x in n a, p x) → ∀ᶠ y in n a, ∀ᶠ x in n y, p x) : ∀ a, ∀ s ∈ n a, ∃ t ∈ n a, t ⊆ s ∧ ∀ a' ∈ t, s ∈ n a' := sorry end -- BOTH. variable {X Y : Type _} example (f : X → Y) : TopologicalSpace X → TopologicalSpace Y := TopologicalSpace.coinduced f example (f : X → Y) : TopologicalSpace Y → TopologicalSpace X := TopologicalSpace.induced f example (f : X → Y) (T_X : TopologicalSpace X) (T_Y : TopologicalSpace Y) : TopologicalSpace.coinduced f T_X ≤ T_Y ↔ T_X ≤ TopologicalSpace.induced f T_Y := coinduced_le_iff_le_induced #check coinduced_compose #check induced_compose example {T T' : TopologicalSpace X} : T ≤ T' ↔ ∀ s, T'.IsOpen s → T.IsOpen s := Iff.rfl example (T_X : TopologicalSpace X) (T_Y : TopologicalSpace Y) (f : X → Y) : Continuous f ↔ TopologicalSpace.coinduced f T_X ≤ T_Y := continuous_iff_coinduced_le example {Z : Type _} (f : X → Y) (T_X : TopologicalSpace X) (T_Z : TopologicalSpace Z) (g : Y → Z) : @Continuous Y Z (TopologicalSpace.coinduced f T_X) T_Z g ↔ @Continuous X Z T_X T_Z (g ∘ f) := by rw [continuous_iff_coinduced_le, coinduced_compose, continuous_iff_coinduced_le] example (ι : Type _) (X : ι → Type _) (T_X : ∀ i, TopologicalSpace <| X i) : (Pi.topologicalSpace : TopologicalSpace (∀ i, X i)) = ⨅ i, TopologicalSpace.induced (fun x => x i) (T_X i) := rfl example [TopologicalSpace X] [T2Space X] {u : ℕ → X} {a b : X} (ha : Tendsto u atTop (𝓝 a)) (hb : Tendsto u atTop (𝓝 b)) : a = b := tendsto_nhds_unique ha hb example [TopologicalSpace X] [RegularSpace X] (a : X) : (𝓝 a).HasBasis (fun s : Set X => s ∈ 𝓝 a ∧ IsClosed s) id := closed_nhds_basis a example [TopologicalSpace X] {x : X} : (𝓝 x).HasBasis (fun t : Set X => t ∈ 𝓝 x ∧ IsOpen t) id := nhds_basis_opens' x theorem aux {X Y A : Type _} [TopologicalSpace X] {c : A → X} {f : A → Y} {x : X} {F : Filter Y} (h : Tendsto f (comap c (𝓝 x)) F) {V' : Set Y} (V'_in : V' ∈ F) : ∃ V ∈ 𝓝 x, IsOpen V ∧ c ⁻¹' V ⊆ f ⁻¹' V' := sorry example [TopologicalSpace X] [TopologicalSpace Y] [RegularSpace Y] {A : Set X} (hA : ∀ x, x ∈ closure A) {f : A → Y} (f_cont : Continuous f) (hf : ∀ x : X, ∃ c : Y, Tendsto f (comap (↑) <| 𝓝 x) <| 𝓝 c) : ∃ φ : X → Y, Continuous φ ∧ ∀ a : A, φ a = f a := sorry #check @HasBasis.tendsto_right_iff example [TopologicalSpace X] [TopologicalSpace.FirstCountableTopology X] {s : Set X} {a : X} : a ∈ closure s ↔ ∃ u : ℕ → X, (∀ n, u n ∈ s) ∧ Tendsto u atTop (𝓝 a) := mem_closure_iff_seq_limit variable [TopologicalSpace X] example {F : Filter X} {x : X} : ClusterPt x F ↔ NeBot (𝓝 x ⊓ F) := Iff.rfl example {s : Set X} : IsCompact s ↔ ∀ (F : Filter X) [NeBot F], F ≤ 𝓟 s → ∃ a ∈ s, ClusterPt a F := Iff.rfl example [TopologicalSpace.FirstCountableTopology X] {s : Set X} {u : ℕ → X} (hs : IsCompact s) (hu : ∀ n, u n ∈ s) : ∃ a ∈ s, ∃ φ : ℕ → ℕ, StrictMono φ ∧ Tendsto (u ∘ φ) atTop (𝓝 a) := hs.tendsto_subseq hu variable [TopologicalSpace Y] example {x : X} {F : Filter X} {G : Filter Y} (H : ClusterPt x F) {f : X → Y} (hfx : ContinuousAt f x) (hf : Tendsto f F G) : ClusterPt (f x) G := ClusterPt.map H hfx hf example [TopologicalSpace Y] {f : X → Y} (hf : Continuous f) {s : Set X} (hs : IsCompact s) : IsCompact (f '' s) := by intro F F_ne F_le have map_eq : map f (𝓟 s ⊓ comap f F) = 𝓟 (f '' s) ⊓ F := by sorry have Hne : (𝓟 s ⊓ comap f F).NeBot := by sorry have Hle : 𝓟 s ⊓ comap f F ≤ 𝓟 s := inf_le_left sorry example {ι : Type _} {s : Set X} (hs : IsCompact s) (U : ι → Set X) (hUo : ∀ i, IsOpen (U i)) (hsU : s ⊆ ⋃ i, U i) : ∃ t : Finset ι, s ⊆ ⋃ i ∈ t, U i := hs.elim_finite_subcover U hUo hsU example [CompactSpace X] : IsCompact (univ : Set X) := isCompact_univ
-
-
-
@@ -1,71 +0,0 @@import Mathlib.Topology.Instances.Real open Set Filter Topology -- In the next example we could use `tauto` in each proof instead of knowing the lemmas example {α : Type _} (s : Set α) : Filter α := { sets := { t | s ⊆ t } univ_sets := subset_univ s sets_of_superset := fun hU hUV => Subset.trans hU hUV inter_sets := fun hU hV => subset_inter hU hV } example : Filter ℕ := { sets := { s | ∃ a, ∀ b, a ≤ b → b ∈ s } univ_sets := by use 42 simp sets_of_superset := by rintro U V ⟨N, hN⟩ hUV use N tauto inter_sets := by rintro U V ⟨N, hN⟩ ⟨N', hN'⟩ use max N N' intro b hb rw [max_le_iff] at hb constructor <;> tauto } def Tendsto₁ {X Y : Type _} (f : X → Y) (F : Filter X) (G : Filter Y) := ∀ V ∈ G, f ⁻¹' V ∈ F example {X Y Z : Type _} {F : Filter X} {G : Filter Y} {H : Filter Z} {f : X → Y} {g : Y → Z} (hf : Tendsto₁ f F G) (hg : Tendsto₁ g G H) : Tendsto₁ (g ∘ f) F H := calc map (g ∘ f) F = map g (map f F) := by rw [map_map] _ ≤ map g G := (map_mono hf) _ ≤ H := hg example {X Y Z : Type _} {F : Filter X} {G : Filter Y} {H : Filter Z} {f : X → Y} {g : Y → Z} (hf : Tendsto₁ f F G) (hg : Tendsto₁ g G H) : Tendsto₁ (g ∘ f) F H := by intro V hV rw [preimage_comp] apply hf apply hg exact hV example (f : ℕ → ℝ × ℝ) (x₀ y₀ : ℝ) : Tendsto f atTop (𝓝 (x₀, y₀)) ↔ Tendsto (Prod.fst ∘ f) atTop (𝓝 x₀) ∧ Tendsto (Prod.snd ∘ f) atTop (𝓝 y₀) := calc Tendsto f atTop (𝓝 (x₀, y₀)) ↔ map f atTop ≤ 𝓝 (x₀, y₀) := Iff.rfl _ ↔ map f atTop ≤ 𝓝 x₀ ×ᶠ 𝓝 y₀ := by rw [nhds_prod_eq] _ ↔ map f atTop ≤ comap Prod.fst (𝓝 x₀) ⊓ comap Prod.snd (𝓝 y₀) := Iff.rfl _ ↔ map f atTop ≤ comap Prod.fst (𝓝 x₀) ∧ map f atTop ≤ comap Prod.snd (𝓝 y₀) := le_inf_iff _ ↔ map Prod.fst (map f atTop) ≤ 𝓝 x₀ ∧ map Prod.snd (map f atTop) ≤ 𝓝 y₀ := by rw [← map_le_iff_le_comap, ← map_le_iff_le_comap] _ ↔ map (Prod.fst ∘ f) atTop ≤ 𝓝 x₀ ∧ map (Prod.snd ∘ f) atTop ≤ 𝓝 y₀ := by rw [map_map, map_map] -- an alternative solution example (f : ℕ → ℝ × ℝ) (x₀ y₀ : ℝ) : Tendsto f atTop (𝓝 (x₀, y₀)) ↔ Tendsto (Prod.fst ∘ f) atTop (𝓝 x₀) ∧ Tendsto (Prod.snd ∘ f) atTop (𝓝 y₀) := by rw [nhds_prod_eq] unfold Tendsto Filter.prod rw [le_inf_iff, ← map_le_iff_le_comap, map_map, ← map_le_iff_le_comap, map_map] example (u : ℕ → ℝ) (M : Set ℝ) (x : ℝ) (hux : Tendsto u atTop (𝓝 x)) (huM : ∀ᶠ n in atTop, u n ∈ M) : x ∈ closure M := mem_closure_iff_clusterPt.mpr (neBot_of_le <| le_inf hux <| le_principal_iff.mpr huM)
-
-
-
@@ -1,371 +0,0 @@import Mathlib.Topology.Instances.Real import Mathlib.Analysis.NormedSpace.BanachSteinhaus open Set Filter open Topology Filter variable {X : Type _} [MetricSpace X] (a b c : X) #check (dist a b : ℝ) #check (dist_nonneg : 0 ≤ dist a b) #check (dist_eq_zero : dist a b = 0 ↔ a = b) #check (dist_comm a b : dist a b = dist b a) #check (dist_triangle a b c : dist a c ≤ dist a b + dist b c) -- Note the next three lines are not quoted, their purpose is to make sure those things don't get renamed while we're looking elsewhere. #check EMetricSpace #check PseudoMetricSpace #check PseudoEMetricSpace example {u : ℕ → X} {a : X} : Tendsto u atTop (𝓝 a) ↔ ∀ ε > 0, ∃ N, ∀ n ≥ N, dist (u n) a < ε := Metric.tendsto_atTop example {X Y : Type _} [MetricSpace X] [MetricSpace Y] {f : X → Y} : Continuous f ↔ ∀ x : X, ∀ ε > 0, ∃ δ > 0, ∀ x', dist x' x < δ → dist (f x') (f x) < ε := Metric.continuous_iff example {X Y : Type _} [MetricSpace X] [MetricSpace Y] {f : X → Y} (hf : Continuous f) : Continuous fun p : X × X => dist (f p.1) (f p.2) := by continuity example {X Y : Type _} [MetricSpace X] [MetricSpace Y] {f : X → Y} (hf : Continuous f) : Continuous fun p : X × X => dist (f p.1) (f p.2) := continuous_dist.comp ((hf.comp continuous_fst).prod_mk (hf.comp continuous_snd)) example {X Y : Type _} [MetricSpace X] [MetricSpace Y] {f : X → Y} (hf : Continuous f) : Continuous fun p : X × X => dist (f p.1) (f p.2) := by apply Continuous.dist exact hf.comp continuous_fst exact hf.comp continuous_snd example {X Y : Type _} [MetricSpace X] [MetricSpace Y] {f : X → Y} (hf : Continuous f) : Continuous fun p : X × X => dist (f p.1) (f p.2) := (hf.comp continuous_fst).dist (hf.comp continuous_snd) example {X Y : Type _} [MetricSpace X] [MetricSpace Y] {f : X → Y} (hf : Continuous f) : Continuous fun p : X × X => dist (f p.1) (f p.2) := hf.fst'.dist hf.snd' example {f : ℝ → X} (hf : Continuous f) : Continuous fun x : ℝ => f (x ^ 2 + x) := sorry example {f : ℝ → X} (hf : Continuous f) : Continuous fun x : ℝ => f (x ^ 2 + x) := hf.comp <| (continuous_pow 2).add continuous_id example {X Y : Type _} [MetricSpace X] [MetricSpace Y] (f : X → Y) (a : X) : ContinuousAt f a ↔ ∀ ε > 0, ∃ δ > 0, ∀ {x}, dist x a < δ → dist (f x) (f a) < ε := Metric.continuousAt_iff variable (r : ℝ) example : Metric.ball a r = { b | dist b a < r } := rfl example : Metric.closedBall a r = { b | dist b a ≤ r } := rfl example (hr : 0 < r) : a ∈ Metric.ball a r := Metric.mem_ball_self hr example (hr : 0 ≤ r) : a ∈ Metric.closedBall a r := Metric.mem_closedBall_self hr example (s : Set X) : IsOpen s ↔ ∀ x ∈ s, ∃ ε > 0, Metric.ball x ε ⊆ s := Metric.isOpen_iff example {s : Set X} : IsClosed s ↔ IsOpen (sᶜ) := isOpen_compl_iff.symm example {s : Set X} (hs : IsClosed s) {u : ℕ → X} (hu : Tendsto u atTop (𝓝 a)) (hus : ∀ n, u n ∈ s) : a ∈ s := hs.mem_of_tendsto hu (eventually_of_forall hus) example {s : Set X} : a ∈ closure s ↔ ∀ ε > 0, ∃ b ∈ s, a ∈ Metric.ball b ε := Metric.mem_closure_iff example {u : ℕ → X} (hu : Tendsto u atTop (𝓝 a)) {s : Set X} (hs : ∀ n, u n ∈ s) : a ∈ closure s := sorry example {u : ℕ → X} (hu : Tendsto u atTop (𝓝 a)) {s : Set X} (hs : ∀ n, u n ∈ s) : a ∈ closure s := by rw [Metric.tendsto_atTop] at hu rw [Metric.mem_closure_iff] intro ε ε_pos rcases hu ε ε_pos with ⟨N, hN⟩ refine' ⟨u N, hs _, _⟩ rw [dist_comm] exact hN N le_rfl example {x : X} {s : Set X} : s ∈ 𝓝 x ↔ ∃ ε > 0, Metric.ball x ε ⊆ s := Metric.nhds_basis_ball.mem_iff example {x : X} {s : Set X} : s ∈ 𝓝 x ↔ ∃ ε > 0, Metric.closedBall x ε ⊆ s := Metric.nhds_basis_closedBall.mem_iff example : IsCompact (Set.Icc 0 1 : Set ℝ) := isCompact_Icc example {s : Set X} (hs : IsCompact s) {u : ℕ → X} (hu : ∀ n, u n ∈ s) : ∃ a ∈ s, ∃ φ : ℕ → ℕ, StrictMono φ ∧ Tendsto (u ∘ φ) atTop (𝓝 a) := hs.tendsto_subseq hu example {s : Set X} (hs : IsCompact s) (hs' : s.Nonempty) {f : X → ℝ} (hfs : ContinuousOn f s) : ∃ x ∈ s, ∀ y ∈ s, f x ≤ f y := hs.exists_forall_le hs' hfs example {s : Set X} (hs : IsCompact s) (hs' : s.Nonempty) {f : X → ℝ} (hfs : ContinuousOn f s) : ∃ x ∈ s, ∀ y ∈ s, f y ≤ f x := hs.exists_forall_ge hs' hfs example {s : Set X} (hs : IsCompact s) : IsClosed s := hs.isClosed example {X : Type _} [MetricSpace X] [CompactSpace X] : IsCompact (univ : Set X) := isCompact_univ #check IsCompact.isClosed example {X : Type _} [MetricSpace X] {Y : Type _} [MetricSpace Y] {f : X → Y} : UniformContinuous f ↔ ∀ ε > 0, ∃ δ > 0, ∀ {a b : X}, dist a b < δ → dist (f a) (f b) < ε := Metric.uniformContinuous_iff example {X : Type _} [MetricSpace X] [CompactSpace X] {Y : Type _} [MetricSpace Y] {f : X → Y} (hf : Continuous f) : UniformContinuous f := sorry example {X : Type _} [MetricSpace X] [CompactSpace X] {Y : Type _} [MetricSpace Y] {f : X → Y} (hf : Continuous f) : UniformContinuous f := by rw [Metric.uniformContinuous_iff] intro ε ε_pos let φ : X × X → ℝ := fun p => dist (f p.1) (f p.2) have φ_cont : Continuous φ := hf.fst'.dist hf.snd' let K := { p : X × X | ε ≤ φ p } have K_closed : IsClosed K := isClosed_le continuous_const φ_cont have K_cpct : IsCompact K := K_closed.isCompact cases' eq_empty_or_nonempty K with hK hK · use 1, by norm_num intro x y _ have : (x, y) ∉ K := by simp [hK] simpa using this · rcases K_cpct.exists_forall_le hK continuous_dist.continuousOn with ⟨⟨x₀, x₁⟩, xx_in, H⟩ use dist x₀ x₁ constructor · change _ < _ rw [dist_pos] intro h have : ε ≤ 0 := by simpa [*] using xx_in linarith · intro x x' contrapose! intro hxx' exact H (x, x') hxx' example (u : ℕ → X) : CauchySeq u ↔ ∀ ε > 0, ∃ N : ℕ, ∀ m ≥ N, ∀ n ≥ N, dist (u m) (u n) < ε := Metric.cauchySeq_iff example (u : ℕ → X) : CauchySeq u ↔ ∀ ε > 0, ∃ N : ℕ, ∀ n ≥ N, dist (u n) (u N) < ε := Metric.cauchySeq_iff' example [CompleteSpace X] (u : ℕ → X) (hu : CauchySeq u) : ∃ x, Tendsto u atTop (𝓝 x) := cauchySeq_tendsto_of_complete hu open BigOperators open Finset theorem cauchySeq_of_le_geometric_two' {u : ℕ → X} (hu : ∀ n : ℕ, dist (u n) (u (n + 1)) ≤ (1 / 2) ^ n) : CauchySeq u := by rw [Metric.cauchySeq_iff'] intro ε ε_pos obtain ⟨N, hN⟩ : ∃ N : ℕ, 1 / 2 ^ N * 2 < ε := by sorry use N intro n hn obtain ⟨k, rfl : n = N + k⟩ := le_iff_exists_add.mp hn calc dist (u (N + k)) (u N) = dist (u (N + 0)) (u (N + k)) := sorry _ ≤ ∑ i in range k, dist (u (N + i)) (u (N + (i + 1))) := sorry _ ≤ ∑ i in range k, (1 / 2 : ℝ) ^ (N + i) := sorry _ = 1 / 2 ^ N * ∑ i in range k, (1 / 2) ^ i := sorry _ ≤ 1 / 2 ^ N * 2 := sorry _ < ε := sorry example {u : ℕ → X} (hu : ∀ n : ℕ, dist (u n) (u (n + 1)) ≤ (1 / 2) ^ n) : CauchySeq u := by rw [Metric.cauchySeq_iff'] intro ε ε_pos obtain ⟨N, hN⟩ : ∃ N : ℕ, 1 / 2 ^ N * 2 < ε := by have : Tendsto (fun N : ℕ => (1 / 2 ^ N * 2 : ℝ)) atTop (𝓝 0) := by rw [← MulZeroClass.zero_mul (2 : ℝ)] apply Tendsto.mul simp_rw [← one_div_pow (2 : ℝ)] apply tendsto_pow_atTop_nhds_0_of_lt_1 <;> linarith exact tendsto_const_nhds rcases(atTop_basis.tendsto_iff (nhds_basis_Ioo_pos (0 : ℝ))).mp this ε ε_pos with ⟨N, _, hN⟩ exact ⟨N, by simpa using (hN N left_mem_Ici).2⟩ use N intro n hn obtain ⟨k, rfl : n = N + k⟩ := le_iff_exists_add.mp hn calc dist (u (N + k)) (u N) = dist (u (N + 0)) (u (N + k)) := by rw [dist_comm, add_zero] _ ≤ ∑ i in range k, dist (u (N + i)) (u (N + (i + 1))) := (dist_le_range_sum_dist (fun i => u (N + i)) k) _ ≤ ∑ i in range k, (1 / 2 : ℝ) ^ (N + i) := (sum_le_sum fun i _ => hu <| N + i) _ = 1 / 2 ^ N * ∑ i in range k, (1 / 2 : ℝ) ^ i := by simp_rw [← one_div_pow, pow_add, ← mul_sum] _ ≤ 1 / 2 ^ N * 2 := (mul_le_mul_of_nonneg_left (sum_geometric_two_le _) (one_div_nonneg.mpr (pow_nonneg (zero_le_two : (0 : ℝ) ≤ 2) _))) _ < ε := hN open Metric example [CompleteSpace X] (f : ℕ → Set X) (ho : ∀ n, IsOpen (f n)) (hd : ∀ n, Dense (f n)) : Dense (⋂ n, f n) := by let B : ℕ → ℝ := fun n => (1 / 2) ^ n have Bpos : ∀ n, 0 < B n sorry /- Translate the density assumption into two functions `center` and `radius` associating to any n, x, δ, δpos a center and a positive radius such that `closedBall center radius` is included both in `f n` and in `closedBall x δ`. We can also require `radius ≤ (1/2)^(n+1)`, to ensure we get a Cauchy sequence later. -/ have : ∀ (n : ℕ) (x : X), ∀ δ > 0, ∃ y : X, ∃ r > 0, r ≤ B (n + 1) ∧ closedBall y r ⊆ closedBall x δ ∩ f n := by sorry choose! center radius Hpos HB Hball using this intro x rw [mem_closure_iff_nhds_basis nhds_basis_closedBall] intro ε εpos /- `ε` is positive. We have to find a point in the ball of radius `ε` around `x` belonging to all `f n`. For this, we construct inductively a sequence `F n = (c n, r n)` such that the closed ball `closedBall (c n) (r n)` is included in the previous ball and in `f n`, and such that `r n` is small enough to ensure that `c n` is a Cauchy sequence. Then `c n` converges to a limit which belongs to all the `f n`. -/ let F : ℕ → X × ℝ := fun n => Nat.recOn n (Prod.mk x (min ε (B 0))) fun n p => Prod.mk (center n p.1 p.2) (radius n p.1 p.2) let c : ℕ → X := fun n => (F n).1 let r : ℕ → ℝ := fun n => (F n).2 have rpos : ∀ n, 0 < r n := by sorry have rB : ∀ n, r n ≤ B n := by sorry have incl : ∀ n, closedBall (c (n + 1)) (r (n + 1)) ⊆ closedBall (c n) (r n) ∩ f n := by sorry have cdist : ∀ n, dist (c n) (c (n + 1)) ≤ B n := by sorry have : CauchySeq c := cauchySeq_of_le_geometric_two' cdist -- as the sequence `c n` is Cauchy in a complete space, it converges to a limit `y`. rcases cauchySeq_tendsto_of_complete this with ⟨y, ylim⟩ -- this point `y` will be the desired point. We will check that it belongs to all -- `f n` and to `ball x ε`. use y have I : ∀ n, ∀ m ≥ n, closedBall (c m) (r m) ⊆ closedBall (c n) (r n) := by sorry have yball : ∀ n, y ∈ closedBall (c n) (r n) := by sorry sorry example [CompleteSpace X] (f : ℕ → Set X) (ho : ∀ n, IsOpen (f n)) (hd : ∀ n, Dense (f n)) : Dense (⋂ n, f n) := by let B : ℕ → ℝ := fun n => (1 / 2) ^ n have Bpos : ∀ n, 0 < B n := fun n => pow_pos sorry n /- Translate the density assumption into two functions `center` and `radius` associating to any n, x, δ, δpos a center and a positive radius such that `closedBall center radius` is included both in `f n` and in `closedBall x δ`. We can also require `radius ≤ (1/2)^(n+1)`, to ensure we get a Cauchy sequence later. -/ have : ∀ (n : ℕ) (x : X), ∀ δ > 0, ∃ y : X, ∃ r > 0, r ≤ B (n + 1) ∧ closedBall y r ⊆ closedBall x δ ∩ f n := by intro n x δ δpos have : x ∈ closure (f n) := hd n x rcases Metric.mem_closure_iff.1 this (δ / 2) (half_pos δpos) with ⟨y, ys, xy⟩ rw [dist_comm] at xy obtain ⟨r, rpos, hr⟩ : ∃ r > 0, closedBall y r ⊆ f n := nhds_basis_closedBall.mem_iff.1 (isOpen_iff_mem_nhds.1 (ho n) y ys) refine' ⟨y, min (min (δ / 2) r) (B (n + 1)), _, _, fun z hz => ⟨_, _⟩⟩ show 0 < min (min (δ / 2) r) (B (n + 1)) exact lt_min (lt_min (half_pos δpos) rpos) (Bpos (n + 1)) show min (min (δ / 2) r) (B (n + 1)) ≤ B (n + 1) exact min_le_right _ _ show z ∈ closedBall x δ exact calc dist z x ≤ dist z y + dist y x := dist_triangle _ _ _ _ ≤ min (min (δ / 2) r) (B (n + 1)) + δ / 2 := (add_le_add hz xy.le) _ ≤ δ / 2 + δ / 2 := (add_le_add_right ((min_le_left _ _).trans (min_le_left _ _)) _) _ = δ := add_halves δ show z ∈ f n exact hr (calc dist z y ≤ min (min (δ / 2) r) (B (n + 1)) := hz _ ≤ r := (min_le_left _ _).trans (min_le_right _ _) ) choose! center radius Hpos HB Hball using this refine' fun x => (mem_closure_iff_nhds_basis nhds_basis_closedBall).2 fun ε εpos => _ /- `ε` is positive. We have to find a point in the ball of radius `ε` around `x` belonging to all `f n`. For this, we construct inductively a sequence `F n = (c n, r n)` such that the closed ball `closedBall (c n) (r n)` is included in the previous ball and in `f n`, and such that `r n` is small enough to ensure that `c n` is a Cauchy sequence. Then `c n` converges to a limit which belongs to all the `f n`. -/ let F : ℕ → X × ℝ := fun n => Nat.recOn n (Prod.mk x (min ε (B 0))) fun n p => Prod.mk (center n p.1 p.2) (radius n p.1 p.2) let c : ℕ → X := fun n => (F n).1 let r : ℕ → ℝ := fun n => (F n).2 have rpos : ∀ n, 0 < r n := by intro n induction' n with n hn exact lt_min εpos (Bpos 0) exact Hpos n (c n) (r n) hn have rB : ∀ n, r n ≤ B n := by intro n induction' n with n hn exact min_le_right _ _ exact HB n (c n) (r n) (rpos n) have incl : ∀ n, closedBall (c (n + 1)) (r (n + 1)) ⊆ closedBall (c n) (r n) ∩ f n := fun n => Hball n (c n) (r n) (rpos n) have cdist : ∀ n, dist (c n) (c (n + 1)) ≤ B n := by intro n rw [dist_comm] have A : c (n + 1) ∈ closedBall (c (n + 1)) (r (n + 1)) := mem_closedBall_self (rpos <| n + 1).le have I := calc closedBall (c (n + 1)) (r (n + 1)) ⊆ closedBall (c n) (r n) := (incl n).trans (inter_subset_left _ _) _ ⊆ closedBall (c n) (B n) := closedBall_subset_closedBall (rB n) exact I A have : CauchySeq c := cauchySeq_of_le_geometric_two' cdist -- as the sequence `c n` is Cauchy in a complete space, it converges to a limit `y`. rcases cauchySeq_tendsto_of_complete this with ⟨y, ylim⟩ -- this point `y` will be the desired point. We will check that it belongs to all -- `f n` and to `ball x ε`. use y have I : ∀ n, ∀ m ≥ n, closedBall (c m) (r m) ⊆ closedBall (c n) (r n) := by intro n refine' Nat.le_induction _ fun m hnm h => _ · exact Subset.rfl · exact (incl m).trans ((Set.inter_subset_left _ _).trans h) have yball : ∀ n, y ∈ closedBall (c n) (r n) := by intro n refine' isClosed_ball.mem_of_tendsto ylim _ refine' (Filter.eventually_ge_atTop n).mono fun m hm => _ exact I n m hm (mem_closedBall_self (rpos _).le) constructor · suffices ∀ n, y ∈ f n by rwa [Set.mem_iInter] intro n have : closedBall (c (n + 1)) (r (n + 1)) ⊆ f n := Subset.trans (incl n) (inter_subset_right _ _) exact this (yball (n + 1)) calc dist y x ≤ r 0 := yball 0 _ ≤ ε := min_le_left _ _
-
-
-
@@ -1,207 +0,0 @@import Mathlib.Topology.Instances.Real import Mathlib.Analysis.NormedSpace.BanachSteinhaus open Set Filter Topology section variable {X : Type _} [TopologicalSpace X] example : IsOpen (univ : Set X) := isOpen_univ example : IsOpen (∅ : Set X) := isOpen_empty example {ι : Type _} {s : ι → Set X} (hs : ∀ i, IsOpen <| s i) : IsOpen (⋃ i, s i) := isOpen_iUnion hs example {ι : Type _} [Fintype ι] {s : ι → Set X} (hs : ∀ i, IsOpen <| s i) : IsOpen (⋂ i, s i) := isOpen_iInter hs variable {Y : Type _} [TopologicalSpace Y] example {f : X → Y} : Continuous f ↔ ∀ s, IsOpen s → IsOpen (f ⁻¹' s) := continuous_def example {f : X → Y} {x : X} : ContinuousAt f x ↔ map f (𝓝 x) ≤ 𝓝 (f x) := Iff.rfl example {f : X → Y} {x : X} : ContinuousAt f x ↔ ∀ U ∈ 𝓝 (f x), ∀ᶠ x in 𝓝 x, f x ∈ U := Iff.rfl example {x : X} {s : Set X} : s ∈ 𝓝 x ↔ ∃ t, t ⊆ s ∧ IsOpen t ∧ x ∈ t := mem_nhds_iff example (x : X) : pure x ≤ 𝓝 x := pure_le_nhds x example (x : X) (P : X → Prop) (h : ∀ᶠ y in 𝓝 x, P y) : P x := pure_le_nhds x h example {P : X → Prop} {x : X} (h : ∀ᶠ y in 𝓝 x, P y) : ∀ᶠ y in 𝓝 x, ∀ᶠ z in 𝓝 y, P z := eventually_eventually_nhds.mpr h #check TopologicalSpace.mkOfNhds #check TopologicalSpace.nhds_mkOfNhds example {α : Type _} (n : α → Filter α) (H₀ : ∀ a, pure a ≤ n a) (H : ∀ a : α, ∀ p : α → Prop, (∀ᶠ x in n a, p x) → ∀ᶠ y in n a, ∀ᶠ x in n y, p x) : ∀ a, ∀ s ∈ n a, ∃ t ∈ n a, t ⊆ s ∧ ∀ a' ∈ t, s ∈ n a' := sorry example {α : Type _} (n : α → Filter α) (H₀ : ∀ a, pure a ≤ n a) (H : ∀ a : α, ∀ p : α → Prop, (∀ᶠ x in n a, p x) → ∀ᶠ y in n a, ∀ᶠ x in n y, p x) : ∀ a, ∀ s ∈ n a, ∃ t ∈ n a, t ⊆ s ∧ ∀ a' ∈ t, s ∈ n a' := by intro a s s_in refine' ⟨{ y | s ∈ n y }, H a (fun x => x ∈ s) s_in, _, by tauto⟩ rintro y (hy : s ∈ n y) exact H₀ y hy end -- BOTH. variable {X Y : Type _} example (f : X → Y) : TopologicalSpace X → TopologicalSpace Y := TopologicalSpace.coinduced f example (f : X → Y) : TopologicalSpace Y → TopologicalSpace X := TopologicalSpace.induced f example (f : X → Y) (T_X : TopologicalSpace X) (T_Y : TopologicalSpace Y) : TopologicalSpace.coinduced f T_X ≤ T_Y ↔ T_X ≤ TopologicalSpace.induced f T_Y := coinduced_le_iff_le_induced #check coinduced_compose #check induced_compose example {T T' : TopologicalSpace X} : T ≤ T' ↔ ∀ s, T'.IsOpen s → T.IsOpen s := Iff.rfl example (T_X : TopologicalSpace X) (T_Y : TopologicalSpace Y) (f : X → Y) : Continuous f ↔ TopologicalSpace.coinduced f T_X ≤ T_Y := continuous_iff_coinduced_le example {Z : Type _} (f : X → Y) (T_X : TopologicalSpace X) (T_Z : TopologicalSpace Z) (g : Y → Z) : @Continuous Y Z (TopologicalSpace.coinduced f T_X) T_Z g ↔ @Continuous X Z T_X T_Z (g ∘ f) := by rw [continuous_iff_coinduced_le, coinduced_compose, continuous_iff_coinduced_le] example (ι : Type _) (X : ι → Type _) (T_X : ∀ i, TopologicalSpace <| X i) : (Pi.topologicalSpace : TopologicalSpace (∀ i, X i)) = ⨅ i, TopologicalSpace.induced (fun x => x i) (T_X i) := rfl example [TopologicalSpace X] [T2Space X] {u : ℕ → X} {a b : X} (ha : Tendsto u atTop (𝓝 a)) (hb : Tendsto u atTop (𝓝 b)) : a = b := tendsto_nhds_unique ha hb example [TopologicalSpace X] [RegularSpace X] (a : X) : (𝓝 a).HasBasis (fun s : Set X => s ∈ 𝓝 a ∧ IsClosed s) id := closed_nhds_basis a example [TopologicalSpace X] {x : X} : (𝓝 x).HasBasis (fun t : Set X => t ∈ 𝓝 x ∧ IsOpen t) id := nhds_basis_opens' x theorem aux {X Y A : Type _} [TopologicalSpace X] {c : A → X} {f : A → Y} {x : X} {F : Filter Y} (h : Tendsto f (comap c (𝓝 x)) F) {V' : Set Y} (V'_in : V' ∈ F) : ∃ V ∈ 𝓝 x, IsOpen V ∧ c ⁻¹' V ⊆ f ⁻¹' V' := sorry example {X Y A : Type _} [TopologicalSpace X] {c : A → X} {f : A → Y} {x : X} {F : Filter Y} (h : Tendsto f (comap c (𝓝 x)) F) {V' : Set Y} (V'_in : V' ∈ F) : ∃ V ∈ 𝓝 x, IsOpen V ∧ c ⁻¹' V ⊆ f ⁻¹' V' := by simpa [and_assoc] using ((nhds_basis_opens' x).comap c).tendsto_left_iff.mp h V' V'_in example [TopologicalSpace X] [TopologicalSpace Y] [RegularSpace Y] {A : Set X} (hA : ∀ x, x ∈ closure A) {f : A → Y} (f_cont : Continuous f) (hf : ∀ x : X, ∃ c : Y, Tendsto f (comap (↑) <| 𝓝 x) <| 𝓝 c) : ∃ φ : X → Y, Continuous φ ∧ ∀ a : A, φ a = f a := sorry #check @HasBasis.tendsto_right_iff example [TopologicalSpace X] [TopologicalSpace Y] [T3Space Y] {A : Set X} (hA : ∀ x, x ∈ closure A) {f : A → Y} (f_cont : Continuous f) (hf : ∀ x : X, ∃ c : Y, Tendsto f (comap (↑) <| 𝓝 x) <| 𝓝 c) : ∃ φ : X → Y, Continuous φ ∧ ∀ a : A, φ a = f a := by choose φ hφ using hf use φ constructor · rw [continuous_iff_continuousAt] intro x suffices ∀ V' ∈ 𝓝 (φ x), IsClosed V' → φ ⁻¹' V' ∈ 𝓝 x by simpa [ContinuousAt, (closed_nhds_basis (φ x)).tendsto_right_iff] intro V' V'_in V'_closed obtain ⟨V, V_in, V_op, hV⟩ : ∃ V ∈ 𝓝 x, IsOpen V ∧ (↑) ⁻¹' V ⊆ f ⁻¹' V' := aux (hφ x) V'_in suffices : ∀ y ∈ V, φ y ∈ V' exact mem_of_superset V_in this intro y y_in have hVx : V ∈ 𝓝 y := V_op.mem_nhds y_in haveI : (comap ((↑) : A → X) (𝓝 y)).NeBot := by simpa [mem_closure_iff_comap_neBot] using hA y apply V'_closed.mem_of_tendsto (hφ y) exact mem_of_superset (preimage_mem_comap hVx) hV · intro a have lim : Tendsto f (𝓝 a) (𝓝 <| φ a) := by simpa [nhds_induced] using hφ a exact tendsto_nhds_unique lim f_cont.continuousAt example [TopologicalSpace X] [TopologicalSpace.FirstCountableTopology X] {s : Set X} {a : X} : a ∈ closure s ↔ ∃ u : ℕ → X, (∀ n, u n ∈ s) ∧ Tendsto u atTop (𝓝 a) := mem_closure_iff_seq_limit variable [TopologicalSpace X] example {F : Filter X} {x : X} : ClusterPt x F ↔ NeBot (𝓝 x ⊓ F) := Iff.rfl example {s : Set X} : IsCompact s ↔ ∀ (F : Filter X) [NeBot F], F ≤ 𝓟 s → ∃ a ∈ s, ClusterPt a F := Iff.rfl example [TopologicalSpace.FirstCountableTopology X] {s : Set X} {u : ℕ → X} (hs : IsCompact s) (hu : ∀ n, u n ∈ s) : ∃ a ∈ s, ∃ φ : ℕ → ℕ, StrictMono φ ∧ Tendsto (u ∘ φ) atTop (𝓝 a) := hs.tendsto_subseq hu variable [TopologicalSpace Y] example {x : X} {F : Filter X} {G : Filter Y} (H : ClusterPt x F) {f : X → Y} (hfx : ContinuousAt f x) (hf : Tendsto f F G) : ClusterPt (f x) G := ClusterPt.map H hfx hf example [TopologicalSpace Y] {f : X → Y} (hf : Continuous f) {s : Set X} (hs : IsCompact s) : IsCompact (f '' s) := by intro F F_ne F_le have map_eq : map f (𝓟 s ⊓ comap f F) = 𝓟 (f '' s) ⊓ F := by sorry have Hne : (𝓟 s ⊓ comap f F).NeBot := by sorry have Hle : 𝓟 s ⊓ comap f F ≤ 𝓟 s := inf_le_left sorry example [TopologicalSpace Y] {f : X → Y} (hf : Continuous f) {s : Set X} (hs : IsCompact s) : IsCompact (f '' s) := by intro F F_ne F_le have map_eq : map f (𝓟 s ⊓ comap f F) = 𝓟 (f '' s) ⊓ F := by rw [Filter.push_pull, map_principal] have Hne : (𝓟 s ⊓ comap f F).NeBot := by apply NeBot.of_map rwa [map_eq, inf_of_le_right F_le] have Hle : 𝓟 s ⊓ comap f F ≤ 𝓟 s := inf_le_left rcases hs Hle with ⟨x, x_in, hx⟩ refine' ⟨f x, mem_image_of_mem f x_in, _⟩ apply hx.map hf.continuousAt rw [Tendsto, map_eq] exact inf_le_right example {ι : Type _} {s : Set X} (hs : IsCompact s) (U : ι → Set X) (hUo : ∀ i, IsOpen (U i)) (hsU : s ⊆ ⋃ i, U i) : ∃ t : Finset ι, s ⊆ ⋃ i ∈ t, U i := hs.elim_finite_subcover U hUo hsU example [CompactSpace X] : IsCompact (univ : Set X) := isCompact_univ
-
-
-
@@ -148,7 +148,7 @@ example {X : Type _} [MetricSpace X] [CompactSpace X] {Y : Type _} [MetricSpacelet K := { p : X × X | ε ≤ φ p } have K_closed : IsClosed K := isClosed_le continuous_const φ_cont have K_cpct : IsCompact K := K_closed.isCompact cases' eq_empty_or_nonempty K with hK hK rcases eq_empty_or_nonempty K with hK | hK · use 1, by norm_num intro x y _ have : (x, y) ∉ K := by simp [hK]
-
-
-
@@ -29,7 +29,7 @@ example {ι : Type _} [CompleteSpace E] {g : ι → E →L[𝕜] F} (h : ∀ x,-- the union is the entire space; this is where we use `h` have hU : (⋃ n : ℕ, e n) = univ := by refine' eq_univ_of_forall fun x ↦ _ cases' h x with C hC rcases h x with ⟨C, hC⟩ obtain ⟨m, hm⟩ := exists_nat_ge C exact ⟨e m, mem_range_self m, mem_iInter.mpr fun i ↦ le_trans (hC i) hm⟩ /- apply the Baire category theorem to conclude that for some `m : ℕ`,
-
-
-
@@ -156,9 +156,9 @@ as described above.</p><p>This textbook and the associated repository are still a work in progress. You can update the repository by typing <code class="docutils literal notranslate"><span class="pre">git</span> <span class="pre">pull</span></code> followed by <code class="docutils literal notranslate"><span class="pre">lake</span> <span class="pre">exe</span> <span class="pre">cache</span> <span class="pre">get</span></code> inside the <code class="docutils literal notranslate"><span class="pre">mathematics_in_lean</span></code> folder. (This assumes that you have not changed the contents of the <cite>MIL</cite> folder, (This assumes that you have not changed the contents of the <code class="docutils literal notranslate"><span class="pre">MIL</span></code> folder, which is why we suggested making a copy.)</p> <p>We intend for you to work on the exercises in the <cite>MIL</cite> folder while reading the <p>We intend for you to work on the exercises in the <code class="docutils literal notranslate"><span class="pre">MIL</span></code> folder while reading the textbook, which contains explanations, instructions, and hints. The text will often include examples, like this one:</p> <div class="highlight-lean notranslate"><div class="highlight"><pre><span></span><span class="k">#eval</span> <span class="s2">"Hello, World!"</span>
-
-
-
@@ -559,30 +559,32 @@ then so does <code class="docutils literal notranslate"><span class="pre">fun</s<div class="highlight-lean notranslate"><div class="highlight"><pre><span></span><span class="kd">variable</span> <span class="o">{</span><span class="n">f</span> <span class="n">g</span> <span class="o">:</span> <span class="n">ℝ</span> <span class="bp">→</span> <span class="n">ℝ</span><span class="o">}</span> <span class="kd">example</span> <span class="o">(</span><span class="n">ubf</span> <span class="o">:</span> <span class="n">FnHasUb</span> <span class="n">f</span><span class="o">)</span> <span class="o">(</span><span class="n">ubg</span> <span class="o">:</span> <span class="n">FnHasUb</span> <span class="n">g</span><span class="o">)</span> <span class="o">:</span> <span class="n">FnHasUb</span> <span class="k">fun</span> <span class="n">x</span> <span class="bp">↦</span> <span class="n">f</span> <span class="n">x</span> <span class="bp">+</span> <span class="n">g</span> <span class="n">x</span> <span class="o">:=</span> <span class="kd">by</span> <span class="n">cases'</span> <span class="n">ubf</span> <span class="k">with</span> <span class="n">a</span> <span class="n">ubfa</span> <span class="n">cases'</span> <span class="n">ubg</span> <span class="k">with</span> <span class="n">b</span> <span class="n">ubgb</span> <span class="n">rcases</span> <span class="n">ubf</span> <span class="k">with</span> <span class="o">⟨</span><span class="n">a</span><span class="o">,</span> <span class="n">ubfa</span><span class="o">⟩</span> <span class="n">rcases</span> <span class="n">ubg</span> <span class="k">with</span> <span class="o">⟨</span><span class="n">b</span><span class="o">,</span> <span class="n">ubgb</span><span class="o">⟩</span> <span class="n">use</span> <span class="n">a</span> <span class="bp">+</span> <span class="n">b</span> <span class="n">apply</span> <span class="n">fnUb_add</span> <span class="n">ubfa</span> <span class="n">ubgb</span> </pre></div> </div> <p id="index-8">The <code class="docutils literal notranslate"><span class="pre">cases'</span></code> tactic unpacks the information <p id="index-8">The <code class="docutils literal notranslate"><span class="pre">rcases</span></code> tactic unpacks the information in the existential quantifier. The annotations like <code class="docutils literal notranslate"><span class="pre">⟨a,</span> <span class="pre">ubfa⟩</span></code>, written with the same angle brackets as the anonymous constructors, are known as <em>patterns</em>, and they describe the information that we expect to find when we unpack the main argument. Given the hypothesis <code class="docutils literal notranslate"><span class="pre">ubf</span></code> that there is an upper bound for <code class="docutils literal notranslate"><span class="pre">f</span></code>, <code class="docutils literal notranslate"><span class="pre">cases'</span></code> adds a new variable for an upper bound to the context, together with the hypothesis that it has the given property. The <code class="docutils literal notranslate"><span class="pre">with</span></code> clause allows us to specify the names we want Lean to use. <code class="docutils literal notranslate"><span class="pre">rcases</span> <span class="pre">ubf</span> <span class="pre">with</span> <span class="pre">⟨a,</span> <span class="pre">ubfa⟩</span></code> adds a new variable <code class="docutils literal notranslate"><span class="pre">a</span></code> for an upper bound to the context, together with the hypothesis <code class="docutils literal notranslate"><span class="pre">ubfa</span></code> that it has the given property. The goal is left unchanged; what <em>has</em> changed is that we can now use the new object and the new hypothesis to prove the goal. This is a common pattern in mathematics: This is a common method of reasoning in mathematics: we unpack objects whose existence is asserted or implied by some hypothesis, and then use it to establish the existence of something else.</p> <p>Try using this pattern to establish the following. <p>Try using this method to establish the following. You might find it useful to turn some of the examples from the last section into named theorems, as we did with <code class="docutils literal notranslate"><span class="pre">fn_ub_add</span></code>,
-
@@ -595,24 +597,11 @@ into the proofs.</p><span class="gr">sorry</span> </pre></div> </div> <p id="index-9">The task of unpacking information in a hypothesis is so important that Lean and mathlib provide a number of ways to do it. A cousin of the <code class="docutils literal notranslate"><span class="pre">cases'</span></code> tactic, <code class="docutils literal notranslate"><span class="pre">rcases</span></code>, is more flexible in that it allows us to unpack nested data. (The “r” stands for “recursive.”) In the <code class="docutils literal notranslate"><span class="pre">with</span></code> clause for unpacking an existential quantifier, we name the object and the hypothesis by presenting them as a pattern <code class="docutils literal notranslate"><span class="pre">⟨a,</span> <span class="pre">h⟩</span></code> that <code class="docutils literal notranslate"><span class="pre">rcases</span></code> then tries to match. <p id="index-9">The “r” in <code class="docutils literal notranslate"><span class="pre">rcases</span></code> stands for “recursive,” because it allows us to use arbitrarily complex patterns to unpack nested data. The <code class="docutils literal notranslate"><span class="pre">rintro</span></code> tactic is a combination of <code class="docutils literal notranslate"><span class="pre">intro</span></code> and <code class="docutils literal notranslate"><span class="pre">rcases</span></code>. These examples illustrate their use:</p> <div class="highlight-lean notranslate"><div class="highlight"><pre><span></span><span class="kd">example</span> <span class="o">(</span><span class="n">ubf</span> <span class="o">:</span> <span class="n">FnHasUb</span> <span class="n">f</span><span class="o">)</span> <span class="o">(</span><span class="n">ubg</span> <span class="o">:</span> <span class="n">FnHasUb</span> <span class="n">g</span><span class="o">)</span> <span class="o">:</span> <span class="n">FnHasUb</span> <span class="k">fun</span> <span class="n">x</span> <span class="bp">↦</span> <span class="n">f</span> <span class="n">x</span> <span class="bp">+</span> <span class="n">g</span> <span class="n">x</span> <span class="o">:=</span> <span class="kd">by</span> <span class="n">rcases</span> <span class="n">ubf</span> <span class="k">with</span> <span class="o">⟨</span><span class="n">a</span><span class="o">,</span> <span class="n">ubfa</span><span class="o">⟩</span> <span class="n">rcases</span> <span class="n">ubg</span> <span class="k">with</span> <span class="o">⟨</span><span class="n">b</span><span class="o">,</span> <span class="n">ubgb</span><span class="o">⟩</span> <span class="n">exact</span> <span class="o">⟨</span><span class="n">a</span> <span class="bp">+</span> <span class="n">b</span><span class="o">,</span> <span class="n">fnUb_add</span> <span class="n">ubfa</span> <span class="n">ubgb</span><span class="o">⟩</span> <span class="kd">example</span> <span class="o">:</span> <span class="n">FnHasUb</span> <span class="n">f</span> <span class="bp">→</span> <span class="n">FnHasUb</span> <span class="n">g</span> <span class="bp">→</span> <span class="n">FnHasUb</span> <span class="k">fun</span> <span class="n">x</span> <span class="bp">↦</span> <span class="n">f</span> <span class="n">x</span> <span class="bp">+</span> <span class="n">g</span> <span class="n">x</span> <span class="o">:=</span> <span class="kd">by</span> is a combination of <code class="docutils literal notranslate"><span class="pre">intro</span></code> and <code class="docutils literal notranslate"><span class="pre">rcases</span></code>:</p> <div class="highlight-lean notranslate"><div class="highlight"><pre><span></span><span class="kd">example</span> <span class="o">:</span> <span class="n">FnHasUb</span> <span class="n">f</span> <span class="bp">→</span> <span class="n">FnHasUb</span> <span class="n">g</span> <span class="bp">→</span> <span class="n">FnHasUb</span> <span class="k">fun</span> <span class="n">x</span> <span class="bp">↦</span> <span class="n">f</span> <span class="n">x</span> <span class="bp">+</span> <span class="n">g</span> <span class="n">x</span> <span class="o">:=</span> <span class="kd">by</span> <span class="n">rintro</span> <span class="o">⟨</span><span class="n">a</span><span class="o">,</span> <span class="n">ubfa</span><span class="o">⟩</span> <span class="o">⟨</span><span class="n">b</span><span class="o">,</span> <span class="n">ubgb</span><span class="o">⟩</span> <span class="n">exact</span> <span class="o">⟨</span><span class="n">a</span> <span class="bp">+</span> <span class="n">b</span><span class="o">,</span> <span class="n">fnUb_add</span> <span class="n">ubfa</span> <span class="n">ubgb</span><span class="o">⟩</span> </pre></div>
-
@@ -623,14 +612,62 @@ in expressions and proof terms:</p><span class="k">fun</span> <span class="o">⟨</span><span class="n">a</span><span class="o">,</span> <span class="n">ubfa</span><span class="o">⟩</span> <span class="o">⟨</span><span class="n">b</span><span class="o">,</span> <span class="n">ubgb</span><span class="o">⟩</span> <span class="bp">↦</span> <span class="o">⟨</span><span class="n">a</span> <span class="bp">+</span> <span class="n">b</span><span class="o">,</span> <span class="n">fnUb_add</span> <span class="n">ubfa</span> <span class="n">ubgb</span><span class="o">⟩</span> </pre></div> </div> <p>These are power-user moves, and there is no harm in favoring the use of <code class="docutils literal notranslate"><span class="pre">cases'</span></code> until you are more comfortable with the existential quantifier. But we will come to learn that all of these tools, including <code class="docutils literal notranslate"><span class="pre">cases'</span></code>, <code class="docutils literal notranslate"><span class="pre">use</span></code>, and the anonymous constructors, are like Swiss army knives when it comes to theorem proving. They can be used for a wide range of purposes, not just for unpacking exists statements.</p> <p>The task of unpacking information in a hypothesis is so important that Lean and mathlib provide a number of ways to do it. For example, the <code class="docutils literal notranslate"><span class="pre">obtain</span></code> tactic provides suggestive syntax:</p> <div class="highlight-lean notranslate"><div class="highlight"><pre><span></span><span class="kd">example</span> <span class="o">(</span><span class="n">ubf</span> <span class="o">:</span> <span class="n">FnHasUb</span> <span class="n">f</span><span class="o">)</span> <span class="o">(</span><span class="n">ubg</span> <span class="o">:</span> <span class="n">FnHasUb</span> <span class="n">g</span><span class="o">)</span> <span class="o">:</span> <span class="n">FnHasUb</span> <span class="k">fun</span> <span class="n">x</span> <span class="bp">↦</span> <span class="n">f</span> <span class="n">x</span> <span class="bp">+</span> <span class="n">g</span> <span class="n">x</span> <span class="o">:=</span> <span class="kd">by</span> <span class="n">obtain</span> <span class="o">⟨</span><span class="n">a</span><span class="o">,</span> <span class="n">ubfa</span><span class="o">⟩</span> <span class="o">:=</span> <span class="n">ubf</span> <span class="n">obtain</span> <span class="o">⟨</span><span class="n">b</span><span class="o">,</span> <span class="n">ubgb</span><span class="o">⟩</span> <span class="o">:=</span> <span class="n">ubg</span> <span class="n">exact</span> <span class="o">⟨</span><span class="n">a</span> <span class="bp">+</span> <span class="n">b</span><span class="o">,</span> <span class="n">fnUb_add</span> <span class="n">ubfa</span> <span class="n">ubgb</span><span class="o">⟩</span> </pre></div> </div> <p>Think of the first <code class="docutils literal notranslate"><span class="pre">obtain</span></code> instruction as matching the “contents” of <code class="docutils literal notranslate"><span class="pre">ubf</span></code> with the given pattern and assigning the components to the named variables. <code class="docutils literal notranslate"><span class="pre">rcases</span></code> and <code class="docutils literal notranslate"><span class="pre">obtain</span></code> are said to <code class="docutils literal notranslate"><span class="pre">destruct</span></code> their arguments, though there is a small difference in that <code class="docutils literal notranslate"><span class="pre">rcases</span></code> clears <code class="docutils literal notranslate"><span class="pre">ubf</span></code> from the context when it is done, whereas it is still present after <code class="docutils literal notranslate"><span class="pre">obtain</span></code>.</p> <p>Lean also supports syntax that is similar to that used in other functional programming languages:</p> <div class="highlight-lean notranslate"><div class="highlight"><pre><span></span><span class="kd">example</span> <span class="o">(</span><span class="n">ubf</span> <span class="o">:</span> <span class="n">FnHasUb</span> <span class="n">f</span><span class="o">)</span> <span class="o">(</span><span class="n">ubg</span> <span class="o">:</span> <span class="n">FnHasUb</span> <span class="n">g</span><span class="o">)</span> <span class="o">:</span> <span class="n">FnHasUb</span> <span class="k">fun</span> <span class="n">x</span> <span class="bp">↦</span> <span class="n">f</span> <span class="n">x</span> <span class="bp">+</span> <span class="n">g</span> <span class="n">x</span> <span class="o">:=</span> <span class="kd">by</span> <span class="n">cases</span> <span class="n">ubf</span> <span class="n">case</span> <span class="n">intro</span> <span class="n">a</span> <span class="n">ubfa</span> <span class="bp">=></span> <span class="n">cases</span> <span class="n">ubg</span> <span class="n">case</span> <span class="n">intro</span> <span class="n">b</span> <span class="n">ubgb</span> <span class="bp">=></span> <span class="n">exact</span> <span class="o">⟨</span><span class="n">a</span> <span class="bp">+</span> <span class="n">b</span><span class="o">,</span> <span class="n">fnUb_add</span> <span class="n">ubfa</span> <span class="n">ubgb</span><span class="o">⟩</span> <span class="kd">example</span> <span class="o">(</span><span class="n">ubf</span> <span class="o">:</span> <span class="n">FnHasUb</span> <span class="n">f</span><span class="o">)</span> <span class="o">(</span><span class="n">ubg</span> <span class="o">:</span> <span class="n">FnHasUb</span> <span class="n">g</span><span class="o">)</span> <span class="o">:</span> <span class="n">FnHasUb</span> <span class="k">fun</span> <span class="n">x</span> <span class="bp">↦</span> <span class="n">f</span> <span class="n">x</span> <span class="bp">+</span> <span class="n">g</span> <span class="n">x</span> <span class="o">:=</span> <span class="kd">by</span> <span class="n">cases</span> <span class="n">ubf</span> <span class="n">next</span> <span class="n">a</span> <span class="n">ubfa</span> <span class="bp">=></span> <span class="n">cases</span> <span class="n">ubg</span> <span class="n">next</span> <span class="n">b</span> <span class="n">ubgb</span> <span class="bp">=></span> <span class="n">exact</span> <span class="o">⟨</span><span class="n">a</span> <span class="bp">+</span> <span class="n">b</span><span class="o">,</span> <span class="n">fnUb_add</span> <span class="n">ubfa</span> <span class="n">ubgb</span><span class="o">⟩</span> <span class="kd">example</span> <span class="o">(</span><span class="n">ubf</span> <span class="o">:</span> <span class="n">FnHasUb</span> <span class="n">f</span><span class="o">)</span> <span class="o">(</span><span class="n">ubg</span> <span class="o">:</span> <span class="n">FnHasUb</span> <span class="n">g</span><span class="o">)</span> <span class="o">:</span> <span class="n">FnHasUb</span> <span class="k">fun</span> <span class="n">x</span> <span class="bp">↦</span> <span class="n">f</span> <span class="n">x</span> <span class="bp">+</span> <span class="n">g</span> <span class="n">x</span> <span class="o">:=</span> <span class="kd">by</span> <span class="k">match</span> <span class="n">ubf</span><span class="o">,</span> <span class="n">ubg</span> <span class="k">with</span> <span class="bp">|</span> <span class="o">⟨</span><span class="n">a</span><span class="o">,</span> <span class="n">ubfa</span><span class="o">⟩,</span> <span class="o">⟨</span><span class="n">b</span><span class="o">,</span> <span class="n">ubgb</span><span class="o">⟩</span> <span class="bp">=></span> <span class="n">exact</span> <span class="o">⟨</span><span class="n">a</span> <span class="bp">+</span> <span class="n">b</span><span class="o">,</span> <span class="n">fnUb_add</span> <span class="n">ubfa</span> <span class="n">ubgb</span><span class="o">⟩</span> <span class="kd">example</span> <span class="o">(</span><span class="n">ubf</span> <span class="o">:</span> <span class="n">FnHasUb</span> <span class="n">f</span><span class="o">)</span> <span class="o">(</span><span class="n">ubg</span> <span class="o">:</span> <span class="n">FnHasUb</span> <span class="n">g</span><span class="o">)</span> <span class="o">:</span> <span class="n">FnHasUb</span> <span class="k">fun</span> <span class="n">x</span> <span class="bp">↦</span> <span class="n">f</span> <span class="n">x</span> <span class="bp">+</span> <span class="n">g</span> <span class="n">x</span> <span class="o">:=</span> <span class="k">match</span> <span class="n">ubf</span><span class="o">,</span> <span class="n">ubg</span> <span class="k">with</span> <span class="bp">|</span> <span class="o">⟨</span><span class="n">a</span><span class="o">,</span> <span class="n">ubfa</span><span class="o">⟩,</span> <span class="o">⟨</span><span class="n">b</span><span class="o">,</span> <span class="n">ubgb</span><span class="o">⟩</span> <span class="bp">=></span> <span class="o">⟨</span><span class="n">a</span> <span class="bp">+</span> <span class="n">b</span><span class="o">,</span> <span class="n">fnUb_add</span> <span class="n">ubfa</span> <span class="n">ubgb</span><span class="o">⟩</span> </pre></div> </div> <p>In the first example, if you put your cursor after <code class="docutils literal notranslate"><span class="pre">cases</span> <span class="pre">ubf</span></code>, you will see that the tactic produces a single goal, which Lean has tagged <code class="docutils literal notranslate"><span class="pre">intro</span></code>. (The particular name chosen comes from the internal name for the axiomatic primitive that bulids a proof of an existential statement.) The <code class="docutils literal notranslate"><span class="pre">case</span></code> tactic then names the components. The second example is similar, except using <code class="docutils literal notranslate"><span class="pre">next</span></code> instead of <code class="docutils literal notranslate"><span class="pre">case</span></code> means that you can avoid mentioning <code class="docutils literal notranslate"><span class="pre">intro</span></code>. The word <code class="docutils literal notranslate"><span class="pre">match</span></code> in the last two examples highlights that what we are doing here is what computer scientists call “pattern matching.” Notice that the third proof begins by <code class="docutils literal notranslate"><span class="pre">by</span></code>, after which the tactic version of <code class="docutils literal notranslate"><span class="pre">match</span></code> expects a tactic proof on the right side of the arrow. The last example is a proof term: there are no tactics in sight.</p> <p>For the rest of this book, we will stick to <code class="docutils literal notranslate"><span class="pre">rcases</span></code>, <code class="docutils literal notranslate"><span class="pre">rintros</span></code>, and <code class="docutils literal notranslate"><span class="pre">obtain</span></code>, as the preferred ways of using an existential quantifier. But it can’t hurt to see the alternative syntax, especially if there is a chance you will find yourself in the company of computer scientists.</p> <p>To illustrate one way that <code class="docutils literal notranslate"><span class="pre">rcases</span></code> can be used, we prove an old mathematical chestnut: if two integers <code class="docutils literal notranslate"><span class="pre">x</span></code> and <code class="docutils literal notranslate"><span class="pre">y</span></code> can each be written as
-
@@ -697,8 +734,8 @@ you can find existential quantifiers hidden all overif you know how to spot them. For example, divisibility is implicitly an “exists” statement.</p> <div class="highlight-lean notranslate"><div class="highlight"><pre><span></span><span class="kd">example</span> <span class="o">(</span><span class="n">divab</span> <span class="o">:</span> <span class="n">a</span> <span class="bp">∣</span> <span class="n">b</span><span class="o">)</span> <span class="o">(</span><span class="n">divbc</span> <span class="o">:</span> <span class="n">b</span> <span class="bp">∣</span> <span class="n">c</span><span class="o">)</span> <span class="o">:</span> <span class="n">a</span> <span class="bp">∣</span> <span class="n">c</span> <span class="o">:=</span> <span class="kd">by</span> <span class="n">cases'</span> <span class="n">divab</span> <span class="k">with</span> <span class="n">d</span> <span class="n">beq</span> <span class="n">cases'</span> <span class="n">divbc</span> <span class="k">with</span> <span class="n">e</span> <span class="n">ceq</span> <span class="n">rcases</span> <span class="n">divab</span> <span class="k">with</span> <span class="o">⟨</span><span class="n">d</span><span class="o">,</span> <span class="n">beq</span><span class="o">⟩</span> <span class="n">rcases</span> <span class="n">divbc</span> <span class="k">with</span> <span class="o">⟨</span><span class="n">e</span><span class="o">,</span> <span class="n">ceq</span><span class="o">⟩</span> <span class="n">rw</span> <span class="o">[</span><span class="n">ceq</span><span class="o">,</span> <span class="n">beq</span><span class="o">]</span> <span class="n">use</span> <span class="n">d</span> <span class="bp">*</span> <span class="n">e</span><span class="bp">;</span> <span class="n">ring</span> </pre></div>
-
@@ -741,10 +778,10 @@ It can be used in conjunction with the <code class="docutils literal notranslate</div> <p>The next example uses a surjectivity hypothesis by applying it to a suitable value. Note that you can use <code class="docutils literal notranslate"><span class="pre">cases'</span></code> with any expression, Note that you can use <code class="docutils literal notranslate"><span class="pre">rcases</span></code> with any expression, not just a hypothesis.</p> <div class="highlight-lean notranslate"><div class="highlight"><pre><span></span><span class="kd">example</span> <span class="o">{</span><span class="n">f</span> <span class="o">:</span> <span class="n">ℝ</span> <span class="bp">→</span> <span class="n">ℝ</span><span class="o">}</span> <span class="o">(</span><span class="n">h</span> <span class="o">:</span> <span class="n">Surjective</span> <span class="n">f</span><span class="o">)</span> <span class="o">:</span> <span class="bp">∃</span> <span class="n">x</span><span class="o">,</span> <span class="n">f</span> <span class="n">x</span> <span class="bp">^</span> <span class="mi">2</span> <span class="bp">=</span> <span class="mi">4</span> <span class="o">:=</span> <span class="kd">by</span> <span class="n">cases'</span> <span class="n">h</span> <span class="mi">2</span> <span class="k">with</span> <span class="n">x</span> <span class="n">hx</span> <span class="n">rcases</span> <span class="n">h</span> <span class="mi">2</span> <span class="k">with</span> <span class="o">⟨</span><span class="n">x</span><span class="o">,</span> <span class="n">hx</span><span class="o">⟩</span> <span class="n">use</span> <span class="n">x</span> <span class="n">rw</span> <span class="o">[</span><span class="n">hx</span><span class="o">]</span> <span class="n">norm_num</span>
-
@@ -806,8 +843,8 @@ predicate <code class="docutils literal notranslate"><span class="pre">FnHasUb</which says that a function has an upper bound.</p> <div class="highlight-lean notranslate"><div class="highlight"><pre><span></span><span class="kd">example</span> <span class="o">(</span><span class="n">h</span> <span class="o">:</span> <span class="bp">∀</span> <span class="n">a</span><span class="o">,</span> <span class="bp">∃</span> <span class="n">x</span><span class="o">,</span> <span class="n">f</span> <span class="n">x</span> <span class="bp">></span> <span class="n">a</span><span class="o">)</span> <span class="o">:</span> <span class="bp">¬</span><span class="n">FnHasUb</span> <span class="n">f</span> <span class="o">:=</span> <span class="kd">by</span> <span class="n">intro</span> <span class="n">fnub</span> <span class="n">cases'</span> <span class="n">fnub</span> <span class="k">with</span> <span class="n">a</span> <span class="n">fnuba</span> <span class="n">cases'</span> <span class="n">h</span> <span class="n">a</span> <span class="k">with</span> <span class="n">x</span> <span class="n">hx</span> <span class="n">rcases</span> <span class="n">fnub</span> <span class="k">with</span> <span class="o">⟨</span><span class="n">a</span><span class="o">,</span> <span class="n">fnuba</span><span class="o">⟩</span> <span class="n">rcases</span> <span class="n">h</span> <span class="n">a</span> <span class="k">with</span> <span class="o">⟨</span><span class="n">x</span><span class="o">,</span> <span class="n">hx</span><span class="o">⟩</span> <span class="k">have</span> <span class="o">:</span> <span class="n">f</span> <span class="n">x</span> <span class="bp">≤</span> <span class="n">a</span> <span class="o">:=</span> <span class="n">fnuba</span> <span class="n">x</span> <span class="n">linarith</span> </pre></div>
-
@@ -947,18 +984,18 @@ The command <code class="docutils literal notranslate"><span class="pre">push_ne<span class="n">exact</span> <span class="n">h</span> <span class="kd">example</span> <span class="o">(</span><span class="n">h</span> <span class="o">:</span> <span class="bp">¬</span><span class="n">FnHasUb</span> <span class="n">f</span><span class="o">)</span> <span class="o">:</span> <span class="bp">∀</span> <span class="n">a</span><span class="o">,</span> <span class="bp">∃</span> <span class="n">x</span><span class="o">,</span> <span class="n">f</span> <span class="n">x</span> <span class="bp">></span> <span class="n">a</span> <span class="o">:=</span> <span class="kd">by</span> <span class="n">simp</span> <span class="n">only</span> <span class="o">[</span><span class="n">FnHasUb</span><span class="o">,</span> <span class="n">FnUb</span><span class="o">]</span> <span class="n">at</span> <span class="n">h</span> <span class="n">dsimp</span> <span class="n">only</span> <span class="o">[</span><span class="n">FnHasUb</span><span class="o">,</span> <span class="n">FnUb</span><span class="o">]</span> <span class="n">at</span> <span class="n">h</span> <span class="n">push_neg</span> <span class="n">at</span> <span class="n">h</span> <span class="n">exact</span> <span class="n">h</span> </pre></div> </div> <p>In the second example, we use Lean’s simplifier to <p>In the second example, we use dsimp to expand the definitions of <code class="docutils literal notranslate"><span class="pre">FnHasUb</span></code> and <code class="docutils literal notranslate"><span class="pre">FnUb</span></code>. (We need to use <code class="docutils literal notranslate"><span class="pre">simp</span></code> rather than <code class="docutils literal notranslate"><span class="pre">rw</span></code> (We need to use <code class="docutils literal notranslate"><span class="pre">dsimp</span></code> rather than <code class="docutils literal notranslate"><span class="pre">rw</span></code> to expand <code class="docutils literal notranslate"><span class="pre">FnUb</span></code>, because it appears in the scope of a quantifier.) You can verify that in the examples above with <code class="docutils literal notranslate"><span class="pre">¬</span> <span class="pre">∃</span> <span class="pre">x,</span> <span class="pre">P</span> <span class="pre">x</span></code> and <code class="docutils literal notranslate"><span class="pre">¬</span> <span class="pre">∀</span> <span class="pre">x,</span> <span class="pre">P</span> <span class="pre">x</span></code>, with <code class="docutils literal notranslate"><span class="pre">¬∃</span> <span class="pre">x,</span> <span class="pre">P</span> <span class="pre">x</span></code> and <code class="docutils literal notranslate"><span class="pre">¬∀</span> <span class="pre">x,</span> <span class="pre">P</span> <span class="pre">x</span></code>, the <code class="docutils literal notranslate"><span class="pre">push_neg</span></code> tactic does the expected thing. Without even knowing how to use the conjunction symbol,
-
@@ -969,11 +1006,11 @@ to prove the following:</p></pre></div> </div> <p id="index-16">Mathlib also has a tactic, <code class="docutils literal notranslate"><span class="pre">contrapose</span></code>, which transforms a goal <code class="docutils literal notranslate"><span class="pre">A</span> <span class="pre">→</span> <span class="pre">B</span></code> to <code class="docutils literal notranslate"><span class="pre">¬</span> <span class="pre">B</span> <span class="pre">→</span> <span class="pre">¬</span> <span class="pre">A</span></code>. which transforms a goal <code class="docutils literal notranslate"><span class="pre">A</span> <span class="pre">→</span> <span class="pre">B</span></code> to <code class="docutils literal notranslate"><span class="pre">¬B</span> <span class="pre">→</span> <span class="pre">¬A</span></code>. Similarly, given a goal of proving <code class="docutils literal notranslate"><span class="pre">B</span></code> from hypothesis <code class="docutils literal notranslate"><span class="pre">h</span> <span class="pre">:</span> <span class="pre">A</span></code>, <code class="docutils literal notranslate"><span class="pre">contrapose</span> <span class="pre">h</span></code> leaves you with a goal of proving <code class="docutils literal notranslate"><span class="pre">¬</span> <span class="pre">A</span></code> from hypothesis <code class="docutils literal notranslate"><span class="pre">¬</span> <span class="pre">B</span></code>. <code class="docutils literal notranslate"><span class="pre">¬A</span></code> from hypothesis <code class="docutils literal notranslate"><span class="pre">¬B</span></code>. Using <code class="docutils literal notranslate"><span class="pre">contrapose!</span></code> instead of <code class="docutils literal notranslate"><span class="pre">contrapose</span></code> applies <code class="docutils literal notranslate"><span class="pre">push_neg</span></code> to the goal and the relevant hypothesis as well.</p>
-
@@ -1064,12 +1101,12 @@ which drops into tactic mode at the keyword <code class="docutils literal notran</div> <p><em>Using</em> a conjunction instead of proving one involves unpacking the proofs of the two parts. You can use the <code class="docutils literal notranslate"><span class="pre">cases</span></code> tactic for that, as well as <code class="docutils literal notranslate"><span class="pre">rcases</span></code>, <code class="docutils literal notranslate"><span class="pre">rintro</span></code>, or a pattern-matching <code class="docutils literal notranslate"><span class="pre">fun</span></code>, You can use the <code class="docutils literal notranslate"><span class="pre">rcases</span></code> tactic for that, as well as <code class="docutils literal notranslate"><span class="pre">rintro</span></code> or a pattern-matching <code class="docutils literal notranslate"><span class="pre">fun</span></code>, all in a manner similar to the way they are used with the existential quantifier.</p> <div class="highlight-lean notranslate"><div class="highlight"><pre><span></span><span class="kd">example</span> <span class="o">{</span><span class="n">x</span> <span class="n">y</span> <span class="o">:</span> <span class="n">ℝ</span><span class="o">}</span> <span class="o">(</span><span class="n">h</span> <span class="o">:</span> <span class="n">x</span> <span class="bp">≤</span> <span class="n">y</span> <span class="bp">∧</span> <span class="n">x</span> <span class="bp">≠</span> <span class="n">y</span><span class="o">)</span> <span class="o">:</span> <span class="bp">¬</span><span class="n">y</span> <span class="bp">≤</span> <span class="n">x</span> <span class="o">:=</span> <span class="kd">by</span> <span class="n">cases'</span> <span class="n">h</span> <span class="k">with</span> <span class="n">h₀</span> <span class="n">h₁</span> <span class="n">rcases</span> <span class="n">h</span> <span class="k">with</span> <span class="o">⟨</span><span class="n">h₀</span><span class="o">,</span> <span class="n">h₁</span><span class="o">⟩</span> <span class="n">contrapose</span><span class="bp">!</span> <span class="n">h₁</span> <span class="n">exact</span> <span class="n">le_antisymm</span> <span class="n">h₀</span> <span class="n">h₁</span>
-
@@ -1081,6 +1118,36 @@ the existential quantifier.</p><span class="k">fun</span> <span class="o">⟨</span><span class="n">h₀</span><span class="o">,</span> <span class="n">h₁</span><span class="o">⟩</span> <span class="n">h'</span> <span class="bp">↦</span> <span class="n">h₁</span> <span class="o">(</span><span class="n">le_antisymm</span> <span class="n">h₀</span> <span class="n">h'</span><span class="o">)</span> </pre></div> </div> <p>In analogy to the <code class="docutils literal notranslate"><span class="pre">obtain</span></code> tactic, which we used with the existential quantifier, there is also a pattern-matching <code class="docutils literal notranslate"><span class="pre">have</span></code>:</p> <div class="highlight-lean notranslate"><div class="highlight"><pre><span></span><span class="kd">example</span> <span class="o">{</span><span class="n">x</span> <span class="n">y</span> <span class="o">:</span> <span class="n">ℝ</span><span class="o">}</span> <span class="o">(</span><span class="n">h</span> <span class="o">:</span> <span class="n">x</span> <span class="bp">≤</span> <span class="n">y</span> <span class="bp">∧</span> <span class="n">x</span> <span class="bp">≠</span> <span class="n">y</span><span class="o">)</span> <span class="o">:</span> <span class="bp">¬</span><span class="n">y</span> <span class="bp">≤</span> <span class="n">x</span> <span class="o">:=</span> <span class="kd">by</span> <span class="k">have</span> <span class="o">⟨</span><span class="n">h₀</span><span class="o">,</span> <span class="n">h₁</span><span class="o">⟩</span> <span class="o">:=</span> <span class="n">h</span> <span class="n">contrapose</span><span class="bp">!</span> <span class="n">h₁</span> <span class="n">exact</span> <span class="n">le_antisymm</span> <span class="n">h₀</span> <span class="n">h₁</span> </pre></div> </div> <p>In contrast to <code class="docutils literal notranslate"><span class="pre">rcases</span></code>, here the <code class="docutils literal notranslate"><span class="pre">have</span></code> tactic leaves <code class="docutils literal notranslate"><span class="pre">h</span></code> in the context. And even though we won’t use them, once again we have the computer scientists’ pattern-matching syntax:</p> <div class="highlight-lean notranslate"><div class="highlight"><pre><span></span><span class="kd">example</span> <span class="o">{</span><span class="n">x</span> <span class="n">y</span> <span class="o">:</span> <span class="n">ℝ</span><span class="o">}</span> <span class="o">(</span><span class="n">h</span> <span class="o">:</span> <span class="n">x</span> <span class="bp">≤</span> <span class="n">y</span> <span class="bp">∧</span> <span class="n">x</span> <span class="bp">≠</span> <span class="n">y</span><span class="o">)</span> <span class="o">:</span> <span class="bp">¬</span><span class="n">y</span> <span class="bp">≤</span> <span class="n">x</span> <span class="o">:=</span> <span class="kd">by</span> <span class="n">cases</span> <span class="n">h</span> <span class="n">case</span> <span class="n">intro</span> <span class="n">h₀</span> <span class="n">h₁</span> <span class="bp">=></span> <span class="n">contrapose</span><span class="bp">!</span> <span class="n">h₁</span> <span class="n">exact</span> <span class="n">le_antisymm</span> <span class="n">h₀</span> <span class="n">h₁</span> <span class="kd">example</span> <span class="o">{</span><span class="n">x</span> <span class="n">y</span> <span class="o">:</span> <span class="n">ℝ</span><span class="o">}</span> <span class="o">(</span><span class="n">h</span> <span class="o">:</span> <span class="n">x</span> <span class="bp">≤</span> <span class="n">y</span> <span class="bp">∧</span> <span class="n">x</span> <span class="bp">≠</span> <span class="n">y</span><span class="o">)</span> <span class="o">:</span> <span class="bp">¬</span><span class="n">y</span> <span class="bp">≤</span> <span class="n">x</span> <span class="o">:=</span> <span class="kd">by</span> <span class="n">cases</span> <span class="n">h</span> <span class="n">next</span> <span class="n">h₀</span> <span class="n">h₁</span> <span class="bp">=></span> <span class="n">contrapose</span><span class="bp">!</span> <span class="n">h₁</span> <span class="n">exact</span> <span class="n">le_antisymm</span> <span class="n">h₀</span> <span class="n">h₁</span> <span class="kd">example</span> <span class="o">{</span><span class="n">x</span> <span class="n">y</span> <span class="o">:</span> <span class="n">ℝ</span><span class="o">}</span> <span class="o">(</span><span class="n">h</span> <span class="o">:</span> <span class="n">x</span> <span class="bp">≤</span> <span class="n">y</span> <span class="bp">∧</span> <span class="n">x</span> <span class="bp">≠</span> <span class="n">y</span><span class="o">)</span> <span class="o">:</span> <span class="bp">¬</span><span class="n">y</span> <span class="bp">≤</span> <span class="n">x</span> <span class="o">:=</span> <span class="kd">by</span> <span class="k">match</span> <span class="n">h</span> <span class="k">with</span> <span class="bp">|</span> <span class="o">⟨</span><span class="n">h₀</span><span class="o">,</span> <span class="n">h₁</span><span class="o">⟩</span> <span class="bp">=></span> <span class="n">contrapose</span><span class="bp">!</span> <span class="n">h₁</span> <span class="n">exact</span> <span class="n">le_antisymm</span> <span class="n">h₀</span> <span class="n">h₁</span> </pre></div> </div> <p>In contrast to using an existential quantifier, you can also extract proofs of the two components of a hypothesis <code class="docutils literal notranslate"><span class="pre">h</span> <span class="pre">:</span> <span class="pre">A</span> <span class="pre">∧</span> <span class="pre">B</span></code>
-
@@ -1294,38 +1361,86 @@ Here, <code class="docutils literal notranslate"><span class="pre">inl</span></cor the other. In practice, which case holds usually depends a case distinction that is implicit or explicit in the assumptions and the data. The <code class="docutils literal notranslate"><span class="pre">cases</span></code> tactic allows us to make use of a hypothesis The <code class="docutils literal notranslate"><span class="pre">rcases</span></code> tactic allows us to make use of a hypothesis of the form <code class="docutils literal notranslate"><span class="pre">A</span> <span class="pre">∨</span> <span class="pre">B</span></code>. In contrast to the use of <code class="docutils literal notranslate"><span class="pre">cases</span></code> with conjunction or an In contrast to the use of <code class="docutils literal notranslate"><span class="pre">rcases</span></code> with conjunction or an existential quantifier, here the <code class="docutils literal notranslate"><span class="pre">cases</span></code> tactic produces <em>two</em> goals. here the <code class="docutils literal notranslate"><span class="pre">rcases</span></code> tactic produces <em>two</em> goals. Both have the same conclusion, but in the first case, <code class="docutils literal notranslate"><span class="pre">A</span></code> is assumed to be true, and in the second case, <code class="docutils literal notranslate"><span class="pre">B</span></code> is assumed to be true. In other words, as the name suggests, the <code class="docutils literal notranslate"><span class="pre">cases</span></code> tactic carries out a proof by cases. the <code class="docutils literal notranslate"><span class="pre">rcases</span></code> tactic carries out a proof by cases. As usual, we can tell Lean what names to use for the hypotheses. In the next example, we tell Lean to use the name <code class="docutils literal notranslate"><span class="pre">h</span></code> on each branch.</p> <div class="highlight-lean notranslate"><div class="highlight"><pre><span></span><span class="kd">example</span> <span class="o">:</span> <span class="n">x</span> <span class="bp"><</span> <span class="bp">|</span><span class="n">y</span><span class="bp">|</span> <span class="bp">→</span> <span class="n">x</span> <span class="bp"><</span> <span class="n">y</span> <span class="bp">∨</span> <span class="n">x</span> <span class="bp"><</span> <span class="bp">-</span><span class="n">y</span> <span class="o">:=</span> <span class="kd">by</span> <span class="n">cases'</span> <span class="n">le_or_gt</span> <span class="mi">0</span> <span class="n">y</span> <span class="k">with</span> <span class="n">h</span> <span class="n">h</span> <span class="n">rcases</span> <span class="n">le_or_gt</span> <span class="mi">0</span> <span class="n">y</span> <span class="k">with</span> <span class="n">h</span> <span class="bp">|</span> <span class="n">h</span> <span class="bp">·</span> <span class="n">rw</span> <span class="o">[</span><span class="n">abs_of_nonneg</span> <span class="n">h</span><span class="o">]</span> <span class="n">intro</span> <span class="n">h</span> <span class="n">left</span> <span class="n">exact</span> <span class="n">h</span> <span class="n">rw</span> <span class="o">[</span><span class="n">abs_of_neg</span> <span class="n">h</span><span class="o">]</span> <span class="n">intro</span> <span class="n">h</span><span class="bp">;</span> <span class="n">right</span><span class="bp">;</span> <span class="n">exact</span> <span class="n">h</span> </pre></div> </div> <span class="n">intro</span> <span class="n">h</span><span class="bp">;</span> <span class="n">left</span><span class="bp">;</span> <span class="n">exact</span> <span class="n">h</span> <span class="bp">.</span> <span class="n">rw</span> <span class="o">[</span><span class="n">abs_of_neg</span> <span class="n">h</span><span class="o">]</span> <span class="n">intro</span> <span class="n">h</span><span class="bp">;</span> <span class="n">right</span><span class="bp">;</span> <span class="n">exact</span> <span class="n">h</span> </pre></div> </div> <p>Notice that the pattern changes from <code class="docutils literal notranslate"><span class="pre">⟨h₀,</span> <span class="pre">h₁⟩</span></code> in the case of a conjunction to <code class="docutils literal notranslate"><span class="pre">h₀</span> <span class="pre">|</span> <span class="pre">h₁</span></code> in the case of a disjunction. Think of the first pattern as matching against data the contains <em>both</em> an <code class="docutils literal notranslate"><span class="pre">h₀</span></code> and a <code class="docutils literal notranslate"><span class="pre">h₁</span></code>, whereas second pattern, with the bar, matches against data that contains <em>either</em> an <code class="docutils literal notranslate"><span class="pre">h₀</span></code> or <code class="docutils literal notranslate"><span class="pre">h₁</span></code>. In this case, because the two goals are separate, we have chosen to use the same name, <code class="docutils literal notranslate"><span class="pre">h</span></code>, in each case.</p> <p>The absolute value function is defined in such a way that we can immediately prove that <code class="docutils literal notranslate"><span class="pre">x</span> <span class="pre">≥</span> <span class="pre">0</span></code> implies <code class="docutils literal notranslate"><span class="pre">|x|</span> <span class="pre">=</span> <span class="pre">x</span></code> (this is the theorem <code class="docutils literal notranslate"><span class="pre">abs_of_nonneg</span></code>) and <code class="docutils literal notranslate"><span class="pre">x</span> <span class="pre"><</span> <span class="pre">0</span></code> implies <code class="docutils literal notranslate"><span class="pre">|x|</span> <span class="pre">=</span> <span class="pre">-x</span></code> (this is <code class="docutils literal notranslate"><span class="pre">abs_of_neg</span></code>). The expression <code class="docutils literal notranslate"><span class="pre">le_or_gt</span> <span class="pre">0</span> <span class="pre">x</span></code> establishes <code class="docutils literal notranslate"><span class="pre">0</span> <span class="pre">≤</span> <span class="pre">x</span> <span class="pre">∨</span> <span class="pre">x</span> <span class="pre"><</span> <span class="pre">0</span></code>, allowing us to split on those two cases. Try proving the triangle inequality using the two allowing us to split on those two cases.</p> <p>Lean also supports the computer scientists’ pattern-matching syntax for disjunction. Now the <code class="docutils literal notranslate"><span class="pre">cases</span></code> tactic is more attractive, because it allows us to name each <code class="docutils literal notranslate"><span class="pre">case</span></code>, and name the hypothesis that is introduced closer to where it is used.</p> <div class="highlight-lean notranslate"><div class="highlight"><pre><span></span><span class="kd">example</span> <span class="o">:</span> <span class="n">x</span> <span class="bp"><</span> <span class="bp">|</span><span class="n">y</span><span class="bp">|</span> <span class="bp">→</span> <span class="n">x</span> <span class="bp"><</span> <span class="n">y</span> <span class="bp">∨</span> <span class="n">x</span> <span class="bp"><</span> <span class="bp">-</span><span class="n">y</span> <span class="o">:=</span> <span class="kd">by</span> <span class="n">cases</span> <span class="n">le_or_gt</span> <span class="mi">0</span> <span class="n">y</span> <span class="n">case</span> <span class="n">inl</span> <span class="n">h</span> <span class="bp">=></span> <span class="n">rw</span> <span class="o">[</span><span class="n">abs_of_nonneg</span> <span class="n">h</span><span class="o">]</span> <span class="n">intro</span> <span class="n">h</span><span class="bp">;</span> <span class="n">left</span><span class="bp">;</span> <span class="n">exact</span> <span class="n">h</span> <span class="n">case</span> <span class="n">inr</span> <span class="n">h</span> <span class="bp">=></span> <span class="n">rw</span> <span class="o">[</span><span class="n">abs_of_neg</span> <span class="n">h</span><span class="o">]</span> <span class="n">intro</span> <span class="n">h</span><span class="bp">;</span> <span class="n">right</span><span class="bp">;</span> <span class="n">exact</span> <span class="n">h</span> </pre></div> </div> <p>The names <code class="docutils literal notranslate"><span class="pre">inl</span></code> and <code class="docutils literal notranslate"><span class="pre">inr</span></code> are short for “intro left” and “intro right,” respectively. Using <code class="docutils literal notranslate"><span class="pre">case</span></code> has the advantage is that you can prove the cases in either order; Lean uses the tag to find the relevant goal. If you don’t care about that, you can use <code class="docutils literal notranslate"><span class="pre">next</span></code>, or <code class="docutils literal notranslate"><span class="pre">match</span></code>, or even a pattern-matching <code class="docutils literal notranslate"><span class="pre">have</span></code>.</p> <div class="highlight-lean notranslate"><div class="highlight"><pre><span></span><span class="kd">example</span> <span class="o">:</span> <span class="n">x</span> <span class="bp"><</span> <span class="bp">|</span><span class="n">y</span><span class="bp">|</span> <span class="bp">→</span> <span class="n">x</span> <span class="bp"><</span> <span class="n">y</span> <span class="bp">∨</span> <span class="n">x</span> <span class="bp"><</span> <span class="bp">-</span><span class="n">y</span> <span class="o">:=</span> <span class="kd">by</span> <span class="n">cases</span> <span class="n">le_or_gt</span> <span class="mi">0</span> <span class="n">y</span> <span class="n">next</span> <span class="n">h</span> <span class="bp">=></span> <span class="n">rw</span> <span class="o">[</span><span class="n">abs_of_nonneg</span> <span class="n">h</span><span class="o">]</span> <span class="n">intro</span> <span class="n">h</span><span class="bp">;</span> <span class="n">left</span><span class="bp">;</span> <span class="n">exact</span> <span class="n">h</span> <span class="n">next</span> <span class="n">h</span> <span class="bp">=></span> <span class="n">rw</span> <span class="o">[</span><span class="n">abs_of_neg</span> <span class="n">h</span><span class="o">]</span> <span class="n">intro</span> <span class="n">h</span><span class="bp">;</span> <span class="n">right</span><span class="bp">;</span> <span class="n">exact</span> <span class="n">h</span> <span class="kd">example</span> <span class="o">:</span> <span class="n">x</span> <span class="bp"><</span> <span class="bp">|</span><span class="n">y</span><span class="bp">|</span> <span class="bp">→</span> <span class="n">x</span> <span class="bp"><</span> <span class="n">y</span> <span class="bp">∨</span> <span class="n">x</span> <span class="bp"><</span> <span class="bp">-</span><span class="n">y</span> <span class="o">:=</span> <span class="kd">by</span> <span class="k">match</span> <span class="n">le_or_gt</span> <span class="mi">0</span> <span class="n">y</span> <span class="k">with</span> <span class="bp">|</span> <span class="n">Or.inl</span> <span class="n">h</span> <span class="bp">=></span> <span class="n">rw</span> <span class="o">[</span><span class="n">abs_of_nonneg</span> <span class="n">h</span><span class="o">]</span> <span class="n">intro</span> <span class="n">h</span><span class="bp">;</span> <span class="n">left</span><span class="bp">;</span> <span class="n">exact</span> <span class="n">h</span> <span class="bp">|</span> <span class="n">Or.inr</span> <span class="n">h</span> <span class="bp">=></span> <span class="n">rw</span> <span class="o">[</span><span class="n">abs_of_neg</span> <span class="n">h</span><span class="o">]</span> <span class="n">intro</span> <span class="n">h</span><span class="bp">;</span> <span class="n">right</span><span class="bp">;</span> <span class="n">exact</span> <span class="n">h</span> </pre></div> </div> <p>In the case of the <code class="docutils literal notranslate"><span class="pre">match</span></code>, we need to use the full names <code class="docutils literal notranslate"><span class="pre">Or.inl</span></code> and <code class="docutils literal notranslate"><span class="pre">Or.inr</span></code> of the canonical ways to prove a disjunction. In this textbook, we will generally use <code class="docutils literal notranslate"><span class="pre">rcases</span></code> to split on the caess of a disjunction.</p> <p>Try proving the triangle inequality using the two first two theorems in the next snippet. They are given the same names they have in mathlib.</p> <div class="highlight-lean notranslate"><div class="highlight"><pre><span></span><span class="kn">namespace</span> <span class="n">MyAbs</span>
-
@@ -1350,25 +1465,25 @@ try these.</p><span class="gr">sorry</span> </pre></div> </div> <p>You can also use <code class="docutils literal notranslate"><span class="pre">rcases</span></code> and <code class="docutils literal notranslate"><span class="pre">rintro</span></code> with disjunctions. <p>You can also use <code class="docutils literal notranslate"><span class="pre">rcases</span></code> and <code class="docutils literal notranslate"><span class="pre">rintro</span></code> with nested disjunctions. When these result in a genuine case split with multiple goals, the patterns for each new goal are separated by a vertical bar.</p> <div class="highlight-lean notranslate"><div class="highlight"><pre><span></span><span class="kd">example</span> <span class="o">{</span><span class="n">x</span> <span class="o">:</span> <span class="n">ℝ</span><span class="o">}</span> <span class="o">(</span><span class="n">h</span> <span class="o">:</span> <span class="n">x</span> <span class="bp">≠</span> <span class="mi">0</span><span class="o">)</span> <span class="o">:</span> <span class="n">x</span> <span class="bp"><</span> <span class="mi">0</span> <span class="bp">∨</span> <span class="n">x</span> <span class="bp">></span> <span class="mi">0</span> <span class="o">:=</span> <span class="kd">by</span> <span class="n">rcases</span> <span class="n">lt_trichotomy</span> <span class="n">x</span> <span class="mi">0</span> <span class="k">with</span> <span class="o">(</span><span class="n">xlt</span> <span class="bp">|</span> <span class="n">xeq</span> <span class="bp">|</span> <span class="n">xgt</span><span class="o">)</span> <span class="n">rcases</span> <span class="n">lt_trichotomy</span> <span class="n">x</span> <span class="mi">0</span> <span class="k">with</span> <span class="n">xlt</span> <span class="bp">|</span> <span class="n">xeq</span> <span class="bp">|</span> <span class="n">xgt</span> <span class="bp">·</span> <span class="n">left</span> <span class="n">exact</span> <span class="n">xlt</span> <span class="bp">·</span> <span class="n">contradiction</span> <span class="n">right</span><span class="bp">;</span> <span class="n">exact</span> <span class="n">xgt</span> <span class="bp">.</span> <span class="n">right</span><span class="bp">;</span> <span class="n">exact</span> <span class="n">xgt</span> </pre></div> </div> <p>You can still nest patterns and use the <code class="docutils literal notranslate"><span class="pre">rfl</span></code> keyword to substitute equations:</p> <div class="highlight-lean notranslate"><div class="highlight"><pre><span></span><span class="kd">example</span> <span class="o">{</span><span class="n">m</span> <span class="n">n</span> <span class="n">k</span> <span class="o">:</span> <span class="n">ℕ</span><span class="o">}</span> <span class="o">(</span><span class="n">h</span> <span class="o">:</span> <span class="n">m</span> <span class="bp">∣</span> <span class="n">n</span> <span class="bp">∨</span> <span class="n">m</span> <span class="bp">∣</span> <span class="n">k</span><span class="o">)</span> <span class="o">:</span> <span class="n">m</span> <span class="bp">∣</span> <span class="n">n</span> <span class="bp">*</span> <span class="n">k</span> <span class="o">:=</span> <span class="kd">by</span> <span class="n">rcases</span> <span class="n">h</span> <span class="k">with</span> <span class="o">(⟨</span><span class="n">a</span><span class="o">,</span> <span class="n">rfl</span><span class="o">⟩</span> <span class="bp">|</span> <span class="o">⟨</span><span class="n">b</span><span class="o">,</span> <span class="n">rfl</span><span class="o">⟩)</span> <span class="n">rcases</span> <span class="n">h</span> <span class="k">with</span> <span class="o">⟨</span><span class="n">a</span><span class="o">,</span> <span class="n">rfl</span><span class="o">⟩</span> <span class="bp">|</span> <span class="o">⟨</span><span class="n">b</span><span class="o">,</span> <span class="n">rfl</span><span class="o">⟩</span> <span class="bp">·</span> <span class="n">rw</span> <span class="o">[</span><span class="n">mul_assoc</span><span class="o">]</span> <span class="n">apply</span> <span class="n">dvd_mul_right</span> <span class="n">rw</span> <span class="o">[</span><span class="n">mul_comm</span><span class="o">,</span> <span class="n">mul_assoc</span><span class="o">]</span> <span class="n">apply</span> <span class="n">dvd_mul_right</span> <span class="bp">.</span> <span class="n">rw</span> <span class="o">[</span><span class="n">mul_comm</span><span class="o">,</span> <span class="n">mul_assoc</span><span class="o">]</span> <span class="n">apply</span> <span class="n">dvd_mul_right</span> </pre></div> </div> <p>See if you can prove the following with a single (long) line.
-
@@ -1428,7 +1543,7 @@ The name <code class="docutils literal notranslate"><span class="pre">em</span><<span class="n">intro</span> <span class="n">h</span> <span class="n">cases</span> <span class="n">em</span> <span class="n">P</span> <span class="bp">·</span> <span class="n">assumption</span> <span class="n">contradiction</span> <span class="bp">.</span> <span class="n">contradiction</span> </pre></div> </div> <p id="index-23">Alternatively, you can use the <code class="docutils literal notranslate"><span class="pre">by_cases</span></code> tactic.</p>
-
@@ -1562,8 +1677,8 @@ See if you can finish it off.</p><span class="n">intro</span> <span class="n">ε</span> <span class="n">εpos</span> <span class="n">dsimp</span> <span class="c1">-- this line is not needed but cleans up the goal a bit.</span> <span class="k">have</span> <span class="n">ε2pos</span> <span class="o">:</span> <span class="mi">0</span> <span class="bp"><</span> <span class="n">ε</span> <span class="bp">/</span> <span class="mi">2</span> <span class="o">:=</span> <span class="kd">by</span> <span class="n">linarith</span> <span class="n">cases'</span> <span class="n">cs</span> <span class="o">(</span><span class="n">ε</span> <span class="bp">/</span> <span class="mi">2</span><span class="o">)</span> <span class="n">ε2pos</span> <span class="k">with</span> <span class="n">Ns</span> <span class="n">hs</span> <span class="n">cases'</span> <span class="n">ct</span> <span class="o">(</span><span class="n">ε</span> <span class="bp">/</span> <span class="mi">2</span><span class="o">)</span> <span class="n">ε2pos</span> <span class="k">with</span> <span class="n">Nt</span> <span class="n">ht</span> <span class="n">rcases</span> <span class="n">cs</span> <span class="o">(</span><span class="n">ε</span> <span class="bp">/</span> <span class="mi">2</span><span class="o">)</span> <span class="n">ε2pos</span> <span class="k">with</span> <span class="o">⟨</span><span class="n">Ns</span><span class="o">,</span> <span class="n">hs</span><span class="o">⟩</span> <span class="n">rcases</span> <span class="n">ct</span> <span class="o">(</span><span class="n">ε</span> <span class="bp">/</span> <span class="mi">2</span><span class="o">)</span> <span class="n">ε2pos</span> <span class="k">with</span> <span class="o">⟨</span><span class="n">Nt</span><span class="o">,</span> <span class="n">ht</span><span class="o">⟩</span> <span class="n">use</span> <span class="n">max</span> <span class="n">Ns</span> <span class="n">Nt</span> <span class="gr">sorry</span> </pre></div>
-
@@ -1605,7 +1720,7 @@ in absolute value.We have started you off; see if you can finish it.</p> <div class="highlight-lean notranslate"><div class="highlight"><pre><span></span><span class="kd">theorem</span> <span class="n">exists_abs_le_of_convergesTo</span> <span class="o">{</span><span class="n">s</span> <span class="o">:</span> <span class="n">ℕ</span> <span class="bp">→</span> <span class="n">ℝ</span><span class="o">}</span> <span class="o">{</span><span class="n">a</span> <span class="o">:</span> <span class="n">ℝ</span><span class="o">}</span> <span class="o">(</span><span class="n">cs</span> <span class="o">:</span> <span class="n">ConvergesTo</span> <span class="n">s</span> <span class="n">a</span><span class="o">)</span> <span class="o">:</span> <span class="bp">∃</span> <span class="n">N</span> <span class="n">b</span><span class="o">,</span> <span class="bp">∀</span> <span class="n">n</span><span class="o">,</span> <span class="n">N</span> <span class="bp">≤</span> <span class="n">n</span> <span class="bp">→</span> <span class="bp">|</span><span class="n">s</span> <span class="n">n</span><span class="bp">|</span> <span class="bp"><</span> <span class="n">b</span> <span class="o">:=</span> <span class="kd">by</span> <span class="n">cases'</span> <span class="n">cs</span> <span class="mi">1</span> <span class="n">zero_lt_one</span> <span class="k">with</span> <span class="n">N</span> <span class="n">h</span> <span class="n">rcases</span> <span class="n">cs</span> <span class="mi">1</span> <span class="n">zero_lt_one</span> <span class="k">with</span> <span class="o">⟨</span><span class="n">N</span><span class="o">,</span> <span class="n">h</span><span class="o">⟩</span> <span class="n">use</span> <span class="n">N</span><span class="o">,</span> <span class="bp">|</span><span class="n">a</span><span class="bp">|</span> <span class="bp">+</span> <span class="mi">1</span> <span class="gr">sorry</span> </pre></div>
-
@@ -1629,7 +1744,7 @@ and finish the proof.</p><span class="n">rcases</span> <span class="n">exists_abs_le_of_convergesTo</span> <span class="n">cs</span> <span class="k">with</span> <span class="o">⟨</span><span class="n">N₀</span><span class="o">,</span> <span class="n">B</span><span class="o">,</span> <span class="n">h₀</span><span class="o">⟩</span> <span class="k">have</span> <span class="n">Bpos</span> <span class="o">:</span> <span class="mi">0</span> <span class="bp"><</span> <span class="n">B</span> <span class="o">:=</span> <span class="n">lt_of_le_of_lt</span> <span class="o">(</span><span class="n">abs_nonneg</span> <span class="n">_</span><span class="o">)</span> <span class="o">(</span><span class="n">h₀</span> <span class="n">N₀</span> <span class="o">(</span><span class="n">le_refl</span> <span class="n">_</span><span class="o">))</span> <span class="k">have</span> <span class="n">pos₀</span> <span class="o">:</span> <span class="n">ε</span> <span class="bp">/</span> <span class="n">B</span> <span class="bp">></span> <span class="mi">0</span> <span class="o">:=</span> <span class="n">div_pos</span> <span class="n">εpos</span> <span class="n">Bpos</span> <span class="n">cases'</span> <span class="n">ct</span> <span class="n">_</span> <span class="n">pos₀</span> <span class="k">with</span> <span class="n">N₁</span> <span class="n">h₁</span> <span class="n">rcases</span> <span class="n">ct</span> <span class="n">_</span> <span class="n">pos₀</span> <span class="k">with</span> <span class="o">⟨</span><span class="n">N₁</span><span class="o">,</span> <span class="n">h₁</span><span class="o">⟩</span> <span class="gr">sorry</span> </pre></div> </div>
-
@@ -1663,8 +1778,8 @@ you can delete the proof sketch and try proving it from scratch.)</p><span class="k">have</span> <span class="n">εpos</span> <span class="o">:</span> <span class="n">ε</span> <span class="bp">></span> <span class="mi">0</span> <span class="o">:=</span> <span class="kd">by</span> <span class="n">change</span> <span class="bp">|</span><span class="n">a</span> <span class="bp">-</span> <span class="n">b</span><span class="bp">|</span> <span class="bp">/</span> <span class="mi">2</span> <span class="bp">></span> <span class="mi">0</span> <span class="n">linarith</span> <span class="n">cases'</span> <span class="n">sa</span> <span class="n">ε</span> <span class="n">εpos</span> <span class="k">with</span> <span class="n">Na</span> <span class="n">hNa</span> <span class="n">cases'</span> <span class="n">sb</span> <span class="n">ε</span> <span class="n">εpos</span> <span class="k">with</span> <span class="n">Nb</span> <span class="n">hNb</span> <span class="n">rcases</span> <span class="n">sa</span> <span class="n">ε</span> <span class="n">εpos</span> <span class="k">with</span> <span class="o">⟨</span><span class="n">Na</span><span class="o">,</span> <span class="n">hNa</span><span class="o">⟩</span> <span class="n">rcases</span> <span class="n">sb</span> <span class="n">ε</span> <span class="n">εpos</span> <span class="k">with</span> <span class="o">⟨</span><span class="n">Nb</span><span class="o">,</span> <span class="n">hNb</span><span class="o">⟩</span> <span class="k">let</span> <span class="n">N</span> <span class="o">:=</span> <span class="n">max</span> <span class="n">Na</span> <span class="n">Nb</span> <span class="k">have</span> <span class="n">absa</span> <span class="o">:</span> <span class="bp">|</span><span class="n">s</span> <span class="n">N</span> <span class="bp">-</span> <span class="n">a</span><span class="bp">|</span> <span class="bp"><</span> <span class="n">ε</span> <span class="o">:=</span> <span class="kd">by</span> <span class="gr">sorry</span> <span class="k">have</span> <span class="n">absb</span> <span class="o">:</span> <span class="bp">|</span><span class="n">s</span> <span class="n">N</span> <span class="bp">-</span> <span class="n">b</span><span class="bp">|</span> <span class="bp"><</span> <span class="n">ε</span> <span class="o">:=</span> <span class="kd">by</span> <span class="gr">sorry</span>
-
-
-
@@ -199,13 +199,13 @@ we can also use the <code class="docutils literal notranslate"><span class="pre"<span class="n">intro</span> <span class="n">x</span> <span class="n">hx</span> <span class="k">have</span> <span class="n">xs</span> <span class="o">:</span> <span class="n">x</span> <span class="bp">∈</span> <span class="n">s</span> <span class="o">:=</span> <span class="n">hx.1</span> <span class="k">have</span> <span class="n">xtu</span> <span class="o">:</span> <span class="n">x</span> <span class="bp">∈</span> <span class="n">t</span> <span class="bp">∪</span> <span class="n">u</span> <span class="o">:=</span> <span class="n">hx.2</span> <span class="n">cases'</span> <span class="n">xtu</span> <span class="k">with</span> <span class="n">xt</span> <span class="n">xu</span> <span class="n">rcases</span> <span class="n">xtu</span> <span class="k">with</span> <span class="n">xt</span> <span class="bp">|</span> <span class="n">xu</span> <span class="bp">·</span> <span class="n">left</span> <span class="k">show</span> <span class="n">x</span> <span class="bp">∈</span> <span class="n">s</span> <span class="bp">∩</span> <span class="n">t</span> <span class="n">exact</span> <span class="o">⟨</span><span class="n">xs</span><span class="o">,</span> <span class="n">xt</span><span class="o">⟩</span> <span class="n">right</span> <span class="k">show</span> <span class="n">x</span> <span class="bp">∈</span> <span class="n">s</span> <span class="bp">∩</span> <span class="n">u</span> <span class="n">exact</span> <span class="o">⟨</span><span class="n">xs</span><span class="o">,</span> <span class="n">xu</span><span class="o">⟩</span> <span class="bp">.</span> <span class="n">right</span> <span class="k">show</span> <span class="n">x</span> <span class="bp">∈</span> <span class="n">s</span> <span class="bp">∩</span> <span class="n">u</span> <span class="n">exact</span> <span class="o">⟨</span><span class="n">xs</span><span class="o">,</span> <span class="n">xu</span><span class="o">⟩</span> </pre></div> </div> <p>Since intersection binds tighter than union,
-
@@ -214,9 +214,8 @@ is unnecessary, but they make the meaning of the expression clearer.The following is a shorter proof of the same fact:</p> <div class="highlight-lean notranslate"><div class="highlight"><pre><span></span><span class="kd">example</span> <span class="o">:</span> <span class="n">s</span> <span class="bp">∩</span> <span class="o">(</span><span class="n">t</span> <span class="bp">∪</span> <span class="n">u</span><span class="o">)</span> <span class="bp">⊆</span> <span class="n">s</span> <span class="bp">∩</span> <span class="n">t</span> <span class="bp">∪</span> <span class="n">s</span> <span class="bp">∩</span> <span class="n">u</span> <span class="o">:=</span> <span class="kd">by</span> <span class="n">rintro</span> <span class="n">x</span> <span class="o">⟨</span><span class="n">xs</span><span class="o">,</span> <span class="n">xt</span> <span class="bp">|</span> <span class="n">xu</span><span class="o">⟩</span> <span class="bp">·</span> <span class="n">left</span> <span class="n">exact</span> <span class="o">⟨</span><span class="n">xs</span><span class="o">,</span> <span class="n">xt</span><span class="o">⟩</span> <span class="n">right</span><span class="bp">;</span> <span class="n">exact</span> <span class="o">⟨</span><span class="n">xs</span><span class="o">,</span> <span class="n">xu</span><span class="o">⟩</span> <span class="bp">·</span> <span class="n">left</span><span class="bp">;</span> <span class="n">exact</span> <span class="o">⟨</span><span class="n">xs</span><span class="o">,</span> <span class="n">xt</span><span class="o">⟩</span> <span class="bp">.</span> <span class="n">right</span><span class="bp">;</span> <span class="n">exact</span> <span class="o">⟨</span><span class="n">xs</span><span class="o">,</span> <span class="n">xu</span><span class="o">⟩</span> </pre></div> </div> <p>As an exercise, try proving the other inclusion:</p>
-
@@ -245,10 +244,9 @@ show how to avoid using them.</p><span class="bp">·</span> <span class="n">exact</span> <span class="n">xs</span> <span class="n">intro</span> <span class="n">xtu</span> <span class="c1">-- x ∈ t ∨ x ∈ u</span> <span class="n">cases'</span> <span class="n">xtu</span> <span class="k">with</span> <span class="n">xt</span> <span class="n">xu</span> <span class="bp">·</span> <span class="k">show</span> <span class="n">False</span> <span class="n">exact</span> <span class="n">xnt</span> <span class="n">xt</span> <span class="k">show</span> <span class="n">False</span><span class="bp">;</span> <span class="n">exact</span> <span class="n">xnu</span> <span class="n">xu</span> <span class="n">rcases</span> <span class="n">xtu</span> <span class="k">with</span> <span class="n">xt</span> <span class="bp">|</span> <span class="n">xu</span> <span class="bp">·</span> <span class="k">show</span> <span class="n">False</span><span class="bp">;</span> <span class="n">exact</span> <span class="n">xnt</span> <span class="n">xt</span> <span class="bp">.</span> <span class="k">show</span> <span class="n">False</span><span class="bp">;</span> <span class="n">exact</span> <span class="n">xnu</span> <span class="n">xu</span> <span class="kd">example</span> <span class="o">:</span> <span class="o">(</span><span class="n">s</span> <span class="bp">\</span> <span class="n">t</span><span class="o">)</span> <span class="bp">\</span> <span class="n">u</span> <span class="bp">⊆</span> <span class="n">s</span> <span class="bp">\</span> <span class="o">(</span><span class="n">t</span> <span class="bp">∪</span> <span class="n">u</span><span class="o">)</span> <span class="o">:=</span> <span class="kd">by</span> <span class="n">rintro</span> <span class="n">x</span> <span class="o">⟨⟨</span><span class="n">xs</span><span class="o">,</span> <span class="n">xnt</span><span class="o">⟩,</span> <span class="n">xnu</span><span class="o">⟩</span>
-
@@ -271,9 +269,8 @@ the <code class="docutils literal notranslate"><span class="pre">ext</span></cod<span class="n">ext</span> <span class="n">x</span> <span class="n">simp</span> <span class="n">only</span> <span class="o">[</span><span class="n">mem_inter_iff</span><span class="o">]</span> <span class="n">constructor</span> <span class="bp">·</span> <span class="n">rintro</span> <span class="o">⟨</span><span class="n">xs</span><span class="o">,</span> <span class="n">xt</span><span class="o">⟩</span> <span class="n">exact</span> <span class="o">⟨</span><span class="n">xt</span><span class="o">,</span> <span class="n">xs</span><span class="o">⟩</span> <span class="n">rintro</span> <span class="o">⟨</span><span class="n">xt</span><span class="o">,</span> <span class="n">xs</span><span class="o">⟩</span><span class="bp">;</span> <span class="n">exact</span> <span class="o">⟨</span><span class="n">xs</span><span class="o">,</span> <span class="n">xt</span><span class="o">⟩</span> <span class="bp">·</span> <span class="n">rintro</span> <span class="o">⟨</span><span class="n">xs</span><span class="o">,</span> <span class="n">xt</span><span class="o">⟩</span><span class="bp">;</span> <span class="n">exact</span> <span class="o">⟨</span><span class="n">xt</span><span class="o">,</span> <span class="n">xs</span><span class="o">⟩</span> <span class="bp">.</span> <span class="n">rintro</span> <span class="o">⟨</span><span class="n">xt</span><span class="o">,</span> <span class="n">xs</span><span class="o">⟩</span><span class="bp">;</span> <span class="n">exact</span> <span class="o">⟨</span><span class="n">xs</span><span class="o">,</span> <span class="n">xt</span><span class="o">⟩</span> </pre></div> </div> <p>Once again, deleting the line <code class="docutils literal notranslate"><span class="pre">simp</span> <span class="pre">only</span> <span class="pre">[mem_inter_iff]</span></code>
-
@@ -295,9 +292,8 @@ which allows us to prove an equation <code class="docutils literal notranslate">between sets by proving <code class="docutils literal notranslate"><span class="pre">s</span> <span class="pre">⊆</span> <span class="pre">t</span></code> and <code class="docutils literal notranslate"><span class="pre">t</span> <span class="pre">⊆</span> <span class="pre">s</span></code>.</p> <div class="highlight-lean notranslate"><div class="highlight"><pre><span></span><span class="kd">example</span> <span class="o">:</span> <span class="n">s</span> <span class="bp">∩</span> <span class="n">t</span> <span class="bp">=</span> <span class="n">t</span> <span class="bp">∩</span> <span class="n">s</span> <span class="o">:=</span> <span class="kd">by</span> <span class="n">apply</span> <span class="n">Subset.antisymm</span> <span class="bp">·</span> <span class="n">rintro</span> <span class="n">x</span> <span class="o">⟨</span><span class="n">xs</span><span class="o">,</span> <span class="n">xt</span><span class="o">⟩</span> <span class="n">exact</span> <span class="o">⟨</span><span class="n">xt</span><span class="o">,</span> <span class="n">xs</span><span class="o">⟩</span> <span class="n">rintro</span> <span class="n">x</span> <span class="o">⟨</span><span class="n">xt</span><span class="o">,</span> <span class="n">xs</span><span class="o">⟩</span><span class="bp">;</span> <span class="n">exact</span> <span class="o">⟨</span><span class="n">xs</span><span class="o">,</span> <span class="n">xt</span><span class="o">⟩</span> <span class="bp">·</span> <span class="n">rintro</span> <span class="n">x</span> <span class="o">⟨</span><span class="n">xs</span><span class="o">,</span> <span class="n">xt</span><span class="o">⟩</span><span class="bp">;</span> <span class="n">exact</span> <span class="o">⟨</span><span class="n">xt</span><span class="o">,</span> <span class="n">xs</span><span class="o">⟩</span> <span class="bp">.</span> <span class="n">rintro</span> <span class="n">x</span> <span class="o">⟨</span><span class="n">xt</span><span class="o">,</span> <span class="n">xs</span><span class="o">⟩</span><span class="bp">;</span> <span class="n">exact</span> <span class="o">⟨</span><span class="n">xs</span><span class="o">,</span> <span class="n">xt</span><span class="o">⟩</span> </pre></div> </div> <p>Try finishing this proof term:</p>
-
@@ -1128,7 +1124,7 @@ applies the corresponding defining equation of <code class="docutils literal not<span class="n">by_cases</span> <span class="n">gyA</span> <span class="o">:</span> <span class="n">g</span> <span class="n">y</span> <span class="bp">∈</span> <span class="n">A</span> <span class="bp">·</span> <span class="n">rw</span> <span class="o">[</span><span class="n">A_def</span><span class="o">,</span> <span class="n">sbSet</span><span class="o">,</span> <span class="n">mem_iUnion</span><span class="o">]</span> <span class="n">at</span> <span class="n">gyA</span> <span class="n">rcases</span> <span class="n">gyA</span> <span class="k">with</span> <span class="o">⟨</span><span class="n">n</span><span class="o">,</span> <span class="n">hn</span><span class="o">⟩</span> <span class="n">cases'</span> <span class="n">n</span> <span class="k">with</span> <span class="n">n</span> <span class="n">rcases</span> <span class="n">n</span> <span class="k">with</span> <span class="n">_</span> <span class="bp">|</span> <span class="n">n</span> <span class="bp">·</span> <span class="n">simp</span> <span class="o">[</span><span class="n">sbAux</span><span class="o">]</span> <span class="n">at</span> <span class="n">hn</span> <span class="n">simp</span> <span class="o">[</span><span class="n">sbAux</span><span class="o">]</span> <span class="n">at</span> <span class="n">hn</span> <span class="n">rcases</span> <span class="n">hn</span> <span class="k">with</span> <span class="o">⟨</span><span class="n">x</span><span class="o">,</span> <span class="n">xmem</span><span class="o">,</span> <span class="n">hx</span><span class="o">⟩</span>
-
-
-
@@ -342,7 +342,7 @@ At the very end, you can use <code class="docutils literal notranslate"><span clto finish it off.</p> <div class="highlight-lean notranslate"><div class="highlight"><pre><span></span><span class="kd">example</span> <span class="o">{</span><span class="n">m</span> <span class="n">n</span> <span class="n">k</span> <span class="n">r</span> <span class="o">:</span> <span class="n">ℕ</span><span class="o">}</span> <span class="o">(</span><span class="n">nnz</span> <span class="o">:</span> <span class="n">n</span> <span class="bp">≠</span> <span class="mi">0</span><span class="o">)</span> <span class="o">(</span><span class="n">pow_eq</span> <span class="o">:</span> <span class="n">m</span> <span class="bp">^</span> <span class="n">k</span> <span class="bp">=</span> <span class="n">r</span> <span class="bp">*</span> <span class="n">n</span> <span class="bp">^</span> <span class="n">k</span><span class="o">)</span> <span class="o">{</span><span class="n">p</span> <span class="o">:</span> <span class="n">ℕ</span><span class="o">}</span> <span class="o">(</span><span class="n">prime_p</span> <span class="o">:</span> <span class="n">p.Prime</span><span class="o">)</span> <span class="o">:</span> <span class="n">k</span> <span class="bp">∣</span> <span class="n">r.factorization</span> <span class="n">p</span> <span class="o">:=</span> <span class="kd">by</span> <span class="n">cases'</span> <span class="n">r</span> <span class="k">with</span> <span class="n">r</span> <span class="n">rcases</span> <span class="n">r</span> <span class="k">with</span> <span class="n">_</span> <span class="bp">|</span> <span class="n">r</span> <span class="bp">·</span> <span class="n">simp</span> <span class="k">have</span> <span class="n">npow_nz</span> <span class="o">:</span> <span class="n">n</span> <span class="bp">^</span> <span class="n">k</span> <span class="bp">≠</span> <span class="mi">0</span> <span class="o">:=</span> <span class="k">fun</span> <span class="n">npowz</span> <span class="bp">↦</span> <span class="n">nnz</span> <span class="o">(</span><span class="n">pow_eq_zero</span> <span class="n">npowz</span><span class="o">)</span> <span class="k">have</span> <span class="n">eq1</span> <span class="o">:</span> <span class="o">(</span><span class="n">m</span> <span class="bp">^</span> <span class="n">k</span><span class="o">)</span><span class="bp">.</span><span class="n">factorization</span> <span class="n">p</span> <span class="bp">=</span> <span class="n">k</span> <span class="bp">*</span> <span class="n">m.factorization</span> <span class="n">p</span> <span class="o">:=</span> <span class="kd">by</span>
-
@@ -498,7 +498,7 @@ Step through the next example to see what is going on.</p><span class="n">induction'</span> <span class="n">n</span> <span class="k">with</span> <span class="n">n</span> <span class="n">ih</span> <span class="bp">·</span> <span class="n">exact</span> <span class="n">absurd</span> <span class="n">ipos</span> <span class="o">(</span><span class="n">not_lt_of_ge</span> <span class="n">ile</span><span class="o">)</span> <span class="n">rw</span> <span class="o">[</span><span class="n">fac</span><span class="o">]</span> <span class="n">cases'</span> <span class="n">Nat.of_le_succ</span> <span class="n">ile</span> <span class="k">with</span> <span class="n">h</span> <span class="n">h</span> <span class="n">rcases</span> <span class="n">Nat.of_le_succ</span> <span class="n">ile</span> <span class="k">with</span> <span class="n">h</span> <span class="bp">|</span> <span class="n">h</span> <span class="bp">·</span> <span class="n">apply</span> <span class="n">dvd_mul_of_dvd_right</span> <span class="o">(</span><span class="n">ih</span> <span class="n">h</span><span class="o">)</span> <span class="n">rw</span> <span class="o">[</span><span class="n">h</span><span class="o">]</span> <span class="n">apply</span> <span class="n">dvd_mul_right</span>
-
@@ -511,7 +511,7 @@ so that the remainder of the proof starts with the case<span class="math notranslate nohighlight">\(n = 1\)</span>. See if you can complete the argument with a proof by induction.</p> <div class="highlight-lean notranslate"><div class="highlight"><pre><span></span><span class="kd">theorem</span> <span class="n">pow_two_le_fac</span> <span class="o">(</span><span class="n">n</span> <span class="o">:</span> <span class="n">ℕ</span><span class="o">)</span> <span class="o">:</span> <span class="mi">2</span> <span class="bp">^</span> <span class="o">(</span><span class="n">n</span> <span class="bp">-</span> <span class="mi">1</span><span class="o">)</span> <span class="bp">≤</span> <span class="n">fac</span> <span class="n">n</span> <span class="o">:=</span> <span class="kd">by</span> <span class="n">cases'</span> <span class="n">n</span> <span class="k">with</span> <span class="n">n</span> <span class="n">rcases</span> <span class="n">n</span> <span class="k">with</span> <span class="n">_</span> <span class="bp">|</span> <span class="n">n</span> <span class="bp">·</span> <span class="n">simp</span> <span class="o">[</span><span class="n">fac</span><span class="o">]</span> <span class="gr">sorry</span> </pre></div>
-
@@ -1090,7 +1090,7 @@ same property.</p><span class="k">have</span> <span class="o">:</span> <span class="n">m</span> <span class="bp">%</span> <span class="mi">4</span> <span class="bp">=</span> <span class="mi">3</span> <span class="bp">∨</span> <span class="n">n</span> <span class="bp">/</span> <span class="n">m</span> <span class="bp">%</span> <span class="mi">4</span> <span class="bp">=</span> <span class="mi">3</span> <span class="o">:=</span> <span class="kd">by</span> <span class="n">apply</span> <span class="n">mod_4_eq_3_or_mod_4_eq_3</span> <span class="n">rw</span> <span class="o">[</span><span class="n">neq</span><span class="o">,</span> <span class="n">h</span><span class="o">]</span> <span class="n">cases'</span> <span class="n">this</span> <span class="k">with</span> <span class="n">h1</span> <span class="n">h1</span> <span class="n">rcases</span> <span class="n">this</span> <span class="k">with</span> <span class="n">h1</span> <span class="bp">|</span> <span class="n">h1</span> <span class="bp">.</span> <span class="gr">sorry</span> <span class="bp">.</span> <span class="gr">sorry</span> </pre></div>
-
@@ -1114,14 +1114,14 @@ along the way.</p><div class="highlight-lean notranslate"><div class="highlight"><pre><span></span><span class="kd">theorem</span> <span class="n">primes_mod_4_eq_3_infinite</span> <span class="o">:</span> <span class="bp">∀</span> <span class="n">n</span><span class="o">,</span> <span class="bp">∃</span> <span class="n">p</span> <span class="bp">></span> <span class="n">n</span><span class="o">,</span> <span class="n">Nat.Prime</span> <span class="n">p</span> <span class="bp">∧</span> <span class="n">p</span> <span class="bp">%</span> <span class="mi">4</span> <span class="bp">=</span> <span class="mi">3</span> <span class="o">:=</span> <span class="kd">by</span> <span class="n">by_contra</span> <span class="n">h</span> <span class="n">push_neg</span> <span class="n">at</span> <span class="n">h</span> <span class="n">cases'</span> <span class="n">h</span> <span class="k">with</span> <span class="n">n</span> <span class="n">hn</span> <span class="n">rcases</span> <span class="n">h</span> <span class="k">with</span> <span class="o">⟨</span><span class="n">n</span><span class="o">,</span> <span class="n">hn</span><span class="o">⟩</span> <span class="k">have</span> <span class="o">:</span> <span class="bp">∃</span> <span class="n">s</span> <span class="o">:</span> <span class="n">Finset</span> <span class="n">Nat</span><span class="o">,</span> <span class="bp">∀</span> <span class="n">p</span> <span class="o">:</span> <span class="n">ℕ</span><span class="o">,</span> <span class="n">p.Prime</span> <span class="bp">∧</span> <span class="n">p</span> <span class="bp">%</span> <span class="mi">4</span> <span class="bp">=</span> <span class="mi">3</span> <span class="bp">↔</span> <span class="n">p</span> <span class="bp">∈</span> <span class="n">s</span> <span class="o">:=</span> <span class="kd">by</span> <span class="n">apply</span> <span class="n">ex_finset_of_bounded</span> <span class="n">use</span> <span class="n">n</span> <span class="n">contrapose</span><span class="bp">!</span> <span class="n">hn</span> <span class="n">rcases</span> <span class="n">hn</span> <span class="k">with</span> <span class="o">⟨</span><span class="n">p</span><span class="o">,</span> <span class="o">⟨</span><span class="n">pp</span><span class="o">,</span> <span class="n">p4</span><span class="o">⟩,</span> <span class="n">pltn</span><span class="o">⟩</span> <span class="n">exact</span> <span class="o">⟨</span><span class="n">p</span><span class="o">,</span> <span class="n">pltn</span><span class="o">,</span> <span class="n">pp</span><span class="o">,</span> <span class="n">p4</span><span class="o">⟩</span> <span class="n">cases'</span> <span class="n">this</span> <span class="k">with</span> <span class="n">s</span> <span class="n">hs</span> <span class="n">rcases</span> <span class="n">this</span> <span class="k">with</span> <span class="o">⟨</span><span class="n">s</span><span class="o">,</span> <span class="n">hs</span><span class="o">⟩</span> <span class="k">have</span> <span class="n">h₁</span> <span class="o">:</span> <span class="o">((</span><span class="mi">4</span> <span class="bp">*</span> <span class="bp">∏</span> <span class="n">i</span> <span class="k">in</span> <span class="n">erase</span> <span class="n">s</span> <span class="mi">3</span><span class="o">,</span> <span class="n">i</span><span class="o">)</span> <span class="bp">+</span> <span class="mi">3</span><span class="o">)</span> <span class="bp">%</span> <span class="mi">4</span> <span class="bp">=</span> <span class="mi">3</span> <span class="o">:=</span> <span class="kd">by</span> <span class="gr">sorry</span> <span class="n">rcases</span> <span class="n">exists_prime_factor_mod_4_eq_3</span> <span class="n">h₁</span> <span class="k">with</span> <span class="o">⟨</span><span class="n">p</span><span class="o">,</span> <span class="n">pp</span><span class="o">,</span> <span class="n">pdvd</span><span class="o">,</span> <span class="n">p4eq</span><span class="o">⟩</span>
-
-
-
@@ -1,1 +1,1 @@Search.setIndex({"docnames": ["C01_Introduction", "C02_Basics", "C03_Logic", "C04_Sets_and_Functions", "C05_Elementary_Number_Theory", "C06_Structures", "C07_Hierarchies", "C08_Topology", "C09_Differential_Calculus", "C10_Integration_and_Measure_Theory", "genindex", "index"], "filenames": ["C01_Introduction.rst", "C02_Basics.rst", "C03_Logic.rst", "C04_Sets_and_Functions.rst", "C05_Elementary_Number_Theory.rst", "C06_Structures.rst", "C07_Hierarchies.rst", "C08_Topology.rst", "C09_Differential_Calculus.rst", "C10_Integration_and_Measure_Theory.rst", "genindex.rst", "index.rst"], "titles": ["<span class=\"section-number\">1. </span>Introduction", "<span class=\"section-number\">2. </span>Basics", "<span class=\"section-number\">3. </span>Logic", "<span class=\"section-number\">4. </span>Sets and Functions", "<span class=\"section-number\">5. </span>Elementary Number Theory", "<span class=\"section-number\">6. </span>Structures", "<span class=\"section-number\">7. </span>Hierarchies", "<span class=\"section-number\">8. </span>Topology", "<span class=\"section-number\">9. </span>Differential Calculus", "<span class=\"section-number\">10. </span>Integration and Measure Theory", "Index", "Mathematics in Lean"], "terms": {"The": [0, 1, 4, 5, 6, 7, 8, 9, 11], "goal": [0, 1, 2, 3, 4, 5, 7], "thi": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], "book": [0, 2, 7], "teach": 0, "you": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], "formal": [0, 1, 2, 3, 4, 5, 6, 7, 8], "mathemat": [0, 1, 2, 3, 4, 5, 6, 7], "us": [0, 2, 3, 4, 5, 6, 7, 8, 9, 11], "lean": [0, 1, 2, 3, 4, 5, 6, 7, 8], "4": [0, 1, 2, 4, 5, 7, 8], "interact": [0, 5, 6, 9], "proof": [0, 1, 2, 3, 4, 5, 6, 7, 8], "assist": [0, 2, 5], "It": [0, 1, 2, 3, 4, 5, 6, 7, 8], "assum": [0, 1, 2, 3, 4, 6, 7], "know": [0, 1, 2, 3, 4, 5, 6, 7, 8], "some": [0, 1, 2, 3, 4, 5, 6, 7, 8], "doe": [0, 1, 2, 3, 4, 5, 6, 7, 8], "requir": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], "much": [0, 2, 4, 6, 7, 8], "although": [0, 3, 4, 5, 6, 7], "we": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], "cover": [0, 1, 3, 6, 7, 8], "exampl": [0, 2, 3, 4, 5, 6, 7, 8, 9, 11], "rang": [0, 2, 3, 4, 7], "from": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], "number": [0, 1, 2, 3, 5, 6, 7, 8, 11], "theori": [0, 1, 2, 3, 6, 7, 8, 11], "measur": [0, 5, 7, 8, 11], "analysi": [0, 5, 8], "focu": [0, 1, 7, 9], "elementari": [0, 3, 5, 7, 11], "aspect": [0, 5], "those": [0, 1, 2, 3, 5, 6, 7, 8], "field": [0, 1, 5, 6, 8], "hope": 0, "thei": [0, 1, 2, 3, 4, 5, 6, 7, 8], "ar": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], "familiar": [0, 1, 4, 5, 7, 8], "can": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], "pick": [0, 6], "them": [0, 1, 2, 3, 4, 5, 6, 7], "up": [0, 2, 3, 4, 5, 6, 7], "go": [0, 1, 2, 3, 4, 6, 7], "also": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], "don": [0, 1, 2, 3, 4, 5, 6, 7, 9], "t": [0, 1, 2, 3, 4, 5, 6, 7, 9], "presuppos": 0, "ani": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], "background": 0, "method": [0, 2, 3, 4, 5], "seen": [0, 1, 2, 4, 5, 6, 7], "kind": [0, 1, 6, 7], "comput": [0, 3, 4, 5, 8, 9], "program": [0, 1], "write": [0, 1, 2, 4, 5, 6, 7, 8, 9], "definit": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], "theorem": [0, 2, 4, 5, 7, 8, 9, 11], "regiment": 0, "languag": [0, 1, 3], "like": [0, 1, 2, 3, 4, 5, 6, 7], "understand": [0, 2, 3, 4, 5, 6, 7], "In": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], "return": [0, 2, 3, 4, 5, 7], "provid": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], "feedback": 0, "inform": [0, 1, 2, 3, 5, 6, 7], "interpret": [0, 1, 4, 5, 7], "express": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], "guarante": [0, 3, 5], "well": [0, 1, 2, 3, 4, 5, 6, 7], "form": [0, 1, 2, 3, 4, 5, 6, 7, 9], "ultim": 0, "certifi": 0, "correct": [0, 1], "our": [0, 1, 2, 3, 4, 5, 6, 7, 9], "learn": [0, 1, 2, 4, 5], "more": [0, 2, 3, 4, 5, 6, 7, 8, 11], "about": [0, 2, 3, 4, 5, 6, 7, 8, 11], "project": [0, 4, 5, 7], "page": [0, 1, 4], "commun": [0, 4], "web": [0, 1, 4], "tutori": 0, "base": [0, 2, 3, 4, 6, 7, 8], "s": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], "larg": [0, 6, 7], "ever": [0, 7], "grow": [0, 6], "librari": [0, 1, 2, 3, 4, 5, 7, 8], "mathlib": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], "strongli": 0, "recommend": [0, 1, 3], "join": [0, 1, 5], "zulip": [0, 4], "onlin": 0, "chat": 0, "group": [0, 1, 2, 3, 5, 6, 7, 8], "haven": [0, 2, 6, 7], "alreadi": [0, 1, 2, 3, 4, 5, 6, 7], "ll": [0, 2, 4, 6, 7], "find": [0, 1, 2, 4, 5, 6, 7], "live": [0, 5], "welcom": [0, 1], "enthusiast": 0, "happi": 0, "answer": [0, 5, 7], "question": [0, 4, 6, 7, 9], "offer": [0, 2, 5, 7], "moral": [0, 5], "support": [0, 1, 2, 3, 4, 5, 6, 7], "read": [0, 1, 4, 6, 7], "pdf": 0, "html": 0, "version": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], "design": [0, 1, 2, 3, 5, 7], "run": 0, "insid": [0, 1, 2, 3], "vs": [0, 1, 2, 3, 5], "code": [0, 1, 2, 3, 5, 6], "editor": [0, 1], "To": [0, 1, 2, 3, 4, 5, 6, 7], "instal": [0, 6], "follow": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], "instruct": [0, 1, 7], "isn": [0, 2, 3, 4, 6], "enough": [0, 1, 2, 3, 4, 6, 7], "just": [0, 1, 2, 3, 4, 5, 6, 7], "extens": [0, 1, 6, 7, 8], "vscode": 0, "make": [0, 1, 2, 3, 4, 5, 6, 7, 8], "sure": [0, 1, 2, 3, 5, 6], "complet": [0, 1, 2, 3, 4, 6, 8], "step": [0, 1, 2, 3, 4, 5, 6], "so": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], "elan": 0, "have": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], "git": 0, "termin": 0, "navig": 0, "folder": 0, "where": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], "want": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], "put": [0, 1, 2, 3, 4, 5, 6, 7], "copi": [0, 3, 4, 6, 7], "repositori": [0, 1], "type": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], "clone": 0, "github": [0, 1], "com": 0, "leanprov": 0, "mathematics_in_lean": 0, "fetch": 0, "execut": 0, "lake": 0, "ex": [0, 2], "cach": 0, "compil": 0, "open": [0, 1, 2, 3, 4, 5, 8, 9], "choos": [0, 2, 3, 4, 5, 6, 7], "file": [0, 1, 4, 5, 6, 7], "menu": [0, 1], "Be": [0, 1, 3], "other": [0, 1, 2, 3, 4, 5, 6, 7], "each": [0, 1, 2, 3, 4, 5, 6, 7, 8], "section": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], "ha": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], "an": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], "associ": [0, 1, 2, 4, 5, 6, 7, 9], "exercis": [0, 1, 2, 3, 5, 6, 7, 8], "mil": 0, "organ": 0, "chapter": [0, 1, 2, 3, 4, 5, 6, 7, 8], "experi": [0, 1, 7], "do": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], "leav": [0, 1, 2, 3, 5, 6], "origin": [0, 1, 5], "intact": 0, "easier": [0, 1, 3, 4, 6, 7], "updat": 0, "chang": [0, 1, 2, 4, 5, 7, 9], "see": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], "below": [0, 2, 3, 4, 5, 6, 7, 8, 9], "call": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], "my_fil": 0, "whatev": [0, 2, 4], "creat": [0, 1, 6], "your": [0, 1, 2, 3, 5, 6, 7], "own": [0, 1, 4, 5, 6], "At": [0, 1, 2, 4, 5, 6], "point": [0, 1, 2, 3, 5, 6, 7, 8, 9], "textbook": 0, "side": [0, 1, 2, 3, 4, 5, 6, 7, 8], "panel": 0, "ctrl": [0, 1, 2, 4, 5], "shift": [0, 1, 6, 7], "p": [0, 1, 2, 3, 4, 5, 6, 7, 9], "document": [0, 1, 3, 4, 6], "view": [0, 5, 6, 7], "bar": [0, 1, 2], "appear": [0, 1, 2, 5, 6, 7], "press": 0, "select": [0, 7], "soon": [0, 2, 6, 7], "highlight": 0, "window": [0, 1, 2, 5], "click": [0, 1, 3, 4, 5, 6], "current": [0, 1, 2, 6], "altern": [0, 2, 3, 4, 5, 6, 7], "cloud": 0, "gitpod": 0, "how": [0, 1, 2, 3, 4, 5, 6, 7, 9], "still": [0, 1, 2, 3, 4, 5, 6, 7, 9], "work": [0, 1, 2, 3, 4, 5, 6, 7, 8], "describ": [0, 1, 2, 3, 4, 5, 6, 7], "abov": [0, 1, 2, 3, 4, 5, 6, 7, 9], "progress": [0, 1, 5], "pull": [0, 7], "content": [0, 1, 4, 7], "which": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], "why": [0, 2, 4, 6, 7], "suggest": [0, 2, 4, 5, 7], "intend": [0, 1, 2, 5], "while": [0, 1, 2, 6, 7], "contain": [0, 2, 3, 4, 5, 6, 7, 8, 9], "explan": [0, 7], "hint": [0, 1, 2, 9], "text": [0, 3, 5, 7], "often": [0, 1, 2, 3, 4, 5, 6, 7], "includ": [0, 1, 2, 3, 4, 6, 7, 8], "one": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], "eval": 0, "hello": 0, "world": 0, "should": [0, 1, 2, 3, 4, 5, 6, 7, 8], "abl": [0, 1, 2, 3, 4, 5, 6, 8], "correspond": [0, 1, 2, 3, 4, 5, 6, 7, 8], "If": [0, 1, 2, 3, 4, 5, 6, 7], "line": [0, 1, 2, 3, 4, 6], "show": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], "hover": [0, 1, 2, 3, 4, 5], "cursor": [0, 1, 2], "over": [0, 1, 2, 3, 4, 5, 6, 7, 8], "command": [0, 1, 2, 3, 4, 5, 6], "respons": [0, 1], "pop": 0, "encourag": [0, 1, 2, 3, 4, 5], "edit": 0, "try": [0, 1, 2, 3, 4, 5, 6, 7], "moreov": [0, 1, 4, 5, 7], "lot": [0, 3, 5, 6, 7], "challeng": [0, 1, 2, 3, 5, 8], "rush": 0, "past": [0, 1], "through": [0, 1, 3, 4, 5, 6, 7], "central": [0, 4], "all": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], "when": [0, 1, 2, 3, 4, 5, 6, 7, 8], "feel": [0, 1, 2, 6, 7], "comfort": [0, 2], "master": [0, 1, 4], "relev": [0, 1, 2, 4, 5, 6, 7], "skill": [0, 1, 2, 3, 4], "free": [0, 1, 7], "move": [0, 1, 2, 6, 7], "alwai": [0, 1, 2, 3, 5, 6], "compar": [0, 5, 6, 7], "solut": [0, 1, 4, 6], "ones": [0, 1, 2, 3, 5, 9], "simpli": [0, 1, 2, 3, 4, 5, 6, 7], "tool": [0, 1, 2, 5, 6], "build": [0, 2, 4, 6, 7, 11], "complex": [0, 1, 2, 4, 5, 8, 9], "known": [0, 1, 2, 3, 4, 5, 6, 7, 8], "depend": [0, 2, 3, 4, 5, 6, 7], "everi": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], "check": [0, 1, 2, 3, 4, 5, 6, 7], "print": [0, 3, 4, 5, 9], "\u2115": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], "These": [0, 1, 2, 3, 4, 5, 8, 9], "object": [0, 1, 2, 3, 4, 5, 11], "2": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], "def": [0, 2, 3, 4, 5, 6, 7], "f": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], "x": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], "3": [0, 1, 2, 3, 4, 5, 6, 7], "prop": [0, 2, 3, 4, 5, 6, 7, 9], "statement": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], "fermatlasttheorem": 0, "y": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], "z": [0, 1, 2, 5, 6, 7, 8, 9], "n": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], "0": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], "itself": [0, 2, 3, 5, 6, 7, 8], "Such": [0, 1, 2, 6], "proposit": [0, 2, 3, 4, 5], "easi": [0, 4, 5, 6, 7], "rfl": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], "hard": [0, 1, 3, 5, 6], "sorri": [0, 1, 2, 3, 4, 5, 6, 7, 8], "manag": [0, 1, 4, 5, 7], "construct": [0, 2, 3, 4, 5, 6, 7], "accept": [0, 1, 2, 7], "term": [0, 1, 2, 3, 4, 5, 7], "done": [0, 2, 3, 4, 6, 7], "someth": [0, 1, 2, 4, 6, 7], "veri": [0, 2, 4, 6, 7, 9], "impress": 0, "cheat": [0, 1], "now": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], "game": [0, 6], "left": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], "rule": [0, 2, 4, 5, 6, 7], "complementari": 0, "companion": [0, 1], "prove": [0, 2, 3, 4, 5, 6, 7, 8, 9, 11], "thorough": 0, "underli": [0, 1, 5, 6], "logic": [0, 1, 3, 4, 5, 11], "framework": 0, "core": [0, 4, 5], "syntax": [0, 1, 4, 6], "peopl": [0, 1], "who": [0, 7], "prefer": [0, 1, 3], "user": [0, 2, 6], "manual": [0, 3, 4], "befor": [0, 1, 2, 3, 4, 5, 6], "new": [0, 1, 2, 3, 4, 5, 6, 7], "dishwash": 0, "person": 0, "hit": [0, 1], "button": 0, "figur": [0, 1, 2, 5], "out": [0, 1, 2, 3, 4, 5, 6, 7], "activ": 0, "potscrubb": 0, "featur": [0, 2, 4], "later": [0, 1, 2, 4, 5, 6, 7], "sens": [0, 2, 3, 4, 5, 6, 7, 8], "here": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], "refer": [0, 1, 2, 4, 5, 6, 7, 8], "back": [0, 1, 2, 3, 5, 6, 7], "necessari": [0, 2, 4, 5], "anoth": [0, 1, 2, 3, 4, 5, 6, 7], "thing": [0, 1, 2, 3, 4, 5, 6, 7], "distinguish": [0, 5, 6, 7, 8], "place": [0, 1, 2, 5, 7], "greater": [0, 1, 2, 3, 4, 7], "emphasi": [0, 6], "tactic": [0, 1, 2, 3, 4, 5, 6, 7, 8], "given": [0, 1, 2, 3, 4, 5, 6, 7], "two": [0, 1, 2, 3, 4, 5, 6, 7, 9], "wai": [0, 1, 2, 3, 4, 5, 6, 7, 9], "down": [0, 3, 4, 6, 7], "themselv": [0, 4, 5], "suitabl": [0, 1, 2, 5, 7], "descript": [0, 1, 2, 4, 7], "thereof": 0, "For": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], "repres": [0, 1, 2, 3, 4, 5, 6, 8], "fact": [0, 2, 3, 4, 5, 6, 7, 8, 9, 11], "even": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], "m": [0, 1, 2, 4, 6, 7, 8], "nat": [0, 1, 2, 3, 4, 5, 7], "fun": [0, 2, 3, 4, 5, 6, 7, 8, 9], "k": [0, 2, 4, 5, 7, 8], "hk": [0, 8], "hmn": 0, "rw": [0, 2, 3, 4, 5, 6, 7, 11], "mul_add": [0, 1, 4, 6], "l": [0, 1, 8, 9], "_": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], "compress": [0, 1, 7], "singl": [0, 1, 2, 3, 4, 5, 6, 8], "instead": [0, 1, 2, 3, 4, 5, 6, 7], "style": [0, 1], "same": [0, 1, 2, 3, 4, 5, 6, 7], "comment": [0, 4], "henc": [0, 2, 3, 4, 5, 6, 7, 8], "ignor": [0, 7], "sai": [0, 1, 2, 3, 4, 5, 6, 7, 9], "natur": [0, 1, 2, 3, 4, 5, 6, 7, 8], "rintro": [0, 2, 3, 4, 5, 7], "need": [0, 1, 2, 3, 4, 5, 6, 7], "twice": [0, 1, 7], "let": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], "substitut": [0, 2], "obviou": [0, 4, 5, 6], "ring": [0, 1, 2, 3, 4, 5, 6], "As": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], "enter": [0, 1, 2, 3, 7], "displai": [0, 1, 2, 6], "state": [0, 1, 2, 3, 4, 6, 7, 8], "separ": [0, 1, 2, 4, 5], "tell": [0, 2, 3, 4, 5, 6], "what": [0, 1, 2, 3, 4, 5, 6, 7], "establish": [0, 1, 2, 3, 4, 5], "task": [0, 2, 4, 5, 6, 7], "remain": [0, 1, 2, 3, 5, 6, 7], "replai": 0, "sinc": [0, 1, 2, 3, 4, 5, 6, 7], "continu": [0, 1, 4, 5, 6, 9], "first": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], "introduc": [0, 1, 2, 3, 4, 7, 9], "could": [0, 1, 2, 4, 5, 6, 7], "renam": 0, "decompos": [0, 3, 5], "hypothesi": [0, 1, 2, 3, 4], "assumpt": [0, 1, 2, 3, 4, 5, 7, 8, 9], "second": [0, 1, 2, 3, 4, 5, 6, 7, 9], "declar": [0, 1, 4, 5, 6], "next": [0, 1, 2, 3, 4, 5, 6, 7, 8], "rewrit": [0, 1, 2, 3, 4, 5, 6, 7], "replac": [0, 1, 2, 3, 4, 6], "solv": [0, 1, 2, 3, 4, 5, 6, 7], "result": [0, 1, 2, 3, 4, 5, 6, 7], "abil": 0, "small": [0, 4, 5, 7], "increment": [0, 1], "extrem": [0, 6, 7], "power": [0, 1, 2, 3, 4, 5, 6], "reason": [0, 1, 2, 4, 5, 6, 7], "quicker": 0, "than": [0, 1, 2, 3, 4, 5, 6, 7, 8], "There": [0, 1, 2, 3, 4, 6, 7, 8, 9], "sharp": 0, "distinct": [0, 2, 3, 4, 5, 7], "between": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], "insert": [0, 2, 4, 5, 7, 8], "did": [0, 2, 6, 7], "phrase": [0, 1, 2, 4, 5], "mul_left_comm": [0, 4], "convers": [0, 2, 4, 7], "short": [0, 1, 2, 3, 4, 5], "middl": [0, 1, 2, 7], "That": [0, 4, 5, 6], "said": [0, 2, 4, 5], "reduc": [0, 2, 3, 4, 5], "liner": 0, "carri": [0, 1, 2, 3, 4, 5, 6, 7, 9], "But": [0, 1, 2, 3, 4, 5, 6, 7], "substanti": 0, "autom": [0, 1, 5], "justifi": [0, 1, 2, 7], "longer": [0, 4, 5], "calcul": [0, 2, 4, 5, 11], "bigger": [0, 3, 8], "inferenti": 0, "invok": [0, 1, 7], "simplifi": [0, 2, 3, 4, 5, 7, 9], "specif": [0, 1, 3, 4, 5, 6], "pariti": [0, 4], "automat": [0, 1, 2, 3, 4, 5, 6, 7, 8], "intro": [0, 1, 2, 3, 4, 5, 6, 7], "simp": [0, 2, 3, 4, 5, 6, 7, 8], "parity_simp": 0, "big": [0, 5, 7, 8], "differ": [0, 1, 2, 3, 4, 5, 6, 7, 8], "onli": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], "its": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], "built": [0, 2, 6], "wherea": [0, 1, 3, 5, 7], "top": [0, 6, 7, 8], "meant": [0, 2, 6], "rather": [0, 1, 2, 4, 5, 6, 7], "think": [0, 1, 2, 3, 4, 5, 6, 7, 8], "basic": [0, 2, 4, 5, 7, 9, 11], "entri": [0, 5], "brows": [0, 1, 4], "frustrat": [0, 6], "curv": 0, "steep": 0, "newcom": 0, "avail": [0, 1, 4, 5, 6], "round": [0, 1, 5], "clock": 0, "doubt": 0, "too": [0, 1, 3, 5, 6, 7], "contribut": [0, 3], "develop": [0, 1, 4, 9], "mission": 0, "dive": 0, "come": [0, 1, 2, 3, 4, 5, 6, 7], "forewarn": 0, "fundament": [0, 4, 5, 6, 9], "life": [0, 2], "mai": [0, 1, 2, 3, 5, 6, 7, 8], "never": [0, 6], "acknowledg": 0, "grate": [0, 5], "gabriel": 0, "ebner": 0, "set": [0, 1, 2, 4, 5, 6, 8, 9, 11], "infrastructur": 0, "scott": 0, "morrison": 0, "mario": 0, "carneiro": 0, "help": [0, 1, 2, 3, 4, 5, 6, 7], "port": 0, "julian": 0, "berman": 0, "alex": 0, "best": 0, "bulwi": 0, "cha": 0, "bryan": 0, "gin": 0, "ge": [0, 2, 5], "chen": 0, "johan": 0, "commelin": 0, "mathieu": 0, "guai": 0, "paquet": 0, "k\u00fclshammer": 0, "giovanni": 0, "mascellani": 0, "hunter": 0, "monro": 0, "pietro": 0, "monticon": 0, "oliv": 0, "nash": 0, "bartosz": 0, "piotrowski": 0, "guilherm": 0, "silva": 0, "been": [0, 1, 2, 4, 5, 6, 8], "partial": [0, 1, 2, 3, 5, 6], "hoskinson": 0, "center": [0, 7], "nut": 1, "bolt": 1, "gener": [1, 2, 3, 4, 5, 6, 7, 8, 9], "without": [1, 2, 4, 5, 6, 7, 8], "net": 1, "hand": [1, 2, 3, 4, 5, 6, 7], "equal": [1, 2, 3, 4, 5, 6, 7, 9], "right": [1, 2, 3, 4, 5, 6, 7, 8], "tantamount": [1, 3], "name": [1, 2, 3, 4, 5, 6, 7, 8], "b": [1, 2, 3, 4, 5, 6, 7, 8, 9], "c": [1, 2, 4, 5, 6, 7, 8, 9], "real": [1, 2, 3, 4, 5, 6, 7, 8, 9], "mul_assoc": [1, 2, 4, 5, 6], "mul_comm": [1, 2, 4, 5, 6], "elimin": 1, "explicitli": [1, 2, 3, 5, 6, 7, 8], "purpos": [1, 2, 3, 4, 5, 6, 7], "illustr": [1, 2, 3, 4, 5], "multipl": [1, 2, 3, 4, 5, 6, 8], "written": [1, 2, 3, 4, 5, 6, 7, 8], "howev": [1, 2, 5, 6, 7, 8], "good": [1, 2, 3, 4, 5, 6, 7], "mind": [1, 2, 5, 6], "notat": [1, 2, 3, 4, 5, 6, 7, 8, 9], "convent": [1, 5, 9], "parenthes": [1, 2, 3, 4], "import": [1, 2, 3, 4, 5, 6, 7, 9], "data": [1, 2, 4, 5, 6, 7], "\u211d": [1, 2, 3, 5, 6, 7, 8, 9], "begin": [1, 2, 3, 4, 5, 6], "sake": [1, 4], "breviti": [1, 5], "suppress": 1, "repeat": [1, 4, 5, 6], "happen": [1, 6, 7], "charact": [1, 3, 6], "r": [1, 2, 4, 5, 6, 7], "symbol": [1, 2, 5, 6], "doesn": [1, 2, 7], "until": [1, 2, 4, 5, 6, 7], "space": [1, 2, 3, 5, 6, 9, 11], "tab": [1, 3, 4], "kei": [1, 4, 5, 7], "curiou": [1, 6], "abbrevi": [1, 2, 3, 5], "get": [1, 2, 3, 4, 6, 7, 8, 11], "access": [1, 3, 5, 6, 7, 9], "keyboard": 1, "easili": [1, 4, 5, 6], "backslash": [1, 3], "lead": [1, 2, 4, 5, 6, 7], "lean4": 1, "input": [1, 3, 7], "leader": 1, "report": 1, "infoview": 1, "A": [1, 2, 3, 4, 5, 6, 7, 8], "typic": 1, "might": [1, 2, 3, 4, 5], "look": [1, 2, 3, 4, 6, 7], "1": [1, 2, 3, 4, 5, 6, 7, 8, 9], "h\u2081": [1, 2, 3, 4], "prime": [1, 2, 3, 5, 6, 11], "h\u2082": [1, 3, 4], "h\u2083": [1, 3], "denot": [1, 3, 4, 6, 7], "context": [1, 2, 4, 5, 6, 7, 8, 9], "plai": [1, 3, 4, 6, 7], "three": [1, 2, 4, 5, 7], "label": [1, 2], "everyth": [1, 2, 6, 7], "identifi": [1, 2, 4], "subscript": 1, "h": [1, 2, 3, 4, 5, 6, 7, 8, 9], "legal": 1, "would": [1, 2, 3, 4, 5, 6, 7, 8], "h1": [1, 3, 4, 5], "h2": [1, 3, 5], "h3": 1, "foo": [1, 3, 5], "baz": 1, "last": [1, 2, 3, 4, 5, 6, 7], "sometim": [1, 2, 3, 4, 5, 6, 7], "target": [1, 6, 7, 9], "combin": [1, 2, 5, 6, 7], "practic": [1, 2, 3, 6, 7], "mean": [1, 2, 3, 4, 5, 6, 7, 8, 9], "usual": [1, 2, 3, 4, 5, 7, 9], "clear": [1, 2, 4, 5, 6], "case": [1, 2, 3, 4, 5, 6, 7, 9], "With": [1, 3, 4, 6, 7], "arrow": [1, 2, 6, 7], "revers": [1, 2, 3, 5, 7], "note": [1, 2, 4, 5, 6, 7, 9], "noth": [1, 2, 3, 4, 5, 6], "argument": [1, 2, 3, 4, 5, 6, 7], "tri": [1, 2, 4, 6], "match": [1, 2, 5], "pattern": [1, 2, 3, 5, 6], "local": [1, 2, 6, 7, 8], "d": [1, 2, 4, 5, 8], "e": [1, 2, 3, 4, 5, 6, 7, 8, 9], "sub_self": [1, 2], "hyp": 1, "list": [1, 2, 3, 4, 5], "comma": 1, "squar": [1, 2, 4, 5, 6], "bracket": [1, 2, 5, 6], "after": [1, 2, 4, 6, 7, 8], "trick": [1, 2, 4, 6, 8], "variabl": [1, 2, 3, 4, 5, 6, 7, 8, 9], "onc": [1, 2, 3, 4, 5, 6, 7, 9], "outsid": [1, 4], "inspect": 1, "reveal": 1, "inde": [1, 5, 6, 7, 8], "delimit": 1, "scope": [1, 2, 3, 5], "end": [1, 2, 3, 4, 5, 6, 7, 8], "block": [1, 4], "final": [1, 2, 3, 5, 7, 9], "recal": [1, 2, 4, 5, 7, 9], "introduct": [1, 2, 7, 11], "determin": [1, 5, 7], "both": [1, 2, 3, 4, 5, 6, 7, 8], "expect": [1, 2, 3, 4, 5, 6, 7], "rais": [1, 4], "error": [1, 2, 3, 6], "explain": [1, 2, 3, 4, 5, 6, 7, 9], "output": 1, "meanwhil": [1, 4], "take": [1, 2, 3, 4, 5, 6, 7, 8, 9], "two_mul": 1, "add_mul": [1, 6], "distribut": [1, 4, 5, 6], "addit": [1, 2, 4, 5, 6, 7, 8, 9], "add_assoc": [1, 4, 5, 6], "precis": [1, 3, 7, 8], "possibl": [1, 2, 3, 4, 5, 7], "calc": [1, 2, 3, 5, 7], "keyword": [1, 2, 4, 5], "notic": [1, 2, 3, 4, 5, 7], "finicki": 1, "underscor": [1, 2, 3], "justif": [1, 2], "format": 1, "indic": [1, 2, 3, 5, 6], "indent": 1, "One": [1, 2, 3, 4, 5, 6, 7], "outlin": [1, 2, 4, 7], "modulo": [1, 4, 5], "individu": 1, "pure": [1, 7], "littl": [1, 2, 7, 8], "underneath": [1, 3], "pow_two": [1, 4], "mul_sub": 1, "add_sub": 1, "sub_sub": 1, "add_zero": [1, 5, 6], "perform": [1, 2, 3], "exact": [1, 2, 3, 4, 5, 7], "becaus": [1, 2, 3, 4, 5, 6, 7, 8], "exactli": [1, 2, 3, 5, 6, 7], "close": [1, 2, 3, 6, 8, 9], "bit": [1, 2, 4, 6, 7], "commut": [1, 2, 3, 4, 5, 6, 8], "long": [1, 2, 3, 5, 6, 8], "axiom": [1, 2, 3, 5, 6, 7, 9], "indirectli": 1, "similar": [1, 2, 3, 5, 6, 7], "common": [1, 2, 3, 4, 5, 7], "variat": [1, 3, 4, 5, 7, 8], "nth_rewrit": 1, "allow": [1, 2, 3, 4, 5, 6, 7, 8, 9], "particular": [1, 2, 5, 6, 7], "instanc": [1, 2, 3, 4, 5, 6, 7, 8], "enumer": [1, 2], "start": [1, 2, 3, 4, 6, 7, 8, 9, 11], "occurr": 1, "nth_rw": 1, "consist": [1, 3, 5, 6, 7, 8], "collect": [1, 2, 3, 5, 7, 9], "oper": [1, 2, 3, 4, 5, 6, 7, 8], "time": [1, 4, 5, 6, 7, 8, 9], "constant": [1, 2, 9], "mapsto": [1, 5], "abelian": [1, 5, 6], "negat": [1, 5, 11], "invers": [1, 3, 5, 6, 8, 9], "add_comm": [1, 4, 5, 6], "zero_add": [1, 4, 5, 6], "add_left_neg": [1, 5], "mul_on": [1, 5, 6], "one_mul": [1, 2, 5, 6], "being": [1, 3, 5, 7, 8], "suffic": [1, 2, 3, 7], "give": [1, 2, 3, 4, 6, 7, 9], "element": [1, 2, 3, 4, 5, 6, 7, 8, 9], "concret": [1, 2, 4, 5, 6, 7], "integ": [1, 2, 4, 6, 11], "abstract": [1, 2, 5, 6, 7], "character": [1, 3, 4, 7, 8], "axiomat": [1, 2, 3, 5], "train": [1, 6], "recogn": [1, 2, 4, 5, 6, 7], "appropri": [1, 2, 3, 5, 6], "\u2124": [1, 4, 5, 6], "ration": [1, 2, 4, 7], "\u211a": [1, 4, 7], "\u2102": [1, 5, 8], "extend": [1, 3, 4, 5, 6, 7, 9], "order": [1, 2, 3, 4, 5, 6, 7, 8], "Not": [1, 5, 7], "properti": [1, 2, 3, 4, 5, 6, 7, 8, 9], "hold": [1, 2, 3, 4, 5, 7, 9], "arbitrari": [1, 2, 3, 4, 5], "taken": [1, 2], "cours": [1, 2, 4, 6, 7, 8, 9], "linear": [1, 2, 5, 7], "matric": [1, 5], "fail": [1, 2, 3, 4, 5, 6, 7, 9], "commr": [1, 2, 5], "unchang": [1, 2], "linarith": [1, 2, 4, 5], "permiss": 1, "strike": [1, 2], "balanc": 1, "concis": [1, 5], "readabl": [1, 2, 3, 4, 7], "strengthen": [1, 2, 4], "deriv": [1, 2, 4, 8, 9], "most": [1, 2, 3, 4, 5, 6, 7, 9], "organiz": 1, "mechan": [1, 2, 5], "namespac": [1, 2, 3, 4, 5, 7], "full": [1, 3, 4, 5, 6, 7], "shorter": [1, 3, 4, 7], "avoid": [1, 3, 4, 5, 6, 8], "due": [1, 3, 6], "clash": 1, "myre": 1, "add_right_neg": 1, "effect": [1, 3, 6, 7], "temporarili": [1, 2], "reprov": 1, "care": [1, 2, 3, 5], "earlier": 1, "pai": [1, 2, 6, 7], "attent": [1, 2, 4, 6, 7], "curli": [1, 2], "implicit": [1, 2, 5, 6, 7, 8], "moment": [1, 2, 5], "worri": [1, 3, 4, 5], "neg_add_cancel_left": 1, "add_neg_cancel_right": 1, "add_left_cancel": 1, "add_right_cancel": 1, "plan": [1, 6, 7], "brace": 1, "imagin": 1, "situat": [1, 3, 6, 7], "draw": [1, 5, 6], "conclus": [1, 2, 4], "hypothes": [1, 2, 3, 4, 5], "redund": [1, 5, 7, 9], "few": [1, 2, 3, 4, 7], "extra": [1, 2, 3, 5, 6, 7], "oner": 1, "complic": [1, 2, 6], "tediou": [1, 2, 6], "mark": [1, 2, 6, 7], "suppos": [1, 2, 3, 4, 5, 7], "infer": [1, 2, 3, 5, 6], "mul_zero": [1, 5, 6], "serv": [1, 3, 4, 5, 9], "therefor": [1, 4, 5, 7], "promot": 1, "modular": 1, "subproof": 1, "wa": [1, 3], "except": [1, 5], "ad": [1, 2, 3, 4, 5, 6, 7], "variant": [1, 2, 7], "whose": [1, 2, 4, 5, 6, 7, 8], "necessarili": [1, 9], "miss": [1, 3, 4], "piec": [1, 4, 5, 6, 7], "either": [1, 2, 3, 5, 6, 7], "becom": [1, 4, 5, 6, 7], "technic": [1, 5, 6], "strictli": [1, 2, 8], "less": [1, 2, 3, 4, 5, 6, 7], "script": 1, "slightli": [1, 6, 7, 8], "clearer": [1, 3, 5], "human": 1, "reader": [1, 7], "maintain": 1, "evolv": 1, "rememb": [1, 2, 3, 4, 5, 6, 7], "zero_mul": [1, 4, 5, 6], "By": [1, 3, 5, 6], "neg_eq_of_add_eq_zero": 1, "eq_neg_of_add_eq_zero": 1, "neg_zero": 1, "neg_neg": 1, "had": [1, 6], "annot": [1, 3, 4, 5, 6], "third": [1, 2, 3, 5, 7], "specifi": [1, 2, 3, 4, 5, 7, 8, 9], "imposs": 1, "default": [1, 2, 3, 4, 5, 6, 8], "subtract": [1, 4, 5], "provabl": [1, 3, 6, 7], "sub_eq_add_neg": 1, "On": [1, 2, 3, 5, 6, 7, 9], "defin": [1, 2, 3, 4, 6, 7, 8, 9, 11], "reflex": [1, 2], "present": [1, 2, 4, 7], "forc": [1, 2, 3], "unfold": [1, 2, 3, 4, 5, 7], "deal": [1, 2, 3, 4, 5, 7], "equat": [1, 2, 3, 4, 5], "interchang": 1, "self_sub": 1, "effort": [1, 4], "one_add_one_eq_two": 1, "norm_num": [1, 2, 4, 5], "strength": 1, "weaker": [1, 2], "notion": [1, 2, 3, 4, 5, 7, 8, 9], "addgroup": [1, 5], "otherwis": [1, 2, 3, 4, 5], "addcommgroup": 1, "commgroup": 1, "g": [1, 2, 3, 5, 6, 7, 8, 9], "mul_left_inv": [1, 5], "\u00b9": [1, 3, 5, 6, 7], "cocki": 1, "helper": 1, "along": [1, 4, 7], "mul_right_inv": [1, 5], "mul_inv_rev": 1, "non": [1, 3, 6, 7, 8, 9], "abel": 1, "noncomm_r": 1, "seem": [1, 2, 4, 6, 7, 8], "odd": [1, 2, 3, 4], "partli": [1, 6], "histor": 1, "conveni": [1, 2, 3, 5, 6, 7], "great": [1, 5], "sort": [1, 3, 4], "inequ": [1, 2, 6, 7], "le": [1, 5, 6], "whenev": [1, 2, 4, 5], "consid": [1, 2, 3, 4, 5, 6, 7, 8, 9], "le_refl": [1, 2], "le_tran": [1, 2], "detail": [1, 2, 3, 4, 5, 6], "unless": [1, 2, 5], "realli": [1, 2, 3, 4, 6, 7], "insist": [1, 6], "discuss": [1, 2, 4, 5, 6, 7, 8], "implic": [1, 7, 11], "h\u2080": [1, 2, 3, 4, 7], "dot": [1, 7], "option": [1, 2, 4, 5, 6, 7], "within": [1, 2, 7], "visibl": 1, "must": [1, 5, 6, 7], "decreas": [1, 5], "fourth": [1, 2], "mode": [1, 2, 5], "entir": [1, 3, 5, 7, 8], "lt_of_le_of_lt": [1, 2], "lt_of_lt_of_l": 1, "lt_tran": [1, 2], "togeth": [1, 2, 3, 4, 5, 7], "handl": [1, 3, 4, 6], "arithmet": 1, "5": [1, 2, 5, 7, 8], "pass": [1, 5], "exp_le_exp": 1, "mpr": [1, 2, 5, 7], "exp": [1, 3], "applic": [1, 2, 4, 5, 9], "function": [1, 2, 4, 5, 6, 8, 9, 11], "compound": [1, 2, 7], "pars": [1, 3], "exp_lt_exp": 1, "log_le_log": 1, "log": [1, 3, 9], "log_lt_log": 1, "add_le_add": [1, 2], "add_le_add_left": 1, "add_le_add_right": 1, "add_lt_add_of_le_of_lt": 1, "add_lt_add_of_lt_of_l": 1, "add_lt_add_left": 1, "add_lt_add_right": 1, "add_nonneg": [1, 5], "add_po": 1, "add_pos_of_pos_of_nonneg": 1, "exp_po": [1, 3], "bi": [1, 5, 11], "lr": 1, "iff": [1, 3, 7, 8, 9], "connect": [1, 3, 5, 7], "equival": [1, 2, 3, 4, 5, 7, 8, 9], "mp": [1, 2, 3, 4, 7], "forward": [1, 2, 5, 7], "direct": [1, 2, 3, 6, 7, 8], "stand": [1, 2, 5, 7, 8], "modu": 1, "ponen": 1, "respect": [1, 2, 3, 4, 5, 7], "thu": [1, 3, 4, 5, 7], "again": [1, 2, 3, 4, 5, 6, 7], "numer": [1, 4, 5], "constitut": 1, "part": [1, 2, 3, 4, 5, 6, 7, 9], "strategi": [1, 2, 4], "api": 1, "reli": [1, 2, 3, 5, 7], "guess": [1, 2, 3, 4, 5], "cmd": [1, 2], "mac": [1, 2], "a_of_b_of_c": 1, "approxim": 1, "loud": 1, "probabl": [1, 5, 6, 7], "add_l": 1, "choic": [1, 2, 3, 5, 7], "exist": [1, 2, 3, 6, 7], "jump": [1, 4, 5, 7], "nearbi": [1, 4], "sq_nonneg": 1, "delet": [1, 2, 3, 4], "uncom": 1, "previou": [1, 2, 3, 5, 6, 7, 8, 9], "confirm": [1, 2, 3, 4], "finish": [1, 2, 3, 4], "job": 1, "pow_two_nonneg": [1, 2], "tend": [1, 7], "around": [1, 3, 6, 7, 9], "binari": [1, 2, 4, 5, 6], "increas": 1, "worth": [1, 2, 5], "definition": [1, 4, 5, 6, 7], "principl": [1, 2, 3, 4, 6, 8], "favor": [1, 2, 5], "timesav": 1, "clever": 1, "involv": [1, 2, 4, 5, 6, 7], "nice": [1, 2, 4, 6, 7], "idea": [1, 2, 3, 5, 6, 7], "abs_l": [1, 5], "congratul": [1, 2, 4], "min": [1, 2, 7, 9], "uniqu": [1, 2, 3, 4, 5, 7], "min_le_left": 1, "min_le_right": 1, "le_min": 1, "max": [1, 2, 6, 7, 9], "pair": [1, 2, 4, 5, 7], "act": 1, "curri": 1, "logician": 1, "haskel": 1, "bind": [1, 3], "tighter": [1, 3], "infix": [1, 6], "le_antisymm": [1, 2], "usag": 1, "inconsist": 1, "outer": 1, "level": [1, 2, 6], "nest": [1, 2], "bother": [1, 3], "repetit": [1, 6], "foreshadow": 1, "univers": [1, 3, 5, 7, 11], "quantifi": [1, 3, 4, 5, 7, 11], "desir": [1, 3, 6, 7], "implicitli": [1, 2], "mani": [1, 2, 3, 5, 6, 7, 8, 9, 11], "whether": [1, 2, 3, 4, 6, 7], "Of": [1, 2, 4, 6, 7, 8, 9], "interest": [1, 2, 3, 5, 6, 7], "vice": [1, 3], "versa": [1, 3], "word": [1, 2, 3, 4, 5, 7], "switch": [1, 6], "transit": [1, 2, 5, 7], "total": 1, "satisfi": [1, 3, 4, 5, 6, 7, 8], "disjunct": [1, 3, 11], "stick": [1, 2, 7, 8], "split": [1, 2, 3, 4], "aux": [1, 2, 4, 7], "valu": [1, 2, 3, 4, 5, 6, 7, 8, 9], "yield": [1, 2, 3, 4, 5, 7], "made": [1, 2, 3, 5, 7], "manifest": [1, 7], "triangl": [1, 2, 5], "abs_add": [1, 2], "sub_add_cancel": [1, 5], "relat": [1, 2, 3, 5, 6, 7, 8, 9], "divis": [1, 2, 4, 5, 6], "ordinari": [1, 2, 4, 5, 7], "unicod": [1, 3, 6], "obtain": [1, 2, 4, 5, 7, 8], "dvd": 1, "dvd_tran": 1, "dvd_mul_of_dvd_left": 1, "dvd_mul_left": 1, "expon": 1, "expand": [1, 2, 3, 4, 5], "w": [1, 6], "greatest": [1, 5, 7], "divisor": [1, 2, 4, 5], "gcd": [1, 2, 4], "least": [1, 5, 6, 7], "lcm": 1, "analog": [1, 2, 3, 4, 5, 7, 8], "divid": [1, 2, 4, 5], "gcd_zero_right": 1, "gcd_zero_left": 1, "lcm_zero_right": 1, "lcm_zero_left": 1, "dvd_antisymm": 1, "complain": 1, "ambigu": [1, 5], "_root_": [1, 4], "saw": [1, 5, 6, 7], "govern": [1, 5], "class": [1, 4, 5, 6, 7, 8, 9], "\u03b1": [1, 2, 3, 4, 5, 6, 7, 8, 9], "partialord": [1, 2], "adopt": 1, "letter": [1, 5, 8], "\u03b2": [1, 2, 3, 5, 6, 7, 9], "\u03b3": [1, 2, 5, 7], "greek": [1, 4], "especi": [1, 5, 6, 7], "strict": [1, 2], "somewhat": [1, 3, 7], "lt_irrefl": [1, 2], "lt_iff_le_and_n": 1, "lattic": [1, 5, 6, 7], "inf_le_left": [1, 7], "inf_le_right": 1, "le_inf": 1, "le_sup_left": 1, "le_sup_right": 1, "sup_l": 1, "lower": [1, 2, 4], "bound": [1, 2, 3, 4, 5, 7, 8, 9], "upper": [1, 2], "glb": 1, "lub": 1, "infimum": [1, 6, 7, 9], "supremum": [1, 4, 6], "inf": [1, 6, 7], "sup": [1, 4, 7], "further": [1, 7], "matter": [1, 2], "meet": [1, 2, 3, 5], "keep": [1, 5, 6], "dictionari": 1, "subset": [1, 2, 3, 5, 7, 8], "domain": [1, 2, 3, 4, 5, 7], "boolean": 1, "truth": [1, 4], "fals": [1, 2, 3, 4, 6], "true": [1, 2, 3, 6, 7], "posit": [1, 3, 4, 5, 7, 9], "subspac": [1, 6], "vector": [1, 3, 6, 8], "intersect": [1, 3, 5, 6, 7, 9], "sum": [1, 2, 4, 5, 6, 7], "inclus": [1, 3, 7], "topolog": [1, 5, 6, 8, 11], "union": [1, 3, 4, 5, 6, 8, 9], "inf_comm": 1, "inf_assoc": 1, "sup_comm": 1, "sup_assoc": 1, "absorpt": 1, "law": 1, "absorb1": 1, "absorb2": 1, "found": [1, 5, 8], "inf_sup_self": 1, "sup_inf_self": 1, "distriblattic": 1, "inf_sup_left": 1, "inf_sup_right": 1, "sup_inf_left": 1, "sup_inf_right": 1, "shown": [1, 5, 8, 9], "explicit": [1, 2, 5, 6, 7], "nondistribut": 1, "finit": [1, 3, 4, 5, 7, 8, 9], "impli": [1, 2, 3, 4, 5, 7], "larger": [1, 7], "carrier": [1, 5, 6], "compat": [1, 7], "strictorderedr": 1, "mul_po": [1, 4], "mul_nonneg": 1, "coupl": [1, 2, 6, 7], "metric": [1, 5, 8, 11], "equip": [1, 3, 5, 6, 7, 8, 9], "distanc": [1, 2, 7, 8], "dist": [1, 7], "map": [1, 2, 3, 5, 6, 7], "metricspac": [1, 7, 8], "dist_self": 1, "dist_comm": [1, 7], "dist_triangl": [1, 7], "nonneg": [1, 5], "nonneg_of_mul_nonneg_left": 1, "dist_nonneg": [1, 7], "dealt": 2, "simpl": [2, 4, 5, 6, 8], "absolut": 2, "\u03b5": [2, 7, 8], "though": [2, 3, 4, 5], "treat": [2, 3, 5, 6, 7, 8], "appli": [2, 3, 4, 5, 6, 7, 8, 9, 11], "my_lemma": 2, "\u03b4": [2, 7], "hb": [2, 7], "subsequ": [2, 4, 7], "lemma": [2, 4, 5, 6, 7, 8, 9, 11], "mention": [2, 3, 5, 6, 7], "my_lemma2": 2, "stage": [2, 5, 6], "my_lemma3": 2, "epo": 2, "ele1": 2, "xlt": 2, "ylt": 2, "essenti": [2, 3, 5, 7], "colon": 2, "off": [2, 3, 4], "my_lemma4": 2, "abs_mul": 2, "mul_le_mul": 2, "abs_nonneg": 2, "mul_lt_mul_right": 2, "extract": [2, 7], "hidden": 2, "expos": [2, 7], "predic": [2, 3, 4, 6, 7, 8], "fnub": 2, "fnlb": 2, "lambda": [2, 5], "hfa": 2, "hgb": 2, "dsimp": [2, 3, 4, 5], "simplif": [2, 3, 4], "contract": 2, "anyhow": 2, "control": 2, "transform": [2, 3], "rest": [2, 3, 5, 7], "routin": 2, "nnf": 2, "nng": 2, "hfb": 2, "nna": 2, "codomain": [2, 4, 7], "structur": [2, 4, 6, 7, 8, 9, 11], "monoid": [2, 3, 4, 6], "fnub_add": 2, "orderedcanceladdcommmonoid": 2, "high": 2, "monoton": [2, 6, 7], "nondecreas": [2, 4], "placehold": 2, "Or": [2, 3], "backward": [2, 7], "subgoal": 2, "mf": 2, "mg": 2, "aleb": 2, "flag": [2, 3], "squiggli": 2, "marker": 2, "nnc": 2, "bbb": [2, 5], "fneven": 2, "fnodd": 2, "ef": 2, "eg": 2, "og": 2, "shorten": 2, "rid": 2, "won": [2, 4, 6, 7], "cannot": [2, 3, 4, 5, 6, 7], "contrari": 2, "syntact": 2, "reduct": [2, 3], "erw": 2, "harder": 2, "spot": 2, "manipul": [2, 5, 7], "foundat": [2, 3, 4, 5], "mundan": 2, "assert": [2, 3, 6], "contrast": [2, 3, 5, 6, 7], "zermelo": 2, "fraenkel": 2, "sin": [2, 8], "co": 2, "zf": 2, "defect": [2, 6, 7], "theoret": [2, 3, 7], "motiv": 2, "detect": 2, "meaningless": 2, "independ": [2, 3, 5], "continuum": 2, "meta": [2, 6], "beyond": [2, 6, 8], "ask": [2, 4, 5, 6, 7], "xs": [2, 3], "refl": [2, 3, 5, 6], "tran": [2, 4, 5, 6], "setub": 2, "inject": [2, 3, 4, 6, 7], "x_1": [2, 3], "x_2": [2, 3], "x\u2081": [2, 3, 5, 7], "x\u2082": [2, 3, 5], "add": [2, 4, 5, 6, 7, 8], "nonzero": [2, 4, 5, 9], "sourc": [2, 7], "inspir": 2, "add_left_inj": 2, "composit": [2, 3, 5, 6, 7], "injg": 2, "injf": [2, 3], "canon": [2, 3, 4, 5], "exhibit": [2, 7], "anonym": [2, 3, 4, 5], "constructor": [2, 3, 4, 5, 6], "angl": 2, "certain": [2, 6, 7], "fnhasub": 2, "fnhaslb": 2, "ubf": 2, "ubg": 2, "ubfa": 2, "ubgb": 2, "unpack": [2, 3], "claus": [2, 6], "els": [2, 3, 4], "turn": [2, 3, 4, 5, 6, 7, 8], "fn_ub_add": 2, "directli": [2, 4, 5, 6, 7], "lbf": 2, "lbg": 2, "cousin": 2, "rcase": [2, 3, 4, 5, 7], "flexibl": [2, 7], "recurs": [2, 3, 5, 11], "harm": [2, 3], "swiss": 2, "armi": 2, "knive": 2, "wide": 2, "old": [2, 5, 6], "chestnut": 2, "product": [2, 4, 5, 6, 7, 9], "magic": [2, 5, 6], "verifi": 2, "sumofsquar": 2, "sumofsquares_mul": 2, "sosx": 2, "sosi": 2, "xeq": [2, 3], "yeq": 2, "insight": 2, "gaussian": [2, 11], "i": [2, 3, 4, 5, 7, 8, 9], "sqrt": [2, 3, 4, 5], "norm": [2, 5, 7, 11], "reflect": 2, "di": [2, 5], "xy": [2, 5], "cryptic": 2, "easiest": [2, 4], "perspicu": 2, "6": [2, 4, 5, 6, 7, 8], "divab": 2, "divbc": 2, "beq": 2, "ceq": 2, "And": [2, 4, 6, 7], "pretti": [2, 6, 7], "Then": [2, 3, 5, 6, 7, 9], "divac": 2, "alpha": [2, 3], "beta": [2, 3], "surject": [2, 3, 7], "yourself": [2, 5], "mul_div_cancel": [2, 4], "field_simp": [2, 5], "denomin": [2, 4, 5], "hx": [2, 3, 5, 6, 8], "surjg": 2, "surjf": [2, 3], "contradict": [2, 3, 4], "speak": [2, 5, 7], "irreflex": 2, "asymmetri": 2, "lt_asymm": 2, "sugar": 2, "eventu": [2, 3, 7], "fnuba": 2, "not_le_of_gt": 2, "not_lt_of_g": [2, 4, 5], "lt_of_not_g": 2, "le_of_not_gt": 2, "snippet": [2, 4, 5], "counterexampl": [2, 8], "monof": 2, "four": [2, 5], "valid": 2, "far": [2, 3, 6, 7], "q": [2, 4, 5, 6, 7], "straightforward": [2, 6], "difficult": [2, 6], "conclud": [2, 8], "nonexist": 2, "contradictori": 2, "classic": [2, 3, 4], "by_contra": [2, 4], "not_not": 2, "front": 2, "push": [2, 4, 7], "inward": 2, "facilit": [2, 7], "push_neg": [2, 3, 4], "restat": [2, 6], "contrapos": [2, 3, 4], "similarli": [2, 3, 4, 5], "yet": [2, 3, 4, 5, 6, 7], "semicolon": [2, 4], "falso": 2, "anyth": [2, 5, 7], "elim": 2, "strang": [2, 4], "fairli": 2, "reach": [2, 6], "37": 2, "exfalso": 2, "absurd": [2, 4], "slick": 2, "drop": 2, "manner": [2, 5], "compon": [2, 3, 5, 7, 9], "techniqu": [2, 7], "variou": [2, 3, 5, 6, 9], "xltz": 2, "zlty": 2, "10": 2, "7": [2, 4], "behav": [2, 3, 6, 7], "roughli": [2, 3, 4], "friend": [2, 5], "were": [2, 4, 5, 7], "inscrut": [2, 3], "gadget": [2, 7], "auxiliari": [2, 7], "pow_eq_zero": [2, 4], "doubl": [2, 3], "symmetr": [2, 3], "abs_lt": 2, "dvd_gcd_iff": 2, "8": [2, 4, 7], "15": 2, "not_monotone_iff": 2, "antisymmetr": 2, "aris": 2, "preorder": [2, 6, 7], "pre": 2, "lt_iff_le_not_l": 2, "repeatedli": [2, 7], "instanti": [2, 5, 6, 7], "inl": [2, 3], "inr": [2, 3], "produc": [2, 8], "branch": [2, 3, 6], "le_or_gt": 2, "abs_of_nonneg": [2, 5], "abs_of_neg": 2, "immedi": [2, 3, 5, 6], "myab": 2, "le_abs_self": 2, "neg_le_abs_self": 2, "enjoi": [2, 3, 4, 7], "pun": 2, "lt_ab": 2, "genuin": 2, "vertic": [2, 5], "lt_trichotomi": 2, "xgt": 2, "dvd_mul_right": [2, 4], "eq_zero_or_eq_zero_of_mul_eq_zero": 2, "zero": [2, 3, 4, 5, 6, 7, 8, 9], "nontrivi": [2, 3, 4, 5, 7], "integr": [2, 8, 11], "isdomain": 2, "em": [2, 3], "exclud": [2, 4], "by_cas": [2, 3, 4], "dispos": 2, "s_0": [2, 3], "s_1": 2, "s_2": 2, "ldot": [2, 3, 4], "varepsilon": [2, 7], "s_n": [2, 3], "render": [2, 4], "convergesto": 2, "ext": [2, 3, 4, 5, 6], "enabl": [2, 3, 4, 5], "actual": [2, 3, 4, 6, 7], "u": [2, 3, 5, 7, 9], "v": [2, 3, 5, 7], "congr": 2, "reconcil": 2, "peel": 2, "ab": [2, 5], "convert": [2, 4], "quit": [2, 6, 7], "zero_lt_on": [2, 4], "fill": [2, 3, 4, 5], "convergesto_const": 2, "\u03b5po": [2, 7], "nge": 2, "abs_zero": 2, "save": 2, "troubl": [2, 3, 5], "pen": 2, "paper": [2, 3, 5, 7, 9], "ns": 2, "nt": 2, "maximum": [2, 4, 7], "implement": [2, 5, 6, 8], "convergesto_add": 2, "cs": 2, "ct": 2, "clean": [2, 7], "\u03b52po": 2, "hs": [2, 4, 7, 9], "ht": 2, "le_of_max_le_left": 2, "le_of_max_le_right": 2, "tricki": [2, 3, 4, 6], "convergesto_mul_const": 2, "acpo": 2, "abs_po": 2, "exists_abs_le_of_convergesto": 2, "strong": [2, 4], "n\u2080": 2, "bpo": [2, 7], "pos\u2080": 2, "div_po": 2, "n\u2081": 2, "convergesto_mul": 2, "sketch": [2, 3, 4, 7], "limit": [2, 6, 7], "bold": 2, "scratch": 2, "convergesto_uniqu": 2, "sa": 2, "sb": 2, "abn": 2, "na": 2, "hna": 2, "nb": 2, "hnb": 2, "absa": 2, "absb": 2, "observ": [2, 4, 7], "everywher": [2, 3, 6, 7, 9], "linearord": 2, "vastli": 2, "awai": [2, 5], "vocabulari": 3, "uniform": [3, 7, 8], "primit": 3, "conceptu": 3, "advantag": [3, 4, 5, 8], "overload": 3, "verbos": 3, "system": [3, 4, 5, 6], "wrong": 3, "ss": 3, "sub": [3, 7, 9, 11], "cap": 3, "un": 3, "cup": 3, "univ": [3, 7, 8, 9], "empti": [3, 4, 5, 7, 9], "member": [3, 7], "membership": [3, 4, 6], "mem": 3, "notin": 3, "ident": [3, 4, 5, 6, 7, 11], "databas": [3, 4, 6, 7], "unlik": [3, 4], "existenti": [3, 11], "subset_def": 3, "inter_def": 3, "mem_setof": 3, "xu": 3, "mem_inter_iff": 3, "xsu": 3, "phenomenon": 3, "quirk": 3, "process": 3, "pitfal": 3, "heavili": [3, 7], "fall": 3, "union_def": 3, "mem_union": [3, 4], "xtu": 3, "xt": 3, "unnecessari": 3, "correctli": 3, "special": [3, 4, 5, 6, 7, 9], "rewritten": 3, "diff_eq": 3, "mem_diff": 3, "xstu": 3, "xnt": 3, "xnu": 3, "extension": [3, 5], "unsurprisingli": 3, "and_comm": 3, "antisymm": 3, "hood": [3, 5], "builder": 3, "trivial": [3, 4, 7], "eq_two_or_odd": 3, "even_iff": 3, "confus": [3, 4, 6, 7], "fortun": 3, "agre": 3, "prime_iff": 3, "symm": [3, 4, 5, 6, 7, 8], "rwa": [3, 4, 5], "restrict": [3, 4, 7], "signific": 3, "ball": [3, 8], "bex": 3, "bex_def": 3, "prime_x": 3, "slight": 3, "ssubt": 3, "index": [3, 6, 7], "model": [3, 7], "sequenc": [3, 6, 7, 8, 11], "a_0": 3, "a_1": 3, "a_2": 3, "mem_iunion": 3, "xai": 3, "mem_iint": 3, "mem_iunion\u2082": 3, "mem_iinter\u2082": 3, "exists_prime_and_dvd": 3, "eq_univ": 3, "eq_univ_of_foral": 3, "exists_infinite_prim": 3, "\u2080": 3, "sunion": 3, "sinter": 3, "relationship": [3, 4], "sunion_eq_biunion": 3, "sinter_eq_biint": 3, "preimag": [3, 7], "imag": [3, 4, 6, 7], "tripl": 3, "tag": [3, 6], "mem_image_of_mem": 3, "galoi": [3, 5, 7], "image_subset_iff": 3, "represent": [3, 4, 5], "asid": 3, "raini": 3, "dai": 3, "behavior": [3, 6, 7], "nonempti": [3, 7], "condit": [3, 4, 6, 7, 8], "fxeq": 3, "ai": 3, "fx": 3, "eq": [3, 5], "injon": [3, 9], "theme": 3, "rel": [3, 5], "relativ": 3, "xpo": 3, "ypo": 3, "exp_log": 3, "ingredi": [3, 5, 7, 8], "assign": [3, 5, 6], "inhabit": [3, 5, 7], "appeal": [3, 6], "choose_spec": 3, "noncomput": [3, 5], "inverse_spec": 3, "dif_po": 3, "dif_neg": 3, "fulli": [3, 7], "alon": 3, "leftinvers": 3, "rightinvers": 3, "hack": 3, "half": 3, "dozen": 3, "condens": 3, "cantor": 3, "famou": 3, "j": [3, 5], "intuit": [3, 7], "cardin": 3, "biject": [3, 5], "nineteenth": 3, "centuri": 3, "infinit": [3, 7, 11], "dedekind": 3, "quickli": [3, 9], "behind": 3, "problem": [3, 4, 5, 6, 7], "shade": 3, "region": 3, "diagram": 3, "circ": [3, 5], "scale": 3, "inner": 3, "smaller": [3, 4, 7], "concentr": 3, "unshad": 3, "compos": [3, 5, 7], "disjoint": [3, 9], "sound": [3, 5, 6], "plausibl": 3, "delic": 3, "improv": [3, 4], "confid": 3, "better": [3, 4, 5, 6, 7], "invfun": [3, 5], "leftinverse_invfun": 3, "invfun_eq": 3, "sbaux": 3, "sbset": 3, "sb_aux": 3, "s_": 3, "sb_set": 3, "bigcup_": 3, "mathbb": [3, 4, 5], "sbfun": 3, "complement": [3, 7, 9], "outermost": 3, "setminu": 3, "inv_fun": 3, "inv_fun_eq": 3, "sb_right_inv": 3, "goe": [3, 4, 5, 6, 7], "neither": [3, 5, 6], "nor": [3, 5], "sb_inject": 3, "hf": [3, 7, 8, 9], "hg": [3, 7, 8, 9], "a_def": 3, "h_def": 3, "hxeq": 3, "xa": [3, 5], "wlog": 3, "x\u2081a": 3, "resolve_left": 3, "x\u2082a": 3, "not_imp_self": 3, "x\u2082na": 3, "if_po": 3, "if_neg": 3, "x\u2082eq": 3, "hn": [3, 4, 7, 8], "sb_fun": 3, "bring": [3, 4, 7], "tradeoff": 3, "encapsul": [3, 5, 8], "symmetri": [3, 6], "dwell": 3, "succ": [3, 4, 6], "sb_surject": 3, "gya": 3, "xmem": 3, "sweet": 3, "schroeder_bernstein": 3, "substant": 4, "ancient": 4, "fraction": 4, "lowest": 4, "2c": 4, "4c": 4, "factor": [4, 5], "coprim": 4, "smart": 4, "12": 4, "encount": [4, 6], "algebra": [4, 6, 7, 8, 9, 11], "prime_def_lt": 4, "eq_one_or_self_of_dvd": 4, "prime_p": 4, "17": 4, "commonli": [4, 5], "prime_two": 4, "prime_thre": 4, "broader": [4, 8], "irreduc": [4, 5], "coincid": [4, 5, 7], "rise": [4, 6], "dvd_mul": 4, "even_of_even_sqr": 4, "dvd_of_dvd_pow": 4, "proce": [4, 6], "profici": 4, "prefix": [4, 6], "search": [4, 5, 6], "engin": 4, "hesit": 4, "mul_right_inj": 4, "heart": 4, "irration": 4, "dvd_gcd": 4, "coprime_mn": 4, "sqr_eq": 4, "meq": 4, "dvd_iff_exists_eq_mul_left": 4, "two_l": 4, "le_of_dvd": 4, "approach": [4, 5, 6, 7], "quick": [4, 8], "ne": [4, 5], "occur": 4, "suffici": [4, 7], "permut": 4, "prime_of_mem_factor": 4, "prod_factor": 4, "factors_uniqu": 4, "talk": [4, 7, 8], "factorization_mul": 4, "mnez": 4, "nnez": 4, "factorization_pow": 4, "black": [4, 6], "box": 4, "simpa": [4, 8], "nnz": 4, "nsqr_nez": 4, "eq1": 4, "eq2": 4, "add_mul_mod_self_left": 4, "mul_mod_right": 4, "count_factors_mul_of_po": 4, "successor": 4, "succ_ne_zero": 4, "npow_nz": 4, "dvd_sub": 4, "pow_eq": 4, "npowz": 4, "add_sub_cancel": 4, "understood": [4, 7], "quotient": [4, 5, 6, 7], "pictur": [4, 5], "mediat": 4, "headach": 4, "contend": 4, "issu": [4, 5, 6, 7], "th": 4, "topic": [4, 6], "enat": 4, "infin": [4, 7, 9], "appreci": 4, "role": [4, 5, 7], "datatyp": 4, "freeli": 4, "translat": [4, 6, 7], "mathematician": [4, 7], "inj": 4, "factori": 4, "fac": 4, "ih": 4, "fac_po": 4, "succ_po": 4, "dvd_fac": 4, "ipo": 4, "il": 4, "of_le_succ": 4, "dvd_mul_of_dvd_right": 4, "crude": 4, "remaind": [4, 5], "pow_two_le_fac": 4, "finset": [4, 5, 7], "bigoper": [4, 5], "prod": [4, 7, 9], "sum_range_zero": 4, "sum_range_succ": 4, "summat": 4, "prod_range_zero": 4, "prod_range_succ": 4, "deserv": 4, "danger": [4, 5], "ordinarili": [4, 5], "loop": 4, "indefinit": 4, "fix": [4, 6, 7], "placement": 4, "re": [4, 5], "handi": 4, "sum_id": 4, "div_eq_of_eq_mul_right": 4, "succ_eq_add_on": 4, "sum_sqr": 4, "mynat": 4, "thumb": 4, "decid": [4, 7], "preced": 4, "truncat": 4, "exponenti": 4, "cut": 4, "predecessor": 4, "pred": 4, "mul": [4, 5, 6, 7], "succ_add": 4, "succ_mul": 4, "explor": [4, 7], "standard": [4, 5, 6, 7], "formul": [4, 7], "quirki": 4, "among": 4, "annoi": [4, 6], "h0": 4, "succ_le_succ": 4, "zero_l": [4, 5], "interval_cas": 4, "interv": [4, 7, 9], "decis": 4, "procedur": [4, 6], "revert": [4, 5], "minfac": 4, "smallest": [4, 6, 7], "strong_induction_on": 4, "subsum": 4, "exists_prime_factor": 4, "np": 4, "mltn": 4, "mdvdn": 4, "mne1": 4, "mz": 4, "zero_dvd_iff": 4, "mgt2": 4, "pp": 4, "pdvd": 4, "factorial_po": 4, "dvd_factori": 4, "primes_infinit": 4, "refin": [4, 8], "ple": 4, "p_1": 4, "p_n": 4, "prod_": 4, "p_i": [4, 7], "computation": 4, "test": 4, "decidableeq": 4, "abandon": 4, "ourselv": [4, 6], "subset_iff": 4, "mem_int": 4, "mem_sdiff": 4, "tauto": 4, "dispens": 4, "tautolog": 4, "dvd_prod_of_mem": 4, "eq_of_dvd_of_prim": 4, "prime_q": 4, "preserv": [4, 6, 7], "induction_on": 4, "singleton": 4, "prod_empti": 4, "prod_insert": 4, "mem_of_dvd_prod_prim": 4, "mem_insert": 4, "wrote": 4, "filter": [4, 8, 9, 11], "mem_filt": 4, "aim": 4, "prod_po": 4, "_def": 4, "mem_": 4, "id": [4, 6, 7, 8], "bounded_of_ex_finset": 4, "qk": 4, "lt_succ_of_l": 4, "le_sup": 4, "ex_finset_of_bound": 4, "decidablepr": 4, "lt_succ_iff": 4, "congruent": 4, "p_k": 4, "loss": 4, "27": 4, "mod_4_eq_3_or_mod_4_eq_3": 4, "mul_mod": 4, "mod_lt": 4, "hm": [4, 8], "two_le_of_mod_4_eq_3": 4, "neq": 4, "div_dvd_of_dvd": 4, "div_lt_self": 4, "exists_prime_factor_mod_4_eq_3": 4, "dvd_rfl": 4, "mge2": 4, "home": [4, 5], "stretch": [4, 5], "remov": [4, 7], "eras": 4, "mem_eras": 4, "readi": [4, 6, 7, 8], "dvd_add_iff_left": 4, "primes_mod_4_eq_3_infinit": 4, "p4": 4, "pltn": 4, "p4eq": 4, "ps": 4, "pne3": 4, "seriou": [4, 6, 7], "feat": 4, "modern": 5, "subject": 5, "mysteri": [5, 6], "consult": 5, "ann": 5, "baanen": 5, "abus": 5, "paramet": [5, 6], "broadest": 5, "constraint": [5, 7], "bundl": [5, 6, 7, 8], "tupl": 5, "hy": [5, 6], "hz": [5, 6], "mypoint1": 5, "mypoint2": 5, "mypoint3": 5, "mk": [5, 6, 7], "former": 5, "latter": [5, 7], "quot": [5, 7], "protect": 5, "intern": 5, "add_x": 5, "addalt": 5, "etc": [5, 7], "y\u2081": 5, "z\u2081": 5, "y\u2082": 5, "z\u2082": 5, "addalt_x": 5, "addalt_comm": 5, "ya": 5, "za": 5, "xb": 5, "yb": 5, "zb": 5, "apart": [5, 6], "effici": [5, 7], "scalar": [5, 6, 8], "smul": [5, 6], "smul_distrib": 5, "road": 5, "link": [5, 6], "belong": [5, 6, 7], "simplex": 5, "convinc": 5, "equilater": 5, "interior": [5, 8], "standardtwosimplex": 5, "x_nonneg": 5, "y_nonneg": 5, "z_nonneg": 5, "sum_eq": 5, "swap": 5, "swapxi": 5, "interestingli": [5, 8], "midpoint": 5, "div_nonneg": 5, "weight": 5, "averag": 5, "weightedaverag": 5, "lambda_nonneg": 5, "lambda_l": 5, "fin": [5, 9], "standardsimplex": 5, "sum_eq_on": 5, "div_eq_mul_inv": 5, "sum_mul": 5, "sum_add_distrib": 5, "mul_sum": 5, "islinear": 5, "is_addit": 5, "preserves_mul": 5, "linf": 5, "subtyp": [5, 6, 7], "preal": 5, "val": 5, "sigma": [5, 9], "wherebi": [5, 7], "stdsimplex": 5, "\u03c3": 5, "fst": [5, 7], "snd": [5, 7], "custom": 5, "robust": [5, 6], "interfac": 5, "redefin": [5, 6], "accessor": 5, "weav": 5, "rich": [5, 6], "interconnect": 5, "hierarchi": [5, 11], "clarifi": 5, "antireflex": 5, "cdot": 5, "mathcal": [5, 8], "proxi": 5, "bipartit": 5, "graph": 5, "categori": [5, 7, 8], "morphism": [5, 8, 11], "basi": [5, 7], "discret": [5, 8], "inherit": [5, 6], "polynomi": 5, "coeffici": 5, "dual": [5, 7], "accommod": 5, "almost": [5, 6, 7, 9], "marriag": 5, "heaven": 5, "group\u2081": [5, 6], "inv": [5, 6], "struc": 5, "counterpart": 5, "chosen": 5, "assur": 5, "groupcat": 5, "group\u2081cat": 5, "str": 5, "capit": 5, "roman": 5, "equiv": 5, "tofun": [5, 6], "right_inv": 5, "left_inv": 5, "creativ": 5, "evid": 5, "coercion": [5, 6, 7, 8], "omit": 5, "perm": 5, "under": [5, 6, 7], "orient": 5, "permgroup": 5, "trans_assoc": 5, "trans_refl": 5, "refl_tran": 5, "self_trans_symm": 5, "grouptheori": 5, "g_1": 5, "g_2": 5, "g_3": 5, "tightli": 5, "isomorph": [5, 8], "Its": [5, 6], "neg": [5, 6, 7, 9], "reproduc": 5, "accompani": 5, "addgroup\u2081": 5, "scheme": 5, "addgrouppoint": 5, "arrang": 5, "mul_inv_cancel_right": 5, "achiev": [5, 6, 7], "silent": [5, 6], "regist": [5, 6], "grp": 5, "contextu": 5, "cue": 5, "synthes": [5, 6], "whole": 5, "_inst_1": 5, "candid": 5, "group\u2082": 5, "mysquar": 5, "my_squar": 5, "remark": [5, 6], "headi": 5, "store": 5, "hasmulgroup\u2082": 5, "hasonegroup\u2082": 5, "hasinvgroup\u2082": 5, "suppli": 5, "accord": 5, "capabl": 5, "chain": 5, "recent": 5, "prioriti": 5, "bad": [5, 6, 7], "artifici": 5, "addgroup\u2082": 5, "subtl": [5, 7], "configur": 5, "invis": [5, 6], "wise": 5, "euclidean": 5, "terminolog": 5, "mid": 5, "imaginari": 5, "gaussint": 5, "im": 5, "pointwis": [5, 7, 8], "root": [5, 6, 11], "ac": 5, "bci": 5, "adi": 5, "bd": 5, "bc": 5, "hasmul": 5, "zero_def": 5, "one_def": 5, "add_def": 5, "neg_def": 5, "mul_def": 5, "zero_r": 5, "zero_im": 5, "one_r": 5, "one_im": 5, "add_r": 5, "add_im": 5, "neg_r": 5, "neg_im": 5, "mul_r": 5, "mul_im": 5, "surprisingli": [5, 6], "concept": [5, 7, 8], "light": 5, "bulb": 5, "skeleton": [5, 7], "scari": 5, "instcommr": 5, "left_distrib": [5, 6], "right_distrib": [5, 6], "ext_iff": 5, "bq": 5, "archetyp": 5, "int": [5, 6], "ediv_add_emod": 5, "emod_nonneg": 5, "emod_lt": 5, "unit": [5, 6, 7], "algorithm": 5, "conjug": 5, "frac": 5, "nearest": 5, "size": 5, "vi": 5, "multipli": 5, "emb": 5, "forth": 5, "quadrat": 5, "gaussianint": 5, "stai": 5, "face": [5, 6, 7], "machineri": [5, 6, 7], "adapt": 5, "invest": 5, "pragmat": 5, "seek": 5, "heather": 5, "macbeth": 5, "eleg": 5, "div": 5, "mod": 5, "_add_mod": 5, "abs_mod": 5, "_le": 5, "emod_lt_of_po": 5, "zero_lt_two": 5, "fixm": 5, "_eq": 5, "sq_add_sq_eq_zero": 5, "linearorderedr": 5, "norm_nonneg": [5, 8], "norm_eq_zero": [5, 8], "norm_po": 5, "norm_mul": [5, 8], "conj": 5, "conj_r": 5, "conj_im": 5, "norm_conj": 5, "bespok": 5, "quad": 5, "record": [5, 6], "div_def": 5, "mod_def": 5, "messi": 5, "nicer": [5, 7], "norm_mod_lt": 5, "norm_y_po": 5, "sq_ab": 5, "gcongr": 5, "ediv_mul_l": 5, "le_of_mul_le_mul_right": 5, "ediv_lt_of_lt_mul": 5, "natab": 5, "coe_natabs_norm": 5, "natabs_of_nonneg": 5, "natabs_norm_mod_lt": 5, "ofnat_lt": 5, "coe_natab": 5, "not_norm_mul_left_lt_norm": 5, "natabs_mul": 5, "le_mul_of_one_le_right": 5, "ofnat_l": 5, "add_one_le_of_lt": 5, "euclideandomain": 5, "quotient_mul_add_remainder_eq": 5, "quotient_zero": 5, "r_wellfound": 5, "remainder_lt": 5, "mul_left_not_lt": 5, "payoff": 5, "principalidealr": 5, "irreducible_iff_prim": 5, "studi": [6, 7], "prematur": 6, "technolog": 6, "simpler": 6, "ring\u2081": 6, "gradual": [6, 7], "bottom": [6, 7], "endow": 6, "one\u2081": 6, "heavier": 6, "inferr": 6, "resolut": 6, "ie": [6, 7], "attribut": 6, "ensur": [6, 7], "self": 6, "one\u2082": 6, "usabl": 6, "silli": 6, "affect": 6, "importantli": 6, "habit": 6, "ascript": 6, "messag": 6, "typeclass": 6, "stuck": 6, "metavari": 6, "263": 6, "auto": 6, "sever": [6, 7, 9], "unknown": 6, "collis": 6, "builtin": 6, "\ud835\udfd9": 6, "inherit_doc": 6, "diamond": 6, "dia\u2081": 6, "dia": 6, "infixl": 6, "70": 6, "semigroup": 6, "dia_assoc": 6, "semigroup\u2081": 6, "todia\u2081": 6, "previous": 6, "semigroup\u2082": 6, "hurdl": 6, "neutral": 6, "diaoneclass\u2081": 6, "one_dia": 6, "dia_on": 6, "trace": 6, "info": 6, "ters": 6, "expend": 6, "attempt": 6, "succe": 6, "success": 6, "set_opt": 6, "synthinst": 6, "monoid\u2081": 6, "hide": [6, 7], "subtleti": 6, "fear": 6, "unrel": 6, "tosemigroup\u2081": 6, "todiaoneclass\u2081": 6, "monoid\u2082": 6, "toone\u2081": 6, "overlap": 6, "tear": 6, "signatur": 6, "restor": 6, "optim": [6, 9], "reusabl": 6, "inv\u2081": 6, "postfix": 6, "inv_dia": 6, "weak": 6, "preliminari": 6, "left_inv_eq_right_inv\u2081": 6, "hba": 6, "hac": 6, "export": 6, "inv_eq_of_dia": 6, "dia_inv": 6, "naiv": [6, 7], "duplic": 6, "to_addit": 6, "semi": 6, "left_inv_eq_right_inv": 6, "left_neg_eq_right_neg": 6, "whatsnew": 6, "addsemigroup\u2083": 6, "add_assoc\u2083": 6, "semigroup\u2083": 6, "mul_assoc\u2083": 6, "addmonoid\u2083": 6, "addzeroclass": 6, "monoid\u2083": 6, "muloneclass": 6, "tomuloneclass": 6, "addcommsemigroup\u2083": 6, "commsemigroup\u2083": 6, "addcommmonoid\u2083": 6, "commmonoid\u2083": 6, "addgroup\u2083": 6, "neg_add": 6, "group\u2083": 6, "inv_mul": 6, "inv_eq_of_mul": 6, "propag": 6, "attr": 6, "mul_inv": 6, "mul_left_cancel\u2083": 6, "mul_right_cancel\u2083": 6, "addcommgroup\u2083": 6, "commgroup\u2083": 6, "demonstr": [6, 7], "opposit": [6, 7], "gain": 6, "besid": 6, "parent": 6, "ring\u2083": 6, "mulzeroclass": 6, "toaddgroup\u2083": 6, "mayb": 6, "le\u2081": 6, "50": 6, "\u2081": 6, "preorder\u2081": 6, "partialorder\u2081": 6, "orderedcommmonoid\u2081": 6, "modul": 6, "pretend": 6, "smul\u2083": 6, "infixr": 6, "73": 6, "module\u2081": 6, "zero_smul": 6, "one_smul": 6, "mul_smul": 6, "add_smul": 6, "smul_add": 6, "surpris": 6, "toaddcommgroup\u2083": 6, "inst": 6, "module\u2083": 6, "hunt": 6, "unspecifi": 6, "embark": 6, "main": [6, 7, 8], "quest": 6, "huge": 6, "trap": 6, "refus": [6, 7], "tosmul\u2083": 6, "inst_1": 6, "safe": 6, "selfmodul": 6, "invert": 6, "nsmul\u2081": 6, "zsmul\u2081": 6, "ofnat": 6, "negsucc": 6, "intermedi": [6, 7], "abgrpmodul": 6, "failur": 6, "synth": 6, "indirect": 6, "path": 6, "thank": [6, 7], "offend": 6, "poor": 6, "forget": 6, "http": 6, "inria": 6, "hal": 6, "scienc": 6, "02463336": 6, "modifi": 6, "nsmul": 6, "addmonoid\u2084": 6, "nsmul_zero": 6, "nsmul_succ": 6, "mysmul": 6, "stori": 6, "incorpor": 6, "zsmul": 6, "lt\u2081": 6, "comparison": 6, "ismonoidhom\u2081": 6, "unpleas": [6, 7], "conjunct": [6, 11], "chose": 6, "ismonoidhom\u2082": 6, "map_on": 6, "map_mul": 6, "tempt": 6, "higher": 6, "unif": 6, "psycholog": 6, "rare": 6, "adject": 6, "bare": 6, "noun": 6, "argu": 6, "continuous_id": [6, 7], "primari": 6, "monoidhom\u2081": 6, "coefun": 6, "coerc": 6, "coe": 6, "addmonoidhom\u2081": 6, "addmonoid": 6, "map_zero": 6, "map_add": [6, 8], "ringhom\u2081": 6, "minor": [6, 8], "tomonoidhom\u2081": 6, "juggl": 6, "monoidhomclass\u2081": 6, "badinst": 6, "wouldn": 6, "priori": 6, "boil": 6, "hopelessli": 6, "checksynthord": 6, "random": 6, "deduc": [6, 7], "outparam": 6, "trigger": 6, "retri": 6, "monoidhomclass\u2082": 6, "promis": [6, 7], "map_inv_of_inv": 6, "sight": 6, "got": 6, "presenc": 6, "layer": [6, 7], "funlik": 6, "monoidhomclass": 6, "monoidhomclass\u2083": 6, "coe_inject": 6, "stop": 6, "ringhomclass\u2083": 6, "ringhom": 6, "algebrahom": 6, "ve": [6, 7], "primarili": [6, 7], "unbundl": 6, "orderpreshom": 6, "le_of_l": 6, "orderpresmonoidhom": 6, "orderpreshomclass": 6, "subgroup": 6, "subr": 6, "reus": 6, "led": 6, "descend": 6, "break": 6, "barrier": 6, "setlik": 6, "wrap": [6, 7], "submonoid\u2081": 6, "submonoid": 6, "mul_mem": 6, "one_mem": 6, "tackl": 6, "setco": 6, "submonoid\u2081monoid": 6, "destructur": 6, "binder": 6, "submonoidclass\u2081": 6, "subgroup\u2081": 6, "subgroupclass\u2081": 6, "subobject": 6, "s\u2081": 6, "s\u2082": 6, "shame": 6, "across": 6, "weird": [6, 7], "distract": 6, "emphas": 6, "anecdot": 6, "devic": 6, "hasquoti": 6, "bewar": 6, "regular": [6, 7], "ascii": 6, "setoid": 6, "commmonoid": 6, "iseqv": 6, "hw": 6, "quotientmonoid": 6, "map\u2082": 6, "calculu": [7, 9, 11], "quantiti": 7, "begun": 7, "paradox": 7, "exot": 7, "x\u2080": [7, 8], "convention": 7, "eight": 7, "varieti": 7, "wish": 7, "64": 7, "y\u2080": 7, "z\u2080": 7, "paragraph": 7, "512": 7, "bourbaki": 7, "spell": 7, "dualli": 7, "arbitrarili": 7, "neighborhood": 7, "attop": [7, 9], "\ud835\udcdd": [7, 8, 9], "\ud835\udce4": 7, "entourag": 7, "\u03bc": [7, 9], "a_": 7, "univ_set": 7, "sets_of_superset": 7, "inter_set": 7, "blur": 7, "princip": 7, "\ud835\udcdf": 7, "opportun": 7, "x_0": 7, "ioo": [7, 8], "tendsto\u2081": 7, "tendsto": [7, 9], "lim_": 7, "abstractli": 7, "salient": 7, "pushforward": 7, "f_": 7, "tendsto\u2082": 7, "via": 7, "leverag": 7, "map_mono": 7, "map_map": 7, "shot": 7, "256": 7, "pullback": 7, "comap": 7, "map_le_iff_le_comap": 7, "contravari": 7, "comap_comap": 7, "plane": 7, "\u02e2": 7, "nhds_prod_eq": 7, "aforement": 7, "le_inf_iff": 7, "shouldn": 7, "prohibit": 7, "global": 7, "precondit": 7, "closur": 7, "nebot": 7, "tour": [7, 8], "claim": 7, "recaptur": 7, "superfici": 7, "stronger": 7, "famili": [7, 8], "\u03b9": [7, 8, 9], "hasbasi": 7, "nhds_basis_ioo_po": 7, "has_basi": 7, "tendsto_iff": 7, "reformul": 7, "ici": 7, "attop_basi": 7, "knew": 7, "gave": 7, "n_p": 7, "n_q": 7, "tiresom": 7, "\u1da0": [7, 8, 9], "superscript": 7, "hp": 7, "hq": 7, "eventually_eq": 7, "tendsto_congr": 7, "review": 7, "eventually_of_foral": 7, "mono": 7, "item": 7, "filter_upward": 7, "hr": 7, "ae": [7, 9], "aka": 7, "occasion": 7, "frequent": 7, "sophist": 7, "mem_closure_of_tendsto": 7, "clusterpt": 7, "mem_closure_iff_clusterpt": 7, "le_principal_iff": 7, "nebot_of_l": 7, "hux": 7, "hum": 7, "dist_eq_zero": 7, "emetricspac": 7, "pseudometricspac": 7, "pseudoemetricspac": 7, "journei": 7, "recast": 7, "tendsto_attop": 7, "continuous_iff": 7, "devot": 7, "uncurri": 7, "slow": 7, "continuous_fst": 7, "comp": 7, "assembl": 7, "prod_mk": 7, "continuous_snd": 7, "continuous_dist": 7, "clunki": 7, "crucial": 7, "elabor": 7, "prod_map": 7, "sad": 7, "border": 7, "obfusc": 7, "continuous_pow": 7, "continuousat": [7, 9], "continuousat_iff": 7, "geometr": 7, "closedbal": 7, "sign": 7, "radiu": 7, "mem_ball_self": 7, "mem_closedball_self": 7, "isopen": 7, "isopen_iff": 7, "Their": [7, 8], "isclos": [7, 8], "s\u1d9c": [7, 9], "isopen_compl_iff": 7, "hu": [7, 8], "mem_of_tendsto": 7, "mem_closure_iff": 7, "mem_closure_iff_seq_limit": 7, "nhds_basis_bal": 7, "nhds_basis_closedbal": 7, "mem_iff": 7, "segment": [7, 9], "somewher": 7, "continuouson": [7, 8], "minimum": 7, "iscompact": 7, "icc": [7, 8], "iscompact_icc": 7, "\u03c6": 7, "strictmono": 7, "tendsto_subseq": 7, "exists_forall_l": 7, "exists_forall_g": 7, "compactspac": 7, "iscompact_univ": 7, "cauchi": 7, "uniformcontinu": 7, "uniformcontinuous_iff": 7, "clearli": 7, "isclosed_l": 7, "eq_empty_or_nonempti": 7, "attain": 7, "closer": 7, "cauchyseq": 7, "cauchyseq_iff": 7, "completespac": [7, 8, 9], "cauchyseq_tendsto_of_complet": 7, "criterion": 7, "tendsto_pow_attop_nhds_0_of_lt_1": 7, "dist_le_range_sum_dist": 7, "cauchyseq_of_le_geometric_two": 7, "\u03b5_po": [7, 8], "le_iff_exists_add": 7, "boss": 7, "bair": [7, 8], "exclam": 7, "induct": [7, 11], "rec_on": 7, "ho": 7, "hd": 7, "dens": 7, "densiti": 7, "\u03b4po": 7, "hpo": 7, "hball": 7, "mem_closure_iff_nhds_basi": 7, "recon": 7, "rpo": 7, "rb": 7, "incl": 7, "cdist": 7, "ylim": 7, "yball": 7, "categor": 7, "topologicalspac": [7, 8], "isopen_univ": 7, "isopen_empti": 7, "isopen_iunion": 7, "fintyp": 7, "isopen_iint": 7, "continuous_def": 7, "attach": 7, "filteri": 7, "sent": 7, "mem_nhds_iff": 7, "digress": 7, "pure_le_nhd": 7, "eventually_eventually_nhd": 7, "topological_spac": 7, "mk_of_nhd": 7, "nhds_mk_of_nhd": 7, "functori": 7, "induc": 7, "sensibl": 7, "uncount": 7, "relatedli": 7, "coinduc": 7, "t_x": 7, "t_y": 7, "coinduced_le_iff_le_induc": 7, "covari": 7, "coinduced_compos": 7, "induced_compos": 7, "topological_structur": 7, "focus": 7, "nhd": 7, "recov": 7, "continuous_iff_coinduced_l": 7, "g_": 7, "t_z": 7, "wasn": 7, "\u03c0": [7, 8], "t_": 7, "x_i": 7, "pi": 7, "price": 7, "patholog": 7, "t2_space": 7, "hausdorff": 7, "t2space": 7, "tendsto_nhds_uniqu": 7, "regularspac": 7, "closed_nhds_basi": 7, "nhds_basis_open": 7, "denseinduc": 7, "continuousat_extend": 7, "funni": 7, "_in": 7, "nhds_induc": 7, "is_open": 7, "fortiori": 7, "f_cont": 7, "tendsto_right_iff": 7, "firstcountabletopolog": 7, "cluster": 7, "at_top": 7, "hfx": 7, "push_pul": 7, "of_map": 7, "f_ne": 7, "f_le": 7, "map_eq": 7, "hne": 7, "hle": 7, "huo": 7, "hsu": 7, "elim_finite_subcov": 7, "9": 8, "introductori": 8, "hasderivat": [8, 9], "hasderivat_sin": 8, "differentiable_at": 8, "differentiableat": 8, "inconveni": 8, "deriv_zero_of_not_differentiableat": 8, "deriv_add": 8, "islocalmin": 8, "deriv_eq_zero": 8, "ev": 8, "roll": 8, "weirder": 8, "hab": 8, "hfc": 8, "hfi": 8, "exists_deriv_eq_zero": 8, "differentiableon": 8, "exists_deriv_eq_slop": 8, "normedaddcommgroup": [8, 9], "norm_add_l": 8, "infer_inst": [8, 9], "normed_spac": 8, "normed_add_group": 8, "stipul": 8, "normedspac": [8, 9], "norm_smul": 8, "banach": [8, 9], "dimension": [8, 9], "finitedimension": [8, 9], "\ud835\udd5c": [8, 9], "nontriviallynormedfield": [8, 9], "normedfield": 8, "exists_one_lt_norm": 8, "nondiscret": 8, "continuouslinearmap": 8, "cont": 8, "map_smul": 8, "le_op_norm": 8, "hmp": 8, "op_norm_le_bound": 8, "steinhau": 8, "bounded": 8, "uniformli": 8, "nonempty_interior_of_union_of_clos": 8, "continuous_linear_map": 8, "op_norm_le_of_shel": 8, "interior_subset": 8, "interior_inter_subset": 8, "is_closed_l": 8, "hc": 8, "h\u03b5": 8, "real_norm_l": 8, "\u03b5k_po": 8, "o": 8, "normedgroup": 8, "isbigowith": 8, "isbigowith_iff": 8, "isbigo_iff_isbigowith": 8, "islittleo_iff_forall_isbigowith": 8, "hasfderivat": 8, "fderiv": 8, "fr\u00e9chet": 8, "hff": 8, "iter": 8, "multilinear": 8, "with_top": 8, "infti": 8, "cont_diff": 8, "iteratedfderiv": 8, "withtop": 8, "contdiff": 8, "contdiff_iff_continuous_differenti": 8, "stricter": 8, "hasstrictfderivat": 8, "\ud835\udd42": 8, "isrorc": 8, "contdiffat": 8, "localinvers": 8, "eventually_left_invers": 8, "eventually_right_invers": 8, "to_localinvers": 8, "hasfderivwithinat": [8, 9], "hasfderivatfilt": 8, "measuretheori": 9, "intervalintegr": 9, "integral_id": 9, "integral_one_div": 9, "differenti": [9, 11], "integral_hasstrictderivat_right": 9, "stronglymeasurableatfilt": 9, "volum": 9, "integral_eq_sub_of_hasderivat": 9, "convolut": 9, "bochner": 9, "lebesgu": 9, "measurablespac": 9, "countabl": 9, "encod": 9, "measurableset": 9, "compl": 9, "iunion": 9, "iinter": 9, "measure_eq_iinf": 9, "measure_iunion_l": 9, "hmea": 9, "hdi": 9, "pairwis": 9, "m_iunion": 9, "\u1d50": 9, "integral_add": 9, "ennreal": 9, "toreal": 9, "send": 9, "to_real": 9, "set_integral_const": 9, "domin": 9, "converg": [9, 11], "aestronglymeasur": 9, "hbound": 9, "hlim": 9, "tendsto_integral_of_dominated_converg": 9, "fubini": 9, "sigmafinit": 9, "\u03bd": 9, "integral_prod": 9, "bilinear": 9, "formula": 9, "borelspac": 9, "isaddhaarmeasur": 9, "invari": 9, "mass": 9, "compact": 9, "h_inj": 9, "det": 9, "integral_image_eq_integral_abs_det_fderiv_smul": 9, "overview": 11, "schr\u00f6der": 11, "bernstein": 11, "irrat": 11}, "objects": {}, "objtypes": {}, "objnames": {}, "titleterms": {"introduct": 0, "get": 0, "start": 0, "overview": 0, "basic": [1, 6], "calcul": 1, "prove": 1, "ident": 1, "algebra": [1, 5], "structur": [1, 5], "us": 1, "theorem": [1, 3], "lemma": 1, "more": 1, "exampl": 1, "appli": 1, "rw": 1, "fact": 1, "about": 1, "logic": 2, "implic": 2, "univers": 2, "quantifi": 2, "The": [2, 3], "existenti": 2, "negat": 2, "conjunct": 2, "bi": 2, "disjunct": 2, "sequenc": 2, "converg": [2, 7], "set": [3, 7], "function": [3, 7], "schr\u00f6der": 3, "bernstein": 3, "elementari": [4, 8, 9], "number": 4, "theori": [4, 9], "irrat": 4, "root": 4, "induct": 4, "recurs": 4, "infinit": 4, "mani": 4, "prime": 4, "defin": 5, "build": 5, "gaussian": 5, "integ": 5, "hierarchi": 6, "morphism": 6, "sub": 6, "object": 6, "topolog": 7, "filter": 7, "metric": 7, "space": [7, 8], "continu": [7, 8], "ball": 7, "open": 7, "close": 7, "compact": 7, "uniformli": 7, "complet": 7, "fundament": 7, "separ": 7, "countabl": 7, "differenti": 8, "calculu": 8, "norm": 8, "linear": 8, "map": 8, "asymptot": 8, "comparison": 8, "integr": 9, "measur": 9, "index": 10, "mathemat": 11, "lean": 11}, "envversion": {"sphinx.domains.c": 2, "sphinx.domains.changeset": 1, "sphinx.domains.citation": 1, "sphinx.domains.cpp": 6, "sphinx.domains.index": 1, "sphinx.domains.javascript": 2, "sphinx.domains.math": 2, "sphinx.domains.python": 3, "sphinx.domains.rst": 2, "sphinx.domains.std": 2, "sphinx": 56}}) Search.setIndex({"docnames": ["C01_Introduction", "C02_Basics", "C03_Logic", "C04_Sets_and_Functions", "C05_Elementary_Number_Theory", "C06_Structures", "C07_Hierarchies", "C08_Topology", "C09_Differential_Calculus", "C10_Integration_and_Measure_Theory", "genindex", "index"], "filenames": ["C01_Introduction.rst", "C02_Basics.rst", "C03_Logic.rst", "C04_Sets_and_Functions.rst", "C05_Elementary_Number_Theory.rst", "C06_Structures.rst", "C07_Hierarchies.rst", "C08_Topology.rst", "C09_Differential_Calculus.rst", "C10_Integration_and_Measure_Theory.rst", "genindex.rst", "index.rst"], "titles": ["<span class=\"section-number\">1. </span>Introduction", "<span class=\"section-number\">2. </span>Basics", "<span class=\"section-number\">3. </span>Logic", "<span class=\"section-number\">4. </span>Sets and Functions", "<span class=\"section-number\">5. </span>Elementary Number Theory", "<span class=\"section-number\">6. </span>Structures", "<span class=\"section-number\">7. </span>Hierarchies", "<span class=\"section-number\">8. </span>Topology", "<span class=\"section-number\">9. </span>Differential Calculus", "<span class=\"section-number\">10. </span>Integration and Measure Theory", "Index", "Mathematics in Lean"], "terms": {"The": [0, 1, 4, 5, 6, 7, 8, 9, 11], "goal": [0, 1, 2, 3, 4, 5, 7], "thi": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], "book": [0, 2, 7], "teach": 0, "you": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], "formal": [0, 1, 2, 3, 4, 5, 6, 7, 8], "mathemat": [0, 1, 2, 3, 4, 5, 6, 7], "us": [0, 2, 3, 4, 5, 6, 7, 8, 9, 11], "lean": [0, 1, 2, 3, 4, 5, 6, 7, 8], "4": [0, 1, 2, 4, 5, 7, 8], "interact": [0, 5, 6, 9], "proof": [0, 1, 2, 3, 4, 5, 6, 7, 8], "assist": [0, 2, 5], "It": [0, 1, 2, 3, 4, 5, 6, 7, 8], "assum": [0, 1, 2, 3, 4, 6, 7], "know": [0, 1, 2, 3, 4, 5, 6, 7, 8], "some": [0, 1, 2, 3, 4, 5, 6, 7, 8], "doe": [0, 1, 2, 3, 4, 5, 6, 7, 8], "requir": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], "much": [0, 2, 4, 6, 7, 8], "although": [0, 3, 4, 5, 6, 7], "we": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], "cover": [0, 1, 3, 6, 7, 8], "exampl": [0, 2, 3, 4, 5, 6, 7, 8, 9, 11], "rang": [0, 2, 3, 4, 7], "from": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], "number": [0, 1, 2, 3, 5, 6, 7, 8, 11], "theori": [0, 1, 2, 3, 6, 7, 8, 11], "measur": [0, 5, 7, 8, 11], "analysi": [0, 5, 8], "focu": [0, 1, 7, 9], "elementari": [0, 3, 5, 7, 11], "aspect": [0, 5], "those": [0, 1, 2, 3, 5, 6, 7, 8], "field": [0, 1, 5, 6, 8], "hope": 0, "thei": [0, 1, 2, 3, 4, 5, 6, 7, 8], "ar": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], "familiar": [0, 1, 4, 5, 7, 8], "can": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], "pick": [0, 6], "them": [0, 1, 2, 3, 4, 5, 6, 7], "up": [0, 2, 3, 4, 5, 6, 7], "go": [0, 1, 2, 3, 4, 6, 7], "also": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], "don": [0, 1, 2, 3, 4, 5, 6, 7, 9], "t": [0, 1, 2, 3, 4, 5, 6, 7, 9], "presuppos": 0, "ani": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], "background": 0, "method": [0, 2, 3, 4, 5], "seen": [0, 1, 2, 4, 5, 6, 7], "kind": [0, 1, 6, 7], "comput": [0, 2, 3, 4, 5, 8, 9], "program": [0, 1, 2], "write": [0, 1, 2, 4, 5, 6, 7, 8, 9], "definit": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], "theorem": [0, 2, 4, 5, 7, 8, 9, 11], "regiment": 0, "languag": [0, 1, 2, 3], "like": [0, 1, 2, 3, 4, 5, 6, 7], "understand": [0, 2, 3, 4, 5, 6, 7], "In": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], "return": [0, 2, 3, 4, 5, 7], "provid": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], "feedback": 0, "inform": [0, 1, 2, 3, 5, 6, 7], "interpret": [0, 1, 4, 5, 7], "express": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], "guarante": [0, 3, 5], "well": [0, 1, 2, 3, 4, 5, 6, 7], "form": [0, 1, 2, 3, 4, 5, 6, 7, 9], "ultim": 0, "certifi": 0, "correct": [0, 1], "our": [0, 1, 2, 3, 4, 5, 6, 7, 9], "learn": [0, 1, 4, 5], "more": [0, 2, 3, 4, 5, 6, 7, 8, 11], "about": [0, 2, 3, 4, 5, 6, 7, 8, 11], "project": [0, 4, 5, 7], "page": [0, 1, 4], "commun": [0, 4], "web": [0, 1, 4], "tutori": 0, "base": [0, 2, 3, 4, 6, 7, 8], "s": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], "larg": [0, 6, 7], "ever": [0, 7], "grow": [0, 6], "librari": [0, 1, 2, 3, 4, 5, 7, 8], "mathlib": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], "strongli": 0, "recommend": [0, 1, 3], "join": [0, 1, 5], "zulip": [0, 4], "onlin": 0, "chat": 0, "group": [0, 1, 2, 3, 5, 6, 7, 8], "haven": [0, 2, 6, 7], "alreadi": [0, 1, 2, 3, 4, 5, 6, 7], "ll": [0, 2, 4, 6, 7], "find": [0, 1, 2, 4, 5, 6, 7], "live": [0, 5], "welcom": [0, 1], "enthusiast": 0, "happi": 0, "answer": [0, 5, 7], "question": [0, 4, 6, 7, 9], "offer": [0, 2, 5, 7], "moral": [0, 5], "support": [0, 1, 2, 3, 4, 5, 6, 7], "read": [0, 1, 4, 6, 7], "pdf": 0, "html": 0, "version": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], "design": [0, 1, 2, 3, 5, 7], "run": 0, "insid": [0, 1, 2, 3], "vs": [0, 1, 2, 3, 5], "code": [0, 1, 2, 3, 5, 6], "editor": [0, 1], "To": [0, 1, 2, 3, 4, 5, 6, 7], "instal": [0, 6], "follow": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], "instruct": [0, 1, 2, 7], "isn": [0, 2, 3, 4, 6], "enough": [0, 1, 2, 3, 4, 6, 7], "just": [0, 1, 2, 3, 4, 5, 6, 7], "extens": [0, 1, 6, 7, 8], "vscode": 0, "make": [0, 1, 2, 3, 4, 5, 6, 7, 8], "sure": [0, 1, 2, 3, 5, 6], "complet": [0, 1, 2, 3, 4, 6, 8], "step": [0, 1, 2, 3, 4, 5, 6], "so": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], "elan": 0, "have": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], "git": 0, "termin": 0, "navig": 0, "folder": 0, "where": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], "want": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], "put": [0, 1, 2, 3, 4, 5, 6, 7], "copi": [0, 3, 4, 6, 7], "repositori": [0, 1], "type": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], "clone": 0, "github": [0, 1], "com": 0, "leanprov": 0, "mathematics_in_lean": 0, "fetch": 0, "execut": 0, "lake": 0, "ex": [0, 2], "cach": 0, "compil": 0, "open": [0, 1, 2, 3, 4, 5, 8, 9], "choos": [0, 2, 3, 4, 5, 6, 7], "file": [0, 1, 4, 5, 6, 7], "menu": [0, 1], "Be": [0, 1, 3], "other": [0, 1, 2, 3, 4, 5, 6, 7], "each": [0, 1, 2, 3, 4, 5, 6, 7, 8], "section": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], "ha": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], "an": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], "associ": [0, 1, 2, 4, 5, 6, 7, 9], "exercis": [0, 1, 2, 3, 5, 6, 7, 8], "mil": 0, "organ": 0, "chapter": [0, 1, 2, 3, 4, 5, 6, 7, 8], "experi": [0, 1, 7], "do": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], "leav": [0, 1, 2, 3, 5, 6], "origin": [0, 1, 5], "intact": 0, "easier": [0, 1, 3, 4, 6, 7], "updat": 0, "chang": [0, 1, 2, 4, 5, 7, 9], "see": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], "below": [0, 2, 3, 4, 5, 6, 7, 8, 9], "call": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], "my_fil": 0, "whatev": [0, 2, 4], "creat": [0, 1, 6], "your": [0, 1, 2, 3, 5, 6, 7], "own": [0, 1, 4, 5, 6], "At": [0, 1, 2, 4, 5, 6], "point": [0, 1, 2, 3, 5, 6, 7, 8, 9], "textbook": [0, 2], "side": [0, 1, 2, 3, 4, 5, 6, 7, 8], "panel": 0, "ctrl": [0, 1, 2, 4, 5], "shift": [0, 1, 6, 7], "p": [0, 1, 2, 3, 4, 5, 6, 7, 9], "document": [0, 1, 3, 4, 6], "view": [0, 5, 6, 7], "bar": [0, 1, 2], "appear": [0, 1, 2, 5, 6, 7], "press": 0, "select": [0, 7], "soon": [0, 2, 6, 7], "highlight": [0, 2], "window": [0, 1, 2, 5], "click": [0, 1, 3, 4, 5, 6], "current": [0, 1, 2, 6], "altern": [0, 2, 3, 4, 5, 6, 7], "cloud": 0, "gitpod": 0, "how": [0, 1, 2, 3, 4, 5, 6, 7, 9], "still": [0, 1, 2, 3, 4, 5, 6, 7, 9], "work": [0, 1, 2, 3, 4, 5, 6, 7, 8], "describ": [0, 1, 2, 3, 4, 5, 6, 7], "abov": [0, 1, 2, 3, 4, 5, 6, 7, 9], "progress": [0, 1, 5], "pull": [0, 7], "content": [0, 1, 2, 4, 7], "which": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], "why": [0, 2, 4, 6, 7], "suggest": [0, 2, 4, 5, 7], "intend": [0, 1, 2, 5], "while": [0, 1, 2, 6, 7], "contain": [0, 2, 3, 4, 5, 6, 7, 8, 9], "explan": [0, 7], "hint": [0, 1, 2, 9], "text": [0, 3, 5, 7], "often": [0, 1, 2, 3, 4, 5, 6, 7], "includ": [0, 1, 2, 3, 4, 6, 7, 8], "one": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], "eval": 0, "hello": 0, "world": 0, "should": [0, 1, 2, 3, 4, 5, 6, 7, 8], "abl": [0, 1, 2, 3, 4, 5, 6, 8], "correspond": [0, 1, 2, 3, 4, 5, 6, 7, 8], "If": [0, 1, 2, 3, 4, 5, 6, 7], "line": [0, 1, 2, 3, 4, 6], "show": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], "hover": [0, 1, 2, 3, 4, 5], "cursor": [0, 1, 2], "over": [0, 1, 2, 3, 4, 5, 6, 7, 8], "command": [0, 1, 2, 3, 4, 5, 6], "respons": [0, 1], "pop": 0, "encourag": [0, 1, 2, 3, 4, 5], "edit": 0, "try": [0, 1, 2, 3, 4, 5, 6, 7], "moreov": [0, 1, 4, 5, 7], "lot": [0, 3, 5, 6, 7], "challeng": [0, 1, 2, 3, 5, 8], "rush": 0, "past": [0, 1], "through": [0, 1, 3, 4, 5, 6, 7], "central": [0, 4], "all": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], "when": [0, 1, 2, 3, 4, 5, 6, 7, 8], "feel": [0, 1, 2, 6, 7], "comfort": 0, "master": [0, 1, 4], "relev": [0, 1, 2, 4, 5, 6, 7], "skill": [0, 1, 2, 3, 4], "free": [0, 1, 7], "move": [0, 1, 2, 6, 7], "alwai": [0, 1, 2, 3, 5, 6], "compar": [0, 5, 6, 7], "solut": [0, 1, 4, 6], "ones": [0, 1, 2, 3, 5, 9], "simpli": [0, 1, 2, 3, 4, 5, 6, 7], "tool": [0, 1, 5, 6], "build": [0, 2, 4, 6, 7, 11], "complex": [0, 1, 2, 4, 5, 8, 9], "known": [0, 1, 2, 3, 4, 5, 6, 7, 8], "depend": [0, 2, 3, 4, 5, 6, 7], "everi": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], "check": [0, 1, 2, 3, 4, 5, 6, 7], "print": [0, 3, 4, 5, 9], "\u2115": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], "These": [0, 1, 3, 4, 5, 8, 9], "object": [0, 1, 2, 3, 4, 5, 11], "2": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], "def": [0, 2, 3, 4, 5, 6, 7], "f": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], "x": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], "3": [0, 1, 2, 3, 4, 5, 6, 7], "prop": [0, 2, 3, 4, 5, 6, 7, 9], "statement": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], "fermatlasttheorem": 0, "y": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], "z": [0, 1, 2, 5, 6, 7, 8, 9], "n": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], "0": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], "itself": [0, 2, 3, 5, 6, 7, 8], "Such": [0, 1, 2, 6], "proposit": [0, 2, 3, 4, 5], "easi": [0, 4, 5, 6, 7], "rfl": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], "hard": [0, 1, 3, 5, 6], "sorri": [0, 1, 2, 3, 4, 5, 6, 7, 8], "manag": [0, 1, 4, 5, 7], "construct": [0, 2, 3, 4, 5, 6, 7], "accept": [0, 1, 2, 7], "term": [0, 1, 2, 3, 4, 5, 7], "done": [0, 2, 3, 4, 6, 7], "someth": [0, 1, 2, 4, 6, 7], "veri": [0, 2, 4, 6, 7, 9], "impress": 0, "cheat": [0, 1], "now": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], "game": [0, 6], "left": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], "rule": [0, 2, 4, 5, 6, 7], "complementari": 0, "companion": [0, 1], "prove": [0, 2, 3, 4, 5, 6, 7, 8, 9, 11], "thorough": 0, "underli": [0, 1, 5, 6], "logic": [0, 1, 3, 4, 5, 11], "framework": 0, "core": [0, 4, 5], "syntax": [0, 1, 2, 4, 6], "peopl": [0, 1], "who": [0, 7], "prefer": [0, 1, 2, 3], "user": [0, 6], "manual": [0, 3, 4], "befor": [0, 1, 2, 3, 4, 5, 6], "new": [0, 1, 2, 3, 4, 5, 6, 7], "dishwash": 0, "person": 0, "hit": [0, 1], "button": 0, "figur": [0, 1, 2, 5], "out": [0, 1, 2, 3, 4, 5, 6, 7], "activ": 0, "potscrubb": 0, "featur": [0, 2, 4], "later": [0, 1, 2, 4, 5, 6, 7], "sens": [0, 2, 3, 4, 5, 6, 7, 8], "here": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], "refer": [0, 1, 2, 4, 5, 6, 7, 8], "back": [0, 1, 2, 3, 5, 6, 7], "necessari": [0, 2, 4, 5], "anoth": [0, 1, 2, 3, 4, 5, 6, 7], "thing": [0, 1, 2, 3, 4, 5, 6, 7], "distinguish": [0, 5, 6, 7, 8], "place": [0, 1, 2, 5, 7], "greater": [0, 1, 2, 3, 4, 7], "emphasi": [0, 6], "tactic": [0, 1, 2, 3, 4, 5, 6, 7, 8], "given": [0, 1, 2, 3, 4, 5, 6, 7], "two": [0, 1, 2, 3, 4, 5, 6, 7, 9], "wai": [0, 1, 2, 3, 4, 5, 6, 7, 9], "down": [0, 3, 4, 6, 7], "themselv": [0, 4, 5], "suitabl": [0, 1, 2, 5, 7], "descript": [0, 1, 2, 4, 7], "thereof": 0, "For": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], "repres": [0, 1, 2, 3, 4, 5, 6, 8], "fact": [0, 2, 3, 4, 5, 6, 7, 8, 9, 11], "even": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], "m": [0, 1, 2, 4, 6, 7, 8], "nat": [0, 1, 2, 3, 4, 5, 7], "fun": [0, 2, 3, 4, 5, 6, 7, 8, 9], "k": [0, 2, 4, 5, 7, 8], "hk": [0, 8], "hmn": 0, "rw": [0, 2, 3, 4, 5, 6, 7, 11], "mul_add": [0, 1, 4, 6], "l": [0, 1, 8, 9], "_": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], "compress": [0, 1, 7], "singl": [0, 1, 2, 3, 4, 5, 6, 8], "instead": [0, 1, 2, 3, 4, 5, 6, 7], "style": [0, 1], "same": [0, 1, 2, 3, 4, 5, 6, 7], "comment": [0, 4], "henc": [0, 2, 3, 4, 5, 6, 7, 8], "ignor": [0, 7], "sai": [0, 1, 2, 3, 4, 5, 6, 7, 9], "natur": [0, 1, 2, 3, 4, 5, 6, 7, 8], "rintro": [0, 2, 3, 4, 5, 7], "need": [0, 1, 2, 3, 4, 5, 6, 7], "twice": [0, 1, 7], "let": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], "substitut": [0, 2], "obviou": [0, 4, 5, 6], "ring": [0, 1, 2, 3, 4, 5, 6], "As": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], "enter": [0, 1, 2, 3, 7], "displai": [0, 1, 2, 6], "state": [0, 1, 2, 3, 4, 6, 7, 8], "separ": [0, 1, 2, 4, 5], "tell": [0, 2, 3, 4, 5, 6], "what": [0, 1, 2, 3, 4, 5, 6, 7], "establish": [0, 1, 2, 3, 4, 5], "task": [0, 2, 4, 5, 6, 7], "remain": [0, 1, 2, 3, 5, 6, 7], "replai": 0, "sinc": [0, 1, 2, 3, 4, 5, 6, 7], "continu": [0, 1, 4, 5, 6, 9], "first": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], "introduc": [0, 1, 2, 3, 4, 7, 9], "could": [0, 1, 2, 4, 5, 6, 7], "renam": 0, "decompos": [0, 3, 5], "hypothesi": [0, 1, 2, 3, 4], "assumpt": [0, 1, 2, 3, 4, 5, 7, 8, 9], "second": [0, 1, 2, 3, 4, 5, 6, 7, 9], "declar": [0, 1, 4, 5, 6], "next": [0, 1, 2, 3, 4, 5, 6, 7, 8], "rewrit": [0, 1, 2, 3, 4, 5, 6, 7], "replac": [0, 1, 2, 3, 4, 6], "solv": [0, 1, 2, 3, 4, 5, 6, 7], "result": [0, 1, 2, 3, 4, 5, 6, 7], "abil": 0, "small": [0, 2, 4, 5, 7], "increment": [0, 1], "extrem": [0, 6, 7], "power": [0, 1, 3, 4, 5, 6], "reason": [0, 1, 2, 4, 5, 6, 7], "quicker": 0, "than": [0, 1, 2, 3, 4, 5, 6, 7, 8], "There": [0, 1, 2, 3, 4, 6, 7, 8, 9], "sharp": 0, "distinct": [0, 2, 3, 4, 5, 7], "between": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], "insert": [0, 2, 4, 5, 7, 8], "did": [0, 2, 6, 7], "phrase": [0, 1, 2, 4, 5], "mul_left_comm": [0, 4], "convers": [0, 2, 4, 7], "short": [0, 1, 2, 3, 4, 5], "middl": [0, 1, 2, 7], "That": [0, 4, 5, 6], "said": [0, 2, 4, 5], "reduc": [0, 2, 3, 4, 5], "liner": 0, "carri": [0, 1, 2, 3, 4, 5, 6, 7, 9], "But": [0, 1, 2, 3, 4, 5, 6, 7], "substanti": 0, "autom": [0, 1, 5], "justifi": [0, 1, 2, 7], "longer": [0, 4, 5], "calcul": [0, 2, 4, 5, 11], "bigger": [0, 3, 8], "inferenti": 0, "invok": [0, 1, 7], "simplifi": [0, 2, 3, 4, 5, 7, 9], "specif": [0, 1, 3, 4, 5, 6], "pariti": [0, 4], "automat": [0, 1, 2, 3, 4, 5, 6, 7, 8], "intro": [0, 1, 2, 3, 4, 5, 6, 7], "simp": [0, 2, 3, 4, 5, 6, 7, 8], "parity_simp": 0, "big": [0, 5, 7, 8], "differ": [0, 1, 2, 3, 4, 5, 6, 7, 8], "onli": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], "its": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], "built": [0, 2, 6], "wherea": [0, 1, 2, 3, 5, 7], "top": [0, 6, 7, 8], "meant": [0, 2, 6], "rather": [0, 1, 2, 4, 5, 6, 7], "think": [0, 1, 2, 3, 4, 5, 6, 7, 8], "basic": [0, 2, 4, 5, 7, 9, 11], "entri": [0, 5], "brows": [0, 1, 4], "frustrat": [0, 6], "curv": 0, "steep": 0, "newcom": 0, "avail": [0, 1, 4, 5, 6], "round": [0, 1, 5], "clock": 0, "doubt": 0, "too": [0, 1, 3, 5, 6, 7], "contribut": [0, 3], "develop": [0, 1, 4, 9], "mission": 0, "dive": 0, "come": [0, 1, 2, 3, 4, 5, 6, 7], "forewarn": 0, "fundament": [0, 4, 5, 6, 9], "life": [0, 2], "mai": [0, 1, 2, 3, 5, 6, 7, 8], "never": [0, 6], "acknowledg": 0, "grate": [0, 5], "gabriel": 0, "ebner": 0, "set": [0, 1, 2, 4, 5, 6, 8, 9, 11], "infrastructur": 0, "scott": 0, "morrison": 0, "mario": 0, "carneiro": 0, "help": [0, 1, 2, 3, 4, 5, 6, 7], "port": 0, "julian": 0, "berman": 0, "alex": 0, "best": 0, "bulwi": 0, "cha": 0, "bryan": 0, "gin": 0, "ge": [0, 2, 5], "chen": 0, "johan": 0, "commelin": 0, "mathieu": 0, "guai": 0, "paquet": 0, "k\u00fclshammer": 0, "giovanni": 0, "mascellani": 0, "hunter": 0, "monro": 0, "pietro": 0, "monticon": 0, "oliv": 0, "nash": 0, "bartosz": 0, "piotrowski": 0, "guilherm": 0, "silva": 0, "been": [0, 1, 2, 4, 5, 6, 8], "partial": [0, 1, 2, 3, 5, 6], "hoskinson": 0, "center": [0, 7], "nut": 1, "bolt": 1, "gener": [1, 2, 3, 4, 5, 6, 7, 8, 9], "without": [1, 2, 4, 5, 6, 7, 8], "net": 1, "hand": [1, 2, 3, 4, 5, 6, 7], "equal": [1, 2, 3, 4, 5, 6, 7, 9], "right": [1, 2, 3, 4, 5, 6, 7, 8], "tantamount": [1, 3], "name": [1, 2, 3, 4, 5, 6, 7, 8], "b": [1, 2, 3, 4, 5, 6, 7, 8, 9], "c": [1, 2, 4, 5, 6, 7, 8, 9], "real": [1, 2, 3, 4, 5, 6, 7, 8, 9], "mul_assoc": [1, 2, 4, 5, 6], "mul_comm": [1, 2, 4, 5, 6], "elimin": 1, "explicitli": [1, 2, 3, 5, 6, 7, 8], "purpos": [1, 2, 3, 4, 5, 6, 7], "illustr": [1, 2, 3, 4, 5], "multipl": [1, 2, 3, 4, 5, 6, 8], "written": [1, 2, 3, 4, 5, 6, 7, 8], "howev": [1, 2, 5, 6, 7, 8], "good": [1, 2, 3, 4, 5, 6, 7], "mind": [1, 2, 5, 6], "notat": [1, 2, 3, 4, 5, 6, 7, 8, 9], "convent": [1, 5, 9], "parenthes": [1, 2, 3, 4], "import": [1, 2, 3, 4, 5, 6, 7, 9], "data": [1, 2, 4, 5, 6, 7], "\u211d": [1, 2, 3, 5, 6, 7, 8, 9], "begin": [1, 2, 3, 4, 5, 6], "sake": [1, 4], "breviti": [1, 5], "suppress": 1, "repeat": [1, 4, 5, 6], "happen": [1, 6, 7], "charact": [1, 3, 6], "r": [1, 2, 4, 5, 6, 7], "symbol": [1, 2, 5, 6], "doesn": [1, 2, 7], "until": [1, 4, 5, 6, 7], "space": [1, 2, 3, 5, 6, 9, 11], "tab": [1, 3, 4], "kei": [1, 4, 5, 7], "curiou": [1, 6], "abbrevi": [1, 2, 3, 5], "get": [1, 2, 3, 4, 6, 7, 8, 11], "access": [1, 3, 5, 6, 7, 9], "keyboard": 1, "easili": [1, 4, 5, 6], "backslash": [1, 3], "lead": [1, 2, 4, 5, 6, 7], "lean4": 1, "input": [1, 3, 7], "leader": 1, "report": 1, "infoview": 1, "A": [1, 2, 3, 4, 5, 6, 7, 8], "typic": 1, "might": [1, 2, 3, 4, 5], "look": [1, 2, 3, 4, 6, 7], "1": [1, 2, 3, 4, 5, 6, 7, 8, 9], "h\u2081": [1, 2, 3, 4], "prime": [1, 2, 3, 5, 6, 11], "h\u2082": [1, 3, 4], "h\u2083": [1, 3], "denot": [1, 3, 4, 6, 7], "context": [1, 2, 4, 5, 6, 7, 8, 9], "plai": [1, 3, 4, 6, 7], "three": [1, 2, 4, 5, 7], "label": [1, 2], "everyth": [1, 2, 6, 7], "identifi": [1, 2, 4], "subscript": 1, "h": [1, 2, 3, 4, 5, 6, 7, 8, 9], "legal": 1, "would": [1, 2, 3, 4, 5, 6, 7, 8], "h1": [1, 3, 4, 5], "h2": [1, 3, 5], "h3": 1, "foo": [1, 3, 5], "baz": 1, "last": [1, 2, 3, 4, 5, 6, 7], "sometim": [1, 2, 3, 4, 5, 6, 7], "target": [1, 6, 7, 9], "combin": [1, 2, 5, 6, 7], "practic": [1, 2, 3, 6, 7], "mean": [1, 2, 3, 4, 5, 6, 7, 8, 9], "usual": [1, 2, 3, 4, 5, 7, 9], "clear": [1, 2, 4, 5, 6], "case": [1, 2, 3, 4, 5, 6, 7, 9], "With": [1, 3, 4, 6, 7], "arrow": [1, 2, 6, 7], "revers": [1, 2, 3, 5, 7], "note": [1, 2, 4, 5, 6, 7, 9], "noth": [1, 2, 3, 4, 5, 6], "argument": [1, 2, 3, 4, 5, 6, 7], "tri": [1, 2, 4, 6], "match": [1, 2, 5], "pattern": [1, 2, 3, 5, 6], "local": [1, 2, 6, 7, 8], "d": [1, 2, 4, 5, 8], "e": [1, 2, 3, 4, 5, 6, 7, 8, 9], "sub_self": [1, 2], "hyp": 1, "list": [1, 2, 3, 4, 5], "comma": 1, "squar": [1, 2, 4, 5, 6], "bracket": [1, 2, 5, 6], "after": [1, 2, 4, 6, 7, 8], "trick": [1, 2, 4, 6, 8], "variabl": [1, 2, 3, 4, 5, 6, 7, 8, 9], "onc": [1, 2, 3, 4, 5, 6, 7, 9], "outsid": [1, 4], "inspect": 1, "reveal": 1, "inde": [1, 5, 6, 7, 8], "delimit": 1, "scope": [1, 2, 3, 5], "end": [1, 2, 3, 4, 5, 6, 7, 8], "block": [1, 4], "final": [1, 2, 3, 5, 7, 9], "recal": [1, 2, 4, 5, 7, 9], "introduct": [1, 2, 7, 11], "determin": [1, 5, 7], "both": [1, 2, 3, 4, 5, 6, 7, 8], "expect": [1, 2, 3, 4, 5, 6, 7], "rais": [1, 4], "error": [1, 2, 3, 6], "explain": [1, 2, 3, 4, 5, 6, 7, 9], "output": 1, "meanwhil": [1, 4], "take": [1, 2, 3, 4, 5, 6, 7, 8, 9], "two_mul": 1, "add_mul": [1, 6], "distribut": [1, 4, 5, 6], "addit": [1, 2, 4, 5, 6, 7, 8, 9], "add_assoc": [1, 4, 5, 6], "precis": [1, 3, 7, 8], "possibl": [1, 2, 3, 4, 5, 7], "calc": [1, 2, 3, 5, 7], "keyword": [1, 2, 4, 5], "notic": [1, 2, 3, 4, 5, 7], "finicki": 1, "underscor": [1, 2, 3], "justif": [1, 2], "format": 1, "indic": [1, 2, 3, 5, 6], "indent": 1, "One": [1, 2, 3, 4, 5, 6, 7], "outlin": [1, 2, 4, 7], "modulo": [1, 4, 5], "individu": 1, "pure": [1, 7], "littl": [1, 2, 7, 8], "underneath": [1, 3], "pow_two": [1, 4], "mul_sub": 1, "add_sub": 1, "sub_sub": 1, "add_zero": [1, 5, 6], "perform": [1, 2, 3], "exact": [1, 2, 3, 4, 5, 7], "becaus": [1, 2, 3, 4, 5, 6, 7, 8], "exactli": [1, 2, 3, 5, 6, 7], "close": [1, 2, 3, 6, 8, 9], "bit": [1, 2, 4, 6, 7], "commut": [1, 2, 3, 4, 5, 6, 8], "long": [1, 2, 3, 5, 6, 8], "axiom": [1, 2, 3, 5, 6, 7, 9], "indirectli": 1, "similar": [1, 2, 3, 5, 6, 7], "common": [1, 2, 3, 4, 5, 7], "variat": [1, 3, 4, 5, 7, 8], "nth_rewrit": 1, "allow": [1, 2, 3, 4, 5, 6, 7, 8, 9], "particular": [1, 2, 5, 6, 7], "instanc": [1, 2, 3, 4, 5, 6, 7, 8], "enumer": [1, 2], "start": [1, 2, 3, 4, 6, 7, 8, 9, 11], "occurr": 1, "nth_rw": 1, "consist": [1, 3, 5, 6, 7, 8], "collect": [1, 2, 3, 5, 7, 9], "oper": [1, 2, 3, 4, 5, 6, 7, 8], "time": [1, 4, 5, 6, 7, 8, 9], "constant": [1, 2, 9], "mapsto": [1, 5], "abelian": [1, 5, 6], "negat": [1, 5, 11], "invers": [1, 3, 5, 6, 8, 9], "add_comm": [1, 4, 5, 6], "zero_add": [1, 4, 5, 6], "add_left_neg": [1, 5], "mul_on": [1, 5, 6], "one_mul": [1, 2, 5, 6], "being": [1, 3, 5, 7, 8], "suffic": [1, 2, 3, 7], "give": [1, 2, 3, 4, 6, 7, 9], "element": [1, 2, 3, 4, 5, 6, 7, 8, 9], "concret": [1, 2, 4, 5, 6, 7], "integ": [1, 2, 4, 6, 11], "abstract": [1, 2, 5, 6, 7], "character": [1, 3, 4, 7, 8], "axiomat": [1, 2, 3, 5], "train": [1, 6], "recogn": [1, 2, 4, 5, 6, 7], "appropri": [1, 2, 3, 5, 6], "\u2124": [1, 4, 5, 6], "ration": [1, 2, 4, 7], "\u211a": [1, 4, 7], "\u2102": [1, 5, 8], "extend": [1, 3, 4, 5, 6, 7, 9], "order": [1, 2, 3, 4, 5, 6, 7, 8], "Not": [1, 5, 7], "properti": [1, 2, 3, 4, 5, 6, 7, 8, 9], "hold": [1, 2, 3, 4, 5, 7, 9], "arbitrari": [1, 2, 3, 4, 5], "taken": [1, 2], "cours": [1, 2, 4, 6, 7, 8, 9], "linear": [1, 2, 5, 7], "matric": [1, 5], "fail": [1, 2, 3, 4, 5, 6, 7, 9], "commr": [1, 2, 5], "unchang": [1, 2], "linarith": [1, 2, 4, 5], "permiss": 1, "strike": [1, 2], "balanc": 1, "concis": [1, 5], "readabl": [1, 2, 3, 4, 7], "strengthen": [1, 2, 4], "deriv": [1, 2, 4, 8, 9], "most": [1, 2, 3, 4, 5, 6, 7, 9], "organiz": 1, "mechan": [1, 2, 5], "namespac": [1, 2, 3, 4, 5, 7], "full": [1, 2, 3, 4, 5, 6, 7], "shorter": [1, 3, 4, 7], "avoid": [1, 2, 3, 4, 5, 6, 8], "due": [1, 3, 6], "clash": 1, "myre": 1, "add_right_neg": 1, "effect": [1, 3, 6, 7], "temporarili": [1, 2], "reprov": 1, "care": [1, 2, 3, 5], "earlier": 1, "pai": [1, 2, 6, 7], "attent": [1, 2, 4, 6, 7], "curli": [1, 2], "implicit": [1, 2, 5, 6, 7, 8], "moment": [1, 2, 5], "worri": [1, 3, 4, 5], "neg_add_cancel_left": 1, "add_neg_cancel_right": 1, "add_left_cancel": 1, "add_right_cancel": 1, "plan": [1, 6, 7], "brace": 1, "imagin": 1, "situat": [1, 3, 6, 7], "draw": [1, 5, 6], "conclus": [1, 2, 4], "hypothes": [1, 2, 3, 4, 5], "redund": [1, 5, 7, 9], "few": [1, 2, 3, 4, 7], "extra": [1, 2, 3, 5, 6, 7], "oner": 1, "complic": [1, 2, 6], "tediou": [1, 2, 6], "mark": [1, 2, 6, 7], "suppos": [1, 2, 3, 4, 5, 7], "infer": [1, 2, 3, 5, 6], "mul_zero": [1, 5, 6], "serv": [1, 3, 4, 5, 9], "therefor": [1, 4, 5, 7], "promot": 1, "modular": 1, "subproof": 1, "wa": [1, 3], "except": [1, 2, 5], "ad": [1, 2, 3, 4, 5, 6, 7], "variant": [1, 2, 7], "whose": [1, 2, 4, 5, 6, 7, 8], "necessarili": [1, 9], "miss": [1, 3, 4], "piec": [1, 4, 5, 6, 7], "either": [1, 2, 3, 5, 6, 7], "becom": [1, 4, 5, 6, 7], "technic": [1, 5, 6], "strictli": [1, 2, 8], "less": [1, 2, 3, 4, 5, 6, 7], "script": 1, "slightli": [1, 6, 7, 8], "clearer": [1, 3, 5], "human": 1, "reader": [1, 7], "maintain": 1, "evolv": 1, "rememb": [1, 2, 3, 4, 5, 6, 7], "zero_mul": [1, 4, 5, 6], "By": [1, 3, 5, 6], "neg_eq_of_add_eq_zero": 1, "eq_neg_of_add_eq_zero": 1, "neg_zero": 1, "neg_neg": 1, "had": [1, 6], "annot": [1, 2, 3, 4, 5, 6], "third": [1, 2, 3, 5, 7], "specifi": [1, 2, 3, 4, 5, 7, 8, 9], "imposs": 1, "default": [1, 2, 3, 4, 5, 6, 8], "subtract": [1, 4, 5], "provabl": [1, 3, 6, 7], "sub_eq_add_neg": 1, "On": [1, 2, 3, 5, 6, 7, 9], "defin": [1, 2, 3, 4, 6, 7, 8, 9, 11], "reflex": [1, 2], "present": [1, 2, 4, 7], "forc": [1, 2, 3], "unfold": [1, 2, 3, 4, 5, 7], "deal": [1, 2, 3, 4, 5, 7], "equat": [1, 2, 3, 4, 5], "interchang": 1, "self_sub": 1, "effort": [1, 4], "one_add_one_eq_two": 1, "norm_num": [1, 2, 4, 5], "strength": 1, "weaker": [1, 2], "notion": [1, 2, 3, 4, 5, 7, 8, 9], "addgroup": [1, 5], "otherwis": [1, 2, 3, 4, 5], "addcommgroup": 1, "commgroup": 1, "g": [1, 2, 3, 5, 6, 7, 8, 9], "mul_left_inv": [1, 5], "\u00b9": [1, 3, 5, 6, 7], "cocki": 1, "helper": 1, "along": [1, 4, 7], "mul_right_inv": [1, 5], "mul_inv_rev": 1, "non": [1, 3, 6, 7, 8, 9], "abel": 1, "noncomm_r": 1, "seem": [1, 2, 4, 6, 7, 8], "odd": [1, 2, 3, 4], "partli": [1, 6], "histor": 1, "conveni": [1, 2, 3, 5, 6, 7], "great": [1, 5], "sort": [1, 3, 4], "inequ": [1, 2, 6, 7], "le": [1, 5, 6], "whenev": [1, 2, 4, 5], "consid": [1, 2, 3, 4, 5, 6, 7, 8, 9], "le_refl": [1, 2], "le_tran": [1, 2], "detail": [1, 2, 3, 4, 5, 6], "unless": [1, 2, 5], "realli": [1, 2, 3, 4, 6, 7], "insist": [1, 6], "discuss": [1, 2, 4, 5, 6, 7, 8], "implic": [1, 7, 11], "h\u2080": [1, 2, 3, 4, 7], "dot": [1, 7], "option": [1, 2, 4, 5, 6, 7], "within": [1, 2, 7], "visibl": 1, "must": [1, 5, 6, 7], "decreas": [1, 5], "fourth": [1, 2], "mode": [1, 2, 5], "entir": [1, 3, 5, 7, 8], "lt_of_le_of_lt": [1, 2], "lt_of_lt_of_l": 1, "lt_tran": [1, 2], "togeth": [1, 2, 3, 4, 5, 7], "handl": [1, 3, 4, 6], "arithmet": 1, "5": [1, 2, 5, 7, 8], "pass": [1, 5], "exp_le_exp": 1, "mpr": [1, 2, 5, 7], "exp": [1, 3], "applic": [1, 2, 4, 5, 9], "function": [1, 2, 4, 5, 6, 8, 9, 11], "compound": [1, 2, 7], "pars": [1, 3], "exp_lt_exp": 1, "log_le_log": 1, "log": [1, 3, 9], "log_lt_log": 1, "add_le_add": [1, 2], "add_le_add_left": 1, "add_le_add_right": 1, "add_lt_add_of_le_of_lt": 1, "add_lt_add_of_lt_of_l": 1, "add_lt_add_left": 1, "add_lt_add_right": 1, "add_nonneg": [1, 5], "add_po": 1, "add_pos_of_pos_of_nonneg": 1, "exp_po": [1, 3], "bi": [1, 5, 11], "lr": 1, "iff": [1, 3, 7, 8, 9], "connect": [1, 3, 5, 7], "equival": [1, 2, 3, 4, 5, 7, 8, 9], "mp": [1, 2, 3, 4, 7], "forward": [1, 2, 5, 7], "direct": [1, 2, 3, 6, 7, 8], "stand": [1, 2, 5, 7, 8], "modu": 1, "ponen": 1, "respect": [1, 2, 3, 4, 5, 7], "thu": [1, 3, 4, 5, 7], "again": [1, 2, 3, 4, 5, 6, 7], "numer": [1, 4, 5], "constitut": 1, "part": [1, 2, 3, 4, 5, 6, 7, 9], "strategi": [1, 2, 4], "api": 1, "reli": [1, 2, 3, 5, 7], "guess": [1, 2, 3, 4, 5], "cmd": [1, 2], "mac": [1, 2], "a_of_b_of_c": 1, "approxim": 1, "loud": 1, "probabl": [1, 5, 6, 7], "add_l": 1, "choic": [1, 2, 3, 5, 7], "exist": [1, 2, 3, 6, 7], "jump": [1, 4, 5, 7], "nearbi": [1, 4], "sq_nonneg": 1, "delet": [1, 2, 3, 4], "uncom": 1, "previou": [1, 2, 3, 5, 6, 7, 8, 9], "confirm": [1, 2, 3, 4], "finish": [1, 2, 3, 4], "job": 1, "pow_two_nonneg": [1, 2], "tend": [1, 7], "around": [1, 3, 6, 7, 9], "binari": [1, 2, 4, 5, 6], "increas": 1, "worth": [1, 2, 5], "definition": [1, 4, 5, 6, 7], "principl": [1, 2, 3, 4, 6, 8], "favor": [1, 5], "timesav": 1, "clever": 1, "involv": [1, 2, 4, 5, 6, 7], "nice": [1, 2, 4, 6, 7], "idea": [1, 2, 3, 5, 6, 7], "abs_l": [1, 5], "congratul": [1, 2, 4], "min": [1, 2, 7, 9], "uniqu": [1, 2, 3, 4, 5, 7], "min_le_left": 1, "min_le_right": 1, "le_min": 1, "max": [1, 2, 6, 7, 9], "pair": [1, 2, 4, 5, 7], "act": 1, "curri": 1, "logician": 1, "haskel": 1, "bind": [1, 3], "tighter": [1, 3], "infix": [1, 6], "le_antisymm": [1, 2], "usag": 1, "inconsist": 1, "outer": 1, "level": [1, 2, 6], "nest": [1, 2], "bother": [1, 3], "repetit": [1, 6], "foreshadow": 1, "univers": [1, 3, 5, 7, 11], "quantifi": [1, 3, 4, 5, 7, 11], "desir": [1, 3, 6, 7], "implicitli": [1, 2], "mani": [1, 2, 3, 5, 6, 7, 8, 9, 11], "whether": [1, 2, 3, 4, 6, 7], "Of": [1, 2, 4, 6, 7, 8, 9], "interest": [1, 2, 3, 5, 6, 7], "vice": [1, 3], "versa": [1, 3], "word": [1, 2, 3, 4, 5, 7], "switch": [1, 6], "transit": [1, 2, 5, 7], "total": 1, "satisfi": [1, 3, 4, 5, 6, 7, 8], "disjunct": [1, 3, 11], "stick": [1, 2, 7, 8], "split": [1, 2, 3, 4], "aux": [1, 2, 4, 7], "valu": [1, 2, 3, 4, 5, 6, 7, 8, 9], "yield": [1, 2, 3, 4, 5, 7], "made": [1, 2, 3, 5, 7], "manifest": [1, 7], "triangl": [1, 2, 5], "abs_add": [1, 2], "sub_add_cancel": [1, 5], "relat": [1, 2, 3, 5, 6, 7, 8, 9], "divis": [1, 2, 4, 5, 6], "ordinari": [1, 2, 4, 5, 7], "unicod": [1, 3, 6], "obtain": [1, 2, 4, 5, 7, 8], "dvd": 1, "dvd_tran": 1, "dvd_mul_of_dvd_left": 1, "dvd_mul_left": 1, "expon": 1, "expand": [1, 2, 3, 4, 5], "w": [1, 6], "greatest": [1, 5, 7], "divisor": [1, 2, 4, 5], "gcd": [1, 2, 4], "least": [1, 5, 6, 7], "lcm": 1, "analog": [1, 2, 3, 4, 5, 7, 8], "divid": [1, 2, 4, 5], "gcd_zero_right": 1, "gcd_zero_left": 1, "lcm_zero_right": 1, "lcm_zero_left": 1, "dvd_antisymm": 1, "complain": 1, "ambigu": [1, 5], "_root_": [1, 4], "saw": [1, 5, 6, 7], "govern": [1, 5], "class": [1, 4, 5, 6, 7, 8, 9], "\u03b1": [1, 2, 3, 4, 5, 6, 7, 8, 9], "partialord": [1, 2], "adopt": 1, "letter": [1, 5, 8], "\u03b2": [1, 2, 3, 5, 6, 7, 9], "\u03b3": [1, 2, 5, 7], "greek": [1, 4], "especi": [1, 2, 5, 6, 7], "strict": [1, 2], "somewhat": [1, 3, 7], "lt_irrefl": [1, 2], "lt_iff_le_and_n": 1, "lattic": [1, 5, 6, 7], "inf_le_left": [1, 7], "inf_le_right": 1, "le_inf": 1, "le_sup_left": 1, "le_sup_right": 1, "sup_l": 1, "lower": [1, 2, 4], "bound": [1, 2, 3, 4, 5, 7, 8, 9], "upper": [1, 2], "glb": 1, "lub": 1, "infimum": [1, 6, 7, 9], "supremum": [1, 4, 6], "inf": [1, 6, 7], "sup": [1, 4, 7], "further": [1, 7], "matter": [1, 2], "meet": [1, 2, 3, 5], "keep": [1, 5, 6], "dictionari": 1, "subset": [1, 2, 3, 5, 7, 8], "domain": [1, 2, 3, 4, 5, 7], "boolean": 1, "truth": [1, 4], "fals": [1, 2, 3, 4, 6], "true": [1, 2, 3, 6, 7], "posit": [1, 3, 4, 5, 7, 9], "subspac": [1, 6], "vector": [1, 3, 6, 8], "intersect": [1, 3, 5, 6, 7, 9], "sum": [1, 2, 4, 5, 6, 7], "inclus": [1, 3, 7], "topolog": [1, 5, 6, 8, 11], "union": [1, 3, 4, 5, 6, 8, 9], "inf_comm": 1, "inf_assoc": 1, "sup_comm": 1, "sup_assoc": 1, "absorpt": 1, "law": 1, "absorb1": 1, "absorb2": 1, "found": [1, 5, 8], "inf_sup_self": 1, "sup_inf_self": 1, "distriblattic": 1, "inf_sup_left": 1, "inf_sup_right": 1, "sup_inf_left": 1, "sup_inf_right": 1, "shown": [1, 5, 8, 9], "explicit": [1, 2, 5, 6, 7], "nondistribut": 1, "finit": [1, 3, 4, 5, 7, 8, 9], "impli": [1, 2, 3, 4, 5, 7], "larger": [1, 7], "carrier": [1, 5, 6], "compat": [1, 7], "strictorderedr": 1, "mul_po": [1, 4], "mul_nonneg": 1, "coupl": [1, 2, 6, 7], "metric": [1, 5, 8, 11], "equip": [1, 3, 5, 6, 7, 8, 9], "distanc": [1, 2, 7, 8], "dist": [1, 7], "map": [1, 2, 3, 5, 6, 7], "metricspac": [1, 7, 8], "dist_self": 1, "dist_comm": [1, 7], "dist_triangl": [1, 7], "nonneg": [1, 5], "nonneg_of_mul_nonneg_left": 1, "dist_nonneg": [1, 7], "dealt": 2, "simpl": [2, 4, 5, 6, 8], "absolut": 2, "\u03b5": [2, 7, 8], "though": [2, 3, 4, 5], "treat": [2, 3, 5, 6, 7, 8], "appli": [2, 3, 4, 5, 6, 7, 8, 9, 11], "my_lemma": 2, "\u03b4": [2, 7], "hb": [2, 7], "subsequ": [2, 4, 7], "lemma": [2, 4, 5, 6, 7, 8, 9, 11], "mention": [2, 3, 5, 6, 7], "my_lemma2": 2, "stage": [2, 5, 6], "my_lemma3": 2, "epo": 2, "ele1": 2, "xlt": 2, "ylt": 2, "essenti": [2, 3, 5, 7], "colon": 2, "off": [2, 3, 4], "my_lemma4": 2, "abs_mul": 2, "mul_le_mul": 2, "abs_nonneg": 2, "mul_lt_mul_right": 2, "extract": [2, 7], "hidden": 2, "expos": [2, 7], "predic": [2, 3, 4, 6, 7, 8], "fnub": 2, "fnlb": 2, "lambda": [2, 5], "hfa": 2, "hgb": 2, "dsimp": [2, 3, 4, 5], "simplif": [2, 3, 4], "contract": 2, "anyhow": 2, "control": 2, "transform": [2, 3], "rest": [2, 3, 5, 7], "routin": 2, "nnf": 2, "nng": 2, "hfb": 2, "nna": 2, "codomain": [2, 4, 7], "structur": [2, 4, 6, 7, 8, 9, 11], "monoid": [2, 3, 4, 6], "fnub_add": 2, "orderedcanceladdcommmonoid": 2, "high": 2, "monoton": [2, 6, 7], "nondecreas": [2, 4], "placehold": 2, "Or": [2, 3], "backward": [2, 7], "subgoal": 2, "mf": 2, "mg": 2, "aleb": 2, "flag": [2, 3], "squiggli": 2, "marker": 2, "nnc": 2, "bbb": [2, 5], "fneven": 2, "fnodd": 2, "ef": 2, "eg": 2, "og": 2, "shorten": 2, "rid": 2, "won": [2, 4, 6, 7], "cannot": [2, 3, 4, 5, 6, 7], "contrari": 2, "syntact": 2, "reduct": [2, 3], "erw": 2, "harder": 2, "spot": 2, "manipul": [2, 5, 7], "foundat": [2, 3, 4, 5], "mundan": 2, "assert": [2, 3, 6], "contrast": [2, 3, 5, 6, 7], "zermelo": 2, "fraenkel": 2, "sin": [2, 8], "co": 2, "zf": 2, "defect": [2, 6, 7], "theoret": [2, 3, 7], "motiv": 2, "detect": 2, "meaningless": 2, "independ": [2, 3, 5], "continuum": 2, "meta": [2, 6], "beyond": [2, 6, 8], "ask": [2, 4, 5, 6, 7], "xs": [2, 3], "refl": [2, 3, 5, 6], "tran": [2, 4, 5, 6], "setub": 2, "inject": [2, 3, 4, 6, 7], "x_1": [2, 3], "x_2": [2, 3], "x\u2081": [2, 3, 5, 7], "x\u2082": [2, 3, 5], "add": [2, 4, 5, 6, 7, 8], "nonzero": [2, 4, 5, 9], "sourc": [2, 7], "inspir": 2, "add_left_inj": 2, "composit": [2, 3, 5, 6, 7], "injg": 2, "injf": [2, 3], "canon": [2, 3, 4, 5], "exhibit": [2, 7], "anonym": [2, 3, 4, 5], "constructor": [2, 3, 4, 5, 6], "angl": 2, "certain": [2, 6, 7], "fnhasub": 2, "fnhaslb": 2, "ubf": 2, "ubg": 2, "rcase": [2, 3, 4, 5, 7], "ubfa": 2, "ubgb": 2, "unpack": [2, 3], "main": [2, 6, 7, 8], "els": [2, 3, 4], "turn": [2, 3, 4, 5, 6, 7, 8], "fn_ub_add": 2, "directli": [2, 4, 5, 6, 7], "lbf": 2, "lbg": 2, "recurs": [2, 3, 5, 11], "arbitrarili": [2, 7], "assign": [2, 3, 5, 6], "compon": [2, 3, 5, 7, 9], "destruct": 2, "produc": [2, 8], "tag": [2, 3, 6], "chosen": [2, 5], "intern": [2, 5], "primit": [2, 3], "bulid": 2, "scientist": 2, "sight": [2, 6], "hurt": 2, "chanc": 2, "yourself": [2, 5], "compani": 2, "old": [2, 5, 6], "chestnut": 2, "product": [2, 4, 5, 6, 7, 9], "magic": [2, 5, 6], "verifi": 2, "sumofsquar": 2, "sumofsquares_mul": 2, "sosx": 2, "sosi": 2, "xeq": [2, 3], "yeq": 2, "insight": 2, "gaussian": [2, 11], "i": [2, 3, 4, 5, 7, 8, 9], "sqrt": [2, 3, 4, 5], "norm": [2, 5, 7, 11], "reflect": 2, "di": [2, 5], "xy": [2, 5], "cryptic": 2, "easiest": [2, 4], "perspicu": 2, "6": [2, 4, 5, 6, 7, 8], "divab": 2, "divbc": 2, "beq": 2, "ceq": 2, "And": [2, 4, 6, 7], "pretti": [2, 6, 7], "Then": [2, 3, 5, 6, 7, 9], "divac": 2, "alpha": [2, 3], "beta": [2, 3], "surject": [2, 3, 7], "mul_div_cancel": [2, 4], "field_simp": [2, 5], "denomin": [2, 4, 5], "hx": [2, 3, 5, 6, 8], "surjg": 2, "surjf": [2, 3], "contradict": [2, 3, 4], "speak": [2, 5, 7], "irreflex": 2, "asymmetri": 2, "lt_asymm": 2, "sugar": 2, "eventu": [2, 3, 7], "fnuba": 2, "not_le_of_gt": 2, "not_lt_of_g": [2, 4, 5], "lt_of_not_g": 2, "le_of_not_gt": 2, "snippet": [2, 4, 5], "counterexampl": [2, 8], "monof": 2, "four": [2, 5], "valid": 2, "far": [2, 3, 6, 7], "q": [2, 4, 5, 6, 7], "straightforward": [2, 6], "difficult": [2, 6], "conclud": [2, 8], "nonexist": 2, "contradictori": 2, "classic": [2, 3, 4], "by_contra": [2, 4], "not_not": 2, "front": 2, "push": [2, 4, 7], "inward": 2, "facilit": [2, 7], "push_neg": [2, 3, 4], "restat": [2, 6], "contrapos": [2, 3, 4], "similarli": [2, 3, 4, 5], "yet": [2, 3, 4, 5, 6, 7], "semicolon": [2, 4], "falso": 2, "anyth": [2, 5, 7], "elim": 2, "strang": [2, 4], "fairli": 2, "reach": [2, 6], "37": 2, "exfalso": 2, "absurd": [2, 4], "slick": 2, "drop": 2, "manner": [2, 5], "techniqu": [2, 7], "variou": [2, 3, 5, 6, 9], "xltz": 2, "zlty": 2, "10": 2, "7": [2, 4], "behav": [2, 3, 6, 7], "roughli": [2, 3, 4], "friend": [2, 5], "were": [2, 4, 5, 7], "inscrut": [2, 3], "gadget": [2, 7], "auxiliari": [2, 7], "pow_eq_zero": [2, 4], "doubl": [2, 3], "symmetr": [2, 3], "abs_lt": 2, "dvd_gcd_iff": 2, "8": [2, 4, 7], "15": 2, "not_monotone_iff": 2, "antisymmetr": 2, "aris": 2, "preorder": [2, 6, 7], "pre": 2, "lt_iff_le_not_l": 2, "repeatedli": [2, 7], "instanti": [2, 5, 6, 7], "inl": [2, 3], "inr": [2, 3], "branch": [2, 3, 6], "le_or_gt": 2, "abs_of_nonneg": [2, 5], "abs_of_neg": 2, "against": 2, "immedi": [2, 3, 5, 6], "attract": 2, "closer": [2, 7], "advantag": [2, 3, 4, 5, 8], "caess": 2, "myab": 2, "le_abs_self": 2, "neg_le_abs_self": 2, "enjoi": [2, 3, 4, 7], "pun": 2, "lt_ab": 2, "genuin": 2, "vertic": [2, 5], "lt_trichotomi": 2, "xgt": 2, "dvd_mul_right": [2, 4], "eq_zero_or_eq_zero_of_mul_eq_zero": 2, "zero": [2, 3, 4, 5, 6, 7, 8, 9], "nontrivi": [2, 3, 4, 5, 7], "integr": [2, 8, 11], "isdomain": 2, "em": [2, 3], "exclud": [2, 4], "by_cas": [2, 3, 4], "dispos": 2, "s_0": [2, 3], "s_1": 2, "s_2": 2, "ldot": [2, 3, 4], "varepsilon": [2, 7], "s_n": [2, 3], "render": [2, 4], "convergesto": 2, "ext": [2, 3, 4, 5, 6], "enabl": [2, 3, 4, 5], "actual": [2, 3, 4, 6, 7], "u": [2, 3, 5, 7, 9], "v": [2, 3, 5, 7], "congr": 2, "reconcil": 2, "peel": 2, "ab": [2, 5], "convert": [2, 4], "quit": [2, 6, 7], "zero_lt_on": [2, 4], "fill": [2, 3, 4, 5], "convergesto_const": 2, "\u03b5po": [2, 7], "nge": 2, "abs_zero": 2, "save": 2, "troubl": [2, 3, 5], "pen": 2, "paper": [2, 3, 5, 7, 9], "ns": 2, "nt": 2, "maximum": [2, 4, 7], "implement": [2, 5, 6, 8], "convergesto_add": 2, "cs": 2, "ct": 2, "clean": [2, 7], "\u03b52po": 2, "hs": [2, 4, 7, 9], "ht": 2, "le_of_max_le_left": 2, "le_of_max_le_right": 2, "tricki": [2, 3, 4, 6], "convergesto_mul_const": 2, "acpo": 2, "abs_po": 2, "exists_abs_le_of_convergesto": 2, "strong": [2, 4], "n\u2080": 2, "bpo": [2, 7], "pos\u2080": 2, "div_po": 2, "n\u2081": 2, "convergesto_mul": 2, "sketch": [2, 3, 4, 7], "limit": [2, 6, 7], "bold": 2, "scratch": 2, "convergesto_uniqu": 2, "sa": 2, "sb": 2, "abn": 2, "na": 2, "hna": 2, "nb": 2, "hnb": 2, "absa": 2, "absb": 2, "observ": [2, 4, 7], "everywher": [2, 3, 6, 7, 9], "linearord": 2, "vastli": 2, "awai": [2, 5], "vocabulari": 3, "uniform": [3, 7, 8], "conceptu": 3, "overload": 3, "verbos": 3, "system": [3, 4, 5, 6], "wrong": 3, "ss": 3, "sub": [3, 7, 9, 11], "cap": 3, "un": 3, "cup": 3, "univ": [3, 7, 8, 9], "empti": [3, 4, 5, 7, 9], "member": [3, 7], "membership": [3, 4, 6], "mem": 3, "notin": 3, "ident": [3, 4, 5, 6, 7, 11], "databas": [3, 4, 6, 7], "unlik": [3, 4], "existenti": [3, 11], "subset_def": 3, "inter_def": 3, "mem_setof": 3, "xu": 3, "mem_inter_iff": 3, "xsu": 3, "phenomenon": 3, "quirk": 3, "process": 3, "pitfal": 3, "heavili": [3, 7], "fall": 3, "union_def": 3, "mem_union": [3, 4], "xtu": 3, "xt": 3, "unnecessari": 3, "correctli": 3, "special": [3, 4, 5, 6, 7, 9], "rewritten": 3, "diff_eq": 3, "mem_diff": 3, "xstu": 3, "xnt": 3, "xnu": 3, "extension": [3, 5], "unsurprisingli": 3, "harm": 3, "and_comm": 3, "antisymm": 3, "hood": [3, 5], "builder": 3, "trivial": [3, 4, 7], "eq_two_or_odd": 3, "even_iff": 3, "confus": [3, 4, 6, 7], "fortun": 3, "agre": 3, "prime_iff": 3, "symm": [3, 4, 5, 6, 7, 8], "rwa": [3, 4, 5], "restrict": [3, 4, 7], "signific": 3, "ball": [3, 8], "bex": 3, "bex_def": 3, "prime_x": 3, "slight": 3, "ssubt": 3, "index": [3, 6, 7], "model": [3, 7], "sequenc": [3, 6, 7, 8, 11], "a_0": 3, "a_1": 3, "a_2": 3, "mem_iunion": 3, "xai": 3, "mem_iint": 3, "mem_iunion\u2082": 3, "mem_iinter\u2082": 3, "exists_prime_and_dvd": 3, "eq_univ": 3, "eq_univ_of_foral": 3, "exists_infinite_prim": 3, "\u2080": 3, "sunion": 3, "sinter": 3, "relationship": [3, 4], "sunion_eq_biunion": 3, "sinter_eq_biint": 3, "preimag": [3, 7], "imag": [3, 4, 6, 7], "tripl": 3, "mem_image_of_mem": 3, "galoi": [3, 5, 7], "image_subset_iff": 3, "represent": [3, 4, 5], "asid": 3, "raini": 3, "dai": 3, "behavior": [3, 6, 7], "nonempti": [3, 7], "condit": [3, 4, 6, 7, 8], "fxeq": 3, "ai": 3, "fx": 3, "eq": [3, 5], "injon": [3, 9], "theme": 3, "rel": [3, 5], "relativ": 3, "xpo": 3, "ypo": 3, "exp_log": 3, "ingredi": [3, 5, 7, 8], "inhabit": [3, 5, 7], "appeal": [3, 6], "choose_spec": 3, "noncomput": [3, 5], "inverse_spec": 3, "dif_po": 3, "dif_neg": 3, "fulli": [3, 7], "alon": 3, "leftinvers": 3, "rightinvers": 3, "hack": 3, "half": 3, "dozen": 3, "condens": 3, "cantor": 3, "famou": 3, "j": [3, 5], "intuit": [3, 7], "cardin": 3, "biject": [3, 5], "nineteenth": 3, "centuri": 3, "infinit": [3, 7, 11], "dedekind": 3, "quickli": [3, 9], "behind": 3, "problem": [3, 4, 5, 6, 7], "shade": 3, "region": 3, "diagram": 3, "circ": [3, 5], "scale": 3, "inner": 3, "smaller": [3, 4, 7], "concentr": 3, "unshad": 3, "compos": [3, 5, 7], "disjoint": [3, 9], "sound": [3, 5, 6], "plausibl": 3, "delic": 3, "improv": [3, 4], "confid": 3, "better": [3, 4, 5, 6, 7], "invfun": [3, 5], "leftinverse_invfun": 3, "invfun_eq": 3, "sbaux": 3, "sbset": 3, "sb_aux": 3, "s_": 3, "sb_set": 3, "bigcup_": 3, "mathbb": [3, 4, 5], "sbfun": 3, "complement": [3, 7, 9], "outermost": 3, "setminu": 3, "inv_fun": 3, "inv_fun_eq": 3, "sb_right_inv": 3, "goe": [3, 4, 5, 6, 7], "neither": [3, 5, 6], "nor": [3, 5], "sb_inject": 3, "hf": [3, 7, 8, 9], "hg": [3, 7, 8, 9], "a_def": 3, "h_def": 3, "hxeq": 3, "xa": [3, 5], "wlog": 3, "x\u2081a": 3, "resolve_left": 3, "x\u2082a": 3, "not_imp_self": 3, "x\u2082na": 3, "if_po": 3, "if_neg": 3, "x\u2082eq": 3, "hn": [3, 4, 7, 8], "sb_fun": 3, "bring": [3, 4, 7], "tradeoff": 3, "encapsul": [3, 5, 8], "symmetri": [3, 6], "dwell": 3, "succ": [3, 4, 6], "sb_surject": 3, "gya": 3, "xmem": 3, "sweet": 3, "schroeder_bernstein": 3, "substant": 4, "ancient": 4, "fraction": 4, "lowest": 4, "2c": 4, "4c": 4, "factor": [4, 5], "coprim": 4, "smart": 4, "12": 4, "encount": [4, 6], "algebra": [4, 6, 7, 8, 9, 11], "prime_def_lt": 4, "eq_one_or_self_of_dvd": 4, "prime_p": 4, "17": 4, "commonli": [4, 5], "prime_two": 4, "prime_thre": 4, "broader": [4, 8], "irreduc": [4, 5], "coincid": [4, 5, 7], "rise": [4, 6], "dvd_mul": 4, "even_of_even_sqr": 4, "dvd_of_dvd_pow": 4, "proce": [4, 6], "profici": 4, "prefix": [4, 6], "search": [4, 5, 6], "engin": 4, "hesit": 4, "mul_right_inj": 4, "heart": 4, "irration": 4, "dvd_gcd": 4, "coprime_mn": 4, "sqr_eq": 4, "meq": 4, "dvd_iff_exists_eq_mul_left": 4, "two_l": 4, "le_of_dvd": 4, "approach": [4, 5, 6, 7], "quick": [4, 8], "ne": [4, 5], "occur": 4, "suffici": [4, 7], "permut": 4, "prime_of_mem_factor": 4, "prod_factor": 4, "factors_uniqu": 4, "talk": [4, 7, 8], "factorization_mul": 4, "mnez": 4, "nnez": 4, "factorization_pow": 4, "black": [4, 6], "box": 4, "simpa": [4, 8], "nnz": 4, "nsqr_nez": 4, "eq1": 4, "eq2": 4, "add_mul_mod_self_left": 4, "mul_mod_right": 4, "count_factors_mul_of_po": 4, "successor": 4, "succ_ne_zero": 4, "npow_nz": 4, "dvd_sub": 4, "pow_eq": 4, "npowz": 4, "add_sub_cancel": 4, "understood": [4, 7], "quotient": [4, 5, 6, 7], "pictur": [4, 5], "mediat": 4, "headach": 4, "contend": 4, "issu": [4, 5, 6, 7], "th": 4, "topic": [4, 6], "enat": 4, "infin": [4, 7, 9], "appreci": 4, "role": [4, 5, 7], "datatyp": 4, "freeli": 4, "translat": [4, 6, 7], "mathematician": [4, 7], "inj": 4, "factori": 4, "fac": 4, "ih": 4, "fac_po": 4, "succ_po": 4, "dvd_fac": 4, "ipo": 4, "il": 4, "of_le_succ": 4, "dvd_mul_of_dvd_right": 4, "crude": 4, "remaind": [4, 5], "pow_two_le_fac": 4, "finset": [4, 5, 7], "bigoper": [4, 5], "prod": [4, 7, 9], "sum_range_zero": 4, "sum_range_succ": 4, "summat": 4, "prod_range_zero": 4, "prod_range_succ": 4, "deserv": 4, "danger": [4, 5], "ordinarili": [4, 5], "loop": 4, "indefinit": 4, "fix": [4, 6, 7], "placement": 4, "re": [4, 5], "handi": 4, "sum_id": 4, "div_eq_of_eq_mul_right": 4, "succ_eq_add_on": 4, "sum_sqr": 4, "mynat": 4, "thumb": 4, "decid": [4, 7], "preced": 4, "truncat": 4, "exponenti": 4, "cut": 4, "predecessor": 4, "pred": 4, "mul": [4, 5, 6, 7], "succ_add": 4, "succ_mul": 4, "explor": [4, 7], "standard": [4, 5, 6, 7], "formul": [4, 7], "quirki": 4, "among": 4, "annoi": [4, 6], "h0": 4, "succ_le_succ": 4, "zero_l": [4, 5], "interval_cas": 4, "interv": [4, 7, 9], "decis": 4, "procedur": [4, 6], "revert": [4, 5], "minfac": 4, "smallest": [4, 6, 7], "strong_induction_on": 4, "subsum": 4, "exists_prime_factor": 4, "np": 4, "mltn": 4, "mdvdn": 4, "mne1": 4, "mz": 4, "zero_dvd_iff": 4, "mgt2": 4, "pp": 4, "pdvd": 4, "factorial_po": 4, "dvd_factori": 4, "primes_infinit": 4, "refin": [4, 8], "ple": 4, "p_1": 4, "p_n": 4, "prod_": 4, "p_i": [4, 7], "computation": 4, "test": 4, "decidableeq": 4, "abandon": 4, "ourselv": [4, 6], "subset_iff": 4, "mem_int": 4, "mem_sdiff": 4, "tauto": 4, "dispens": 4, "tautolog": 4, "dvd_prod_of_mem": 4, "eq_of_dvd_of_prim": 4, "prime_q": 4, "preserv": [4, 6, 7], "induction_on": 4, "singleton": 4, "prod_empti": 4, "prod_insert": 4, "mem_of_dvd_prod_prim": 4, "mem_insert": 4, "wrote": 4, "filter": [4, 8, 9, 11], "mem_filt": 4, "aim": 4, "prod_po": 4, "_def": 4, "mem_": 4, "id": [4, 6, 7, 8], "bounded_of_ex_finset": 4, "qk": 4, "lt_succ_of_l": 4, "le_sup": 4, "ex_finset_of_bound": 4, "decidablepr": 4, "lt_succ_iff": 4, "congruent": 4, "p_k": 4, "loss": 4, "27": 4, "mod_4_eq_3_or_mod_4_eq_3": 4, "mul_mod": 4, "mod_lt": 4, "hm": [4, 8], "two_le_of_mod_4_eq_3": 4, "neq": 4, "div_dvd_of_dvd": 4, "div_lt_self": 4, "exists_prime_factor_mod_4_eq_3": 4, "dvd_rfl": 4, "mge2": 4, "home": [4, 5], "stretch": [4, 5], "remov": [4, 7], "eras": 4, "mem_eras": 4, "readi": [4, 6, 7, 8], "dvd_add_iff_left": 4, "primes_mod_4_eq_3_infinit": 4, "p4": 4, "pltn": 4, "p4eq": 4, "ps": 4, "pne3": 4, "seriou": [4, 6, 7], "feat": 4, "modern": 5, "subject": 5, "mysteri": [5, 6], "consult": 5, "ann": 5, "baanen": 5, "abus": 5, "paramet": [5, 6], "broadest": 5, "constraint": [5, 7], "bundl": [5, 6, 7, 8], "tupl": 5, "hy": [5, 6], "hz": [5, 6], "mypoint1": 5, "mypoint2": 5, "mypoint3": 5, "mk": [5, 6, 7], "former": 5, "latter": [5, 7], "quot": [5, 7], "protect": 5, "add_x": 5, "addalt": 5, "etc": [5, 7], "y\u2081": 5, "z\u2081": 5, "y\u2082": 5, "z\u2082": 5, "addalt_x": 5, "addalt_comm": 5, "ya": 5, "za": 5, "xb": 5, "yb": 5, "zb": 5, "apart": [5, 6], "effici": [5, 7], "scalar": [5, 6, 8], "smul": [5, 6], "smul_distrib": 5, "road": 5, "link": [5, 6], "belong": [5, 6, 7], "simplex": 5, "convinc": 5, "equilater": 5, "interior": [5, 8], "standardtwosimplex": 5, "x_nonneg": 5, "y_nonneg": 5, "z_nonneg": 5, "sum_eq": 5, "swap": 5, "swapxi": 5, "interestingli": [5, 8], "midpoint": 5, "div_nonneg": 5, "weight": 5, "averag": 5, "weightedaverag": 5, "lambda_nonneg": 5, "lambda_l": 5, "fin": [5, 9], "standardsimplex": 5, "sum_eq_on": 5, "div_eq_mul_inv": 5, "sum_mul": 5, "sum_add_distrib": 5, "mul_sum": 5, "islinear": 5, "is_addit": 5, "preserves_mul": 5, "linf": 5, "subtyp": [5, 6, 7], "preal": 5, "val": 5, "sigma": [5, 9], "wherebi": [5, 7], "stdsimplex": 5, "\u03c3": 5, "fst": [5, 7], "snd": [5, 7], "custom": 5, "robust": [5, 6], "interfac": 5, "redefin": [5, 6], "accessor": 5, "weav": 5, "rich": [5, 6], "interconnect": 5, "hierarchi": [5, 11], "clarifi": 5, "antireflex": 5, "cdot": 5, "mathcal": [5, 8], "proxi": 5, "bipartit": 5, "graph": 5, "categori": [5, 7, 8], "morphism": [5, 8, 11], "basi": [5, 7], "discret": [5, 8], "inherit": [5, 6], "polynomi": 5, "coeffici": 5, "dual": [5, 7], "accommod": 5, "almost": [5, 6, 7, 9], "marriag": 5, "heaven": 5, "group\u2081": [5, 6], "inv": [5, 6], "struc": 5, "counterpart": 5, "assur": 5, "groupcat": 5, "group\u2081cat": 5, "str": 5, "capit": 5, "roman": 5, "equiv": 5, "tofun": [5, 6], "right_inv": 5, "left_inv": 5, "creativ": 5, "evid": 5, "coercion": [5, 6, 7, 8], "omit": 5, "perm": 5, "under": [5, 6, 7], "orient": 5, "permgroup": 5, "trans_assoc": 5, "trans_refl": 5, "refl_tran": 5, "self_trans_symm": 5, "grouptheori": 5, "g_1": 5, "g_2": 5, "g_3": 5, "tightli": 5, "isomorph": [5, 8], "Its": [5, 6], "neg": [5, 6, 7, 9], "reproduc": 5, "accompani": 5, "addgroup\u2081": 5, "scheme": 5, "addgrouppoint": 5, "arrang": 5, "mul_inv_cancel_right": 5, "achiev": [5, 6, 7], "silent": [5, 6], "regist": [5, 6], "grp": 5, "contextu": 5, "cue": 5, "synthes": [5, 6], "whole": 5, "_inst_1": 5, "candid": 5, "group\u2082": 5, "mysquar": 5, "my_squar": 5, "remark": [5, 6], "headi": 5, "store": 5, "hasmulgroup\u2082": 5, "hasonegroup\u2082": 5, "hasinvgroup\u2082": 5, "suppli": 5, "accord": 5, "capabl": 5, "chain": 5, "recent": 5, "prioriti": 5, "bad": [5, 6, 7], "artifici": 5, "addgroup\u2082": 5, "subtl": [5, 7], "configur": 5, "invis": [5, 6], "wise": 5, "euclidean": 5, "terminolog": 5, "mid": 5, "imaginari": 5, "gaussint": 5, "im": 5, "pointwis": [5, 7, 8], "root": [5, 6, 11], "ac": 5, "bci": 5, "adi": 5, "bd": 5, "bc": 5, "hasmul": 5, "zero_def": 5, "one_def": 5, "add_def": 5, "neg_def": 5, "mul_def": 5, "zero_r": 5, "zero_im": 5, "one_r": 5, "one_im": 5, "add_r": 5, "add_im": 5, "neg_r": 5, "neg_im": 5, "mul_r": 5, "mul_im": 5, "surprisingli": [5, 6], "concept": [5, 7, 8], "light": 5, "bulb": 5, "skeleton": [5, 7], "scari": 5, "instcommr": 5, "left_distrib": [5, 6], "right_distrib": [5, 6], "ext_iff": 5, "bq": 5, "archetyp": 5, "int": [5, 6], "ediv_add_emod": 5, "emod_nonneg": 5, "emod_lt": 5, "unit": [5, 6, 7], "algorithm": 5, "conjug": 5, "frac": 5, "nearest": 5, "size": 5, "vi": 5, "multipli": 5, "emb": 5, "forth": 5, "quadrat": 5, "gaussianint": 5, "stai": 5, "face": [5, 6, 7], "machineri": [5, 6, 7], "adapt": 5, "invest": 5, "pragmat": 5, "seek": 5, "heather": 5, "macbeth": 5, "eleg": 5, "div": 5, "mod": 5, "_add_mod": 5, "abs_mod": 5, "_le": 5, "emod_lt_of_po": 5, "zero_lt_two": 5, "fixm": 5, "_eq": 5, "sq_add_sq_eq_zero": 5, "linearorderedr": 5, "norm_nonneg": [5, 8], "norm_eq_zero": [5, 8], "norm_po": 5, "norm_mul": [5, 8], "conj": 5, "conj_r": 5, "conj_im": 5, "norm_conj": 5, "bespok": 5, "quad": 5, "record": [5, 6], "div_def": 5, "mod_def": 5, "messi": 5, "nicer": [5, 7], "norm_mod_lt": 5, "norm_y_po": 5, "sq_ab": 5, "gcongr": 5, "ediv_mul_l": 5, "le_of_mul_le_mul_right": 5, "ediv_lt_of_lt_mul": 5, "natab": 5, "coe_natabs_norm": 5, "natabs_of_nonneg": 5, "natabs_norm_mod_lt": 5, "ofnat_lt": 5, "coe_natab": 5, "not_norm_mul_left_lt_norm": 5, "natabs_mul": 5, "le_mul_of_one_le_right": 5, "ofnat_l": 5, "add_one_le_of_lt": 5, "euclideandomain": 5, "quotient_mul_add_remainder_eq": 5, "quotient_zero": 5, "r_wellfound": 5, "remainder_lt": 5, "mul_left_not_lt": 5, "payoff": 5, "principalidealr": 5, "irreducible_iff_prim": 5, "studi": [6, 7], "prematur": 6, "technolog": 6, "simpler": 6, "ring\u2081": 6, "gradual": [6, 7], "bottom": [6, 7], "endow": 6, "one\u2081": 6, "heavier": 6, "inferr": 6, "resolut": 6, "ie": [6, 7], "attribut": 6, "ensur": [6, 7], "self": 6, "one\u2082": 6, "usabl": 6, "silli": 6, "affect": 6, "importantli": 6, "habit": 6, "ascript": 6, "messag": 6, "typeclass": 6, "stuck": 6, "metavari": 6, "263": 6, "auto": 6, "sever": [6, 7, 9], "unknown": 6, "collis": 6, "builtin": 6, "\ud835\udfd9": 6, "inherit_doc": 6, "diamond": 6, "dia\u2081": 6, "dia": 6, "infixl": 6, "70": 6, "semigroup": 6, "dia_assoc": 6, "semigroup\u2081": 6, "todia\u2081": 6, "previous": 6, "semigroup\u2082": 6, "hurdl": 6, "neutral": 6, "diaoneclass\u2081": 6, "one_dia": 6, "dia_on": 6, "trace": 6, "info": 6, "ters": 6, "expend": 6, "attempt": 6, "succe": 6, "success": 6, "set_opt": 6, "synthinst": 6, "monoid\u2081": 6, "hide": [6, 7], "subtleti": 6, "fear": 6, "unrel": 6, "tosemigroup\u2081": 6, "todiaoneclass\u2081": 6, "monoid\u2082": 6, "toone\u2081": 6, "overlap": 6, "tear": 6, "signatur": 6, "restor": 6, "optim": [6, 9], "reusabl": 6, "inv\u2081": 6, "postfix": 6, "inv_dia": 6, "weak": 6, "preliminari": 6, "left_inv_eq_right_inv\u2081": 6, "hba": 6, "hac": 6, "export": 6, "inv_eq_of_dia": 6, "dia_inv": 6, "naiv": [6, 7], "duplic": 6, "to_addit": 6, "semi": 6, "left_inv_eq_right_inv": 6, "left_neg_eq_right_neg": 6, "whatsnew": 6, "addsemigroup\u2083": 6, "add_assoc\u2083": 6, "semigroup\u2083": 6, "mul_assoc\u2083": 6, "addmonoid\u2083": 6, "addzeroclass": 6, "monoid\u2083": 6, "muloneclass": 6, "tomuloneclass": 6, "addcommsemigroup\u2083": 6, "commsemigroup\u2083": 6, "addcommmonoid\u2083": 6, "commmonoid\u2083": 6, "addgroup\u2083": 6, "neg_add": 6, "group\u2083": 6, "inv_mul": 6, "inv_eq_of_mul": 6, "propag": 6, "attr": 6, "mul_inv": 6, "mul_left_cancel\u2083": 6, "mul_right_cancel\u2083": 6, "addcommgroup\u2083": 6, "commgroup\u2083": 6, "demonstr": [6, 7], "opposit": [6, 7], "gain": 6, "besid": 6, "parent": 6, "ring\u2083": 6, "mulzeroclass": 6, "toaddgroup\u2083": 6, "mayb": 6, "claus": 6, "le\u2081": 6, "50": 6, "\u2081": 6, "preorder\u2081": 6, "partialorder\u2081": 6, "orderedcommmonoid\u2081": 6, "modul": 6, "pretend": 6, "smul\u2083": 6, "infixr": 6, "73": 6, "module\u2081": 6, "zero_smul": 6, "one_smul": 6, "mul_smul": 6, "add_smul": 6, "smul_add": 6, "surpris": 6, "toaddcommgroup\u2083": 6, "inst": 6, "module\u2083": 6, "hunt": 6, "unspecifi": 6, "embark": 6, "quest": 6, "huge": 6, "trap": 6, "refus": [6, 7], "tosmul\u2083": 6, "inst_1": 6, "safe": 6, "selfmodul": 6, "invert": 6, "nsmul\u2081": 6, "zsmul\u2081": 6, "ofnat": 6, "negsucc": 6, "intermedi": [6, 7], "abgrpmodul": 6, "failur": 6, "synth": 6, "indirect": 6, "path": 6, "thank": [6, 7], "offend": 6, "poor": 6, "forget": 6, "http": 6, "inria": 6, "hal": 6, "scienc": 6, "02463336": 6, "modifi": 6, "nsmul": 6, "addmonoid\u2084": 6, "nsmul_zero": 6, "nsmul_succ": 6, "mysmul": 6, "stori": 6, "incorpor": 6, "zsmul": 6, "lt\u2081": 6, "comparison": 6, "ismonoidhom\u2081": 6, "unpleas": [6, 7], "conjunct": [6, 11], "chose": 6, "ismonoidhom\u2082": 6, "map_on": 6, "map_mul": 6, "tempt": 6, "higher": 6, "unif": 6, "psycholog": 6, "rare": 6, "adject": 6, "bare": 6, "noun": 6, "argu": 6, "continuous_id": [6, 7], "primari": 6, "monoidhom\u2081": 6, "coefun": 6, "coerc": 6, "coe": 6, "addmonoidhom\u2081": 6, "addmonoid": 6, "map_zero": 6, "map_add": [6, 8], "ringhom\u2081": 6, "minor": [6, 8], "tomonoidhom\u2081": 6, "juggl": 6, "monoidhomclass\u2081": 6, "badinst": 6, "wouldn": 6, "priori": 6, "boil": 6, "hopelessli": 6, "checksynthord": 6, "random": 6, "deduc": [6, 7], "outparam": 6, "trigger": 6, "retri": 6, "monoidhomclass\u2082": 6, "promis": [6, 7], "map_inv_of_inv": 6, "got": 6, "presenc": 6, "layer": [6, 7], "funlik": 6, "monoidhomclass": 6, "monoidhomclass\u2083": 6, "coe_inject": 6, "stop": 6, "ringhomclass\u2083": 6, "ringhom": 6, "algebrahom": 6, "ve": [6, 7], "primarili": [6, 7], "unbundl": 6, "orderpreshom": 6, "le_of_l": 6, "orderpresmonoidhom": 6, "orderpreshomclass": 6, "subgroup": 6, "subr": 6, "reus": 6, "led": 6, "descend": 6, "break": 6, "barrier": 6, "setlik": 6, "wrap": [6, 7], "submonoid\u2081": 6, "submonoid": 6, "mul_mem": 6, "one_mem": 6, "tackl": 6, "setco": 6, "submonoid\u2081monoid": 6, "destructur": 6, "binder": 6, "submonoidclass\u2081": 6, "subgroup\u2081": 6, "subgroupclass\u2081": 6, "subobject": 6, "s\u2081": 6, "s\u2082": 6, "shame": 6, "across": 6, "weird": [6, 7], "distract": 6, "emphas": 6, "anecdot": 6, "devic": 6, "hasquoti": 6, "bewar": 6, "regular": [6, 7], "ascii": 6, "setoid": 6, "commmonoid": 6, "iseqv": 6, "hw": 6, "quotientmonoid": 6, "map\u2082": 6, "calculu": [7, 9, 11], "quantiti": 7, "begun": 7, "paradox": 7, "exot": 7, "x\u2080": [7, 8], "convention": 7, "eight": 7, "varieti": 7, "wish": 7, "64": 7, "y\u2080": 7, "z\u2080": 7, "paragraph": 7, "512": 7, "bourbaki": 7, "spell": 7, "dualli": 7, "neighborhood": 7, "attop": [7, 9], "\ud835\udcdd": [7, 8, 9], "\ud835\udce4": 7, "entourag": 7, "\u03bc": [7, 9], "a_": 7, "univ_set": 7, "sets_of_superset": 7, "inter_set": 7, "blur": 7, "princip": 7, "\ud835\udcdf": 7, "opportun": 7, "x_0": 7, "ioo": [7, 8], "tendsto\u2081": 7, "tendsto": [7, 9], "lim_": 7, "abstractli": 7, "salient": 7, "pushforward": 7, "f_": 7, "tendsto\u2082": 7, "via": 7, "leverag": 7, "map_mono": 7, "map_map": 7, "shot": 7, "256": 7, "pullback": 7, "comap": 7, "map_le_iff_le_comap": 7, "contravari": 7, "comap_comap": 7, "plane": 7, "\u02e2": 7, "nhds_prod_eq": 7, "aforement": 7, "le_inf_iff": 7, "shouldn": 7, "prohibit": 7, "global": 7, "precondit": 7, "closur": 7, "nebot": 7, "tour": [7, 8], "claim": 7, "recaptur": 7, "superfici": 7, "stronger": 7, "famili": [7, 8], "\u03b9": [7, 8, 9], "flexibl": 7, "hasbasi": 7, "nhds_basis_ioo_po": 7, "has_basi": 7, "tendsto_iff": 7, "reformul": 7, "ici": 7, "attop_basi": 7, "knew": 7, "gave": 7, "n_p": 7, "n_q": 7, "tiresom": 7, "\u1da0": [7, 8, 9], "superscript": 7, "hp": 7, "hq": 7, "eventually_eq": 7, "tendsto_congr": 7, "review": 7, "eventually_of_foral": 7, "mono": 7, "item": 7, "filter_upward": 7, "hr": 7, "ae": [7, 9], "aka": 7, "occasion": 7, "frequent": 7, "sophist": 7, "mem_closure_of_tendsto": 7, "clusterpt": 7, "mem_closure_iff_clusterpt": 7, "le_principal_iff": 7, "nebot_of_l": 7, "hux": 7, "hum": 7, "dist_eq_zero": 7, "emetricspac": 7, "pseudometricspac": 7, "pseudoemetricspac": 7, "journei": 7, "recast": 7, "tendsto_attop": 7, "continuous_iff": 7, "devot": 7, "uncurri": 7, "slow": 7, "continuous_fst": 7, "comp": 7, "assembl": 7, "prod_mk": 7, "continuous_snd": 7, "continuous_dist": 7, "clunki": 7, "crucial": 7, "elabor": 7, "prod_map": 7, "sad": 7, "border": 7, "obfusc": 7, "continuous_pow": 7, "continuousat": [7, 9], "continuousat_iff": 7, "geometr": 7, "closedbal": 7, "sign": 7, "radiu": 7, "mem_ball_self": 7, "mem_closedball_self": 7, "isopen": 7, "isopen_iff": 7, "Their": [7, 8], "isclos": [7, 8], "s\u1d9c": [7, 9], "isopen_compl_iff": 7, "hu": [7, 8], "mem_of_tendsto": 7, "mem_closure_iff": 7, "mem_closure_iff_seq_limit": 7, "nhds_basis_bal": 7, "nhds_basis_closedbal": 7, "mem_iff": 7, "segment": [7, 9], "somewher": 7, "continuouson": [7, 8], "minimum": 7, "iscompact": 7, "icc": [7, 8], "iscompact_icc": 7, "\u03c6": 7, "strictmono": 7, "tendsto_subseq": 7, "exists_forall_l": 7, "exists_forall_g": 7, "compactspac": 7, "iscompact_univ": 7, "cauchi": 7, "uniformcontinu": 7, "uniformcontinuous_iff": 7, "clearli": 7, "isclosed_l": 7, "eq_empty_or_nonempti": 7, "attain": 7, "cauchyseq": 7, "cauchyseq_iff": 7, "completespac": [7, 8, 9], "cauchyseq_tendsto_of_complet": 7, "criterion": 7, "tendsto_pow_attop_nhds_0_of_lt_1": 7, "dist_le_range_sum_dist": 7, "cauchyseq_of_le_geometric_two": 7, "\u03b5_po": [7, 8], "le_iff_exists_add": 7, "boss": 7, "bair": [7, 8], "exclam": 7, "induct": [7, 11], "rec_on": 7, "ho": 7, "hd": 7, "dens": 7, "densiti": 7, "\u03b4po": 7, "hpo": 7, "hball": 7, "mem_closure_iff_nhds_basi": 7, "recon": 7, "rpo": 7, "rb": 7, "incl": 7, "cdist": 7, "ylim": 7, "yball": 7, "categor": 7, "topologicalspac": [7, 8], "isopen_univ": 7, "isopen_empti": 7, "isopen_iunion": 7, "fintyp": 7, "isopen_iint": 7, "continuous_def": 7, "attach": 7, "filteri": 7, "sent": 7, "mem_nhds_iff": 7, "digress": 7, "pure_le_nhd": 7, "eventually_eventually_nhd": 7, "topological_spac": 7, "mk_of_nhd": 7, "nhds_mk_of_nhd": 7, "functori": 7, "induc": 7, "sensibl": 7, "uncount": 7, "relatedli": 7, "coinduc": 7, "t_x": 7, "t_y": 7, "coinduced_le_iff_le_induc": 7, "covari": 7, "coinduced_compos": 7, "induced_compos": 7, "topological_structur": 7, "focus": 7, "nhd": 7, "recov": 7, "continuous_iff_coinduced_l": 7, "g_": 7, "t_z": 7, "wasn": 7, "\u03c0": [7, 8], "t_": 7, "x_i": 7, "pi": 7, "price": 7, "patholog": 7, "t2_space": 7, "hausdorff": 7, "t2space": 7, "tendsto_nhds_uniqu": 7, "regularspac": 7, "closed_nhds_basi": 7, "nhds_basis_open": 7, "denseinduc": 7, "continuousat_extend": 7, "funni": 7, "_in": 7, "nhds_induc": 7, "is_open": 7, "fortiori": 7, "f_cont": 7, "tendsto_right_iff": 7, "firstcountabletopolog": 7, "cluster": 7, "at_top": 7, "hfx": 7, "push_pul": 7, "of_map": 7, "f_ne": 7, "f_le": 7, "map_eq": 7, "hne": 7, "hle": 7, "huo": 7, "hsu": 7, "elim_finite_subcov": 7, "9": 8, "introductori": 8, "hasderivat": [8, 9], "hasderivat_sin": 8, "differentiable_at": 8, "differentiableat": 8, "inconveni": 8, "deriv_zero_of_not_differentiableat": 8, "deriv_add": 8, "islocalmin": 8, "deriv_eq_zero": 8, "ev": 8, "roll": 8, "weirder": 8, "hab": 8, "hfc": 8, "hfi": 8, "exists_deriv_eq_zero": 8, "differentiableon": 8, "exists_deriv_eq_slop": 8, "normedaddcommgroup": [8, 9], "norm_add_l": 8, "infer_inst": [8, 9], "normed_spac": 8, "normed_add_group": 8, "stipul": 8, "normedspac": [8, 9], "norm_smul": 8, "banach": [8, 9], "dimension": [8, 9], "finitedimension": [8, 9], "\ud835\udd5c": [8, 9], "nontriviallynormedfield": [8, 9], "normedfield": 8, "exists_one_lt_norm": 8, "nondiscret": 8, "continuouslinearmap": 8, "cont": 8, "map_smul": 8, "le_op_norm": 8, "hmp": 8, "op_norm_le_bound": 8, "steinhau": 8, "bounded": 8, "uniformli": 8, "nonempty_interior_of_union_of_clos": 8, "continuous_linear_map": 8, "op_norm_le_of_shel": 8, "interior_subset": 8, "interior_inter_subset": 8, "is_closed_l": 8, "hc": 8, "h\u03b5": 8, "real_norm_l": 8, "\u03b5k_po": 8, "o": 8, "normedgroup": 8, "isbigowith": 8, "isbigowith_iff": 8, "isbigo_iff_isbigowith": 8, "islittleo_iff_forall_isbigowith": 8, "hasfderivat": 8, "fderiv": 8, "fr\u00e9chet": 8, "hff": 8, "iter": 8, "multilinear": 8, "with_top": 8, "infti": 8, "cont_diff": 8, "iteratedfderiv": 8, "withtop": 8, "contdiff": 8, "contdiff_iff_continuous_differenti": 8, "stricter": 8, "hasstrictfderivat": 8, "\ud835\udd42": 8, "isrorc": 8, "contdiffat": 8, "localinvers": 8, "eventually_left_invers": 8, "eventually_right_invers": 8, "to_localinvers": 8, "hasfderivwithinat": [8, 9], "hasfderivatfilt": 8, "measuretheori": 9, "intervalintegr": 9, "integral_id": 9, "integral_one_div": 9, "differenti": [9, 11], "integral_hasstrictderivat_right": 9, "stronglymeasurableatfilt": 9, "volum": 9, "integral_eq_sub_of_hasderivat": 9, "convolut": 9, "bochner": 9, "lebesgu": 9, "measurablespac": 9, "countabl": 9, "encod": 9, "measurableset": 9, "compl": 9, "iunion": 9, "iinter": 9, "measure_eq_iinf": 9, "measure_iunion_l": 9, "hmea": 9, "hdi": 9, "pairwis": 9, "m_iunion": 9, "\u1d50": 9, "integral_add": 9, "ennreal": 9, "toreal": 9, "send": 9, "to_real": 9, "set_integral_const": 9, "domin": 9, "converg": [9, 11], "aestronglymeasur": 9, "hbound": 9, "hlim": 9, "tendsto_integral_of_dominated_converg": 9, "fubini": 9, "sigmafinit": 9, "\u03bd": 9, "integral_prod": 9, "bilinear": 9, "formula": 9, "borelspac": 9, "isaddhaarmeasur": 9, "invari": 9, "mass": 9, "compact": 9, "h_inj": 9, "det": 9, "integral_image_eq_integral_abs_det_fderiv_smul": 9, "overview": 11, "schr\u00f6der": 11, "bernstein": 11, "irrat": 11}, "objects": {}, "objtypes": {}, "objnames": {}, "titleterms": {"introduct": 0, "get": 0, "start": 0, "overview": 0, "basic": [1, 6], "calcul": 1, "prove": 1, "ident": 1, "algebra": [1, 5], "structur": [1, 5], "us": 1, "theorem": [1, 3], "lemma": 1, "more": 1, "exampl": 1, "appli": 1, "rw": 1, "fact": 1, "about": 1, "logic": 2, "implic": 2, "univers": 2, "quantifi": 2, "The": [2, 3], "existenti": 2, "negat": 2, "conjunct": 2, "bi": 2, "disjunct": 2, "sequenc": 2, "converg": [2, 7], "set": [3, 7], "function": [3, 7], "schr\u00f6der": 3, "bernstein": 3, "elementari": [4, 8, 9], "number": 4, "theori": [4, 9], "irrat": 4, "root": 4, "induct": 4, "recurs": 4, "infinit": 4, "mani": 4, "prime": 4, "defin": 5, "build": 5, "gaussian": 5, "integ": 5, "hierarchi": 6, "morphism": 6, "sub": 6, "object": 6, "topolog": 7, "filter": 7, "metric": 7, "space": [7, 8], "continu": [7, 8], "ball": 7, "open": 7, "close": 7, "compact": 7, "uniformli": 7, "complet": 7, "fundament": 7, "separ": 7, "countabl": 7, "differenti": 8, "calculu": 8, "norm": 8, "linear": 8, "map": 8, "asymptot": 8, "comparison": 8, "integr": 9, "measur": 9, "index": 10, "mathemat": 11, "lean": 11}, "envversion": {"sphinx.domains.c": 2, "sphinx.domains.changeset": 1, "sphinx.domains.citation": 1, "sphinx.domains.cpp": 6, "sphinx.domains.index": 1, "sphinx.domains.javascript": 2, "sphinx.domains.math": 2, "sphinx.domains.python": 3, "sphinx.domains.rst": 2, "sphinx.domains.std": 2, "sphinx": 56}})
-
-