path
stringlengths
12
84
imports
sequencelengths
0
4.45k
premises
listlengths
0
625
Mathlib/NumberTheory/ClassNumber/FunctionField.lean
[ "Mathlib/NumberTheory/FunctionField.lean", ".lake/packages/lean4/src/lean/Init.lean", "Mathlib/NumberTheory/ClassNumber/AdmissibleCardPowDegree.lean", "Mathlib/NumberTheory/ClassNumber/Finite.lean" ]
[ { "full_name": "FunctionField.classNumber", "code": "noncomputable def classNumber : ℕ :=\n Fintype.card (ClassGroup (ringOfIntegers Fq F))", "start": [ 47, 1 ], "end": [ 49, 50 ], "kind": "commanddeclaration" }, { "full_name": "FunctionField.classNumber_eq_one_iff", "code": "theorem classNumber_eq_one_iff :\n classNumber Fq F = 1 ↔ IsPrincipalIdealRing (ringOfIntegers Fq F)", "start": [ 52, 1 ], "end": [ 55, 29 ], "kind": "commanddeclaration" } ]
Mathlib/LinearAlgebra/Projectivization/Independence.lean
[ ".lake/packages/lean4/src/lean/Init.lean", "Mathlib/LinearAlgebra/Projectivization/Basic.lean" ]
[ { "full_name": "Projectivization.Independent", "code": "inductive Independent : (ι → ℙ K V) → Prop\n | mk (f : ι → V) (hf : ∀ i : ι, f i ≠ 0) (hl : LinearIndependent K f) :\n Independent fun i => mk K (f i) (hf i)", "start": [ 39, 1 ], "end": [ 43, 43 ], "kind": "commanddeclaration" }, { "full_name": "Projectivization.independent_iff", "code": "theorem independent_iff : Independent f ↔ LinearIndependent K (Projectivization.rep ∘ f)", "start": [ 46, 1 ], "end": [ 58, 24 ], "kind": "commanddeclaration" }, { "full_name": "Projectivization.independent_iff_completeLattice_independent", "code": "theorem independent_iff_completeLattice_independent :\n Independent f ↔ CompleteLattice.Independent fun i => (f i).submodule", "start": [ 61, 1 ], "end": [ 72, 30 ], "kind": "commanddeclaration" }, { "full_name": "Projectivization.Dependent", "code": "inductive Dependent : (ι → ℙ K V) → Prop\n | mk (f : ι → V) (hf : ∀ i : ι, f i ≠ 0) (h : ¬LinearIndependent K f) :\n Dependent fun i => mk K (f i) (hf i)", "start": [ 75, 1 ], "end": [ 79, 41 ], "kind": "commanddeclaration" }, { "full_name": "Projectivization.dependent_iff", "code": "theorem dependent_iff : Dependent f ↔ ¬LinearIndependent K (Projectivization.rep ∘ f)", "start": [ 82, 1 ], "end": [ 94, 39 ], "kind": "commanddeclaration" }, { "full_name": "Projectivization.dependent_iff_not_independent", "code": "theorem dependent_iff_not_independent : Dependent f ↔ ¬Independent f", "start": [ 97, 1 ], "end": [ 99, 38 ], "kind": "commanddeclaration" }, { "full_name": "Projectivization.independent_iff_not_dependent", "code": "theorem independent_iff_not_dependent : Independent f ↔ ¬Dependent f", "start": [ 102, 1 ], "end": [ 104, 56 ], "kind": "commanddeclaration" }, { "full_name": "Projectivization.dependent_pair_iff_eq", "code": "@[simp]\ntheorem dependent_pair_iff_eq (u v : ℙ K V) : Dependent ![u, v] ↔ u = v", "start": [ 107, 1 ], "end": [ 114, 31 ], "kind": "commanddeclaration" }, { "full_name": "Projectivization.independent_pair_iff_neq", "code": "@[simp]\ntheorem independent_pair_iff_neq (u v : ℙ K V) : Independent ![u, v] ↔ u ≠ v", "start": [ 117, 1 ], "end": [ 120, 64 ], "kind": "commanddeclaration" } ]
Mathlib/Combinatorics/Additive/AP/Three/Behrend.lean
[ "Mathlib/Data/Complex/ExponentialBounds.lean", "Mathlib/Combinatorics/Additive/AP/Three/Defs.lean", ".lake/packages/lean4/src/lean/Init.lean", "Mathlib/Analysis/InnerProductSpace/PiL2.lean", "Mathlib/Combinatorics/Pigeonhole.lean" ]
[ { "full_name": "threeAPFree_frontier", "code": "lemma threeAPFree_frontier {𝕜 E : Type*} [LinearOrderedField 𝕜] [TopologicalSpace E]\n [AddCommMonoid E] [Module 𝕜 E] {s : Set E} (hs₀ : IsClosed s) (hs₁ : StrictConvex 𝕜 s) :\n ThreeAPFree (frontier s) := by\n intro a ha b hb c hc habc\n obtain rfl : (1 / 2 : 𝕜) • a + (1 / 2 : 𝕜) • c = b := by\n rwa [← smul_add, one_div, inv_smul_eq_iff₀ (show (2 : 𝕜) ≠ 0 by norm_num), two_smul]\n have :=\n hs₁.eq (hs₀.frontier_subset ha) (hs₀.frontier_subset hc) one_half_pos one_half_pos\n (add_halves _) hb.2\n simp [this, ← add_smul]\n ring_nf\n simp", "start": [ 51, 1 ], "end": [ 65, 7 ], "kind": "lemma" }, { "full_name": "threeAPFree_sphere", "code": "lemma threeAPFree_sphere {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E]\n [StrictConvexSpace ℝ E] (x : E) (r : ℝ) : ThreeAPFree (sphere x r) := by\n obtain rfl | hr := eq_or_ne r 0\n · rw [sphere_zero]\n exact threeAPFree_singleton _\n · convert threeAPFree_frontier isClosed_ball (strictConvex_closedBall ℝ x r)\n exact (frontier_closedBall _ hr).symm", "start": [ 68, 1 ], "end": [ 74, 42 ], "kind": "lemma" }, { "full_name": "Behrend.box", "code": "def box (n d : ℕ) : Finset (Fin n → ℕ) :=\n Fintype.piFinset fun _ => range d", "start": [ 92, 1 ], "end": [ 94, 36 ], "kind": "commanddeclaration" }, { "full_name": "Behrend.mem_box", "code": "theorem mem_box : x ∈ box n d ↔ ∀ i, x i < d", "start": [ 97, 1 ], "end": [ 97, 100 ], "kind": "commanddeclaration" }, { "full_name": "Behrend.card_box", "code": "@[simp]\ntheorem card_box : (box n d).card = d ^ n", "start": [ 100, 1 ], "end": [ 101, 59 ], "kind": "commanddeclaration" }, { "full_name": "Behrend.box_zero", "code": "@[simp]\ntheorem box_zero : box (n + 1) 0 = ∅", "start": [ 104, 1 ], "end": [ 105, 54 ], "kind": "commanddeclaration" }, { "full_name": "Behrend.sphere", "code": "def sphere (n d k : ℕ) : Finset (Fin n → ℕ) :=\n (box n d).filter fun x => ∑ i, x i ^ 2 = k", "start": [ 108, 1 ], "end": [ 111, 45 ], "kind": "commanddeclaration" }, { "full_name": "Behrend.sphere_zero_subset", "code": "theorem sphere_zero_subset : sphere n d 0 ⊆ 0", "start": [ 114, 1 ], "end": [ 114, 96 ], "kind": "commanddeclaration" }, { "full_name": "Behrend.sphere_zero_right", "code": "@[simp]\ntheorem sphere_zero_right (n k : ℕ) : sphere (n + 1) 0 k = ∅", "start": [ 117, 1 ], "end": [ 118, 81 ], "kind": "commanddeclaration" }, { "full_name": "Behrend.sphere_subset_box", "code": "theorem sphere_subset_box : sphere n d k ⊆ box n d", "start": [ 121, 1 ], "end": [ 122, 20 ], "kind": "commanddeclaration" }, { "full_name": "Behrend.norm_of_mem_sphere", "code": "theorem norm_of_mem_sphere {x : Fin n → ℕ} (hx : x ∈ sphere n d k) :\n ‖(WithLp.equiv 2 _).symm ((↑) ∘ x : Fin n → ℝ)‖ = √↑k", "start": [ 125, 1 ], "end": [ 129, 66 ], "kind": "commanddeclaration" }, { "full_name": "Behrend.sphere_subset_preimage_metric_sphere", "code": "theorem sphere_subset_preimage_metric_sphere : (sphere n d k : Set (Fin n → ℕ)) ⊆\n (fun x : Fin n → ℕ => (WithLp.equiv 2 _).symm ((↑) ∘ x : Fin n → ℝ)) ⁻¹'\n Metric.sphere (0 : PiLp 2 fun _ : Fin n => ℝ) (√↑k)", "start": [ 132, 1 ], "end": [ 135, 88 ], "kind": "commanddeclaration" }, { "full_name": "Behrend.map", "code": "@[simps]\ndef map (d : ℕ) : (Fin n → ℕ) →+ ℕ where\n toFun a := ∑ i, a i * d ^ (i : ℕ)\n map_zero' := by simp_rw [Pi.zero_apply, zero_mul, sum_const_zero]\n map_add' a b := by simp_rw [Pi.add_apply, add_mul, sum_add_distrib]", "start": [ 138, 1 ], "end": [ 143, 70 ], "kind": "commanddeclaration" }, { "full_name": "Behrend.map_zero", "code": "theorem map_zero (d : ℕ) (a : Fin 0 → ℕ) : map d a = 0", "start": [ 147, 1 ], "end": [ 147, 72 ], "kind": "commanddeclaration" }, { "full_name": "Behrend.map_succ", "code": "theorem map_succ (a : Fin (n + 1) → ℕ) :\n map d a = a 0 + (∑ x : Fin n, a x.succ * d ^ (x : ℕ)) * d", "start": [ 150, 1 ], "end": [ 152, 73 ], "kind": "commanddeclaration" }, { "full_name": "Behrend.map_succ'", "code": "theorem map_succ' (a : Fin (n + 1) → ℕ) : map d a = a 0 + map d (a ∘ Fin.succ) * d", "start": [ 155, 1 ], "end": [ 156, 13 ], "kind": "commanddeclaration" }, { "full_name": "Behrend.map_monotone", "code": "theorem map_monotone (d : ℕ) : Monotone (map d : (Fin n → ℕ) → ℕ)", "start": [ 159, 1 ], "end": [ 160, 67 ], "kind": "commanddeclaration" }, { "full_name": "Behrend.map_mod", "code": "theorem map_mod (a : Fin n.succ → ℕ) : map d a % d = a 0 % d", "start": [ 163, 1 ], "end": [ 164, 44 ], "kind": "commanddeclaration" }, { "full_name": "Behrend.map_eq_iff", "code": "theorem map_eq_iff {x₁ x₂ : Fin n.succ → ℕ} (hx₁ : ∀ i, x₁ i < d) (hx₂ : ∀ i, x₂ i < d) :\n map d x₁ = map d x₂ ↔ x₁ 0 = x₂ 0 ∧ map d (x₁ ∘ Fin.succ) = map d (x₂ ∘ Fin.succ)", "start": [ 167, 1 ], "end": [ 173, 56 ], "kind": "commanddeclaration" }, { "full_name": "Behrend.map_injOn", "code": "theorem map_injOn : {x : Fin n → ℕ | ∀ i, x i < d}.InjOn (map d)", "start": [ 176, 1 ], "end": [ 185, 16 ], "kind": "commanddeclaration" }, { "full_name": "Behrend.map_le_of_mem_box", "code": "theorem map_le_of_mem_box (hx : x ∈ box n d) :\n map (2 * d - 1) x ≤ ∑ i : Fin n, (d - 1) * (2 * d - 1) ^ (i : ℕ)", "start": [ 188, 1 ], "end": [ 190, 75 ], "kind": "commanddeclaration" }, { "full_name": "Behrend.threeAPFree_sphere", "code": "nonrec theorem threeAPFree_sphere : ThreeAPFree (sphere n d k : Set (Fin n → ℕ))", "start": [ 193, 1 ], "end": [ 202, 27 ], "kind": "commanddeclaration" }, { "full_name": "Behrend.threeAPFree_image_sphere", "code": "theorem threeAPFree_image_sphere :\n ThreeAPFree ((sphere n d k).image (map (2 * d - 1)) : Set ℕ)", "start": [ 205, 1 ], "end": [ 216, 12 ], "kind": "commanddeclaration" }, { "full_name": "Behrend.sum_sq_le_of_mem_box", "code": "theorem sum_sq_le_of_mem_box (hx : x ∈ box n d) : ∑ i : Fin n, x i ^ 2 ≤ n * (d - 1) ^ 2", "start": [ 219, 1 ], "end": [ 223, 93 ], "kind": "commanddeclaration" }, { "full_name": "Behrend.sum_eq", "code": "theorem sum_eq : (∑ i : Fin n, d * (2 * d + 1) ^ (i : ℕ)) = ((2 * d + 1) ^ n - 1) / 2", "start": [ 226, 1 ], "end": [ 229, 55 ], "kind": "commanddeclaration" }, { "full_name": "Behrend.sum_lt", "code": "theorem sum_lt : (∑ i : Fin n, d * (2 * d + 1) ^ (i : ℕ)) < (2 * d + 1) ^ n", "start": [ 232, 1 ], "end": [ 233, 92 ], "kind": "commanddeclaration" }, { "full_name": "Behrend.card_sphere_le_rothNumberNat", "code": "theorem card_sphere_le_rothNumberNat (n d k : ℕ) :\n (sphere n d k).card ≤ rothNumberNat ((2 * d - 1) ^ n)", "start": [ 236, 1 ], "end": [ 251, 48 ], "kind": "commanddeclaration" }, { "full_name": "Behrend.exists_large_sphere_aux", "code": "theorem exists_large_sphere_aux (n d : ℕ) : ∃ k ∈ range (n * (d - 1) ^ 2 + 1),\n (↑(d ^ n) / ((n * (d - 1) ^ 2 :) + 1) : ℝ) ≤ (sphere n d k).card", "start": [ 264, 1 ], "end": [ 271, 35 ], "kind": "commanddeclaration" }, { "full_name": "Behrend.exists_large_sphere", "code": "theorem exists_large_sphere (n d : ℕ) :\n ∃ k, ((d ^ n :) / (n * d ^ 2 :) : ℝ) ≤ (sphere n d k).card", "start": [ 274, 1 ], "end": [ 291, 25 ], "kind": "commanddeclaration" }, { "full_name": "Behrend.bound_aux'", "code": "theorem bound_aux' (n d : ℕ) : ((d ^ n :) / (n * d ^ 2 :) : ℝ) ≤ rothNumberNat ((2 * d - 1) ^ n)", "start": [ 294, 1 ], "end": [ 296, 61 ], "kind": "commanddeclaration" }, { "full_name": "Behrend.bound_aux", "code": "theorem bound_aux (hd : d ≠ 0) (hn : 2 ≤ n) :\n (d ^ (n - 2 :) / n : ℝ) ≤ rothNumberNat ((2 * d - 1) ^ n)", "start": [ 299, 1 ], "end": [ 303, 21 ], "kind": "commanddeclaration" }, { "full_name": "Behrend.log_two_mul_two_le_sqrt_log_eight", "code": "theorem log_two_mul_two_le_sqrt_log_eight : log 2 * 2 ≤ √(log 8)", "start": [ 312, 1 ], "end": [ 320, 22 ], "kind": "commanddeclaration" }, { "full_name": "Behrend.two_div_one_sub_two_div_e_le_eight", "code": "theorem two_div_one_sub_two_div_e_le_eight : 2 / (1 - 2 / exp 1) ≤ 8", "start": [ 323, 1 ], "end": [ 327, 72 ], "kind": "commanddeclaration" }, { "full_name": "Behrend.le_sqrt_log", "code": "theorem le_sqrt_log (hN : 4096 ≤ N) : log (2 / (1 - 2 / exp 1)) * (69 / 50) ≤ √(log ↑N)", "start": [ 330, 1 ], "end": [ 348, 41 ], "kind": "commanddeclaration" }, { "full_name": "Behrend.exp_neg_two_mul_le", "code": "theorem exp_neg_two_mul_le {x : ℝ} (hx : 0 < x) : exp (-2 * x) < exp (2 - ⌈x⌉₊) / ⌈x⌉₊", "start": [ 351, 1 ], "end": [ 360, 73 ], "kind": "commanddeclaration" }, { "full_name": "Behrend.div_lt_floor", "code": "theorem div_lt_floor {x : ℝ} (hx : 2 / (1 - 2 / exp 1) ≤ x) : x / exp 1 < (⌊x / 2⌋₊ : ℝ)", "start": [ 363, 1 ], "end": [ 371, 22 ], "kind": "commanddeclaration" }, { "full_name": "Behrend.ceil_lt_mul", "code": "theorem ceil_lt_mul {x : ℝ} (hx : 50 / 19 ≤ x) : (⌈x⌉₊ : ℝ) < 1.38 * x", "start": [ 374, 1 ], "end": [ 380, 12 ], "kind": "commanddeclaration" }, { "full_name": "Behrend.nValue", "code": "noncomputable def nValue (N : ℕ) : ℕ :=\n ⌈√(log N)⌉₊", "start": [ 385, 1 ], "end": [ 387, 14 ], "kind": "commanddeclaration" }, { "full_name": "Behrend.dValue", "code": "noncomputable def dValue (N : ℕ) : ℕ := ⌊(N : ℝ) ^ (nValue N : ℝ)⁻¹ / 2⌋₊", "start": [ 390, 1 ], "end": [ 391, 74 ], "kind": "commanddeclaration" }, { "full_name": "Behrend.nValue_pos", "code": "theorem nValue_pos (hN : 2 ≤ N) : 0 < nValue N", "start": [ 394, 1 ], "end": [ 395, 66 ], "kind": "commanddeclaration" }, { "full_name": "Behrend.three_le_nValue", "code": "theorem three_le_nValue (hN : 64 ≤ N) : 3 ≤ nValue N", "start": [ 400, 1 ], "end": [ 409, 14 ], "kind": "commanddeclaration" }, { "full_name": "Behrend.dValue_pos", "code": "theorem dValue_pos (hN₃ : 8 ≤ N) : 0 < dValue N", "start": [ 412, 1 ], "end": [ 430, 54 ], "kind": "commanddeclaration" }, { "full_name": "Behrend.le_N", "code": "theorem le_N (hN : 2 ≤ N) : (2 * dValue N - 1) ^ nValue N ≤ N", "start": [ 433, 1 ], "end": [ 446, 20 ], "kind": "commanddeclaration" }, { "full_name": "Behrend.bound", "code": "theorem bound (hN : 4096 ≤ N) : (N : ℝ) ^ (nValue N : ℝ)⁻¹ / exp 1 < dValue N", "start": [ 450, 1 ], "end": [ 477, 13 ], "kind": "commanddeclaration" }, { "full_name": "Behrend.roth_lower_bound_explicit", "code": "theorem roth_lower_bound_explicit (hN : 4096 ≤ N) :\n (N : ℝ) * exp (-4 * √(log N)) < rothNumberNat N", "start": [ 480, 1 ], "end": [ 511, 38 ], "kind": "commanddeclaration" }, { "full_name": "Behrend.exp_four_lt", "code": "theorem exp_four_lt : exp 4 < 64", "start": [ 514, 1 ], "end": [ 518, 13 ], "kind": "commanddeclaration" }, { "full_name": "Behrend.four_zero_nine_six_lt_exp_sixteen", "code": "theorem four_zero_nine_six_lt_exp_sixteen : 4096 < exp 16", "start": [ 521, 1 ], "end": [ 525, 27 ], "kind": "commanddeclaration" }, { "full_name": "Behrend.lower_bound_le_one'", "code": "theorem lower_bound_le_one' (hN : 2 ≤ N) (hN' : N ≤ 4096) :\n (N : ℝ) * exp (-4 * √(log N)) ≤ 1", "start": [ 528, 1 ], "end": [ 537, 21 ], "kind": "commanddeclaration" }, { "full_name": "Behrend.lower_bound_le_one", "code": "theorem lower_bound_le_one (hN : 1 ≤ N) (hN' : N ≤ 4096) :\n (N : ℝ) * exp (-4 * √(log N)) ≤ 1", "start": [ 540, 1 ], "end": [ 544, 37 ], "kind": "commanddeclaration" }, { "full_name": "Behrend.roth_lower_bound", "code": "theorem roth_lower_bound : (N : ℝ) * exp (-4 * √(log N)) ≤ rothNumberNat N", "start": [ 547, 1 ], "end": [ 553, 42 ], "kind": "commanddeclaration" } ]
Mathlib/Algebra/CharZero/Infinite.lean
[ "Mathlib/Data/Fintype/Card.lean", ".lake/packages/lean4/src/lean/Init.lean", "Mathlib/Algebra/CharZero/Defs.lean" ]
[ { "full_name": "CharZero.infinite", "code": "instance (priority := 100) CharZero.infinite : Infinite M :=\n Infinite.of_injective Nat.cast Nat.cast_injective", "start": [ 19, 1 ], "end": [ 20, 52 ], "kind": "commanddeclaration" } ]
Mathlib/Data/Ordmap/Ordset.lean
[ "Mathlib/Tactic/Linarith.lean", "Mathlib/Data/Ordmap/Ordnode.lean", "Mathlib/Tactic/Abel.lean", "Mathlib/Algebra/Order/Ring/Defs.lean", ".lake/packages/lean4/src/lean/Init.lean", "Mathlib/Algebra/Group/Int.lean", "Mathlib/Data/Nat/Dist.lean" ]
[ { "full_name": "Ordnode.not_le_delta", "code": "theorem not_le_delta {s} (H : 1 ≤ s) : ¬s ≤ delta * 0", "start": [ 79, 1 ], "end": [ 80, 17 ], "kind": "commanddeclaration" }, { "full_name": "Ordnode.delta_lt_false", "code": "theorem delta_lt_false {a b : ℕ} (h₁ : delta * a < b) (h₂ : delta * b < a) : False", "start": [ 83, 1 ], "end": [ 85, 83 ], "kind": "commanddeclaration" }, { "full_name": "Ordnode.realSize", "code": "def realSize : Ordnode α → ℕ\n | nil => 0\n | node _ l _ r => realSize l + realSize r + 1", "start": [ 94, 1 ], "end": [ 97, 48 ], "kind": "commanddeclaration" }, { "full_name": "Ordnode.Sized", "code": "def Sized : Ordnode α → Prop\n | nil => True\n | node s l _ r => s = size l + size r + 1 ∧ Sized l ∧ Sized r", "start": [ 103, 1 ], "end": [ 107, 64 ], "kind": "commanddeclaration" }, { "full_name": "Ordnode.Sized.node'", "code": "theorem Sized.node' {l x r} (hl : @Sized α l) (hr : Sized r) : Sized (node' l x r)", "start": [ 110, 1 ], "end": [ 111, 16 ], "kind": "commanddeclaration" }, { "full_name": "Ordnode.Sized.eq_node'", "code": "theorem Sized.eq_node' {s l x r} (h : @Sized α (node s l x r)) : node s l x r = .node' l x r", "start": [ 114, 1 ], "end": [ 115, 11 ], "kind": "commanddeclaration" }, { "full_name": "Ordnode.Sized.size_eq", "code": "theorem Sized.size_eq {s l x r} (H : Sized (@node α s l x r)) :\n size (@node α s l x r) = size l + size r + 1", "start": [ 118, 1 ], "end": [ 120, 6 ], "kind": "commanddeclaration" }, { "full_name": "Ordnode.Sized.induction", "code": "@[elab_as_elim]\ntheorem Sized.induction {t} (hl : @Sized α t) {C : Ordnode α → Prop} (H0 : C nil)\n (H1 : ∀ l x r, C l → C r → C (.node' l x r)) : C t", "start": [ 123, 1 ], "end": [ 130, 51 ], "kind": "commanddeclaration" }, { "full_name": "Ordnode.size_eq_realSize", "code": "theorem size_eq_realSize : ∀ {t : Ordnode α}, Sized t → size t = realSize t", "start": [ 133, 1 ], "end": [ 136, 65 ], "kind": "commanddeclaration" }, { "full_name": "Ordnode.Sized.size_eq_zero", "code": "@[simp]\ntheorem Sized.size_eq_zero {t : Ordnode α} (ht : Sized t) : size t = 0 ↔ t = nil", "start": [ 139, 1 ], "end": [ 141, 33 ], "kind": "commanddeclaration" }, { "full_name": "Ordnode.Sized.pos", "code": "theorem Sized.pos {s l x r} (h : Sized (@node α s l x r)) : 0 < s", "start": [ 144, 1 ], "end": [ 145, 34 ], "kind": "commanddeclaration" }, { "full_name": "Ordnode.dual_dual", "code": "theorem dual_dual : ∀ t : Ordnode α, dual (dual t) = t", "start": [ 151, 1 ], "end": [ 153, 65 ], "kind": "commanddeclaration" }, { "full_name": "Ordnode.size_dual", "code": "@[simp]\ntheorem size_dual (t : Ordnode α) : size (dual t) = size t", "start": [ 156, 1 ], "end": [ 157, 81 ], "kind": "commanddeclaration" }, { "full_name": "Ordnode.BalancedSz", "code": "def BalancedSz (l r : ℕ) : Prop :=\n l + r ≤ 1 ∨ l ≤ delta * r ∧ r ≤ delta * l", "start": [ 163, 1 ], "end": [ 167, 44 ], "kind": "commanddeclaration" }, { "full_name": "Ordnode.BalancedSz.dec", "code": "instance BalancedSz.dec : DecidableRel BalancedSz := fun _ _ => Or.decidable", "start": [ 170, 1 ], "end": [ 170, 77 ], "kind": "commanddeclaration" }, { "full_name": "Ordnode.Balanced", "code": "def Balanced : Ordnode α → Prop\n | nil => True\n | node _ l _ r => BalancedSz (size l) (size r) ∧ Balanced l ∧ Balanced r", "start": [ 173, 1 ], "end": [ 177, 75 ], "kind": "commanddeclaration" }, { "full_name": "Ordnode.Balanced.dec", "code": "instance Balanced.dec : DecidablePred (@Balanced α)\n | nil => by\n unfold Balanced\n infer_instance\n | node _ l _ r => by\n unfold Balanced\n haveI := Balanced.dec l\n haveI := Balanced.dec r\n infer_instance", "start": [ 180, 1 ], "end": [ 188, 19 ], "kind": "commanddeclaration" }, { "full_name": "Ordnode.BalancedSz.symm", "code": "@[symm]\ntheorem BalancedSz.symm {l r : ℕ} : BalancedSz l r → BalancedSz r l", "start": [ 191, 1 ], "end": [ 193, 47 ], "kind": "commanddeclaration" }, { "full_name": "Ordnode.balancedSz_zero", "code": "theorem balancedSz_zero {l : ℕ} : BalancedSz l 0 ↔ l ≤ 1", "start": [ 196, 1 ], "end": [ 197, 55 ], "kind": "commanddeclaration" }, { "full_name": "Ordnode.balancedSz_up", "code": "theorem balancedSz_up {l r₁ r₂ : ℕ} (h₁ : r₁ ≤ r₂) (h₂ : l + r₂ ≤ 1 ∨ r₂ ≤ delta * l)\n (H : BalancedSz l r₁) : BalancedSz l r₂", "start": [ 200, 1 ], "end": [ 210, 50 ], "kind": "commanddeclaration" }, { "full_name": "Ordnode.balancedSz_down", "code": "theorem balancedSz_down {l r₁ r₂ : ℕ} (h₁ : r₁ ≤ r₂) (h₂ : l + r₂ ≤ 1 ∨ l ≤ delta * r₁)\n (H : BalancedSz l r₂) : BalancedSz l r₁", "start": [ 213, 1 ], "end": [ 216, 87 ], "kind": "commanddeclaration" }, { "full_name": "Ordnode.Balanced.dual", "code": "theorem Balanced.dual : ∀ {t : Ordnode α}, Balanced t → Balanced (dual t)", "start": [ 219, 1 ], "end": [ 221, 96 ], "kind": "commanddeclaration" }, { "full_name": "Ordnode.node3L", "code": "def node3L (l : Ordnode α) (x : α) (m : Ordnode α) (y : α) (r : Ordnode α) : Ordnode α :=\n node' (node' l x m) y r", "start": [ 227, 1 ], "end": [ 229, 26 ], "kind": "commanddeclaration" }, { "full_name": "Ordnode.node3R", "code": "def node3R (l : Ordnode α) (x : α) (m : Ordnode α) (y : α) (r : Ordnode α) : Ordnode α :=\n node' l x (node' m y r)", "start": [ 232, 1 ], "end": [ 234, 26 ], "kind": "commanddeclaration" }, { "full_name": "Ordnode.node4L", "code": "def node4L : Ordnode α → α → Ordnode α → α → Ordnode α → Ordnode α\n | l, x, node _ ml y mr, z, r => node' (node' l x ml) y (node' mr z r)\n | l, x, nil, z, r => node3L l x nil z r", "start": [ 237, 1 ], "end": [ 240, 42 ], "kind": "commanddeclaration" }, { "full_name": "Ordnode.node4R", "code": "def node4R : Ordnode α → α → Ordnode α → α → Ordnode α → Ordnode α\n | l, x, node _ ml y mr, z, r => node' (node' l x ml) y (node' mr z r)\n | l, x, nil, z, r => node3R l x nil z r", "start": [ 244, 1 ], "end": [ 247, 42 ], "kind": "commanddeclaration" }, { "full_name": "Ordnode.rotateL", "code": "def rotateL : Ordnode α → α → Ordnode α → Ordnode α\n | l, x, node _ m y r => if size m < ratio * size r then node3L l x m y r else node4L l x m y r\n | l, x, nil => node' l x nil", "start": [ 251, 1 ], "end": [ 255, 31 ], "kind": "commanddeclaration" }, { "full_name": "Ordnode.rotateL_node", "code": "theorem rotateL_node (l : Ordnode α) (x : α) (sz : ℕ) (m : Ordnode α) (y : α) (r : Ordnode α) :\n rotateL l x (node sz m y r) =\n if size m < ratio * size r then node3L l x m y r else node4L l x m y r", "start": [ 261, 1 ], "end": [ 264, 6 ], "kind": "commanddeclaration" }, { "full_name": "Ordnode.rotateL_nil", "code": "theorem rotateL_nil (l : Ordnode α) (x : α) : rotateL l x nil = node' l x nil", "start": [ 266, 1 ], "end": [ 267, 6 ], "kind": "commanddeclaration" }, { "full_name": "Ordnode.rotateR", "code": "def rotateR : Ordnode α → α → Ordnode α → Ordnode α\n | node _ l x m, y, r => if size m < ratio * size l then node3R l x m y r else node4R l x m y r\n | nil, y, r => node' nil y r", "start": [ 270, 1 ], "end": [ 274, 31 ], "kind": "commanddeclaration" }, { "full_name": "Ordnode.rotateR_node", "code": "theorem rotateR_node (sz : ℕ) (l : Ordnode α) (x : α) (m : Ordnode α) (y : α) (r : Ordnode α) :\n rotateR (node sz l x m) y r =\n if size m < ratio * size l then node3R l x m y r else node4R l x m y r", "start": [ 280, 1 ], "end": [ 283, 6 ], "kind": "commanddeclaration" }, { "full_name": "Ordnode.rotateR_nil", "code": "theorem rotateR_nil (y : α) (r : Ordnode α) : rotateR nil y r = node' nil y r", "start": [ 285, 1 ], "end": [ 286, 6 ], "kind": "commanddeclaration" }, { "full_name": "Ordnode.balanceL'", "code": "def balanceL' (l : Ordnode α) (x : α) (r : Ordnode α) : Ordnode α :=\n if size l + size r ≤ 1 then node' l x r\n else if size l > delta * size r then rotateR l x r else node' l x r", "start": [ 289, 1 ], "end": [ 293, 70 ], "kind": "commanddeclaration" }, { "full_name": "Ordnode.balanceR'", "code": "def balanceR' (l : Ordnode α) (x : α) (r : Ordnode α) : Ordnode α :=\n if size l + size r ≤ 1 then node' l x r\n else if size r > delta * size l then rotateL l x r else node' l x r", "start": [ 296, 1 ], "end": [ 300, 70 ], "kind": "commanddeclaration" }, { "full_name": "Ordnode.balance'", "code": "def balance' (l : Ordnode α) (x : α) (r : Ordnode α) : Ordnode α :=\n if size l + size r ≤ 1 then node' l x r\n else\n if size r > delta * size l then rotateL l x r\n else if size l > delta * size r then rotateR l x r else node' l x r", "start": [ 303, 1 ], "end": [ 309, 72 ], "kind": "commanddeclaration" }, { "full_name": "Ordnode.dual_node'", "code": "theorem dual_node' (l : Ordnode α) (x : α) (r : Ordnode α) :\n dual (node' l x r) = node' (dual r) x (dual l)", "start": [ 312, 1 ], "end": [ 313, 80 ], "kind": "commanddeclaration" }, { "full_name": "Ordnode.dual_node3L", "code": "theorem dual_node3L (l : Ordnode α) (x : α) (m : Ordnode α) (y : α) (r : Ordnode α) :\n dual (node3L l x m y r) = node3R (dual r) y (dual m) x (dual l)", "start": [ 316, 1 ], "end": [ 318, 46 ], "kind": "commanddeclaration" }, { "full_name": "Ordnode.dual_node3R", "code": "theorem dual_node3R (l : Ordnode α) (x : α) (m : Ordnode α) (y : α) (r : Ordnode α) :\n dual (node3R l x m y r) = node3L (dual r) y (dual m) x (dual l)", "start": [ 321, 1 ], "end": [ 323, 46 ], "kind": "commanddeclaration" }, { "full_name": "Ordnode.dual_node4L", "code": "theorem dual_node4L (l : Ordnode α) (x : α) (m : Ordnode α) (y : α) (r : Ordnode α) :\n dual (node4L l x m y r) = node4R (dual r) y (dual m) x (dual l)", "start": [ 326, 1 ], "end": [ 328, 79 ], "kind": "commanddeclaration" }, { "full_name": "Ordnode.dual_node4R", "code": "theorem dual_node4R (l : Ordnode α) (x : α) (m : Ordnode α) (y : α) (r : Ordnode α) :\n dual (node4R l x m y r) = node4L (dual r) y (dual m) x (dual l)", "start": [ 331, 1 ], "end": [ 333, 79 ], "kind": "commanddeclaration" }, { "full_name": "Ordnode.dual_rotateL", "code": "theorem dual_rotateL (l : Ordnode α) (x : α) (r : Ordnode α) :\n dual (rotateL l x r) = rotateR (dual r) x (dual l)", "start": [ 336, 1 ], "end": [ 339, 54 ], "kind": "commanddeclaration" }, { "full_name": "Ordnode.dual_rotateR", "code": "theorem dual_rotateR (l : Ordnode α) (x : α) (r : Ordnode α) :\n dual (rotateR l x r) = rotateL (dual r) x (dual l)", "start": [ 342, 1 ], "end": [ 344, 71 ], "kind": "commanddeclaration" }, { "full_name": "Ordnode.dual_balance'", "code": "theorem dual_balance' (l : Ordnode α) (x : α) (r : Ordnode α) :\n dual (balance' l x r) = balance' (dual r) x (dual l)", "start": [ 347, 1 ], "end": [ 351, 31 ], "kind": "commanddeclaration" }, { "full_name": "Ordnode.dual_balanceL", "code": "theorem dual_balanceL (l : Ordnode α) (x : α) (r : Ordnode α) :\n dual (balanceL l x r) = balanceR (dual r) x (dual l)", "start": [ 354, 1 ], "end": [ 367, 44 ], "kind": "commanddeclaration" }, { "full_name": "Ordnode.dual_balanceR", "code": "theorem dual_balanceR (l : Ordnode α) (x : α) (r : Ordnode α) :\n dual (balanceR l x r) = balanceL (dual r) x (dual l)", "start": [ 370, 1 ], "end": [ 372, 73 ], "kind": "commanddeclaration" }, { "full_name": "Ordnode.Sized.node3L", "code": "theorem Sized.node3L {l x m y r} (hl : @Sized α l) (hm : Sized m) (hr : Sized r) :\n Sized (node3L l x m y r)", "start": [ 375, 1 ], "end": [ 377, 25 ], "kind": "commanddeclaration" }, { "full_name": "Ordnode.Sized.node3R", "code": "theorem Sized.node3R {l x m y r} (hl : @Sized α l) (hm : Sized m) (hr : Sized r) :\n Sized (node3R l x m y r)", "start": [ 380, 1 ], "end": [ 382, 25 ], "kind": "commanddeclaration" }, { "full_name": "Ordnode.Sized.node4L", "code": "theorem Sized.node4L {l x m y r} (hl : @Sized α l) (hm : Sized m) (hr : Sized r) :\n Sized (node4L l x m y r)", "start": [ 385, 1 ], "end": [ 387, 94 ], "kind": "commanddeclaration" }, { "full_name": "Ordnode.node3L_size", "code": "theorem node3L_size {l x m y r} : size (@node3L α l x m y r) = size l + size m + size r + 2", "start": [ 390, 1 ], "end": [ 391, 55 ], "kind": "commanddeclaration" }, { "full_name": "Ordnode.node3R_size", "code": "theorem node3R_size {l x m y r} : size (@node3R α l x m y r) = size l + size m + size r + 2", "start": [ 394, 1 ], "end": [ 395, 61 ], "kind": "commanddeclaration" }, { "full_name": "Ordnode.node4L_size", "code": "theorem node4L_size {l x m y r} (hm : Sized m) :\n size (@node4L α l x m y r) = size l + size m + size r + 2", "start": [ 398, 1 ], "end": [ 400, 81 ], "kind": "commanddeclaration" }, { "full_name": "Ordnode.Sized.dual", "code": "theorem Sized.dual : ∀ {t : Ordnode α}, Sized t → Sized (dual t)", "start": [ 403, 1 ], "end": [ 405, 97 ], "kind": "commanddeclaration" }, { "full_name": "Ordnode.Sized.dual_iff", "code": "theorem Sized.dual_iff {t : Ordnode α} : Sized (.dual t) ↔ Sized t", "start": [ 408, 1 ], "end": [ 409, 61 ], "kind": "commanddeclaration" }, { "full_name": "Ordnode.Sized.rotateL", "code": "theorem Sized.rotateL {l x r} (hl : @Sized α l) (hr : Sized r) : Sized (rotateL l x r)", "start": [ 412, 1 ], "end": [ 416, 34 ], "kind": "commanddeclaration" }, { "full_name": "Ordnode.Sized.rotateR", "code": "theorem Sized.rotateR {l x r} (hl : @Sized α l) (hr : Sized r) : Sized (rotateR l x r)", "start": [ 419, 1 ], "end": [ 420, 74 ], "kind": "commanddeclaration" }, { "full_name": "Ordnode.Sized.rotateL_size", "code": "theorem Sized.rotateL_size {l x r} (hm : Sized r) :\n size (@Ordnode.rotateL α l x r) = size l + size r + 1", "start": [ 423, 1 ], "end": [ 427, 64 ], "kind": "commanddeclaration" }, { "full_name": "Ordnode.Sized.rotateR_size", "code": "theorem Sized.rotateR_size {l x r} (hl : Sized l) :\n size (@Ordnode.rotateR α l x r) = size l + size r + 1", "start": [ 430, 1 ], "end": [ 432, 96 ], "kind": "commanddeclaration" }, { "full_name": "Ordnode.Sized.balance'", "code": "theorem Sized.balance' {l x r} (hl : @Sized α l) (hr : Sized r) : Sized (balance' l x r)", "start": [ 435, 1 ], "end": [ 440, 22 ], "kind": "commanddeclaration" }, { "full_name": "Ordnode.size_balance'", "code": "theorem size_balance' {l x r} (hl : @Sized α l) (hr : Sized r) :\n size (@balance' α l x r) = size l + size r + 1", "start": [ 443, 1 ], "end": [ 449, 8 ], "kind": "commanddeclaration" }, { "full_name": "Ordnode.All.imp", "code": "theorem All.imp {P Q : α → Prop} (H : ∀ a, P a → Q a) : ∀ {t}, All P t → All Q t", "start": [ 455, 1 ], "end": [ 457, 63 ], "kind": "commanddeclaration" }, { "full_name": "Ordnode.Any.imp", "code": "theorem Any.imp {P Q : α → Prop} (H : ∀ a, P a → Q a) : ∀ {t}, Any P t → Any Q t", "start": [ 460, 1 ], "end": [ 462, 67 ], "kind": "commanddeclaration" }, { "full_name": "Ordnode.all_singleton", "code": "theorem all_singleton {P : α → Prop} {x : α} : All P (singleton x) ↔ P x", "start": [ 465, 1 ], "end": [ 466, 41 ], "kind": "commanddeclaration" }, { "full_name": "Ordnode.any_singleton", "code": "theorem any_singleton {P : α → Prop} {x : α} : Any P (singleton x) ↔ P x", "start": [ 469, 1 ], "end": [ 470, 69 ], "kind": "commanddeclaration" }, { "full_name": "Ordnode.all_dual", "code": "theorem all_dual {P : α → Prop} : ∀ {t : Ordnode α}, All P (dual t) ↔ All P t", "start": [ 473, 1 ], "end": [ 477, 42 ], "kind": "commanddeclaration" }, { "full_name": "Ordnode.all_iff_forall", "code": "theorem all_iff_forall {P : α → Prop} : ∀ {t}, All P t ↔ ∀ x, Emem x t → P x", "start": [ 480, 1 ], "end": [ 482, 81 ], "kind": "commanddeclaration" }, { "full_name": "Ordnode.any_iff_exists", "code": "theorem any_iff_exists {P : α → Prop} : ∀ {t}, Any P t ↔ ∃ x, Emem x t ∧ P x", "start": [ 485, 1 ], "end": [ 487, 93 ], "kind": "commanddeclaration" }, { "full_name": "Ordnode.emem_iff_all", "code": "theorem emem_iff_all {x : α} {t} : Emem x t ↔ ∀ P, All P t → P x", "start": [ 490, 1 ], "end": [ 491, 88 ], "kind": "commanddeclaration" }, { "full_name": "Ordnode.all_node'", "code": "theorem all_node' {P l x r} : @All α P (node' l x r) ↔ All P l ∧ P x ∧ All P r", "start": [ 494, 1 ], "end": [ 495, 10 ], "kind": "commanddeclaration" }, { "full_name": "Ordnode.all_node3L", "code": "theorem all_node3L {P l x m y r} :\n @All α P (node3L l x m y r) ↔ All P l ∧ P x ∧ All P m ∧ P y ∧ All P r", "start": [ 498, 1 ], "end": [ 500, 38 ], "kind": "commanddeclaration" }, { "full_name": "Ordnode.all_node3R", "code": "theorem all_node3R {P l x m y r} :\n @All α P (node3R l x m y r) ↔ All P l ∧ P x ∧ All P m ∧ P y ∧ All P r", "start": [ 503, 1 ], "end": [ 505, 10 ], "kind": "commanddeclaration" }, { "full_name": "Ordnode.all_node4L", "code": "theorem all_node4L {P l x m y r} :\n @All α P (node4L l x m y r) ↔ All P l ∧ P x ∧ All P m ∧ P y ∧ All P r", "start": [ 508, 1 ], "end": [ 510, 67 ], "kind": "commanddeclaration" }, { "full_name": "Ordnode.all_node4R", "code": "theorem all_node4R {P l x m y r} :\n @All α P (node4R l x m y r) ↔ All P l ∧ P x ∧ All P m ∧ P y ∧ All P r", "start": [ 513, 1 ], "end": [ 515, 67 ], "kind": "commanddeclaration" }, { "full_name": "Ordnode.all_rotateL", "code": "theorem all_rotateL {P l x r} : @All α P (rotateL l x r) ↔ All P l ∧ P x ∧ All P r", "start": [ 518, 1 ], "end": [ 520, 50 ], "kind": "commanddeclaration" }, { "full_name": "Ordnode.all_rotateR", "code": "theorem all_rotateR {P l x r} : @All α P (rotateR l x r) ↔ All P l ∧ P x ∧ All P r", "start": [ 523, 1 ], "end": [ 524, 98 ], "kind": "commanddeclaration" }, { "full_name": "Ordnode.all_balance'", "code": "theorem all_balance' {P l x r} : @All α P (balance' l x r) ↔ All P l ∧ P x ∧ All P r", "start": [ 527, 1 ], "end": [ 528, 74 ], "kind": "commanddeclaration" }, { "full_name": "Ordnode.foldr_cons_eq_toList", "code": "theorem foldr_cons_eq_toList : ∀ (t : Ordnode α) (r : List α), t.foldr List.cons r = toList t ++ r", "start": [ 534, 1 ], "end": [ 538, 60 ], "kind": "commanddeclaration" }, { "full_name": "Ordnode.toList_nil", "code": "@[simp]\ntheorem toList_nil : toList (@nil α) = []", "start": [ 541, 1 ], "end": [ 543, 6 ], "kind": "commanddeclaration" }, { "full_name": "Ordnode.toList_node", "code": "@[simp]\ntheorem toList_node (s l x r) : toList (@node α s l x r) = toList l ++ x :: toList r", "start": [ 546, 1 ], "end": [ 548, 48 ], "kind": "commanddeclaration" }, { "full_name": "Ordnode.emem_iff_mem_toList", "code": "theorem emem_iff_mem_toList {x : α} {t} : Emem x t ↔ x ∈ toList t", "start": [ 551, 1 ], "end": [ 552, 55 ], "kind": "commanddeclaration" }, { "full_name": "Ordnode.length_toList'", "code": "theorem length_toList' : ∀ t : Ordnode α, (toList t).length = t.realSize", "start": [ 555, 1 ], "end": [ 559, 31 ], "kind": "commanddeclaration" }, { "full_name": "Ordnode.length_toList", "code": "theorem length_toList {t : Ordnode α} (h : Sized t) : (toList t).length = t.size", "start": [ 562, 1 ], "end": [ 563, 42 ], "kind": "commanddeclaration" }, { "full_name": "Ordnode.equiv_iff", "code": "theorem equiv_iff {t₁ t₂ : Ordnode α} (h₁ : Sized t₁) (h₂ : Sized t₂) :\n Equiv t₁ t₂ ↔ toList t₁ = toList t₂", "start": [ 566, 1 ], "end": [ 568, 80 ], "kind": "commanddeclaration" }, { "full_name": "Ordnode.pos_size_of_mem", "code": "theorem pos_size_of_mem [LE α] [@DecidableRel α (· ≤ ·)] {x : α} {t : Ordnode α} (h : Sized t)\n (h_mem : x ∈ t) : 0 < size t", "start": [ 574, 1 ], "end": [ 575, 86 ], "kind": "commanddeclaration" }, { "full_name": "Ordnode.findMin'_dual", "code": "theorem findMin'_dual : ∀ (t) (x : α), findMin' (dual t) x = findMax' x t", "start": [ 581, 1 ], "end": [ 583, 41 ], "kind": "commanddeclaration" }, { "full_name": "Ordnode.findMax'_dual", "code": "theorem findMax'_dual (t) (x : α) : findMax' x (dual t) = findMin' t x", "start": [ 586, 1 ], "end": [ 587, 34 ], "kind": "commanddeclaration" }, { "full_name": "Ordnode.findMin_dual", "code": "theorem findMin_dual : ∀ t : Ordnode α, findMin (dual t) = findMax t", "start": [ 590, 1 ], "end": [ 592, 56 ], "kind": "commanddeclaration" }, { "full_name": "Ordnode.findMax_dual", "code": "theorem findMax_dual (t : Ordnode α) : findMax (dual t) = findMin t", "start": [ 595, 1 ], "end": [ 596, 33 ], "kind": "commanddeclaration" }, { "full_name": "Ordnode.dual_eraseMin", "code": "theorem dual_eraseMin : ∀ t : Ordnode α, dual (eraseMin t) = eraseMax (dual t)", "start": [ 599, 1 ], "end": [ 603, 94 ], "kind": "commanddeclaration" }, { "full_name": "Ordnode.dual_eraseMax", "code": "theorem dual_eraseMax (t : Ordnode α) : dual (eraseMax t) = eraseMin (dual t)", "start": [ 606, 1 ], "end": [ 607, 58 ], "kind": "commanddeclaration" }, { "full_name": "Ordnode.splitMin_eq", "code": "theorem splitMin_eq :\n ∀ (s l) (x : α) (r), splitMin' l x r = (findMin' l x, eraseMin (node s l x r))", "start": [ 610, 1 ], "end": [ 613, 96 ], "kind": "commanddeclaration" }, { "full_name": "Ordnode.splitMax_eq", "code": "theorem splitMax_eq :\n ∀ (s l) (x : α) (r), splitMax' l x r = (eraseMax (node s l x r), findMax' x r)", "start": [ 616, 1 ], "end": [ 619, 96 ], "kind": "commanddeclaration" }, { "full_name": "Ordnode.findMin'_all", "code": "theorem findMin'_all {P : α → Prop} : ∀ (t) (x : α), All P t → P x → P (findMin' t x)", "start": [ 623, 1 ], "end": [ 625, 66 ], "kind": "commanddeclaration" }, { "full_name": "Ordnode.findMax'_all", "code": "theorem findMax'_all {P : α → Prop} : ∀ (x : α) (t), P x → All P t → P (findMax' x t)", "start": [ 629, 1 ], "end": [ 631, 66 ], "kind": "commanddeclaration" }, { "full_name": "Ordnode.merge_nil_left", "code": "@[simp]\ntheorem merge_nil_left (t : Ordnode α) : merge t nil = t", "start": [ 640, 1 ], "end": [ 641, 79 ], "kind": "commanddeclaration" }, { "full_name": "Ordnode.merge_nil_right", "code": "@[simp]\ntheorem merge_nil_right (t : Ordnode α) : merge nil t = t", "start": [ 644, 1 ], "end": [ 646, 6 ], "kind": "commanddeclaration" }, { "full_name": "Ordnode.merge_node", "code": "@[simp]\ntheorem merge_node {ls ll lx lr rs rl rx rr} :\n merge (@node α ls ll lx lr) (node rs rl rx rr) =\n if delta * ls < rs then balanceL (merge (node ls ll lx lr) rl) rx rr\n else if delta * rs < ls then balanceR ll lx (merge lr (node rs rl rx rr))\n else glue (node ls ll lx lr) (node rs rl rx rr)", "start": [ 649, 1 ], "end": [ 655, 6 ], "kind": "commanddeclaration" }, { "full_name": "Ordnode.dual_insert", "code": "theorem dual_insert [Preorder α] [IsTotal α (· ≤ ·)] [@DecidableRel α (· ≤ ·)] (x : α) :\n ∀ t : Ordnode α, dual (Ordnode.insert x t) = @Ordnode.insert αᵒᵈ _ _ x (dual t)", "start": [ 661, 1 ], "end": [ 668, 86 ], "kind": "commanddeclaration" }, { "full_name": "Ordnode.balance_eq_balance'", "code": "theorem balance_eq_balance' {l x r} (hl : Balanced l) (hr : Balanced r) (sl : Sized l)\n (sr : Sized r) : @balance α l x r = balance' l x r", "start": [ 674, 1 ], "end": [ 758, 94 ], "kind": "commanddeclaration" }, { "full_name": "Ordnode.balanceL_eq_balance", "code": "theorem balanceL_eq_balance {l x r} (sl : Sized l) (sr : Sized r) (H1 : size l = 0 → size r ≤ 1)\n (H2 : 1 ≤ size l → 1 ≤ size r → size r ≤ delta * size l) :\n @balanceL α l x r = balance l x r", "start": [ 761, 1 ], "end": [ 774, 66 ], "kind": "commanddeclaration" }, { "full_name": "Ordnode.Raised", "code": "def Raised (n m : ℕ) : Prop :=\n m = n ∨ m = n + 1", "start": [ 777, 1 ], "end": [ 779, 20 ], "kind": "commanddeclaration" }, { "full_name": "Ordnode.raised_iff", "code": "theorem raised_iff {n m} : Raised n m ↔ n ≤ m ∧ m ≤ n + 1", "start": [ 782, 1 ], "end": [ 790, 39 ], "kind": "commanddeclaration" }, { "full_name": "Ordnode.Raised.dist_le", "code": "theorem Raised.dist_le {n m} (H : Raised n m) : Nat.dist n m ≤ 1", "start": [ 793, 1 ], "end": [ 794, 85 ], "kind": "commanddeclaration" }, { "full_name": "Ordnode.Raised.dist_le'", "code": "theorem Raised.dist_le' {n m} (H : Raised n m) : Nat.dist m n ≤ 1", "start": [ 797, 1 ], "end": [ 798, 38 ], "kind": "commanddeclaration" }, { "full_name": "Ordnode.Raised.add_left", "code": "theorem Raised.add_left (k) {n m} (H : Raised n m) : Raised (k + n) (k + m)", "start": [ 801, 1 ], "end": [ 804, 21 ], "kind": "commanddeclaration" }, { "full_name": "Ordnode.Raised.add_right", "code": "theorem Raised.add_right (k) {n m} (H : Raised n m) : Raised (n + k) (m + k)", "start": [ 807, 1 ], "end": [ 808, 48 ], "kind": "commanddeclaration" }, { "full_name": "Ordnode.Raised.right", "code": "theorem Raised.right {l x₁ x₂ r₁ r₂} (H : Raised (size r₁) (size r₂)) :\n Raised (size (@node' α l x₁ r₁)) (size (@node' α l x₂ r₂))", "start": [ 811, 1 ], "end": [ 816, 21 ], "kind": "commanddeclaration" }, { "full_name": "Ordnode.balanceL_eq_balance'", "code": "theorem balanceL_eq_balance' {l x r} (hl : Balanced l) (hr : Balanced r) (sl : Sized l)\n (sr : Sized r)\n (H :\n (∃ l', Raised l' (size l) ∧ BalancedSz l' (size r)) ∨\n ∃ r', Raised (size r) r' ∧ BalancedSz (size l) r') :\n @balanceL α l x r = balance' l x r", "start": [ 819, 1 ], "end": [ 835, 43 ], "kind": "commanddeclaration" }, { "full_name": "Ordnode.balance_sz_dual", "code": "theorem balance_sz_dual {l r}\n (H : (∃ l', Raised (@size α l) l' ∧ BalancedSz l' (@size α r)) ∨\n ∃ r', Raised r' (size r) ∧ BalancedSz (size l) r') :\n (∃ l', Raised l' (size (dual r)) ∧ BalancedSz l' (size (dual l))) ∨\n ∃ r', Raised (size (dual l)) r' ∧ BalancedSz (size (dual r)) r'", "start": [ 838, 1 ], "end": [ 846, 58 ], "kind": "commanddeclaration" }, { "full_name": "Ordnode.size_balanceL", "code": "theorem size_balanceL {l x r} (hl : Balanced l) (hr : Balanced r) (sl : Sized l) (sr : Sized r)\n (H : (∃ l', Raised l' (size l) ∧ BalancedSz l' (size r)) ∨\n ∃ r', Raised (size r) r' ∧ BalancedSz (size l) r') :\n size (@balanceL α l x r) = size l + size r + 1", "start": [ 849, 1 ], "end": [ 853, 63 ], "kind": "commanddeclaration" }, { "full_name": "Ordnode.all_balanceL", "code": "theorem all_balanceL {P l x r} (hl : Balanced l) (hr : Balanced r) (sl : Sized l) (sr : Sized r)\n (H :\n (∃ l', Raised l' (size l) ∧ BalancedSz l' (size r)) ∨\n ∃ r', Raised (size r) r' ∧ BalancedSz (size l) r') :\n All P (@balanceL α l x r) ↔ All P l ∧ P x ∧ All P r", "start": [ 856, 1 ], "end": [ 861, 56 ], "kind": "commanddeclaration" }, { "full_name": "Ordnode.balanceR_eq_balance'", "code": "theorem balanceR_eq_balance' {l x r} (hl : Balanced l) (hr : Balanced r) (sl : Sized l)\n (sr : Sized r)\n (H : (∃ l', Raised (size l) l' ∧ BalancedSz l' (size r)) ∨\n ∃ r', Raised r' (size r) ∧ BalancedSz (size l) r') :\n @balanceR α l x r = balance' l x r", "start": [ 864, 1 ], "end": [ 871, 15 ], "kind": "commanddeclaration" }, { "full_name": "Ordnode.size_balanceR", "code": "theorem size_balanceR {l x r} (hl : Balanced l) (hr : Balanced r) (sl : Sized l) (sr : Sized r)\n (H : (∃ l', Raised (size l) l' ∧ BalancedSz l' (size r)) ∨\n ∃ r', Raised r' (size r) ∧ BalancedSz (size l) r') :\n size (@balanceR α l x r) = size l + size r + 1", "start": [ 874, 1 ], "end": [ 878, 63 ], "kind": "commanddeclaration" }, { "full_name": "Ordnode.all_balanceR", "code": "theorem all_balanceR {P l x r} (hl : Balanced l) (hr : Balanced r) (sl : Sized l) (sr : Sized r)\n (H :\n (∃ l', Raised (size l) l' ∧ BalancedSz l' (size r)) ∨\n ∃ r', Raised r' (size r) ∧ BalancedSz (size l) r') :\n All P (@balanceR α l x r) ↔ All P l ∧ P x ∧ All P r", "start": [ 881, 1 ], "end": [ 886, 56 ], "kind": "commanddeclaration" }, { "full_name": "Ordnode.Bounded", "code": "def Bounded : Ordnode α → WithBot α → WithTop α → Prop\n | nil, some a, some b => a < b\n | nil, _, _ => True\n | node _ l x r, o₁, o₂ => Bounded l o₁ x ∧ Bounded r (↑x) o₂", "start": [ 896, 1 ], "end": [ 902, 63 ], "kind": "commanddeclaration" }, { "full_name": "Ordnode.Bounded.dual", "code": "theorem Bounded.dual :\n ∀ {t : Ordnode α} {o₁ o₂}, Bounded t o₁ o₂ → @Bounded αᵒᵈ _ (dual t) o₂ o₁", "start": [ 905, 1 ], "end": [ 908, 55 ], "kind": "commanddeclaration" }, { "full_name": "Ordnode.Bounded.dual_iff", "code": "theorem Bounded.dual_iff {t : Ordnode α} {o₁ o₂} :\n Bounded t o₁ o₂ ↔ @Bounded αᵒᵈ _ (.dual t) o₂ o₁", "start": [ 911, 1 ], "end": [ 914, 83 ], "kind": "commanddeclaration" }, { "full_name": "Ordnode.Bounded.weak_left", "code": "theorem Bounded.weak_left : ∀ {t : Ordnode α} {o₁ o₂}, Bounded t o₁ o₂ → Bounded t ⊥ o₂", "start": [ 917, 1 ], "end": [ 919, 55 ], "kind": "commanddeclaration" }, { "full_name": "Ordnode.Bounded.weak_right", "code": "theorem Bounded.weak_right : ∀ {t : Ordnode α} {o₁ o₂}, Bounded t o₁ o₂ → Bounded t o₁ ⊤", "start": [ 922, 1 ], "end": [ 924, 56 ], "kind": "commanddeclaration" }, { "full_name": "Ordnode.Bounded.weak", "code": "theorem Bounded.weak {t : Ordnode α} {o₁ o₂} (h : Bounded t o₁ o₂) : Bounded t ⊥ ⊤", "start": [ 927, 1 ], "end": [ 928, 25 ], "kind": "commanddeclaration" }, { "full_name": "Ordnode.Bounded.mono_left", "code": "theorem Bounded.mono_left {x y : α} (xy : x ≤ y) :\n ∀ {t : Ordnode α} {o}, Bounded t y o → Bounded t x o", "start": [ 931, 1 ], "end": [ 935, 56 ], "kind": "commanddeclaration" }, { "full_name": "Ordnode.Bounded.mono_right", "code": "theorem Bounded.mono_right {x y : α} (xy : x ≤ y) :\n ∀ {t : Ordnode α} {o}, Bounded t o x → Bounded t o y", "start": [ 938, 1 ], "end": [ 942, 57 ], "kind": "commanddeclaration" }, { "full_name": "Ordnode.Bounded.to_lt", "code": "theorem Bounded.to_lt : ∀ {t : Ordnode α} {x y : α}, Bounded t x y → x < y", "start": [ 945, 1 ], "end": [ 947, 63 ], "kind": "commanddeclaration" }, { "full_name": "Ordnode.Bounded.to_nil", "code": "theorem Bounded.to_nil {t : Ordnode α} : ∀ {o₁ o₂}, Bounded t o₁ o₂ → Bounded nil o₁ o₂", "start": [ 950, 1 ], "end": [ 953, 33 ], "kind": "commanddeclaration" }, { "full_name": "Ordnode.Bounded.trans_left", "code": "theorem Bounded.trans_left {t₁ t₂ : Ordnode α} {x : α} :\n ∀ {o₁ o₂}, Bounded t₁ o₁ x → Bounded t₂ x o₂ → Bounded t₂ o₁ o₂", "start": [ 956, 1 ], "end": [ 959, 58 ], "kind": "commanddeclaration" }, { "full_name": "Ordnode.Bounded.trans_right", "code": "theorem Bounded.trans_right {t₁ t₂ : Ordnode α} {x : α} :\n ∀ {o₁ o₂}, Bounded t₁ o₁ x → Bounded t₂ x o₂ → Bounded t₁ o₁ o₂", "start": [ 962, 1 ], "end": [ 965, 59 ], "kind": "commanddeclaration" }, { "full_name": "Ordnode.Bounded.mem_lt", "code": "theorem Bounded.mem_lt : ∀ {t o} {x : α}, Bounded t o x → All (· < x) t", "start": [ 968, 1 ], "end": [ 971, 72 ], "kind": "commanddeclaration" }, { "full_name": "Ordnode.Bounded.mem_gt", "code": "theorem Bounded.mem_gt : ∀ {t o} {x : α}, Bounded t x o → All (· > x) t", "start": [ 974, 1 ], "end": [ 976, 100 ], "kind": "commanddeclaration" }, { "full_name": "Ordnode.Bounded.of_lt", "code": "theorem Bounded.of_lt :\n ∀ {t o₁ o₂} {x : α}, Bounded t o₁ o₂ → Bounded nil o₁ x → All (· < x) t → Bounded t o₁ x", "start": [ 979, 1 ], "end": [ 982, 80 ], "kind": "commanddeclaration" }, { "full_name": "Ordnode.Bounded.of_gt", "code": "theorem Bounded.of_gt :\n ∀ {t o₁ o₂} {x : α}, Bounded t o₁ o₂ → Bounded nil x o₂ → All (· > x) t → Bounded t x o₂", "start": [ 985, 1 ], "end": [ 988, 80 ], "kind": "commanddeclaration" }, { "full_name": "Ordnode.Bounded.to_sep", "code": "theorem Bounded.to_sep {t₁ t₂ o₁ o₂} {x : α}\n (h₁ : Bounded t₁ o₁ (x : WithTop α)) (h₂ : Bounded t₂ (x : WithBot α) o₂) :\n t₁.All fun y => t₂.All fun z : α => y < z", "start": [ 991, 1 ], "end": [ 995, 49 ], "kind": "commanddeclaration" }, { "full_name": "Ordnode.Valid'", "code": "structure Valid' (lo : WithBot α) (t : Ordnode α) (hi : WithTop α) : Prop where\n ord : t.Bounded lo hi\n sz : t.Sized\n bal : t.Balanced", "start": [ 1007, 1 ], "end": [ 1013, 19 ], "kind": "commanddeclaration" }, { "full_name": "Ordnode.Valid", "code": "def Valid (t : Ordnode α) : Prop :=\n Valid' ⊥ t ⊤", "start": [ 1019, 1 ], "end": [ 1023, 15 ], "kind": "commanddeclaration" }, { "full_name": "Ordnode.Valid'.mono_left", "code": "theorem Valid'.mono_left {x y : α} (xy : x ≤ y) {t : Ordnode α} {o} (h : Valid' y t o) :\n Valid' x t o", "start": [ 1026, 1 ], "end": [ 1028, 31 ], "kind": "commanddeclaration" }, { "full_name": "Ordnode.Valid'.mono_right", "code": "theorem Valid'.mono_right {x y : α} (xy : x ≤ y) {t : Ordnode α} {o} (h : Valid' o t x) :\n Valid' o t y", "start": [ 1031, 1 ], "end": [ 1033, 32 ], "kind": "commanddeclaration" }, { "full_name": "Ordnode.Valid'.trans_left", "code": "theorem Valid'.trans_left {t₁ t₂ : Ordnode α} {x : α} {o₁ o₂} (h : Bounded t₁ o₁ x)\n (H : Valid' x t₂ o₂) : Valid' o₁ t₂ o₂", "start": [ 1036, 1 ], "end": [ 1038, 31 ], "kind": "commanddeclaration" }, { "full_name": "Ordnode.Valid'.trans_right", "code": "theorem Valid'.trans_right {t₁ t₂ : Ordnode α} {x : α} {o₁ o₂} (H : Valid' o₁ t₁ x)\n (h : Bounded t₂ x o₂) : Valid' o₁ t₁ o₂", "start": [ 1041, 1 ], "end": [ 1043, 32 ], "kind": "commanddeclaration" }, { "full_name": "Ordnode.Valid'.of_lt", "code": "theorem Valid'.of_lt {t : Ordnode α} {x : α} {o₁ o₂} (H : Valid' o₁ t o₂) (h₁ : Bounded nil o₁ x)\n (h₂ : All (· < x) t) : Valid' o₁ t x", "start": [ 1046, 1 ], "end": [ 1048, 30 ], "kind": "commanddeclaration" }, { "full_name": "Ordnode.Valid'.of_gt", "code": "theorem Valid'.of_gt {t : Ordnode α} {x : α} {o₁ o₂} (H : Valid' o₁ t o₂) (h₁ : Bounded nil x o₂)\n (h₂ : All (· > x) t) : Valid' x t o₂", "start": [ 1051, 1 ], "end": [ 1053, 30 ], "kind": "commanddeclaration" }, { "full_name": "Ordnode.Valid'.valid", "code": "theorem Valid'.valid {t o₁ o₂} (h : @Valid' α _ o₁ t o₂) : Valid t", "start": [ 1056, 1 ], "end": [ 1057, 23 ], "kind": "commanddeclaration" }, { "full_name": "Ordnode.valid'_nil", "code": "theorem valid'_nil {o₁ o₂} (h : Bounded nil o₁ o₂) : Valid' o₁ (@nil α) o₂", "start": [ 1060, 1 ], "end": [ 1061, 14 ], "kind": "commanddeclaration" }, { "full_name": "Ordnode.valid_nil", "code": "theorem valid_nil : Valid (@nil α)", "start": [ 1064, 1 ], "end": [ 1065, 16 ], "kind": "commanddeclaration" }, { "full_name": "Ordnode.Valid'.node", "code": "theorem Valid'.node {s l} {x : α} {r o₁ o₂} (hl : Valid' o₁ l x) (hr : Valid' x r o₂)\n (H : BalancedSz (size l) (size r)) (hs : s = size l + size r + 1) :\n Valid' o₁ (@node α s l x r) o₂", "start": [ 1068, 1 ], "end": [ 1071, 52 ], "kind": "commanddeclaration" }, { "full_name": "Ordnode.Valid'.dual", "code": "theorem Valid'.dual : ∀ {t : Ordnode α} {o₁ o₂}, Valid' o₁ t o₂ → @Valid' αᵒᵈ _ o₂ (dual t) o₁", "start": [ 1074, 1 ], "end": [ 1080, 62 ], "kind": "commanddeclaration" }, { "full_name": "Ordnode.Valid'.dual_iff", "code": "theorem Valid'.dual_iff {t : Ordnode α} {o₁ o₂} : Valid' o₁ t o₂ ↔ @Valid' αᵒᵈ _ o₂ (.dual t) o₁", "start": [ 1083, 1 ], "end": [ 1085, 82 ], "kind": "commanddeclaration" }, { "full_name": "Ordnode.Valid.dual", "code": "theorem Valid.dual {t : Ordnode α} : Valid t → @Valid αᵒᵈ _ (.dual t)", "start": [ 1088, 1 ], "end": [ 1089, 14 ], "kind": "commanddeclaration" }, { "full_name": "Ordnode.Valid.dual_iff", "code": "theorem Valid.dual_iff {t : Ordnode α} : Valid t ↔ @Valid αᵒᵈ _ (.dual t)", "start": [ 1092, 1 ], "end": [ 1093, 18 ], "kind": "commanddeclaration" }, { "full_name": "Ordnode.Valid'.left", "code": "theorem Valid'.left {s l x r o₁ o₂} (H : Valid' o₁ (@Ordnode.node α s l x r) o₂) : Valid' o₁ l x", "start": [ 1096, 1 ], "end": [ 1097, 28 ], "kind": "commanddeclaration" }, { "full_name": "Ordnode.Valid'.right", "code": "theorem Valid'.right {s l x r o₁ o₂} (H : Valid' o₁ (@Ordnode.node α s l x r) o₂) : Valid' x r o₂", "start": [ 1100, 1 ], "end": [ 1101, 28 ], "kind": "commanddeclaration" }, { "full_name": "Ordnode.Valid.left", "code": "nonrec theorem Valid.left {s l x r} (H : Valid (@node α s l x r)) : Valid l", "start": [ 1104, 1 ], "end": [ 1105, 15 ], "kind": "commanddeclaration" }, { "full_name": "Ordnode.Valid.right", "code": "nonrec theorem Valid.right {s l x r} (H : Valid (@node α s l x r)) : Valid r", "start": [ 1108, 1 ], "end": [ 1109, 16 ], "kind": "commanddeclaration" }, { "full_name": "Ordnode.Valid.size_eq", "code": "theorem Valid.size_eq {s l x r} (H : Valid (@node α s l x r)) :\n size (@node α s l x r) = size l + size r + 1", "start": [ 1112, 1 ], "end": [ 1114, 8 ], "kind": "commanddeclaration" }, { "full_name": "Ordnode.Valid'.node'", "code": "theorem Valid'.node' {l} {x : α} {r o₁ o₂} (hl : Valid' o₁ l x) (hr : Valid' x r o₂)\n (H : BalancedSz (size l) (size r)) : Valid' o₁ (@node' α l x r) o₂", "start": [ 1117, 1 ], "end": [ 1119, 19 ], "kind": "commanddeclaration" }, { "full_name": "Ordnode.valid'_singleton", "code": "theorem valid'_singleton {x : α} {o₁ o₂} (h₁ : Bounded nil o₁ x) (h₂ : Bounded nil x o₂) :\n Valid' o₁ (singleton x : Ordnode α) o₂", "start": [ 1122, 1 ], "end": [ 1124, 64 ], "kind": "commanddeclaration" }, { "full_name": "Ordnode.valid_singleton", "code": "theorem valid_singleton {x : α} : Valid (singleton x : Ordnode α)", "start": [ 1127, 1 ], "end": [ 1128, 25 ], "kind": "commanddeclaration" }, { "full_name": "Ordnode.Valid'.node3L", "code": "theorem Valid'.node3L {l} {x : α} {m} {y : α} {r o₁ o₂} (hl : Valid' o₁ l x) (hm : Valid' x m y)\n (hr : Valid' y r o₂) (H1 : BalancedSz (size l) (size m))\n (H2 : BalancedSz (size l + size m + 1) (size r)) : Valid' o₁ (@node3L α l x m y r) o₂", "start": [ 1131, 1 ], "end": [ 1134, 31 ], "kind": "commanddeclaration" }, { "full_name": "Ordnode.Valid'.node3R", "code": "theorem Valid'.node3R {l} {x : α} {m} {y : α} {r o₁ o₂} (hl : Valid' o₁ l x) (hm : Valid' x m y)\n (hr : Valid' y r o₂) (H1 : BalancedSz (size l) (size m + size r + 1))\n (H2 : BalancedSz (size m) (size r)) : Valid' o₁ (@node3R α l x m y r) o₂", "start": [ 1137, 1 ], "end": [ 1140, 31 ], "kind": "commanddeclaration" }, { "full_name": "Ordnode.Valid'.node4L_lemma₁", "code": "theorem Valid'.node4L_lemma₁ {a b c d : ℕ} (lr₂ : 3 * (b + c + 1 + d) ≤ 16 * a + 9)\n (mr₂ : b + c + 1 ≤ 3 * d) (mm₁ : b ≤ 3 * c) : b < 3 * a + 1", "start": [ 1143, 1 ], "end": [ 1144, 76 ], "kind": "commanddeclaration" }, { "full_name": "Ordnode.Valid'.node4L_lemma₂", "code": "theorem Valid'.node4L_lemma₂ {b c d : ℕ} (mr₂ : b + c + 1 ≤ 3 * d) : c ≤ 3 * d", "start": [ 1147, 1 ], "end": [ 1147, 91 ], "kind": "commanddeclaration" }, { "full_name": "Ordnode.Valid'.node4L_lemma₃", "code": "theorem Valid'.node4L_lemma₃ {b c d : ℕ} (mr₁ : 2 * d ≤ b + c + 1) (mm₁ : b ≤ 3 * c) :\n d ≤ 3 * c", "start": [ 1150, 1 ], "end": [ 1151, 26 ], "kind": "commanddeclaration" }, { "full_name": "Ordnode.Valid'.node4L_lemma₄", "code": "theorem Valid'.node4L_lemma₄ {a b c d : ℕ} (lr₁ : 3 * a ≤ b + c + 1 + d) (mr₂ : b + c + 1 ≤ 3 * d)\n (mm₁ : b ≤ 3 * c) : a + b + 1 ≤ 3 * (c + d + 1)", "start": [ 1154, 1 ], "end": [ 1155, 64 ], "kind": "commanddeclaration" }, { "full_name": "Ordnode.Valid'.node4L_lemma₅", "code": "theorem Valid'.node4L_lemma₅ {a b c d : ℕ} (lr₂ : 3 * (b + c + 1 + d) ≤ 16 * a + 9)\n (mr₁ : 2 * d ≤ b + c + 1) (mm₂ : c ≤ 3 * b) : c + d + 1 ≤ 3 * (a + b + 1)", "start": [ 1158, 1 ], "end": [ 1159, 90 ], "kind": "commanddeclaration" }, { "full_name": "Ordnode.Valid'.node4L", "code": "theorem Valid'.node4L {l} {x : α} {m} {y : α} {r o₁ o₂} (hl : Valid' o₁ l x) (hm : Valid' x m y)\n (hr : Valid' (↑y) r o₂) (Hm : 0 < size m)\n (H : size l = 0 ∧ size m = 1 ∧ size r ≤ 1 ∨\n 0 < size l ∧\n ratio * size r ≤ size m ∧\n delta * size l ≤ size m + size r ∧\n 3 * (size m + size r) ≤ 16 * size l + 9 ∧ size m ≤ delta * size r) :\n Valid' o₁ (@node4L α l x m y r) o₂", "start": [ 1162, 1 ], "end": [ 1217, 45 ], "kind": "commanddeclaration" }, { "full_name": "Ordnode.Valid'.rotateL_lemma₁", "code": "theorem Valid'.rotateL_lemma₁ {a b c : ℕ} (H2 : 3 * a ≤ b + c) (hb₂ : c ≤ 3 * b) : a ≤ 3 * b", "start": [ 1220, 1 ], "end": [ 1221, 8 ], "kind": "commanddeclaration" }, { "full_name": "Ordnode.Valid'.rotateL_lemma₂", "code": "theorem Valid'.rotateL_lemma₂ {a b c : ℕ} (H3 : 2 * (b + c) ≤ 9 * a + 3) (h : b < 2 * c) :\n b < 3 * a + 1", "start": [ 1224, 1 ], "end": [ 1225, 30 ], "kind": "commanddeclaration" }, { "full_name": "Ordnode.Valid'.rotateL_lemma₃", "code": "theorem Valid'.rotateL_lemma₃ {a b c : ℕ} (H2 : 3 * a ≤ b + c) (h : b < 2 * c) : a + b < 3 * c", "start": [ 1228, 1 ], "end": [ 1229, 8 ], "kind": "commanddeclaration" }, { "full_name": "Ordnode.Valid'.rotateL_lemma₄", "code": "theorem Valid'.rotateL_lemma₄ {a b : ℕ} (H3 : 2 * b ≤ 9 * a + 3) : 3 * b ≤ 16 * a + 9", "start": [ 1232, 1 ], "end": [ 1233, 8 ], "kind": "commanddeclaration" }, { "full_name": "Ordnode.Valid'.rotateL", "code": "theorem Valid'.rotateL {l} {x : α} {r o₁ o₂} (hl : Valid' o₁ l x) (hr : Valid' x r o₂)\n (H1 : ¬size l + size r ≤ 1) (H2 : delta * size l < size r)\n (H3 : 2 * size r ≤ 9 * size l + 5 ∨ size r ≤ 3) : Valid' o₁ (@rotateL α l x r) o₂", "start": [ 1236, 1 ], "end": [ 1293, 100 ], "kind": "commanddeclaration" }, { "full_name": "Ordnode.Valid'.rotateR", "code": "theorem Valid'.rotateR {l} {x : α} {r o₁ o₂} (hl : Valid' o₁ l x) (hr : Valid' x r o₂)\n (H1 : ¬size l + size r ≤ 1) (H2 : delta * size r < size l)\n (H3 : 2 * size l ≤ 9 * size r + 5 ∨ size l ≤ 3) : Valid' o₁ (@rotateR α l x r) o₂", "start": [ 1296, 1 ], "end": [ 1304, 31 ], "kind": "commanddeclaration" }, { "full_name": "Ordnode.Valid'.balance'_aux", "code": "theorem Valid'.balance'_aux {l} {x : α} {r o₁ o₂} (hl : Valid' o₁ l x) (hr : Valid' x r o₂)\n (H₁ : 2 * @size α r ≤ 9 * size l + 5 ∨ size r ≤ 3)\n (H₂ : 2 * @size α l ≤ 9 * size r + 5 ∨ size l ≤ 3) : Valid' o₁ (@balance' α l x r) o₂", "start": [ 1307, 1 ], "end": [ 1314, 60 ], "kind": "commanddeclaration" }, { "full_name": "Ordnode.Valid'.balance'_lemma", "code": "theorem Valid'.balance'_lemma {α l l' r r'} (H1 : BalancedSz l' r')\n (H2 : Nat.dist (@size α l) l' ≤ 1 ∧ size r = r' ∨ Nat.dist (size r) r' ≤ 1 ∧ size l = l') :\n 2 * @size α r ≤ 9 * size l + 5 ∨ size r ≤ 3", "start": [ 1317, 1 ], "end": [ 1333, 87 ], "kind": "commanddeclaration" }, { "full_name": "Ordnode.Valid'.balance'", "code": "theorem Valid'.balance' {l} {x : α} {r o₁ o₂} (hl : Valid' o₁ l x) (hr : Valid' x r o₂)\n (H : ∃ l' r', BalancedSz l' r' ∧\n (Nat.dist (size l) l' ≤ 1 ∧ size r = r' ∨ Nat.dist (size r) r' ≤ 1 ∧ size l = l')) :\n Valid' o₁ (@balance' α l x r) o₂", "start": [ 1336, 1 ], "end": [ 1341, 98 ], "kind": "commanddeclaration" }, { "full_name": "Ordnode.Valid'.balance", "code": "theorem Valid'.balance {l} {x : α} {r o₁ o₂} (hl : Valid' o₁ l x) (hr : Valid' x r o₂)\n (H : ∃ l' r', BalancedSz l' r' ∧\n (Nat.dist (size l) l' ≤ 1 ∧ size r = r' ∨ Nat.dist (size r) r' ≤ 1 ∧ size l = l')) :\n Valid' o₁ (@balance α l x r) o₂", "start": [ 1344, 1 ], "end": [ 1348, 71 ], "kind": "commanddeclaration" }, { "full_name": "Ordnode.Valid'.balanceL_aux", "code": "theorem Valid'.balanceL_aux {l} {x : α} {r o₁ o₂} (hl : Valid' o₁ l x) (hr : Valid' x r o₂)\n (H₁ : size l = 0 → size r ≤ 1) (H₂ : 1 ≤ size l → 1 ≤ size r → size r ≤ delta * size l)\n (H₃ : 2 * @size α l ≤ 9 * size r + 5 ∨ size l ≤ 3) : Valid' o₁ (@balanceL α l x r) o₂", "start": [ 1351, 1 ], "end": [ 1360, 44 ], "kind": "commanddeclaration" }, { "full_name": "Ordnode.Valid'.balanceL", "code": "theorem Valid'.balanceL {l} {x : α} {r o₁ o₂} (hl : Valid' o₁ l x) (hr : Valid' x r o₂)\n (H : (∃ l', Raised l' (size l) ∧ BalancedSz l' (size r)) ∨\n ∃ r', Raised (size r) r' ∧ BalancedSz (size l) r') :\n Valid' o₁ (@balanceL α l x r) o₂", "start": [ 1363, 1 ], "end": [ 1371, 45 ], "kind": "commanddeclaration" }, { "full_name": "Ordnode.Valid'.balanceR_aux", "code": "theorem Valid'.balanceR_aux {l} {x : α} {r o₁ o₂} (hl : Valid' o₁ l x) (hr : Valid' x r o₂)\n (H₁ : size r = 0 → size l ≤ 1) (H₂ : 1 ≤ size r → 1 ≤ size l → size l ≤ delta * size r)\n (H₃ : 2 * @size α r ≤ 9 * size l + 5 ∨ size r ≤ 3) : Valid' o₁ (@balanceR α l x r) o₂", "start": [ 1374, 1 ], "end": [ 1380, 22 ], "kind": "commanddeclaration" }, { "full_name": "Ordnode.Valid'.balanceR", "code": "theorem Valid'.balanceR {l} {x : α} {r o₁ o₂} (hl : Valid' o₁ l x) (hr : Valid' x r o₂)\n (H : (∃ l', Raised (size l) l' ∧ BalancedSz l' (size r)) ∨\n ∃ r', Raised r' (size r) ∧ BalancedSz (size l) r') :\n Valid' o₁ (@balanceR α l x r) o₂", "start": [ 1383, 1 ], "end": [ 1387, 90 ], "kind": "commanddeclaration" }, { "full_name": "Ordnode.Valid'.eraseMax_aux", "code": "theorem Valid'.eraseMax_aux {s l x r o₁ o₂} (H : Valid' o₁ (.node s l x r) o₂) :\n Valid' o₁ (@eraseMax α (.node' l x r)) ↑(findMax' x r) ∧\n size (.node' l x r) = size (eraseMax (.node' l x r)) + 1", "start": [ 1390, 1 ], "end": [ 1400, 25 ], "kind": "commanddeclaration" }, { "full_name": "Ordnode.Valid'.eraseMin_aux", "code": "theorem Valid'.eraseMin_aux {s l} {x : α} {r o₁ o₂} (H : Valid' o₁ (.node s l x r) o₂) :\n Valid' ↑(findMin' l x) (@eraseMin α (.node' l x r)) o₂ ∧\n size (.node' l x r) = size (eraseMin (.node' l x r)) + 1", "start": [ 1403, 1 ], "end": [ 1408, 12 ], "kind": "commanddeclaration" }, { "full_name": "Ordnode.eraseMin.valid", "code": "theorem eraseMin.valid : ∀ {t}, @Valid α _ t → Valid (eraseMin t)", "start": [ 1411, 1 ], "end": [ 1413, 74 ], "kind": "commanddeclaration" }, { "full_name": "Ordnode.eraseMax.valid", "code": "theorem eraseMax.valid {t} (h : @Valid α _ t) : Valid (eraseMax t)", "start": [ 1416, 1 ], "end": [ 1417, 66 ], "kind": "commanddeclaration" }, { "full_name": "Ordnode.Valid'.glue_aux", "code": "theorem Valid'.glue_aux {l r o₁ o₂} (hl : Valid' o₁ l o₂) (hr : Valid' o₁ r o₂)\n (sep : l.All fun x => r.All fun y => x < y) (bal : BalancedSz (size l) (size r)) :\n Valid' o₁ (@glue α l r) o₂ ∧ size (glue l r) = size l + size r", "start": [ 1420, 1 ], "end": [ 1450, 33 ], "kind": "commanddeclaration" }, { "full_name": "Ordnode.Valid'.glue", "code": "theorem Valid'.glue {l} {x : α} {r o₁ o₂} (hl : Valid' o₁ l x) (hr : Valid' x r o₂) :\n BalancedSz (size l) (size r) →\n Valid' o₁ (@glue α l r) o₂ ∧ size (@glue α l r) = size l + size r", "start": [ 1453, 1 ], "end": [ 1456, 80 ], "kind": "commanddeclaration" }, { "full_name": "Ordnode.Valid'.merge_lemma", "code": "theorem Valid'.merge_lemma {a b c : ℕ} (h₁ : 3 * a < b + c + 1) (h₂ : b ≤ 3 * c) :\n 2 * (a + b) ≤ 9 * c + 5", "start": [ 1459, 1 ], "end": [ 1460, 40 ], "kind": "commanddeclaration" }, { "full_name": "Ordnode.Valid'.merge_aux₁", "code": "theorem Valid'.merge_aux₁ {o₁ o₂ ls ll lx lr rs rl rx rr t}\n (hl : Valid' o₁ (@Ordnode.node α ls ll lx lr) o₂) (hr : Valid' o₁ (.node rs rl rx rr) o₂)\n (h : delta * ls < rs) (v : Valid' o₁ t rx) (e : size t = ls + size rl) :\n Valid' o₁ (.balanceL t rx rr) o₂ ∧ size (.balanceL t rx rr) = ls + rs", "start": [ 1463, 1 ], "end": [ 1478, 50 ], "kind": "commanddeclaration" }, { "full_name": "Ordnode.Valid'.merge_aux", "code": "theorem Valid'.merge_aux {l r o₁ o₂} (hl : Valid' o₁ l o₂) (hr : Valid' o₁ r o₂)\n (sep : l.All fun x => r.All fun y => x < y) :\n Valid' o₁ (@merge α l r) o₂ ∧ size (merge l r) = size l + size r", "start": [ 1481, 1 ], "end": [ 1499, 73 ], "kind": "commanddeclaration" }, { "full_name": "Ordnode.Valid.merge", "code": "theorem Valid.merge {l r} (hl : Valid l) (hr : Valid r)\n (sep : l.All fun x => r.All fun y => x < y) : Valid (@merge α l r)", "start": [ 1502, 1 ], "end": [ 1504, 33 ], "kind": "commanddeclaration" }, { "full_name": "Ordnode.insertWith.valid_aux", "code": "theorem insertWith.valid_aux [IsTotal α (· ≤ ·)] [@DecidableRel α (· ≤ ·)] (f : α → α) (x : α)\n (hf : ∀ y, x ≤ y ∧ y ≤ x → x ≤ f y ∧ f y ≤ x) :\n ∀ {t o₁ o₂},\n Valid' o₁ t o₂ →\n Bounded nil o₁ x →\n Bounded nil x o₂ →\n Valid' o₁ (insertWith f x t) o₂ ∧ Raised (size t) (size (insertWith f x t))", "start": [ 1507, 1 ], "end": [ 1534, 33 ], "kind": "commanddeclaration" }, { "full_name": "Ordnode.insertWith.valid", "code": "theorem insertWith.valid [IsTotal α (· ≤ ·)] [@DecidableRel α (· ≤ ·)] (f : α → α) (x : α)\n (hf : ∀ y, x ≤ y ∧ y ≤ x → x ≤ f y ∧ f y ≤ x) {t} (h : Valid t) : Valid (insertWith f x t)", "start": [ 1537, 1 ], "end": [ 1539, 42 ], "kind": "commanddeclaration" }, { "full_name": "Ordnode.insert_eq_insertWith", "code": "theorem insert_eq_insertWith [@DecidableRel α (· ≤ ·)] (x : α) :\n ∀ t, Ordnode.insert x t = insertWith (fun _ => x) x t", "start": [ 1542, 1 ], "end": [ 1546, 86 ], "kind": "commanddeclaration" }, { "full_name": "Ordnode.insert.valid", "code": "theorem insert.valid [IsTotal α (· ≤ ·)] [@DecidableRel α (· ≤ ·)] (x : α) {t} (h : Valid t) :\n Valid (Ordnode.insert x t)", "start": [ 1549, 1 ], "end": [ 1551, 88 ], "kind": "commanddeclaration" }, { "full_name": "Ordnode.insert'_eq_insertWith", "code": "theorem insert'_eq_insertWith [@DecidableRel α (· ≤ ·)] (x : α) :\n ∀ t, insert' x t = insertWith id x t", "start": [ 1554, 1 ], "end": [ 1558, 80 ], "kind": "commanddeclaration" }, { "full_name": "Ordnode.insert'.valid", "code": "theorem insert'.valid [IsTotal α (· ≤ ·)] [@DecidableRel α (· ≤ ·)] (x : α) {t} (h : Valid t) :\n Valid (insert' x t)", "start": [ 1561, 1 ], "end": [ 1563, 73 ], "kind": "commanddeclaration" }, { "full_name": "Ordnode.Valid'.map_aux", "code": "theorem Valid'.map_aux {β} [Preorder β] {f : α → β} (f_strict_mono : StrictMono f) {t a₁ a₂}\n (h : Valid' a₁ t a₂) :\n Valid' (Option.map f a₁) (map f t) (Option.map f a₂) ∧ (map f t).size = t.size", "start": [ 1566, 1 ], "end": [ 1594, 30 ], "kind": "commanddeclaration" }, { "full_name": "Ordnode.map.valid", "code": "theorem map.valid {β} [Preorder β] {f : α → β} (f_strict_mono : StrictMono f) {t} (h : Valid t) :\n Valid (map f t)", "start": [ 1597, 1 ], "end": [ 1599, 37 ], "kind": "commanddeclaration" }, { "full_name": "Ordnode.Valid'.erase_aux", "code": "theorem Valid'.erase_aux [@DecidableRel α (· ≤ ·)] (x : α) {t a₁ a₂} (h : Valid' a₁ t a₂) :\n Valid' a₁ (erase x t) a₂ ∧ Raised (erase x t).size t.size", "start": [ 1602, 1 ], "end": [ 1634, 63 ], "kind": "commanddeclaration" }, { "full_name": "Ordnode.erase.valid", "code": "theorem erase.valid [@DecidableRel α (· ≤ ·)] (x : α) {t} (h : Valid t) : Valid (erase x t)", "start": [ 1637, 1 ], "end": [ 1638, 27 ], "kind": "commanddeclaration" }, { "full_name": "Ordnode.size_erase_of_mem", "code": "theorem size_erase_of_mem [@DecidableRel α (· ≤ ·)] {x : α} {t a₁ a₂} (h : Valid' a₁ t a₂)\n (h_mem : x ∈ t) : size (erase x t) = size t - 1", "start": [ 1641, 1 ], "end": [ 1675, 29 ], "kind": "commanddeclaration" }, { "full_name": "Ordset", "code": "def Ordset (α : Type*) [Preorder α] :=\n { t : Ordnode α // t.Valid }", "start": [ 1682, 1 ], "end": [ 1687, 31 ], "kind": "commanddeclaration" }, { "full_name": "Ordset.nil", "code": "nonrec def nil : Ordset α :=\n ⟨nil, ⟨⟩, ⟨⟩, ⟨⟩⟩", "start": [ 1696, 1 ], "end": [ 1698, 20 ], "kind": "commanddeclaration" }, { "full_name": "Ordset.size", "code": "def size (s : Ordset α) : ℕ :=\n s.1.size", "start": [ 1701, 1 ], "end": [ 1703, 11 ], "kind": "commanddeclaration" }, { "full_name": "Ordset.singleton", "code": "protected def singleton (a : α) : Ordset α :=\n ⟨singleton a, valid_singleton⟩", "start": [ 1706, 1 ], "end": [ 1708, 33 ], "kind": "commanddeclaration" }, { "full_name": "Ordset.instEmptyCollection", "code": "instance instEmptyCollection : EmptyCollection (Ordset α) :=\n ⟨nil⟩", "start": [ 1711, 1 ], "end": [ 1712, 8 ], "kind": "commanddeclaration" }, { "full_name": "Ordset.instInhabited", "code": "instance instInhabited : Inhabited (Ordset α) :=\n ⟨nil⟩", "start": [ 1715, 1 ], "end": [ 1716, 8 ], "kind": "commanddeclaration" }, { "full_name": "Ordset.instSingleton", "code": "instance instSingleton : Singleton α (Ordset α) :=\n ⟨Ordset.singleton⟩", "start": [ 1719, 1 ], "end": [ 1720, 21 ], "kind": "commanddeclaration" }, { "full_name": "Ordset.Empty", "code": "def Empty (s : Ordset α) : Prop :=\n s = ∅", "start": [ 1723, 1 ], "end": [ 1725, 8 ], "kind": "commanddeclaration" }, { "full_name": "Ordset.empty_iff", "code": "theorem empty_iff {s : Ordset α} : s = ∅ ↔ s.1.empty", "start": [ 1728, 1 ], "end": [ 1730, 77 ], "kind": "commanddeclaration" }, { "full_name": "Ordset.Empty.instDecidablePred", "code": "instance Empty.instDecidablePred : DecidablePred (@Empty α _) :=\n fun _ => decidable_of_iff' _ empty_iff", "start": [ 1733, 1 ], "end": [ 1734, 41 ], "kind": "commanddeclaration" }, { "full_name": "Ordset.insert", "code": "protected def insert [IsTotal α (· ≤ ·)] [@DecidableRel α (· ≤ ·)] (x : α) (s : Ordset α) :\n Ordset α :=\n ⟨Ordnode.insert x s.1, insert.valid _ s.2⟩", "start": [ 1737, 1 ], "end": [ 1741, 45 ], "kind": "commanddeclaration" }, { "full_name": "Ordset.instInsert", "code": "instance instInsert [IsTotal α (· ≤ ·)] [@DecidableRel α (· ≤ ·)] : Insert α (Ordset α) :=\n ⟨Ordset.insert⟩", "start": [ 1744, 1 ], "end": [ 1745, 18 ], "kind": "commanddeclaration" }, { "full_name": "Ordset.insert'", "code": "nonrec def insert' [IsTotal α (· ≤ ·)] [@DecidableRel α (· ≤ ·)] (x : α) (s : Ordset α) :\n Ordset α :=\n ⟨insert' x s.1, insert'.valid _ s.2⟩", "start": [ 1748, 1 ], "end": [ 1752, 39 ], "kind": "commanddeclaration" }, { "full_name": "Ordset.mem", "code": "def mem (x : α) (s : Ordset α) : Bool :=\n x ∈ s.val", "start": [ 1759, 1 ], "end": [ 1762, 12 ], "kind": "commanddeclaration" }, { "full_name": "Ordset.find", "code": "def find (x : α) (s : Ordset α) : Option α :=\n Ordnode.find x s.val", "start": [ 1765, 1 ], "end": [ 1768, 23 ], "kind": "commanddeclaration" }, { "full_name": "Ordset.instMembership", "code": "instance instMembership : Membership α (Ordset α) :=\n ⟨fun x s => mem x s⟩", "start": [ 1771, 1 ], "end": [ 1772, 23 ], "kind": "commanddeclaration" }, { "full_name": "Ordset.mem.decidable", "code": "instance mem.decidable (x : α) (s : Ordset α) : Decidable (x ∈ s) :=\n instDecidableEqBool _ _", "start": [ 1775, 1 ], "end": [ 1776, 26 ], "kind": "commanddeclaration" }, { "full_name": "Ordset.pos_size_of_mem", "code": "theorem pos_size_of_mem {x : α} {t : Ordset α} (h_mem : x ∈ t) : 0 < size t", "start": [ 1779, 1 ], "end": [ 1782, 52 ], "kind": "commanddeclaration" }, { "full_name": "Ordset.erase", "code": "def erase [@DecidableRel α (· ≤ ·)] (x : α) (s : Ordset α) : Ordset α :=\n ⟨Ordnode.erase x s.val, Ordnode.erase.valid x s.property⟩", "start": [ 1787, 1 ], "end": [ 1790, 60 ], "kind": "commanddeclaration" }, { "full_name": "Ordset.map", "code": "def map {β} [Preorder β] (f : α → β) (f_strict_mono : StrictMono f) (s : Ordset α) : Ordset β :=\n ⟨Ordnode.map f s.val, Ordnode.map.valid f_strict_mono s.property⟩", "start": [ 1793, 1 ], "end": [ 1795, 68 ], "kind": "commanddeclaration" } ]
Mathlib/LinearAlgebra/Projectivization/Subspace.lean
[ ".lake/packages/lean4/src/lean/Init.lean", "Mathlib/LinearAlgebra/Projectivization/Basic.lean" ]
[ { "full_name": "Projectivization.Subspace", "code": "@[ext]\nstructure Subspace where\n \n carrier : Set (ℙ K V)\n \n mem_add' (v w : V) (hv : v ≠ 0) (hw : w ≠ 0) (hvw : v + w ≠ 0) :\n mk K v hv ∈ carrier → mk K w hw ∈ carrier → mk K (v + w) hvw ∈ carrier", "start": [ 41, 1 ], "end": [ 50, 75 ], "kind": "commanddeclaration" }, { "full_name": "Projectivization.Subspace.mem_carrier_iff", "code": "@[simp]\ntheorem mem_carrier_iff (A : Subspace K V) (x : ℙ K V) : x ∈ A.carrier ↔ x ∈ A", "start": [ 64, 1 ], "end": [ 66, 13 ], "kind": "commanddeclaration" }, { "full_name": "Projectivization.Subspace.mem_add", "code": "theorem mem_add (T : Subspace K V) (v w : V) (hv : v ≠ 0) (hw : w ≠ 0) (hvw : v + w ≠ 0) :\n Projectivization.mk K v hv ∈ T →\n Projectivization.mk K w hw ∈ T → Projectivization.mk K (v + w) hvw ∈ T", "start": [ 69, 1 ], "end": [ 72, 27 ], "kind": "commanddeclaration" }, { "full_name": "Projectivization.Subspace.spanCarrier", "code": "inductive spanCarrier (S : Set (ℙ K V)) : Set (ℙ K V)\n | of (x : ℙ K V) (hx : x ∈ S) : spanCarrier S x\n | mem_add (v w : V) (hv : v ≠ 0) (hw : w ≠ 0) (hvw : v + w ≠ 0) :\n spanCarrier S (Projectivization.mk K v hv) →\n spanCarrier S (Projectivization.mk K w hw) → spanCarrier S (Projectivization.mk K (v + w) hvw)", "start": [ 75, 1 ], "end": [ 82, 101 ], "kind": "commanddeclaration" }, { "full_name": "Projectivization.Subspace.span", "code": "def span (S : Set (ℙ K V)) : Subspace K V where\n carrier := spanCarrier S\n mem_add' v w hv hw hvw := spanCarrier.mem_add v w hv hw hvw", "start": [ 85, 1 ], "end": [ 88, 62 ], "kind": "commanddeclaration" }, { "full_name": "Projectivization.Subspace.subset_span", "code": "theorem subset_span (S : Set (ℙ K V)) : S ⊆ span S", "start": [ 91, 1 ], "end": [ 92, 87 ], "kind": "commanddeclaration" }, { "full_name": "Projectivization.Subspace.gi", "code": "def gi : GaloisInsertion (span : Set (ℙ K V) → Subspace K V) SetLike.coe where\n choice S _hS := span S\n gc A B :=\n ⟨fun h => le_trans (subset_span _) h, by\n intro h x hx\n induction' hx with y hy\n · apply h\n assumption\n · apply B.mem_add\n assumption'⟩\n le_l_u S := subset_span _\n choice_eq _ _ := rfl", "start": [ 95, 1 ], "end": [ 108, 23 ], "kind": "commanddeclaration" }, { "full_name": "Projectivization.Subspace.span_coe", "code": "@[simp]\ntheorem span_coe (W : Subspace K V) : span ↑W = W", "start": [ 111, 1 ], "end": [ 114, 30 ], "kind": "commanddeclaration" }, { "full_name": "Projectivization.Subspace.instInf", "code": "instance instInf : Inf (Subspace K V) :=\n ⟨fun A B =>\n ⟨A ⊓ B, fun _v _w hv hw _hvw h1 h2 =>\n ⟨A.mem_add _ _ hv hw _ h1.1 h2.1, B.mem_add _ _ hv hw _ h1.2 h2.2⟩⟩⟩", "start": [ 117, 1 ], "end": [ 121, 75 ], "kind": "commanddeclaration" }, { "full_name": "Projectivization.Subspace.instInfSet", "code": "instance instInfSet : InfSet (Subspace K V) :=\n ⟨fun A =>\n ⟨sInf (SetLike.coe '' A), fun v w hv hw hvw h1 h2 t => by\n rintro ⟨s, hs, rfl⟩\n exact s.mem_add v w hv hw _ (h1 s ⟨s, hs, rfl⟩) (h2 s ⟨s, hs, rfl⟩)⟩⟩", "start": [ 126, 1 ], "end": [ 131, 76 ], "kind": "commanddeclaration" }, { "full_name": "Projectivization.Subspace.subspaceInhabited", "code": "instance subspaceInhabited : Inhabited (Subspace K V) where default := ⊤", "start": [ 145, 1 ], "end": [ 145, 73 ], "kind": "commanddeclaration" }, { "full_name": "Projectivization.Subspace.span_empty", "code": "@[simp]\ntheorem span_empty : span (∅ : Set (ℙ K V)) = ⊥", "start": [ 148, 1 ], "end": [ 150, 63 ], "kind": "commanddeclaration" }, { "full_name": "Projectivization.Subspace.span_univ", "code": "@[simp]\ntheorem span_univ : span (Set.univ : Set (ℙ K V)) = ⊤", "start": [ 153, 1 ], "end": [ 158, 39 ], "kind": "commanddeclaration" }, { "full_name": "Projectivization.Subspace.span_le_subspace_iff", "code": "theorem span_le_subspace_iff {S : Set (ℙ K V)} {W : Subspace K V} : span S ≤ W ↔ S ⊆ W", "start": [ 161, 1 ], "end": [ 164, 12 ], "kind": "commanddeclaration" }, { "full_name": "Projectivization.Subspace.monotone_span", "code": "@[mono]\ntheorem monotone_span : Monotone (span : Set (ℙ K V) → Subspace K V)", "start": [ 167, 1 ], "end": [ 171, 19 ], "kind": "commanddeclaration" }, { "full_name": "Projectivization.Subspace.subset_span_trans", "code": "theorem subset_span_trans {S T U : Set (ℙ K V)} (hST : S ⊆ span T) (hTU : T ⊆ span U) :\n S ⊆ span U", "start": [ 174, 1 ], "end": [ 176, 29 ], "kind": "commanddeclaration" }, { "full_name": "Projectivization.Subspace.span_union", "code": "theorem span_union (S T : Set (ℙ K V)) : span (S ∪ T) = span S ⊔ span T", "start": [ 179, 1 ], "end": [ 181, 27 ], "kind": "commanddeclaration" }, { "full_name": "Projectivization.Subspace.span_iUnion", "code": "theorem span_iUnion {ι} (s : ι → Set (ℙ K V)) : span (⋃ i, s i) = ⨆ i, span (s i)", "start": [ 184, 1 ], "end": [ 187, 28 ], "kind": "commanddeclaration" }, { "full_name": "Projectivization.Subspace.sup_span", "code": "theorem sup_span {S : Set (ℙ K V)} {W : Subspace K V} : W ⊔ span S = span (W ∪ S)", "start": [ 190, 1 ], "end": [ 193, 28 ], "kind": "commanddeclaration" }, { "full_name": "Projectivization.Subspace.span_sup", "code": "theorem span_sup {S : Set (ℙ K V)} {W : Subspace K V} : span S ⊔ W = span (S ∪ W)", "start": [ 196, 1 ], "end": [ 197, 28 ], "kind": "commanddeclaration" }, { "full_name": "Projectivization.Subspace.mem_span", "code": "theorem mem_span {S : Set (ℙ K V)} (u : ℙ K V) :\n u ∈ span S ↔ ∀ W : Subspace K V, S ⊆ W → u ∈ W", "start": [ 200, 1 ], "end": [ 205, 64 ], "kind": "commanddeclaration" }, { "full_name": "Projectivization.Subspace.span_eq_sInf", "code": "theorem span_eq_sInf {S : Set (ℙ K V)} : span S = sInf { W : Subspace K V| S ⊆ W }", "start": [ 208, 1 ], "end": [ 216, 63 ], "kind": "commanddeclaration" }, { "full_name": "Projectivization.Subspace.span_eq_of_le", "code": "theorem span_eq_of_le {S : Set (ℙ K V)} {W : Subspace K V} (hS : S ⊆ W) (hW : W ≤ span S) :\n span S = W", "start": [ 219, 1 ], "end": [ 224, 47 ], "kind": "commanddeclaration" }, { "full_name": "Projectivization.Subspace.span_eq_span_iff", "code": "theorem span_eq_span_iff {S T : Set (ℙ K V)} : span S = span T ↔ S ⊆ span T ∧ T ⊆ span S", "start": [ 227, 1 ], "end": [ 231, 75 ], "kind": "commanddeclaration" } ]
Mathlib/NumberTheory/LucasLehmer.lean
[ "Mathlib/Algebra/Order/Ring/Abs.lean", "Mathlib/GroupTheory/OrderOfElement.lean", "Mathlib/Algebra/Ring/Nat.lean", "Mathlib/RingTheory/Fintype.lean", "Mathlib/Data/ZMod/Basic.lean", ".lake/packages/lean4/src/lean/Init.lean", "Mathlib/Algebra/Order/Ring/Basic.lean", "Mathlib/Algebra/Order/Group/Basic.lean", "Mathlib/Tactic/IntervalCases.lean" ]
[ { "full_name": "mersenne", "code": "def mersenne (p : ℕ) : ℕ :=\n 2 ^ p - 1", "start": [ 43, 1 ], "end": [ 45, 12 ], "kind": "commanddeclaration" }, { "full_name": "strictMono_mersenne", "code": "theorem strictMono_mersenne : StrictMono mersenne", "start": [ 48, 1 ], "end": [ 49, 85 ], "kind": "commanddeclaration" }, { "full_name": "mersenne_lt_mersenne", "code": "@[simp]\ntheorem mersenne_lt_mersenne {p q : ℕ} : mersenne p < mersenne q ↔ p < q", "start": [ 51, 1 ], "end": [ 53, 32 ], "kind": "commanddeclaration" }, { "full_name": "mersenne_le_mersenne", "code": "@[simp]\ntheorem mersenne_le_mersenne {p q : ℕ} : mersenne p ≤ mersenne q ↔ p ≤ q", "start": [ 57, 1 ], "end": [ 59, 32 ], "kind": "commanddeclaration" }, { "full_name": "mersenne_zero", "code": "@[simp] theorem mersenne_zero : mersenne 0 = 0", "start": [ 63, 1 ], "end": [ 63, 54 ], "kind": "commanddeclaration" }, { "full_name": "mersenne_pos", "code": "@[simp] theorem mersenne_pos {p : ℕ} : 0 < mersenne p ↔ 0 < p", "start": [ 65, 1 ], "end": [ 65, 95 ], "kind": "commanddeclaration" }, { "full_name": "Mathlib.Meta.Positivity.evalMersenne", "code": "@[positivity mersenne _]\ndef evalMersenne : PositivityExt where eval {u α} _zα _pα e := do\n match u, α, e with\n | 0, ~q(ℕ), ~q(mersenne $a) =>\n let ra ← core q(inferInstance) q(inferInstance) a\n assertInstancesCommute\n match ra with\n | .positive pa => pure (.positive q(mersenne_pos_of_pos $pa))\n | _ => pure (.nonnegative q(Nat.zero_le (mersenne $a)))\n | _, _, _ => throwError \"not mersenne\"", "start": [ 74, 1 ], "end": [ 84, 41 ], "kind": "commanddeclaration" }, { "full_name": "one_lt_mersenne", "code": "@[simp]\ntheorem one_lt_mersenne {p : ℕ} : 1 < mersenne p ↔ 1 < p", "start": [ 88, 1 ], "end": [ 90, 32 ], "kind": "commanddeclaration" }, { "full_name": "succ_mersenne", "code": "@[simp]\ntheorem succ_mersenne (k : ℕ) : mersenne k + 1 = 2 ^ k", "start": [ 92, 1 ], "end": [ 95, 45 ], "kind": "commanddeclaration" }, { "full_name": "LucasLehmer.s", "code": "def s : ℕ → ℤ\n | 0 => 4\n | i + 1 => s i ^ 2 - 2", "start": [ 113, 1 ], "end": [ 116, 25 ], "kind": "commanddeclaration" }, { "full_name": "LucasLehmer.sZMod", "code": "def sZMod (p : ℕ) : ℕ → ZMod (2 ^ p - 1)\n | 0 => 4\n | i + 1 => sZMod p i ^ 2 - 2", "start": [ 119, 1 ], "end": [ 122, 31 ], "kind": "commanddeclaration" }, { "full_name": "LucasLehmer.sMod", "code": "def sMod (p : ℕ) : ℕ → ℤ\n | 0 => 4 % (2 ^ p - 1)\n | i + 1 => (sMod p i ^ 2 - 2) % (2 ^ p - 1)", "start": [ 125, 1 ], "end": [ 128, 46 ], "kind": "commanddeclaration" }, { "full_name": "LucasLehmer.mersenne_int_pos", "code": "theorem mersenne_int_pos {p : ℕ} (hp : p ≠ 0) : (0 : ℤ) < 2 ^ p - 1", "start": [ 131, 1 ], "end": [ 132, 46 ], "kind": "commanddeclaration" }, { "full_name": "LucasLehmer.mersenne_int_ne_zero", "code": "theorem mersenne_int_ne_zero (p : ℕ) (hp : p ≠ 0) : (2 ^ p - 1 : ℤ) ≠ 0", "start": [ 134, 1 ], "end": [ 135, 28 ], "kind": "commanddeclaration" }, { "full_name": "LucasLehmer.sMod_nonneg", "code": "theorem sMod_nonneg (p : ℕ) (hp : p ≠ 0) (i : ℕ) : 0 ≤ sMod p i", "start": [ 138, 1 ], "end": [ 142, 36 ], "kind": "commanddeclaration" }, { "full_name": "LucasLehmer.sMod_mod", "code": "theorem sMod_mod (p i : ℕ) : sMod p i % (2 ^ p - 1) = sMod p i", "start": [ 145, 1 ], "end": [ 145, 93 ], "kind": "commanddeclaration" }, { "full_name": "LucasLehmer.sMod_lt", "code": "theorem sMod_lt (p : ℕ) (hp : p ≠ 0) (i : ℕ) : sMod p i < 2 ^ p - 1", "start": [ 148, 1 ], "end": [ 151, 47 ], "kind": "commanddeclaration" }, { "full_name": "LucasLehmer.sZMod_eq_s", "code": "theorem sZMod_eq_s (p' : ℕ) (i : ℕ) : sZMod (p' + 2) i = (s i : ZMod (2 ^ (p' + 2) - 1))", "start": [ 154, 1 ], "end": [ 158, 34 ], "kind": "commanddeclaration" }, { "full_name": "LucasLehmer.Int.natCast_pow_pred", "code": "theorem Int.natCast_pow_pred (b p : ℕ) (w : 0 < b) : ((b ^ p - 1 : ℕ) : ℤ) = (b : ℤ) ^ p - 1", "start": [ 162, 1 ], "end": [ 164, 12 ], "kind": "commanddeclaration" }, { "full_name": "LucasLehmer.Int.coe_nat_two_pow_pred", "code": "theorem Int.coe_nat_two_pow_pred (p : ℕ) : ((2 ^ p - 1 : ℕ) : ℤ) = (2 ^ p - 1 : ℤ)", "start": [ 169, 1 ], "end": [ 170, 39 ], "kind": "commanddeclaration" }, { "full_name": "LucasLehmer.sZMod_eq_sMod", "code": "theorem sZMod_eq_sMod (p : ℕ) (i : ℕ) : sZMod p i = (sMod p i : ZMod (2 ^ p - 1))", "start": [ 173, 1 ], "end": [ 174, 83 ], "kind": "commanddeclaration" }, { "full_name": "LucasLehmer.lucasLehmerResidue", "code": "def lucasLehmerResidue (p : ℕ) : ZMod (2 ^ p - 1) :=\n sZMod p (p - 2)", "start": [ 177, 1 ], "end": [ 179, 18 ], "kind": "commanddeclaration" }, { "full_name": "LucasLehmer.residue_eq_zero_iff_sMod_eq_zero", "code": "theorem residue_eq_zero_iff_sMod_eq_zero (p : ℕ) (w : 1 < p) :\n lucasLehmerResidue p = 0 ↔ sMod p (p - 2) = 0", "start": [ 182, 1 ], "end": [ 198, 9 ], "kind": "commanddeclaration" }, { "full_name": "LucasLehmer.LucasLehmerTest", "code": "def LucasLehmerTest (p : ℕ) : Prop :=\n lucasLehmerResidue p = 0", "start": [ 201, 1 ], "end": [ 205, 27 ], "kind": "commanddeclaration" }, { "full_name": "LucasLehmer.q", "code": "def q (p : ℕ) : ℕ+ :=\n ⟨Nat.minFac (mersenne p), Nat.minFac_pos (mersenne p)⟩", "start": [ 215, 1 ], "end": [ 217, 57 ], "kind": "commanddeclaration" }, { "full_name": "LucasLehmer.X", "code": "def X (q : ℕ+) : Type :=\n ZMod q × ZMod q", "start": [ 225, 1 ], "end": [ 227, 18 ], "kind": "commanddeclaration" }, { "full_name": "LucasLehmer.X.ext", "code": "@[ext]\ntheorem ext {x y : X q} (h₁ : x.1 = y.1) (h₂ : x.2 = y.2) : x = y", "start": [ 240, 1 ], "end": [ 242, 26 ], "kind": "commanddeclaration" }, { "full_name": "LucasLehmer.X.zero_fst", "code": "@[simp] theorem zero_fst : (0 : X q).1 = 0", "start": [ 246, 1 ], "end": [ 246, 50 ], "kind": "commanddeclaration" }, { "full_name": "LucasLehmer.X.zero_snd", "code": "@[simp] theorem zero_snd : (0 : X q).2 = 0", "start": [ 247, 1 ], "end": [ 247, 50 ], "kind": "commanddeclaration" }, { "full_name": "LucasLehmer.X.add_fst", "code": "@[simp]\ntheorem add_fst (x y : X q) : (x + y).1 = x.1 + y.1", "start": [ 249, 1 ], "end": [ 251, 6 ], "kind": "commanddeclaration" }, { "full_name": "LucasLehmer.X.add_snd", "code": "@[simp]\ntheorem add_snd (x y : X q) : (x + y).2 = x.2 + y.2", "start": [ 255, 1 ], "end": [ 257, 6 ], "kind": "commanddeclaration" }, { "full_name": "LucasLehmer.X.neg_fst", "code": "@[simp]\ntheorem neg_fst (x : X q) : (-x).1 = -x.1", "start": [ 261, 1 ], "end": [ 263, 6 ], "kind": "commanddeclaration" }, { "full_name": "LucasLehmer.X.neg_snd", "code": "@[simp]\ntheorem neg_snd (x : X q) : (-x).2 = -x.2", "start": [ 267, 1 ], "end": [ 269, 6 ], "kind": "commanddeclaration" }, { "full_name": "LucasLehmer.X.mul_fst", "code": "@[simp]\ntheorem mul_fst (x y : X q) : (x * y).1 = x.1 * y.1 + 3 * x.2 * y.2", "start": [ 275, 1 ], "end": [ 277, 6 ], "kind": "commanddeclaration" }, { "full_name": "LucasLehmer.X.mul_snd", "code": "@[simp]\ntheorem mul_snd (x y : X q) : (x * y).2 = x.1 * y.2 + x.2 * y.1", "start": [ 281, 1 ], "end": [ 283, 6 ], "kind": "commanddeclaration" }, { "full_name": "LucasLehmer.X.one_fst", "code": "@[simp]\ntheorem one_fst : (1 : X q).1 = 1", "start": [ 289, 1 ], "end": [ 291, 6 ], "kind": "commanddeclaration" }, { "full_name": "LucasLehmer.X.one_snd", "code": "@[simp]\ntheorem one_snd : (1 : X q).2 = 0", "start": [ 295, 1 ], "end": [ 297, 6 ], "kind": "commanddeclaration" }, { "full_name": "LucasLehmer.X.fst_natCast", "code": "@[simp] theorem fst_natCast (n : ℕ) : (n : X q).fst = (n : ZMod q)", "start": [ 315, 1 ], "end": [ 315, 74 ], "kind": "commanddeclaration" }, { "full_name": "LucasLehmer.X.snd_natCast", "code": "@[simp] theorem snd_natCast (n : ℕ) : (n : X q).snd = (0 : ZMod q)", "start": [ 319, 1 ], "end": [ 319, 74 ], "kind": "commanddeclaration" }, { "full_name": "LucasLehmer.X.ofNat_fst", "code": "@[simp] theorem ofNat_fst (n : ℕ) [n.AtLeastTwo] :\n (no_index (OfNat.ofNat n) : X q).fst = OfNat.ofNat n", "start": [ 324, 1 ], "end": [ 326, 6 ], "kind": "commanddeclaration" }, { "full_name": "LucasLehmer.X.ofNat_snd", "code": "@[simp] theorem ofNat_snd (n : ℕ) [n.AtLeastTwo] :\n (no_index (OfNat.ofNat n) : X q).snd = 0", "start": [ 329, 1 ], "end": [ 331, 6 ], "kind": "commanddeclaration" }, { "full_name": "LucasLehmer.X.left_distrib", "code": "theorem left_distrib (x y z : X q) : x * (y + z) = x * y + x * z", "start": [ 342, 1 ], "end": [ 343, 25 ], "kind": "commanddeclaration" }, { "full_name": "LucasLehmer.X.right_distrib", "code": "theorem right_distrib (x y z : X q) : (x + y) * z = x * z + y * z", "start": [ 347, 1 ], "end": [ 348, 25 ], "kind": "commanddeclaration" }, { "full_name": "LucasLehmer.X.fst_intCast", "code": "@[simp]\ntheorem fst_intCast (n : ℤ) : (n : X q).fst = (n : ZMod q)", "start": [ 367, 1 ], "end": [ 369, 6 ], "kind": "commanddeclaration" }, { "full_name": "LucasLehmer.X.snd_intCast", "code": "@[simp]\ntheorem snd_intCast (n : ℤ) : (n : X q).snd = (0 : ZMod q)", "start": [ 373, 1 ], "end": [ 375, 6 ], "kind": "commanddeclaration" }, { "full_name": "LucasLehmer.X.coe_mul", "code": "@[norm_cast]\ntheorem coe_mul (n m : ℤ) : ((n * m : ℤ) : X q) = (n : X q) * (m : X q)", "start": [ 384, 1 ], "end": [ 385, 91 ], "kind": "commanddeclaration" }, { "full_name": "LucasLehmer.X.coe_natCast", "code": "@[norm_cast]\ntheorem coe_natCast (n : ℕ) : ((n : ℤ) : X q) = (n : X q)", "start": [ 389, 1 ], "end": [ 390, 77 ], "kind": "commanddeclaration" }, { "full_name": "LucasLehmer.X.card_eq", "code": "theorem card_eq : Fintype.card (X q) = q ^ 2", "start": [ 396, 1 ], "end": [ 399, 42 ], "kind": "commanddeclaration" }, { "full_name": "LucasLehmer.X.card_units_lt", "code": "nonrec theorem card_units_lt (w : 1 < q) : Fintype.card (X q)ˣ < q ^ 2", "start": [ 403, 1 ], "end": [ 407, 15 ], "kind": "commanddeclaration" }, { "full_name": "LucasLehmer.X.ω", "code": "def ω : X q := (2, 1)", "start": [ 411, 1 ], "end": [ 412, 22 ], "kind": "commanddeclaration" }, { "full_name": "LucasLehmer.X.ωb", "code": "def ωb : X q := (2, -1)", "start": [ 416, 1 ], "end": [ 417, 24 ], "kind": "commanddeclaration" }, { "full_name": "LucasLehmer.X.ω_mul_ωb", "code": "theorem ω_mul_ωb (q : ℕ+) : (ω : X q) * ωb = 1", "start": [ 421, 1 ], "end": [ 423, 21 ], "kind": "commanddeclaration" }, { "full_name": "LucasLehmer.X.ωb_mul_ω", "code": "theorem ωb_mul_ω (q : ℕ+) : (ωb : X q) * ω = 1", "start": [ 427, 1 ], "end": [ 428, 26 ], "kind": "commanddeclaration" }, { "full_name": "LucasLehmer.X.closed_form", "code": "theorem closed_form (i : ℕ) : (s i : X q) = (ω : X q) ^ 2 ^ i + (ωb : X q) ^ 2 ^ i", "start": [ 432, 1 ], "end": [ 444, 94 ], "kind": "commanddeclaration" }, { "full_name": "LucasLehmer.two_lt_q", "code": "theorem two_lt_q (p' : ℕ) : 2 < q (p' + 2)", "start": [ 456, 1 ], "end": [ 461, 61 ], "kind": "commanddeclaration" }, { "full_name": "LucasLehmer.ω_pow_formula", "code": "theorem ω_pow_formula (p' : ℕ) (h : lucasLehmerResidue (p' + 2) = 0) :\n ∃ k : ℤ,\n (ω : X (q (p' + 2))) ^ 2 ^ (p' + 1) =\n k * mersenne (p' + 2) * (ω : X (q (p' + 2))) ^ 2 ^ p' - 1", "start": [ 464, 1 ], "end": [ 487, 19 ], "kind": "commanddeclaration" }, { "full_name": "LucasLehmer.mersenne_coe_X", "code": "theorem mersenne_coe_X (p : ℕ) : (mersenne p : X (q p)) = 0", "start": [ 490, 1 ], "end": [ 493, 23 ], "kind": "commanddeclaration" }, { "full_name": "LucasLehmer.ω_pow_eq_neg_one", "code": "theorem ω_pow_eq_neg_one (p' : ℕ) (h : lucasLehmerResidue (p' + 2) = 0) :\n (ω : X (q (p' + 2))) ^ 2 ^ (p' + 1) = -1", "start": [ 497, 1 ], "end": [ 501, 16 ], "kind": "commanddeclaration" }, { "full_name": "LucasLehmer.ω_pow_eq_one", "code": "theorem ω_pow_eq_one (p' : ℕ) (h : lucasLehmerResidue (p' + 2) = 0) :\n (ω : X (q (p' + 2))) ^ 2 ^ (p' + 2) = 1", "start": [ 504, 1 ], "end": [ 510, 21 ], "kind": "commanddeclaration" }, { "full_name": "LucasLehmer.ωUnit", "code": "def ωUnit (p : ℕ) : Units (X (q p)) where\n val := ω\n inv := ωb\n val_inv := ω_mul_ωb _\n inv_val := ωb_mul_ω _", "start": [ 513, 1 ], "end": [ 518, 24 ], "kind": "commanddeclaration" }, { "full_name": "LucasLehmer.ωUnit_coe", "code": "@[simp]\ntheorem ωUnit_coe (p : ℕ) : (ωUnit p : X (q p)) = ω", "start": [ 521, 1 ], "end": [ 523, 6 ], "kind": "commanddeclaration" }, { "full_name": "LucasLehmer.order_ω", "code": "theorem order_ω (p' : ℕ) (h : lucasLehmerResidue (p' + 2) = 0) :\n orderOf (ωUnit (p' + 2)) = 2 ^ (p' + 2)", "start": [ 526, 1 ], "end": [ 544, 28 ], "kind": "commanddeclaration" }, { "full_name": "LucasLehmer.order_ineq", "code": "theorem order_ineq (p' : ℕ) (h : lucasLehmerResidue (p' + 2) = 0) :\n 2 ^ (p' + 2) < (q (p' + 2) : ℕ) ^ 2", "start": [ 547, 1 ], "end": [ 552, 79 ], "kind": "commanddeclaration" }, { "full_name": "lucas_lehmer_sufficiency", "code": "theorem lucas_lehmer_sufficiency (p : ℕ) (w : 1 < p) : LucasLehmerTest p → (mersenne p).Prime", "start": [ 561, 1 ], "end": [ 572, 40 ], "kind": "commanddeclaration" }, { "full_name": "LucasLehmer.norm_num_ext.sMod'", "code": "def sMod' (q : ℕ) : ℕ → ℕ\n | 0 => 4 % q\n | i + 1 => (sMod' q i ^ 2 + (q - 2)) % q", "start": [ 593, 1 ], "end": [ 597, 43 ], "kind": "commanddeclaration" }, { "full_name": "LucasLehmer.norm_num_ext.sMod'_eq_sMod", "code": "theorem sMod'_eq_sMod (p k : ℕ) (hp : 2 ≤ p) : (sMod' (2 ^ p - 1) k : ℤ) = sMod p k", "start": [ 599, 1 ], "end": [ 617, 43 ], "kind": "commanddeclaration" }, { "full_name": "LucasLehmer.norm_num_ext.testTrueHelper", "code": "lemma testTrueHelper (p : ℕ) (hp : Nat.blt 1 p = true) (h : sMod' (2 ^ p - 1) (p - 2) = 0) :\n LucasLehmerTest p := by\n rw [Nat.blt_eq] at hp\n rw [LucasLehmerTest, LucasLehmer.residue_eq_zero_iff_sMod_eq_zero p hp, ← sMod'_eq_sMod p _ hp, h]\n rfl", "start": [ 619, 1 ], "end": [ 623, 6 ], "kind": "lemma" }, { "full_name": "LucasLehmer.norm_num_ext.testFalseHelper", "code": "lemma testFalseHelper (p : ℕ) (hp : Nat.blt 1 p = true)\n (h : Nat.ble 1 (sMod' (2 ^ p - 1) (p - 2))) : ¬ LucasLehmerTest p := by\n rw [Nat.blt_eq] at hp\n rw [Nat.ble_eq, Nat.succ_le, Nat.pos_iff_ne_zero] at h\n rw [LucasLehmerTest, LucasLehmer.residue_eq_zero_iff_sMod_eq_zero p hp, ← sMod'_eq_sMod p _ hp]\n simpa using h", "start": [ 625, 1 ], "end": [ 630, 16 ], "kind": "lemma" }, { "full_name": "LucasLehmer.norm_num_ext.isNat_lucasLehmerTest", "code": "theorem isNat_lucasLehmerTest : {p np : ℕ} →\n IsNat p np → LucasLehmerTest np → LucasLehmerTest p", "start": [ 632, 1 ], "end": [ 634, 24 ], "kind": "commanddeclaration" }, { "full_name": "LucasLehmer.norm_num_ext.isNat_not_lucasLehmerTest", "code": "theorem isNat_not_lucasLehmerTest : {p np : ℕ} →\n IsNat p np → ¬ LucasLehmerTest np → ¬ LucasLehmerTest p", "start": [ 636, 1 ], "end": [ 638, 24 ], "kind": "commanddeclaration" }, { "full_name": "LucasLehmer.norm_num_ext.evalLucasLehmerTest", "code": "@[norm_num LucasLehmer.LucasLehmerTest (_ : ℕ)]\ndef evalLucasLehmerTest : NormNumExt where eval {u α} e := do\n let .app _ (p : Q(ℕ)) ← Meta.whnfR e | failure\n let ⟨ep, hp⟩ ← deriveNat p _\n let np := ep.natLit!\n unless 1 < np do\n failure\n haveI' h1ltp : Nat.blt 1 $ep =Q true := ⟨⟩\n if sMod' (2 ^ np - 1) (np - 2) = 0 then\n haveI' hs : sMod' (2 ^ $ep - 1) ($ep - 2) =Q 0 := ⟨⟩\n have pf : Q(LucasLehmerTest $ep) := q(testTrueHelper $ep $h1ltp $hs)\n have pf' : Q(LucasLehmerTest $p) := q(isNat_lucasLehmerTest $hp $pf)\n return .isTrue pf'\n else\n haveI' hs : Nat.ble 1 (sMod' (2 ^ $ep - 1) ($ep - 2)) =Q true := ⟨⟩\n have pf : Q(¬ LucasLehmerTest $ep) := q(testFalseHelper $ep $h1ltp $hs)\n have pf' : Q(¬ LucasLehmerTest $p) := q(isNat_not_lucasLehmerTest $hp $pf)\n return .isFalse pf'", "start": [ 640, 1 ], "end": [ 659, 24 ], "kind": "commanddeclaration" }, { "full_name": "modEq_mersenne", "code": "theorem modEq_mersenne (n k : ℕ) : k ≡ k / 2 ^ n + k % 2 ^ n [MOD 2 ^ n - 1]", "start": [ 683, 1 ], "end": [ 689, 49 ], "kind": "commanddeclaration" } ]
Mathlib/CategoryTheory/Category/GaloisConnection.lean
[ ".lake/packages/lean4/src/lean/Init.lean", "Mathlib/CategoryTheory/Category/Preorder.lean", "Mathlib/Order/GaloisConnection.lean", "Mathlib/CategoryTheory/Adjunction/Basic.lean" ]
[ { "full_name": "GaloisConnection.adjunction", "code": "def GaloisConnection.adjunction {l : X → Y} {u : Y → X} (gc : GaloisConnection l u) :\n gc.monotone_l.functor ⊣ gc.monotone_u.functor :=\n CategoryTheory.Adjunction.mkOfHomEquiv\n { homEquiv := fun X Y =>\n ⟨fun f => CategoryTheory.homOfLE (gc.le_u f.le),\n fun f => CategoryTheory.homOfLE (gc.l_le f.le), _, _⟩ }", "start": [ 27, 1 ], "end": [ 34, 65 ], "kind": "commanddeclaration" }, { "full_name": "CategoryTheory.Adjunction.gc", "code": "theorem Adjunction.gc {L : X ⥤ Y} {R : Y ⥤ X} (adj : L ⊣ R) : GaloisConnection L.obj R.obj", "start": [ 43, 1 ], "end": [ 47, 96 ], "kind": "commanddeclaration" } ]
Mathlib/RepresentationTheory/GroupCohomology/Hilbert90.lean
[ "Mathlib/LinearAlgebra/LinearIndependent.lean", ".lake/packages/lean4/src/lean/Init.lean", "Mathlib/FieldTheory/Fixed.lean", "Mathlib/RepresentationTheory/GroupCohomology/LowDegree.lean" ]
[ { "full_name": "groupCohomology.Hilbert90.aux", "code": "noncomputable def aux (f : (L ≃ₐ[K] L) → Lˣ) : L → L :=\n Finsupp.total (L ≃ₐ[K] L) (L → L) L (fun φ => φ)\n (Finsupp.equivFunOnFinite.symm (fun φ => (f φ : L)))", "start": [ 56, 1 ], "end": [ 59, 57 ], "kind": "commanddeclaration" }, { "full_name": "groupCohomology.Hilbert90.aux_ne_zero", "code": "theorem aux_ne_zero (f : (L ≃ₐ[K] L) → Lˣ) : aux f ≠ 0", "start": [ 61, 1 ], "end": [ 70, 60 ], "kind": "commanddeclaration" }, { "full_name": "groupCohomology.isMulOneCoboundary_of_isMulOneCocycle_of_aut_to_units", "code": "theorem isMulOneCoboundary_of_isMulOneCocycle_of_aut_to_units\n (f : (L ≃ₐ[K] L) → Lˣ) (hf : IsMulOneCocycle f) :\n IsMulOneCoboundary f", "start": [ 77, 1 ], "end": [ 96, 52 ], "kind": "commanddeclaration" }, { "full_name": "groupCohomology.H1ofAutOnUnitsUnique", "code": "noncomputable instance H1ofAutOnUnitsUnique : Unique (H1 (Rep.ofAlgebraAutOnUnits K L)) where\n default := 0\n uniq := fun a => Quotient.inductionOn' a fun x => (Submodule.Quotient.mk_eq_zero _).2 <| by\n refine (oneCoboundariesOfIsMulOneCoboundary ?_).2\n rcases isMulOneCoboundary_of_isMulOneCocycle_of_aut_to_units x.1\n (isMulOneCocycle_of_oneCocycles x) with ⟨β, hβ⟩\n use β", "start": [ 101, 1 ], "end": [ 109, 10 ], "kind": "commanddeclaration" } ]
Mathlib/Data/Fintype/Shrink.lean
[ "Mathlib/Data/Countable/Small.lean", ".lake/packages/lean4/src/lean/Init.lean", "Mathlib/Data/Fintype/Card.lean" ]
[ { "full_name": "Shrink.instFintype", "code": "noncomputable instance Shrink.instFintype : Fintype (Shrink.{v} α) := .ofEquiv _ (equivShrink _)", "start": [ 16, 1 ], "end": [ 16, 97 ], "kind": "commanddeclaration" }, { "full_name": "Fintype.card_shrink", "code": "@[simp] lemma Fintype.card_shrink [Fintype (Shrink.{v} α)] : card (Shrink.{v} α) = card α :=\n card_congr (equivShrink _).symm", "start": [ 18, 1 ], "end": [ 19, 34 ], "kind": "lemma" } ]
Mathlib/Topology/Algebra/Module/LinearPMap.lean
[ ".lake/packages/lean4/src/lean/Init.lean", "Mathlib/LinearAlgebra/LinearPMap.lean", "Mathlib/Topology/Algebra/Module/Basic.lean" ]
[ { "full_name": "LinearPMap.IsClosed", "code": "def IsClosed (f : E →ₗ.[R] F) : Prop :=\n _root_.IsClosed (f.graph : Set (E × F))", "start": [ 58, 1 ], "end": [ 60, 42 ], "kind": "commanddeclaration" }, { "full_name": "LinearPMap.IsClosable", "code": "def IsClosable (f : E →ₗ.[R] F) : Prop :=\n ∃ f' : LinearPMap R E F, f.graph.topologicalClosure = f'.graph", "start": [ 66, 1 ], "end": [ 68, 65 ], "kind": "commanddeclaration" }, { "full_name": "LinearPMap.IsClosed.isClosable", "code": "theorem IsClosed.isClosable {f : E →ₗ.[R] F} (hf : f.IsClosed) : f.IsClosable", "start": [ 71, 1 ], "end": [ 73, 42 ], "kind": "commanddeclaration" }, { "full_name": "LinearPMap.IsClosable.leIsClosable", "code": "theorem IsClosable.leIsClosable {f g : E →ₗ.[R] F} (hf : f.IsClosable) (hfg : g ≤ f) :\n g.IsClosable", "start": [ 76, 1 ], "end": [ 85, 63 ], "kind": "commanddeclaration" }, { "full_name": "LinearPMap.IsClosable.existsUnique", "code": "theorem IsClosable.existsUnique {f : E →ₗ.[R] F} (hf : f.IsClosable) :\n ∃! f' : E →ₗ.[R] F, f.graph.topologicalClosure = f'.graph", "start": [ 88, 1 ], "end": [ 92, 20 ], "kind": "commanddeclaration" }, { "full_name": "LinearPMap.closure", "code": "noncomputable def closure (f : E →ₗ.[R] F) : E →ₗ.[R] F :=\n if hf : f.IsClosable then hf.choose else f", "start": [ 97, 1 ], "end": [ 100, 45 ], "kind": "commanddeclaration" }, { "full_name": "LinearPMap.closure_def", "code": "theorem closure_def {f : E →ₗ.[R] F} (hf : f.IsClosable) : f.closure = hf.choose", "start": [ 103, 1 ], "end": [ 104, 21 ], "kind": "commanddeclaration" }, { "full_name": "LinearPMap.closure_def'", "code": "theorem closure_def' {f : E →ₗ.[R] F} (hf : ¬f.IsClosable) : f.closure = f", "start": [ 107, 1 ], "end": [ 107, 100 ], "kind": "commanddeclaration" }, { "full_name": "LinearPMap.IsClosable.graph_closure_eq_closure_graph", "code": "theorem IsClosable.graph_closure_eq_closure_graph {f : E →ₗ.[R] F} (hf : f.IsClosable) :\n f.graph.topologicalClosure = f.closure.graph", "start": [ 110, 1 ], "end": [ 115, 23 ], "kind": "commanddeclaration" }, { "full_name": "LinearPMap.le_closure", "code": "theorem le_closure (f : E →ₗ.[R] F) : f ≤ f.closure", "start": [ 118, 1 ], "end": [ 124, 23 ], "kind": "commanddeclaration" }, { "full_name": "LinearPMap.IsClosable.closure_mono", "code": "theorem IsClosable.closure_mono {f g : E →ₗ.[R] F} (hg : g.IsClosable) (h : f ≤ g) :\n f.closure ≤ g.closure", "start": [ 127, 1 ], "end": [ 132, 61 ], "kind": "commanddeclaration" }, { "full_name": "LinearPMap.IsClosable.closure_isClosed", "code": "theorem IsClosable.closure_isClosed {f : E →ₗ.[R] F} (hf : f.IsClosable) : f.closure.IsClosed", "start": [ 135, 1 ], "end": [ 138, 44 ], "kind": "commanddeclaration" }, { "full_name": "LinearPMap.IsClosable.closureIsClosable", "code": "theorem IsClosable.closureIsClosable {f : E →ₗ.[R] F} (hf : f.IsClosable) : f.closure.IsClosable", "start": [ 141, 1 ], "end": [ 143, 33 ], "kind": "commanddeclaration" }, { "full_name": "LinearPMap.isClosable_iff_exists_closed_extension", "code": "theorem isClosable_iff_exists_closed_extension {f : E →ₗ.[R] F} :\n f.IsClosable ↔ ∃ g : E →ₗ.[R] F, g.IsClosed ∧ f ≤ g", "start": [ 146, 1 ], "end": [ 149, 34 ], "kind": "commanddeclaration" }, { "full_name": "LinearPMap.HasCore", "code": "structure HasCore (f : E →ₗ.[R] F) (S : Submodule R E) : Prop where\n le_domain : S ≤ f.domain\n closure_eq : (f.domRestrict S).closure = f", "start": [ 155, 1 ], "end": [ 158, 45 ], "kind": "commanddeclaration" }, { "full_name": "LinearPMap.hasCore_def", "code": "theorem hasCore_def {f : E →ₗ.[R] F} {S : Submodule R E} (h : f.HasCore S) :\n (f.domRestrict S).closure = f", "start": [ 161, 1 ], "end": [ 163, 6 ], "kind": "commanddeclaration" }, { "full_name": "LinearPMap.closureHasCore", "code": "theorem closureHasCore (f : E →ₗ.[R] F) : f.closure.HasCore f.domain", "start": [ 166, 1 ], "end": [ 179, 42 ], "kind": "commanddeclaration" }, { "full_name": "LinearPMap.closure_inverse_graph", "code": "theorem closure_inverse_graph (hf : LinearMap.ker f.toFun = ⊥) (hf' : f.IsClosable)\n (hcf : LinearMap.ker f.closure.toFun = ⊥) :\n f.closure.inverse.graph = f.inverse.graph.topologicalClosure", "start": [ 188, 1 ], "end": [ 203, 48 ], "kind": "commanddeclaration" }, { "full_name": "LinearPMap.inverse_isClosable_iff", "code": "theorem inverse_isClosable_iff (hf : LinearMap.ker f.toFun = ⊥) (hf' : f.IsClosable) :\n f.inverse.IsClosable ↔ LinearMap.ker f.closure.toFun = ⊥", "start": [ 205, 1 ], "end": [ 225, 48 ], "kind": "commanddeclaration" }, { "full_name": "LinearPMap.inverse_closure", "code": "theorem inverse_closure (hf : LinearMap.ker f.toFun = ⊥) (hf' : f.IsClosable)\n (hcf : LinearMap.ker f.closure.toFun = ⊥) :\n f.inverse.closure = f.closure.inverse", "start": [ 227, 1 ], "end": [ 233, 78 ], "kind": "commanddeclaration" } ]
Mathlib/Algebra/Category/GrpWithZero.lean
[ "Mathlib/CategoryTheory/Category/Bipointed.lean", ".lake/packages/lean4/src/lean/Init.lean", "Mathlib/Algebra/Category/MonCat/Basic.lean", "Mathlib/Algebra/GroupWithZero/WithZero.lean" ]
[ { "full_name": "GrpWithZero", "code": "def GrpWithZero :=\n Bundled GroupWithZero", "start": [ 22, 1 ], "end": [ 24, 24 ], "kind": "commanddeclaration" }, { "full_name": "GrpWithZero.of", "code": "def of (α : Type*) [GroupWithZero α] : GrpWithZero :=\n Bundled.of α", "start": [ 36, 1 ], "end": [ 38, 15 ], "kind": "commanddeclaration" }, { "full_name": "GrpWithZero.coe_id", "code": "lemma coe_id {X : GrpWithZero} : (𝟙 X : X → X) = id := rfl", "start": [ 61, 1 ], "end": [ 61, 59 ], "kind": "lemma" }, { "full_name": "GrpWithZero.coe_comp", "code": "lemma coe_comp {X Y Z : GrpWithZero} {f : X ⟶ Y} {g : Y ⟶ Z} : (f ≫ g : X → Z) = g ∘ f := rfl", "start": [ 63, 1 ], "end": [ 63, 94 ], "kind": "lemma" }, { "full_name": "GrpWithZero.groupWithZeroConcreteCategory", "code": "instance groupWithZeroConcreteCategory : ConcreteCategory GrpWithZero where\n forget :=\n { obj := fun G => G\n map := fun f => f.toFun }\n forget_faithful := ⟨fun h => DFunLike.coe_injective h⟩", "start": [ 65, 1 ], "end": [ 69, 57 ], "kind": "commanddeclaration" }, { "full_name": "GrpWithZero.forget_map", "code": "@[simp] lemma forget_map {X Y : GrpWithZero} (f : X ⟶ Y) :\n (forget GrpWithZero).map f = f := rfl", "start": [ 71, 1 ], "end": [ 72, 40 ], "kind": "lemma" }, { "full_name": "GrpWithZero.hasForgetToBipointed", "code": "instance hasForgetToBipointed : HasForget₂ GrpWithZero Bipointed where\n forget₂ :=\n { obj := fun X => ⟨X, 0, 1⟩\n map := fun f => ⟨f, f.map_zero', f.map_one'⟩ }", "start": [ 74, 1 ], "end": [ 77, 55 ], "kind": "commanddeclaration" }, { "full_name": "GrpWithZero.hasForgetToMon", "code": "instance hasForgetToMon : HasForget₂ GrpWithZero MonCat where\n forget₂ :=\n { obj := fun X => ⟨ X , _ ⟩\n map := fun f => f.toMonoidHom }", "start": [ 81, 1 ], "end": [ 84, 40 ], "kind": "commanddeclaration" }, { "full_name": "GrpWithZero.Iso.mk", "code": "@[simps]\ndef Iso.mk {α β : GrpWithZero.{u}} (e : α ≃* β) : α ≅ β where\n hom := (e : α →*₀ β)\n inv := (e.symm : β →*₀ α)\n hom_inv_id := by\n ext\n exact e.symm_apply_apply _\n inv_hom_id := by\n ext\n exact e.apply_symm_apply _", "start": [ 88, 1 ], "end": [ 98, 31 ], "kind": "commanddeclaration" } ]
Mathlib/CategoryTheory/Monoidal/Bimon_.lean
[ "Mathlib/CategoryTheory/Monoidal/Comon_.lean", ".lake/packages/lean4/src/lean/Init.lean" ]
[ { "full_name": "Bimon_", "code": "def Bimon_ := Comon_ (Mon_ C)", "start": [ 36, 1 ], "end": [ 40, 30 ], "kind": "commanddeclaration" }, { "full_name": "Bimon_.ext", "code": "@[ext] lemma ext {X Y : Bimon_ C} {f g : X ⟶ Y} (w : f.hom.hom = g.hom.hom) : f = g :=\n Comon_.Hom.ext _ _ (Mon_.Hom.ext _ _ w)", "start": [ 46, 1 ], "end": [ 47, 42 ], "kind": "lemma" }, { "full_name": "Bimon_.id_hom'", "code": "@[simp] theorem id_hom' (M : Bimon_ C) : Comon_.Hom.hom (𝟙 M) = 𝟙 M.X", "start": [ 49, 1 ], "end": [ 49, 77 ], "kind": "commanddeclaration" }, { "full_name": "Bimon_.comp_hom'", "code": "@[simp]\ntheorem comp_hom' {M N K : Bimon_ C} (f : M ⟶ N) (g : N ⟶ K) : (f ≫ g).hom = f.hom ≫ g.hom", "start": [ 51, 1 ], "end": [ 53, 6 ], "kind": "commanddeclaration" }, { "full_name": "Bimon_.toMon_", "code": "abbrev toMon_ : Bimon_ C ⥤ Mon_ C := Comon_.forget (Mon_ C)", "start": [ 55, 1 ], "end": [ 56, 60 ], "kind": "commanddeclaration" }, { "full_name": "Bimon_.forget", "code": "def forget : Bimon_ C ⥤ C := toMon_ C ⋙ Mon_.forget C", "start": [ 58, 1 ], "end": [ 59, 54 ], "kind": "commanddeclaration" }, { "full_name": "Bimon_.toMon_forget", "code": "@[simp]\ntheorem toMon_forget : toMon_ C ⋙ Mon_.forget C = forget C", "start": [ 61, 1 ], "end": [ 62, 66 ], "kind": "commanddeclaration" }, { "full_name": "Bimon_.toComon_", "code": "@[simps!]\ndef toComon_ : Bimon_ C ⥤ Comon_ C := (Mon_.forgetMonoidal C).toOplaxMonoidalFunctor.mapComon", "start": [ 64, 1 ], "end": [ 66, 94 ], "kind": "commanddeclaration" }, { "full_name": "Bimon_.toComon_forget", "code": "@[simp]\ntheorem toComon_forget : toComon_ C ⋙ Comon_.forget C = forget C", "start": [ 68, 1 ], "end": [ 69, 72 ], "kind": "commanddeclaration" }, { "full_name": "Bimon_.toMon_Comon_obj", "code": "def toMon_Comon_obj (M : Bimon_ C) : Mon_ (Comon_ C) where\n X := (toComon_ C).obj M\n one := { hom := M.X.one }\n mul :=\n { hom := M.X.mul,\n hom_comul := by dsimp; simp [tensor_μ] }", "start": [ 71, 1 ], "end": [ 77, 45 ], "kind": "commanddeclaration" }, { "full_name": "Bimon_.toMon_Comon_", "code": "@[simps]\ndef toMon_Comon_ : Bimon_ C ⥤ Mon_ (Comon_ C) where\n obj := toMon_Comon_obj C\n map f :=\n { hom := (toComon_ C).map f }", "start": [ 81, 1 ], "end": [ 86, 32 ], "kind": "commanddeclaration" }, { "full_name": "Bimon_.ofMon_Comon_obj", "code": "@[simps]\ndef ofMon_Comon_obj (M : Mon_ (Comon_ C)) : Bimon_ C where\n X := (Comon_.forgetMonoidal C).toLaxMonoidalFunctor.mapMon.obj M\n counit := { hom := M.X.counit }\n comul :=\n { hom := M.X.comul,\n mul_hom := by dsimp; simp [tensor_μ] }", "start": [ 88, 1 ], "end": [ 95, 43 ], "kind": "commanddeclaration" }, { "full_name": "Bimon_.ofMon_Comon_", "code": "@[simps]\ndef ofMon_Comon_ : Mon_ (Comon_ C) ⥤ Bimon_ C where\n obj := ofMon_Comon_obj C\n map f :=\n { hom := (Comon_.forgetMonoidal C).toLaxMonoidalFunctor.mapMon.map f }", "start": [ 97, 1 ], "end": [ 102, 73 ], "kind": "commanddeclaration" }, { "full_name": "Bimon_.equivMon_Comon_", "code": "def equivMon_Comon_ : Bimon_ C ≌ Mon_ (Comon_ C) where\n functor := toMon_Comon_ C\n inverse := ofMon_Comon_ C\n unitIso := NatIso.ofComponents (fun _ => Comon_.mkIso (Mon_.mkIso (Iso.refl _)))\n counitIso := NatIso.ofComponents (fun _ => Mon_.mkIso (Comon_.mkIso (Iso.refl _)))", "start": [ 104, 1 ], "end": [ 109, 85 ], "kind": "commanddeclaration" } ]
Mathlib/Data/NNRat/BigOperators.lean
[ "Mathlib/Data/NNRat/Defs.lean", ".lake/packages/lean4/src/lean/Init.lean", "Mathlib/Algebra/Order/BigOperators/Ring/Finset.lean" ]
[ { "full_name": "NNRat.coe_list_sum", "code": "@[norm_cast]\ntheorem coe_list_sum (l : List ℚ≥0) : (l.sum : ℚ) = (l.map (↑)).sum", "start": [ 16, 1 ], "end": [ 18, 24 ], "kind": "commanddeclaration" }, { "full_name": "NNRat.coe_list_prod", "code": "@[norm_cast]\ntheorem coe_list_prod (l : List ℚ≥0) : (l.prod : ℚ) = (l.map (↑)).prod", "start": [ 21, 1 ], "end": [ 23, 25 ], "kind": "commanddeclaration" }, { "full_name": "NNRat.coe_multiset_sum", "code": "@[norm_cast]\ntheorem coe_multiset_sum (s : Multiset ℚ≥0) : (s.sum : ℚ) = (s.map (↑)).sum", "start": [ 26, 1 ], "end": [ 28, 28 ], "kind": "commanddeclaration" }, { "full_name": "NNRat.coe_multiset_prod", "code": "@[norm_cast]\ntheorem coe_multiset_prod (s : Multiset ℚ≥0) : (s.prod : ℚ) = (s.map (↑)).prod", "start": [ 31, 1 ], "end": [ 33, 29 ], "kind": "commanddeclaration" }, { "full_name": "NNRat.coe_sum", "code": "@[norm_cast]\ntheorem coe_sum {s : Finset α} {f : α → ℚ≥0} : ↑(∑ a ∈ s, f a) = ∑ a ∈ s, (f a : ℚ)", "start": [ 36, 1 ], "end": [ 38, 21 ], "kind": "commanddeclaration" }, { "full_name": "NNRat.toNNRat_sum_of_nonneg", "code": "theorem toNNRat_sum_of_nonneg {s : Finset α} {f : α → ℚ} (hf : ∀ a, a ∈ s → 0 ≤ f a) :\n (∑ a ∈ s, f a).toNNRat = ∑ a ∈ s, (f a).toNNRat", "start": [ 41, 1 ], "end": [ 44, 78 ], "kind": "commanddeclaration" }, { "full_name": "NNRat.coe_prod", "code": "@[norm_cast]\ntheorem coe_prod {s : Finset α} {f : α → ℚ≥0} : ↑(∏ a ∈ s, f a) = ∏ a ∈ s, (f a : ℚ)", "start": [ 47, 1 ], "end": [ 49, 22 ], "kind": "commanddeclaration" }, { "full_name": "NNRat.toNNRat_prod_of_nonneg", "code": "theorem toNNRat_prod_of_nonneg {s : Finset α} {f : α → ℚ} (hf : ∀ a ∈ s, 0 ≤ f a) :\n (∏ a ∈ s, f a).toNNRat = ∏ a ∈ s, (f a).toNNRat", "start": [ 52, 1 ], "end": [ 55, 79 ], "kind": "commanddeclaration" } ]
Mathlib/Data/Rbtree/Init.lean
[ ".lake/packages/lean4/src/lean/Init.lean", "Mathlib/Init/Align.lean", ".lake/packages/batteries/Batteries/Data/RBMap/Depth.lean" ]
[]
Mathlib/NumberTheory/ModularForms/EisensteinSeries/MDifferentiable.lean
[ "Mathlib/NumberTheory/ModularForms/EisensteinSeries/UniformConvergence.lean", "Mathlib/Analysis/Complex/LocallyUniformLimit.lean", "Mathlib/Geometry/Manifold/MFDeriv/FDeriv.lean", "Mathlib/Analysis/Complex/UpperHalfPlane/Manifold.lean", ".lake/packages/lean4/src/lean/Init.lean" ]
[ { "full_name": "EisensteinSeries.div_linear_zpow_differentiableOn", "code": "lemma div_linear_zpow_differentiableOn (k : ℤ) (a : Fin 2 → ℤ) :\n DifferentiableOn ℂ (fun z : ℂ => 1 / (a 0 * z + a 1) ^ k) {z : ℂ | 0 < z.im} := by\n rcases ne_or_eq a 0 with ha | rfl\n · apply DifferentiableOn.div (differentiableOn_const 1)\n · apply DifferentiableOn.zpow\n · fun_prop\n · left\n exact fun z hz ↦ linear_ne_zero _ ⟨z, hz⟩\n ((comp_ne_zero_iff _ Int.cast_injective Int.cast_zero).mpr ha)\n · exact fun z hz ↦ zpow_ne_zero k (linear_ne_zero (a ·)\n ⟨z, hz⟩ ((comp_ne_zero_iff _ Int.cast_injective Int.cast_zero).mpr ha))\n · simp only [Fin.isValue, Pi.zero_apply, Int.cast_zero, zero_mul, add_zero, one_div]\n apply differentiableOn_const", "start": [ 28, 1 ], "end": [ 42, 33 ], "kind": "lemma" }, { "full_name": "EisensteinSeries.eisSummand_extension_differentiableOn", "code": "lemma eisSummand_extension_differentiableOn (k : ℤ) (a : Fin 2 → ℤ) :\n DifferentiableOn ℂ (↑ₕeisSummand k a) {z : ℂ | 0 < z.im} := by\n apply DifferentiableOn.congr (div_linear_zpow_differentiableOn k a)\n intro z hz\n lift z to ℍ using hz\n apply comp_ofComplex", "start": [ 44, 1 ], "end": [ 51, 23 ], "kind": "lemma" }, { "full_name": "EisensteinSeries.eisensteinSeries_SIF_MDifferentiable", "code": "theorem eisensteinSeries_SIF_MDifferentiable {k : ℤ} {N : ℕ} (hk : 3 ≤ k) (a : Fin 2 → ZMod N) :\n MDifferentiable 𝓘(ℂ) 𝓘(ℂ) (eisensteinSeries_SIF a k)", "start": [ 53, 1 ], "end": [ 65, 51 ], "kind": "commanddeclaration" } ]
Mathlib/Algebra/Category/Grp/Biproducts.lean
[ "Mathlib/CategoryTheory/Preadditive/Biproducts.lean", "Mathlib/Algebra/Category/Grp/Preadditive.lean", ".lake/packages/lean4/src/lean/Init.lean", "Mathlib/Tactic/CategoryTheory/Elementwise.lean", "Mathlib/Algebra/Category/Grp/Limits.lean", "Mathlib/Algebra/Group/Pi/Lemmas.lean" ]
[ { "full_name": "AddCommGrp.binaryProductLimitCone", "code": "@[simps cone_pt isLimit_lift]\ndef binaryProductLimitCone (G H : AddCommGrp.{u}) : Limits.LimitCone (pair G H) where\n cone :=\n { pt := AddCommGrp.of (G × H)\n π :=\n { app := fun j =>\n Discrete.casesOn j fun j =>\n WalkingPair.casesOn j (AddMonoidHom.fst G H) (AddMonoidHom.snd G H)\n naturality := by rintro ⟨⟨⟩⟩ ⟨⟨⟩⟩ ⟨⟨⟨⟩⟩⟩ <;> rfl } }\n isLimit :=\n { lift := fun s => AddMonoidHom.prod (s.π.app ⟨WalkingPair.left⟩) (s.π.app ⟨WalkingPair.right⟩)\n fac := by rintro s (⟨⟩ | ⟨⟩) <;> rfl\n uniq := fun s m w => by\n simp_rw [← w ⟨WalkingPair.left⟩, ← w ⟨WalkingPair.right⟩]\n rfl }", "start": [ 37, 1 ], "end": [ 54, 14 ], "kind": "commanddeclaration" }, { "full_name": "AddCommGrp.binaryProductLimitCone_cone_π_app_left", "code": "@[simp]\ntheorem binaryProductLimitCone_cone_π_app_left (G H : AddCommGrp.{u}) :\n (binaryProductLimitCone G H).cone.π.app ⟨WalkingPair.left⟩ = AddMonoidHom.fst G H", "start": [ 57, 1 ], "end": [ 60, 6 ], "kind": "commanddeclaration" }, { "full_name": "AddCommGrp.binaryProductLimitCone_cone_π_app_right", "code": "@[simp]\ntheorem binaryProductLimitCone_cone_π_app_right (G H : AddCommGrp.{u}) :\n (binaryProductLimitCone G H).cone.π.app ⟨WalkingPair.right⟩ = AddMonoidHom.snd G H", "start": [ 63, 1 ], "end": [ 66, 6 ], "kind": "commanddeclaration" }, { "full_name": "AddCommGrp.biprodIsoProd", "code": "@[simps! hom_apply]\nnoncomputable def biprodIsoProd (G H : AddCommGrp.{u}) :\n (G ⊞ H : AddCommGrp) ≅ AddCommGrp.of (G × H) :=\n IsLimit.conePointUniqueUpToIso (BinaryBiproduct.isLimit G H) (binaryProductLimitCone G H).isLimit", "start": [ 69, 1 ], "end": [ 75, 100 ], "kind": "commanddeclaration" }, { "full_name": "AddCommGrp.biprodIsoProd_inv_comp_fst", "code": "@[simp, elementwise]\ntheorem biprodIsoProd_inv_comp_fst (G H : AddCommGrp.{u}) :\n (biprodIsoProd G H).inv ≫ biprod.fst = AddMonoidHom.fst G H", "start": [ 81, 1 ], "end": [ 84, 77 ], "kind": "commanddeclaration" }, { "full_name": "AddCommGrp.biprodIsoProd_inv_comp_snd", "code": "@[simp, elementwise]\ntheorem biprodIsoProd_inv_comp_snd (G H : AddCommGrp.{u}) :\n (biprodIsoProd G H).inv ≫ biprod.snd = AddMonoidHom.snd G H", "start": [ 87, 1 ], "end": [ 90, 78 ], "kind": "commanddeclaration" }, { "full_name": "AddCommGrp.HasLimit.lift", "code": "def lift (s : Fan f) : s.pt ⟶ AddCommGrp.of (∀ j, f j) where\n toFun x j := s.π.app ⟨j⟩ x\n map_zero' := by\n simp only [Functor.const_obj_obj, map_zero]\n rfl\n map_add' x y := by\n simp only [Functor.const_obj_obj, map_add]\n rfl", "start": [ 97, 1 ], "end": [ 112, 8 ], "kind": "commanddeclaration" }, { "full_name": "AddCommGrp.HasLimit.productLimitCone", "code": "@[simps]\ndef productLimitCone : Limits.LimitCone (Discrete.functor f) where\n cone :=\n { pt := AddCommGrp.of (∀ j, f j)\n π := Discrete.natTrans fun j => Pi.evalAddMonoidHom (fun j => f j) j.as }\n isLimit :=\n { lift := lift.{_, u} f\n fac := fun s j => rfl\n uniq := fun s m w => by\n ext x\n funext j\n exact congr_arg (fun g : s.pt ⟶ f j => (g : s.pt → f j) x) (w ⟨j⟩) }", "start": [ 115, 1 ], "end": [ 129, 77 ], "kind": "commanddeclaration" }, { "full_name": "AddCommGrp.biproductIsoPi", "code": "@[simps! hom_apply]\nnoncomputable def biproductIsoPi (f : J → AddCommGrp.{u}) :\n (⨁ f : AddCommGrp) ≅ AddCommGrp.of (∀ j, f j) :=\n IsLimit.conePointUniqueUpToIso (biproduct.isLimit f) (productLimitCone f).isLimit", "start": [ 138, 1 ], "end": [ 144, 84 ], "kind": "commanddeclaration" }, { "full_name": "AddCommGrp.biproductIsoPi_inv_comp_π", "code": "@[simp, elementwise]\ntheorem biproductIsoPi_inv_comp_π (f : J → AddCommGrp.{u}) (j : J) :\n (biproductIsoPi f).inv ≫ biproduct.π f j = Pi.evalAddMonoidHom (fun j => f j) j", "start": [ 150, 1 ], "end": [ 153, 62 ], "kind": "commanddeclaration" } ]
Mathlib/GroupTheory/Perm/ClosureSwap.lean
[ "Mathlib/Data/Set/Finite.lean", ".lake/packages/lean4/src/lean/Init.lean", "Mathlib/GroupTheory/GroupAction/FixedPoints.lean", "Mathlib/GroupTheory/Perm/Support.lean" ]
[ { "full_name": "finite_compl_fixedBy_closure_iff", "code": "theorem finite_compl_fixedBy_closure_iff {S : Set G} :\n (∀ g ∈ closure S, (fixedBy α g)ᶜ.Finite) ↔ ∀ g ∈ S, (fixedBy α g)ᶜ.Finite", "start": [ 29, 1 ], "end": [ 35, 62 ], "kind": "commanddeclaration" }, { "full_name": "finite_compl_fixedBy_swap", "code": "theorem finite_compl_fixedBy_swap {x y : α} : (fixedBy α (swap x y))ᶜ.Finite", "start": [ 37, 1 ], "end": [ 39, 98 ], "kind": "commanddeclaration" }, { "full_name": "Equiv.Perm.IsSwap.finite_compl_fixedBy", "code": "theorem Equiv.Perm.IsSwap.finite_compl_fixedBy {σ : Perm α} (h : σ.IsSwap) :\n (fixedBy α σ)ᶜ.Finite", "start": [ 41, 1 ], "end": [ 44, 34 ], "kind": "commanddeclaration" }, { "full_name": "SubmonoidClass.swap_mem_trans", "code": "theorem SubmonoidClass.swap_mem_trans {a b c : α} {C} [SetLike C (Perm α)]\n [SubmonoidClass C (Perm α)] (M : C) (hab : swap a b ∈ M) (hbc : swap b c ∈ M) :\n swap a c ∈ M", "start": [ 47, 1 ], "end": [ 55, 38 ], "kind": "commanddeclaration" }, { "full_name": "exists_smul_not_mem_of_subset_orbit_closure", "code": "theorem exists_smul_not_mem_of_subset_orbit_closure (S : Set G) (T : Set α) {a : α}\n (hS : ∀ g ∈ S, g⁻¹ ∈ S) (subset : T ⊆ orbit (closure S) a) (not_mem : a ∉ T)\n (nonempty : T.Nonempty) : ∃ σ ∈ S, ∃ a ∈ T, σ • a ∉ T", "start": [ 57, 1 ], "end": [ 70, 90 ], "kind": "commanddeclaration" }, { "full_name": "swap_mem_closure_isSwap", "code": "theorem swap_mem_closure_isSwap {S : Set (Perm α)} (hS : ∀ f ∈ S, f.IsSwap) {x y : α} :\n swap x y ∈ closure S ↔ x ∈ orbit (closure S) y", "start": [ 72, 1 ], "end": [ 88, 45 ], "kind": "commanddeclaration" }, { "full_name": "mem_closure_isSwap", "code": "theorem mem_closure_isSwap {S : Set (Perm α)} (hS : ∀ f ∈ S, f.IsSwap) {f : Perm α} :\n f ∈ closure S ↔ (fixedBy α f)ᶜ.Finite ∧ ∀ x, f x ∈ orbit (closure S) x", "start": [ 90, 1 ], "end": [ 114, 58 ], "kind": "commanddeclaration" }, { "full_name": "mem_closure_isSwap'", "code": "theorem mem_closure_isSwap' {f : Perm α} :\n f ∈ closure {σ : Perm α | σ.IsSwap} ↔ (fixedBy α f)ᶜ.Finite", "start": [ 116, 1 ], "end": [ 124, 42 ], "kind": "commanddeclaration" }, { "full_name": "closure_of_isSwap_of_isPretransitive", "code": "theorem closure_of_isSwap_of_isPretransitive [Finite α] {S : Set (Perm α)} (hS : ∀ σ ∈ S, σ.IsSwap)\n [MulAction.IsPretransitive (Subgroup.closure S) α] : Subgroup.closure S = ⊤", "start": [ 126, 1 ], "end": [ 129, 73 ], "kind": "commanddeclaration" }, { "full_name": "surjective_of_isSwap_of_isPretransitive", "code": "theorem surjective_of_isSwap_of_isPretransitive [Finite α] (S : Set G)\n (hS1 : ∀ σ ∈ S, Perm.IsSwap (MulAction.toPermHom G α σ)) (hS2 : Subgroup.closure S = ⊤)\n [h : MulAction.IsPretransitive G α] : Function.Surjective (MulAction.toPermHom G α)", "start": [ 131, 1 ], "end": [ 138, 74 ], "kind": "commanddeclaration" } ]
Mathlib/NumberTheory/Dioph.lean
[ "Mathlib/Data/PFun.lean", ".lake/packages/lean4/src/lean/Init.lean", "Mathlib/Data/Fin/Fin2.lean", "Mathlib/NumberTheory/PellMatiyasevic.lean", "Mathlib/Data/Vector3.lean" ]
[ { "full_name": "IsPoly", "code": "inductive IsPoly : ((α → ℕ) → ℤ) → Prop\n | proj : ∀ i, IsPoly fun x : α → ℕ => x i\n | const : ∀ n : ℤ, IsPoly fun _ : α → ℕ => n\n | sub : ∀ {f g : (α → ℕ) → ℤ}, IsPoly f → IsPoly g → IsPoly fun x => f x - g x\n | mul : ∀ {f g : (α → ℕ) → ℤ}, IsPoly f → IsPoly g → IsPoly fun x => f x * g x", "start": [ 74, 1 ], "end": [ 82, 81 ], "kind": "commanddeclaration" }, { "full_name": "IsPoly.neg", "code": "theorem IsPoly.neg {f : (α → ℕ) → ℤ} : IsPoly f → IsPoly (-f)", "start": [ 85, 1 ], "end": [ 86, 46 ], "kind": "commanddeclaration" }, { "full_name": "IsPoly.add", "code": "theorem IsPoly.add {f g : (α → ℕ) → ℤ} (hf : IsPoly f) (hg : IsPoly g) : IsPoly (f + g)", "start": [ 89, 1 ], "end": [ 90, 45 ], "kind": "commanddeclaration" }, { "full_name": "Poly", "code": "def Poly (α : Type u) := { f : (α → ℕ) → ℤ // IsPoly f }", "start": [ 93, 1 ], "end": [ 94, 57 ], "kind": "commanddeclaration" }, { "full_name": "Poly.instFunLike", "code": "instance instFunLike : FunLike (Poly α) (α → ℕ) ℤ :=\n ⟨Subtype.val, Subtype.val_injective⟩", "start": [ 101, 1 ], "end": [ 102, 39 ], "kind": "commanddeclaration" }, { "full_name": "Poly.isPoly", "code": "protected theorem isPoly (f : Poly α) : IsPoly f", "start": [ 105, 1 ], "end": [ 106, 56 ], "kind": "commanddeclaration" }, { "full_name": "Poly.ext", "code": "@[ext]\ntheorem ext {f g : Poly α} : (∀ x, f x = g x) → f = g", "start": [ 109, 1 ], "end": [ 111, 74 ], "kind": "commanddeclaration" }, { "full_name": "Poly.proj", "code": "def proj (i : α) : Poly α := ⟨_, IsPoly.proj i⟩", "start": [ 114, 1 ], "end": [ 115, 48 ], "kind": "commanddeclaration" }, { "full_name": "Poly.proj_apply", "code": "@[simp]\ntheorem proj_apply (i : α) (x) : proj i x = x i", "start": [ 118, 1 ], "end": [ 119, 55 ], "kind": "commanddeclaration" }, { "full_name": "Poly.const", "code": "def const (n : ℤ) : Poly α := ⟨_, IsPoly.const n⟩", "start": [ 122, 1 ], "end": [ 123, 50 ], "kind": "commanddeclaration" }, { "full_name": "Poly.const_apply", "code": "@[simp]\ntheorem const_apply (n) (x : α → ℕ) : const n x = n", "start": [ 126, 1 ], "end": [ 127, 59 ], "kind": "commanddeclaration" }, { "full_name": "Poly.coe_zero", "code": "@[simp]\ntheorem coe_zero : ⇑(0 : Poly α) = const 0", "start": [ 142, 1 ], "end": [ 143, 50 ], "kind": "commanddeclaration" }, { "full_name": "Poly.coe_one", "code": "@[simp]\ntheorem coe_one : ⇑(1 : Poly α) = const 1", "start": [ 146, 1 ], "end": [ 147, 49 ], "kind": "commanddeclaration" }, { "full_name": "Poly.coe_neg", "code": "@[simp]\ntheorem coe_neg (f : Poly α) : ⇑(-f) = -f", "start": [ 150, 1 ], "end": [ 151, 49 ], "kind": "commanddeclaration" }, { "full_name": "Poly.coe_add", "code": "@[simp]\ntheorem coe_add (f g : Poly α) : ⇑(f + g) = f + g", "start": [ 154, 1 ], "end": [ 155, 57 ], "kind": "commanddeclaration" }, { "full_name": "Poly.coe_sub", "code": "@[simp]\ntheorem coe_sub (f g : Poly α) : ⇑(f - g) = f - g", "start": [ 158, 1 ], "end": [ 159, 57 ], "kind": "commanddeclaration" }, { "full_name": "Poly.coe_mul", "code": "@[simp]\ntheorem coe_mul (f g : Poly α) : ⇑(f * g) = f * g", "start": [ 162, 1 ], "end": [ 163, 57 ], "kind": "commanddeclaration" }, { "full_name": "Poly.zero_apply", "code": "@[simp]\ntheorem zero_apply (x) : (0 : Poly α) x = 0", "start": [ 166, 1 ], "end": [ 167, 51 ], "kind": "commanddeclaration" }, { "full_name": "Poly.one_apply", "code": "@[simp]\ntheorem one_apply (x) : (1 : Poly α) x = 1", "start": [ 170, 1 ], "end": [ 171, 50 ], "kind": "commanddeclaration" }, { "full_name": "Poly.neg_apply", "code": "@[simp]\ntheorem neg_apply (f : Poly α) (x) : (-f) x = -f x", "start": [ 174, 1 ], "end": [ 175, 58 ], "kind": "commanddeclaration" }, { "full_name": "Poly.add_apply", "code": "@[simp]\ntheorem add_apply (f g : Poly α) (x : α → ℕ) : (f + g) x = f x + g x", "start": [ 178, 1 ], "end": [ 179, 76 ], "kind": "commanddeclaration" }, { "full_name": "Poly.sub_apply", "code": "@[simp]\ntheorem sub_apply (f g : Poly α) (x : α → ℕ) : (f - g) x = f x - g x", "start": [ 182, 1 ], "end": [ 183, 76 ], "kind": "commanddeclaration" }, { "full_name": "Poly.mul_apply", "code": "@[simp]\ntheorem mul_apply (f g : Poly α) (x : α → ℕ) : (f * g) x = f x * g x", "start": [ 186, 1 ], "end": [ 187, 76 ], "kind": "commanddeclaration" }, { "full_name": "Poly.induction", "code": "theorem induction {C : Poly α → Prop} (H1 : ∀ i, C (proj i)) (H2 : ∀ n, C (const n))\n (H3 : ∀ f g, C f → C g → C (f - g)) (H4 : ∀ f g, C f → C g → C (f * g)) (f : Poly α) : C f", "start": [ 225, 1 ], "end": [ 232, 25 ], "kind": "commanddeclaration" }, { "full_name": "Poly.sumsq", "code": "def sumsq : List (Poly α) → Poly α\n | [] => 0\n | p::ps => p * p + sumsq ps", "start": [ 235, 1 ], "end": [ 241, 30 ], "kind": "commanddeclaration" }, { "full_name": "Poly.sumsq_nonneg", "code": "theorem sumsq_nonneg (x : α → ℕ) : ∀ l, 0 ≤ sumsq l x", "start": [ 244, 1 ], "end": [ 248, 61 ], "kind": "commanddeclaration" }, { "full_name": "Poly.sumsq_eq_zero", "code": "theorem sumsq_eq_zero (x) : ∀ l, sumsq l x = 0 ↔ l.Forall fun a : Poly α => a x = 0", "start": [ 251, 1 ], "end": [ 266, 65 ], "kind": "commanddeclaration" }, { "full_name": "Poly.map", "code": "def map {α β} (f : α → β) (g : Poly α) : Poly β :=\n ⟨fun v => g <| v ∘ f, Poly.induction (C := fun g => IsPoly (fun v => g (v ∘ f)))\n (fun i => by simp; apply IsPoly.proj) (fun n => by simp; apply IsPoly.const)\n (fun f g pf pg => by simp; apply IsPoly.sub pf pg)\n (fun f g pf pg => by simp; apply IsPoly.mul pf pg) _⟩", "start": [ 271, 1 ], "end": [ 276, 58 ], "kind": "commanddeclaration" }, { "full_name": "Poly.map_apply", "code": "@[simp]\ntheorem map_apply {α β} (f : α → β) (g : Poly α) (v) : map f g v = g (v ∘ f)", "start": [ 279, 1 ], "end": [ 280, 84 ], "kind": "commanddeclaration" }, { "full_name": "Dioph", "code": "def Dioph {α : Type u} (S : Set (α → ℕ)) : Prop :=\n ∃ (β : Type u) (p : Poly (Sum α β)), ∀ v, S v ↔ ∃ t, p (v ⊗ t) = 0", "start": [ 290, 1 ], "end": [ 293, 69 ], "kind": "commanddeclaration" }, { "full_name": "Dioph.ext", "code": "theorem ext (d : Dioph S) (H : ∀ v, v ∈ S ↔ v ∈ S') : Dioph S'", "start": [ 302, 1 ], "end": [ 302, 87 ], "kind": "commanddeclaration" }, { "full_name": "Dioph.of_no_dummies", "code": "theorem of_no_dummies (S : Set (α → ℕ)) (p : Poly α) (h : ∀ v, S v ↔ p v = 0) : Dioph S", "start": [ 305, 1 ], "end": [ 306, 93 ], "kind": "commanddeclaration" }, { "full_name": "Dioph.inject_dummies_lem", "code": "theorem inject_dummies_lem (f : β → γ) (g : γ → Option β) (inv : ∀ x, g (f x) = some x)\n (p : Poly (Sum α β)) (v : α → ℕ) :\n (∃ t, p (v ⊗ t) = 0) ↔ ∃ t, p.map (inl ⊗ inr ∘ f) (v ⊗ t) = 0", "start": [ 309, 1 ], "end": [ 317, 33 ], "kind": "commanddeclaration" }, { "full_name": "Dioph.inject_dummies", "code": "theorem inject_dummies (f : β → γ) (g : γ → Option β) (inv : ∀ x, g (f x) = some x)\n (p : Poly (Sum α β)) (h : ∀ v, S v ↔ ∃ t, p (v ⊗ t) = 0) :\n ∃ q : Poly (Sum α γ), ∀ v, S v ↔ ∃ t, q (v ⊗ t) = 0", "start": [ 320, 1 ], "end": [ 323, 82 ], "kind": "commanddeclaration" }, { "full_name": "Dioph.reindex_dioph", "code": "theorem reindex_dioph (f : α → β) : Dioph S → Dioph {v | v ∘ f ∈ S}", "start": [ 328, 1 ], "end": [ 333, 56 ], "kind": "commanddeclaration" }, { "full_name": "Dioph.DiophList.forall", "code": "theorem DiophList.forall (l : List (Set <| α → ℕ)) (d : l.Forall Dioph) :\n Dioph {v | l.Forall fun S : Set (α → ℕ) => v ∈ S}", "start": [ 338, 1 ], "end": [ 372, 82 ], "kind": "commanddeclaration" }, { "full_name": "Dioph.inter", "code": "theorem inter (d : Dioph S) (d' : Dioph S') : Dioph (S ∩ S')", "start": [ 375, 1 ], "end": [ 375, 97 ], "kind": "commanddeclaration" }, { "full_name": "Dioph.union", "code": "theorem union : ∀ (_ : Dioph S) (_ : Dioph S'), Dioph (S ∪ S')", "start": [ 378, 1 ], "end": [ 394, 50 ], "kind": "commanddeclaration" }, { "full_name": "Dioph.DiophPFun", "code": "def DiophPFun (f : (α → ℕ) →. ℕ) : Prop :=\n Dioph {v : Option α → ℕ | f.graph (v ∘ some, v none)}", "start": [ 397, 1 ], "end": [ 399, 56 ], "kind": "commanddeclaration" }, { "full_name": "Dioph.DiophFn", "code": "def DiophFn (f : (α → ℕ) → ℕ) : Prop :=\n Dioph {v : Option α → ℕ | f (v ∘ some) = v none}", "start": [ 402, 1 ], "end": [ 404, 51 ], "kind": "commanddeclaration" }, { "full_name": "Dioph.reindex_diophFn", "code": "theorem reindex_diophFn {f : (α → ℕ) → ℕ} (g : α → β) (d : DiophFn f) :\n DiophFn fun v => f (v ∘ g)", "start": [ 407, 1 ], "end": [ 408, 87 ], "kind": "commanddeclaration" }, { "full_name": "Dioph.ex_dioph", "code": "theorem ex_dioph {S : Set (Sum α β → ℕ)} : Dioph S → Dioph {v | ∃ x, v ⊗ x ∈ S}", "start": [ 411, 1 ], "end": [ 426, 97 ], "kind": "commanddeclaration" }, { "full_name": "Dioph.ex1_dioph", "code": "theorem ex1_dioph {S : Set (Option α → ℕ)} : Dioph S → Dioph {v | ∃ x, x ::ₒ v ∈ S}", "start": [ 429, 1 ], "end": [ 445, 98 ], "kind": "commanddeclaration" }, { "full_name": "Dioph.dom_dioph", "code": "theorem dom_dioph {f : (α → ℕ) →. ℕ} (d : DiophPFun f) : Dioph f.Dom", "start": [ 448, 1 ], "end": [ 449, 89 ], "kind": "commanddeclaration" }, { "full_name": "Dioph.diophFn_iff_pFun", "code": "theorem diophFn_iff_pFun (f : (α → ℕ) → ℕ) : DiophFn f = @DiophPFun α f", "start": [ 452, 1 ], "end": [ 453, 75 ], "kind": "commanddeclaration" }, { "full_name": "Dioph.abs_poly_dioph", "code": "theorem abs_poly_dioph (p : Poly α) : DiophFn fun v => (p v).natAbs", "start": [ 456, 1 ], "end": [ 458, 61 ], "kind": "commanddeclaration" }, { "full_name": "Dioph.proj_dioph", "code": "theorem proj_dioph (i : α) : DiophFn fun v => v i", "start": [ 461, 1 ], "end": [ 462, 31 ], "kind": "commanddeclaration" }, { "full_name": "Dioph.diophPFun_comp1", "code": "theorem diophPFun_comp1 {S : Set (Option α → ℕ)} (d : Dioph S) {f} (df : DiophPFun f) :\n Dioph {v : α → ℕ | ∃ h : f.Dom v, f.fn v h ::ₒ v ∈ S}", "start": [ 465, 1 ], "end": [ 473, 89 ], "kind": "commanddeclaration" }, { "full_name": "Dioph.diophFn_comp1", "code": "theorem diophFn_comp1 {S : Set (Option α → ℕ)} (d : Dioph S) {f : (α → ℕ) → ℕ} (df : DiophFn f) :\n Dioph {v | f v ::ₒ v ∈ S}", "start": [ 476, 1 ], "end": [ 479, 54 ], "kind": "commanddeclaration" }, { "full_name": "Dioph.diophFn_vec_comp1", "code": "theorem diophFn_vec_comp1 {S : Set (Vector3 ℕ (succ n))} (d : Dioph S) {f : Vector3 ℕ n → ℕ}\n (df : DiophFn f) : Dioph {v : Vector3 ℕ n | (f v::v) ∈ S}", "start": [ 495, 1 ], "end": [ 501, 28 ], "kind": "commanddeclaration" }, { "full_name": "Dioph.vec_ex1_dioph", "code": "theorem vec_ex1_dioph (n) {S : Set (Vector3 ℕ (succ n))} (d : Dioph S) :\n Dioph {v : Fin2 n → ℕ | ∃ x, (x::v) ∈ S}", "start": [ 504, 1 ], "end": [ 510, 56 ], "kind": "commanddeclaration" }, { "full_name": "Dioph.diophFn_vec", "code": "theorem diophFn_vec (f : Vector3 ℕ n → ℕ) : DiophFn f ↔ Dioph {v | f (v ∘ fs) = v fz}", "start": [ 513, 1 ], "end": [ 514, 62 ], "kind": "commanddeclaration" }, { "full_name": "Dioph.diophPFun_vec", "code": "theorem diophPFun_vec (f : Vector3 ℕ n →. ℕ) : DiophPFun f ↔ Dioph {v | f.graph (v ∘ fs, v fz)}", "start": [ 517, 1 ], "end": [ 518, 62 ], "kind": "commanddeclaration" }, { "full_name": "Dioph.diophFn_compn", "code": "theorem diophFn_compn :\n ∀ {n} {S : Set (Sum α (Fin2 n) → ℕ)} (_ : Dioph S) {f : Vector3 ((α → ℕ) → ℕ) n}\n (_ : VectorAllP DiophFn f), Dioph {v : α → ℕ | (v ⊗ fun i => f i v) ∈ S}", "start": [ 521, 1 ], "end": [ 548, 49 ], "kind": "commanddeclaration" }, { "full_name": "Dioph.dioph_comp", "code": "theorem dioph_comp {S : Set (Vector3 ℕ n)} (d : Dioph S) (f : Vector3 ((α → ℕ) → ℕ) n)\n (df : VectorAllP DiophFn f) : Dioph {v | (fun i => f i v) ∈ S}", "start": [ 551, 1 ], "end": [ 553, 43 ], "kind": "commanddeclaration" }, { "full_name": "Dioph.diophFn_comp", "code": "theorem diophFn_comp {f : Vector3 ℕ n → ℕ} (df : DiophFn f) (g : Vector3 ((α → ℕ) → ℕ) n)\n (dg : VectorAllP DiophFn g) : DiophFn fun v => f fun i => g i v", "start": [ 556, 1 ], "end": [ 561, 67 ], "kind": "commanddeclaration" }, { "full_name": "Dioph.proj_dioph_of_nat", "code": "theorem proj_dioph_of_nat {n : ℕ} (m : ℕ) [IsLT m n] : DiophFn fun v : Vector3 ℕ n => v &m", "start": [ 572, 1 ], "end": [ 573, 16 ], "kind": "commanddeclaration" }, { "full_name": "Dioph.const_dioph", "code": "theorem const_dioph (n : ℕ) : DiophFn (const (α → ℕ) n)", "start": [ 578, 1 ], "end": [ 579, 32 ], "kind": "commanddeclaration" }, { "full_name": "Dioph.dioph_comp2", "code": "theorem dioph_comp2 {S : ℕ → ℕ → Prop} (d : Dioph fun v : Vector3 ℕ 2 => S (v &0) (v &1)) :\n Dioph fun v => S (f v) (g v)", "start": [ 586, 1 ], "end": [ 587, 65 ], "kind": "commanddeclaration" }, { "full_name": "Dioph.diophFn_comp2", "code": "theorem diophFn_comp2 {h : ℕ → ℕ → ℕ} (d : DiophFn fun v : Vector3 ℕ 2 => h (v &0) (v &1)) :\n DiophFn fun v => h (f v) (g v)", "start": [ 590, 1 ], "end": [ 591, 69 ], "kind": "commanddeclaration" }, { "full_name": "Dioph.eq_dioph", "code": "theorem eq_dioph : Dioph fun v => f v = g v", "start": [ 594, 1 ], "end": [ 597, 95 ], "kind": "commanddeclaration" }, { "full_name": "Dioph.add_dioph", "code": "theorem add_dioph : DiophFn fun v => f v + g v", "start": [ 602, 1 ], "end": [ 603, 90 ], "kind": "commanddeclaration" }, { "full_name": "Dioph.mul_dioph", "code": "theorem mul_dioph : DiophFn fun v => f v * g v", "start": [ 608, 1 ], "end": [ 609, 90 ], "kind": "commanddeclaration" }, { "full_name": "Dioph.le_dioph", "code": "theorem le_dioph : Dioph {v | f v ≤ g v}", "start": [ 614, 1 ], "end": [ 616, 85 ], "kind": "commanddeclaration" }, { "full_name": "Dioph.lt_dioph", "code": "theorem lt_dioph : Dioph {v | f v < g v}", "start": [ 621, 1 ], "end": [ 621, 60 ], "kind": "commanddeclaration" }, { "full_name": "Dioph.ne_dioph", "code": "theorem ne_dioph : Dioph {v | f v ≠ g v}", "start": [ 626, 1 ], "end": [ 627, 79 ], "kind": "commanddeclaration" }, { "full_name": "Dioph.sub_dioph", "code": "theorem sub_dioph : DiophFn fun v => f v - g v", "start": [ 632, 1 ], "end": [ 645, 62 ], "kind": "commanddeclaration" }, { "full_name": "Dioph.dvd_dioph", "code": "theorem dvd_dioph : Dioph fun v => f v ∣ g v", "start": [ 650, 1 ], "end": [ 651, 59 ], "kind": "commanddeclaration" }, { "full_name": "Dioph.mod_dioph", "code": "theorem mod_dioph : DiophFn fun v => f v % g v", "start": [ 656, 1 ], "end": [ 670, 36 ], "kind": "commanddeclaration" }, { "full_name": "Dioph.modEq_dioph", "code": "theorem modEq_dioph {h : (α → ℕ) → ℕ} (dh : DiophFn h) : Dioph fun v => f v ≡ g v [MOD h v]", "start": [ 675, 1 ], "end": [ 676, 23 ], "kind": "commanddeclaration" }, { "full_name": "Dioph.div_dioph", "code": "theorem div_dioph : DiophFn fun v => f v / g v", "start": [ 681, 1 ], "end": [ 700, 92 ], "kind": "commanddeclaration" }, { "full_name": "Dioph.pell_dioph", "code": "theorem pell_dioph :\n Dioph fun v : Vector3 ℕ 4 => ∃ h : 1 < v &0, xn h (v &1) = v &2 ∧ yn h (v &1) = v &3", "start": [ 707, 1 ], "end": [ 732, 49 ], "kind": "commanddeclaration" }, { "full_name": "Dioph.xn_dioph", "code": "theorem xn_dioph : DiophPFun fun v : Vector3 ℕ 2 => ⟨1 < v &0, fun h => xn h (v &1)⟩", "start": [ 735, 1 ], "end": [ 740, 91 ], "kind": "commanddeclaration" }, { "full_name": "Dioph.pow_dioph", "code": "theorem pow_dioph : DiophFn fun v => f v ^ g v", "start": [ 743, 1 ], "end": [ 769, 74 ], "kind": "commanddeclaration" } ]
Mathlib/Data/Vector/Zip.lean
[ "Mathlib/Data/List/Zip.lean", ".lake/packages/lean4/src/lean/Init.lean", "Mathlib/Data/Vector/Basic.lean" ]
[ { "full_name": "Vector.zipWith", "code": "def zipWith : Vector α n → Vector β n → Vector γ n := fun x y => ⟨List.zipWith f x.1 y.1, by simp⟩", "start": [ 22, 1 ], "end": [ 23, 99 ], "kind": "commanddeclaration" }, { "full_name": "Vector.zipWith_toList", "code": "@[simp]\ntheorem zipWith_toList (x : Vector α n) (y : Vector β n) :\n (Vector.zipWith f x y).toList = List.zipWith f x.toList y.toList", "start": [ 26, 1 ], "end": [ 29, 6 ], "kind": "commanddeclaration" }, { "full_name": "Vector.zipWith_get", "code": "@[simp]\ntheorem zipWith_get (x : Vector α n) (y : Vector β n) (i) :\n (Vector.zipWith f x y).get i = f (x.get i) (y.get i)", "start": [ 32, 1 ], "end": [ 36, 7 ], "kind": "commanddeclaration" }, { "full_name": "Vector.zipWith_tail", "code": "@[simp]\ntheorem zipWith_tail (x : Vector α n) (y : Vector β n) :\n (Vector.zipWith f x y).tail = Vector.zipWith f x.tail y.tail", "start": [ 39, 1 ], "end": [ 43, 18 ], "kind": "commanddeclaration" }, { "full_name": "Vector.prod_mul_prod_eq_prod_zipWith", "code": "@[to_additive]\ntheorem prod_mul_prod_eq_prod_zipWith [CommMonoid α] (x y : Vector α n) :\n x.toList.prod * y.toList.prod = (Vector.zipWith (· * ·) x y).toList.prod", "start": [ 46, 1 ], "end": [ 50, 53 ], "kind": "commanddeclaration" } ]
Mathlib/Algebra/Homology/ShortComplex/Linear.lean
[ ".lake/packages/lean4/src/lean/Init.lean", "Mathlib/CategoryTheory/Linear/LinearFunctor.lean", "Mathlib/Algebra/Homology/ShortComplex/Preadditive.lean" ]
[ { "full_name": "CategoryTheory.ShortComplex.smul_τ₁", "code": "@[simp] lemma smul_τ₁ (a : R) (φ : S₁ ⟶ S₂) : (a • φ).τ₁ = a • φ.τ₁ := rfl", "start": [ 36, 1 ], "end": [ 36, 75 ], "kind": "lemma" }, { "full_name": "CategoryTheory.ShortComplex.smul_τ₂", "code": "@[simp] lemma smul_τ₂ (a : R) (φ : S₁ ⟶ S₂) : (a • φ).τ₂ = a • φ.τ₂ := rfl", "start": [ 37, 1 ], "end": [ 37, 75 ], "kind": "lemma" }, { "full_name": "CategoryTheory.ShortComplex.smul_τ₃", "code": "@[simp] lemma smul_τ₃ (a : R) (φ : S₁ ⟶ S₂) : (a • φ).τ₃ = a • φ.τ₃ := rfl", "start": [ 38, 1 ], "end": [ 38, 75 ], "kind": "lemma" }, { "full_name": "CategoryTheory.ShortComplex.LeftHomologyMapData.smul", "code": "@[simps]\ndef smul (a : R) : LeftHomologyMapData (a • φ) h₁ h₂ where\n φK := a • γ.φK\n φH := a • γ.φH", "start": [ 58, 1 ], "end": [ 63, 17 ], "kind": "commanddeclaration" }, { "full_name": "CategoryTheory.ShortComplex.leftHomologyMap'_smul", "code": "@[simp]\nlemma leftHomologyMap'_smul :\n leftHomologyMap' (a • φ) h₁ h₂ = a • leftHomologyMap' φ h₁ h₂ := by\n have γ : LeftHomologyMapData φ h₁ h₂ := default\n simp only [(γ.smul a).leftHomologyMap'_eq, LeftHomologyMapData.smul_φH, γ.leftHomologyMap'_eq]", "start": [ 70, 1 ], "end": [ 74, 97 ], "kind": "lemma" }, { "full_name": "CategoryTheory.ShortComplex.cyclesMap'_smul", "code": "@[simp]\nlemma cyclesMap'_smul :\n cyclesMap' (a • φ) h₁ h₂ = a • cyclesMap' φ h₁ h₂ := by\n have γ : LeftHomologyMapData φ h₁ h₂ := default\n simp only [(γ.smul a).cyclesMap'_eq, LeftHomologyMapData.smul_φK, γ.cyclesMap'_eq]", "start": [ 76, 1 ], "end": [ 80, 85 ], "kind": "lemma" }, { "full_name": "CategoryTheory.ShortComplex.leftHomologyMap_smul", "code": "@[simp]\nlemma leftHomologyMap_smul : leftHomologyMap (a • φ) = a • leftHomologyMap φ :=\n leftHomologyMap'_smul _ _ _ _", "start": [ 86, 1 ], "end": [ 88, 32 ], "kind": "lemma" }, { "full_name": "CategoryTheory.ShortComplex.cyclesMap_smul", "code": "@[simp]\nlemma cyclesMap_smul : cyclesMap (a • φ) = a • cyclesMap φ :=\n cyclesMap'_smul _ _ _ _", "start": [ 90, 1 ], "end": [ 92, 26 ], "kind": "lemma" }, { "full_name": "CategoryTheory.ShortComplex.leftHomologyFunctor_linear", "code": "instance leftHomologyFunctor_linear [HasKernels C] [HasCokernels C] :\n Functor.Linear R (leftHomologyFunctor C) where", "start": [ 96, 1 ], "end": [ 97, 51 ], "kind": "commanddeclaration" }, { "full_name": "CategoryTheory.ShortComplex.cyclesFunctor_linear", "code": "instance cyclesFunctor_linear [HasKernels C] [HasCokernels C] :\n Functor.Linear R (cyclesFunctor C) where", "start": [ 99, 1 ], "end": [ 100, 45 ], "kind": "commanddeclaration" }, { "full_name": "CategoryTheory.ShortComplex.RightHomologyMapData.smul", "code": "@[simps]\ndef smul (a : R) : RightHomologyMapData (a • φ) h₁ h₂ where\n φQ := a • γ.φQ\n φH := a • γ.φH", "start": [ 112, 1 ], "end": [ 117, 17 ], "kind": "commanddeclaration" }, { "full_name": "CategoryTheory.ShortComplex.rightHomologyMap'_smul", "code": "@[simp]\nlemma rightHomologyMap'_smul :\n rightHomologyMap' (a • φ) h₁ h₂ = a • rightHomologyMap' φ h₁ h₂ := by\n have γ : RightHomologyMapData φ h₁ h₂ := default\n simp only [(γ.smul a).rightHomologyMap'_eq, RightHomologyMapData.smul_φH, γ.rightHomologyMap'_eq]", "start": [ 124, 1 ], "end": [ 128, 100 ], "kind": "lemma" }, { "full_name": "CategoryTheory.ShortComplex.opcyclesMap'_smul", "code": "@[simp]\nlemma opcyclesMap'_smul :\n opcyclesMap' (a • φ) h₁ h₂ = a • opcyclesMap' φ h₁ h₂ := by\n have γ : RightHomologyMapData φ h₁ h₂ := default\n simp only [(γ.smul a).opcyclesMap'_eq, RightHomologyMapData.smul_φQ, γ.opcyclesMap'_eq]", "start": [ 130, 1 ], "end": [ 134, 90 ], "kind": "lemma" }, { "full_name": "CategoryTheory.ShortComplex.rightHomologyMap_smul", "code": "@[simp]\nlemma rightHomologyMap_smul : rightHomologyMap (a • φ) = a • rightHomologyMap φ :=\n rightHomologyMap'_smul _ _ _ _", "start": [ 140, 1 ], "end": [ 142, 33 ], "kind": "lemma" }, { "full_name": "CategoryTheory.ShortComplex.opcyclesMap_smul", "code": "@[simp]\nlemma opcyclesMap_smul : opcyclesMap (a • φ) = a • opcyclesMap φ :=\n opcyclesMap'_smul _ _ _ _", "start": [ 144, 1 ], "end": [ 146, 28 ], "kind": "lemma" }, { "full_name": "CategoryTheory.ShortComplex.rightHomologyFunctor_linear", "code": "instance rightHomologyFunctor_linear [HasKernels C] [HasCokernels C] :\n Functor.Linear R (rightHomologyFunctor C) where", "start": [ 150, 1 ], "end": [ 151, 52 ], "kind": "commanddeclaration" }, { "full_name": "CategoryTheory.ShortComplex.opcyclesFunctor_linear", "code": "instance opcyclesFunctor_linear [HasKernels C] [HasCokernels C] :\n Functor.Linear R (opcyclesFunctor C) where", "start": [ 153, 1 ], "end": [ 154, 47 ], "kind": "commanddeclaration" }, { "full_name": "CategoryTheory.ShortComplex.HomologyMapData.smul", "code": "@[simps]\ndef smul (a : R) : HomologyMapData (a • φ) h₁ h₂ where\n left := γ.left.smul a\n right := γ.right.smul a", "start": [ 166, 1 ], "end": [ 171, 26 ], "kind": "commanddeclaration" }, { "full_name": "CategoryTheory.ShortComplex.homologyMap'_smul", "code": "@[simp]\nlemma homologyMap'_smul :\n homologyMap' (a • φ) h₁ h₂ = a • homologyMap' φ h₁ h₂ :=\n leftHomologyMap'_smul _ _ _ _", "start": [ 178, 1 ], "end": [ 181, 32 ], "kind": "lemma" }, { "full_name": "CategoryTheory.ShortComplex.homologyMap_smul", "code": "@[simp]\nlemma homologyMap_smul [S₁.HasHomology] [S₂.HasHomology] :\n homologyMap (a • φ) = a • homologyMap φ :=\n homologyMap'_smul _ _ _", "start": [ 185, 1 ], "end": [ 188, 26 ], "kind": "lemma" }, { "full_name": "CategoryTheory.ShortComplex.homologyFunctor_linear", "code": "instance homologyFunctor_linear [CategoryWithHomology C] :\n Functor.Linear R (homologyFunctor C) where", "start": [ 190, 1 ], "end": [ 191, 47 ], "kind": "commanddeclaration" }, { "full_name": "CategoryTheory.ShortComplex.Homotopy.smul", "code": "@[simps]\ndef Homotopy.smul {φ₁ φ₂ : S₁ ⟶ S₂} (h : Homotopy φ₁ φ₂) (a : R) :\n Homotopy (a • φ₁) (a • φ₂) where\n h₀ := a • h.h₀\n h₁ := a • h.h₁\n h₂ := a • h.h₂\n h₃ := a • h.h₃\n comm₁ := by\n dsimp\n rw [h.comm₁]\n simp only [smul_add, Linear.comp_smul]\n comm₂ := by\n dsimp\n rw [h.comm₂]\n simp only [smul_add, Linear.comp_smul, Linear.smul_comp]\n comm₃ := by\n dsimp\n rw [h.comm₃]\n simp only [smul_add, Linear.smul_comp]", "start": [ 195, 1 ], "end": [ 214, 43 ], "kind": "commanddeclaration" } ]
Mathlib/NumberTheory/Zsqrtd/ToReal.lean
[ "Mathlib/NumberTheory/Zsqrtd/Basic.lean", ".lake/packages/lean4/src/lean/Init.lean", "Mathlib/Data/Real/Sqrt.lean" ]
[ { "full_name": "Zsqrtd.toReal", "code": "@[simps!]\nnoncomputable def toReal {d : ℤ} (h : 0 ≤ d) : ℤ√d →+* ℝ :=\n lift ⟨√↑d, Real.mul_self_sqrt (Int.cast_nonneg.mpr h)⟩", "start": [ 21, 1 ], "end": [ 26, 57 ], "kind": "commanddeclaration" }, { "full_name": "Zsqrtd.toReal_injective", "code": "theorem toReal_injective {d : ℤ} (h0d : 0 ≤ d) (hd : ∀ n : ℤ, d ≠ n * n) :\n Function.Injective (toReal h0d)", "start": [ 29, 1 ], "end": [ 31, 22 ], "kind": "commanddeclaration" } ]
Mathlib/Condensed/Solid.lean
[ "Mathlib/Condensed/Limits.lean", ".lake/packages/lean4/src/lean/Init.lean", "Mathlib/Condensed/Functors.lean", "Mathlib/CategoryTheory/Limits/KanExtension.lean" ]
[ { "full_name": "Condensed.finFree", "code": "abbrev finFree : FintypeCat.{u} ⥤ CondensedMod.{u} R :=\n FintypeCat.toProfinite ⋙ profiniteToCondensed ⋙ free R", "start": [ 36, 1 ], "end": [ 38, 57 ], "kind": "commanddeclaration" }, { "full_name": "Condensed.profiniteFree", "code": "abbrev profiniteFree : Profinite.{u} ⥤ CondensedMod.{u} R :=\n profiniteToCondensed ⋙ free R", "start": [ 40, 1 ], "end": [ 42, 32 ], "kind": "commanddeclaration" }, { "full_name": "Condensed.profiniteSolid", "code": "def profiniteSolid : Profinite.{u} ⥤ CondensedMod.{u} R :=\n Ran.loc FintypeCat.toProfinite (finFree R)", "start": [ 44, 1 ], "end": [ 46, 45 ], "kind": "commanddeclaration" }, { "full_name": "Condensed.profiniteSolidification", "code": "def profiniteSolidification : profiniteFree R ⟶ profiniteSolid.{u} R :=\n (Ran.equiv FintypeCat.toProfinite (finFree R) (profiniteFree R)).symm (NatTrans.id _)", "start": [ 48, 1 ], "end": [ 50, 88 ], "kind": "commanddeclaration" }, { "full_name": "CondensedMod.IsSolid", "code": "class CondensedMod.IsSolid (A : CondensedMod.{u} R) : Prop where\n isIso_solidification_map : ∀ X : Profinite.{u}, IsIso ((yoneda.obj A).map\n ((profiniteSolidification R).app X).op)", "start": [ 54, 1 ], "end": [ 57, 44 ], "kind": "commanddeclaration" } ]
Mathlib/CategoryTheory/Category/Factorisation.lean
[ "Mathlib/CategoryTheory/Comma/Arrow.lean", ".lake/packages/lean4/src/lean/Init.lean", "Mathlib/CategoryTheory/Category/Basic.lean", "Mathlib/CategoryTheory/Limits/Shapes/Terminal.lean" ]
[ { "full_name": "CategoryTheory.Factorisation", "code": "structure Factorisation {X Y : C} (f : X ⟶ Y) where\n \n mid : C\n \n ι : X ⟶ mid\n \n π : mid ⟶ Y\n \n ι_π : ι ≫ π = f := by aesop_cat", "start": [ 28, 1 ], "end": [ 38, 34 ], "kind": "commanddeclaration" }, { "full_name": "CategoryTheory.Factorisation.Hom", "code": "@[ext]\nprotected structure Hom (d e : Factorisation f) : Type (max u v) where\n \n h : d.mid ⟶ e.mid\n \n ι_h : d.ι ≫ h = e.ι := by aesop_cat\n \n h_π : h ≫ e.π = d.π := by aesop_cat", "start": [ 46, 1 ], "end": [ 55, 38 ], "kind": "commanddeclaration" }, { "full_name": "CategoryTheory.Factorisation.Hom.id", "code": "@[simps]\nprotected def Hom.id (d : Factorisation f) : Factorisation.Hom d d where\n h := 𝟙 _", "start": [ 59, 1 ], "end": [ 62, 11 ], "kind": "commanddeclaration" }, { "full_name": "CategoryTheory.Factorisation.Hom.comp", "code": "@[simps]\nprotected def Hom.comp {d₁ d₂ d₃ : Factorisation f}\n (f : Factorisation.Hom d₁ d₂) (g : Factorisation.Hom d₂ d₃) : Factorisation.Hom d₁ d₃ where\n h := f.h ≫ g.h\n ι_h := by rw [← Category.assoc, f.ι_h, g.ι_h]\n h_π := by rw [Category.assoc, g.h_π, f.h_π]", "start": [ 64, 1 ], "end": [ 70, 46 ], "kind": "commanddeclaration" }, { "full_name": "CategoryTheory.Factorisation.initial", "code": "@[simps]\nprotected def initial : Factorisation f where\n mid := X\n ι := 𝟙 _\n π := f", "start": [ 79, 1 ], "end": [ 84, 9 ], "kind": "commanddeclaration" }, { "full_name": "CategoryTheory.Factorisation.initialHom", "code": "@[simps]\nprotected def initialHom (d : Factorisation f) :\n Factorisation.Hom (Factorisation.initial : Factorisation f) d where\n h := d.ι", "start": [ 86, 1 ], "end": [ 90, 11 ], "kind": "commanddeclaration" }, { "full_name": "CategoryTheory.Factorisation.terminal", "code": "@[simps]\nprotected def terminal : Factorisation f where\n mid := Y\n ι := f\n π := 𝟙 _", "start": [ 96, 1 ], "end": [ 101, 11 ], "kind": "commanddeclaration" }, { "full_name": "CategoryTheory.Factorisation.terminalHom", "code": "@[simps]\nprotected def terminalHom (d : Factorisation f) :\n Factorisation.Hom d (Factorisation.terminal : Factorisation f) where\n h := d.π", "start": [ 103, 1 ], "end": [ 107, 11 ], "kind": "commanddeclaration" }, { "full_name": "CategoryTheory.Factorisation.IsInitial_initial", "code": "def IsInitial_initial : IsInitial (Factorisation.initial : Factorisation f) := IsInitial.ofUnique _", "start": [ 115, 1 ], "end": [ 116, 100 ], "kind": "commanddeclaration" }, { "full_name": "CategoryTheory.Factorisation.IsTerminal_terminal", "code": "def IsTerminal_terminal : IsTerminal (Factorisation.terminal : Factorisation f) :=\nIsTerminal.ofUnique _", "start": [ 120, 1 ], "end": [ 122, 22 ], "kind": "commanddeclaration" }, { "full_name": "CategoryTheory.Factorisation.forget", "code": "@[simps]\ndef forget : Factorisation f ⥤ C where\n obj := Factorisation.mid\n map f := f.h", "start": [ 126, 1 ], "end": [ 130, 15 ], "kind": "commanddeclaration" } ]
Mathlib/SetTheory/Ordinal/Topology.lean
[ "Mathlib/Tactic/TFAE.lean", ".lake/packages/lean4/src/lean/Init.lean", "Mathlib/Topology/Order/Monotone.lean", "Mathlib/SetTheory/Ordinal/Arithmetic.lean" ]
[ { "full_name": "Ordinal.isOpen_singleton_iff", "code": "theorem isOpen_singleton_iff : IsOpen ({a} : Set Ordinal) ↔ ¬IsLimit a", "start": [ 41, 1 ], "end": [ 53, 26 ], "kind": "commanddeclaration" }, { "full_name": "Ordinal.nhds_right'", "code": "theorem nhds_right' (a : Ordinal) : 𝓝[>] a = ⊥", "start": [ 57, 1 ], "end": [ 57, 80 ], "kind": "commanddeclaration" }, { "full_name": "Ordinal.nhds_left'_eq_nhds_ne", "code": "theorem nhds_left'_eq_nhds_ne (a : Ordinal) : 𝓝[<] a = 𝓝[≠] a", "start": [ 60, 1 ], "end": [ 61, 61 ], "kind": "commanddeclaration" }, { "full_name": "Ordinal.nhds_left_eq_nhds", "code": "theorem nhds_left_eq_nhds (a : Ordinal) : 𝓝[≤] a = 𝓝 a", "start": [ 64, 1 ], "end": [ 65, 60 ], "kind": "commanddeclaration" }, { "full_name": "Ordinal.nhdsBasis_Ioc", "code": "theorem nhdsBasis_Ioc (h : a ≠ 0) : (𝓝 a).HasBasis (· < a) (Set.Ioc · a)", "start": [ 68, 1 ], "end": [ 69, 60 ], "kind": "commanddeclaration" }, { "full_name": "Ordinal.nhds_eq_pure", "code": "theorem nhds_eq_pure : 𝓝 a = pure a ↔ ¬IsLimit a", "start": [ 72, 1 ], "end": [ 73, 72 ], "kind": "commanddeclaration" }, { "full_name": "Ordinal.isOpen_iff", "code": "theorem isOpen_iff : IsOpen s ↔ ∀ o ∈ s, IsLimit o → ∃ a < o, Set.Ioo a o ⊆ s", "start": [ 76, 1 ], "end": [ 82, 39 ], "kind": "commanddeclaration" }, { "full_name": "Ordinal.mem_closure_tfae", "code": "theorem mem_closure_tfae (a : Ordinal.{u}) (s : Set Ordinal) :\n TFAE [a ∈ closure s,\n a ∈ closure (s ∩ Iic a),\n (s ∩ Iic a).Nonempty ∧ sSup (s ∩ Iic a) = a,\n ∃ t, t ⊆ s ∧ t.Nonempty ∧ BddAbove t ∧ sSup t = a,\n ∃ (o : Ordinal.{u}), o ≠ 0 ∧ ∃ (f : ∀ x < o, Ordinal),\n (∀ x hx, f x hx ∈ s) ∧ bsup.{u, u} o f = a,\n ∃ (ι : Type u), Nonempty ι ∧ ∃ f : ι → Ordinal, (∀ i, f i ∈ s) ∧ sup.{u, u} f = a]", "start": [ 86, 1 ], "end": [ 124, 14 ], "kind": "commanddeclaration" }, { "full_name": "Ordinal.mem_closure_iff_sup", "code": "theorem mem_closure_iff_sup :\n a ∈ closure s ↔\n ∃ (ι : Type u) (_ : Nonempty ι) (f : ι → Ordinal), (∀ i, f i ∈ s) ∧ sup.{u, u} f = a", "start": [ 126, 1 ], "end": [ 129, 71 ], "kind": "commanddeclaration" }, { "full_name": "Ordinal.mem_closed_iff_sup", "code": "theorem mem_closed_iff_sup (hs : IsClosed s) :\n a ∈ s ↔ ∃ (ι : Type u) (_hι : Nonempty ι) (f : ι → Ordinal),\n (∀ i, f i ∈ s) ∧ sup.{u, u} f = a", "start": [ 132, 1 ], "end": [ 135, 44 ], "kind": "commanddeclaration" }, { "full_name": "Ordinal.mem_closure_iff_bsup", "code": "theorem mem_closure_iff_bsup :\n a ∈ closure s ↔\n ∃ (o : Ordinal) (_ho : o ≠ 0) (f : ∀ a < o, Ordinal),\n (∀ i hi, f i hi ∈ s) ∧ bsup.{u, u} o f = a", "start": [ 138, 1 ], "end": [ 142, 71 ], "kind": "commanddeclaration" }, { "full_name": "Ordinal.mem_closed_iff_bsup", "code": "theorem mem_closed_iff_bsup (hs : IsClosed s) :\n a ∈ s ↔\n ∃ (o : Ordinal) (_ho : o ≠ 0) (f : ∀ a < o, Ordinal),\n (∀ i hi, f i hi ∈ s) ∧ bsup.{u, u} o f = a", "start": [ 145, 1 ], "end": [ 149, 45 ], "kind": "commanddeclaration" }, { "full_name": "Ordinal.isClosed_iff_sup", "code": "theorem isClosed_iff_sup :\n IsClosed s ↔\n ∀ {ι : Type u}, Nonempty ι → ∀ f : ι → Ordinal, (∀ i, f i ∈ s) → sup.{u, u} f ∈ s", "start": [ 152, 1 ], "end": [ 159, 18 ], "kind": "commanddeclaration" }, { "full_name": "Ordinal.isClosed_iff_bsup", "code": "theorem isClosed_iff_bsup :\n IsClosed s ↔\n ∀ {o : Ordinal}, o ≠ 0 → ∀ f : ∀ a < o, Ordinal,\n (∀ i hi, f i hi ∈ s) → bsup.{u, u} o f ∈ s", "start": [ 162, 1 ], "end": [ 171, 27 ], "kind": "commanddeclaration" }, { "full_name": "Ordinal.isLimit_of_mem_frontier", "code": "theorem isLimit_of_mem_frontier (ha : a ∈ frontier s) : IsLimit a", "start": [ 174, 1 ], "end": [ 182, 16 ], "kind": "commanddeclaration" }, { "full_name": "Ordinal.isNormal_iff_strictMono_and_continuous", "code": "theorem isNormal_iff_strictMono_and_continuous (f : Ordinal.{u} → Ordinal.{u}) :\n IsNormal f ↔ StrictMono f ∧ Continuous f", "start": [ 185, 1 ], "end": [ 205, 31 ], "kind": "commanddeclaration" }, { "full_name": "Ordinal.enumOrd_isNormal_iff_isClosed", "code": "theorem enumOrd_isNormal_iff_isClosed (hs : s.Unbounded (· < ·)) :\n IsNormal (enumOrd s) ↔ IsClosed s", "start": [ 208, 1 ], "end": [ 234, 42 ], "kind": "commanddeclaration" } ]
Mathlib/LinearAlgebra/Matrix/ProjectiveSpecialLinearGroup.lean
[ "Mathlib/LinearAlgebra/Matrix/SpecialLinearGroup.lean", ".lake/packages/lean4/src/lean/Init.lean" ]
[ { "full_name": "Matrix.ProjectiveSpecialLinearGroup", "code": "abbrev ProjectiveSpecialLinearGroup : Type _ :=\n SpecialLinearGroup n R ⧸ Subgroup.center (SpecialLinearGroup n R)", "start": [ 28, 1 ], "end": [ 30, 70 ], "kind": "commanddeclaration" } ]
Mathlib/GroupTheory/DoubleCoset.lean
[ "Mathlib/Data/Set/Basic.lean", "Mathlib/Data/Setoid/Basic.lean", ".lake/packages/lean4/src/lean/Init.lean", "Mathlib/GroupTheory/Coset.lean", "Mathlib/Algebra/Group/Subgroup/Pointwise.lean" ]
[ { "full_name": "Doset.doset", "code": "def doset (a : α) (s t : Set α) : Set α :=\n s * {a} * t", "start": [ 36, 1 ], "end": [ 38, 14 ], "kind": "commanddeclaration" }, { "full_name": "Doset.doset_eq_image2", "code": "lemma doset_eq_image2 (a : α) (s t : Set α) : doset a s t = Set.image2 (· * a * ·) s t := by\n simp_rw [doset, Set.mul_singleton, ← Set.image2_mul, Set.image2_image_left]", "start": [ 41, 1 ], "end": [ 42, 78 ], "kind": "lemma" }, { "full_name": "Doset.mem_doset", "code": "theorem mem_doset {s t : Set α} {a b : α} : b ∈ doset a s t ↔ ∃ x ∈ s, ∃ y ∈ t, b = x * a * y", "start": [ 44, 1 ], "end": [ 45, 55 ], "kind": "commanddeclaration" }, { "full_name": "Doset.mem_doset_self", "code": "theorem mem_doset_self (H K : Subgroup G) (a : G) : a ∈ doset a H K", "start": [ 48, 1 ], "end": [ 49, 92 ], "kind": "commanddeclaration" }, { "full_name": "Doset.doset_eq_of_mem", "code": "theorem doset_eq_of_mem {H K : Subgroup G} {a b : G} (hb : b ∈ doset a H K) :\n doset b H K = doset a H K", "start": [ 52, 1 ], "end": [ 57, 40 ], "kind": "commanddeclaration" }, { "full_name": "Doset.mem_doset_of_not_disjoint", "code": "theorem mem_doset_of_not_disjoint {H K : Subgroup G} {a b : G}\n (h : ¬Disjoint (doset a H K) (doset b H K)) : b ∈ doset a H K", "start": [ 60, 1 ], "end": [ 66, 101 ], "kind": "commanddeclaration" }, { "full_name": "Doset.eq_of_not_disjoint", "code": "theorem eq_of_not_disjoint {H K : Subgroup G} {a b : G}\n (h : ¬Disjoint (doset a H K) (doset b H K)) : doset a H K = doset b H K", "start": [ 69, 1 ], "end": [ 73, 27 ], "kind": "commanddeclaration" }, { "full_name": "Doset.setoid", "code": "def setoid (H K : Set G) : Setoid G :=\n Setoid.ker fun x => doset x H K", "start": [ 76, 1 ], "end": [ 78, 34 ], "kind": "commanddeclaration" }, { "full_name": "Doset.Quotient", "code": "def Quotient (H K : Set G) : Type _ :=\n _root_.Quotient (setoid H K)", "start": [ 81, 1 ], "end": [ 83, 31 ], "kind": "commanddeclaration" }, { "full_name": "Doset.rel_iff", "code": "theorem rel_iff {H K : Subgroup G} {x y : G} :\n (setoid ↑H ↑K).Rel x y ↔ ∃ a ∈ H, ∃ b ∈ K, y = a * x * b", "start": [ 86, 1 ], "end": [ 90, 14 ], "kind": "commanddeclaration" }, { "full_name": "Doset.bot_rel_eq_leftRel", "code": "theorem bot_rel_eq_leftRel (H : Subgroup G) :\n (setoid ↑(⊥ : Subgroup G) ↑H).Rel = (QuotientGroup.leftRel H).Rel", "start": [ 93, 1 ], "end": [ 102, 69 ], "kind": "commanddeclaration" }, { "full_name": "Doset.rel_bot_eq_right_group_rel", "code": "theorem rel_bot_eq_right_group_rel (H : Subgroup G) :\n (setoid ↑H ↑(⊥ : Subgroup G)).Rel = (QuotientGroup.rightRel H).Rel", "start": [ 105, 1 ], "end": [ 114, 70 ], "kind": "commanddeclaration" }, { "full_name": "Doset.quotToDoset", "code": "def quotToDoset (H K : Subgroup G) (q : Quotient (H : Set G) K) : Set G :=\n doset q.out' H K", "start": [ 117, 1 ], "end": [ 119, 19 ], "kind": "commanddeclaration" }, { "full_name": "Doset.mk", "code": "abbrev mk (H K : Subgroup G) (a : G) : Quotient (H : Set G) K :=\n Quotient.mk'' a", "start": [ 122, 1 ], "end": [ 124, 18 ], "kind": "commanddeclaration" }, { "full_name": "Doset.eq", "code": "theorem eq (H K : Subgroup G) (a b : G) :\n mk H K a = mk H K b ↔ ∃ h ∈ H, ∃ k ∈ K, b = h * a * k", "start": [ 130, 1 ], "end": [ 133, 16 ], "kind": "commanddeclaration" }, { "full_name": "Doset.out_eq'", "code": "theorem out_eq' (H K : Subgroup G) (q : Quotient ↑H ↑K) : mk H K q.out' = q", "start": [ 136, 1 ], "end": [ 137, 21 ], "kind": "commanddeclaration" }, { "full_name": "Doset.mk_out'_eq_mul", "code": "theorem mk_out'_eq_mul (H K : Subgroup G) (g : G) :\n ∃ h k : G, h ∈ H ∧ k ∈ K ∧ (mk H K g : Quotient ↑H ↑K).out' = h * g * k", "start": [ 140, 1 ], "end": [ 146, 24 ], "kind": "commanddeclaration" }, { "full_name": "Doset.mk_eq_of_doset_eq", "code": "theorem mk_eq_of_doset_eq {H K : Subgroup G} {a b : G} (h : doset a H K = doset b H K) :\n mk H K a = mk H K b", "start": [ 149, 1 ], "end": [ 152, 53 ], "kind": "commanddeclaration" }, { "full_name": "Doset.disjoint_out'", "code": "theorem disjoint_out' {H K : Subgroup G} {a b : Quotient H.1 K} :\n a ≠ b → Disjoint (doset a.out' H K) (doset b.out' (H : Set G) K)", "start": [ 155, 1 ], "end": [ 159, 65 ], "kind": "commanddeclaration" }, { "full_name": "Doset.union_quotToDoset", "code": "theorem union_quotToDoset (H K : Subgroup G) : ⋃ q, quotToDoset H K q = Set.univ", "start": [ 162, 1 ], "end": [ 169, 92 ], "kind": "commanddeclaration" }, { "full_name": "Doset.doset_union_rightCoset", "code": "theorem doset_union_rightCoset (H K : Subgroup G) (a : G) :\n ⋃ k : K, op (a * k) • ↑H = doset a H K", "start": [ 172, 1 ], "end": [ 183, 76 ], "kind": "commanddeclaration" }, { "full_name": "Doset.doset_union_leftCoset", "code": "theorem doset_union_leftCoset (H K : Subgroup G) (a : G) :\n ⋃ h : H, (h * a : G) • ↑K = doset a H K", "start": [ 186, 1 ], "end": [ 196, 99 ], "kind": "commanddeclaration" }, { "full_name": "Doset.left_bot_eq_left_quot", "code": "theorem left_bot_eq_left_quot (H : Subgroup G) :\n Quotient (⊥ : Subgroup G).1 (H : Set G) = (G ⧸ H)", "start": [ 199, 1 ], "end": [ 205, 6 ], "kind": "commanddeclaration" }, { "full_name": "Doset.right_bot_eq_right_quot", "code": "theorem right_bot_eq_right_quot (H : Subgroup G) :\n Quotient (H.1 : Set G) (⊥ : Subgroup G) = _root_.Quotient (QuotientGroup.rightRel H)", "start": [ 208, 1 ], "end": [ 214, 6 ], "kind": "commanddeclaration" } ]
Mathlib/Analysis/FunctionalSpaces/SobolevInequality.lean
[ "Mathlib/MeasureTheory/Integral/IntegralEqImproper.lean", "Mathlib/Analysis/Calculus/Deriv/Pi.lean", "Mathlib/Analysis/InnerProductSpace/NormPow.lean", ".lake/packages/lean4/src/lean/Init.lean", "Mathlib/Data/Finset/Interval.lean", "Mathlib/Analysis/InnerProductSpace/EuclideanDist.lean" ]
[ { "full_name": "MeasureTheory.GridLines.T", "code": "def T (p : ℝ) (f : (∀ i, A i) → ℝ≥0∞) (s : Finset ι) : (∀ i, A i) → ℝ≥0∞ :=\n ∫⋯∫⁻_s, f ^ (1 - (s.card - 1 : ℝ) * p) * ∏ i in s, (∫⋯∫⁻_{i}, f ∂μ) ^ p ∂μ", "start": [ 70, 1 ], "end": [ 86, 77 ], "kind": "commanddeclaration" }, { "full_name": "MeasureTheory.GridLines.T_univ", "code": "@[simp] lemma T_univ (f : (∀ i, A i) → ℝ≥0∞) (x : ∀ i, A i) :\n T μ p f univ x =\n ∫⁻ (x : ∀ i, A i), (f x ^ (1 - (#ι - 1 : ℝ) * p)\n * ∏ i : ι, (∫⁻ t : A i, f (update x i t) ∂(μ i)) ^ p) ∂(.pi μ) := by\n simp [T, lmarginal_univ, lmarginal_singleton, card_univ]", "start": [ 90, 1 ], "end": [ 94, 59 ], "kind": "lemma" }, { "full_name": "MeasureTheory.GridLines.T_empty", "code": "@[simp] lemma T_empty (f : (∀ i, A i) → ℝ≥0∞) (x : ∀ i, A i) :\n T μ p f ∅ x = f x ^ (1 + p) := by\n simp [T]", "start": [ 96, 1 ], "end": [ 98, 11 ], "kind": "lemma" }, { "full_name": "MeasureTheory.GridLines.T_insert_le_T_lmarginal_singleton", "code": "theorem T_insert_le_T_lmarginal_singleton (hp₀ : 0 ≤ p) (s : Finset ι)\n (hp : (s.card : ℝ) * p ≤ 1)\n (i : ι) (hi : i ∉ s) {f : (∀ i, A i) → ℝ≥0∞} (hf : Measurable f) :\n T μ p f (insert i s) ≤ T μ p (∫⋯∫⁻_{i}, f ∂μ) s", "start": [ 100, 1 ], "end": [ 206, 44 ], "kind": "commanddeclaration" }, { "full_name": "MeasureTheory.GridLines.T_lmarginal_antitone", "code": "theorem T_lmarginal_antitone (hp₀ : 0 ≤ p) (hp : (#ι - 1 : ℝ) * p ≤ 1)\n {f : (∀ i, A i) → ℝ≥0∞} (hf : Measurable f) :\n Antitone (fun s ↦ T μ p (∫⋯∫⁻_sᶜ, f ∂μ) s)", "start": [ 208, 1 ], "end": [ 236, 28 ], "kind": "commanddeclaration" }, { "full_name": "MeasureTheory.lintegral_mul_prod_lintegral_pow_le", "code": "theorem lintegral_mul_prod_lintegral_pow_le {p : ℝ} (hp₀ : 0 ≤ p)\n (hp : (#ι - 1 : ℝ) * p ≤ 1) {f : (∀ i : ι, A i) → ℝ≥0∞} (hf : Measurable f) :\n ∫⁻ x, f x ^ (1 - (#ι - 1 : ℝ) * p) * ∏ i, (∫⁻ xᵢ, f (update x i xᵢ) ∂μ i) ^ p ∂.pi μ\n ≤ (∫⁻ x, f x ∂.pi μ) ^ (1 + p)", "start": [ 240, 1 ], "end": [ 261, 84 ], "kind": "commanddeclaration" }, { "full_name": "MeasureTheory.lintegral_prod_lintegral_pow_le", "code": "theorem lintegral_prod_lintegral_pow_le\n {p : ℝ} (hp : Real.IsConjExponent #ι p)\n {f} (hf : Measurable f) :\n ∫⁻ x, ∏ i, (∫⁻ xᵢ, f (update x i xᵢ) ∂μ i) ^ ((1 : ℝ) / (#ι - 1 : ℝ)) ∂.pi μ\n ≤ (∫⁻ x, f x ∂.pi μ) ^ p", "start": [ 263, 1 ], "end": [ 279, 13 ], "kind": "commanddeclaration" }, { "full_name": "MeasureTheory.lintegral_pow_le_pow_lintegral_fderiv_aux", "code": "theorem lintegral_pow_le_pow_lintegral_fderiv_aux\n {p : ℝ} (hp : Real.IsConjExponent #ι p)\n {u : (ι → ℝ) → F} (hu : ContDiff ℝ 1 u)\n (h2u : HasCompactSupport u) :\n ∫⁻ x, (‖u x‖₊ : ℝ≥0∞) ^ p ≤ (∫⁻ x, ‖fderiv ℝ u x‖₊) ^ p", "start": [ 285, 1 ], "end": [ 338, 81 ], "kind": "commanddeclaration" }, { "full_name": "MeasureTheory.lintegralPowLePowLIntegralFDerivConst", "code": "irreducible_def lintegralPowLePowLIntegralFDerivConst (p : ℝ) : ℝ≥0 := by\n let ι := Fin (finrank ℝ E)\n have : finrank ℝ E = finrank ℝ (ι → ℝ) := by\n rw [finrank_fintype_fun_eq_card, Fintype.card_fin (finrank ℝ E)]\n let e : E ≃L[ℝ] ι → ℝ := ContinuousLinearEquiv.ofFinrankEq this\n let c := addHaarScalarFactor μ ((volume : Measure (ι → ℝ)).map e.symm)\n exact (c * ‖(e.symm : (ι → ℝ) →L[ℝ] E)‖₊ ^ p) * (c ^ p)⁻¹", "start": [ 345, 1 ], "end": [ 355, 60 ], "kind": "leanelabcommandcommandirreducibledef" }, { "full_name": "MeasureTheory.lintegral_pow_le_pow_lintegral_fderiv", "code": "theorem lintegral_pow_le_pow_lintegral_fderiv {u : E → F}\n (hu : ContDiff ℝ 1 u) (h2u : HasCompactSupport u)\n {p : ℝ} (hp : Real.IsConjExponent (finrank ℝ E) p) :\n ∫⁻ x, (‖u x‖₊ : ℝ≥0∞) ^ p ∂μ ≤\n lintegralPowLePowLIntegralFDerivConst μ p * (∫⁻ x, ‖fderiv ℝ u x‖₊ ∂μ) ^ p", "start": [ 357, 1 ], "end": [ 425, 13 ], "kind": "commanddeclaration" }, { "full_name": "MeasureTheory.snormLESNormFDerivOneConst", "code": "irreducible_def snormLESNormFDerivOneConst (p : ℝ) : ℝ≥0 :=\n lintegralPowLePowLIntegralFDerivConst μ p ^ p⁻¹", "start": [ 427, 1 ], "end": [ 430, 50 ], "kind": "leanelabcommandcommandirreducibledef" }, { "full_name": "MeasureTheory.snorm_le_snorm_fderiv_one", "code": "theorem snorm_le_snorm_fderiv_one {u : E → F} (hu : ContDiff ℝ 1 u) (h2u : HasCompactSupport u)\n {p : ℝ≥0} (hp : NNReal.IsConjExponent (finrank ℝ E) p) :\n snorm u p μ ≤ snormLESNormFDerivOneConst μ p * snorm (fderiv ℝ u) 1 μ", "start": [ 432, 1 ], "end": [ 445, 62 ], "kind": "commanddeclaration" }, { "full_name": "MeasureTheory.snormLESNormFDerivOfEqInnerConst", "code": "def snormLESNormFDerivOfEqInnerConst (p : ℝ) : ℝ≥0 :=\n let n := finrank ℝ E\n snormLESNormFDerivOneConst μ (NNReal.conjExponent n) * (p * (n - 1) / (n - p)).toNNReal", "start": [ 447, 1 ], "end": [ 451, 90 ], "kind": "commanddeclaration" }, { "full_name": "MeasureTheory.snorm_le_snorm_fderiv_of_eq_inner", "code": "theorem snorm_le_snorm_fderiv_of_eq_inner {u : E → F'}\n (hu : ContDiff ℝ 1 u) (h2u : HasCompactSupport u)\n {p p' : ℝ≥0} (hp : 1 ≤ p) (hn : 0 < finrank ℝ E)\n (hp' : (p' : ℝ)⁻¹ = p⁻¹ - (finrank ℝ E : ℝ)⁻¹) :\n snorm u p' μ ≤ snormLESNormFDerivOfEqInnerConst μ p * snorm (fderiv ℝ u) p μ", "start": [ 455, 1 ], "end": [ 578, 17 ], "kind": "commanddeclaration" }, { "full_name": "MeasureTheory.SNormLESNormFDerivOfEqConst", "code": "irreducible_def SNormLESNormFDerivOfEqConst [FiniteDimensional ℝ F] (p : ℝ) : ℝ≥0 :=\n let F' := EuclideanSpace ℝ <| Fin <| finrank ℝ F\n let e : F ≃L[ℝ] F' := toEuclidean\n ‖(e.symm : F' →L[ℝ] F)‖₊ * snormLESNormFDerivOfEqInnerConst μ p * ‖(e : F →L[ℝ] F')‖₊", "start": [ 581, 1 ], "end": [ 586, 88 ], "kind": "leanelabcommandcommandirreducibledef" }, { "full_name": "MeasureTheory.snorm_le_snorm_fderiv_of_eq", "code": "theorem snorm_le_snorm_fderiv_of_eq [FiniteDimensional ℝ F]\n {u : E → F} (hu : ContDiff ℝ 1 u) (h2u : HasCompactSupport u)\n {p p' : ℝ≥0} (hp : 1 ≤ p) (hn : 0 < finrank ℝ E)\n (hp' : (p' : ℝ)⁻¹ = p⁻¹ - (finrank ℝ E : ℝ)⁻¹) :\n snorm u p' μ ≤ SNormLESNormFDerivOfEqConst F μ p * snorm (fderiv ℝ u) p μ", "start": [ 588, 1 ], "end": [ 632, 26 ], "kind": "commanddeclaration" }, { "full_name": "MeasureTheory.snormLESNormFDerivOfLeConst", "code": "irreducible_def snormLESNormFDerivOfLeConst [FiniteDimensional ℝ F] (s : Set E) (p q : ℝ≥0) : ℝ≥0 :=\n let p' : ℝ≥0 := (p⁻¹ - (finrank ℝ E : ℝ≥0)⁻¹)⁻¹\n (μ s).toNNReal ^ (1 / q - 1 / p' : ℝ) * SNormLESNormFDerivOfEqConst F μ p", "start": [ 636, 1 ], "end": [ 640, 76 ], "kind": "leanelabcommandcommandirreducibledef" }, { "full_name": "MeasureTheory.snorm_le_snorm_fderiv_of_le", "code": "theorem snorm_le_snorm_fderiv_of_le [FiniteDimensional ℝ F]\n {u : E → F} {s : Set E} (hu : ContDiff ℝ 1 u) (h2u : u.support ⊆ s)\n {p q : ℝ≥0} (hp : 1 ≤ p) (h2p : p < finrank ℝ E)\n (hpq : p⁻¹ - (finrank ℝ E : ℝ)⁻¹ ≤ (q : ℝ)⁻¹)\n (hs : Bornology.IsBounded s) :\n snorm u q μ ≤ snormLESNormFDerivOfLeConst F μ s p q * snorm (fderiv ℝ u) p μ", "start": [ 643, 1 ], "end": [ 692, 67 ], "kind": "commanddeclaration" }, { "full_name": "MeasureTheory.snorm_le_snorm_fderiv", "code": "theorem snorm_le_snorm_fderiv [FiniteDimensional ℝ F]\n {u : E → F} {s : Set E} (hu : ContDiff ℝ 1 u) (h2u : u.support ⊆ s)\n {p : ℝ≥0} (hp : 1 ≤ p) (h2p : p < finrank ℝ E) (hs : Bornology.IsBounded s) :\n snorm u p μ ≤ snormLESNormFDerivOfLeConst F μ s p p * snorm (fderiv ℝ u) p μ", "start": [ 694, 1 ], "end": [ 709, 13 ], "kind": "commanddeclaration" } ]
Mathlib/CategoryTheory/Limits/Elements.lean
[ "Mathlib/CategoryTheory/Limits/Creates.lean", ".lake/packages/lean4/src/lean/Init.lean", "Mathlib/CategoryTheory/Elements.lean", "Mathlib/CategoryTheory/Limits/Types.lean", "Mathlib/CategoryTheory/Limits/Preserves/Limits.lean" ]
[ { "full_name": "CategoryTheory.CategoryOfElements.CreatesLimitsAux.liftedConeElement'", "code": "noncomputable def liftedConeElement' : limit ((F ⋙ π A) ⋙ A) :=\n Types.Limit.mk _ (fun i => (F.obj i).2) (by simp)", "start": [ 37, 1 ], "end": [ 39, 52 ], "kind": "commanddeclaration" }, { "full_name": "CategoryTheory.CategoryOfElements.CreatesLimitsAux.π_liftedConeElement'", "code": "@[simp]\nlemma π_liftedConeElement' (i : I) :\n limit.π ((F ⋙ π A) ⋙ A) i (liftedConeElement' F) = (F.obj i).2 :=\n Types.Limit.π_mk _ _ _ _", "start": [ 41, 1 ], "end": [ 44, 27 ], "kind": "lemma" }, { "full_name": "CategoryTheory.CategoryOfElements.CreatesLimitsAux.liftedConeElement", "code": "noncomputable def liftedConeElement : A.obj (limit (F ⋙ π A)) :=\n (preservesLimitIso A (F ⋙ π A)).inv (liftedConeElement' F)", "start": [ 46, 1 ], "end": [ 48, 61 ], "kind": "commanddeclaration" }, { "full_name": "CategoryTheory.CategoryOfElements.CreatesLimitsAux.map_lift_mapCone", "code": "@[simp]\nlemma map_lift_mapCone (c : Cone F) :\n A.map (limit.lift (F ⋙ π A) ((π A).mapCone c)) c.pt.snd = liftedConeElement F := by\n apply (preservesLimitIso A (F ⋙ π A)).toEquiv.injective\n ext i\n have h₁ := congrFun (preservesLimitsIso_hom_π A (F ⋙ π A) i)\n (A.map (limit.lift (F ⋙ π A) ((π A).mapCone c)) c.pt.snd)\n have h₂ := (c.π.app i).property\n simp_all [← FunctorToTypes.map_comp_apply, liftedConeElement]", "start": [ 50, 1 ], "end": [ 58, 64 ], "kind": "lemma" }, { "full_name": "CategoryTheory.CategoryOfElements.CreatesLimitsAux.map_π_liftedConeElement", "code": "@[simp]\nlemma map_π_liftedConeElement (i : I) :\n A.map (limit.π (F ⋙ π A) i) (liftedConeElement F) = (F.obj i).snd := by\n have := congrFun\n (preservesLimitsIso_inv_π A (F ⋙ π A) i) (liftedConeElement' F)\n simp_all [liftedConeElement]", "start": [ 60, 1 ], "end": [ 65, 31 ], "kind": "lemma" }, { "full_name": "CategoryTheory.CategoryOfElements.CreatesLimitsAux.liftedCone", "code": "@[simps]\nnoncomputable def liftedCone : Cone F where\n pt := ⟨_, liftedConeElement F⟩\n π :=\n { app := fun i => ⟨limit.π (F ⋙ π A) i, by simp⟩\n naturality := fun i i' f => by ext; simpa using (limit.w _ _).symm }", "start": [ 67, 1 ], "end": [ 73, 75 ], "kind": "commanddeclaration" }, { "full_name": "CategoryTheory.CategoryOfElements.CreatesLimitsAux.isValidLift", "code": "noncomputable def isValidLift : (π A).mapCone (liftedCone F) ≅ limit.cone (F ⋙ π A) :=\n Iso.refl _", "start": [ 75, 1 ], "end": [ 77, 13 ], "kind": "commanddeclaration" }, { "full_name": "CategoryTheory.CategoryOfElements.CreatesLimitsAux.isLimit", "code": "noncomputable def isLimit : IsLimit (liftedCone F) where\n lift s := ⟨limit.lift (F ⋙ π A) ((π A).mapCone s), by simp⟩\n uniq s m h := ext _ _ _ <| limit.hom_ext\n fun i => by simpa using congrArg Subtype.val (h i)", "start": [ 79, 1 ], "end": [ 83, 55 ], "kind": "commanddeclaration" } ]
Mathlib/Data/Finmap.lean
[ ".lake/packages/lean4/src/lean/Init.lean", "Mathlib/Data/Part.lean", "Mathlib/Data/List/AList.lean", "Mathlib/Data/Finset/Sigma.lean" ]
[ { "full_name": "Multiset.keys", "code": "def keys (s : Multiset (Sigma β)) : Multiset α :=\n s.map Sigma.fst", "start": [ 26, 1 ], "end": [ 28, 18 ], "kind": "commanddeclaration" }, { "full_name": "Multiset.coe_keys", "code": "@[simp]\ntheorem coe_keys {l : List (Sigma β)} : keys (l : Multiset (Sigma β)) = (l.keys : Multiset α)", "start": [ 31, 1 ], "end": [ 33, 6 ], "kind": "commanddeclaration" }, { "full_name": "Multiset.NodupKeys", "code": "def NodupKeys (s : Multiset (Sigma β)) : Prop :=\n Quot.liftOn s List.NodupKeys fun _ _ p => propext <| perm_nodupKeys p", "start": [ 37, 1 ], "end": [ 39, 72 ], "kind": "commanddeclaration" }, { "full_name": "Multiset.coe_nodupKeys", "code": "@[simp]\ntheorem coe_nodupKeys {l : List (Sigma β)} : @NodupKeys α β l ↔ l.NodupKeys", "start": [ 42, 1 ], "end": [ 44, 10 ], "kind": "commanddeclaration" }, { "full_name": "Multiset.nodup_keys", "code": "lemma nodup_keys {m : Multiset (Σ a, β a)} : m.keys.Nodup ↔ m.NodupKeys := by\n rcases m with ⟨l⟩; rfl", "start": [ 47, 1 ], "end": [ 48, 25 ], "kind": "lemma" }, { "full_name": "Multiset.NodupKeys.nodup", "code": "protected lemma NodupKeys.nodup {m : Multiset (Σ a, β a)} (h : m.NodupKeys) : m.Nodup :=\n h.nodup_keys.of_map _", "start": [ 52, 1 ], "end": [ 53, 24 ], "kind": "lemma" }, { "full_name": "Finmap", "code": "structure Finmap (β : α → Type v) : Type max u v where\n \n entries : Multiset (Sigma β)\n \n nodupKeys : entries.NodupKeys", "start": [ 59, 1 ], "end": [ 65, 32 ], "kind": "commanddeclaration" }, { "full_name": "AList.toFinmap", "code": "def AList.toFinmap (s : AList β) : Finmap β :=\n ⟨s.entries, s.nodupKeys⟩", "start": [ 68, 1 ], "end": [ 70, 27 ], "kind": "commanddeclaration" }, { "full_name": "AList.toFinmap_eq", "code": "theorem AList.toFinmap_eq {s₁ s₂ : AList β} :\n toFinmap s₁ = toFinmap s₂ ↔ s₁.entries ~ s₂.entries", "start": [ 75, 1 ], "end": [ 79, 24 ], "kind": "commanddeclaration" }, { "full_name": "AList.toFinmap_entries", "code": "@[simp]\ntheorem AList.toFinmap_entries (s : AList β) : ⟦s⟧.entries = s.entries", "start": [ 82, 1 ], "end": [ 84, 6 ], "kind": "commanddeclaration" }, { "full_name": "List.toFinmap", "code": "def List.toFinmap [DecidableEq α] (s : List (Sigma β)) : Finmap β :=\n s.toAList.toFinmap", "start": [ 87, 1 ], "end": [ 90, 21 ], "kind": "commanddeclaration" }, { "full_name": "Finmap.nodup_entries", "code": "lemma nodup_entries (f : Finmap β) : f.entries.Nodup := f.nodupKeys.nodup", "start": [ 97, 1 ], "end": [ 97, 74 ], "kind": "lemma" }, { "full_name": "Finmap.liftOn", "code": "def liftOn {γ} (s : Finmap β) (f : AList β → γ)\n (H : ∀ a b : AList β, a.entries ~ b.entries → f a = f b) : γ := by\n refine\n (Quotient.liftOn s.entries\n (fun (l : List (Sigma β)) => (⟨_, fun nd => f ⟨l, nd⟩⟩ : Part γ))\n (fun l₁ l₂ p => Part.ext' (perm_nodupKeys p) ?_) : Part γ).get ?_\n · exact fun h1 h2 => H _ _ p\n · have := s.nodupKeys\n revert this\n rcases s.entries with ⟨l⟩\n exact id", "start": [ 101, 1 ], "end": [ 114, 13 ], "kind": "commanddeclaration" }, { "full_name": "Finmap.liftOn_toFinmap", "code": "@[simp]\ntheorem liftOn_toFinmap {γ} (s : AList β) (f : AList β → γ) (H) : liftOn ⟦s⟧ f H = f s", "start": [ 117, 1 ], "end": [ 120, 6 ], "kind": "commanddeclaration" }, { "full_name": "Finmap.liftOn₂", "code": "def liftOn₂ {γ} (s₁ s₂ : Finmap β) (f : AList β → AList β → γ)\n (H : ∀ a₁ b₁ a₂ b₂ : AList β,\n a₁.entries ~ a₂.entries → b₁.entries ~ b₂.entries → f a₁ b₁ = f a₂ b₂) : γ :=\n liftOn s₁ (fun l₁ => liftOn s₂ (f l₁) fun b₁ b₂ p => H _ _ _ _ (Perm.refl _) p) fun a₁ a₂ p => by\n have H' : f a₁ = f a₂ := funext fun _ => H _ _ _ _ p (Perm.refl _)\n simp only [H']", "start": [ 123, 1 ], "end": [ 130, 19 ], "kind": "commanddeclaration" }, { "full_name": "Finmap.liftOn₂_toFinmap", "code": "@[simp]\ntheorem liftOn₂_toFinmap {γ} (s₁ s₂ : AList β) (f : AList β → AList β → γ) (H) :\n liftOn₂ ⟦s₁⟧ ⟦s₂⟧ f H = f s₁ s₂", "start": [ 133, 1 ], "end": [ 136, 30 ], "kind": "commanddeclaration" }, { "full_name": "Finmap.induction_on", "code": "@[elab_as_elim]\ntheorem induction_on {C : Finmap β → Prop} (s : Finmap β) (H : ∀ a : AList β, C ⟦a⟧) : C s", "start": [ 141, 1 ], "end": [ 143, 41 ], "kind": "commanddeclaration" }, { "full_name": "Finmap.induction_on₂", "code": "@[elab_as_elim]\ntheorem induction_on₂ {C : Finmap β → Finmap β → Prop} (s₁ s₂ : Finmap β)\n (H : ∀ a₁ a₂ : AList β, C ⟦a₁⟧ ⟦a₂⟧) : C s₁ s₂", "start": [ 146, 1 ], "end": [ 149, 62 ], "kind": "commanddeclaration" }, { "full_name": "Finmap.induction_on₃", "code": "@[elab_as_elim]\ntheorem induction_on₃ {C : Finmap β → Finmap β → Finmap β → Prop} (s₁ s₂ s₃ : Finmap β)\n (H : ∀ a₁ a₂ a₃ : AList β, C ⟦a₁⟧ ⟦a₂⟧ ⟦a₃⟧) : C s₁ s₂ s₃", "start": [ 152, 1 ], "end": [ 155, 72 ], "kind": "commanddeclaration" }, { "full_name": "Finmap.ext", "code": "@[ext]\ntheorem ext : ∀ {s t : Finmap β}, s.entries = t.entries → s = t", "start": [ 160, 1 ], "end": [ 162, 37 ], "kind": "commanddeclaration" }, { "full_name": "Finmap.ext_iff", "code": "@[simp]\ntheorem ext_iff {s t : Finmap β} : s.entries = t.entries ↔ s = t", "start": [ 165, 1 ], "end": [ 167, 21 ], "kind": "commanddeclaration" }, { "full_name": "Finmap.mem_def", "code": "theorem mem_def {a : α} {s : Finmap β} : a ∈ s ↔ a ∈ s.entries.keys", "start": [ 176, 1 ], "end": [ 177, 10 ], "kind": "commanddeclaration" }, { "full_name": "Finmap.mem_toFinmap", "code": "@[simp]\ntheorem mem_toFinmap {a : α} {s : AList β} : a ∈ toFinmap s ↔ a ∈ s", "start": [ 180, 1 ], "end": [ 182, 10 ], "kind": "commanddeclaration" }, { "full_name": "Finmap.keys", "code": "def keys (s : Finmap β) : Finset α :=\n ⟨s.entries.keys, s.nodupKeys.nodup_keys⟩", "start": [ 187, 1 ], "end": [ 189, 43 ], "kind": "commanddeclaration" }, { "full_name": "Finmap.keys_val", "code": "@[simp]\ntheorem keys_val (s : AList β) : (keys ⟦s⟧).val = s.keys", "start": [ 192, 1 ], "end": [ 194, 6 ], "kind": "commanddeclaration" }, { "full_name": "Finmap.keys_ext", "code": "@[simp]\ntheorem keys_ext {s₁ s₂ : AList β} : keys ⟦s₁⟧ = keys ⟦s₂⟧ ↔ s₁.keys ~ s₂.keys", "start": [ 197, 1 ], "end": [ 199, 26 ], "kind": "commanddeclaration" }, { "full_name": "Finmap.mem_keys", "code": "theorem mem_keys {a : α} {s : Finmap β} : a ∈ s.keys ↔ a ∈ s", "start": [ 202, 1 ], "end": [ 203, 41 ], "kind": "commanddeclaration" }, { "full_name": "Finmap.empty_toFinmap", "code": "@[simp]\ntheorem empty_toFinmap : (⟦∅⟧ : Finmap β) = ∅", "start": [ 215, 1 ], "end": [ 217, 6 ], "kind": "commanddeclaration" }, { "full_name": "Finmap.toFinmap_nil", "code": "@[simp]\ntheorem toFinmap_nil [DecidableEq α] : ([].toFinmap : Finmap β) = ∅", "start": [ 220, 1 ], "end": [ 222, 6 ], "kind": "commanddeclaration" }, { "full_name": "Finmap.not_mem_empty", "code": "theorem not_mem_empty {a : α} : a ∉ (∅ : Finmap β)", "start": [ 225, 1 ], "end": [ 226, 26 ], "kind": "commanddeclaration" }, { "full_name": "Finmap.keys_empty", "code": "@[simp]\ntheorem keys_empty : (∅ : Finmap β).keys = ∅", "start": [ 229, 1 ], "end": [ 231, 6 ], "kind": "commanddeclaration" }, { "full_name": "Finmap.singleton", "code": "def singleton (a : α) (b : β a) : Finmap β :=\n ⟦AList.singleton a b⟧", "start": [ 236, 1 ], "end": [ 238, 24 ], "kind": "commanddeclaration" }, { "full_name": "Finmap.keys_singleton", "code": "@[simp]\ntheorem keys_singleton (a : α) (b : β a) : (singleton a b).keys = {a}", "start": [ 241, 1 ], "end": [ 243, 6 ], "kind": "commanddeclaration" }, { "full_name": "Finmap.mem_singleton", "code": "@[simp]\ntheorem mem_singleton (x y : α) (b : β y) : x ∈ singleton y b ↔ x = y", "start": [ 246, 1 ], "end": [ 248, 67 ], "kind": "commanddeclaration" }, { "full_name": "Finmap.decidableEq", "code": "instance decidableEq [∀ a, DecidableEq (β a)] : DecidableEq (Finmap β)\n | _, _ => decidable_of_iff _ ext_iff", "start": [ 255, 1 ], "end": [ 256, 39 ], "kind": "commanddeclaration" }, { "full_name": "Finmap.lookup", "code": "def lookup (a : α) (s : Finmap β) : Option (β a) :=\n liftOn s (AList.lookup a) fun _ _ => perm_lookup", "start": [ 261, 1 ], "end": [ 263, 51 ], "kind": "commanddeclaration" }, { "full_name": "Finmap.lookup_toFinmap", "code": "@[simp]\ntheorem lookup_toFinmap (a : α) (s : AList β) : lookup a ⟦s⟧ = s.lookup a", "start": [ 266, 1 ], "end": [ 268, 6 ], "kind": "commanddeclaration" }, { "full_name": "Finmap.dlookup_list_toFinmap", "code": "@[simp]\ntheorem dlookup_list_toFinmap (a : α) (s : List (Sigma β)) : lookup a s.toFinmap = s.dlookup a", "start": [ 272, 1 ], "end": [ 274, 55 ], "kind": "commanddeclaration" }, { "full_name": "Finmap.lookup_empty", "code": "@[simp]\ntheorem lookup_empty (a) : lookup a (∅ : Finmap β) = none", "start": [ 277, 1 ], "end": [ 279, 6 ], "kind": "commanddeclaration" }, { "full_name": "Finmap.lookup_isSome", "code": "theorem lookup_isSome {a : α} {s : Finmap β} : (s.lookup a).isSome ↔ a ∈ s", "start": [ 282, 1 ], "end": [ 283, 46 ], "kind": "commanddeclaration" }, { "full_name": "Finmap.lookup_eq_none", "code": "theorem lookup_eq_none {a} {s : Finmap β} : lookup a s = none ↔ a ∉ s", "start": [ 286, 1 ], "end": [ 287, 47 ], "kind": "commanddeclaration" }, { "full_name": "Finmap.mem_lookup_iff", "code": "lemma mem_lookup_iff {s : Finmap β} {a : α} {b : β a} :\n b ∈ s.lookup a ↔ Sigma.mk a b ∈ s.entries := by\n rcases s with ⟨⟨l⟩, hl⟩; exact List.mem_dlookup_iff hl", "start": [ 290, 1 ], "end": [ 292, 57 ], "kind": "lemma" }, { "full_name": "Finmap.lookup_eq_some_iff", "code": "lemma lookup_eq_some_iff {s : Finmap β} {a : α} {b : β a} :\n s.lookup a = b ↔ Sigma.mk a b ∈ s.entries := mem_lookup_iff", "start": [ 294, 1 ], "end": [ 295, 64 ], "kind": "lemma" }, { "full_name": "Finmap.sigma_keys_lookup", "code": "@[simp] lemma sigma_keys_lookup (s : Finmap β) :\n s.keys.sigma (fun i => (s.lookup i).toFinset) = ⟨s.entries, s.nodup_entries⟩ := by\n ext x\n have : x ∈ s.entries → x.1 ∈ s.keys := Multiset.mem_map_of_mem _\n simpa [lookup_eq_some_iff]", "start": [ 297, 1 ], "end": [ 301, 29 ], "kind": "lemma" }, { "full_name": "Finmap.lookup_singleton_eq", "code": "@[simp]\ntheorem lookup_singleton_eq {a : α} {b : β a} : (singleton a b).lookup a = some b", "start": [ 303, 1 ], "end": [ 305, 82 ], "kind": "commanddeclaration" }, { "full_name": "Finmap.mem_iff", "code": "theorem mem_iff {a : α} {s : Finmap β} : a ∈ s ↔ ∃ b, s.lookup a = some b", "start": [ 311, 1 ], "end": [ 313, 88 ], "kind": "commanddeclaration" }, { "full_name": "Finmap.mem_of_lookup_eq_some", "code": "theorem mem_of_lookup_eq_some {a : α} {b : β a} {s : Finmap β} (h : s.lookup a = some b) : a ∈ s", "start": [ 316, 1 ], "end": [ 317, 21 ], "kind": "commanddeclaration" }, { "full_name": "Finmap.ext_lookup", "code": "theorem ext_lookup {s₁ s₂ : Finmap β} : (∀ x, s₁.lookup x = s₂.lookup x) → s₁ = s₂", "start": [ 320, 1 ], "end": [ 326, 11 ], "kind": "commanddeclaration" }, { "full_name": "Finmap.keysLookupEquiv", "code": "@[simps apply_coe_fst apply_coe_snd]\ndef keysLookupEquiv :\n Finmap β ≃ { f : Finset α × (∀ a, Option (β a)) // ∀ i, (f.2 i).isSome ↔ i ∈ f.1 } where\n toFun s := ⟨(s.keys, fun i => s.lookup i), fun _ => lookup_isSome⟩\n invFun f := mk (f.1.1.sigma fun i => (f.1.2 i).toFinset).val <| by\n refine Multiset.nodup_keys.1 ((Finset.nodup _).map_on ?_)\n simp only [Finset.mem_val, Finset.mem_sigma, Option.mem_toFinset, Option.mem_def]\n rintro ⟨i, x⟩ ⟨_, hx⟩ ⟨j, y⟩ ⟨_, hy⟩ (rfl : i = j)\n simpa using hx.symm.trans hy\n left_inv f := ext <| by simp\n right_inv := fun ⟨(s, f), hf⟩ => by\n dsimp only at hf\n ext\n · simp [keys, Multiset.keys, ← hf, Option.isSome_iff_exists]\n · simp (config := { contextual := true }) [lookup_eq_some_iff, ← hf]", "start": [ 329, 1 ], "end": [ 345, 73 ], "kind": "commanddeclaration" }, { "full_name": "Finmap.keysLookupEquiv_symm_apply_keys", "code": "@[simp] lemma keysLookupEquiv_symm_apply_keys :\n ∀ f : {f : Finset α × (∀ a, Option (β a)) // ∀ i, (f.2 i).isSome ↔ i ∈ f.1},\n (keysLookupEquiv.symm f).keys = f.1.1 :=\n keysLookupEquiv.surjective.forall.2 fun _ => by\n simp only [Equiv.symm_apply_apply, keysLookupEquiv_apply_coe_fst]", "start": [ 347, 1 ], "end": [ 351, 70 ], "kind": "lemma" }, { "full_name": "Finmap.keysLookupEquiv_symm_apply_lookup", "code": "@[simp] lemma keysLookupEquiv_symm_apply_lookup :\n ∀ (f : {f : Finset α × (∀ a, Option (β a)) // ∀ i, (f.2 i).isSome ↔ i ∈ f.1}) a,\n (keysLookupEquiv.symm f).lookup a = f.1.2 a :=\n keysLookupEquiv.surjective.forall.2 fun _ _ => by\n simp only [Equiv.symm_apply_apply, keysLookupEquiv_apply_coe_snd]", "start": [ 353, 1 ], "end": [ 357, 70 ], "kind": "lemma" }, { "full_name": "Finmap.replace", "code": "def replace (a : α) (b : β a) (s : Finmap β) : Finmap β :=\n (liftOn s fun t => AList.toFinmap (AList.replace a b t))\n fun _ _ p => toFinmap_eq.2 <| perm_replace p", "start": [ 361, 1 ], "end": [ 365, 49 ], "kind": "commanddeclaration" }, { "full_name": "Finmap.replace_toFinmap", "code": "@[simp]\ntheorem replace_toFinmap (a : α) (b : β a) (s : AList β) :\n replace a b ⟦s⟧ = (⟦s.replace a b⟧ : Finmap β)", "start": [ 369, 1 ], "end": [ 372, 17 ], "kind": "commanddeclaration" }, { "full_name": "Finmap.keys_replace", "code": "@[simp]\ntheorem keys_replace (a : α) (b : β a) (s : Finmap β) : (replace a b s).keys = s.keys", "start": [ 375, 1 ], "end": [ 377, 34 ], "kind": "commanddeclaration" }, { "full_name": "Finmap.mem_replace", "code": "@[simp]\ntheorem mem_replace {a a' : α} {b : β a} {s : Finmap β} : a' ∈ replace a b s ↔ a' ∈ s", "start": [ 380, 1 ], "end": [ 382, 34 ], "kind": "commanddeclaration" }, { "full_name": "Finmap.foldl", "code": "def foldl {δ : Type w} (f : δ → ∀ a, β a → δ)\n (H : ∀ d a₁ b₁ a₂ b₂, f (f d a₁ b₁) a₂ b₂ = f (f d a₂ b₂) a₁ b₁) (d : δ) (m : Finmap β) : δ :=\n m.entries.foldl (fun d s => f d s.1 s.2) (fun _ _ _ => H _ _ _ _ _) d", "start": [ 389, 1 ], "end": [ 392, 72 ], "kind": "commanddeclaration" }, { "full_name": "Finmap.any", "code": "def any (f : ∀ x, β x → Bool) (s : Finmap β) : Bool :=\n s.foldl (fun x y z => x || f y z)\n (fun _ _ _ _ => by simp_rw [Bool.or_assoc, Bool.or_comm, imp_true_iff]) false", "start": [ 395, 1 ], "end": [ 398, 82 ], "kind": "commanddeclaration" }, { "full_name": "Finmap.all", "code": "def all (f : ∀ x, β x → Bool) (s : Finmap β) : Bool :=\n s.foldl (fun x y z => x && f y z)\n (fun _ _ _ _ => by simp_rw [Bool.and_assoc, Bool.and_comm, imp_true_iff]) true", "start": [ 401, 1 ], "end": [ 404, 83 ], "kind": "commanddeclaration" }, { "full_name": "Finmap.erase", "code": "def erase (a : α) (s : Finmap β) : Finmap β :=\n (liftOn s fun t => AList.toFinmap (AList.erase a t)) fun _ _ p => toFinmap_eq.2 <| perm_erase p", "start": [ 413, 1 ], "end": [ 415, 98 ], "kind": "commanddeclaration" }, { "full_name": "Finmap.erase_toFinmap", "code": "@[simp]\ntheorem erase_toFinmap (a : α) (s : AList β) : erase a ⟦s⟧ = AList.toFinmap (s.erase a)", "start": [ 418, 1 ], "end": [ 420, 15 ], "kind": "commanddeclaration" }, { "full_name": "Finmap.keys_erase_toFinset", "code": "@[simp]\ntheorem keys_erase_toFinset (a : α) (s : AList β) : keys ⟦s.erase a⟧ = (keys ⟦s⟧).erase a", "start": [ 423, 1 ], "end": [ 425, 54 ], "kind": "commanddeclaration" }, { "full_name": "Finmap.keys_erase", "code": "@[simp]\ntheorem keys_erase (a : α) (s : Finmap β) : (erase a s).keys = s.keys.erase a", "start": [ 428, 1 ], "end": [ 430, 34 ], "kind": "commanddeclaration" }, { "full_name": "Finmap.mem_erase", "code": "@[simp]\ntheorem mem_erase {a a' : α} {s : Finmap β} : a' ∈ erase a s ↔ a' ≠ a ∧ a' ∈ s", "start": [ 433, 1 ], "end": [ 435, 34 ], "kind": "commanddeclaration" }, { "full_name": "Finmap.not_mem_erase_self", "code": "theorem not_mem_erase_self {a : α} {s : Finmap β} : ¬a ∈ erase a s", "start": [ 438, 1 ], "end": [ 441, 6 ], "kind": "commanddeclaration" }, { "full_name": "Finmap.lookup_erase", "code": "@[simp]\ntheorem lookup_erase (a) (s : Finmap β) : lookup a (erase a s) = none", "start": [ 444, 1 ], "end": [ 446, 41 ], "kind": "commanddeclaration" }, { "full_name": "Finmap.lookup_erase_ne", "code": "@[simp]\ntheorem lookup_erase_ne {a a'} {s : Finmap β} (h : a ≠ a') : lookup a (erase a' s) = lookup a s", "start": [ 449, 1 ], "end": [ 451, 50 ], "kind": "commanddeclaration" }, { "full_name": "Finmap.erase_erase", "code": "theorem erase_erase {a a' : α} {s : Finmap β} : erase a (erase a' s) = erase a' (erase a s)", "start": [ 454, 1 ], "end": [ 455, 81 ], "kind": "commanddeclaration" }, { "full_name": "Finmap.sdiff", "code": "def sdiff (s s' : Finmap β) : Finmap β :=\n s'.foldl (fun s x _ => s.erase x) (fun _ _ _ _ _ => erase_erase) s", "start": [ 460, 1 ], "end": [ 463, 69 ], "kind": "commanddeclaration" }, { "full_name": "Finmap.insert", "code": "def insert (a : α) (b : β a) (s : Finmap β) : Finmap β :=\n (liftOn s fun t => AList.toFinmap (AList.insert a b t)) fun _ _ p =>\n toFinmap_eq.2 <| perm_insert p", "start": [ 471, 1 ], "end": [ 475, 35 ], "kind": "commanddeclaration" }, { "full_name": "Finmap.insert_toFinmap", "code": "@[simp]\ntheorem insert_toFinmap (a : α) (b : β a) (s : AList β) :\n insert a b (AList.toFinmap s) = AList.toFinmap (s.insert a b)", "start": [ 478, 1 ], "end": [ 481, 16 ], "kind": "commanddeclaration" }, { "full_name": "Finmap.insert_entries_of_neg", "code": "theorem insert_entries_of_neg {a : α} {b : β a} {s : Finmap β} :\n a ∉ s → (insert a b s).entries = ⟨a, b⟩ ::ₘ s.entries", "start": [ 484, 1 ], "end": [ 488, 78 ], "kind": "commanddeclaration" }, { "full_name": "Finmap.mem_insert", "code": "@[simp]\ntheorem mem_insert {a a' : α} {b' : β a'} {s : Finmap β} : a ∈ insert a' b' s ↔ a = a' ∨ a ∈ s", "start": [ 491, 1 ], "end": [ 493, 34 ], "kind": "commanddeclaration" }, { "full_name": "Finmap.lookup_insert", "code": "@[simp]\ntheorem lookup_insert {a} {b : β a} (s : Finmap β) : lookup a (insert a b s) = some b", "start": [ 496, 1 ], "end": [ 498, 95 ], "kind": "commanddeclaration" }, { "full_name": "Finmap.lookup_insert_of_ne", "code": "@[simp]\ntheorem lookup_insert_of_ne {a a'} {b : β a} (s : Finmap β) (h : a' ≠ a) :\n lookup a' (insert a b s) = lookup a' s", "start": [ 501, 1 ], "end": [ 504, 94 ], "kind": "commanddeclaration" }, { "full_name": "Finmap.insert_insert", "code": "@[simp]\ntheorem insert_insert {a} {b b' : β a} (s : Finmap β) :\n (s.insert a b).insert a b' = s.insert a b'", "start": [ 507, 1 ], "end": [ 510, 78 ], "kind": "commanddeclaration" }, { "full_name": "Finmap.insert_insert_of_ne", "code": "theorem insert_insert_of_ne {a a'} {b : β a} {b' : β a'} (s : Finmap β) (h : a ≠ a') :\n (s.insert a b).insert a' b' = (s.insert a' b').insert a b", "start": [ 513, 1 ], "end": [ 516, 82 ], "kind": "commanddeclaration" }, { "full_name": "Finmap.toFinmap_cons", "code": "theorem toFinmap_cons (a : α) (b : β a) (xs : List (Sigma β)) :\n List.toFinmap (⟨a, b⟩ :: xs) = insert a b xs.toFinmap", "start": [ 519, 1 ], "end": [ 521, 6 ], "kind": "commanddeclaration" }, { "full_name": "Finmap.mem_list_toFinmap", "code": "theorem mem_list_toFinmap (a : α) (xs : List (Sigma β)) :\n a ∈ xs.toFinmap ↔ ∃ b : β a, Sigma.mk a b ∈ xs", "start": [ 524, 1 ], "end": [ 534, 36 ], "kind": "commanddeclaration" }, { "full_name": "Finmap.insert_singleton_eq", "code": "@[simp]\ntheorem insert_singleton_eq {a : α} {b b' : β a} : insert a b (singleton a b') = singleton a b", "start": [ 537, 1 ], "end": [ 539, 75 ], "kind": "commanddeclaration" }, { "full_name": "Finmap.extract", "code": "def extract (a : α) (s : Finmap β) : Option (β a) × Finmap β :=\n (liftOn s fun t => Prod.map id AList.toFinmap (AList.extract a t)) fun s₁ s₂ p => by\n simp [perm_lookup p, toFinmap_eq, perm_erase p]", "start": [ 544, 1 ], "end": [ 547, 52 ], "kind": "commanddeclaration" }, { "full_name": "Finmap.extract_eq_lookup_erase", "code": "@[simp]\ntheorem extract_eq_lookup_erase (a : α) (s : Finmap β) : extract a s = (lookup a s, erase a s)", "start": [ 550, 1 ], "end": [ 552, 44 ], "kind": "commanddeclaration" }, { "full_name": "Finmap.union", "code": "def union (s₁ s₂ : Finmap β) : Finmap β :=\n (liftOn₂ s₁ s₂ fun s₁ s₂ => (AList.toFinmap (s₁ ∪ s₂))) fun _ _ _ _ p₁₃ p₂₄ =>\n toFinmap_eq.mpr <| perm_union p₁₃ p₂₄", "start": [ 557, 1 ], "end": [ 561, 42 ], "kind": "commanddeclaration" }, { "full_name": "Finmap.mem_union", "code": "@[simp]\ntheorem mem_union {a} {s₁ s₂ : Finmap β} : a ∈ s₁ ∪ s₂ ↔ a ∈ s₁ ∨ a ∈ s₂", "start": [ 567, 1 ], "end": [ 569, 49 ], "kind": "commanddeclaration" }, { "full_name": "Finmap.union_toFinmap", "code": "@[simp]\ntheorem union_toFinmap (s₁ s₂ : AList β) : (toFinmap s₁) ∪ (toFinmap s₂) = toFinmap (s₁ ∪ s₂)", "start": [ 572, 1 ], "end": [ 574, 24 ], "kind": "commanddeclaration" }, { "full_name": "Finmap.keys_union", "code": "theorem keys_union {s₁ s₂ : Finmap β} : (s₁ ∪ s₂).keys = s₁.keys ∪ s₂.keys", "start": [ 577, 1 ], "end": [ 578, 64 ], "kind": "commanddeclaration" }, { "full_name": "Finmap.lookup_union_left", "code": "@[simp]\ntheorem lookup_union_left {a} {s₁ s₂ : Finmap β} : a ∈ s₁ → lookup a (s₁ ∪ s₂) = lookup a s₁", "start": [ 581, 1 ], "end": [ 583, 57 ], "kind": "commanddeclaration" }, { "full_name": "Finmap.lookup_union_right", "code": "@[simp]\ntheorem lookup_union_right {a} {s₁ s₂ : Finmap β} : a ∉ s₁ → lookup a (s₁ ∪ s₂) = lookup a s₂", "start": [ 586, 1 ], "end": [ 588, 58 ], "kind": "commanddeclaration" }, { "full_name": "Finmap.lookup_union_left_of_not_in", "code": "theorem lookup_union_left_of_not_in {a} {s₁ s₂ : Finmap β} (h : a ∉ s₂) :\n lookup a (s₁ ∪ s₂) = lookup a s₁", "start": [ 591, 1 ], "end": [ 595, 76 ], "kind": "commanddeclaration" }, { "full_name": "Finmap.mem_lookup_union", "code": "theorem mem_lookup_union {a} {b : β a} {s₁ s₂ : Finmap β} :\n b ∈ lookup a (s₁ ∪ s₂) ↔ b ∈ lookup a s₁ ∨ a ∉ s₁ ∧ b ∈ lookup a s₂", "start": [ 599, 1 ], "end": [ 601, 56 ], "kind": "commanddeclaration" }, { "full_name": "Finmap.mem_lookup_union_middle", "code": "theorem mem_lookup_union_middle {a} {b : β a} {s₁ s₂ s₃ : Finmap β} :\n b ∈ lookup a (s₁ ∪ s₃) → a ∉ s₂ → b ∈ lookup a (s₁ ∪ s₂ ∪ s₃)", "start": [ 604, 1 ], "end": [ 606, 68 ], "kind": "commanddeclaration" }, { "full_name": "Finmap.insert_union", "code": "theorem insert_union {a} {b : β a} {s₁ s₂ : Finmap β} : insert a b (s₁ ∪ s₂) = insert a b s₁ ∪ s₂", "start": [ 609, 1 ], "end": [ 610, 64 ], "kind": "commanddeclaration" }, { "full_name": "Finmap.union_assoc", "code": "theorem union_assoc {s₁ s₂ s₃ : Finmap β} : s₁ ∪ s₂ ∪ s₃ = s₁ ∪ (s₂ ∪ s₃)", "start": [ 613, 1 ], "end": [ 615, 69 ], "kind": "commanddeclaration" }, { "full_name": "Finmap.empty_union", "code": "@[simp]\ntheorem empty_union {s₁ : Finmap β} : ∅ ∪ s₁ = s₁", "start": [ 618, 1 ], "end": [ 622, 81 ], "kind": "commanddeclaration" }, { "full_name": "Finmap.union_empty", "code": "@[simp]\ntheorem union_empty {s₁ : Finmap β} : s₁ ∪ ∅ = s₁", "start": [ 625, 1 ], "end": [ 629, 81 ], "kind": "commanddeclaration" }, { "full_name": "Finmap.erase_union_singleton", "code": "theorem erase_union_singleton (a : α) (b : β a) (s : Finmap β) (h : s.lookup a = some b) :\n s.erase a ∪ singleton a b = s", "start": [ 632, 1 ], "end": [ 639, 64 ], "kind": "commanddeclaration" }, { "full_name": "Finmap.Disjoint", "code": "def Disjoint (s₁ s₂ : Finmap β) : Prop :=\n ∀ x ∈ s₁, ¬x ∈ s₂", "start": [ 646, 1 ], "end": [ 648, 20 ], "kind": "commanddeclaration" }, { "full_name": "Finmap.disjoint_empty", "code": "theorem disjoint_empty (x : Finmap β) : Disjoint ∅ x", "start": [ 651, 1 ], "end": [ 652, 8 ], "kind": "commanddeclaration" }, { "full_name": "Finmap.Disjoint.symm", "code": "@[symm]\ntheorem Disjoint.symm (x y : Finmap β) (h : Disjoint x y) : Disjoint y x", "start": [ 655, 1 ], "end": [ 656, 101 ], "kind": "commanddeclaration" }, { "full_name": "Finmap.Disjoint.symm_iff", "code": "theorem Disjoint.symm_iff (x y : Finmap β) : Disjoint x y ↔ Disjoint y x", "start": [ 659, 1 ], "end": [ 660, 41 ], "kind": "commanddeclaration" }, { "full_name": "Finmap.disjoint_union_left", "code": "theorem disjoint_union_left (x y z : Finmap β) :\n Disjoint (x ∪ y) z ↔ Disjoint x z ∧ Disjoint y z", "start": [ 669, 1 ], "end": [ 671, 56 ], "kind": "commanddeclaration" }, { "full_name": "Finmap.disjoint_union_right", "code": "theorem disjoint_union_right (x y z : Finmap β) :\n Disjoint x (y ∪ z) ↔ Disjoint x y ∧ Disjoint x z", "start": [ 674, 1 ], "end": [ 676, 92 ], "kind": "commanddeclaration" }, { "full_name": "Finmap.union_comm_of_disjoint", "code": "theorem union_comm_of_disjoint {s₁ s₂ : Finmap β} : Disjoint s₁ s₂ → s₁ ∪ s₂ = s₂ ∪ s₁", "start": [ 679, 1 ], "end": [ 682, 82 ], "kind": "commanddeclaration" }, { "full_name": "Finmap.union_cancel", "code": "theorem union_cancel {s₁ s₂ s₃ : Finmap β} (h : Disjoint s₁ s₃) (h' : Disjoint s₂ s₃) :\n s₁ ∪ s₃ = s₂ ∪ s₃ ↔ s₁ = s₂", "start": [ 685, 1 ], "end": [ 695, 79 ], "kind": "commanddeclaration" } ]
Mathlib/Condensed/Light/Functors.lean
[ ".lake/packages/lean4/src/lean/Init.lean", "Mathlib/Condensed/Light/Basic.lean", "Mathlib/CategoryTheory/Sites/Coherent/CoherentSheaves.lean" ]
[ { "full_name": "lightProfiniteToLightCondSet", "code": "def lightProfiniteToLightCondSet : LightProfinite.{u} ⥤ LightCondSet.{u} :=\n (coherentTopology.subcanonical LightProfinite).yoneda", "start": [ 34, 1 ], "end": [ 36, 56 ], "kind": "commanddeclaration" }, { "full_name": "LightProfinite.toCondensed", "code": "abbrev LightProfinite.toCondensed (S : LightProfinite.{u}) : LightCondSet.{u} :=\n lightProfiniteToLightCondSet.obj S", "start": [ 38, 1 ], "end": [ 40, 37 ], "kind": "commanddeclaration" }, { "full_name": "lightProfiniteToLightCondSetFullyFaithful", "code": "abbrev lightProfiniteToLightCondSetFullyFaithful :\n lightProfiniteToLightCondSet.FullyFaithful :=\n Sheaf.Subcanonical.yonedaFullyFaithful _", "start": [ 42, 1 ], "end": [ 45, 43 ], "kind": "commanddeclaration" } ]
Mathlib/Control/Bitraversable/Instances.lean
[ "Mathlib/Control/Traversable/Lemmas.lean", ".lake/packages/lean4/src/lean/Init.lean", "Mathlib/Control/Bitraversable/Lemmas.lean" ]
[ { "full_name": "Prod.bitraverse", "code": "def Prod.bitraverse {α α' β β'} (f : α → F α') (f' : β → F β') : α × β → F (α' × β')\n | (x, y) => Prod.mk <$> f x <*> f' y", "start": [ 40, 1 ], "end": [ 42, 39 ], "kind": "commanddeclaration" }, { "full_name": "Sum.bitraverse", "code": "def Sum.bitraverse {α α' β β'} (f : α → F α') (f' : β → F β') : Sum α β → F (Sum α' β')\n | Sum.inl x => Sum.inl <$> f x\n | Sum.inr x => Sum.inr <$> f' x", "start": [ 53, 1 ], "end": [ 56, 34 ], "kind": "commanddeclaration" }, { "full_name": "Const.bitraverse", "code": "@[nolint unusedArguments]\ndef Const.bitraverse {F : Type u → Type u} [Applicative F] {α α' β β'} (f : α → F α')\n (f' : β → F β') : Const α β → F (Const α' β') :=\n f", "start": [ 67, 1 ], "end": [ 71, 4 ], "kind": "commanddeclaration" }, { "full_name": "Bitraversable.const", "code": "instance Bitraversable.const : Bitraversable Const where bitraverse := @Const.bitraverse", "start": [ 74, 1 ], "end": [ 74, 89 ], "kind": "commanddeclaration" }, { "full_name": "LawfulBitraversable.const", "code": "instance LawfulBitraversable.const : LawfulBitraversable Const := by\n constructor <;> intros <;> simp [bitraverse, Const.bitraverse, functor_norm] <;> rfl", "start": [ 77, 1 ], "end": [ 78, 87 ], "kind": "commanddeclaration" }, { "full_name": "flip.bitraverse", "code": "nonrec def flip.bitraverse {α α' β β'} (f : α → F α') (f' : β → F β') :\n flip t α β → F (flip t α' β') :=\n (bitraverse f' f : t β α → F (t β' α'))", "start": [ 81, 1 ], "end": [ 84, 42 ], "kind": "commanddeclaration" }, { "full_name": "Bitraversable.flip", "code": "instance Bitraversable.flip : Bitraversable (flip t) where bitraverse := @flip.bitraverse t _", "start": [ 87, 1 ], "end": [ 87, 94 ], "kind": "commanddeclaration" }, { "full_name": "LawfulBitraversable.flip", "code": "instance LawfulBitraversable.flip [LawfulBitraversable t] : LawfulBitraversable (flip t) := by\n constructor <;> intros <;> casesm LawfulBitraversable t <;> apply_assumption only [*]", "start": [ 92, 1 ], "end": [ 93, 88 ], "kind": "commanddeclaration" }, { "full_name": "Bitraversable.traversable", "code": "instance (priority := 10) Bitraversable.traversable {α} : Traversable (t α) where\n traverse := @tsnd t _ _", "start": [ 98, 1 ], "end": [ 99, 26 ], "kind": "commanddeclaration" }, { "full_name": "Bitraversable.isLawfulTraversable", "code": "instance (priority := 10) Bitraversable.isLawfulTraversable [LawfulBitraversable t] {α} :\n LawfulTraversable (t α) := by\n constructor <;> intros <;>\n simp [traverse, comp_tsnd, functor_norm]\n · simp only [tsnd_eq_snd_id, Id.pure_eq]; rfl\n · simp [tsnd, binaturality, Function.comp, functor_norm]", "start": [ 102, 1 ], "end": [ 107, 59 ], "kind": "commanddeclaration" }, { "full_name": "Bicompl.bitraverse", "code": "nonrec def Bicompl.bitraverse {m} [Applicative m] {α β α' β'} (f : α → m β) (f' : α' → m β') :\n bicompl t F G α α' → m (bicompl t F G β β') :=\n (bitraverse (traverse f) (traverse f') : t (F α) (G α') → m _)", "start": [ 120, 1 ], "end": [ 123, 65 ], "kind": "commanddeclaration" }, { "full_name": "Bicompr.bitraverse", "code": "nonrec def Bicompr.bitraverse {m} [Applicative m] {α β α' β'} (f : α → m β) (f' : α' → m β') :\n bicompr F t α α' → m (bicompr F t β β') :=\n (traverse (bitraverse f f') : F (t α α') → m _)", "start": [ 143, 1 ], "end": [ 146, 50 ], "kind": "commanddeclaration" } ]
Mathlib/Analysis/NormedSpace/Int.lean
[ ".lake/packages/lean4/src/lean/Init.lean", "Mathlib/Analysis/Normed/Field/Basic.lean" ]
[ { "full_name": "Int.nnnorm_coe_units", "code": "theorem nnnorm_coe_units (e : ℤˣ) : ‖(e : ℤ)‖₊ = 1", "start": [ 24, 1 ], "end": [ 26, 73 ], "kind": "commanddeclaration" }, { "full_name": "Int.norm_coe_units", "code": "theorem norm_coe_units (e : ℤˣ) : ‖(e : ℤ)‖ = 1", "start": [ 29, 1 ], "end": [ 30, 54 ], "kind": "commanddeclaration" }, { "full_name": "Int.nnnorm_natCast", "code": "@[simp]\ntheorem nnnorm_natCast (n : ℕ) : ‖(n : ℤ)‖₊ = n", "start": [ 33, 1 ], "end": [ 35, 24 ], "kind": "commanddeclaration" }, { "full_name": "Int.toNat_add_toNat_neg_eq_nnnorm", "code": "@[simp]\ntheorem toNat_add_toNat_neg_eq_nnnorm (n : ℤ) : ↑n.toNat + ↑(-n).toNat = ‖n‖₊", "start": [ 40, 1 ], "end": [ 42, 76 ], "kind": "commanddeclaration" }, { "full_name": "Int.toNat_add_toNat_neg_eq_norm", "code": "@[simp]\ntheorem toNat_add_toNat_neg_eq_norm (n : ℤ) : ↑n.toNat + ↑(-n).toNat = ‖n‖", "start": [ 45, 1 ], "end": [ 48, 61 ], "kind": "commanddeclaration" } ]
Mathlib/CategoryTheory/Monoidal/Cartesian/Comon_.lean
[ "Mathlib/CategoryTheory/Monoidal/Comon_.lean", ".lake/packages/lean4/src/lean/Init.lean", "Mathlib/CategoryTheory/Monoidal/OfHasFiniteProducts.lean" ]
[ { "full_name": "cartesianComon_", "code": "def cartesianComon_ : C ⥤ Comon_ C where\n obj := fun X =>\n { X := X\n comul := diag X\n counit := terminal.from X }\n map := fun f => { hom := f }", "start": [ 28, 1 ], "end": [ 37, 31 ], "kind": "commanddeclaration" }, { "full_name": "counit_eq_from", "code": "@[simp] theorem counit_eq_from (A : Comon_ C) : A.counit = terminal.from A.X", "start": [ 41, 1 ], "end": [ 41, 87 ], "kind": "commanddeclaration" }, { "full_name": "comul_eq_diag", "code": "@[simp] theorem comul_eq_diag (A : Comon_ C) : A.comul = diag A.X", "start": [ 43, 1 ], "end": [ 46, 43 ], "kind": "commanddeclaration" }, { "full_name": "iso_cartesianComon_", "code": "@[simps] def iso_cartesianComon_ (A : Comon_ C) : A ≅ (cartesianComon_ C).obj A.X :=\n { hom := { hom := 𝟙 _ }\n inv := { hom := 𝟙 _ } }", "start": [ 48, 1 ], "end": [ 54, 28 ], "kind": "commanddeclaration" }, { "full_name": "comonEquiv", "code": "@[simps] def comonEquiv : Comon_ C ≌ C where\n functor := Comon_.forget C\n inverse := cartesianComon_ C\n unitIso := NatIso.ofComponents (fun A => iso_cartesianComon_ A)\n counitIso := NatIso.ofComponents (fun X => Iso.refl _)", "start": [ 56, 1 ], "end": [ 64, 57 ], "kind": "commanddeclaration" } ]
Mathlib/Topology/Order/Category/FrameAdjunction.lean
[ "Mathlib/Topology/Category/Locale.lean", ".lake/packages/lean4/src/lean/Init.lean" ]
[ { "full_name": "Locale.PT", "code": "abbrev PT := FrameHom L Prop", "start": [ 49, 1 ], "end": [ 51, 29 ], "kind": "commanddeclaration" }, { "full_name": "Locale.openOfElementHom", "code": "@[simps]\ndef openOfElementHom : FrameHom L (Set (PT L)) where\n toFun u := {x | x u}\n map_inf' a b := by simp [Set.setOf_and]\n map_top' := by simp\n map_sSup' S := by ext; simp [Prop.exists_iff]", "start": [ 53, 1 ], "end": [ 60, 48 ], "kind": "commanddeclaration" }, { "full_name": "Locale.PT.instTopologicalSpace", "code": "instance instTopologicalSpace : TopologicalSpace (PT L) where\n IsOpen s := ∃ u, {x | x u} = s\n isOpen_univ := ⟨⊤, by simp⟩\n isOpen_inter := by rintro s t ⟨u, rfl⟩ ⟨v, rfl⟩; use u ⊓ v; simp_rw [map_inf]; rfl\n isOpen_sUnion S hS := by\n choose f hf using hS\n use ⨆ t, ⨆ ht, f t ht\n simp_rw [map_iSup, iSup_Prop_eq, setOf_exists, hf, sUnion_eq_biUnion]", "start": [ 64, 1 ], "end": [ 72, 74 ], "kind": "commanddeclaration" }, { "full_name": "Locale.PT.isOpen_iff", "code": "lemma isOpen_iff (U : Set (PT L)) : IsOpen U ↔ ∃ u : L, {x | x u} = U := Iff.rfl", "start": [ 74, 1 ], "end": [ 75, 81 ], "kind": "lemma" }, { "full_name": "Locale.pt", "code": "def pt : Locale ⥤ TopCat where\n obj L := ⟨PT L.unop, inferInstance⟩\n map f := ⟨fun p ↦ p.comp f.unop, continuous_def.2 <| by rintro s ⟨u, rfl⟩; use f.unop u; rfl⟩", "start": [ 82, 1 ], "end": [ 88, 96 ], "kind": "commanddeclaration" }, { "full_name": "Locale.localePointOfSpacePoint", "code": "@[simps]\ndef localePointOfSpacePoint (x : X) : PT (Opens X) where\n toFun := (x ∈ ·)\n map_inf' a b := rfl\n map_top' := rfl\n map_sSup' S := by simp [Prop.exists_iff]", "start": [ 95, 1 ], "end": [ 102, 43 ], "kind": "commanddeclaration" }, { "full_name": "Locale.counitAppCont", "code": "def counitAppCont : FrameHom L (Opens <| PT L) where\n toFun u := ⟨openOfElementHom L u, u, rfl⟩\n map_inf' a b := by simp\n map_top' := by simp\n map_sSup' S := by ext; simp", "start": [ 104, 1 ], "end": [ 109, 30 ], "kind": "commanddeclaration" }, { "full_name": "Locale.adjunctionTopToLocalePT", "code": "def adjunctionTopToLocalePT : topToLocale ⊣ pt :=\n Adjunction.mkOfUnitCounit\n { unit := { app := fun X ↦ ⟨localePointOfSpacePoint X, continuous_def.2 <|\n by rintro _ ⟨u, rfl⟩; simpa using u.2⟩ }\n counit := { app := fun L ↦ ⟨counitAppCont L⟩ } }", "start": [ 111, 1 ], "end": [ 116, 55 ], "kind": "commanddeclaration" } ]
Mathlib/Analysis/LocallyConvex/ContinuousOfBounded.lean
[ "Mathlib/Analysis/LocallyConvex/Bounded.lean", ".lake/packages/lean4/src/lean/Init.lean", "Mathlib/Analysis/RCLike/Basic.lean" ]
[ { "full_name": "LinearMap.clmOfExistsBoundedImage", "code": "def LinearMap.clmOfExistsBoundedImage (f : E →ₗ[𝕜] F)\n (h : ∃ V ∈ 𝓝 (0 : E), Bornology.IsVonNBounded 𝕜 (f '' V)) : E →L[𝕜] F :=\n ⟨f, by\n refine continuous_of_continuousAt_zero f ?_\n rw [continuousAt_def, f.map_zero]\n intro U hU\n rcases h with ⟨V, hV, h⟩\n rcases (h hU).exists_pos with ⟨r, hr, h⟩\n rcases NormedField.exists_lt_norm 𝕜 r with ⟨x, hx⟩\n specialize h x hx.le\n have x_ne := norm_pos_iff.mp (hr.trans hx)\n have : x⁻¹ • V ⊆ f ⁻¹' U :=\n calc\n x⁻¹ • V ⊆ x⁻¹ • f ⁻¹' (f '' V) := Set.smul_set_mono (Set.subset_preimage_image (⇑f) V)\n _ ⊆ x⁻¹ • f ⁻¹' (x • U) := Set.smul_set_mono (Set.preimage_mono h)\n _ = f ⁻¹' (x⁻¹ • x • U) := by\n ext\n simp only [Set.mem_inv_smul_set_iff₀ x_ne, Set.mem_preimage, LinearMap.map_smul]\n _ ⊆ f ⁻¹' U := by rw [inv_smul_smul₀ x_ne _]\n refine mem_of_superset ?_ this\n convert set_smul_mem_nhds_smul hV (inv_ne_zero x_ne)\n exact (smul_zero _).symm⟩", "start": [ 41, 1 ], "end": [ 69, 30 ], "kind": "commanddeclaration" }, { "full_name": "LinearMap.clmOfExistsBoundedImage_coe", "code": "theorem LinearMap.clmOfExistsBoundedImage_coe {f : E →ₗ[𝕜] F}\n {h : ∃ V ∈ 𝓝 (0 : E), Bornology.IsVonNBounded 𝕜 (f '' V)} :\n (f.clmOfExistsBoundedImage h : E →ₗ[𝕜] F) = f", "start": [ 72, 1 ], "end": [ 75, 6 ], "kind": "commanddeclaration" }, { "full_name": "LinearMap.clmOfExistsBoundedImage_apply", "code": "@[simp]\ntheorem LinearMap.clmOfExistsBoundedImage_apply {f : E →ₗ[𝕜] F}\n {h : ∃ V ∈ 𝓝 (0 : E), Bornology.IsVonNBounded 𝕜 (f '' V)} {x : E} :\n f.clmOfExistsBoundedImage h x = f x", "start": [ 78, 1 ], "end": [ 82, 6 ], "kind": "commanddeclaration" }, { "full_name": "LinearMap.continuousAt_zero_of_locally_bounded", "code": "theorem LinearMap.continuousAt_zero_of_locally_bounded (f : E →ₛₗ[σ] F)\n (hf : ∀ s, IsVonNBounded 𝕜 s → IsVonNBounded 𝕜' (f '' s)) : ContinuousAt f 0", "start": [ 96, 1 ], "end": [ 166, 22 ], "kind": "commanddeclaration" }, { "full_name": "LinearMap.continuous_of_locally_bounded", "code": "theorem LinearMap.continuous_of_locally_bounded [UniformAddGroup F] (f : E →ₛₗ[σ] F)\n (hf : ∀ s, IsVonNBounded 𝕜 s → IsVonNBounded 𝕜' (f '' s)) : Continuous f", "start": [ 169, 1 ], "end": [ 172, 101 ], "kind": "commanddeclaration" } ]
Mathlib/Init/Data/Option/Init/Lemmas.lean
[ "Mathlib/Mathport/Rename.lean", ".lake/packages/lean4/src/lean/Init.lean" ]
[]
Mathlib/Data/Real/Sign.lean
[ ".lake/packages/lean4/src/lean/Init.lean", "Mathlib/Data/Real/Basic.lean", "Mathlib/Tactic/NormNum/Inv.lean" ]
[ { "full_name": "Real.sign", "code": "noncomputable def sign (r : ℝ) : ℝ :=\n if r < 0 then -1 else if 0 < r then 1 else 0", "start": [ 31, 1 ], "end": [ 34, 47 ], "kind": "commanddeclaration" }, { "full_name": "Real.sign_of_neg", "code": "theorem sign_of_neg {r : ℝ} (hr : r < 0) : sign r = -1", "start": [ 37, 1 ], "end": [ 37, 82 ], "kind": "commanddeclaration" }, { "full_name": "Real.sign_of_pos", "code": "theorem sign_of_pos {r : ℝ} (hr : 0 < r) : sign r = 1", "start": [ 40, 1 ], "end": [ 40, 99 ], "kind": "commanddeclaration" }, { "full_name": "Real.sign_zero", "code": "@[simp]\ntheorem sign_zero : sign 0 = 0", "start": [ 43, 1 ], "end": [ 44, 91 ], "kind": "commanddeclaration" }, { "full_name": "Real.sign_one", "code": "@[simp]\ntheorem sign_one : sign 1 = 1", "start": [ 47, 1 ], "end": [ 49, 29 ], "kind": "commanddeclaration" }, { "full_name": "Real.sign_apply_eq", "code": "theorem sign_apply_eq (r : ℝ) : sign r = -1 ∨ sign r = 0 ∨ sign r = 1", "start": [ 52, 1 ], "end": [ 56, 45 ], "kind": "commanddeclaration" }, { "full_name": "Real.sign_apply_eq_of_ne_zero", "code": "theorem sign_apply_eq_of_ne_zero (r : ℝ) (h : r ≠ 0) : sign r = -1 ∨ sign r = 1", "start": [ 59, 1 ], "end": [ 61, 41 ], "kind": "commanddeclaration" }, { "full_name": "Real.sign_eq_zero_iff", "code": "@[simp]\ntheorem sign_eq_zero_iff {r : ℝ} : sign r = 0 ↔ r = 0", "start": [ 64, 1 ], "end": [ 72, 31 ], "kind": "commanddeclaration" }, { "full_name": "Real.sign_intCast", "code": "theorem sign_intCast (z : ℤ) : sign (z : ℝ) = ↑(Int.sign z)", "start": [ 75, 1 ], "end": [ 80, 84 ], "kind": "commanddeclaration" }, { "full_name": "Real.sign_neg", "code": "theorem sign_neg {r : ℝ} : sign (-r) = -sign r", "start": [ 86, 1 ], "end": [ 90, 58 ], "kind": "commanddeclaration" }, { "full_name": "Real.sign_mul_nonneg", "code": "theorem sign_mul_nonneg (r : ℝ) : 0 ≤ sign r * r", "start": [ 93, 1 ], "end": [ 99, 16 ], "kind": "commanddeclaration" }, { "full_name": "Real.sign_mul_pos_of_ne_zero", "code": "theorem sign_mul_pos_of_ne_zero (r : ℝ) (hr : r ≠ 0) : 0 < sign r * r", "start": [ 102, 1 ], "end": [ 105, 32 ], "kind": "commanddeclaration" }, { "full_name": "Real.inv_sign", "code": "@[simp]\ntheorem inv_sign (r : ℝ) : (sign r)⁻¹ = sign r", "start": [ 108, 1 ], "end": [ 116, 18 ], "kind": "commanddeclaration" }, { "full_name": "Real.sign_inv", "code": "@[simp]\ntheorem sign_inv (r : ℝ) : sign r⁻¹ = sign r", "start": [ 119, 1 ], "end": [ 124, 54 ], "kind": "commanddeclaration" } ]
Mathlib/Data/Fin/Tuple/BubbleSortInduction.lean
[ ".lake/packages/lean4/src/lean/Init.lean", "Mathlib/Data/Fin/Tuple/Sort.lean", "Mathlib/Order/WellFounded.lean" ]
[ { "full_name": "Tuple.bubble_sort_induction'", "code": "theorem bubble_sort_induction' {n : ℕ} {α : Type*} [LinearOrder α] {f : Fin n → α}\n {P : (Fin n → α) → Prop} (hf : P f)\n (h : ∀ (σ : Equiv.Perm (Fin n)) (i j : Fin n),\n i < j → (f ∘ σ) j < (f ∘ σ) i → P (f ∘ σ) → P (f ∘ σ ∘ Equiv.swap i j)) :\n P (f ∘ sort f)", "start": [ 31, 1 ], "end": [ 44, 78 ], "kind": "commanddeclaration" }, { "full_name": "Tuple.bubble_sort_induction", "code": "theorem bubble_sort_induction {n : ℕ} {α : Type*} [LinearOrder α] {f : Fin n → α}\n {P : (Fin n → α) → Prop} (hf : P f)\n (h : ∀ (g : Fin n → α) (i j : Fin n), i < j → g j < g i → P g → P (g ∘ Equiv.swap i j)) :\n P (f ∘ sort f)", "start": [ 47, 1 ], "end": [ 53, 41 ], "kind": "commanddeclaration" } ]
Mathlib/NumberTheory/NumberField/Units/Regulator.lean
[ ".lake/packages/lean4/src/lean/Init.lean", "Mathlib/NumberTheory/NumberField/Units/DirichletTheorem.lean", "Mathlib/LinearAlgebra/Matrix/Determinant/Misc.lean", "Mathlib/Algebra/Module/Zlattice/Covolume.lean" ]
[ { "full_name": "NumberField.Units.regulator", "code": "def regulator : ℝ := Zlattice.covolume (unitLattice K)", "start": [ 40, 1 ], "end": [ 41, 55 ], "kind": "commanddeclaration" }, { "full_name": "NumberField.Units.regulator_ne_zero", "code": "theorem regulator_ne_zero : regulator K ≠ 0", "start": [ 43, 1 ], "end": [ 43, 96 ], "kind": "commanddeclaration" }, { "full_name": "NumberField.Units.regulator_pos", "code": "theorem regulator_pos : 0 < regulator K", "start": [ 45, 1 ], "end": [ 45, 88 ], "kind": "commanddeclaration" }, { "full_name": "NumberField.Units.regulator_eq_det'", "code": "theorem regulator_eq_det' (e : {w : InfinitePlace K // w ≠ w₀} ≃ Fin (rank K)) :\n regulator K = |(Matrix.of fun i ↦ (logEmbedding K) (fundSystem K (e i))).det|", "start": [ 59, 1 ], "end": [ 64, 6 ], "kind": "commanddeclaration" }, { "full_name": "NumberField.Units.abs_det_eq_abs_det", "code": "theorem abs_det_eq_abs_det (u : Fin (rank K) → (𝓞 K)ˣ)\n {w₁ w₂ : InfinitePlace K} (e₁ : {w // w ≠ w₁} ≃ Fin (rank K))\n (e₂ : {w // w ≠ w₂} ≃ Fin (rank K)) :\n |(Matrix.of fun i w : {w // w ≠ w₁} ↦ (mult w.val : ℝ) * (w.val (u (e₁ i) : K)).log).det| =\n |(Matrix.of fun i w : {w // w ≠ w₂} ↦ (mult w.val : ℝ) * (w.val (u (e₂ i) : K)).log).det|", "start": [ 66, 1 ], "end": [ 99, 73 ], "kind": "commanddeclaration" }, { "full_name": "NumberField.Units.regulator_eq_det", "code": "theorem regulator_eq_det (w' : InfinitePlace K) (e : {w // w ≠ w'} ≃ Fin (rank K)) :\n regulator K =\n |(Matrix.of fun i w : {w // w ≠ w'} ↦ (mult w.val : ℝ) *\n Real.log (w.val (fundSystem K (e i) : K))).det|", "start": [ 101, 1 ], "end": [ 110, 59 ], "kind": "commanddeclaration" } ]
Mathlib/GroupTheory/GroupAction/DomAct/ActionHom.lean
[ ".lake/packages/lean4/src/lean/Init.lean", "Mathlib/GroupTheory/GroupAction/DomAct/Basic.lean", "Mathlib/GroupTheory/GroupAction/Hom.lean" ]
[ { "full_name": "DomMulAct.smul_mulActionHom_apply", "code": "theorem smul_mulActionHom_apply (c : Mᵈᵐᵃ) (f : α →[N] β) (a : α) :\n (c • f) a = f (mk.symm c • a)", "start": [ 37, 1 ], "end": [ 39, 6 ], "kind": "commanddeclaration" }, { "full_name": "DomMulAct.mk_smul_mulActionHom_apply", "code": "@[simp]\ntheorem mk_smul_mulActionHom_apply (c : M) (f : α →[N] β) (a : α) : (mk c • f) a = f (c • a)", "start": [ 41, 1 ], "end": [ 42, 100 ], "kind": "commanddeclaration" }, { "full_name": "DomMulAct.smul_mulDistribActionHom_apply", "code": "theorem smul_mulDistribActionHom_apply (c : Mᵈᵐᵃ) (f : A →+[N] B) (a : A) :\n (c • f) a = f (mk.symm c • a)", "start": [ 66, 1 ], "end": [ 68, 6 ], "kind": "commanddeclaration" }, { "full_name": "DomMulAct.mk_smul_mulDistribActionHom_apply", "code": "@[simp]\ntheorem mk_smul_mulDistribActionHom_apply (c : M) (f : A →+[N] B) (a : A) :\n (mk c • f) a = f (c • a)", "start": [ 70, 1 ], "end": [ 72, 36 ], "kind": "commanddeclaration" } ]
Mathlib/Combinatorics/Additive/PluenneckeRuzsa.lean
[ "Mathlib/Combinatorics/Enumerative/DoubleCounting.lean", "Mathlib/Tactic/GCongr.lean", ".lake/packages/lean4/src/lean/Init.lean", "Mathlib/Data/Finset/Pointwise.lean", "Mathlib/Algebra/Order/Ring/Basic.lean", "Mathlib/Algebra/Order/Group/Basic.lean" ]
[ { "full_name": "Finset.card_div_mul_le_card_div_mul_card_div", "code": "@[to_additive card_sub_mul_le_card_sub_mul_card_sub\n\"**Ruzsa's triangle inequality**. Subtraction version.\"]\ntheorem card_div_mul_le_card_div_mul_card_div (A B C : Finset α) :\n (A / C).card * B.card ≤ (A / B).card * (B / C).card", "start": [ 42, 1 ], "end": [ 56, 42 ], "kind": "commanddeclaration" }, { "full_name": "Finset.card_div_mul_le_card_mul_mul_card_mul", "code": "@[to_additive card_sub_mul_le_card_add_mul_card_add\n\"**Ruzsa's triangle inequality**. Sub-add-add version.\"]\ntheorem card_div_mul_le_card_mul_mul_card_mul (A B C : Finset α) :\n (A / C).card * B.card ≤ (A * B).card * (B * C).card", "start": [ 60, 1 ], "end": [ 66, 52 ], "kind": "commanddeclaration" }, { "full_name": "Finset.card_mul_mul_le_card_div_mul_card_mul", "code": "@[to_additive card_add_mul_le_card_sub_mul_card_add\n\"**Ruzsa's triangle inequality**. Add-sub-sub version.\"]\ntheorem card_mul_mul_le_card_div_mul_card_mul (A B C : Finset α) :\n (A * C).card * B.card ≤ (A / B).card * (B * C).card", "start": [ 70, 1 ], "end": [ 76, 52 ], "kind": "commanddeclaration" }, { "full_name": "Finset.card_mul_mul_le_card_mul_mul_card_div", "code": "@[to_additive card_add_mul_le_card_add_mul_card_sub\n\"**Ruzsa's triangle inequality**. Add-add-sub version.\"]\ntheorem card_mul_mul_le_card_mul_mul_card_div (A B C : Finset α) :\n (A * C).card * B.card ≤ (A * B).card * (B / C).card", "start": [ 80, 1 ], "end": [ 86, 52 ], "kind": "commanddeclaration" }, { "full_name": "Finset.mul_pluennecke_petridis", "code": "@[to_additive]\ntheorem mul_pluennecke_petridis (C : Finset α)\n (hA : ∀ A' ⊆ A, (A * B).card * A'.card ≤ (A' * B).card * A.card) :\n (A * B * C).card * A.card ≤ (A * B).card * (A * C).card", "start": [ 90, 1 ], "end": [ 117, 55 ], "kind": "commanddeclaration" }, { "full_name": "Finset.mul_aux", "code": "@[to_additive]\nprivate theorem mul_aux (hA : A.Nonempty) (hAB : A ⊆ B)\n (h : ∀ A' ∈ B.powerset.erase ∅, ((A * C).card : ℚ≥0) / ↑A.card ≤ (A' * C).card / ↑A'.card) :\n ∀ A' ⊆ A, (A * C).card * A'.card ≤ (A' * C).card * A.card", "start": [ 125, 1 ], "end": [ 136, 87 ], "kind": "commanddeclaration" }, { "full_name": "Finset.card_mul_mul_card_le_card_mul_mul_card_mul", "code": "@[to_additive card_add_mul_card_le_card_add_mul_card_add\n\"**Ruzsa's triangle inequality**. Addition version.\"]\ntheorem card_mul_mul_card_le_card_mul_mul_card_mul (A B C : Finset α) :\n (A * C).card * B.card ≤ (A * B).card * (B * C).card", "start": [ 138, 1 ], "end": [ 159, 67 ], "kind": "commanddeclaration" }, { "full_name": "Finset.card_mul_mul_le_card_div_mul_card_div", "code": "@[to_additive card_add_mul_le_card_sub_mul_card_sub\n\"**Ruzsa's triangle inequality**. Add-sub-sub version.\"]\ntheorem card_mul_mul_le_card_div_mul_card_div (A B C : Finset α) :\n (A * C).card * B.card ≤ (A / B).card * (B / C).card", "start": [ 163, 1 ], "end": [ 169, 57 ], "kind": "commanddeclaration" }, { "full_name": "Finset.card_div_mul_le_card_mul_mul_card_div", "code": "@[to_additive card_sub_mul_le_card_add_mul_card_sub\n\"**Ruzsa's triangle inequality**. Sub-add-sub version.\"]\ntheorem card_div_mul_le_card_mul_mul_card_div (A B C : Finset α) :\n (A / C).card * B.card ≤ (A * B).card * (B / C).card", "start": [ 172, 1 ], "end": [ 178, 57 ], "kind": "commanddeclaration" }, { "full_name": "Finset.card_div_mul_le_card_div_mul_card_mul", "code": "@[to_additive card_sub_mul_le_card_sub_mul_card_add\n\"**Ruzsa's triangle inequality**. Sub-sub-add version.\"]\ntheorem card_div_mul_le_card_div_mul_card_mul (A B C : Finset α) :\n (A / C).card * B.card ≤ (A / B).card * (B * C).card", "start": [ 181, 1 ], "end": [ 187, 52 ], "kind": "commanddeclaration" }, { "full_name": "Finset.card_add_nsmul_le", "code": "theorem card_add_nsmul_le {α : Type*} [AddCommGroup α] [DecidableEq α] {A B : Finset α}\n (hAB : ∀ A' ⊆ A, (A + B).card * A'.card ≤ (A' + B).card * A.card) (n : ℕ) :\n (A + n • B).card ≤ ((A + B).card / A.card : ℚ≥0) ^ n * A.card", "start": [ 190, 1 ], "end": [ 203, 9 ], "kind": "commanddeclaration" }, { "full_name": "Finset.card_mul_pow_le", "code": "@[to_additive existing]\ntheorem card_mul_pow_le (hAB : ∀ A' ⊆ A, (A * B).card * A'.card ≤ (A' * B).card * A.card)\n (n : ℕ) : (A * B ^ n).card ≤ ((A * B).card / A.card : ℚ≥0) ^ n * A.card", "start": [ 206, 1 ], "end": [ 219, 9 ], "kind": "commanddeclaration" }, { "full_name": "Finset.card_pow_div_pow_le", "code": "@[to_additive \"The **Plünnecke-Ruzsa inequality**. Addition version. Note that this is genuinely\nharder than the subtraction version because we cannot use a double counting argument.\"]\ntheorem card_pow_div_pow_le (hA : A.Nonempty) (B : Finset α) (m n : ℕ) :\n ((B ^ m / B ^ n).card) ≤ ((A * B).card / A.card : ℚ≥0) ^ (m + n) * A.card", "start": [ 222, 1 ], "end": [ 242, 28 ], "kind": "commanddeclaration" }, { "full_name": "Finset.card_pow_div_pow_le'", "code": "@[to_additive \"The **Plünnecke-Ruzsa inequality**. Subtraction version.\"]\ntheorem card_pow_div_pow_le' (hA : A.Nonempty) (B : Finset α) (m n : ℕ) :\n (B ^ m / B ^ n).card ≤ ((A / B).card / A.card : ℚ≥0) ^ (m + n) * A.card", "start": [ 246, 1 ], "end": [ 251, 37 ], "kind": "commanddeclaration" }, { "full_name": "Finset.card_pow_le", "code": "@[to_additive \"Special case of the **Plünnecke-Ruzsa inequality**. Addition version.\"]\ntheorem card_pow_le (hA : A.Nonempty) (B : Finset α) (n : ℕ) :\n (B ^ n).card ≤ ((A * B).card / A.card : ℚ≥0) ^ n * A.card", "start": [ 255, 1 ], "end": [ 259, 75 ], "kind": "commanddeclaration" }, { "full_name": "Finset.card_pow_le'", "code": "@[to_additive \"Special case of the **Plünnecke-Ruzsa inequality**. Subtraction version.\"]\ntheorem card_pow_le' (hA : A.Nonempty) (B : Finset α) (n : ℕ) :\n (B ^ n).card ≤ ((A / B).card / A.card : ℚ≥0) ^ n * A.card", "start": [ 263, 1 ], "end": [ 267, 76 ], "kind": "commanddeclaration" } ]
Mathlib/Algebra/Category/Grp/Adjunctions.lean
[ "Mathlib/GroupTheory/FreeAbelianGroup.lean", ".lake/packages/lean4/src/lean/Init.lean", "Mathlib/Algebra/Category/Grp/Basic.lean" ]
[ { "full_name": "AddCommGrp.free", "code": "def free : Type u ⥤ AddCommGrp where\n obj α := of (FreeAbelianGroup α)\n map := FreeAbelianGroup.map\n map_id _ := AddMonoidHom.ext FreeAbelianGroup.map_id_apply\n map_comp _ _ := AddMonoidHom.ext FreeAbelianGroup.map_comp_apply", "start": [ 48, 1 ], "end": [ 55, 67 ], "kind": "commanddeclaration" }, { "full_name": "AddCommGrp.free_obj_coe", "code": "@[simp]\ntheorem free_obj_coe {α : Type u} : (free.obj α : Type u) = FreeAbelianGroup α", "start": [ 58, 1 ], "end": [ 60, 6 ], "kind": "commanddeclaration" }, { "full_name": "AddCommGrp.free_map_coe", "code": "theorem free_map_coe {α β : Type u} {f : α → β} (x : FreeAbelianGroup α) :\n (free.map f) x = f <$> x", "start": [ 66, 1 ], "end": [ 68, 6 ], "kind": "commanddeclaration" }, { "full_name": "AddCommGrp.adj", "code": "def adj : free ⊣ forget AddCommGrp.{u} :=\n Adjunction.mkOfHomEquiv\n { homEquiv := fun X G => FreeAbelianGroup.lift.symm\n homEquiv_naturality_left_symm := by\n intros\n ext\n simp only [Equiv.symm_symm]\n apply FreeAbelianGroup.lift_comp }", "start": [ 71, 1 ], "end": [ 81, 43 ], "kind": "commanddeclaration" }, { "full_name": "Grp.free", "code": "def free : Type u ⥤ Grp where\n obj α := of (FreeGroup α)\n map := FreeGroup.map\n map_id := by\n intros; ext1; erw [← FreeGroup.map.unique] <;> intros <;> rfl\n map_comp := by\n intros; ext1; erw [← FreeGroup.map.unique] <;> intros <;> rfl", "start": [ 100, 1 ], "end": [ 110, 66 ], "kind": "commanddeclaration" }, { "full_name": "Grp.adj", "code": "def adj : free ⊣ forget Grp.{u} :=\n Adjunction.mkOfHomEquiv\n { homEquiv := fun X G => FreeGroup.lift.symm\n homEquiv_naturality_left_symm := by\n intros\n ext1\n simp only [Equiv.symm_symm]\n apply Eq.symm\n apply FreeGroup.lift.unique\n intros\n apply FreeGroup.lift.of }", "start": [ 113, 1 ], "end": [ 126, 34 ], "kind": "commanddeclaration" }, { "full_name": "Grp.abelianize", "code": "def abelianize : Grp.{u} ⥤ CommGrp.{u} where\n obj G := CommGrp.of (Abelianization G)\n map f := Abelianization.lift (Abelianization.of.comp f)\n map_id := by\n intros; simp only [coe_id]\n apply (Equiv.apply_eq_iff_eq_symm_apply Abelianization.lift).mpr; rfl\n map_comp := by\n intros; simp only [coe_comp]\n apply (Equiv.apply_eq_iff_eq_symm_apply Abelianization.lift).mpr; rfl", "start": [ 134, 1 ], "end": [ 144, 74 ], "kind": "commanddeclaration" }, { "full_name": "Grp.abelianizeAdj", "code": "def abelianizeAdj : abelianize ⊣ forget₂ CommGrp.{u} Grp.{u} :=\n Adjunction.mkOfHomEquiv\n { homEquiv := fun G A => Abelianization.lift.symm\n homEquiv_naturality_left_symm := by\n intros\n ext1\n simp only [Equiv.symm_symm]\n apply Eq.symm\n apply Abelianization.lift.unique\n intros\n apply Abelianization.lift.of }", "start": [ 147, 1 ], "end": [ 159, 39 ], "kind": "commanddeclaration" }, { "full_name": "MonCat.units", "code": "@[simps]\ndef MonCat.units : MonCat.{u} ⥤ Grp.{u} where\n obj R := Grp.of Rˣ\n map f := Grp.ofHom <| Units.map f\n map_id _ := MonoidHom.ext fun _ => Units.ext rfl\n map_comp _ _ := MonoidHom.ext fun _ => Units.ext rfl", "start": [ 166, 1 ], "end": [ 172, 55 ], "kind": "commanddeclaration" }, { "full_name": "Grp.forget₂MonAdj", "code": "def Grp.forget₂MonAdj : forget₂ Grp MonCat ⊣ MonCat.units.{u} where\n homEquiv X Y :=\n { toFun := fun f => MonoidHom.toHomUnits f\n invFun := fun f => (Units.coeHom Y).comp f\n left_inv := fun f => MonoidHom.ext fun _ => rfl\n right_inv := fun f => MonoidHom.ext fun _ => Units.ext rfl }\n unit :=\n { app := fun X => { (@toUnits X _).toMonoidHom with }\n naturality := fun X Y f => MonoidHom.ext fun x => Units.ext rfl }\n counit :=\n { app := fun X => Units.coeHom X\n naturality := by intros; exact MonoidHom.ext fun x => rfl }\n homEquiv_unit := MonoidHom.ext fun _ => Units.ext rfl\n homEquiv_counit := MonoidHom.ext fun _ => rfl", "start": [ 175, 1 ], "end": [ 189, 48 ], "kind": "commanddeclaration" }, { "full_name": "CommMonCat.units", "code": "@[simps]\ndef CommMonCat.units : CommMonCat.{u} ⥤ CommGrp.{u} where\n obj R := CommGrp.of Rˣ\n map f := CommGrp.ofHom <| Units.map f\n map_id _ := MonoidHom.ext fun _ => Units.ext rfl\n map_comp _ _ := MonoidHom.ext fun _ => Units.ext rfl", "start": [ 195, 1 ], "end": [ 201, 55 ], "kind": "commanddeclaration" }, { "full_name": "CommGrp.forget₂CommMonAdj", "code": "def CommGrp.forget₂CommMonAdj : forget₂ CommGrp CommMonCat ⊣ CommMonCat.units.{u} where\n homEquiv X Y :=\n { toFun := fun f => MonoidHom.toHomUnits f\n invFun := fun f => (Units.coeHom Y).comp f\n left_inv := fun f => MonoidHom.ext fun _ => rfl\n right_inv := fun f => MonoidHom.ext fun _ => Units.ext rfl }\n unit :=\n { app := fun X => { (@toUnits X _).toMonoidHom with }\n naturality := fun X Y f => MonoidHom.ext fun x => Units.ext rfl }\n counit :=\n { app := fun X => Units.coeHom X\n naturality := by intros; exact MonoidHom.ext fun x => rfl }\n homEquiv_unit := MonoidHom.ext fun _ => Units.ext rfl\n homEquiv_counit := MonoidHom.ext fun _ => rfl", "start": [ 204, 1 ], "end": [ 218, 48 ], "kind": "commanddeclaration" } ]
Mathlib/Data/Rbtree/Main.lean
[ "Mathlib/Mathport/Rename.lean", ".lake/packages/lean4/src/lean/Init.lean" ]
[]
Mathlib/NumberTheory/FLT/Four.lean
[ "Mathlib/NumberTheory/FLT/Basic.lean", "Mathlib/NumberTheory/PythagoreanTriples.lean", ".lake/packages/lean4/src/lean/Init.lean", "Mathlib/Tactic/LinearCombination.lean", "Mathlib/RingTheory/Coprime/Lemmas.lean" ]
[ { "full_name": "Fermat42", "code": "def Fermat42 (a b c : ℤ) : Prop :=\n a ≠ 0 ∧ b ≠ 0 ∧ a ^ 4 + b ^ 4 = c ^ 2", "start": [ 23, 1 ], "end": [ 27, 40 ], "kind": "commanddeclaration" }, { "full_name": "Fermat42.comm", "code": "theorem comm {a b c : ℤ} : Fermat42 a b c ↔ Fermat42 b a c", "start": [ 32, 1 ], "end": [ 35, 8 ], "kind": "commanddeclaration" }, { "full_name": "Fermat42.mul", "code": "theorem mul {a b c k : ℤ} (hk0 : k ≠ 0) :\n Fermat42 a b c ↔ Fermat42 (k * a) (k * b) (k ^ 2 * c)", "start": [ 38, 1 ], "end": [ 55, 31 ], "kind": "commanddeclaration" }, { "full_name": "Fermat42.ne_zero", "code": "theorem ne_zero {a b c : ℤ} (h : Fermat42 a b c) : c ≠ 0", "start": [ 58, 1 ], "end": [ 62, 94 ], "kind": "commanddeclaration" }, { "full_name": "Fermat42.Minimal", "code": "def Minimal (a b c : ℤ) : Prop :=\n Fermat42 a b c ∧ ∀ a1 b1 c1 : ℤ, Fermat42 a1 b1 c1 → Int.natAbs c ≤ Int.natAbs c1", "start": [ 65, 1 ], "end": [ 68, 84 ], "kind": "commanddeclaration" }, { "full_name": "Fermat42.exists_minimal", "code": "theorem exists_minimal {a b c : ℤ} (h : Fermat42 a b c) : ∃ a0 b0 c0, Minimal a0 b0 c0", "start": [ 71, 1 ], "end": [ 85, 21 ], "kind": "commanddeclaration" }, { "full_name": "Fermat42.coprime_of_minimal", "code": "theorem coprime_of_minimal {a b c : ℤ} (h : Minimal a b c) : IsCoprime a b", "start": [ 88, 1 ], "end": [ 105, 65 ], "kind": "commanddeclaration" }, { "full_name": "Fermat42.minimal_comm", "code": "theorem minimal_comm {a b c : ℤ} : Minimal a b c → Minimal b a c", "start": [ 108, 1 ], "end": [ 110, 28 ], "kind": "commanddeclaration" }, { "full_name": "Fermat42.neg_of_minimal", "code": "theorem neg_of_minimal {a b c : ℤ} : Minimal a b c → Minimal a b (-c)", "start": [ 113, 1 ], "end": [ 120, 25 ], "kind": "commanddeclaration" }, { "full_name": "Fermat42.exists_odd_minimal", "code": "theorem exists_odd_minimal {a b c : ℤ} (h : Fermat42 a b c) :\n ∃ a0 b0 c0, Minimal a0 b0 c0 ∧ a0 % 2 = 1", "start": [ 123, 1 ], "end": [ 136, 34 ], "kind": "commanddeclaration" }, { "full_name": "Fermat42.exists_pos_odd_minimal", "code": "theorem exists_pos_odd_minimal {a b c : ℤ} (h : Fermat42 a b c) :\n ∃ a0 b0 c0, Minimal a0 b0 c0 ∧ a0 % 2 = 1 ∧ 0 < c0", "start": [ 139, 1 ], "end": [ 149, 25 ], "kind": "commanddeclaration" }, { "full_name": "Int.coprime_of_sq_sum", "code": "theorem Int.coprime_of_sq_sum {r s : ℤ} (h2 : IsCoprime s r) : IsCoprime (r ^ 2 + s ^ 2) r", "start": [ 154, 1 ], "end": [ 156, 55 ], "kind": "commanddeclaration" }, { "full_name": "Int.coprime_of_sq_sum'", "code": "theorem Int.coprime_of_sq_sum' {r s : ℤ} (h : IsCoprime r s) :\n IsCoprime (r ^ 2 + s ^ 2) (r * s)", "start": [ 159, 1 ], "end": [ 162, 47 ], "kind": "commanddeclaration" }, { "full_name": "Fermat42.not_minimal", "code": "theorem not_minimal {a b c : ℤ} (h : Minimal a b c) (ha2 : a % 2 = 1) (hc : 0 < c) : False", "start": [ 169, 1 ], "end": [ 293, 53 ], "kind": "commanddeclaration" }, { "full_name": "not_fermat_42", "code": "theorem not_fermat_42 {a b c : ℤ} (ha : a ≠ 0) (hb : b ≠ 0) : a ^ 4 + b ^ 4 ≠ c ^ 2", "start": [ 298, 1 ], "end": [ 302, 38 ], "kind": "commanddeclaration" }, { "full_name": "fermatLastTheoremFour", "code": "theorem fermatLastTheoremFour : FermatLastTheoremFor 4", "start": [ 305, 1 ], "end": [ 313, 17 ], "kind": "commanddeclaration" }, { "full_name": "FermatLastTheorem.of_odd_primes", "code": "theorem FermatLastTheorem.of_odd_primes\n (hprimes : ∀ p : ℕ, Nat.Prime p → Odd p → FermatLastTheoremFor p) : FermatLastTheorem", "start": [ 316, 1 ], "end": [ 326, 34 ], "kind": "commanddeclaration" } ]
Mathlib/Probability/Moments.lean
[ ".lake/packages/lean4/src/lean/Init.lean", "Mathlib/Probability/Variance.lean" ]
[ { "full_name": "ProbabilityTheory.moment", "code": "def moment (X : Ω → ℝ) (p : ℕ) (μ : Measure Ω) : ℝ :=\n μ[X ^ p]", "start": [ 50, 1 ], "end": [ 52, 11 ], "kind": "commanddeclaration" }, { "full_name": "ProbabilityTheory.centralMoment", "code": "def centralMoment (X : Ω → ℝ) (p : ℕ) (μ : Measure Ω) : ℝ := by\n have m := fun (x : Ω) => μ[X] exact μ[(X - m) ^ p]", "start": [ 55, 1 ], "end": [ 58, 23 ], "kind": "commanddeclaration" }, { "full_name": "ProbabilityTheory.moment_zero", "code": "@[simp]\ntheorem moment_zero (hp : p ≠ 0) : moment 0 p μ = 0", "start": [ 61, 1 ], "end": [ 64, 42 ], "kind": "commanddeclaration" }, { "full_name": "ProbabilityTheory.centralMoment_zero", "code": "@[simp]\ntheorem centralMoment_zero (hp : p ≠ 0) : centralMoment 0 p μ = 0", "start": [ 67, 1 ], "end": [ 70, 91 ], "kind": "commanddeclaration" }, { "full_name": "ProbabilityTheory.centralMoment_one'", "code": "theorem centralMoment_one' [IsFiniteMeasure μ] (h_int : Integrable X μ) :\n centralMoment X 1 μ = (1 - (μ Set.univ).toReal) * μ[X]", "start": [ 73, 1 ], "end": [ 77, 60 ], "kind": "commanddeclaration" }, { "full_name": "ProbabilityTheory.centralMoment_one", "code": "@[simp]\ntheorem centralMoment_one [IsProbabilityMeasure μ] : centralMoment X 1 μ = 0", "start": [ 80, 1 ], "end": [ 91, 29 ], "kind": "commanddeclaration" }, { "full_name": "ProbabilityTheory.centralMoment_two_eq_variance", "code": "theorem centralMoment_two_eq_variance [IsFiniteMeasure μ] (hX : Memℒp X 2 μ) :\n centralMoment X 2 μ = variance X μ", "start": [ 94, 1 ], "end": [ 95, 70 ], "kind": "commanddeclaration" }, { "full_name": "ProbabilityTheory.mgf", "code": "def mgf (X : Ω → ℝ) (μ : Measure Ω) (t : ℝ) : ℝ :=\n μ[fun ω => exp (t * X ω)]", "start": [ 102, 1 ], "end": [ 104, 28 ], "kind": "commanddeclaration" }, { "full_name": "ProbabilityTheory.cgf", "code": "def cgf (X : Ω → ℝ) (μ : Measure Ω) (t : ℝ) : ℝ :=\n log (mgf X μ t)", "start": [ 107, 1 ], "end": [ 109, 18 ], "kind": "commanddeclaration" }, { "full_name": "ProbabilityTheory.mgf_zero_fun", "code": "@[simp]\ntheorem mgf_zero_fun : mgf 0 μ t = (μ Set.univ).toReal", "start": [ 112, 1 ], "end": [ 114, 91 ], "kind": "commanddeclaration" }, { "full_name": "ProbabilityTheory.cgf_zero_fun", "code": "@[simp]\ntheorem cgf_zero_fun : cgf 0 μ t = log (μ Set.univ).toReal", "start": [ 117, 1 ], "end": [ 118, 95 ], "kind": "commanddeclaration" }, { "full_name": "ProbabilityTheory.mgf_zero_measure", "code": "@[simp]\ntheorem mgf_zero_measure : mgf X (0 : Measure Ω) t = 0", "start": [ 121, 1 ], "end": [ 122, 100 ], "kind": "commanddeclaration" }, { "full_name": "ProbabilityTheory.cgf_zero_measure", "code": "@[simp]\ntheorem cgf_zero_measure : cgf X (0 : Measure Ω) t = 0", "start": [ 125, 1 ], "end": [ 127, 46 ], "kind": "commanddeclaration" }, { "full_name": "ProbabilityTheory.mgf_const'", "code": "@[simp]\ntheorem mgf_const' (c : ℝ) : mgf (fun _ => c) μ t = (μ Set.univ).toReal * exp (t * c)", "start": [ 130, 1 ], "end": [ 132, 47 ], "kind": "commanddeclaration" }, { "full_name": "ProbabilityTheory.mgf_const", "code": "theorem mgf_const (c : ℝ) [IsProbabilityMeasure μ] : mgf (fun _ => c) μ t = exp (t * c)", "start": [ 136, 1 ], "end": [ 137, 68 ], "kind": "commanddeclaration" }, { "full_name": "ProbabilityTheory.cgf_const'", "code": "@[simp]\ntheorem cgf_const' [IsFiniteMeasure μ] (hμ : μ ≠ 0) (c : ℝ) :\n cgf (fun _ => c) μ t = log (μ Set.univ).toReal + t * c", "start": [ 140, 1 ], "end": [ 147, 74 ], "kind": "commanddeclaration" }, { "full_name": "ProbabilityTheory.cgf_const", "code": "@[simp]\ntheorem cgf_const [IsProbabilityMeasure μ] (c : ℝ) : cgf (fun _ => c) μ t = t * c", "start": [ 150, 1 ], "end": [ 152, 38 ], "kind": "commanddeclaration" }, { "full_name": "ProbabilityTheory.mgf_zero'", "code": "@[simp]\ntheorem mgf_zero' : mgf X μ 0 = (μ Set.univ).toReal", "start": [ 155, 1 ], "end": [ 157, 76 ], "kind": "commanddeclaration" }, { "full_name": "ProbabilityTheory.mgf_zero", "code": "theorem mgf_zero [IsProbabilityMeasure μ] : mgf X μ 0 = 1", "start": [ 161, 1 ], "end": [ 162, 58 ], "kind": "commanddeclaration" }, { "full_name": "ProbabilityTheory.cgf_zero'", "code": "@[simp]\ntheorem cgf_zero' : cgf X μ 0 = log (μ Set.univ).toReal", "start": [ 165, 1 ], "end": [ 166, 89 ], "kind": "commanddeclaration" }, { "full_name": "ProbabilityTheory.cgf_zero", "code": "theorem cgf_zero [IsProbabilityMeasure μ] : cgf X μ 0 = 0", "start": [ 170, 1 ], "end": [ 171, 67 ], "kind": "commanddeclaration" }, { "full_name": "ProbabilityTheory.mgf_undef", "code": "theorem mgf_undef (hX : ¬Integrable (fun ω => exp (t * X ω)) μ) : mgf X μ t = 0", "start": [ 174, 1 ], "end": [ 175, 37 ], "kind": "commanddeclaration" }, { "full_name": "ProbabilityTheory.cgf_undef", "code": "theorem cgf_undef (hX : ¬Integrable (fun ω => exp (t * X ω)) μ) : cgf X μ t = 0", "start": [ 178, 1 ], "end": [ 179, 42 ], "kind": "commanddeclaration" }, { "full_name": "ProbabilityTheory.mgf_nonneg", "code": "theorem mgf_nonneg : 0 ≤ mgf X μ t", "start": [ 182, 1 ], "end": [ 183, 25 ], "kind": "commanddeclaration" }, { "full_name": "ProbabilityTheory.mgf_pos'", "code": "theorem mgf_pos' (hμ : μ ≠ 0) (h_int_X : Integrable (fun ω => exp (t * X ω)) μ) :\n 0 < mgf X μ t", "start": [ 186, 1 ], "end": [ 202, 28 ], "kind": "commanddeclaration" }, { "full_name": "ProbabilityTheory.mgf_pos", "code": "theorem mgf_pos [IsProbabilityMeasure μ] (h_int_X : Integrable (fun ω => exp (t * X ω)) μ) :\n 0 < mgf X μ t", "start": [ 205, 1 ], "end": [ 207, 52 ], "kind": "commanddeclaration" }, { "full_name": "ProbabilityTheory.mgf_neg", "code": "theorem mgf_neg : mgf (-X) μ t = mgf X μ (-t)", "start": [ 210, 1 ], "end": [ 210, 98 ], "kind": "commanddeclaration" }, { "full_name": "ProbabilityTheory.cgf_neg", "code": "theorem cgf_neg : cgf (-X) μ t = cgf X μ (-t)", "start": [ 213, 1 ], "end": [ 213, 75 ], "kind": "commanddeclaration" }, { "full_name": "ProbabilityTheory.IndepFun.exp_mul", "code": "theorem IndepFun.exp_mul {X Y : Ω → ℝ} (h_indep : IndepFun X Y μ) (s t : ℝ) :\n IndepFun (fun ω => exp (s * X ω)) (fun ω => exp (t * Y ω)) μ", "start": [ 216, 1 ], "end": [ 221, 52 ], "kind": "commanddeclaration" }, { "full_name": "ProbabilityTheory.IndepFun.mgf_add", "code": "theorem IndepFun.mgf_add {X Y : Ω → ℝ} (h_indep : IndepFun X Y μ)\n (hX : AEStronglyMeasurable (fun ω => exp (t * X ω)) μ)\n (hY : AEStronglyMeasurable (fun ω => exp (t * Y ω)) μ) :\n mgf (X + Y) μ t = mgf X μ t * mgf Y μ t", "start": [ 224, 1 ], "end": [ 229, 49 ], "kind": "commanddeclaration" }, { "full_name": "ProbabilityTheory.IndepFun.mgf_add'", "code": "theorem IndepFun.mgf_add' {X Y : Ω → ℝ} (h_indep : IndepFun X Y μ) (hX : AEStronglyMeasurable X μ)\n (hY : AEStronglyMeasurable Y μ) : mgf (X + Y) μ t = mgf X μ t * mgf Y μ t", "start": [ 232, 1 ], "end": [ 239, 32 ], "kind": "commanddeclaration" }, { "full_name": "ProbabilityTheory.IndepFun.cgf_add", "code": "theorem IndepFun.cgf_add {X Y : Ω → ℝ} (h_indep : IndepFun X Y μ)\n (h_int_X : Integrable (fun ω => exp (t * X ω)) μ)\n (h_int_Y : Integrable (fun ω => exp (t * Y ω)) μ) :\n cgf (X + Y) μ t = cgf X μ t + cgf Y μ t", "start": [ 242, 1 ], "end": [ 249, 68 ], "kind": "commanddeclaration" }, { "full_name": "ProbabilityTheory.aestronglyMeasurable_exp_mul_add", "code": "theorem aestronglyMeasurable_exp_mul_add {X Y : Ω → ℝ}\n (h_int_X : AEStronglyMeasurable (fun ω => exp (t * X ω)) μ)\n (h_int_Y : AEStronglyMeasurable (fun ω => exp (t * Y ω)) μ) :\n AEStronglyMeasurable (fun ω => exp (t * (X + Y) ω)) μ", "start": [ 252, 1 ], "end": [ 257, 49 ], "kind": "commanddeclaration" }, { "full_name": "ProbabilityTheory.aestronglyMeasurable_exp_mul_sum", "code": "theorem aestronglyMeasurable_exp_mul_sum {X : ι → Ω → ℝ} {s : Finset ι}\n (h_int : ∀ i ∈ s, AEStronglyMeasurable (fun ω => exp (t * X i ω)) μ) :\n AEStronglyMeasurable (fun ω => exp (t * (∑ i ∈ s, X i) ω)) μ", "start": [ 260, 1 ], "end": [ 271, 81 ], "kind": "commanddeclaration" }, { "full_name": "ProbabilityTheory.IndepFun.integrable_exp_mul_add", "code": "theorem IndepFun.integrable_exp_mul_add {X Y : Ω → ℝ} (h_indep : IndepFun X Y μ)\n (h_int_X : Integrable (fun ω => exp (t * X ω)) μ)\n (h_int_Y : Integrable (fun ω => exp (t * Y ω)) μ) :\n Integrable (fun ω => exp (t * (X + Y) ω)) μ", "start": [ 274, 1 ], "end": [ 279, 61 ], "kind": "commanddeclaration" }, { "full_name": "ProbabilityTheory.iIndepFun.integrable_exp_mul_sum", "code": "theorem iIndepFun.integrable_exp_mul_sum [IsProbabilityMeasure μ] {X : ι → Ω → ℝ}\n (h_indep : iIndepFun (fun i => inferInstance) X μ) (h_meas : ∀ i, Measurable (X i))\n {s : Finset ι} (h_int : ∀ i ∈ s, Integrable (fun ω => exp (t * X i ω)) μ) :\n Integrable (fun ω => exp (t * (∑ i ∈ s, X i) ω)) μ", "start": [ 282, 1 ], "end": [ 295, 74 ], "kind": "commanddeclaration" }, { "full_name": "ProbabilityTheory.iIndepFun.mgf_sum", "code": "theorem iIndepFun.mgf_sum [IsProbabilityMeasure μ] {X : ι → Ω → ℝ}\n (h_indep : iIndepFun (fun i => inferInstance) X μ) (h_meas : ∀ i, Measurable (X i))\n (s : Finset ι) : mgf (∑ i ∈ s, X i) μ t = ∏ i ∈ s, mgf (X i) μ t", "start": [ 299, 1 ], "end": [ 310, 37 ], "kind": "commanddeclaration" }, { "full_name": "ProbabilityTheory.iIndepFun.cgf_sum", "code": "theorem iIndepFun.cgf_sum [IsProbabilityMeasure μ] {X : ι → Ω → ℝ}\n (h_indep : iIndepFun (fun i => inferInstance) X μ) (h_meas : ∀ i, Measurable (X i))\n {s : Finset ι} (h_int : ∀ i ∈ s, Integrable (fun ω => exp (t * X i ω)) μ) :\n cgf (∑ i ∈ s, X i) μ t = ∑ i ∈ s, cgf (X i) μ t", "start": [ 314, 1 ], "end": [ 321, 37 ], "kind": "commanddeclaration" }, { "full_name": "ProbabilityTheory.measure_ge_le_exp_mul_mgf", "code": "theorem measure_ge_le_exp_mul_mgf [IsFiniteMeasure μ] (ε : ℝ) (ht : 0 ≤ t)\n (h_int : Integrable (fun ω => exp (t * X ω)) μ) :\n (μ {ω | ε ≤ X ω}).toReal ≤ exp (-t * ε) * mgf X μ t", "start": [ 325, 1 ], "end": [ 345, 66 ], "kind": "commanddeclaration" }, { "full_name": "ProbabilityTheory.measure_le_le_exp_mul_mgf", "code": "theorem measure_le_le_exp_mul_mgf [IsFiniteMeasure μ] (ε : ℝ) (ht : t ≤ 0)\n (h_int : Integrable (fun ω => exp (t * X ω)) μ) :\n (μ {ω | X ω ≤ ε}).toReal ≤ exp (-t * ε) * mgf X μ t", "start": [ 348, 1 ], "end": [ 357, 16 ], "kind": "commanddeclaration" }, { "full_name": "ProbabilityTheory.measure_ge_le_exp_cgf", "code": "theorem measure_ge_le_exp_cgf [IsFiniteMeasure μ] (ε : ℝ) (ht : 0 ≤ t)\n (h_int : Integrable (fun ω => exp (t * X ω)) μ) :\n (μ {ω | ε ≤ X ω}).toReal ≤ exp (-t * ε + cgf X μ t)", "start": [ 360, 1 ], "end": [ 366, 67 ], "kind": "commanddeclaration" }, { "full_name": "ProbabilityTheory.measure_le_le_exp_cgf", "code": "theorem measure_le_le_exp_cgf [IsFiniteMeasure μ] (ε : ℝ) (ht : t ≤ 0)\n (h_int : Integrable (fun ω => exp (t * X ω)) μ) :\n (μ {ω | X ω ≤ ε}).toReal ≤ exp (-t * ε + cgf X μ t)", "start": [ 369, 1 ], "end": [ 375, 67 ], "kind": "commanddeclaration" } ]
Mathlib/Data/PSigma/Order.lean
[ "Mathlib/Data/Sigma/Lex.lean", ".lake/packages/lean4/src/lean/Init/NotationExtra.lean", "Mathlib/Mathport/Notation.lean", "Mathlib/Data/Sigma/Basic.lean", ".lake/packages/lean4/src/lean/Init.lean", "Mathlib/Order/BoundedOrder.lean" ]
[ { "full_name": "PSigma.Lex.le", "code": "instance le [LT ι] [∀ i, LE (α i)] : LE (Σₗ' i, α i) :=\n ⟨Lex (· < ·) fun _ => (· ≤ ·)⟩", "start": [ 46, 1 ], "end": [ 48, 33 ], "kind": "commanddeclaration" }, { "full_name": "PSigma.Lex.lt", "code": "instance lt [LT ι] [∀ i, LT (α i)] : LT (Σₗ' i, α i) :=\n ⟨Lex (· < ·) fun _ => (· < ·)⟩", "start": [ 51, 1 ], "end": [ 53, 33 ], "kind": "commanddeclaration" }, { "full_name": "PSigma.Lex.preorder", "code": "instance preorder [Preorder ι] [∀ i, Preorder (α i)] : Preorder (Σₗ' i, α i) :=\n { Lex.le, Lex.lt with\n le_refl := fun ⟨i, a⟩ => Lex.right _ le_rfl,\n le_trans := by\n rintro ⟨a₁, b₁⟩ ⟨a₂, b₂⟩ ⟨a₃, b₃⟩ ⟨h₁r⟩ ⟨h₂r⟩\n · left\n apply lt_trans\n repeat' assumption\n · left\n assumption\n · left\n assumption\n · right\n apply le_trans\n repeat' assumption,\n lt_iff_le_not_le := by\n refine fun a b => ⟨fun hab => ⟨hab.mono_right fun i a b => le_of_lt, ?_⟩, ?_⟩\n · rintro (⟨i, a, hji⟩ | ⟨i, hba⟩) <;> obtain ⟨_, _, hij⟩ | ⟨_, hab⟩ := hab\n · exact hij.not_lt hji\n · exact lt_irrefl _ hji\n · exact lt_irrefl _ hij\n · exact hab.not_le hba\n · rintro ⟨⟨j, b, hij⟩ | ⟨i, hab⟩, hba⟩\n · exact Lex.left _ _ hij\n · exact Lex.right _ (hab.lt_of_not_le fun h => hba <| Lex.right _ h) }", "start": [ 56, 1 ], "end": [ 80, 79 ], "kind": "commanddeclaration" }, { "full_name": "PSigma.Lex.partialOrder", "code": "instance partialOrder [PartialOrder ι] [∀ i, PartialOrder (α i)] : PartialOrder (Σₗ' i, α i) :=\n { Lex.preorder with\n le_antisymm := by\n rintro ⟨a₁, b₁⟩ ⟨a₂, b₂⟩ (⟨_, _, hlt₁⟩ | ⟨_, hlt₁⟩) (⟨_, _, hlt₂⟩ | ⟨_, hlt₂⟩)\n · exact (lt_irrefl a₁ <| hlt₁.trans hlt₂).elim\n · exact (lt_irrefl a₁ hlt₁).elim\n · exact (lt_irrefl a₁ hlt₂).elim\n · rw [hlt₁.antisymm hlt₂] }", "start": [ 83, 1 ], "end": [ 91, 34 ], "kind": "commanddeclaration" }, { "full_name": "PSigma.Lex.linearOrder", "code": "instance linearOrder [LinearOrder ι] [∀ i, LinearOrder (α i)] : LinearOrder (Σₗ' i, α i) :=\n { Lex.partialOrder with\n le_total := by\n rintro ⟨i, a⟩ ⟨j, b⟩\n obtain hij | rfl | hji := lt_trichotomy i j\n · exact Or.inl (Lex.left _ _ hij)\n · obtain hab | hba := le_total a b\n · exact Or.inl (Lex.right _ hab)\n · exact Or.inr (Lex.right _ hba)\n · exact Or.inr (Lex.left _ _ hji),\n decidableEq := PSigma.decidableEq, decidableLE := Lex.decidable _ _,\n decidableLT := Lex.decidable _ _ }", "start": [ 94, 1 ], "end": [ 106, 39 ], "kind": "commanddeclaration" }, { "full_name": "PSigma.Lex.orderBot", "code": "instance orderBot [PartialOrder ι] [OrderBot ι] [∀ i, Preorder (α i)] [OrderBot (α ⊥)] :\n OrderBot (Σₗ' i, α i) where\n bot := ⟨⊥, ⊥⟩\n bot_le := fun ⟨a, b⟩ => by\n obtain rfl | ha := eq_bot_or_bot_lt a\n · exact Lex.right _ bot_le\n · exact Lex.left _ _ ha", "start": [ 109, 1 ], "end": [ 116, 28 ], "kind": "commanddeclaration" }, { "full_name": "PSigma.Lex.orderTop", "code": "instance orderTop [PartialOrder ι] [OrderTop ι] [∀ i, Preorder (α i)] [OrderTop (α ⊤)] :\n OrderTop (Σₗ' i, α i) where\n top := ⟨⊤, ⊤⟩\n le_top := fun ⟨a, b⟩ => by\n obtain rfl | ha := eq_top_or_lt_top a\n · exact Lex.right _ le_top\n · exact Lex.left _ _ ha", "start": [ 119, 1 ], "end": [ 126, 28 ], "kind": "commanddeclaration" }, { "full_name": "PSigma.Lex.boundedOrder", "code": "instance boundedOrder [PartialOrder ι] [BoundedOrder ι] [∀ i, Preorder (α i)] [OrderBot (α ⊥)]\n [OrderTop (α ⊤)] : BoundedOrder (Σₗ' i, α i) :=\n { Lex.orderBot, Lex.orderTop with }", "start": [ 129, 1 ], "end": [ 132, 38 ], "kind": "commanddeclaration" }, { "full_name": "PSigma.Lex.denselyOrdered", "code": "instance denselyOrdered [Preorder ι] [DenselyOrdered ι] [∀ i, Nonempty (α i)] [∀ i, Preorder (α i)]\n [∀ i, DenselyOrdered (α i)] : DenselyOrdered (Σₗ' i, α i) :=\n ⟨by\n rintro ⟨i, a⟩ ⟨j, b⟩ (⟨_, _, h⟩ | @⟨_, _, b, h⟩)\n · obtain ⟨k, hi, hj⟩ := exists_between h\n obtain ⟨c⟩ : Nonempty (α k) := inferInstance\n exact ⟨⟨k, c⟩, left _ _ hi, left _ _ hj⟩\n · obtain ⟨c, ha, hb⟩ := exists_between h\n exact ⟨⟨i, c⟩, right _ ha, right _ hb⟩⟩", "start": [ 135, 1 ], "end": [ 143, 46 ], "kind": "commanddeclaration" }, { "full_name": "PSigma.Lex.denselyOrdered_of_noMaxOrder", "code": "instance denselyOrdered_of_noMaxOrder [Preorder ι] [∀ i, Preorder (α i)]\n [∀ i, DenselyOrdered (α i)] [∀ i, NoMaxOrder (α i)] : DenselyOrdered (Σₗ' i, α i) :=\n ⟨by\n rintro ⟨i, a⟩ ⟨j, b⟩ (⟨_, _, h⟩ | @⟨_, _, b, h⟩)\n · obtain ⟨c, ha⟩ := exists_gt a\n exact ⟨⟨i, c⟩, right _ ha, left _ _ h⟩\n · obtain ⟨c, ha, hb⟩ := exists_between h\n exact ⟨⟨i, c⟩, right _ ha, right _ hb⟩⟩", "start": [ 146, 1 ], "end": [ 153, 46 ], "kind": "commanddeclaration" }, { "full_name": "PSigma.Lex.denselyOrdered_of_noMinOrder", "code": "instance denselyOrdered_of_noMinOrder [Preorder ι] [∀ i, Preorder (α i)]\n [∀ i, DenselyOrdered (α i)] [∀ i, NoMinOrder (α i)] : DenselyOrdered (Σₗ' i, α i) :=\n ⟨by\n rintro ⟨i, a⟩ ⟨j, b⟩ (⟨_, _, h⟩ | @⟨_, _, b, h⟩)\n · obtain ⟨c, hb⟩ := exists_lt b\n exact ⟨⟨j, c⟩, left _ _ h, right _ hb⟩\n · obtain ⟨c, ha, hb⟩ := exists_between h\n exact ⟨⟨i, c⟩, right _ ha, right _ hb⟩⟩", "start": [ 156, 1 ], "end": [ 163, 46 ], "kind": "commanddeclaration" }, { "full_name": "PSigma.Lex.noMaxOrder_of_nonempty", "code": "instance noMaxOrder_of_nonempty [Preorder ι] [∀ i, Preorder (α i)] [NoMaxOrder ι]\n [∀ i, Nonempty (α i)] : NoMaxOrder (Σₗ' i, α i) :=\n ⟨by\n rintro ⟨i, a⟩\n obtain ⟨j, h⟩ := exists_gt i\n obtain ⟨b⟩ : Nonempty (α j) := inferInstance\n exact ⟨⟨j, b⟩, left _ _ h⟩⟩", "start": [ 166, 1 ], "end": [ 172, 32 ], "kind": "commanddeclaration" }, { "full_name": "PSigma.Lex.noMinOrder_of_nonempty", "code": "instance noMinOrder_of_nonempty [Preorder ι] [∀ i, Preorder (α i)] [NoMinOrder ι]\n [∀ i, Nonempty (α i)] : NoMinOrder (Σₗ' i, α i) :=\n ⟨by\n rintro ⟨i, a⟩\n obtain ⟨j, h⟩ := exists_lt i\n obtain ⟨b⟩ : Nonempty (α j) := inferInstance\n exact ⟨⟨j, b⟩, left _ _ h⟩⟩", "start": [ 176, 1 ], "end": [ 182, 32 ], "kind": "commanddeclaration" }, { "full_name": "PSigma.Lex.noMaxOrder", "code": "instance noMaxOrder [Preorder ι] [∀ i, Preorder (α i)] [∀ i, NoMaxOrder (α i)] :\n NoMaxOrder (Σₗ' i, α i) :=\n ⟨by\n rintro ⟨i, a⟩\n obtain ⟨b, h⟩ := exists_gt a\n exact ⟨⟨i, b⟩, right _ h⟩⟩", "start": [ 185, 1 ], "end": [ 190, 31 ], "kind": "commanddeclaration" }, { "full_name": "PSigma.Lex.noMinOrder", "code": "instance noMinOrder [Preorder ι] [∀ i, Preorder (α i)] [∀ i, NoMinOrder (α i)] :\n NoMinOrder (Σₗ' i, α i) :=\n ⟨by\n rintro ⟨i, a⟩\n obtain ⟨b, h⟩ := exists_lt a\n exact ⟨⟨i, b⟩, right _ h⟩⟩", "start": [ 193, 1 ], "end": [ 198, 31 ], "kind": "commanddeclaration" } ]
Mathlib/LinearAlgebra/Alternating/DomCoprod.lean
[ "Mathlib/GroupTheory/GroupAction/Quotient.lean", "Mathlib/LinearAlgebra/Alternating/Basic.lean", ".lake/packages/lean4/src/lean/Init.lean", "Mathlib/LinearAlgebra/Multilinear/TensorProduct.lean" ]
[ { "full_name": "Equiv.Perm.ModSumCongr", "code": "abbrev ModSumCongr (α β : Type*) :=\n _ ⧸ (Equiv.Perm.sumCongrHom α β).range", "start": [ 29, 1 ], "end": [ 31, 41 ], "kind": "commanddeclaration" }, { "full_name": "AlternatingMap.domCoprod.summand", "code": "def domCoprod.summand (a : Mᵢ [⋀^ιa]→ₗ[R'] N₁) (b : Mᵢ [⋀^ιb]→ₗ[R'] N₂)\n (σ : Perm.ModSumCongr ιa ιb) : MultilinearMap R' (fun _ : Sum ιa ιb => Mᵢ) (N₁ ⊗[R'] N₂) :=\n Quotient.liftOn' σ\n (fun σ =>\n Equiv.Perm.sign σ •\n (MultilinearMap.domCoprod ↑a ↑b : MultilinearMap R' (fun _ => Mᵢ) (N₁ ⊗ N₂)).domDomCongr σ)\n fun σ₁ σ₂ H => by\n rw [QuotientGroup.leftRel_apply] at H\n obtain ⟨⟨sl, sr⟩, h⟩ := H\n ext v\n simp only [MultilinearMap.domDomCongr_apply, MultilinearMap.domCoprod_apply,\n coe_multilinearMap, MultilinearMap.smul_apply]\n replace h := inv_mul_eq_iff_eq_mul.mp h.symm\n have : Equiv.Perm.sign (σ₁ * Perm.sumCongrHom _ _ (sl, sr))\n = Equiv.Perm.sign σ₁ * (Equiv.Perm.sign sl * Equiv.Perm.sign sr) := by simp\n rw [h, this, mul_smul, mul_smul, smul_left_cancel_iff, ← TensorProduct.tmul_smul,\n TensorProduct.smul_tmul']\n simp only [Sum.map_inr, Perm.sumCongrHom_apply, Perm.sumCongr_apply, Sum.map_inl,\n Function.comp_apply, Perm.coe_mul]\n erw [← a.map_congr_perm fun i => v (σ₁ _), ← b.map_congr_perm fun i => v (σ₁ _)]", "start": [ 44, 1 ], "end": [ 65, 85 ], "kind": "commanddeclaration" }, { "full_name": "AlternatingMap.domCoprod.summand_mk''", "code": "theorem domCoprod.summand_mk'' (a : Mᵢ [⋀^ιa]→ₗ[R'] N₁) (b : Mᵢ [⋀^ιb]→ₗ[R'] N₂)\n (σ : Equiv.Perm (Sum ιa ιb)) :\n domCoprod.summand a b (Quotient.mk'' σ) =\n Equiv.Perm.sign σ •\n (MultilinearMap.domCoprod ↑a ↑b : MultilinearMap R' (fun _ => Mᵢ) (N₁ ⊗ N₂)).domDomCongr\n σ", "start": [ 68, 1 ], "end": [ 74, 6 ], "kind": "commanddeclaration" }, { "full_name": "AlternatingMap.domCoprod.summand_add_swap_smul_eq_zero", "code": "theorem domCoprod.summand_add_swap_smul_eq_zero (a : Mᵢ [⋀^ιa]→ₗ[R'] N₁)\n (b : Mᵢ [⋀^ιb]→ₗ[R'] N₂) (σ : Perm.ModSumCongr ιa ιb) {v : Sum ιa ιb → Mᵢ}\n {i j : Sum ιa ιb} (hv : v i = v j) (hij : i ≠ j) :\n domCoprod.summand a b σ v + domCoprod.summand a b (swap i j • σ) v = 0", "start": [ 77, 1 ], "end": [ 91, 39 ], "kind": "commanddeclaration" }, { "full_name": "AlternatingMap.domCoprod.summand_eq_zero_of_smul_invariant", "code": "theorem domCoprod.summand_eq_zero_of_smul_invariant (a : Mᵢ [⋀^ιa]→ₗ[R'] N₁)\n (b : Mᵢ [⋀^ιb]→ₗ[R'] N₂) (σ : Perm.ModSumCongr ιa ιb) {v : Sum ιa ιb → Mᵢ}\n {i j : Sum ιa ιb} (hv : v i = v j) (hij : i ≠ j) :\n swap i j • σ = σ → domCoprod.summand a b σ v = 0", "start": [ 94, 1 ], "end": [ 132, 79 ], "kind": "commanddeclaration" }, { "full_name": "AlternatingMap.domCoprod", "code": "@[simps]\ndef domCoprod (a : Mᵢ [⋀^ιa]→ₗ[R'] N₁) (b : Mᵢ [⋀^ιb]→ₗ[R'] N₂) :\n Mᵢ [⋀^ιa ⊕ ιb]→ₗ[R'] (N₁ ⊗[R'] N₂) :=\n { ∑ σ : Perm.ModSumCongr ιa ιb, domCoprod.summand a b σ with\n toFun := fun v => (⇑(∑ σ : Perm.ModSumCongr ιa ιb, domCoprod.summand a b σ)) v\n map_eq_zero_of_eq' := fun v i j hv hij => by\n dsimp only\n rw [MultilinearMap.sum_apply]\n exact\n Finset.sum_involution (fun σ _ => Equiv.swap i j • σ)\n (fun σ _ => domCoprod.summand_add_swap_smul_eq_zero a b σ hv hij)\n (fun σ _ => mt <| domCoprod.summand_eq_zero_of_smul_invariant a b σ hv hij)\n (fun σ _ => Finset.mem_univ _) fun σ _ =>\n Equiv.swap_smul_involutive i j σ }", "start": [ 135, 1 ], "end": [ 168, 45 ], "kind": "commanddeclaration" }, { "full_name": "AlternatingMap.domCoprod_coe", "code": "theorem domCoprod_coe (a : Mᵢ [⋀^ιa]→ₗ[R'] N₁) (b : Mᵢ [⋀^ιb]→ₗ[R'] N₂) :\n (↑(a.domCoprod b) : MultilinearMap R' (fun _ => Mᵢ) _) =\n ∑ σ : Perm.ModSumCongr ιa ιb, domCoprod.summand a b σ", "start": [ 172, 1 ], "end": [ 175, 34 ], "kind": "commanddeclaration" }, { "full_name": "AlternatingMap.domCoprod'", "code": "def domCoprod' :\n (Mᵢ [⋀^ιa]→ₗ[R'] N₁) ⊗[R'] (Mᵢ [⋀^ιb]→ₗ[R'] N₂) →ₗ[R']\n (Mᵢ [⋀^ιa ⊕ ιb]→ₗ[R'] (N₁ ⊗[R'] N₂)) :=\n TensorProduct.lift <| by\n refine\n LinearMap.mk₂ R' domCoprod (fun m₁ m₂ n => ?_) (fun c m n => ?_) (fun m n₁ n₂ => ?_)\n fun c m n => ?_ <;>\n · ext\n simp only [domCoprod_apply, add_apply, smul_apply, ← Finset.sum_add_distrib,\n Finset.smul_sum, MultilinearMap.sum_apply, domCoprod.summand]\n congr\n ext σ\n refine Quotient.inductionOn' σ fun σ => ?_\n simp only [Quotient.liftOn'_mk'', coe_add, coe_smul, MultilinearMap.smul_apply,\n ← MultilinearMap.domCoprod'_apply]\n simp only [TensorProduct.add_tmul, ← TensorProduct.smul_tmul', TensorProduct.tmul_add,\n TensorProduct.tmul_smul, LinearMap.map_add, LinearMap.map_smul]\n first | rw [← smul_add] | rw [smul_comm]\n rfl", "start": [ 178, 1 ], "end": [ 198, 10 ], "kind": "commanddeclaration" }, { "full_name": "AlternatingMap.domCoprod'_apply", "code": "@[simp]\ntheorem domCoprod'_apply (a : Mᵢ [⋀^ιa]→ₗ[R'] N₁) (b : Mᵢ [⋀^ιb]→ₗ[R'] N₂) :\n domCoprod' (a ⊗ₜ[R'] b) = domCoprod a b", "start": [ 201, 1 ], "end": [ 204, 6 ], "kind": "commanddeclaration" }, { "full_name": "MultilinearMap.domCoprod_alternization_coe", "code": "theorem MultilinearMap.domCoprod_alternization_coe [DecidableEq ιa] [DecidableEq ιb]\n (a : MultilinearMap R' (fun _ : ιa => Mᵢ) N₁) (b : MultilinearMap R' (fun _ : ιb => Mᵢ) N₂) :\n MultilinearMap.domCoprod (MultilinearMap.alternatization a)\n (MultilinearMap.alternatization b) =\n ∑ σa : Perm ιa, ∑ σb : Perm ιb,\n Equiv.Perm.sign σa • Equiv.Perm.sign σb •\n MultilinearMap.domCoprod (a.domDomCongr σa) (b.domDomCongr σb)", "start": [ 211, 1 ], "end": [ 222, 6 ], "kind": "commanddeclaration" }, { "full_name": "MultilinearMap.domCoprod_alternization", "code": "theorem MultilinearMap.domCoprod_alternization [DecidableEq ιa] [DecidableEq ιb]\n (a : MultilinearMap R' (fun _ : ιa => Mᵢ) N₁) (b : MultilinearMap R' (fun _ : ιb => Mᵢ) N₂) :\n MultilinearMap.alternatization (MultilinearMap.domCoprod a b) =\n a.alternatization.domCoprod (MultilinearMap.alternatization b)", "start": [ 227, 1 ], "end": [ 266, 91 ], "kind": "commanddeclaration" }, { "full_name": "MultilinearMap.domCoprod_alternization_eq", "code": "theorem MultilinearMap.domCoprod_alternization_eq [DecidableEq ιa] [DecidableEq ιb]\n (a : Mᵢ [⋀^ιa]→ₗ[R'] N₁) (b : Mᵢ [⋀^ιb]→ₗ[R'] N₂) :\n MultilinearMap.alternatization\n (MultilinearMap.domCoprod a b : MultilinearMap R' (fun _ : Sum ιa ιb => Mᵢ) (N₁ ⊗ N₂)) =\n ((Fintype.card ιa).factorial * (Fintype.card ιb).factorial) • a.domCoprod b", "start": [ 269, 1 ], "end": [ 281, 59 ], "kind": "commanddeclaration" } ]
Mathlib/LinearAlgebra/Lagrange.lean
[ ".lake/packages/lean4/src/lean/Init.lean", "Mathlib/LinearAlgebra/Vandermonde.lean", "Mathlib/RingTheory/Polynomial/Basic.lean", "Mathlib/Algebra/BigOperators/Group/Finset.lean" ]
[ { "full_name": "Polynomial.eq_zero_of_degree_lt_of_eval_finset_eq_zero", "code": "theorem eq_zero_of_degree_lt_of_eval_finset_eq_zero (degree_f_lt : f.degree < s.card)\n (eval_f : ∀ x ∈ s, f.eval x = 0) : f = 0", "start": [ 44, 1 ], "end": [ 52, 43 ], "kind": "commanddeclaration" }, { "full_name": "Polynomial.eq_of_degree_sub_lt_of_eval_finset_eq", "code": "theorem eq_of_degree_sub_lt_of_eval_finset_eq (degree_fg_lt : (f - g).degree < s.card)\n (eval_fg : ∀ x ∈ s, f.eval x = g.eval x) : f = g", "start": [ 55, 1 ], "end": [ 60, 16 ], "kind": "commanddeclaration" }, { "full_name": "Polynomial.eq_of_degrees_lt_of_eval_finset_eq", "code": "theorem eq_of_degrees_lt_of_eval_finset_eq (degree_f_lt : f.degree < s.card)\n (degree_g_lt : g.degree < s.card) (eval_fg : ∀ x ∈ s, f.eval x = g.eval x) : f = g", "start": [ 63, 1 ], "end": [ 67, 73 ], "kind": "commanddeclaration" }, { "full_name": "Polynomial.eq_of_degree_le_of_eval_finset_eq", "code": "theorem eq_of_degree_le_of_eval_finset_eq\n (h_deg_le : f.degree ≤ s.card)\n (h_deg_eq : f.degree = g.degree)\n (hlc : f.leadingCoeff = g.leadingCoeff)\n (h_eval : ∀ x ∈ s, f.eval x = g.eval x) :\n f = g", "start": [ 70, 1 ], "end": [ 83, 71 ], "kind": "commanddeclaration" }, { "full_name": "Polynomial.eq_zero_of_degree_lt_of_eval_index_eq_zero", "code": "theorem eq_zero_of_degree_lt_of_eval_index_eq_zero (hvs : Set.InjOn v s)\n (degree_f_lt : f.degree < s.card) (eval_f : ∀ i ∈ s, f.eval (v i) = 0) : f = 0", "start": [ 93, 1 ], "end": [ 100, 22 ], "kind": "commanddeclaration" }, { "full_name": "Polynomial.eq_of_degree_sub_lt_of_eval_index_eq", "code": "theorem eq_of_degree_sub_lt_of_eval_index_eq (hvs : Set.InjOn v s)\n (degree_fg_lt : (f - g).degree < s.card) (eval_fg : ∀ i ∈ s, f.eval (v i) = g.eval (v i)) :\n f = g", "start": [ 103, 1 ], "end": [ 109, 16 ], "kind": "commanddeclaration" }, { "full_name": "Polynomial.eq_of_degrees_lt_of_eval_index_eq", "code": "theorem eq_of_degrees_lt_of_eval_index_eq (hvs : Set.InjOn v s) (degree_f_lt : f.degree < s.card)\n (degree_g_lt : g.degree < s.card) (eval_fg : ∀ i ∈ s, f.eval (v i) = g.eval (v i)) : f = g", "start": [ 112, 1 ], "end": [ 116, 52 ], "kind": "commanddeclaration" }, { "full_name": "Polynomial.eq_of_degree_le_of_eval_index_eq", "code": "theorem eq_of_degree_le_of_eval_index_eq (hvs : Set.InjOn v s)\n (h_deg_le : f.degree ≤ s.card)\n (h_deg_eq : f.degree = g.degree)\n (hlc : f.leadingCoeff = g.leadingCoeff)\n (h_eval : ∀ i ∈ s, f.eval (v i) = g.eval (v i)) : f = g", "start": [ 119, 1 ], "end": [ 128, 13 ], "kind": "commanddeclaration" }, { "full_name": "Lagrange.basisDivisor", "code": "def basisDivisor (x y : F) : F[X] :=\n C (x - y)⁻¹ * (X - C y)", "start": [ 146, 1 ], "end": [ 150, 26 ], "kind": "commanddeclaration" }, { "full_name": "Lagrange.basisDivisor_self", "code": "theorem basisDivisor_self : basisDivisor x x = 0", "start": [ 153, 1 ], "end": [ 154, 67 ], "kind": "commanddeclaration" }, { "full_name": "Lagrange.basisDivisor_inj", "code": "theorem basisDivisor_inj (hxy : basisDivisor x y = 0) : x = y", "start": [ 157, 1 ], "end": [ 160, 12 ], "kind": "commanddeclaration" }, { "full_name": "Lagrange.basisDivisor_eq_zero_iff", "code": "@[simp]\ntheorem basisDivisor_eq_zero_iff : basisDivisor x y = 0 ↔ x = y", "start": [ 163, 1 ], "end": [ 165, 53 ], "kind": "commanddeclaration" }, { "full_name": "Lagrange.basisDivisor_ne_zero_iff", "code": "theorem basisDivisor_ne_zero_iff : basisDivisor x y ≠ 0 ↔ x ≠ y", "start": [ 168, 1 ], "end": [ 169, 36 ], "kind": "commanddeclaration" }, { "full_name": "Lagrange.degree_basisDivisor_of_ne", "code": "theorem degree_basisDivisor_of_ne (hxy : x ≠ y) : (basisDivisor x y).degree = 1", "start": [ 172, 1 ], "end": [ 174, 44 ], "kind": "commanddeclaration" }, { "full_name": "Lagrange.degree_basisDivisor_self", "code": "@[simp]\ntheorem degree_basisDivisor_self : (basisDivisor x x).degree = ⊥", "start": [ 177, 1 ], "end": [ 179, 38 ], "kind": "commanddeclaration" }, { "full_name": "Lagrange.natDegree_basisDivisor_self", "code": "theorem natDegree_basisDivisor_self : (basisDivisor x x).natDegree = 0", "start": [ 182, 1 ], "end": [ 183, 41 ], "kind": "commanddeclaration" }, { "full_name": "Lagrange.natDegree_basisDivisor_of_ne", "code": "theorem natDegree_basisDivisor_of_ne (hxy : x ≠ y) : (basisDivisor x y).natDegree = 1", "start": [ 186, 1 ], "end": [ 187, 65 ], "kind": "commanddeclaration" }, { "full_name": "Lagrange.eval_basisDivisor_right", "code": "@[simp]\ntheorem eval_basisDivisor_right : eval y (basisDivisor x y) = 0", "start": [ 190, 1 ], "end": [ 192, 83 ], "kind": "commanddeclaration" }, { "full_name": "Lagrange.eval_basisDivisor_left_of_ne", "code": "theorem eval_basisDivisor_left_of_ne (hxy : x ≠ y) : eval x (basisDivisor x y) = 1", "start": [ 195, 1 ], "end": [ 197, 47 ], "kind": "commanddeclaration" }, { "full_name": "Lagrange.basis", "code": "protected def basis (s : Finset ι) (v : ι → F) (i : ι) : F[X] :=\n ∏ j ∈ s.erase i, basisDivisor (v i) (v j)", "start": [ 209, 1 ], "end": [ 213, 44 ], "kind": "commanddeclaration" }, { "full_name": "Lagrange.basis_empty", "code": "@[simp]\ntheorem basis_empty : Lagrange.basis ∅ v i = 1", "start": [ 216, 1 ], "end": [ 218, 6 ], "kind": "commanddeclaration" }, { "full_name": "Lagrange.basis_singleton", "code": "@[simp]\ntheorem basis_singleton (i : ι) : Lagrange.basis {i} v i = 1", "start": [ 221, 1 ], "end": [ 223, 51 ], "kind": "commanddeclaration" }, { "full_name": "Lagrange.basis_pair_left", "code": "@[simp]\ntheorem basis_pair_left (hij : i ≠ j) : Lagrange.basis {i, j} v i = basisDivisor (v i) (v j)", "start": [ 226, 1 ], "end": [ 229, 35 ], "kind": "commanddeclaration" }, { "full_name": "Lagrange.basis_pair_right", "code": "@[simp]\ntheorem basis_pair_right (hij : i ≠ j) : Lagrange.basis {i, j} v j = basisDivisor (v j) (v i)", "start": [ 232, 1 ], "end": [ 235, 33 ], "kind": "commanddeclaration" }, { "full_name": "Lagrange.basis_ne_zero", "code": "theorem basis_ne_zero (hvs : Set.InjOn v s) (hi : i ∈ s) : Lagrange.basis s v i ≠ 0", "start": [ 238, 1 ], "end": [ 242, 17 ], "kind": "commanddeclaration" }, { "full_name": "Lagrange.eval_basis_self", "code": "@[simp]\ntheorem eval_basis_self (hvs : Set.InjOn v s) (hi : i ∈ s) :\n (Lagrange.basis s v i).eval (v i) = 1", "start": [ 245, 1 ], "end": [ 252, 32 ], "kind": "commanddeclaration" }, { "full_name": "Lagrange.eval_basis_of_ne", "code": "@[simp]\ntheorem eval_basis_of_ne (hij : i ≠ j) (hj : j ∈ s) : (Lagrange.basis s v i).eval (v j) = 0", "start": [ 255, 1 ], "end": [ 258, 69 ], "kind": "commanddeclaration" }, { "full_name": "Lagrange.natDegree_basis", "code": "@[simp]\ntheorem natDegree_basis (hvs : Set.InjOn v s) (hi : i ∈ s) :\n (Lagrange.basis s v i).natDegree = s.card - 1", "start": [ 261, 1 ], "end": [ 271, 15 ], "kind": "commanddeclaration" }, { "full_name": "Lagrange.degree_basis", "code": "theorem degree_basis (hvs : Set.InjOn v s) (hi : i ∈ s) :\n (Lagrange.basis s v i).degree = ↑(s.card - 1)", "start": [ 274, 1 ], "end": [ 276, 74 ], "kind": "commanddeclaration" }, { "full_name": "Lagrange.sum_basis", "code": "theorem sum_basis (hvs : Set.InjOn v s) (hs : s.Nonempty) :\n ∑ j ∈ s, Lagrange.basis s v j = 1", "start": [ 280, 1 ], "end": [ 294, 33 ], "kind": "commanddeclaration" }, { "full_name": "Lagrange.basisDivisor_add_symm", "code": "theorem basisDivisor_add_symm {x y : F} (hxy : x ≠ y) :\n basisDivisor x y + basisDivisor y x = 1", "start": [ 297, 1 ], "end": [ 302, 34 ], "kind": "commanddeclaration" }, { "full_name": "Lagrange.interpolate", "code": "@[simps]\ndef interpolate (s : Finset ι) (v : ι → F) : (ι → F) →ₗ[F] F[X] where\n toFun r := ∑ i ∈ s, C (r i) * Lagrange.basis s v i\n map_add' f g := by\n simp_rw [← Finset.sum_add_distrib]\n have h : (fun x => C (f x) * Lagrange.basis s v x + C (g x) * Lagrange.basis s v x) =\n (fun x => C ((f + g) x) * Lagrange.basis s v x) := by\n simp_rw [← add_mul, ← C_add, Pi.add_apply]\n rw [h]\n map_smul' c f := by\n simp_rw [Finset.smul_sum, C_mul', smul_smul, Pi.smul_apply, RingHom.id_apply, smul_eq_mul]", "start": [ 314, 1 ], "end": [ 327, 95 ], "kind": "commanddeclaration" }, { "full_name": "Lagrange.interpolate_empty", "code": "theorem interpolate_empty : interpolate ∅ v r = 0", "start": [ 332, 1 ], "end": [ 332, 90 ], "kind": "commanddeclaration" }, { "full_name": "Lagrange.interpolate_singleton", "code": "theorem interpolate_singleton : interpolate {i} v r = C (r i)", "start": [ 337, 1 ], "end": [ 338, 66 ], "kind": "commanddeclaration" }, { "full_name": "Lagrange.interpolate_one", "code": "theorem interpolate_one (hvs : Set.InjOn v s) (hs : s.Nonempty) : interpolate s v 1 = 1", "start": [ 341, 1 ], "end": [ 343, 25 ], "kind": "commanddeclaration" }, { "full_name": "Lagrange.eval_interpolate_at_node", "code": "theorem eval_interpolate_at_node (hvs : Set.InjOn v s) (hi : i ∈ s) :\n eval (v i) (interpolate s v r) = r i", "start": [ 346, 1 ], "end": [ 351, 56 ], "kind": "commanddeclaration" }, { "full_name": "Lagrange.degree_interpolate_le", "code": "theorem degree_interpolate_le (hvs : Set.InjOn v s) :\n (interpolate s v r).degree ≤ ↑(s.card - 1)", "start": [ 354, 1 ], "end": [ 362, 31 ], "kind": "commanddeclaration" }, { "full_name": "Lagrange.degree_interpolate_lt", "code": "theorem degree_interpolate_lt (hvs : Set.InjOn v s) : (interpolate s v r).degree < s.card", "start": [ 366, 1 ], "end": [ 373, 55 ], "kind": "commanddeclaration" }, { "full_name": "Lagrange.degree_interpolate_erase_lt", "code": "theorem degree_interpolate_erase_lt (hvs : Set.InjOn v s) (hi : i ∈ s) :\n (interpolate (s.erase i) v r).degree < ↑(s.card - 1)", "start": [ 376, 1 ], "end": [ 379, 89 ], "kind": "commanddeclaration" }, { "full_name": "Lagrange.values_eq_on_of_interpolate_eq", "code": "theorem values_eq_on_of_interpolate_eq (hvs : Set.InjOn v s)\n (hrr' : interpolate s v r = interpolate s v r') : ∀ i ∈ s, r i = r' i", "start": [ 382, 1 ], "end": [ 384, 85 ], "kind": "commanddeclaration" }, { "full_name": "Lagrange.interpolate_eq_of_values_eq_on", "code": "theorem interpolate_eq_of_values_eq_on (hrr' : ∀ i ∈ s, r i = r' i) :\n interpolate s v r = interpolate s v r'", "start": [ 387, 1 ], "end": [ 389, 46 ], "kind": "commanddeclaration" }, { "full_name": "Lagrange.interpolate_eq_iff_values_eq_on", "code": "theorem interpolate_eq_iff_values_eq_on (hvs : Set.InjOn v s) :\n interpolate s v r = interpolate s v r' ↔ ∀ i ∈ s, r i = r' i", "start": [ 392, 1 ], "end": [ 394, 79 ], "kind": "commanddeclaration" }, { "full_name": "Lagrange.eq_interpolate", "code": "theorem eq_interpolate {f : F[X]} (hvs : Set.InjOn v s) (degree_f_lt : f.degree < s.card) :\n f = interpolate s v fun i => f.eval (v i)", "start": [ 397, 1 ], "end": [ 400, 66 ], "kind": "commanddeclaration" }, { "full_name": "Lagrange.eq_interpolate_of_eval_eq", "code": "theorem eq_interpolate_of_eval_eq {f : F[X]} (hvs : Set.InjOn v s) (degree_f_lt : f.degree < s.card)\n (eval_f : ∀ i ∈ s, f.eval (v i) = r i) : f = interpolate s v r", "start": [ 403, 1 ], "end": [ 406, 50 ], "kind": "commanddeclaration" }, { "full_name": "Lagrange.eq_interpolate_iff", "code": "theorem eq_interpolate_iff {f : F[X]} (hvs : Set.InjOn v s) :\n (f.degree < s.card ∧ ∀ i ∈ s, eval (v i) f = r i) ↔ f = interpolate s v r", "start": [ 409, 1 ], "end": [ 417, 87 ], "kind": "commanddeclaration" }, { "full_name": "Lagrange.funEquivDegreeLT", "code": "def funEquivDegreeLT (hvs : Set.InjOn v s) : degreeLT F s.card ≃ₗ[F] s → F where\n toFun f i := f.1.eval (v i)\n map_add' f g := funext fun v => eval_add\n map_smul' c f := funext <| by simp\n invFun r :=\n ⟨interpolate s v fun x => if hx : x ∈ s then r ⟨x, hx⟩ else 0,\n mem_degreeLT.2 <| degree_interpolate_lt _ hvs⟩\n left_inv := by\n rintro ⟨f, hf⟩\n simp only [Subtype.mk_eq_mk, Subtype.coe_mk, dite_eq_ite]\n rw [mem_degreeLT] at hf\n conv => rhs; rw [eq_interpolate hvs hf]\n exact interpolate_eq_of_values_eq_on _ _ fun _ hi => if_pos hi\n right_inv := by\n intro f\n ext ⟨i, hi⟩\n simp only [Subtype.coe_mk, eval_interpolate_at_node _ hvs hi]\n exact dif_pos hi", "start": [ 420, 1 ], "end": [ 439, 21 ], "kind": "commanddeclaration" }, { "full_name": "Lagrange.interpolate_eq_sum_interpolate_insert_sdiff", "code": "theorem interpolate_eq_sum_interpolate_insert_sdiff (hvt : Set.InjOn v t) (hs : s.Nonempty)\n (hst : s ⊆ t) :\n interpolate t v r = ∑ i ∈ s, interpolate (insert i (t \\ s)) v r * Lagrange.basis s v i", "start": [ 443, 1 ], "end": [ 477, 62 ], "kind": "commanddeclaration" }, { "full_name": "Lagrange.interpolate_eq_add_interpolate_erase", "code": "theorem interpolate_eq_add_interpolate_erase (hvs : Set.InjOn v s) (hi : i ∈ s) (hj : j ∈ s)\n (hij : i ≠ j) :\n interpolate s v r =\n interpolate (s.erase j) v r * basisDivisor (v i) (v j) +\n interpolate (s.erase i) v r * basisDivisor (v j) (v i)", "start": [ 480, 1 ], "end": [ 491, 64 ], "kind": "commanddeclaration" }, { "full_name": "Lagrange.nodal", "code": "def nodal (s : Finset ι) (v : ι → R) : R[X] :=\n ∏ i ∈ s, (X - C (v i))", "start": [ 503, 1 ], "end": [ 512, 25 ], "kind": "commanddeclaration" }, { "full_name": "Lagrange.nodal_eq", "code": "theorem nodal_eq (s : Finset ι) (v : ι → R) : nodal s v = ∏ i ∈ s, (X - C (v i))", "start": [ 515, 1 ], "end": [ 516, 6 ], "kind": "commanddeclaration" }, { "full_name": "Lagrange.nodal_empty", "code": "@[simp]\ntheorem nodal_empty : nodal ∅ v = 1", "start": [ 519, 1 ], "end": [ 521, 6 ], "kind": "commanddeclaration" }, { "full_name": "Lagrange.natDegree_nodal", "code": "@[simp]\ntheorem natDegree_nodal [Nontrivial R] : (nodal s v).natDegree = s.card", "start": [ 524, 1 ], "end": [ 527, 56 ], "kind": "commanddeclaration" }, { "full_name": "Lagrange.nodal_ne_zero", "code": "theorem nodal_ne_zero [Nontrivial R] : nodal s v ≠ 0", "start": [ 529, 1 ], "end": [ 533, 42 ], "kind": "commanddeclaration" }, { "full_name": "Lagrange.degree_nodal", "code": "@[simp]\ntheorem degree_nodal [Nontrivial R] : (nodal s v).degree = s.card", "start": [ 535, 1 ], "end": [ 537, 63 ], "kind": "commanddeclaration" }, { "full_name": "Lagrange.nodal_monic", "code": "theorem nodal_monic : (nodal s v).Monic", "start": [ 540, 1 ], "end": [ 541, 76 ], "kind": "commanddeclaration" }, { "full_name": "Lagrange.eval_nodal", "code": "theorem eval_nodal {x : R} : (nodal s v).eval x = ∏ i ∈ s, (x - v i)", "start": [ 543, 1 ], "end": [ 544, 55 ], "kind": "commanddeclaration" }, { "full_name": "Lagrange.eval_nodal_at_node", "code": "theorem eval_nodal_at_node {i : ι} (hi : i ∈ s) : eval (v i) (nodal s v) = 0", "start": [ 547, 1 ], "end": [ 549, 43 ], "kind": "commanddeclaration" }, { "full_name": "Lagrange.eval_nodal_not_at_node", "code": "theorem eval_nodal_not_at_node [Nontrivial R] [NoZeroDivisors R] {x : R}\n (hx : ∀ i ∈ s, x ≠ v i) : eval x (nodal s v) ≠ 0", "start": [ 553, 1 ], "end": [ 556, 11 ], "kind": "commanddeclaration" }, { "full_name": "Lagrange.nodal_eq_mul_nodal_erase", "code": "theorem nodal_eq_mul_nodal_erase [DecidableEq ι] {i : ι} (hi : i ∈ s) :\n nodal s v = (X - C (v i)) * nodal (s.erase i) v", "start": [ 559, 1 ], "end": [ 561, 71 ], "kind": "commanddeclaration" }, { "full_name": "Lagrange.X_sub_C_dvd_nodal", "code": "theorem X_sub_C_dvd_nodal (v : ι → R) {i : ι} (hi : i ∈ s) : X - C (v i) ∣ nodal s v", "start": [ 564, 1 ], "end": [ 565, 54 ], "kind": "commanddeclaration" }, { "full_name": "Lagrange.nodal_insert_eq_nodal", "code": "theorem nodal_insert_eq_nodal [DecidableEq ι] {i : ι} (hi : i ∉ s) :\n nodal (insert i s) v = (X - C (v i)) * nodal s v", "start": [ 569, 1 ], "end": [ 571, 34 ], "kind": "commanddeclaration" }, { "full_name": "Lagrange.derivative_nodal", "code": "theorem derivative_nodal [DecidableEq ι] :\n derivative (nodal s v) = ∑ i ∈ s, nodal (s.erase i) v", "start": [ 574, 1 ], "end": [ 582, 55 ], "kind": "commanddeclaration" }, { "full_name": "Lagrange.eval_nodal_derivative_eval_node_eq", "code": "theorem eval_nodal_derivative_eval_node_eq [DecidableEq ι] {i : ι} (hi : i ∈ s) :\n eval (v i) (derivative (nodal s v)) = eval (v i) (nodal (s.erase i) v)", "start": [ 585, 1 ], "end": [ 588, 100 ], "kind": "commanddeclaration" }, { "full_name": "Lagrange.nodal_subgroup_eq_X_pow_card_sub_one", "code": "@[simp] theorem nodal_subgroup_eq_X_pow_card_sub_one [IsDomain R]\n (G : Subgroup Rˣ) [Fintype G] :\n nodal (G : Set Rˣ).toFinset ((↑) : Rˣ → R) = X ^ (Fintype.card G) - 1", "start": [ 591, 1 ], "end": [ 607, 60 ], "kind": "commanddeclaration" }, { "full_name": "Lagrange.nodalWeight", "code": "def nodalWeight (s : Finset ι) (v : ι → F) (i : ι) :=\n ∏ j ∈ s.erase i, (v i - v j)⁻¹", "start": [ 618, 1 ], "end": [ 620, 33 ], "kind": "commanddeclaration" }, { "full_name": "Lagrange.nodalWeight_eq_eval_nodal_erase_inv", "code": "theorem nodalWeight_eq_eval_nodal_erase_inv :\n nodalWeight s v i = (eval (v i) (nodal (s.erase i) v))⁻¹", "start": [ 623, 1 ], "end": [ 625, 49 ], "kind": "commanddeclaration" }, { "full_name": "Lagrange.nodal_erase_eq_nodal_div", "code": "theorem nodal_erase_eq_nodal_div (hi : i ∈ s) :\n nodal (s.erase i) v = nodal s v / (X - C (v i))", "start": [ 628, 1 ], "end": [ 631, 26 ], "kind": "commanddeclaration" }, { "full_name": "Lagrange.nodalWeight_eq_eval_nodal_derative", "code": "theorem nodalWeight_eq_eval_nodal_derative (hi : i ∈ s) :\n nodalWeight s v i = (eval (v i) (Polynomial.derivative (nodal s v)))⁻¹", "start": [ 634, 1 ], "end": [ 636, 82 ], "kind": "commanddeclaration" }, { "full_name": "Lagrange.nodalWeight_ne_zero", "code": "theorem nodalWeight_ne_zero (hvs : Set.InjOn v s) (hi : i ∈ s) : nodalWeight s v i ≠ 0", "start": [ 639, 1 ], "end": [ 643, 76 ], "kind": "commanddeclaration" }, { "full_name": "Lagrange.basis_eq_prod_sub_inv_mul_nodal_div", "code": "theorem basis_eq_prod_sub_inv_mul_nodal_div (hi : i ∈ s) :\n Lagrange.basis s v i = C (nodalWeight s v i) * (nodal s v / (X - C (v i)))", "start": [ 655, 1 ], "end": [ 658, 40 ], "kind": "commanddeclaration" }, { "full_name": "Lagrange.eval_basis_not_at_node", "code": "theorem eval_basis_not_at_node (hi : i ∈ s) (hxi : x ≠ v i) :\n eval x (Lagrange.basis s v i) = eval x (nodal s v) * (nodalWeight s v i * (x - v i)⁻¹)", "start": [ 661, 1 ], "end": [ 665, 76 ], "kind": "commanddeclaration" }, { "full_name": "Lagrange.interpolate_eq_nodalWeight_mul_nodal_div_X_sub_C", "code": "theorem interpolate_eq_nodalWeight_mul_nodal_div_X_sub_C :\n interpolate s v r = ∑ i ∈ s, C (nodalWeight s v i) * (nodal s v / (X - C (v i))) * C (r i)", "start": [ 668, 1 ], "end": [ 670, 85 ], "kind": "commanddeclaration" }, { "full_name": "Lagrange.eval_interpolate_not_at_node", "code": "theorem eval_interpolate_not_at_node (hx : ∀ i ∈ s, x ≠ v i) :\n eval x (interpolate s v r) =\n eval x (nodal s v) * ∑ i ∈ s, nodalWeight s v i * (x - v i)⁻¹ * r i", "start": [ 674, 1 ], "end": [ 680, 66 ], "kind": "commanddeclaration" }, { "full_name": "Lagrange.sum_nodalWeight_mul_inv_sub_ne_zero", "code": "theorem sum_nodalWeight_mul_inv_sub_ne_zero (hvs : Set.InjOn v s) (hx : ∀ i ∈ s, x ≠ v i)\n (hs : s.Nonempty) : (∑ i ∈ s, nodalWeight s v i * (x - v i)⁻¹) ≠ 0", "start": [ 683, 1 ], "end": [ 687, 47 ], "kind": "commanddeclaration" }, { "full_name": "Lagrange.eval_interpolate_not_at_node'", "code": "theorem eval_interpolate_not_at_node' (hvs : Set.InjOn v s) (hs : s.Nonempty)\n (hx : ∀ i ∈ s, x ≠ v i) :\n eval x (interpolate s v r) =\n (∑ i ∈ s, nodalWeight s v i * (x - v i)⁻¹ * r i) /\n ∑ i ∈ s, nodalWeight s v i * (x - v i)⁻¹", "start": [ 690, 1 ], "end": [ 698, 86 ], "kind": "commanddeclaration" } ]
Mathlib/LinearAlgebra/Matrix/IsDiag.lean
[ "Mathlib/LinearAlgebra/Matrix/Symmetric.lean", ".lake/packages/lean4/src/lean/Init.lean", "Mathlib/Data/Matrix/Kronecker.lean", "Mathlib/LinearAlgebra/Matrix/Orthogonal.lean" ]
[ { "full_name": "Matrix.IsDiag", "code": "def IsDiag [Zero α] (A : Matrix n n α) : Prop :=\n Pairwise fun i j => A i j = 0", "start": [ 35, 1 ], "end": [ 37, 32 ], "kind": "commanddeclaration" }, { "full_name": "Matrix.isDiag_diagonal", "code": "@[simp]\ntheorem isDiag_diagonal [Zero α] [DecidableEq n] (d : n → α) : (diagonal d).IsDiag", "start": [ 40, 1 ], "end": [ 42, 29 ], "kind": "commanddeclaration" }, { "full_name": "Matrix.IsDiag.diagonal_diag", "code": "theorem IsDiag.diagonal_diag [Zero α] [DecidableEq n] {A : Matrix n n α} (h : A.IsDiag) :\n diagonal (diag A) = A", "start": [ 45, 1 ], "end": [ 51, 42 ], "kind": "commanddeclaration" }, { "full_name": "Matrix.isDiag_iff_diagonal_diag", "code": "theorem isDiag_iff_diagonal_diag [Zero α] [DecidableEq n] (A : Matrix n n α) :\n A.IsDiag ↔ diagonal (diag A) = A", "start": [ 54, 1 ], "end": [ 57, 66 ], "kind": "commanddeclaration" }, { "full_name": "Matrix.isDiag_of_subsingleton", "code": "theorem isDiag_of_subsingleton [Zero α] [Subsingleton n] (A : Matrix n n α) : A.IsDiag", "start": [ 60, 1 ], "end": [ 62, 49 ], "kind": "commanddeclaration" }, { "full_name": "Matrix.isDiag_zero", "code": "@[simp]\ntheorem isDiag_zero [Zero α] : (0 : Matrix n n α).IsDiag", "start": [ 65, 1 ], "end": [ 67, 77 ], "kind": "commanddeclaration" }, { "full_name": "Matrix.isDiag_one", "code": "@[simp]\ntheorem isDiag_one [DecidableEq n] [Zero α] [One α] : (1 : Matrix n n α).IsDiag", "start": [ 70, 1 ], "end": [ 73, 15 ], "kind": "commanddeclaration" }, { "full_name": "Matrix.IsDiag.map", "code": "theorem IsDiag.map [Zero α] [Zero β] {A : Matrix n n α} (ha : A.IsDiag) {f : α → β} (hf : f 0 = 0) :\n (A.map f).IsDiag", "start": [ 76, 1 ], "end": [ 79, 18 ], "kind": "commanddeclaration" }, { "full_name": "Matrix.IsDiag.neg", "code": "theorem IsDiag.neg [AddGroup α] {A : Matrix n n α} (ha : A.IsDiag) : (-A).IsDiag", "start": [ 82, 1 ], "end": [ 84, 14 ], "kind": "commanddeclaration" }, { "full_name": "Matrix.isDiag_neg_iff", "code": "@[simp]\ntheorem isDiag_neg_iff [AddGroup α] {A : Matrix n n α} : (-A).IsDiag ↔ A.IsDiag", "start": [ 87, 1 ], "end": [ 89, 53 ], "kind": "commanddeclaration" }, { "full_name": "Matrix.IsDiag.add", "code": "theorem IsDiag.add [AddZeroClass α] {A B : Matrix n n α} (ha : A.IsDiag) (hb : B.IsDiag) :\n (A + B).IsDiag", "start": [ 92, 1 ], "end": [ 95, 20 ], "kind": "commanddeclaration" }, { "full_name": "Matrix.IsDiag.sub", "code": "theorem IsDiag.sub [AddGroup α] {A B : Matrix n n α} (ha : A.IsDiag) (hb : B.IsDiag) :\n (A - B).IsDiag", "start": [ 98, 1 ], "end": [ 101, 20 ], "kind": "commanddeclaration" }, { "full_name": "Matrix.IsDiag.smul", "code": "theorem IsDiag.smul [Monoid R] [AddMonoid α] [DistribMulAction R α] (k : R) {A : Matrix n n α}\n (ha : A.IsDiag) : (k • A).IsDiag", "start": [ 104, 1 ], "end": [ 107, 14 ], "kind": "commanddeclaration" }, { "full_name": "Matrix.isDiag_smul_one", "code": "@[simp]\ntheorem isDiag_smul_one (n) [Semiring α] [DecidableEq n] (k : α) :\n (k • (1 : Matrix n n α)).IsDiag", "start": [ 110, 1 ], "end": [ 113, 20 ], "kind": "commanddeclaration" }, { "full_name": "Matrix.IsDiag.transpose", "code": "theorem IsDiag.transpose [Zero α] {A : Matrix n n α} (ha : A.IsDiag) : Aᵀ.IsDiag", "start": [ 116, 1 ], "end": [ 117, 12 ], "kind": "commanddeclaration" }, { "full_name": "Matrix.isDiag_transpose_iff", "code": "@[simp]\ntheorem isDiag_transpose_iff [Zero α] {A : Matrix n n α} : Aᵀ.IsDiag ↔ A.IsDiag", "start": [ 120, 1 ], "end": [ 122, 39 ], "kind": "commanddeclaration" }, { "full_name": "Matrix.IsDiag.conjTranspose", "code": "theorem IsDiag.conjTranspose [Semiring α] [StarRing α] {A : Matrix n n α} (ha : A.IsDiag) :\n Aᴴ.IsDiag", "start": [ 125, 1 ], "end": [ 127, 33 ], "kind": "commanddeclaration" }, { "full_name": "Matrix.isDiag_conjTranspose_iff", "code": "@[simp]\ntheorem isDiag_conjTranspose_iff [Semiring α] [StarRing α] {A : Matrix n n α} :\n Aᴴ.IsDiag ↔ A.IsDiag", "start": [ 130, 1 ], "end": [ 135, 32 ], "kind": "commanddeclaration" }, { "full_name": "Matrix.IsDiag.submatrix", "code": "theorem IsDiag.submatrix [Zero α] {A : Matrix n n α} (ha : A.IsDiag) {f : m → n}\n (hf : Injective f) : (A.submatrix f f).IsDiag", "start": [ 138, 1 ], "end": [ 139, 79 ], "kind": "commanddeclaration" }, { "full_name": "Matrix.IsDiag.kronecker", "code": "theorem IsDiag.kronecker [MulZeroClass α] {A : Matrix m m α} {B : Matrix n n α} (hA : A.IsDiag)\n (hB : B.IsDiag) : (A ⊗ₖ B).IsDiag", "start": [ 142, 1 ], "end": [ 149, 18 ], "kind": "commanddeclaration" }, { "full_name": "Matrix.IsDiag.isSymm", "code": "theorem IsDiag.isSymm [Zero α] {A : Matrix n n α} (h : A.IsDiag) : A.IsSymm", "start": [ 152, 1 ], "end": [ 155, 28 ], "kind": "commanddeclaration" }, { "full_name": "Matrix.IsDiag.fromBlocks", "code": "theorem IsDiag.fromBlocks [Zero α] {A : Matrix m m α} {D : Matrix n n α} (ha : A.IsDiag)\n (hd : D.IsDiag) : (A.fromBlocks 0 0 D).IsDiag", "start": [ 158, 1 ], "end": [ 165, 36 ], "kind": "commanddeclaration" }, { "full_name": "Matrix.isDiag_fromBlocks_iff", "code": "theorem isDiag_fromBlocks_iff [Zero α] {A : Matrix m m α} {B : Matrix m n α} {C : Matrix n m α}\n {D : Matrix n n α} : (A.fromBlocks B C D).IsDiag ↔ A.IsDiag ∧ B = 0 ∧ C = 0 ∧ D.IsDiag", "start": [ 168, 1 ], "end": [ 179, 36 ], "kind": "commanddeclaration" }, { "full_name": "Matrix.IsDiag.fromBlocks_of_isSymm", "code": "theorem IsDiag.fromBlocks_of_isSymm [Zero α] {A : Matrix m m α} {C : Matrix n m α}\n {D : Matrix n n α} (h : (A.fromBlocks 0 C D).IsSymm) (ha : A.IsDiag) (hd : D.IsDiag) :\n (A.fromBlocks 0 C D).IsDiag", "start": [ 182, 1 ], "end": [ 188, 25 ], "kind": "commanddeclaration" }, { "full_name": "Matrix.mul_transpose_self_isDiag_iff_hasOrthogonalRows", "code": "theorem mul_transpose_self_isDiag_iff_hasOrthogonalRows [Fintype n] [Mul α] [AddCommMonoid α]\n {A : Matrix m n α} : (A * Aᵀ).IsDiag ↔ A.HasOrthogonalRows", "start": [ 191, 1 ], "end": [ 193, 10 ], "kind": "commanddeclaration" }, { "full_name": "Matrix.transpose_mul_self_isDiag_iff_hasOrthogonalCols", "code": "theorem transpose_mul_self_isDiag_iff_hasOrthogonalCols [Fintype m] [Mul α] [AddCommMonoid α]\n {A : Matrix m n α} : (Aᵀ * A).IsDiag ↔ A.HasOrthogonalCols", "start": [ 196, 1 ], "end": [ 198, 10 ], "kind": "commanddeclaration" } ]
Mathlib/Topology/Sheaves/Sheafify.lean
[ "Mathlib/Topology/Sheaves/Stalks.lean", ".lake/packages/lean4/src/lean/Init.lean", "Mathlib/Topology/Sheaves/LocalPredicate.lean" ]
[ { "full_name": "TopCat.Presheaf.Sheafify.isGerm", "code": "def isGerm : PrelocalPredicate fun x => F.stalk x where\n pred {U} f := ∃ g : F.obj (op U), ∀ x : U, f x = F.germ x g\n res := fun i _ ⟨g, p⟩ => ⟨F.map i.op g, fun x => (p (i x)).trans (F.germ_res_apply i x g).symm⟩", "start": [ 46, 1 ], "end": [ 51, 98 ], "kind": "commanddeclaration" }, { "full_name": "TopCat.Presheaf.Sheafify.isLocallyGerm", "code": "def isLocallyGerm : LocalPredicate fun x => F.stalk x :=\n (isGerm F).sheafify", "start": [ 54, 1 ], "end": [ 58, 22 ], "kind": "commanddeclaration" }, { "full_name": "TopCat.Presheaf.sheafify", "code": "def sheafify : Sheaf (Type v) X :=\n subsheafToTypes (Sheafify.isLocallyGerm F)", "start": [ 63, 1 ], "end": [ 67, 45 ], "kind": "commanddeclaration" }, { "full_name": "TopCat.Presheaf.toSheafify", "code": "def toSheafify : F ⟶ F.sheafify.1 where\n app U f := ⟨fun x => F.germ x f, PrelocalPredicate.sheafifyOf ⟨f, fun x => rfl⟩⟩\n naturality U U' f := by\n ext x\n apply Subtype.ext ext ⟨u, m⟩\n exact germ_res_apply F f.unop ⟨u, m⟩ x", "start": [ 70, 1 ], "end": [ 80, 43 ], "kind": "commanddeclaration" }, { "full_name": "TopCat.Presheaf.stalkToFiber", "code": "def stalkToFiber (x : X) : F.sheafify.presheaf.stalk x ⟶ F.stalk x :=\n TopCat.stalkToFiber (Sheafify.isLocallyGerm F) x", "start": [ 83, 1 ], "end": [ 87, 51 ], "kind": "commanddeclaration" }, { "full_name": "TopCat.Presheaf.stalkToFiber_surjective", "code": "theorem stalkToFiber_surjective (x : X) : Function.Surjective (F.stalkToFiber x)", "start": [ 90, 1 ], "end": [ 97, 64 ], "kind": "commanddeclaration" }, { "full_name": "TopCat.Presheaf.stalkToFiber_injective", "code": "theorem stalkToFiber_injective (x : X) : Function.Injective (F.stalkToFiber x)", "start": [ 100, 1 ], "end": [ 121, 76 ], "kind": "commanddeclaration" }, { "full_name": "TopCat.Presheaf.sheafifyStalkIso", "code": "def sheafifyStalkIso (x : X) : F.sheafify.presheaf.stalk x ≅ F.stalk x :=\n (Equiv.ofBijective _ ⟨stalkToFiber_injective _ _, stalkToFiber_surjective _ _⟩).toIso", "start": [ 124, 1 ], "end": [ 127, 88 ], "kind": "commanddeclaration" } ]
Mathlib/FieldTheory/IsAlgClosed/Classification.lean
[ "Mathlib/Algebra/Polynomial/Cardinal.lean", "Mathlib/Algebra/MvPolynomial/Cardinal.lean", "Mathlib/FieldTheory/IsAlgClosed/Basic.lean", "Mathlib/RingTheory/AlgebraicIndependent.lean", ".lake/packages/lean4/src/lean/Init.lean", "Mathlib/Data/ZMod/Algebra.lean" ]
[ { "full_name": "Algebra.IsAlgebraic.cardinal_mk_le_sigma_polynomial", "code": "theorem cardinal_mk_le_sigma_polynomial :\n #L ≤ #(Σ p : R[X], { x : L // x ∈ p.aroots L })", "start": [ 41, 1 ], "end": [ 59, 53 ], "kind": "commanddeclaration" }, { "full_name": "Algebra.IsAlgebraic.cardinal_mk_le_max", "code": "theorem cardinal_mk_le_max : #L ≤ max #R ℵ₀", "start": [ 62, 1 ], "end": [ 76, 87 ], "kind": "commanddeclaration" }, { "full_name": "IsAlgClosed.isAlgClosure_of_transcendence_basis", "code": "theorem isAlgClosure_of_transcendence_basis [IsAlgClosed K] (hv : IsTranscendenceBasis R v) :\n IsAlgClosure (Algebra.adjoin R (Set.range v)) K", "start": [ 96, 1 ], "end": [ 100, 34 ], "kind": "commanddeclaration" }, { "full_name": "IsAlgClosed.equivOfTranscendenceBasis", "code": "def equivOfTranscendenceBasis [IsAlgClosed K] [IsAlgClosed L] (e : ι ≃ κ)\n (hv : IsTranscendenceBasis R v) (hw : IsTranscendenceBasis R w) : K ≃+* L := by\n letI := isAlgClosure_of_transcendence_basis v hv\n letI := isAlgClosure_of_transcendence_basis w hw\n have e : Algebra.adjoin R (Set.range v) ≃+* Algebra.adjoin R (Set.range w) := by\n refine hv.1.aevalEquiv.symm.toRingEquiv.trans ?_\n refine (AlgEquiv.ofAlgHom (MvPolynomial.rename e)\n (MvPolynomial.rename e.symm) ?_ ?_).toRingEquiv.trans ?_\n · ext; simp\n · ext; simp\n exact hw.1.aevalEquiv.toRingEquiv\n exact IsAlgClosure.equivOfEquiv K L e", "start": [ 105, 1 ], "end": [ 119, 40 ], "kind": "commanddeclaration" }, { "full_name": "IsAlgClosed.cardinal_le_max_transcendence_basis", "code": "theorem cardinal_le_max_transcendence_basis (hv : IsTranscendenceBasis R v) :\n #K ≤ max (max #R #ι) ℵ₀", "start": [ 133, 1 ], "end": [ 141, 33 ], "kind": "commanddeclaration" }, { "full_name": "IsAlgClosed.cardinal_eq_cardinal_transcendence_basis_of_aleph0_lt", "code": "theorem cardinal_eq_cardinal_transcendence_basis_of_aleph0_lt [Nontrivial R]\n (hv : IsTranscendenceBasis R v) (hR : #R ≤ ℵ₀) (hK : ℵ₀ < #K) : #K = #ι", "start": [ 144, 1 ], "end": [ 159, 73 ], "kind": "commanddeclaration" }, { "full_name": "IsAlgClosed.ringEquivOfCardinalEqOfCharZero", "code": "theorem ringEquivOfCardinalEqOfCharZero [CharZero K] [CharZero L] (hK : ℵ₀ < #K)\n (hKL : #K = #L) : Nonempty (K ≃+* L)", "start": [ 166, 1 ], "end": [ 179, 48 ], "kind": "commanddeclaration" }, { "full_name": "IsAlgClosed.ringEquivOfCardinalEqOfCharP", "code": "private theorem ringEquivOfCardinalEqOfCharP (p : ℕ) [Fact p.Prime] [CharP K p] [CharP L p]\n (hK : ℵ₀ < #K) (hKL : #K = #L) : Nonempty (K ≃+* L)", "start": [ 182, 1 ], "end": [ 197, 48 ], "kind": "commanddeclaration" }, { "full_name": "IsAlgClosed.ringEquivOfCardinalEqOfCharEq", "code": "theorem ringEquivOfCardinalEqOfCharEq (p : ℕ) [CharP K p] [CharP L p] (hK : ℵ₀ < #K)\n (hKL : #K = #L) : Nonempty (K ≃+* L)", "start": [ 199, 1 ], "end": [ 209, 49 ], "kind": "commanddeclaration" } ]
Mathlib/Analysis/Convex/AmpleSet.lean
[ ".lake/packages/lean4/src/lean/Init.lean", "Mathlib/LinearAlgebra/AffineSpace/ContinuousAffineEquiv.lean", "Mathlib/Analysis/Convex/Normed.lean", "Mathlib/Analysis/NormedSpace/Connected.lean" ]
[ { "full_name": "AmpleSet", "code": "def AmpleSet (s : Set F) : Prop :=\n ∀ x ∈ s, convexHull ℝ (connectedComponentIn s x) = univ", "start": [ 46, 1 ], "end": [ 49, 58 ], "kind": "commanddeclaration" }, { "full_name": "ampleSet_univ", "code": "@[simp]\ntheorem ampleSet_univ {F : Type*} [NormedAddCommGroup F] [NormedSpace ℝ F] :\n AmpleSet (univ : Set F)", "start": [ 51, 1 ], "end": [ 56, 96 ], "kind": "commanddeclaration" }, { "full_name": "ampleSet_empty", "code": "@[simp]\ntheorem ampleSet_empty : AmpleSet (∅ : Set F)", "start": [ 58, 1 ], "end": [ 60, 68 ], "kind": "commanddeclaration" }, { "full_name": "AmpleSet.union", "code": "theorem union {s t : Set F} (hs : AmpleSet s) (ht : AmpleSet t) : AmpleSet (s ∪ t)", "start": [ 64, 1 ], "end": [ 74, 54 ], "kind": "commanddeclaration" }, { "full_name": "AmpleSet.image", "code": "theorem image {s : Set E} (h : AmpleSet s) (L : E ≃ᵃL[ℝ] F) :\n AmpleSet (L '' s)", "start": [ 78, 1 ], "end": [ 86, 66 ], "kind": "commanddeclaration" }, { "full_name": "AmpleSet.image_iff", "code": "theorem image_iff {s : Set E} (L : E ≃ᵃL[ℝ] F) :\n AmpleSet (L '' s) ↔ AmpleSet s", "start": [ 88, 1 ], "end": [ 91, 71 ], "kind": "commanddeclaration" }, { "full_name": "AmpleSet.preimage", "code": "theorem preimage {s : Set F} (h : AmpleSet s) (L : E ≃ᵃL[ℝ] F) : AmpleSet (L ⁻¹' s)", "start": [ 93, 1 ], "end": [ 96, 23 ], "kind": "commanddeclaration" }, { "full_name": "AmpleSet.preimage_iff", "code": "theorem preimage_iff {s : Set F} (L : E ≃ᵃL[ℝ] F) :\n AmpleSet (L ⁻¹' s) ↔ AmpleSet s", "start": [ 98, 1 ], "end": [ 101, 65 ], "kind": "commanddeclaration" }, { "full_name": "AmpleSet.vadd", "code": "theorem vadd [ContinuousAdd E] {s : Set E} (h : AmpleSet s) {y : E} :\n AmpleSet (y +ᵥ s)", "start": [ 105, 1 ], "end": [ 108, 50 ], "kind": "commanddeclaration" }, { "full_name": "AmpleSet.vadd_iff", "code": "theorem vadd_iff [ContinuousAdd E] {s : Set E} {y : E} :\n AmpleSet (y +ᵥ s) ↔ AmpleSet s", "start": [ 110, 1 ], "end": [ 113, 61 ], "kind": "commanddeclaration" }, { "full_name": "AmpleSet.of_one_lt_codim", "code": "theorem of_one_lt_codim [TopologicalAddGroup F] [ContinuousSMul ℝ F] {E : Submodule ℝ F}\n (hcodim : 1 < Module.rank ℝ (F ⧸ E)) :\n AmpleSet (Eᶜ : Set F)", "start": [ 118, 1 ], "end": [ 132, 45 ], "kind": "commanddeclaration" } ]
Mathlib/Analysis/MellinInversion.lean
[ "Mathlib/Analysis/Fourier/Inversion.lean", ".lake/packages/lean4/src/lean/Init.lean" ]
[ { "full_name": "rexp_neg_deriv_aux", "code": "private theorem rexp_neg_deriv_aux :\n ∀ x ∈ univ, HasDerivWithinAt (rexp ∘ Neg.neg) (-rexp (-x)) univ x", "start": [ 23, 1 ], "end": [ 26, 76 ], "kind": "commanddeclaration" }, { "full_name": "rexp_neg_image_aux", "code": "private theorem rexp_neg_image_aux : rexp ∘ Neg.neg '' univ = Ioi 0", "start": [ 28, 1 ], "end": [ 29, 99 ], "kind": "commanddeclaration" }, { "full_name": "rexp_neg_injOn_aux", "code": "private theorem rexp_neg_injOn_aux : univ.InjOn (rexp ∘ Neg.neg)", "start": [ 31, 1 ], "end": [ 32, 73 ], "kind": "commanddeclaration" }, { "full_name": "rexp_cexp_aux", "code": "private theorem rexp_cexp_aux (x : ℝ) (s : ℂ) (f : E) :\n rexp (-x) • cexp (-↑x) ^ (s - 1) • f = cexp (-s * ↑x) • f", "start": [ 34, 1 ], "end": [ 42, 10 ], "kind": "commanddeclaration" }, { "full_name": "mellin_eq_fourierIntegral", "code": "theorem mellin_eq_fourierIntegral (f : ℝ → E) {s : ℂ} :\n mellin f s = 𝓕 (fun (u : ℝ) ↦ (Real.exp (-s.re * u) • f (Real.exp (-u)))) (s.im / (2 * π))", "start": [ 44, 1 ], "end": [ 67, 33 ], "kind": "commanddeclaration" }, { "full_name": "mellinInv_eq_fourierIntegralInv", "code": "theorem mellinInv_eq_fourierIntegralInv (σ : ℝ) (f : ℂ → E) {x : ℝ} (hx : 0 < x) :\n mellinInv σ f x =\n (x : ℂ) ^ (-σ : ℂ) • 𝓕⁻ (fun (y : ℝ) ↦ f (σ + 2 * π * y * I)) (-Real.log x)", "start": [ 69, 1 ], "end": [ 84, 34 ], "kind": "commanddeclaration" }, { "full_name": "mellin_inversion", "code": "theorem mellin_inversion (σ : ℝ) (f : ℝ → E) {x : ℝ} (hx : 0 < x) (hf : MellinConvergent f σ)\n (hFf : VerticalIntegrable (mellin f) σ) (hfx : ContinuousAt f x) :\n mellinInv σ (mellin f) x = f x", "start": [ 88, 1 ], "end": [ 121, 68 ], "kind": "commanddeclaration" } ]
Mathlib/Data/BitVec.lean
[ "Mathlib/Algebra/Ring/InjSurj.lean", ".lake/packages/lean4/src/lean/Init.lean", "Mathlib/Data/ZMod/Defs.lean" ]
[ { "full_name": "BitVec.toNat_injective", "code": "theorem toNat_injective {n : Nat} : Function.Injective (BitVec.toNat : BitVec n → _)", "start": [ 27, 1 ], "end": [ 28, 31 ], "kind": "commanddeclaration" }, { "full_name": "BitVec.toFin_injective", "code": "theorem toFin_injective {n : Nat} : Function.Injective (toFin : BitVec n → _)", "start": [ 30, 1 ], "end": [ 31, 31 ], "kind": "commanddeclaration" }, { "full_name": "BitVec.toFin_nsmul", "code": "lemma toFin_nsmul (n : ℕ) (x : BitVec w) : toFin (n • x) = n • x.toFin := rfl", "start": [ 42, 1 ], "end": [ 42, 79 ], "kind": "lemma" }, { "full_name": "BitVec.toFin_zsmul", "code": "lemma toFin_zsmul (z : ℤ) (x : BitVec w) : toFin (z • x) = z • x.toFin := rfl", "start": [ 43, 1 ], "end": [ 43, 79 ], "kind": "lemma" }, { "full_name": "BitVec.toFin_pow", "code": "lemma toFin_pow (x : BitVec w) (n : ℕ) : toFin (x ^ n) = x.toFin ^ n := rfl", "start": [ 44, 1 ], "end": [ 44, 79 ], "kind": "lemma" } ]
Mathlib/CategoryTheory/FiberedCategory/BasedCategory.lean
[ "Mathlib/CategoryTheory/Functor/ReflectsIso.lean", "Mathlib/CategoryTheory/Bicategory/Strict.lean", "Mathlib/CategoryTheory/FiberedCategory/HomLift.lean", ".lake/packages/lean4/src/lean/Init.lean", "Mathlib/CategoryTheory/Functor/Category.lean" ]
[ { "full_name": "CategoryTheory.BasedCategory", "code": "@[nolint checkUnivs]\nstructure BasedCategory (𝒮 : Type u₁) [Category.{v₁} 𝒮] where\n \n obj : Type u₂\n \n category : Category.{v₂} obj := by infer_instance\n \n p : obj ⥤ 𝒮", "start": [ 36, 1 ], "end": [ 44, 14 ], "kind": "commanddeclaration" }, { "full_name": "CategoryTheory.BasedCategory.ofFunctor", "code": "def BasedCategory.ofFunctor {𝒳 : Type u₂} [Category.{v₂} 𝒳] (p : 𝒳 ⥤ 𝒮) : BasedCategory 𝒮 where\n obj := 𝒳\n p := p", "start": [ 48, 1 ], "end": [ 51, 9 ], "kind": "commanddeclaration" }, { "full_name": "CategoryTheory.BasedFunctor", "code": "structure BasedFunctor (𝒳 : BasedCategory.{v₂, u₂} 𝒮) (𝒴 : BasedCategory.{v₃, u₃} 𝒮) extends\n 𝒳.obj ⥤ 𝒴.obj where\n w : toFunctor ⋙ 𝒴.p = 𝒳.p := by aesop_cat", "start": [ 53, 1 ], "end": [ 57, 44 ], "kind": "commanddeclaration" }, { "full_name": "CategoryTheory.BasedFunctor.id", "code": "@[simps]\ndef id (𝒳 : BasedCategory.{v₂, u₂} 𝒮) : 𝒳 ⥤ᵇ 𝒳 where\n toFunctor := 𝟭 𝒳.obj", "start": [ 66, 1 ], "end": [ 69, 23 ], "kind": "commanddeclaration" }, { "full_name": "CategoryTheory.BasedFunctor.comp", "code": "@[simps]\ndef comp {𝒵 : BasedCategory.{v₄, u₄} 𝒮} (F : 𝒳 ⥤ᵇ 𝒴) (G : 𝒴 ⥤ᵇ 𝒵) : 𝒳 ⥤ᵇ 𝒵 where\n toFunctor := F.toFunctor ⋙ G.toFunctor\n w := by rw [Functor.assoc, G.w, F.w]", "start": [ 76, 1 ], "end": [ 80, 39 ], "kind": "commanddeclaration" }, { "full_name": "CategoryTheory.BasedFunctor.comp_id", "code": "@[simp]\nlemma comp_id (F : 𝒳 ⥤ᵇ 𝒴) : F ⋙ 𝟭 𝒴 = F :=\n rfl", "start": [ 85, 1 ], "end": [ 87, 6 ], "kind": "lemma" }, { "full_name": "CategoryTheory.BasedFunctor.id_comp", "code": "@[simp]\nlemma id_comp (F : 𝒳 ⥤ᵇ 𝒴) : 𝟭 𝒳 ⋙ F = F :=\n rfl", "start": [ 89, 1 ], "end": [ 91, 6 ], "kind": "lemma" }, { "full_name": "CategoryTheory.BasedFunctor.comp_assoc", "code": "@[simp]\nlemma comp_assoc {𝒵 : BasedCategory.{v₄, u₄} 𝒮} {𝒜 : BasedCategory.{v₅, u₅} 𝒮} (F : 𝒳 ⥤ᵇ 𝒴)\n (G : 𝒴 ⥤ᵇ 𝒵) (H : 𝒵 ⥤ᵇ 𝒜) : (F ⋙ G) ⋙ H = F ⋙ (G ⋙ H) :=\n rfl", "start": [ 93, 1 ], "end": [ 96, 6 ], "kind": "lemma" }, { "full_name": "CategoryTheory.BasedFunctor.w_obj", "code": "@[simp]\nlemma w_obj (F : 𝒳 ⥤ᵇ 𝒴) (a : 𝒳.obj) : 𝒴.p.obj (F.obj a) = 𝒳.p.obj a := by\n rw [← Functor.comp_obj, F.w]", "start": [ 98, 1 ], "end": [ 100, 31 ], "kind": "lemma" }, { "full_name": "CategoryTheory.BasedFunctor.preserves_isHomLift", "code": "instance preserves_isHomLift [IsHomLift 𝒳.p f φ] : IsHomLift 𝒴.p f (F.map φ) := by\n apply of_fac 𝒴.p f (F.map φ) (Eq.trans (F.w_obj a) (domain_eq 𝒳.p f φ))\n (Eq.trans (F.w_obj b) (codomain_eq 𝒳.p f φ))\n rw [← Functor.comp_map, congr_hom F.w]\n simpa using (fac 𝒳.p f φ)", "start": [ 109, 1 ], "end": [ 115, 28 ], "kind": "commanddeclaration" }, { "full_name": "CategoryTheory.BasedFunctor.isHomLift_map", "code": "lemma isHomLift_map [IsHomLift 𝒴.p f (F.map φ)] : IsHomLift 𝒳.p f φ := by\n apply of_fac 𝒳.p f φ (F.w_obj a ▸ domain_eq 𝒴.p f (F.map φ))\n (F.w_obj b ▸ codomain_eq 𝒴.p f (F.map φ))\n simp [congr_hom F.w.symm, fac 𝒴.p f (F.map φ)]", "start": [ 117, 1 ], "end": [ 122, 49 ], "kind": "lemma" }, { "full_name": "CategoryTheory.BasedFunctor.isHomLift_iff", "code": "lemma isHomLift_iff : IsHomLift 𝒴.p f (F.map φ) ↔ IsHomLift 𝒳.p f φ :=\n ⟨fun _ ↦ isHomLift_map F f φ, fun _ ↦ preserves_isHomLift F f φ⟩", "start": [ 124, 1 ], "end": [ 125, 67 ], "kind": "lemma" }, { "full_name": "CategoryTheory.BasedNatTrans", "code": "structure BasedNatTrans {𝒳 : BasedCategory.{v₂, u₂} 𝒮} {𝒴 : BasedCategory.{v₃, u₃} 𝒮}\n (F G : 𝒳 ⥤ᵇ 𝒴) extends CategoryTheory.NatTrans F.toFunctor G.toFunctor where\n isHomLift' : ∀ (a : 𝒳.obj), IsHomLift 𝒴.p (𝟙 (𝒳.p.obj a)) (toNatTrans.app a) := by aesop_cat", "start": [ 132, 1 ], "end": [ 136, 95 ], "kind": "commanddeclaration" }, { "full_name": "CategoryTheory.BasedNatTrans.ext", "code": "@[ext]\nlemma ext (β : BasedNatTrans F G) (h : α.toNatTrans = β.toNatTrans) : α = β := by\n cases α; subst h; rfl", "start": [ 150, 1 ], "end": [ 152, 24 ], "kind": "lemma" }, { "full_name": "CategoryTheory.BasedNatTrans.app_isHomLift", "code": "instance app_isHomLift (a : 𝒳.obj) : IsHomLift 𝒴.p (𝟙 (𝒳.p.obj a)) (α.toNatTrans.app a) :=\n α.isHomLift' a", "start": [ 154, 1 ], "end": [ 155, 17 ], "kind": "commanddeclaration" }, { "full_name": "CategoryTheory.BasedNatTrans.isHomLift", "code": "lemma isHomLift {a : 𝒳.obj} {S : 𝒮} (ha : 𝒳.p.obj a = S) :\n IsHomLift 𝒴.p (𝟙 S) (α.toNatTrans.app a) := by\n subst ha; infer_instance", "start": [ 157, 1 ], "end": [ 159, 27 ], "kind": "lemma" }, { "full_name": "CategoryTheory.BasedNatTrans.id", "code": "@[simps]\ndef id (F : 𝒳 ⥤ᵇ 𝒴) : BasedNatTrans F F where\n toNatTrans := CategoryTheory.NatTrans.id F.toFunctor\n isHomLift' := fun a ↦ of_fac 𝒴.p _ _ (w_obj F a) (w_obj F a) (by simp)", "start": [ 163, 1 ], "end": [ 167, 73 ], "kind": "commanddeclaration" }, { "full_name": "CategoryTheory.BasedNatTrans.comp", "code": "@[simps]\ndef comp {F G H : 𝒳 ⥤ᵇ 𝒴} (α : BasedNatTrans F G) (β : BasedNatTrans G H) : BasedNatTrans F H where\n toNatTrans := CategoryTheory.NatTrans.vcomp α.toNatTrans β.toNatTrans\n isHomLift' := by\n intro a\n rw [CategoryTheory.NatTrans.vcomp_app]\n infer_instance", "start": [ 169, 1 ], "end": [ 177, 19 ], "kind": "commanddeclaration" }, { "full_name": "CategoryTheory.BasedNatTrans.homCategory", "code": "@[simps]\ninstance homCategory (𝒳 : BasedCategory.{v₂, u₂} 𝒮) (𝒴 : BasedCategory.{v₃, u₃} 𝒮) :\n Category (𝒳 ⥤ᵇ 𝒴) where\n Hom := BasedNatTrans\n id := BasedNatTrans.id\n comp := BasedNatTrans.comp", "start": [ 179, 1 ], "end": [ 184, 29 ], "kind": "commanddeclaration" }, { "full_name": "CategoryTheory.BasedNatTrans.homCategory.ext", "code": "@[ext]\nlemma homCategory.ext {F G : 𝒳 ⥤ᵇ 𝒴} (α β : F ⟶ G) (h : α.toNatTrans = β.toNatTrans) : α = β :=\n BasedNatTrans.ext α β h", "start": [ 186, 1 ], "end": [ 188, 26 ], "kind": "lemma" }, { "full_name": "CategoryTheory.BasedNatTrans.forgetful", "code": "@[simps]\ndef forgetful (𝒳 : BasedCategory.{v₂, u₂} 𝒮) (𝒴 : BasedCategory.{v₃, u₃} 𝒮) :\n (𝒳 ⥤ᵇ 𝒴) ⥤ (𝒳.obj ⥤ 𝒴.obj) where\n obj := fun F ↦ F.toFunctor\n map := fun α ↦ α.toNatTrans", "start": [ 190, 1 ], "end": [ 196, 30 ], "kind": "commanddeclaration" }, { "full_name": "CategoryTheory.BasedNatIso.id", "code": "@[simps]\ndef id (F : 𝒳 ⥤ᵇ 𝒴) : F ≅ F where\n hom := 𝟙 F\n inv := 𝟙 F", "start": [ 217, 1 ], "end": [ 221, 13 ], "kind": "commanddeclaration" }, { "full_name": "CategoryTheory.BasedNatIso.mkNatIso", "code": "def mkNatIso (α : F.toFunctor ≅ G.toFunctor)\n (isHomLift' : ∀ a : 𝒳.obj, IsHomLift 𝒴.p (𝟙 (𝒳.p.obj a)) (α.hom.app a)) : F ≅ G where\n hom := { toNatTrans := α.hom }\n inv := {\n toNatTrans := α.inv\n isHomLift' := fun a ↦ by\n have : 𝒴.p.IsHomLift (𝟙 (𝒳.p.obj a)) (α.app a).hom := (NatIso.app_hom α a) ▸ isHomLift' a\n rw [← NatIso.app_inv]\n apply IsHomLift.lift_id_inv }", "start": [ 225, 1 ], "end": [ 235, 36 ], "kind": "commanddeclaration" }, { "full_name": "CategoryTheory.BasedNatIso.isIso_of_toNatTrans_isIso", "code": "lemma isIso_of_toNatTrans_isIso (α : F ⟶ G) [IsIso (X := F.toFunctor) α.toNatTrans] : IsIso α :=\n have : IsIso ((forgetful 𝒳 𝒴).map α) := by simp_all\n Functor.ReflectsIsomorphisms.reflects (forgetful 𝒳 𝒴) α", "start": [ 237, 1 ], "end": [ 239, 58 ], "kind": "lemma" }, { "full_name": "CategoryTheory.BasedCategory.whiskerLeft", "code": "@[simps]\ndef whiskerLeft {𝒵 : BasedCategory.{v₄, u₄} 𝒮} (F : 𝒳 ⥤ᵇ 𝒴) {G H : 𝒴 ⥤ᵇ 𝒵} (α : G ⟶ H) :\n F ⋙ G ⟶ F ⋙ H where\n toNatTrans := CategoryTheory.whiskerLeft F.toFunctor α.toNatTrans\n isHomLift' := fun a ↦ α.isHomLift (F.w_obj a)", "start": [ 251, 1 ], "end": [ 257, 48 ], "kind": "commanddeclaration" }, { "full_name": "CategoryTheory.BasedCategory.whiskerRight", "code": "@[simps]\ndef whiskerRight {𝒵 : BasedCategory.{v₄, u₄} 𝒮} {F G : 𝒳 ⥤ᵇ 𝒴} (α : F ⟶ G) (H : 𝒴 ⥤ᵇ 𝒵) :\n F ⋙ H ⟶ G ⋙ H where\n toNatTrans := CategoryTheory.whiskerRight α.toNatTrans H.toFunctor\n isHomLift' := fun _ ↦ BasedFunctor.preserves_isHomLift _ _ _", "start": [ 259, 1 ], "end": [ 265, 63 ], "kind": "commanddeclaration" }, { "full_name": "CategoryTheory.BasedCategory.bicategory", "code": "instance bicategory : Bicategory (BasedCategory.{v₂, u₂} 𝒮) where\n Hom 𝒳 𝒴 := 𝒳 ⥤ᵇ 𝒴\n id 𝒳 := 𝟭 𝒳\n comp F G := F ⋙ G\n homCategory 𝒳 𝒴 := homCategory 𝒳 𝒴\n whiskerLeft {𝒳 𝒴 𝒵} F {G H} α := whiskerLeft F α\n whiskerRight {𝒳 𝒴 𝒵} F G α H := whiskerRight α H\n associator F G H := BasedNatIso.id _\n leftUnitor {𝒳 𝒴} F := BasedNatIso.id F\n rightUnitor {𝒳 𝒴} F := BasedNatIso.id F", "start": [ 276, 1 ], "end": [ 286, 42 ], "kind": "commanddeclaration" } ]
Mathlib/CategoryTheory/Bicategory/Kan/Adjunction.lean
[ ".lake/packages/lean4/src/lean/Init.lean", "Mathlib/CategoryTheory/Bicategory/Adjunction.lean", "Mathlib/CategoryTheory/Bicategory/Kan/IsKan.lean" ]
[ { "full_name": "CategoryTheory.Bicategory.Adjunction.isAbsoluteLeftKan", "code": "def Adjunction.isAbsoluteLeftKan {f : a ⟶ b} {u : b ⟶ a} (adj : f ⊣ u) :\n LeftExtension.IsAbsKan (.mk u adj.unit) := fun {x} h ↦\n .mk (fun s ↦ LeftExtension.homMk\n (𝟙 _ ⊗≫ u ◁ s.unit ⊗≫ adj.counit ▷ s.extension ⊗≫ 𝟙 _ : u ≫ h ⟶ s.extension) <|\n calc _\n _ = 𝟙 _ ⊗≫ (adj.unit ▷ _ ≫ _ ◁ s.unit) ⊗≫ f ◁ adj.counit ▷ s.extension ⊗≫ 𝟙 _ := by\n simp [bicategoricalComp]\n _ = 𝟙 _ ⊗≫ s.unit ⊗≫ leftZigzag adj.unit adj.counit ▷ s.extension ⊗≫ 𝟙 _ := by\n rw [← whisker_exchange, leftZigzag]; simp [bicategoricalComp]\n _ = s.unit := by\n rw [adj.left_triangle]; simp [bicategoricalComp]) <| by\n intro s τ₀\n ext\n \n let τ : u ≫ h ⟶ s.extension := τ₀.right\n have hτ : adj.unit ▷ h ⊗≫ f ◁ τ = s.unit := by\n simpa [bicategoricalComp] using LeftExtension.w τ₀\n calc τ\n _ = 𝟙 _ ⊗≫ rightZigzag adj.unit adj.counit ▷ h ⊗≫ τ ⊗≫ 𝟙 _ := by\n rw [adj.right_triangle]; simp [bicategoricalComp]\n _ = 𝟙 _ ⊗≫ u ◁ adj.unit ▷ h ⊗≫ (adj.counit ▷ _ ≫ _ ◁ τ) ⊗≫ 𝟙 _ := by\n rw [rightZigzag]; simp [bicategoricalComp]\n _ = 𝟙 _ ⊗≫ u ◁ (adj.unit ▷ h ⊗≫ f ◁ τ) ⊗≫ adj.counit ▷ s.extension ⊗≫ 𝟙 _ := by\n rw [← whisker_exchange]; simp [bicategoricalComp]\n _ = _ := by\n rw [hτ]; simp [bicategoricalComp]", "start": [ 38, 1 ], "end": [ 65, 42 ], "kind": "commanddeclaration" }, { "full_name": "CategoryTheory.Bicategory.LeftExtension.IsKan.adjunction", "code": "def LeftExtension.IsKan.adjunction {f : a ⟶ b} {t : LeftExtension f (𝟙 a)}\n (H : LeftExtension.IsKan t) (H' : LeftExtension.IsKan (t.whisker f)) :\n f ⊣ t.extension :=\n let ε : t.extension ≫ f ⟶ 𝟙 b := H'.desc <| .mk _ <| (λ_ f).hom ≫ (ρ_ f).inv\n have Hε : leftZigzag t.unit ε = (λ_ f).hom ≫ (ρ_ f).inv := by\n simpa [leftZigzag, bicategoricalComp] using H'.fac <| .mk _ <| (λ_ f).hom ≫ (ρ_ f).inv\n { unit := t.unit\n counit := ε\n left_triangle := Hε\n right_triangle := by\n apply (cancel_epi (ρ_ _).inv).mp\n apply H.hom_ext\n calc _\n _ = 𝟙 _ ⊗≫ t.unit ⊗≫ f ◁ rightZigzag t.unit ε ⊗≫ 𝟙 _ := by\n simp [bicategoricalComp]\n _ = 𝟙 _ ⊗≫ (t.unit ▷ _ ≫ _ ◁ t.unit) ⊗≫ f ◁ ε ▷ t.extension ⊗≫ 𝟙 _ := by\n rw [rightZigzag]; simp [bicategoricalComp]\n _ = 𝟙 _ ⊗≫ t.unit ⊗≫ (t.unit ▷ f ⊗≫ f ◁ ε) ▷ t.extension ⊗≫ 𝟙 _ := by\n rw [← whisker_exchange]; simp [bicategoricalComp]\n _ = _ := by\n rw [← leftZigzag, Hε]; simp [bicategoricalComp] }", "start": [ 67, 1 ], "end": [ 89, 60 ], "kind": "commanddeclaration" }, { "full_name": "CategoryTheory.Bicategory.LeftExtension.IsAbsKan.adjunction", "code": "def LeftExtension.IsAbsKan.adjunction {f : a ⟶ b} (t : LeftExtension f (𝟙 a))\n (H : LeftExtension.IsAbsKan t) :\n f ⊣ t.extension :=\n H.isKan.adjunction (H f)", "start": [ 91, 1 ], "end": [ 96, 27 ], "kind": "commanddeclaration" }, { "full_name": "CategoryTheory.Bicategory.Adjunction.isAbsoluteLeftKanLift", "code": "def Adjunction.isAbsoluteLeftKanLift {f : a ⟶ b} {u : b ⟶ a} (adj : f ⊣ u) :\n LeftLift.IsAbsKan (.mk f adj.unit) := fun {x} h ↦\n .mk (fun s ↦ LeftLift.homMk\n (𝟙 _ ⊗≫ s.unit ▷ f ⊗≫ s.lift ◁ adj.counit ⊗≫ 𝟙 _ : h ≫ f ⟶ s.lift) <|\n calc _\n _ = 𝟙 _ ⊗≫ (_ ◁ adj.unit ≫ s.unit ▷ _) ⊗≫ s.lift ◁ adj.counit ▷ u ⊗≫ 𝟙 _ := by\n simp [bicategoricalComp]\n _ = s.unit ⊗≫ s.lift ◁ (rightZigzag adj.unit adj.counit) ⊗≫ 𝟙 _ := by\n rw [whisker_exchange, rightZigzag]; simp [bicategoricalComp]\n _ = s.unit := by\n rw [adj.right_triangle]; simp [bicategoricalComp]) <| by\n intro s τ₀\n ext\n \n let τ : h ≫ f ⟶ s.lift := τ₀.right\n have hτ : h ◁ adj.unit ⊗≫ τ ▷ u = s.unit := by simpa [bicategoricalComp] using LeftLift.w τ₀\n calc τ\n _ = 𝟙 _ ⊗≫ h ◁ leftZigzag adj.unit adj.counit ⊗≫ τ ⊗≫ 𝟙 _ := by\n rw [adj.left_triangle]; simp [bicategoricalComp]\n _ = 𝟙 _ ⊗≫ h ◁ adj.unit ▷ f ⊗≫ (_ ◁ adj.counit ≫ τ ▷ _) ⊗≫ 𝟙 _ := by\n rw [leftZigzag]; simp [bicategoricalComp]\n _ = 𝟙 _ ⊗≫ (h ◁ adj.unit ⊗≫ τ ▷ u) ▷ f ⊗≫ s.lift ◁ adj.counit ⊗≫ 𝟙 _ := by\n rw [whisker_exchange]; simp [bicategoricalComp]\n _ = _ := by\n rw [hτ]; simp [bicategoricalComp]", "start": [ 102, 1 ], "end": [ 128, 44 ], "kind": "commanddeclaration" }, { "full_name": "CategoryTheory.Bicategory.LeftLift.IsKan.adjunction", "code": "def LeftLift.IsKan.adjunction {u : b ⟶ a} {t : LeftLift u (𝟙 a)}\n (H : LeftLift.IsKan t) (H' : LeftLift.IsKan (t.whisker u)) :\n t.lift ⊣ u :=\n let ε : u ≫ t.lift ⟶ 𝟙 b := H'.desc <| .mk _ <| (ρ_ u).hom ≫ (λ_ u).inv\n have Hε : rightZigzag t.unit ε = (ρ_ u).hom ≫ (λ_ u).inv := by\n simpa [rightZigzag, bicategoricalComp] using H'.fac <| .mk _ <| (ρ_ u).hom ≫ (λ_ u).inv\n { unit := t.unit\n counit := ε\n left_triangle := by\n apply (cancel_epi (λ_ _).inv).mp\n apply H.hom_ext\n calc _\n _ = 𝟙 _ ⊗≫ t.unit ⊗≫ leftZigzag t.unit ε ▷ u ⊗≫ 𝟙 _ := by\n simp [bicategoricalComp]\n _ = 𝟙 _ ⊗≫ (_ ◁ t.unit ≫ t.unit ▷ _) ⊗≫ t.lift ◁ ε ▷ u ⊗≫ 𝟙 _ := by\n rw [leftZigzag]; simp [bicategoricalComp]\n _ = 𝟙 _ ⊗≫ t.unit ⊗≫ t.lift ◁ (u ◁ t.unit ⊗≫ ε ▷ u) ⊗≫ 𝟙 _ := by\n rw [whisker_exchange]; simp [bicategoricalComp]\n _ = _ := by\n rw [← rightZigzag, Hε]; simp [bicategoricalComp]\n right_triangle := Hε }", "start": [ 130, 1 ], "end": [ 152, 27 ], "kind": "commanddeclaration" }, { "full_name": "CategoryTheory.Bicategory.LeftLift.IsAbsKan.adjunction", "code": "def LeftLift.IsAbsKan.adjunction {u : b ⟶ a} (t : LeftLift u (𝟙 a)) (H : LeftLift.IsAbsKan t) :\n t.lift ⊣ u :=\n H.isKan.adjunction (H u)", "start": [ 154, 1 ], "end": [ 158, 27 ], "kind": "commanddeclaration" }, { "full_name": "CategoryTheory.Bicategory.LeftExtension.isKanOfWhiskerLeftAdjoint", "code": "def isKanOfWhiskerLeftAdjoint\n {f : a ⟶ b} {g : a ⟶ c} {t : LeftExtension f g} (H : LeftExtension.IsKan t)\n {x : B} {h : c ⟶ x} {u : x ⟶ c} (adj : h ⊣ u) :\n LeftExtension.IsKan (t.whisker h) :=\n let η' := adj.unit\n let H' : LeftLift.IsAbsKan (.mk _ η') := adj.isAbsoluteLeftKanLift\n .mk (fun s ↦\n let k := s.extension\n let θ := s.unit\n let τ : t.extension ⟶ k ≫ u := H.desc (.mk _ <| 𝟙 _ ⊗≫ g ◁ η' ⊗≫ θ ▷ u ⊗≫ 𝟙 _)\n let σ : t.extension ≫ h ⟶ k := H'.desc <| (.mk _ <| (ρ_ _).hom ≫ τ)\n LeftExtension.homMk σ <| (H' g).hom_ext <| by\n have Hσ : t.extension ◁ η' ⊗≫ σ ▷ u = 𝟙 _ ⊗≫ τ := by\n simpa [bicategoricalComp] using (H' _).fac (.mk _ <| (ρ_ _).hom ≫ τ)\n calc _\n _ = 𝟙 _ ⊗≫ (g ◁ η' ≫ t.unit ▷ (h ≫ u)) ⊗≫ f ◁ σ ▷ u ⊗≫ 𝟙 _ := by\n simp [bicategoricalComp]\n _ = 𝟙 _ ⊗≫ t.unit ▷ (𝟙 c) ⊗≫ f ◁ (t.extension ◁ η' ⊗≫ σ ▷ u) ⊗≫ 𝟙 _ := by\n rw [whisker_exchange]; simp [bicategoricalComp]\n _ = _ := by\n rw [Hσ]; simp [τ, bicategoricalComp]) <| by\n intro s' τ₀'\n let τ' : t.extension ≫ h ⟶ s'.extension := τ₀'.right\n have Hτ' : t.unit ▷ h ⊗≫ f ◁ τ' = s'.unit := by simpa [bicategoricalComp] using τ₀'.w.symm\n ext\n apply (H' _).hom_ext\n dsimp only [StructuredArrow.homMk_right]\n rw [(H' _).fac]\n apply (cancel_epi (ρ_ _).inv).mp\n apply H.hom_ext\n calc _\n _ = 𝟙 _ ⊗≫ (t.unit ▷ (𝟙 c) ≫ (f ≫ t.extension) ◁ η') ⊗≫ f ◁ τ' ▷ u := by\n simp [bicategoricalComp]\n _ = 𝟙 g ⊗≫ g ◁ η' ⊗≫ (t.unit ▷ h ⊗≫ f ◁ τ') ▷ u ⊗≫ 𝟙 _ := by\n rw [← whisker_exchange]; simp [bicategoricalComp]\n _ = _ := by\n rw [Hτ']; simp [bicategoricalComp]", "start": [ 164, 1 ], "end": [ 201, 43 ], "kind": "commanddeclaration" } ]
Mathlib/Combinatorics/Schnirelmann.lean
[ "Mathlib/Data/Nat/Prime.lean", "Mathlib/Algebra/Order/Ring/Abs.lean", "Mathlib/Data/Real/Archimedean.lean", "Mathlib/Data/Nat/ModEq.lean", "Mathlib/Order/Interval/Finset/Nat.lean", ".lake/packages/lean4/src/lean/Init.lean" ]
[ { "full_name": "schnirelmannDensity", "code": "noncomputable def schnirelmannDensity (A : Set ℕ) [DecidablePred (· ∈ A)] : ℝ :=\n ⨅ n : {n : ℕ // 0 < n}, ((Ioc (0 : ℕ) n).filter (· ∈ A)).card / n", "start": [ 47, 1 ], "end": [ 50, 68 ], "kind": "commanddeclaration" }, { "full_name": "schnirelmannDensity_nonneg", "code": "lemma schnirelmannDensity_nonneg : 0 ≤ schnirelmannDensity A :=\n Real.iInf_nonneg (fun _ => by positivity)", "start": [ 56, 1 ], "end": [ 57, 44 ], "kind": "lemma" }, { "full_name": "schnirelmannDensity_le_div", "code": "lemma schnirelmannDensity_le_div {n : ℕ} (hn : n ≠ 0) :\n schnirelmannDensity A ≤ ((Ioc 0 n).filter (· ∈ A)).card / n :=\n ciInf_le ⟨0, fun _ ⟨_, hx⟩ => hx ▸ by positivity⟩ (⟨n, hn.bot_lt⟩ : {n : ℕ // 0 < n})", "start": [ 59, 1 ], "end": [ 61, 88 ], "kind": "lemma" }, { "full_name": "schnirelmannDensity_mul_le_card_filter", "code": "lemma schnirelmannDensity_mul_le_card_filter {n : ℕ} :\n schnirelmannDensity A * n ≤ ((Ioc 0 n).filter (· ∈ A)).card := by\n rcases eq_or_ne n 0 with rfl | hn\n · simp\n exact (le_div_iff (by positivity)).1 (schnirelmannDensity_le_div hn)", "start": [ 63, 1 ], "end": [ 71, 71 ], "kind": "lemma" }, { "full_name": "schnirelmannDensity_le_of_le", "code": "lemma schnirelmannDensity_le_of_le {x : ℝ} (n : ℕ) (hn : n ≠ 0)\n (hx : ((Ioc 0 n).filter (· ∈ A)).card / n ≤ x) : schnirelmannDensity A ≤ x :=\n (schnirelmannDensity_le_div hn).trans hx", "start": [ 73, 1 ], "end": [ 82, 43 ], "kind": "lemma" }, { "full_name": "schnirelmannDensity_le_one", "code": "lemma schnirelmannDensity_le_one : schnirelmannDensity A ≤ 1 :=\n schnirelmannDensity_le_of_le 1 one_ne_zero <|\n by rw [Nat.cast_one, div_one, Nat.cast_le_one]; exact card_filter_le _ _", "start": [ 84, 1 ], "end": [ 86, 77 ], "kind": "lemma" }, { "full_name": "schnirelmannDensity_le_of_not_mem", "code": "lemma schnirelmannDensity_le_of_not_mem {k : ℕ} (hk : k ∉ A) :\n schnirelmannDensity A ≤ 1 - (k⁻¹ : ℝ) := by\n rcases k.eq_zero_or_pos with rfl | hk'\n · simpa using schnirelmannDensity_le_one\n apply schnirelmannDensity_le_of_le k hk'.ne'\n rw [← one_div, one_sub_div (Nat.cast_pos.2 hk').ne']\n gcongr\n rw [← Nat.cast_pred hk', Nat.cast_le]\n suffices (Ioc 0 k).filter (· ∈ A) ⊆ Ioo 0 k from (card_le_card this).trans_eq (by simp)\n rw [← Ioo_insert_right hk', filter_insert, if_neg hk]\n exact filter_subset _ _", "start": [ 88, 1 ], "end": [ 101, 26 ], "kind": "lemma" }, { "full_name": "schnirelmannDensity_eq_zero_of_one_not_mem", "code": "lemma schnirelmannDensity_eq_zero_of_one_not_mem (h : 1 ∉ A) : schnirelmannDensity A = 0 :=\n ((schnirelmannDensity_le_of_not_mem h).trans (by simp)).antisymm schnirelmannDensity_nonneg", "start": [ 103, 1 ], "end": [ 105, 94 ], "kind": "lemma" }, { "full_name": "schnirelmannDensity_le_of_subset", "code": "lemma schnirelmannDensity_le_of_subset {B : Set ℕ} [DecidablePred (· ∈ B)] (h : A ⊆ B) :\n schnirelmannDensity A ≤ schnirelmannDensity B :=\n ciInf_mono ⟨0, fun _ ⟨_, hx⟩ ↦ hx ▸ by positivity⟩ fun _ ↦ by\n gcongr; exact monotone_filter_right _ h", "start": [ 107, 1 ], "end": [ 111, 44 ], "kind": "lemma" }, { "full_name": "schnirelmannDensity_eq_one_iff", "code": "lemma schnirelmannDensity_eq_one_iff : schnirelmannDensity A = 1 ↔ {0}ᶜ ⊆ A := by\n rw [le_antisymm_iff, and_iff_right schnirelmannDensity_le_one]\n constructor\n · rw [← not_imp_not, not_le]\n simp only [Set.not_subset, forall_exists_index, true_and, and_imp, Set.mem_singleton_iff]\n intro x hx hx'\n apply (schnirelmannDensity_le_of_not_mem hx').trans_lt\n simpa only [one_div, sub_lt_self_iff, inv_pos, Nat.cast_pos, pos_iff_ne_zero] using hx\n · intro h\n refine le_ciInf fun ⟨n, hn⟩ => ?_\n rw [one_le_div (Nat.cast_pos.2 hn), Nat.cast_le, filter_true_of_mem, Nat.card_Ioc, Nat.sub_zero]\n rintro x hx\n exact h (mem_Ioc.1 hx).1.ne'", "start": [ 113, 1 ], "end": [ 126, 33 ], "kind": "lemma" }, { "full_name": "schnirelmannDensity_eq_one_iff_of_zero_mem", "code": "lemma schnirelmannDensity_eq_one_iff_of_zero_mem (hA : 0 ∈ A) :\n schnirelmannDensity A = 1 ↔ A = Set.univ := by\n rw [schnirelmannDensity_eq_one_iff]\n constructor\n · refine fun h => Set.eq_univ_of_forall fun x => ?_\n rcases eq_or_ne x 0 with rfl | hx\n · exact hA\n · exact h hx\n · rintro rfl\n exact Set.subset_univ {0}ᶜ", "start": [ 128, 1 ], "end": [ 138, 31 ], "kind": "lemma" }, { "full_name": "le_schnirelmannDensity_iff", "code": "lemma le_schnirelmannDensity_iff {x : ℝ} :\n x ≤ schnirelmannDensity A ↔ ∀ n : ℕ, 0 < n → x ≤ ((Ioc 0 n).filter (· ∈ A)).card / n :=\n (le_ciInf_iff ⟨0, fun _ ⟨_, hx⟩ => hx ▸ by positivity⟩).trans Subtype.forall", "start": [ 140, 1 ], "end": [ 142, 79 ], "kind": "lemma" }, { "full_name": "schnirelmannDensity_lt_iff", "code": "lemma schnirelmannDensity_lt_iff {x : ℝ} :\n schnirelmannDensity A < x ↔ ∃ n : ℕ, 0 < n ∧ ((Ioc 0 n).filter (· ∈ A)).card / n < x := by\n rw [← not_le, le_schnirelmannDensity_iff]; simp", "start": [ 144, 1 ], "end": [ 146, 50 ], "kind": "lemma" }, { "full_name": "schnirelmannDensity_le_iff_forall", "code": "lemma schnirelmannDensity_le_iff_forall {x : ℝ} :\n schnirelmannDensity A ≤ x ↔\n ∀ ε : ℝ, 0 < ε → ∃ n : ℕ, 0 < n ∧ ((Ioc 0 n).filter (· ∈ A)).card / n < x + ε := by\n rw [le_iff_forall_pos_lt_add]\n simp only [schnirelmannDensity_lt_iff]", "start": [ 148, 1 ], "end": [ 152, 41 ], "kind": "lemma" }, { "full_name": "schnirelmannDensity_congr'", "code": "lemma schnirelmannDensity_congr' {B : Set ℕ} [DecidablePred (· ∈ B)]\n (h : ∀ n > 0, n ∈ A ↔ n ∈ B) : schnirelmannDensity A = schnirelmannDensity B := by\n rw [schnirelmannDensity, schnirelmannDensity]; congr; ext ⟨n, hn⟩; congr 3; ext x; aesop", "start": [ 154, 1 ], "end": [ 156, 91 ], "kind": "lemma" }, { "full_name": "schnirelmannDensity_insert_zero", "code": "@[simp] lemma schnirelmannDensity_insert_zero [DecidablePred (· ∈ insert 0 A)] :\n schnirelmannDensity (insert 0 A) = schnirelmannDensity A :=\n schnirelmannDensity_congr' (by aesop)", "start": [ 158, 1 ], "end": [ 161, 40 ], "kind": "lemma" }, { "full_name": "schnirelmannDensity_diff_singleton_zero", "code": "lemma schnirelmannDensity_diff_singleton_zero [DecidablePred (· ∈ A \\ {0})] :\n schnirelmannDensity (A \\ {0}) = schnirelmannDensity A :=\n schnirelmannDensity_congr' (by aesop)", "start": [ 163, 1 ], "end": [ 166, 40 ], "kind": "lemma" }, { "full_name": "schnirelmannDensity_congr", "code": "lemma schnirelmannDensity_congr {B : Set ℕ} [DecidablePred (· ∈ B)] (h : A = B) :\n schnirelmannDensity A = schnirelmannDensity B :=\n schnirelmannDensity_congr' (by aesop)", "start": [ 168, 1 ], "end": [ 170, 40 ], "kind": "lemma" }, { "full_name": "exists_of_schnirelmannDensity_eq_zero", "code": "lemma exists_of_schnirelmannDensity_eq_zero {ε : ℝ} (hε : 0 < ε) (hA : schnirelmannDensity A = 0) :\n ∃ n, 0 < n ∧ ((Ioc 0 n).filter (· ∈ A)).card / n < ε := by\n by_contra! h\n rw [← le_schnirelmannDensity_iff] at h\n linarith", "start": [ 172, 1 ], "end": [ 181, 11 ], "kind": "lemma" }, { "full_name": "schnirelmannDensity_empty", "code": "@[simp] lemma schnirelmannDensity_empty : schnirelmannDensity ∅ = 0 :=\n schnirelmannDensity_eq_zero_of_one_not_mem (by simp)", "start": [ 185, 1 ], "end": [ 186, 55 ], "kind": "lemma" }, { "full_name": "schnirelmannDensity_finset", "code": "lemma schnirelmannDensity_finset (A : Finset ℕ) : schnirelmannDensity A = 0 := by\n refine le_antisymm ?_ schnirelmannDensity_nonneg\n simp only [schnirelmannDensity_le_iff_forall, zero_add]\n intro ε hε\n wlog hε₁ : ε ≤ 1 generalizing ε\n · obtain ⟨n, hn, hn'⟩ := this 1 zero_lt_one le_rfl\n exact ⟨n, hn, hn'.trans_le (le_of_not_le hε₁)⟩\n let n : ℕ := ⌊A.card / ε⌋₊ + 1\n have hn : 0 < n := Nat.succ_pos _\n use n, hn\n rw [div_lt_iff (Nat.cast_pos.2 hn), ← div_lt_iff' hε, Nat.cast_add_one]\n exact (Nat.lt_floor_add_one _).trans_le' <| by gcongr; simp [subset_iff]", "start": [ 188, 1 ], "end": [ 200, 75 ], "kind": "lemma" }, { "full_name": "schnirelmannDensity_finite", "code": "lemma schnirelmannDensity_finite {A : Set ℕ} [DecidablePred (· ∈ A)] (hA : A.Finite) :\n schnirelmannDensity A = 0 := by simpa using schnirelmannDensity_finset hA.toFinset", "start": [ 202, 1 ], "end": [ 204, 87 ], "kind": "lemma" }, { "full_name": "schnirelmannDensity_univ", "code": "@[simp] lemma schnirelmannDensity_univ : schnirelmannDensity Set.univ = 1 :=\n (schnirelmannDensity_eq_one_iff_of_zero_mem (by simp)).2 (by simp)", "start": [ 206, 1 ], "end": [ 207, 69 ], "kind": "lemma" }, { "full_name": "schnirelmannDensity_setOf_even", "code": "lemma schnirelmannDensity_setOf_even : schnirelmannDensity (setOf Even) = 0 :=\n schnirelmannDensity_eq_zero_of_one_not_mem <| by simp", "start": [ 209, 1 ], "end": [ 210, 56 ], "kind": "lemma" }, { "full_name": "schnirelmannDensity_setOf_prime", "code": "lemma schnirelmannDensity_setOf_prime : schnirelmannDensity (setOf Nat.Prime) = 0 :=\n schnirelmannDensity_eq_zero_of_one_not_mem <| by simp [Nat.not_prime_one]", "start": [ 212, 1 ], "end": [ 213, 76 ], "kind": "lemma" }, { "full_name": "schnirelmannDensity_setOf_mod_eq_one", "code": "lemma schnirelmannDensity_setOf_mod_eq_one {m : ℕ} (hm : m ≠ 1) :\n schnirelmannDensity {n | n % m = 1} = (m⁻¹ : ℝ) := by\n rcases m.eq_zero_or_pos with rfl | hm'\n · simp only [Nat.cast_zero, inv_zero]\n refine schnirelmannDensity_finite ?_\n simp\n apply le_antisymm (schnirelmannDensity_le_of_le m hm'.ne' _) _\n · rw [← one_div, ← @Nat.cast_one ℝ]\n gcongr\n simp only [Set.mem_setOf_eq, card_le_one_iff_subset_singleton, subset_iff,\n mem_filter, mem_Ioc, mem_singleton, and_imp]\n use 1\n intro x _ hxm h\n rcases eq_or_lt_of_le hxm with rfl | hxm'\n · simp at h\n rwa [Nat.mod_eq_of_lt hxm'] at h\n rw [le_schnirelmannDensity_iff]\n intro n hn\n simp only [Set.mem_setOf_eq]\n have : (Icc 0 ((n - 1) / m)).image (· * m + 1) ⊆ (Ioc 0 n).filter (· % m = 1) := by\n simp only [subset_iff, mem_image, forall_exists_index, mem_filter, mem_Ioc, mem_Icc, and_imp]\n rintro _ y _ hy' rfl\n have hm : 2 ≤ m := hm.lt_of_le' hm'\n simp only [Nat.mul_add_mod', Nat.mod_eq_of_lt hm, add_pos_iff, or_true, and_true, true_and,\n ← Nat.le_sub_iff_add_le hn, zero_lt_one]\n exact Nat.mul_le_of_le_div _ _ _ hy'\n rw [le_div_iff (Nat.cast_pos.2 hn), mul_comm, ← div_eq_mul_inv]\n apply (Nat.cast_le.2 (card_le_card this)).trans'\n rw [card_image_of_injective, Nat.card_Icc, Nat.sub_zero, div_le_iff (Nat.cast_pos.2 hm'),\n ← Nat.cast_mul, Nat.cast_le, add_one_mul (α := ℕ)]\n · have := @Nat.lt_div_mul_add n.pred m hm'\n rwa [← Nat.succ_le, Nat.succ_pred hn.ne'] at this\n intro a b\n simp [hm'.ne']", "start": [ 215, 1 ], "end": [ 253, 17 ], "kind": "lemma" }, { "full_name": "schnirelmannDensity_setOf_modeq_one", "code": "lemma schnirelmannDensity_setOf_modeq_one {m : ℕ} :\n schnirelmannDensity {n | n ≡ 1 [MOD m]} = (m⁻¹ : ℝ) := by\n rcases eq_or_ne m 1 with rfl | hm\n · simp [Nat.modEq_one]\n rw [← schnirelmannDensity_setOf_mod_eq_one hm]\n apply schnirelmannDensity_congr\n ext n\n simp only [Set.mem_setOf_eq, Nat.ModEq, Nat.one_mod_of_ne_one hm]", "start": [ 255, 1 ], "end": [ 262, 68 ], "kind": "lemma" }, { "full_name": "schnirelmannDensity_setOf_Odd", "code": "lemma schnirelmannDensity_setOf_Odd : schnirelmannDensity (setOf Odd) = 2⁻¹ := by\n have h : setOf Odd = {n | n % 2 = 1} := Set.ext fun _ => Nat.odd_iff\n simp only [h]\n rw [schnirelmannDensity_setOf_mod_eq_one (by norm_num1), Nat.cast_two]", "start": [ 264, 1 ], "end": [ 267, 73 ], "kind": "lemma" } ]
Mathlib/Data/Rbtree/DefaultLt.lean
[ "Mathlib/Mathport/Rename.lean", ".lake/packages/lean4/src/lean/Init.lean" ]
[]
Mathlib/Analysis/Analytic/Inverse.lean
[ ".lake/packages/lean4/src/lean/Init.lean", "Mathlib/Analysis/Analytic/Composition.lean" ]
[ { "full_name": "FormalMultilinearSeries.leftInv", "code": "noncomputable def leftInv (p : FormalMultilinearSeries 𝕜 E F) (i : E ≃L[𝕜] F) :\n FormalMultilinearSeries 𝕜 F E\n | 0 => 0\n | 1 => (continuousMultilinearCurryFin1 𝕜 F E).symm i.symm\n | n + 2 =>\n -∑ c : { c : Composition (n + 2) // c.length < n + 2 },\n (leftInv p i (c : Composition (n + 2)).length).compAlongComposition\n (p.compContinuousLinearMap i.symm) c", "start": [ 44, 1 ], "end": [ 64, 47 ], "kind": "commanddeclaration" }, { "full_name": "FormalMultilinearSeries.leftInv_coeff_zero", "code": "@[simp]\ntheorem leftInv_coeff_zero (p : FormalMultilinearSeries 𝕜 E F) (i : E ≃L[𝕜] F) :\n p.leftInv i 0 = 0", "start": [ 67, 1 ], "end": [ 69, 41 ], "kind": "commanddeclaration" }, { "full_name": "FormalMultilinearSeries.leftInv_coeff_one", "code": "@[simp]\ntheorem leftInv_coeff_one (p : FormalMultilinearSeries 𝕜 E F) (i : E ≃L[𝕜] F) :\n p.leftInv i 1 = (continuousMultilinearCurryFin1 𝕜 F E).symm i.symm", "start": [ 72, 1 ], "end": [ 74, 90 ], "kind": "commanddeclaration" }, { "full_name": "FormalMultilinearSeries.leftInv_removeZero", "code": "theorem leftInv_removeZero (p : FormalMultilinearSeries 𝕜 E F) (i : E ≃L[𝕜] F) :\n p.removeZero.leftInv i = p.leftInv i", "start": [ 77, 1 ], "end": [ 92, 19 ], "kind": "commanddeclaration" }, { "full_name": "FormalMultilinearSeries.leftInv_comp", "code": "theorem leftInv_comp (p : FormalMultilinearSeries 𝕜 E F) (i : E ≃L[𝕜] F)\n (h : p 1 = (continuousMultilinearCurryFin1 𝕜 E F).symm i) : (leftInv p i).comp p = id 𝕜 E", "start": [ 95, 1 ], "end": [ 148, 56 ], "kind": "commanddeclaration" }, { "full_name": "FormalMultilinearSeries.rightInv", "code": "noncomputable def rightInv (p : FormalMultilinearSeries 𝕜 E F) (i : E ≃L[𝕜] F) :\n FormalMultilinearSeries 𝕜 F E\n | 0 => 0\n | 1 => (continuousMultilinearCurryFin1 𝕜 F E).symm i.symm\n | n + 2 =>\n let q : FormalMultilinearSeries 𝕜 F E := fun k => if k < n + 2 then rightInv p i k else 0;\n -(i.symm : F →L[𝕜] E).compContinuousMultilinearMap ((p.comp q) (n + 2))", "start": [ 154, 1 ], "end": [ 173, 76 ], "kind": "commanddeclaration" }, { "full_name": "FormalMultilinearSeries.rightInv_coeff_zero", "code": "@[simp]\ntheorem rightInv_coeff_zero (p : FormalMultilinearSeries 𝕜 E F) (i : E ≃L[𝕜] F) :\n p.rightInv i 0 = 0", "start": [ 176, 1 ], "end": [ 178, 43 ], "kind": "commanddeclaration" }, { "full_name": "FormalMultilinearSeries.rightInv_coeff_one", "code": "@[simp]\ntheorem rightInv_coeff_one (p : FormalMultilinearSeries 𝕜 E F) (i : E ≃L[𝕜] F) :\n p.rightInv i 1 = (continuousMultilinearCurryFin1 𝕜 F E).symm i.symm", "start": [ 181, 1 ], "end": [ 183, 92 ], "kind": "commanddeclaration" }, { "full_name": "FormalMultilinearSeries.rightInv_removeZero", "code": "theorem rightInv_removeZero (p : FormalMultilinearSeries 𝕜 E F) (i : E ≃L[𝕜] F) :\n p.removeZero.rightInv i = p.rightInv i", "start": [ 186, 1 ], "end": [ 199, 46 ], "kind": "commanddeclaration" }, { "full_name": "FormalMultilinearSeries.comp_rightInv_aux1", "code": "theorem comp_rightInv_aux1 {n : ℕ} (hn : 0 < n) (p : FormalMultilinearSeries 𝕜 E F)\n (q : FormalMultilinearSeries 𝕜 F E) (v : Fin n → F) :\n p.comp q n v =\n ∑ c ∈ {c : Composition n | 1 < c.length}.toFinset,\n p c.length (q.applyComposition c v) +\n p 1 fun _ => q n v", "start": [ 202, 1 ], "end": [ 228, 48 ], "kind": "commanddeclaration" }, { "full_name": "FormalMultilinearSeries.comp_rightInv_aux2", "code": "theorem comp_rightInv_aux2 (p : FormalMultilinearSeries 𝕜 E F) (i : E ≃L[𝕜] F) (n : ℕ)\n (v : Fin (n + 2) → F) :\n ∑ c ∈ {c : Composition (n + 2) | 1 < c.length}.toFinset,\n p c.length (applyComposition (fun k : ℕ => ite (k < n + 2) (p.rightInv i k) 0) c v) =\n ∑ c ∈ {c : Composition (n + 2) | 1 < c.length}.toFinset,\n p c.length ((p.rightInv i).applyComposition c v)", "start": [ 231, 1 ], "end": [ 243, 32 ], "kind": "commanddeclaration" }, { "full_name": "FormalMultilinearSeries.comp_rightInv", "code": "theorem comp_rightInv (p : FormalMultilinearSeries 𝕜 E F) (i : E ≃L[𝕜] F)\n (h : p 1 = (continuousMultilinearCurryFin1 𝕜 E F).symm i) (h0 : p 0 = 0) :\n p.comp (rightInv p i) = id 𝕜 F", "start": [ 246, 1 ], "end": [ 262, 78 ], "kind": "commanddeclaration" }, { "full_name": "FormalMultilinearSeries.rightInv_coeff", "code": "theorem rightInv_coeff (p : FormalMultilinearSeries 𝕜 E F) (i : E ≃L[𝕜] F) (n : ℕ) (hn : 2 ≤ n) :\n p.rightInv i n =\n -(i.symm : F →L[𝕜] E).compContinuousMultilinearMap\n (∑ c ∈ ({c | 1 < Composition.length c}.toFinset : Finset (Composition n)),\n p.compAlongComposition (p.rightInv i) c)", "start": [ 265, 1 ], "end": [ 279, 92 ], "kind": "commanddeclaration" }, { "full_name": "FormalMultilinearSeries.leftInv_eq_rightInv_aux", "code": "private theorem leftInv_eq_rightInv_aux (p : FormalMultilinearSeries 𝕜 E F) (i : E ≃L[𝕜] F)\n (h : p 1 = (continuousMultilinearCurryFin1 𝕜 E F).symm i) (h0 : p 0 = 0) :\n leftInv p i = rightInv p i", "start": [ 285, 1 ], "end": [ 293, 32 ], "kind": "commanddeclaration" }, { "full_name": "FormalMultilinearSeries.leftInv_eq_rightInv", "code": "theorem leftInv_eq_rightInv (p : FormalMultilinearSeries 𝕜 E F) (i : E ≃L[𝕜] F)\n (h : p 1 = (continuousMultilinearCurryFin1 𝕜 E F).symm i) : leftInv p i = rightInv p i", "start": [ 295, 1 ], "end": [ 303, 52 ], "kind": "commanddeclaration" }, { "full_name": "FormalMultilinearSeries.radius_right_inv_pos_of_radius_pos_aux1", "code": "theorem radius_right_inv_pos_of_radius_pos_aux1 (n : ℕ) (p : ℕ → ℝ) (hp : ∀ k, 0 ≤ p k) {r a : ℝ}\n (hr : 0 ≤ r) (ha : 0 ≤ a) :\n ∑ k ∈ Ico 2 (n + 1),\n a ^ k *\n ∑ c ∈ ({c | 1 < Composition.length c}.toFinset : Finset (Composition k)),\n r ^ c.length * ∏ j, p (c.blocksFun j) ≤\n ∑ j ∈ Ico 2 (n + 1), r ^ j * (∑ k ∈ Ico 1 n, a ^ k * p k) ^ j", "start": [ 376, 1 ], "end": [ 435, 44 ], "kind": "commanddeclaration" }, { "full_name": "FormalMultilinearSeries.radius_rightInv_pos_of_radius_pos_aux2", "code": "theorem radius_rightInv_pos_of_radius_pos_aux2 {n : ℕ} (hn : 2 ≤ n + 1)\n (p : FormalMultilinearSeries 𝕜 E F) (i : E ≃L[𝕜] F) {r a C : ℝ} (hr : 0 ≤ r) (ha : 0 ≤ a)\n (hC : 0 ≤ C) (hp : ∀ n, ‖p n‖ ≤ C * r ^ n) :\n ∑ k ∈ Ico 1 (n + 1), a ^ k * ‖p.rightInv i k‖ ≤\n ‖(i.symm : F →L[𝕜] E)‖ * a +\n ‖(i.symm : F →L[𝕜] E)‖ * C *\n ∑ k ∈ Ico 2 (n + 1), (r * ∑ j ∈ Ico 1 n, a ^ j * ‖p.rightInv i j‖) ^ k", "start": [ 438, 1 ], "end": [ 496, 41 ], "kind": "commanddeclaration" }, { "full_name": "FormalMultilinearSeries.radius_rightInv_pos_of_radius_pos", "code": "theorem radius_rightInv_pos_of_radius_pos (p : FormalMultilinearSeries 𝕜 E F) (i : E ≃L[𝕜] F)\n (hp : 0 < p.radius) : 0 < (p.rightInv i).radius", "start": [ 499, 1 ], "end": [ 571, 52 ], "kind": "commanddeclaration" } ]
Mathlib/Probability/ProbabilityMassFunction/Integrals.lean
[ "Mathlib/MeasureTheory/Integral/Bochner.lean", "Mathlib/Probability/ProbabilityMassFunction/Basic.lean", ".lake/packages/lean4/src/lean/Init.lean", "Mathlib/Probability/ProbabilityMassFunction/Constructions.lean" ]
[ { "full_name": "PMF.integral_eq_tsum", "code": "theorem integral_eq_tsum (p : PMF α) (f : α → E) (hf : Integrable f p.toMeasure) :\n ∫ a, f a ∂(p.toMeasure) = ∑' a, (p a).toReal • f a", "start": [ 28, 1 ], "end": [ 41, 56 ], "kind": "commanddeclaration" }, { "full_name": "PMF.integral_eq_sum", "code": "theorem integral_eq_sum [Fintype α] (p : PMF α) (f : α → E) :\n ∫ a, f a ∂(p.toMeasure) = ∑ a, (p a).toReal • f a", "start": [ 43, 1 ], "end": [ 47, 70 ], "kind": "commanddeclaration" }, { "full_name": "PMF.bernoulli_expectation", "code": "theorem bernoulli_expectation {p : ℝ≥0∞} (h : p ≤ 1) :\n ∫ b, cond b 1 0 ∂((bernoulli p h).toMeasure) = p.toReal", "start": [ 51, 1 ], "end": [ 52, 89 ], "kind": "commanddeclaration" } ]
Mathlib/CategoryTheory/Galois/Examples.lean
[ "Mathlib/CategoryTheory/Limits/FintypeCat.lean", "Mathlib/RepresentationTheory/Action/Concrete.lean", "Mathlib/CategoryTheory/Galois/Basic.lean", "Mathlib/RepresentationTheory/Action/Limits.lean", "Mathlib/Logic/Equiv/TransferInstance.lean", ".lake/packages/lean4/src/lean/Init.lean", "Mathlib/CategoryTheory/Limits/Shapes/Types.lean", "Mathlib/RepresentationTheory/Action/Basic.lean" ]
[ { "full_name": "CategoryTheory.FintypeCat.imageComplement", "code": "noncomputable def imageComplement {X Y : FintypeCat.{u}} (f : X ⟶ Y) :\n FintypeCat.{u} := by\n haveI : Fintype (↑(Set.range f)ᶜ) := Fintype.ofFinite _\n exact FintypeCat.of (↑(Set.range f)ᶜ)", "start": [ 32, 1 ], "end": [ 36, 40 ], "kind": "commanddeclaration" }, { "full_name": "CategoryTheory.FintypeCat.imageComplementIncl", "code": "def imageComplementIncl {X Y : FintypeCat.{u}}\n (f : X ⟶ Y) : imageComplement f ⟶ Y :=\n Subtype.val", "start": [ 38, 1 ], "end": [ 41, 14 ], "kind": "commanddeclaration" }, { "full_name": "CategoryTheory.FintypeCat.Action.imageComplement", "code": "noncomputable def Action.imageComplement {X Y : Action FintypeCat (MonCat.of G)}\n (f : X ⟶ Y) : Action FintypeCat (MonCat.of G) where\n V := FintypeCat.imageComplement f.hom\n ρ := MonCat.ofHom <| {\n toFun := fun g y ↦ Subtype.mk (Y.ρ g y.val) <| by\n intro ⟨x, h⟩\n apply y.property\n use X.ρ g⁻¹ x\n calc (X.ρ g⁻¹ ≫ f.hom) x\n = (Y.ρ g⁻¹ * Y.ρ g) y.val := by rw [f.comm, FintypeCat.comp_apply, h]; rfl\n _ = y.val := by rw [← map_mul, mul_left_inv, Action.ρ_one, FintypeCat.id_apply]\n map_one' := by simp only [Action.ρ_one]; rfl\n map_mul' := fun g h ↦ FintypeCat.hom_ext _ _ <| fun y ↦ Subtype.ext <| by\n exact congrFun (MonoidHom.map_mul Y.ρ g h) y.val\n }", "start": [ 45, 1 ], "end": [ 61, 4 ], "kind": "commanddeclaration" }, { "full_name": "CategoryTheory.FintypeCat.Action.imageComplementIncl", "code": "def Action.imageComplementIncl {X Y : Action FintypeCat (MonCat.of G)} (f : X ⟶ Y) :\n Action.imageComplement G f ⟶ Y where\n hom := FintypeCat.imageComplementIncl f.hom\n comm _ := rfl", "start": [ 63, 1 ], "end": [ 67, 16 ], "kind": "commanddeclaration" }, { "full_name": "CategoryTheory.FintypeCat.Action.pretransitive_of_isConnected", "code": "theorem Action.pretransitive_of_isConnected (X : Action FintypeCat (MonCat.of G))\n [IsConnected X] : MulAction.IsPretransitive G X.V where", "start": [ 103, 1 ], "end": [ 124, 23 ], "kind": "commanddeclaration" }, { "full_name": "CategoryTheory.FintypeCat.Action.isConnected_of_transitive", "code": "theorem Action.isConnected_of_transitive (X : FintypeCat) [MulAction G X]\n [MulAction.IsPretransitive G X] [h : Nonempty X] :\n IsConnected (Action.FintypeCat.ofMulAction G X) where", "start": [ 126, 1 ], "end": [ 145, 54 ], "kind": "commanddeclaration" }, { "full_name": "CategoryTheory.FintypeCat.Action.isConnected_iff_transitive", "code": "theorem Action.isConnected_iff_transitive (X : Action FintypeCat (MonCat.of G)) [Nonempty X.V] :\n IsConnected X ↔ MulAction.IsPretransitive G X.V", "start": [ 147, 1 ], "end": [ 150, 86 ], "kind": "commanddeclaration" } ]
Mathlib/NumberTheory/Harmonic/Bounds.lean
[ ".lake/packages/lean4/src/lean/Init.lean", "Mathlib/NumberTheory/Harmonic/Defs.lean", "Mathlib/Analysis/SpecialFunctions/Integrals.lean", "Mathlib/Analysis/SumIntegralComparisons.lean" ]
[ { "full_name": "log_add_one_le_harmonic", "code": "theorem log_add_one_le_harmonic (n : ℕ) :\n Real.log ↑(n+1) ≤ harmonic n", "start": [ 17, 1 ], "end": [ 24, 82 ], "kind": "commanddeclaration" }, { "full_name": "harmonic_le_one_add_log", "code": "theorem harmonic_le_one_add_log (n : ℕ) :\n harmonic n ≤ 1 + Real.log n", "start": [ 26, 1 ], "end": [ 50, 39 ], "kind": "commanddeclaration" }, { "full_name": "log_le_harmonic_floor", "code": "theorem log_le_harmonic_floor (y : ℝ) (hy : 0 ≤ y) :\n Real.log y ≤ harmonic ⌊y⌋₊", "start": [ 52, 1 ], "end": [ 62, 38 ], "kind": "commanddeclaration" }, { "full_name": "harmonic_floor_le_one_add_log", "code": "theorem harmonic_floor_le_one_add_log (y : ℝ) (hy : 1 ≤ y) :\n harmonic ⌊y⌋₊ ≤ 1 + Real.log y", "start": [ 64, 1 ], "end": [ 69, 47 ], "kind": "commanddeclaration" } ]
Mathlib/CategoryTheory/Limits/SmallComplete.lean
[ "Mathlib/SetTheory/Cardinal/Basic.lean", "Mathlib/CategoryTheory/Limits/Shapes/Products.lean", ".lake/packages/lean4/src/lean/Init.lean" ]
[]
Mathlib/RingTheory/RingInvo.lean
[ ".lake/packages/lean4/src/lean/Init.lean", "Mathlib/Algebra/Ring/Opposite.lean", "Mathlib/Algebra/Ring/Equiv.lean" ]
[ { "full_name": "RingInvo", "code": "structure RingInvo [Semiring R] extends R ≃+* Rᵐᵒᵖ where\n \n involution' : ∀ x, (toFun (toFun x).unop).unop = x", "start": [ 32, 1 ], "end": [ 35, 53 ], "kind": "commanddeclaration" }, { "full_name": "RingInvoClass", "code": "class RingInvoClass (F R : Type*) [Semiring R] [EquivLike F R Rᵐᵒᵖ]\n extends RingEquivClass F R Rᵐᵒᵖ : Prop where\n \n involution : ∀ (f : F) (x), (f (f x).unop).unop = x", "start": [ 42, 1 ], "end": [ 47, 54 ], "kind": "commanddeclaration" }, { "full_name": "RingInvoClass.toRingInvo", "code": "@[coe]\ndef RingInvoClass.toRingInvo {R} [Semiring R] [EquivLike F R Rᵐᵒᵖ] [RingInvoClass F R] (f : F) :\n RingInvo R :=\n { (f : R ≃+* Rᵐᵒᵖ) with involution' := RingInvoClass.involution f }", "start": [ 51, 1 ], "end": [ 56, 70 ], "kind": "commanddeclaration" }, { "full_name": "RingInvo.mk'", "code": "def mk' (f : R →+* Rᵐᵒᵖ) (involution : ∀ r, (f (f r).unop).unop = r) : RingInvo R :=\n { f with\n invFun := fun r => (f r.unop).unop\n left_inv := fun r => involution r\n right_inv := fun _ => MulOpposite.unop_injective <| involution _\n involution' := involution }", "start": [ 83, 1 ], "end": [ 89, 32 ], "kind": "commanddeclaration" }, { "full_name": "RingInvo.involution", "code": "@[simp]\ntheorem involution (f : RingInvo R) (x : R) : (f (f x).unop).unop = x", "start": [ 97, 1 ], "end": [ 99, 18 ], "kind": "commanddeclaration" }, { "full_name": "RingInvo.coe_ringEquiv", "code": "@[norm_cast]\ntheorem coe_ringEquiv (f : RingInvo R) (a : R) : (f : R ≃+* Rᵐᵒᵖ) a = f a", "start": [ 107, 1 ], "end": [ 109, 6 ], "kind": "commanddeclaration" }, { "full_name": "RingInvo.map_eq_zero_iff", "code": "theorem map_eq_zero_iff (f : RingInvo R) {x : R} : f x = 0 ↔ x = 0", "start": [ 114, 1 ], "end": [ 115, 32 ], "kind": "commanddeclaration" }, { "full_name": "RingInvo.id", "code": "protected def RingInvo.id : RingInvo R :=\n { RingEquiv.toOpposite R with involution' := fun _ => rfl }", "start": [ 126, 1 ], "end": [ 128, 62 ], "kind": "commanddeclaration" } ]
Mathlib/Algebra/Order/Group/DenselyOrdered.lean
[ "Mathlib/Algebra/Order/Group/Defs.lean", "Mathlib/Algebra/Order/Monoid/Canonical/Defs.lean", ".lake/packages/lean4/src/lean/Init.lean", "Mathlib/Algebra/Order/Monoid/OrderDual.lean" ]
[ { "full_name": "le_of_forall_lt_one_mul_le", "code": "@[to_additive]\ntheorem le_of_forall_lt_one_mul_le (h : ∀ ε < 1, a * ε ≤ b) : a ≤ b", "start": [ 25, 1 ], "end": [ 27, 42 ], "kind": "commanddeclaration" }, { "full_name": "le_of_forall_one_lt_div_le", "code": "@[to_additive]\ntheorem le_of_forall_one_lt_div_le (h : ∀ ε : α, 1 < ε → a / ε ≤ b) : a ≤ b", "start": [ 31, 1 ], "end": [ 34, 80 ], "kind": "commanddeclaration" }, { "full_name": "le_iff_forall_one_lt_le_mul", "code": "@[to_additive]\ntheorem le_iff_forall_one_lt_le_mul : a ≤ b ↔ ∀ ε, 1 < ε → a ≤ b * ε", "start": [ 38, 1 ], "end": [ 40, 83 ], "kind": "commanddeclaration" }, { "full_name": "le_iff_forall_lt_one_mul_le", "code": "@[to_additive]\ntheorem le_iff_forall_lt_one_mul_le : a ≤ b ↔ ∀ ε < 1, a * ε ≤ b", "start": [ 44, 1 ], "end": [ 46, 41 ], "kind": "commanddeclaration" } ]
Mathlib/Data/Rat/Star.lean
[ "Mathlib/Algebra/Star/Order.lean", "Mathlib/Algebra/GroupWithZero/Commute.lean", "Mathlib/Data/NNRat/Lemmas.lean", ".lake/packages/lean4/src/lean/Init.lean", "Mathlib/Tactic/FieldSimp.lean", "Mathlib/Algebra/Order/Monoid/Submonoid.lean" ]
[ { "full_name": "NNRat.addSubmonoid_closure_range_pow", "code": "@[simp] lemma addSubmonoid_closure_range_pow {n : ℕ} (hn₀ : n ≠ 0) :\n closure (range fun x : ℚ≥0 ↦ x ^ n) = ⊤ := by\n refine (eq_top_iff' _).2 fun x ↦ ?_\n suffices x = (x.num * x.den ^ (n - 1)) • (x.den : ℚ≥0)⁻¹ ^ n by\n rw [this]\n exact nsmul_mem (subset_closure <| mem_range_self _) _\n rw [nsmul_eq_mul]\n push_cast\n rw [mul_assoc, pow_sub₀, pow_one, mul_right_comm, ← mul_pow, mul_inv_cancel, one_pow, one_mul,\n ← div_eq_mul_inv, num_div_den]\n all_goals simp [x.den_pos.ne', Nat.one_le_iff_ne_zero, *]", "start": [ 26, 1 ], "end": [ 36, 60 ], "kind": "lemma" }, { "full_name": "NNRat.addSubmonoid_closure_range_mul_self", "code": "@[simp] lemma addSubmonoid_closure_range_mul_self : closure (range fun x : ℚ≥0 ↦ x * x) = ⊤ := by\n simpa only [sq] using addSubmonoid_closure_range_pow two_ne_zero", "start": [ 38, 1 ], "end": [ 39, 67 ], "kind": "lemma" }, { "full_name": "NNRat.instStarOrderedRing", "code": "instance instStarOrderedRing : StarOrderedRing ℚ≥0 where\n le_iff a b := by simp [le_iff_exists_nonneg_add a b]", "start": [ 41, 1 ], "end": [ 42, 55 ], "kind": "commanddeclaration" }, { "full_name": "Rat.addSubmonoid_closure_range_pow", "code": "@[simp] lemma addSubmonoid_closure_range_pow {n : ℕ} (hn₀ : n ≠ 0) (hn : Even n) :\n closure (range fun x : ℚ ↦ x ^ n) = nonneg _ := by\n convert (AddMonoidHom.map_mclosure NNRat.coeHom <| range fun x ↦ x ^ n).symm\n · have (x : ℚ) : ∃ y : ℚ≥0, y ^ n = x ^ n := ⟨x.nnabs, by simp [hn.pow_abs]⟩\n simp [subset_antisymm_iff, range_subset_iff, this]\n · ext\n simp [NNRat.addSubmonoid_closure_range_pow hn₀, NNRat.exists]", "start": [ 48, 1 ], "end": [ 54, 66 ], "kind": "lemma" }, { "full_name": "Rat.addSubmonoid_closure_range_mul_self", "code": "@[simp]\nlemma addSubmonoid_closure_range_mul_self : closure (range fun x : ℚ ↦ x * x) = nonneg _ := by\n simpa only [sq] using addSubmonoid_closure_range_pow two_ne_zero even_two", "start": [ 56, 1 ], "end": [ 58, 76 ], "kind": "lemma" }, { "full_name": "Rat.instStarOrderedRing", "code": "instance instStarOrderedRing : StarOrderedRing ℚ where\n le_iff a b := by simp [le_iff_exists_nonneg_add a b]", "start": [ 60, 1 ], "end": [ 61, 55 ], "kind": "commanddeclaration" } ]
Mathlib/Data/QPF/Multivariate/Constructions/Fix.lean
[ ".lake/packages/lean4/src/lean/Init.lean", "Mathlib/Data/QPF/Multivariate/Basic.lean", "Mathlib/Data/PFunctor/Multivariate/W.lean" ]
[ { "full_name": "MvQPF.recF", "code": "def recF {α : TypeVec n} {β : Type u} (g : F (α.append1 β) → β) : q.P.W α → β :=\n q.P.wRec fun a f' _f rec => g (abs ⟨a, splitFun f' rec⟩)", "start": [ 56, 1 ], "end": [ 60, 59 ], "kind": "commanddeclaration" }, { "full_name": "MvQPF.recF_eq", "code": "theorem recF_eq {α : TypeVec n} {β : Type u} (g : F (α.append1 β) → β) (a : q.P.A)\n (f' : q.P.drop.B a ⟹ α) (f : q.P.last.B a → q.P.W α) :\n recF g (q.P.wMk a f' f) = g (abs ⟨a, splitFun f' (recF g ∘ f)⟩)", "start": [ 64, 1 ], "end": [ 67, 37 ], "kind": "commanddeclaration" }, { "full_name": "MvQPF.recF_eq'", "code": "theorem recF_eq' {α : TypeVec n} {β : Type u} (g : F (α.append1 β) → β) (x : q.P.W α) :\n recF g x = g (abs (appendFun id (recF g) <$$> q.P.wDest' x))", "start": [ 71, 1 ], "end": [ 75, 92 ], "kind": "commanddeclaration" }, { "full_name": "MvQPF.WEquiv", "code": "inductive WEquiv {α : TypeVec n} : q.P.W α → q.P.W α → Prop\n | ind (a : q.P.A) (f' : q.P.drop.B a ⟹ α) (f₀ f₁ : q.P.last.B a → q.P.W α) :\n (∀ x, WEquiv (f₀ x) (f₁ x)) → WEquiv (q.P.wMk a f' f₀) (q.P.wMk a f' f₁)\n | abs (a₀ : q.P.A) (f'₀ : q.P.drop.B a₀ ⟹ α) (f₀ : q.P.last.B a₀ → q.P.W α) (a₁ : q.P.A)\n (f'₁ : q.P.drop.B a₁ ⟹ α) (f₁ : q.P.last.B a₁ → q.P.W α) :\n abs ⟨a₀, q.P.appendContents f'₀ f₀⟩ = abs ⟨a₁, q.P.appendContents f'₁ f₁⟩ →\n WEquiv (q.P.wMk a₀ f'₀ f₀) (q.P.wMk a₁ f'₁ f₁)\n | trans (u v w : q.P.W α) : WEquiv u v → WEquiv v w → WEquiv u w", "start": [ 79, 1 ], "end": [ 88, 67 ], "kind": "commanddeclaration" }, { "full_name": "MvQPF.recF_eq_of_wEquiv", "code": "theorem recF_eq_of_wEquiv (α : TypeVec n) {β : Type u} (u : F (α.append1 β) → β) (x y : q.P.W α) :\n WEquiv x y → recF u x = recF u y", "start": [ 92, 1 ], "end": [ 104, 57 ], "kind": "commanddeclaration" }, { "full_name": "MvQPF.wEquiv.abs'", "code": "theorem wEquiv.abs' {α : TypeVec n} (x y : q.P.W α)\n (h : MvQPF.abs (q.P.wDest' x) = MvQPF.abs (q.P.wDest' y)) :\n WEquiv x y", "start": [ 108, 1 ], "end": [ 116, 19 ], "kind": "commanddeclaration" }, { "full_name": "MvQPF.wEquiv.refl", "code": "theorem wEquiv.refl {α : TypeVec n} (x : q.P.W α) : WEquiv x x", "start": [ 120, 1 ], "end": [ 121, 74 ], "kind": "commanddeclaration" }, { "full_name": "MvQPF.wEquiv.symm", "code": "theorem wEquiv.symm {α : TypeVec n} (x y : q.P.W α) : WEquiv x y → WEquiv y x", "start": [ 125, 1 ], "end": [ 129, 74 ], "kind": "commanddeclaration" }, { "full_name": "MvQPF.wrepr", "code": "def wrepr {α : TypeVec n} : q.P.W α → q.P.W α :=\n recF (q.P.wMk' ∘ repr)", "start": [ 133, 1 ], "end": [ 135, 25 ], "kind": "commanddeclaration" }, { "full_name": "MvQPF.wrepr_wMk", "code": "theorem wrepr_wMk {α : TypeVec n} (a : q.P.A) (f' : q.P.drop.B a ⟹ α)\n (f : q.P.last.B a → q.P.W α) :\n wrepr (q.P.wMk a f' f) =\n q.P.wMk' (repr (abs (appendFun id wrepr <$$> ⟨a, q.P.appendContents f' f⟩)))", "start": [ 139, 1 ], "end": [ 143, 44 ], "kind": "commanddeclaration" }, { "full_name": "MvQPF.wrepr_equiv", "code": "theorem wrepr_equiv {α : TypeVec n} (x : q.P.W α) : WEquiv (wrepr x) x", "start": [ 147, 1 ], "end": [ 153, 29 ], "kind": "commanddeclaration" }, { "full_name": "MvQPF.wEquiv_map", "code": "theorem wEquiv_map {α β : TypeVec n} (g : α ⟹ β) (x y : q.P.W α) :\n WEquiv x y → WEquiv (g <$$> x) (g <$$> y)", "start": [ 157, 1 ], "end": [ 170, 16 ], "kind": "commanddeclaration" }, { "full_name": "MvQPF.wSetoid", "code": "def wSetoid (α : TypeVec n) : Setoid (q.P.W α) :=\n ⟨WEquiv, wEquiv.refl, wEquiv.symm _ _, WEquiv.trans _ _ _⟩", "start": [ 174, 1 ], "end": [ 177, 61 ], "kind": "commanddeclaration" }, { "full_name": "MvQPF.Fix", "code": "def Fix {n : ℕ} (F : TypeVec (n + 1) → Type*) [q : MvQPF F] (α : TypeVec n) :=\n Quotient (wSetoid α : Setoid (q.P.W α))", "start": [ 183, 1 ], "end": [ 191, 42 ], "kind": "commanddeclaration" }, { "full_name": "MvQPF.Fix.map", "code": "def Fix.map {α β : TypeVec n} (g : α ⟹ β) : Fix F α → Fix F β :=\n Quotient.lift (fun x : q.P.W α => ⟦q.P.wMap g x⟧) fun _a _b h => Quot.sound (wEquiv_map _ _ _ h)", "start": [ 194, 1 ], "end": [ 196, 99 ], "kind": "commanddeclaration" }, { "full_name": "MvQPF.Fix.mvfunctor", "code": "instance Fix.mvfunctor : MvFunctor (Fix F) where map := Fix.map", "start": [ 199, 1 ], "end": [ 199, 64 ], "kind": "commanddeclaration" }, { "full_name": "MvQPF.Fix.rec", "code": "def Fix.rec {β : Type u} (g : F (α ::: β) → β) : Fix F α → β :=\n Quot.lift (recF g) (recF_eq_of_wEquiv α g)", "start": [ 204, 1 ], "end": [ 206, 45 ], "kind": "commanddeclaration" }, { "full_name": "MvQPF.fixToW", "code": "def fixToW : Fix F α → q.P.W α :=\n Quotient.lift wrepr (recF_eq_of_wEquiv α fun x => q.P.wMk' (repr x))", "start": [ 209, 1 ], "end": [ 211, 71 ], "kind": "commanddeclaration" }, { "full_name": "MvQPF.Fix.mk", "code": "def Fix.mk (x : F (append1 α (Fix F α))) : Fix F α :=\n Quot.mk _ (q.P.wMk' (appendFun id fixToW <$$> repr x))", "start": [ 215, 1 ], "end": [ 217, 57 ], "kind": "commanddeclaration" }, { "full_name": "MvQPF.Fix.dest", "code": "def Fix.dest : Fix F α → F (append1 α (Fix F α)) :=\n Fix.rec (MvFunctor.map (appendFun id Fix.mk))", "start": [ 220, 1 ], "end": [ 222, 48 ], "kind": "commanddeclaration" }, { "full_name": "MvQPF.Fix.rec_eq", "code": "theorem Fix.rec_eq {β : Type u} (g : F (append1 α β) → β) (x : F (append1 α (Fix F α))) :\n Fix.rec g (Fix.mk x) = g (appendFun id (Fix.rec g) <$$> x)", "start": [ 225, 1 ], "end": [ 239, 86 ], "kind": "commanddeclaration" }, { "full_name": "MvQPF.Fix.ind_aux", "code": "theorem Fix.ind_aux (a : q.P.A) (f' : q.P.drop.B a ⟹ α) (f : q.P.last.B a → q.P.W α) :\n Fix.mk (abs ⟨a, q.P.appendContents f' fun x => ⟦f x⟧⟩) = ⟦q.P.wMk a f' f⟧", "start": [ 242, 1 ], "end": [ 255, 20 ], "kind": "commanddeclaration" }, { "full_name": "MvQPF.Fix.ind_rec", "code": "theorem Fix.ind_rec {β : Type u} (g₁ g₂ : Fix F α → β)\n (h :\n ∀ x : F (append1 α (Fix F α)),\n appendFun id g₁ <$$> x = appendFun id g₂ <$$> x → g₁ (Fix.mk x) = g₂ (Fix.mk x)) :\n ∀ x, g₁ x = g₂ x", "start": [ 258, 1 ], "end": [ 276, 12 ], "kind": "commanddeclaration" }, { "full_name": "MvQPF.Fix.rec_unique", "code": "theorem Fix.rec_unique {β : Type u} (g : F (append1 α β) → β) (h : Fix F α → β)\n (hyp : ∀ x, h (Fix.mk x) = g (appendFun id h <$$> x)) : Fix.rec g = h", "start": [ 279, 1 ], "end": [ 284, 31 ], "kind": "commanddeclaration" }, { "full_name": "MvQPF.Fix.mk_dest", "code": "theorem Fix.mk_dest (x : Fix F α) : Fix.mk (Fix.dest x) = x", "start": [ 287, 1 ], "end": [ 294, 41 ], "kind": "commanddeclaration" }, { "full_name": "MvQPF.Fix.dest_mk", "code": "theorem Fix.dest_mk (x : F (append1 α (Fix F α))) : Fix.dest (Fix.mk x) = x", "start": [ 297, 1 ], "end": [ 307, 29 ], "kind": "commanddeclaration" }, { "full_name": "MvQPF.Fix.ind", "code": "theorem Fix.ind {α : TypeVec n} (p : Fix F α → Prop)\n (h : ∀ x : F (α.append1 (Fix F α)), LiftP (PredLast α p) x → p (Fix.mk x)) : ∀ x, p x", "start": [ 310, 1 ], "end": [ 323, 12 ], "kind": "commanddeclaration" }, { "full_name": "MvQPF.mvqpfFix", "code": "instance mvqpfFix : MvQPF (Fix F) where\n P := q.P.wp\n abs α := Quot.mk WEquiv α\n repr α := fixToW α\n abs_repr := by\n intro α\n apply Quot.ind\n intro a\n apply Quot.sound\n apply wrepr_equiv\n abs_map := by\n intro α β g x;\n conv =>\n rhs\n dsimp [MvFunctor.map]\n rfl", "start": [ 326, 1 ], "end": [ 341, 8 ], "kind": "commanddeclaration" }, { "full_name": "MvQPF.Fix.drec", "code": "def Fix.drec {β : Fix F α → Type u}\n (g : ∀ x : F (α ::: Sigma β), β (Fix.mk <| (id ::: Sigma.fst) <$$> x)) (x : Fix F α) : β x :=\n let y := @Fix.rec _ F _ α (Sigma β) (fun i => ⟨_, g i⟩) x\n have : x = y.1 := by\n symm\n dsimp [y]\n apply Fix.ind_rec _ id _ x\n intro x' ih\n rw [Fix.rec_eq]\n dsimp\n simp? [appendFun_id_id] at ih says\n simp only [appendFun_id_id, MvFunctor.id_map] at ih\n congr\n conv =>\n rhs\n rw [← ih]\n rw [MvFunctor.map_map, ← appendFun_comp, id_comp]\n simp only [Function.comp]\n cast (by rw [this]) y.2", "start": [ 344, 1 ], "end": [ 363, 26 ], "kind": "commanddeclaration" } ]
Mathlib/GroupTheory/Coxeter/Inversion.lean
[ ".lake/packages/lean4/src/lean/Init.lean", "Mathlib/Data/ZMod/Parity.lean", "Mathlib/GroupTheory/Coxeter/Length.lean" ]
[ { "full_name": "CoxeterSystem.IsReflection", "code": "def IsReflection (t : W) : Prop := ∃ w i, t = w * s i * w⁻¹", "start": [ 57, 1 ], "end": [ 59, 60 ], "kind": "commanddeclaration" }, { "full_name": "CoxeterSystem.isReflection_simple", "code": "theorem isReflection_simple (i : B) : cs.IsReflection (s i)", "start": [ 61, 1 ], "end": [ 61, 81 ], "kind": "commanddeclaration" }, { "full_name": "CoxeterSystem.IsReflection.pow_two", "code": "theorem pow_two : t ^ 2 = 1", "start": [ 68, 1 ], "end": [ 70, 7 ], "kind": "commanddeclaration" }, { "full_name": "CoxeterSystem.IsReflection.mul_self", "code": "theorem mul_self : t * t = 1", "start": [ 72, 1 ], "end": [ 74, 7 ], "kind": "commanddeclaration" }, { "full_name": "CoxeterSystem.IsReflection.inv", "code": "theorem inv : t⁻¹ = t", "start": [ 76, 1 ], "end": [ 78, 19 ], "kind": "commanddeclaration" }, { "full_name": "CoxeterSystem.IsReflection.isReflection_inv", "code": "theorem isReflection_inv : cs.IsReflection t⁻¹", "start": [ 80, 1 ], "end": [ 80, 66 ], "kind": "commanddeclaration" }, { "full_name": "CoxeterSystem.IsReflection.odd_length", "code": "theorem odd_length : Odd (ℓ t)", "start": [ 82, 1 ], "end": [ 86, 29 ], "kind": "commanddeclaration" }, { "full_name": "CoxeterSystem.IsReflection.length_mul_left_ne", "code": "theorem length_mul_left_ne (w : W) : ℓ (w * t) ≠ ℓ w", "start": [ 88, 1 ], "end": [ 93, 29 ], "kind": "commanddeclaration" }, { "full_name": "CoxeterSystem.IsReflection.length_mul_right_ne", "code": "theorem length_mul_right_ne (w : W) : ℓ (t * w) ≠ ℓ w", "start": [ 95, 1 ], "end": [ 100, 29 ], "kind": "commanddeclaration" }, { "full_name": "CoxeterSystem.IsReflection.conj", "code": "theorem conj (w : W) : cs.IsReflection (w * t * w⁻¹)", "start": [ 102, 1 ], "end": [ 105, 8 ], "kind": "commanddeclaration" }, { "full_name": "CoxeterSystem.isReflection_conj_iff", "code": "@[simp]\ntheorem isReflection_conj_iff (w t : W) :\n cs.IsReflection (w * t * w⁻¹) ↔ cs.IsReflection t", "start": [ 109, 1 ], "end": [ 115, 37 ], "kind": "commanddeclaration" }, { "full_name": "CoxeterSystem.IsRightInversion", "code": "def IsRightInversion (w t : W) : Prop := cs.IsReflection t ∧ ℓ (w * t) < ℓ w", "start": [ 117, 1 ], "end": [ 119, 77 ], "kind": "commanddeclaration" }, { "full_name": "CoxeterSystem.IsLeftInversion", "code": "def IsLeftInversion (w t : W) : Prop := cs.IsReflection t ∧ ℓ (t * w) < ℓ w", "start": [ 121, 1 ], "end": [ 123, 76 ], "kind": "commanddeclaration" }, { "full_name": "CoxeterSystem.isRightInversion_inv_iff", "code": "theorem isRightInversion_inv_iff {w t : W} :\n cs.IsRightInversion w⁻¹ t ↔ cs.IsLeftInversion w t", "start": [ 125, 1 ], "end": [ 129, 67 ], "kind": "commanddeclaration" }, { "full_name": "CoxeterSystem.isLeftInversion_inv_iff", "code": "theorem isLeftInversion_inv_iff {w t : W} :\n cs.IsLeftInversion w⁻¹ t ↔ cs.IsRightInversion w t", "start": [ 131, 1 ], "end": [ 134, 7 ], "kind": "commanddeclaration" }, { "full_name": "CoxeterSystem.IsReflection.isRightInversion_mul_left_iff", "code": "theorem isRightInversion_mul_left_iff {w : W} :\n cs.IsRightInversion (w * t) t ↔ ¬cs.IsRightInversion w t", "start": [ 141, 1 ], "end": [ 147, 56 ], "kind": "commanddeclaration" }, { "full_name": "CoxeterSystem.IsReflection.not_isRightInversion_mul_left_iff", "code": "theorem not_isRightInversion_mul_left_iff {w : W} :\n ¬cs.IsRightInversion (w * t) t ↔ cs.IsRightInversion w t", "start": [ 149, 1 ], "end": [ 151, 44 ], "kind": "commanddeclaration" }, { "full_name": "CoxeterSystem.IsReflection.isLeftInversion_mul_right_iff", "code": "theorem isLeftInversion_mul_right_iff {w : W} :\n cs.IsLeftInversion (t * w) t ↔ ¬cs.IsLeftInversion w t", "start": [ 153, 1 ], "end": [ 156, 38 ], "kind": "commanddeclaration" }, { "full_name": "CoxeterSystem.IsReflection.not_isLeftInversion_mul_right_iff", "code": "theorem not_isLeftInversion_mul_right_iff {w : W} :\n ¬cs.IsLeftInversion (t * w) t ↔ cs.IsLeftInversion w t", "start": [ 158, 1 ], "end": [ 160, 44 ], "kind": "commanddeclaration" }, { "full_name": "CoxeterSystem.isRightInversion_simple_iff_isRightDescent", "code": "@[simp]\ntheorem isRightInversion_simple_iff_isRightDescent (w : W) (i : B) :\n cs.IsRightInversion w (s i) ↔ cs.IsRightDescent w i", "start": [ 164, 1 ], "end": [ 167, 68 ], "kind": "commanddeclaration" }, { "full_name": "CoxeterSystem.isLeftInversion_simple_iff_isLeftDescent", "code": "@[simp]\ntheorem isLeftInversion_simple_iff_isLeftDescent (w : W) (i : B) :\n cs.IsLeftInversion w (s i) ↔ cs.IsLeftDescent w i", "start": [ 169, 1 ], "end": [ 172, 66 ], "kind": "commanddeclaration" }, { "full_name": "CoxeterSystem.rightInvSeq", "code": "def rightInvSeq (ω : List B) : List W :=\n match ω with\n | [] => []\n | i :: ω => (π ω)⁻¹ * (s i) * (π ω) :: rightInvSeq ω", "start": [ 174, 1 ], "end": [ 183, 60 ], "kind": "commanddeclaration" }, { "full_name": "CoxeterSystem.leftInvSeq", "code": "def leftInvSeq (ω : List B) : List W :=\n match ω with\n | [] => []\n | i :: ω => s i :: List.map (MulAut.conj (s i)) (leftInvSeq ω)", "start": [ 185, 1 ], "end": [ 193, 70 ], "kind": "commanddeclaration" }, { "full_name": "CoxeterSystem.rightInvSeq_nil", "code": "@[simp] theorem rightInvSeq_nil : ris [] = []", "start": [ 198, 1 ], "end": [ 198, 53 ], "kind": "commanddeclaration" }, { "full_name": "CoxeterSystem.leftInvSeq_nil", "code": "@[simp] theorem leftInvSeq_nil : lis [] = []", "start": [ 200, 1 ], "end": [ 200, 52 ], "kind": "commanddeclaration" }, { "full_name": "CoxeterSystem.rightInvSeq_singleton", "code": "@[simp] theorem rightInvSeq_singleton (i : B) : ris [i] = [s i]", "start": [ 202, 1 ], "end": [ 202, 89 ], "kind": "commanddeclaration" }, { "full_name": "CoxeterSystem.leftInvSeq_singleton", "code": "@[simp] theorem leftInvSeq_singleton (i : B) : lis [i] = [s i]", "start": [ 204, 1 ], "end": [ 204, 70 ], "kind": "commanddeclaration" }, { "full_name": "CoxeterSystem.rightInvSeq_concat", "code": "theorem rightInvSeq_concat (ω : List B) (i : B) :\n ris (ω.concat i) = (List.map (MulAut.conj (s i)) (ris ω)).concat (s i)", "start": [ 206, 1 ], "end": [ 214, 10 ], "kind": "commanddeclaration" }, { "full_name": "CoxeterSystem.leftInvSeq_eq_reverse_rightInvSeq_reverse", "code": "private theorem leftInvSeq_eq_reverse_rightInvSeq_reverse (ω : List B) :\n lis ω = (ris ω.reverse).reverse", "start": [ 216, 1 ], "end": [ 221, 23 ], "kind": "commanddeclaration" }, { "full_name": "CoxeterSystem.leftInvSeq_concat", "code": "theorem leftInvSeq_concat (ω : List B) (i : B) :\n lis (ω.concat i) = (lis ω).concat ((π ω) * (s i) * (π ω)⁻¹)", "start": [ 223, 1 ], "end": [ 225, 64 ], "kind": "commanddeclaration" }, { "full_name": "CoxeterSystem.rightInvSeq_reverse", "code": "theorem rightInvSeq_reverse (ω : List B) :\n ris (ω.reverse) = (lis ω).reverse", "start": [ 227, 1 ], "end": [ 229, 51 ], "kind": "commanddeclaration" }, { "full_name": "CoxeterSystem.leftInvSeq_reverse", "code": "theorem leftInvSeq_reverse (ω : List B) :\n lis (ω.reverse) = (ris ω).reverse", "start": [ 231, 1 ], "end": [ 233, 51 ], "kind": "commanddeclaration" }, { "full_name": "CoxeterSystem.length_rightInvSeq", "code": "@[simp] theorem length_rightInvSeq (ω : List B) : (ris ω).length = ω.length", "start": [ 235, 1 ], "end": [ 238, 24 ], "kind": "commanddeclaration" }, { "full_name": "CoxeterSystem.length_leftInvSeq", "code": "@[simp] theorem length_leftInvSeq (ω : List B) : (lis ω).length = ω.length", "start": [ 240, 1 ], "end": [ 241, 51 ], "kind": "commanddeclaration" }, { "full_name": "CoxeterSystem.getD_rightInvSeq", "code": "theorem getD_rightInvSeq (ω : List B) (j : ℕ) :\n (ris ω).getD j 1 =\n (π (ω.drop (j + 1)))⁻¹\n * (Option.map (cs.simple) (ω.get? j)).getD 1\n * π (ω.drop (j + 1))", "start": [ 243, 1 ], "end": [ 254, 35 ], "kind": "commanddeclaration" }, { "full_name": "CoxeterSystem.getD_leftInvSeq", "code": "theorem getD_leftInvSeq (ω : List B) (j : ℕ) :\n (lis ω).getD j 1 =\n π (ω.take j)\n * (Option.map (cs.simple) (ω.get? j)).getD 1\n * (π (ω.take j))⁻¹", "start": [ 256, 1 ], "end": [ 270, 40 ], "kind": "commanddeclaration" }, { "full_name": "CoxeterSystem.getD_rightInvSeq_mul_self", "code": "theorem getD_rightInvSeq_mul_self (ω : List B) (j : ℕ) :\n ((ris ω).getD j 1) * ((ris ω).getD j 1) = 1", "start": [ 272, 1 ], "end": [ 279, 9 ], "kind": "commanddeclaration" }, { "full_name": "CoxeterSystem.getD_leftInvSeq_mul_self", "code": "theorem getD_leftInvSeq_mul_self (ω : List B) (j : ℕ) :\n ((lis ω).getD j 1) * ((lis ω).getD j 1) = 1", "start": [ 281, 1 ], "end": [ 288, 9 ], "kind": "commanddeclaration" }, { "full_name": "CoxeterSystem.rightInvSeq_drop", "code": "theorem rightInvSeq_drop (ω : List B) (j : ℕ) :\n ris (ω.drop j) = (ris ω).drop j", "start": [ 290, 1 ], "end": [ 296, 62 ], "kind": "commanddeclaration" }, { "full_name": "CoxeterSystem.leftInvSeq_take", "code": "theorem leftInvSeq_take (ω : List B) (j : ℕ) :\n lis (ω.take j) = (lis ω).take j", "start": [ 298, 1 ], "end": [ 306, 54 ], "kind": "commanddeclaration" }, { "full_name": "CoxeterSystem.isReflection_of_mem_rightInvSeq", "code": "theorem isReflection_of_mem_rightInvSeq (ω : List B) {t : W} (ht : t ∈ ris ω) :\n cs.IsReflection t", "start": [ 308, 1 ], "end": [ 316, 19 ], "kind": "commanddeclaration" }, { "full_name": "CoxeterSystem.isReflection_of_mem_leftInvSeq", "code": "theorem isReflection_of_mem_leftInvSeq (ω : List B) {t : W} (ht : t ∈ lis ω) :\n cs.IsReflection t", "start": [ 318, 1 ], "end": [ 321, 56 ], "kind": "commanddeclaration" }, { "full_name": "CoxeterSystem.wordProd_mul_getD_rightInvSeq", "code": "theorem wordProd_mul_getD_rightInvSeq (ω : List B) (j : ℕ) :\n π ω * ((ris ω).getD j 1) = π (ω.eraseIdx j)", "start": [ 323, 1 ], "end": [ 332, 9 ], "kind": "commanddeclaration" }, { "full_name": "CoxeterSystem.getD_leftInvSeq_mul_wordProd", "code": "theorem getD_leftInvSeq_mul_wordProd (ω : List B) (j : ℕ) :\n ((lis ω).getD j 1) * π ω = π (ω.eraseIdx j)", "start": [ 334, 1 ], "end": [ 343, 9 ], "kind": "commanddeclaration" }, { "full_name": "CoxeterSystem.isRightInversion_of_mem_rightInvSeq", "code": "theorem isRightInversion_of_mem_rightInvSeq {ω : List B} (hω : cs.IsReduced ω) {t : W}\n (ht : t ∈ ris ω) : cs.IsRightInversion (π ω) t", "start": [ 345, 1 ], "end": [ 356, 45 ], "kind": "commanddeclaration" }, { "full_name": "CoxeterSystem.isLeftInversion_of_mem_leftInvSeq", "code": "theorem isLeftInversion_of_mem_leftInvSeq {ω : List B} (hω : cs.IsReduced ω) {t : W}\n (ht : t ∈ lis ω) : cs.IsLeftInversion (π ω) t", "start": [ 358, 1 ], "end": [ 369, 45 ], "kind": "commanddeclaration" }, { "full_name": "CoxeterSystem.prod_rightInvSeq", "code": "theorem prod_rightInvSeq (ω : List B) : prod (ris ω) = (π ω)⁻¹", "start": [ 371, 1 ], "end": [ 374, 42 ], "kind": "commanddeclaration" }, { "full_name": "CoxeterSystem.prod_leftInvSeq", "code": "theorem prod_leftInvSeq (ω : List B) : prod (lis ω) = (π ω)⁻¹", "start": [ 376, 1 ], "end": [ 388, 30 ], "kind": "commanddeclaration" }, { "full_name": "CoxeterSystem.IsReduced.nodup_rightInvSeq", "code": "theorem IsReduced.nodup_rightInvSeq {ω : List B} (rω : cs.IsReduced ω) : List.Nodup (ris ω)", "start": [ 390, 1 ], "end": [ 435, 8 ], "kind": "commanddeclaration" }, { "full_name": "CoxeterSystem.IsReduced.nodup_leftInvSeq", "code": "theorem IsReduced.nodup_leftInvSeq {ω : List B} (rω : cs.IsReduced ω) : List.Nodup (lis ω)", "start": [ 437, 1 ], "end": [ 440, 26 ], "kind": "commanddeclaration" } ]
Mathlib/MeasureTheory/Measure/FiniteMeasureProd.lean
[ "Mathlib/MeasureTheory/Constructions/Prod/Basic.lean", ".lake/packages/lean4/src/lean/Init.lean", "Mathlib/MeasureTheory/Measure/ProbabilityMeasure.lean" ]
[ { "full_name": "MeasureTheory.FiniteMeasure.prod", "code": "noncomputable def prod (μ : FiniteMeasure α) (ν : FiniteMeasure β) : FiniteMeasure (α × β) :=\n ⟨μ.toMeasure.prod ν.toMeasure, inferInstance⟩", "start": [ 41, 1 ], "end": [ 43, 48 ], "kind": "commanddeclaration" }, { "full_name": "MeasureTheory.FiniteMeasure.toMeasure_prod", "code": "@[simp] lemma toMeasure_prod : (μ.prod ν).toMeasure = μ.toMeasure.prod ν.toMeasure := rfl", "start": [ 47, 1 ], "end": [ 47, 90 ], "kind": "lemma" }, { "full_name": "MeasureTheory.FiniteMeasure.prod_apply", "code": "lemma prod_apply (s : Set (α × β)) (s_mble : MeasurableSet s) :\n μ.prod ν s = ENNReal.toNNReal (∫⁻ x, ν.toMeasure (Prod.mk x ⁻¹' s) ∂μ) := by\n simp [coeFn_def, Measure.prod_apply s_mble]", "start": [ 49, 1 ], "end": [ 51, 46 ], "kind": "lemma" }, { "full_name": "MeasureTheory.FiniteMeasure.prod_apply_symm", "code": "lemma prod_apply_symm (s : Set (α × β)) (s_mble : MeasurableSet s) :\n μ.prod ν s = ENNReal.toNNReal (∫⁻ y, μ.toMeasure ((fun x ↦ ⟨x, y⟩) ⁻¹' s) ∂ν) := by\n simp [coeFn_def, Measure.prod_apply_symm s_mble]", "start": [ 53, 1 ], "end": [ 55, 51 ], "kind": "lemma" }, { "full_name": "MeasureTheory.FiniteMeasure.prod_prod", "code": "lemma prod_prod (s : Set α) (t : Set β) : μ.prod ν (s ×ˢ t) = μ s * ν t := by simp [coeFn_def]", "start": [ 57, 1 ], "end": [ 57, 95 ], "kind": "lemma" }, { "full_name": "MeasureTheory.FiniteMeasure.mass_prod", "code": "@[simp] lemma mass_prod : (μ.prod ν).mass = μ.mass * ν.mass := by\n simp only [coeFn_def, mass, univ_prod_univ.symm, toMeasure_prod]\n rw [← ENNReal.toNNReal_mul]\n exact congr_arg ENNReal.toNNReal (Measure.prod_prod univ univ)", "start": [ 59, 1 ], "end": [ 62, 65 ], "kind": "lemma" }, { "full_name": "MeasureTheory.FiniteMeasure.zero_prod", "code": "@[simp] lemma zero_prod : (0 : FiniteMeasure α).prod ν = 0 := by\n rw [← mass_zero_iff, mass_prod, zero_mass, zero_mul]", "start": [ 64, 1 ], "end": [ 65, 55 ], "kind": "lemma" }, { "full_name": "MeasureTheory.FiniteMeasure.prod_zero", "code": "@[simp] lemma prod_zero : μ.prod (0 : FiniteMeasure β) = 0 := by\n rw [← mass_zero_iff, mass_prod, zero_mass, mul_zero]", "start": [ 67, 1 ], "end": [ 68, 55 ], "kind": "lemma" }, { "full_name": "MeasureTheory.FiniteMeasure.map_fst_prod", "code": "@[simp] lemma map_fst_prod : (μ.prod ν).map Prod.fst = ν univ • μ := by ext; simp", "start": [ 70, 1 ], "end": [ 70, 82 ], "kind": "lemma" }, { "full_name": "MeasureTheory.FiniteMeasure.map_snd_prod", "code": "@[simp] lemma map_snd_prod : (μ.prod ν).map Prod.snd = μ univ • ν := by ext; simp", "start": [ 71, 1 ], "end": [ 71, 82 ], "kind": "lemma" }, { "full_name": "MeasureTheory.FiniteMeasure.map_prod_map", "code": "lemma map_prod_map {α' : Type*} [MeasurableSpace α'] {β' : Type*} [MeasurableSpace β']\n {f : α → α'} {g : β → β'} (f_mble : Measurable f) (g_mble : Measurable g):\n (μ.map f).prod (ν.map g) = (μ.prod ν).map (Prod.map f g) := by\n apply Subtype.ext\n simp only [val_eq_toMeasure, toMeasure_prod, toMeasure_map]\n rw [Measure.map_prod_map _ _ f_mble g_mble]", "start": [ 73, 1 ], "end": [ 78, 46 ], "kind": "lemma" }, { "full_name": "MeasureTheory.FiniteMeasure.prod_swap", "code": "lemma prod_swap : (μ.prod ν).map Prod.swap = ν.prod μ := by\n apply Subtype.ext\n simp [Measure.prod_swap]", "start": [ 80, 1 ], "end": [ 82, 27 ], "kind": "lemma" }, { "full_name": "MeasureTheory.ProbabilityMeasure.prod", "code": "noncomputable def prod (μ : ProbabilityMeasure α) (ν : ProbabilityMeasure β) :\n ProbabilityMeasure (α × β) :=\n ⟨μ.toMeasure.prod ν.toMeasure, by infer_instance⟩", "start": [ 94, 1 ], "end": [ 97, 52 ], "kind": "commanddeclaration" }, { "full_name": "MeasureTheory.ProbabilityMeasure.toMeasure_prod", "code": "@[simp] lemma toMeasure_prod : (μ.prod ν).toMeasure = μ.toMeasure.prod ν.toMeasure := rfl", "start": [ 101, 1 ], "end": [ 101, 90 ], "kind": "lemma" }, { "full_name": "MeasureTheory.ProbabilityMeasure.prod_apply", "code": "lemma prod_apply (s : Set (α × β)) (s_mble : MeasurableSet s) :\n μ.prod ν s = ENNReal.toNNReal (∫⁻ x, ν.toMeasure (Prod.mk x ⁻¹' s) ∂μ) := by\n simp [coeFn_def, Measure.prod_apply s_mble]", "start": [ 103, 1 ], "end": [ 105, 46 ], "kind": "lemma" }, { "full_name": "MeasureTheory.ProbabilityMeasure.prod_apply_symm", "code": "lemma prod_apply_symm (s : Set (α × β)) (s_mble : MeasurableSet s) :\n μ.prod ν s = ENNReal.toNNReal (∫⁻ y, μ.toMeasure ((fun x ↦ ⟨x, y⟩) ⁻¹' s) ∂ν) := by\n simp [coeFn_def, Measure.prod_apply_symm s_mble]", "start": [ 107, 1 ], "end": [ 109, 51 ], "kind": "lemma" }, { "full_name": "MeasureTheory.ProbabilityMeasure.prod_prod", "code": "lemma prod_prod (s : Set α) (t : Set β) : μ.prod ν (s ×ˢ t) = μ s * ν t := by simp [coeFn_def]", "start": [ 111, 1 ], "end": [ 111, 95 ], "kind": "lemma" }, { "full_name": "MeasureTheory.ProbabilityMeasure.map_fst_prod", "code": "@[simp] lemma map_fst_prod : (μ.prod ν).map measurable_fst.aemeasurable = μ := by\n apply Subtype.ext\n simp only [val_eq_to_measure, toMeasure_map, toMeasure_prod, Measure.map_fst_prod,\n measure_univ, one_smul]", "start": [ 113, 1 ], "end": [ 117, 37 ], "kind": "lemma" }, { "full_name": "MeasureTheory.ProbabilityMeasure.map_snd_prod", "code": "@[simp] lemma map_snd_prod : (μ.prod ν).map measurable_snd.aemeasurable = ν := by\n apply Subtype.ext\n simp only [val_eq_to_measure, toMeasure_map, toMeasure_prod, Measure.map_snd_prod,\n measure_univ, one_smul]", "start": [ 119, 1 ], "end": [ 123, 37 ], "kind": "lemma" }, { "full_name": "MeasureTheory.ProbabilityMeasure.map_prod_map", "code": "lemma map_prod_map {α' : Type*} [MeasurableSpace α'] {β' : Type*} [MeasurableSpace β']\n {f : α → α'} {g : β → β'} (f_mble : Measurable f) (g_mble : Measurable g) :\n (μ.map f_mble.aemeasurable).prod (ν.map g_mble.aemeasurable)\n = (μ.prod ν).map (f_mble.prod_map g_mble).aemeasurable := by\n apply Subtype.ext\n simp only [val_eq_to_measure, toMeasure_prod, toMeasure_map]\n rw [Measure.map_prod_map _ _ f_mble g_mble]", "start": [ 125, 1 ], "end": [ 131, 46 ], "kind": "lemma" }, { "full_name": "MeasureTheory.ProbabilityMeasure.prod_swap", "code": "lemma prod_swap : (μ.prod ν).map measurable_swap.aemeasurable = ν.prod μ := by\n apply Subtype.ext\n simp [Measure.prod_swap]", "start": [ 133, 1 ], "end": [ 135, 27 ], "kind": "lemma" } ]
Mathlib/CategoryTheory/Monoidal/Internal/Types.lean
[ "Mathlib/CategoryTheory/Monoidal/Types/Symmetric.lean", "Mathlib/CategoryTheory/Monoidal/CommMon_.lean", ".lake/packages/lean4/src/lean/Init.lean", "Mathlib/Algebra/Category/MonCat/Basic.lean" ]
[ { "full_name": "MonTypeEquivalenceMon.monMonoid", "code": "instance monMonoid (A : Mon_ (Type u)) : Monoid A.X where\n one := A.one PUnit.unit\n mul x y := A.mul (x, y)\n one_mul x := by convert congr_fun A.one_mul (PUnit.unit, x)\n mul_one x := by convert congr_fun A.mul_one (x, PUnit.unit)\n mul_assoc x y z := by convert congr_fun A.mul_assoc ((x, y), z)", "start": [ 28, 1 ], "end": [ 33, 66 ], "kind": "commanddeclaration" }, { "full_name": "MonTypeEquivalenceMon.functor", "code": "noncomputable def functor : Mon_ (Type u) ⥤ MonCat.{u} where\n obj A := MonCat.of A.X\n map f :=\n { toFun := f.hom\n map_one' := congr_fun f.one_hom PUnit.unit\n map_mul' := fun x y => congr_fun f.mul_hom (x, y) }", "start": [ 37, 1 ], "end": [ 44, 58 ], "kind": "commanddeclaration" }, { "full_name": "MonTypeEquivalenceMon.inverse", "code": "noncomputable def inverse : MonCat.{u} ⥤ Mon_ (Type u) where\n obj A :=\n { X := A\n one := fun _ => 1\n mul := fun p => p.1 * p.2\n one_mul := by ext ⟨_, _⟩; dsimp; simp\n mul_one := by ext ⟨_, _⟩; dsimp; simp\n mul_assoc := by ext ⟨⟨x, y⟩, z⟩; simp [mul_assoc] }\n map f := { hom := f }", "start": [ 48, 1 ], "end": [ 58, 24 ], "kind": "commanddeclaration" }, { "full_name": "monTypeEquivalenceMon", "code": "noncomputable def monTypeEquivalenceMon : Mon_ (Type u) ≌ MonCat.{u} where\n functor := functor\n inverse := inverse\n unitIso :=\n NatIso.ofComponents\n (fun A =>\n { hom := { hom := 𝟙 _ }\n inv := { hom := 𝟙 _ } })\n (by aesop_cat)\n counitIso :=\n NatIso.ofComponents\n (fun A =>\n { hom :=\n { toFun := id\n map_one' := rfl\n map_mul' := fun x y => rfl }\n inv :=\n { toFun := id\n map_one' := rfl\n map_mul' := fun x y => rfl } })\n (by aesop_cat)", "start": [ 66, 1 ], "end": [ 89, 21 ], "kind": "commanddeclaration" }, { "full_name": "monTypeEquivalenceMonForget", "code": "noncomputable def monTypeEquivalenceMonForget :\n MonTypeEquivalenceMon.functor ⋙ forget MonCat ≅ Mon_.forget (Type u) :=\n NatIso.ofComponents (fun A => Iso.refl _) (by aesop_cat)", "start": [ 93, 1 ], "end": [ 98, 59 ], "kind": "commanddeclaration" }, { "full_name": "monTypeInhabited", "code": "noncomputable instance monTypeInhabited : Inhabited (Mon_ (Type u)) :=\n ⟨MonTypeEquivalenceMon.inverse.obj (MonCat.of PUnit)⟩", "start": [ 102, 1 ], "end": [ 103, 56 ], "kind": "commanddeclaration" }, { "full_name": "CommMonTypeEquivalenceCommMon.commMonCommMonoid", "code": "instance commMonCommMonoid (A : CommMon_ (Type u)) : CommMonoid A.X :=\n { MonTypeEquivalenceMon.monMonoid A.toMon_ with\n mul_comm := fun x y => by convert congr_fun A.mul_comm (y, x) }", "start": [ 109, 1 ], "end": [ 111, 68 ], "kind": "commanddeclaration" }, { "full_name": "CommMonTypeEquivalenceCommMon.functor", "code": "noncomputable def functor : CommMon_ (Type u) ⥤ CommMonCat.{u} where\n obj A := CommMonCat.of A.X\n map f := MonTypeEquivalenceMon.functor.map f", "start": [ 115, 1 ], "end": [ 119, 47 ], "kind": "commanddeclaration" }, { "full_name": "CommMonTypeEquivalenceCommMon.inverse", "code": "noncomputable def inverse : CommMonCat.{u} ⥤ CommMon_ (Type u) where\n obj A :=\n { MonTypeEquivalenceMon.inverse.obj ((forget₂ CommMonCat MonCat).obj A) with\n mul_comm := by\n ext ⟨x : A, y : A⟩\n exact CommMonoid.mul_comm y x }\n map f := MonTypeEquivalenceMon.inverse.map ((forget₂ CommMonCat MonCat).map f)", "start": [ 123, 1 ], "end": [ 131, 81 ], "kind": "commanddeclaration" }, { "full_name": "commMonTypeEquivalenceCommMon", "code": "noncomputable def commMonTypeEquivalenceCommMon : CommMon_ (Type u) ≌ CommMonCat.{u} where\n functor := functor\n inverse := inverse\n unitIso :=\n NatIso.ofComponents\n (fun A =>\n { hom := { hom := 𝟙 _ }\n inv := { hom := 𝟙 _ } })\n (by aesop_cat)\n counitIso :=\n NatIso.ofComponents\n (fun A =>\n { hom :=\n { toFun := id\n map_one' := rfl\n map_mul' := fun x y => rfl }\n inv :=\n { toFun := id\n map_one' := rfl\n map_mul' := fun x y => rfl } })\n (by aesop_cat)", "start": [ 139, 1 ], "end": [ 162, 21 ], "kind": "commanddeclaration" }, { "full_name": "commMonTypeEquivalenceCommMonForget", "code": "noncomputable def commMonTypeEquivalenceCommMonForget :\n CommMonTypeEquivalenceCommMon.functor ⋙ forget₂ CommMonCat MonCat ≅\n CommMon_.forget₂Mon_ (Type u) ⋙ MonTypeEquivalenceMon.functor :=\n NatIso.ofComponents (fun A => Iso.refl _) (by aesop_cat)", "start": [ 166, 1 ], "end": [ 172, 59 ], "kind": "commanddeclaration" }, { "full_name": "commMonTypeInhabited", "code": "noncomputable instance commMonTypeInhabited : Inhabited (CommMon_ (Type u)) :=\n ⟨CommMonTypeEquivalenceCommMon.inverse.obj (CommMonCat.of PUnit)⟩", "start": [ 176, 1 ], "end": [ 177, 68 ], "kind": "commanddeclaration" } ]
Mathlib/Algebra/Algebra/Subalgebra/Order.lean
[ "Mathlib/Algebra/Ring/Subring/Order.lean", "Mathlib/Algebra/Module/Submodule/Order.lean", ".lake/packages/lean4/src/lean/Init.lean", "Mathlib/Algebra/Ring/Subsemiring/Order.lean", "Mathlib/Algebra/Algebra/Subalgebra/Basic.lean" ]
[ { "full_name": "Subalgebra.toOrderedSemiring", "code": "instance toOrderedSemiring [CommSemiring R] [OrderedSemiring A] [Algebra R A]\n (S : Subalgebra R A) : OrderedSemiring S :=\n S.toSubsemiring.toOrderedSemiring", "start": [ 20, 1 ], "end": [ 22, 36 ], "kind": "commanddeclaration" }, { "full_name": "Subalgebra.toStrictOrderedSemiring", "code": "instance toStrictOrderedSemiring [CommSemiring R] [StrictOrderedSemiring A] [Algebra R A]\n (S : Subalgebra R A) : StrictOrderedSemiring S :=\n S.toSubsemiring.toStrictOrderedSemiring", "start": [ 25, 1 ], "end": [ 27, 42 ], "kind": "commanddeclaration" }, { "full_name": "Subalgebra.toOrderedCommSemiring", "code": "instance toOrderedCommSemiring [CommSemiring R] [OrderedCommSemiring A] [Algebra R A]\n (S : Subalgebra R A) : OrderedCommSemiring S :=\n S.toSubsemiring.toOrderedCommSemiring", "start": [ 30, 1 ], "end": [ 32, 40 ], "kind": "commanddeclaration" }, { "full_name": "Subalgebra.toStrictOrderedCommSemiring", "code": "instance toStrictOrderedCommSemiring [CommSemiring R] [StrictOrderedCommSemiring A]\n [Algebra R A] (S : Subalgebra R A) : StrictOrderedCommSemiring S :=\n S.toSubsemiring.toStrictOrderedCommSemiring", "start": [ 35, 1 ], "end": [ 37, 46 ], "kind": "commanddeclaration" }, { "full_name": "Subalgebra.toOrderedRing", "code": "instance toOrderedRing [CommRing R] [OrderedRing A] [Algebra R A] (S : Subalgebra R A) :\n OrderedRing S :=\n S.toSubring.toOrderedRing", "start": [ 40, 1 ], "end": [ 42, 28 ], "kind": "commanddeclaration" }, { "full_name": "Subalgebra.toOrderedCommRing", "code": "instance toOrderedCommRing [CommRing R] [OrderedCommRing A] [Algebra R A]\n (S : Subalgebra R A) : OrderedCommRing S :=\n S.toSubring.toOrderedCommRing", "start": [ 45, 1 ], "end": [ 47, 32 ], "kind": "commanddeclaration" }, { "full_name": "Subalgebra.toLinearOrderedSemiring", "code": "instance toLinearOrderedSemiring [CommSemiring R] [LinearOrderedSemiring A] [Algebra R A]\n (S : Subalgebra R A) : LinearOrderedSemiring S :=\n S.toSubsemiring.toLinearOrderedSemiring", "start": [ 50, 1 ], "end": [ 52, 42 ], "kind": "commanddeclaration" }, { "full_name": "Subalgebra.toLinearOrderedCommSemiring", "code": "instance toLinearOrderedCommSemiring [CommSemiring R] [LinearOrderedCommSemiring A]\n [Algebra R A] (S : Subalgebra R A) : LinearOrderedCommSemiring S :=\n S.toSubsemiring.toLinearOrderedCommSemiring", "start": [ 55, 1 ], "end": [ 57, 46 ], "kind": "commanddeclaration" }, { "full_name": "Subalgebra.toLinearOrderedRing", "code": "instance toLinearOrderedRing [CommRing R] [LinearOrderedRing A] [Algebra R A]\n (S : Subalgebra R A) : LinearOrderedRing S :=\n S.toSubring.toLinearOrderedRing", "start": [ 60, 1 ], "end": [ 62, 34 ], "kind": "commanddeclaration" }, { "full_name": "Subalgebra.toLinearOrderedCommRing", "code": "instance toLinearOrderedCommRing [CommRing R] [LinearOrderedCommRing A] [Algebra R A]\n (S : Subalgebra R A) : LinearOrderedCommRing S :=\n S.toSubring.toLinearOrderedCommRing", "start": [ 65, 1 ], "end": [ 67, 38 ], "kind": "commanddeclaration" } ]
Mathlib/Algebra/Ring/WithZero.lean
[ ".lake/packages/lean4/src/lean/Init.lean", "Mathlib/Algebra/Ring/Defs.lean", "Mathlib/Algebra/GroupWithZero/WithZero.lean" ]
[ { "full_name": "WithZero.instLeftDistribClass", "code": "instance instLeftDistribClass [Mul α] [Add α] [LeftDistribClass α] :\n LeftDistribClass (WithZero α) where\n left_distrib a b c := by\n cases' a with a; · rfl\n cases' b with b <;> cases' c with c <;> try rfl\n exact congr_arg some (left_distrib _ _ _)", "start": [ 16, 1 ], "end": [ 21, 46 ], "kind": "commanddeclaration" }, { "full_name": "WithZero.instRightDistribClass", "code": "instance instRightDistribClass [Mul α] [Add α] [RightDistribClass α] :\n RightDistribClass (WithZero α) where\n right_distrib a b c := by\n cases' c with c\n · change (a + b) * 0 = a * 0 + b * 0\n simp\n cases' a with a <;> cases' b with b <;> try rfl\n exact congr_arg some (right_distrib _ _ _)", "start": [ 23, 1 ], "end": [ 30, 47 ], "kind": "commanddeclaration" }, { "full_name": "WithZero.instDistrib", "code": "instance instDistrib [Distrib α] : Distrib (WithZero α) where\n left_distrib := left_distrib\n right_distrib := right_distrib", "start": [ 32, 1 ], "end": [ 34, 33 ], "kind": "commanddeclaration" }, { "full_name": "WithZero.instSemiring", "code": "instance instSemiring [Semiring α] : Semiring (WithZero α) :=\n { addMonoidWithOne, addCommMonoid, mulZeroClass, monoidWithZero, instDistrib with }", "start": [ 36, 1 ], "end": [ 37, 86 ], "kind": "commanddeclaration" } ]
Mathlib/Analysis/Normed/Group/Completeness.lean
[ ".lake/packages/lean4/src/lean/Init.lean", "Mathlib/Analysis/SpecificLimits/Basic.lean", "Mathlib/Analysis/Normed/Group/Uniform.lean" ]
[ { "full_name": "Metric.exists_subseq_summable_dist_of_cauchySeq", "code": "lemma Metric.exists_subseq_summable_dist_of_cauchySeq (u : ℕ → α) (hu : CauchySeq u) :\n ∃ f : ℕ → ℕ, StrictMono f ∧ Summable fun i => dist (u (f (i+1))) (u (f i)) := by\n obtain ⟨f, hf₁, hf₂⟩ :=\n Metric.exists_subseq_bounded_of_cauchySeq u hu (fun n => (1 / (2:ℝ))^n) (fun n => by positivity)\n refine ⟨f, hf₁, ?_⟩\n refine Summable.of_nonneg_of_le (fun n => by positivity) ?_ summable_geometric_two\n exact fun n => le_of_lt <| hf₂ n (f (n+1)) <| hf₁.monotone (Nat.le_add_right n 1)", "start": [ 39, 1 ], "end": [ 45, 84 ], "kind": "lemma" }, { "full_name": "NormedAddCommGroup.completeSpace_of_summable_imp_tendsto", "code": "lemma NormedAddCommGroup.completeSpace_of_summable_imp_tendsto\n (h : ∀ u : ℕ → E,\n Summable (‖u ·‖) → ∃ a, Tendsto (fun n => ∑ i ∈ range n, u i) atTop (𝓝 a)) :\n CompleteSpace E := by\n apply Metric.complete_of_cauchySeq_tendsto\n intro u hu\n obtain ⟨f, hf₁, hf₂⟩ := Metric.exists_subseq_summable_dist_of_cauchySeq u hu\n simp only [dist_eq_norm] at hf₂\n let v n := u (f (n+1)) - u (f n)\n have hv_sum : (fun n => (∑ i ∈ range n, v i)) = fun n => u (f n) - u (f 0) := by\n ext n\n exact sum_range_sub (u ∘ f) n\n obtain ⟨a, ha⟩ := h v hf₂\n refine ⟨a + u (f 0), ?_⟩\n refine tendsto_nhds_of_cauchySeq_of_subseq hu hf₁.tendsto_atTop ?_\n rw [hv_sum] at ha\n have h₁ : Tendsto (fun n => u (f n) - u (f 0) + u (f 0)) atTop (𝓝 (a + u (f 0))) :=\n Tendsto.add_const _ ha\n simpa only [sub_add_cancel] using h₁", "start": [ 53, 1 ], "end": [ 73, 39 ], "kind": "lemma" }, { "full_name": "NormedAddCommGroup.summable_imp_tendsto_of_complete", "code": "lemma NormedAddCommGroup.summable_imp_tendsto_of_complete [CompleteSpace E] (u : ℕ → E)\n (hu : Summable (‖u ·‖)) : ∃ a, Tendsto (fun n => ∑ i ∈ range n, u i) atTop (𝓝 a) := by\n refine cauchySeq_tendsto_of_complete <| cauchySeq_of_summable_dist ?_\n simp [dist_eq_norm, sum_range_succ, hu]", "start": [ 75, 1 ], "end": [ 80, 42 ], "kind": "lemma" }, { "full_name": "NormedAddCommGroup.summable_imp_tendsto_iff_completeSpace", "code": "lemma NormedAddCommGroup.summable_imp_tendsto_iff_completeSpace :\n (∀ u : ℕ → E, Summable (‖u ·‖) → ∃ a, Tendsto (fun n => ∑ i ∈ range n, u i) atTop (𝓝 a))\n ↔ CompleteSpace E :=\n ⟨completeSpace_of_summable_imp_tendsto, fun _ u hu => summable_imp_tendsto_of_complete u hu⟩", "start": [ 82, 1 ], "end": [ 87, 95 ], "kind": "lemma" } ]
Mathlib/Topology/Metrizable/ContinuousMap.lean
[ ".lake/packages/lean4/src/lean/Init.lean", "Mathlib/Topology/Metrizable/Uniformity.lean", "Mathlib/Topology/UniformSpace/CompactConvergence.lean" ]
[]
Mathlib/Combinatorics/SimpleGraph/LapMatrix.lean
[ "Mathlib/Data/Real/StarOrdered.lean", ".lake/packages/lean4/src/lean/Init.lean", "Mathlib/LinearAlgebra/Matrix/PosDef.lean", "Mathlib/Combinatorics/SimpleGraph/AdjMatrix.lean" ]
[ { "full_name": "SimpleGraph.degMatrix", "code": "def degMatrix [AddMonoidWithOne R] : Matrix V V R := Matrix.diagonal (G.degree ·)", "start": [ 34, 1 ], "end": [ 35, 82 ], "kind": "commanddeclaration" }, { "full_name": "SimpleGraph.lapMatrix", "code": "def lapMatrix [AddGroupWithOne R] : Matrix V V R := G.degMatrix R - G.adjMatrix R", "start": [ 37, 1 ], "end": [ 39, 82 ], "kind": "commanddeclaration" }, { "full_name": "SimpleGraph.isSymm_degMatrix", "code": "theorem isSymm_degMatrix [AddMonoidWithOne R] : (G.degMatrix R).IsSymm", "start": [ 43, 1 ], "end": [ 44, 20 ], "kind": "commanddeclaration" }, { "full_name": "SimpleGraph.isSymm_lapMatrix", "code": "theorem isSymm_lapMatrix [AddGroupWithOne R] : (G.lapMatrix R).IsSymm", "start": [ 46, 1 ], "end": [ 47, 48 ], "kind": "commanddeclaration" }, { "full_name": "SimpleGraph.degMatrix_mulVec_apply", "code": "theorem degMatrix_mulVec_apply [NonAssocSemiring R] (v : V) (vec : V → R) :\n (G.degMatrix R *ᵥ vec) v = G.degree v * vec v", "start": [ 49, 1 ], "end": [ 51, 34 ], "kind": "commanddeclaration" }, { "full_name": "SimpleGraph.lapMatrix_mulVec_apply", "code": "theorem lapMatrix_mulVec_apply [NonAssocRing R] (v : V) (vec : V → R) :\n (G.lapMatrix R *ᵥ vec) v = G.degree v * vec v - ∑ u ∈ G.neighborFinset v, vec u", "start": [ 53, 1 ], "end": [ 55, 96 ], "kind": "commanddeclaration" }, { "full_name": "SimpleGraph.lapMatrix_mulVec_const_eq_zero", "code": "theorem lapMatrix_mulVec_const_eq_zero [Ring R] : mulVec (G.lapMatrix R) (fun _ ↦ 1) = 0", "start": [ 57, 1 ], "end": [ 60, 7 ], "kind": "commanddeclaration" }, { "full_name": "SimpleGraph.dotProduct_mulVec_degMatrix", "code": "theorem dotProduct_mulVec_degMatrix [CommRing R] (x : V → R) :\n x ⬝ᵥ (G.degMatrix R *ᵥ x) = ∑ i : V, G.degree i * x i * x i", "start": [ 62, 1 ], "end": [ 64, 76 ], "kind": "commanddeclaration" }, { "full_name": "SimpleGraph.degree_eq_sum_if_adj", "code": "theorem degree_eq_sum_if_adj [AddCommMonoidWithOne R] (i : V) :\n (G.degree i : R) = ∑ j : V, if G.Adj i j then 1 else 0", "start": [ 68, 1 ], "end": [ 71, 37 ], "kind": "commanddeclaration" }, { "full_name": "SimpleGraph.lapMatrix_toLinearMap₂'", "code": "theorem lapMatrix_toLinearMap₂' [Field R] [CharZero R] (x : V → R) :\n toLinearMap₂' (G.lapMatrix R) x x =\n (∑ i : V, ∑ j : V, if G.Adj i j then (x i - x j)^2 else 0) / 2", "start": [ 73, 1 ], "end": [ 88, 10 ], "kind": "commanddeclaration" }, { "full_name": "SimpleGraph.posSemidef_lapMatrix", "code": "theorem posSemidef_lapMatrix [LinearOrderedField R] [StarRing R] [StarOrderedRing R]\n [TrivialStar R] : PosSemidef (G.lapMatrix R)", "start": [ 90, 1 ], "end": [ 97, 15 ], "kind": "commanddeclaration" }, { "full_name": "SimpleGraph.lapMatrix_toLinearMap₂'_apply'_eq_zero_iff_forall_adj", "code": "theorem lapMatrix_toLinearMap₂'_apply'_eq_zero_iff_forall_adj [LinearOrderedField R] (x : V → R) :\n Matrix.toLinearMap₂' (G.lapMatrix R) x x = 0 ↔ ∀ i j : V, G.Adj i j → x i = x j", "start": [ 99, 1 ], "end": [ 102, 70 ], "kind": "commanddeclaration" }, { "full_name": "SimpleGraph.lapMatrix_toLin'_apply_eq_zero_iff_forall_adj", "code": "theorem lapMatrix_toLin'_apply_eq_zero_iff_forall_adj (x : V → ℝ) :\n Matrix.toLin' (G.lapMatrix ℝ) x = 0 ↔ ∀ i j : V, G.Adj i j → x i = x j", "start": [ 104, 1 ], "end": [ 107, 61 ], "kind": "commanddeclaration" }, { "full_name": "SimpleGraph.lapMatrix_toLinearMap₂'_apply'_eq_zero_iff_forall_reachable", "code": "theorem lapMatrix_toLinearMap₂'_apply'_eq_zero_iff_forall_reachable (x : V → ℝ) :\n Matrix.toLinearMap₂' (G.lapMatrix ℝ) x x = 0 ↔ ∀ i j : V, G.Reachable i j → x i = x j", "start": [ 109, 1 ], "end": [ 116, 30 ], "kind": "commanddeclaration" }, { "full_name": "SimpleGraph.lapMatrix_toLin'_apply_eq_zero_iff_forall_reachable", "code": "theorem lapMatrix_toLin'_apply_eq_zero_iff_forall_reachable (x : V → ℝ) :\n Matrix.toLin' (G.lapMatrix ℝ) x = 0 ↔ ∀ i j : V, G.Reachable i j → x i = x j", "start": [ 118, 1 ], "end": [ 121, 67 ], "kind": "commanddeclaration" }, { "full_name": "SimpleGraph.mem_ker_toLin'_lapMatrix_of_connectedComponent", "code": "lemma mem_ker_toLin'_lapMatrix_of_connectedComponent {G : SimpleGraph V} [DecidableRel G.Adj]\n [DecidableEq G.ConnectedComponent] (c : G.ConnectedComponent) :\n (fun i ↦ if connectedComponentMk G i = c then 1 else 0) ∈\n LinearMap.ker (toLin' (lapMatrix ℝ G)) := by\n rw [LinearMap.mem_ker, lapMatrix_toLin'_apply_eq_zero_iff_forall_reachable]\n intro i j h\n split_ifs with h₁ h₂ h₃\n · rfl\n · rw [← ConnectedComponent.eq] at h\n exact (h₂ (h₁ ▸ h.symm)).elim\n · rw [← ConnectedComponent.eq] at h\n exact (h₁ (h₃ ▸ h)).elim\n · rfl", "start": [ 125, 1 ], "end": [ 137, 8 ], "kind": "lemma" }, { "full_name": "SimpleGraph.lapMatrix_ker_basis_aux", "code": "def lapMatrix_ker_basis_aux (c : G.ConnectedComponent) :\n LinearMap.ker (Matrix.toLin' (G.lapMatrix ℝ)) :=\n ⟨fun i ↦ if G.connectedComponentMk i = c then (1 : ℝ) else 0,\n mem_ker_toLin'_lapMatrix_of_connectedComponent c⟩", "start": [ 139, 1 ], "end": [ 146, 54 ], "kind": "commanddeclaration" }, { "full_name": "SimpleGraph.linearIndependent_lapMatrix_ker_basis_aux", "code": "lemma linearIndependent_lapMatrix_ker_basis_aux :\n LinearIndependent ℝ (lapMatrix_ker_basis_aux G) := by\n rw [Fintype.linearIndependent_iff]\n intro g h0\n rw [Subtype.ext_iff] at h0\n have h : ∑ c, g c • lapMatrix_ker_basis_aux G c = fun i ↦ g (connectedComponentMk G i) := by\n simp only [lapMatrix_ker_basis_aux, SetLike.mk_smul_mk, AddSubmonoid.coe_finset_sum]\n conv_lhs => enter [2, c, j]; rw [Pi.smul_apply, smul_eq_mul, mul_ite, mul_one, mul_zero]\n ext i\n simp only [Finset.sum_apply, sum_ite_eq, mem_univ, ite_true]\n rw [h] at h0\n intro c\n obtain ⟨i, h'⟩ : ∃ i : V, G.connectedComponentMk i = c := Quot.exists_rep c\n exact h' ▸ congrFun h0 i", "start": [ 148, 1 ], "end": [ 161, 27 ], "kind": "lemma" }, { "full_name": "SimpleGraph.top_le_span_range_lapMatrix_ker_basis_aux", "code": "lemma top_le_span_range_lapMatrix_ker_basis_aux :\n ⊤ ≤ Submodule.span ℝ (Set.range (lapMatrix_ker_basis_aux G)) := by\n intro x _\n rw [mem_span_range_iff_exists_fun]\n use Quot.lift x.val (by rw [← lapMatrix_toLin'_apply_eq_zero_iff_forall_reachable G x,\n LinearMap.map_coe_ker])\n ext j\n simp only [lapMatrix_ker_basis_aux, AddSubmonoid.coe_finset_sum, Submodule.coe_toAddSubmonoid,\n SetLike.val_smul, Finset.sum_apply, Pi.smul_apply, smul_eq_mul, mul_ite, mul_one, mul_zero,\n sum_ite_eq, mem_univ, ite_true]\n rfl", "start": [ 163, 1 ], "end": [ 173, 6 ], "kind": "lemma" }, { "full_name": "SimpleGraph.lapMatrix_ker_basis", "code": "noncomputable def lapMatrix_ker_basis :=\n Basis.mk (linearIndependent_lapMatrix_ker_basis_aux G)\n (top_le_span_range_lapMatrix_ker_basis_aux G)", "start": [ 175, 1 ], "end": [ 180, 50 ], "kind": "commanddeclaration" }, { "full_name": "SimpleGraph.card_ConnectedComponent_eq_rank_ker_lapMatrix", "code": "theorem card_ConnectedComponent_eq_rank_ker_lapMatrix : Fintype.card G.ConnectedComponent =\n FiniteDimensional.finrank ℝ (LinearMap.ker (Matrix.toLin' (G.lapMatrix ℝ)))", "start": [ 182, 1 ], "end": [ 185, 71 ], "kind": "commanddeclaration" } ]
Mathlib/NumberTheory/ModularForms/Identities.lean
[ "Mathlib/NumberTheory/ModularForms/CongruenceSubgroups.lean", ".lake/packages/lean4/src/lean/Init.lean", "Mathlib/NumberTheory/ModularForms/SlashInvariantForms.lean" ]
[ { "full_name": "SlashInvariantForm.vAdd_width_periodic", "code": "theorem vAdd_width_periodic (N : ℕ) (k n : ℤ) (f : SlashInvariantForm (Gamma N) k) (z : ℍ) :\n f (((N * n) : ℝ) +ᵥ z) = f z", "start": [ 22, 1 ], "end": [ 32, 47 ], "kind": "commanddeclaration" }, { "full_name": "SlashInvariantForm.T_zpow_width_invariant", "code": "theorem T_zpow_width_invariant (N : ℕ) (k n : ℤ) (f : SlashInvariantForm (Gamma N) k) (z : ℍ) :\n f (((ModularGroup.T ^ (N * n))) • z) = f z", "start": [ 34, 1 ], "end": [ 37, 82 ], "kind": "commanddeclaration" } ]
Mathlib/Algebra/Order/Floor/Prime.lean
[ "Mathlib/Data/Nat/Prime.lean", ".lake/packages/lean4/src/lean/Init.lean", "Mathlib/Algebra/Order/Floor.lean" ]
[ { "full_name": "FloorRing.exists_prime_mul_pow_lt_factorial", "code": "theorem exists_prime_mul_pow_lt_factorial [LinearOrderedRing K] [FloorRing K] (n : ℕ) (a c : K) :\n ∃ p > n, p.Prime ∧ a * c ^ p < (p - 1)!", "start": [ 22, 1 ], "end": [ 34, 62 ], "kind": "commanddeclaration" }, { "full_name": "FloorRing.exists_prime_mul_pow_div_factorial_lt_one", "code": "theorem exists_prime_mul_pow_div_factorial_lt_one [LinearOrderedField K] [FloorRing K]\n (n : ℕ) (a c : K) :\n ∃ p > n, p.Prime ∧ a * c ^ p / (p - 1)! < 1", "start": [ 36, 1 ], "end": [ 40, 45 ], "kind": "commanddeclaration" } ]
Mathlib/LinearAlgebra/CrossProduct.lean
[ "Mathlib/Data/Matrix/Notation.lean", ".lake/packages/lean4/src/lean/Init.lean", "Mathlib/Algebra/Lie/Basic.lean", "Mathlib/LinearAlgebra/BilinearMap.lean", "Mathlib/LinearAlgebra/Matrix/Determinant/Basic.lean" ]
[ { "full_name": "crossProduct", "code": "def crossProduct : (Fin 3 → R) →ₗ[R] (Fin 3 → R) →ₗ[R] Fin 3 → R := by\n apply LinearMap.mk₂ R fun a b : Fin 3 → R =>\n ![a 1 * b 2 - a 2 * b 1, a 2 * b 0 - a 0 * b 2, a 0 * b 1 - a 1 * b 0]\n · intros\n simp_rw [vec3_add, Pi.add_apply]\n apply vec3_eq <;> ring\n · intros\n simp_rw [smul_vec3, Pi.smul_apply, smul_sub, smul_mul_assoc]\n · intros\n simp_rw [vec3_add, Pi.add_apply]\n apply vec3_eq <;> ring\n · intros\n simp_rw [smul_vec3, Pi.smul_apply, smul_sub, mul_smul_comm]", "start": [ 47, 1 ], "end": [ 60, 64 ], "kind": "commanddeclaration" }, { "full_name": "cross_apply", "code": "theorem cross_apply (a b : Fin 3 → R) :\n a ×₃ b = ![a 1 * b 2 - a 2 * b 1, a 2 * b 0 - a 0 * b 2, a 0 * b 1 - a 1 * b 0]", "start": [ 65, 1 ], "end": [ 66, 91 ], "kind": "commanddeclaration" }, { "full_name": "cross_anticomm", "code": "@[simp]\ntheorem cross_anticomm (v w : Fin 3 → R) : -(v ×₃ w) = w ×₃ v", "start": [ 74, 1 ], "end": [ 76, 31 ], "kind": "commanddeclaration" }, { "full_name": "cross_anticomm'", "code": "@[simp]\ntheorem cross_anticomm' (v w : Fin 3 → R) : v ×₃ w + w ×₃ v = 0", "start": [ 85, 1 ], "end": [ 87, 46 ], "kind": "commanddeclaration" }, { "full_name": "cross_self", "code": "@[simp]\ntheorem cross_self (v : Fin 3 → R) : v ×₃ v = 0", "start": [ 93, 1 ], "end": [ 95, 31 ], "kind": "commanddeclaration" }, { "full_name": "dot_self_cross", "code": "@[simp 1100] theorem dot_self_cross (v w : Fin 3 → R) : v ⬝ᵥ v ×₃ w = 0", "start": [ 101, 1 ], "end": [ 106, 7 ], "kind": "commanddeclaration" }, { "full_name": "dot_cross_self", "code": "@[simp 1100] theorem dot_cross_self (v w : Fin 3 → R) : w ⬝ᵥ v ×₃ w = 0", "start": [ 112, 1 ], "end": [ 115, 73 ], "kind": "commanddeclaration" }, { "full_name": "triple_product_permutation", "code": "theorem triple_product_permutation (u v w : Fin 3 → R) : u ⬝ᵥ v ×₃ w = v ⬝ᵥ w ×₃ u", "start": [ 118, 1 ], "end": [ 122, 7 ], "kind": "commanddeclaration" }, { "full_name": "triple_product_eq_det", "code": "theorem triple_product_eq_det (u v w : Fin 3 → R) : u ⬝ᵥ v ×₃ w = Matrix.det ![u, v, w]", "start": [ 125, 1 ], "end": [ 130, 7 ], "kind": "commanddeclaration" }, { "full_name": "cross_dot_cross", "code": "theorem cross_dot_cross (u v w x : Fin 3 → R) :\n u ×₃ v ⬝ᵥ w ×₃ x = u ⬝ᵥ w * v ⬝ᵥ x - u ⬝ᵥ x * v ⬝ᵥ w", "start": [ 133, 1 ], "end": [ 138, 7 ], "kind": "commanddeclaration" }, { "full_name": "leibniz_cross", "code": "theorem leibniz_cross (u v w : Fin 3 → R) : u ×₃ (v ×₃ w) = u ×₃ v ×₃ w + v ×₃ (u ×₃ w)", "start": [ 145, 1 ], "end": [ 148, 38 ], "kind": "commanddeclaration" }, { "full_name": "Cross.lieRing", "code": "def Cross.lieRing : LieRing (Fin 3 → R) :=\n { Pi.addCommGroup with\n bracket := fun u v => u ×₃ v\n add_lie := LinearMap.map_add₂ _\n lie_add := fun _ => LinearMap.map_add _\n lie_self := cross_self\n leibniz_lie := leibniz_cross }", "start": [ 151, 1 ], "end": [ 160, 35 ], "kind": "commanddeclaration" }, { "full_name": "cross_cross", "code": "theorem cross_cross (u v w : Fin 3 → R) : u ×₃ v ×₃ w = u ×₃ (v ×₃ w) - v ×₃ (u ×₃ w)", "start": [ 165, 1 ], "end": [ 166, 16 ], "kind": "commanddeclaration" }, { "full_name": "jacobi_cross", "code": "theorem jacobi_cross (u v w : Fin 3 → R) : u ×₃ (v ×₃ w) + v ×₃ (w ×₃ u) + w ×₃ (u ×₃ v) = 0", "start": [ 169, 1 ], "end": [ 172, 19 ], "kind": "commanddeclaration" } ]
Mathlib/Analysis/Calculus/Taylor.lean
[ "Mathlib/Analysis/Calculus/IteratedDeriv/Defs.lean", ".lake/packages/lean4/src/lean/Init.lean", "Mathlib/Analysis/Calculus/Deriv/Pow.lean", "Mathlib/Algebra/Polynomial/Module/Basic.lean", "Mathlib/Analysis/Calculus/MeanValue.lean" ]
[ { "full_name": "taylorCoeffWithin", "code": "noncomputable def taylorCoeffWithin (f : ℝ → E) (k : ℕ) (s : Set ℝ) (x₀ : ℝ) : E :=\n (k ! : ℝ)⁻¹ • iteratedDerivWithin k f s x₀", "start": [ 53, 1 ], "end": [ 55, 45 ], "kind": "commanddeclaration" }, { "full_name": "taylorWithin", "code": "noncomputable def taylorWithin (f : ℝ → E) (n : ℕ) (s : Set ℝ) (x₀ : ℝ) : PolynomialModule ℝ E :=\n (Finset.range (n + 1)).sum fun k =>\n PolynomialModule.comp (Polynomial.X - Polynomial.C x₀)\n (PolynomialModule.single ℝ k (taylorCoeffWithin f k s x₀))", "start": [ 58, 1 ], "end": [ 66, 65 ], "kind": "commanddeclaration" }, { "full_name": "taylorWithinEval", "code": "noncomputable def taylorWithinEval (f : ℝ → E) (n : ℕ) (s : Set ℝ) (x₀ x : ℝ) : E :=\n PolynomialModule.eval x (taylorWithin f n s x₀)", "start": [ 69, 1 ], "end": [ 71, 50 ], "kind": "commanddeclaration" }, { "full_name": "taylorWithin_succ", "code": "theorem taylorWithin_succ (f : ℝ → E) (n : ℕ) (s : Set ℝ) (x₀ : ℝ) :\n taylorWithin f (n + 1) s x₀ = taylorWithin f n s x₀ +\n PolynomialModule.comp (Polynomial.X - Polynomial.C x₀)\n (PolynomialModule.single ℝ (n + 1) (taylorCoeffWithin f (n + 1) s x₀))", "start": [ 74, 1 ], "end": [ 79, 29 ], "kind": "commanddeclaration" }, { "full_name": "taylorWithinEval_succ", "code": "@[simp]\ntheorem taylorWithinEval_succ (f : ℝ → E) (n : ℕ) (s : Set ℝ) (x₀ x : ℝ) :\n taylorWithinEval f (n + 1) s x₀ x = taylorWithinEval f n s x₀ x +\n (((n + 1 : ℝ) * n !)⁻¹ * (x - x₀) ^ (n + 1)) • iteratedDerivWithin (n + 1) f s x₀", "start": [ 82, 1 ], "end": [ 92, 17 ], "kind": "commanddeclaration" }, { "full_name": "taylor_within_zero_eval", "code": "@[simp]\ntheorem taylor_within_zero_eval (f : ℝ → E) (s : Set ℝ) (x₀ x : ℝ) :\n taylorWithinEval f 0 s x₀ x = f x₀", "start": [ 95, 1 ], "end": [ 102, 7 ], "kind": "commanddeclaration" }, { "full_name": "taylorWithinEval_self", "code": "@[simp]\ntheorem taylorWithinEval_self (f : ℝ → E) (n : ℕ) (s : Set ℝ) (x₀ : ℝ) :\n taylorWithinEval f n s x₀ x₀ = f x₀", "start": [ 105, 1 ], "end": [ 111, 12 ], "kind": "commanddeclaration" }, { "full_name": "taylor_within_apply", "code": "theorem taylor_within_apply (f : ℝ → E) (n : ℕ) (s : Set ℝ) (x₀ x : ℝ) :\n taylorWithinEval f n s x₀ x =\n ∑ k ∈ Finset.range (n + 1), ((k ! : ℝ)⁻¹ * (x - x₀) ^ k) • iteratedDerivWithin k f s x₀", "start": [ 114, 1 ], "end": [ 120, 23 ], "kind": "commanddeclaration" }, { "full_name": "continuousOn_taylorWithinEval", "code": "theorem continuousOn_taylorWithinEval {f : ℝ → E} {x : ℝ} {n : ℕ} {s : Set ℝ}\n (hs : UniqueDiffOn ℝ s) (hf : ContDiffOn ℝ n f s) :\n ContinuousOn (fun t => taylorWithinEval f n s t x) s", "start": [ 123, 1 ], "end": [ 136, 69 ], "kind": "commanddeclaration" }, { "full_name": "monomial_has_deriv_aux", "code": "theorem monomial_has_deriv_aux (t x : ℝ) (n : ℕ) :\n HasDerivAt (fun y => (x - y) ^ (n + 1)) (-(n + 1) * (x - t) ^ n) t", "start": [ 139, 1 ], "end": [ 146, 41 ], "kind": "commanddeclaration" }, { "full_name": "hasDerivWithinAt_taylor_coeff_within", "code": "theorem hasDerivWithinAt_taylor_coeff_within {f : ℝ → E} {x y : ℝ} {k : ℕ} {s t : Set ℝ}\n (ht : UniqueDiffWithinAt ℝ t y) (hs : s ∈ 𝓝[t] y)\n (hf : DifferentiableWithinAt ℝ (iteratedDerivWithin (k + 1) f s) s y) :\n HasDerivWithinAt\n (fun z => (((k + 1 : ℝ) * k !)⁻¹ * (x - z) ^ (k + 1)) • iteratedDerivWithin (k + 1) f s z)\n ((((k + 1 : ℝ) * k !)⁻¹ * (x - y) ^ (k + 1)) • iteratedDerivWithin (k + 2) f s y -\n ((k ! : ℝ)⁻¹ * (x - y) ^ k) • iteratedDerivWithin (k + 1) f s y) t y", "start": [ 149, 1 ], "end": [ 170, 41 ], "kind": "commanddeclaration" }, { "full_name": "hasDerivWithinAt_taylorWithinEval", "code": "theorem hasDerivWithinAt_taylorWithinEval {f : ℝ → E} {x y : ℝ} {n : ℕ} {s s' : Set ℝ}\n (hs'_unique : UniqueDiffWithinAt ℝ s' y) (hs_unique : UniqueDiffOn ℝ s) (hs' : s' ∈ 𝓝[s] y)\n (hy : y ∈ s') (h : s' ⊆ s) (hf : ContDiffOn ℝ n f s)\n (hf' : DifferentiableWithinAt ℝ (iteratedDerivWithin n f s) s y) :\n HasDerivWithinAt (fun t => taylorWithinEval f n s t x)\n (((n ! : ℝ)⁻¹ * (x - y) ^ n) • iteratedDerivWithin (n + 1) f s y) s' y", "start": [ 173, 1 ], "end": [ 196, 34 ], "kind": "commanddeclaration" }, { "full_name": "taylorWithinEval_hasDerivAt_Ioo", "code": "theorem taylorWithinEval_hasDerivAt_Ioo {f : ℝ → E} {a b t : ℝ} (x : ℝ) {n : ℕ} (hx : a < b)\n (ht : t ∈ Ioo a b) (hf : ContDiffOn ℝ n f (Icc a b))\n (hf' : DifferentiableOn ℝ (iteratedDerivWithin n f (Icc a b)) (Ioo a b)) :\n HasDerivAt (fun y => taylorWithinEval f n (Icc a b) y x)\n (((n ! : ℝ)⁻¹ * (x - t) ^ n) • iteratedDerivWithin (n + 1) f (Icc a b) t) t", "start": [ 199, 1 ], "end": [ 210, 80 ], "kind": "commanddeclaration" }, { "full_name": "hasDerivWithinAt_taylorWithinEval_at_Icc", "code": "theorem hasDerivWithinAt_taylorWithinEval_at_Icc {f : ℝ → E} {a b t : ℝ} (x : ℝ) {n : ℕ}\n (hx : a < b) (ht : t ∈ Icc a b) (hf : ContDiffOn ℝ n f (Icc a b))\n (hf' : DifferentiableOn ℝ (iteratedDerivWithin n f (Icc a b)) (Icc a b)) :\n HasDerivWithinAt (fun y => taylorWithinEval f n (Icc a b) y x)\n (((n ! : ℝ)⁻¹ * (x - t) ^ n) • iteratedDerivWithin (n + 1) f (Icc a b) t) (Icc a b) t", "start": [ 213, 1 ], "end": [ 222, 52 ], "kind": "commanddeclaration" }, { "full_name": "taylor_mean_remainder", "code": "theorem taylor_mean_remainder {f : ℝ → ℝ} {g g' : ℝ → ℝ} {x x₀ : ℝ} {n : ℕ} (hx : x₀ < x)\n (hf : ContDiffOn ℝ n f (Icc x₀ x))\n (hf' : DifferentiableOn ℝ (iteratedDerivWithin n f (Icc x₀ x)) (Ioo x₀ x))\n (gcont : ContinuousOn g (Icc x₀ x))\n (gdiff : ∀ x_1 : ℝ, x_1 ∈ Ioo x₀ x → HasDerivAt g (g' x_1) x_1)\n (g'_ne : ∀ x_1 : ℝ, x_1 ∈ Ioo x₀ x → g' x_1 ≠ 0) :\n ∃ x' ∈ Ioo x₀ x, f x - taylorWithinEval f n (Icc x₀ x) x₀ x =\n ((x - x') ^ n / n ! * (g x - g x₀) / g' x') • iteratedDerivWithin (n + 1) f (Icc x₀ x) x'", "start": [ 228, 1 ], "end": [ 254, 7 ], "kind": "commanddeclaration" }, { "full_name": "taylor_mean_remainder_lagrange", "code": "theorem taylor_mean_remainder_lagrange {f : ℝ → ℝ} {x x₀ : ℝ} {n : ℕ} (hx : x₀ < x)\n (hf : ContDiffOn ℝ n f (Icc x₀ x))\n (hf' : DifferentiableOn ℝ (iteratedDerivWithin n f (Icc x₀ x)) (Ioo x₀ x)) :\n ∃ x' ∈ Ioo x₀ x, f x - taylorWithinEval f n (Icc x₀ x) x₀ x =\n iteratedDerivWithin (n + 1) f (Icc x₀ x) x' * (x - x₀) ^ (n + 1) / (n + 1)!", "start": [ 257, 1 ], "end": [ 284, 47 ], "kind": "commanddeclaration" }, { "full_name": "taylor_mean_remainder_cauchy", "code": "theorem taylor_mean_remainder_cauchy {f : ℝ → ℝ} {x x₀ : ℝ} {n : ℕ} (hx : x₀ < x)\n (hf : ContDiffOn ℝ n f (Icc x₀ x))\n (hf' : DifferentiableOn ℝ (iteratedDerivWithin n f (Icc x₀ x)) (Ioo x₀ x)) :\n ∃ x' ∈ Ioo x₀ x, f x - taylorWithinEval f n (Icc x₀ x) x₀ x =\n iteratedDerivWithin (n + 1) f (Icc x₀ x) x' * (x - x') ^ n / n ! * (x - x₀)", "start": [ 287, 1 ], "end": [ 307, 7 ], "kind": "commanddeclaration" }, { "full_name": "taylor_mean_remainder_bound", "code": "theorem taylor_mean_remainder_bound {f : ℝ → E} {a b C x : ℝ} {n : ℕ} (hab : a ≤ b)\n (hf : ContDiffOn ℝ (n + 1) f (Icc a b)) (hx : x ∈ Icc a b)\n (hC : ∀ y ∈ Icc a b, ‖iteratedDerivWithin (n + 1) f (Icc a b) y‖ ≤ C) :\n ‖f x - taylorWithinEval f n (Icc a b) a x‖ ≤ C * (x - a) ^ (n + 1) / n !", "start": [ 310, 1 ], "end": [ 349, 7 ], "kind": "commanddeclaration" }, { "full_name": "exists_taylor_mean_remainder_bound", "code": "theorem exists_taylor_mean_remainder_bound {f : ℝ → E} {a b : ℝ} {n : ℕ} (hab : a ≤ b)\n (hf : ContDiffOn ℝ (n + 1) f (Icc a b)) :\n ∃ C, ∀ x ∈ Icc a b, ‖f x - taylorWithinEval f n (Icc a b) a x‖ ≤ C * (x - a) ^ (n + 1)", "start": [ 352, 1 ], "end": [ 370, 98 ], "kind": "commanddeclaration" } ]
Mathlib/Topology/Instances/PNat.lean
[ "Mathlib/Topology/Instances/Nat.lean", ".lake/packages/lean4/src/lean/Init.lean" ]
[ { "full_name": "PNat.dist_eq", "code": "theorem dist_eq (x y : ℕ+) : dist x y = |(↑x : ℝ) - ↑y|", "start": [ 22, 1 ], "end": [ 22, 63 ], "kind": "commanddeclaration" }, { "full_name": "PNat.dist_coe", "code": "@[simp, norm_cast]\ntheorem dist_coe (x y : ℕ+) : dist (↑x : ℕ) (↑y : ℕ) = dist x y", "start": [ 24, 1 ], "end": [ 25, 71 ], "kind": "commanddeclaration" }, { "full_name": "PNat.uniformEmbedding_coe", "code": "theorem uniformEmbedding_coe : UniformEmbedding ((↑) : ℕ+ → ℕ)", "start": [ 27, 1 ], "end": [ 27, 95 ], "kind": "commanddeclaration" } ]
Mathlib/Data/HashMap.lean
[ "Mathlib/Mathport/Rename.lean", ".lake/packages/lean4/src/lean/Init.lean", ".lake/packages/batteries/Batteries/Data/HashMap/Basic.lean", ".lake/packages/batteries/Batteries/Data/RBMap/Basic.lean" ]
[ { "full_name": "Batteries.HashMap.keys", "code": "@[deprecated \"This declaration is unused in Mathlib: if you need it, \\\n please file an issue in the Batteries repository.\" (since := \"2024-06-12\")]\ndef keys (m : HashMap α β) : List α :=\n m.fold (fun ks k _ => k :: ks) []", "start": [ 31, 1 ], "end": [ 35, 36 ], "kind": "commanddeclaration" }, { "full_name": "Batteries.HashMap.values", "code": "@[deprecated \"This declaration is unused in Mathlib: if you need it, \\\n please file an issue in the Batteries repository.\" (since := \"2024-06-12\")]\ndef values (m : HashMap α β) : List β :=\n m.fold (fun vs _ v => v :: vs) []", "start": [ 37, 1 ], "end": [ 41, 36 ], "kind": "commanddeclaration" }, { "full_name": "Batteries.HashMap.consVal", "code": "@[deprecated \"This declaration is unused in Mathlib: if you need it, \\\n please file an issue in the Batteries repository.\" (since := \"2024-06-12\")]\ndef consVal (self : HashMap α (List β)) (a : α) (b : β) : HashMap α (List β) :=\n match self.find? a with\n | none => self.insert a [b]\n | some L => self.insert a (b::L)", "start": [ 43, 1 ], "end": [ 49, 35 ], "kind": "commanddeclaration" }, { "full_name": "Batteries.RBSet.insertList", "code": "@[deprecated \"This declaration is unused in Mathlib: if you need it, \\\n please file an issue in the Batteries repository.\" (since := \"2024-06-12\")]\ndef insertList {cmp} (m : RBSet α cmp) (L : List α) : RBSet α cmp :=\n L.foldl (fun m a => m.insert a) m", "start": [ 55, 1 ], "end": [ 59, 36 ], "kind": "commanddeclaration" } ]
Mathlib/CategoryTheory/GradedObject/Unitor.lean
[ ".lake/packages/lean4/src/lean/Init.lean", "Mathlib/CategoryTheory/GradedObject/Single.lean", "Mathlib/CategoryTheory/GradedObject/Associator.lean" ]
[ { "full_name": "CategoryTheory.GradedObject.mapBifunctorObjSingle₀ObjIso", "code": "@[simps!]\nnoncomputable def mapBifunctorObjSingle₀ObjIso (a : I × J) (ha : a.1 = 0) :\n ((mapBifunctor F I J).obj ((single₀ I).obj X)).obj Y a ≅ Y a.2 :=\n (F.mapIso (singleObjApplyIsoOfEq _ X _ ha)).app _ ≪≫ e.app (Y a.2)", "start": [ 37, 1 ], "end": [ 43, 69 ], "kind": "commanddeclaration" }, { "full_name": "CategoryTheory.GradedObject.mapBifunctorObjSingle₀ObjIsInitial", "code": "noncomputable def mapBifunctorObjSingle₀ObjIsInitial (a : I × J) (ha : a.1 ≠ 0) :\n IsInitial (((mapBifunctor F I J).obj ((single₀ I).obj X)).obj Y a) :=\n IsInitial.isInitialObj (F.flip.obj (Y a.2)) _ (isInitialSingleObjApply _ _ _ ha)", "start": [ 45, 1 ], "end": [ 50, 83 ], "kind": "commanddeclaration" }, { "full_name": "CategoryTheory.GradedObject.mapBifunctorLeftUnitorCofan", "code": "noncomputable def mapBifunctorLeftUnitorCofan (j : J) :\n (((mapBifunctor F I J).obj ((single₀ I).obj X)).obj Y).CofanMapObjFun p j :=\n CofanMapObjFun.mk _ _ _ (Y j) (fun a ha =>\n if ha : a.1 = 0 then\n (mapBifunctorObjSingle₀ObjIso F X e Y a ha).hom ≫ eqToHom (by aesop)\n else\n (mapBifunctorObjSingle₀ObjIsInitial F X Y a ha).to _)", "start": [ 52, 1 ], "end": [ 62, 60 ], "kind": "commanddeclaration" }, { "full_name": "CategoryTheory.GradedObject.mapBifunctorLeftUnitorCofan_inj", "code": "@[simp, reassoc]\nlemma mapBifunctorLeftUnitorCofan_inj (j : J) :\n (mapBifunctorLeftUnitorCofan F X e p hp Y j).inj ⟨⟨0, j⟩, hp j⟩ =\n (F.map (singleObjApplyIso (0 : I) X).hom).app (Y j) ≫ e.hom.app (Y j) := by\n simp [mapBifunctorLeftUnitorCofan]", "start": [ 64, 1 ], "end": [ 68, 37 ], "kind": "lemma" }, { "full_name": "CategoryTheory.GradedObject.mapBifunctorLeftUnitorCofanIsColimit", "code": "noncomputable def mapBifunctorLeftUnitorCofanIsColimit (j : J) :\n IsColimit (mapBifunctorLeftUnitorCofan F X e p hp Y j) :=\n mkCofanColimit _\n (fun s => e.inv.app (Y j) ≫\n (F.map (singleObjApplyIso (0 : I) X).inv).app (Y j) ≫ s.inj ⟨⟨0, j⟩, hp j⟩)\n (fun s => by\n rintro ⟨⟨i, j'⟩, h⟩\n by_cases hi : i = 0\n · subst hi\n simp only [Set.mem_preimage, hp, Set.mem_singleton_iff] at h\n subst h\n simp\n · apply IsInitial.hom_ext\n exact mapBifunctorObjSingle₀ObjIsInitial _ _ _ _ hi)\n (fun s m hm => by simp [← hm ⟨⟨0, j⟩, hp j⟩])", "start": [ 70, 1 ], "end": [ 85, 50 ], "kind": "commanddeclaration" }, { "full_name": "CategoryTheory.GradedObject.mapBifunctorLeftUnitor_hasMap", "code": "lemma mapBifunctorLeftUnitor_hasMap :\n HasMap (((mapBifunctor F I J).obj ((single₀ I).obj X)).obj Y) p :=\n CofanMapObjFun.hasMap _ _ _ (mapBifunctorLeftUnitorCofanIsColimit F X e p hp Y)", "start": [ 87, 1 ], "end": [ 89, 82 ], "kind": "lemma" }, { "full_name": "CategoryTheory.GradedObject.mapBifunctorLeftUnitor", "code": "noncomputable def mapBifunctorLeftUnitor : mapBifunctorMapObj F p ((single₀ I).obj X) Y ≅ Y :=\n isoMk _ _ (fun j => (CofanMapObjFun.iso\n (mapBifunctorLeftUnitorCofanIsColimit F X e p hp Y j)).symm)", "start": [ 94, 1 ], "end": [ 99, 65 ], "kind": "commanddeclaration" }, { "full_name": "CategoryTheory.GradedObject.ι_mapBifunctorLeftUnitor_hom_apply", "code": "@[reassoc (attr := simp)]\nlemma ι_mapBifunctorLeftUnitor_hom_apply (j : J) :\n ιMapBifunctorMapObj F p ((single₀ I).obj X) Y 0 j j (hp j) ≫\n (mapBifunctorLeftUnitor F X e p hp Y).hom j =\n (F.map (singleObjApplyIso (0 : I) X).hom).app _ ≫ e.hom.app (Y j) := by\n dsimp [mapBifunctorLeftUnitor]\n erw [CofanMapObjFun.ιMapObj_iso_inv]\n rw [mapBifunctorLeftUnitorCofan_inj]", "start": [ 101, 1 ], "end": [ 108, 39 ], "kind": "lemma" }, { "full_name": "CategoryTheory.GradedObject.mapBifunctorLeftUnitor_inv_apply", "code": "lemma mapBifunctorLeftUnitor_inv_apply (j : J) :\n (mapBifunctorLeftUnitor F X e p hp Y).inv j =\n e.inv.app (Y j) ≫ (F.map (singleObjApplyIso (0 : I) X).inv).app (Y j) ≫\n ιMapBifunctorMapObj F p ((single₀ I).obj X) Y 0 j j (hp j) := rfl", "start": [ 110, 1 ], "end": [ 113, 72 ], "kind": "lemma" }, { "full_name": "CategoryTheory.GradedObject.mapBifunctorLeftUnitor_inv_naturality", "code": "@[reassoc]\nlemma mapBifunctorLeftUnitor_inv_naturality :\n φ ≫ (mapBifunctorLeftUnitor F X e p hp Y').inv =\n (mapBifunctorLeftUnitor F X e p hp Y).inv ≫ mapBifunctorMapMap F p (𝟙 _) φ := by\n ext j\n dsimp\n rw [mapBifunctorLeftUnitor_inv_apply, mapBifunctorLeftUnitor_inv_apply, assoc, assoc,\n ι_mapBifunctorMapMap]\n dsimp\n rw [Functor.map_id, NatTrans.id_app, id_comp]\n erw [← NatTrans.naturality_assoc, ← NatTrans.naturality_assoc]\n rfl", "start": [ 117, 1 ], "end": [ 128, 6 ], "kind": "lemma" }, { "full_name": "CategoryTheory.GradedObject.mapBifunctorLeftUnitor_naturality", "code": "@[reassoc]\nlemma mapBifunctorLeftUnitor_naturality :\n mapBifunctorMapMap F p (𝟙 _) φ ≫ (mapBifunctorLeftUnitor F X e p hp Y').hom =\n (mapBifunctorLeftUnitor F X e p hp Y).hom ≫ φ := by\n rw [← cancel_mono (mapBifunctorLeftUnitor F X e p hp Y').inv, assoc, assoc, Iso.hom_inv_id,\n comp_id, mapBifunctorLeftUnitor_inv_naturality, Iso.hom_inv_id_assoc]", "start": [ 130, 1 ], "end": [ 135, 74 ], "kind": "lemma" }, { "full_name": "CategoryTheory.GradedObject.mapBifunctorObjObjSingle₀Iso", "code": "@[simps!]\nnoncomputable def mapBifunctorObjObjSingle₀Iso (a : J × I) (ha : a.2 = 0) :\n ((mapBifunctor F J I).obj X).obj ((single₀ I).obj Y) a ≅ X a.1 :=\n Functor.mapIso _ (singleObjApplyIsoOfEq _ Y _ ha) ≪≫ e.app (X a.1)", "start": [ 148, 1 ], "end": [ 154, 69 ], "kind": "commanddeclaration" }, { "full_name": "CategoryTheory.GradedObject.mapBifunctorObjObjSingle₀IsInitial", "code": "noncomputable def mapBifunctorObjObjSingle₀IsInitial (a : J × I) (ha : a.2 ≠ 0) :\n IsInitial (((mapBifunctor F J I).obj X).obj ((single₀ I).obj Y) a) :=\n IsInitial.isInitialObj (F.obj (X a.1)) _ (isInitialSingleObjApply _ _ _ ha)", "start": [ 156, 1 ], "end": [ 161, 78 ], "kind": "commanddeclaration" }, { "full_name": "CategoryTheory.GradedObject.mapBifunctorRightUnitorCofan", "code": "noncomputable def mapBifunctorRightUnitorCofan (j : J) :\n (((mapBifunctor F J I).obj X).obj ((single₀ I).obj Y)).CofanMapObjFun p j :=\n CofanMapObjFun.mk _ _ _ (X j) (fun a ha =>\n if ha : a.2 = 0 then\n (mapBifunctorObjObjSingle₀Iso F Y e X a ha).hom ≫ eqToHom (by aesop)\n else\n (mapBifunctorObjObjSingle₀IsInitial F Y X a ha).to _)", "start": [ 163, 1 ], "end": [ 173, 60 ], "kind": "commanddeclaration" }, { "full_name": "CategoryTheory.GradedObject.mapBifunctorRightUnitorCofan_inj", "code": "@[simp, reassoc]\nlemma mapBifunctorRightUnitorCofan_inj (j : J) :\n (mapBifunctorRightUnitorCofan F Y e p hp X j).inj ⟨⟨j, 0⟩, hp j⟩ =\n (F.obj (X j)).map (singleObjApplyIso (0 : I) Y).hom ≫ e.hom.app (X j) := by\n simp [mapBifunctorRightUnitorCofan]", "start": [ 175, 1 ], "end": [ 179, 38 ], "kind": "lemma" }, { "full_name": "CategoryTheory.GradedObject.mapBifunctorRightUnitorCofanIsColimit", "code": "noncomputable def mapBifunctorRightUnitorCofanIsColimit (j : J) :\n IsColimit (mapBifunctorRightUnitorCofan F Y e p hp X j) :=\n mkCofanColimit _\n (fun s => e.inv.app (X j) ≫\n (F.obj (X j)).map (singleObjApplyIso (0 : I) Y).inv ≫ s.inj ⟨⟨j, 0⟩, hp j⟩)\n (fun s => by\n rintro ⟨⟨j', i⟩, h⟩\n by_cases hi : i = 0\n · subst hi\n simp only [Set.mem_preimage, hp, Set.mem_singleton_iff] at h\n subst h\n dsimp\n rw [mapBifunctorRightUnitorCofan_inj, assoc, Iso.hom_inv_id_app_assoc,\n ← Functor.map_comp_assoc, Iso.hom_inv_id, Functor.map_id, id_comp]\n · apply IsInitial.hom_ext\n exact mapBifunctorObjObjSingle₀IsInitial _ _ _ _ hi)\n (fun s m hm => by\n dsimp\n rw [← hm ⟨⟨j, 0⟩, hp j⟩, mapBifunctorRightUnitorCofan_inj, assoc, ← Functor.map_comp_assoc,\n Iso.inv_hom_id, Functor.map_id, id_comp, Iso.inv_hom_id_app_assoc])", "start": [ 181, 1 ], "end": [ 201, 76 ], "kind": "commanddeclaration" }, { "full_name": "CategoryTheory.GradedObject.mapBifunctorRightUnitor_hasMap", "code": "lemma mapBifunctorRightUnitor_hasMap :\n HasMap (((mapBifunctor F J I).obj X).obj ((single₀ I).obj Y)) p :=\n CofanMapObjFun.hasMap _ _ _ (mapBifunctorRightUnitorCofanIsColimit F Y e p hp X)", "start": [ 203, 1 ], "end": [ 205, 83 ], "kind": "lemma" }, { "full_name": "CategoryTheory.GradedObject.mapBifunctorRightUnitor", "code": "noncomputable def mapBifunctorRightUnitor : mapBifunctorMapObj F p X ((single₀ I).obj Y) ≅ X :=\n isoMk _ _ (fun j => (CofanMapObjFun.iso\n (mapBifunctorRightUnitorCofanIsColimit F Y e p hp X j)).symm)", "start": [ 210, 1 ], "end": [ 215, 66 ], "kind": "commanddeclaration" }, { "full_name": "CategoryTheory.GradedObject.ι_mapBifunctorRightUnitor_hom_apply", "code": "@[reassoc (attr := simp)]\nlemma ι_mapBifunctorRightUnitor_hom_apply (j : J) :\n ιMapBifunctorMapObj F p X ((single₀ I).obj Y) j 0 j (hp j) ≫\n (mapBifunctorRightUnitor F Y e p hp X).hom j =\n (F.obj (X j)).map (singleObjApplyIso (0 : I) Y).hom ≫ e.hom.app (X j) := by\n dsimp [mapBifunctorRightUnitor]\n erw [CofanMapObjFun.ιMapObj_iso_inv]\n rw [mapBifunctorRightUnitorCofan_inj]", "start": [ 217, 1 ], "end": [ 224, 40 ], "kind": "lemma" }, { "full_name": "CategoryTheory.GradedObject.mapBifunctorRightUnitor_inv_apply", "code": "lemma mapBifunctorRightUnitor_inv_apply (j : J) :\n (mapBifunctorRightUnitor F Y e p hp X).inv j =\n e.inv.app (X j) ≫ (F.obj (X j)).map (singleObjApplyIso (0 : I) Y).inv ≫\n ιMapBifunctorMapObj F p X ((single₀ I).obj Y) j 0 j (hp j) := rfl", "start": [ 226, 1 ], "end": [ 229, 74 ], "kind": "lemma" }, { "full_name": "CategoryTheory.GradedObject.mapBifunctorRightUnitor_inv_naturality", "code": "@[reassoc]\nlemma mapBifunctorRightUnitor_inv_naturality :\n φ ≫ (mapBifunctorRightUnitor F Y e p hp X').inv =\n (mapBifunctorRightUnitor F Y e p hp X).inv ≫ mapBifunctorMapMap F p φ (𝟙 _) := by\n ext j\n dsimp\n rw [mapBifunctorRightUnitor_inv_apply, mapBifunctorRightUnitor_inv_apply, assoc, assoc,\n ι_mapBifunctorMapMap]\n dsimp\n rw [Functor.map_id, id_comp, NatTrans.naturality_assoc]\n erw [← NatTrans.naturality_assoc]\n rfl", "start": [ 233, 1 ], "end": [ 244, 6 ], "kind": "lemma" }, { "full_name": "CategoryTheory.GradedObject.mapBifunctorRightUnitor_naturality", "code": "@[reassoc]\nlemma mapBifunctorRightUnitor_naturality :\n mapBifunctorMapMap F p φ (𝟙 _) ≫ (mapBifunctorRightUnitor F Y e p hp X').hom =\n (mapBifunctorRightUnitor F Y e p hp X).hom ≫ φ := by\n rw [← cancel_mono (mapBifunctorRightUnitor F Y e p hp X').inv, assoc, assoc, Iso.hom_inv_id,\n comp_id, mapBifunctorRightUnitor_inv_naturality, Iso.hom_inv_id_assoc]", "start": [ 246, 1 ], "end": [ 251, 75 ], "kind": "lemma" }, { "full_name": "CategoryTheory.GradedObject.TriangleIndexData", "code": "structure TriangleIndexData (r : I₁ × I₂ × I₃ → J) (π : I₁ × I₃ → J) where\n \n p₁₂ : I₁ × I₂ → I₁\n hp₁₂ (i : I₁ × I₂ × I₃) : π ⟨p₁₂ ⟨i.1, i.2.1⟩, i.2.2⟩ = r i\n \n p₂₃ : I₂ × I₃ → I₃\n hp₂₃ (i : I₁ × I₂ × I₃) : π ⟨i.1, p₂₃ i.2⟩ = r i\n h₁ (i₁ : I₁) : p₁₂ (i₁, 0) = i₁\n h₃ (i₃ : I₃) : p₂₃ (0, i₃) = i₃", "start": [ 259, 1 ], "end": [ 270, 34 ], "kind": "commanddeclaration" }, { "full_name": "CategoryTheory.GradedObject.TriangleIndexData.r_zero", "code": "lemma r_zero (i₁ : I₁) (i₃ : I₃) : r ⟨i₁, 0, i₃⟩ = π ⟨i₁, i₃⟩ := by\n rw [← τ.hp₂₃, τ.h₃ i₃]", "start": [ 279, 1 ], "end": [ 280, 25 ], "kind": "lemma" }, { "full_name": "CategoryTheory.GradedObject.TriangleIndexData.ρ₁₂", "code": "@[reducible]\ndef ρ₁₂ : BifunctorComp₁₂IndexData r where\n I₁₂ := I₁\n p := τ.p₁₂\n q := π\n hpq := τ.hp₁₂", "start": [ 282, 1 ], "end": [ 288, 16 ], "kind": "commanddeclaration" }, { "full_name": "CategoryTheory.GradedObject.TriangleIndexData.ρ₂₃", "code": "@[reducible]\ndef ρ₂₃ : BifunctorComp₂₃IndexData r where\n I₂₃ := I₃\n p := τ.p₂₃\n q := π\n hpq := τ.hp₂₃", "start": [ 290, 1 ], "end": [ 296, 16 ], "kind": "commanddeclaration" }, { "full_name": "CategoryTheory.GradedObject.mapBifunctor_triangle", "code": "lemma mapBifunctor_triangle :\n (mapBifunctorAssociator associator τ.ρ₁₂ τ.ρ₂₃ X₁ ((single₀ I₂).obj X₂) X₃).hom ≫\n mapBifunctorMapMap G π (𝟙 X₁) (mapBifunctorLeftUnitor F₂ X₂ e₂ τ.p₂₃ τ.h₃ X₃).hom =\n mapBifunctorMapMap G π (mapBifunctorRightUnitor F₁ X₂ e₁ τ.p₁₂ τ.h₁ X₁).hom (𝟙 X₃) := by\n rw [← cancel_epi ((mapBifunctorMapMap G π\n (mapBifunctorRightUnitor F₁ X₂ e₁ τ.p₁₂ τ.h₁ X₁).inv (𝟙 X₃)))]\n ext j i₁ i₃ hj\n simp only [categoryOfGradedObjects_comp, ι_mapBifunctorMapMap_assoc,\n mapBifunctorRightUnitor_inv_apply, Functor.id_obj, Functor.flip_obj_obj, Functor.map_comp,\n NatTrans.comp_app, categoryOfGradedObjects_id, Functor.map_id, id_comp, assoc,\n ι_mapBifunctorMapMap]\n congr 2\n rw [← ιMapBifunctor₁₂BifunctorMapObj_eq_assoc F₁ G τ.ρ₁₂ _ _ _ i₁ 0 i₃ j\n (by rw [τ.r_zero, hj]) i₁ (by simp), ι_mapBifunctorAssociator_hom_assoc,\n ιMapBifunctorBifunctor₂₃MapObj_eq_assoc G F₂ τ.ρ₂₃ _ _ _ i₁ 0 i₃ j\n (by rw [τ.r_zero, hj]) i₃ (by simp), ι_mapBifunctorMapMap]\n dsimp\n rw [Functor.map_id, NatTrans.id_app, id_comp,\n ← Functor.map_comp_assoc, ← NatTrans.comp_app_assoc, ← Functor.map_comp,\n ι_mapBifunctorLeftUnitor_hom_apply F₂ X₂ e₂ τ.p₂₃ τ.h₃ X₃ i₃,\n ι_mapBifunctorRightUnitor_hom_apply F₁ X₂ e₁ τ.p₁₂ τ.h₁ X₁ i₁]\n dsimp\n simp only [Functor.map_comp, NatTrans.comp_app, ← triangle (X₁ i₁) (X₃ i₃), ← assoc]\n congr 2\n symm\n apply NatTrans.naturality_app (associator.hom.app (X₁ i₁))", "start": [ 326, 1 ], "end": [ 351, 61 ], "kind": "lemma" } ]
Mathlib/MeasureTheory/Function/LpSpace/DomAct/Basic.lean
[ "Mathlib/MeasureTheory/Function/LpSpace.lean", ".lake/packages/lean4/src/lean/Init.lean", "Mathlib/MeasureTheory/Function/AEEqFun/DomAct.lean" ]
[ { "full_name": "DomMulAct.smul_Lp_val", "code": "@[to_additive (attr := simp)]\ntheorem smul_Lp_val (c : Mᵈᵐᵃ) (f : Lp E p μ) : (c • f).1 = c • f.1", "start": [ 35, 1 ], "end": [ 36, 75 ], "kind": "commanddeclaration" }, { "full_name": "DomMulAct.smul_Lp_ae_eq", "code": "@[to_additive]\ntheorem smul_Lp_ae_eq (c : Mᵈᵐᵃ) (f : Lp E p μ) : c • f =ᵐ[μ] (f <| mk.symm c • ·)", "start": [ 38, 1 ], "end": [ 40, 37 ], "kind": "commanddeclaration" }, { "full_name": "DomMulAct.mk_smul_toLp", "code": "@[to_additive]\ntheorem mk_smul_toLp (c : M) {f : α → E} (hf : Memℒp f p μ) :\n mk c • hf.toLp f =\n (hf.comp_measurePreserving <| measurePreserving_smul c μ).toLp (f <| c • ·)", "start": [ 42, 1 ], "end": [ 46, 6 ], "kind": "commanddeclaration" }, { "full_name": "DomMulAct.smul_Lp_const", "code": "@[to_additive (attr := simp)]\ntheorem smul_Lp_const [IsFiniteMeasure μ] (c : Mᵈᵐᵃ) (a : E) :\n c • Lp.const p μ a = Lp.const p μ a", "start": [ 48, 1 ], "end": [ 51, 6 ], "kind": "commanddeclaration" }, { "full_name": "DomMulAct.smul_Lp_add", "code": "@[to_additive]\ntheorem smul_Lp_add (c : Mᵈᵐᵃ) : ∀ f g : Lp E p μ, c • (f + g) = c • f + c • g", "start": [ 69, 1 ], "end": [ 71, 30 ], "kind": "commanddeclaration" }, { "full_name": "DomMulAct.smul_Lp_zero", "code": "@[to_additive (attr := simp 1001)]\ntheorem smul_Lp_zero (c : Mᵈᵐᵃ) : c • (0 : Lp E p μ) = 0", "start": [ 74, 1 ], "end": [ 75, 64 ], "kind": "commanddeclaration" }, { "full_name": "DomMulAct.smul_Lp_neg", "code": "@[to_additive]\ntheorem smul_Lp_neg (c : Mᵈᵐᵃ) (f : Lp E p μ) : c • (-f) = -(c • f)", "start": [ 77, 1 ], "end": [ 79, 30 ], "kind": "commanddeclaration" }, { "full_name": "DomMulAct.smul_Lp_sub", "code": "@[to_additive]\ntheorem smul_Lp_sub (c : Mᵈᵐᵃ) : ∀ f g : Lp E p μ, c • (f - g) = c • f - c • g", "start": [ 81, 1 ], "end": [ 83, 30 ], "kind": "commanddeclaration" }, { "full_name": "DomMulAct.norm_smul_Lp", "code": "@[to_additive (attr := simp)]\ntheorem norm_smul_Lp (c : Mᵈᵐᵃ) (f : Lp E p μ) : ‖c • f‖ = ‖f‖", "start": [ 90, 1 ], "end": [ 92, 36 ], "kind": "commanddeclaration" }, { "full_name": "DomMulAct.nnnorm_smul_Lp", "code": "@[to_additive (attr := simp)]\ntheorem nnnorm_smul_Lp (c : Mᵈᵐᵃ) (f : Lp E p μ) : ‖c • f‖₊ = ‖f‖₊", "start": [ 94, 1 ], "end": [ 96, 49 ], "kind": "commanddeclaration" }, { "full_name": "DomMulAct.dist_smul_Lp", "code": "@[to_additive (attr := simp)]\ntheorem dist_smul_Lp (c : Mᵈᵐᵃ) (f g : Lp E p μ) : dist (c • f) (c • g) = dist f g", "start": [ 98, 1 ], "end": [ 100, 48 ], "kind": "commanddeclaration" }, { "full_name": "DomMulAct.edist_smul_Lp", "code": "@[to_additive (attr := simp)]\ntheorem edist_smul_Lp (c : Mᵈᵐᵃ) (f g : Lp E p μ) : edist (c • f) (c • g) = edist f g", "start": [ 102, 1 ], "end": [ 104, 42 ], "kind": "commanddeclaration" } ]
Mathlib/RingTheory/Perfection.lean
[ "Mathlib/Algebra/Ring/Pi.lean", "Mathlib/RingTheory/Localization/FractionRing.lean", "Mathlib/FieldTheory/Perfect.lean", ".lake/packages/lean4/src/lean/Init.lean", "Mathlib/RingTheory/Valuation/Integers.lean", "Mathlib/Algebra/CharP/Quotient.lean", "Mathlib/Algebra/CharP/Pi.lean", "Mathlib/Algebra/CharP/Subring.lean", "Mathlib/Analysis/SpecialFunctions/Pow/NNReal.lean", "Mathlib/Algebra/Ring/Subring/Basic.lean" ]
[ { "full_name": "Monoid.perfection", "code": "def Monoid.perfection (M : Type u₁) [CommMonoid M] (p : ℕ) : Submonoid (ℕ → M) where\n carrier := { f | ∀ n, f (n + 1) ^ p = f n }\n one_mem' _ := one_pow _\n mul_mem' hf hg n := (mul_pow _ _ _).trans <| congr_arg₂ _ (hf n) (hg n)", "start": [ 35, 1 ], "end": [ 41, 74 ], "kind": "commanddeclaration" }, { "full_name": "Ring.perfectionSubsemiring", "code": "def Ring.perfectionSubsemiring (R : Type u₁) [CommSemiring R] (p : ℕ) [hp : Fact p.Prime]\n [CharP R p] : Subsemiring (ℕ → R) :=\n { Monoid.perfection R p with\n zero_mem' := fun _ ↦ zero_pow hp.1.ne_zero\n add_mem' := fun hf hg n => (frobenius_add R p _ _).trans <| congr_arg₂ _ (hf n) (hg n) }", "start": [ 44, 1 ], "end": [ 51, 93 ], "kind": "commanddeclaration" }, { "full_name": "Ring.perfectionSubring", "code": "def Ring.perfectionSubring (R : Type u₁) [CommRing R] (p : ℕ) [hp : Fact p.Prime] [CharP R p] :\n Subring (ℕ → R) :=\n (Ring.perfectionSubsemiring R p).toSubring fun n => by\n simp_rw [← frobenius_def, Pi.neg_apply, Pi.one_apply, RingHom.map_neg, RingHom.map_one]", "start": [ 54, 1 ], "end": [ 60, 92 ], "kind": "commanddeclaration" }, { "full_name": "Ring.Perfection", "code": "def Ring.Perfection (R : Type u₁) [CommSemiring R] (p : ℕ) : Type u₁ :=\n { f // ∀ n : ℕ, (f : ℕ → R) (n + 1) ^ p = f n }", "start": [ 63, 1 ], "end": [ 67, 50 ], "kind": "commanddeclaration" }, { "full_name": "Perfection.commSemiring", "code": "instance commSemiring : CommSemiring (Ring.Perfection R p) :=\n (Ring.perfectionSubsemiring R p).toCommSemiring", "start": [ 74, 1 ], "end": [ 75, 50 ], "kind": "commanddeclaration" }, { "full_name": "Perfection.charP", "code": "instance charP : CharP (Ring.Perfection R p) p :=\n CharP.subsemiring (ℕ → R) p (Ring.perfectionSubsemiring R p)", "start": [ 78, 1 ], "end": [ 79, 63 ], "kind": "commanddeclaration" }, { "full_name": "Perfection.ring", "code": "instance ring (R : Type u₁) [CommRing R] [CharP R p] : Ring (Ring.Perfection R p) :=\n (Ring.perfectionSubring R p).toRing", "start": [ 82, 1 ], "end": [ 83, 38 ], "kind": "commanddeclaration" }, { "full_name": "Perfection.commRing", "code": "instance commRing (R : Type u₁) [CommRing R] [CharP R p] : CommRing (Ring.Perfection R p) :=\n (Ring.perfectionSubring R p).toCommRing", "start": [ 86, 1 ], "end": [ 87, 42 ], "kind": "commanddeclaration" }, { "full_name": "Perfection.coeff", "code": "def coeff (n : ℕ) : Ring.Perfection R p →+* R where\n toFun f := f.1 n\n map_one' := rfl\n map_mul' _ _ := rfl\n map_zero' := rfl\n map_add' _ _ := rfl", "start": [ 92, 1 ], "end": [ 98, 22 ], "kind": "commanddeclaration" }, { "full_name": "Perfection.ext", "code": "@[ext]\ntheorem ext {f g : Ring.Perfection R p} (h : ∀ n, coeff R p n f = coeff R p n g) : f = g", "start": [ 103, 1 ], "end": [ 105, 25 ], "kind": "commanddeclaration" }, { "full_name": "Perfection.pthRoot", "code": "def pthRoot : Ring.Perfection R p →+* Ring.Perfection R p where\n toFun f := ⟨fun n => coeff R p (n + 1) f, fun _ => f.2 _⟩\n map_one' := rfl\n map_mul' _ _ := rfl\n map_zero' := rfl\n map_add' _ _ := rfl", "start": [ 110, 1 ], "end": [ 116, 22 ], "kind": "commanddeclaration" }, { "full_name": "Perfection.coeff_mk", "code": "@[simp]\ntheorem coeff_mk (f : ℕ → R) (hf) (n : ℕ) : coeff R p n ⟨f, hf⟩ = f n", "start": [ 121, 1 ], "end": [ 122, 77 ], "kind": "commanddeclaration" }, { "full_name": "Perfection.coeff_pthRoot", "code": "theorem coeff_pthRoot (f : Ring.Perfection R p) (n : ℕ) :\n coeff R p n (pthRoot R p f) = coeff R p (n + 1) f", "start": [ 125, 1 ], "end": [ 126, 61 ], "kind": "commanddeclaration" }, { "full_name": "Perfection.coeff_pow_p", "code": "theorem coeff_pow_p (f : Ring.Perfection R p) (n : ℕ) :\n coeff R p (n + 1) (f ^ p) = coeff R p n f", "start": [ 129, 1 ], "end": [ 130, 86 ], "kind": "commanddeclaration" }, { "full_name": "Perfection.coeff_pow_p'", "code": "theorem coeff_pow_p' (f : Ring.Perfection R p) (n : ℕ) : coeff R p (n + 1) f ^ p = coeff R p n f", "start": [ 133, 1 ], "end": [ 134, 8 ], "kind": "commanddeclaration" }, { "full_name": "Perfection.coeff_frobenius", "code": "theorem coeff_frobenius (f : Ring.Perfection R p) (n : ℕ) :\n coeff R p (n + 1) (frobenius _ p f) = coeff R p n f", "start": [ 137, 1 ], "end": [ 138, 84 ], "kind": "commanddeclaration" }, { "full_name": "Perfection.coeff_iterate_frobenius", "code": "theorem coeff_iterate_frobenius (f : Ring.Perfection R p) (n m : ℕ) :\n coeff R p (n + m) ((frobenius _ p)^[m] f) = coeff R p n f", "start": [ 142, 1 ], "end": [ 144, 89 ], "kind": "commanddeclaration" }, { "full_name": "Perfection.coeff_iterate_frobenius'", "code": "theorem coeff_iterate_frobenius' (f : Ring.Perfection R p) (n m : ℕ) (hmn : m ≤ n) :\n coeff R p n ((frobenius _ p)^[m] f) = coeff R p (n - m) f", "start": [ 147, 1 ], "end": [ 149, 98 ], "kind": "commanddeclaration" }, { "full_name": "Perfection.pthRoot_frobenius", "code": "theorem pthRoot_frobenius : (pthRoot R p).comp (frobenius _ p) = RingHom.id _", "start": [ 152, 1 ], "end": [ 154, 94 ], "kind": "commanddeclaration" }, { "full_name": "Perfection.frobenius_pthRoot", "code": "theorem frobenius_pthRoot : (frobenius _ p).comp (pthRoot R p) = RingHom.id _", "start": [ 157, 1 ], "end": [ 161, 77 ], "kind": "commanddeclaration" }, { "full_name": "Perfection.coeff_add_ne_zero", "code": "theorem coeff_add_ne_zero {f : Ring.Perfection R p} {n : ℕ} (hfn : coeff R p n f ≠ 0) (k : ℕ) :\n coeff R p (n + k) f ≠ 0", "start": [ 164, 1 ], "end": [ 167, 67 ], "kind": "commanddeclaration" }, { "full_name": "Perfection.coeff_ne_zero_of_le", "code": "theorem coeff_ne_zero_of_le {f : Ring.Perfection R p} {m n : ℕ} (hfm : coeff R p m f ≠ 0)\n (hmn : m ≤ n) : coeff R p n f ≠ 0", "start": [ 170, 1 ], "end": [ 173, 36 ], "kind": "commanddeclaration" }, { "full_name": "Perfection.perfectRing", "code": "instance perfectRing : PerfectRing (Ring.Perfection R p) p where\n bijective_frobenius := Function.bijective_iff_has_inverse.mpr\n ⟨pthRoot R p,\n DFunLike.congr_fun <| @frobenius_pthRoot R _ p _ _,\n DFunLike.congr_fun <| @pthRoot_frobenius R _ p _ _⟩", "start": [ 178, 1 ], "end": [ 182, 57 ], "kind": "commanddeclaration" }, { "full_name": "Perfection.lift", "code": "@[simps]\nnoncomputable def lift (R : Type u₁) [CommSemiring R] [CharP R p] [PerfectRing R p]\n (S : Type u₂) [CommSemiring S] [CharP S p] : (R →+* S) ≃ (R →+* Ring.Perfection S p) where\n toFun f :=\n { toFun := fun r => ⟨fun n => f (((frobeniusEquiv R p).symm : R →+* R)^[n] r),\n fun n => by erw [← f.map_pow, Function.iterate_succ_apply', frobeniusEquiv_symm_pow_p]⟩\n map_one' := ext fun n => (congr_arg f <| iterate_map_one _ _).trans f.map_one\n map_mul' := fun x y =>\n ext fun n => (congr_arg f <| iterate_map_mul _ _ _ _).trans <| f.map_mul _ _\n map_zero' := ext fun n => (congr_arg f <| iterate_map_zero _ _).trans f.map_zero\n map_add' := fun x y =>\n ext fun n => (congr_arg f <| iterate_map_add _ _ _ _).trans <| f.map_add _ _ }\n invFun := RingHom.comp <| coeff S p 0\n left_inv f := RingHom.ext fun r => rfl\n right_inv f := RingHom.ext fun r => ext fun n =>\n show coeff S p 0 (f (((frobeniusEquiv R p).symm)^[n] r)) = coeff S p n (f r) by\n rw [← coeff_iterate_frobenius _ 0 n, zero_add, ← RingHom.map_iterate_frobenius,\n Function.RightInverse.iterate (frobenius_apply_frobeniusEquiv_symm R p) n]", "start": [ 185, 1 ], "end": [ 204, 83 ], "kind": "commanddeclaration" }, { "full_name": "Perfection.hom_ext", "code": "theorem hom_ext {R : Type u₁} [CommSemiring R] [CharP R p] [PerfectRing R p] {S : Type u₂}\n [CommSemiring S] [CharP S p] {f g : R →+* Ring.Perfection S p}\n (hfg : ∀ x, coeff S p 0 (f x) = coeff S p 0 (g x)) : f = g", "start": [ 206, 1 ], "end": [ 209, 49 ], "kind": "commanddeclaration" }, { "full_name": "Perfection.map", "code": "@[simps]\ndef map (φ : R →+* S) : Ring.Perfection R p →+* Ring.Perfection S p where\n toFun f := ⟨fun n => φ (coeff R p n f), fun n => by rw [← φ.map_pow, coeff_pow_p']⟩\n map_one' := Subtype.eq <| funext fun _ => φ.map_one\n map_mul' f g := Subtype.eq <| funext fun n => φ.map_mul _ _\n map_zero' := Subtype.eq <| funext fun _ => φ.map_zero\n map_add' f g := Subtype.eq <| funext fun n => φ.map_add _ _", "start": [ 214, 1 ], "end": [ 221, 62 ], "kind": "commanddeclaration" }, { "full_name": "Perfection.coeff_map", "code": "theorem coeff_map (φ : R →+* S) (f : Ring.Perfection R p) (n : ℕ) :\n coeff S p n (map p φ f) = φ (coeff R p n f)", "start": [ 224, 1 ], "end": [ 225, 55 ], "kind": "commanddeclaration" }, { "full_name": "PerfectionMap", "code": "structure PerfectionMap (p : ℕ) [Fact p.Prime] {R : Type u₁} [CommSemiring R] [CharP R p]\n {P : Type u₂} [CommSemiring P] [CharP P p] [PerfectRing P p] (π : P →+* R) : Prop where\n injective : ∀ ⦃x y : P⦄,\n (∀ n, π (((frobeniusEquiv P p).symm)^[n] x) = π (((frobeniusEquiv P p).symm)^[n] y)) → x = y\n surjective : ∀ f : ℕ → R, (∀ n, f (n + 1) ^ p = f n) → ∃ x : P, ∀ n,\n π (((frobeniusEquiv P p).symm)^[n] x) = f n", "start": [ 230, 1 ], "end": [ 238, 48 ], "kind": "commanddeclaration" }, { "full_name": "PerfectionMap.mk'", "code": "@[simps]\ntheorem mk' {f : P →+* R} (g : P ≃+* Ring.Perfection R p) (hfg : Perfection.lift p P R f = g) :\n PerfectionMap p f", "start": [ 247, 1 ], "end": [ 259, 28 ], "kind": "commanddeclaration" }, { "full_name": "PerfectionMap.of", "code": "theorem of : PerfectionMap p (Perfection.coeff R p 0)", "start": [ 264, 1 ], "end": [ 266, 71 ], "kind": "commanddeclaration" }, { "full_name": "PerfectionMap.id", "code": "theorem id [PerfectRing R p] : PerfectionMap p (RingHom.id R)", "start": [ 269, 1 ], "end": [ 276, 84 ], "kind": "commanddeclaration" }, { "full_name": "PerfectionMap.equiv", "code": "noncomputable def equiv {π : P →+* R} (m : PerfectionMap p π) : P ≃+* Ring.Perfection R p :=\n RingEquiv.ofBijective (Perfection.lift p P R π)\n ⟨fun _ _ hxy => m.injective fun n => (congr_arg (Perfection.coeff R p n) hxy : _), fun f =>\n let ⟨x, hx⟩ := m.surjective f.1 f.2\n ⟨x, Perfection.ext <| hx⟩⟩", "start": [ 281, 1 ], "end": [ 286, 33 ], "kind": "commanddeclaration" }, { "full_name": "PerfectionMap.equiv_apply", "code": "theorem equiv_apply {π : P →+* R} (m : PerfectionMap p π) (x : P) :\n m.equiv x = Perfection.lift p P R π x", "start": [ 289, 1 ], "end": [ 290, 49 ], "kind": "commanddeclaration" }, { "full_name": "PerfectionMap.comp_equiv", "code": "theorem comp_equiv {π : P →+* R} (m : PerfectionMap p π) (x : P) :\n Perfection.coeff R p 0 (m.equiv x) = π x", "start": [ 293, 1 ], "end": [ 294, 52 ], "kind": "commanddeclaration" }, { "full_name": "PerfectionMap.comp_equiv'", "code": "theorem comp_equiv' {π : P →+* R} (m : PerfectionMap p π) :\n (Perfection.coeff R p 0).comp ↑m.equiv = π", "start": [ 297, 1 ], "end": [ 299, 27 ], "kind": "commanddeclaration" }, { "full_name": "PerfectionMap.comp_symm_equiv", "code": "theorem comp_symm_equiv {π : P →+* R} (m : PerfectionMap p π) (f : Ring.Perfection R p) :\n π (m.equiv.symm f) = Perfection.coeff R p 0 f", "start": [ 302, 1 ], "end": [ 304, 75 ], "kind": "commanddeclaration" }, { "full_name": "PerfectionMap.comp_symm_equiv'", "code": "theorem comp_symm_equiv' {π : P →+* R} (m : PerfectionMap p π) :\n π.comp ↑m.equiv.symm = Perfection.coeff R p 0", "start": [ 307, 1 ], "end": [ 309, 32 ], "kind": "commanddeclaration" }, { "full_name": "PerfectionMap.lift", "code": "@[simps]\nnoncomputable def lift [PerfectRing R p] (S : Type u₂) [CommSemiring S] [CharP S p] (P : Type u₃)\n [CommSemiring P] [CharP P p] [PerfectRing P p] (π : P →+* S) (m : PerfectionMap p π) :\n (R →+* S) ≃ (R →+* P) where\n toFun f := RingHom.comp ↑m.equiv.symm <| Perfection.lift p R S f\n invFun f := π.comp f\n left_inv f := by\n simp_rw [← RingHom.comp_assoc, comp_symm_equiv']\n exact (Perfection.lift p R S).symm_apply_apply f\n right_inv f := by\n exact RingHom.ext fun x => m.equiv.injective <| (m.equiv.apply_symm_apply _).trans\n <| show Perfection.lift p R S (π.comp f) x = RingHom.comp (↑m.equiv) f x from\n RingHom.ext_iff.1 (by rw [Equiv.apply_eq_iff_eq_symm_apply]; rfl) _", "start": [ 314, 1 ], "end": [ 329, 76 ], "kind": "commanddeclaration" }, { "full_name": "PerfectionMap.hom_ext", "code": "theorem hom_ext [PerfectRing R p] {S : Type u₂} [CommSemiring S] [CharP S p] {P : Type u₃}\n [CommSemiring P] [CharP P p] [PerfectRing P p] (π : P →+* S) (m : PerfectionMap p π)\n {f g : R →+* P} (hfg : ∀ x, π (f x) = π (g x)) : f = g", "start": [ 334, 1 ], "end": [ 337, 55 ], "kind": "commanddeclaration" }, { "full_name": "PerfectionMap.map", "code": "@[nolint unusedArguments]\nnoncomputable def map {π : P →+* R} (_ : PerfectionMap p π) {σ : Q →+* S} (n : PerfectionMap p σ)\n (φ : R →+* S) : P →+* Q :=\n lift p P S Q σ n <| φ.comp π", "start": [ 344, 1 ], "end": [ 348, 31 ], "kind": "commanddeclaration" }, { "full_name": "PerfectionMap.comp_map", "code": "theorem comp_map {π : P →+* R} (m : PerfectionMap p π) {σ : Q →+* S} (n : PerfectionMap p σ)\n (φ : R →+* S) : σ.comp (map p m n φ) = φ.comp π", "start": [ 351, 1 ], "end": [ 353, 40 ], "kind": "commanddeclaration" }, { "full_name": "PerfectionMap.map_map", "code": "theorem map_map {π : P →+* R} (m : PerfectionMap p π) {σ : Q →+* S} (n : PerfectionMap p σ)\n (φ : R →+* S) (x : P) : σ (map p m n φ x) = φ (π x)", "start": [ 356, 1 ], "end": [ 358, 41 ], "kind": "commanddeclaration" }, { "full_name": "PerfectionMap.map_eq_map", "code": "theorem map_eq_map (φ : R →+* S) : map p (of p R) (of p S) φ = Perfection.map p φ", "start": [ 361, 1 ], "end": [ 362, 68 ], "kind": "commanddeclaration" }, { "full_name": "ModP", "code": "@[nolint unusedArguments] def ModP (K : Type u₁) [Field K] (v : Valuation K ℝ≥0) (O : Type u₂) [CommRing O] [Algebra O K]\n (_ : v.Integers O) (p : ℕ) :=\n O ⧸ (Ideal.span {(p : O)} : Ideal O)", "start": [ 374, 1 ], "end": [ 378, 39 ], "kind": "commanddeclaration" }, { "full_name": "ModP.commRing", "code": "instance commRing : CommRing (ModP K v O hv p) :=\n Ideal.Quotient.commRing (Ideal.span {(p : O)} : Ideal O)", "start": [ 385, 1 ], "end": [ 386, 59 ], "kind": "commanddeclaration" }, { "full_name": "ModP.charP", "code": "instance charP : CharP (ModP K v O hv p) p :=\n CharP.quotient O p <| mt hv.one_of_isUnit <| (map_natCast (algebraMap O K) p).symm ▸ hvp.1", "start": [ 388, 1 ], "end": [ 389, 93 ], "kind": "commanddeclaration" }, { "full_name": "ModP.preVal", "code": "noncomputable def preVal (x : ModP K v O hv p) : ℝ≥0 :=\n if x = 0 then 0 else v (algebraMap O K x.out')", "start": [ 398, 1 ], "end": [ 401, 49 ], "kind": "commanddeclaration" }, { "full_name": "ModP.preVal_mk", "code": "theorem preVal_mk {x : O} (hx : (Ideal.Quotient.mk _ x : ModP K v O hv p) ≠ 0) :\n preVal K v O hv p (Ideal.Quotient.mk _ x) = v (algebraMap O K x)", "start": [ 406, 1 ], "end": [ 413, 100 ], "kind": "commanddeclaration" }, { "full_name": "ModP.preVal_zero", "code": "theorem preVal_zero : preVal K v O hv p 0 = 0", "start": [ 416, 1 ], "end": [ 417, 13 ], "kind": "commanddeclaration" }, { "full_name": "ModP.preVal_mul", "code": "theorem preVal_mul {x y : ModP K v O hv p} (hxy0 : x * y ≠ 0) :\n preVal K v O hv p (x * y) = preVal K v O hv p x * preVal K v O hv p y", "start": [ 420, 1 ], "end": [ 427, 80 ], "kind": "commanddeclaration" }, { "full_name": "ModP.preVal_add", "code": "theorem preVal_add (x y : ModP K v O hv p) :\n preVal K v O hv p (x + y) ≤ max (preVal K v O hv p x) (preVal K v O hv p y)", "start": [ 430, 1 ], "end": [ 441, 90 ], "kind": "commanddeclaration" }, { "full_name": "ModP.v_p_lt_preVal", "code": "theorem v_p_lt_preVal {x : ModP K v O hv p} : v p < preVal K v O hv p x ↔ x ≠ 0", "start": [ 444, 1 ], "end": [ 449, 74 ], "kind": "commanddeclaration" }, { "full_name": "ModP.preVal_eq_zero", "code": "theorem preVal_eq_zero {x : ModP K v O hv p} : preVal K v O hv p x = 0 ↔ x = 0", "start": [ 452, 1 ], "end": [ 457, 37 ], "kind": "commanddeclaration" }, { "full_name": "ModP.v_p_lt_val", "code": "theorem v_p_lt_val {x : O} :\n v p < v (algebraMap O K x) ↔ (Ideal.Quotient.mk _ x : ModP K v O hv p) ≠ 0", "start": [ 462, 1 ], "end": [ 465, 62 ], "kind": "commanddeclaration" }, { "full_name": "ModP.mul_ne_zero_of_pow_p_ne_zero", "code": "theorem mul_ne_zero_of_pow_p_ne_zero {x y : ModP K v O hv p} (hx : x ^ p ≠ 0) (hy : y ^ p ≠ 0) :\n x * y ≠ 0", "start": [ 472, 1 ], "end": [ 489, 97 ], "kind": "commanddeclaration" }, { "full_name": "PreTilt", "code": "def PreTilt :=\n Ring.Perfection (ModP K v O hv p) p", "start": [ 496, 1 ], "end": [ 499, 38 ], "kind": "commanddeclaration" }, { "full_name": "PreTilt.valAux", "code": "noncomputable def valAux (f : PreTilt K v O hv p) : ℝ≥0 :=\n if h : ∃ n, coeff _ _ n f ≠ 0 then\n ModP.preVal K v O hv p (coeff _ _ (Nat.find h) f) ^ p ^ Nat.find h\n else 0", "start": [ 516, 1 ], "end": [ 522, 9 ], "kind": "commanddeclaration" }, { "full_name": "PreTilt.coeff_nat_find_add_ne_zero", "code": "theorem coeff_nat_find_add_ne_zero {f : PreTilt K v O hv p} {h : ∃ n, coeff _ _ n f ≠ 0} (k : ℕ) :\n coeff _ _ (Nat.find h + k) f ≠ 0", "start": [ 527, 1 ], "end": [ 529, 40 ], "kind": "commanddeclaration" }, { "full_name": "PreTilt.valAux_eq", "code": "theorem valAux_eq {f : PreTilt K v O hv p} {n : ℕ} (hfn : coeff _ _ n f ≠ 0) :\n valAux K v O hv p f = ModP.preVal K v O hv p (coeff _ _ n f) ^ p ^ n", "start": [ 532, 1 ], "end": [ 547, 6 ], "kind": "commanddeclaration" }, { "full_name": "PreTilt.valAux_zero", "code": "theorem valAux_zero : valAux K v O hv p 0 = 0", "start": [ 550, 1 ], "end": [ 551, 32 ], "kind": "commanddeclaration" }, { "full_name": "PreTilt.valAux_one", "code": "theorem valAux_one : valAux K v O hv p 1 = 1", "start": [ 554, 1 ], "end": [ 559, 22 ], "kind": "commanddeclaration" }, { "full_name": "PreTilt.valAux_mul", "code": "theorem valAux_mul (f g : PreTilt K v O hv p) :\n valAux K v O hv p (f * g) = valAux K v O hv p f * valAux K v O hv p g", "start": [ 562, 1 ], "end": [ 578, 67 ], "kind": "commanddeclaration" }, { "full_name": "PreTilt.valAux_add", "code": "theorem valAux_add (f g : PreTilt K v O hv p) :\n valAux K v O hv p (f + g) ≤ max (valAux K v O hv p f) (valAux K v O hv p g)", "start": [ 581, 1 ], "end": [ 600, 52 ], "kind": "commanddeclaration" }, { "full_name": "PreTilt.val", "code": "noncomputable def val : Valuation (PreTilt K v O hv p) ℝ≥0 where\n toFun := valAux K v O hv p\n map_one' := valAux_one\n map_mul' := valAux_mul\n map_zero' := valAux_zero\n map_add_le_max' := valAux_add", "start": [ 605, 1 ], "end": [ 613, 32 ], "kind": "commanddeclaration" }, { "full_name": "PreTilt.map_eq_zero", "code": "theorem map_eq_zero {f : PreTilt K v O hv p} : val K v O hv p f = 0 ↔ f = 0", "start": [ 618, 1 ], "end": [ 623, 93 ], "kind": "commanddeclaration" }, { "full_name": "Tilt", "code": "def Tilt :=\n FractionRing (PreTilt K v O hv p)", "start": [ 638, 1 ], "end": [ 643, 36 ], "kind": "commanddeclaration" } ]
Mathlib/Analysis/InnerProductSpace/OfNorm.lean
[ "Mathlib/Analysis/InnerProductSpace/Basic.lean", ".lake/packages/lean4/src/lean/Init.lean", "Mathlib/Topology/Algebra/Algebra.lean" ]
[ { "full_name": "InnerProductSpaceable", "code": "class InnerProductSpaceable : Prop where\n parallelogram_identity :\n ∀ x y : E, ‖x + y‖ * ‖x + y‖ + ‖x - y‖ * ‖x - y‖ = 2 * (‖x‖ * ‖x‖ + ‖y‖ * ‖y‖)", "start": [ 62, 1 ], "end": [ 68, 83 ], "kind": "commanddeclaration" }, { "full_name": "InnerProductSpace.toInnerProductSpaceable", "code": "theorem InnerProductSpace.toInnerProductSpaceable [InnerProductSpace 𝕜 E] :\n InnerProductSpaceable E", "start": [ 73, 1 ], "end": [ 75, 34 ], "kind": "commanddeclaration" }, { "full_name": "InnerProductSpace.toInnerProductSpaceable_ofReal", "code": "instance (priority := 100) InnerProductSpace.toInnerProductSpaceable_ofReal\n [InnerProductSpace ℝ E] : InnerProductSpaceable E :=\n ⟨parallelogram_law_with_norm ℝ⟩", "start": [ 79, 1 ], "end": [ 81, 34 ], "kind": "commanddeclaration" }, { "full_name": "inner_", "code": "private noncomputable def inner_ (x y : E) : 𝕜 :=\n 4⁻¹ * (𝓚 ‖x + y‖ * 𝓚 ‖x + y‖ - 𝓚 ‖x - y‖ * 𝓚 ‖x - y‖ +\n (I : 𝕜) * 𝓚 ‖(I : 𝕜) • x + y‖ * 𝓚 ‖(I : 𝕜) • x + y‖ -\n (I : 𝕜) * 𝓚 ‖(I : 𝕜) • x - y‖ * 𝓚 ‖(I : 𝕜) • x - y‖)", "start": [ 88, 1 ], "end": [ 92, 57 ], "kind": "commanddeclaration" }, { "full_name": "InnerProductSpaceable.innerProp'", "code": "private def innerProp' (r : 𝕜) : Prop :=\n ∀ x y : E, inner_ 𝕜 (r • x) y = conj r * inner_ 𝕜 x y", "start": [ 99, 1 ], "end": [ 101, 56 ], "kind": "commanddeclaration" }, { "full_name": "InnerProductSpaceable.innerProp_neg_one", "code": "theorem innerProp_neg_one : innerProp' E ((-1 : ℤ) : 𝕜)", "start": [ 105, 1 ], "end": [ 117, 7 ], "kind": "commanddeclaration" }, { "full_name": "Continuous.inner_", "code": "theorem _root_.Continuous.inner_ {f g : ℝ → E} (hf : Continuous f) (hg : Continuous g) :\n Continuous fun x => inner_ 𝕜 (f x) (g x)", "start": [ 120, 1 ], "end": [ 123, 11 ], "kind": "commanddeclaration" }, { "full_name": "InnerProductSpaceable.inner_.norm_sq", "code": "theorem inner_.norm_sq (x : E) : ‖x‖ ^ 2 = re (inner_ 𝕜 x x)", "start": [ 126, 1 ], "end": [ 135, 7 ], "kind": "commanddeclaration" }, { "full_name": "InnerProductSpaceable.inner_.conj_symm", "code": "theorem inner_.conj_symm (x y : E) : conj (inner_ 𝕜 y x) = inner_ 𝕜 x y", "start": [ 138, 1 ], "end": [ 160, 47 ], "kind": "commanddeclaration" }, { "full_name": "InnerProductSpaceable.add_left_aux1", "code": "private theorem add_left_aux1 (x y z : E) : ‖x + y + z‖ * ‖x + y + z‖ =\n (‖2 • x + y‖ * ‖2 • x + y‖ + ‖2 • z + y‖ * ‖2 • z + y‖) / 2 - ‖x - z‖ * ‖x - z‖", "start": [ 165, 1 ], "end": [ 168, 87 ], "kind": "commanddeclaration" }, { "full_name": "InnerProductSpaceable.add_left_aux2", "code": "private theorem add_left_aux2 (x y z : E) : ‖x + y - z‖ * ‖x + y - z‖ =\n (‖2 • x + y‖ * ‖2 • x + y‖ + ‖y - 2 • z‖ * ‖y - 2 • z‖) / 2 - ‖x + z‖ * ‖x + z‖", "start": [ 170, 1 ], "end": [ 174, 47 ], "kind": "commanddeclaration" }, { "full_name": "InnerProductSpaceable.add_left_aux2'", "code": "private theorem add_left_aux2' (x y z : E) :\n ‖x + y + z‖ * ‖x + y + z‖ - ‖x + y - z‖ * ‖x + y - z‖ =\n ‖x + z‖ * ‖x + z‖ - ‖x - z‖ * ‖x - z‖ +\n (‖2 • z + y‖ * ‖2 • z + y‖ - ‖y - 2 • z‖ * ‖y - 2 • z‖) / 2", "start": [ 176, 1 ], "end": [ 180, 42 ], "kind": "commanddeclaration" }, { "full_name": "InnerProductSpaceable.add_left_aux3", "code": "private theorem add_left_aux3 (y z : E) :\n ‖2 • z + y‖ * ‖2 • z + y‖ = 2 * (‖y + z‖ * ‖y + z‖ + ‖z‖ * ‖z‖) - ‖y‖ * ‖y‖", "start": [ 182, 1 ], "end": [ 185, 84 ], "kind": "commanddeclaration" }, { "full_name": "InnerProductSpaceable.add_left_aux4", "code": "private theorem add_left_aux4 (y z : E) :\n ‖y - 2 • z‖ * ‖y - 2 • z‖ = 2 * (‖y - z‖ * ‖y - z‖ + ‖z‖ * ‖z‖) - ‖y‖ * ‖y‖", "start": [ 187, 1 ], "end": [ 191, 54 ], "kind": "commanddeclaration" }, { "full_name": "InnerProductSpaceable.add_left_aux4'", "code": "private theorem add_left_aux4' (y z : E) :\n (‖2 • z + y‖ * ‖2 • z + y‖ - ‖y - 2 • z‖ * ‖y - 2 • z‖) / 2 =\n ‖y + z‖ * ‖y + z‖ - ‖y - z‖ * ‖y - z‖", "start": [ 193, 1 ], "end": [ 196, 42 ], "kind": "commanddeclaration" }, { "full_name": "InnerProductSpaceable.add_left_aux5", "code": "private theorem add_left_aux5 (x y z : E) :\n ‖(I : 𝕜) • (x + y) + z‖ * ‖(I : 𝕜) • (x + y) + z‖ =\n (‖(I : 𝕜) • (2 • x + y)‖ * ‖(I : 𝕜) • (2 • x + y)‖ +\n ‖(I : 𝕜) • y + 2 • z‖ * ‖(I : 𝕜) • y + 2 • z‖) / 2 -\n ‖(I : 𝕜) • x - z‖ * ‖(I : 𝕜) • x - z‖", "start": [ 198, 1 ], "end": [ 205, 68 ], "kind": "commanddeclaration" }, { "full_name": "InnerProductSpaceable.add_left_aux6", "code": "private theorem add_left_aux6 (x y z : E) :\n ‖(I : 𝕜) • (x + y) - z‖ * ‖(I : 𝕜) • (x + y) - z‖ =\n (‖(I : 𝕜) • (2 • x + y)‖ * ‖(I : 𝕜) • (2 • x + y)‖ +\n ‖(I : 𝕜) • y - 2 • z‖ * ‖(I : 𝕜) • y - 2 • z‖) / 2 -\n ‖(I : 𝕜) • x + z‖ * ‖(I : 𝕜) • x + z‖", "start": [ 207, 1 ], "end": [ 214, 68 ], "kind": "commanddeclaration" }, { "full_name": "InnerProductSpaceable.add_left_aux7", "code": "private theorem add_left_aux7 (y z : E) :\n ‖(I : 𝕜) • y + 2 • z‖ * ‖(I : 𝕜) • y + 2 • z‖ =\n 2 * (‖(I : 𝕜) • y + z‖ * ‖(I : 𝕜) • y + z‖ + ‖z‖ * ‖z‖) - ‖(I : 𝕜) • y‖ * ‖(I : 𝕜) • y‖", "start": [ 216, 1 ], "end": [ 221, 70 ], "kind": "commanddeclaration" }, { "full_name": "InnerProductSpaceable.add_left_aux8", "code": "private theorem add_left_aux8 (y z : E) :\n ‖(I : 𝕜) • y - 2 • z‖ * ‖(I : 𝕜) • y - 2 • z‖ =\n 2 * (‖(I : 𝕜) • y - z‖ * ‖(I : 𝕜) • y - z‖ + ‖z‖ * ‖z‖) - ‖(I : 𝕜) • y‖ * ‖(I : 𝕜) • y‖", "start": [ 223, 1 ], "end": [ 228, 70 ], "kind": "commanddeclaration" }, { "full_name": "InnerProductSpaceable.add_left", "code": "theorem add_left (x y z : E) : inner_ 𝕜 (x + y) z = inner_ 𝕜 x z + inner_ 𝕜 y z", "start": [ 230, 1 ], "end": [ 240, 9 ], "kind": "commanddeclaration" }, { "full_name": "InnerProductSpaceable.nat", "code": "theorem nat (n : ℕ) (x y : E) : inner_ 𝕜 ((n : 𝕜) • x) y = (n : 𝕜) * inner_ 𝕜 x y", "start": [ 243, 1 ], "end": [ 248, 40 ], "kind": "commanddeclaration" }, { "full_name": "InnerProductSpaceable.nat_prop", "code": "private theorem nat_prop (r : ℕ) : innerProp' E (r : 𝕜)", "start": [ 251, 1 ], "end": [ 252, 43 ], "kind": "commanddeclaration" }, { "full_name": "InnerProductSpaceable.int_prop", "code": "private theorem int_prop (n : ℤ) : innerProp' E (n : 𝕜)", "start": [ 254, 1 ], "end": [ 267, 53 ], "kind": "commanddeclaration" }, { "full_name": "InnerProductSpaceable.rat_prop", "code": "private theorem rat_prop (r : ℚ) : innerProp' E (r : 𝕜)", "start": [ 269, 1 ], "end": [ 276, 70 ], "kind": "commanddeclaration" }, { "full_name": "InnerProductSpaceable.real_prop", "code": "private theorem real_prop (r : ℝ) : innerProp' E (r : 𝕜)", "start": [ 278, 1 ], "end": [ 285, 73 ], "kind": "commanddeclaration" }, { "full_name": "InnerProductSpaceable.I_prop", "code": "private theorem I_prop : innerProp' E (I : 𝕜)", "start": [ 287, 1 ], "end": [ 302, 7 ], "kind": "commanddeclaration" }, { "full_name": "InnerProductSpaceable.innerProp", "code": "theorem innerProp (r : 𝕜) : innerProp' E r", "start": [ 304, 1 ], "end": [ 308, 7 ], "kind": "commanddeclaration" }, { "full_name": "InnerProductSpace.ofNorm", "code": "noncomputable def InnerProductSpace.ofNorm\n (h : ∀ x y : E, ‖x + y‖ * ‖x + y‖ + ‖x - y‖ * ‖x - y‖ = 2 * (‖x‖ * ‖x‖ + ‖y‖ * ‖y‖)) :\n InnerProductSpace 𝕜 E :=\n haveI : InnerProductSpaceable E := ⟨h⟩\n { inner := inner_ 𝕜\n norm_sq_eq_inner := inner_.norm_sq\n conj_symm := inner_.conj_symm\n add_left := InnerProductSpaceable.add_left\n smul_left := fun _ _ _ => innerProp _ _ _ }", "start": [ 315, 1 ], "end": [ 325, 48 ], "kind": "commanddeclaration" }, { "full_name": "nonempty_innerProductSpace", "code": "theorem nonempty_innerProductSpace : Nonempty (InnerProductSpace 𝕜 E)", "start": [ 331, 1 ], "end": [ 340, 51 ], "kind": "commanddeclaration" }, { "full_name": "InnerProductSpaceable.to_uniformConvexSpace", "code": "instance (priority := 100) InnerProductSpaceable.to_uniformConvexSpace : UniformConvexSpace E := by\n cases nonempty_innerProductSpace ℝ E; infer_instance", "start": [ 348, 1 ], "end": [ 349, 55 ], "kind": "commanddeclaration" } ]
Mathlib/Topology/ContinuousFunction/LocallyConstant.lean
[ "Mathlib/Topology/LocallyConstant/Algebra.lean", ".lake/packages/lean4/src/lean/Init.lean", "Mathlib/Topology/ContinuousFunction/Basic.lean", "Mathlib/Topology/ContinuousFunction/Algebra.lean" ]
[ { "full_name": "LocallyConstant.toContinuousMapMonoidHom", "code": "@[to_additive (attr := simps)\n\"The inclusion of locally-constant functions into continuous functions as an additive monoid hom.\"]\ndef toContinuousMapMonoidHom [Monoid Y] [ContinuousMul Y] : LocallyConstant X Y →* C(X, Y) where\n toFun := (↑)\n map_one' := by\n ext\n simp\n map_mul' x y := by\n ext\n simp", "start": [ 22, 1 ], "end": [ 33, 9 ], "kind": "commanddeclaration" }, { "full_name": "LocallyConstant.toContinuousMapLinearMap", "code": "@[simps]\ndef toContinuousMapLinearMap (R : Type*) [Semiring R] [AddCommMonoid Y] [Module R Y]\n [ContinuousAdd Y] [ContinuousConstSMul R Y] : LocallyConstant X Y →ₗ[R] C(X, Y) where\n toFun := (↑)\n map_add' x y := by\n ext\n simp\n map_smul' x y := by\n ext\n simp", "start": [ 37, 1 ], "end": [ 47, 9 ], "kind": "commanddeclaration" }, { "full_name": "LocallyConstant.toContinuousMapAlgHom", "code": "@[simps]\ndef toContinuousMapAlgHom (R : Type*) [CommSemiring R] [Semiring Y] [Algebra R Y]\n [TopologicalSemiring Y] : LocallyConstant X Y →ₐ[R] C(X, Y) where\n toFun := (↑)\n map_one' := by\n ext\n simp\n map_mul' x y := by\n ext\n simp\n map_zero' := by\n ext\n simp\n map_add' x y := by\n ext\n simp\n commutes' r := by\n ext x\n simp [Algebra.smul_def]", "start": [ 50, 1 ], "end": [ 69, 28 ], "kind": "commanddeclaration" } ]
Mathlib/Data/Nat/Hyperoperation.lean
[ ".lake/packages/lean4/src/lean/Init.lean", "Mathlib/Algebra/Order/Ring/Abs.lean", "Mathlib/Tactic/Ring.lean" ]
[ { "full_name": "hyperoperation", "code": "def hyperoperation : ℕ → ℕ → ℕ → ℕ\n | 0, _, k => k + 1\n | 1, m, 0 => m\n | 2, _, 0 => 0\n | _ + 3, _, 0 => 1\n | n + 1, m, k + 1 => hyperoperation n m (hyperoperation (n + 1) m k)", "start": [ 32, 1 ], "end": [ 40, 71 ], "kind": "commanddeclaration" }, { "full_name": "hyperoperation_zero", "code": "@[simp]\ntheorem hyperoperation_zero (m : ℕ) : hyperoperation 0 m = Nat.succ", "start": [ 44, 1 ], "end": [ 46, 62 ], "kind": "commanddeclaration" }, { "full_name": "hyperoperation_ge_three_eq_one", "code": "theorem hyperoperation_ge_three_eq_one (n m : ℕ) : hyperoperation (n + 3) m 0 = 1", "start": [ 49, 1 ], "end": [ 50, 22 ], "kind": "commanddeclaration" }, { "full_name": "hyperoperation_recursion", "code": "theorem hyperoperation_recursion (n m k : ℕ) :\n hyperoperation (n + 1) m (k + 1) = hyperoperation n m (hyperoperation (n + 1) m k)", "start": [ 53, 1 ], "end": [ 55, 22 ], "kind": "commanddeclaration" }, { "full_name": "hyperoperation_one", "code": "@[simp]\ntheorem hyperoperation_one : hyperoperation 1 = (· + ·)", "start": [ 59, 1 ], "end": [ 65, 31 ], "kind": "commanddeclaration" }, { "full_name": "hyperoperation_two", "code": "@[simp]\ntheorem hyperoperation_two : hyperoperation 2 = (· * ·)", "start": [ 68, 1 ], "end": [ 78, 29 ], "kind": "commanddeclaration" }, { "full_name": "hyperoperation_three", "code": "@[simp]\ntheorem hyperoperation_three : hyperoperation 3 = (· ^ ·)", "start": [ 81, 1 ], "end": [ 88, 32 ], "kind": "commanddeclaration" }, { "full_name": "hyperoperation_ge_two_eq_self", "code": "theorem hyperoperation_ge_two_eq_self (n m : ℕ) : hyperoperation (n + 2) m 1 = m", "start": [ 91, 1 ], "end": [ 95, 71 ], "kind": "commanddeclaration" }, { "full_name": "hyperoperation_two_two_eq_four", "code": "theorem hyperoperation_two_two_eq_four (n : ℕ) : hyperoperation (n + 1) 2 2 = 4", "start": [ 98, 1 ], "end": [ 101, 70 ], "kind": "commanddeclaration" }, { "full_name": "hyperoperation_ge_three_one", "code": "theorem hyperoperation_ge_three_one (n : ℕ) : ∀ k : ℕ, hyperoperation (n + 3) 1 k = 1", "start": [ 104, 1 ], "end": [ 113, 41 ], "kind": "commanddeclaration" }, { "full_name": "hyperoperation_ge_four_zero", "code": "theorem hyperoperation_ge_four_zero (n k : ℕ) :\n hyperoperation (n + 4) 0 k = if Even k then 1 else 0", "start": [ 116, 1 ], "end": [ 126, 47 ], "kind": "commanddeclaration" } ]
Mathlib/Algebra/Category/ModuleCat/Tannaka.lean
[ "Mathlib/LinearAlgebra/Span.lean", ".lake/packages/lean4/src/lean/Init.lean", "Mathlib/Algebra/Category/ModuleCat/Basic.lean" ]
[ { "full_name": "ringEquivEndForget₂", "code": "def ringEquivEndForget₂ (R : Type u) [Ring R] :\n R ≃+* End (AdditiveFunctor.of (forget₂ (ModuleCat.{u} R) AddCommGrp.{u})) where\n toFun r :=\n { app := fun M =>\n @AddCommGrp.ofHom M.carrier M.carrier _ _ (DistribMulAction.toAddMonoidHom M r)\n naturality := fun M N f => by\n ext\n exact (f.map_smul _ _).symm }\n invFun φ := φ.app (ModuleCat.of R R) (1 : R)\n left_inv := by\n intro r\n simp\n right_inv := by\n intro φ\n apply NatTrans.ext\n ext M (x : M)\n have w := congr_fun ((forget _).congr_map\n (φ.naturality (ModuleCat.asHomRight (LinearMap.toSpanSingleton R M x)))) (1 : R)\n exact w.symm.trans (congr_arg (φ.app M) (one_smul R x))\n map_add' := by\n intros\n apply NatTrans.ext\n ext\n dsimp\n simp only [AddCommGrp.ofHom_apply, DistribMulAction.toAddMonoidHom_apply, add_smul]\n rfl\n map_mul' := by\n intros\n apply NatTrans.ext\n ext\n dsimp\n simp only [AddCommGrp.ofHom_apply, DistribMulAction.toAddMonoidHom_apply, mul_smul]\n rfl", "start": [ 23, 1 ], "end": [ 59, 8 ], "kind": "commanddeclaration" } ]
Mathlib/Combinatorics/Derangements/Exponential.lean
[ ".lake/packages/lean4/src/lean/Init.lean", "Mathlib/Analysis/SpecialFunctions/Exponential.lean", "Mathlib/Order/Filter/Basic.lean", "Mathlib/Combinatorics/Derangements/Finite.lean" ]
[ { "full_name": "numDerangements_tendsto_inv_e", "code": "theorem numDerangements_tendsto_inv_e :\n Tendsto (fun n => (numDerangements n : ℝ) / n.factorial) atTop (𝓝 (Real.exp (-1)))", "start": [ 24, 1 ], "end": [ 52, 7 ], "kind": "commanddeclaration" } ]
Mathlib/Algebra/Category/Grp/Subobject.lean
[ "Mathlib/Algebra/Category/Grp/ZModuleEquivalence.lean", ".lake/packages/lean4/src/lean/Init.lean", "Mathlib/Algebra/Category/ModuleCat/Subobject.lean" ]
[ { "full_name": "AddCommGrp.wellPowered_addCommGrp", "code": "instance wellPowered_addCommGrp : WellPowered AddCommGrp.{u} :=\n wellPowered_of_equiv (forget₂ (ModuleCat.{u} ℤ) AddCommGrp.{u}).asEquivalence", "start": [ 22, 1 ], "end": [ 23, 80 ], "kind": "commanddeclaration" } ]
Mathlib/NumberTheory/LSeries/HurwitzZetaValues.lean
[ ".lake/packages/lean4/src/lean/Init.lean", "Mathlib/NumberTheory/LSeries/RiemannZeta.lean", "Mathlib/NumberTheory/ZetaValues.lean" ]
[ { "full_name": "HurwitzZeta.cosZeta_two_mul_nat", "code": "theorem cosZeta_two_mul_nat (hk : k ≠ 0) (hx : x ∈ Icc 0 1) :\n cosZeta x (2 * k) = (-1) ^ (k + 1) * (2 * π) ^ (2 * k) / 2 / (2 * k)! *\n ((Polynomial.bernoulli (2 * k)).map (algebraMap ℚ ℂ)).eval (x : ℂ)", "start": [ 47, 1 ], "end": [ 67, 10 ], "kind": "commanddeclaration" }, { "full_name": "HurwitzZeta.sinZeta_two_mul_nat_add_one", "code": "theorem sinZeta_two_mul_nat_add_one (hk : k ≠ 0) (hx : x ∈ Icc 0 1) :\n sinZeta x (2 * k + 1) = (-1) ^ (k + 1) * (2 * π) ^ (2 * k + 1) / 2 / (2 * k + 1)! *\n ((Polynomial.bernoulli (2 * k + 1)).map (algebraMap ℚ ℂ)).eval (x : ℂ)", "start": [ 69, 1 ], "end": [ 97, 50 ], "kind": "commanddeclaration" }, { "full_name": "HurwitzZeta.cosZeta_two_mul_nat'", "code": "theorem cosZeta_two_mul_nat' (hk : k ≠ 0) (hx : x ∈ Icc (0 : ℝ) 1) :\n cosZeta x (2 * k) = (-1) ^ (k + 1) / (2 * k) / Gammaℂ (2 * k) *\n ((Polynomial.bernoulli (2 * k)).map (algebraMap ℚ ℂ)).eval (x : ℂ)", "start": [ 99, 1 ], "end": [ 110, 12 ], "kind": "commanddeclaration" }, { "full_name": "HurwitzZeta.sinZeta_two_mul_nat_add_one'", "code": "theorem sinZeta_two_mul_nat_add_one' (hk : k ≠ 0) (hx : x ∈ Icc (0 : ℝ) 1) :\n sinZeta x (2 * k + 1) = (-1) ^ (k + 1) / (2 * k + 1) / Gammaℂ (2 * k + 1) *\n ((Polynomial.bernoulli (2 * k + 1)).map (algebraMap ℚ ℂ)).eval (x : ℂ)", "start": [ 112, 1 ], "end": [ 124, 7 ], "kind": "commanddeclaration" }, { "full_name": "HurwitzZeta.hurwitzZetaEven_one_sub_two_mul_nat", "code": "theorem hurwitzZetaEven_one_sub_two_mul_nat (hk : k ≠ 0) (hx : x ∈ Icc (0 : ℝ) 1) :\n hurwitzZetaEven x (1 - 2 * k) =\n -1 / (2 * k) * ((Polynomial.bernoulli (2 * k)).map (algebraMap ℚ ℂ)).eval (x : ℂ)", "start": [ 126, 1 ], "end": [ 146, 22 ], "kind": "commanddeclaration" }, { "full_name": "HurwitzZeta.hurwitzZetaOdd_neg_two_mul_nat", "code": "theorem hurwitzZetaOdd_neg_two_mul_nat (hk : k ≠ 0) (hx : x ∈ Icc (0 : ℝ) 1) :\n hurwitzZetaOdd x (-(2 * k)) =\n -1 / (2 * k + 1) * ((Polynomial.bernoulli (2 * k + 1)).map (algebraMap ℚ ℂ)).eval (x : ℂ)", "start": [ 148, 1 ], "end": [ 169, 22 ], "kind": "commanddeclaration" }, { "full_name": "HurwitzZeta.hurwitzZeta_one_sub_two_mul_nat", "code": "private lemma hurwitzZeta_one_sub_two_mul_nat (hk : k ≠ 0) (hx : x ∈ Icc (0 : ℝ) 1) :\n hurwitzZeta x (1 - 2 * k) =\n -1 / (2 * k) * ((Polynomial.bernoulli (2 * k)).map (algebraMap ℚ ℂ)).eval (x : ℂ) := by\n suffices hurwitzZetaOdd x (1 - 2 * k) = 0 by\n rw [hurwitzZeta, this, add_zero, hurwitzZetaEven_one_sub_two_mul_nat hk hx]\n obtain ⟨k, rfl⟩ := Nat.exists_eq_succ_of_ne_zero hk\n rw [Nat.cast_succ, show (1 : ℂ) - 2 * (k + 1) = - 2 * k - 1 by ring,\n hurwitzZetaOdd_neg_two_mul_nat_sub_one]", "start": [ 172, 1 ], "end": [ 179, 44 ], "kind": "lemma" }, { "full_name": "HurwitzZeta.hurwitzZeta_neg_two_mul_nat", "code": "private lemma hurwitzZeta_neg_two_mul_nat (hk : k ≠ 0) (hx : x ∈ Icc (0 : ℝ) 1) :\n hurwitzZeta x (-(2 * k)) = -1 / (2 * k + 1) *\n ((Polynomial.bernoulli (2 * k + 1)).map (algebraMap ℚ ℂ)).eval (x : ℂ) := by\n suffices hurwitzZetaEven x (-(2 * k)) = 0 by\n rw [hurwitzZeta, this, zero_add, hurwitzZetaOdd_neg_two_mul_nat hk hx]\n obtain ⟨k, rfl⟩ := Nat.exists_eq_succ_of_ne_zero hk\n simpa only [Nat.cast_succ, ← neg_mul] using hurwitzZetaEven_neg_two_mul_nat_add_one x k", "start": [ 182, 1 ], "end": [ 188, 90 ], "kind": "lemma" }, { "full_name": "HurwitzZeta.hurwitzZeta_neg_nat", "code": "theorem hurwitzZeta_neg_nat (hk : k ≠ 0) (hx : x ∈ Icc (0 : ℝ) 1) :\n hurwitzZeta x (-k) =\n -1 / (k + 1) * ((Polynomial.bernoulli (k + 1)).map (algebraMap ℚ ℂ)).eval (x : ℂ)", "start": [ 190, 1 ], "end": [ 199, 77 ], "kind": "commanddeclaration" }, { "full_name": "riemannZeta_two_mul_nat", "code": "theorem riemannZeta_two_mul_nat {k : ℕ} (hk : k ≠ 0) :\n riemannZeta (2 * k) = (-1) ^ (k + 1) * (2 : ℂ) ^ (2 * k - 1)\n * (π : ℂ) ^ (2 * k) * bernoulli (2 * k) / (2 * k)!", "start": [ 205, 1 ], "end": [ 217, 14 ], "kind": "commanddeclaration" }, { "full_name": "riemannZeta_two", "code": "theorem riemannZeta_two : riemannZeta 2 = (π : ℂ) ^ 2 / 6", "start": [ 220, 1 ], "end": [ 224, 14 ], "kind": "commanddeclaration" }, { "full_name": "riemannZeta_four", "code": "theorem riemannZeta_four : riemannZeta 4 = π ^ 4 / 90", "start": [ 227, 1 ], "end": [ 232, 14 ], "kind": "commanddeclaration" }, { "full_name": "riemannZeta_neg_nat_eq_bernoulli'", "code": "theorem riemannZeta_neg_nat_eq_bernoulli' (k : ℕ) :\n riemannZeta (-k) = -bernoulli' (k + 1) / (k + 1)", "start": [ 235, 1 ], "end": [ 244, 89 ], "kind": "commanddeclaration" }, { "full_name": "riemannZeta_neg_nat_eq_bernoulli", "code": "theorem riemannZeta_neg_nat_eq_bernoulli (k : ℕ) :\n riemannZeta (-k) = (-1 : ℂ) ^ k * bernoulli (k + 1) / (k + 1)", "start": [ 246, 1 ], "end": [ 251, 31 ], "kind": "commanddeclaration" } ]
Mathlib/CategoryTheory/Preadditive/EndoFunctor.lean
[ "Mathlib/CategoryTheory/Endofunctor/Algebra.lean", ".lake/packages/lean4/src/lean/Init.lean", "Mathlib/CategoryTheory/Preadditive/AdditiveFunctor.lean", "Mathlib/CategoryTheory/Preadditive/Basic.lean" ]
[ { "full_name": "CategoryTheory.Endofunctor.algebraPreadditive", "code": "@[simps]\ninstance Endofunctor.algebraPreadditive : Preadditive (Endofunctor.Algebra F) where\n homGroup A₁ A₂ :=\n { add := fun α β =>\n { f := α.f + β.f\n h := by simp only [Functor.map_add, add_comp, Endofunctor.Algebra.Hom.h, comp_add] }\n zero :=\n { f := 0\n h := by simp only [Functor.map_zero, zero_comp, comp_zero] }\n nsmul := fun n α =>\n { f := n • α.f\n h := by rw [comp_nsmul, Functor.map_nsmul, nsmul_comp, Endofunctor.Algebra.Hom.h] }\n neg := fun α =>\n { f := -α.f\n h := by simp only [Functor.map_neg, neg_comp, Endofunctor.Algebra.Hom.h, comp_neg] }\n sub := fun α β =>\n { f := α.f - β.f\n h := by simp only [Functor.map_sub, sub_comp, Endofunctor.Algebra.Hom.h, comp_sub] }\n zsmul := fun r α =>\n { f := r • α.f\n h := by rw [comp_zsmul, Functor.map_zsmul, zsmul_comp, Endofunctor.Algebra.Hom.h] }\n add_assoc := by\n intros\n apply Algebra.Hom.ext\n apply add_assoc\n zero_add := by\n intros\n apply Algebra.Hom.ext\n apply zero_add\n add_zero := by\n intros\n apply Algebra.Hom.ext\n apply add_zero\n nsmul_zero := by\n intros\n apply Algebra.Hom.ext\n apply zero_smul\n nsmul_succ := by\n intros\n apply Algebra.Hom.ext\n apply succ_nsmul\n sub_eq_add_neg := by\n intros\n apply Algebra.Hom.ext\n apply sub_eq_add_neg\n zsmul_zero' := by\n intros\n apply Algebra.Hom.ext\n apply zero_smul\n zsmul_succ' := by\n intros\n apply Algebra.Hom.ext\n dsimp\n simp only [natCast_zsmul, succ_nsmul]\n rfl\n zsmul_neg' := by\n intros\n apply Algebra.Hom.ext\n simp only [negSucc_zsmul, neg_inj, nsmul_eq_smul_cast ℤ]\n add_left_neg := by\n intros\n apply Algebra.Hom.ext\n apply add_left_neg\n add_comm := by\n intros\n apply Algebra.Hom.ext\n apply add_comm }\n add_comp := by\n intros\n apply Algebra.Hom.ext\n apply add_comp\n comp_add := by\n intros\n apply Algebra.Hom.ext\n apply comp_add", "start": [ 29, 1 ], "end": [ 105, 19 ], "kind": "commanddeclaration" }, { "full_name": "CategoryTheory.Algebra.forget_additive", "code": "instance Algebra.forget_additive : (Endofunctor.Algebra.forget F).Additive where", "start": [ 108, 1 ], "end": [ 108, 81 ], "kind": "commanddeclaration" }, { "full_name": "CategoryTheory.Endofunctor.coalgebraPreadditive", "code": "@[simps]\ninstance Endofunctor.coalgebraPreadditive : Preadditive (Endofunctor.Coalgebra F) where\n homGroup A₁ A₂ :=\n { add := fun α β =>\n { f := α.f + β.f\n h := by simp only [Functor.map_add, comp_add, Endofunctor.Coalgebra.Hom.h, add_comp] }\n zero :=\n { f := 0\n h := by simp only [Functor.map_zero, zero_comp, comp_zero] }\n nsmul := fun n α =>\n { f := n • α.f\n h := by rw [Functor.map_nsmul, comp_nsmul, Endofunctor.Coalgebra.Hom.h, nsmul_comp] }\n neg := fun α =>\n { f := -α.f\n h := by simp only [Functor.map_neg, comp_neg, Endofunctor.Coalgebra.Hom.h, neg_comp] }\n sub := fun α β =>\n { f := α.f - β.f\n h := by simp only [Functor.map_sub, comp_sub, Endofunctor.Coalgebra.Hom.h, sub_comp] }\n zsmul := fun r α =>\n { f := r • α.f\n h := by rw [Functor.map_zsmul, comp_zsmul, Endofunctor.Coalgebra.Hom.h, zsmul_comp] }\n add_assoc := by\n intros\n apply Coalgebra.Hom.ext\n apply add_assoc\n zero_add := by\n intros\n apply Coalgebra.Hom.ext\n apply zero_add\n add_zero := by\n intros\n apply Coalgebra.Hom.ext\n apply add_zero\n nsmul_zero := by\n intros\n apply Coalgebra.Hom.ext\n apply zero_smul\n nsmul_succ := by\n intros\n apply Coalgebra.Hom.ext\n apply succ_nsmul\n sub_eq_add_neg := by\n intros\n apply Coalgebra.Hom.ext\n apply sub_eq_add_neg\n zsmul_zero' := by\n intros\n apply Coalgebra.Hom.ext\n apply zero_smul\n zsmul_succ' := by\n intros\n apply Coalgebra.Hom.ext\n dsimp\n simp only [natCast_zsmul, succ_nsmul]\n rfl\n zsmul_neg' := by\n intros\n apply Coalgebra.Hom.ext\n simp only [negSucc_zsmul, neg_inj, nsmul_eq_smul_cast ℤ]\n add_left_neg := by\n intros\n apply Coalgebra.Hom.ext\n apply add_left_neg\n add_comm := by\n intros\n apply Coalgebra.Hom.ext\n apply add_comm }\n add_comp := by\n intros\n apply Coalgebra.Hom.ext\n apply add_comp\n comp_add := by\n intros\n apply Coalgebra.Hom.ext\n apply comp_add", "start": [ 111, 1 ], "end": [ 185, 19 ], "kind": "commanddeclaration" }, { "full_name": "CategoryTheory.Coalgebra.forget_additive", "code": "instance Coalgebra.forget_additive : (Endofunctor.Coalgebra.forget F).Additive where", "start": [ 188, 1 ], "end": [ 188, 85 ], "kind": "commanddeclaration" } ]
Mathlib/Order/Heyting/Boundary.lean
[ ".lake/packages/lean4/src/lean/Init.lean", "Mathlib/Tactic/Common.lean", "Mathlib/Order/BooleanAlgebra.lean" ]
[ { "full_name": "Coheyting.boundary", "code": "def boundary (a : α) : α :=\n a ⊓ ¬a", "start": [ 34, 1 ], "end": [ 37, 9 ], "kind": "commanddeclaration" }, { "full_name": "Coheyting.inf_hnot_self", "code": "theorem inf_hnot_self (a : α) : a ⊓ ¬a = ∂ a", "start": [ 46, 1 ], "end": [ 47, 6 ], "kind": "commanddeclaration" }, { "full_name": "Coheyting.boundary_le", "code": "theorem boundary_le : ∂ a ≤ a", "start": [ 50, 1 ], "end": [ 51, 14 ], "kind": "commanddeclaration" }, { "full_name": "Coheyting.boundary_le_hnot", "code": "theorem boundary_le_hnot : ∂ a ≤ ¬a", "start": [ 54, 1 ], "end": [ 55, 15 ], "kind": "commanddeclaration" }, { "full_name": "Coheyting.boundary_bot", "code": "@[simp]\ntheorem boundary_bot : ∂ (⊥ : α) = ⊥", "start": [ 58, 1 ], "end": [ 59, 53 ], "kind": "commanddeclaration" }, { "full_name": "Coheyting.boundary_top", "code": "@[simp]\ntheorem boundary_top : ∂ (⊤ : α) = ⊥", "start": [ 62, 1 ], "end": [ 63, 79 ], "kind": "commanddeclaration" }, { "full_name": "Coheyting.boundary_hnot_le", "code": "theorem boundary_hnot_le (a : α) : ∂ (¬a) ≤ ∂ a", "start": [ 66, 1 ], "end": [ 67, 61 ], "kind": "commanddeclaration" }, { "full_name": "Coheyting.boundary_hnot_hnot", "code": "@[simp]\ntheorem boundary_hnot_hnot (a : α) : ∂ (¬¬a) = ∂ (¬a)", "start": [ 70, 1 ], "end": [ 72, 47 ], "kind": "commanddeclaration" }, { "full_name": "Coheyting.hnot_boundary", "code": "@[simp]\ntheorem hnot_boundary (a : α) : ¬∂ a = ⊤", "start": [ 75, 1 ], "end": [ 76, 94 ], "kind": "commanddeclaration" }, { "full_name": "Coheyting.boundary_inf", "code": "theorem boundary_inf (a b : α) : ∂ (a ⊓ b) = ∂ a ⊓ b ⊔ a ⊓ ∂ b", "start": [ 79, 1 ], "end": [ 82, 67 ], "kind": "commanddeclaration" }, { "full_name": "Coheyting.boundary_inf_le", "code": "theorem boundary_inf_le : ∂ (a ⊓ b) ≤ ∂ a ⊔ ∂ b", "start": [ 85, 1 ], "end": [ 86, 69 ], "kind": "commanddeclaration" }, { "full_name": "Coheyting.boundary_sup_le", "code": "theorem boundary_sup_le : ∂ (a ⊔ b) ≤ ∂ a ⊔ ∂ b", "start": [ 89, 1 ], "end": [ 93, 52 ], "kind": "commanddeclaration" }, { "full_name": "Coheyting.boundary_le_boundary_sup_sup_boundary_inf_left", "code": "theorem boundary_le_boundary_sup_sup_boundary_inf_left : ∂ a ≤ ∂ (a ⊔ b) ⊔ ∂ (a ⊓ b)", "start": [ 105, 1 ], "end": [ 117, 67 ], "kind": "commanddeclaration" }, { "full_name": "Coheyting.boundary_le_boundary_sup_sup_boundary_inf_right", "code": "theorem boundary_le_boundary_sup_sup_boundary_inf_right : ∂ b ≤ ∂ (a ⊔ b) ⊔ ∂ (a ⊓ b)", "start": [ 120, 1 ], "end": [ 122, 55 ], "kind": "commanddeclaration" }, { "full_name": "Coheyting.boundary_sup_sup_boundary_inf", "code": "theorem boundary_sup_sup_boundary_inf (a b : α) : ∂ (a ⊔ b) ⊔ ∂ (a ⊓ b) = ∂ a ⊔ ∂ b", "start": [ 125, 1 ], "end": [ 128, 54 ], "kind": "commanddeclaration" }, { "full_name": "Coheyting.boundary_idem", "code": "@[simp]\ntheorem boundary_idem (a : α) : ∂ ∂ a = ∂ a", "start": [ 131, 1 ], "end": [ 132, 91 ], "kind": "commanddeclaration" }, { "full_name": "Coheyting.hnot_hnot_sup_boundary", "code": "theorem hnot_hnot_sup_boundary (a : α) : ¬¬a ⊔ ∂ a = a", "start": [ 135, 1 ], "end": [ 137, 21 ], "kind": "commanddeclaration" }, { "full_name": "Coheyting.hnot_eq_top_iff_exists_boundary", "code": "theorem hnot_eq_top_iff_exists_boundary : ¬a = ⊤ ↔ ∃ b, ∂ b = a", "start": [ 140, 1 ], "end": [ 143, 27 ], "kind": "commanddeclaration" }, { "full_name": "Coheyting.boundary_eq_bot", "code": "@[simp]\ntheorem Coheyting.boundary_eq_bot (a : α) : ∂ a = ⊥", "start": [ 154, 1 ], "end": [ 156, 19 ], "kind": "commanddeclaration" } ]
Mathlib/LinearAlgebra/QuadraticForm/Dual.lean
[ "Mathlib/LinearAlgebra/Dual.lean", ".lake/packages/lean4/src/lean/Init.lean", "Mathlib/LinearAlgebra/QuadraticForm/Prod.lean", "Mathlib/LinearAlgebra/QuadraticForm/IsometryEquiv.lean" ]
[ { "full_name": "LinearMap.dualProd", "code": "@[simps!]\ndef dualProd : LinearMap.BilinForm R (Module.Dual R M × M) :=\n (applyₗ.comp (snd R (Module.Dual R M) M)).compl₂ (fst R (Module.Dual R M) M) +\n ((applyₗ.comp (snd R (Module.Dual R M) M)).compl₂ (fst R (Module.Dual R M) M)).flip", "start": [ 35, 1 ], "end": [ 40, 90 ], "kind": "commanddeclaration" }, { "full_name": "LinearMap.isSymm_dualProd", "code": "theorem isSymm_dualProd : (dualProd R M).IsSymm", "start": [ 43, 1 ], "end": [ 43, 77 ], "kind": "commanddeclaration" }, { "full_name": "LinearMap.separatingLeft_dualProd", "code": "theorem separatingLeft_dualProd :\n (dualProd R M).SeparatingLeft ↔ Function.Injective (Module.Dual.eval R M)", "start": [ 52, 1 ], "end": [ 72, 44 ], "kind": "commanddeclaration" }, { "full_name": "QuadraticForm.dualProd", "code": "@[simps]\ndef dualProd : QuadraticForm R (Module.Dual R M × M) where\n toFun p := p.1 p.2\n toFun_smul a p := by\n dsimp only rw [Prod.smul_fst, Prod.smul_snd, LinearMap.smul_apply, LinearMap.map_smul, smul_eq_mul,\n smul_eq_mul, mul_assoc]\n exists_companion' :=\n ⟨LinearMap.dualProd R M, fun p q => by\n dsimp only rw [LinearMap.dualProd_apply_apply, Prod.fst_add, Prod.snd_add, LinearMap.add_apply, map_add,\n map_add, add_right_comm _ (q.1 q.2), add_comm (q.1 p.2) (p.1 q.2), ← add_assoc, ←\n add_assoc]⟩", "start": [ 85, 1 ], "end": [ 98, 20 ], "kind": "commanddeclaration" }, { "full_name": "LinearMap.dualProd.toQuadraticForm", "code": "@[simp]\ntheorem _root_.LinearMap.dualProd.toQuadraticForm :\n (LinearMap.dualProd R M).toQuadraticForm = 2 • dualProd R M", "start": [ 101, 1 ], "end": [ 104, 35 ], "kind": "commanddeclaration" }, { "full_name": "QuadraticForm.dualProdIsometry", "code": "@[simps!]\ndef dualProdIsometry (f : M ≃ₗ[R] N) : (dualProd R M).IsometryEquiv (dualProd R N) where\n toLinearEquiv := f.dualMap.symm.prod f\n map_app' x := DFunLike.congr_arg x.fst <| f.symm_apply_apply _", "start": [ 109, 1 ], "end": [ 113, 65 ], "kind": "commanddeclaration" }, { "full_name": "QuadraticForm.dualProdProdIsometry", "code": "@[simps!]\ndef dualProdProdIsometry :\n (dualProd R (M × N)).IsometryEquiv ((dualProd R M).prod (dualProd R N)) where\n toLinearEquiv :=\n (Module.dualProdDualEquivDual R M N).symm.prod (LinearEquiv.refl R (M × N)) ≪≫ₗ\n LinearEquiv.prodProdProdComm R _ _ M N\n map_app' m :=\n (m.fst.map_add _ _).symm.trans <| DFunLike.congr_arg m.fst <| Prod.ext (add_zero _) (zero_add _)", "start": [ 116, 1 ], "end": [ 124, 101 ], "kind": "commanddeclaration" }, { "full_name": "QuadraticForm.toDualProd", "code": "@[simps!]\ndef toDualProd (Q : QuadraticForm R M) [Invertible (2 : R)] :\n (Q.prod <| -Q) →qᵢ QuadraticForm.dualProd R M where\n toLinearMap := LinearMap.prod\n (Q.associated.comp (LinearMap.fst _ _ _) + Q.associated.comp (LinearMap.snd _ _ _))\n (LinearMap.fst _ _ _ - LinearMap.snd _ _ _)\n map_app' x := by\n dsimp only [associated, associatedHom]\n dsimp only [LinearMap.smul_apply, LinearMap.coe_mk, AddHom.coe_mk, AddHom.toFun_eq_coe,\n LinearMap.coe_toAddHom, LinearMap.prod_apply, Pi.prod, LinearMap.add_apply,\n LinearMap.coe_comp, Function.comp_apply, LinearMap.fst_apply, LinearMap.snd_apply,\n LinearMap.sub_apply, dualProd_apply, polarBilin_apply_apply, prod_apply, neg_apply]\n simp [polar_comm _ x.1 x.2, ← sub_add, mul_sub, sub_mul, smul_sub, Submonoid.smul_def, ←\n sub_eq_add_neg (Q x.1) (Q x.2)]", "start": [ 134, 1 ], "end": [ 152, 38 ], "kind": "commanddeclaration" } ]
Mathlib/NumberTheory/Rayleigh.lean
[ ".lake/packages/lean4/src/lean/Init.lean", "Mathlib/Data/Real/ConjExponents.lean", "Mathlib/Data/Real/Irrational.lean" ]
[ { "full_name": "beattySeq", "code": "noncomputable def beattySeq (r : ℝ) : ℤ → ℤ :=\n fun k ↦ ⌊k * r⌋", "start": [ 48, 1 ], "end": [ 50, 18 ], "kind": "commanddeclaration" }, { "full_name": "beattySeq'", "code": "noncomputable def beattySeq' (r : ℝ) : ℤ → ℤ :=\n fun k ↦ ⌈k * r⌉ - 1", "start": [ 52, 1 ], "end": [ 54, 22 ], "kind": "commanddeclaration" }, { "full_name": "Beatty.no_collision", "code": "private theorem no_collision : Disjoint {beattySeq r k | k} {beattySeq' s k | k}", "start": [ 60, 1 ], "end": [ 73, 21 ], "kind": "commanddeclaration" }, { "full_name": "Beatty.no_anticollision", "code": "private theorem no_anticollision :\n ¬∃ j k m : ℤ, k < j / r ∧ (j + 1) / r ≤ k + 1 ∧ m ≤ j / s ∧ (j + 1) / s < m + 1", "start": [ 75, 1 ], "end": [ 85, 21 ], "kind": "commanddeclaration" }, { "full_name": "Beatty.hit_or_miss", "code": "private theorem hit_or_miss (h : r > 0) :\n j ∈ {beattySeq r k | k} ∨ ∃ k : ℤ, k < j / r ∧ (j + 1) / r ≤ k + 1", "start": [ 87, 1 ], "end": [ 97, 39 ], "kind": "commanddeclaration" }, { "full_name": "Beatty.hit_or_miss'", "code": "private theorem hit_or_miss' (h : r > 0) :\n j ∈ {beattySeq' r k | k} ∨ ∃ k : ℤ, k ≤ j / r ∧ (j + 1) / r < k + 1", "start": [ 99, 1 ], "end": [ 109, 68 ], "kind": "commanddeclaration" }, { "full_name": "compl_beattySeq", "code": "theorem compl_beattySeq {r s : ℝ} (hrs : r.IsConjExponent s) :\n {beattySeq r k | k}ᶜ = {beattySeq' s k | k}", "start": [ 113, 1 ], "end": [ 124, 75 ], "kind": "commanddeclaration" }, { "full_name": "compl_beattySeq'", "code": "theorem compl_beattySeq' {r s : ℝ} (hrs : r.IsConjExponent s) :\n {beattySeq' r k | k}ᶜ = {beattySeq s k | k}", "start": [ 126, 1 ], "end": [ 128, 47 ], "kind": "commanddeclaration" }, { "full_name": "beattySeq_symmDiff_beattySeq'_pos", "code": "theorem beattySeq_symmDiff_beattySeq'_pos {r s : ℝ} (hrs : r.IsConjExponent s) :\n {beattySeq r k | k > 0} ∆ {beattySeq' s k | k > 0} = {n | 0 < n}", "start": [ 132, 1 ], "end": [ 155, 15 ], "kind": "commanddeclaration" }, { "full_name": "beattySeq'_symmDiff_beattySeq_pos", "code": "theorem beattySeq'_symmDiff_beattySeq_pos {r s : ℝ} (hrs : r.IsConjExponent s) :\n {beattySeq' r k | k > 0} ∆ {beattySeq s k | k > 0} = {n | 0 < n}", "start": [ 157, 1 ], "end": [ 159, 65 ], "kind": "commanddeclaration" }, { "full_name": "Irrational.beattySeq'_pos_eq", "code": "theorem Irrational.beattySeq'_pos_eq {r : ℝ} (hr : Irrational r) :\n {beattySeq' r k | k > 0} = {beattySeq r k | k > 0}", "start": [ 161, 1 ], "end": [ 168, 50 ], "kind": "commanddeclaration" }, { "full_name": "Irrational.beattySeq_symmDiff_beattySeq_pos", "code": "theorem Irrational.beattySeq_symmDiff_beattySeq_pos {r s : ℝ}\n (hrs : r.IsConjExponent s) (hr : Irrational r) :\n {beattySeq r k | k > 0} ∆ {beattySeq s k | k > 0} = {n | 0 < n}", "start": [ 170, 1 ], "end": [ 175, 69 ], "kind": "commanddeclaration" } ]
Mathlib/Algebra/MonoidAlgebra/ToDirectSum.lean
[ "Mathlib/Algebra/DirectSum/Algebra.lean", "Mathlib/Data/Finsupp/ToDFinsupp.lean", ".lake/packages/lean4/src/lean/Init.lean", "Mathlib/Algebra/MonoidAlgebra/Basic.lean" ]
[ { "full_name": "AddMonoidAlgebra.toDirectSum", "code": "def AddMonoidAlgebra.toDirectSum [Semiring M] (f : AddMonoidAlgebra M ι) : ⨁ _ : ι, M :=\n Finsupp.toDFinsupp f", "start": [ 69, 1 ], "end": [ 71, 23 ], "kind": "commanddeclaration" }, { "full_name": "AddMonoidAlgebra.toDirectSum_single", "code": "@[simp]\ntheorem AddMonoidAlgebra.toDirectSum_single (i : ι) (m : M) :\n AddMonoidAlgebra.toDirectSum (Finsupp.single i m) = DirectSum.of _ i m", "start": [ 78, 1 ], "end": [ 81, 32 ], "kind": "commanddeclaration" }, { "full_name": "DirectSum.toAddMonoidAlgebra", "code": "def DirectSum.toAddMonoidAlgebra (f : ⨁ _ : ι, M) : AddMonoidAlgebra M ι :=\n DFinsupp.toFinsupp f", "start": [ 86, 1 ], "end": [ 88, 23 ], "kind": "commanddeclaration" }, { "full_name": "DirectSum.toAddMonoidAlgebra_of", "code": "@[simp]\ntheorem DirectSum.toAddMonoidAlgebra_of (i : ι) (m : M) :\n (DirectSum.of _ i m : ⨁ _ : ι, M).toAddMonoidAlgebra = Finsupp.single i m", "start": [ 91, 1 ], "end": [ 94, 32 ], "kind": "commanddeclaration" }, { "full_name": "AddMonoidAlgebra.toDirectSum_toAddMonoidAlgebra", "code": "@[simp]\ntheorem AddMonoidAlgebra.toDirectSum_toAddMonoidAlgebra (f : AddMonoidAlgebra M ι) :\n f.toDirectSum.toAddMonoidAlgebra = f", "start": [ 97, 1 ], "end": [ 100, 33 ], "kind": "commanddeclaration" }, { "full_name": "DirectSum.toAddMonoidAlgebra_toDirectSum", "code": "@[simp]\ntheorem DirectSum.toAddMonoidAlgebra_toDirectSum (f : ⨁ _ : ι, M) :\n f.toAddMonoidAlgebra.toDirectSum = f", "start": [ 103, 1 ], "end": [ 106, 64 ], "kind": "commanddeclaration" }, { "full_name": "AddMonoidAlgebra.toDirectSum_zero", "code": "@[simp]\ntheorem toDirectSum_zero [Semiring M] : (0 : AddMonoidAlgebra M ι).toDirectSum = 0", "start": [ 120, 1 ], "end": [ 122, 26 ], "kind": "commanddeclaration" }, { "full_name": "AddMonoidAlgebra.toDirectSum_add", "code": "@[simp]\ntheorem toDirectSum_add [Semiring M] (f g : AddMonoidAlgebra M ι) :\n (f + g).toDirectSum = f.toDirectSum + g.toDirectSum", "start": [ 125, 1 ], "end": [ 128, 29 ], "kind": "commanddeclaration" }, { "full_name": "AddMonoidAlgebra.toDirectSum_mul", "code": "@[simp]\ntheorem toDirectSum_mul [DecidableEq ι] [AddMonoid ι] [Semiring M] (f g : AddMonoidAlgebra M ι) :\n (f * g).toDirectSum = f.toDirectSum * g.toDirectSum", "start": [ 131, 1 ], "end": [ 159, 42 ], "kind": "commanddeclaration" }, { "full_name": "DirectSum.toAddMonoidAlgebra_zero", "code": "@[simp]\ntheorem toAddMonoidAlgebra_zero [Semiring M] [∀ m : M, Decidable (m ≠ 0)] :\n toAddMonoidAlgebra 0 = (0 : AddMonoidAlgebra M ι)", "start": [ 168, 1 ], "end": [ 171, 26 ], "kind": "commanddeclaration" }, { "full_name": "DirectSum.toAddMonoidAlgebra_add", "code": "@[simp]\ntheorem toAddMonoidAlgebra_add [Semiring M] [∀ m : M, Decidable (m ≠ 0)] (f g : ⨁ _ : ι, M) :\n (f + g).toAddMonoidAlgebra = toAddMonoidAlgebra f + toAddMonoidAlgebra g", "start": [ 174, 1 ], "end": [ 177, 29 ], "kind": "commanddeclaration" }, { "full_name": "DirectSum.toAddMonoidAlgebra_mul", "code": "@[simp]\ntheorem toAddMonoidAlgebra_mul [AddMonoid ι] [Semiring M]\n [∀ m : M, Decidable (m ≠ 0)] (f g : ⨁ _ : ι, M) :\n (f * g).toAddMonoidAlgebra = toAddMonoidAlgebra f * toAddMonoidAlgebra g", "start": [ 180, 1 ], "end": [ 187, 58 ], "kind": "commanddeclaration" }, { "full_name": "addMonoidAlgebraEquivDirectSum", "code": "@[simps (config := .asFn)]\ndef addMonoidAlgebraEquivDirectSum [DecidableEq ι] [Semiring M] [∀ m : M, Decidable (m ≠ 0)] :\n AddMonoidAlgebra M ι ≃ ⨁ _ : ι, M :=\n { finsuppEquivDFinsupp with\n toFun := AddMonoidAlgebra.toDirectSum\n invFun := DirectSum.toAddMonoidAlgebra }", "start": [ 199, 1 ], "end": [ 206, 45 ], "kind": "commanddeclaration" }, { "full_name": "addMonoidAlgebraAddEquivDirectSum", "code": "@[simps (config := .asFn)]\ndef addMonoidAlgebraAddEquivDirectSum [DecidableEq ι] [Semiring M] [∀ m : M, Decidable (m ≠ 0)] :\n AddMonoidAlgebra M ι ≃+ ⨁ _ : ι, M :=\n { addMonoidAlgebraEquivDirectSum with\n toFun := AddMonoidAlgebra.toDirectSum\n invFun := DirectSum.toAddMonoidAlgebra\n map_add' := AddMonoidAlgebra.toDirectSum_add }", "start": [ 209, 1 ], "end": [ 216, 51 ], "kind": "commanddeclaration" }, { "full_name": "addMonoidAlgebraRingEquivDirectSum", "code": "@[simps (config := .asFn)]\ndef addMonoidAlgebraRingEquivDirectSum [DecidableEq ι] [AddMonoid ι] [Semiring M]\n [∀ m : M, Decidable (m ≠ 0)] : AddMonoidAlgebra M ι ≃+* ⨁ _ : ι, M :=\n { (addMonoidAlgebraAddEquivDirectSum : AddMonoidAlgebra M ι ≃+ ⨁ _ : ι, M) with\n toFun := AddMonoidAlgebra.toDirectSum\n invFun := DirectSum.toAddMonoidAlgebra\n map_mul' := AddMonoidAlgebra.toDirectSum_mul }", "start": [ 219, 1 ], "end": [ 226, 51 ], "kind": "commanddeclaration" }, { "full_name": "addMonoidAlgebraAlgEquivDirectSum", "code": "@[simps (config := .asFn)]\ndef addMonoidAlgebraAlgEquivDirectSum [DecidableEq ι] [AddMonoid ι] [CommSemiring R] [Semiring A]\n [Algebra R A] [∀ m : A, Decidable (m ≠ 0)] : AddMonoidAlgebra A ι ≃ₐ[R] ⨁ _ : ι, A :=\n { (addMonoidAlgebraRingEquivDirectSum : AddMonoidAlgebra A ι ≃+* ⨁ _ : ι, A) with\n toFun := AddMonoidAlgebra.toDirectSum\n invFun := DirectSum.toAddMonoidAlgebra\n commutes' := fun _r => AddMonoidAlgebra.toDirectSum_single _ _ }", "start": [ 229, 1 ], "end": [ 236, 69 ], "kind": "commanddeclaration" } ]
Mathlib/Analysis/Convex/Integral.lean
[ "Mathlib/MeasureTheory/Function/AEEqOfIntegral.lean", "Mathlib/Analysis/Convex/Function.lean", "Mathlib/MeasureTheory/Integral/Average.lean", "Mathlib/Analysis/Convex/StrictConvexSpace.lean", ".lake/packages/lean4/src/lean/Init.lean" ]
[ { "full_name": "Convex.integral_mem", "code": "theorem Convex.integral_mem [IsProbabilityMeasure μ] (hs : Convex ℝ s) (hsc : IsClosed s)\n (hf : ∀ᵐ x ∂μ, f x ∈ s) (hfi : Integrable f μ) : (∫ x, f x ∂μ) ∈ s", "start": [ 53, 1 ], "end": [ 81, 56 ], "kind": "commanddeclaration" }, { "full_name": "Convex.average_mem", "code": "theorem Convex.average_mem [IsFiniteMeasure μ] [NeZero μ] (hs : Convex ℝ s) (hsc : IsClosed s)\n (hfs : ∀ᵐ x ∂μ, f x ∈ s) (hfi : Integrable f μ) : (⨍ x, f x ∂μ) ∈ s", "start": [ 84, 1 ], "end": [ 90, 45 ], "kind": "commanddeclaration" }, { "full_name": "Convex.set_average_mem", "code": "theorem Convex.set_average_mem (hs : Convex ℝ s) (hsc : IsClosed s) (h0 : μ t ≠ 0) (ht : μ t ≠ ∞)\n (hfs : ∀ᵐ x ∂μ.restrict t, f x ∈ s) (hfi : IntegrableOn f t μ) : (⨍ x in t, f x ∂μ) ∈ s", "start": [ 93, 1 ], "end": [ 100, 29 ], "kind": "commanddeclaration" }, { "full_name": "Convex.set_average_mem_closure", "code": "theorem Convex.set_average_mem_closure (hs : Convex ℝ s) (h0 : μ t ≠ 0) (ht : μ t ≠ ∞)\n (hfs : ∀ᵐ x ∂μ.restrict t, f x ∈ s) (hfi : IntegrableOn f t μ) :\n (⨍ x in t, f x ∂μ) ∈ closure s", "start": [ 103, 1 ], "end": [ 109, 97 ], "kind": "commanddeclaration" }, { "full_name": "ConvexOn.average_mem_epigraph", "code": "theorem ConvexOn.average_mem_epigraph [IsFiniteMeasure μ] [NeZero μ] (hg : ConvexOn ℝ s g)\n (hgc : ContinuousOn g s) (hsc : IsClosed s) (hfs : ∀ᵐ x ∂μ, f x ∈ s)\n (hfi : Integrable f μ) (hgi : Integrable (g ∘ f) μ) :\n (⨍ x, f x ∂μ, ⨍ x, g (f x) ∂μ) ∈ {p : E × ℝ | p.1 ∈ s ∧ g p.1 ≤ p.2}", "start": [ 112, 1 ], "end": [ 119, 79 ], "kind": "commanddeclaration" }, { "full_name": "ConcaveOn.average_mem_hypograph", "code": "theorem ConcaveOn.average_mem_hypograph [IsFiniteMeasure μ] [NeZero μ] (hg : ConcaveOn ℝ s g)\n (hgc : ContinuousOn g s) (hsc : IsClosed s) (hfs : ∀ᵐ x ∂μ, f x ∈ s)\n (hfi : Integrable f μ) (hgi : Integrable (g ∘ f) μ) :\n (⨍ x, f x ∂μ, ⨍ x, g (f x) ∂μ) ∈ {p : E × ℝ | p.1 ∈ s ∧ p.2 ≤ g p.1}", "start": [ 122, 1 ], "end": [ 127, 60 ], "kind": "commanddeclaration" }, { "full_name": "ConvexOn.map_average_le", "code": "theorem ConvexOn.map_average_le [IsFiniteMeasure μ] [NeZero μ]\n (hg : ConvexOn ℝ s g) (hgc : ContinuousOn g s) (hsc : IsClosed s)\n (hfs : ∀ᵐ x ∂μ, f x ∈ s) (hfi : Integrable f μ) (hgi : Integrable (g ∘ f) μ) :\n g (⨍ x, f x ∂μ) ≤ ⨍ x, g (f x) ∂μ", "start": [ 130, 1 ], "end": [ 139, 50 ], "kind": "commanddeclaration" }, { "full_name": "ConcaveOn.le_map_average", "code": "theorem ConcaveOn.le_map_average [IsFiniteMeasure μ] [NeZero μ]\n (hg : ConcaveOn ℝ s g) (hgc : ContinuousOn g s) (hsc : IsClosed s)\n (hfs : ∀ᵐ x ∂μ, f x ∈ s) (hfi : Integrable f μ) (hgi : Integrable (g ∘ f) μ) :\n (⨍ x, g (f x) ∂μ) ≤ g (⨍ x, f x ∂μ)", "start": [ 142, 1 ], "end": [ 151, 51 ], "kind": "commanddeclaration" }, { "full_name": "ConvexOn.set_average_mem_epigraph", "code": "theorem ConvexOn.set_average_mem_epigraph (hg : ConvexOn ℝ s g) (hgc : ContinuousOn g s)\n (hsc : IsClosed s) (h0 : μ t ≠ 0) (ht : μ t ≠ ∞) (hfs : ∀ᵐ x ∂μ.restrict t, f x ∈ s)\n (hfi : IntegrableOn f t μ) (hgi : IntegrableOn (g ∘ f) t μ) :\n (⨍ x in t, f x ∂μ, ⨍ x in t, g (f x) ∂μ) ∈ {p : E × ℝ | p.1 ∈ s ∧ g p.1 ≤ p.2}", "start": [ 154, 1 ], "end": [ 165, 46 ], "kind": "commanddeclaration" }, { "full_name": "ConcaveOn.set_average_mem_hypograph", "code": "theorem ConcaveOn.set_average_mem_hypograph (hg : ConcaveOn ℝ s g) (hgc : ContinuousOn g s)\n (hsc : IsClosed s) (h0 : μ t ≠ 0) (ht : μ t ≠ ∞) (hfs : ∀ᵐ x ∂μ.restrict t, f x ∈ s)\n (hfi : IntegrableOn f t μ) (hgi : IntegrableOn (g ∘ f) t μ) :\n (⨍ x in t, f x ∂μ, ⨍ x in t, g (f x) ∂μ) ∈ {p : E × ℝ | p.1 ∈ s ∧ p.2 ≤ g p.1}", "start": [ 168, 1 ], "end": [ 178, 70 ], "kind": "commanddeclaration" }, { "full_name": "ConvexOn.map_set_average_le", "code": "theorem ConvexOn.map_set_average_le (hg : ConvexOn ℝ s g) (hgc : ContinuousOn g s)\n (hsc : IsClosed s) (h0 : μ t ≠ 0) (ht : μ t ≠ ∞) (hfs : ∀ᵐ x ∂μ.restrict t, f x ∈ s)\n (hfi : IntegrableOn f t μ) (hgi : IntegrableOn (g ∘ f) t μ) :\n g (⨍ x in t, f x ∂μ) ≤ ⨍ x in t, g (f x) ∂μ", "start": [ 181, 1 ], "end": [ 190, 60 ], "kind": "commanddeclaration" }, { "full_name": "ConcaveOn.le_map_set_average", "code": "theorem ConcaveOn.le_map_set_average (hg : ConcaveOn ℝ s g) (hgc : ContinuousOn g s)\n (hsc : IsClosed s) (h0 : μ t ≠ 0) (ht : μ t ≠ ∞) (hfs : ∀ᵐ x ∂μ.restrict t, f x ∈ s)\n (hfi : IntegrableOn f t μ) (hgi : IntegrableOn (g ∘ f) t μ) :\n (⨍ x in t, g (f x) ∂μ) ≤ g (⨍ x in t, f x ∂μ)", "start": [ 193, 1 ], "end": [ 202, 61 ], "kind": "commanddeclaration" }, { "full_name": "ConvexOn.map_integral_le", "code": "theorem ConvexOn.map_integral_le [IsProbabilityMeasure μ] (hg : ConvexOn ℝ s g)\n (hgc : ContinuousOn g s) (hsc : IsClosed s) (hfs : ∀ᵐ x ∂μ, f x ∈ s) (hfi : Integrable f μ)\n (hgi : Integrable (g ∘ f) μ) : g (∫ x, f x ∂μ) ≤ ∫ x, g (f x) ∂μ", "start": [ 205, 1 ], "end": [ 213, 79 ], "kind": "commanddeclaration" }, { "full_name": "ConcaveOn.le_map_integral", "code": "theorem ConcaveOn.le_map_integral [IsProbabilityMeasure μ] (hg : ConcaveOn ℝ s g)\n (hgc : ContinuousOn g s) (hsc : IsClosed s) (hfs : ∀ᵐ x ∂μ, f x ∈ s) (hfi : Integrable f μ)\n (hgi : Integrable (g ∘ f) μ) : (∫ x, g (f x) ∂μ) ≤ g (∫ x, f x ∂μ)", "start": [ 216, 1 ], "end": [ 223, 79 ], "kind": "commanddeclaration" }, { "full_name": "ae_eq_const_or_exists_average_ne_compl", "code": "theorem ae_eq_const_or_exists_average_ne_compl [IsFiniteMeasure μ] (hfi : Integrable f μ) :\n f =ᵐ[μ] const α (⨍ x, f x ∂μ) ∨\n ∃ t, MeasurableSet t ∧ μ t ≠ 0 ∧ μ tᶜ ≠ 0 ∧ (⨍ x in t, f x ∂μ) ≠ ⨍ x in tᶜ, f x ∂μ", "start": [ 231, 1 ], "end": [ 247, 60 ], "kind": "commanddeclaration" }, { "full_name": "Convex.average_mem_interior_of_set", "code": "theorem Convex.average_mem_interior_of_set [IsFiniteMeasure μ] (hs : Convex ℝ s) (h0 : μ t ≠ 0)\n (hfs : ∀ᵐ x ∂μ, f x ∈ s) (hfi : Integrable f μ) (ht : (⨍ x in t, f x ∂μ) ∈ interior s) :\n (⨍ x, f x ∂μ) ∈ interior s", "start": [ 250, 1 ], "end": [ 265, 17 ], "kind": "commanddeclaration" }, { "full_name": "StrictConvex.ae_eq_const_or_average_mem_interior", "code": "theorem StrictConvex.ae_eq_const_or_average_mem_interior [IsFiniteMeasure μ] (hs : StrictConvex ℝ s)\n (hsc : IsClosed s) (hfs : ∀ᵐ x ∂μ, f x ∈ s) (hfi : Integrable f μ) :\n f =ᵐ[μ] const α (⨍ x, f x ∂μ) ∨ (⨍ x, f x ∂μ) ∈ interior s", "start": [ 268, 1 ], "end": [ 280, 75 ], "kind": "commanddeclaration" }, { "full_name": "StrictConvexOn.ae_eq_const_or_map_average_lt", "code": "theorem StrictConvexOn.ae_eq_const_or_map_average_lt [IsFiniteMeasure μ] (hg : StrictConvexOn ℝ s g)\n (hgc : ContinuousOn g s) (hsc : IsClosed s) (hfs : ∀ᵐ x ∂μ, f x ∈ s) (hfi : Integrable f μ)\n (hgi : Integrable (g ∘ f) μ) :\n f =ᵐ[μ] const α (⨍ x, f x ∂μ) ∨ g (⨍ x, f x ∂μ) < ⨍ x, g (f x) ∂μ", "start": [ 283, 1 ], "end": [ 309, 55 ], "kind": "commanddeclaration" }, { "full_name": "StrictConcaveOn.ae_eq_const_or_lt_map_average", "code": "theorem StrictConcaveOn.ae_eq_const_or_lt_map_average [IsFiniteMeasure μ]\n (hg : StrictConcaveOn ℝ s g) (hgc : ContinuousOn g s) (hsc : IsClosed s)\n (hfs : ∀ᵐ x ∂μ, f x ∈ s) (hfi : Integrable f μ) (hgi : Integrable (g ∘ f) μ) :\n f =ᵐ[μ] const α (⨍ x, f x ∂μ) ∨ (⨍ x, g (f x) ∂μ) < g (⨍ x, f x ∂μ)", "start": [ 312, 1 ], "end": [ 320, 69 ], "kind": "commanddeclaration" }, { "full_name": "ae_eq_const_or_norm_average_lt_of_norm_le_const", "code": "theorem ae_eq_const_or_norm_average_lt_of_norm_le_const [StrictConvexSpace ℝ E]\n (h_le : ∀ᵐ x ∂μ, ‖f x‖ ≤ C) : f =ᵐ[μ] const α (⨍ x, f x ∂μ) ∨ ‖⨍ x, f x ∂μ‖ < C", "start": [ 323, 1 ], "end": [ 339, 10 ], "kind": "commanddeclaration" }, { "full_name": "ae_eq_const_or_norm_integral_lt_of_norm_le_const", "code": "theorem ae_eq_const_or_norm_integral_lt_of_norm_le_const [StrictConvexSpace ℝ E] [IsFiniteMeasure μ]\n (h_le : ∀ᵐ x ∂μ, ‖f x‖ ≤ C) :\n f =ᵐ[μ] const α (⨍ x, f x ∂μ) ∨ ‖∫ x, f x ∂μ‖ < (μ univ).toReal * C", "start": [ 342, 1 ], "end": [ 353, 25 ], "kind": "commanddeclaration" }, { "full_name": "ae_eq_const_or_norm_setIntegral_lt_of_norm_le_const", "code": "theorem ae_eq_const_or_norm_setIntegral_lt_of_norm_le_const [StrictConvexSpace ℝ E] (ht : μ t ≠ ∞)\n (h_le : ∀ᵐ x ∂μ.restrict t, ‖f x‖ ≤ C) :\n f =ᵐ[μ.restrict t] const α (⨍ x in t, f x ∂μ) ∨ ‖∫ x in t, f x ∂μ‖ < (μ t).toReal * C", "start": [ 356, 1 ], "end": [ 364, 62 ], "kind": "commanddeclaration" } ]
Mathlib/FieldTheory/ChevalleyWarning.lean
[ ".lake/packages/lean4/src/lean/Init.lean", "Mathlib/FieldTheory/Finite/Basic.lean" ]
[ { "full_name": "MvPolynomial.sum_eval_eq_zero", "code": "theorem MvPolynomial.sum_eval_eq_zero (f : MvPolynomial σ K)\n (h : f.totalDegree < (q - 1) * Fintype.card σ) : ∑ x, eval x f = 0", "start": [ 53, 1 ], "end": [ 97, 48 ], "kind": "commanddeclaration" }, { "full_name": "char_dvd_card_solutions_of_sum_lt", "code": "theorem char_dvd_card_solutions_of_sum_lt {s : Finset ι} {f : ι → MvPolynomial σ K}\n (h : (∑ i ∈ s, (f i).totalDegree) < Fintype.card σ) :\n p ∣ Fintype.card { x : σ → K // ∀ i ∈ s, eval x (f i) = 0 }", "start": [ 102, 1 ], "end": [ 160, 59 ], "kind": "commanddeclaration" }, { "full_name": "char_dvd_card_solutions_of_fintype_sum_lt", "code": "theorem char_dvd_card_solutions_of_fintype_sum_lt [Fintype ι] {f : ι → MvPolynomial σ K}\n (h : (∑ i, (f i).totalDegree) < Fintype.card σ) :\n p ∣ Fintype.card { x : σ → K // ∀ i, eval x (f i) = 0 }", "start": [ 163, 1 ], "end": [ 171, 52 ], "kind": "commanddeclaration" }, { "full_name": "char_dvd_card_solutions", "code": "theorem char_dvd_card_solutions {f : MvPolynomial σ K} (h : f.totalDegree < Fintype.card σ) :\n p ∣ Fintype.card { x : σ → K // eval x f = 0 }", "start": [ 174, 1 ], "end": [ 188, 8 ], "kind": "commanddeclaration" }, { "full_name": "char_dvd_card_solutions_of_add_lt", "code": "theorem char_dvd_card_solutions_of_add_lt {f₁ f₂ : MvPolynomial σ K}\n (h : f₁.totalDegree + f₂.totalDegree < Fintype.card σ) :\n p ∣ Fintype.card { x : σ → K // eval x f₁ = 0 ∧ eval x f₂ = 0 }", "start": [ 191, 1 ], "end": [ 201, 87 ], "kind": "commanddeclaration" } ]
Mathlib/CategoryTheory/Adjunction/AdjointFunctorTheorems.lean
[ "Mathlib/CategoryTheory/Limits/Constructions/WeaklyInitial.lean", ".lake/packages/lean4/src/lean/Init.lean", "Mathlib/CategoryTheory/Generator.lean", "Mathlib/CategoryTheory/Subobject/Comma.lean", "Mathlib/CategoryTheory/Limits/ConeCategory.lean", "Mathlib/CategoryTheory/Limits/FunctorCategory.lean" ]
[ { "full_name": "CategoryTheory.SolutionSetCondition", "code": "def SolutionSetCondition {D : Type u} [Category.{v} D] (G : D ⥤ C) : Prop :=\n ∀ A : C,\n ∃ (ι : Type v) (B : ι → D) (f : ∀ i : ι, A ⟶ G.obj (B i)),\n ∀ (X) (h : A ⟶ G.obj X), ∃ (i : ι) (g : B i ⟶ X), f i ≫ G.map g = h", "start": [ 49, 1 ], "end": [ 60, 74 ], "kind": "commanddeclaration" }, { "full_name": "CategoryTheory.solutionSetCondition_of_isRightAdjoint", "code": "theorem solutionSetCondition_of_isRightAdjoint [G.IsRightAdjoint] : SolutionSetCondition G", "start": [ 68, 1 ], "end": [ 75, 58 ], "kind": "commanddeclaration" }, { "full_name": "CategoryTheory.isRightAdjoint_of_preservesLimits_of_solutionSetCondition", "code": "lemma isRightAdjoint_of_preservesLimits_of_solutionSetCondition [HasLimits D]\n [PreservesLimits G] (hG : SolutionSetCondition G) : G.IsRightAdjoint := by\n refine @isRightAdjointOfStructuredArrowInitials _ _ _ _ G ?_\n intro A\n specialize hG A\n choose ι B f g using hG\n let B' : ι → StructuredArrow A G := fun i => StructuredArrow.mk (f i)\n have hB' : ∀ A' : StructuredArrow A G, ∃ i, Nonempty (B' i ⟶ A') := by\n intro A'\n obtain ⟨i, _, t⟩ := g _ A'.hom\n exact ⟨i, ⟨StructuredArrow.homMk _ t⟩⟩\n obtain ⟨T, hT⟩ := has_weakly_initial_of_weakly_initial_set_and_hasProducts hB'\n apply hasInitial_of_weakly_initial_and_hasWideEqualizers hT", "start": [ 78, 1 ], "end": [ 93, 62 ], "kind": "lemma" }, { "full_name": "CategoryTheory.isRightAdjoint_of_preservesLimits_of_isCoseparating", "code": "lemma isRightAdjoint_of_preservesLimits_of_isCoseparating [HasLimits D] [WellPowered D]\n {𝒢 : Set D} [Small.{v} 𝒢] (h𝒢 : IsCoseparating 𝒢) (G : D ⥤ C) [PreservesLimits G] :\n G.IsRightAdjoint :=\n have : ∀ A, HasInitial (StructuredArrow A G) := fun A =>\n hasInitial_of_isCoseparating (StructuredArrow.isCoseparating_proj_preimage A G h𝒢)\n isRightAdjointOfStructuredArrowInitials _", "start": [ 102, 1 ], "end": [ 110, 44 ], "kind": "lemma" }, { "full_name": "CategoryTheory.isLeftAdjoint_of_preservesColimits_of_isSeparating", "code": "lemma isLeftAdjoint_of_preservesColimits_of_isSeparating [HasColimits C] [WellPowered Cᵒᵖ]\n {𝒢 : Set C} [Small.{v} 𝒢] (h𝒢 : IsSeparating 𝒢) (F : C ⥤ D) [PreservesColimits F] :\n F.IsLeftAdjoint :=\n have : ∀ A, HasTerminal (CostructuredArrow F A) := fun A =>\n hasTerminal_of_isSeparating (CostructuredArrow.isSeparating_proj_preimage F A h𝒢)\n isLeftAdjoint_of_costructuredArrowTerminals _", "start": [ 113, 1 ], "end": [ 121, 48 ], "kind": "lemma" }, { "full_name": "CategoryTheory.Limits.hasColimits_of_hasLimits_of_isCoseparating", "code": "theorem hasColimits_of_hasLimits_of_isCoseparating [HasLimits C] [WellPowered C] {𝒢 : Set C}\n [Small.{v} 𝒢] (h𝒢 : IsCoseparating 𝒢) : HasColimits C", "start": [ 128, 1 ], "end": [ 134, 69 ], "kind": "commanddeclaration" }, { "full_name": "CategoryTheory.Limits.hasLimits_of_hasColimits_of_isSeparating", "code": "theorem hasLimits_of_hasColimits_of_isSeparating [HasColimits C] [WellPowered Cᵒᵖ] {𝒢 : Set C}\n [Small.{v} 𝒢] (h𝒢 : IsSeparating 𝒢) : HasLimits C", "start": [ 137, 1 ], "end": [ 143, 68 ], "kind": "commanddeclaration" } ]