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
220
import Mathlib.Analysis.Fourier.FourierTransform import Mathlib.Analysis.InnerProductSpace.Dual import Mathlib.Analysis.InnerProductSpace.EuclideanDist import Mathlib.MeasureTheory.Function.ContinuousMapDense import Mathlib.MeasureTheory.Group.Integral import Mathlib.MeasureTheory.Integral.SetIntegral import Mathlib.M...
Mathlib/Analysis/Fourier/RiemannLebesgueLemma.lean
111
194
theorem tendsto_integral_exp_inner_smul_cocompact_of_continuous_compact_support (hf1 : Continuous f) (hf2 : HasCompactSupport f) : Tendsto (fun w : V => ∫ v : V, 𝐞 (-⟪v, w⟫) • f v) (cocompact V) (𝓝 0) := by
refine NormedAddCommGroup.tendsto_nhds_zero.mpr fun ε hε => ?_ suffices ∃ T : ℝ, ∀ w : V, T ≤ ‖w‖ → ‖∫ v : V, 𝐞 (-⟪v, w⟫) • f v‖ < ε by simp_rw [← comap_dist_left_atTop_eq_cocompact (0 : V), eventually_comap, eventually_atTop, dist_eq_norm', sub_zero] exact let ⟨T, hT⟩ := this ⟨T, fun b ...
[ " ∫ (v : V), 𝐞 (-⟪v, w⟫_ℝ) • f (v + i w) = -∫ (v : V), 𝐞 (-⟪v, w⟫_ℝ) • f v", " ⟪i w, w⟫_ℝ = 1 / 2", " ‖w‖ ^ 2 ≠ 0", " (fun v => 𝐞 (-⟪v, w⟫_ℝ) • f (v + i w)) = fun v => (fun x => -(𝐞 (-⟪x, w⟫_ℝ) • f x)) (v + i w)", " 𝐞 (-⟪v, w⟫_ℝ) • f (v + i w) = (fun x => -(𝐞 (-⟪x, w⟫_ℝ) • f x)) (v + i w)", " cexp (...
[ " ∫ (v : V), 𝐞 (-⟪v, w⟫_ℝ) • f (v + i w) = -∫ (v : V), 𝐞 (-⟪v, w⟫_ℝ) • f v", " ⟪i w, w⟫_ℝ = 1 / 2", " ‖w‖ ^ 2 ≠ 0", " (fun v => 𝐞 (-⟪v, w⟫_ℝ) • f (v + i w)) = fun v => (fun x => -(𝐞 (-⟪x, w⟫_ℝ) • f x)) (v + i w)", " 𝐞 (-⟪v, w⟫_ℝ) • f (v + i w) = (fun x => -(𝐞 (-⟪x, w⟫_ℝ) • f x)) (v + i w)", " cexp (...
import Batteries.Data.Nat.Gcd import Batteries.Data.Int.DivMod import Batteries.Lean.Float -- `Rat` is not tagged with the `ext` attribute, since this is more often than not undesirable structure Rat where mk' :: num : Int den : Nat := 1 den_nz : den ≠ 0 := by decide reduced : num.natAbs.C...
.lake/packages/batteries/Batteries/Data/Rat/Basic.lean
60
66
theorem Rat.normalize.reduced {num : Int} {den g : Nat} (den_nz : den ≠ 0) (e : g = num.natAbs.gcd den) : (num.div g).natAbs.Coprime (den / g) := have : Int.natAbs (num.div ↑g) = num.natAbs / g := by
match num, num.eq_nat_or_neg with | _, ⟨_, .inl rfl⟩ => rfl | _, ⟨_, .inr rfl⟩ => rw [Int.neg_div, Int.natAbs_neg, Int.natAbs_neg]; rfl this ▸ e ▸ Nat.coprime_div_gcd_div_gcd (Nat.gcd_pos_of_pos_right _ (Nat.pos_of_ne_zero den_nz))
[ " den ≠ 0", " num.natAbs.Coprime den", " (num.div ↑g).natAbs = num.natAbs / g", " ((↑w✝).div ↑g).natAbs = (↑w✝).natAbs / g", " ((-↑w✝).div ↑g).natAbs = (-↑w✝).natAbs / g" ]
[ " den ≠ 0", " num.natAbs.Coprime den" ]
import Mathlib.Geometry.Manifold.PartitionOfUnity import Mathlib.Geometry.Manifold.Metrizable import Mathlib.MeasureTheory.Function.AEEqOfIntegral open MeasureTheory Filter Metric Function Set TopologicalSpace open scoped Topology Manifold variable {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] [FiniteDimen...
Mathlib/Analysis/Distribution/AEEqOfIntegralContDiff.lean
41
112
theorem ae_eq_zero_of_integral_smooth_smul_eq_zero (hf : LocallyIntegrable f μ) (h : ∀ g : M → ℝ, Smooth I 𝓘(ℝ) g → HasCompactSupport g → ∫ x, g x • f x ∂μ = 0) : ∀ᵐ x ∂μ, f x = 0 := by
-- record topological properties of `M` have := I.locallyCompactSpace have := ChartedSpace.locallyCompactSpace H M have := I.secondCountableTopology have := ChartedSpace.secondCountable_of_sigma_compact H M have := ManifoldWithCorners.metrizableSpace I M let _ : MetricSpace M := TopologicalSpace.metrizab...
[ " ∀ᵐ (x : M) ∂μ, f x = 0", " 0 = ∫ (x : M) in s, f x ∂μ", " ∀ (n : ℕ), ∃ g, support g = v n ∧ Smooth I 𝓘(ℝ, ℝ) g ∧ range g ⊆ Icc 0 1 ∧ ∀ x ∈ s, g x = 1", " ∃ g, support g = v n ∧ Smooth I 𝓘(ℝ, ℝ) g ∧ range g ⊆ Icc 0 1 ∧ ∀ x ∈ s, g x = 1", " Tendsto (fun n => ∫ (x : M), g n x • f x ∂μ) atTop (𝓝 (∫ (x : M)...
[]
import Mathlib.Data.Nat.Defs import Mathlib.Order.Interval.Set.Basic import Mathlib.Tactic.Monotonicity.Attr #align_import data.nat.log from "leanprover-community/mathlib"@"3e00d81bdcbf77c8188bbd18f5524ddc3ed8cac6" namespace Nat --@[pp_nodot] porting note: unknown attribute def log (b : ℕ) : ℕ → ℕ | n => i...
Mathlib/Data/Nat/Log.lean
56
57
theorem log_pos_iff {b n : ℕ} : 0 < log b n ↔ b ≤ n ∧ 1 < b := by
rw [Nat.pos_iff_ne_zero, Ne, log_eq_zero_iff, not_or, not_lt, not_le]
[ " (invImage (fun x => x) instWellFoundedRelationOfSizeOf).1 (n / b) a✝", " b.log n = 0 ↔ n < b ∨ b ≤ 1", " (∀ (h : b ≤ n ∧ 1 < b), b.log (n / b) + 1 = 0) ↔ n < b ∨ b ≤ 1", " 0 < b.log n ↔ b ≤ n ∧ 1 < b" ]
[ " (invImage (fun x => x) instWellFoundedRelationOfSizeOf).1 (n / b) a✝", " b.log n = 0 ↔ n < b ∨ b ≤ 1", " (∀ (h : b ≤ n ∧ 1 < b), b.log (n / b) + 1 = 0) ↔ n < b ∨ b ≤ 1" ]
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
41
42
theorem mem_nhdsSet_iff_forall : s ∈ 𝓝ˢ t ↔ ∀ x : X, x ∈ t → s ∈ 𝓝 x := by
simp_rw [nhdsSet, Filter.mem_sSup, forall_mem_image]
[ " 𝓝ˢ (diagonal X) = ⨆ x, 𝓝 (x, x)", " sSup (range (𝓝 ∘ fun x => (x, x))) = ⨆ x, 𝓝 (x, x)", " s ∈ 𝓝ˢ t ↔ ∀ x ∈ t, s ∈ 𝓝 x" ]
[ " 𝓝ˢ (diagonal X) = ⨆ x, 𝓝 (x, x)", " sSup (range (𝓝 ∘ fun x => (x, x))) = ⨆ x, 𝓝 (x, x)" ]
import Mathlib.Algebra.Order.Interval.Set.Instances import Mathlib.Order.Interval.Set.ProjIcc import Mathlib.Topology.Instances.Real #align_import topology.unit_interval from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982" noncomputable section open scoped Classical open Topology Filter ...
Mathlib/Topology/UnitInterval.lean
62
64
theorem mem_iff_one_sub_mem {t : ℝ} : t ∈ I ↔ 1 - t ∈ I := by
rw [mem_Icc, mem_Icc] constructor <;> intro <;> constructor <;> linarith
[ " t ∈ I ↔ 1 - t ∈ I", " 0 ≤ t ∧ t ≤ 1 ↔ 0 ≤ 1 - t ∧ 1 - t ≤ 1", " 0 ≤ t ∧ t ≤ 1 → 0 ≤ 1 - t ∧ 1 - t ≤ 1", " 0 ≤ 1 - t ∧ 1 - t ≤ 1 → 0 ≤ t ∧ t ≤ 1", " 0 ≤ 1 - t ∧ 1 - t ≤ 1", " 0 ≤ t ∧ t ≤ 1", " 0 ≤ 1 - t", " 1 - t ≤ 1", " 0 ≤ t", " t ≤ 1" ]
[]
import Mathlib.Mathport.Rename #align_import init.data.list.instances from "leanprover-community/lean"@"9af482290ef68e8aaa5ead01aa7b09b7be7019fd" universe u v w namespace List variable {α : Type u} {β : Type v} {γ : Type w} -- Porting note (#10618): simp can prove this -- @[simp] theorem bind_singleton (f : α →...
Mathlib/Init/Data/List/Instances.lean
35
36
theorem bind_assoc {α β} (l : List α) (f : α → List β) (g : β → List γ) : (l.bind f).bind g = l.bind fun x => (f x).bind g := by
induction l <;> simp [*]
[ " (l.bind fun x => [x]) = l", " ([].bind fun x => [x]) = []", " ((head✝ :: tail✝).bind fun x => [x]) = head✝ :: tail✝", " map f l = l.bind fun x => [f x]", " map f l = l.bind fun x => map f [x]", " (l.bind f).bind g = l.bind fun x => (f x).bind g", " ([].bind f).bind g = [].bind fun x => (f x).bind g", ...
[ " (l.bind fun x => [x]) = l", " ([].bind fun x => [x]) = []", " ((head✝ :: tail✝).bind fun x => [x]) = head✝ :: tail✝", " map f l = l.bind fun x => [f x]", " map f l = l.bind fun x => map f [x]" ]
import Mathlib.Analysis.InnerProductSpace.Projection import Mathlib.Analysis.NormedSpace.PiLp import Mathlib.LinearAlgebra.FiniteDimensional import Mathlib.LinearAlgebra.UnitaryGroup #align_import analysis.inner_product_space.pi_L2 from "leanprover-community/mathlib"@"13bce9a6b6c44f6b4c91ac1c1d2a816e2533d395" set_...
Mathlib/Analysis/InnerProductSpace/PiL2.lean
140
143
theorem EuclideanSpace.closedBall_zero_eq {n : Type*} [Fintype n] (r : ℝ) (hr : 0 ≤ r) : Metric.closedBall (0 : EuclideanSpace ℝ n) r = {x | ∑ i, x i ^ 2 ≤ r ^ 2} := by
ext simp_rw [mem_setOf, mem_closedBall_zero_iff, norm_eq, norm_eq_abs, sq_abs, sqrt_le_left hr]
[ " ‖x‖ ^ 2 = re ⟪x, x⟫_𝕜", " ∀ (x y : PiLp 2 f), (starRingEnd 𝕜) ⟪y, x⟫_𝕜 = ⟪x, y⟫_𝕜", " (starRingEnd 𝕜) ⟪y, x⟫_𝕜 = ⟪x, y⟫_𝕜", " (starRingEnd 𝕜) ({ inner := fun x y => ∑ i : ι, InnerProductSpace.toInner.1 (x i) (y i) }.1 y x) =\n { inner := fun x y => ∑ i : ι, InnerProductSpace.toInner.1 (x i) (y i)...
[ " ‖x‖ ^ 2 = re ⟪x, x⟫_𝕜", " ∀ (x y : PiLp 2 f), (starRingEnd 𝕜) ⟪y, x⟫_𝕜 = ⟪x, y⟫_𝕜", " (starRingEnd 𝕜) ⟪y, x⟫_𝕜 = ⟪x, y⟫_𝕜", " (starRingEnd 𝕜) ({ inner := fun x y => ∑ i : ι, InnerProductSpace.toInner.1 (x i) (y i) }.1 y x) =\n { inner := fun x y => ∑ i : ι, InnerProductSpace.toInner.1 (x i) (y i)...
import Mathlib.Order.Interval.Multiset #align_import data.nat.interval from "leanprover-community/mathlib"@"1d29de43a5ba4662dd33b5cfeecfc2a27a5a8a29" -- TODO -- assert_not_exists Ring open Finset Nat variable (a b c : ℕ) namespace Nat instance instLocallyFiniteOrder : LocallyFiniteOrder ℕ where finsetIcc a b...
Mathlib/Order/Interval/Finset/Nat.lean
67
67
theorem Ico_zero_eq_range : Ico 0 = range := by
rw [← Nat.bot_eq_zero, ← Iio_eq_Ico, Iio_eq_range]
[ " x ∈ (fun a b => { val := ↑(List.range' a (b + 1 - a)), nodup := ⋯ }) a b ↔ a ≤ x ∧ x ≤ b", " a ≤ x ∧ x < a + (b + 1 - a) ↔ a ≤ x ∧ x ≤ b", " x ∈ (fun a b => { val := ↑(List.range' a (b - a)), nodup := ⋯ }) a b ↔ a ≤ x ∧ x < b", " a ≤ x ∧ x < a + (b - a) ↔ a ≤ x ∧ x < b", " x ∈ (fun a b => { val := ↑(List....
[ " x ∈ (fun a b => { val := ↑(List.range' a (b + 1 - a)), nodup := ⋯ }) a b ↔ a ≤ x ∧ x ≤ b", " a ≤ x ∧ x < a + (b + 1 - a) ↔ a ≤ x ∧ x ≤ b", " x ∈ (fun a b => { val := ↑(List.range' a (b - a)), nodup := ⋯ }) a b ↔ a ≤ x ∧ x < b", " a ≤ x ∧ x < a + (b - a) ↔ a ≤ x ∧ x < b", " x ∈ (fun a b => { val := ↑(List....
import Mathlib.Analysis.SpecialFunctions.Trigonometric.Basic import Mathlib.Analysis.Normed.Group.AddCircle import Mathlib.Algebra.CharZero.Quotient import Mathlib.Topology.Instances.Sign #align_import analysis.special_functions.trigonometric.angle from "leanprover-community/mathlib"@"213b0cff7bc5ab6696ee07cceec80829...
Mathlib/Analysis/SpecialFunctions/Trigonometric/Angle.lean
112
113
theorem intCast_mul_eq_zsmul (x : ℝ) (n : ℤ) : ↑((n : ℝ) * x : ℝ) = n • (↑x : Angle) := by
simpa only [zsmul_eq_mul] using coeHom.map_zsmul x n
[ " 0 < 2 * π", " ↑(↑n * x) = n • ↑x" ]
[ " 0 < 2 * π", " ↑(↑n * x) = n • ↑x" ]
import Mathlib.Algebra.Group.Even import Mathlib.Algebra.Order.Monoid.Canonical.Defs import Mathlib.Algebra.Order.Sub.Defs #align_import algebra.order.sub.canonical from "leanprover-community/mathlib"@"62a5626868683c104774de8d85b9855234ac807c" variable {α : Type*} section ExistsAddOfLE variable [AddCommSemigrou...
Mathlib/Algebra/Order/Sub/Canonical.lean
63
65
theorem tsub_add_tsub_cancel (hab : b ≤ a) (hcb : c ≤ b) : a - b + (b - c) = a - c := by
convert tsub_add_cancel_of_le (tsub_le_tsub_right hab c) using 2 rw [tsub_tsub, add_tsub_cancel_of_le hcb]
[ " a + (b - a) = b", " a + (b - a) ≤ b", " a + (a + c - a) ≤ a + c", " b - a + a = b", " a - c ≤ b - c ↔ a ≤ b", " a - c = b - c ↔ a = b", " a < b", " a ≠ b", " False", " a - b + (b - c) = a - c", " a - b = a - c - (b - c)" ]
[ " a + (b - a) = b", " a + (b - a) ≤ b", " a + (a + c - a) ≤ a + c", " b - a + a = b", " a - c ≤ b - c ↔ a ≤ b", " a - c = b - c ↔ a = b", " a < b", " a ≠ b", " False" ]
import Mathlib.Analysis.SpecialFunctions.Trigonometric.Deriv import Mathlib.Analysis.SpecialFunctions.Log.Basic #align_import analysis.special_functions.arsinh from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982" noncomputable section open Function Filter Set open scoped Topology name...
Mathlib/Analysis/SpecialFunctions/Arsinh.lean
78
79
theorem sinh_arsinh (x : ℝ) : sinh (arsinh x) = x := by
rw [sinh_eq, ← arsinh_neg, exp_arsinh, exp_arsinh, neg_sq]; field_simp
[ " rexp x.arsinh = x + √(1 + x ^ 2)", " 0 < x + √(1 + x ^ 2)", " -x < √(1 + x ^ 2)", " (-x) ^ 2 < 1 + x ^ 2", " arsinh 0 = 0", " (-x).arsinh = -x.arsinh", " -x + √(1 + (-x) ^ 2) = (x + √(1 + x ^ 2))⁻¹", " (-x + √(1 + (-x) ^ 2)) * (x + √(1 + x ^ 2)) = 1", " 0 ≤ 1 + x ^ 2", " x.arsinh.sinh = x", " ...
[ " rexp x.arsinh = x + √(1 + x ^ 2)", " 0 < x + √(1 + x ^ 2)", " -x < √(1 + x ^ 2)", " (-x) ^ 2 < 1 + x ^ 2", " arsinh 0 = 0", " (-x).arsinh = -x.arsinh", " -x + √(1 + (-x) ^ 2) = (x + √(1 + x ^ 2))⁻¹", " (-x + √(1 + (-x) ^ 2)) * (x + √(1 + x ^ 2)) = 1", " 0 ≤ 1 + x ^ 2" ]
import Mathlib.Analysis.SpecialFunctions.Pow.Complex import Qq #align_import analysis.special_functions.pow.real from "leanprover-community/mathlib"@"4fa54b337f7d52805480306db1b1439c741848c8" noncomputable section open scoped Classical open Real ComplexConjugate open Finset Set namespace Real variable {x y z...
Mathlib/Analysis/SpecialFunctions/Pow/Real.lean
60
60
theorem exp_mul (x y : ℝ) : exp (x * y) = exp x ^ y := by
rw [rpow_def_of_pos (exp_pos _), log_exp]
[ " x ^ y = if x = 0 then if y = 0 then 1 else 0 else rexp (x.log * y)", " (if ↑x = 0 then if ↑y = 0 then 1 else 0 else ((↑x).log * ↑y).exp).re =\n if x = 0 then if y = 0 then 1 else 0 else rexp (x.log * y)", " Complex.re 1 = 1", " Complex.re 1 = 0", " Complex.re 1 = rexp (x.log * y)", " Complex.re 0 = 1...
[ " x ^ y = if x = 0 then if y = 0 then 1 else 0 else rexp (x.log * y)", " (if ↑x = 0 then if ↑y = 0 then 1 else 0 else ((↑x).log * ↑y).exp).re =\n if x = 0 then if y = 0 then 1 else 0 else rexp (x.log * y)", " Complex.re 1 = 1", " Complex.re 1 = 0", " Complex.re 1 = rexp (x.log * y)", " Complex.re 0 = 1...
import Mathlib.RingTheory.Ideal.Maps import Mathlib.Topology.Algebra.Nonarchimedean.Bases import Mathlib.Topology.Algebra.UniformRing #align_import topology.algebra.nonarchimedean.adic_topology from "leanprover-community/mathlib"@"f0c8bf9245297a541f468be517f1bde6195105e9" variable {R : Type*} [CommRing R] open S...
Mathlib/Topology/Algebra/Nonarchimedean/AdicTopology.lean
106
111
theorem hasBasis_nhds_adic (I : Ideal R) (x : R) : HasBasis (@nhds R I.adicTopology x) (fun _n : ℕ => True) fun n => (fun y => x + y) '' (I ^ n : Ideal R) := by
letI := I.adicTopology have := I.hasBasis_nhds_zero_adic.map fun y => x + y rwa [map_add_left_nhds_zero x] at this
[ " ∀ (i j : ℕ), ∃ k, I ^ k • ⊤ ≤ I ^ i • ⊤ ⊓ I ^ j • ⊤", " ∀ (i j : ℕ), ∃ k, I ^ k ≤ I ^ i ∧ I ^ k ≤ I ^ j", " ∃ k, I ^ k ≤ I ^ i ∧ I ^ k ≤ I ^ j", " ∀ (a : R) (i : ℕ), ∃ j, a • I ^ j • ⊤ ≤ I ^ i • ⊤", " ∀ (a : R) (i : ℕ), ∃ j, a • I ^ j ≤ I ^ i", " ∃ j, r • I ^ j ≤ I ^ n", " r • I ^ n ≤ I ^ n", " (Dis...
[ " ∀ (i j : ℕ), ∃ k, I ^ k • ⊤ ≤ I ^ i • ⊤ ⊓ I ^ j • ⊤", " ∀ (i j : ℕ), ∃ k, I ^ k ≤ I ^ i ∧ I ^ k ≤ I ^ j", " ∃ k, I ^ k ≤ I ^ i ∧ I ^ k ≤ I ^ j", " ∀ (a : R) (i : ℕ), ∃ j, a • I ^ j • ⊤ ≤ I ^ i • ⊤", " ∀ (a : R) (i : ℕ), ∃ j, a • I ^ j ≤ I ^ i", " ∃ j, r • I ^ j ≤ I ^ n", " r • I ^ n ≤ I ^ n", " (Dis...
import Mathlib.AlgebraicGeometry.Morphisms.Basic import Mathlib.RingTheory.LocalProperties #align_import algebraic_geometry.morphisms.ring_hom_properties from "leanprover-community/mathlib"@"d39590fc8728fbf6743249802486f8c91ffe07bc" -- Explicit universe annotations were used in this file to improve perfomance #127...
Mathlib/AlgebraicGeometry/Morphisms/RingHomProperties.lean
163
205
theorem affineLocally_iff_affineOpens_le (hP : RingHom.RespectsIso @P) {X Y : Scheme.{u}} (f : X ⟶ Y) : affineLocally.{u} (@P) f ↔ ∀ (U : Y.affineOpens) (V : X.affineOpens) (e : V.1 ≤ (Opens.map f.1.base).obj U.1), P (Scheme.Hom.appLe f e) := by
apply forall_congr' intro U delta sourceAffineLocally simp_rw [op_comp, Scheme.Γ.map_comp, Γ_map_morphismRestrict, Category.assoc, Scheme.Γ_map_op, hP.cancel_left_isIso (Y.presheaf.map (eqToHom _).op)] constructor · intro H V e let U' := (Opens.map f.val.base).obj U.1 have e'' : (Scheme.Hom.ope...
[ " (sourceAffineLocally P).toProperty.RespectsIso", " ∀ {X Y Z : Scheme} (e : X ≅ Y) (f : Y ⟶ Z) [inst : IsAffine Z],\n sourceAffineLocally P f → sourceAffineLocally P (e.hom ≫ f)", " P (Scheme.Γ.map (X.ofRestrict ⋯ ≫ e.hom ≫ f).op)", " P (Scheme.Γ.map ((Scheme.restrictMapIso e.inv ↑U).hom ≫ X.ofRestrict ⋯ ...
[ " (sourceAffineLocally P).toProperty.RespectsIso", " ∀ {X Y Z : Scheme} (e : X ≅ Y) (f : Y ⟶ Z) [inst : IsAffine Z],\n sourceAffineLocally P f → sourceAffineLocally P (e.hom ≫ f)", " P (Scheme.Γ.map (X.ofRestrict ⋯ ≫ e.hom ≫ f).op)", " P (Scheme.Γ.map ((Scheme.restrictMapIso e.inv ↑U).hom ≫ X.ofRestrict ⋯ ...
import Mathlib.Algebra.DualNumber import Mathlib.Algebra.QuaternionBasis import Mathlib.Data.Complex.Module import Mathlib.LinearAlgebra.CliffordAlgebra.Conjugation import Mathlib.LinearAlgebra.CliffordAlgebra.Star import Mathlib.LinearAlgebra.QuadraticForm.Prod #align_import linear_algebra.clifford_algebra.equivs fr...
Mathlib/LinearAlgebra/CliffordAlgebra/Equivs.lean
194
198
theorem ofComplex_comp_toComplex : ofComplex.comp toComplex = AlgHom.id ℝ (CliffordAlgebra Q) := by
ext dsimp only [LinearMap.comp_apply, Subtype.coe_mk, AlgHom.id_apply, AlgHom.toLinearMap_apply, AlgHom.comp_apply] rw [toComplex_ι, one_smul, ofComplex_I]
[ " (LinearMap.toSpanSingleton ℝ ℂ Complex.I) r * (LinearMap.toSpanSingleton ℝ ℂ Complex.I) r = (algebraMap ℝ ℂ) (Q r)", " ↑r * Complex.I * (↑r * Complex.I) = ↑(-(r * r))", " ↑r * ↑r * (Complex.I * Complex.I) = ↑(-(r * r))", " toComplex (involute c) = (starRingEnd ℂ) (toComplex c)", " toComplex (involute ((ι ...
[ " (LinearMap.toSpanSingleton ℝ ℂ Complex.I) r * (LinearMap.toSpanSingleton ℝ ℂ Complex.I) r = (algebraMap ℝ ℂ) (Q r)", " ↑r * Complex.I * (↑r * Complex.I) = ↑(-(r * r))", " ↑r * ↑r * (Complex.I * Complex.I) = ↑(-(r * r))", " toComplex (involute c) = (starRingEnd ℂ) (toComplex c)", " toComplex (involute ((ι ...
import Mathlib.Algebra.Algebra.Unitization import Mathlib.Algebra.Star.NonUnitalSubalgebra import Mathlib.Algebra.Star.Subalgebra import Mathlib.GroupTheory.GroupAction.Ring namespace NonUnitalSubalgebra
Mathlib/Algebra/Algebra/Subalgebra/Unitization.lean
145
157
theorem _root_.AlgHomClass.unitization_injective' {F R S A : Type*} [CommRing R] [Ring A] [Algebra R A] [SetLike S A] [hSA : NonUnitalSubringClass S A] [hSRA : SMulMemClass S R A] (s : S) (h : ∀ r, r ≠ 0 → algebraMap R A r ∉ s) [FunLike F (Unitization R s) A] [AlgHomClass F R (Unitization R s) A] (f : F...
refine (injective_iff_map_eq_zero f).mpr fun x hx => ?_ induction' x with r a simp_rw [map_add, hf, ← Unitization.algebraMap_eq_inl, AlgHomClass.commutes] at hx rw [add_eq_zero_iff_eq_neg] at hx ⊢ by_cases hr : r = 0 · ext <;> simp [hr] at hx ⊢ exact hx · exact (h r hr <| hx ▸ (neg_mem a.property)).e...
[ " Function.Injective ⇑f", " x = 0", " Unitization.inl r + ↑a = 0", " Unitization.inl r = -↑a", " (Unitization.inl r).fst = (-↑a).fst", " ↑(Unitization.inl r).snd = ↑(-↑a).snd", " a = 0" ]
[]
import Mathlib.Algebra.DualNumber import Mathlib.Algebra.QuaternionBasis import Mathlib.Data.Complex.Module import Mathlib.LinearAlgebra.CliffordAlgebra.Conjugation import Mathlib.LinearAlgebra.CliffordAlgebra.Star import Mathlib.LinearAlgebra.QuadraticForm.Prod #align_import linear_algebra.clifford_algebra.equivs fr...
Mathlib/LinearAlgebra/CliffordAlgebra/Equivs.lean
358
360
theorem toQuaternion_comp_ofQuaternion : toQuaternion.comp ofQuaternion = AlgHom.id R ℍ[R,c₁,c₂] := by
ext : 1 <;> simp
[ " (ι (Q c₁ c₂)) (1, 0) * (ι (Q c₁ c₂)) (1, 0) = c₁ • 1", " (algebraMap R (CliffordAlgebra (Q c₁ c₂))) (c₁ * ((1, 0).1 * (1, 0).1) + c₂ * ((1, 0).2 * (1, 0).2)) =\n (algebraMap R (CliffordAlgebra (Q c₁ c₂))) c₁", " (ι (Q c₁ c₂)) (0, 1) * (ι (Q c₁ c₂)) (0, 1) = c₂ • 1", " (algebraMap R (CliffordAlgebra (Q c₁...
[ " (ι (Q c₁ c₂)) (1, 0) * (ι (Q c₁ c₂)) (1, 0) = c₁ • 1", " (algebraMap R (CliffordAlgebra (Q c₁ c₂))) (c₁ * ((1, 0).1 * (1, 0).1) + c₂ * ((1, 0).2 * (1, 0).2)) =\n (algebraMap R (CliffordAlgebra (Q c₁ c₂))) c₁", " (ι (Q c₁ c₂)) (0, 1) * (ι (Q c₁ c₂)) (0, 1) = c₂ • 1", " (algebraMap R (CliffordAlgebra (Q c₁...
import Mathlib.Analysis.LocallyConvex.BalancedCoreHull import Mathlib.Analysis.LocallyConvex.WithSeminorms import Mathlib.Analysis.Convex.Gauge #align_import analysis.locally_convex.abs_convex from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982" open NormedField Set open NNReal Pointwis...
Mathlib/Analysis/LocallyConvex/AbsConvex.lean
65
74
theorem nhds_basis_abs_convex_open : (𝓝 (0 : E)).HasBasis (fun s => (0 : E) ∈ s ∧ IsOpen s ∧ Balanced 𝕜 s ∧ Convex ℝ s) id := by
refine (nhds_basis_abs_convex 𝕜 E).to_hasBasis ?_ ?_ · rintro s ⟨hs_nhds, hs_balanced, hs_convex⟩ refine ⟨interior s, ?_, interior_subset⟩ exact ⟨mem_interior_iff_mem_nhds.mpr hs_nhds, isOpen_interior, hs_balanced.interior (mem_interior_iff_mem_nhds.mpr hs_nhds), hs_convex.interior⟩ rintro...
[ " (𝓝 0).HasBasis (fun s => s ∈ 𝓝 0 ∧ Balanced 𝕜 s ∧ Convex ℝ s) id", " ∃ i', (i' ∈ 𝓝 0 ∧ Balanced 𝕜 i' ∧ Convex ℝ i') ∧ id i' ⊆ id s", " (convexHull ℝ) (balancedCore 𝕜 s) ∈ 𝓝 0 ∧\n Balanced 𝕜 ((convexHull ℝ) (balancedCore 𝕜 s)) ∧ Convex ℝ ((convexHull ℝ) (balancedCore 𝕜 s))", " Balanced 𝕜 ((conv...
[ " (𝓝 0).HasBasis (fun s => s ∈ 𝓝 0 ∧ Balanced 𝕜 s ∧ Convex ℝ s) id", " ∃ i', (i' ∈ 𝓝 0 ∧ Balanced 𝕜 i' ∧ Convex ℝ i') ∧ id i' ⊆ id s", " (convexHull ℝ) (balancedCore 𝕜 s) ∈ 𝓝 0 ∧\n Balanced 𝕜 ((convexHull ℝ) (balancedCore 𝕜 s)) ∧ Convex ℝ ((convexHull ℝ) (balancedCore 𝕜 s))", " Balanced 𝕜 ((conv...
import Mathlib.RingTheory.DedekindDomain.Ideal import Mathlib.RingTheory.Valuation.ExtendToLocalization import Mathlib.RingTheory.Valuation.ValuationSubring import Mathlib.Topology.Algebra.ValuedField import Mathlib.Algebra.Order.Group.TypeTags #align_import ring_theory.dedekind_domain.adic_valuation from "leanprover...
Mathlib/RingTheory/DedekindDomain/AdicValuation.lean
124
134
theorem int_valuation_lt_one_iff_dvd (r : R) : v.intValuationDef r < 1 ↔ v.asIdeal ∣ Ideal.span {r} := by
rw [intValuationDef] split_ifs with hr · simp [hr] · rw [← WithZero.coe_one, ← ofAdd_zero, WithZero.coe_lt_coe, ofAdd_lt, neg_lt_zero, ← Int.ofNat_zero, Int.ofNat_lt, zero_lt_iff] have h : (Ideal.span {r} : Ideal R) ≠ 0 := by rw [Ne, Ideal.zero_eq_bot, Ideal.span_singleton_eq_bot] exact h...
[ " v.intValuationDef x ≠ 0", " ↑(ofAdd (-↑((Associates.mk v.asIdeal).count (Associates.mk (Ideal.span {x})).factors))) ≠ 0", " 0 < v.intValuationDef ↑x", " 0 < ↑(ofAdd (-↑((Associates.mk v.asIdeal).count (Associates.mk (Ideal.span {↑x})).factors)))", " v.intValuationDef x ≤ 1", " (if x = 0 then 0 else ↑(of...
[ " v.intValuationDef x ≠ 0", " ↑(ofAdd (-↑((Associates.mk v.asIdeal).count (Associates.mk (Ideal.span {x})).factors))) ≠ 0", " 0 < v.intValuationDef ↑x", " 0 < ↑(ofAdd (-↑((Associates.mk v.asIdeal).count (Associates.mk (Ideal.span {↑x})).factors)))", " v.intValuationDef x ≤ 1", " (if x = 0 then 0 else ↑(of...
import Mathlib.Order.Cover import Mathlib.Order.LatticeIntervals import Mathlib.Order.GaloisConnection #align_import order.modular_lattice from "leanprover-community/mathlib"@"207cfac9fcd06138865b5d04f7091e46d9320432" open Set variable {α : Type*} class IsWeakUpperModularLattice (α : Type*) [Lattice α] : Prop ...
Mathlib/Order/ModularLattice.lean
216
217
theorem inf_sup_assoc_of_le {x : α} (y : α) {z : α} (h : z ≤ x) : x ⊓ y ⊔ z = x ⊓ (y ⊔ z) := by
rw [inf_comm, sup_comm, ← sup_inf_assoc_of_le y h, inf_comm, sup_comm]
[ " x ⊓ y ⊔ z = x ⊓ (y ⊔ z)" ]
[]
import Mathlib.Topology.Sets.Opens #align_import topology.local_at_target from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982" open TopologicalSpace Set Filter open Topology Filter variable {α β : Type*} [TopologicalSpace α] [TopologicalSpace β] {f : α → β} variable {s : Set β} {ι : Ty...
Mathlib/Topology/LocalAtTarget.lean
90
98
theorem isOpen_iff_inter_of_iSup_eq_top (s : Set β) : IsOpen s ↔ ∀ i, IsOpen (s ∩ U i) := by
constructor · exact fun H i => H.inter (U i).2 · intro H have : ⋃ i, (U i : Set β) = Set.univ := by convert congr_arg (SetLike.coe) hU simp rw [← s.inter_univ, ← this, Set.inter_iUnion] exact isOpen_iUnion H
[ " Inducing (s.restrictPreimage f)", " ∀ (x : ↑(f ⁻¹' s)), 𝓝 x = comap Subtype.val (comap f (𝓝 (f ↑x)))", " 𝓝 a = comap Subtype.val (comap f (𝓝 (f ↑a)))", " IsClosedMap (s.restrictPreimage f)", " IsClosed t → IsClosed (s.restrictPreimage f '' t)", " ∀ (u : Set α), IsClosed u → Subtype.val ⁻¹' u = t → ∃...
[ " Inducing (s.restrictPreimage f)", " ∀ (x : ↑(f ⁻¹' s)), 𝓝 x = comap Subtype.val (comap f (𝓝 (f ↑x)))", " 𝓝 a = comap Subtype.val (comap f (𝓝 (f ↑a)))", " IsClosedMap (s.restrictPreimage f)", " IsClosed t → IsClosed (s.restrictPreimage f '' t)", " ∀ (u : Set α), IsClosed u → Subtype.val ⁻¹' u = t → ∃...
import Mathlib.Algebra.BigOperators.NatAntidiagonal import Mathlib.Topology.Algebra.InfiniteSum.Constructions import Mathlib.Topology.Algebra.Ring.Basic #align_import topology.algebra.infinite_sum.ring from "leanprover-community/mathlib"@"9a59dcb7a2d06bf55da57b9030169219980660cd" open Filter Finset Function open...
Mathlib/Topology/Algebra/InfiniteSum/Ring.lean
208
213
theorem summable_sum_mul_antidiagonal_of_summable_mul (h : Summable fun x : A × A ↦ f x.1 * g x.2) : Summable fun n ↦ ∑ kl ∈ antidiagonal n, f kl.1 * g kl.2 := by
rw [summable_mul_prod_iff_summable_mul_sigma_antidiagonal] at h conv => congr; ext; rw [← Finset.sum_finset_coe, ← tsum_fintype] exact h.sigma' fun n ↦ (hasSum_fintype _).summable
[ " HasSum (fun i => a₂ * f i) (a₂ * a₁)", " HasSum (fun i => f i * a₂) (a₁ * a₂)", " Summable fun n => ∑ kl ∈ antidiagonal n, f kl.1 * g kl.2", "ι : Type u_1\nκ : Type u_2\nR : Type u_3\nα : Type u_4\ninst✝⁸ : NonUnitalNonAssocSemiring α\ninst✝⁷ : TopologicalSpace α\ninst✝⁶ : TopologicalSemiring α\nf✝ g✝ : ι →...
[ " HasSum (fun i => a₂ * f i) (a₂ * a₁)", " HasSum (fun i => f i * a₂) (a₁ * a₂)" ]
import Mathlib.CategoryTheory.Elementwise import Mathlib.CategoryTheory.Adjunction.Evaluation import Mathlib.Tactic.CategoryTheory.Elementwise import Mathlib.CategoryTheory.Adhesive import Mathlib.CategoryTheory.Sites.ConcreteSheafification #align_import category_theory.sites.subsheaf from "leanprover-community/mathl...
Mathlib/CategoryTheory/Sites/Subsheaf.lean
146
149
theorem Subpresheaf.lift_ι (f : F' ⟶ F) (hf : ∀ U x, f.app U x ∈ G.obj U) : G.lift f hf ≫ G.ι = f := by
ext rfl
[ " x ∈ F.map x✝¹ ⁻¹' (fun U => ⊤) V", " { obj := fun U => ↑(G.obj U), map := fun U V i x => ⟨F.map i ↑x, ⋯⟩ }.map (𝟙 X) =\n 𝟙 ({ obj := fun U => ↑(G.obj U), map := fun U V i x => ⟨F.map i ↑x, ⋯⟩ }.obj X)", " ↑({ obj := fun U => ↑(G.obj U), map := fun U V i x => ⟨F.map i ↑x, ⋯⟩ }.map (𝟙 X) ⟨x, property✝⟩) =...
[ " x ∈ F.map x✝¹ ⁻¹' (fun U => ⊤) V", " { obj := fun U => ↑(G.obj U), map := fun U V i x => ⟨F.map i ↑x, ⋯⟩ }.map (𝟙 X) =\n 𝟙 ({ obj := fun U => ↑(G.obj U), map := fun U V i x => ⟨F.map i ↑x, ⋯⟩ }.obj X)", " ↑({ obj := fun U => ↑(G.obj U), map := fun U V i x => ⟨F.map i ↑x, ⋯⟩ }.map (𝟙 X) ⟨x, property✝⟩) =...
import Mathlib.Analysis.SpecialFunctions.Exp import Mathlib.Data.Nat.Factorization.Basic import Mathlib.Analysis.NormedSpace.Real #align_import analysis.special_functions.log.basic from "leanprover-community/mathlib"@"f23a09ce6d3f367220dc3cecad6b7eb69eb01690" open Set Filter Function open Topology noncomputable ...
Mathlib/Analysis/SpecialFunctions/Log/Basic.lean
55
56
theorem exp_log_eq_abs (hx : x ≠ 0) : exp (log x) = |x| := by
rw [log_of_ne_zero hx, ← coe_expOrderIso_apply, OrderIso.apply_symm_apply, Subtype.coe_mk]
[ " x.log = expOrderIso.symm ⟨x, hx⟩", " expOrderIso.symm ⟨|x|, ⋯⟩ = expOrderIso.symm ⟨x, hx⟩", " |x| = x", " rexp x.log = |x|" ]
[ " x.log = expOrderIso.symm ⟨x, hx⟩", " expOrderIso.symm ⟨|x|, ⋯⟩ = expOrderIso.symm ⟨x, hx⟩", " |x| = x" ]
import Mathlib.LinearAlgebra.Matrix.BilinearForm import Mathlib.LinearAlgebra.Matrix.Charpoly.Minpoly import Mathlib.LinearAlgebra.Determinant import Mathlib.LinearAlgebra.FiniteDimensional import Mathlib.LinearAlgebra.Vandermonde import Mathlib.LinearAlgebra.Trace import Mathlib.FieldTheory.IsAlgClosed.AlgebraicClosu...
Mathlib/RingTheory/Trace.lean
163
165
theorem trace_comp_trace [Algebra K T] [Algebra L T] [IsScalarTower K L T] [FiniteDimensional K L] [FiniteDimensional L T] : (trace K L).comp ((trace L T).restrictScalars K) = trace K T := by
ext; rw [LinearMap.comp_apply, LinearMap.restrictScalars_apply, trace_trace]
[ " trace R S = 0", " (trace R S) s = 0 s", " (trace R S) s = ((leftMulMatrix b) s).trace", " ((toMatrix b b) ((lmul R S) s)).trace = ((toMatrix b b) (mulLeft R s)).trace", " (trace R S) ((algebraMap R S) x) = Fintype.card ι • x", " ∑ i : ι, ((toMatrix b b) ((lmul R S) ((algebraMap R S) x))).diag i = Fintyp...
[ " trace R S = 0", " (trace R S) s = 0 s", " (trace R S) s = ((leftMulMatrix b) s).trace", " ((toMatrix b b) ((lmul R S) s)).trace = ((toMatrix b b) (mulLeft R s)).trace", " (trace R S) ((algebraMap R S) x) = Fintype.card ι • x", " ∑ i : ι, ((toMatrix b b) ((lmul R S) ((algebraMap R S) x))).diag i = Fintyp...
import Mathlib.Topology.Separation #align_import topology.extend_from from "leanprover-community/mathlib"@"b363547b3113d350d053abdf2884e9850a56b205" noncomputable section open Topology open Filter Set variable {X Y : Type*} [TopologicalSpace X] [TopologicalSpace Y] def extendFrom (A : Set X) (f : X → Y) : X ...
Mathlib/Topology/ExtendFrom.lean
63
81
theorem continuousOn_extendFrom [RegularSpace Y] {f : X → Y} {A B : Set X} (hB : B ⊆ closure A) (hf : ∀ x ∈ B, ∃ y, Tendsto f (𝓝[A] x) (𝓝 y)) : ContinuousOn (extendFrom A f) B := by
set φ := extendFrom A f intro x x_in suffices ∀ V' ∈ 𝓝 (φ x), IsClosed V' → φ ⁻¹' V' ∈ 𝓝[B] x by simpa [ContinuousWithinAt, (closed_nhds_basis (φ x)).tendsto_right_iff] intro V' V'_in V'_closed obtain ⟨V, V_in, V_op, hV⟩ : ∃ V ∈ 𝓝 x, IsOpen V ∧ V ∩ A ⊆ f ⁻¹' V' := by have := tendsto_extendFrom (hf...
[ " ContinuousOn (extendFrom A f) B", " ContinuousOn φ B", " ContinuousWithinAt φ B x", " ∀ V' ∈ 𝓝 (φ x), IsClosed V' → φ ⁻¹' V' ∈ 𝓝[B] x", " φ ⁻¹' V' ∈ 𝓝[B] x", " ∃ V ∈ 𝓝 x, IsOpen V ∧ V ∩ A ⊆ f ⁻¹' V'", " ∀ y ∈ V ∩ B, φ y ∈ V'", " φ y ∈ V'", " V ∩ A ∈ 𝓝[A] y" ]
[]
import Mathlib.Data.Nat.Count import Mathlib.Data.Nat.SuccPred import Mathlib.Order.Interval.Set.Monotone import Mathlib.Order.OrderIsoNat #align_import data.nat.nth from "leanprover-community/mathlib"@"7fdd4f3746cb059edfdb5d52cba98f66fce418c0" open Finset namespace Nat variable (p : ℕ → Prop) noncomputable d...
Mathlib/Data/Nat/Nth.lean
113
119
theorem image_nth_Iio_card (hf : (setOf p).Finite) : nth p '' Set.Iio hf.toFinset.card = setOf p := calc nth p '' Set.Iio hf.toFinset.card = Set.range (hf.toFinset.orderEmbOfFin rfl) := by
ext x simp only [Set.mem_image, Set.mem_range, Fin.exists_iff, ← nth_eq_orderEmbOfFin hf, Set.mem_Iio, exists_prop] _ = setOf p := by rw [range_orderEmbOfFin, Set.Finite.coe_toFinset]
[ " ℕ", " nth p n = 0", " (sort (fun x x_1 => x ≤ x_1) hf.toFinset).length ≤ n", " nth p n = (hf.toFinset.orderEmbOfFin ⋯) ⟨n, hn⟩", " StrictMonoOn (nth p) (Set.Iio hf.toFinset.card)", " nth p m < nth p n", " (⋯.toFinset.orderEmbOfFin ⋯) ⟨m, ⋯⟩ < (⋯.toFinset.orderEmbOfFin ⋯) ⟨n, ⋯⟩", " Set.range (nth p)...
[ " ℕ", " nth p n = 0", " (sort (fun x x_1 => x ≤ x_1) hf.toFinset).length ≤ n", " nth p n = (hf.toFinset.orderEmbOfFin ⋯) ⟨n, hn⟩", " StrictMonoOn (nth p) (Set.Iio hf.toFinset.card)", " nth p m < nth p n", " (⋯.toFinset.orderEmbOfFin ⋯) ⟨m, ⋯⟩ < (⋯.toFinset.orderEmbOfFin ⋯) ⟨n, ⋯⟩", " Set.range (nth p)...
import Mathlib.MeasureTheory.Decomposition.RadonNikodym import Mathlib.Probability.Kernel.Disintegration.CdfToKernel #align_import probability.kernel.cond_cdf from "leanprover-community/mathlib"@"3b88f4005dc2e28d42f974cc1ce838f0dafb39b8" open MeasureTheory Set Filter TopologicalSpace open scoped NNReal ENNReal Me...
Mathlib/Probability/Kernel/Disintegration/CondCdf.lean
102
124
theorem tendsto_IicSnd_atBot [IsFiniteMeasure ρ] {s : Set α} (hs : MeasurableSet s) : Tendsto (fun r : ℚ ↦ ρ.IicSnd r s) atBot (𝓝 0) := by
simp_rw [ρ.IicSnd_apply _ hs] have h_empty : ρ (s ×ˢ ∅) = 0 := by simp only [prod_empty, measure_empty] rw [← h_empty, ← Real.iInter_Iic_rat, prod_iInter] suffices h_neg : Tendsto (fun r : ℚ ↦ ρ (s ×ˢ Iic ↑(-r))) atTop (𝓝 (ρ (⋂ r : ℚ, s ×ˢ Iic ↑(-r)))) by have h_inter_eq : ⋂ r : ℚ, s ×ˢ Iic ↑(-r) = ...
[ " (ρ.IicSnd r) s = ρ (s ×ˢ Iic r)", " ρ.IicSnd r ≤ ρ.IicSnd r'", " (ρ.IicSnd r) s ≤ (ρ.IicSnd r') s", " ρ (s ×ˢ Iic r) ≤ ρ (s ×ˢ Iic r')", " r ≤ r'", " ρ.IicSnd r ≤ ρ.fst", " (ρ.IicSnd r) s ≤ ρ.fst s", " ρ (s ×ˢ Iic r) ≤ ρ (Prod.fst ⁻¹' s)", " ⨅ r, (ρ.IicSnd ↑↑r) s = (ρ.IicSnd ↑t) s", " Tendsto (f...
[ " (ρ.IicSnd r) s = ρ (s ×ˢ Iic r)", " ρ.IicSnd r ≤ ρ.IicSnd r'", " (ρ.IicSnd r) s ≤ (ρ.IicSnd r') s", " ρ (s ×ˢ Iic r) ≤ ρ (s ×ˢ Iic r')", " r ≤ r'", " ρ.IicSnd r ≤ ρ.fst", " (ρ.IicSnd r) s ≤ ρ.fst s", " ρ (s ×ˢ Iic r) ≤ ρ (Prod.fst ⁻¹' s)", " ⨅ r, (ρ.IicSnd ↑↑r) s = (ρ.IicSnd ↑t) s", " Tendsto (f...
import Mathlib.Analysis.Normed.Group.Hom import Mathlib.Analysis.NormedSpace.Basic import Mathlib.Analysis.NormedSpace.LinearIsometry import Mathlib.Algebra.Star.SelfAdjoint import Mathlib.Algebra.Star.Subalgebra import Mathlib.Algebra.Star.Unitary import Mathlib.Topology.Algebra.Module.Star #align_import analysis.no...
Mathlib/Analysis/NormedSpace/Star/Basic.lean
145
146
theorem mul_star_self_eq_zero_iff (x : E) : x * x⋆ = 0 ↔ x = 0 := by
simpa only [star_eq_zero, star_star] using @star_mul_self_eq_zero_iff _ _ _ _ (star x)
[ " ‖x⋆ * x‖ = ‖x‖ * ‖x‖", " ∀ (x : E), ‖x⋆‖ = ‖x‖", " ‖x⋆‖ = ‖x‖", " ‖x⋆‖ * ‖x⋆‖ = ‖x * x⋆‖", " ‖x * x⋆‖ = ‖x‖ * ‖x‖", " ‖x⋆⋆ * x⋆‖ = ‖x‖ * ‖x‖", " ‖x⋆ * x‖ = ‖x⋆‖ * ‖x‖", " x⋆ * x = 0 ↔ x = 0", " ‖x‖ * ‖x‖ = 0 ↔ x = 0", " x⋆ * x ≠ 0 ↔ x ≠ 0", " x * x⋆ = 0 ↔ x = 0" ]
[ " ‖x⋆ * x‖ = ‖x‖ * ‖x‖", " ∀ (x : E), ‖x⋆‖ = ‖x‖", " ‖x⋆‖ = ‖x‖", " ‖x⋆‖ * ‖x⋆‖ = ‖x * x⋆‖", " ‖x * x⋆‖ = ‖x‖ * ‖x‖", " ‖x⋆⋆ * x⋆‖ = ‖x‖ * ‖x‖", " ‖x⋆ * x‖ = ‖x⋆‖ * ‖x‖", " x⋆ * x = 0 ↔ x = 0", " ‖x‖ * ‖x‖ = 0 ↔ x = 0", " x⋆ * x ≠ 0 ↔ x ≠ 0" ]
import Mathlib.Data.Matrix.PEquiv import Mathlib.Data.Set.Card import Mathlib.LinearAlgebra.Matrix.Determinant.Basic import Mathlib.LinearAlgebra.Matrix.Trace open BigOperators Matrix Equiv variable {n R : Type*} [DecidableEq n] [Fintype n] (σ : Perm n) variable (R) in abbrev Equiv.Perm.permMatrix [Zero R] [One...
Mathlib/LinearAlgebra/Matrix/Permutation.lean
41
43
theorem det_permutation [CommRing R] : det (σ.permMatrix R) = Perm.sign σ := by
rw [← Matrix.mul_one (σ.permMatrix R), PEquiv.toPEquiv_mul_matrix, det_permute, det_one, mul_one]
[ " (Perm.permMatrix R σ).det = ↑↑(Perm.sign σ)" ]
[]
import Mathlib.Algebra.Polynomial.AlgebraMap import Mathlib.Algebra.Polynomial.Derivative import Mathlib.Data.Nat.Choose.Cast import Mathlib.NumberTheory.Bernoulli #align_import number_theory.bernoulli_polynomials from "leanprover-community/mathlib"@"ca3d21f7f4fd613c2a3c54ac7871163e1e5ecb3a" noncomputable section...
Mathlib/NumberTheory/BernoulliPolynomials.lean
97
108
theorem derivative_bernoulli_add_one (k : ℕ) : Polynomial.derivative (bernoulli (k + 1)) = (k + 1) * bernoulli k := by
simp_rw [bernoulli, derivative_sum, derivative_monomial, Nat.sub_sub, Nat.add_sub_add_right] -- LHS sum has an extra term, but the coefficient is zero: rw [range_add_one, sum_insert not_mem_range_self, tsub_self, cast_zero, mul_zero, map_zero, zero_add, mul_sum] -- the rest of the sum is termwise equal: ...
[ " bernoulli n = ∑ i ∈ range (n + 1), (monomial i) (_root_.bernoulli (n - i) * ↑(n.choose i))", " ∑ i ∈ range (n + 1), (monomial (n - i)) (_root_.bernoulli i * ↑(n.choose i)) =\n ∑ j ∈ range (n + 1), (monomial (n - j)) (_root_.bernoulli (n - (n - j)) * ↑(n.choose (n - j)))", " ∀ x ∈ range (n + 1),\n (monom...
[ " bernoulli n = ∑ i ∈ range (n + 1), (monomial i) (_root_.bernoulli (n - i) * ↑(n.choose i))", " ∑ i ∈ range (n + 1), (monomial (n - i)) (_root_.bernoulli i * ↑(n.choose i)) =\n ∑ j ∈ range (n + 1), (monomial (n - j)) (_root_.bernoulli (n - (n - j)) * ↑(n.choose (n - j)))", " ∀ x ∈ range (n + 1),\n (monom...
import Mathlib.Order.BooleanAlgebra import Mathlib.Tactic.Common #align_import order.heyting.boundary from "leanprover-community/mathlib"@"70d50ecfd4900dd6d328da39ab7ebd516abe4025" variable {α : Type*} namespace Coheyting variable [CoheytingAlgebra α] {a b : α} def boundary (a : α) : α := a ⊓ ¬a #align cohe...
Mathlib/Order/Heyting/Boundary.lean
89
93
theorem boundary_sup_le : ∂ (a ⊔ b) ≤ ∂ a ⊔ ∂ b := by
rw [boundary, inf_sup_right] exact sup_le_sup (inf_le_inf_left _ <| hnot_anti le_sup_left) (inf_le_inf_left _ <| hnot_anti le_sup_right)
[ " ∂ ⊤ = ⊥", " ∂ (¬¬a) = ∂ (¬a)", " ¬∂ a = ⊤", " ∂ (a ⊓ b) = ∂ a ⊓ b ⊔ a ⊓ ∂ b", " a ⊓ b ⊓ ¬(a ⊓ b) = a ⊓ ¬a ⊓ b ⊔ a ⊓ (b ⊓ ¬b)", " ∂ (a ⊔ b) ≤ ∂ a ⊔ ∂ b", " a ⊓ ¬(a ⊔ b) ⊔ b ⊓ ¬(a ⊔ b) ≤ ∂ a ⊔ ∂ b" ]
[ " ∂ ⊤ = ⊥", " ∂ (¬¬a) = ∂ (¬a)", " ¬∂ a = ⊤", " ∂ (a ⊓ b) = ∂ a ⊓ b ⊔ a ⊓ ∂ b", " a ⊓ b ⊓ ¬(a ⊓ b) = a ⊓ ¬a ⊓ b ⊔ a ⊓ (b ⊓ ¬b)" ]
import Mathlib.Algebra.Periodic import Mathlib.Data.Nat.Count import Mathlib.Data.Nat.GCD.Basic import Mathlib.Order.Interval.Finset.Nat #align_import data.nat.periodic from "leanprover-community/mathlib"@"dc6c365e751e34d100e80fe6e314c3c3e0fd2988" namespace Nat open Nat Function
Mathlib/Data/Nat/Periodic.lean
25
26
theorem periodic_gcd (a : ℕ) : Periodic (gcd a) a := by
simp only [forall_const, gcd_add_self_right, eq_self_iff_true, Periodic]
[ " Periodic a.gcd a" ]
[]
import Mathlib.GroupTheory.Coprod.Basic import Mathlib.GroupTheory.Complement open Monoid Coprod Multiplicative Subgroup Function def HNNExtension.con (G : Type*) [Group G] (A B : Subgroup G) (φ : A ≃* B) : Con (G ∗ Multiplicative ℤ) := conGen (fun x y => ∃ (a : A), x = inr (ofAdd 1) * inl (a : G) ∧ ...
Mathlib/GroupTheory/HNNExtension.lean
113
129
theorem induction_on {motive : HNNExtension G A B φ → Prop} (x : HNNExtension G A B φ) (of : ∀ g, motive (of g)) (t : motive t) (mul : ∀ x y, motive x → motive y → motive (x * y)) (inv : ∀ x, motive x → motive x⁻¹) : motive x := by
let S : Subgroup (HNNExtension G A B φ) := { carrier := setOf motive one_mem' := by simpa using of 1 mul_mem' := mul _ _ inv_mem' := inv _ } let f : HNNExtension G A B φ →* S := lift (HNNExtension.of.codRestrict S of) ⟨HNNExtension.t, t⟩ (by intro a; ext; simp [equiv_eq_conj, mul_as...
[ " Group (HNNExtension G A B φ)", " Group (HNNExtension.con G A B φ).Quotient", " (fun x x_1 => x * x_1) (inr (ofAdd 1)) (inl ↑a) = inr (ofAdd 1) * inl ↑a ∧\n (fun x x_1 => x * x_1) (inl ↑(φ a)) (inr (ofAdd 1)) = inl ↑(φ a) * inr (ofAdd 1)", " of ↑b * t = t * of ↑(φ.symm b)", " of ↑b * t = of ↑(φ (φ.symm ...
[ " Group (HNNExtension G A B φ)", " Group (HNNExtension.con G A B φ).Quotient", " (fun x x_1 => x * x_1) (inr (ofAdd 1)) (inl ↑a) = inr (ofAdd 1) * inl ↑a ∧\n (fun x x_1 => x * x_1) (inl ↑(φ a)) (inr (ofAdd 1)) = inl ↑(φ a) * inr (ofAdd 1)", " of ↑b * t = t * of ↑(φ.symm b)", " of ↑b * t = of ↑(φ (φ.symm ...
import Mathlib.MeasureTheory.Decomposition.RadonNikodym import Mathlib.MeasureTheory.Measure.Haar.OfBasis import Mathlib.Probability.Independence.Basic #align_import probability.density from "leanprover-community/mathlib"@"c14c8fcde993801fca8946b0d80131a1a81d1520" open scoped Classical MeasureTheory NNReal ENNRea...
Mathlib/Probability/Density.lean
158
164
theorem hasPDF_of_pdf_ne_zero {m : MeasurableSpace Ω} {ℙ : Measure Ω} {μ : Measure E} {X : Ω → E} (hac : map X ℙ ≪ μ) (hpdf : ¬pdf X ℙ μ =ᵐ[μ] 0) : HasPDF X ℙ μ := by
refine ⟨?_, ?_, hac⟩ · exact aemeasurable_of_pdf_ne_zero X hpdf · contrapose! hpdf have := pdf_of_not_haveLebesgueDecomposition hpdf filter_upwards using congrFun this
[ " pdf X ℙ μ =ᶠ[ae μ] 0", " rnDeriv 0 μ =ᶠ[ae μ] 0", " AEMeasurable X ℙ", " HasPDF X ℙ μ", " (map X ℙ).HaveLebesgueDecomposition μ" ]
[ " pdf X ℙ μ =ᶠ[ae μ] 0", " rnDeriv 0 μ =ᶠ[ae μ] 0", " AEMeasurable X ℙ" ]
import Mathlib.Algebra.Order.Ring.Basic import Mathlib.Algebra.Ring.Regular import Mathlib.Order.Interval.Set.Basic #align_import data.set.intervals.instances from "leanprover-community/mathlib"@"d012cd09a9b256d870751284dd6a29882b0be105" open Set variable {α : Type*} section OrderedSemiring variable [OrderedSe...
Mathlib/Algebra/Order/Interval/Set/Instances.lean
89
91
theorem coe_eq_one {x : Icc (0 : α) 1} : (x : α) = 1 ↔ x = 1 := by
symm exact Subtype.ext_iff
[ " ↑x = 0 ↔ x = 0", " x = 0 ↔ ↑x = 0", " ↑x = 1 ↔ x = 1", " x = 1 ↔ ↑x = 1" ]
[ " ↑x = 0 ↔ x = 0", " x = 0 ↔ ↑x = 0" ]
import Mathlib.Algebra.Polynomial.Reverse import Mathlib.Algebra.Regular.SMul #align_import data.polynomial.monic from "leanprover-community/mathlib"@"cbdf7b565832144d024caa5a550117c6df0204a5" noncomputable section open Finset open Polynomial namespace Polynomial universe u v y variable {R : Type u} {S : Typ...
Mathlib/Algebra/Polynomial/Monic.lean
51
55
theorem Monic.as_sum (hp : p.Monic) : p = X ^ p.natDegree + ∑ i ∈ range p.natDegree, C (p.coeff i) * X ^ i := by
conv_lhs => rw [p.as_sum_range_C_mul_X_pow, sum_range_succ_comm] suffices C (p.coeff p.natDegree) = 1 by rw [this, one_mul] exact congr_arg C hp
[ " Subsingleton R → (∀ (f g : R[X]), f = g) ∧ ∀ (a b : R), a = b", " (∀ (f g : R[X]), f = g) ∧ ∀ (a b : R), a = b", " p = X ^ p.natDegree + ∑ i ∈ range p.natDegree, C (p.coeff i) * X ^ i", "R : Type u S : Type v a b : R m n : ℕ ι : Type y inst✝ : Semiring R p q r : R[X] hp : p.Monic | p", " C (p.coeff p.natD...
[ " Subsingleton R → (∀ (f g : R[X]), f = g) ∧ ∀ (a b : R), a = b", " (∀ (f g : R[X]), f = g) ∧ ∀ (a b : R), a = b" ]
import Mathlib.Probability.IdentDistrib import Mathlib.MeasureTheory.Integral.DominatedConvergence import Mathlib.Analysis.SpecificLimits.FloorPow import Mathlib.Analysis.PSeries import Mathlib.Analysis.Asymptotics.SpecificAsymptotics #align_import probability.strong_law from "leanprover-community/mathlib"@"f2ce60867...
Mathlib/Probability/StrongLaw.lean
99
103
theorem abs_truncation_le_abs_self (f : α → ℝ) (A : ℝ) (x : α) : |truncation f A x| ≤ |f x| := by
simp only [truncation, indicator, Set.mem_Icc, id, Function.comp_apply] split_ifs · exact le_rfl · simp [abs_nonneg]
[ " AEStronglyMeasurable (ProbabilityTheory.truncation f A) μ", " AEStronglyMeasurable ((Set.Ioc (-A) A).indicator id) (Measure.map f μ)", " |truncation f A x| ≤ |A|", " |if f x ∈ Set.Ioc (-A) A then f x else 0| ≤ |A|", " |f x| ≤ |A|", " |0| ≤ |A|", " truncation f 0 = 0", " (fun x => 0) ∘ f = 0", " |t...
[ " AEStronglyMeasurable (ProbabilityTheory.truncation f A) μ", " AEStronglyMeasurable ((Set.Ioc (-A) A).indicator id) (Measure.map f μ)", " |truncation f A x| ≤ |A|", " |if f x ∈ Set.Ioc (-A) A then f x else 0| ≤ |A|", " |f x| ≤ |A|", " |0| ≤ |A|", " truncation f 0 = 0", " (fun x => 0) ∘ f = 0" ]
import Mathlib.CategoryTheory.Limits.Shapes.Pullbacks import Mathlib.CategoryTheory.Limits.Shapes.ZeroMorphisms import Mathlib.CategoryTheory.Limits.Constructions.BinaryProducts #align_import category_theory.limits.constructions.zero_objects from "leanprover-community/mathlib"@"52a270e2ea4e342c2587c106f8be904524214a4...
Mathlib/CategoryTheory/Limits/Constructions/ZeroObjects.lean
115
117
theorem inr_zeroCoprodIso_hom (X : C) : coprod.inr ≫ (zeroCoprodIso X).hom = 𝟙 X := by
dsimp [zeroCoprodIso, binaryCofanZeroLeft] simp
[ " ∀ (s : BinaryFan 0 X), (fun s => s.snd) s ≫ 0 = s.fst", " ∀ (s : BinaryFan 0 X), (fun s => s.snd) s ≫ 𝟙 X = s.snd", " m = (fun s => s.snd) s", " (zeroProdIso X).inv ≫ prod.snd = 𝟙 X", " (limit.isoLimitCone { cone := BinaryFan.mk 0 (𝟙 X), isLimit := binaryFanZeroLeftIsLimit X }).inv ≫ prod.snd = 𝟙 X", ...
[ " ∀ (s : BinaryFan 0 X), (fun s => s.snd) s ≫ 0 = s.fst", " ∀ (s : BinaryFan 0 X), (fun s => s.snd) s ≫ 𝟙 X = s.snd", " m = (fun s => s.snd) s", " (zeroProdIso X).inv ≫ prod.snd = 𝟙 X", " (limit.isoLimitCone { cone := BinaryFan.mk 0 (𝟙 X), isLimit := binaryFanZeroLeftIsLimit X }).inv ≫ prod.snd = 𝟙 X", ...
import Mathlib.LinearAlgebra.FreeModule.PID import Mathlib.LinearAlgebra.FreeModule.Finite.Basic import Mathlib.LinearAlgebra.BilinearForm.DualLattice import Mathlib.RingTheory.DedekindDomain.Basic import Mathlib.RingTheory.Localization.Module import Mathlib.RingTheory.Trace #align_import ring_theory.dedekind_domain....
Mathlib/RingTheory/DedekindDomain/IntegralClosure.lean
145
167
theorem FiniteDimensional.exists_is_basis_integral : ∃ (s : Finset L) (b : Basis s K L), ∀ x, IsIntegral A (b x) := by
letI := Classical.decEq L letI : IsNoetherian K L := IsNoetherian.iff_fg.2 inferInstance let s' := IsNoetherian.finsetBasisIndex K L let bs' := IsNoetherian.finsetBasis K L obtain ⟨y, hy, his'⟩ := exists_integral_multiples A K (Finset.univ.image bs') have hy' : algebraMap A L y ≠ 0 := by refine mt ((in...
[ " IsLocalization (algebraMapSubmonoid C A⁰) L", " ∀ (y : ↥(algebraMapSubmonoid C A⁰)), IsUnit ((algebraMap C L) ↑y)", " IsUnit ((algebraMap C L) ↑⟨(algebraMap A C) x, ⋯⟩)", " x ≠ 0", " ∃ x, z * (algebraMap C L) ↑x.2 = (algebraMap C L) x.1", " z * (algebraMap C L) ↑(x, ⟨(algebraMap A C) ↑m, ⋯⟩).2 = (algebr...
[ " IsLocalization (algebraMapSubmonoid C A⁰) L", " ∀ (y : ↥(algebraMapSubmonoid C A⁰)), IsUnit ((algebraMap C L) ↑y)", " IsUnit ((algebraMap C L) ↑⟨(algebraMap A C) x, ⋯⟩)", " x ≠ 0", " ∃ x, z * (algebraMap C L) ↑x.2 = (algebraMap C L) x.1", " z * (algebraMap C L) ↑(x, ⟨(algebraMap A C) ↑m, ⋯⟩).2 = (algebr...
import Mathlib.RingTheory.WittVector.Basic import Mathlib.RingTheory.WittVector.IsPoly #align_import ring_theory.witt_vector.init_tail from "leanprover-community/mathlib"@"0798037604b2d91748f9b43925fb7570a5f3256c" variable {p : ℕ} [hp : Fact p.Prime] (n : ℕ) {R : Type*} [CommRing R] -- type as `\bbW` local notat...
Mathlib/RingTheory/WittVector/InitTail.lean
72
77
theorem coeff_select (x : 𝕎 R) (n : ℕ) : (select P x).coeff n = aeval x.coeff (selectPoly P n) := by
dsimp [select, selectPoly] split_ifs with hi · rw [aeval_X, mk]; simp only [hi]; rfl · rw [AlgHom.map_zero, mk]; simp only [hi]; rfl
[ " (select P x).coeff n = (aeval x.coeff) (selectPoly P n)", " (mk p fun n => if P n then x.coeff n else 0).coeff n = (aeval x.coeff) (if P n then X n else 0)", " (mk p fun n => if P n then x.coeff n else 0).coeff n = (aeval x.coeff) (X n)", " { coeff := fun n => if P n then x.coeff n else 0 }.coeff n = x.coef...
[]
import Mathlib.Algebra.Polynomial.AlgebraMap import Mathlib.Algebra.Polynomial.Monic #align_import data.polynomial.lifts from "leanprover-community/mathlib"@"63417e01fbc711beaf25fa73b6edb395c0cfddd0" open Polynomial noncomputable section namespace Polynomial universe u v w section Semiring variable {R : Type...
Mathlib/Algebra/Polynomial/Lifts.lean
61
62
theorem mem_lifts (p : S[X]) : p ∈ lifts f ↔ ∃ q : R[X], map f q = p := by
simp only [coe_mapRingHom, lifts, RingHom.mem_rangeS]
[ " p ∈ lifts f ↔ ∃ q, map f q = p" ]
[]
import Mathlib.Analysis.Fourier.FourierTransform import Mathlib.Analysis.InnerProductSpace.Dual import Mathlib.Analysis.InnerProductSpace.EuclideanDist import Mathlib.MeasureTheory.Function.ContinuousMapDense import Mathlib.MeasureTheory.Group.Integral import Mathlib.MeasureTheory.Integral.SetIntegral import Mathlib.M...
Mathlib/Analysis/Fourier/RiemannLebesgueLemma.lean
96
104
theorem fourierIntegral_eq_half_sub_half_period_translate {w : V} (hw : w ≠ 0) (hf : Integrable f) : ∫ v : V, 𝐞 (-⟪v, w⟫) • f v = (1 / (2 : ℂ)) • ∫ v : V, 𝐞 (-⟪v, w⟫) • (f v - f (v + i w)) := by
simp_rw [smul_sub] rw [integral_sub, fourierIntegral_half_period_translate hw, sub_eq_add_neg, neg_neg, ← two_smul ℂ _, ← @smul_assoc _ _ _ _ _ _ (IsScalarTower.left ℂ), smul_eq_mul] · norm_num exacts [(Real.fourierIntegral_convergent_iff w).2 hf, (Real.fourierIntegral_convergent_iff w).2 (hf.comp_add_...
[ " ∫ (v : V), 𝐞 (-⟪v, w⟫_ℝ) • f (v + i w) = -∫ (v : V), 𝐞 (-⟪v, w⟫_ℝ) • f v", " ⟪i w, w⟫_ℝ = 1 / 2", " ‖w‖ ^ 2 ≠ 0", " (fun v => 𝐞 (-⟪v, w⟫_ℝ) • f (v + i w)) = fun v => (fun x => -(𝐞 (-⟪x, w⟫_ℝ) • f x)) (v + i w)", " 𝐞 (-⟪v, w⟫_ℝ) • f (v + i w) = (fun x => -(𝐞 (-⟪x, w⟫_ℝ) • f x)) (v + i w)", " cexp (...
[ " ∫ (v : V), 𝐞 (-⟪v, w⟫_ℝ) • f (v + i w) = -∫ (v : V), 𝐞 (-⟪v, w⟫_ℝ) • f v", " ⟪i w, w⟫_ℝ = 1 / 2", " ‖w‖ ^ 2 ≠ 0", " (fun v => 𝐞 (-⟪v, w⟫_ℝ) • f (v + i w)) = fun v => (fun x => -(𝐞 (-⟪x, w⟫_ℝ) • f x)) (v + i w)", " 𝐞 (-⟪v, w⟫_ℝ) • f (v + i w) = (fun x => -(𝐞 (-⟪x, w⟫_ℝ) • f x)) (v + i w)", " cexp (...
import Mathlib.Logic.Function.Basic import Mathlib.Tactic.MkIffOfInductiveProp #align_import data.sum.basic from "leanprover-community/mathlib"@"bd9851ca476957ea4549eb19b40e7b5ade9428cc" universe u v w x variable {α : Type u} {α' : Type w} {β : Type v} {β' : Type x} {γ δ : Type*} namespace Sum #align sum.foral...
Mathlib/Data/Sum/Basic.lean
132
134
theorem update_inl_apply_inl [DecidableEq α] [DecidableEq (Sum α β)] {f : Sum α β → γ} {i j : α} {x : γ} : update f (inl i) x (inl j) = update (f ∘ inl) i x j := by
rw [← update_inl_comp_inl, Function.comp_apply]
[ " (∃ fab, p fab) ↔ ∃ fa fb, p fun t => rec fa fb t", " (¬∀ (fa : (val : α) → γ (inl val)) (fb : (val : β) → γ (inr val)), ¬p fun t => rec fa fb t) ↔\n ∃ fa fb, p fun t => rec fa fb t", " rec f g x = cast ⋯ (rec f g y)", " rec f g x = cast ⋯ (rec f g x)", " x = Sum.elim (update f i x) g (inl i)", " ∀ (x...
[ " (∃ fab, p fab) ↔ ∃ fa fb, p fun t => rec fa fb t", " (¬∀ (fa : (val : α) → γ (inl val)) (fb : (val : β) → γ (inr val)), ¬p fun t => rec fa fb t) ↔\n ∃ fa fb, p fun t => rec fa fb t", " rec f g x = cast ⋯ (rec f g y)", " rec f g x = cast ⋯ (rec f g x)", " x = Sum.elim (update f i x) g (inl i)", " ∀ (x...
import Mathlib.MeasureTheory.Function.ConditionalExpectation.Basic #align_import measure_theory.function.conditional_expectation.indicator from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982" noncomputable section open TopologicalSpace MeasureTheory.Lp Filter ContinuousLinearMap open s...
Mathlib/MeasureTheory/Function/ConditionalExpectation/Indicator.lean
38
59
theorem condexp_ae_eq_restrict_zero (hs : MeasurableSet[m] s) (hf : f =ᵐ[μ.restrict s] 0) : μ[f|m] =ᵐ[μ.restrict s] 0 := by
by_cases hm : m ≤ m0 swap; · simp_rw [condexp_of_not_le hm]; rfl by_cases hμm : SigmaFinite (μ.trim hm) swap; · simp_rw [condexp_of_not_sigmaFinite hm hμm]; rfl haveI : SigmaFinite (μ.trim hm) := hμm have : SigmaFinite ((μ.restrict s).trim hm) := by rw [← restrict_trim hm _ hs] exact Restrict.sigma...
[ " μ[f|m] =ᶠ[ae (μ.restrict s)] 0", " 0 =ᶠ[ae (μ.restrict s)] 0", " SigmaFinite ((μ.restrict s).trim hm)", " SigmaFinite ((μ.trim hm).restrict s)", " ∀ (s_1 : Set α), MeasurableSet s_1 → (μ.restrict s) s_1 < ⊤ → IntegrableOn (μ[f|m]) s_1 (μ.restrict s)", " ∀ (s_1 : Set α), MeasurableSet s_1 → (μ.restrict s...
[]
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
494
503
theorem schur_complement_eq₂₂ [Fintype m] [Fintype n] [DecidableEq n] (A : Matrix m m 𝕜) (B : Matrix m n 𝕜) {D : Matrix n n 𝕜} (x : m → 𝕜) (y : n → 𝕜) [Invertible D] (hD : D.IsHermitian) : (star (x ⊕ᵥ y)) ᵥ* (fromBlocks A B Bᴴ D) ⬝ᵥ (x ⊕ᵥ y) = (star ((D⁻¹ * Bᴴ) *ᵥ x + y)) ᵥ* D ⬝ᵥ ((D⁻¹ * Bᴴ) *ᵥ x...
simp [Function.star_sum_elim, fromBlocks_mulVec, vecMul_fromBlocks, add_vecMul, dotProduct_mulVec, vecMul_sub, Matrix.mul_assoc, vecMul_mulVec, hD.eq, conjTranspose_nonsing_inv, star_mulVec] abel
[ " 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.Algebra.Associated import Mathlib.Algebra.Ring.Int #align_import data.int.associated from "leanprover-community/mathlib"@"207cfac9fcd06138865b5d04f7091e46d9320432"
Mathlib/Data/Int/Associated.lean
21
30
theorem Int.natAbs_eq_iff_associated {a b : ℤ} : a.natAbs = b.natAbs ↔ Associated a b := by
refine Int.natAbs_eq_natAbs_iff.trans ?_ constructor · rintro (rfl | rfl) · rfl · exact ⟨-1, by simp⟩ · rintro ⟨u, rfl⟩ obtain rfl | rfl := Int.units_eq_one_or u · exact Or.inl (by simp) · exact Or.inr (by simp)
[ " a.natAbs = b.natAbs ↔ Associated a b", " a = b ∨ a = -b ↔ Associated a b", " a = b ∨ a = -b → Associated a b", " Associated a a", " Associated (-b) b", " -b * ↑(-1) = b", " Associated a b → a = b ∨ a = -b", " a = a * ↑u ∨ a = -(a * ↑u)", " a = a * ↑1 ∨ a = -(a * ↑1)", " a = a * ↑1", " a = 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
438
440
theorem det_one_sub_mul_comm (A : Matrix m n α) (B : Matrix n m α) : det (1 - A * B) = det (1 - B * A) := by
rw [sub_eq_add_neg, ← Matrix.neg_mul, det_one_add_mul_comm, Matrix.mul_neg, ← sub_eq_add_neg]
[ " 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.Algebra.Module.Torsion import Mathlib.SetTheory.Cardinal.Cofinality import Mathlib.LinearAlgebra.FreeModule.Finite.Basic import Mathlib.LinearAlgebra.Dimension.StrongRankCondition #align_import linear_algebra.dimension from "leanprover-community/mathlib"@"47a5f8186becdbc826190ced4312f8199f9db6a5" ...
Mathlib/LinearAlgebra/Dimension/Finite.lean
125
131
theorem Module.finite_of_rank_eq_nat [Module.Free R M] {n : ℕ} (h : Module.rank R M = n) : Module.Finite R M := by
nontriviality R obtain ⟨⟨ι, b⟩⟩ := Module.Free.exists_basis (R := R) (M := M) have := mk_lt_aleph0_iff.mp <| b.linearIndependent.cardinal_le_rank |>.trans_eq h |>.trans_lt <| nat_lt_aleph0 n exact Module.Finite.of_basis b
[ " Module.rank R M ≤ ↑n", " ⨆ ι, #↑↑ι ≤ ↑n", " ∀ (i : { s // LinearIndependent (ι := { x // x ∈ s }) R Subtype.val }), #↑↑i ≤ ↑n", " #↑↑⟨s, li⟩ ≤ ↑n", " Finite R M" ]
[ " Module.rank R M ≤ ↑n", " ⨆ ι, #↑↑ι ≤ ↑n", " ∀ (i : { s // LinearIndependent (ι := { x // x ∈ s }) R Subtype.val }), #↑↑i ≤ ↑n", " #↑↑⟨s, li⟩ ≤ ↑n" ]
import Mathlib.Algebra.MvPolynomial.Degrees #align_import data.mv_polynomial.variables from "leanprover-community/mathlib"@"2f5b500a507264de86d666a5f87ddb976e2d8de4" noncomputable section open Set Function Finsupp AddMonoidAlgebra universe u v w variable {R : Type u} {S : Type v} namespace MvPolynomial varia...
Mathlib/Algebra/MvPolynomial/Variables.lean
180
189
theorem vars_sum_subset [DecidableEq σ] : (∑ i ∈ t, φ i).vars ⊆ Finset.biUnion t fun i => (φ i).vars := by
classical induction t using Finset.induction_on with | empty => simp | insert has hsum => rw [Finset.biUnion_insert, Finset.sum_insert has] refine Finset.Subset.trans (vars_add_subset _ _) (Finset.union_subset_union (Finset.Subset.refl _) ?_) assumption
[ " p.vars = p.degrees.toFinset", " p.degrees.toFinset = p.degrees.toFinset", " vars 0 = ∅", " ((monomial s) r).vars = s.support", " (C r).vars = ∅", " (X n).vars = {n}", " i ∈ p.vars ↔ ∃ d ∈ p.support, i ∈ d.support", " x v = 0", " v ∈ f.vars", " (p + q).vars ⊆ p.vars ∪ q.vars", " x ∈ p.vars ∪ q....
[ " p.vars = p.degrees.toFinset", " p.degrees.toFinset = p.degrees.toFinset", " vars 0 = ∅", " ((monomial s) r).vars = s.support", " (C r).vars = ∅", " (X n).vars = {n}", " i ∈ p.vars ↔ ∃ d ∈ p.support, i ∈ d.support", " x v = 0", " v ∈ f.vars", " (p + q).vars ⊆ p.vars ∪ q.vars", " x ∈ p.vars ∪ q....
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
81
88
theorem length_eq_zero_iff {w : W} : ℓ w = 0 ↔ w = 1 := by
constructor · intro h rcases cs.exists_reduced_word w with ⟨ω, hω, rfl⟩ have : ω = [] := eq_nil_of_length_eq_zero (hω.trans h) rw [this, wordProd_nil] · rintro rfl exact cs.length_one
[ " ∃ 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 ω" ]
import Mathlib.Analysis.Analytic.Basic import Mathlib.Combinatorics.Enumerative.Composition #align_import analysis.analytic.composition from "leanprover-community/mathlib"@"ce11c3c2a285bbe6937e26d9792fda4e51f3fe1a" noncomputable section variable {𝕜 : Type*} {E F G H : Type*} open Filter List open scoped Topol...
Mathlib/Analysis/Analytic/Composition.lean
106
114
theorem applyComposition_ones (p : FormalMultilinearSeries 𝕜 E F) (n : ℕ) : p.applyComposition (Composition.ones n) = fun v i => p 1 fun _ => v (Fin.castLE (Composition.length_le _) i) := by
funext v i apply p.congr (Composition.ones_blocksFun _ _) intro j hjn hj1 obtain rfl : j = 0 := by omega refine congr_arg v ?_ rw [Fin.ext_iff, Fin.coe_castLE, Composition.ones_embedding, Fin.val_mk]
[ " p.applyComposition (Composition.ones n) = fun v i => (p 1) fun x => v (Fin.castLE ⋯ i)", " p.applyComposition (Composition.ones n) v i = (p 1) fun x => v (Fin.castLE ⋯ i)", " ∀ (i_1 : ℕ) (him : i_1 < (Composition.ones n).blocksFun i),\n i_1 < 1 → (v ∘ ⇑((Composition.ones n).embedding i)) ⟨i_1, him⟩ = v (Fi...
[]
import Mathlib.Algebra.Group.Subgroup.Actions import Mathlib.Algebra.Order.Module.Algebra import Mathlib.LinearAlgebra.LinearIndependent import Mathlib.Algebra.Ring.Subring.Units #align_import linear_algebra.ray from "leanprover-community/mathlib"@"0f6670b8af2dff699de1c0b4b49039b31bc13c46" noncomputable section ...
Mathlib/LinearAlgebra/Ray.lean
61
63
theorem of_subsingleton [Subsingleton M] (x y : M) : SameRay R x y := by
rw [Subsingleton.elim x 0] exact zero_left _
[ " SameRay R x y", " SameRay R 0 y" ]
[]
import Mathlib.CategoryTheory.Abelian.Opposite import Mathlib.CategoryTheory.Limits.Preserves.Shapes.Zero import Mathlib.CategoryTheory.Limits.Preserves.Shapes.Kernels import Mathlib.CategoryTheory.Preadditive.LeftExact import Mathlib.CategoryTheory.Adjunction.Limits import Mathlib.Algebra.Homology.Exact import Mathli...
Mathlib/CategoryTheory/Abelian/Exact.lean
97
102
theorem exact_tfae : TFAE [Exact f g, f ≫ g = 0 ∧ kernel.ι g ≫ cokernel.π f = 0, imageSubobject f = kernelSubobject g] := by
tfae_have 1 ↔ 2; · apply exact_iff tfae_have 1 ↔ 3; · apply exact_iff_image_eq_kernel tfae_finish
[ " Exact f g ↔ imageSubobject f = kernelSubobject g", " Exact f g → imageSubobject f = kernelSubobject g", " imageSubobject f = kernelSubobject g", " (asIso (imageToKernel f g ⋯)).hom ≫ (kernelSubobject g).arrow = (imageSubobject f).arrow", " imageSubobject f = kernelSubobject g → Exact f g", " Exact f g ↔...
[ " Exact f g ↔ imageSubobject f = kernelSubobject g", " Exact f g → imageSubobject f = kernelSubobject g", " imageSubobject f = kernelSubobject g", " (asIso (imageToKernel f g ⋯)).hom ≫ (kernelSubobject g).arrow = (imageSubobject f).arrow", " imageSubobject f = kernelSubobject g → Exact f g", " Exact f g ↔...
import Mathlib.Algebra.MonoidAlgebra.Degree import Mathlib.Algebra.Polynomial.Coeff import Mathlib.Algebra.Polynomial.Monomial import Mathlib.Data.Fintype.BigOperators import Mathlib.Data.Nat.WithBot import Mathlib.Data.Nat.Cast.WithTop import Mathlib.Data.Nat.SuccPred #align_import data.polynomial.degree.definitions...
Mathlib/Algebra/Polynomial/Degree/Definitions.lean
132
135
theorem degree_eq_natDegree (hp : p ≠ 0) : degree p = (natDegree p : WithBot ℕ) := by
let ⟨n, hn⟩ := not_forall.1 (mt Option.eq_none_iff_forall_not_mem.2 (mt degree_eq_bot.1 hp)) have hn : degree p = some n := Classical.not_not.1 hn rw [natDegree, hn]; rfl
[ " Decidable p.Monic", " Decidable (p.leadingCoeff = 1)", " p.degree = ⊥", " p.natDegree = 0", " p.degree = ↑p.natDegree", " Option.some n = ↑(WithBot.unbot' 0 (Option.some n))" ]
[ " Decidable p.Monic", " Decidable (p.leadingCoeff = 1)", " p.degree = ⊥", " p.natDegree = 0" ]
import Mathlib.Analysis.NormedSpace.Basic import Mathlib.Analysis.Normed.Group.Hom import Mathlib.Data.Real.Sqrt import Mathlib.RingTheory.Ideal.QuotientOperations import Mathlib.Topology.MetricSpace.HausdorffDistance #align_import analysis.normed.group.quotient from "leanprover-community/mathlib"@"2196ab363eb097c008...
Mathlib/Analysis/Normed/Group/Quotient.lean
119
125
theorem QuotientAddGroup.norm_mk {S : AddSubgroup M} (x : M) : ‖(x : M ⧸ S)‖ = infDist x S := by
rw [norm_eq_infDist, ← infDist_image (IsometryEquiv.subLeft x).isometry, IsometryEquiv.subLeft_apply, sub_zero, ← IsometryEquiv.preimage_symm] congr 1 with y simp only [mem_preimage, IsometryEquiv.subLeft_symm_apply, mem_setOf_eq, QuotientAddGroup.eq, neg_add, neg_neg, neg_add_cancel_right, SetLike.mem_c...
[ " ‖x‖ = infDist 0 {m | ↑m = x}", " ‖↑x‖ = infDist x ↑S", " infDist x (⇑(IsometryEquiv.subLeft x).symm ⁻¹' {m | ↑m = ↑x}) = infDist x ↑S", " y ∈ ⇑(IsometryEquiv.subLeft x).symm ⁻¹' {m | ↑m = ↑x} ↔ y ∈ ↑S" ]
[ " ‖x‖ = infDist 0 {m | ↑m = x}" ]
import Aesop import Mathlib.Algebra.Group.Defs import Mathlib.Data.Nat.Defs import Mathlib.Data.Int.Defs import Mathlib.Logic.Function.Basic import Mathlib.Tactic.Cases import Mathlib.Tactic.SimpRw import Mathlib.Tactic.SplitIfs #align_import algebra.group.basic from "leanprover-community/mathlib"@"a07d750983b94c530a...
Mathlib/Algebra/Group/Basic.lean
245
245
theorem bit1_zero [One M] : bit1 (0 : M) = 1 := by
rw [bit1, bit0_zero, zero_add]
[ " bit1 0 = 1" ]
[]
import Mathlib.Algebra.Order.Ring.Defs import Mathlib.Algebra.Ring.Invertible import Mathlib.Data.Nat.Cast.Order #align_import algebra.order.invertible from "leanprover-community/mathlib"@"ee0c179cd3c8a45aa5bffbf1b41d8dbede452865" variable {α : Type*} [LinearOrderedSemiring α] {a : α} @[simp] theorem invOf_pos [I...
Mathlib/Algebra/Order/Invertible.lean
25
25
theorem invOf_nonpos [Invertible a] : ⅟ a ≤ 0 ↔ a ≤ 0 := by
simp only [← not_lt, invOf_pos]
[ " 0 < a * ⅟a", " ⅟a ≤ 0 ↔ a ≤ 0" ]
[ " 0 < a * ⅟a" ]
import Mathlib.Analysis.SpecialFunctions.Complex.Log #align_import analysis.special_functions.pow.complex from "leanprover-community/mathlib"@"4fa54b337f7d52805480306db1b1439c741848c8" open scoped Classical open Real Topology Filter ComplexConjugate Finset Set namespace Complex noncomputable def cpow (x y : ℂ) ...
Mathlib/Analysis/SpecialFunctions/Pow/Complex.lean
75
76
theorem eq_zero_cpow_iff {x : ℂ} {a : ℂ} : a = (0 : ℂ) ^ x ↔ x ≠ 0 ∧ a = 0 ∨ x = 0 ∧ a = 1 := by
rw [← zero_cpow_eq_iff, eq_comm]
[ " x ^ 0 = 1", " x ^ y = 0 ↔ x = 0 ∧ y ≠ 0", " (if x = 0 then if y = 0 then 1 else 0 else cexp (x.log * y)) = 0 ↔ x = 0 ∧ y ≠ 0", " 1 = 0 ↔ x = 0 ∧ y ≠ 0", " 0 = 0 ↔ x = 0 ∧ y ≠ 0", " cexp (x.log * y) = 0 ↔ x = 0 ∧ y ≠ 0", " 0 ^ x = 0", " 0 ^ x = a ↔ x ≠ 0 ∧ a = 0 ∨ x = 0 ∧ a = 1", " 0 ^ x = a → x ≠ ...
[ " x ^ 0 = 1", " x ^ y = 0 ↔ x = 0 ∧ y ≠ 0", " (if x = 0 then if y = 0 then 1 else 0 else cexp (x.log * y)) = 0 ↔ x = 0 ∧ y ≠ 0", " 1 = 0 ↔ x = 0 ∧ y ≠ 0", " 0 = 0 ↔ x = 0 ∧ y ≠ 0", " cexp (x.log * y) = 0 ↔ x = 0 ∧ y ≠ 0", " 0 ^ x = 0", " 0 ^ x = a ↔ x ≠ 0 ∧ a = 0 ∨ x = 0 ∧ a = 1", " 0 ^ x = a → x ≠ ...
import Mathlib.Algebra.Ring.Int import Mathlib.Data.ZMod.Basic import Mathlib.FieldTheory.Finite.Basic import Mathlib.Data.Fintype.BigOperators #align_import number_theory.sum_four_squares from "leanprover-community/mathlib"@"bd9851ca476957ea4549eb19b40e7b5ade9428cc" open Finset Polynomial FiniteField Equiv the...
Mathlib/NumberTheory/SumFourSquares.lean
63
75
theorem lt_of_sum_four_squares_eq_mul {a b c d k m : ℕ} (h : a ^ 2 + b ^ 2 + c ^ 2 + d ^ 2 = k * m) (ha : 2 * a < m) (hb : 2 * b < m) (hc : 2 * c < m) (hd : 2 * d < m) : k < m := by
refine _root_.lt_of_mul_lt_mul_right (_root_.lt_of_mul_lt_mul_left ?_ (zero_le (2 ^ 2))) (zero_le m) calc 2 ^ 2 * (k * ↑m) = ∑ i : Fin 4, (2 * ![a, b, c, d] i) ^ 2 := by simp [← h, Fin.sum_univ_succ, mul_add, mul_pow, add_assoc] _ < ∑ _i : Fin 4, m ^ 2 := Finset.sum_lt_sum_of_nonempty Finset.univ...
[ " (a * x - b * y - c * z - d * w) ^ 2 + (a * y + b * x + c * w - d * z) ^ 2 + (a * z - b * w + c * x + d * y) ^ 2 +\n (a * w + b * z - c * y + d * x) ^ 2 =\n (a ^ 2 + b ^ 2 + c ^ 2 + d ^ 2) * (x ^ 2 + y ^ 2 + z ^ 2 + w ^ 2)", " (↑a * ↑x - ↑b * ↑y - ↑c * ↑z - ↑d * ↑w).natAbs ^ 2 + (↑a * ↑y + ↑b * ↑x + ↑c *...
[ " (a * x - b * y - c * z - d * w) ^ 2 + (a * y + b * x + c * w - d * z) ^ 2 + (a * z - b * w + c * x + d * y) ^ 2 +\n (a * w + b * z - c * y + d * x) ^ 2 =\n (a ^ 2 + b ^ 2 + c ^ 2 + d ^ 2) * (x ^ 2 + y ^ 2 + z ^ 2 + w ^ 2)", " (↑a * ↑x - ↑b * ↑y - ↑c * ↑z - ↑d * ↑w).natAbs ^ 2 + (↑a * ↑y + ↑b * ↑x + ↑c *...
import Mathlib.LinearAlgebra.Eigenspace.Basic import Mathlib.FieldTheory.Minpoly.Field #align_import linear_algebra.eigenspace.minpoly from "leanprover-community/mathlib"@"c3216069e5f9369e6be586ccbfcde2592b3cec92" universe u v w namespace Module namespace End open Polynomial FiniteDimensional open scoped Poly...
Mathlib/LinearAlgebra/Eigenspace/Minpoly.lean
54
62
theorem aeval_apply_of_hasEigenvector {f : End K V} {p : K[X]} {μ : K} {x : V} (h : f.HasEigenvector μ x) : aeval f p x = p.eval μ • x := by
refine p.induction_on ?_ ?_ ?_ · intro a; simp [Module.algebraMap_end_apply] · intro p q hp hq; simp [hp, hq, add_smul] · intro n a hna rw [mul_comm, pow_succ', mul_assoc, AlgHom.map_mul, LinearMap.mul_apply, mul_comm, hna] simp only [mem_eigenspace_iff.1 h.1, smul_smul, aeval_X, eval_mul, eval_C, eval...
[ " f.eigenspace (-q.coeff 0 / q.leadingCoeff) =\n LinearMap.ker (q.leadingCoeff • f - (algebraMap K (End K V)) (-q.coeff 0))", " q.leadingCoeff ≠ 0", " False", " LinearMap.ker (q.leadingCoeff • f - (algebraMap K (End K V)) (-q.coeff 0)) =\n LinearMap.ker ((aeval f) (C q.leadingCoeff * X + C (q.coeff 0)))...
[ " f.eigenspace (-q.coeff 0 / q.leadingCoeff) =\n LinearMap.ker (q.leadingCoeff • f - (algebraMap K (End K V)) (-q.coeff 0))", " q.leadingCoeff ≠ 0", " False", " LinearMap.ker (q.leadingCoeff • f - (algebraMap K (End K V)) (-q.coeff 0)) =\n LinearMap.ker ((aeval f) (C q.leadingCoeff * X + C (q.coeff 0)))...
import Mathlib.Analysis.SpecialFunctions.Pow.Complex import Qq #align_import analysis.special_functions.pow.real from "leanprover-community/mathlib"@"4fa54b337f7d52805480306db1b1439c741848c8" noncomputable section open scoped Classical open Real ComplexConjugate open Finset Set namespace Real variable {x y z...
Mathlib/Analysis/SpecialFunctions/Pow/Real.lean
64
66
theorem rpow_intCast (x : ℝ) (n : ℤ) : x ^ (n : ℝ) = x ^ n := by
simp only [rpow_def, ← Complex.ofReal_zpow, Complex.cpow_intCast, Complex.ofReal_intCast, Complex.ofReal_re]
[ " x ^ y = if x = 0 then if y = 0 then 1 else 0 else rexp (x.log * y)", " (if ↑x = 0 then if ↑y = 0 then 1 else 0 else ((↑x).log * ↑y).exp).re =\n if x = 0 then if y = 0 then 1 else 0 else rexp (x.log * y)", " Complex.re 1 = 1", " Complex.re 1 = 0", " Complex.re 1 = rexp (x.log * y)", " Complex.re 0 = 1...
[ " x ^ y = if x = 0 then if y = 0 then 1 else 0 else rexp (x.log * y)", " (if ↑x = 0 then if ↑y = 0 then 1 else 0 else ((↑x).log * ↑y).exp).re =\n if x = 0 then if y = 0 then 1 else 0 else rexp (x.log * y)", " Complex.re 1 = 1", " Complex.re 1 = 0", " Complex.re 1 = rexp (x.log * y)", " Complex.re 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
254
255
theorem hasDerivAt_mul_const (c : 𝕜) : HasDerivAt (fun x => x * c) c x := by
simpa only [one_mul] using (hasDerivAt_id' x).mul_const 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' *...
[ " 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.Combinatorics.Quiver.Basic import Mathlib.Logic.Lemmas #align_import combinatorics.quiver.path from "leanprover-community/mathlib"@"18a5306c091183ac90884daa9373fa3b178e8607" open Function universe v v₁ v₂ u u₁ u₂ namespace Quiver inductive Path {V : Type u} [Quiver.{v} V] (a : V) : V → Sort max ...
Mathlib/Combinatorics/Quiver/Path.lean
123
134
theorem comp_inj {p₁ p₂ : Path a b} {q₁ q₂ : Path b c} (hq : q₁.length = q₂.length) : p₁.comp q₁ = p₂.comp q₂ ↔ p₁ = p₂ ∧ q₁ = q₂ := by
refine ⟨fun h => ?_, by rintro ⟨rfl, rfl⟩; rfl⟩ induction' q₁ with d₁ e₁ q₁ f₁ ih <;> obtain _ | ⟨q₂, f₂⟩ := q₂ · exact ⟨h, rfl⟩ · cases hq · cases hq · simp only [comp_cons, cons.injEq] at h obtain rfl := h.1 obtain ⟨rfl, rfl⟩ := ih (Nat.succ.inj hq) h.2.1.eq rw [h.2.2.eq] exact ⟨rfl, rfl⟩...
[ " False", " b = c", " HEq p p'", " HEq e e'", " a = b", " a = a", " nil.comp (p.cons a✝) = p.cons a✝", " (p.comp q).comp (r.cons a✝) = p.comp (q.comp (r.cons a✝))", " p₁.comp q₁ = p₂.comp q₂ ↔ p₁ = p₂ ∧ q₁ = q₂", " p₁ = p₂ ∧ q₁ = q₂ → p₁.comp q₁ = p₂.comp q₂", " p₁.comp q₁ = p₁.comp q₁", " p₁ ...
[ " False", " b = c", " HEq p p'", " HEq e e'", " a = b", " a = a", " nil.comp (p.cons a✝) = p.cons a✝", " (p.comp q).comp (r.cons a✝) = p.comp (q.comp (r.cons a✝))" ]
import Mathlib.Algebra.Order.Archimedean import Mathlib.Order.Filter.AtTopBot import Mathlib.Tactic.GCongr #align_import order.filter.archimedean from "leanprover-community/mathlib"@"8631e2d5ea77f6c13054d9151d82b83069680cb1" variable {α R : Type*} open Filter Set Function @[simp] theorem Nat.comap_cast_atTop [S...
Mathlib/Order/Filter/Archimedean.lean
93
95
theorem Filter.Eventually.intCast_atTop [StrictOrderedRing R] [Archimedean R] {p : R → Prop} (h : ∀ᶠ (x:R) in atTop, p x) : ∀ᶠ (n:ℤ) in atTop, p n := by
rw [← Int.comap_cast_atTop (R := R)]; exact h.comap _
[ " ↑(-↑n) ≤ r", " Tendsto (fun n => ↑(f n)) l atTop ↔ Tendsto f l atTop", " Tendsto (fun n => ↑(f n)) l atTop ↔ Tendsto (Int.cast ∘ f) l atTop", " Tendsto (fun n => ↑(f n)) l atBot ↔ Tendsto f l atBot", " Tendsto (fun n => ↑(f n)) l atBot ↔ Tendsto (Int.cast ∘ f) l atBot", " ∀ᶠ (n : ℤ) in atTop, p ↑n", "...
[ " ↑(-↑n) ≤ r", " Tendsto (fun n => ↑(f n)) l atTop ↔ Tendsto f l atTop", " Tendsto (fun n => ↑(f n)) l atTop ↔ Tendsto (Int.cast ∘ f) l atTop", " Tendsto (fun n => ↑(f n)) l atBot ↔ Tendsto f l atBot", " Tendsto (fun n => ↑(f n)) l atBot ↔ Tendsto (Int.cast ∘ f) l atBot" ]
import Mathlib.Algebra.Field.Defs import Mathlib.Algebra.Ring.Int #align_import algebra.field.power from "leanprover-community/mathlib"@"1e05171a5e8cf18d98d9cf7b207540acb044acae" variable {α : Type*} section DivisionRing variable [DivisionRing α] {n : ℤ} theorem Odd.neg_zpow (h : Odd n) (a : α) : (-a) ^ n = -a...
Mathlib/Algebra/Field/Power.lean
33
33
theorem Odd.neg_one_zpow (h : Odd n) : (-1 : α) ^ n = -1 := by
rw [h.neg_zpow, one_zpow]
[ " (-a) ^ n = -a ^ n", " n ≠ 0", " False", " (-a) ^ (2 * k + 1) = -a ^ (2 * k + 1)", " (-1) ^ n = -1" ]
[ " (-a) ^ n = -a ^ n", " n ≠ 0", " False", " (-a) ^ (2 * k + 1) = -a ^ (2 * k + 1)" ]
import Mathlib.Data.Vector.Basic import Mathlib.Data.Vector.Snoc set_option autoImplicit true namespace Vector section Fold section UnusedInput variable {xs : Vector α n} {ys : Vector β n} @[simp]
Mathlib/Data/Vector/MapLemmas.lean
342
347
theorem mapAccumr₂_unused_input_left [Inhabited α] (f : α → β → σ → σ × γ) (h : ∀ a b s, f default b s = f a b s) : mapAccumr₂ f xs ys s = mapAccumr (fun b s => f default b s) ys s := by
induction xs, ys using Vector.revInductionOn₂ generalizing s with | nil => rfl | snoc xs ys x y ih => simp [h x y s, ih]
[ " mapAccumr₂ f xs ys s = mapAccumr (fun b s => f default b s) ys s", " mapAccumr₂ f nil nil s = mapAccumr (fun b s => f default b s) nil s", " mapAccumr₂ f (xs.snoc x) (ys.snoc y) s = mapAccumr (fun b s => f default b s) (ys.snoc y) s" ]
[]
import Mathlib.Topology.PartialHomeomorph import Mathlib.Analysis.Normed.Group.AddTorsor import Mathlib.Analysis.NormedSpace.Pointwise import Mathlib.Data.Real.Sqrt #align_import analysis.normed_space.basic from "leanprover-community/mathlib"@"bc91ed7093bf098d253401e69df601fc33dde156" open Set Metric Pointwise var...
Mathlib/Analysis/NormedSpace/HomeomorphBall.lean
81
82
theorem PartialHomeomorph.univUnitBall_symm_apply_zero : univUnitBall.symm (0 : E) = 0 := by
simp [PartialHomeomorph.univUnitBall_symm_apply]
[ " (fun x => (√(1 + ‖x‖ ^ 2))⁻¹ • x) x ∈ ball 0 1", " 0 < 1 + ‖x‖ ^ 2", " ‖x‖ ^ 2 < 1 + ‖x‖ ^ 2", " (fun y => (√(1 - ‖y‖ ^ 2))⁻¹ • y) ((fun x => (√(1 + ‖x‖ ^ 2))⁻¹ • x) x) = x", " (fun x => (√(1 + ‖x‖ ^ 2))⁻¹ • x) ((fun y => (√(1 - ‖y‖ ^ 2))⁻¹ • y) y) = y", " 0 < 1 - ‖y‖ ^ 2", " ContinuousOn\n ↑{ toFu...
[ " (fun x => (√(1 + ‖x‖ ^ 2))⁻¹ • x) x ∈ ball 0 1", " 0 < 1 + ‖x‖ ^ 2", " ‖x‖ ^ 2 < 1 + ‖x‖ ^ 2", " (fun y => (√(1 - ‖y‖ ^ 2))⁻¹ • y) ((fun x => (√(1 + ‖x‖ ^ 2))⁻¹ • x) x) = x", " (fun x => (√(1 + ‖x‖ ^ 2))⁻¹ • x) ((fun y => (√(1 - ‖y‖ ^ 2))⁻¹ • y) y) = y", " 0 < 1 - ‖y‖ ^ 2", " ContinuousOn\n ↑{ toFu...
import Mathlib.Analysis.Complex.UpperHalfPlane.Topology import Mathlib.Analysis.SpecialFunctions.Arsinh import Mathlib.Geometry.Euclidean.Inversion.Basic #align_import analysis.complex.upper_half_plane.metric from "leanprover-community/mathlib"@"caa58cbf5bfb7f81ccbaca4e8b8ac4bc2b39cc1c" noncomputable section ope...
Mathlib/Analysis/Complex/UpperHalfPlane/Metric.lean
66
68
theorem exp_half_dist (z w : ℍ) : exp (dist z w / 2) = (dist (z : ℂ) w + dist (z : ℂ) (conj ↑w)) / (2 * √(z.im * w.im)) := by
rw [← sinh_add_cosh, sinh_half_dist, cosh_half_dist, add_div]
[ " (dist z w / 2).sinh = dist ↑z ↑w / (2 * √(z.im * w.im))", " (dist z w / 2).cosh = dist (↑z) ((starRingEnd ℂ) ↑w) / (2 * √(z.im * w.im))", " (2 ^ 2 * (z.im * w.im) + dist ↑z ↑w ^ 2) / (2 ^ 2 * (z.im * w.im)) =\n dist (↑z) ((starRingEnd ℂ) ↑w) ^ 2 / (2 ^ 2 * (z.im * w.im))", " 2 ^ 2 * (z.im * w.im) + dist ...
[ " (dist z w / 2).sinh = dist ↑z ↑w / (2 * √(z.im * w.im))", " (dist z w / 2).cosh = dist (↑z) ((starRingEnd ℂ) ↑w) / (2 * √(z.im * w.im))", " (2 ^ 2 * (z.im * w.im) + dist ↑z ↑w ^ 2) / (2 ^ 2 * (z.im * w.im)) =\n dist (↑z) ((starRingEnd ℂ) ↑w) ^ 2 / (2 ^ 2 * (z.im * w.im))", " 2 ^ 2 * (z.im * w.im) + dist ...
import Mathlib.Order.Interval.Finset.Nat import Mathlib.Data.PNat.Defs #align_import data.pnat.interval from "leanprover-community/mathlib"@"1d29de43a5ba4662dd33b5cfeecfc2a27a5a8a29" open Finset Function PNat namespace PNat variable (a b : ℕ+) instance instLocallyFiniteOrder : LocallyFiniteOrder ℕ+ := Subtype....
Mathlib/Data/PNat/Interval.lean
108
109
theorem card_fintype_Icc : Fintype.card (Set.Icc a b) = b + 1 - a := by
rw [← card_Icc, Fintype.card_ofFinset]
[ " (Icc a b).card = ↑b + 1 - ↑a", " (Icc a b).card = (Icc ↑a ↑b).card", " (Icc a b).card = (map (Embedding.subtype fun n => 0 < n) (Icc a b)).card", " (Ico a b).card = ↑b - ↑a", " (Ico a b).card = (Ico ↑a ↑b).card", " (Ico a b).card = (map (Embedding.subtype fun n => 0 < n) (Ico a b)).card", " (Ioc a b)....
[ " (Icc a b).card = ↑b + 1 - ↑a", " (Icc a b).card = (Icc ↑a ↑b).card", " (Icc a b).card = (map (Embedding.subtype fun n => 0 < n) (Icc a b)).card", " (Ico a b).card = ↑b - ↑a", " (Ico a b).card = (Ico ↑a ↑b).card", " (Ico a b).card = (map (Embedding.subtype fun n => 0 < n) (Ico a b)).card", " (Ioc a b)....
import Mathlib.MeasureTheory.Integral.IntervalIntegral import Mathlib.Analysis.Calculus.Deriv.ZPow import Mathlib.Analysis.NormedSpace.Pointwise import Mathlib.Analysis.SpecialFunctions.NonIntegrable import Mathlib.Analysis.Analytic.Basic #align_import measure_theory.integral.circle_integral from "leanprover-communit...
Mathlib/MeasureTheory/Integral/CircleIntegral.lean
141
148
theorem range_circleMap (c : ℂ) (R : ℝ) : range (circleMap c R) = sphere c |R| := calc range (circleMap c R) = c +ᵥ R • range fun θ : ℝ => exp (θ * I) := by
simp (config := { unfoldPartialApp := true }) only [← image_vadd, ← image_smul, ← range_comp, vadd_eq_add, circleMap, Function.comp_def, real_smul] _ = sphere c |R| := by rw [Complex.range_exp_mul_I, smul_sphere R 0 zero_le_one] simp
[ " circleMap c R (θ + 2 * π) = circleMap c R θ", " circleMap c R θ - c = circleMap 0 R θ", " Complex.abs (circleMap 0 R θ) = |R|", " circleMap c R θ ∈ sphere c |R|", " circleMap c R θ ∈ sphere c R", " circleMap c R θ ∉ ball c R", " range (circleMap c R) = c +ᵥ R • range fun θ => cexp (↑θ * I)", " (c +ᵥ...
[ " circleMap c R (θ + 2 * π) = circleMap c R θ", " circleMap c R θ - c = circleMap 0 R θ", " Complex.abs (circleMap 0 R θ) = |R|", " circleMap c R θ ∈ sphere c |R|", " circleMap c R θ ∈ sphere c R", " circleMap c R θ ∉ ball c R" ]
import Mathlib.ModelTheory.Syntax import Mathlib.ModelTheory.Semantics import Mathlib.Algebra.Ring.Equiv variable {α : Type*} namespace FirstOrder open FirstOrder inductive ringFunc : ℕ → Type | add : ringFunc 2 | mul : ringFunc 2 | neg : ringFunc 1 | zero : ringFunc 0 | one : ringFunc 0 deriving D...
Mathlib/ModelTheory/Algebra/Ring/Basic.lean
199
200
theorem realize_one (v : α → R) : Term.realize v (1 : ring.Term α) = 1 := by
simp [one_def, funMap_one, constantMap]
[ " DecidableEq (ring.Functions n)", " DecidableEq (ringFunc n)", " DecidableEq (ring.Relations n)", " DecidableEq Empty", " (↑[Sum.inl ⟨2, add⟩, Sum.inl ⟨2, mul⟩, Sum.inl ⟨1, neg⟩, Sum.inl ⟨0, zero⟩, Sum.inl ⟨0, one⟩]).Nodup", " ∀ (x : ring.Symbols),\n x ∈\n { val := ↑[Sum.inl ⟨2, add⟩, Sum.inl ⟨2,...
[ " DecidableEq (ring.Functions n)", " DecidableEq (ringFunc n)", " DecidableEq (ring.Relations n)", " DecidableEq Empty", " (↑[Sum.inl ⟨2, add⟩, Sum.inl ⟨2, mul⟩, Sum.inl ⟨1, neg⟩, Sum.inl ⟨0, zero⟩, Sum.inl ⟨0, one⟩]).Nodup", " ∀ (x : ring.Symbols),\n x ∈\n { val := ↑[Sum.inl ⟨2, add⟩, Sum.inl ⟨2,...
import Mathlib.SetTheory.Game.Ordinal import Mathlib.SetTheory.Ordinal.NaturalOps #align_import set_theory.game.birthday from "leanprover-community/mathlib"@"a347076985674932c0e91da09b9961ed0a79508c" universe u open Ordinal namespace SetTheory open scoped NaturalOps PGame namespace PGame noncomputable def b...
Mathlib/SetTheory/Game/Birthday.lean
103
103
theorem birthday_zero : birthday 0 = 0 := by
simp [inferInstanceAs (IsEmpty PEmpty)]
[ " x.birthday = max (lsub fun i => (x.moveLeft i).birthday) (lsub fun i => (x.moveRight i).birthday)", " (mk α✝ β✝ a✝¹ a✝).birthday =\n max (lsub fun i => ((mk α✝ β✝ a✝¹ a✝).moveLeft i).birthday) (lsub fun i => ((mk α✝ β✝ a✝¹ a✝).moveRight i).birthday)", " max (lsub fun i => (a✝¹ i).birthday) (lsub fun i => (...
[ " x.birthday = max (lsub fun i => (x.moveLeft i).birthday) (lsub fun i => (x.moveRight i).birthday)", " (mk α✝ β✝ a✝¹ a✝).birthday =\n max (lsub fun i => ((mk α✝ β✝ a✝¹ a✝).moveLeft i).birthday) (lsub fun i => ((mk α✝ β✝ a✝¹ a✝).moveRight i).birthday)", " max (lsub fun i => (a✝¹ i).birthday) (lsub fun i => (...
import Mathlib.Analysis.Calculus.ContDiff.Basic import Mathlib.Analysis.NormedSpace.FiniteDimension #align_import analysis.calculus.cont_diff from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe" noncomputable section universe uD uE uF uG variable {𝕜 : Type*} [NontriviallyNormedField ...
Mathlib/Analysis/Calculus/ContDiff/FiniteDimension.lean
46
48
theorem contDiff_clm_apply_iff {n : ℕ∞} {f : E → F →L[𝕜] G} [FiniteDimensional 𝕜 F] : ContDiff 𝕜 n f ↔ ∀ y, ContDiff 𝕜 n fun x => f x y := by
simp_rw [← contDiffOn_univ, contDiffOn_clm_apply]
[ " ContDiffOn 𝕜 n f s ↔ ∀ (y : F), ContDiffOn 𝕜 n (fun x => (f x) y) s", " ContDiffOn 𝕜 n f s", " ContDiffOn 𝕜 n ((⇑e₂.symm ∘ ⇑e₂) ∘ f) s", " ContDiff 𝕜 n f ↔ ∀ (y : F), ContDiff 𝕜 n fun x => (f x) y" ]
[ " ContDiffOn 𝕜 n f s ↔ ∀ (y : F), ContDiffOn 𝕜 n (fun x => (f x) y) s", " ContDiffOn 𝕜 n f s", " ContDiffOn 𝕜 n ((⇑e₂.symm ∘ ⇑e₂) ∘ f) s" ]
import Mathlib.Computability.DFA import Mathlib.Data.Fintype.Powerset #align_import computability.NFA from "leanprover-community/mathlib"@"32253a1a1071173b33dc7d6a218cf722c6feb514" open Set open Computability universe u v -- Porting note: Required as `NFA` is used in mathlib3 set_option linter.uppercaseLean3 fa...
Mathlib/Computability/NFA.lean
120
123
theorem toDFA_correct : M.toDFA.accepts = M.accepts := by
ext x rw [mem_accepts, DFA.mem_accepts] constructor <;> · exact fun ⟨w, h2, h3⟩ => ⟨w, h3, h2⟩
[ " s ∈ M.stepSet S a ↔ ∃ t ∈ S, s ∈ M.step t a", " M.stepSet ∅ a = ∅", " M.evalFrom S (x ++ [a]) = M.stepSet (M.evalFrom S x) a", " x ∈ M.accepts ↔ ∃ S ∈ M.accept, S ∈ M.evalFrom M.start x", " M.toDFA.accepts = M.accepts", " x ∈ M.toDFA.accepts ↔ x ∈ M.accepts", " M.toDFA.evalFrom M.toDFA.start x ∈ M.toD...
[ " s ∈ M.stepSet S a ↔ ∃ t ∈ S, s ∈ M.step t a", " M.stepSet ∅ a = ∅", " M.evalFrom S (x ++ [a]) = M.stepSet (M.evalFrom S x) a", " x ∈ M.accepts ↔ ∃ S ∈ M.accept, S ∈ M.evalFrom M.start x" ]
import Batteries.Data.List.Count import Batteries.Data.Fin.Lemmas open Nat Function namespace List theorem rel_of_pairwise_cons (p : (a :: l).Pairwise R) : ∀ {a'}, a' ∈ l → R a a' := (pairwise_cons.1 p).1 _ theorem Pairwise.of_cons (p : (a :: l).Pairwise R) : Pairwise R l := (pairwise_cons.1 p).2 theorem...
.lake/packages/batteries/Batteries/Data/List/Pairwise.lean
91
102
theorem Pairwise.forall_of_forall_of_flip (h₁ : ∀ x ∈ l, R x x) (h₂ : Pairwise R l) (h₃ : l.Pairwise (flip R)) : ∀ ⦃x⦄, x ∈ l → ∀ ⦃y⦄, y ∈ l → R x y := by
induction l with | nil => exact forall_mem_nil _ | cons a l ih => rw [pairwise_cons] at h₂ h₃ simp only [mem_cons] rintro x (rfl | hx) y (rfl | hy) · exact h₁ _ (l.mem_cons_self _) · exact h₂.1 _ hy · exact h₃.1 _ hx · exact ih (fun x hx => h₁ _ <| mem_cons_of_mem _ hx) h₂.2 h₃.2 hx h...
[ " Pairwise S l", " Pairwise S []", " Pairwise S (a :: l)", " ∀ (a' : α), a' ∈ l → S a a'", " Pairwise (fun a b => R a b ∧ S a b) l", " Pairwise (fun a b => R a b ∧ S a b) []", " Pairwise (fun a b => R a b ∧ S a b) (a✝¹ :: l✝)", " (∀ (a' : α✝), a' ∈ l✝ → R a✝¹ a' ∧ S a✝¹ a') ∧ Pairwise (fun a b => R a ...
[ " Pairwise S l", " Pairwise S []", " Pairwise S (a :: l)", " ∀ (a' : α), a' ∈ l → S a a'", " Pairwise (fun a b => R a b ∧ S a b) l", " Pairwise (fun a b => R a b ∧ S a b) []", " Pairwise (fun a b => R a b ∧ S a b) (a✝¹ :: l✝)", " (∀ (a' : α✝), a' ∈ l✝ → R a✝¹ a' ∧ S a✝¹ a') ∧ Pairwise (fun a b => R a ...
import Mathlib.Order.Filter.Lift import Mathlib.Topology.Separation import Mathlib.Order.Interval.Set.Monotone #align_import topology.filter from "leanprover-community/mathlib"@"4c19a16e4b705bf135cf9a80ac18fcc99c438514" open Set Filter TopologicalSpace open Filter Topology variable {ι : Sort*} {α β X Y : Type*}...
Mathlib/Topology/Filter.lean
134
135
theorem nhds_pure (x : α) : 𝓝 (pure x : Filter α) = 𝓟 {⊥, pure x} := by
rw [← principal_singleton, nhds_principal, principal_singleton, Iic_pure]
[ " IsOpen {l | s ∈ l}", " ∀ t₁ ∈ range (Iic ∘ 𝓟), ∀ t₂ ∈ range (Iic ∘ 𝓟), ∀ x ∈ t₁ ∩ t₂, ∃ t₃ ∈ range (Iic ∘ 𝓟), x ∈ t₃ ∧ t₃ ⊆ t₁ ∩ t₂", " ∃ t₃ ∈ range (Iic ∘ 𝓟), l ∈ t₃ ∧ t₃ ⊆ (Iic ∘ 𝓟) s ∩ (Iic ∘ 𝓟) t", " (Iic ∘ 𝓟) (s ∩ t) = Iic (𝓟 s) ∩ Iic (𝓟 t)", " (∃ S ⊆ range (Iic ∘ 𝓟), s = ⋃₀ S) ↔ ∃ T, s = ⋃...
[ " IsOpen {l | s ∈ l}", " ∀ t₁ ∈ range (Iic ∘ 𝓟), ∀ t₂ ∈ range (Iic ∘ 𝓟), ∀ x ∈ t₁ ∩ t₂, ∃ t₃ ∈ range (Iic ∘ 𝓟), x ∈ t₃ ∧ t₃ ⊆ t₁ ∩ t₂", " ∃ t₃ ∈ range (Iic ∘ 𝓟), l ∈ t₃ ∧ t₃ ⊆ (Iic ∘ 𝓟) s ∩ (Iic ∘ 𝓟) t", " (Iic ∘ 𝓟) (s ∩ t) = Iic (𝓟 s) ∩ Iic (𝓟 t)", " (∃ S ⊆ range (Iic ∘ 𝓟), s = ⋃₀ S) ↔ ∃ T, s = ⋃...
import Mathlib.Tactic.NormNum.Core import Mathlib.Tactic.HaveI import Mathlib.Data.Nat.Cast.Commute import Mathlib.Algebra.Ring.Int import Mathlib.Algebra.GroupWithZero.Invertible import Mathlib.Tactic.ClearExclamation import Mathlib.Data.Nat.Cast.Basic set_option autoImplicit true namespace Mathlib open Lean hidi...
Mathlib/Tactic/NormNum/Basic.lean
119
120
theorem isNat_intCast {R} [Ring R] (n : ℤ) (m : ℕ) : IsNat n m → IsNat (n : R) m := by
rintro ⟨⟨⟩⟩; exact ⟨by simp⟩
[ " (↑(Int.negOfNat a✝)).natAbs = ↑a✝", " IsNat n m → IsNat (↑n) m", " IsNat (↑↑m) m", " ↑↑m = ↑m" ]
[ " (↑(Int.negOfNat a✝)).natAbs = ↑a✝", " IsNat n m → IsNat (↑n) m", " IsNat (↑↑m) m" ]
import Mathlib.Algebra.IsPrimePow import Mathlib.Data.Nat.Factorization.Basic #align_import data.nat.factorization.prime_pow from "leanprover-community/mathlib"@"6ca1a09bc9aa75824bf97388c9e3b441fc4ccf3f" variable {R : Type*} [CommMonoidWithZero R] (n p : R) (k : ℕ)
Mathlib/Data/Nat/Factorization/PrimePow.lean
20
24
theorem IsPrimePow.minFac_pow_factorization_eq {n : ℕ} (hn : IsPrimePow n) : n.minFac ^ n.factorization n.minFac = n := by
obtain ⟨p, k, hp, hk, rfl⟩ := hn rw [← Nat.prime_iff] at hp rw [hp.pow_minFac hk.ne', hp.factorization_pow, Finsupp.single_eq_same]
[ " n.minFac ^ n.factorization n.minFac = n", " (p ^ k).minFac ^ (p ^ k).factorization (p ^ k).minFac = p ^ k" ]
[]
import Mathlib.Algebra.Polynomial.Mirror import Mathlib.Analysis.Complex.Polynomial #align_import data.polynomial.unit_trinomial from "leanprover-community/mathlib"@"302eab4f46abb63de520828de78c04cb0f9b5836" namespace Polynomial open scoped Polynomial open Finset section Semiring variable {R : Type*} [Semirin...
Mathlib/Algebra/Polynomial/UnitTrinomial.lean
81
92
theorem trinomial_natTrailingDegree (hkm : k < m) (hmn : m < n) (hu : u ≠ 0) : (trinomial k m n u v w).natTrailingDegree = k := by
refine natTrailingDegree_eq_of_trailingDegree_eq_some ((Finset.le_inf fun i h => ?_).antisymm <| trailingDegree_le_of_ne_zero <| by rwa [trinomial_trailing_coeff' hkm hmn]).symm replace h := support_trinomial' k m n u v w h rw [mem_insert, mem_insert, mem_singleton] at h rcases h with (rfl ...
[ " (trinomial k m n u v w).coeff n = w", " (trinomial k m n u v w).coeff m = v", " (trinomial k m n u v w).coeff k = u", " (trinomial k m n u v w).natDegree = n", " (trinomial k m n u v w).coeff n ≠ 0", " ↑i ≤ ↑n", " ↑i ≤ ↑i", " (trinomial k m n u v w).natTrailingDegree = k", " (trinomial k m n u v w...
[ " (trinomial k m n u v w).coeff n = w", " (trinomial k m n u v w).coeff m = v", " (trinomial k m n u v w).coeff k = u", " (trinomial k m n u v w).natDegree = n", " (trinomial k m n u v w).coeff n ≠ 0", " ↑i ≤ ↑n", " ↑i ≤ ↑i" ]
import Mathlib.Algebra.BigOperators.Finprod import Mathlib.Algebra.Group.ConjFinite import Mathlib.Algebra.Group.Subgroup.Finite import Mathlib.Data.Set.Card import Mathlib.GroupTheory.Subgroup.Center open MulAction ConjClasses variable (G : Type*) [Group G] theorem sum_conjClasses_card_eq_card [Fintype <| Conj...
Mathlib/GroupTheory/ClassEquation.lean
47
70
theorem Group.nat_card_center_add_sum_card_noncenter_eq_card [Finite G] : Nat.card (Subgroup.center G) + ∑ᶠ x ∈ noncenter G, Nat.card x.carrier = Nat.card G := by
classical cases nonempty_fintype G rw [@Nat.card_eq_fintype_card G, ← sum_conjClasses_card_eq_card, ← Finset.sum_sdiff (ConjClasses.noncenter G).toFinset.subset_univ] simp only [Nat.card_eq_fintype_card, Set.toFinset_card] congr 1 swap · convert finsum_cond_eq_sum_of_cond_iff _ _ simp [Set.mem_to...
[ " ∑ x : ConjClasses G, x.carrier.toFinset.card = Fintype.card G", " (x : ConjClasses G) × ↑x.carrier ≃ G", " ∑ᶠ (x : ConjClasses G), x.carrier.ncard = Nat.card G", " ∑ i : ConjClasses G, i.carrier.ncard = ∑ x : ConjClasses G, x.carrier.toFinset.card", " Nat.card ↥(Subgroup.center G) + ∑ᶠ (x : ConjClasses G)...
[ " ∑ x : ConjClasses G, x.carrier.toFinset.card = Fintype.card G", " (x : ConjClasses G) × ↑x.carrier ≃ G", " ∑ᶠ (x : ConjClasses G), x.carrier.ncard = Nat.card G", " ∑ i : ConjClasses G, i.carrier.ncard = ∑ x : ConjClasses G, x.carrier.toFinset.card" ]
import Mathlib.Probability.Independence.Basic import Mathlib.Probability.Independence.Conditional #align_import probability.independence.zero_one from "leanprover-community/mathlib"@"2f8347015b12b0864dfaf366ec4909eb70c78740" open MeasureTheory MeasurableSpace open scoped MeasureTheory ENNReal namespace Probabili...
Mathlib/Probability/Independence/ZeroOne.lean
52
56
theorem kernel.measure_eq_zero_or_one_of_indepSet_self [∀ a, IsFiniteMeasure (κ a)] {t : Set Ω} (h_indep : IndepSet t t κ μα) : ∀ᵐ a ∂μα, κ a t = 0 ∨ κ a t = 1 := by
filter_upwards [measure_eq_zero_or_one_or_top_of_indepSet_self h_indep] with a h_0_1_top simpa only [measure_ne_top (κ a), or_false] using h_0_1_top
[ " ∀ᵐ (a : α) ∂μα, (κ a) t = 0 ∨ (κ a) t = 1 ∨ (κ a) t = ⊤", " (κ a) t = 0 ∨ (κ a) t = 1 ∨ (κ a) t = ⊤", " μ t = 0 ∨ μ t = 1 ∨ μ t = ⊤", " ∀ᵐ (a : α) ∂μα, (κ a) t = 0 ∨ (κ a) t = 1", " (κ a) t = 0 ∨ (κ a) t = 1" ]
[ " ∀ᵐ (a : α) ∂μα, (κ a) t = 0 ∨ (κ a) t = 1 ∨ (κ a) t = ⊤", " (κ a) t = 0 ∨ (κ a) t = 1 ∨ (κ a) t = ⊤", " μ t = 0 ∨ μ t = 1 ∨ μ t = ⊤" ]
import Mathlib.Logic.Function.Iterate import Mathlib.Order.GaloisConnection import Mathlib.Order.Hom.Basic #align_import order.hom.order from "leanprover-community/mathlib"@"ba2245edf0c8bb155f1569fd9b9492a9b384cde6" namespace OrderHom variable {α β : Type*} section Preorder variable [Preorder α] instance [Sem...
Mathlib/Order/Hom/Order.lean
97
99
theorem coe_iInf {ι : Sort*} [CompleteLattice β] (f : ι → α →o β) : ((⨅ i, f i : α →o β) : α → β) = ⨅ i, (f i : α → β) := by
funext x; simp [iInf_apply]
[ " ⇑(⨅ i, f i) = ⨅ i, ⇑(f i)", " (⨅ i, f i) x = (⨅ i, ⇑(f i)) x" ]
[]
import Mathlib.MeasureTheory.Integral.SetIntegral #align_import measure_theory.integral.average from "leanprover-community/mathlib"@"c14c8fcde993801fca8946b0d80131a1a81d1520" open ENNReal MeasureTheory MeasureTheory.Measure Metric Set Filter TopologicalSpace Function open scoped Topology ENNReal Convex variable...
Mathlib/MeasureTheory/Integral/Average.lean
319
320
theorem average_zero_measure (f : α → E) : ⨍ x, f x ∂(0 : Measure α) = 0 := by
rw [average, smul_zero, integral_zero_measure]
[ " ⨍ (x : α), 0 ∂μ = 0", " ⨍ (x : α), f x ∂0 = 0" ]
[ " ⨍ (x : α), 0 ∂μ = 0" ]
import Mathlib.RingTheory.WittVector.Basic import Mathlib.RingTheory.WittVector.IsPoly #align_import ring_theory.witt_vector.init_tail from "leanprover-community/mathlib"@"0798037604b2d91748f9b43925fb7570a5f3256c" variable {p : ℕ} [hp : Fact p.Prime] (n : ℕ) {R : Type*} [CommRing R] -- type as `\bbW` local notat...
Mathlib/RingTheory/WittVector/InitTail.lean
112
133
theorem coeff_add_of_disjoint (x y : 𝕎 R) (h : ∀ n, x.coeff n = 0 ∨ y.coeff n = 0) : (x + y).coeff n = x.coeff n + y.coeff n := by
let P : ℕ → Prop := fun n => y.coeff n = 0 haveI : DecidablePred P := Classical.decPred P set z := mk p fun n => if P n then x.coeff n else y.coeff n have hx : select P z = x := by ext1 n; rw [select, coeff_mk, coeff_mk] split_ifs with hn · rfl · rw [(h n).resolve_right hn] have hy : select (...
[ " (select P x).coeff n = (aeval x.coeff) (selectPoly P n)", " (mk p fun n => if P n then x.coeff n else 0).coeff n = (aeval x.coeff) (if P n then X n else 0)", " (mk p fun n => if P n then x.coeff n else 0).coeff n = (aeval x.coeff) (X n)", " { coeff := fun n => if P n then x.coeff n else 0 }.coeff n = x.coef...
[ " (select P x).coeff n = (aeval x.coeff) (selectPoly P n)", " (mk p fun n => if P n then x.coeff n else 0).coeff n = (aeval x.coeff) (if P n then X n else 0)", " (mk p fun n => if P n then x.coeff n else 0).coeff n = (aeval x.coeff) (X n)", " { coeff := fun n => if P n then x.coeff n else 0 }.coeff n = x.coef...
import Mathlib.Analysis.Calculus.Deriv.Add import Mathlib.Analysis.Calculus.Deriv.Linear import Mathlib.LinearAlgebra.AffineSpace.AffineMap variable {𝕜 : Type*} [NontriviallyNormedField 𝕜] {E : Type*} [NormedAddCommGroup E] [NormedSpace 𝕜 E] (f : 𝕜 →ᵃ[𝕜] E) {a b : E} {L : Filter 𝕜} {s : Set 𝕜} {x : 𝕜} n...
Mathlib/Analysis/Calculus/Deriv/AffineMap.lean
64
65
theorem hasStrictDerivAt_lineMap : HasStrictDerivAt (lineMap a b) (b - a) x := by
simpa using (lineMap a b : 𝕜 →ᵃ[𝕜] E).hasStrictDerivAt
[ " HasStrictDerivAt (⇑f) (f.linear 1) x", " HasStrictDerivAt (⇑f.linear + fun x => f 0) (f.linear 1) x", " HasDerivAtFilter (⇑f) (f.linear 1) x L", " HasDerivAtFilter (⇑f.linear + fun x => f 0) (f.linear 1) x L", " HasStrictDerivAt (⇑(lineMap a b)) (b - a) x" ]
[ " HasStrictDerivAt (⇑f) (f.linear 1) x", " HasStrictDerivAt (⇑f.linear + fun x => f 0) (f.linear 1) x", " HasDerivAtFilter (⇑f) (f.linear 1) x L", " HasDerivAtFilter (⇑f.linear + fun x => f 0) (f.linear 1) x L" ]
import Mathlib.Probability.IdentDistrib import Mathlib.MeasureTheory.Integral.DominatedConvergence import Mathlib.Analysis.SpecificLimits.FloorPow import Mathlib.Analysis.PSeries import Mathlib.Analysis.Asymptotics.SpecificAsymptotics #align_import probability.strong_law from "leanprover-community/mathlib"@"f2ce60867...
Mathlib/Probability/StrongLaw.lean
135
137
theorem _root_.MeasureTheory.AEStronglyMeasurable.integrable_truncation [IsFiniteMeasure μ] (hf : AEStronglyMeasurable f μ) {A : ℝ} : Integrable (truncation f A) μ := by
rw [← memℒp_one_iff_integrable]; exact hf.memℒp_truncation
[ " AEStronglyMeasurable (ProbabilityTheory.truncation f A) μ", " AEStronglyMeasurable ((Set.Ioc (-A) A).indicator id) (Measure.map f μ)", " |truncation f A x| ≤ |A|", " |if f x ∈ Set.Ioc (-A) A then f x else 0| ≤ |A|", " |f x| ≤ |A|", " |0| ≤ |A|", " truncation f 0 = 0", " (fun x => 0) ∘ f = 0", " |t...
[ " AEStronglyMeasurable (ProbabilityTheory.truncation f A) μ", " AEStronglyMeasurable ((Set.Ioc (-A) A).indicator id) (Measure.map f μ)", " |truncation f A x| ≤ |A|", " |if f x ∈ Set.Ioc (-A) A then f x else 0| ≤ |A|", " |f x| ≤ |A|", " |0| ≤ |A|", " truncation f 0 = 0", " (fun x => 0) ∘ f = 0", " |t...
import Mathlib.Algebra.Order.Hom.Monoid import Mathlib.SetTheory.Game.Ordinal #align_import set_theory.surreal.basic from "leanprover-community/mathlib"@"8900d545017cd21961daa2a1734bb658ef52c618" universe u namespace SetTheory open scoped PGame namespace PGame def Numeric : PGame → Prop | ⟨_, _, L, R⟩ => (...
Mathlib/SetTheory/Surreal/Basic.lean
89
90
theorem moveLeft {x : PGame} (o : Numeric x) (i : x.LeftMoves) : Numeric (x.moveLeft i) := by
cases x; exact o.2.1 i
[ " x.Numeric ↔\n (∀ (i : x.LeftMoves) (j : x.RightMoves), x.moveLeft i < x.moveRight j) ∧\n (∀ (i : x.LeftMoves), (x.moveLeft i).Numeric) ∧ ∀ (j : x.RightMoves), (x.moveRight j).Numeric", " (mk α✝ β✝ a✝¹ a✝).Numeric ↔\n (∀ (i : (mk α✝ β✝ a✝¹ a✝).LeftMoves) (j : (mk α✝ β✝ a✝¹ a✝).RightMoves),\n (m...
[ " x.Numeric ↔\n (∀ (i : x.LeftMoves) (j : x.RightMoves), x.moveLeft i < x.moveRight j) ∧\n (∀ (i : x.LeftMoves), (x.moveLeft i).Numeric) ∧ ∀ (j : x.RightMoves), (x.moveRight j).Numeric", " (mk α✝ β✝ a✝¹ a✝).Numeric ↔\n (∀ (i : (mk α✝ β✝ a✝¹ a✝).LeftMoves) (j : (mk α✝ β✝ a✝¹ a✝).RightMoves),\n (m...
import Mathlib.Analysis.Complex.CauchyIntegral import Mathlib.Analysis.NormedSpace.Completion import Mathlib.Analysis.NormedSpace.Extr import Mathlib.Topology.Order.ExtrClosure #align_import analysis.complex.abs_max from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982" open TopologicalSpa...
Mathlib/Analysis/Complex/AbsMax.lean
159
164
theorem norm_max_aux₃ {f : ℂ → F} {z w : ℂ} {r : ℝ} (hr : dist w z = r) (hd : DiffContOnCl ℂ f (ball z r)) (hz : IsMaxOn (norm ∘ f) (ball z r) z) : ‖f w‖ = ‖f z‖ := by
subst r rcases eq_or_ne w z with (rfl | hne); · rfl rw [← dist_ne_zero] at hne exact norm_max_aux₂ hd (closure_ball z hne ▸ hz.closure hd.continuousOn.norm)
[ " ‖f w‖ = ‖f z‖", " ¬(norm ∘ f) w < (norm ∘ f) z", " False", " ‖∮ (ζ : ℂ) in C(z, r), (ζ - z)⁻¹ • f ζ‖ = 2 * π * ‖f z‖", " ‖∮ (ζ : ℂ) in C(z, r), (ζ - z)⁻¹ • f ζ‖ < 2 * π * ‖f z‖", " ‖∮ (ζ : ℂ) in C(z, r), (ζ - z)⁻¹ • f ζ‖ < 2 * π * r * (‖f z‖ / r)", " ContinuousOn (fun ζ => (ζ - z)⁻¹ • f ζ) (sphere z r...
[ " ‖f w‖ = ‖f z‖", " ¬(norm ∘ f) w < (norm ∘ f) z", " False", " ‖∮ (ζ : ℂ) in C(z, r), (ζ - z)⁻¹ • f ζ‖ = 2 * π * ‖f z‖", " ‖∮ (ζ : ℂ) in C(z, r), (ζ - z)⁻¹ • f ζ‖ < 2 * π * ‖f z‖", " ‖∮ (ζ : ℂ) in C(z, r), (ζ - z)⁻¹ • f ζ‖ < 2 * π * r * (‖f z‖ / r)", " ContinuousOn (fun ζ => (ζ - z)⁻¹ • f ζ) (sphere z r...
import Mathlib.Data.Int.Interval import Mathlib.Data.Int.SuccPred import Mathlib.Data.Int.ConditionallyCompleteOrder import Mathlib.Topology.Instances.Discrete import Mathlib.Topology.MetricSpace.Bounded import Mathlib.Order.Filter.Archimedean #align_import topology.instances.int from "leanprover-community/mathlib"@"...
Mathlib/Topology/Instances/Int.lean
62
63
theorem ball_eq_Ioo (x : ℤ) (r : ℝ) : ball x r = Ioo ⌊↑x - r⌋ ⌈↑x + r⌉ := by
rw [← preimage_ball, Real.ball_eq_Ioo, preimage_Ioo]
[ " dist m n = ↑|m - n|", " |↑m - ↑n| = ↑|m - n|", " Pairwise fun m n => 1 ≤ dist m n", " 1 ≤ dist m n", " 1 ≤ |↑m - ↑n|", " 1 ≤ |m - n|", " ball x r = Ioo ⌊↑x - r⌋ ⌈↑x + r⌉" ]
[ " dist m n = ↑|m - n|", " |↑m - ↑n| = ↑|m - n|", " Pairwise fun m n => 1 ≤ dist m n", " 1 ≤ dist m n", " 1 ≤ |↑m - ↑n|", " 1 ≤ |m - n|" ]
import Mathlib.Tactic.Ring import Mathlib.Data.PNat.Prime #align_import data.pnat.xgcd from "leanprover-community/mathlib"@"6afc9b06856ad973f6a2619e3e8a0a8d537a58f2" open Nat namespace PNat structure XgcdType where wp : ℕ x : ℕ y : ℕ zp : ℕ ap : ℕ bp : ℕ deriving Inhabited #alig...
Mathlib/Data/PNat/Xgcd.lean
150
156
theorem isSpecial_iff : u.IsSpecial ↔ u.IsSpecial' := by
dsimp [IsSpecial, IsSpecial'] let ⟨wp, x, y, zp, ap, bp⟩ := u constructor <;> intro h <;> simp [w, z, succPNat] at * <;> simp only [← coe_inj, mul_coe, mk_coe] at * · simp_all [← h, Nat.mul, Nat.succ_eq_add_one]; ring · simp [Nat.succ_eq_add_one, Nat.mul_add, Nat.add_mul, ← Nat.add_assoc] at h; rw [← h];...
[ " u.v = succ₂ u.vp", " u.v.1 = (succ₂ u.vp).1", " u.v.2 = (succ₂ u.vp).2", " (u.wp + 1) * (u.ap + 1) + u.x * (u.bp + 1) = u.wp + u.x + u.ap + u.wp * u.ap + u.x * u.bp + 1", " u.y * (u.ap + 1) + (u.zp + 1) * (u.bp + 1) = u.y + u.zp + u.bp + u.y * u.ap + u.zp * u.bp + 1", " u.IsSpecial ↔ u.IsSpecial'", " ...
[ " u.v = succ₂ u.vp", " u.v.1 = (succ₂ u.vp).1", " u.v.2 = (succ₂ u.vp).2", " (u.wp + 1) * (u.ap + 1) + u.x * (u.bp + 1) = u.wp + u.x + u.ap + u.wp * u.ap + u.x * u.bp + 1", " u.y * (u.ap + 1) + (u.zp + 1) * (u.bp + 1) = u.y + u.zp + u.bp + u.y * u.ap + u.zp * u.bp + 1" ]
import Mathlib.Algebra.Order.Hom.Monoid import Mathlib.SetTheory.Game.Ordinal #align_import set_theory.surreal.basic from "leanprover-community/mathlib"@"8900d545017cd21961daa2a1734bb658ef52c618" universe u namespace SetTheory open scoped PGame namespace PGame def Numeric : PGame → Prop | ⟨_, _, L, R⟩ => (...
Mathlib/SetTheory/Surreal/Basic.lean
93
94
theorem moveRight {x : PGame} (o : Numeric x) (j : x.RightMoves) : Numeric (x.moveRight j) := by
cases x; exact o.2.2 j
[ " x.Numeric ↔\n (∀ (i : x.LeftMoves) (j : x.RightMoves), x.moveLeft i < x.moveRight j) ∧\n (∀ (i : x.LeftMoves), (x.moveLeft i).Numeric) ∧ ∀ (j : x.RightMoves), (x.moveRight j).Numeric", " (mk α✝ β✝ a✝¹ a✝).Numeric ↔\n (∀ (i : (mk α✝ β✝ a✝¹ a✝).LeftMoves) (j : (mk α✝ β✝ a✝¹ a✝).RightMoves),\n (m...
[ " x.Numeric ↔\n (∀ (i : x.LeftMoves) (j : x.RightMoves), x.moveLeft i < x.moveRight j) ∧\n (∀ (i : x.LeftMoves), (x.moveLeft i).Numeric) ∧ ∀ (j : x.RightMoves), (x.moveRight j).Numeric", " (mk α✝ β✝ a✝¹ a✝).Numeric ↔\n (∀ (i : (mk α✝ β✝ a✝¹ a✝).LeftMoves) (j : (mk α✝ β✝ a✝¹ a✝).RightMoves),\n (m...
import Mathlib.Analysis.Calculus.Deriv.Basic import Mathlib.Analysis.Calculus.FDeriv.Add #align_import analysis.calculus.deriv.add from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe" universe u v w open scoped Classical open Topology Filter ENNReal open Filter Asymptotics Set variable...
Mathlib/Analysis/Calculus/Deriv/Add.lean
102
103
theorem deriv_add_const (c : F) : deriv (fun y => f y + c) x = deriv f x := by
simp only [deriv, fderiv_add_const]
[ " HasDerivAtFilter (fun y => f y + g y) (f' + g') x L", " HasStrictDerivAt (fun y => f y + g y) (f' + g') x", " derivWithin (fun y => f y + c) s x = derivWithin f s x", " deriv (fun y => f y + c) x = deriv f x" ]
[ " HasDerivAtFilter (fun y => f y + g y) (f' + g') x L", " HasStrictDerivAt (fun y => f y + g y) (f' + g') x", " derivWithin (fun y => f y + c) s x = derivWithin f s x" ]
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
73
79
theorem oangle_add_right_eq_arctan_of_oangle_eq_pi_div_two {x y : V} (h : o.oangle x y = ↑(π / 2)) : o.oangle x (x + y) = Real.arctan (‖y‖ / ‖x‖) := by
have hs : (o.oangle x (x + y)).sign = 1 := by rw [oangle_sign_add_right, h, Real.Angle.sign_coe_pi_div_two] rw [o.oangle_eq_angle_of_sign_eq_one hs, InnerProductGeometry.angle_add_eq_arctan_of_inner_eq_zero (o.inner_eq_zero_of_oangle_eq_pi_div_two h) (o.left_ne_zero_of_oangle_eq_pi_div_two h)]
[ " o.oangle x (x + y) = ↑(‖x‖ / ‖x + y‖).arccos", " (o.oangle x (x + y)).sign = 1", " o.oangle (x + y) y = ↑(‖y‖ / ‖x + y‖).arccos", " (-o).oangle y (x + y) = ↑(‖y‖ / ‖x + y‖).arccos", " (-o).oangle y (y + x) = ↑(‖y‖ / ‖y + x‖).arccos", " o.oangle x (x + y) = ↑(‖y‖ / ‖x + y‖).arcsin", " o.oangle (x + y) ...
[ " o.oangle x (x + y) = ↑(‖x‖ / ‖x + y‖).arccos", " (o.oangle x (x + y)).sign = 1", " o.oangle (x + y) y = ↑(‖y‖ / ‖x + y‖).arccos", " (-o).oangle y (x + y) = ↑(‖y‖ / ‖x + y‖).arccos", " (-o).oangle y (y + x) = ↑(‖y‖ / ‖y + x‖).arccos", " o.oangle x (x + y) = ↑(‖y‖ / ‖x + y‖).arcsin", " o.oangle (x + y) ...
import Mathlib.Combinatorics.Quiver.Basic import Mathlib.Combinatorics.Quiver.Path #align_import combinatorics.quiver.cast from "leanprover-community/mathlib"@"fc2ed6f838ce7c9b7c7171e58d78eaf7b438fb0e" universe v v₁ v₂ u u₁ u₂ variable {U : Type*} [Quiver.{u + 1} U] namespace Quiver def Hom.cast {u v u' v...
Mathlib/Combinatorics/Quiver/Cast.lean
69
72
theorem Hom.eq_cast_iff_heq {u v u' v' : U} (hu : u = u') (hv : v = v') (e : u ⟶ v) (e' : u' ⟶ v') : e' = e.cast hu hv ↔ HEq e' e := by
rw [eq_comm, Hom.cast_eq_iff_heq] exact ⟨HEq.symm, HEq.symm⟩
[ " (u ⟶ v) = (u' ⟶ v')", " cast hu hv e = _root_.cast ⋯ e", " cast ⋯ ⋯ e = _root_.cast ⋯ e", " cast hu' hv' (cast hu hv e) = cast ⋯ ⋯ e", " cast ⋯ ⋯ (cast ⋯ ⋯ e) = cast ⋯ ⋯ e", " HEq (cast hu hv e) e", " HEq (cast ⋯ ⋯ e) e", " cast hu hv e = e' ↔ HEq e e'", " _root_.cast ⋯ e = e' ↔ HEq e e'", " e' ...
[ " (u ⟶ v) = (u' ⟶ v')", " cast hu hv e = _root_.cast ⋯ e", " cast ⋯ ⋯ e = _root_.cast ⋯ e", " cast hu' hv' (cast hu hv e) = cast ⋯ ⋯ e", " cast ⋯ ⋯ (cast ⋯ ⋯ e) = cast ⋯ ⋯ e", " HEq (cast hu hv e) e", " HEq (cast ⋯ ⋯ e) e", " cast hu hv e = e' ↔ HEq e e'", " _root_.cast ⋯ e = e' ↔ HEq e e'" ]
import Mathlib.SetTheory.Cardinal.Basic import Mathlib.Tactic.Ring #align_import data.nat.count from "leanprover-community/mathlib"@"dc6c365e751e34d100e80fe6e314c3c3e0fd2988" open Finset namespace Nat variable (p : ℕ → Prop) section Count variable [DecidablePred p] def count (n : ℕ) : ℕ := (List.range n)....
Mathlib/Data/Nat/Count.lean
140
142
theorem count_le_card (hp : (setOf p).Finite) (n : ℕ) : count p n ≤ hp.toFinset.card := by
rw [count_eq_card_filter_range] exact Finset.card_mono fun x hx ↦ hp.mem_toFinset.2 (mem_filter.1 hx).2
[ " count p 0 = 0", " Fintype { i // i < n ∧ p i }", " ∀ (x : ℕ), x ∈ filter p (range n) ↔ x ∈ fun x => x < n ∧ p x", " x ∈ filter p (range n) ↔ x ∈ fun x => x < n ∧ p x", " x < n ∧ p x ↔ x ∈ fun x => x < n ∧ p x", " count p n = (filter p (range n)).card", " (List.filter (fun b => decide (p b)) (List.rang...
[ " count p 0 = 0", " Fintype { i // i < n ∧ p i }", " ∀ (x : ℕ), x ∈ filter p (range n) ↔ x ∈ fun x => x < n ∧ p x", " x ∈ filter p (range n) ↔ x ∈ fun x => x < n ∧ p x", " x < n ∧ p x ↔ x ∈ fun x => x < n ∧ p x", " count p n = (filter p (range n)).card", " (List.filter (fun b => decide (p b)) (List.rang...
import Mathlib.Algebra.GroupWithZero.Divisibility import Mathlib.Algebra.Order.Ring.Nat import Mathlib.Tactic.NthRewrite #align_import data.nat.gcd.basic from "leanprover-community/mathlib"@"e8638a0fcaf73e4500469f368ef9494e495099b3" namespace Nat theorem gcd_greatest {a b d : ℕ} (hda : d ∣ a) (hdb : d ∣ b) (hd ...
Mathlib/Data/Nat/GCD/Basic.lean
128
130
theorem lcm_pos {m n : ℕ} : 0 < m → 0 < n → 0 < m.lcm n := by
simp_rw [pos_iff_ne_zero] exact lcm_ne_zero
[ " m.gcd (n + k * m) = m.gcd n", " m.gcd (n + m * k) = m.gcd n", " m.gcd (k * m + n) = m.gcd n", " m.gcd (m * k + n) = m.gcd n", " (m + k * n).gcd n = m.gcd n", " (m + n * k).gcd n = m.gcd n", " (k * n + m).gcd n = m.gcd n", " (n * k + m).gcd n = m.gcd n", " m.gcd (n + m) = m.gcd (n + 1 * m)", " (m...
[ " m.gcd (n + k * m) = m.gcd n", " m.gcd (n + m * k) = m.gcd n", " m.gcd (k * m + n) = m.gcd n", " m.gcd (m * k + n) = m.gcd n", " (m + k * n).gcd n = m.gcd n", " (m + n * k).gcd n = m.gcd n", " (k * n + m).gcd n = m.gcd n", " (n * k + m).gcd n = m.gcd n", " m.gcd (n + m) = m.gcd (n + 1 * m)", " (m...
import Mathlib.LinearAlgebra.AffineSpace.AffineSubspace #align_import linear_algebra.affine_space.restrict from "leanprover-community/mathlib"@"09258fb7f75d741b7eda9fa18d5c869e2135d9f1" variable {k V₁ P₁ V₂ P₂ : Type*} [Ring k] [AddCommGroup V₁] [AddCommGroup V₂] [Module k V₁] [Module k V₂] [AddTorsor V₁ P₁] [A...
Mathlib/LinearAlgebra/AffineSpace/Restrict.lean
61
64
theorem AffineMap.restrict.linear_aux {φ : P₁ →ᵃ[k] P₂} {E : AffineSubspace k P₁} {F : AffineSubspace k P₂} (hEF : E.map φ ≤ F) : E.direction ≤ F.direction.comap φ.linear := by
rw [← Submodule.map_le_iff_le_comap, ← AffineSubspace.map_direction] exact AffineSubspace.direction_le hEF
[ " Nonempty ↥(map φ E)", " ↥E →ᵃ[k] ↥F", " ↥E → ↥F", " ↥E.direction →ₗ[k] ↥F.direction", " E.direction ≤ Submodule.comap φ.linear F.direction", " (AffineSubspace.map φ E).direction ≤ F.direction", " ∀ (p : ↥E) (v : ↥E.direction), ⟨φ ↑(v +ᵥ p), ⋯⟩ = (φ.linear.restrict ⋯) v +ᵥ ⟨φ ↑p, ⋯⟩", " ⟨φ ↑(v +ᵥ p),...
[ " Nonempty ↥(map φ E)", " ↥E →ᵃ[k] ↥F", " ↥E → ↥F", " ↥E.direction →ₗ[k] ↥F.direction", " E.direction ≤ Submodule.comap φ.linear F.direction", " (AffineSubspace.map φ E).direction ≤ F.direction", " ∀ (p : ↥E) (v : ↥E.direction), ⟨φ ↑(v +ᵥ p), ⋯⟩ = (φ.linear.restrict ⋯) v +ᵥ ⟨φ ↑p, ⋯⟩", " ⟨φ ↑(v +ᵥ p),...
import Mathlib.Algebra.MonoidAlgebra.Division import Mathlib.Algebra.MvPolynomial.Basic #align_import data.mv_polynomial.division from "leanprover-community/mathlib"@"72c366d0475675f1309d3027d3d7d47ee4423951" variable {σ R : Type*} [CommSemiring R] namespace MvPolynomial theorem monomial_dvd_monomial {r s : ...
Mathlib/Algebra/MvPolynomial/Division.lean
260
263
theorem X_dvd_monomial {i : σ} {j : σ →₀ ℕ} {r : R} : (X i : MvPolynomial σ R) ∣ monomial j r ↔ r = 0 ∨ j i ≠ 0 := by
refine monomial_dvd_monomial.trans ?_ simp_rw [one_dvd, and_true_iff, Finsupp.single_le_iff, Nat.one_le_iff_ne_zero]
[ " (monomial i) r ∣ (monomial j) s ↔ (s = 0 ∨ i ≤ j) ∧ r ∣ s", " (monomial i) r ∣ (monomial j) s → (s = 0 ∨ i ≤ j) ∧ r ∣ s", " (s = 0 ∨ i ≤ j) ∧ r ∣ s", " (s = 0 ∨ i ≤ j) ∧ r ∣ s → (monomial i) r ∣ (monomial j) s", " (monomial i) r ∣ (monomial j) (r * d)", " (monomial j) (r * d) = (monomial i) r * (monomia...
[ " (monomial i) r ∣ (monomial j) s ↔ (s = 0 ∨ i ≤ j) ∧ r ∣ s", " (monomial i) r ∣ (monomial j) s → (s = 0 ∨ i ≤ j) ∧ r ∣ s", " (s = 0 ∨ i ≤ j) ∧ r ∣ s", " (s = 0 ∨ i ≤ j) ∧ r ∣ s → (monomial i) r ∣ (monomial j) s", " (monomial i) r ∣ (monomial j) (r * d)", " (monomial j) (r * d) = (monomial i) r * (monomia...