Context
stringlengths
57
6.04k
file_name
stringlengths
21
79
start
int64
14
1.49k
end
int64
18
1.5k
theorem
stringlengths
25
1.55k
proof
stringlengths
5
7.36k
goals
listlengths
0
224
goals_before
listlengths
0
221
import Mathlib.CategoryTheory.Monoidal.Braided.Basic import Mathlib.CategoryTheory.Monoidal.OfChosenFiniteProducts.Basic #align_import category_theory.monoidal.of_chosen_finite_products.symmetric from "leanprover-community/mathlib"@"95a87616d63b3cb49d3fe678d416fbe9c4217bf4" universe v u namespace CategoryTheory ...
Mathlib/CategoryTheory/Monoidal/OfChosenFiniteProducts/Symmetric.lean
42
54
theorem hexagon_forward (X Y Z : C) : (BinaryFan.associatorOfLimitCone ℬ X Y Z).hom ≫ (Limits.BinaryFan.braiding (ℬ X (tensorObj ℬ Y Z)).isLimit (ℬ (tensorObj ℬ Y Z) X).isLimit).hom ≫ (BinaryFan.associatorOfLimitCone ℬ Y Z X).hom = tensorHom ℬ (Limits.BinaryFan.braiding (ℬ X Y)...
dsimp [tensorHom, Limits.BinaryFan.braiding] apply (ℬ _ _).isLimit.hom_ext; rintro ⟨⟨⟩⟩ · dsimp [Limits.IsLimit.conePointUniqueUpToIso]; simp · apply (ℬ _ _).isLimit.hom_ext rintro ⟨⟨⟩⟩ <;> · dsimp [Limits.IsLimit.conePointUniqueUpToIso]; simp
[ " tensorHom ℬ f g ≫ (BinaryFan.braiding (ℬ Y Y').isLimit (ℬ Y' Y).isLimit).hom =\n (BinaryFan.braiding (ℬ X X').isLimit (ℬ X' X).isLimit).hom ≫ tensorHom ℬ g f", " (ℬ Y Y').isLimit.lift (BinaryFan.mk (BinaryFan.fst (ℬ X X').cone ≫ f) (BinaryFan.snd (ℬ X X').cone ≫ g)) ≫\n ((ℬ Y Y').isLimit.conePointUnique...
[ " tensorHom ℬ f g ≫ (BinaryFan.braiding (ℬ Y Y').isLimit (ℬ Y' Y).isLimit).hom =\n (BinaryFan.braiding (ℬ X X').isLimit (ℬ X' X).isLimit).hom ≫ tensorHom ℬ g f", " (ℬ Y Y').isLimit.lift (BinaryFan.mk (BinaryFan.fst (ℬ X X').cone ≫ f) (BinaryFan.snd (ℬ X X').cone ≫ g)) ≫\n ((ℬ Y Y').isLimit.conePointUnique...
import Mathlib.Order.Monotone.Odd import Mathlib.Analysis.SpecialFunctions.ExpDeriv import Mathlib.Analysis.SpecialFunctions.Trigonometric.Basic #align_import analysis.special_functions.trigonometric.deriv from "leanprover-community/mathlib"@"2c1d8ca2812b64f88992a5294ea3dba144755cd1" noncomputable section open s...
Mathlib/Analysis/SpecialFunctions/Trigonometric/Deriv.lean
103
107
theorem hasStrictDerivAt_sinh (x : ℂ) : HasStrictDerivAt sinh (cosh x) x := by
simp only [cosh, div_eq_mul_inv] convert ((hasStrictDerivAt_exp x).sub (hasStrictDerivAt_id x).neg.cexp).mul_const (2 : ℂ)⁻¹ using 1 rw [id, mul_neg_one, sub_eq_add_neg, neg_neg]
[ " HasStrictDerivAt sin x.cos x", " HasStrictDerivAt sin ((cexp (x * I) + cexp (-x * I)) * 2⁻¹) x", " (cexp (x * I) + cexp (-x * I)) * 2⁻¹ = (cexp (-id x * I) * (-1 * I) - cexp (id x * I) * (1 * I)) * I * 2⁻¹", " (cexp (x * I) + cexp (-x * I)) * 2⁻¹ = (cexp (-x * I) * (-1 * I) - cexp (x * I) * (1 * I)) * I * 2...
[ " HasStrictDerivAt sin x.cos x", " HasStrictDerivAt sin ((cexp (x * I) + cexp (-x * I)) * 2⁻¹) x", " (cexp (x * I) + cexp (-x * I)) * 2⁻¹ = (cexp (-id x * I) * (-1 * I) - cexp (id x * I) * (1 * I)) * I * 2⁻¹", " (cexp (x * I) + cexp (-x * I)) * 2⁻¹ = (cexp (-x * I) * (-1 * I) - cexp (x * I) * (1 * I)) * I * 2...
import Mathlib.RingTheory.Valuation.Basic import Mathlib.RingTheory.Ideal.QuotientOperations #align_import ring_theory.valuation.quotient from "leanprover-community/mathlib"@"da420a8c6dd5bdfb85c4ced85c34388f633bc6ff" namespace Valuation variable {R Γ₀ : Type*} [CommRing R] [LinearOrderedCommMonoidWithZero Γ₀] va...
Mathlib/RingTheory/Valuation/Quotient.lean
77
79
theorem supp_quot_supp : supp (v.onQuot le_rfl) = 0 := by
rw [supp_quot] exact Ideal.map_quotient_self _
[ " v a = v (b + -(-a + b))", " J ≤ (comap (Ideal.Quotient.mk J) v).supp", " Ideal.map (Ideal.Quotient.mk J) J ≤ v.supp", " ∀ (r : R ⧸ J), ((comap (Ideal.Quotient.mk J) v).onQuot ⋯) r = v r", " ((comap (Ideal.Quotient.mk J) v).onQuot ⋯) (Quot.mk Setoid.r x) = v (Quot.mk Setoid.r x)", " (v.onQuot hJ).supp = ...
[ " v a = v (b + -(-a + b))", " J ≤ (comap (Ideal.Quotient.mk J) v).supp", " Ideal.map (Ideal.Quotient.mk J) J ≤ v.supp", " ∀ (r : R ⧸ J), ((comap (Ideal.Quotient.mk J) v).onQuot ⋯) r = v r", " ((comap (Ideal.Quotient.mk J) v).onQuot ⋯) (Quot.mk Setoid.r x) = v (Quot.mk Setoid.r x)", " (v.onQuot hJ).supp = ...
import Mathlib.MeasureTheory.Integral.SetToL1 #align_import measure_theory.integral.bochner from "leanprover-community/mathlib"@"48fb5b5280e7c81672afc9524185ae994553ebf4" assert_not_exists Differentiable noncomputable section open scoped Topology NNReal ENNReal MeasureTheory open Set Filter TopologicalSpace EN...
Mathlib/MeasureTheory/Integral/Bochner.lean
229
231
theorem weightedSMul_smul [NormedField 𝕜] [NormedSpace 𝕜 F] [SMulCommClass ℝ 𝕜 F] (c : 𝕜) (s : Set α) (x : F) : weightedSMul μ s (c • x) = c • weightedSMul μ s x := by
simp_rw [weightedSMul_apply, smul_comm]
[ " (weightedSMul μ s) x = (μ s).toReal • x", " weightedSMul 0 = 0", " weightedSMul 0 x✝ = 0 x✝", " weightedSMul μ ∅ = 0", " (weightedSMul μ ∅) x = 0 x", " (μ ∅).toReal • x = 0 x", " weightedSMul (μ + ν) s = weightedSMul μ s + weightedSMul ν s", " (weightedSMul (μ + ν) s) x = (weightedSMul μ s + weighte...
[ " (weightedSMul μ s) x = (μ s).toReal • x", " weightedSMul 0 = 0", " weightedSMul 0 x✝ = 0 x✝", " weightedSMul μ ∅ = 0", " (weightedSMul μ ∅) x = 0 x", " (μ ∅).toReal • x = 0 x", " weightedSMul (μ + ν) s = weightedSMul μ s + weightedSMul ν s", " (weightedSMul (μ + ν) s) x = (weightedSMul μ s + weighte...
import Mathlib.Algebra.Order.Ring.Abs import Mathlib.Combinatorics.SimpleGraph.Coloring import Mathlib.Combinatorics.SimpleGraph.Hasse import Mathlib.Order.OmegaCompletePartialOrder namespace SimpleGraph def pathGraph.bicoloring (n : ℕ) : Coloring (pathGraph n) Bool := Coloring.mk (fun u ↦ u.val % 2 = 0) <|...
Mathlib/Combinatorics/SimpleGraph/ConcreteColorings.lean
43
49
theorem chromaticNumber_pathGraph (n : ℕ) (h : 2 ≤ n) : (pathGraph n).chromaticNumber = 2 := by
have hc := (pathGraph.bicoloring n).colorable apply le_antisymm · exact hc.chromaticNumber_le · simpa only [pathGraph_two_eq_top, chromaticNumber_top] using chromaticNumber_mono_of_embedding (pathGraph_two_embedding n h)
[ " ∀ {v w : Fin n}, (pathGraph n).Adj v w → (fun u => decide (↑u % 2 = 0)) v ≠ (fun u => decide (↑u % 2 = 0)) w", " (pathGraph n).Adj u v → (fun u => decide (↑u % 2 = 0)) u ≠ (fun u => decide (↑u % 2 = 0)) v", " ↑u + 1 = ↑v ∨ ↑v + 1 = ↑u → (fun u => decide (↑u % 2 = 0)) u ≠ (fun u => decide (↑u % 2 = 0)) v", "...
[ " ∀ {v w : Fin n}, (pathGraph n).Adj v w → (fun u => decide (↑u % 2 = 0)) v ≠ (fun u => decide (↑u % 2 = 0)) w", " (pathGraph n).Adj u v → (fun u => decide (↑u % 2 = 0)) u ≠ (fun u => decide (↑u % 2 = 0)) v", " ↑u + 1 = ↑v ∨ ↑v + 1 = ↑u → (fun u => decide (↑u % 2 = 0)) u ≠ (fun u => decide (↑u % 2 = 0)) v", "...
import Mathlib.Data.Multiset.Bind #align_import data.multiset.fold from "leanprover-community/mathlib"@"9003f28797c0664a49e4179487267c494477d853" namespace Multiset variable {α β : Type*} section Fold variable (op : α → α → α) [hc : Std.Commutative op] [ha : Std.Associative op] local notation a " * " b => ...
Mathlib/Data/Multiset/Fold.lean
71
72
theorem fold_cons'_left (b a : α) (s : Multiset α) : (a ::ₘ s).fold op b = s.fold op (a * b) := by
rw [fold_cons'_right, hc.comm]
[ " List.foldl (fun x y => op y x) b l = List.foldl op b l", " fold op b (a ::ₘ s) = op (fold op b s) a", " fold op b (a ::ₘ s) = fold op (op b a) s", " fold op b (a ::ₘ s) = fold op (op a b) s" ]
[ " List.foldl (fun x y => op y x) b l = List.foldl op b l", " fold op b (a ::ₘ s) = op (fold op b s) a", " fold op b (a ::ₘ s) = fold op (op b a) s", " fold op b (a ::ₘ s) = fold op (op a b) s" ]
import Mathlib.Data.Matrix.Basic import Mathlib.LinearAlgebra.Matrix.Trace #align_import data.matrix.basis from "leanprover-community/mathlib"@"320df450e9abeb5fc6417971e75acb6ae8bc3794" variable {l m n : Type*} variable {R α : Type*} namespace Matrix open Matrix variable [DecidableEq l] [DecidableEq m] [Decida...
Mathlib/Data/Matrix/Basis.lean
37
41
theorem smul_stdBasisMatrix [SMulZeroClass R α] (r : R) (i : m) (j : n) (a : α) : r • stdBasisMatrix i j a = stdBasisMatrix i j (r • a) := by
unfold stdBasisMatrix ext simp [smul_ite]
[ " r • stdBasisMatrix i j a = stdBasisMatrix i j (r • a)", " (r • fun i' j' => if i = i' ∧ j = j' then a else 0) = fun i' j' => if i = i' ∧ j = j' then r • a else 0", " (r • fun i' j' => if i = i' ∧ j = j' then a else 0) i✝ j✝ = if i = i✝ ∧ j = j✝ then r • a else 0" ]
[ " r • stdBasisMatrix i j a = stdBasisMatrix i j (r • a)" ]
import Mathlib.Data.List.OfFn import Mathlib.Data.List.Nodup import Mathlib.Data.List.Infix #align_import data.list.sort from "leanprover-community/mathlib"@"f694c7dead66f5d4c80f446c796a5aad14707f0e" open List.Perm universe u namespace List section Sorted variable {α : Type u} {r : α → α → Prop} {a : α} {l...
Mathlib/Data/List/Sort.lean
87
92
theorem Sorted.le_head! [Inhabited α] [Preorder α] {a : α} {l : List α} (h : Sorted (· > ·) l) (ha : a ∈ l) : a ≤ l.head! := by
rw [← List.cons_head!_tail (List.ne_nil_of_mem ha)] at h ha cases ha · exact le_rfl · exact le_of_lt (rel_of_sorted_cons h a (by assumption))
[ " Pairwise (fun x x_1 => x_1 ≠ x) l", " Pairwise (fun x x_1 => x ≠ x_1) l", " l.head! ≤ a", " l.head! ≤ l.head!", " a ∈ l.tail", " a ≤ l.head!" ]
[ " Pairwise (fun x x_1 => x_1 ≠ x) l", " Pairwise (fun x x_1 => x ≠ x_1) l", " l.head! ≤ a", " l.head! ≤ l.head!", " a ∈ l.tail", " a ≤ l.head!" ]
import Mathlib.Data.Matrix.Block import Mathlib.Data.Matrix.Notation import Mathlib.Data.Matrix.RowCol import Mathlib.GroupTheory.GroupAction.Ring import Mathlib.GroupTheory.Perm.Fin import Mathlib.LinearAlgebra.Alternating.Basic #align_import linear_algebra.matrix.determinant from "leanprover-community/mathlib"@"c30...
Mathlib/LinearAlgebra/Matrix/Determinant/Basic.lean
112
113
theorem det_unique {n : Type*} [Unique n] [DecidableEq n] [Fintype n] (A : Matrix n n R) : det A = A default default := by
simp [det_apply, univ_unique]
[ " M.det = ∑ σ : Perm n, ↑↑(sign σ) * ∏ i : n, M (σ i) i", " (diagonal d).det = ∏ i : n, d i", " ∑ σ : Perm n, ↑↑(sign σ) * ∏ i : n, diagonal d (σ i) i = ∏ i : n, d i", " ∀ b ∈ univ, b ≠ 1 → ↑↑(sign b) * ∏ i : n, diagonal d (b i) i = 0", " ↑↑(sign σ) * ∏ i : n, diagonal d (σ i) i = 0", " ∏ i : n, diagonal ...
[ " M.det = ∑ σ : Perm n, ↑↑(sign σ) * ∏ i : n, M (σ i) i", " (diagonal d).det = ∏ i : n, d i", " ∑ σ : Perm n, ↑↑(sign σ) * ∏ i : n, diagonal d (σ i) i = ∏ i : n, d i", " ∀ b ∈ univ, b ≠ 1 → ↑↑(sign b) * ∏ i : n, diagonal d (b i) i = 0", " ↑↑(sign σ) * ∏ i : n, diagonal d (σ i) i = 0", " ∏ i : n, diagonal ...
import Mathlib.Geometry.Manifold.ChartedSpace #align_import geometry.manifold.local_invariant_properties from "leanprover-community/mathlib"@"431589bce478b2229eba14b14a283250428217db" noncomputable section open scoped Classical open Manifold Topology open Set Filter TopologicalSpace variable {H M H' M' X : Typ...
Mathlib/Geometry/Manifold/LocalInvariantProperties.lean
82
85
theorem congr_set {s t : Set H} {x : H} {f : H → H'} (hu : s =ᶠ[𝓝 x] t) : P f s x ↔ P f t x := by
obtain ⟨o, host, ho, hxo⟩ := mem_nhds_iff.mp hu.mem_iff simp_rw [subset_def, mem_setOf, ← and_congr_left_iff, ← mem_inter_iff, ← Set.ext_iff] at host rw [hG.is_local ho hxo, host, ← hG.is_local ho hxo]
[ " P f s x ↔ P f t x" ]
[ " P f s x ↔ P f t x" ]
import Mathlib.RingTheory.HahnSeries.Addition import Mathlib.Algebra.Algebra.Subalgebra.Basic import Mathlib.Data.Finset.MulAntidiagonal #align_import ring_theory.hahn_series from "leanprover-community/mathlib"@"a484a7d0eade4e1268f4fb402859b6686037f965" set_option linter.uppercaseLean3 false open Finset Function ...
Mathlib/RingTheory/HahnSeries/Multiplication.lean
152
161
theorem smul_coeff_right [SMulZeroClass R W] {x : HahnSeries Γ R} {y : HahnModule Γ R W} {a : Γ} {s : Set Γ} (hs : s.IsPWO) (hys : ((of R).symm y).support ⊆ s) : ((of R).symm <| x • y).coeff a = ∑ ij ∈ addAntidiagonal x.isPWO_support hs a, x.coeff ij.fst • ((of R).symm y).coeff ij.snd := by
rw [smul_coeff] apply sum_subset_zero_on_sdiff (addAntidiagonal_mono_right hys) _ fun _ _ => rfl intro b hb simp only [not_and, mem_sdiff, mem_addAntidiagonal, HahnSeries.mem_support, not_imp_not] at hb rw [hb.2 hb.1.1 hb.1.2.2, smul_zero]
[ " {a | ∑ ij ∈ addAntidiagonal ⋯ ⋯ a, x.coeff ij.1 • y.coeff ij.2 ≠ 0} ⊆ {a | (addAntidiagonal ⋯ ⋯ a).Nonempty}", " a ∈ {a | (addAntidiagonal ⋯ ⋯ a).Nonempty}", " a ∉ {a | ∑ ij ∈ addAntidiagonal ⋯ ⋯ a, x.coeff ij.1 • y.coeff ij.2 ≠ 0}", " x • 0 = 0", " ((of R).symm (x • 0)).coeff x✝ = ((of R).symm 0).coeff x...
[ " {a | ∑ ij ∈ addAntidiagonal ⋯ ⋯ a, x.coeff ij.1 • y.coeff ij.2 ≠ 0} ⊆ {a | (addAntidiagonal ⋯ ⋯ a).Nonempty}", " a ∈ {a | (addAntidiagonal ⋯ ⋯ a).Nonempty}", " a ∉ {a | ∑ ij ∈ addAntidiagonal ⋯ ⋯ a, x.coeff ij.1 • y.coeff ij.2 ≠ 0}", " x • 0 = 0", " ((of R).symm (x • 0)).coeff x✝ = ((of R).symm 0).coeff x...
import Mathlib.Algebra.Module.Defs import Mathlib.Data.Fintype.BigOperators import Mathlib.GroupTheory.GroupAction.BigOperators #align_import algebra.module.big_operators from "leanprover-community/mathlib"@"509de852e1de55e1efa8eacfa11df0823f26f226" variable {ι κ α β R M : Type*} section AddCommMonoid variable [...
Mathlib/Algebra/Module/BigOperators.lean
41
45
theorem Finset.sum_smul_sum {f : α → R} {g : β → M} {s : Finset α} {t : Finset β} : ((∑ i ∈ s, f i) • ∑ i ∈ t, g i) = ∑ p ∈ s ×ˢ t, f p.fst • g p.snd := by
rw [Finset.sum_product, Finset.sum_smul, Finset.sum_congr rfl] intros rw [Finset.smul_sum]
[ " s.sum • t.sum = (map (fun p => p.1 • p.2) (s ×ˢ t)).sum", " sum 0 • t.sum = (map (fun p => p.1 • p.2) (0 ×ˢ t)).sum", " (a ::ₘ s).sum • t.sum = (map (fun p => p.1 • p.2) ((a ::ₘ s) ×ˢ t)).sum", " (∑ i ∈ s, f i) • ∑ i ∈ t, g i = ∑ p ∈ s ×ˢ t, f p.1 • g p.2", " ∀ x ∈ s, f x • ∑ i ∈ t, g i = ∑ y ∈ t, f (x, y...
[ " s.sum • t.sum = (map (fun p => p.1 • p.2) (s ×ˢ t)).sum", " sum 0 • t.sum = (map (fun p => p.1 • p.2) (0 ×ˢ t)).sum", " (a ::ₘ s).sum • t.sum = (map (fun p => p.1 • p.2) ((a ::ₘ s) ×ˢ t)).sum", " (∑ i ∈ s, f i) • ∑ i ∈ t, g i = ∑ p ∈ s ×ˢ t, f p.1 • g p.2" ]
import Mathlib.RingTheory.MvPowerSeries.Basic import Mathlib.RingTheory.Ideal.LocalRing #align_import ring_theory.power_series.basic from "leanprover-community/mathlib"@"2d5739b61641ee4e7e53eca5688a08f66f2e6a60" noncomputable section open Finset (antidiagonal mem_antidiagonal) namespace MvPowerSeries open Fi...
Mathlib/RingTheory/MvPowerSeries/Inverse.lean
101
104
theorem constantCoeff_invOfUnit (φ : MvPowerSeries σ R) (u : Rˣ) : constantCoeff σ R (invOfUnit φ u) = ↑u⁻¹ := by
classical rw [← coeff_zero_eq_constantCoeff_apply, coeff_invOfUnit, if_pos rfl]
[ " inv.aux a φ n =\n if n = 0 then a else -a * ∑ x ∈ antidiagonal n, if x.2 < n then (coeff R x.1) φ * (coeff R x.2) (inv.aux a φ) else 0", " (if n = 0 then a else -a * ∑ x ∈ antidiagonal n, if x_1 : x.2 < n then (coeff R x.1) φ * inv.aux a φ x.2 else 0) =\n if n = 0 then a else -a * ∑ x ∈ antidiagonal n, if...
[ " inv.aux a φ n =\n if n = 0 then a else -a * ∑ x ∈ antidiagonal n, if x.2 < n then (coeff R x.1) φ * (coeff R x.2) (inv.aux a φ) else 0", " (if n = 0 then a else -a * ∑ x ∈ antidiagonal n, if x_1 : x.2 < n then (coeff R x.1) φ * inv.aux a φ x.2 else 0) =\n if n = 0 then a else -a * ∑ x ∈ antidiagonal n, if...
import Mathlib.Algebra.Polynomial.Cardinal import Mathlib.Algebra.MvPolynomial.Cardinal import Mathlib.Data.ZMod.Algebra import Mathlib.FieldTheory.IsAlgClosed.Basic import Mathlib.RingTheory.AlgebraicIndependent #align_import field_theory.is_alg_closed.classification from "leanprover-community/mathlib"@"0723536a0522...
Mathlib/FieldTheory/IsAlgClosed/Classification.lean
41
59
theorem cardinal_mk_le_sigma_polynomial : #L ≤ #(Σ p : R[X], { x : L // x ∈ p.aroots L }) := @mk_le_of_injective L (Σ p : R[X], {x : L | x ∈ p.aroots L}) (fun x : L => let p := Classical.indefiniteDescription _ (Algebra.IsAlgebraic.isAlgebraic x) ⟨p.1, x, by dsimp have h : p.1.map ...
rw [Ne, ← Polynomial.degree_eq_bot, Polynomial.degree_map_eq_of_injective (NoZeroSMulDivisors.algebraMap_injective R L), Polynomial.degree_eq_bot] exact p.2.1 erw [Polynomial.mem_roots h, Polynomial.IsRoot, Polynomial.eval_map, ← Polynomial.aeval_def, p.2.2...
[ " x ∈ {x_1 | x_1 ∈ (↑p).aroots L}", " x ∈ (↑p).aroots L", " Polynomial.map (algebraMap R L) ↑p ≠ 0", " ¬↑p = 0", " (fun x =>\n let p := Classical.indefiniteDescription (fun x_1 => x_1 ≠ 0 ∧ (Polynomial.aeval x) x_1 = 0) ⋯;\n ⟨↑p, ⟨x, ⋯⟩⟩)\n x =\n (fun x =>\n let p := C...
[ " x ∈ {x_1 | x_1 ∈ (↑p).aroots L}", " x ∈ (↑p).aroots L", " Polynomial.map (algebraMap R L) ↑p ≠ 0" ]
import Mathlib.Analysis.Normed.Group.Hom import Mathlib.Analysis.Normed.Group.Completion #align_import analysis.normed.group.hom_completion from "leanprover-community/mathlib"@"17ef379e997badd73e5eabb4d38f11919ab3c4b3" noncomputable section open Set NormedAddGroupHom UniformSpace section Completion variable {G...
Mathlib/Analysis/Normed/Group/HomCompletion.lean
100
104
theorem NormedAddGroupHom.completion_id : (NormedAddGroupHom.id G).completion = NormedAddGroupHom.id (Completion G) := by
ext x rw [NormedAddGroupHom.completion_def, NormedAddGroupHom.coe_id, Completion.map_id] rfl
[ " (id G).completion = id (Completion G)", " (id G).completion x = (id (Completion G)) x", " _root_.id x = (id (Completion G)) x" ]
[ " (id G).completion = id (Completion G)" ]
import Mathlib.Order.BooleanAlgebra import Mathlib.Logic.Equiv.Basic #align_import order.symm_diff from "leanprover-community/mathlib"@"6eb334bd8f3433d5b08ba156b8ec3e6af47e1904" open Function OrderDual variable {ι α β : Type*} {π : ι → Type*} def symmDiff [Sup α] [SDiff α] (a b : α) : α := a \ b ⊔ b \ a #ali...
Mathlib/Order/SymmDiff.lean
176
180
theorem symmDiff_sdiff_eq_sup : a ∆ (b \ a) = a ⊔ b := by
rw [symmDiff, sdiff_idem] exact le_antisymm (sup_le_sup sdiff_le sdiff_le) (sup_le le_sdiff_sup <| le_sdiff_sup.trans <| sup_le le_sup_right le_sdiff_sup)
[ " ∀ (p q : Bool), p ∆ q = xor p q", " a ∆ b = b ∆ a", " a ∆ a = ⊥", " a ∆ ⊥ = a", " ⊥ ∆ a = a", " a ∆ b = ⊥ ↔ a = b", " a ∆ b = b \\ a", " a ∆ b = a \\ b", " a ∆ b ≤ c ↔ a ≤ b ⊔ c ∧ b ≤ a ⊔ c", " a ∆ b = (a ⊔ b) \\ (a ⊓ b)", " a ∆ b = a ⊔ b", " a ∆ b \\ c = a \\ (b ⊔ c) ⊔ b \\ (a ⊔ c)", " a ...
[ " ∀ (p q : Bool), p ∆ q = xor p q", " a ∆ b = b ∆ a", " a ∆ a = ⊥", " a ∆ ⊥ = a", " ⊥ ∆ a = a", " a ∆ b = ⊥ ↔ a = b", " a ∆ b = b \\ a", " a ∆ b = a \\ b", " a ∆ b ≤ c ↔ a ≤ b ⊔ c ∧ b ≤ a ⊔ c", " a ∆ b = (a ⊔ b) \\ (a ⊓ b)", " a ∆ b = a ⊔ b", " a ∆ b \\ c = a \\ (b ⊔ c) ⊔ b \\ (a ⊔ c)", " a ...
import Mathlib.Dynamics.Flow import Mathlib.Tactic.Monotonicity #align_import dynamics.omega_limit from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982" open Set Function Filter Topology section omegaLimit variable {τ : Type*} {α : Type*} {β : Type*} {ι : Type*} def omegaLimit [Topol...
Mathlib/Dynamics/OmegaLimit.lean
108
109
theorem omegaLimit_image_eq {α' : Type*} (ϕ : τ → α' → β) (f : Filter τ) (g : α → α') : ω f ϕ (g '' s) = ω f (fun t x ↦ ϕ t (g x)) s := by
simp only [omegaLimit, image2_image_right]
[ " ω f₁ (fun t x => ϕ (m t) x) s ⊆ ω f₂ ϕ s", " closure (image2 (fun t x => ϕ (m t) x) (m ⁻¹' u) s) ⊆ closure (image2 ϕ u s)", " closure (image2 ϕ ((fun t => m t) '' (m ⁻¹' u)) s) ⊆ closure (image2 ϕ u s)", " MapsTo gb (ω f ϕ s) (ω f ϕ' s')", " ∀ ⦃x : β⦄, (∀ i ∈ f, x ∈ closure (image2 ϕ i s)) → ∀ i ∈ f, gb x...
[ " ω f₁ (fun t x => ϕ (m t) x) s ⊆ ω f₂ ϕ s", " closure (image2 (fun t x => ϕ (m t) x) (m ⁻¹' u) s) ⊆ closure (image2 ϕ u s)", " closure (image2 ϕ ((fun t => m t) '' (m ⁻¹' u)) s) ⊆ closure (image2 ϕ u s)", " MapsTo gb (ω f ϕ s) (ω f ϕ' s')", " ∀ ⦃x : β⦄, (∀ i ∈ f, x ∈ closure (image2 ϕ i s)) → ∀ i ∈ f, gb x...
import Mathlib.Dynamics.Ergodic.AddCircle import Mathlib.MeasureTheory.Covering.LiminfLimsup #align_import number_theory.well_approximable from "leanprover-community/mathlib"@"f0c8bf9245297a541f468be517f1bde6195105e9" open Set Filter Function Metric MeasureTheory open scoped MeasureTheory Topology Pointwise @[...
Mathlib/NumberTheory/WellApproximable.lean
174
180
theorem mem_approxAddOrderOf_iff {δ : ℝ} {x : UnitAddCircle} {n : ℕ} (hn : 0 < n) : x ∈ approxAddOrderOf UnitAddCircle n δ ↔ ∃ m < n, gcd m n = 1 ∧ ‖x - ↑((m : ℝ) / n)‖ < δ := by
simp only [mem_approx_add_orderOf_iff, mem_setOf_eq, ball, exists_prop, dist_eq_norm, AddCircle.addOrderOf_eq_pos_iff hn, mul_one] constructor · rintro ⟨y, ⟨m, hm₁, hm₂, rfl⟩, hx⟩; exact ⟨m, hm₁, hm₂, hx⟩ · rintro ⟨m, hm₁, hm₂, hx⟩; exact ⟨↑((m : ℝ) / n), ⟨m, hm₁, hm₂, rfl⟩, hx⟩
[ " a ∈ approxOrderOf A n δ ↔ ∃ b, orderOf b = n ∧ a ∈ ball b δ", " x ∈ approxAddOrderOf UnitAddCircle n δ ↔ ∃ m < n, gcd m n = 1 ∧ ‖x - ↑(↑m / ↑n)‖ < δ", " (∃ b, (∃ m < n, m.gcd n = 1 ∧ ↑(↑m / ↑n) = b) ∧ ‖x - b‖ < δ) ↔ ∃ m < n, gcd m n = 1 ∧ ‖x - ↑(↑m / ↑n)‖ < δ", " (∃ b, (∃ m < n, m.gcd n = 1 ∧ ↑(↑m / ↑n) = b...
[ " a ∈ approxOrderOf A n δ ↔ ∃ b, orderOf b = n ∧ a ∈ ball b δ", " x ∈ approxAddOrderOf UnitAddCircle n δ ↔ ∃ m < n, gcd m n = 1 ∧ ‖x - ↑(↑m / ↑n)‖ < δ" ]
import Mathlib.ModelTheory.Algebra.Ring.Basic import Mathlib.RingTheory.FreeCommRing namespace FirstOrder namespace Ring open Language variable {α : Type*} section attribute [local instance] compatibleRingOfRing private theorem exists_term_realize_eq_freeCommRing (p : FreeCommRing α) : ∃ t : Language.rin...
Mathlib/ModelTheory/Algebra/Ring/FreeCommRing.lean
54
63
theorem realize_termOfFreeCommRing (p : FreeCommRing α) (v : α → R) : (termOfFreeCommRing p).realize v = FreeCommRing.lift v p := by
let _ := compatibleRingOfRing (FreeCommRing α) rw [termOfFreeCommRing] conv_rhs => rw [← Classical.choose_spec (exists_term_realize_eq_freeCommRing p)] induction Classical.choose (exists_term_realize_eq_freeCommRing p) with | var _ => simp | func f a ih => cases f <;> simp [ih]
[ " Term.realize FreeCommRing.of (-1) = -1", " Term.realize FreeCommRing.of (var a) = FreeCommRing.of a", " Term.realize FreeCommRing.of (t₁ + t₂) = x + y", " Term.realize FreeCommRing.of (t₁ * t₂) = x * y", " Term.realize v (termOfFreeCommRing p) = (FreeCommRing.lift v) p", " Term.realize v (Classical.choo...
[ " Term.realize FreeCommRing.of (-1) = -1", " Term.realize FreeCommRing.of (var a) = FreeCommRing.of a", " Term.realize FreeCommRing.of (t₁ + t₂) = x + y", " Term.realize FreeCommRing.of (t₁ * t₂) = x * y", " Term.realize v (termOfFreeCommRing p) = (FreeCommRing.lift v) p" ]
import Mathlib.MeasureTheory.Constructions.BorelSpace.Order #align_import measure_theory.function.ae_measurable_order from "leanprover-community/mathlib"@"bf6a01357ff5684b1ebcd0f1a13be314fc82c0bf" open MeasureTheory Set TopologicalSpace open scoped Classical open ENNReal NNReal
Mathlib/MeasureTheory/Function/AEMeasurableOrder.lean
34
107
theorem MeasureTheory.aemeasurable_of_exist_almost_disjoint_supersets {α : Type*} {m : MeasurableSpace α} (μ : Measure α) {β : Type*} [CompleteLinearOrder β] [DenselyOrdered β] [TopologicalSpace β] [OrderTopology β] [SecondCountableTopology β] [MeasurableSpace β] [BorelSpace β] (s : Set β) (s_count : s.Coun...
haveI : Encodable s := s_count.toEncodable have h' : ∀ p q, ∃ u v, MeasurableSet u ∧ MeasurableSet v ∧ { x | f x < p } ⊆ u ∧ { x | q < f x } ⊆ v ∧ (p ∈ s → q ∈ s → p < q → μ (u ∩ v) = 0) := by intro p q by_cases H : p ∈ s ∧ q ∈ s ∧ p < q · rcases h p H.1 q H.2.1 H.2.2 with ⟨u, v, hu, hv, h'u, h'v...
[ " AEMeasurable f μ", " ∀ (p q : β),\n ∃ u v,\n MeasurableSet u ∧\n MeasurableSet v ∧ {x | f x < p} ⊆ u ∧ {x | q < f x} ⊆ v ∧ (p ∈ s → q ∈ s → p < q → μ (u ∩ v) = 0)", " ∃ u v,\n MeasurableSet u ∧ MeasurableSet v ∧ {x | f x < p} ⊆ u ∧ {x | q < f x} ⊆ v ∧ (p ∈ s → q ∈ s → p < q → μ (u ∩ v) = 0)"...
[ " AEMeasurable f μ" ]
import Mathlib.CategoryTheory.CofilteredSystem import Mathlib.Combinatorics.SimpleGraph.Subgraph #align_import combinatorics.simple_graph.finsubgraph from "leanprover-community/mathlib"@"c6ef6387ede9983aee397d442974e61f89dfd87b" open Set CategoryTheory universe u v variable {V : Type u} {W : Type v} {G : Simple...
Mathlib/Combinatorics/SimpleGraph/Finsubgraph.lean
119
153
theorem nonempty_hom_of_forall_finite_subgraph_hom [Finite W] (h : ∀ G' : G.Subgraph, G'.verts.Finite → G'.coe →g F) : Nonempty (G →g F) := by
-- Obtain a `Fintype` instance for `W`. cases nonempty_fintype W -- Establish the required interface instances. haveI : ∀ G' : G.Finsubgraphᵒᵖ, Nonempty ((finsubgraphHomFunctor G F).obj G') := fun G' => ⟨h G'.unop G'.unop.property⟩ haveI : ∀ G' : G.Finsubgraphᵒᵖ, Fintype ((finsubgraphHomFunctor G F).obj ...
[ " (G.singletonSubgraph v).verts.Finite", " (G.subgraphOfAdj e).verts.Finite", " singletonFinsubgraph u ≤ finsubgraphOfAdj e", " singletonFinsubgraph v ≤ finsubgraphOfAdj e", " G'' →fg F", " ∀ {a b : ↑(↑G'').verts},\n (↑G'').coe.Adj a b →\n F.Adj\n ((fun x =>\n match x with\n ...
[ " (G.singletonSubgraph v).verts.Finite", " (G.subgraphOfAdj e).verts.Finite", " singletonFinsubgraph u ≤ finsubgraphOfAdj e", " singletonFinsubgraph v ≤ finsubgraphOfAdj e", " G'' →fg F", " ∀ {a b : ↑(↑G'').verts},\n (↑G'').coe.Adj a b →\n F.Adj\n ((fun x =>\n match x with\n ...
import Mathlib.Data.Set.Lattice import Mathlib.Init.Set import Mathlib.Control.Basic import Mathlib.Lean.Expr.ExtraRecognizers #align_import data.set.functor from "leanprover-community/mathlib"@"207cfac9fcd06138865b5d04f7091e46d9320432" universe u open Function namespace Set variable {α β : Type u} {s : Set α} ...
Mathlib/Data/Set/Functor.lean
96
97
theorem mem_of_mem_coe {a : α} (ha : a ∈ (γ : Set α)) : ⟨a, coe_subset ha⟩ ∈ γ := by
rcases ha with ⟨_, ⟨_, rfl⟩, _, ⟨ha, rfl⟩, _⟩; convert ha
[ " image2 f s t = Seq.seq (f <$> s) fun x => t", " x✝ ∈ image2 f s t ↔ x✝ ∈ Seq.seq (f <$> s) fun x => t", " x✝² >>= x✝¹ >>= x✝ = x✝² >>= fun x => x✝¹ x >>= x✝", " (do\n let a ← γ\n pure ↑a) ⊆\n β", " a✝ ∈ β", " ⟨a, ⋯⟩ ∈ γ" ]
[ " image2 f s t = Seq.seq (f <$> s) fun x => t", " x✝ ∈ image2 f s t ↔ x✝ ∈ Seq.seq (f <$> s) fun x => t", " x✝² >>= x✝¹ >>= x✝ = x✝² >>= fun x => x✝¹ x >>= x✝", " (do\n let a ← γ\n pure ↑a) ⊆\n β", " a✝ ∈ β", " ⟨a, ⋯⟩ ∈ γ" ]
import Mathlib.CategoryTheory.Limits.Shapes.Biproducts import Mathlib.GroupTheory.EckmannHilton import Mathlib.Tactic.CategoryTheory.Reassoc #align_import category_theory.preadditive.of_biproducts from "leanprover-community/mathlib"@"061ea99a5610cfc72c286aa930d3c1f47f74f3d0" noncomputable section universe v u op...
Mathlib/CategoryTheory/Preadditive/OfBiproducts.lean
88
96
theorem distrib (f g h k : X ⟶ Y) : (f +ᵣ g) +ₗ h +ᵣ k = (f +ₗ h) +ᵣ g +ₗ k := by
let diag : X ⊞ X ⟶ Y ⊞ Y := biprod.lift (biprod.desc f g) (biprod.desc h k) have hd₁ : biprod.inl ≫ diag = biprod.lift f h := by ext <;> simp [diag] have hd₂ : biprod.inr ≫ diag = biprod.lift g k := by ext <;> simp [diag] have h₁ : biprod.lift (f +ᵣ g) (h +ᵣ k) = biprod.lift (𝟙 X) (𝟙 X) ≫ diag := by ext ...
[ " EckmannHilton.IsUnital (fun x x_1 => leftAdd X Y x x_1) 0", " ∀ (f : X ⟶ Y), biprod.lift 0 f = f ≫ biprod.inr", " biprod.lift 0 f = f ≫ biprod.inr", " biprod.lift 0 f ≫ biprod.fst = (f ≫ biprod.inr) ≫ biprod.fst", " biprod.lift 0 f ≫ biprod.snd = (f ≫ biprod.inr) ≫ biprod.snd", " ∀ (f : X ⟶ Y), biprod.l...
[ " EckmannHilton.IsUnital (fun x x_1 => leftAdd X Y x x_1) 0", " ∀ (f : X ⟶ Y), biprod.lift 0 f = f ≫ biprod.inr", " biprod.lift 0 f = f ≫ biprod.inr", " biprod.lift 0 f ≫ biprod.fst = (f ≫ biprod.inr) ≫ biprod.fst", " biprod.lift 0 f ≫ biprod.snd = (f ≫ biprod.inr) ≫ biprod.snd", " ∀ (f : X ⟶ Y), biprod.l...
import Mathlib.Analysis.BoxIntegral.Partition.SubboxInduction import Mathlib.Analysis.BoxIntegral.Partition.Split #align_import analysis.box_integral.partition.filter from "leanprover-community/mathlib"@"92ca63f0fb391a9ca5f22d2409a6080e786d99f7" open Set Function Filter Metric Finset Bool open scoped Classical o...
Mathlib/Analysis/BoxIntegral/Partition/Filter.lean
276
276
theorem henstock_le_riemann : Henstock ≤ Riemann := by
trivial
[ " Henstock ≤ Riemann" ]
[ " Henstock ≤ Riemann" ]
import Mathlib.Topology.PartitionOfUnity import Mathlib.Analysis.Convex.Combination #align_import analysis.convex.partition_of_unity from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982" open Set Function open Topology variable {ι X E : Type*} [TopologicalSpace X] [AddCommGroup E] [Modu...
Mathlib/Analysis/Convex/PartitionOfUnity.lean
51
60
theorem exists_continuous_forall_mem_convex_of_local (ht : ∀ x, Convex ℝ (t x)) (H : ∀ x : X, ∃ U ∈ 𝓝 x, ∃ g : X → E, ContinuousOn g U ∧ ∀ y ∈ U, g y ∈ t y) : ∃ g : C(X, E), ∀ x, g x ∈ t x := by
choose U hU g hgc hgt using H obtain ⟨f, hf⟩ := PartitionOfUnity.exists_isSubordinate isClosed_univ (fun x => interior (U x)) (fun x => isOpen_interior) fun x _ => mem_iUnion.2 ⟨x, mem_interior_iff_mem_nhds.2 (hU x)⟩ refine ⟨⟨fun x => ∑ᶠ i, f i x • g i x, hf.continuous_finsum_smul (fun i => isOpen_interi...
[ " ∃ g, ∀ (x : X), g x ∈ t x", " x ∈ U i" ]
[ " ∃ g, ∀ (x : X), g x ∈ t x" ]
import Mathlib.Logic.Equiv.Defs #align_import data.erased from "leanprover-community/mathlib"@"10b4e499f43088dd3bb7b5796184ad5216648ab1" universe u def Erased (α : Sort u) : Sort max 1 u := Σ's : α → Prop, ∃ a, (fun b => a = b) = s #align erased Erased namespace Erased @[inline] def mk {α} (a : α) : Erased...
Mathlib/Data/Erased.lean
56
59
theorem out_mk {α} (a : α) : (mk a).out = a := by
let h := (mk a).2; show Classical.choose h = a have := Classical.choose_spec h exact cast (congr_fun this a).symm rfl
[ " (mk a).out = a", " Classical.choose h = a" ]
[ " (mk a).out = a" ]
import Mathlib.Analysis.Calculus.Deriv.Basic import Mathlib.Analysis.Calculus.Deriv.Slope import Mathlib.Analysis.NormedSpace.FiniteDimension import Mathlib.MeasureTheory.Constructions.BorelSpace.ContinuousLinearMap import Mathlib.MeasureTheory.Function.StronglyMeasurable.Basic #align_import analysis.calculus.fderiv_...
Mathlib/Analysis/Calculus/FDeriv/Measurable.lean
162
181
theorem mem_A_of_differentiable {ε : ℝ} (hε : 0 < ε) {x : E} (hx : DifferentiableAt 𝕜 f x) : ∃ R > 0, ∀ r ∈ Ioo (0 : ℝ) R, x ∈ A f (fderiv 𝕜 f x) r ε := by
let δ := (ε / 2) / 2 obtain ⟨R, R_pos, hR⟩ : ∃ R > 0, ∀ y ∈ ball x R, ‖f y - f x - fderiv 𝕜 f x (y - x)‖ ≤ δ * ‖y - x‖ := eventually_nhds_iff_ball.1 <| hx.hasFDerivAt.isLittleO.bound <| by positivity refine ⟨R, R_pos, fun r hr => ?_⟩ have : r ∈ Ioc (r / 2) r := right_mem_Ioc.2 <| half_lt_self hr.1 ...
[ " IsOpen (A f L r ε)", " ∀ x ∈ A f L r ε, ∃ ε_1 > 0, ball x ε_1 ⊆ A f L r ε", " ∃ ε_1 > 0, ball x ε_1 ⊆ A f L r ε", " r' - s > 0", " ∀ y ∈ ball x' s, ∀ z ∈ ball x' s, ‖f z - f y - L (z - y)‖ < ε * r", " ‖f z - f y - L (z - y)‖ < ε * r", " IsOpen (B f K r s ε)", " A f L r ε ⊆ A f L r δ", " x ∈ A f L ...
[ " IsOpen (A f L r ε)", " ∀ x ∈ A f L r ε, ∃ ε_1 > 0, ball x ε_1 ⊆ A f L r ε", " ∃ ε_1 > 0, ball x ε_1 ⊆ A f L r ε", " r' - s > 0", " ∀ y ∈ ball x' s, ∀ z ∈ ball x' s, ‖f z - f y - L (z - y)‖ < ε * r", " ‖f z - f y - L (z - y)‖ < ε * r", " IsOpen (B f K r s ε)", " A f L r ε ⊆ A f L r δ", " x ∈ A f L ...
import Mathlib.Algebra.Group.Indicator import Mathlib.Algebra.Group.Submonoid.Basic import Mathlib.Data.Set.Finite #align_import data.finsupp.defs from "leanprover-community/mathlib"@"842328d9df7e96fd90fc424e115679c15fb23a71" noncomputable section open Finset Function variable {α β γ ι M M' N P G H R S : Type*}...
Mathlib/Data/Finsupp/Defs.lean
220
222
theorem support_subset_iff {s : Set α} {f : α →₀ M} : ↑f.support ⊆ s ↔ ∀ a ∉ s, f a = 0 := by
simp only [Set.subset_def, mem_coe, mem_support_iff]; exact forall_congr' fun a => not_imp_comm
[ " Injective toFun", " { support := s, toFun := f, mem_support_toFun := hf } = { support := t, toFun := f, mem_support_toFun := hg }", " s = t", " a ∈ s ↔ a ∈ t", " ⇑f = 0 ↔ f = 0", " f a = g a", " g a = 0", " f.support.Nonempty ↔ f ≠ 0", " f.support.card = 0 ↔ f = 0", " ↑f.support ⊆ s ↔ ∀ a ∉ s, f...
[ " Injective toFun", " { support := s, toFun := f, mem_support_toFun := hf } = { support := t, toFun := f, mem_support_toFun := hg }", " s = t", " a ∈ s ↔ a ∈ t", " ⇑f = 0 ↔ f = 0", " f a = g a", " g a = 0", " f.support.Nonempty ↔ f ≠ 0", " f.support.card = 0 ↔ f = 0", " ↑f.support ⊆ s ↔ ∀ a ∉ s, f...
import Mathlib.Algebra.GroupWithZero.Units.Basic import Mathlib.Algebra.Group.Semiconj.Units import Mathlib.Init.Classical #align_import algebra.group_with_zero.semiconj from "leanprover-community/mathlib"@"70d50ecfd4900dd6d328da39ab7ebd516abe4025" assert_not_exists DenselyOrdered variable {α M₀ G₀ M₀' G₀' F F' :...
Mathlib/Algebra/GroupWithZero/Semiconj.lean
45
54
theorem inv_right₀ (h : SemiconjBy a x y) : SemiconjBy a x⁻¹ y⁻¹ := by
by_cases ha : a = 0 · simp only [ha, zero_left] by_cases hx : x = 0 · subst x simp only [SemiconjBy, mul_zero, @eq_comm _ _ (y * a), mul_eq_zero] at h simp [h.resolve_right ha] · have := mul_ne_zero ha hx rw [h.eq, mul_ne_zero_iff] at this exact @units_inv_right _ _ _ (Units.mk0 x hx) (Units....
[ " SemiconjBy a 0 0", " SemiconjBy 0 x y", " SemiconjBy a⁻¹ x y ↔ SemiconjBy a y x", " SemiconjBy a x⁻¹ y⁻¹", " SemiconjBy a 0⁻¹ y⁻¹" ]
[ " SemiconjBy a 0 0", " SemiconjBy 0 x y", " SemiconjBy a⁻¹ x y ↔ SemiconjBy a y x", " SemiconjBy a x⁻¹ y⁻¹" ]
import Mathlib.Analysis.InnerProductSpace.Dual import Mathlib.Analysis.InnerProductSpace.PiL2 #align_import analysis.inner_product_space.adjoint from "leanprover-community/mathlib"@"46b633fd842bef9469441c0209906f6dddd2b4f5" noncomputable section open RCLike open scoped ComplexConjugate variable {𝕜 E F G : Type...
Mathlib/Analysis/InnerProductSpace/Adjoint.lean
138
141
theorem adjoint_comp (A : F →L[𝕜] G) (B : E →L[𝕜] F) : (A ∘L B)† = B† ∘L A† := by
ext v refine ext_inner_left 𝕜 fun w => ?_ simp only [adjoint_inner_right, ContinuousLinearMap.coe_comp', Function.comp_apply]
[ " ⟪(adjointAux A) y, x⟫_𝕜 = ⟪y, A x⟫_𝕜", " ⟪x, (adjointAux A) y⟫_𝕜 = ⟪A x, y⟫_𝕜", " adjointAux (adjointAux A) = A", " (adjointAux (adjointAux A)) v = A v", " ⟪w, (adjointAux (adjointAux A)) v⟫_𝕜 = ⟪w, A v⟫_𝕜", " ‖adjointAux A‖ = ‖A‖", " ‖adjointAux A‖ ≤ ‖A‖", " ‖(adjointAux A) x‖ ≤ ‖A‖ * ‖x‖", ...
[ " ⟪(adjointAux A) y, x⟫_𝕜 = ⟪y, A x⟫_𝕜", " ⟪x, (adjointAux A) y⟫_𝕜 = ⟪A x, y⟫_𝕜", " adjointAux (adjointAux A) = A", " (adjointAux (adjointAux A)) v = A v", " ⟪w, (adjointAux (adjointAux A)) v⟫_𝕜 = ⟪w, A v⟫_𝕜", " ‖adjointAux A‖ = ‖A‖", " ‖adjointAux A‖ ≤ ‖A‖", " ‖(adjointAux A) x‖ ≤ ‖A‖ * ‖x‖", ...
import Mathlib.GroupTheory.Perm.Cycle.Basic #align_import group_theory.perm.cycle.basic from "leanprover-community/mathlib"@"e8638a0fcaf73e4500469f368ef9494e495099b3" open Equiv Function Finset variable {ι α β : Type*} namespace Equiv.Perm section Generation variable [Finite β] open Subgroup
Mathlib/GroupTheory/Perm/Closure.lean
37
41
theorem closure_isCycle : closure { σ : Perm β | IsCycle σ } = ⊤ := by
classical cases nonempty_fintype β exact top_le_iff.mp (le_trans (ge_of_eq closure_isSwap) (closure_mono fun _ => IsSwap.isCycle))
[ " closure {σ | σ.IsCycle} = ⊤" ]
[ " closure {σ | σ.IsCycle} = ⊤" ]
import Mathlib.Tactic.Ring import Mathlib.Tactic.FailIfNoProgress import Mathlib.Algebra.Group.Commutator #align_import tactic.group from "leanprover-community/mathlib"@"4c19a16e4b705bf135cf9a80ac18fcc99c438514" namespace Mathlib.Tactic.Group open Lean open Lean.Meta open Lean.Parser.Tactic open Lean.Elab.Tactic ...
Mathlib/Tactic/Group.lean
49
50
theorem zpow_trick_one' {G : Type*} [Group G] (a b : G) (n : ℤ) : a * b ^ n * b = a * b ^ (n + 1) := by
rw [mul_assoc, mul_zpow_self]
[ " a * b ^ n * b ^ m = a * b ^ (n + m)", " a * b * b ^ m = a * b ^ (m + 1)", " a * b ^ n * b = a * b ^ (n + 1)" ]
[ " a * b ^ n * b ^ m = a * b ^ (n + m)", " a * b * b ^ m = a * b ^ (m + 1)", " a * b ^ n * b = a * b ^ (n + 1)" ]
import Mathlib.Data.ZMod.Basic import Mathlib.GroupTheory.Coxeter.Basic namespace CoxeterSystem open List Matrix Function Classical variable {B : Type*} variable {W : Type*} [Group W] variable {M : CoxeterMatrix B} (cs : CoxeterSystem M W) local prefix:100 "s" => cs.simple local prefix:100 "π" => cs.wordProd ...
Mathlib/GroupTheory/Coxeter/Length.lean
100
105
theorem length_mul_le (w₁ w₂ : W) : ℓ (w₁ * w₂) ≤ ℓ w₁ + ℓ w₂ := by
rcases cs.exists_reduced_word w₁ with ⟨ω₁, hω₁, rfl⟩ rcases cs.exists_reduced_word w₂ with ⟨ω₂, hω₂, rfl⟩ have := cs.length_wordProd_le (ω₁ ++ ω₂) simpa [hω₁, hω₂, wordProd_append] using this
[ " ∃ n ω, ω.length = n ∧ cs.wordProd ω = w", " ∃ n ω_1, ω_1.length = n ∧ cs.wordProd ω_1 = cs.wordProd ω", " ∃ ω, ω.length = cs.length w ∧ w = cs.wordProd ω", " ω.length = ω.length ∧ cs.wordProd ω = cs.wordProd ω", " cs.length w = 0 ↔ w = 1", " cs.length w = 0 → w = 1", " w = 1", " cs.wordProd ω = 1", ...
[ " ∃ n ω, ω.length = n ∧ cs.wordProd ω = w", " ∃ n ω_1, ω_1.length = n ∧ cs.wordProd ω_1 = cs.wordProd ω", " ∃ ω, ω.length = cs.length w ∧ w = cs.wordProd ω", " ω.length = ω.length ∧ cs.wordProd ω = cs.wordProd ω", " cs.length w = 0 ↔ w = 1", " cs.length w = 0 → w = 1", " w = 1", " cs.wordProd ω = 1", ...
import Mathlib.Data.ZMod.Basic import Mathlib.GroupTheory.Exponent #align_import group_theory.specific_groups.dihedral from "leanprover-community/mathlib"@"70fd9563a21e7b963887c9360bd29b2393e6225a" inductive DihedralGroup (n : ℕ) : Type | r : ZMod n → DihedralGroup n | sr : ZMod n → DihedralGroup n derivin...
Mathlib/GroupTheory/SpecificGroups/Dihedral.lean
135
142
theorem r_one_pow (k : ℕ) : (r 1 : DihedralGroup n) ^ k = r k := by
induction' k with k IH · rw [Nat.cast_zero] rfl · rw [pow_succ', IH, r_mul_r] congr 1 norm_cast rw [Nat.one_add]
[ " ∀ (a b c : DihedralGroup n), a * b * c = a * (b * c)", " r a * r b * r c = r a * (r b * r c)", " r a * r b * sr c = r a * (r b * sr c)", " r a * sr b * r c = r a * (sr b * r c)", " r a * sr b * sr c = r a * (sr b * sr c)", " sr a * r b * r c = sr a * (r b * r c)", " sr a * r b * sr c = sr a * (r b * s...
[ " ∀ (a b c : DihedralGroup n), a * b * c = a * (b * c)", " r a * r b * r c = r a * (r b * r c)", " r a * r b * sr c = r a * (r b * sr c)", " r a * sr b * r c = r a * (sr b * r c)", " r a * sr b * sr c = r a * (sr b * sr c)", " sr a * r b * r c = sr a * (r b * r c)", " sr a * r b * sr c = sr a * (r b * s...
import Mathlib.Algebra.Group.Subgroup.Basic import Mathlib.Algebra.Ring.Subsemiring.Basic #align_import ring_theory.subring.basic from "leanprover-community/mathlib"@"b915e9392ecb2a861e1e766f0e1df6ac481188ca" universe u v w variable {R : Type u} {S : Type v} {T : Type w} [Ring R] section SubringClass class Su...
Mathlib/Algebra/Ring/Subring/Basic.lean
88
88
theorem intCast_mem (n : ℤ) : (n : R) ∈ s := by
simp only [← zsmul_one, zsmul_mem, one_mem]
[ " ↑n ∈ s" ]
[ " ↑n ∈ s" ]
import Mathlib.Order.Filter.Basic import Mathlib.Topology.Bases import Mathlib.Data.Set.Accumulate import Mathlib.Topology.Bornology.Basic import Mathlib.Topology.LocallyFinite open Set Filter Topology TopologicalSpace Classical Function universe u v variable {X : Type u} {Y : Type v} {ι : Type*} variable [Topolog...
Mathlib/Topology/Compactness/Compact.lean
104
116
theorem IsCompact.image_of_continuousOn {f : X → Y} (hs : IsCompact s) (hf : ContinuousOn f s) : IsCompact (f '' s) := by
intro l lne ls have : NeBot (l.comap f ⊓ 𝓟 s) := comap_inf_principal_neBot_of_image_mem lne (le_principal_iff.1 ls) obtain ⟨x, hxs, hx⟩ : ∃ x ∈ s, ClusterPt x (l.comap f ⊓ 𝓟 s) := @hs _ this inf_le_right haveI := hx.neBot use f x, mem_image_of_mem f hxs have : Tendsto f (𝓝 x ⊓ (comap f l ⊓ 𝓟 s)) (�...
[ " sᶜ ∈ f", " ∃ x ∈ s, sᶜ ∉ 𝓝 x ⊓ f", " ∃ x ∈ s, (𝓝 x ⊓ (f ⊓ 𝓟 s)).NeBot", " sᶜ ∈ 𝓝 x ⊓ f", " {x | x ∈ s → x ∈ t} ∩ tᶜ ⊆ sᶜ", " False", " p s", " ∀ x ∈ s, ∃ t ∈ 𝓝[s] x, tᶜ ∈ f", " IsCompact (s ∩ t)", " ∃ x ∈ s ∩ t, ClusterPt x f", " IsCompact (f '' s)", " ∃ x ∈ f '' s, ClusterPt x l", " ...
[ " sᶜ ∈ f", " ∃ x ∈ s, sᶜ ∉ 𝓝 x ⊓ f", " ∃ x ∈ s, (𝓝 x ⊓ (f ⊓ 𝓟 s)).NeBot", " sᶜ ∈ 𝓝 x ⊓ f", " {x | x ∈ s → x ∈ t} ∩ tᶜ ⊆ sᶜ", " False", " p s", " ∀ x ∈ s, ∃ t ∈ 𝓝[s] x, tᶜ ∈ f", " IsCompact (s ∩ t)", " ∃ x ∈ s ∩ t, ClusterPt x f", " IsCompact (f '' s)" ]
import Mathlib.Algebra.Bounds import Mathlib.Algebra.Order.Field.Basic -- Porting note: `LinearOrderedField`, etc import Mathlib.Data.Set.Pointwise.SMul #align_import algebra.order.pointwise from "leanprover-community/mathlib"@"9003f28797c0664a49e4179487267c494477d853" open Function Set open Pointwise variable ...
Mathlib/Algebra/Order/Pointwise.lean
239
249
theorem smul_Ioi : r • Ioi a = Ioi (r • a) := by
ext x simp only [mem_smul_set, smul_eq_mul, mem_Ioi] constructor · rintro ⟨a_w, a_h_left, rfl⟩ exact (mul_lt_mul_left hr).mpr a_h_left · rintro h use x / r constructor · exact (lt_div_iff' hr).mpr h · exact mul_div_cancel₀ _ (ne_of_gt hr)
[ " r • Ioo a b = Ioo (r • a) (r • b)", " x ∈ r • Ioo a b ↔ x ∈ Ioo (r • a) (r • b)", " (∃ y, (a < y ∧ y < b) ∧ r * y = x) ↔ r * a < x ∧ x < r * b", " (∃ y, (a < y ∧ y < b) ∧ r * y = x) → r * a < x ∧ x < r * b", " r * a✝ < r * a ∧ r * a < r * b", " r * a✝ < r * a", " r * a < r * b", " r * a < x ∧ x < r ...
[ " r • Ioo a b = Ioo (r • a) (r • b)", " x ∈ r • Ioo a b ↔ x ∈ Ioo (r • a) (r • b)", " (∃ y, (a < y ∧ y < b) ∧ r * y = x) ↔ r * a < x ∧ x < r * b", " (∃ y, (a < y ∧ y < b) ∧ r * y = x) → r * a < x ∧ x < r * b", " r * a✝ < r * a ∧ r * a < r * b", " r * a✝ < r * a", " r * a < r * b", " r * a < x ∧ x < r ...
import Mathlib.LinearAlgebra.Contraction import Mathlib.LinearAlgebra.Matrix.Charpoly.Coeff #align_import linear_algebra.trace from "leanprover-community/mathlib"@"4cf7ca0e69e048b006674cf4499e5c7d296a89e0" noncomputable section universe u v w namespace LinearMap open Matrix open FiniteDimensional open Tensor...
Mathlib/LinearAlgebra/Trace.lean
116
119
theorem trace_conj (g : M →ₗ[R] M) (f : (M →ₗ[R] M)ˣ) : trace R M (↑f * g * ↑f⁻¹) = trace R M g := by
rw [trace_mul_comm] simp
[ " ((toMatrix b b) f).trace = ((toMatrix b b) ((id ∘ₗ f) ∘ₗ id)).trace", " ((toMatrix b b) ((id ∘ₗ f) ∘ₗ id)).trace = ((toMatrix c b) id * (toMatrix c c) f * (toMatrix b c) id).trace", " ((toMatrix c b) id * (toMatrix c c) f * (toMatrix b c) id).trace =\n ((toMatrix c c) f * (toMatrix b c) id * (toMatrix c b)...
[ " ((toMatrix b b) f).trace = ((toMatrix b b) ((id ∘ₗ f) ∘ₗ id)).trace", " ((toMatrix b b) ((id ∘ₗ f) ∘ₗ id)).trace = ((toMatrix c b) id * (toMatrix c c) f * (toMatrix b c) id).trace", " ((toMatrix c b) id * (toMatrix c c) f * (toMatrix b c) id).trace =\n ((toMatrix c c) f * (toMatrix b c) id * (toMatrix c b)...
import Mathlib.Analysis.Convolution import Mathlib.Analysis.SpecialFunctions.Trigonometric.EulerSineProd import Mathlib.Analysis.SpecialFunctions.Gamma.BohrMollerup import Mathlib.Analysis.Analytic.IsolatedZeros import Mathlib.Analysis.Complex.CauchyIntegral #align_import analysis.special_functions.gamma.beta from "l...
Mathlib/Analysis/SpecialFunctions/Gamma/Beta.lean
136
151
theorem Gamma_mul_Gamma_eq_betaIntegral {s t : ℂ} (hs : 0 < re s) (ht : 0 < re t) : Gamma s * Gamma t = Gamma (s + t) * betaIntegral s t := by
-- Note that we haven't proved (yet) that the Gamma function has no zeroes, so we can't formulate -- this as a formula for the Beta function. have conv_int := integral_posConvolution (GammaIntegral_convergent hs) (GammaIntegral_convergent ht) (ContinuousLinearMap.mul ℝ ℂ) simp_rw [ContinuousLinearMap.mul_a...
[ " IntervalIntegrable (fun x => ↑x ^ (u - 1) * (1 - ↑x) ^ (v - 1)) volume 0 (1 / 2)", " IntervalIntegrable (fun x => ↑x ^ (u - 1)) volume 0 (1 / 2)", " -1 < (u - 1).re", " ContinuousOn (fun x => (1 - ↑x) ^ (v - 1)) (uIcc 0 (1 / 2))", " ∀ x ∈ uIcc 0 (1 / 2), ContinuousAt (fun x => (1 - ↑x) ^ (v - 1)) x", " ...
[ " IntervalIntegrable (fun x => ↑x ^ (u - 1) * (1 - ↑x) ^ (v - 1)) volume 0 (1 / 2)", " IntervalIntegrable (fun x => ↑x ^ (u - 1)) volume 0 (1 / 2)", " -1 < (u - 1).re", " ContinuousOn (fun x => (1 - ↑x) ^ (v - 1)) (uIcc 0 (1 / 2))", " ∀ x ∈ uIcc 0 (1 / 2), ContinuousAt (fun x => (1 - ↑x) ^ (v - 1)) x", " ...
import Mathlib.RingTheory.AdicCompletion.Basic import Mathlib.Algebra.Module.Torsion open Submodule variable {R : Type*} [CommRing R] (I : Ideal R) variable {M : Type*} [AddCommGroup M] [Module R M] namespace AdicCompletion attribute [-simp] smul_eq_mul Algebra.id.smul_eq_mul @[local simp] theorem transitionMap...
Mathlib/RingTheory/AdicCompletion/Algebra.lean
123
125
theorem evalₐ_mkₐ (n : ℕ) (x : AdicCauchySequence I R) : evalₐ I n (mkₐ I x) = Ideal.Quotient.mk (I ^ n) (x.val n) := by
simp [mkₐ]
[ " (transitionMap I R x✝) (1 n✝) = 1 m✝", " (transitionMap I R hmn) ((x * y) n) = (x * y) m", " I ^ n • ⊤ = I ^ n", " x ∈ I ^ n • ⊤ ↔ x ∈ I ^ n", " (evalₐ I n) ((mk I R) x) = (Ideal.Quotient.mk (I ^ n)) (↑x n)", " 1 m ≡ 1 n [SMOD I ^ m • ⊤]", " 1 ≡ 1 [SMOD I ^ m]", " (x * y) m ≡ (x * y) n [SMOD I ^ m •...
[ " (transitionMap I R x✝) (1 n✝) = 1 m✝", " (transitionMap I R hmn) ((x * y) n) = (x * y) m", " I ^ n • ⊤ = I ^ n", " x ∈ I ^ n • ⊤ ↔ x ∈ I ^ n", " (evalₐ I n) ((mk I R) x) = (Ideal.Quotient.mk (I ^ n)) (↑x n)", " 1 m ≡ 1 n [SMOD I ^ m • ⊤]", " 1 ≡ 1 [SMOD I ^ m]", " (x * y) m ≡ (x * y) n [SMOD I ^ m •...
import Mathlib.Algebra.DirectSum.Module import Mathlib.Algebra.Module.BigOperators import Mathlib.LinearAlgebra.Isomorphisms import Mathlib.GroupTheory.Torsion import Mathlib.RingTheory.Coprime.Ideal import Mathlib.RingTheory.Finiteness import Mathlib.Data.Set.Lattice #align_import algebra.module.torsion from "leanpr...
Mathlib/Algebra/Module/Torsion.lean
99
105
theorem torsionOf_eq_bot_iff_of_noZeroSMulDivisors [Nontrivial R] [NoZeroSMulDivisors R M] (m : M) : torsionOf R M m = ⊥ ↔ m ≠ 0 := by
refine ⟨fun h contra => ?_, fun h => (Submodule.eq_bot_iff _).mpr fun r hr => ?_⟩ · rw [contra, torsionOf_zero] at h exact bot_ne_top.symm h · rw [mem_torsionOf_iff, smul_eq_zero] at hr tauto
[ " torsionOf R M 0 = ⊤", " torsionOf R M m = ⊤ ↔ m = 0", " torsionOf R M m = ⊤", " m = 0", " 1 ∈ ⊤", " torsionOf R M m = ⊥ ↔ m ≠ 0", " False", " r = 0" ]
[ " torsionOf R M 0 = ⊤", " torsionOf R M m = ⊤ ↔ m = 0", " torsionOf R M m = ⊤", " m = 0", " 1 ∈ ⊤", " torsionOf R M m = ⊥ ↔ m ≠ 0" ]
import Mathlib.Analysis.Convex.Between import Mathlib.Analysis.Normed.Group.AddTorsor import Mathlib.Geometry.Euclidean.Angle.Unoriented.Basic import Mathlib.Analysis.NormedSpace.AffineIsometry #align_import geometry.euclidean.angle.unoriented.affine from "leanprover-community/mathlib"@"46b633fd842bef9469441c0209906f...
Mathlib/Geometry/Euclidean/Angle/Unoriented/Affine.lean
113
114
theorem angle_sub_const (v₁ v₂ v₃ : V) (v : V) : ∠ (v₁ - v) (v₂ - v) (v₃ - v) = ∠ v₁ v₂ v₃ := by
simpa only [vsub_eq_sub] using angle_vsub_const v₁ v₂ v₃ v
[ " ContinuousAt (fun y => ∠ y.1 y.2.1 y.2.2) x", " (f x).1 ≠ 0", " (f x).2 ≠ 0", " ∠ (f p₁) (f p₂) (f p₃) = ∠ p₁ p₂ p₃", " ∠ (v₁ - v) (v₂ - v) (v₃ - v) = ∠ v₁ v₂ v₃" ]
[ " ContinuousAt (fun y => ∠ y.1 y.2.1 y.2.2) x", " (f x).1 ≠ 0", " (f x).2 ≠ 0", " ∠ (f p₁) (f p₂) (f p₃) = ∠ p₁ p₂ p₃", " ∠ (v₁ - v) (v₂ - v) (v₃ - v) = ∠ v₁ v₂ v₃" ]
import Mathlib.Data.Complex.Basic import Mathlib.MeasureTheory.Integral.CircleIntegral #align_import measure_theory.integral.circle_transform from "leanprover-community/mathlib"@"d11893b411025250c8e61ff2f12ccbd7ee35ab15" open Set MeasureTheory Metric Filter Function open scoped Interval Real noncomputable secti...
Mathlib/MeasureTheory/Integral/CircleTransform.lean
75
83
theorem continuous_circleTransform {R : ℝ} (hR : 0 < R) {f : ℂ → E} {z w : ℂ} (hf : ContinuousOn f <| sphere z R) (hw : w ∈ ball z R) : Continuous (circleTransform R z w f) := by
apply_rules [Continuous.smul, continuous_const] · simp_rw [deriv_circleMap] apply_rules [Continuous.mul, continuous_circleMap 0 R, continuous_const] · exact continuous_circleMap_inv hw · apply ContinuousOn.comp_continuous hf (continuous_circleMap z R) exact fun _ => (circleMap_mem_sphere _ hR.le) _
[ " Periodic (circleTransformDeriv R z w f) (2 * π)", " ∀ (x : ℝ), circleTransformDeriv R z w f (x + 2 * π) = circleTransformDeriv R z w f x", " circleTransformDeriv R z w f (x + 2 * π) = circleTransformDeriv R z w f x", " (2 * ↑π * I)⁻¹ • deriv (circleMap z R) (x + 2 * π) • ((circleMap z R x - w) ^ 2)⁻¹ • f (c...
[ " Periodic (circleTransformDeriv R z w f) (2 * π)", " ∀ (x : ℝ), circleTransformDeriv R z w f (x + 2 * π) = circleTransformDeriv R z w f x", " circleTransformDeriv R z w f (x + 2 * π) = circleTransformDeriv R z w f x", " (2 * ↑π * I)⁻¹ • deriv (circleMap z R) (x + 2 * π) • ((circleMap z R x - w) ^ 2)⁻¹ • f (c...
import Mathlib.Analysis.Calculus.SmoothSeries import Mathlib.Analysis.Calculus.BumpFunction.InnerProduct import Mathlib.Analysis.Convolution import Mathlib.Analysis.InnerProductSpace.EuclideanDist import Mathlib.Data.Set.Pointwise.Support import Mathlib.MeasureTheory.Measure.Haar.NormedSpace import Mathlib.MeasureTheo...
Mathlib/Analysis/Calculus/BumpFunction/FiniteDimension.lean
78
192
theorem IsOpen.exists_smooth_support_eq {s : Set E} (hs : IsOpen s) : ∃ f : E → ℝ, f.support = s ∧ ContDiff ℝ ⊤ f ∧ Set.range f ⊆ Set.Icc 0 1 := by
/- For any given point `x` in `s`, one can construct a smooth function with support in `s` and nonzero at `x`. By second-countability, it follows that we may cover `s` with the supports of countably many such functions, say `g i`. Then `∑ i, r i • g i` will be the desired function if `r i` is a sequence ...
[ " ∃ f, tsupport f ⊆ s ∧ HasCompactSupport f ∧ ContDiff ℝ ⊤ f ∧ range f ⊆ Icc 0 1 ∧ f x = 1", " support f ⊆ Euclidean.ball x d", " y ∈ Euclidean.ball x d", " toEuclidean y ∈ support ↑c", " tsupport f ⊆ Euclidean.closedBall x d", " closure (support f) ⊆ closure (Euclidean.ball x d)", " HasCompactSupport f...
[ " ∃ f, tsupport f ⊆ s ∧ HasCompactSupport f ∧ ContDiff ℝ ⊤ f ∧ range f ⊆ Icc 0 1 ∧ f x = 1", " support f ⊆ Euclidean.ball x d", " y ∈ Euclidean.ball x d", " toEuclidean y ∈ support ↑c", " tsupport f ⊆ Euclidean.closedBall x d", " closure (support f) ⊆ closure (Euclidean.ball x d)", " HasCompactSupport f...
import Mathlib.LinearAlgebra.Matrix.Symmetric import Mathlib.LinearAlgebra.Matrix.Orthogonal import Mathlib.Data.Matrix.Kronecker #align_import linear_algebra.matrix.is_diag from "leanprover-community/mathlib"@"55e2dfde0cff928ce5c70926a3f2c7dee3e2dd99" namespace Matrix variable {α β R n m : Type*} open Function...
Mathlib/LinearAlgebra/Matrix/IsDiag.lean
98
101
theorem IsDiag.sub [AddGroup α] {A B : Matrix n n α} (ha : A.IsDiag) (hb : B.IsDiag) : (A - B).IsDiag := by
intro i j h simp [ha h, hb h]
[ " diagonal A.diag i j = A i j", " diagonal A.diag i i = A i i", " (A.map f).IsDiag", " A.map f i j = 0", " (-A).IsDiag", " (-A) i j = 0", " (A + B).IsDiag", " (A + B) i j = 0", " (A - B).IsDiag", " (A - B) i j = 0" ]
[ " diagonal A.diag i j = A i j", " diagonal A.diag i i = A i i", " (A.map f).IsDiag", " A.map f i j = 0", " (-A).IsDiag", " (-A) i j = 0", " (A + B).IsDiag", " (A + B) i j = 0", " (A - B).IsDiag" ]
import Mathlib.FieldTheory.Galois #align_import field_theory.polynomial_galois_group from "leanprover-community/mathlib"@"e3f4be1fcb5376c4948d7f095bec45350bfb9d1a" noncomputable section open scoped Polynomial open FiniteDimensional namespace Polynomial variable {F : Type*} [Field F] (p q : F[X]) (E : Type*) [...
Mathlib/FieldTheory/PolynomialGaloisGroup.lean
259
268
theorem restrictDvd_def [Decidable (q = 0)] (hpq : p ∣ q) : restrictDvd hpq = if hq : q = 0 then 1 else @restrict F _ p _ _ _ ⟨splits_of_splits_of_dvd (algebraMap F q.SplittingField) hq (SplittingField.splits q) hpq⟩ := by
-- Porting note: added `unfold` unfold restrictDvd convert rfl
[ " σ = τ", " (↑σ).equalizer ↑τ = ⊤", " f x = default x", " f ((algebraMap F p.SplittingField) y) = default ((algebraMap F p.SplittingField) y)", " restrictDvd hpq = if hq : q = 0 then 1 else restrict p q.SplittingField", " (if hq : q = 0 then 1 else restrict p q.SplittingField) = if hq : q = 0 then 1 else ...
[ " σ = τ", " (↑σ).equalizer ↑τ = ⊤", " f x = default x", " f ((algebraMap F p.SplittingField) y) = default ((algebraMap F p.SplittingField) y)", " restrictDvd hpq = if hq : q = 0 then 1 else restrict p q.SplittingField" ]
import Mathlib.FieldTheory.PrimitiveElement import Mathlib.LinearAlgebra.Determinant import Mathlib.LinearAlgebra.FiniteDimensional import Mathlib.LinearAlgebra.Matrix.Charpoly.Minpoly import Mathlib.LinearAlgebra.Matrix.ToLinearEquiv import Mathlib.FieldTheory.IsAlgClosed.AlgebraicClosure import Mathlib.FieldTheory.G...
Mathlib/RingTheory/Norm.lean
145
147
theorem norm_zero [Nontrivial S] [Module.Free R S] [Module.Finite R S] : norm R (0 : S) = 0 := by
nontriviality rw [norm_apply, coe_lmul_eq_mul, map_zero, LinearMap.det_zero' (Module.Free.chooseBasis R S)]
[ " (norm R) x = 1", " (if H : ∃ s, Nonempty (Basis { x // x ∈ s } R S) then detAux (Trunc.mk ⋯.some) else 1) ((lmul R S) x) = 1", " (detAux (Trunc.mk ⋯.some)) ((lmul R S) x) = 1", " 1 ((lmul R S) x) = 1", " (∃ s, Nonempty (Basis { x // x ∈ s } R S)) → Module.Finite R S", " Module.Finite R S", " (norm R) ...
[ " (norm R) x = 1", " (if H : ∃ s, Nonempty (Basis { x // x ∈ s } R S) then detAux (Trunc.mk ⋯.some) else 1) ((lmul R S) x) = 1", " (detAux (Trunc.mk ⋯.some)) ((lmul R S) x) = 1", " 1 ((lmul R S) x) = 1", " (∃ s, Nonempty (Basis { x // x ∈ s } R S)) → Module.Finite R S", " Module.Finite R S", " (norm R) ...
import Mathlib.Algebra.GroupWithZero.NonZeroDivisors import Mathlib.LinearAlgebra.BilinearForm.Properties open LinearMap (BilinForm) universe u v w variable {R : Type*} {M : Type*} [CommSemiring R] [AddCommMonoid M] [Module R M] variable {R₁ : Type*} {M₁ : Type*} [CommRing R₁] [AddCommGroup M₁] [Module R₁ M₁] va...
Mathlib/LinearAlgebra/BilinearForm/Orthogonal.lean
109
114
theorem isOrtho_smul_right {x y : M₄} {a : R₄} (ha : a ≠ 0) : IsOrtho G x (a • y) ↔ IsOrtho G x y := by
dsimp only [IsOrtho] rw [map_smul] simp only [smul_eq_mul, mul_eq_zero, or_iff_right_iff_imp] exact fun a ↦ (ha a).elim
[ " G.IsOrtho (a • x) y ↔ G.IsOrtho x y", " (G (a • x)) y = 0 ↔ (G x) y = 0", " (a • G x) y = 0 ↔ (G x) y = 0", " a = 0 → (G x) y = 0", " G.IsOrtho x (a • y) ↔ G.IsOrtho x y", " (G x) (a • y) = 0 ↔ (G x) y = 0", " a • (G x) y = 0 ↔ (G x) y = 0" ]
[ " G.IsOrtho (a • x) y ↔ G.IsOrtho x y", " (G (a • x)) y = 0 ↔ (G x) y = 0", " (a • G x) y = 0 ↔ (G x) y = 0", " a = 0 → (G x) y = 0", " G.IsOrtho x (a • y) ↔ G.IsOrtho x y" ]
import Mathlib.Algebra.Associated import Mathlib.Algebra.GeomSum import Mathlib.Algebra.GroupWithZero.NonZeroDivisors import Mathlib.Algebra.Module.Defs import Mathlib.Algebra.SMulWithZero import Mathlib.Data.Nat.Choose.Sum import Mathlib.Data.Nat.Lattice import Mathlib.RingTheory.Nilpotent.Defs #align_import ring_th...
Mathlib/RingTheory/Nilpotent/Basic.lean
40
43
theorem IsNilpotent.neg [Ring R] (h : IsNilpotent x) : IsNilpotent (-x) := by
obtain ⟨n, hn⟩ := h use n rw [neg_pow, hn, mul_zero]
[ " IsNilpotent (-x)", " (-x) ^ n = 0" ]
[ " IsNilpotent (-x)" ]
import Mathlib.Topology.Sheaves.PUnit import Mathlib.Topology.Sheaves.Stalks import Mathlib.Topology.Sheaves.Functors #align_import topology.sheaves.skyscraper from "leanprover-community/mathlib"@"70fd9563a21e7b963887c9360bd29b2393e6225a" noncomputable section open TopologicalSpace TopCat CategoryTheory CategoryT...
Mathlib/Topology/Sheaves/Skyscraper.lean
94
97
theorem SkyscraperPresheafFunctor.map'_id {a : C} : SkyscraperPresheafFunctor.map' p₀ (𝟙 a) = 𝟙 _ := by
ext U simp only [SkyscraperPresheafFunctor.map'_app, NatTrans.id_app]; split_ifs <;> aesop_cat
[ " (fun U => if p₀ ∈ U.unop then A else ⊤_ C) U = (fun U => if p₀ ∈ U.unop then A else ⊤_ C) V", " (if p₀ ∈ U.unop then A else ⊤_ C) = if p₀ ∈ V.unop then A else ⊤_ C", " { obj := fun U => if p₀ ∈ U.unop then A else ⊤_ C,\n map := fun {U V} i =>\n if h : p₀ ∈ V.unop then eqToHom ⋯\n ...
[ " (fun U => if p₀ ∈ U.unop then A else ⊤_ C) U = (fun U => if p₀ ∈ U.unop then A else ⊤_ C) V", " (if p₀ ∈ U.unop then A else ⊤_ C) = if p₀ ∈ V.unop then A else ⊤_ C", " { obj := fun U => if p₀ ∈ U.unop then A else ⊤_ C,\n map := fun {U V} i =>\n if h : p₀ ∈ V.unop then eqToHom ⋯\n ...
import Mathlib.Topology.Basic #align_import topology.nhds_set from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982" open Set Filter Topology variable {X Y : Type*} [TopologicalSpace X] [TopologicalSpace Y] {f : Filter X} {s t s₁ s₂ t₁ t₂ : Set X} {x : X} theorem nhdsSet_diagonal (X) [T...
Mathlib/Topology/NhdsSet.lean
90
91
theorem IsOpen.mem_nhdsSet (hU : IsOpen s) : s ∈ 𝓝ˢ t ↔ t ⊆ s := by
rw [← subset_interior_iff_mem_nhdsSet, hU.interior_eq]
[ " 𝓝ˢ (diagonal X) = ⨆ x, 𝓝 (x, x)", " sSup (range (𝓝 ∘ fun x => (x, x))) = ⨆ x, 𝓝 (x, x)", " s ∈ 𝓝ˢ t ↔ ∀ x ∈ t, s ∈ 𝓝 x", " 𝓝ˢ s ≤ f ↔ ∀ x ∈ s, 𝓝 x ≤ f", " s ⊆ interior t ↔ t ∈ 𝓝ˢ s", " Disjoint (𝓟 s) (𝓝ˢ t) ↔ Disjoint (closure s) t", " Disjoint (𝓝ˢ s) (𝓟 t) ↔ Disjoint s (closure t)", " ...
[ " 𝓝ˢ (diagonal X) = ⨆ x, 𝓝 (x, x)", " sSup (range (𝓝 ∘ fun x => (x, x))) = ⨆ x, 𝓝 (x, x)", " s ∈ 𝓝ˢ t ↔ ∀ x ∈ t, s ∈ 𝓝 x", " 𝓝ˢ s ≤ f ↔ ∀ x ∈ s, 𝓝 x ≤ f", " s ⊆ interior t ↔ t ∈ 𝓝ˢ s", " Disjoint (𝓟 s) (𝓝ˢ t) ↔ Disjoint (closure s) t", " Disjoint (𝓝ˢ s) (𝓟 t) ↔ Disjoint s (closure t)", " ...
import Mathlib.CategoryTheory.Comma.Basic #align_import category_theory.arrow from "leanprover-community/mathlib"@"32253a1a1071173b33dc7d6a218cf722c6feb514" namespace CategoryTheory universe v u -- morphism levels before object levels. See note [CategoryTheory universes]. variable {T : Type u} [Category.{v} T] ...
Mathlib/CategoryTheory/Comma/Arrow.lean
138
143
theorem isIso_of_isIso_left_of_isIso_right {f g : Arrow T} (ff : f ⟶ g) [IsIso ff.left] [IsIso ff.right] : IsIso ff where out := by
let inverse : g ⟶ f := ⟨inv ff.left, inv ff.right, (by simp)⟩ apply Exists.intro inverse aesop_cat
[ " mk f.hom = f", " mk { left := left✝, right := right✝, hom := hom✝ }.hom = { left := left✝, right := right✝, hom := hom✝ }", " f = g", " f = f", " ∃ inv, ff ≫ inv = 𝟙 f ∧ inv ≫ ff = 𝟙 g", " (𝟭 T).map (inv ff.left) ≫ f.hom = g.hom ≫ (𝟭 T).map (inv ff.right)", " ff ≫ inverse = 𝟙 f ∧ inverse ≫ ff = �...
[ " mk f.hom = f", " mk { left := left✝, right := right✝, hom := hom✝ }.hom = { left := left✝, right := right✝, hom := hom✝ }", " f = g", " f = f", " ∃ inv, ff ≫ inv = 𝟙 f ∧ inv ≫ ff = 𝟙 g" ]
import Mathlib.MeasureTheory.Function.SimpleFuncDenseLp #align_import measure_theory.integral.set_to_l1 from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982" noncomputable section open scoped Classical Topology NNReal ENNReal MeasureTheory Pointwise open Set Filter TopologicalSpace ENNR...
Mathlib/MeasureTheory/Integral/SetToL1.lean
143
149
theorem map_empty_eq_zero {β} [AddCancelMonoid β] {T : Set α → β} (hT : FinMeasAdditive μ T) : T ∅ = 0 := by
have h_empty : μ ∅ ≠ ∞ := (measure_empty.le.trans_lt ENNReal.coe_lt_top).ne specialize hT ∅ ∅ MeasurableSet.empty MeasurableSet.empty h_empty h_empty (Set.inter_empty ∅) rw [Set.union_empty] at hT nth_rw 1 [← add_zero (T ∅)] at hT exact (add_left_cancel hT).symm
[ " 0 (s ∪ t) = 0 s + 0 t", " FinMeasAdditive μ (T + T')", " (T + T') (s ∪ t) = (T + T') s + (T + T') t", " T s + T t + (T' s + T' t) = T s + T' s + (T t + T' t)", " (fun s => c • T s) (s ∪ t) = (fun s => c • T s) s + (fun s => c • T s) t", " FinMeasAdditive μ T", " μ s = ⊤", " FinMeasAdditive (c • μ) T...
[ " 0 (s ∪ t) = 0 s + 0 t", " FinMeasAdditive μ (T + T')", " (T + T') (s ∪ t) = (T + T') s + (T + T') t", " T s + T t + (T' s + T' t) = T s + T' s + (T t + T' t)", " (fun s => c • T s) (s ∪ t) = (fun s => c • T s) s + (fun s => c • T s) t", " FinMeasAdditive μ T", " μ s = ⊤", " FinMeasAdditive (c • μ) T...
import Mathlib.MeasureTheory.Measure.Restrict open scoped ENNReal NNReal Topology open Set MeasureTheory Measure Filter Function MeasurableSpace ENNReal variable {α β δ ι : Type*} namespace MeasureTheory variable {m0 : MeasurableSpace α} [MeasurableSpace β] {μ ν ν₁ ν₂: Measure α} {s t : Set α} section NoAtoms...
Mathlib/MeasureTheory/Measure/Typeclasses.lean
396
398
theorem _root_.Set.Countable.ae_not_mem (h : s.Countable) (μ : Measure α) [NoAtoms μ] : ∀ᵐ x ∂μ, x ∉ s := by
simpa only [ae_iff, Classical.not_not] using h.measure_zero μ
[ " μ.restrict {a} = 0", " NoAtoms (μ.restrict s)", " (μ.restrict s) {x} = 0", " (μ.restrict s) t = 0", " μ (t ∩ s) = 0", " μ s = 0", " ∀ i ∈ s, μ {i} = 0", " ∀ᵐ (x : α) ∂μ, x ∉ s" ]
[ " μ.restrict {a} = 0", " NoAtoms (μ.restrict s)", " (μ.restrict s) {x} = 0", " (μ.restrict s) t = 0", " μ (t ∩ s) = 0", " μ s = 0", " ∀ i ∈ s, μ {i} = 0", " ∀ᵐ (x : α) ∂μ, x ∉ s" ]
import Mathlib.Data.Finset.Fold import Mathlib.Algebra.GCDMonoid.Multiset #align_import algebra.gcd_monoid.finset from "leanprover-community/mathlib"@"9003f28797c0664a49e4179487267c494477d853" #align_import algebra.gcd_monoid.div from "leanprover-community/mathlib"@"b537794f8409bc9598febb79cd510b1df5f4539d" variab...
Mathlib/Algebra/GCDMonoid/Finset.lean
228
241
theorem gcd_eq_gcd_filter_ne_zero [DecidablePred fun x : β ↦ f x = 0] : s.gcd f = (s.filter fun x ↦ f x ≠ 0).gcd f := by
classical trans ((s.filter fun x ↦ f x = 0) ∪ s.filter fun x ↦ (f x ≠ 0)).gcd f · rw [filter_union_filter_neg_eq] rw [gcd_union] refine Eq.trans (?_ : _ = GCDMonoid.gcd (0 : α) ?_) (?_ : GCDMonoid.gcd (0 : α) _ = _) · exact (gcd (filter (fun x => (f x ≠ 0)) s) f) · refine congr (congr rfl <| ...
[ " a ∣ s.gcd f ↔ ∀ b ∈ s, a ∣ f b", " (∀ b ∈ Multiset.map f s.val, a ∣ b) ↔ ∀ b ∈ s, a ∣ f b", " (∀ (b : α), ∀ x ∈ s.val, f x = b → a ∣ b) ↔ ∀ b ∈ s, a ∣ f b", " (insert b s).gcd f = GCDMonoid.gcd (f b) (s.gcd f)", " normalize (s.gcd f) = s.gcd f", " (∅ ∪ s₂).gcd f = GCDMonoid.gcd (∅.gcd f) (s₂.gcd f)", ...
[ " a ∣ s.gcd f ↔ ∀ b ∈ s, a ∣ f b", " (∀ b ∈ Multiset.map f s.val, a ∣ b) ↔ ∀ b ∈ s, a ∣ f b", " (∀ (b : α), ∀ x ∈ s.val, f x = b → a ∣ b) ↔ ∀ b ∈ s, a ∣ f b", " (insert b s).gcd f = GCDMonoid.gcd (f b) (s.gcd f)", " normalize (s.gcd f) = s.gcd f", " (∅ ∪ s₂).gcd f = GCDMonoid.gcd (∅.gcd f) (s₂.gcd f)", ...
import Mathlib.Analysis.SpecialFunctions.Complex.Arg import Mathlib.Analysis.SpecialFunctions.Log.Basic #align_import analysis.special_functions.complex.log from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982" noncomputable section namespace Complex open Set Filter Bornology open scop...
Mathlib/Analysis/SpecialFunctions/Complex/Log.lean
60
62
theorem log_exp {x : ℂ} (hx₁ : -π < x.im) (hx₂ : x.im ≤ π) : log (exp x) = x := by
rw [log, abs_exp, Real.log_exp, exp_eq_exp_re_mul_sin_add_cos, ← ofReal_exp, arg_mul_cos_add_sin_mul_I (Real.exp_pos _) ⟨hx₁, hx₂⟩, re_add_im]
[ " x.log.re = (abs x).log", " x.log.im = x.arg", " -π < x.log.im", " x.log.im ≤ π", " cexp x.log = x", " x ∈ Set.range cexp → x ∈ {0}ᶜ", " cexp x ∈ {0}ᶜ", " (cexp x).log = x" ]
[ " x.log.re = (abs x).log", " x.log.im = x.arg", " -π < x.log.im", " x.log.im ≤ π", " cexp x.log = x", " x ∈ Set.range cexp → x ∈ {0}ᶜ", " cexp x ∈ {0}ᶜ", " (cexp x).log = x" ]
import Mathlib.NumberTheory.Zsqrtd.Basic import Mathlib.RingTheory.PrincipalIdealDomain import Mathlib.Data.Complex.Basic import Mathlib.Data.Real.Archimedean #align_import number_theory.zsqrtd.gaussian_int from "leanprover-community/mathlib"@"5b2fe80501ff327b9109fb09b7cc8c325cd0d7d9" open Zsqrtd Complex open sc...
Mathlib/NumberTheory/Zsqrtd/GaussianInt.lean
84
85
theorem toComplex_def₂ (x : ℤ[i]) : (x : ℂ) = ⟨x.re, x.im⟩ := by
apply Complex.ext <;> simp [toComplex_def]
[ " I * I = ↑(-1)", " toComplex { re := x, im := y } = ↑x + ↑y * I", " toComplex x = { re := ↑x.re, im := ↑x.im }", " (toComplex x).re = { re := ↑x.re, im := ↑x.im }.re", " (toComplex x).im = { re := ↑x.re, im := ↑x.im }.im" ]
[ " I * I = ↑(-1)", " toComplex { re := x, im := y } = ↑x + ↑y * I", " toComplex x = { re := ↑x.re, im := ↑x.im }" ]
import Mathlib.Analysis.InnerProductSpace.Orthogonal import Mathlib.Analysis.Normed.Group.AddTorsor #align_import geometry.euclidean.basic from "leanprover-community/mathlib"@"2de9c37fa71dde2f1c6feff19876dd6a7b1519f0" open Set open scoped RealInnerProductSpace variable {V P : Type*} [NormedAddCommGroup V] [InnerP...
Mathlib/Geometry/Euclidean/PerpBisector.lean
73
78
theorem direction_perpBisector (p₁ p₂ : P) : (perpBisector p₁ p₂).direction = (ℝ ∙ (p₂ -ᵥ p₁))ᗮ := by
erw [perpBisector, comap_symm, map_direction, Submodule.map_id, Submodule.toAffineSubspace_direction] ext x exact Submodule.mem_orthogonal_singleton_iff_inner_right.symm
[ " c ∈ perpBisector p₁ p₂ ↔ ⟪(Equiv.pointReflection c) p₁ -ᵥ p₂, p₂ -ᵥ p₁⟫_ℝ = 0", " 2⁻¹ * ⟪c -ᵥ p₁ + (c -ᵥ p₂), p₂ -ᵥ p₁⟫_ℝ = 0 ↔ ⟪c -ᵥ p₁ + (c -ᵥ p₂), p₂ -ᵥ p₁⟫_ℝ = 0", " c ∈ perpBisector p₁ ((Equiv.pointReflection p₂) p₁) ↔ ⟪c -ᵥ p₂, p₁ -ᵥ p₂⟫_ℝ = 0", " midpoint ℝ p₁ p₂ ∈ perpBisector p₁ p₂", " (perpBisec...
[ " c ∈ perpBisector p₁ p₂ ↔ ⟪(Equiv.pointReflection c) p₁ -ᵥ p₂, p₂ -ᵥ p₁⟫_ℝ = 0", " 2⁻¹ * ⟪c -ᵥ p₁ + (c -ᵥ p₂), p₂ -ᵥ p₁⟫_ℝ = 0 ↔ ⟪c -ᵥ p₁ + (c -ᵥ p₂), p₂ -ᵥ p₁⟫_ℝ = 0", " c ∈ perpBisector p₁ ((Equiv.pointReflection p₂) p₁) ↔ ⟪c -ᵥ p₂, p₁ -ᵥ p₂⟫_ℝ = 0", " midpoint ℝ p₁ p₂ ∈ perpBisector p₁ p₂", " (perpBisec...
import Mathlib.RingTheory.Ideal.QuotientOperations import Mathlib.RingTheory.Localization.Basic #align_import ring_theory.localization.ideal from "leanprover-community/mathlib"@"e7f0ddbf65bd7181a85edb74b64bdc35ba4bdc74" namespace IsLocalization section CommSemiring variable {R : Type*} [CommSemiring R] (M : Sub...
Mathlib/RingTheory/Localization/Ideal.lean
78
89
theorem comap_map_of_isPrime_disjoint (I : Ideal R) (hI : I.IsPrime) (hM : Disjoint (M : Set R) I) : Ideal.comap (algebraMap R S) (Ideal.map (algebraMap R S) I) = I := by
refine le_antisymm ?_ Ideal.le_comap_map refine (fun a ha => ?_) obtain ⟨⟨b, s⟩, h⟩ := (mem_map_algebraMap_iff M S).1 (Ideal.mem_comap.1 ha) replace h : algebraMap R S (s * a) = algebraMap R S b := by simpa only [← map_mul, mul_comm] using h obtain ⟨c, hc⟩ := (eq_iff_exists M S).1 h have : ↑c * ↑s * a ...
[ " ∀ {a b : S},\n a ∈ {z | ∃ x, z * (algebraMap R S) ↑x.2 = (algebraMap R S) ↑x.1} →\n b ∈ {z | ∃ x, z * (algebraMap R S) ↑x.2 = (algebraMap R S) ↑x.1} →\n a + b ∈ {z | ∃ x, z * (algebraMap R S) ↑x.2 = (algebraMap R S) ↑x.1}", " a + b ∈ {z | ∃ x, z * (algebraMap R S) ↑x.2 = (algebraMap R S) ↑x.1}", ...
[ " ∀ {a b : S},\n a ∈ {z | ∃ x, z * (algebraMap R S) ↑x.2 = (algebraMap R S) ↑x.1} →\n b ∈ {z | ∃ x, z * (algebraMap R S) ↑x.2 = (algebraMap R S) ↑x.1} →\n a + b ∈ {z | ∃ x, z * (algebraMap R S) ↑x.2 = (algebraMap R S) ↑x.1}", " a + b ∈ {z | ∃ x, z * (algebraMap R S) ↑x.2 = (algebraMap R S) ↑x.1}", ...
import Mathlib.Data.List.Lattice import Mathlib.Data.List.Range import Mathlib.Data.Bool.Basic #align_import data.list.intervals from "leanprover-community/mathlib"@"7b78d1776212a91ecc94cf601f83bdcc46b04213" open Nat namespace List def Ico (n m : ℕ) : List ℕ := range' n (m - n) #align list.Ico List.Ico names...
Mathlib/Data/List/Intervals.lean
72
73
theorem eq_nil_of_le {n m : ℕ} (h : m ≤ n) : Ico n m = [] := by
simp [Ico, Nat.sub_eq_zero_iff_le.mpr h]
[ " Ico 0 n = range n", " (Ico n m).length = m - n", " (range' n (m - n)).length = m - n", " Pairwise (fun x x_1 => x < x_1) (Ico n m)", " Pairwise (fun x x_1 => x < x_1) (range' n (m - n))", " (Ico n m).Nodup", " (range' n (m - n)).Nodup", " l ∈ Ico n m ↔ n ≤ l ∧ l < m", " n ≤ l ∧ l < n + (m - n) ↔ n...
[ " Ico 0 n = range n", " (Ico n m).length = m - n", " (range' n (m - n)).length = m - n", " Pairwise (fun x x_1 => x < x_1) (Ico n m)", " Pairwise (fun x x_1 => x < x_1) (range' n (m - n))", " (Ico n m).Nodup", " (range' n (m - n)).Nodup", " l ∈ Ico n m ↔ n ≤ l ∧ l < m", " n ≤ l ∧ l < n + (m - n) ↔ n...
import Mathlib.Algebra.GCDMonoid.Finset import Mathlib.Algebra.Polynomial.CancelLeads import Mathlib.Algebra.Polynomial.EraseLead import Mathlib.Algebra.Polynomial.FieldDivision #align_import ring_theory.polynomial.content from "leanprover-community/mathlib"@"7a030ab8eb5d99f05a891dccc49c5b5b90c947d3" namespace Po...
Mathlib/RingTheory/Polynomial/Content.lean
134
137
theorem content_X_pow {k : ℕ} : content ((X : R[X]) ^ k) = 1 := by
induction' k with k hi · simp rw [pow_succ', content_X_mul, hi]
[ " p.content ∣ p.coeff n", " p.content ∣ 0", " (C r).content = normalize r", " (C r).support.gcd (C r).coeff = normalize r", " content 0 = 0", " content 1 = 1", " (X * p).content = p.content", " (Multiset.map (X * p).coeff (X * p).support.val).gcd = (Multiset.map p.coeff p.support.val).gcd", " Multis...
[ " p.content ∣ p.coeff n", " p.content ∣ 0", " (C r).content = normalize r", " (C r).support.gcd (C r).coeff = normalize r", " content 0 = 0", " content 1 = 1", " (X * p).content = p.content", " (Multiset.map (X * p).coeff (X * p).support.val).gcd = (Multiset.map p.coeff p.support.val).gcd", " Multis...
import Mathlib.Algebra.MvPolynomial.Variables #align_import data.mv_polynomial.comm_ring from "leanprover-community/mathlib"@"2f5b500a507264de86d666a5f87ddb976e2d8de4" noncomputable section open Set Function Finsupp AddMonoidAlgebra universe u v variable {R : Type u} {S : Type v} namespace MvPolynomial varia...
Mathlib/Algebra/MvPolynomial/CommRing.lean
203
204
theorem totalDegree_neg (a : MvPolynomial σ R) : (-a).totalDegree = a.totalDegree := by
simp only [totalDegree, support_neg]
[ " (-a).totalDegree = a.totalDegree" ]
[ " (-a).totalDegree = a.totalDegree" ]
import Batteries.Classes.SatisfiesM namespace Array theorem SatisfiesM_foldlM [Monad m] [LawfulMonad m] {as : Array α} (motive : Nat → β → Prop) {init : β} (h0 : motive 0 init) {f : β → α → m β} (hf : ∀ i : Fin as.size, ∀ b, motive i.1 b → SatisfiesM (motive (i.1 + 1)) (f b as[i])) : SatisfiesM (motive...
.lake/packages/batteries/Batteries/Data/Array/Monadic.lean
32
48
theorem SatisfiesM_mapM [Monad m] [LawfulMonad m] (as : Array α) (f : α → m β) (motive : Nat → Prop) (h0 : motive 0) (p : Fin as.size → β → Prop) (hs : ∀ i, motive i.1 → SatisfiesM (p i · ∧ motive (i + 1)) (f as[i])) : SatisfiesM (fun arr => motive as.size ∧ ∃ eq : arr.size = as.size, ∀ i h, p ⟨i,...
rw [mapM_eq_foldlM] refine SatisfiesM_foldlM (m := m) (β := Array β) (motive := fun i arr => motive i ∧ arr.size = i ∧ ∀ i h2, p i (arr[i.1]'h2)) ?z ?s |>.imp fun ⟨h₁, eq, h₂⟩ => ⟨h₁, eq, fun _ _ => h₂ ..⟩ · case z => exact ⟨h0, rfl, nofun⟩ · case s => intro ⟨i, hi⟩ arr ⟨ih₁, eq, ih₂⟩ refine (h...
[ " SatisfiesM (motive as.size) (foldlM f init as 0)", " SatisfiesM (motive as.size) (foldlM.loop f as as.size ⋯ i j b)", " SatisfiesM (motive as.size)\n (if hlt : j < as.size then\n match i with\n | 0 => pure b\n | i'.succ =>\n let_fun this := ⋯;\n do\n let __do_lift ← f b ...
[ " SatisfiesM (motive as.size) (foldlM f init as 0)", " SatisfiesM (motive as.size) (foldlM.loop f as as.size ⋯ i j b)", " SatisfiesM (motive as.size)\n (if hlt : j < as.size then\n match i with\n | 0 => pure b\n | i'.succ =>\n let_fun this := ⋯;\n do\n let __do_lift ← f b ...
import Mathlib.Algebra.NeZero import Mathlib.Algebra.Polynomial.BigOperators import Mathlib.Algebra.Polynomial.Lifts import Mathlib.Algebra.Polynomial.Splits import Mathlib.RingTheory.RootsOfUnity.Complex import Mathlib.NumberTheory.ArithmeticFunction import Mathlib.RingTheory.RootsOfUnity.Basic import Mathlib.FieldTh...
Mathlib/RingTheory/Polynomial/Cyclotomic/Basic.lean
131
141
theorem X_pow_sub_one_eq_prod {ζ : R} {n : ℕ} (hpos : 0 < n) (h : IsPrimitiveRoot ζ n) : X ^ n - 1 = ∏ ζ ∈ nthRootsFinset n R, (X - C ζ) := by
classical rw [nthRootsFinset, ← Multiset.toFinset_eq (IsPrimitiveRoot.nthRoots_one_nodup h)] simp only [Finset.prod_mk, RingHom.map_one] rw [nthRoots] have hmonic : (X ^ n - C (1 : R)).Monic := monic_X_pow_sub_C (1 : R) (ne_of_lt hpos).symm symm apply prod_multiset_X_sub_C_of_monic_of_roots_card_eq hmoni...
[ " cyclotomic' 0 R = 1", " cyclotomic' 1 R = X - 1", " cyclotomic' 2 R = X + 1", " ∏ μ ∈ primitiveRoots 2 R, (X - C μ) = X + 1", " primitiveRoots 2 R = {-1}", " IsPrimitiveRoot (-1) 2 ∧ ∀ (x : R), IsPrimitiveRoot x 2 → x = -1", " (cyclotomic' n R).natDegree = n.totient", " (∏ μ ∈ primitiveRoots n R, (X...
[ " cyclotomic' 0 R = 1", " cyclotomic' 1 R = X - 1", " cyclotomic' 2 R = X + 1", " ∏ μ ∈ primitiveRoots 2 R, (X - C μ) = X + 1", " primitiveRoots 2 R = {-1}", " IsPrimitiveRoot (-1) 2 ∧ ∀ (x : R), IsPrimitiveRoot x 2 → x = -1", " (cyclotomic' n R).natDegree = n.totient", " (∏ μ ∈ primitiveRoots n R, (X...
import Mathlib.Data.Fintype.Card import Mathlib.Data.Finset.Prod #align_import data.fintype.prod from "leanprover-community/mathlib"@"509de852e1de55e1efa8eacfa11df0823f26f226" open Function open Nat universe u v variable {α β γ : Type*} open Finset Function instance instFintypeProd (α β : Type*) [Fintype α] ...
Mathlib/Data/Fintype/Prod.lean
69
76
theorem infinite_prod : Infinite (α × β) ↔ Infinite α ∧ Nonempty β ∨ Nonempty α ∧ Infinite β := by
refine ⟨fun H => ?_, fun H => H.elim (and_imp.2 <| @Prod.infinite_of_left α β) (and_imp.2 <| @Prod.infinite_of_right α β)⟩ rw [and_comm]; contrapose! H; intro H' rcases Infinite.nonempty (α × β) with ⟨a, b⟩ haveI := fintypeOfNotInfinite (H.1 ⟨b⟩); haveI := fintypeOfNotInfinite (H.2 ⟨a⟩) exact H'.fa...
[ " (a, b) ∈ univ ×ˢ univ", " Infinite (α × β) ↔ Infinite α ∧ Nonempty β ∨ Nonempty α ∧ Infinite β", " Infinite α ∧ Nonempty β ∨ Nonempty α ∧ Infinite β", " Nonempty β ∧ Infinite α ∨ Nonempty α ∧ Infinite β", " ¬Infinite (α × β)", " False" ]
[ " (a, b) ∈ univ ×ˢ univ", " Infinite (α × β) ↔ Infinite α ∧ Nonempty β ∨ Nonempty α ∧ Infinite β" ]
import Mathlib.Data.List.Cycle import Mathlib.GroupTheory.Perm.Cycle.Type import Mathlib.GroupTheory.Perm.List #align_import group_theory.perm.cycle.concrete from "leanprover-community/mathlib"@"00638177efd1b2534fc5269363ebf42a7871df9a" open Equiv Equiv.Perm List variable {α : Type*} namespace List variable [D...
Mathlib/GroupTheory/Perm/Cycle/Concrete.lean
73
86
theorem isCycle_formPerm (hl : Nodup l) (hn : 2 ≤ l.length) : IsCycle (formPerm l) := by
cases' l with x l · set_option tactic.skipAssignedInstances false in norm_num at hn induction' l with y l generalizing x · set_option tactic.skipAssignedInstances false in norm_num at hn · use x constructor · rwa [formPerm_apply_mem_ne_self_iff _ hl _ (mem_cons_self _ _)] · intro w hw have ...
[ " l.formPerm.Disjoint l'.formPerm ↔ l.Disjoint l'", " (∀ (x : α), l.formPerm x = x ∨ l'.formPerm x = x) ↔ ∀ ⦃a : α⦄, a ∈ l → a ∈ l' → False", " (∀ (x : α), l.formPerm x = x ∨ l'.formPerm x = x) → ∀ ⦃a : α⦄, a ∈ l → a ∈ l' → False", " False", " (∀ ⦃a : α⦄, a ∈ l → a ∈ l' → False) → ∀ (x : α), l.formPerm x = ...
[ " l.formPerm.Disjoint l'.formPerm ↔ l.Disjoint l'", " (∀ (x : α), l.formPerm x = x ∨ l'.formPerm x = x) ↔ ∀ ⦃a : α⦄, a ∈ l → a ∈ l' → False", " (∀ (x : α), l.formPerm x = x ∨ l'.formPerm x = x) → ∀ ⦃a : α⦄, a ∈ l → a ∈ l' → False", " False", " (∀ ⦃a : α⦄, a ∈ l → a ∈ l' → False) → ∀ (x : α), l.formPerm x = ...
import Mathlib.Topology.MetricSpace.HausdorffDistance import Mathlib.MeasureTheory.Constructions.BorelSpace.Order #align_import measure_theory.measure.regular from "leanprover-community/mathlib"@"bf6a01357ff5684b1ebcd0f1a13be314fc82c0bf" open Set Filter ENNReal Topology NNReal TopologicalSpace namespace MeasureTh...
Mathlib/MeasureTheory/Measure/Regular.lean
222
228
theorem exists_subset_lt_add (H : InnerRegularWRT μ p q) (h0 : p ∅) (hU : q U) (hμU : μ U ≠ ∞) (hε : ε ≠ 0) : ∃ K, K ⊆ U ∧ p K ∧ μ U < μ K + ε := by
rcases eq_or_ne (μ U) 0 with h₀ | h₀ · refine ⟨∅, empty_subset _, h0, ?_⟩ rwa [measure_empty, h₀, zero_add, pos_iff_ne_zero] · rcases H hU _ (ENNReal.sub_lt_self hμU h₀ hε) with ⟨K, hKU, hKc, hrK⟩ exact ⟨K, hKU, hKc, ENNReal.lt_add_of_sub_lt_right (Or.inl hμU) hrK⟩
[ " μ U = ⨆ K, ⨆ (_ : K ⊆ U), ⨆ (_ : p K), μ K", " r < ⨆ K, ⨆ (_ : K ⊆ U), ⨆ (_ : p K), μ K", " ∃ K ⊆ U, p K ∧ μ U < μ K + ε", " μ U < μ ∅ + ε" ]
[ " μ U = ⨆ K, ⨆ (_ : K ⊆ U), ⨆ (_ : p K), μ K", " r < ⨆ K, ⨆ (_ : K ⊆ U), ⨆ (_ : p K), μ K", " ∃ K ⊆ U, p K ∧ μ U < μ K + ε" ]
import Mathlib.Algebra.Order.Ring.Abs import Mathlib.Tactic.Ring #align_import data.nat.hyperoperation from "leanprover-community/mathlib"@"f7fc89d5d5ff1db2d1242c7bb0e9062ce47ef47c" def hyperoperation : ℕ → ℕ → ℕ → ℕ | 0, _, k => k + 1 | 1, m, 0 => m | 2, _, 0 => 0 | _ + 3, _, 0 => 1 | n + 1, m, k + 1 ...
Mathlib/Data/Nat/Hyperoperation.lean
91
95
theorem hyperoperation_ge_two_eq_self (n m : ℕ) : hyperoperation (n + 2) m 1 = m := by
induction' n with nn nih · rw [hyperoperation_two] ring · rw [hyperoperation_recursion, hyperoperation_ge_three_eq_one, nih]
[ " hyperoperation 0 m k = k.succ", " hyperoperation (n + 3) m 0 = 1", " hyperoperation (n + 1) m (k + 1) = hyperoperation n m (hyperoperation (n + 1) m k)", " hyperoperation 1 = fun x x_1 => x + x_1", " hyperoperation 1 m k = m + k", " hyperoperation 1 m 0 = m + 0", " hyperoperation 1 m (bn + 1) = m + (b...
[ " hyperoperation 0 m k = k.succ", " hyperoperation (n + 3) m 0 = 1", " hyperoperation (n + 1) m (k + 1) = hyperoperation n m (hyperoperation (n + 1) m k)", " hyperoperation 1 = fun x x_1 => x + x_1", " hyperoperation 1 m k = m + k", " hyperoperation 1 m 0 = m + 0", " hyperoperation 1 m (bn + 1) = m + (b...
import Mathlib.Geometry.Euclidean.Angle.Oriented.Affine import Mathlib.Geometry.Euclidean.Angle.Unoriented.RightAngle #align_import geometry.euclidean.angle.oriented.right_angle from "leanprover-community/mathlib"@"46b633fd842bef9469441c0209906f6dddd2b4f5" noncomputable section open scoped EuclideanGeometry ope...
Mathlib/Geometry/Euclidean/Angle/Oriented/RightAngle.lean
592
597
theorem oangle_left_eq_arccos_of_oangle_eq_pi_div_two {p₁ p₂ p₃ : P} (h : ∡ p₁ p₂ p₃ = ↑(π / 2)) : ∡ p₃ p₁ p₂ = Real.arccos (dist p₁ p₂ / dist p₁ p₃) := by
have hs : (∡ p₃ p₁ p₂).sign = 1 := by rw [← oangle_rotate_sign, h, Real.Angle.sign_coe_pi_div_two] rw [oangle_eq_angle_of_sign_eq_one hs, angle_comm, angle_eq_arccos_of_angle_eq_pi_div_two (angle_rev_eq_pi_div_two_of_oangle_eq_pi_div_two h), dist_comm p₁ p₃]
[ " ∡ p₂ p₃ p₁ = ↑(dist p₃ p₂ / dist p₁ p₃).arccos", " (∡ p₂ p₃ p₁).sign = 1", " ∡ p₃ p₁ p₂ = ↑(dist p₁ p₂ / dist p₁ p₃).arccos", " (∡ p₃ p₁ p₂).sign = 1" ]
[ " ∡ p₂ p₃ p₁ = ↑(dist p₃ p₂ / dist p₁ p₃).arccos", " (∡ p₂ p₃ p₁).sign = 1", " ∡ p₃ p₁ p₂ = ↑(dist p₁ p₂ / dist p₁ p₃).arccos" ]
import Mathlib.Analysis.NormedSpace.ConformalLinearMap import Mathlib.Analysis.Calculus.FDeriv.Add #align_import analysis.calculus.conformal.normed_space from "leanprover-community/mathlib"@"e3fb84046afd187b710170887195d50bada934ee" noncomputable section variable {X Y Z : Type*} [NormedAddCommGroup X] [NormedAdd...
Mathlib/Analysis/Calculus/Conformal/NormedSpace.lean
73
82
theorem conformalAt_iff_isConformalMap_fderiv {f : X → Y} {x : X} : ConformalAt f x ↔ IsConformalMap (fderiv ℝ f x) := by
constructor · rintro ⟨f', hf, hf'⟩ rwa [hf.fderiv] · intro H by_cases h : DifferentiableAt ℝ f x · exact ⟨fderiv ℝ f x, h.hasFDerivAt, H⟩ · nontriviality X exact absurd (fderiv_zero_of_not_differentiableAt h) H.ne_zero
[ " ConformalAt f x ↔ IsConformalMap (fderiv ℝ f x)", " ConformalAt f x → IsConformalMap (fderiv ℝ f x)", " IsConformalMap (fderiv ℝ f x)", " IsConformalMap (fderiv ℝ f x) → ConformalAt f x", " ConformalAt f x" ]
[ " ConformalAt f x ↔ IsConformalMap (fderiv ℝ f x)" ]
import Mathlib.Init.Logic import Mathlib.Init.Function import Mathlib.Init.Algebra.Classes import Batteries.Util.LibraryNote import Batteries.Tactic.Lint.Basic #align_import logic.basic from "leanprover-community/mathlib"@"3365b20c2ffa7c35e47e5209b89ba9abdddf3ffe" #align_import init.ite_simp from "leanprover-communit...
Mathlib/Logic/Basic.lean
59
61
theorem congr_heq {α β γ : Sort _} {f : α → γ} {g : β → γ} {x : α} {y : β} (h₁ : HEq f g) (h₂ : HEq x y) : f x = g y := by
cases h₂; cases h₁; rfl
[ " ⟨x, property✝¹⟩ = ⟨y, property✝⟩", " ⟨x, property✝¹⟩ = ⟨x, property✝⟩", " f x = g y", " f x = g x", " f x = f x" ]
[ " ⟨x, property✝¹⟩ = ⟨y, property✝⟩", " ⟨x, property✝¹⟩ = ⟨x, property✝⟩", " f x = g y" ]
import Mathlib.Algebra.Order.Kleene import Mathlib.Algebra.Ring.Hom.Defs import Mathlib.Data.List.Join import Mathlib.Data.Set.Lattice import Mathlib.Tactic.DeriveFintype #align_import computability.language from "leanprover-community/mathlib"@"a239cd3e7ac2c7cde36c913808f9d40c411344f6" open List Set Computability...
Mathlib/Computability/Language.lean
175
176
theorem map_map (g : β → γ) (f : α → β) (l : Language α) : map g (map f l) = map (g ∘ f) l := by
simp [map, image_image]
[ " x ∈ 1 ↔ x = []", " x✝ ∈ l", " 1 * l = l", " l * 1 = l", " NatCast.natCast (n + 1) = NatCast.natCast n + 1", " NatCast.natCast (0 + 1) = NatCast.natCast 0 + 1", " NatCast.natCast (n✝ + 1 + 1) = NatCast.natCast (n✝ + 1) + 1", " (map id) l = l", " (map g) ((map f) l) = (map (g ∘ f)) l" ]
[ " x ∈ 1 ↔ x = []", " x✝ ∈ l", " 1 * l = l", " l * 1 = l", " NatCast.natCast (n + 1) = NatCast.natCast n + 1", " NatCast.natCast (0 + 1) = NatCast.natCast 0 + 1", " NatCast.natCast (n✝ + 1 + 1) = NatCast.natCast (n✝ + 1) + 1", " (map id) l = l", " (map g) ((map f) l) = (map (g ∘ f)) l" ]
import Mathlib.RingTheory.GradedAlgebra.HomogeneousIdeal import Mathlib.Topology.Category.TopCat.Basic import Mathlib.Topology.Sets.Opens import Mathlib.Data.Set.Subsingleton #align_import algebraic_geometry.projective_spectrum.topology from "leanprover-community/mathlib"@"d39590fc8728fbf6743249802486f8c91ffe07bc" ...
Mathlib/AlgebraicGeometry/ProjectiveSpectrum/Topology.lean
99
106
theorem coe_vanishingIdeal (t : Set (ProjectiveSpectrum 𝒜)) : (vanishingIdeal t : Set A) = { f | ∀ x : ProjectiveSpectrum 𝒜, x ∈ t → f ∈ x.asHomogeneousIdeal } := by
ext f rw [vanishingIdeal, SetLike.mem_coe, ← HomogeneousIdeal.mem_iff, HomogeneousIdeal.toIdeal_iInf, Submodule.mem_iInf] refine forall_congr' fun x => ?_ rw [HomogeneousIdeal.toIdeal_iInf, Submodule.mem_iInf, HomogeneousIdeal.mem_iff]
[ " zeroLocus 𝒜 ↑(Ideal.span s) = zeroLocus 𝒜 s", " x ∈ zeroLocus 𝒜 ↑(Ideal.span s) ↔ x ∈ zeroLocus 𝒜 s", " ↑(vanishingIdeal t) = {f | ∀ x ∈ t, f ∈ x.asHomogeneousIdeal}", " f ∈ ↑(vanishingIdeal t) ↔ f ∈ {f | ∀ x ∈ t, f ∈ x.asHomogeneousIdeal}", " (∀ (i : ProjectiveSpectrum 𝒜), f ∈ (⨅ (_ : i ∈ t), i.asHo...
[ " zeroLocus 𝒜 ↑(Ideal.span s) = zeroLocus 𝒜 s", " x ∈ zeroLocus 𝒜 ↑(Ideal.span s) ↔ x ∈ zeroLocus 𝒜 s", " ↑(vanishingIdeal t) = {f | ∀ x ∈ t, f ∈ x.asHomogeneousIdeal}" ]
import Mathlib.Algebra.Polynomial.Degree.Definitions import Mathlib.Algebra.Polynomial.Eval import Mathlib.Algebra.Polynomial.Monic import Mathlib.Algebra.Polynomial.RingDivision import Mathlib.Tactic.Abel #align_import ring_theory.polynomial.pochhammer from "leanprover-community/mathlib"@"53b216bcc1146df1c4a0a868778...
Mathlib/RingTheory/Polynomial/Pochhammer.lean
262
269
theorem monic_descPochhammer (n : ℕ) [Nontrivial R] [NoZeroDivisors R] : Monic <| descPochhammer R n := by
induction' n with n hn · simp · have h : leadingCoeff (X - 1 : R[X]) = 1 := leadingCoeff_X_sub_C 1 have : natDegree (X - (1 : R[X])) ≠ 0 := ne_zero_of_eq_one <| natDegree_X_sub_C (1 : R) rw [descPochhammer_succ_left, Monic.def, leadingCoeff_mul, leadingCoeff_comp this, hn, monic_X, one_mul, one_m...
[ " descPochhammer R 1 = X", " descPochhammer R (n + 1) = X * (descPochhammer R n).comp (X - 1)", " (descPochhammer R n).Monic", " (descPochhammer R 0).Monic", " (descPochhammer R (n + 1)).Monic" ]
[ " descPochhammer R 1 = X", " descPochhammer R (n + 1) = X * (descPochhammer R n).comp (X - 1)", " (descPochhammer R n).Monic" ]
import Mathlib.Analysis.Analytic.Basic import Mathlib.Analysis.Complex.Basic import Mathlib.Analysis.Normed.Field.InfiniteSum import Mathlib.Data.Nat.Choose.Cast import Mathlib.Data.Finset.NoncommProd import Mathlib.Topology.Algebra.Algebra #align_import analysis.normed_space.exponential from "leanprover-community/ma...
Mathlib/Analysis/NormedSpace/Exponential.lean
145
146
theorem exp_zero : exp 𝕂 (0 : 𝔸) = 1 := by
simp_rw [exp_eq_tsum, ← expSeries_apply_eq, expSeries_apply_zero, tsum_pi_single]
[ " ((expSeries 𝕂 𝔸 n) fun x_1 => x) = (↑n !)⁻¹ • x ^ n", " ((expSeries 𝕂 𝔸 n) fun x => 0) = Pi.single 0 1 n", " (↑n !)⁻¹ • 0 ^ n = Pi.single 0 1 n", " (↑0!)⁻¹ • 0 ^ 0 = Pi.single 0 1 0", " (↑(n + 1)!)⁻¹ • 0 ^ (n + 1) = Pi.single 0 1 (n + 1)", " exp 𝕂 0 = 1" ]
[ " ((expSeries 𝕂 𝔸 n) fun x_1 => x) = (↑n !)⁻¹ • x ^ n", " ((expSeries 𝕂 𝔸 n) fun x => 0) = Pi.single 0 1 n", " (↑n !)⁻¹ • 0 ^ n = Pi.single 0 1 n", " (↑0!)⁻¹ • 0 ^ 0 = Pi.single 0 1 0", " (↑(n + 1)!)⁻¹ • 0 ^ (n + 1) = Pi.single 0 1 (n + 1)", " exp 𝕂 0 = 1" ]
import Mathlib.Analysis.Calculus.Deriv.Basic import Mathlib.Analysis.Calculus.FDeriv.Mul import Mathlib.Analysis.Calculus.FDeriv.Add #align_import analysis.calculus.deriv.mul from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe" universe u v w noncomputable section open scoped Classical...
Mathlib/Analysis/Calculus/Deriv/Mul.lean
242
245
theorem HasDerivWithinAt.mul_const (hc : HasDerivWithinAt c c' s x) (d : 𝔸) : HasDerivWithinAt (fun y => c y * d) (c' * d) s x := by
convert hc.mul (hasDerivWithinAt_const x s d) using 1 rw [mul_zero, add_zero]
[ " HasDerivWithinAt (fun y => c y * d y) (c' * d x + c x * d') s x", " HasDerivAt (fun y => c y * d y) (c' * d x + c x * d') x", " HasDerivWithinAt (fun y => c y * d y) (c' * d x + c x * d') univ x", " HasStrictDerivAt (fun y => c y * d y) (c' * d x + c x * d') x", " HasDerivWithinAt (fun y => c y * d) (c' *...
[ " HasDerivWithinAt (fun y => c y * d y) (c' * d x + c x * d') s x", " HasDerivAt (fun y => c y * d y) (c' * d x + c x * d') x", " HasDerivWithinAt (fun y => c y * d y) (c' * d x + c x * d') univ x", " HasStrictDerivAt (fun y => c y * d y) (c' * d x + c x * d') x", " HasDerivWithinAt (fun y => c y * d) (c' *...
import Mathlib.Algebra.DirectSum.Internal import Mathlib.Algebra.GradedMonoid import Mathlib.Algebra.MvPolynomial.CommRing import Mathlib.Algebra.MvPolynomial.Equiv import Mathlib.Algebra.MvPolynomial.Variables import Mathlib.RingTheory.MvPolynomial.WeightedHomogeneous import Mathlib.Algebra.Polynomial.Roots #align_i...
Mathlib/RingTheory/MvPolynomial/Homogeneous.lean
169
171
theorem inj_right (hm : IsHomogeneous φ m) (hn : IsHomogeneous φ n) (hφ : φ ≠ 0) : m = n := by
obtain ⟨d, hd⟩ : ∃ d, coeff d φ ≠ 0 := exists_coeff_ne_zero hφ rw [← hm hd, ← hn hd]
[ " (weightedDegree 1) d = degree d", " weightedTotalDegree 1 φ = φ.totalDegree", " (weightedDegree 1) c = n", " coeff c a ≠ 0 ∨ coeff c b ≠ 0", " coeff c a + coeff c b = 0", " coeff c a ≠ 0", " False", " r • coeff c a = 0", " r • 0 = 0", " homogeneousSubmodule σ R n = Finsupp.supported R R {d | deg...
[ " (weightedDegree 1) d = degree d", " weightedTotalDegree 1 φ = φ.totalDegree", " (weightedDegree 1) c = n", " coeff c a ≠ 0 ∨ coeff c b ≠ 0", " coeff c a + coeff c b = 0", " coeff c a ≠ 0", " False", " r • coeff c a = 0", " r • 0 = 0", " homogeneousSubmodule σ R n = Finsupp.supported R R {d | deg...
import Mathlib.Order.RelClasses #align_import data.sigma.lex from "leanprover-community/mathlib"@"41cf0cc2f528dd40a8f2db167ea4fb37b8fde7f3" namespace Sigma variable {ι : Type*} {α : ι → Type*} {r r₁ r₂ : ι → ι → Prop} {s s₁ s₂ : ∀ i, α i → α i → Prop} {a b : Σ i, α i} inductive Lex (r : ι → ι → Prop) (s : ∀ ...
Mathlib/Data/Sigma/Lex.lean
45
55
theorem lex_iff : Lex r s a b ↔ r a.1 b.1 ∨ ∃ h : a.1 = b.1, s b.1 (h.rec a.2) b.2 := by
constructor · rintro (⟨a, b, hij⟩ | ⟨a, b, hab⟩) · exact Or.inl hij · exact Or.inr ⟨rfl, hab⟩ · obtain ⟨i, a⟩ := a obtain ⟨j, b⟩ := b dsimp only rintro (h | ⟨rfl, h⟩) · exact Lex.left _ _ h · exact Lex.right _ _ h
[ " Lex r s a b ↔ r a.fst b.fst ∨ ∃ h, s b.fst (h ▸ a.snd) b.snd", " Lex r s a b → r a.fst b.fst ∨ ∃ h, s b.fst (h ▸ a.snd) b.snd", " r ⟨i✝, a⟩.fst ⟨j✝, b⟩.fst ∨ ∃ h, s ⟨j✝, b⟩.fst (h ▸ ⟨i✝, a⟩.snd) ⟨j✝, b⟩.snd", " r ⟨i✝, a⟩.fst ⟨i✝, b⟩.fst ∨ ∃ h, s ⟨i✝, b⟩.fst (h ▸ ⟨i✝, a⟩.snd) ⟨i✝, b⟩.snd", " (r a.fst b.fst...
[ " Lex r s a b ↔ r a.fst b.fst ∨ ∃ h, s b.fst (h ▸ a.snd) b.snd" ]
import Mathlib.GroupTheory.CoprodI import Mathlib.GroupTheory.Coprod.Basic import Mathlib.GroupTheory.QuotientGroup import Mathlib.GroupTheory.Complement namespace Monoid open CoprodI Subgroup Coprod Function List variable {ι : Type*} {G : ι → Type*} {H : Type*} {K : Type*} [Monoid K] def PushoutI.con [∀ i, Mo...
Mathlib/GroupTheory/PushoutI.lean
111
116
theorem lift_of (f : ∀ i, G i →* K) (k : H →* K) (hf : ∀ i, (f i).comp (φ i) = k) {i : ι} (g : G i) : (lift f k hf) (of i g : PushoutI φ) = f i g := by
delta PushoutI lift of simp only [MonoidHom.coe_comp, Con.coe_mk', comp_apply, Con.lift_coe, lift_apply_inl, CoprodI.lift_of]
[ " Mul (PushoutI φ)", " Mul (con φ).Quotient", " One (PushoutI φ)", " One (con φ).Quotient", " (of i).comp (φ i) = base φ", " ((of i).comp (φ i)) x = (base φ) x", " (con φ) ((inl.comp CoprodI.of) ((φ i) x)) (inr x)", " ∃ i_1 x', (inl.comp CoprodI.of) ((φ i) x) = inl (CoprodI.of ((φ i_1) x')) ∧ inr x = ...
[ " Mul (PushoutI φ)", " Mul (con φ).Quotient", " One (PushoutI φ)", " One (con φ).Quotient", " (of i).comp (φ i) = base φ", " ((of i).comp (φ i)) x = (base φ) x", " (con φ) ((inl.comp CoprodI.of) ((φ i) x)) (inr x)", " ∃ i_1 x', (inl.comp CoprodI.of) ((φ i) x) = inl (CoprodI.of ((φ i_1) x')) ∧ inr x = ...
import Mathlib.AlgebraicGeometry.Morphisms.QuasiCompact import Mathlib.Topology.QuasiSeparated #align_import algebraic_geometry.morphisms.quasi_separated from "leanprover-community/mathlib"@"1a51edf13debfcbe223fa06b1cb353b9ed9751cc" noncomputable section open CategoryTheory CategoryTheory.Limits Opposite Topolog...
Mathlib/AlgebraicGeometry/Morphisms/QuasiSeparated.lean
133
135
theorem quasiSeparated_eq_affineProperty : @QuasiSeparated = targetAffineLocally QuasiSeparated.affineProperty := by
rw [quasiSeparated_eq_affineProperty_diagonal, quasi_compact_affineProperty_diagonal_eq]
[ " QuasiSeparatedSpace ↑↑X.toPresheafedSpace ↔ ∀ (U V : ↑X.affineOpens), IsCompact (↑↑U ∩ ↑↑V)", " (∀ (U V : Set ↑↑X.toPresheafedSpace), IsOpen U → IsCompact U → IsOpen V → IsCompact V → IsCompact (U ∩ V)) ↔\n ∀ (U V : ↑X.affineOpens), IsCompact (↑↑U ∩ ↑↑V)", " (∀ (U V : Set ↑↑X.toPresheafedSpace), IsOpen U →...
[ " QuasiSeparatedSpace ↑↑X.toPresheafedSpace ↔ ∀ (U V : ↑X.affineOpens), IsCompact (↑↑U ∩ ↑↑V)", " (∀ (U V : Set ↑↑X.toPresheafedSpace), IsOpen U → IsCompact U → IsOpen V → IsCompact V → IsCompact (U ∩ V)) ↔\n ∀ (U V : ↑X.affineOpens), IsCompact (↑↑U ∩ ↑↑V)", " (∀ (U V : Set ↑↑X.toPresheafedSpace), IsOpen U →...
import Mathlib.Order.CompleteLattice import Mathlib.Order.GaloisConnection import Mathlib.Data.Set.Lattice import Mathlib.Tactic.AdaptationNote #align_import data.rel from "leanprover-community/mathlib"@"706d88f2b8fdfeb0b22796433d7a6c1a010af9f2" variable {α β γ : Type*} def Rel (α β : Type*) := α → β → Prop --...
Mathlib/Data/Rel.lean
136
138
theorem comp_right_top (r : Rel α β) : r • (⊤ : Rel β γ) = fun x _ ↦ x ∈ r.dom := by
ext x z simp [comp, Top.top, dom]
[ " r.inv.inv = r", " r.inv.inv x y ↔ r x y", " r.inv.codom = r.dom", " x ∈ r.inv.codom ↔ x ∈ r.dom", " r.inv.dom = r.codom", " x ∈ r.inv.dom ↔ x ∈ r.codom", " (r • s) • t = r • s • t", " (fun x z => ∃ y, (∃ y_1, r x y_1 ∧ s y_1 y) ∧ t y z) = fun x z => ∃ y, r x y ∧ ∃ y_1, s y y_1 ∧ t y_1 z", " (∃ y, ...
[ " r.inv.inv = r", " r.inv.inv x y ↔ r x y", " r.inv.codom = r.dom", " x ∈ r.inv.codom ↔ x ∈ r.dom", " r.inv.dom = r.codom", " x ∈ r.inv.dom ↔ x ∈ r.codom", " (r • s) • t = r • s • t", " (fun x z => ∃ y, (∃ y_1, r x y_1 ∧ s y_1 y) ∧ t y z) = fun x z => ∃ y, r x y ∧ ∃ y_1, s y y_1 ∧ t y_1 z", " (∃ y, ...
import Mathlib.Data.List.Defs import Mathlib.Data.Option.Basic import Mathlib.Data.Nat.Defs import Mathlib.Init.Data.List.Basic import Mathlib.Util.AssertExists -- Make sure we haven't imported `Data.Nat.Order.Basic` assert_not_exists OrderedSub namespace List universe u v variable {α : Type u} {β : Type v} (l :...
Mathlib/Data/List/GetD.lean
77
80
theorem getD_replicate_default_eq (r n : ℕ) : (replicate r d).getD n d = d := by
induction r generalizing n with | zero => simp | succ n ih => cases n <;> simp [ih]
[ " l.getD n d = l.get ⟨n, hn⟩", " [].getD n d = [].get ⟨n, hn⟩", " (head :: tail).getD n d = (head :: tail).get ⟨n, hn⟩", " (head :: tail).getD 0 d = (head :: tail).get ⟨0, hn⟩", " (head :: tail).getD (n✝ + 1) d = (head :: tail).get ⟨n✝ + 1, hn⟩", " (map f l).getD n (f d) = f (l.getD n d)", " (map f [])....
[ " l.getD n d = l.get ⟨n, hn⟩", " [].getD n d = [].get ⟨n, hn⟩", " (head :: tail).getD n d = (head :: tail).get ⟨n, hn⟩", " (head :: tail).getD 0 d = (head :: tail).get ⟨0, hn⟩", " (head :: tail).getD (n✝ + 1) d = (head :: tail).get ⟨n✝ + 1, hn⟩", " (map f l).getD n (f d) = f (l.getD n d)", " (map f [])....
import Mathlib.Data.Finset.Image import Mathlib.Data.Multiset.Pi #align_import data.finset.pi from "leanprover-community/mathlib"@"b2c89893177f66a48daf993b7ba5ef7cddeff8c9" namespace Finset open Multiset section Pi variable {α : Type*} def Pi.empty (β : α → Sort*) (a : α) (h : a ∈ (∅ : Finset α)) : β a :=...
Mathlib/Data/Finset/Pi.lean
115
123
theorem pi_singletons {β : Type*} (s : Finset α) (f : α → β) : (s.pi fun a => ({f a} : Finset β)) = {fun a _ => f a} := by
rw [eq_singleton_iff_unique_mem] constructor · simp intro a ha ext i hi rw [mem_pi] at ha simpa using ha i hi
[ " e ∈ insert a s", " cons s a b e₁ e ⋯ = cons s a b e₂ e ⋯", " (s.pi t).Nonempty ↔ ∀ a ∈ s, (t a).Nonempty", " (insert a s).pi t = (t a).biUnion fun b => image (Pi.cons s a b) (s.pi t)", " ((insert a s).pi t).val = ((t a).biUnion fun b => image (Pi.cons s a b) (s.pi t)).val", " ((insert a s).pi t).val.ded...
[ " e ∈ insert a s", " cons s a b e₁ e ⋯ = cons s a b e₂ e ⋯", " (s.pi t).Nonempty ↔ ∀ a ∈ s, (t a).Nonempty", " (insert a s).pi t = (t a).biUnion fun b => image (Pi.cons s a b) (s.pi t)", " ((insert a s).pi t).val = ((t a).biUnion fun b => image (Pi.cons s a b) (s.pi t)).val", " ((insert a s).pi t).val.ded...
import Mathlib.Algebra.Algebra.Unitization import Mathlib.Analysis.NormedSpace.OperatorNorm.Mul suppress_compilation variable (𝕜 A : Type*) [NontriviallyNormedField 𝕜] [NonUnitalNormedRing A] variable [NormedSpace 𝕜 A] [IsScalarTower 𝕜 A A] [SMulCommClass 𝕜 A A] open ContinuousLinearMap namespace Unitizati...
Mathlib/Analysis/NormedSpace/Unitization.lean
89
101
theorem splitMul_injective_of_clm_mul_injective (h : Function.Injective (mul 𝕜 A)) : Function.Injective (splitMul 𝕜 A) := by
rw [injective_iff_map_eq_zero] intro x hx induction x rw [map_add] at hx simp only [splitMul_apply, fst_inl, snd_inl, map_zero, add_zero, fst_inr, snd_inr, zero_add, Prod.mk_add_mk, Prod.mk_eq_zero] at hx obtain ⟨rfl, hx⟩ := hx simp only [map_zero, zero_add, inl_zero] at hx ⊢ rw [← map_zero (mul 𝕜...
[ " (x.fst + 0, (lift (NonUnitalAlgHom.Lmul 𝕜 A)).toRingHom x) =\n (x.fst, (algebraMap 𝕜 (A →L[𝕜] A)) x.fst + (mul 𝕜 A) x.snd)", " (x.fst, (lift (NonUnitalAlgHom.Lmul 𝕜 A)).toRingHom x) = (x.fst, (algebraMap 𝕜 (A →L[𝕜] A)) x.fst + (mul 𝕜 A) x.snd)", " Function.Injective ⇑(splitMul 𝕜 A)", " ∀ (a : Un...
[ " (x.fst + 0, (lift (NonUnitalAlgHom.Lmul 𝕜 A)).toRingHom x) =\n (x.fst, (algebraMap 𝕜 (A →L[𝕜] A)) x.fst + (mul 𝕜 A) x.snd)", " (x.fst, (lift (NonUnitalAlgHom.Lmul 𝕜 A)).toRingHom x) = (x.fst, (algebraMap 𝕜 (A →L[𝕜] A)) x.fst + (mul 𝕜 A) x.snd)", " Function.Injective ⇑(splitMul 𝕜 A)" ]
import Mathlib.Data.Matrix.Invertible import Mathlib.LinearAlgebra.Matrix.NonsingularInverse import Mathlib.LinearAlgebra.Matrix.PosDef #align_import linear_algebra.matrix.schur_complement from "leanprover-community/mathlib"@"a176cb1219e300e85793d44583dede42377b51af" variable {l m n α : Type*} namespace Matrix ...
Mathlib/LinearAlgebra/Matrix/SchurComplement.lean
444
446
theorem det_one_add_col_mul_row (u v : m → α) : det (1 + col u * row v) = 1 + v ⬝ᵥ u := by
rw [det_one_add_mul_comm, det_unique, Pi.add_apply, Pi.add_apply, Matrix.one_apply_eq, Matrix.row_mul_col_apply]
[ " A.fromBlocks B C D = fromBlocks 1 0 (C * ⅟A) 1 * A.fromBlocks 0 0 (D - C * ⅟A * B) * fromBlocks 1 (⅟A * B) 0 1", " (reindex (Equiv.sumComm l n) (Equiv.sumComm m n)) (A.fromBlocks B C D) =\n (reindex (Equiv.sumComm l n) (Equiv.sumComm m n))\n (fromBlocks 1 (B * ⅟D) 0 1 * (A - B * ⅟D * C).fromBlocks 0 0 D...
[ " A.fromBlocks B C D = fromBlocks 1 0 (C * ⅟A) 1 * A.fromBlocks 0 0 (D - C * ⅟A * B) * fromBlocks 1 (⅟A * B) 0 1", " (reindex (Equiv.sumComm l n) (Equiv.sumComm m n)) (A.fromBlocks B C D) =\n (reindex (Equiv.sumComm l n) (Equiv.sumComm m n))\n (fromBlocks 1 (B * ⅟D) 0 1 * (A - B * ⅟D * C).fromBlocks 0 0 D...
import Mathlib.CategoryTheory.Abelian.Subobject import Mathlib.CategoryTheory.Limits.EssentiallySmall import Mathlib.CategoryTheory.Preadditive.Injective import Mathlib.CategoryTheory.Preadditive.Generator import Mathlib.CategoryTheory.Abelian.Opposite #align_import category_theory.abelian.generator from "leanprover-...
Mathlib/CategoryTheory/Abelian/Generator.lean
55
58
theorem has_projective_separator [HasColimits C] [EnoughProjectives C] (G : C) (hG : IsCoseparator G) : ∃ G : C, Projective G ∧ IsSeparator G := by
obtain ⟨T, hT₁, hT₂⟩ := has_injective_coseparator (op G) ((isSeparator_op_iff _).2 hG) exact ⟨unop T, inferInstance, (isSeparator_unop_iff _).2 hT₂⟩
[ " ∃ G, Injective G ∧ IsCoseparator G", " f = 0", " h ≫ f = 0", " factorThruImage (h ≫ f) = 0", " factorThruImage (h ≫ f) ≫ q = 0", " ∃ G, Projective G ∧ IsSeparator G" ]
[ " ∃ G, Injective G ∧ IsCoseparator G", " f = 0", " h ≫ f = 0", " factorThruImage (h ≫ f) = 0", " factorThruImage (h ≫ f) ≫ q = 0", " ∃ G, Projective G ∧ IsSeparator G" ]
import Mathlib.Analysis.NormedSpace.Star.Basic import Mathlib.Analysis.NormedSpace.Unitization #align_import analysis.normed_space.star.mul from "leanprover-community/mathlib"@"b2ff9a3d7a15fd5b0f060b135421d6a89a999c2f" open ContinuousLinearMap local postfix:max "⋆" => star variable (𝕜 : Type*) {E : Type*} varia...
Mathlib/Analysis/NormedSpace/Star/Unitization.lean
87
124
theorem Unitization.norm_splitMul_snd_sq (x : Unitization 𝕜 E) : ‖(Unitization.splitMul 𝕜 E x).snd‖ ^ 2 ≤ ‖(Unitization.splitMul 𝕜 E (star x * x)).snd‖ := by
/- The key idea is that we can use `sSup_closed_unit_ball_eq_norm` to make this about applying this linear map to elements of norm at most one. There is a bit of `sqrt` and `sq` shuffling that needs to occur, which is primarily just an annoyance. -/ refine (Real.le_sqrt (norm_nonneg _) (norm_nonneg _)).mp ?_ ...
[ " ‖(mul 𝕜 E) a‖₊ = ‖a‖₊", " sSup ((fun x => ‖((mul 𝕜 E) a) x‖₊) '' Metric.closedBall 0 1) = ‖a‖₊", " ((fun x => ‖((mul 𝕜 E) a) x‖₊) '' Metric.closedBall 0 1).Nonempty", " ∀ a_1 ∈ (fun x => ‖((mul 𝕜 E) a) x‖₊) '' Metric.closedBall 0 1, a_1 ≤ ‖a‖₊", " (fun x => ‖((mul 𝕜 E) a) x‖₊) x ≤ ‖a‖₊", " ∃ a_1 ∈ ...
[ " ‖(mul 𝕜 E) a‖₊ = ‖a‖₊", " sSup ((fun x => ‖((mul 𝕜 E) a) x‖₊) '' Metric.closedBall 0 1) = ‖a‖₊", " ((fun x => ‖((mul 𝕜 E) a) x‖₊) '' Metric.closedBall 0 1).Nonempty", " ∀ a_1 ∈ (fun x => ‖((mul 𝕜 E) a) x‖₊) '' Metric.closedBall 0 1, a_1 ≤ ‖a‖₊", " (fun x => ‖((mul 𝕜 E) a) x‖₊) x ≤ ‖a‖₊", " ∃ a_1 ∈ ...
import Mathlib.Data.Countable.Basic import Mathlib.Logic.Encodable.Basic import Mathlib.Order.SuccPred.Basic import Mathlib.Order.Interval.Finset.Defs #align_import order.succ_pred.linear_locally_finite from "leanprover-community/mathlib"@"2705404e701abc6b3127da906f40bae062a169c9" open Order variable {ι : Type*}...
Mathlib/Order/SuccPred/LinearLocallyFinite.lean
102
105
theorem succFn_le_of_lt (i j : ι) (hij : i < j) : succFn i ≤ j := by
have h := succFn_spec i rw [IsGLB, IsGreatest, mem_lowerBounds] at h exact h.1 j hij
[ " i ≤ succFn i", " ∀ x ∈ Set.Ioi i, i ≤ x", " IsGLB (Set.Ioc i j) k", " (∀ x ∈ Set.Ioc i j, k ≤ x) ∧ ∀ (x : ι), (∀ x_1 ∈ Set.Ioc i j, x ≤ x_1) → x ≤ k", " ∀ x_1 ∈ Set.Ioi i, x ≤ x_1", " x ≤ y", " IsMax i", " False", " IsGLB (↑(Finset.Ioc i j)) i", " IsGLB (Set.Ioc i j) i", " i ∈ Finset.Ioc i j",...
[ " i ≤ succFn i", " ∀ x ∈ Set.Ioi i, i ≤ x", " IsGLB (Set.Ioc i j) k", " (∀ x ∈ Set.Ioc i j, k ≤ x) ∧ ∀ (x : ι), (∀ x_1 ∈ Set.Ioc i j, x ≤ x_1) → x ≤ k", " ∀ x_1 ∈ Set.Ioi i, x ≤ x_1", " x ≤ y", " IsMax i", " False", " IsGLB (↑(Finset.Ioc i j)) i", " IsGLB (Set.Ioc i j) i", " i ∈ Finset.Ioc i j",...
import Mathlib.Algebra.CharP.Basic import Mathlib.Algebra.CharP.Algebra import Mathlib.Data.Nat.Prime #align_import algebra.char_p.exp_char from "leanprover-community/mathlib"@"70fd9563a21e7b963887c9360bd29b2393e6225a" universe u variable (R : Type u) section Semiring variable [Semiring R] class inductive Ex...
Mathlib/Algebra/CharP/ExpChar.lean
61
67
theorem ExpChar.eq {p q : ℕ} (hp : ExpChar R p) (hq : ExpChar R q) : p = q := by
cases' hp with hp _ hp' hp · cases' hq with hq _ hq' hq exacts [rfl, False.elim (Nat.not_prime_zero (CharP.eq R hq (CharP.ofCharZero R) ▸ hq'))] · cases' hq with hq _ hq' hq exacts [False.elim (Nat.not_prime_zero (CharP.eq R hp (CharP.ofCharZero R) ▸ hp')), CharP.eq R hp hq]
[ " ExpChar (R × S) p", " ExpChar (R × S) 1", " p = q", " 1 = q" ]
[ " ExpChar (R × S) p", " ExpChar (R × S) 1", " p = q" ]
import Mathlib.Algebra.CharP.ExpChar import Mathlib.RingTheory.Nilpotent.Defs #align_import algebra.char_p.basic from "leanprover-community/mathlib"@"47a1a73351de8dd6c8d3d32b569c8e434b03ca47" open Finset section variable (R : Type*) [CommRing R] [IsReduced R] (p n : ℕ) [ExpChar R p] theorem iterateFrobenius_in...
Mathlib/Algebra/CharP/Reduced.lean
35
40
theorem isSquare_of_charTwo' {R : Type*} [Finite R] [CommRing R] [IsReduced R] [CharP R 2] (a : R) : IsSquare a := by
cases nonempty_fintype R exact Exists.imp (fun b h => pow_two b ▸ Eq.symm h) (((Fintype.bijective_iff_injective_and_card _).mpr ⟨frobenius_inj R 2, rfl⟩).surjective a)
[ " x = y", " x - y = 0", " IsSquare a" ]
[ " x = y", " x - y = 0", " IsSquare a" ]
import Mathlib.MeasureTheory.Measure.Restrict open scoped ENNReal NNReal Topology open Set MeasureTheory Measure Filter Function MeasurableSpace ENNReal variable {α β δ ι : Type*} namespace MeasureTheory variable {m0 : MeasurableSpace α} [MeasurableSpace β] {μ ν ν₁ ν₂: Measure α} {s t : Set α} section NoAtoms...
Mathlib/MeasureTheory/Measure/Typeclasses.lean
378
379
theorem Measure.restrict_singleton' {a : α} : μ.restrict {a} = 0 := by
simp only [measure_singleton, Measure.restrict_eq_zero]
[ " μ.restrict {a} = 0" ]
[ " μ.restrict {a} = 0" ]
import Mathlib.Data.List.Infix #align_import data.list.rdrop from "leanprover-community/mathlib"@"26f081a2fb920140ed5bc5cc5344e84bcc7cb2b2" -- Make sure we don't import algebra assert_not_exists Monoid variable {α : Type*} (p : α → Bool) (l : List α) (n : ℕ) namespace List def rdrop : List α := l.take (l.leng...
Mathlib/Data/List/DropRight.lean
64
65
theorem rdrop_concat_succ (x : α) : rdrop (l ++ [x]) (n + 1) = rdrop l n := by
simp [rdrop_eq_reverse_drop_reverse]
[ " [].rdrop n = []", " l.rdrop 0 = l", " l.rdrop n = (drop n l.reverse).reverse", " take (l.length - n) l = (drop n l.reverse).reverse", " take ([].length - n) [] = (drop n [].reverse).reverse", " take ((xs ++ [x]).length - n) (xs ++ [x]) = (drop n (xs ++ [x]).reverse).reverse", " take ((xs ++ [x]).lengt...
[ " [].rdrop n = []", " l.rdrop 0 = l", " l.rdrop n = (drop n l.reverse).reverse", " take (l.length - n) l = (drop n l.reverse).reverse", " take ([].length - n) [] = (drop n [].reverse).reverse", " take ((xs ++ [x]).length - n) (xs ++ [x]) = (drop n (xs ++ [x]).reverse).reverse", " take ((xs ++ [x]).lengt...
import Mathlib.Analysis.Convex.Combination import Mathlib.Analysis.Convex.Join #align_import analysis.convex.stone_separation from "leanprover-community/mathlib"@"6ca1a09bc9aa75824bf97388c9e3b441fc4ccf3f" open Set variable {𝕜 E ι : Type*} [LinearOrderedField 𝕜] [AddCommGroup E] [Module 𝕜 E] {s t : Set E} th...
Mathlib/Analysis/Convex/StoneSeparation.lean
81
109
theorem exists_convex_convex_compl_subset (hs : Convex 𝕜 s) (ht : Convex 𝕜 t) (hst : Disjoint s t) : ∃ C : Set E, Convex 𝕜 C ∧ Convex 𝕜 Cᶜ ∧ s ⊆ C ∧ t ⊆ Cᶜ := by
let S : Set (Set E) := { C | Convex 𝕜 C ∧ Disjoint C t } obtain ⟨C, hC, hsC, hCmax⟩ := zorn_subset_nonempty S (fun c hcS hc ⟨_, _⟩ => ⟨⋃₀ c, ⟨hc.directedOn.convex_sUnion fun s hs => (hcS hs).1, disjoint_sUnion_left.2 fun c hc => (hcS hc).2⟩, fun s => subset_sUnion...
[ " ¬Disjoint (segment 𝕜 u v) ((convexHull 𝕜) {p, q, z})", " ∃ x ∈ segment 𝕜 u v, x ∈ (convexHull 𝕜) {p, q, z}", " ∃ x_1 ∈ segment 𝕜 u v, x_1 ∈ (convexHull 𝕜) {p, q, az • x + bz • y}", " ∃ x_1 ∈ segment 𝕜 u v, x_1 ∈ (convexHull 𝕜) {p, q, 0 • x + bz • y}", " ∃ x ∈ segment 𝕜 u v, x ∈ (convexHull 𝕜) {p...
[ " ¬Disjoint (segment 𝕜 u v) ((convexHull 𝕜) {p, q, z})", " ∃ x ∈ segment 𝕜 u v, x ∈ (convexHull 𝕜) {p, q, z}", " ∃ x_1 ∈ segment 𝕜 u v, x_1 ∈ (convexHull 𝕜) {p, q, az • x + bz • y}", " ∃ x_1 ∈ segment 𝕜 u v, x_1 ∈ (convexHull 𝕜) {p, q, 0 • x + bz • y}", " ∃ x ∈ segment 𝕜 u v, x ∈ (convexHull 𝕜) {p...
import Mathlib.Topology.Bases import Mathlib.Topology.DenseEmbedding #align_import topology.stone_cech from "leanprover-community/mathlib"@"0a0ec35061ed9960bf0e7ffb0335f44447b58977" noncomputable section open Filter Set open Topology universe u v section Ultrafilter def ultrafilterBasis (α : Type u) : Set ...
Mathlib/Topology/StoneCech.lean
138
143
theorem induced_topology_pure : TopologicalSpace.induced (pure : α → Ultrafilter α) Ultrafilter.topologicalSpace = ⊥ := by
apply eq_bot_of_singletons_open intro x use { u : Ultrafilter α | {x} ∈ u }, ultrafilter_isOpen_basic _ simp
[ " ∀ t₁ ∈ ultrafilterBasis α, ∀ t₂ ∈ ultrafilterBasis α, ∀ x ∈ t₁ ∩ t₂, ∃ t₃ ∈ ultrafilterBasis α, x ∈ t₃ ∧ t₃ ⊆ t₁ ∩ t₂", " ∃ t₃ ∈ ultrafilterBasis α, u ∈ t₃ ∧ t₃ ⊆ (fun s => {u | s ∈ u}) a ∩ (fun s => {u | s ∈ u}) b", " v ∈ (fun s => {u | s ∈ u}) a", " v ∈ (fun s => {u | s ∈ u}) b", " a ∩ b ⊆ a", " a ∩ b...
[ " ∀ t₁ ∈ ultrafilterBasis α, ∀ t₂ ∈ ultrafilterBasis α, ∀ x ∈ t₁ ∩ t₂, ∃ t₃ ∈ ultrafilterBasis α, x ∈ t₃ ∧ t₃ ⊆ t₁ ∩ t₂", " ∃ t₃ ∈ ultrafilterBasis α, u ∈ t₃ ∧ t₃ ⊆ (fun s => {u | s ∈ u}) a ∩ (fun s => {u | s ∈ u}) b", " v ∈ (fun s => {u | s ∈ u}) a", " v ∈ (fun s => {u | s ∈ u}) b", " a ∩ b ⊆ a", " a ∩ b...
import Mathlib.Order.Cover import Mathlib.Order.Interval.Finset.Defs #align_import data.finset.locally_finite from "leanprover-community/mathlib"@"442a83d738cb208d3600056c489be16900ba701d" assert_not_exists MonoidWithZero assert_not_exists Finset.sum open Function OrderDual open FinsetInterval variable {ι α : T...
Mathlib/Order/Interval/Finset/Basic.lean
78
79
theorem Icc_eq_empty_iff : Icc a b = ∅ ↔ ¬a ≤ b := by
rw [← coe_eq_empty, coe_Icc, Set.Icc_eq_empty_iff]
[ " (Icc a b).Nonempty ↔ a ≤ b", " (Ico a b).Nonempty ↔ a < b", " (Ioc a b).Nonempty ↔ a < b", " (Ioo a b).Nonempty ↔ a < b", " Icc a b = ∅ ↔ ¬a ≤ b" ]
[ " (Icc a b).Nonempty ↔ a ≤ b", " (Ico a b).Nonempty ↔ a < b", " (Ioc a b).Nonempty ↔ a < b", " (Ioo a b).Nonempty ↔ a < b", " Icc a b = ∅ ↔ ¬a ≤ b" ]
import Mathlib.Algebra.BigOperators.Intervals import Mathlib.Algebra.BigOperators.Ring import Mathlib.Algebra.Order.BigOperators.Ring.Finset import Mathlib.Algebra.Order.Field.Basic import Mathlib.Algebra.Order.Ring.Abs import Mathlib.Algebra.Ring.Opposite import Mathlib.Tactic.Abel #align_import algebra.geom_sum fro...
Mathlib/Algebra/GeomSum.lean
46
48
theorem geom_sum_succ {x : α} {n : ℕ} : ∑ i ∈ range (n + 1), x ^ i = (x * ∑ i ∈ range n, x ^ i) + 1 := by
simp only [mul_sum, ← pow_succ', sum_range_succ', pow_zero]
[ " ∑ i ∈ range (n + 1), x ^ i = x * ∑ i ∈ range n, x ^ i + 1" ]
[ " ∑ i ∈ range (n + 1), x ^ i = x * ∑ i ∈ range n, x ^ i + 1" ]
import Mathlib.Probability.ProbabilityMassFunction.Basic #align_import probability.probability_mass_function.monad from "leanprover-community/mathlib"@"4ac69b290818724c159de091daa3acd31da0ee6d" noncomputable section variable {α β γ : Type*} open scoped Classical open NNReal ENNReal open MeasureTheory namespac...
Mathlib/Probability/ProbabilityMassFunction/Monad.lean
74
80
theorem toOuterMeasure_pure_apply : (pure a).toOuterMeasure s = if a ∈ s then 1 else 0 := by
refine (toOuterMeasure_apply (pure a) s).trans ?_ split_ifs with ha · refine (tsum_congr fun b => ?_).trans (tsum_ite_eq a 1) exact ite_eq_left_iff.2 fun hb => symm (ite_eq_right_iff.2 fun h => (hb <| h.symm ▸ ha).elim) · refine (tsum_congr fun b => ?_).trans tsum_zero exact ite_eq_right_iff.2 fun hb =...
[ " a' ∈ (pure a).support ↔ a' ∈ {a}", " a' ∈ (pure a).support ↔ a' = a", " (pure a).toOuterMeasure s = if a ∈ s then 1 else 0", " ∑' (x : α), s.indicator (⇑(pure a)) x = if a ∈ s then 1 else 0", " ∑' (x : α), s.indicator (⇑(pure a)) x = 1", " s.indicator (⇑(pure a)) b = if b = a then 1 else 0", " ∑' (x :...
[ " a' ∈ (pure a).support ↔ a' ∈ {a}", " a' ∈ (pure a).support ↔ a' = a", " (pure a).toOuterMeasure s = if a ∈ s then 1 else 0" ]
import Mathlib.Data.Set.Image import Mathlib.Data.SProd #align_import data.set.prod from "leanprover-community/mathlib"@"48fb5b5280e7c81672afc9524185ae994553ebf4" open Function namespace Set section Prod variable {α β γ δ : Type*} {s s₁ s₂ : Set α} {t t₁ t₂ : Set β} {a : α} {b : β} theorem Subsingleton.pro...
Mathlib/Data/Set/Prod.lean
90
92
theorem empty_prod : (∅ : Set α) ×ˢ t = ∅ := by
ext exact false_and_iff _
[ " (∃ x ∈ s ×ˢ t, p x) ↔ ∃ x ∈ s, ∃ y ∈ t, p (x, y)", " s ×ˢ ∅ = ∅", " x✝ ∈ s ×ˢ ∅ ↔ x✝ ∈ ∅", " ∅ ×ˢ t = ∅", " x✝ ∈ ∅ ×ˢ t ↔ x✝ ∈ ∅" ]
[ " (∃ x ∈ s ×ˢ t, p x) ↔ ∃ x ∈ s, ∃ y ∈ t, p (x, y)", " s ×ˢ ∅ = ∅", " x✝ ∈ s ×ˢ ∅ ↔ x✝ ∈ ∅", " ∅ ×ˢ t = ∅" ]
import Mathlib.Algebra.MonoidAlgebra.Basic #align_import algebra.monoid_algebra.division from "leanprover-community/mathlib"@"72c366d0475675f1309d3027d3d7d47ee4423951" variable {k G : Type*} [Semiring k] namespace AddMonoidAlgebra section variable [AddCancelCommMonoid G] noncomputable def divOf (x : k[G]) (g...
Mathlib/Algebra/MonoidAlgebra/Division.lean
133
135
theorem modOf_apply_of_not_exists_add (x : k[G]) (g : G) (g' : G) (h : ¬∃ d, g' = g + d) : (x %ᵒᶠ g) g' = x g' := by
classical exact Finsupp.filter_apply_pos _ _ h
[ " x /ᵒᶠ 0 = x", " (x /ᵒᶠ 0) x✝ = x x✝", " x /ᵒᶠ (a + b) = x /ᵒᶠ a /ᵒᶠ b", " (x /ᵒᶠ (a + b)) x✝ = (x /ᵒᶠ a /ᵒᶠ b) x✝", " of' k G a * x /ᵒᶠ a = x", " (of' k G a * x /ᵒᶠ a) x✝ = x x✝", " ∀ (a_1 : G), a + a_1 = a + x✝ ↔ a_1 = x✝", " a + c = a + x✝ ↔ c = x✝", " x * of' k G a /ᵒᶠ a = x", " (x * of' k G ...
[ " x /ᵒᶠ 0 = x", " (x /ᵒᶠ 0) x✝ = x x✝", " x /ᵒᶠ (a + b) = x /ᵒᶠ a /ᵒᶠ b", " (x /ᵒᶠ (a + b)) x✝ = (x /ᵒᶠ a /ᵒᶠ b) x✝", " of' k G a * x /ᵒᶠ a = x", " (of' k G a * x /ᵒᶠ a) x✝ = x x✝", " ∀ (a_1 : G), a + a_1 = a + x✝ ↔ a_1 = x✝", " a + c = a + x✝ ↔ c = x✝", " x * of' k G a /ᵒᶠ a = x", " (x * of' k G ...
import Mathlib.Algebra.Divisibility.Basic import Mathlib.Algebra.Group.Equiv.Basic import Mathlib.Algebra.Ring.Defs #align_import algebra.ring.divisibility from "leanprover-community/mathlib"@"e8638a0fcaf73e4500469f368ef9494e495099b3" variable {α β : Type*} section Semigroup variable [Semigroup α] [Semigroup β]...
Mathlib/Algebra/Ring/Divisibility/Basic.lean
31
38
theorem MulEquiv.decompositionMonoid [DecompositionMonoid β] : DecompositionMonoid α where primal a b c h := by
rw [← map_dvd_iff f, map_mul] at h obtain ⟨a₁, a₂, h⟩ := DecompositionMonoid.primal _ h refine ⟨symm f a₁, symm f a₂, ?_⟩ simp_rw [← map_dvd_iff f, ← map_mul, eq_symm_apply] iterate 2 erw [(f : α ≃* β).apply_symm_apply] exact h
[ " a ∣ b", " f.invFun (f.toFun a) ∣ f.invFun (f.toFun b)", " ∃ a₁ a₂, a₁ ∣ b ∧ a₂ ∣ c ∧ a = a₁ * a₂", " (↑f).symm a₁ ∣ b ∧ (↑f).symm a₂ ∣ c ∧ a = (↑f).symm a₁ * (↑f).symm a₂", " f ((↑f).symm a₁) ∣ f b ∧ f ((↑f).symm a₂) ∣ f c ∧ ↑f a = a₁ * a₂", " a₁ ∣ f b ∧ f ((↑f).symm a₂) ∣ f c ∧ ↑f a = a₁ * a₂", " a₁ ...
[ " a ∣ b", " f.invFun (f.toFun a) ∣ f.invFun (f.toFun b)", " ∃ a₁ a₂, a₁ ∣ b ∧ a₂ ∣ c ∧ a = a₁ * a₂" ]