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.Data.Set.Prod
import Mathlib.Logic.Function.Conjugate
#align_import data.set.function from "leanprover-community/mathlib"@"996b0ff959da753a555053a480f36e5f264d4207"
variable {α β γ : Type*} {ι : Sort*} {π : α → Type*}
open Equiv Equiv.Perm Function
namespace Set
section equality
variable {s s₁... | Mathlib/Data/Set/Function.lean | 190 | 191 | theorem eqOn_univ (f₁ f₂ : α → β) : EqOn f₁ f₂ univ ↔ f₁ = f₂ := by |
simp [EqOn, funext_iff]
| [
" EqOn f₁ f₂ {a} ↔ f₁ a = f₂ a",
" EqOn f₁ f₂ univ ↔ f₁ = f₂"
] | [
" EqOn f₁ f₂ {a} ↔ f₁ a = f₂ a"
] |
import Mathlib.LinearAlgebra.Dimension.Free
import Mathlib.Algebra.Module.Torsion
#align_import linear_algebra.dimension from "leanprover-community/mathlib"@"47a5f8186becdbc826190ced4312f8199f9db6a5"
noncomputable section
universe u v v' u₁' w w'
variable {R S : Type u} {M : Type v} {M' : Type v'} {M₁ : Type v}... | Mathlib/LinearAlgebra/Dimension/Constructions.lean | 241 | 246 | theorem finrank_directSum {ι : Type v} [Fintype ι] (M : ι → Type w) [∀ i : ι, AddCommGroup (M i)]
[∀ i : ι, Module R (M i)] [∀ i : ι, Module.Free R (M i)] [∀ i : ι, Module.Finite R (M i)] :
finrank R (⨁ i, M i) = ∑ i, finrank R (M i) := by |
letI := nontrivial_of_invariantBasisNumber R
simp only [finrank, fun i => rank_eq_card_chooseBasisIndex R (M i), rank_directSum, ← mk_sigma,
mk_toNat_eq_card, card_sigma]
| [
" Module.rank R (ι →₀ M) = lift.{v, w} #ι * lift.{w, v} (Module.rank R M)",
" Module.rank R (ι →₀ M) = #ι * Module.rank R M",
" Module.rank R (ι →₀ R) = lift.{u, w} #ι",
" Module.rank R (ι →₀ R) = #ι",
" Module.rank R (⨁ (i : ι), M i) = sum fun i => Module.rank R (M i)",
" Module.rank R (Matrix m n R) = l... | [
" Module.rank R (ι →₀ M) = lift.{v, w} #ι * lift.{w, v} (Module.rank R M)",
" Module.rank R (ι →₀ M) = #ι * Module.rank R M",
" Module.rank R (ι →₀ R) = lift.{u, w} #ι",
" Module.rank R (ι →₀ R) = #ι",
" Module.rank R (⨁ (i : ι), M i) = sum fun i => Module.rank R (M i)",
" Module.rank R (Matrix m n R) = l... |
import Mathlib.Algebra.GroupPower.IterateHom
import Mathlib.Algebra.Polynomial.Eval
import Mathlib.GroupTheory.GroupAction.Ring
#align_import data.polynomial.derivative from "leanprover-community/mathlib"@"bbeb185db4ccee8ed07dc48449414ebfa39cb821"
noncomputable section
open Finset
open Polynomial
namespace Pol... | Mathlib/Algebra/Polynomial/Derivative.lean | 97 | 99 | theorem derivative_C_mul_X_pow (a : R) (n : ℕ) :
derivative (C a * X ^ n) = C (a * n) * X ^ (n - 1) := by |
rw [C_mul_X_pow_eq_monomial, C_mul_X_pow_eq_monomial, derivative_monomial]
| [
" (fun p => p.sum fun n a => C (a * ↑n) * X ^ (n - 1)) (p + q) =\n (fun p => p.sum fun n a => C (a * ↑n) * X ^ (n - 1)) p + (fun p => p.sum fun n a => C (a * ↑n) * X ^ (n - 1)) q",
" ((p + q).sum fun n a => C (a * ↑n) * X ^ (n - 1)) =\n (p.sum fun n a => C (a * ↑n) * X ^ (n - 1)) + q.sum fun n a => C (a * ↑... | [
" (fun p => p.sum fun n a => C (a * ↑n) * X ^ (n - 1)) (p + q) =\n (fun p => p.sum fun n a => C (a * ↑n) * X ^ (n - 1)) p + (fun p => p.sum fun n a => C (a * ↑n) * X ^ (n - 1)) q",
" ((p + q).sum fun n a => C (a * ↑n) * X ^ (n - 1)) =\n (p.sum fun n a => C (a * ↑n) * X ^ (n - 1)) + q.sum fun n a => C (a * ↑... |
import Mathlib.Order.Filter.AtTopBot
import Mathlib.Order.Filter.Subsingleton
open Set
variable {α β γ δ : Type*} {l : Filter α} {f : α → β}
namespace Filter
def EventuallyConst (f : α → β) (l : Filter α) : Prop := (map f l).Subsingleton
theorem HasBasis.eventuallyConst_iff {ι : Sort*} {p : ι → Prop} {s : ι → S... | Mathlib/Order/Filter/EventuallyConst.lean | 73 | 75 | theorem EventuallyEq.eventuallyConst_iff {g : α → β} (h : f =ᶠ[l] g) :
EventuallyConst f l ↔ EventuallyConst g l := by |
simp only [EventuallyConst, map_congr h]
| [
" (∃ i, p i ∧ (f '' s i).Subsingleton) ↔ ∃ i, p i ∧ ∀ x ∈ s i, ∀ y ∈ s i, f x = f y",
" EventuallyConst p l ↔ (p =ᶠ[l] fun x => False) ∨ p =ᶠ[l] fun x => True",
" EventuallyConst p l ↔ (∀ᶠ (x : α) in l, p x) ∨ ∀ᶠ (x : α) in l, ¬p x",
" EventuallyConst f l ↔ EventuallyConst g l"
] | [
" (∃ i, p i ∧ (f '' s i).Subsingleton) ↔ ∃ i, p i ∧ ∀ x ∈ s i, ∀ y ∈ s i, f x = f y",
" EventuallyConst p l ↔ (p =ᶠ[l] fun x => False) ∨ p =ᶠ[l] fun x => True",
" EventuallyConst p l ↔ (∀ᶠ (x : α) in l, p x) ∨ ∀ᶠ (x : α) in l, ¬p x"
] |
import Mathlib.Order.Interval.Set.UnorderedInterval
import Mathlib.Algebra.Order.Interval.Set.Monoid
import Mathlib.Data.Set.Pointwise.Basic
import Mathlib.Algebra.Order.Field.Basic
import Mathlib.Algebra.Order.Group.MinMax
#align_import data.set.pointwise.interval from "leanprover-community/mathlib"@"2196ab363eb097c... | Mathlib/Data/Set/Pointwise/Interval.lean | 51 | 53 | theorem Iic_mul_Iic_subset' (a b : α) : Iic a * Iic b ⊆ Iic (a * b) := by |
rintro x ⟨y, hya, z, hzb, rfl⟩
exact mul_le_mul' hya hzb
| [
" Icc a b * Icc c d ⊆ Icc (a * c) (b * d)",
" (fun x x_1 => x * x_1) y z ∈ Icc (a * c) (b * d)",
" Iic a * Iic b ⊆ Iic (a * b)",
" (fun x x_1 => x * x_1) y z ∈ Iic (a * b)"
] | [
" Icc a b * Icc c d ⊆ Icc (a * c) (b * d)",
" (fun x x_1 => x * x_1) y z ∈ Icc (a * c) (b * d)"
] |
import Mathlib.Algebra.Group.Units
import Mathlib.Algebra.GroupWithZero.Basic
import Mathlib.Logic.Equiv.Defs
import Mathlib.Tactic.Contrapose
import Mathlib.Tactic.Nontriviality
import Mathlib.Tactic.Spread
import Mathlib.Util.AssertExists
#align_import algebra.group_with_zero.units.basic from "leanprover-community/... | Mathlib/Algebra/GroupWithZero/Units/Basic.lean | 152 | 154 | theorem inverse_zero : inverse (0 : M₀) = 0 := by |
nontriviality
exact inverse_non_unit _ not_isUnit_zero
| [
" 0 = 1",
" inverse ↑u = ↑u⁻¹",
" x * inverse x = 1",
" ↑u * inverse ↑u = 1",
" inverse x * x = 1",
" inverse ↑u * ↑u = 1",
" y * x * inverse x = y",
" y * inverse x * x = y",
" x * (inverse x * y) = y",
" inverse x * (x * y) = y",
" y = x * z",
" inverse x * y = z",
" x * z = y",
" x = y ... | [
" 0 = 1",
" inverse ↑u = ↑u⁻¹",
" x * inverse x = 1",
" ↑u * inverse ↑u = 1",
" inverse x * x = 1",
" inverse ↑u * ↑u = 1",
" y * x * inverse x = y",
" y * inverse x * x = y",
" x * (inverse x * y) = y",
" inverse x * (x * y) = y",
" y = x * z",
" inverse x * y = z",
" x * z = y",
" x = y ... |
import Mathlib.CategoryTheory.EqToHom
import Mathlib.CategoryTheory.Functor.Const
import Mathlib.CategoryTheory.Opposites
import Mathlib.Data.Prod.Basic
#align_import category_theory.products.basic from "leanprover-community/mathlib"@"dc6c365e751e34d100e80fe6e314c3c3e0fd2988"
namespace CategoryTheory
-- declare ... | Mathlib/CategoryTheory/Products/Basic.lean | 64 | 75 | theorem isIso_prod_iff {P Q : C} {S T : D} {f : (P, S) ⟶ (Q, T)} :
IsIso f ↔ IsIso f.1 ∧ IsIso f.2 := by |
constructor
· rintro ⟨g, hfg, hgf⟩
simp? at hfg hgf says simp only [prod_Hom, prod_comp, prod_id, Prod.mk.injEq] at hfg hgf
rcases hfg with ⟨hfg₁, hfg₂⟩
rcases hgf with ⟨hgf₁, hgf₂⟩
exact ⟨⟨⟨g.1, hfg₁, hgf₁⟩⟩, ⟨⟨g.2, hfg₂, hgf₂⟩⟩⟩
· rintro ⟨⟨g₁, hfg₁, hgf₁⟩, ⟨g₂, hfg₂, hgf₂⟩⟩
dsimp at hfg₁ hg... | [] | [] |
import Mathlib.Analysis.Calculus.FDeriv.Measurable
import Mathlib.Analysis.Calculus.Deriv.Comp
import Mathlib.Analysis.Calculus.Deriv.Add
import Mathlib.Analysis.Calculus.Deriv.Slope
import Mathlib.Analysis.Calculus.Deriv.Mul
import Mathlib.Analysis.NormedSpace.Dual
import Mathlib.MeasureTheory.Integral.DominatedConve... | Mathlib/MeasureTheory/Integral/FundThmCalculus.lean | 273 | 288 | theorem measure_integral_sub_linear_isLittleO_of_tendsto_ae' [IsMeasurablyGenerated l']
[TendstoIxxClass Ioc l l'] (hfm : StronglyMeasurableAtFilter f l' μ)
(hf : Tendsto f (l' ⊓ ae μ) (𝓝 c)) (hl : μ.FiniteAtFilter l') (hu : Tendsto u lt l)
(hv : Tendsto v lt l) :
(fun t => (∫ x in u t..v t, f x ∂μ) - ... |
by_cases hE : CompleteSpace E; swap
· simp [intervalIntegral, integral, hE]
have A := hf.integral_sub_linear_isLittleO_ae hfm hl (hu.Ioc hv)
have B := hf.integral_sub_linear_isLittleO_ae hfm hl (hv.Ioc hu)
simp_rw [integral_const', sub_smul]
refine ((A.trans_le fun t ↦ ?_).sub (B.trans_le fun t ↦ ?_)).cong... | [
" (fun t => ∫ (x : ℝ) in u t..v t, f x ∂μ - ∫ (x : ℝ) in u t..v t, c ∂μ) =o[lt] fun t => ∫ (x : ℝ) in u t..v t, 1 ∂μ",
" (fun t =>\n ∫ (x : ℝ) in u t..v t, f x ∂μ - ((μ (Ioc (u t) (v t))).toReal • c - (μ (Ioc (v t) (u t))).toReal • c)) =o[lt]\n fun t => (μ (Ioc (u t) (v t))).toReal • 1 - (μ (Ioc (v t) (u ... | [] |
import Mathlib.LinearAlgebra.Matrix.Trace
#align_import data.matrix.hadamard from "leanprover-community/mathlib"@"3e068ece210655b7b9a9477c3aff38a492400aa1"
variable {α β γ m n : Type*}
variable {R : Type*}
namespace Matrix
open Matrix
def hadamard [Mul α] (A : Matrix m n α) (B : Matrix m n α) : Matrix m n α :... | Mathlib/Data/Matrix/Hadamard.lean | 116 | 118 | theorem hadamard_one : M ⊙ (1 : Matrix n n α) = diagonal fun i => M i i := by |
ext i j
by_cases h: i = j <;> simp [h]
| [
" M ⊙ 1 = diagonal fun i => M i i",
" (M ⊙ 1) i j = diagonal (fun i => M i i) i j"
] | [] |
import Mathlib.Topology.Algebra.UniformConvergence
#align_import topology.algebra.equicontinuity from "leanprover-community/mathlib"@"01ad394a11bf06b950232720cf7e8fc6b22f0d6a"
open Function
open UniformConvergence
@[to_additive]
theorem equicontinuous_of_equicontinuousAt_one {ι G M hom : Type*} [TopologicalSpac... | Mathlib/Topology/Algebra/Equicontinuity.lean | 36 | 47 | theorem uniformEquicontinuous_of_equicontinuousAt_one {ι G M hom : Type*} [UniformSpace G]
[UniformSpace M] [Group G] [Group M] [UniformGroup G] [UniformGroup M]
[FunLike hom G M] [MonoidHomClass hom G M]
(F : ι → hom) (hf : EquicontinuousAt ((↑) ∘ F) (1 : G)) :
UniformEquicontinuous ((↑) ∘ F) := by |
rw [uniformEquicontinuous_iff_uniformContinuous]
rw [equicontinuousAt_iff_continuousAt] at hf
let φ : G →* (ι →ᵤ M) :=
{ toFun := swap ((↑) ∘ F)
map_one' := by dsimp [UniformFun]; ext; exact map_one _
map_mul' := fun a b => by dsimp [UniformFun]; ext; exact map_mul _ _ _ }
exact uniformContinuo... | [
" Equicontinuous (DFunLike.coe ∘ F)",
" Continuous (⇑UniformFun.ofFun ∘ swap (DFunLike.coe ∘ F))",
" swap (DFunLike.coe ∘ F) 1 = 1",
" swap (DFunLike.coe ∘ F) 1 x✝ = 1 x✝",
" { toFun := swap (DFunLike.coe ∘ F), map_one' := ⋯ }.toFun (a * b) =\n { toFun := swap (DFunLike.coe ∘ F), map_one' := ⋯ }.toFun a ... | [
" Equicontinuous (DFunLike.coe ∘ F)",
" Continuous (⇑UniformFun.ofFun ∘ swap (DFunLike.coe ∘ F))",
" swap (DFunLike.coe ∘ F) 1 = 1",
" swap (DFunLike.coe ∘ F) 1 x✝ = 1 x✝",
" { toFun := swap (DFunLike.coe ∘ F), map_one' := ⋯ }.toFun (a * b) =\n { toFun := swap (DFunLike.coe ∘ F), map_one' := ⋯ }.toFun a ... |
import Mathlib.Data.Real.Irrational
import Mathlib.Data.Nat.Fib.Basic
import Mathlib.Data.Fin.VecNotation
import Mathlib.Algebra.LinearRecurrence
import Mathlib.Tactic.NormNum.NatFib
import Mathlib.Tactic.NormNum.Prime
#align_import data.real.golden_ratio from "leanprover-community/mathlib"@"2196ab363eb097c008d449712... | Mathlib/Data/Real/GoldenRatio.lean | 57 | 60 | theorem gold_mul_goldConj : φ * ψ = -1 := by |
field_simp
rw [← sq_sub_sq]
norm_num
| [
" φ⁻¹ = -ψ",
" 0 < 1",
" 0 < 5",
" 2 * 2 = 5 - 1",
" ψ⁻¹ = -φ",
" -ψ = φ⁻¹",
" φ * ψ = -1",
" (1 + √5) * (1 - √5) = -(2 * 2)",
" 1 ^ 2 - √5 ^ 2 = -(2 * 2)"
] | [
" φ⁻¹ = -ψ",
" 0 < 1",
" 0 < 5",
" 2 * 2 = 5 - 1",
" ψ⁻¹ = -φ",
" -ψ = φ⁻¹"
] |
import Mathlib.Data.Set.Lattice
import Mathlib.Init.Set
import Mathlib.Control.Basic
import Mathlib.Lean.Expr.ExtraRecognizers
#align_import data.set.functor from "leanprover-community/mathlib"@"207cfac9fcd06138865b5d04f7091e46d9320432"
universe u
open Function
namespace Set
variable {α β : Type u} {s : Set α} ... | Mathlib/Data/Set/Functor.lean | 93 | 94 | theorem coe_subset : (γ : Set α) ⊆ β := by |
intro _ ⟨_, ⟨⟨⟨_, ha⟩, rfl⟩, _, ⟨_, rfl⟩, _⟩⟩; convert ha
| [
" image2 f s t = Seq.seq (f <$> s) fun x => t",
" x✝ ∈ image2 f s t ↔ x✝ ∈ Seq.seq (f <$> s) fun x => t",
" x✝² >>= x✝¹ >>= x✝ = x✝² >>= fun x => x✝¹ x >>= x✝",
" (do\n let a ← γ\n pure ↑a) ⊆\n β",
" a✝ ∈ β"
] | [
" image2 f s t = Seq.seq (f <$> s) fun x => t",
" x✝ ∈ image2 f s t ↔ x✝ ∈ Seq.seq (f <$> s) fun x => t",
" x✝² >>= x✝¹ >>= x✝ = x✝² >>= fun x => x✝¹ x >>= x✝"
] |
import Mathlib.Data.Fintype.Basic
import Mathlib.GroupTheory.Perm.Sign
import Mathlib.Logic.Equiv.Defs
#align_import logic.equiv.fintype from "leanprover-community/mathlib"@"9407b03373c8cd201df99d6bc5514fc2db44054f"
section Fintype
variable {α β : Type*} [Fintype α] [DecidableEq β] (e : Equiv.Perm α) (f : α ↪ β)
... | Mathlib/Logic/Equiv/Fintype.lean | 91 | 93 | theorem Equiv.Perm.viaFintypeEmbedding_sign [DecidableEq α] [Fintype β] :
Equiv.Perm.sign (e.viaFintypeEmbedding f) = Equiv.Perm.sign e := by |
simp [Equiv.Perm.viaFintypeEmbedding]
| [
" f.invOfMemRange ((fun a => ⟨f a, ⋯⟩) x✝) = x✝",
" (fun a => ⟨f a, ⋯⟩) (f.invOfMemRange x✝) = x✝",
" f.toEquivRange.symm ⟨f a, ⋯⟩ = a",
" f.toEquivRange = Equiv.ofInjective ⇑f ⋯",
" ↑(f.toEquivRange x✝) = ↑((Equiv.ofInjective ⇑f ⋯) x✝)",
" (e.viaFintypeEmbedding f) (f a) = f (e a)",
" (e.extendDomain f... | [
" f.invOfMemRange ((fun a => ⟨f a, ⋯⟩) x✝) = x✝",
" (fun a => ⟨f a, ⋯⟩) (f.invOfMemRange x✝) = x✝",
" f.toEquivRange.symm ⟨f a, ⋯⟩ = a",
" f.toEquivRange = Equiv.ofInjective ⇑f ⋯",
" ↑(f.toEquivRange x✝) = ↑((Equiv.ofInjective ⇑f ⋯) x✝)",
" (e.viaFintypeEmbedding f) (f a) = f (e a)",
" (e.extendDomain f... |
import Mathlib.Computability.Encoding
import Mathlib.Logic.Small.List
import Mathlib.ModelTheory.Syntax
import Mathlib.SetTheory.Cardinal.Ordinal
#align_import model_theory.encoding from "leanprover-community/mathlib"@"91288e351d51b3f0748f0a38faa7613fb0ae2ada"
universe u v w u' v'
namespace FirstOrder
namespace... | Mathlib/ModelTheory/Encoding.lean | 235 | 287 | theorem listDecode_encode_list (l : List (Σn, L.BoundedFormula α n)) :
(listDecode (l.bind fun φ => φ.2.listEncode)).1 = l.headI := by |
suffices h : ∀ (φ : Σn, L.BoundedFormula α n) (l),
(listDecode (listEncode φ.2 ++ l)).1 = φ ∧ (listDecode (listEncode φ.2 ++ l)).2.1 = l by
induction' l with φ l _
· rw [List.nil_bind]
simp [listDecode]
· rw [cons_bind, (h φ _).1, headI_cons]
rintro ⟨n, φ⟩
induction' φ with _ _ _ _ φ_n φ_... | [
" L.BoundedFormula α n = L.BoundedFormula α m",
" L.Term (α ⊕ Fin n₂) = L.Term (α ⊕ Fin n₁)",
" sizeOf l ≤ max 1 (sizeOf (Sum.inl ⟨n₁, t₁⟩ :: Sum.inl ⟨n₂, t₂⟩ :: l))",
" List.rec 1 (fun head tail tail_ih => 1 + head._sizeOf_1 + tail_ih) l ≤\n max 1\n (1 + (Sum.inl ⟨n₁, t₁⟩)._sizeOf_1 + 1 + (Sum.inl ⟨n... | [
" L.BoundedFormula α n = L.BoundedFormula α m",
" L.Term (α ⊕ Fin n₂) = L.Term (α ⊕ Fin n₁)",
" sizeOf l ≤ max 1 (sizeOf (Sum.inl ⟨n₁, t₁⟩ :: Sum.inl ⟨n₂, t₂⟩ :: l))",
" List.rec 1 (fun head tail tail_ih => 1 + head._sizeOf_1 + tail_ih) l ≤\n max 1\n (1 + (Sum.inl ⟨n₁, t₁⟩)._sizeOf_1 + 1 + (Sum.inl ⟨n... |
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 | 73 | 78 | theorem AffineMap.restrict.injective {φ : P₁ →ᵃ[k] P₂} (hφ : Function.Injective φ)
{E : AffineSubspace k P₁} {F : AffineSubspace k P₂} [Nonempty E] [Nonempty F]
(hEF : E.map φ ≤ F) : Function.Injective (AffineMap.restrict φ hEF) := by |
intro x y h
simp only [Subtype.ext_iff, Subtype.coe_mk, AffineMap.restrict.coe_apply] at h ⊢
exact hφ h
| [
" 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.RingTheory.WittVector.Frobenius
import Mathlib.RingTheory.WittVector.Verschiebung
import Mathlib.RingTheory.WittVector.MulP
#align_import ring_theory.witt_vector.identities from "leanprover-community/mathlib"@"0798037604b2d91748f9b43925fb7570a5f3256c"
namespace WittVector
variable {p : ℕ} {R : Typ... | Mathlib/RingTheory/WittVector/Identities.lean | 90 | 92 | theorem p_nonzero [Nontrivial R] [CharP R p] : (p : 𝕎 R) ≠ 0 := by |
intro h
simpa only [h, zero_coeff, zero_ne_one] using coeff_p_one p R
| [
" frobenius (verschiebung x) = x * ↑p",
" ∀ (n : ℕ), (ghostComponent n) (frobenius (verschiebung x)) = (ghostComponent n) (x * ↑p)",
" verschiebung x = x * ↑p",
" (↑p ^ i).coeff i = 1",
" (↑p ^ 0).coeff 0 = 1",
" (↑p ^ (i + 1)).coeff (i + 1) = 1",
" (↑p ^ i).coeff j = 0",
" (↑p ^ 0).coeff j = 0",
" ... | [
" frobenius (verschiebung x) = x * ↑p",
" ∀ (n : ℕ), (ghostComponent n) (frobenius (verschiebung x)) = (ghostComponent n) (x * ↑p)",
" verschiebung x = x * ↑p",
" (↑p ^ i).coeff i = 1",
" (↑p ^ 0).coeff 0 = 1",
" (↑p ^ (i + 1)).coeff (i + 1) = 1",
" (↑p ^ i).coeff j = 0",
" (↑p ^ 0).coeff j = 0",
" ... |
import Mathlib.Algebra.BigOperators.Intervals
import Mathlib.Algebra.BigOperators.NatAntidiagonal
import Mathlib.Algebra.BigOperators.Ring
import Mathlib.Algebra.Order.BigOperators.Group.Finset
import Mathlib.Data.Nat.Choose.Basic
import Mathlib.Tactic.Linarith
import Mathlib.Tactic.Ring
#align_import data.nat.choose... | Mathlib/Data/Nat/Choose/Sum.lean | 72 | 75 | theorem add_pow' (h : Commute x y) (n : ℕ) :
(x + y) ^ n = ∑ m ∈ antidiagonal n, choose n m.fst • (x ^ m.fst * y ^ m.snd) := by |
simp_rw [Finset.Nat.sum_antidiagonal_eq_sum_range_succ fun m p ↦ choose n m • (x ^ m * y ^ p),
_root_.nsmul_eq_mul, cast_comm, h.add_pow]
| [
" (x + y) ^ n = ∑ m ∈ range (n + 1), x ^ m * y ^ (n - m) * ↑(n.choose m)",
" (x + y) ^ n = ∑ m ∈ range (n + 1), t n m",
" t n 0 = y ^ n",
" t n n.succ = 0",
" ∀ (n i : ℕ), i ∈ range n.succ → (t n.succ ∘ succ) i = x * t n i + y * t n i.succ",
" (t n.succ ∘ succ) i = x * t n i + y * t n i.succ",
" ((fun m... | [
" (x + y) ^ n = ∑ m ∈ range (n + 1), x ^ m * y ^ (n - m) * ↑(n.choose m)",
" (x + y) ^ n = ∑ m ∈ range (n + 1), t n m",
" t n 0 = y ^ n",
" t n n.succ = 0",
" ∀ (n i : ℕ), i ∈ range n.succ → (t n.succ ∘ succ) i = x * t n i + y * t n i.succ",
" (t n.succ ∘ succ) i = x * t n i + y * t n i.succ",
" ((fun m... |
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 | 120 | 121 | theorem card_fintypeIco : Fintype.card (Set.Ico a b) = b - a := by |
rw [Fintype.card_ofFinset, card_Ico]
| [
" 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.ArctanDeriv
#align_import analysis.special_functions.trigonometric.bounds from "leanprover-community/mathlib"@"2c1d8ca2812b64f88992a5294ea3dba144755cd1"
open Set
namespace Real
variable {x : ℝ}
| Mathlib/Analysis/SpecialFunctions/Trigonometric/Bounds.lean | 39 | 49 | theorem sin_lt (h : 0 < x) : sin x < x := by |
cases' lt_or_le 1 x with h' h'
· exact (sin_le_one x).trans_lt h'
have hx : |x| = x := abs_of_nonneg h.le
have := le_of_abs_le (sin_bound <| show |x| ≤ 1 by rwa [hx])
rw [sub_le_iff_le_add', hx] at this
apply this.trans_lt
rw [sub_add, sub_lt_self_iff, sub_pos, div_eq_mul_inv (x ^ 3)]
refine mul_lt_mul... | [
" x.sin < x",
" |x| ≤ 1",
" x - x ^ 3 / 6 + x ^ 4 * (5 / 96) < x",
" x ^ 4 * (5 / 96) < x ^ 3 * 6⁻¹",
" 5 / 96 < 6⁻¹",
" 0 ≤ 5 / 96",
" x ^ 4 ≤ x ^ 3",
" 3 ≤ 4"
] | [] |
import Mathlib.Algebra.Group.Commute.Basic
import Mathlib.Data.Fintype.Card
import Mathlib.GroupTheory.Perm.Basic
#align_import group_theory.perm.support from "leanprover-community/mathlib"@"9003f28797c0664a49e4179487267c494477d853"
open Equiv Finset
namespace Equiv.Perm
variable {α : Type*}
section Disjoint
... | Mathlib/GroupTheory/Perm/Support.lean | 87 | 90 | theorem disjoint_refl_iff : Disjoint f f ↔ f = 1 := by |
refine ⟨fun h => ?_, fun h => h.symm ▸ disjoint_one_left 1⟩
ext x
cases' h x with hx hx <;> simp [hx]
| [
" f.Disjoint g → g.Disjoint f",
" (f * g) x = (g * f) x",
" f.Disjoint f ↔ f = 1",
" f = 1",
" f x = 1 x"
] | [
" f.Disjoint g → g.Disjoint f",
" (f * g) x = (g * f) x"
] |
import Mathlib.Order.Interval.Set.UnorderedInterval
import Mathlib.Algebra.Order.Interval.Set.Monoid
import Mathlib.Data.Set.Pointwise.Basic
import Mathlib.Algebra.Order.Field.Basic
import Mathlib.Algebra.Order.Group.MinMax
#align_import data.set.pointwise.interval from "leanprover-community/mathlib"@"2196ab363eb097c... | Mathlib/Data/Set/Pointwise/Interval.lean | 86 | 89 | theorem Ico_mul_Ioc_subset' (a b c d : α) : Ico a b * Ioc c d ⊆ Ioo (a * c) (b * d) := by |
haveI := covariantClass_le_of_lt
rintro x ⟨y, ⟨hya, hyb⟩, z, ⟨hzc, hzd⟩, rfl⟩
exact ⟨mul_lt_mul_of_le_of_lt hya hzc, mul_lt_mul_of_lt_of_le hyb hzd⟩
| [
" Icc a b * Ico c d ⊆ Ico (a * c) (b * d)",
" (fun x x_1 => x * x_1) y z ∈ Ico (a * c) (b * d)",
" Ico a b * Icc c d ⊆ Ico (a * c) (b * d)",
" Ioc a b * Ico c d ⊆ Ioo (a * c) (b * d)",
" (fun x x_1 => x * x_1) y z ∈ Ioo (a * c) (b * d)",
" Ico a b * Ioc c d ⊆ Ioo (a * c) (b * d)"
] | [
" Icc a b * Ico c d ⊆ Ico (a * c) (b * d)",
" (fun x x_1 => x * x_1) y z ∈ Ico (a * c) (b * d)",
" Ico a b * Icc c d ⊆ Ico (a * c) (b * d)",
" Ioc a b * Ico c d ⊆ Ioo (a * c) (b * d)",
" (fun x x_1 => x * x_1) y z ∈ Ioo (a * c) (b * d)"
] |
import Mathlib.Data.Set.Function
import Mathlib.Order.Interval.Set.OrdConnected
#align_import data.set.intervals.proj_Icc from "leanprover-community/mathlib"@"4e24c4bfcff371c71f7ba22050308aa17815626c"
variable {α β : Type*} [LinearOrder α]
open Function
namespace Set
def projIci (a x : α) : Ici a := ⟨max a x,... | Mathlib/Order/Interval/Set/ProjIcc.lean | 102 | 102 | theorem projIic_eq_self : projIic b x = ⟨b, le_rfl⟩ ↔ b ≤ x := by | simp [projIic, Subtype.ext_iff]
| [
" projIcc a b h x = ⟨a, ⋯⟩",
" projIcc a b h x = ⟨b, ⋯⟩",
" projIci a x = ⟨a, ⋯⟩ ↔ x ≤ a",
" projIic b x = ⟨b, ⋯⟩ ↔ b ≤ x"
] | [
" projIcc a b h x = ⟨a, ⋯⟩",
" projIcc a b h x = ⟨b, ⋯⟩",
" projIci a x = ⟨a, ⋯⟩ ↔ x ≤ a"
] |
import Mathlib.Algebra.CharP.Invertible
import Mathlib.Analysis.NormedSpace.LinearIsometry
import Mathlib.Analysis.Normed.Group.AddTorsor
import Mathlib.Analysis.NormedSpace.Basic
import Mathlib.LinearAlgebra.AffineSpace.Restrict
import Mathlib.Tactic.FailIfNoProgress
#align_import analysis.normed_space.affine_isomet... | Mathlib/Analysis/NormedSpace/AffineIsometry.lean | 329 | 331 | theorem linear_eq_linear_isometry : e.linear = e.linearIsometryEquiv.toLinearEquiv := by |
ext
rfl
| [
" e.linear = e.linearIsometryEquiv.toLinearEquiv",
" e.linear x✝ = e.linearIsometryEquiv.toLinearEquiv x✝"
] | [] |
import Mathlib.MeasureTheory.Measure.MeasureSpace
import Mathlib.MeasureTheory.Constructions.BorelSpace.Basic
#align_import measure_theory.measure.open_pos from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982"
open Topology ENNReal MeasureTheory
open Set Function Filter
namespace Measur... | Mathlib/MeasureTheory/Measure/OpenPos.lean | 119 | 130 | theorem eqOn_open_of_ae_eq {f g : X → Y} (h : f =ᵐ[μ.restrict U] g) (hU : IsOpen U)
(hf : ContinuousOn f U) (hg : ContinuousOn g U) : EqOn f g U := by |
replace h := ae_imp_of_ae_restrict h
simp only [EventuallyEq, ae_iff, Classical.not_imp] at h
have : IsOpen (U ∩ { a | f a ≠ g a }) := by
refine isOpen_iff_mem_nhds.mpr fun a ha => inter_mem (hU.mem_nhds ha.1) ?_
rcases ha with ⟨ha : a ∈ U, ha' : (f a, g a) ∈ (diagonal Y)ᶜ⟩
exact
(hf.continuous... | [
" μ U = 0 ↔ U = ∅",
" μ U = 0",
" U =ᶠ[ae μ] ∅ ↔ U = ∅",
" F =ᶠ[ae μ] univ ↔ F = univ",
" F =ᶠ[ae μ] univ",
" F = univ",
" μ F = μ univ ↔ F = univ",
" μ F = 1 ↔ F = univ",
" EqOn f g U",
" IsOpen (U ∩ {a | f a ≠ g a})",
" {a | f a ≠ g a} ∈ 𝓝 a"
] | [
" μ U = 0 ↔ U = ∅",
" μ U = 0",
" U =ᶠ[ae μ] ∅ ↔ U = ∅",
" F =ᶠ[ae μ] univ ↔ F = univ",
" F =ᶠ[ae μ] univ",
" F = univ",
" μ F = μ univ ↔ F = univ",
" μ F = 1 ↔ F = univ"
] |
import Mathlib.Data.Matrix.Basic
import Mathlib.Data.Matrix.RowCol
import Mathlib.Data.Fin.VecNotation
import Mathlib.Tactic.FinCases
#align_import data.matrix.notation from "leanprover-community/mathlib"@"a99f85220eaf38f14f94e04699943e185a5e1d1a"
namespace Matrix
universe u uₘ uₙ uₒ
variable {α : Type u} {o n m... | Mathlib/Data/Matrix/Notation.lean | 168 | 170 | theorem dotProduct_cons (v : Fin n.succ → α) (x : α) (w : Fin n → α) :
dotProduct v (vecCons x w) = vecHead v * x + dotProduct (vecTail v) w := by |
simp [dotProduct, Fin.sum_univ_succ, vecHead, vecTail]
| [
" vecCons v B i j = vecCons (v j) (fun i => B i j) i",
" vecCons v B 0 j = vecCons (v j) (fun i => B i j) 0",
" ∀ (i : Fin m), vecCons v B i.succ j = vecCons (v j) (fun i => B i j) i.succ",
" vecCons x v ⬝ᵥ w = x * vecHead w + v ⬝ᵥ vecTail w",
" v ⬝ᵥ vecCons x w = vecHead v * x + vecTail v ⬝ᵥ w"
] | [
" vecCons v B i j = vecCons (v j) (fun i => B i j) i",
" vecCons v B 0 j = vecCons (v j) (fun i => B i j) 0",
" ∀ (i : Fin m), vecCons v B i.succ j = vecCons (v j) (fun i => B i j) i.succ",
" vecCons x v ⬝ᵥ w = x * vecHead w + v ⬝ᵥ vecTail w"
] |
import Mathlib.Order.Interval.Set.Basic
import Mathlib.Order.Hom.Set
#align_import data.set.intervals.order_iso from "leanprover-community/mathlib"@"d012cd09a9b256d870751284dd6a29882b0be105"
open Set
namespace OrderIso
section Preorder
variable {α β : Type*} [Preorder α] [Preorder β]
@[simp]
theorem preimage_I... | Mathlib/Order/Interval/Set/OrderIso.lean | 103 | 104 | theorem image_Icc (e : α ≃o β) (a b : α) : e '' Icc a b = Icc (e a) (e b) := by |
rw [e.image_eq_preimage, e.symm.preimage_Icc, e.symm_symm]
| [
" ⇑e ⁻¹' Iic b = Iic (e.symm b)",
" x ∈ ⇑e ⁻¹' Iic b ↔ x ∈ Iic (e.symm b)",
" ⇑e ⁻¹' Ici b = Ici (e.symm b)",
" x ∈ ⇑e ⁻¹' Ici b ↔ x ∈ Ici (e.symm b)",
" ⇑e ⁻¹' Iio b = Iio (e.symm b)",
" x ∈ ⇑e ⁻¹' Iio b ↔ x ∈ Iio (e.symm b)",
" ⇑e ⁻¹' Ioi b = Ioi (e.symm b)",
" x ∈ ⇑e ⁻¹' Ioi b ↔ x ∈ Ioi (e.symm b)"... | [
" ⇑e ⁻¹' Iic b = Iic (e.symm b)",
" x ∈ ⇑e ⁻¹' Iic b ↔ x ∈ Iic (e.symm b)",
" ⇑e ⁻¹' Ici b = Ici (e.symm b)",
" x ∈ ⇑e ⁻¹' Ici b ↔ x ∈ Ici (e.symm b)",
" ⇑e ⁻¹' Iio b = Iio (e.symm b)",
" x ∈ ⇑e ⁻¹' Iio b ↔ x ∈ Iio (e.symm b)",
" ⇑e ⁻¹' Ioi b = Ioi (e.symm b)",
" x ∈ ⇑e ⁻¹' Ioi b ↔ x ∈ Ioi (e.symm b)"... |
import Mathlib.Topology.Order.Basic
open Set Filter OrderDual
open scoped Topology
section OrderClosedTopology
variable {α : Type*} [LinearOrder α] [TopologicalSpace α] [OrderClosedTopology α] {a b c d : α}
@[simp] theorem nhdsSet_Ioi : 𝓝ˢ (Ioi a) = 𝓟 (Ioi a) := isOpen_Ioi.nhdsSet_eq
@[simp] theorem nhdsSet... | Mathlib/Topology/Order/NhdsSet.lean | 44 | 45 | theorem nhdsSet_Ioc (h : a < b) : 𝓝ˢ (Ioc a b) = 𝓝 b ⊔ 𝓟 (Ioo a b) := by |
rw [← Ioo_insert_right h, nhdsSet_insert, nhdsSet_Ioo]
| [
" 𝓝ˢ (Ici a) = 𝓝 a ⊔ 𝓟 (Ioi a)",
" 𝓝ˢ (Ico a b) = 𝓝 a ⊔ 𝓟 (Ioo a b)",
" 𝓝ˢ (Ioc a b) = 𝓝 b ⊔ 𝓟 (Ioo a b)"
] | [
" 𝓝ˢ (Ici a) = 𝓝 a ⊔ 𝓟 (Ioi a)",
" 𝓝ˢ (Ico a b) = 𝓝 a ⊔ 𝓟 (Ioo a b)"
] |
import Mathlib.Topology.Category.TopCat.EpiMono
import Mathlib.Topology.Category.TopCat.Limits.Basic
import Mathlib.CategoryTheory.Limits.Shapes.Products
import Mathlib.CategoryTheory.Limits.ConcreteCategory
import Mathlib.Data.Set.Subsingleton
import Mathlib.Tactic.CategoryTheory.Elementwise
#align_import topology.c... | Mathlib/Topology/Category/TopCat/Limits/Products.lean | 136 | 139 | theorem sigmaIsoSigma_inv_apply {ι : Type v} (α : ι → TopCat.{max v u}) (i : ι) (x : α i) :
(sigmaIsoSigma α).inv ⟨i, x⟩ = (Sigma.ι α i : _) x := by |
rw [← sigmaIsoSigma_hom_ι_apply, ← comp_app, ← comp_app, Iso.hom_inv_id,
Category.comp_id]
| [
" ∀ (s : Cone (Discrete.functor α)) (m : s.pt ⟶ (piFan α).pt),\n (∀ (j : Discrete ι), m ≫ (piFan α).π.app j = s.π.app j) →\n m = (fun S => { toFun := fun s i => (S.π.app { as := i }) s, continuous_toFun := ⋯ }) s",
" m = (fun S => { toFun := fun s i => (S.π.app { as := i }) s, continuous_toFun := ⋯ }) S",... | [
" ∀ (s : Cone (Discrete.functor α)) (m : s.pt ⟶ (piFan α).pt),\n (∀ (j : Discrete ι), m ≫ (piFan α).π.app j = s.π.app j) →\n m = (fun S => { toFun := fun s i => (S.π.app { as := i }) s, continuous_toFun := ⋯ }) s",
" m = (fun S => { toFun := fun s i => (S.π.app { as := i }) s, continuous_toFun := ⋯ }) S",... |
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 | 50 | 54 | theorem Hom.cast_cast {u v u' v' u'' v'' : U} (e : u ⟶ v) (hu : u = u') (hv : v = v')
(hu' : u' = u'') (hv' : v' = v'') :
(e.cast hu hv).cast hu' hv' = e.cast (hu.trans hu') (hv.trans hv') := by |
subst_vars
rfl
| [
" (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"
] | [
" (u ⟶ v) = (u' ⟶ v')",
" cast hu hv e = _root_.cast ⋯ e",
" cast ⋯ ⋯ e = _root_.cast ⋯ e"
] |
import Mathlib.Algebra.BigOperators.Intervals
import Mathlib.Analysis.Normed.Group.Basic
import Mathlib.Topology.Instances.NNReal
#align_import analysis.normed.group.infinite_sum from "leanprover-community/mathlib"@"9a59dcb7a2d06bf55da57b9030169219980660cd"
open Topology NNReal
open Finset Filter Metric
variabl... | Mathlib/Analysis/Normed/Group/InfiniteSum.lean | 54 | 68 | theorem cauchySeq_finset_of_norm_bounded_eventually {f : ι → E} {g : ι → ℝ} (hg : Summable g)
(h : ∀ᶠ i in cofinite, ‖f i‖ ≤ g i) : CauchySeq fun s => ∑ i ∈ s, f i := by |
refine cauchySeq_finset_iff_vanishing_norm.2 fun ε hε => ?_
rcases summable_iff_vanishing_norm.1 hg ε hε with ⟨s, hs⟩
classical
refine ⟨s ∪ h.toFinset, fun t ht => ?_⟩
have : ∀ i ∈ t, ‖f i‖ ≤ g i := by
intro i hi
simp only [disjoint_left, mem_union, not_or, h.mem_toFinset, Set.mem_compl_iff,
Cl... | [
" (CauchySeq fun s => ∑ i ∈ s, f i) ↔ ∀ ε > 0, ∃ s, ∀ (t : Finset ι), Disjoint t s → ‖∑ i ∈ t, f i‖ < ε",
" (∀ (i : ℝ), 0 < i → ∃ s, ∀ (t : Finset ι), Disjoint t s → ∑ b ∈ t, f b ∈ ball 0 i) ↔\n ∀ ε > 0, ∃ s, ∀ (t : Finset ι), Disjoint t s → ‖∑ i ∈ t, f i‖ < ε",
" ∀ ⦃s t : Set E⦄,\n s ⊆ t →\n (∃ s_1,... | [
" (CauchySeq fun s => ∑ i ∈ s, f i) ↔ ∀ ε > 0, ∃ s, ∀ (t : Finset ι), Disjoint t s → ‖∑ i ∈ t, f i‖ < ε",
" (∀ (i : ℝ), 0 < i → ∃ s, ∀ (t : Finset ι), Disjoint t s → ∑ b ∈ t, f b ∈ ball 0 i) ↔\n ∀ ε > 0, ∃ s, ∀ (t : Finset ι), Disjoint t s → ‖∑ i ∈ t, f i‖ < ε",
" ∀ ⦃s t : Set E⦄,\n s ⊆ t →\n (∃ s_1,... |
import Mathlib.LinearAlgebra.QuadraticForm.TensorProduct
import Mathlib.LinearAlgebra.QuadraticForm.IsometryEquiv
suppress_compilation
universe uR uM₁ uM₂ uM₃ uM₄
variable {R : Type uR} {M₁ : Type uM₁} {M₂ : Type uM₂} {M₃ : Type uM₃} {M₄ : Type uM₄}
open scoped TensorProduct
namespace QuadraticForm
variable [Co... | Mathlib/LinearAlgebra/QuadraticForm/TensorProduct/Isometries.lean | 153 | 159 | theorem comp_tensorRId_eq (Q₁ : QuadraticForm R M₁) :
Q₁.comp (TensorProduct.rid R M₁) = Q₁.tmul (sq (R := R)) := by |
refine (QuadraticForm.associated_rightInverse R).injective ?_
ext m₁ m₁'
dsimp [-associated_apply]
simp only [associated_tmul, QuadraticForm.associated_comp]
simp [-associated_apply, one_mul]
| [
" (Q₂.tmul Q₄).comp (TensorProduct.map f.toLinearMap g.toLinearMap) = Q₁.tmul Q₃",
" (associatedHom R) ((Q₂.tmul Q₄).comp (TensorProduct.map f.toLinearMap g.toLinearMap)) = (associatedHom R) (Q₁.tmul Q₃)",
" ((TensorProduct.AlgebraTensorModule.curry\n (((TensorProduct.AlgebraTensorModule.curry\n ... | [
" (Q₂.tmul Q₄).comp (TensorProduct.map f.toLinearMap g.toLinearMap) = Q₁.tmul Q₃",
" (associatedHom R) ((Q₂.tmul Q₄).comp (TensorProduct.map f.toLinearMap g.toLinearMap)) = (associatedHom R) (Q₁.tmul Q₃)",
" ((TensorProduct.AlgebraTensorModule.curry\n (((TensorProduct.AlgebraTensorModule.curry\n ... |
import Mathlib.Topology.Bornology.Basic
#align_import topology.bornology.constructions from "leanprover-community/mathlib"@"e3d9ab8faa9dea8f78155c6c27d62a621f4c152d"
open Set Filter Bornology Function
open Filter
variable {α β ι : Type*} {π : ι → Type*} [Bornology α] [Bornology β]
[∀ i, Bornology (π i)]
inst... | Mathlib/Topology/Bornology/Constructions.lean | 94 | 96 | theorem isBounded_prod_self : IsBounded (s ×ˢ s) ↔ IsBounded s := by |
rcases s.eq_empty_or_nonempty with (rfl | hs); · simp
exact (isBounded_prod_of_nonempty (hs.prod hs)).trans and_self_iff
| [
" IsBounded (s ×ˢ t) ↔ s = ∅ ∨ t = ∅ ∨ IsBounded s ∧ IsBounded t",
" IsBounded (∅ ×ˢ t) ↔ ∅ = ∅ ∨ t = ∅ ∨ IsBounded ∅ ∧ IsBounded t",
" IsBounded (s ×ˢ ∅) ↔ s = ∅ ∨ ∅ = ∅ ∨ IsBounded s ∧ IsBounded ∅",
" IsBounded (s ×ˢ s) ↔ IsBounded s",
" IsBounded (∅ ×ˢ ∅) ↔ IsBounded ∅"
] | [
" IsBounded (s ×ˢ t) ↔ s = ∅ ∨ t = ∅ ∨ IsBounded s ∧ IsBounded t",
" IsBounded (∅ ×ˢ t) ↔ ∅ = ∅ ∨ t = ∅ ∨ IsBounded ∅ ∧ IsBounded t",
" IsBounded (s ×ˢ ∅) ↔ s = ∅ ∨ ∅ = ∅ ∨ IsBounded s ∧ IsBounded ∅"
] |
import Mathlib.Data.Matrix.Basic
variable {l m n o : Type*}
universe u v w
variable {R : Type*} {α : Type v} {β : Type w}
namespace Matrix
def col (w : m → α) : Matrix m Unit α :=
of fun x _ => w x
#align matrix.col Matrix.col
-- TODO: set as an equation lemma for `col`, see mathlib4#3024
@[simp]
theorem col... | Mathlib/Data/Matrix/RowCol.lean | 154 | 158 | theorem vecMulVec_eq [Mul α] [AddCommMonoid α] (w : m → α) (v : n → α) :
vecMulVec w v = col w * row v := by |
ext
simp only [vecMulVec, mul_apply, Fintype.univ_punit, Finset.sum_singleton]
rfl
| [
" col (v + w) = col v + col w",
" col (v + w) i✝ j✝ = (col v + col w) i✝ j✝",
" col (x • v) = x • col v",
" col (x • v) i✝ j✝ = (x • col v) i✝ j✝",
" row (v + w) = row v + row w",
" row (v + w) i✝ j✝ = (row v + row w) i✝ j✝",
" row (x • v) = x • row v",
" row (x • v) i✝ j✝ = (x • row v) i✝ j✝",
" (c... | [
" col (v + w) = col v + col w",
" col (v + w) i✝ j✝ = (col v + col w) i✝ j✝",
" col (x • v) = x • col v",
" col (x • v) i✝ j✝ = (x • col v) i✝ j✝",
" row (v + w) = row v + row w",
" row (v + w) i✝ j✝ = (row v + row w) i✝ j✝",
" row (x • v) = x • row v",
" row (x • v) i✝ j✝ = (x • row v) i✝ j✝",
" (c... |
import Mathlib.Analysis.NormedSpace.OperatorNorm.Basic
suppress_compilation
open Bornology
open Filter hiding map_smul
open scoped Classical NNReal Topology Uniformity
-- the `ₗ` subscript variables are for special cases about linear (as opposed to semilinear) maps
variable {𝕜 𝕜₂ 𝕜₃ E Eₗ F Fₗ G Gₗ 𝓕 : Type*}
... | Mathlib/Analysis/NormedSpace/OperatorNorm/NNNorm.lean | 100 | 101 | theorem isLeast_opNNNorm : IsLeast {C : ℝ≥0 | ∀ x, ‖f x‖₊ ≤ C * ‖x‖₊} ‖f‖₊ := by |
simpa only [← opNNNorm_le_iff] using isLeast_Ici
| [
" ‖f‖₊ = sInf {c | ∀ (x : E), ‖f x‖₊ ≤ c * ‖x‖₊}",
" ↑‖f‖₊ = ↑(sInf {c | ∀ (x : E), ‖f x‖₊ ≤ c * ‖x‖₊})",
" sInf {c | 0 ≤ c ∧ ∀ (x : E), ‖f x‖ ≤ c * ‖x‖} = sInf {x | ∃ (h : 0 ≤ x), ⟨x, h⟩ ∈ {c | ∀ (x : E), ‖f x‖₊ ≤ c * ‖x‖₊}}",
" ‖x‖₊ ≠ 0",
" ‖x‖₊ = 1",
" IsLeast {C | ∀ (x : E), ‖f x‖₊ ≤ C * ‖x‖₊} ‖f‖₊"
] | [
" ‖f‖₊ = sInf {c | ∀ (x : E), ‖f x‖₊ ≤ c * ‖x‖₊}",
" ↑‖f‖₊ = ↑(sInf {c | ∀ (x : E), ‖f x‖₊ ≤ c * ‖x‖₊})",
" sInf {c | 0 ≤ c ∧ ∀ (x : E), ‖f x‖ ≤ c * ‖x‖} = sInf {x | ∃ (h : 0 ≤ x), ⟨x, h⟩ ∈ {c | ∀ (x : E), ‖f x‖₊ ≤ c * ‖x‖₊}}",
" ‖x‖₊ ≠ 0",
" ‖x‖₊ = 1"
] |
import Mathlib.Data.Finset.Order
import Mathlib.Algebra.DirectSum.Module
import Mathlib.RingTheory.FreeCommRing
import Mathlib.RingTheory.Ideal.Maps
import Mathlib.RingTheory.Ideal.Quotient
import Mathlib.Tactic.SuppressCompilation
#align_import algebra.direct_limit from "leanprover-community/mathlib"@"f0c8bf9245297a... | Mathlib/Algebra/DirectLimit.lean | 164 | 170 | theorem lift_unique [IsDirected ι (· ≤ ·)] (F : DirectLimit G f →ₗ[R] P) (x) :
F x =
lift R ι G f (fun i => F.comp <| of R ι G f i)
(fun i j hij x => by rw [LinearMap.comp_apply, of_f]; rfl) x := by |
cases isEmpty_or_nonempty ι
· simp_rw [Subsingleton.elim x 0, _root_.map_zero]
· exact DirectLimit.induction_on x fun i x => by rw [lift_of]; rfl
| [
" Nonempty ι",
" (of R ι G f k) ((f i k hik) x + (f j k hjk) y) = Quotient.mk'' (p + q)",
" Quotient.mk'' p + Quotient.mk'' q = Quotient.mk'' (p + q)",
" a ∈ ↑(LinearMap.ker (DirectSum.toModule R ι P g))",
" ((fun i => F ∘ₗ of R ι G f i) j) ((f i j hij) x) = ((fun i => F ∘ₗ of R ι G f i) i) x",
" F ((of R... | [
" Nonempty ι",
" (of R ι G f k) ((f i k hik) x + (f j k hjk) y) = Quotient.mk'' (p + q)",
" Quotient.mk'' p + Quotient.mk'' q = Quotient.mk'' (p + q)",
" a ∈ ↑(LinearMap.ker (DirectSum.toModule R ι P g))"
] |
import Mathlib.Algebra.CharP.Invertible
import Mathlib.Analysis.NormedSpace.Basic
import Mathlib.Analysis.Normed.Group.AddTorsor
import Mathlib.LinearAlgebra.AffineSpace.AffineSubspace
import Mathlib.Topology.Instances.RealVectorSpace
#align_import analysis.normed_space.add_torsor from "leanprover-community/mathlib"@... | Mathlib/Analysis/NormedSpace/AddTorsor.lean | 68 | 72 | theorem dist_lineMap_lineMap (p₁ p₂ : P) (c₁ c₂ : 𝕜) :
dist (lineMap p₁ p₂ c₁) (lineMap p₁ p₂ c₂) = dist c₁ c₂ * dist p₁ p₂ := by |
rw [dist_comm p₁ p₂]
simp only [lineMap_apply, dist_eq_norm_vsub, vadd_vsub_vadd_cancel_right,
← sub_smul, norm_smul, vsub_eq_sub]
| [
" IsClosed ↑s.direction ↔ IsClosed ↑s",
" IsClosed ↑⊥.direction ↔ IsClosed ↑⊥",
" IsClosed ((fun x_1 => x_1 -ᵥ x) '' ↑s) ↔ IsClosed (⇑(IsometryEquiv.vaddConst x).toHomeomorph.symm '' ↑s)",
" dist p₁ ((homothety p₁ c) p₂) = ‖c‖ * dist p₁ p₂",
" dist ((homothety p₁ c) p₂) p₁ = ‖c‖ * dist p₁ p₂",
" dist ((li... | [
" IsClosed ↑s.direction ↔ IsClosed ↑s",
" IsClosed ↑⊥.direction ↔ IsClosed ↑⊥",
" IsClosed ((fun x_1 => x_1 -ᵥ x) '' ↑s) ↔ IsClosed (⇑(IsometryEquiv.vaddConst x).toHomeomorph.symm '' ↑s)",
" dist p₁ ((homothety p₁ c) p₂) = ‖c‖ * dist p₁ p₂",
" dist ((homothety p₁ c) p₂) p₁ = ‖c‖ * dist p₁ p₂"
] |
import Mathlib.CategoryTheory.Sites.Sheaf
#align_import category_theory.sites.plus from "leanprover-community/mathlib"@"70fd9563a21e7b963887c9360bd29b2393e6225a"
namespace CategoryTheory.GrothendieckTopology
open CategoryTheory
open CategoryTheory.Limits
open Opposite
universe w v u
variable {C : Type u} [Ca... | Mathlib/CategoryTheory/Sites/Plus.lean | 71 | 77 | theorem diagramNatTrans_id (X : C) (P : Cᵒᵖ ⥤ D) :
J.diagramNatTrans (𝟙 P) X = 𝟙 (J.diagram P X) := by |
ext : 2
refine Multiequalizer.hom_ext _ _ _ (fun i => ?_)
dsimp
simp only [limit.lift_π, Multifork.ofι_pt, Multifork.ofι_π_app, Category.id_comp]
erw [Category.comp_id]
| [
" ((J.diagram P Y).map f ≫\n (fun S =>\n Multiequalizer.lift (((J.pullback f✝).op.obj S).unop.index P) ((J.diagram P Y).obj S)\n (fun I => Multiequalizer.ι (S.unop.index P) (Cover.Arrow.base I)) ⋯)\n T) ≫\n Multiequalizer.ι (((J.pullback f✝).op.obj T).unop.index P) I =\n... | [
" ((J.diagram P Y).map f ≫\n (fun S =>\n Multiequalizer.lift (((J.pullback f✝).op.obj S).unop.index P) ((J.diagram P Y).obj S)\n (fun I => Multiequalizer.ι (S.unop.index P) (Cover.Arrow.base I)) ⋯)\n T) ≫\n Multiequalizer.ι (((J.pullback f✝).op.obj T).unop.index P) I =\n... |
import Mathlib.Analysis.SpecialFunctions.ExpDeriv
import Mathlib.Analysis.SpecialFunctions.Complex.Circle
import Mathlib.Analysis.InnerProductSpace.l2Space
import Mathlib.MeasureTheory.Function.ContinuousMapDense
import Mathlib.MeasureTheory.Function.L2Space
import Mathlib.MeasureTheory.Group.Integral
import Mathlib.M... | Mathlib/Analysis/Fourier/AddCircle.lean | 163 | 164 | theorem fourier_neg' {n : ℤ} {x : AddCircle T} : @toCircle T (-(n • x)) = conj (fourier n x) := by |
rw [← neg_smul, ← fourier_apply]; exact fourier_neg
| [
" (fourier n) ↑x = (2 * ↑π * Complex.I * ↑n * ↑x / ↑T).exp",
" (↑2 * ↑π / ↑T * (↑n * ↑x) * Complex.I).exp = (2 * ↑π * Complex.I * ↑n * ↑x / ↑T).exp",
" (2 * ↑π / ↑T * (↑n * ↑x) * Complex.I).exp = (2 * ↑π * Complex.I * ↑n * ↑x / ↑T).exp",
" 2 * ↑π / ↑T * (↑n * ↑x) * Complex.I = 2 * ↑π * Complex.I * ↑n * ↑x / ↑... | [
" (fourier n) ↑x = (2 * ↑π * Complex.I * ↑n * ↑x / ↑T).exp",
" (↑2 * ↑π / ↑T * (↑n * ↑x) * Complex.I).exp = (2 * ↑π * Complex.I * ↑n * ↑x / ↑T).exp",
" (2 * ↑π / ↑T * (↑n * ↑x) * Complex.I).exp = (2 * ↑π * Complex.I * ↑n * ↑x / ↑T).exp",
" 2 * ↑π / ↑T * (↑n * ↑x) * Complex.I = 2 * ↑π * Complex.I * ↑n * ↑x / ↑... |
import Mathlib.MeasureTheory.Measure.Haar.InnerProductSpace
import Mathlib.MeasureTheory.Measure.Lebesgue.EqHaar
import Mathlib.MeasureTheory.Integral.SetIntegral
#align_import measure_theory.measure.haar.normed_space from "leanprover-community/mathlib"@"b84aee748341da06a6d78491367e2c0e9f15e8a5"
noncomputable sect... | Mathlib/MeasureTheory/Measure/Haar/NormedSpace.lean | 128 | 130 | theorem setIntegral_comp_smul_of_pos (f : E → F) {R : ℝ} (s : Set E) (hR : 0 < R) :
∫ x in s, f (R • x) ∂μ = (R ^ finrank ℝ E)⁻¹ • ∫ x in R • s, f x ∂μ := by |
rw [setIntegral_comp_smul μ f s hR.ne', abs_of_nonneg (inv_nonneg.2 (pow_nonneg hR.le _))]
| [
" NoAtoms μ",
" ∫ (x : E), f (R • x) ∂μ = |(R ^ finrank ℝ E)⁻¹| • ∫ (x : E), f x ∂μ",
" ∫ (x : E), f (0 • x) ∂μ = |(0 ^ finrank ℝ E)⁻¹| • ∫ (x : E), f x ∂μ",
" (μ univ).toReal • f 0 = |(0 ^ finrank ℝ E)⁻¹| • ∫ (x : E), f x ∂μ",
" f = fun x => f 0",
" f x = f 0",
"E : Type u_1\ninst✝⁷ : NormedAddCommGrou... | [
" NoAtoms μ",
" ∫ (x : E), f (R • x) ∂μ = |(R ^ finrank ℝ E)⁻¹| • ∫ (x : E), f x ∂μ",
" ∫ (x : E), f (0 • x) ∂μ = |(0 ^ finrank ℝ E)⁻¹| • ∫ (x : E), f x ∂μ",
" (μ univ).toReal • f 0 = |(0 ^ finrank ℝ E)⁻¹| • ∫ (x : E), f x ∂μ",
" f = fun x => f 0",
" f x = f 0",
"E : Type u_1\ninst✝⁷ : NormedAddCommGrou... |
import Mathlib.Data.Int.Range
import Mathlib.Data.ZMod.Basic
import Mathlib.NumberTheory.MulChar.Basic
#align_import number_theory.legendre_symbol.zmod_char from "leanprover-community/mathlib"@"70fd9563a21e7b963887c9360bd29b2393e6225a"
namespace ZMod
section QuadCharModP
@[simps]
def χ₄ : MulChar (ZMod 4) ℤ... | Mathlib/NumberTheory/LegendreSymbol/ZModChar.lean | 113 | 115 | theorem χ₄_int_three_mod_four {n : ℤ} (hn : n % 4 = 3) : χ₄ n = -1 := by |
rw [χ₄_int_mod_four, hn]
rfl
| [
" ∀ (x y : ZMod 4),\n { toFun := ![0, 1, 0, -1], map_one' := ⋯ }.toFun (x * y) =\n { toFun := ![0, 1, 0, -1], map_one' := ⋯ }.toFun x * { toFun := ![0, 1, 0, -1], map_one' := ⋯ }.toFun y",
" ∀ (a : ZMod 4), ¬IsUnit a → (↑{ toFun := ![0, 1, 0, -1], map_one' := ⋯, map_mul' := ⋯ }).toFun a = 0",
" χ₄.IsQua... | [
" ∀ (x y : ZMod 4),\n { toFun := ![0, 1, 0, -1], map_one' := ⋯ }.toFun (x * y) =\n { toFun := ![0, 1, 0, -1], map_one' := ⋯ }.toFun x * { toFun := ![0, 1, 0, -1], map_one' := ⋯ }.toFun y",
" ∀ (a : ZMod 4), ¬IsUnit a → (↑{ toFun := ![0, 1, 0, -1], map_one' := ⋯, map_mul' := ⋯ }).toFun a = 0",
" χ₄.IsQua... |
import Mathlib.Analysis.Calculus.Deriv.Slope
import Mathlib.Analysis.Calculus.Deriv.Inv
#align_import analysis.calculus.dslope from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe"
open scoped Classical Topology Filter
open Function Set Filter
variable {𝕜 E : Type*} [NontriviallyNormed... | Mathlib/Analysis/Calculus/Dslope.lean | 118 | 124 | theorem continuousOn_dslope (h : s ∈ 𝓝 a) :
ContinuousOn (dslope f a) s ↔ ContinuousOn f s ∧ DifferentiableAt 𝕜 f a := by |
refine ⟨fun hc => ⟨hc.of_dslope, continuousAt_dslope_same.1 <| hc.continuousAt h⟩, ?_⟩
rintro ⟨hc, hd⟩ x hx
rcases eq_or_ne x a with (rfl | hne)
exacts [(continuousAt_dslope_same.2 hd).continuousWithinAt,
(continuousWithinAt_dslope_of_ne hne).2 (hc x hx)]
| [
" dslope (⇑f ∘ g) a b = f (dslope g a b)",
" dslope (⇑f ∘ g) b b = f (dslope g b b)",
" deriv (⇑f ∘ g) b = f (deriv g b)",
" (b - a) • dslope f a b = f b - f a",
" (b - b) • dslope f b b = f b - f b",
" dslope (fun x => (x - a) • f x) a b = f b",
" ContinuousAt (dslope f a) a ↔ DifferentiableAt 𝕜 f a",... | [
" dslope (⇑f ∘ g) a b = f (dslope g a b)",
" dslope (⇑f ∘ g) b b = f (dslope g b b)",
" deriv (⇑f ∘ g) b = f (deriv g b)",
" (b - a) • dslope f a b = f b - f a",
" (b - b) • dslope f b b = f b - f b",
" dslope (fun x => (x - a) • f x) a b = f b",
" ContinuousAt (dslope f a) a ↔ DifferentiableAt 𝕜 f a",... |
import Mathlib.Algebra.Polynomial.Roots
import Mathlib.Analysis.Asymptotics.AsymptoticEquivalent
import Mathlib.Analysis.Asymptotics.SpecificAsymptotics
#align_import analysis.special_functions.polynomials from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982"
open Filter Finset Asymptotic... | Mathlib/Analysis/SpecialFunctions/Polynomials.lean | 73 | 76 | theorem tendsto_atBot_iff_leadingCoeff_nonpos :
Tendsto (fun x => eval x P) atTop atBot ↔ 0 < P.degree ∧ P.leadingCoeff ≤ 0 := by |
simp only [← tendsto_neg_atTop_iff, ← eval_neg, tendsto_atTop_iff_leadingCoeff_nonneg,
degree_neg, leadingCoeff_neg, neg_nonneg]
| [
" (fun x => eval x P) ~[atTop] fun x => P.leadingCoeff * x ^ P.natDegree",
" (fun x => ∑ i ∈ range P.natDegree, P.coeff i * x ^ i + P.coeff P.natDegree * x ^ P.natDegree) ~[atTop] fun x =>\n P.leadingCoeff * x ^ P.natDegree",
" Tendsto (fun x => eval x P) atTop atTop ↔ 0 < P.degree ∧ 0 ≤ P.leadingCoeff",
"... | [
" (fun x => eval x P) ~[atTop] fun x => P.leadingCoeff * x ^ P.natDegree",
" (fun x => ∑ i ∈ range P.natDegree, P.coeff i * x ^ i + P.coeff P.natDegree * x ^ P.natDegree) ~[atTop] fun x =>\n P.leadingCoeff * x ^ P.natDegree",
" Tendsto (fun x => eval x P) atTop atTop ↔ 0 < P.degree ∧ 0 ≤ P.leadingCoeff",
"... |
import Mathlib.Data.Finsupp.Basic
import Mathlib.Data.Finsupp.Order
#align_import data.finsupp.multiset from "leanprover-community/mathlib"@"59694bd07f0a39c5beccba34bd9f413a160782bf"
open Finset
variable {α β ι : Type*}
namespace Finsupp
def toMultiset : (α →₀ ℕ) →+ Multiset α where
toFun f := Finsupp.sum f... | Mathlib/Data/Finsupp/Multiset.lean | 67 | 68 | theorem card_toMultiset (f : α →₀ ℕ) : Multiset.card (toMultiset f) = f.sum fun _ => id := by |
simp [toMultiset_apply, map_finsupp_sum, Function.id_def]
| [
" toMultiset (single a n) = n • {a}",
" 0 • {a} = 0",
" toMultiset (∑ i ∈ s, single i n) = n • s.val",
" Multiset.card (toMultiset f) = f.sum fun x => id"
] | [
" toMultiset (single a n) = n • {a}",
" 0 • {a} = 0",
" toMultiset (∑ i ∈ s, single i n) = n • s.val"
] |
import Mathlib.Order.RelClasses
#align_import data.sigma.lex from "leanprover-community/mathlib"@"41cf0cc2f528dd40a8f2db167ea4fb37b8fde7f3"
namespace Sigma
variable {ι : Type*} {α : ι → Type*} {r r₁ r₂ : ι → ι → Prop} {s s₁ s₂ : ∀ i, α i → α i → Prop}
{a b : Σ i, α i}
inductive Lex (r : ι → ι → Prop) (s : ∀ ... | Mathlib/Data/Sigma/Lex.lean | 80 | 83 | theorem lex_swap : Lex (Function.swap r) s a b ↔ Lex r (fun i => Function.swap (s i)) b a := by |
constructor <;>
· rintro (⟨a, b, h⟩ | ⟨a, b, h⟩)
exacts [Lex.left _ _ h, Lex.right _ _ h]
| [
" Lex r s a b ↔ r a.fst b.fst ∨ ∃ h, s b.fst (h ▸ a.snd) b.snd",
" Lex r s a b → r a.fst b.fst ∨ ∃ h, s b.fst (h ▸ a.snd) b.snd",
" r ⟨i✝, a⟩.fst ⟨j✝, b⟩.fst ∨ ∃ h, s ⟨j✝, b⟩.fst (h ▸ ⟨i✝, a⟩.snd) ⟨j✝, b⟩.snd",
" r ⟨i✝, a⟩.fst ⟨i✝, b⟩.fst ∨ ∃ h, s ⟨i✝, b⟩.fst (h ▸ ⟨i✝, a⟩.snd) ⟨i✝, b⟩.snd",
" (r a.fst b.fst... | [
" Lex r s a b ↔ r a.fst b.fst ∨ ∃ h, s b.fst (h ▸ a.snd) b.snd",
" Lex r s a b → r a.fst b.fst ∨ ∃ h, s b.fst (h ▸ a.snd) b.snd",
" r ⟨i✝, a⟩.fst ⟨j✝, b⟩.fst ∨ ∃ h, s ⟨j✝, b⟩.fst (h ▸ ⟨i✝, a⟩.snd) ⟨j✝, b⟩.snd",
" r ⟨i✝, a⟩.fst ⟨i✝, b⟩.fst ∨ ∃ h, s ⟨i✝, b⟩.fst (h ▸ ⟨i✝, a⟩.snd) ⟨i✝, b⟩.snd",
" (r a.fst b.fst... |
import Mathlib.Order.Cover
import Mathlib.Order.Interval.Finset.Defs
#align_import data.finset.locally_finite from "leanprover-community/mathlib"@"442a83d738cb208d3600056c489be16900ba701d"
assert_not_exists MonoidWithZero
assert_not_exists Finset.sum
open Function OrderDual
open FinsetInterval
variable {ι α : T... | Mathlib/Order/Interval/Finset/Basic.lean | 62 | 63 | theorem nonempty_Ico : (Ico a b).Nonempty ↔ a < b := by |
rw [← coe_nonempty, coe_Ico, Set.nonempty_Ico]
| [
" (Icc a b).Nonempty ↔ a ≤ b",
" (Ico a b).Nonempty ↔ a < b"
] | [
" (Icc a b).Nonempty ↔ a ≤ b"
] |
import Mathlib.Algebra.Polynomial.AlgebraMap
import Mathlib.Algebra.Polynomial.Inductions
import Mathlib.Algebra.Polynomial.Splits
import Mathlib.Analysis.Normed.Field.Basic
import Mathlib.RingTheory.Polynomial.Vieta
#align_import topology.algebra.polynomial from "leanprover-community/mathlib"@"565eb991e264d0db702722... | Mathlib/Topology/Algebra/Polynomial.lean | 105 | 120 | theorem tendsto_abv_eval₂_atTop {R S k α : Type*} [Semiring R] [Ring S] [LinearOrderedField k]
(f : R →+* S) (abv : S → k) [IsAbsoluteValue abv] (p : R[X]) (hd : 0 < degree p)
(hf : f p.leadingCoeff ≠ 0) {l : Filter α} {z : α → S} (hz : Tendsto (abv ∘ z) l atTop) :
Tendsto (fun x => abv (p.eval₂ f (z x))) l... |
revert hf; refine degree_pos_induction_on p hd ?_ ?_ ?_ <;> clear hd p
· rintro _ - hc
rw [leadingCoeff_mul_X, leadingCoeff_C] at hc
simpa [abv_mul abv] using hz.const_mul_atTop ((abv_pos abv).2 hc)
· intro _ _ ihp hf
rw [leadingCoeff_mul_X] at hf
simpa [abv_mul abv] using (ihp hf).atTop_mul_atTo... | [
" Tendsto (fun x => abv (eval₂ f (z x) p)) l atTop",
" f p.leadingCoeff ≠ 0 → Tendsto (fun x => abv (eval₂ f (z x) p)) l atTop",
" ∀ {a : R}, a ≠ 0 → f (C a * X).leadingCoeff ≠ 0 → Tendsto (fun x => abv (eval₂ f (z x) (C a * X))) l atTop",
" ∀ {p : R[X]},\n 0 < p.degree →\n (f p.leadingCoeff ≠ 0 → Ten... | [] |
import Mathlib.CategoryTheory.Monoidal.Free.Coherence
import Mathlib.CategoryTheory.Monoidal.Discrete
import Mathlib.CategoryTheory.Monoidal.NaturalTransformation
import Mathlib.CategoryTheory.Monoidal.Opposite
import Mathlib.Tactic.CategoryTheory.Coherence
import Mathlib.CategoryTheory.CommSq
#align_import category_... | Mathlib/CategoryTheory/Monoidal/Braided/Basic.lean | 146 | 153 | theorem yang_baxter (X Y Z : C) :
(α_ X Y Z).inv ≫ (β_ X Y).hom ▷ Z ≫ (α_ Y X Z).hom ≫
Y ◁ (β_ X Z).hom ≫ (α_ Y Z X).inv ≫ (β_ Y Z).hom ▷ X ≫ (α_ Z Y X).hom =
X ◁ (β_ Y Z).hom ≫ (α_ X Z Y).inv ≫ (β_ X Z).hom ▷ Y ≫
(α_ Z X Y).hom ≫ Z ◁ (β_ X Y).hom := by |
rw [← braiding_tensor_right_assoc X Y Z, ← cancel_mono (α_ Z Y X).inv]
repeat rw [assoc]
rw [Iso.hom_inv_id, comp_id, ← braiding_naturality_right, braiding_tensor_right]
| [
" (β_ (X ⊗ Y) Z).hom = (α_ X Y Z).hom ≫ X ◁ (β_ Y Z).hom ≫ (α_ X Z Y).inv ≫ (β_ X Z).hom ▷ Y ≫ (α_ Z X Y).hom",
" (α_ X Y Z).inv ≫ (β_ (X ⊗ Y) Z).hom =\n (α_ X Y Z).inv ≫ (α_ X Y Z).hom ≫ X ◁ (β_ Y Z).hom ≫ (α_ X Z Y).inv ≫ (β_ X Z).hom ▷ Y ≫ (α_ Z X Y).hom",
" ((α_ X Y Z).inv ≫ (β_ (X ⊗ Y) Z).hom) ≫ (α_ Z X... | [
" (β_ (X ⊗ Y) Z).hom = (α_ X Y Z).hom ≫ X ◁ (β_ Y Z).hom ≫ (α_ X Z Y).inv ≫ (β_ X Z).hom ▷ Y ≫ (α_ Z X Y).hom",
" (α_ X Y Z).inv ≫ (β_ (X ⊗ Y) Z).hom =\n (α_ X Y Z).inv ≫ (α_ X Y Z).hom ≫ X ◁ (β_ Y Z).hom ≫ (α_ X Z Y).inv ≫ (β_ X Z).hom ▷ Y ≫ (α_ Z X Y).hom",
" ((α_ X Y Z).inv ≫ (β_ (X ⊗ Y) Z).hom) ≫ (α_ Z X... |
import Mathlib.Algebra.BigOperators.Fin
import Mathlib.Algebra.Polynomial.Degree.Lemmas
#align_import data.polynomial.erase_lead from "leanprover-community/mathlib"@"fa256f00ce018e7b40e1dc756e403c86680bf448"
noncomputable section
open Polynomial
open Polynomial Finset
namespace Polynomial
variable {R : Type*}... | Mathlib/Algebra/Polynomial/EraseLead.lean | 83 | 85 | theorem self_sub_C_mul_X_pow {R : Type*} [Ring R] (f : R[X]) :
f - C f.leadingCoeff * X ^ f.natDegree = f.eraseLead := by |
rw [C_mul_X_pow_eq_monomial, self_sub_monomial_natDegree_leadingCoeff]
| [
" f.eraseLead.support = f.support.erase f.natDegree",
" f.eraseLead.coeff i = if i = f.natDegree then 0 else f.coeff i",
" f.eraseLead.coeff f.natDegree = 0",
" f.eraseLead.coeff i = f.coeff i",
" eraseLead 0 = 0",
" f.eraseLead + C f.leadingCoeff * X ^ f.natDegree = f",
" f - C f.leadingCoeff * X ^ f.n... | [
" f.eraseLead.support = f.support.erase f.natDegree",
" f.eraseLead.coeff i = if i = f.natDegree then 0 else f.coeff i",
" f.eraseLead.coeff f.natDegree = 0",
" f.eraseLead.coeff i = f.coeff i",
" eraseLead 0 = 0",
" f.eraseLead + C f.leadingCoeff * X ^ f.natDegree = f"
] |
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 | 86 | 89 | theorem continuous_extendFrom [RegularSpace Y] {f : X → Y} {A : Set X} (hA : Dense A)
(hf : ∀ x, ∃ y, Tendsto f (𝓝[A] x) (𝓝 y)) : Continuous (extendFrom A f) := by |
rw [continuous_iff_continuousOn_univ]
exact continuousOn_extendFrom (fun x _ ↦ hA x) (by simpa using 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",
" Continuous (extendFrom A f)",
... | [
" 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.Algebra.Group.Invertible.Basic
import Mathlib.Algebra.GroupWithZero.Units.Basic
#align_import algebra.invertible from "leanprover-community/mathlib"@"722b3b152ddd5e0cf21c0a29787c76596cb6b422"
assert_not_exists DenselyOrdered
universe u
variable {α : Type u}
| Mathlib/Algebra/GroupWithZero/Invertible.lean | 23 | 28 | theorem nonzero_of_invertible [MulZeroOneClass α] (a : α) [Nontrivial α] [Invertible a] : a ≠ 0 :=
fun ha =>
zero_ne_one <|
calc
0 = ⅟ a * a := by | simp [ha]
_ = 1 := invOf_mul_self a
| [
" 0 = ⅟a * a"
] | [] |
import Mathlib.MeasureTheory.Measure.Restrict
open scoped ENNReal NNReal Topology
open Set MeasureTheory Measure Filter Function MeasurableSpace ENNReal
variable {α β δ ι : Type*}
namespace MeasureTheory
variable {m0 : MeasurableSpace α} [MeasurableSpace β] {μ ν ν₁ ν₂: Measure α}
{s t : Set α}
section IsFinit... | Mathlib/MeasureTheory/Measure/Typeclasses.lean | 65 | 72 | theorem measure_compl_le_add_of_le_add [IsFiniteMeasure μ] (hs : MeasurableSet s)
(ht : MeasurableSet t) {ε : ℝ≥0∞} (h : μ s ≤ μ t + ε) : μ tᶜ ≤ μ sᶜ + ε := by |
rw [measure_compl ht (measure_ne_top μ _), measure_compl hs (measure_ne_top μ _),
tsub_le_iff_right]
calc
μ univ = μ univ - μ s + μ s := (tsub_add_cancel_of_le <| measure_mono s.subset_univ).symm
_ ≤ μ univ - μ s + (μ t + ε) := add_le_add_left h _
_ = _ := by rw [add_right_comm, add_assoc]
| [
" ¬IsFiniteMeasure μ ↔ μ univ = ⊤",
" μ univ = ⊤",
" False",
" (μ.restrict s) univ < ⊤",
" μ tᶜ ≤ μ sᶜ + ε",
" μ univ ≤ μ univ - μ s + ε + μ t",
" μ univ - μ s + (μ t + ε) = μ univ - μ s + ε + μ t"
] | [
" ¬IsFiniteMeasure μ ↔ μ univ = ⊤",
" μ univ = ⊤",
" False",
" (μ.restrict s) univ < ⊤"
] |
import Mathlib.Algebra.Associated
import Mathlib.Algebra.GeomSum
import Mathlib.Algebra.GroupWithZero.NonZeroDivisors
import Mathlib.Algebra.Module.Defs
import Mathlib.Algebra.SMulWithZero
import Mathlib.Data.Nat.Choose.Sum
import Mathlib.Data.Nat.Lattice
import Mathlib.RingTheory.Nilpotent.Defs
#align_import ring_th... | Mathlib/RingTheory/Nilpotent/Basic.lean | 100 | 102 | theorem isReduced_iff_pow_one_lt [MonoidWithZero R] (k : ℕ) (hk : 1 < k) :
IsReduced R ↔ ∀ x : R, x ^ k = 0 → x = 0 := by |
simp_rw [← zero_isRadical_iff, isRadical_iff_pow_one_lt k hk, zero_dvd_iff]
| [
" IsNilpotent (-x)",
" (-x) ^ n = 0",
" IsNilpotent (t • a)",
" (t • a) ^ k = 0",
" IsUnit (r - 1)",
" (r - 1) * -∑ i ∈ Finset.range n, r ^ i = 1",
" (-∑ i ∈ Finset.range n, r ^ i) * (r - 1) = 1",
" IsUnit (1 - r)",
" IsUnit (r + 1)",
" IsUnit (-r - 1)",
" IsUnit (u + r)",
" IsUnit (1 + r * ↑h... | [
" IsNilpotent (-x)",
" (-x) ^ n = 0",
" IsNilpotent (t • a)",
" (t • a) ^ k = 0",
" IsUnit (r - 1)",
" (r - 1) * -∑ i ∈ Finset.range n, r ^ i = 1",
" (-∑ i ∈ Finset.range n, r ^ i) * (r - 1) = 1",
" IsUnit (1 - r)",
" IsUnit (r + 1)",
" IsUnit (-r - 1)",
" IsUnit (u + r)",
" IsUnit (1 + r * ↑h... |
import Mathlib.Algebra.Module.Torsion
import Mathlib.RingTheory.DedekindDomain.Ideal
#align_import algebra.module.dedekind_domain from "leanprover-community/mathlib"@"cdc34484a07418af43daf8198beaf5c00324bca8"
universe u v
variable {R : Type u} [CommRing R] [IsDomain R] {M : Type v} [AddCommGroup M] [Module R M]
... | Mathlib/Algebra/Module/DedekindDomain.lean | 37 | 59 | theorem isInternal_prime_power_torsion_of_is_torsion_by_ideal {I : Ideal R} (hI : I ≠ ⊥)
(hM : Module.IsTorsionBySet R M I) :
DirectSum.IsInternal fun p : (factors I).toFinset =>
torsionBySet R M (p ^ (factors I).count ↑p : Ideal R) := by |
let P := factors I
have prime_of_mem := fun p (hp : p ∈ P.toFinset) =>
prime_of_factor p (Multiset.mem_toFinset.mp hp)
apply torsionBySet_isInternal (p := fun p => p ^ P.count p) _
· convert hM
rw [← Finset.inf_eq_iInf, IsDedekindDomain.inf_prime_pow_eq_prod, ← Finset.prod_multiset_count,
← assoc... | [
" DirectSum.IsInternal fun p => torsionBySet R M ↑(↑p ^ Multiset.count (↑p) (factors I))",
" Module.IsTorsionBySet R M ↑(⨅ i ∈ (factors I).toFinset, i ^ Multiset.count i P)",
" ⨅ i ∈ (factors I).toFinset, i ^ Multiset.count i P = I",
" Associated (factors I).prod I",
" ∀ i ∈ (factors I).toFinset, Prime i",
... | [] |
import Mathlib.Algebra.IsPrimePow
import Mathlib.NumberTheory.ArithmeticFunction
import Mathlib.Analysis.SpecialFunctions.Log.Basic
#align_import number_theory.von_mangoldt from "leanprover-community/mathlib"@"c946d6097a6925ad16d7ec55677bbc977f9846de"
namespace ArithmeticFunction
open Finset Nat
open scoped Arit... | Mathlib/NumberTheory/VonMangoldt.lean | 135 | 136 | theorem log_mul_moebius_eq_vonMangoldt : log * μ = Λ := by |
rw [← vonMangoldt_mul_zeta, mul_assoc, coe_zeta_mul_coe_moebius, mul_one]
| [
" (fun n => (↑n).log) 0 = 0",
" Λ 1 = 0",
" 0 ≤ Λ n",
" 0 ≤ if IsPrimePow n then (↑n.minFac).log else 0",
" 0 ≤ (↑n.minFac).log",
" 0 ≤ 0",
" Λ (n ^ k) = Λ n",
" Λ p = (↑p).log",
" Λ n ≠ 0 ↔ IsPrimePow n",
" Λ 1 ≠ 0 ↔ IsPrimePow 1",
" ∑ i ∈ n.divisors, Λ i = (↑n).log",
" ∑ i ∈ divisors 0, Λ i ... | [
" (fun n => (↑n).log) 0 = 0",
" Λ 1 = 0",
" 0 ≤ Λ n",
" 0 ≤ if IsPrimePow n then (↑n.minFac).log else 0",
" 0 ≤ (↑n.minFac).log",
" 0 ≤ 0",
" Λ (n ^ k) = Λ n",
" Λ p = (↑p).log",
" Λ n ≠ 0 ↔ IsPrimePow n",
" Λ 1 ≠ 0 ↔ IsPrimePow 1",
" ∑ i ∈ n.divisors, Λ i = (↑n).log",
" ∑ i ∈ divisors 0, Λ i ... |
import Mathlib.LinearAlgebra.Basis.VectorSpace
import Mathlib.LinearAlgebra.Dimension.Constructions
import Mathlib.LinearAlgebra.Dimension.Finite
#align_import field_theory.finiteness from "leanprover-community/mathlib"@"039a089d2a4b93c761b234f3e5f5aeb752bac60f"
universe u v
open scoped Classical
open Cardinal
... | Mathlib/FieldTheory/Finiteness.lean | 32 | 43 | theorem iff_rank_lt_aleph0 : IsNoetherian K V ↔ Module.rank K V < ℵ₀ := by |
let b := Basis.ofVectorSpace K V
rw [← b.mk_eq_rank'', lt_aleph0_iff_set_finite]
constructor
· intro
exact (Basis.ofVectorSpaceIndex.linearIndependent K V).set_finite_of_isNoetherian
· intro hbfinite
refine
@isNoetherian_of_linearEquiv K (⊤ : Submodule K V) V _ _ _ _ _ (LinearEquiv.ofTop _ rfl)... | [
" IsNoetherian K V ↔ Module.rank K V < ℵ₀",
" IsNoetherian K V ↔ (Basis.ofVectorSpaceIndex K V).Finite",
" IsNoetherian K V → (Basis.ofVectorSpaceIndex K V).Finite",
" (Basis.ofVectorSpaceIndex K V).Finite",
" (Basis.ofVectorSpaceIndex K V).Finite → IsNoetherian K V",
" IsNoetherian K V",
" IsNoetherian... | [] |
import Mathlib.NumberTheory.DirichletCharacter.Bounds
import Mathlib.NumberTheory.EulerProduct.Basic
import Mathlib.NumberTheory.LSeries.Basic
import Mathlib.NumberTheory.LSeries.RiemannZeta
open Complex
variable {s : ℂ}
noncomputable
def riemannZetaSummandHom (hs : s ≠ 0) : ℕ →*₀ ℂ where
toFun n := (n : ℂ) ^ ... | Mathlib/NumberTheory/EulerProduct/DirichletLSeries.lean | 114 | 118 | theorem dirichletLSeries_eulerProduct_hasProd {N : ℕ} (χ : DirichletCharacter ℂ N)
(hs : 1 < s.re) :
HasProd (fun p : Primes ↦ (1 - χ p * (p : ℂ) ^ (-s))⁻¹) (L ↗χ s) := by |
rw [← tsum_dirichletSummand χ hs]
convert eulerProduct_completely_multiplicative_hasProd <| summable_dirichletSummand χ hs
| [
" (fun n => ↑n ^ (-s)) 0 = 0",
" { toFun := fun n => ↑n ^ (-s), map_zero' := ⋯ }.toFun 1 = 1",
" { toFun := fun n => ↑n ^ (-s), map_zero' := ⋯ }.toFun (m * n) =\n { toFun := fun n => ↑n ^ (-s), map_zero' := ⋯ }.toFun m * { toFun := fun n => ↑n ^ (-s), map_zero' := ⋯ }.toFun n",
" (fun n_1 => χ ↑n_1 * ↑n_1 ... | [
" (fun n => ↑n ^ (-s)) 0 = 0",
" { toFun := fun n => ↑n ^ (-s), map_zero' := ⋯ }.toFun 1 = 1",
" { toFun := fun n => ↑n ^ (-s), map_zero' := ⋯ }.toFun (m * n) =\n { toFun := fun n => ↑n ^ (-s), map_zero' := ⋯ }.toFun m * { toFun := fun n => ↑n ^ (-s), map_zero' := ⋯ }.toFun n",
" (fun n_1 => χ ↑n_1 * ↑n_1 ... |
import Mathlib.Algebra.Field.ULift
import Mathlib.Algebra.MvPolynomial.Cardinal
import Mathlib.Data.Nat.Factorization.PrimePow
import Mathlib.Data.Rat.Denumerable
import Mathlib.FieldTheory.Finite.GaloisField
import Mathlib.Logic.Equiv.TransferInstance
import Mathlib.RingTheory.Localization.Cardinality
import Mathlib.... | Mathlib/FieldTheory/Cardinality.lean | 40 | 49 | theorem Fintype.isPrimePow_card_of_field {α} [Fintype α] [Field α] : IsPrimePow ‖α‖ := by |
-- TODO: `Algebra` version of `CharP.exists`, of type `∀ p, Algebra (ZMod p) α`
cases' CharP.exists α with p _
haveI hp := Fact.mk (CharP.char_is_prime α p)
letI : Algebra (ZMod p) α := ZMod.algebra _ _
let b := IsNoetherian.finsetBasis (ZMod p) α
rw [Module.card_fintype b, ZMod.card, isPrimePow_pow_iff]
... | [
" IsPrimePow ‖α‖",
" IsPrimePow p",
" ‖{ x // x ∈ IsNoetherian.finsetBasisIndex (ZMod p) α }‖ ≠ 0",
" FiniteDimensional.finrank (ZMod p) α ≠ 0"
] | [] |
import Mathlib.Algebra.MvPolynomial.Expand
import Mathlib.FieldTheory.Finite.Basic
import Mathlib.RingTheory.MvPolynomial.Basic
#align_import field_theory.finite.polynomial from "leanprover-community/mathlib"@"5aa3c1de9f3c642eac76e11071c852766f220fd0"
namespace MvPolynomial
variable {σ : Type*}
theorem C_dvd_i... | Mathlib/FieldTheory/Finite/Polynomial.lean | 33 | 38 | theorem frobenius_zmod (f : MvPolynomial σ (ZMod p)) : frobenius _ p f = expand p f := by |
apply induction_on f
· intro a; rw [expand_C, frobenius_def, ← C_pow, ZMod.pow_card]
· simp only [AlgHom.map_add, RingHom.map_add]; intro _ _ hf hg; rw [hf, hg]
· simp only [expand_X, RingHom.map_mul, AlgHom.map_mul]
intro _ _ hf; rw [hf, frobenius_def]
| [
" (frobenius (MvPolynomial σ (ZMod p)) p) f = (expand p) f",
" ∀ (a : ZMod p), (frobenius (MvPolynomial σ (ZMod p)) p) (C a) = (expand p) (C a)",
" (frobenius (MvPolynomial σ (ZMod p)) p) (C a) = (expand p) (C a)",
" ∀ (p_1 q : MvPolynomial σ (ZMod p)),\n (frobenius (MvPolynomial σ (ZMod p)) p) p_1 = (expa... | [] |
import Mathlib.AlgebraicTopology.SimplexCategory
import Mathlib.CategoryTheory.Comma.Arrow
import Mathlib.CategoryTheory.Limits.FunctorCategory
import Mathlib.CategoryTheory.Opposites
#align_import algebraic_topology.simplicial_object from "leanprover-community/mathlib"@"5ed51dc37c6b891b79314ee11a50adc2b1df6fd6"
o... | Mathlib/AlgebraicTopology/SimplicialObject.lean | 107 | 110 | theorem δ_comp_δ {n} {i j : Fin (n + 2)} (H : i ≤ j) :
X.δ j.succ ≫ X.δ i = X.δ (Fin.castSucc i) ≫ X.δ j := by |
dsimp [δ]
simp only [← X.map_comp, ← op_comp, SimplexCategory.δ_comp_δ H]
| [
" Category.{?u.61, max u v} (SimplicialObject C)",
" Category.{?u.61, max u v} (SimplexCategoryᵒᵖ ⥤ C)",
" HasLimitsOfShape J (SimplicialObject C)",
" HasLimitsOfShape J (SimplexCategoryᵒᵖ ⥤ C)",
" HasColimitsOfShape J (SimplicialObject C)",
" HasColimitsOfShape J (SimplexCategoryᵒᵖ ⥤ C)",
" f.app = g.a... | [
" Category.{?u.61, max u v} (SimplicialObject C)",
" Category.{?u.61, max u v} (SimplexCategoryᵒᵖ ⥤ C)",
" HasLimitsOfShape J (SimplicialObject C)",
" HasLimitsOfShape J (SimplexCategoryᵒᵖ ⥤ C)",
" HasColimitsOfShape J (SimplicialObject C)",
" HasColimitsOfShape J (SimplexCategoryᵒᵖ ⥤ C)",
" f.app = g.a... |
import Mathlib.Algebra.Order.Ring.Nat
import Mathlib.Data.List.Chain
#align_import data.bool.count from "leanprover-community/mathlib"@"8631e2d5ea77f6c13054d9151d82b83069680cb1"
namespace List
@[simp]
theorem count_not_add_count (l : List Bool) (b : Bool) : count (!b) l + count b l = length l := by
-- Porting ... | Mathlib/Data/Bool/Count.lean | 33 | 34 | theorem count_add_count_not (l : List Bool) (b : Bool) : count b l + count (!b) l = length l := by |
rw [add_comm, count_not_add_count]
| [
" count (!b) l + count b l = l.length",
" countP (fun x => x == b) l = countP (fun a => decide ¬(a == !b) = true) l",
" (fun x => x == b) = fun a => decide ¬(a == !b) = true",
" (x == b) = decide ¬(x == !b) = true",
" (false == b) = decide ¬(false == !b) = true",
" (true == b) = decide ¬(true == !b) = tru... | [
" count (!b) l + count b l = l.length",
" countP (fun x => x == b) l = countP (fun a => decide ¬(a == !b) = true) l",
" (fun x => x == b) = fun a => decide ¬(a == !b) = true",
" (x == b) = decide ¬(x == !b) = true",
" (false == b) = decide ¬(false == !b) = true",
" (true == b) = decide ¬(true == !b) = tru... |
import Mathlib.Algebra.CharZero.Defs
import Mathlib.Algebra.Group.Hom.Defs
import Mathlib.Algebra.Order.Monoid.Canonical.Defs
import Mathlib.Algebra.Order.Monoid.OrderDual
import Mathlib.Algebra.Order.ZeroLEOne
import Mathlib.Data.Nat.Cast.Defs
import Mathlib.Order.WithBot
#align_import algebra.order.monoid.with_top ... | Mathlib/Algebra/Order/Monoid/WithTop.lean | 132 | 136 | theorem add_eq_top : a + b = ⊤ ↔ a = ⊤ ∨ b = ⊤ := by |
match a, b with
| ⊤, _ => simp
| _, ⊤ => simp
| (a : α), (b : α) => simp only [← coe_add, coe_ne_top, or_false]
| [
" a + ⊤ = ⊤",
" ⊤ + ⊤ = ⊤",
" ↑a✝ + ⊤ = ⊤",
" a + b = ⊤ ↔ a = ⊤ ∨ b = ⊤",
" ⊤ + x✝ = ⊤ ↔ ⊤ = ⊤ ∨ x✝ = ⊤",
" x✝ + ⊤ = ⊤ ↔ x✝ = ⊤ ∨ ⊤ = ⊤",
" ↑a + ↑b = ⊤ ↔ ↑a = ⊤ ∨ ↑b = ⊤"
] | [
" a + ⊤ = ⊤",
" ⊤ + ⊤ = ⊤",
" ↑a✝ + ⊤ = ⊤"
] |
import Mathlib.Algebra.Order.Ring.Defs
import Mathlib.Algebra.Group.Int
import Mathlib.Data.Nat.Dist
import Mathlib.Data.Ordmap.Ordnode
import Mathlib.Tactic.Abel
import Mathlib.Tactic.Linarith
#align_import data.ordmap.ordset from "leanprover-community/mathlib"@"47b51515e69f59bca5cf34ef456e6000fe205a69"
variable... | Mathlib/Data/Ordmap/Ordset.lean | 140 | 141 | theorem Sized.size_eq_zero {t : Ordnode α} (ht : Sized t) : size t = 0 ↔ t = nil := by |
cases t <;> [simp;simp [ht.1]]
| [
" 0 < delta",
" a ≤ delta * (delta * a)",
" 1 ≤ delta * delta",
" node s l x r = l.node' x r",
" C t",
" C nil",
" C (node size✝ l✝ x✝ r✝)",
" C (l✝.node' x✝ r✝)",
" (node s l x r).size = (node s l x r).realSize",
" (match node (l.realSize + r.realSize + 1) l x r with\n | nil => 0\n | node s... | [
" 0 < delta",
" a ≤ delta * (delta * a)",
" 1 ≤ delta * delta",
" node s l x r = l.node' x r",
" C t",
" C nil",
" C (node size✝ l✝ x✝ r✝)",
" C (l✝.node' x✝ r✝)",
" (node s l x r).size = (node s l x r).realSize",
" (match node (l.realSize + r.realSize + 1) l x r with\n | nil => 0\n | node s... |
import Mathlib.Analysis.InnerProductSpace.Orthogonal
import Mathlib.Analysis.Normed.Group.AddTorsor
#align_import geometry.euclidean.basic from "leanprover-community/mathlib"@"2de9c37fa71dde2f1c6feff19876dd6a7b1519f0"
open Set
open scoped RealInnerProductSpace
variable {V P : Type*} [NormedAddCommGroup V] [InnerP... | Mathlib/Geometry/Euclidean/PerpBisector.lean | 100 | 101 | theorem perpBisector_comm (p₁ p₂ : P) : perpBisector p₁ p₂ = perpBisector p₂ p₁ := by |
ext c; simp only [mem_perpBisector_iff_dist_eq, eq_comm]
| [
" c ∈ perpBisector p₁ p₂ ↔ ⟪(Equiv.pointReflection c) p₁ -ᵥ p₂, p₂ -ᵥ p₁⟫_ℝ = 0",
" 2⁻¹ * ⟪c -ᵥ p₁ + (c -ᵥ p₂), p₂ -ᵥ p₁⟫_ℝ = 0 ↔ ⟪c -ᵥ p₁ + (c -ᵥ p₂), p₂ -ᵥ p₁⟫_ℝ = 0",
" c ∈ perpBisector p₁ ((Equiv.pointReflection p₂) p₁) ↔ ⟪c -ᵥ p₂, p₁ -ᵥ p₂⟫_ℝ = 0",
" midpoint ℝ p₁ p₂ ∈ perpBisector p₁ p₂",
" (perpBisec... | [
" c ∈ perpBisector p₁ p₂ ↔ ⟪(Equiv.pointReflection c) p₁ -ᵥ p₂, p₂ -ᵥ p₁⟫_ℝ = 0",
" 2⁻¹ * ⟪c -ᵥ p₁ + (c -ᵥ p₂), p₂ -ᵥ p₁⟫_ℝ = 0 ↔ ⟪c -ᵥ p₁ + (c -ᵥ p₂), p₂ -ᵥ p₁⟫_ℝ = 0",
" c ∈ perpBisector p₁ ((Equiv.pointReflection p₂) p₁) ↔ ⟪c -ᵥ p₂, p₁ -ᵥ p₂⟫_ℝ = 0",
" midpoint ℝ p₁ p₂ ∈ perpBisector p₁ p₂",
" (perpBisec... |
import Mathlib.Analysis.SpecialFunctions.Pow.Real
import Mathlib.Data.Int.Log
#align_import analysis.special_functions.log.base from "leanprover-community/mathlib"@"f23a09ce6d3f367220dc3cecad6b7eb69eb01690"
open Set Filter Function
open Topology
noncomputable section
namespace Real
variable {b x y : ℝ}
-- @... | Mathlib/Analysis/SpecialFunctions/Log/Base.lean | 84 | 84 | theorem inv_logb (a b : ℝ) : (logb a b)⁻¹ = logb b a := by | simp_rw [logb, inv_div]
| [
" b.logb 0 = 0",
" b.logb 1 = 0",
" False",
" b.logb |x| = b.logb x",
" b.logb (-x) = b.logb x",
" b.logb (x * y) = b.logb x + b.logb y",
" b.logb (x / y) = b.logb x - b.logb y",
" b.logb x⁻¹ = -b.logb x",
" (a.logb b)⁻¹ = b.logb a"
] | [
" b.logb 0 = 0",
" b.logb 1 = 0",
" False",
" b.logb |x| = b.logb x",
" b.logb (-x) = b.logb x",
" b.logb (x * y) = b.logb x + b.logb y",
" b.logb (x / y) = b.logb x - b.logb y",
" b.logb x⁻¹ = -b.logb x"
] |
import Mathlib.AlgebraicTopology.DoldKan.Homotopies
import Mathlib.Tactic.Ring
#align_import algebraic_topology.dold_kan.faces from "leanprover-community/mathlib"@"32a7e535287f9c73f2e4d2aef306a39190f0b504"
open CategoryTheory CategoryTheory.Limits CategoryTheory.Category
CategoryTheory.Preadditive CategoryTheor... | Mathlib/AlgebraicTopology/DoldKan/Faces.lean | 53 | 58 | theorem comp_δ_eq_zero {Y : C} {n : ℕ} {q : ℕ} {φ : Y ⟶ X _[n + 1]} (v : HigherFacesVanish q φ)
(j : Fin (n + 2)) (hj₁ : j ≠ 0) (hj₂ : n + 2 ≤ (j : ℕ) + q) : φ ≫ X.δ j = 0 := by |
obtain ⟨i, rfl⟩ := Fin.eq_succ_of_ne_zero hj₁
apply v i
simp only [Fin.val_succ] at hj₂
omega
| [
" φ ≫ X.δ j = 0",
" φ ≫ X.δ i.succ = 0",
" n + 1 ≤ ↑i + q"
] | [] |
import Mathlib.FieldTheory.Finite.Polynomial
import Mathlib.NumberTheory.Basic
import Mathlib.RingTheory.WittVector.WittPolynomial
#align_import ring_theory.witt_vector.structure_polynomial from "leanprover-community/mathlib"@"70fd9563a21e7b963887c9360bd29b2393e6225a"
open MvPolynomial Set
open Finset (range)
o... | Mathlib/RingTheory/WittVector/StructurePolynomial.lean | 151 | 161 | theorem wittStructureRat_existsUnique (Φ : MvPolynomial idx ℚ) :
∃! φ : ℕ → MvPolynomial (idx × ℕ) ℚ,
∀ n : ℕ, bind₁ φ (W_ ℚ n) = bind₁ (fun i => rename (Prod.mk i) (W_ ℚ n)) Φ := by |
refine ⟨wittStructureRat p Φ, ?_, ?_⟩
· intro n; apply wittStructureRat_prop
· intro φ H
funext n
rw [show φ n = bind₁ φ (bind₁ (W_ ℚ) (xInTermsOfW p ℚ n)) by
rw [bind₁_wittPolynomial_xInTermsOfW p, bind₁_X_right]]
rw [bind₁_bind₁]
exact eval₂Hom_congr (RingHom.ext_rat _ _) (funext H) rfl... | [
" (bind₁ (wittStructureRat p Φ)) (W_ ℚ n) =\n (bind₁ fun k => (bind₁ fun i => (rename (Prod.mk i)) (W_ ℚ k)) Φ) ((bind₁ (xInTermsOfW p ℚ)) (W_ ℚ n))",
" (bind₁ (wittStructureRat p Φ)) (W_ ℚ n) =\n (bind₁ fun i => (bind₁ fun k => (bind₁ fun i => (rename (Prod.mk i)) (W_ ℚ k)) Φ) (xInTermsOfW p ℚ i)) (W_ ℚ n)... | [
" (bind₁ (wittStructureRat p Φ)) (W_ ℚ n) =\n (bind₁ fun k => (bind₁ fun i => (rename (Prod.mk i)) (W_ ℚ k)) Φ) ((bind₁ (xInTermsOfW p ℚ)) (W_ ℚ n))",
" (bind₁ (wittStructureRat p Φ)) (W_ ℚ n) =\n (bind₁ fun i => (bind₁ fun k => (bind₁ fun i => (rename (Prod.mk i)) (W_ ℚ k)) Φ) (xInTermsOfW p ℚ i)) (W_ ℚ n)... |
import Mathlib.Topology.Order.LeftRight
import Mathlib.Topology.Order.Monotone
#align_import topology.algebra.order.left_right_lim from "leanprover-community/mathlib"@"0a0ec35061ed9960bf0e7ffb0335f44447b58977"
open Set Filter
open Topology
section
variable {α β : Type*} [LinearOrder α] [TopologicalSpace β]
n... | Mathlib/Topology/Order/LeftRightLim.lean | 125 | 136 | theorem le_leftLim (h : x < y) : f x ≤ leftLim f y := by |
letI : TopologicalSpace α := Preorder.topology α
haveI : OrderTopology α := ⟨rfl⟩
rcases eq_or_ne (𝓝[<] y) ⊥ with (h' | h')
· rw [leftLim_eq_of_eq_bot _ h']
exact hf h.le
rw [leftLim_eq_sSup hf h']
refine le_csSup ⟨f y, ?_⟩ (mem_image_of_mem _ h)
simp only [upperBounds, mem_image, mem_Iio, forall_ex... | [
" β",
" leftLim f a = y",
" limUnder (𝓝[<] a) f = y",
" leftLim f a = f a",
" leftLim f x ≤ f y",
" sSup (f '' Iio x) ≤ f y",
" (f '' Iio x).Nonempty",
" (Iio x).Nonempty",
" ∀ b ∈ f '' Iio x, b ≤ f y",
" ∀ a < x, f a ≤ f y",
" f z ≤ f y",
" f x ≤ leftLim f y",
" f x ≤ f y",
" f x ≤ sSup ... | [
" β",
" leftLim f a = y",
" limUnder (𝓝[<] a) f = y",
" leftLim f a = f a",
" leftLim f x ≤ f y",
" sSup (f '' Iio x) ≤ f y",
" (f '' Iio x).Nonempty",
" (Iio x).Nonempty",
" ∀ b ∈ f '' Iio x, b ≤ f y",
" ∀ a < x, f a ≤ f y",
" f z ≤ f y"
] |
import Mathlib.MeasureTheory.Measure.Restrict
open scoped ENNReal NNReal Topology
open Set MeasureTheory Measure Filter Function MeasurableSpace ENNReal
variable {α β δ ι : Type*}
namespace MeasureTheory
variable {m0 : MeasurableSpace α} [MeasurableSpace β] {μ ν ν₁ ν₂: Measure α}
{s t : Set α}
| Mathlib/MeasureTheory/Measure/Typeclasses.lean | 491 | 498 | theorem ite_ae_eq_of_measure_zero {γ} (f : α → γ) (g : α → γ) (s : Set α) [DecidablePred (· ∈ s)]
(hs_zero : μ s = 0) :
(fun x => ite (x ∈ s) (f x) (g x)) =ᵐ[μ] g := by |
have h_ss : sᶜ ⊆ { a : α | ite (a ∈ s) (f a) (g a) = g a } := fun x hx => by
simp [(Set.mem_compl_iff _ _).mp hx]
refine measure_mono_null ?_ hs_zero
conv_rhs => rw [← compl_compl s]
rwa [Set.compl_subset_compl]
| [
" (fun x => if x ∈ s then f x else g x) =ᶠ[ae μ] g",
" x ∈ {a | (if a ∈ s then f a else g a) = g a}",
" {x | (fun x => (fun x => if x ∈ s then f x else g x) x = g x) x}ᶜ ⊆ s",
"α : Type u_1\nβ : Type u_2\nδ : Type u_3\nι : Type u_4\nm0 : MeasurableSpace α\ninst✝¹ : MeasurableSpace β\nμ ν ν₁ ν₂ : Measure α\ns✝... | [] |
import Mathlib.Topology.Algebra.InfiniteSum.Basic
import Mathlib.Topology.Algebra.UniformGroup
noncomputable section
open Filter Finset Function
open scoped Topology
variable {α β γ δ : Type*}
section TopologicalGroup
variable [CommGroup α] [TopologicalSpace α] [TopologicalGroup α]
variable {f g : β → α} {a a₁... | Mathlib/Topology/Algebra/InfiniteSum/Group.lean | 50 | 53 | theorem HasProd.div (hf : HasProd f a₁) (hg : HasProd g a₂) :
HasProd (fun b ↦ f b / g b) (a₁ / a₂) := by |
simp only [div_eq_mul_inv]
exact hf.mul hg.inv
| [
" HasProd (fun b => (f b)⁻¹) a⁻¹",
" Multipliable f",
" HasProd (fun b => f b / g b) (a₁ / a₂)",
" HasProd (fun b => f b * (g b)⁻¹) (a₁ * a₂⁻¹)"
] | [
" HasProd (fun b => (f b)⁻¹) a⁻¹",
" Multipliable f"
] |
import Mathlib.Algebra.Order.Group.Nat
import Mathlib.Data.List.Rotate
import Mathlib.GroupTheory.Perm.Support
#align_import group_theory.perm.list from "leanprover-community/mathlib"@"9003f28797c0664a49e4179487267c494477d853"
namespace List
variable {α β : Type*}
section FormPerm
variable [DecidableEq α] (l :... | Mathlib/GroupTheory/Perm/List.lean | 131 | 133 | theorem mem_of_formPerm_apply_mem (h : l.formPerm x ∈ l) : x ∈ l := by |
contrapose h
rwa [formPerm_apply_of_not_mem h]
| [
" (zipWith swap [] x✝¹).prod x✝ ≠ x✝ → x✝ ∈ [] ∨ x✝ ∈ x✝¹",
" (zipWith swap x✝¹ []).prod x✝ ≠ x✝ → x✝ ∈ x✝¹ ∨ x✝ ∈ []",
" (swap (?m.1920 a l b l' x hx h) (?m.1921 a l b l' x hx h)) (?m.1919 a l b l' x hx h) ≠ ?m.1919 a l b l' x hx h",
" x = a → x ∈ a :: l",
" x ∈ x :: l",
" x = b → x ∈ b :: l'",
" x ∈ x... | [
" (zipWith swap [] x✝¹).prod x✝ ≠ x✝ → x✝ ∈ [] ∨ x✝ ∈ x✝¹",
" (zipWith swap x✝¹ []).prod x✝ ≠ x✝ → x✝ ∈ x✝¹ ∨ x✝ ∈ []",
" (swap (?m.1920 a l b l' x hx h) (?m.1921 a l b l' x hx h)) (?m.1919 a l b l' x hx h) ≠ ?m.1919 a l b l' x hx h",
" x = a → x ∈ a :: l",
" x ∈ x :: l",
" x = b → x ∈ b :: l'",
" x ∈ x... |
import Mathlib.Analysis.InnerProductSpace.Adjoint
import Mathlib.Analysis.Matrix
import Mathlib.Analysis.RCLike.Basic
import Mathlib.LinearAlgebra.UnitaryGroup
import Mathlib.Topology.UniformSpace.Matrix
#align_import analysis.normed_space.star.matrix from "leanprover-community/mathlib"@"468b141b14016d54b479eb7a0fff1... | Mathlib/Analysis/NormedSpace/Star/Matrix.lean | 83 | 90 | theorem entrywise_sup_norm_bound_of_unitary {U : Matrix n n 𝕜} (hU : U ∈ Matrix.unitaryGroup n 𝕜) :
‖U‖ ≤ 1 := by |
conv => -- Porting note: was `simp_rw [pi_norm_le_iff_of_nonneg zero_le_one]`
rw [pi_norm_le_iff_of_nonneg zero_le_one]
intro
rw [pi_norm_le_iff_of_nonneg zero_le_one]
intros
exact entry_norm_bound_of_unitary hU _ _
| [
" ‖U i j‖ ≤ 1",
" ‖U i j‖ ^ 2 ≤ ∑ x : n, ‖U i x‖ ^ 2",
" ∀ x ∈ Multiset.map (fun x => ‖U i x‖ ^ 2) Finset.univ.val, 0 ≤ x",
" 0 ≤ x",
" 0 ≤ ‖U i a‖ ^ 2",
" ‖U i j‖ ^ 2 ∈ Multiset.map (fun x => ‖U i x‖ ^ 2) Finset.univ.val",
" ∃ a ∈ Finset.univ.val, ‖U i a‖ ^ 2 = ‖U i j‖ ^ 2",
" j ∈ Finset.univ.val ∧ ‖... | [
" ‖U i j‖ ≤ 1",
" ‖U i j‖ ^ 2 ≤ ∑ x : n, ‖U i x‖ ^ 2",
" ∀ x ∈ Multiset.map (fun x => ‖U i x‖ ^ 2) Finset.univ.val, 0 ≤ x",
" 0 ≤ x",
" 0 ≤ ‖U i a‖ ^ 2",
" ‖U i j‖ ^ 2 ∈ Multiset.map (fun x => ‖U i x‖ ^ 2) Finset.univ.val",
" ∃ a ∈ Finset.univ.val, ‖U i a‖ ^ 2 = ‖U i j‖ ^ 2",
" j ∈ Finset.univ.val ∧ ‖... |
import Mathlib.FieldTheory.Finite.Basic
import Mathlib.Order.Filter.Cofinite
#align_import number_theory.fermat_psp from "leanprover-community/mathlib"@"c0439b4877c24a117bfdd9e32faf62eee9b115eb"
namespace Nat
def ProbablePrime (n b : ℕ) : Prop :=
n ∣ b ^ (n - 1) - 1
#align fermat_psp.probable_prime Nat.Probabl... | Mathlib/NumberTheory/FermatPsp.lean | 75 | 99 | theorem coprime_of_probablePrime {n b : ℕ} (h : ProbablePrime n b) (h₁ : 1 ≤ n) (h₂ : 1 ≤ b) :
Nat.Coprime n b := by |
by_cases h₃ : 2 ≤ n
· -- To prove that `n` is coprime with `b`, we need to show that for all prime factors of `n`,
-- we can derive a contradiction if `n` divides `b`.
apply Nat.coprime_of_dvd
-- If `k` is a prime number that divides both `n` and `b`, then we know that `n = m * k` and
-- `b = j * k... | [
" n.Coprime b",
" ∀ (k : ℕ), k.Prime → k ∣ n → ¬k ∣ b",
" False",
" k ∣ 1",
" k ∣ (k * j) ^ (k * m - 1)",
" k * m - 1 ≠ 0",
" n = 1",
" Coprime 1 b"
] | [] |
import Mathlib.Data.Set.Lattice
#align_import data.set.intervals.disjoint from "leanprover-community/mathlib"@"207cfac9fcd06138865b5d04f7091e46d9320432"
universe u v w
variable {ι : Sort u} {α : Type v} {β : Type w}
open Set
open OrderDual (toDual)
namespace Set
section LinearOrder
variable [LinearOrder α] ... | Mathlib/Order/Interval/Set/Disjoint.lean | 155 | 158 | theorem Ioo_disjoint_Ioo [DenselyOrdered α] :
Disjoint (Set.Ioo a₁ a₂) (Set.Ioo b₁ b₂) ↔ min a₂ b₂ ≤ max a₁ b₁ := by |
simp_rw [Set.disjoint_iff_inter_eq_empty, Ioo_inter_Ioo, Ioo_eq_empty_iff, inf_eq_min, sup_eq_max,
not_lt]
| [
" Disjoint (Ico a₁ a₂) (Ico b₁ b₂) ↔ min a₂ b₂ ≤ max a₁ b₁",
" Disjoint (Ioc a₁ a₂) (Ioc b₁ b₂) ↔ min a₂ b₂ ≤ max a₁ b₁",
" Disjoint (Ioo a₁ a₂) (Ioo b₁ b₂) ↔ min a₂ b₂ ≤ max a₁ b₁"
] | [
" Disjoint (Ico a₁ a₂) (Ico b₁ b₂) ↔ min a₂ b₂ ≤ max a₁ b₁",
" Disjoint (Ioc a₁ a₂) (Ioc b₁ b₂) ↔ min a₂ b₂ ≤ max a₁ b₁"
] |
import Mathlib.Data.Real.Basic
import Mathlib.Combinatorics.Pigeonhole
import Mathlib.Algebra.Order.EuclideanAbsoluteValue
#align_import number_theory.class_number.admissible_absolute_value from "leanprover-community/mathlib"@"f7fc89d5d5ff1db2d1242c7bb0e9062ce47ef47c"
local infixl:50 " ≺ " => EuclideanDomain.r
na... | Mathlib/NumberTheory/ClassNumber/AdmissibleAbsoluteValue.lean | 73 | 112 | theorem exists_approx_aux (n : ℕ) (h : abv.IsAdmissible) :
∀ {ε : ℝ} (_hε : 0 < ε) {b : R} (_hb : b ≠ 0) (A : Fin (h.card ε ^ n).succ → Fin n → R),
∃ i₀ i₁, i₀ ≠ i₁ ∧ ∀ k, (abv (A i₁ k % b - A i₀ k % b) : ℝ) < abv b • ε := by |
haveI := Classical.decEq R
induction' n with n ih
· intro ε _hε b _hb A
refine ⟨0, 1, ?_, ?_⟩
· simp
rintro ⟨i, ⟨⟩⟩
intro ε hε b hb A
let M := h.card ε
-- By the "nicer" pigeonhole principle, we can find a collection `s`
-- of more than `M^n` remainders where the first components lie close to... | [
" ∃ t, ∀ (i₀ i₁ : ι), t i₀ = t i₁ → ↑(abv (A i₁ % b - A i₀ % b)) < abv b • ε",
" ↑(abv (A i₁ % b - A i₀ % b)) < abv b • ε",
" i₁ = e.symm (e i₁)",
" i₀ = e.symm (e i₀)",
" ∀ {ε : ℝ},\n 0 < ε →\n ∀ {b : R},\n b ≠ 0 →\n ∀ (A : Fin (h.card ε ^ n).succ → Fin n → R),\n ∃ i₀ i₁,... | [
" ∃ t, ∀ (i₀ i₁ : ι), t i₀ = t i₁ → ↑(abv (A i₁ % b - A i₀ % b)) < abv b • ε",
" ↑(abv (A i₁ % b - A i₀ % b)) < abv b • ε",
" i₁ = e.symm (e i₁)",
" i₀ = e.symm (e i₀)"
] |
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 | 133 | 137 | theorem lcm_mul_left {m n k : ℕ} : (m * n).lcm (m * k) = m * n.lcm k := by |
apply dvd_antisymm
· exact lcm_dvd (mul_dvd_mul_left m (dvd_lcm_left n k)) (mul_dvd_mul_left m (dvd_lcm_right n k))
· have h : m ∣ lcm (m * n) (m * k) := (dvd_mul_right m n).trans (dvd_lcm_left (m * n) (m * k))
rw [← dvd_div_iff h, lcm_dvd_iff, dvd_div_iff h, dvd_div_iff h, ← lcm_dvd_iff]
| [
" 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.Data.Set.Finite
import Mathlib.GroupTheory.GroupAction.FixedPoints
import Mathlib.GroupTheory.Perm.Support
open Equiv List MulAction Pointwise Set Subgroup
variable {G α : Type*} [Group G] [MulAction G α] [DecidableEq α]
theorem finite_compl_fixedBy_closure_iff {S : Set G} :
(∀ g ∈ closure S, ... | Mathlib/GroupTheory/Perm/ClosureSwap.lean | 59 | 70 | theorem exists_smul_not_mem_of_subset_orbit_closure (S : Set G) (T : Set α) {a : α}
(hS : ∀ g ∈ S, g⁻¹ ∈ S) (subset : T ⊆ orbit (closure S) a) (not_mem : a ∉ T)
(nonempty : T.Nonempty) : ∃ σ ∈ S, ∃ a ∈ T, σ • a ∉ T := by |
have key0 : ¬ closure S ≤ stabilizer G T := by
have ⟨b, hb⟩ := nonempty
obtain ⟨σ, rfl⟩ := subset hb
contrapose! not_mem with h
exact smul_mem_smul_set_iff.mp ((h σ.2).symm ▸ hb)
contrapose! key0
refine (closure_le _).mpr fun σ hσ ↦ ?_
simp_rw [SetLike.mem_coe, mem_stabilizer_iff, Set.ext_iff, ... | [
" (fixedBy α g)ᶜ.Finite",
" (fixedBy α 1)ᶜ.Finite",
" ∀ (x : G), (fixedBy α x)ᶜ.Finite → (fixedBy α x⁻¹)ᶜ.Finite",
" (fixedBy α (g * g'))ᶜ ⊆ (fixedBy α g)ᶜ ∪ (fixedBy α g')ᶜ",
" {x, y}.Finite",
" z ∈ fixedBy α (swap x y)",
" z ≠ x",
" z ≠ y",
" False",
" (fixedBy α σ)ᶜ.Finite",
" (fixedBy α (swa... | [
" (fixedBy α g)ᶜ.Finite",
" (fixedBy α 1)ᶜ.Finite",
" ∀ (x : G), (fixedBy α x)ᶜ.Finite → (fixedBy α x⁻¹)ᶜ.Finite",
" (fixedBy α (g * g'))ᶜ ⊆ (fixedBy α g)ᶜ ∪ (fixedBy α g')ᶜ",
" {x, y}.Finite",
" z ∈ fixedBy α (swap x y)",
" z ≠ x",
" z ≠ y",
" False",
" (fixedBy α σ)ᶜ.Finite",
" (fixedBy α (swa... |
import Mathlib.CategoryTheory.Sites.Sieves
import Mathlib.CategoryTheory.Limits.Shapes.Pullbacks
import Mathlib.CategoryTheory.Limits.Shapes.Multiequalizer
import Mathlib.CategoryTheory.Category.Preorder
import Mathlib.Order.Copy
import Mathlib.Data.Set.Subsingleton
#align_import category_theory.sites.grothendieck fr... | Mathlib/CategoryTheory/Sites/Grothendieck.lean | 145 | 150 | theorem superset_covering (Hss : S ≤ R) (sjx : S ∈ J X) : R ∈ J X := by |
apply J.transitive sjx R fun Y f hf => _
intros Y f hf
apply covering_of_eq_top
rw [← top_le_iff, ← S.pullback_eq_top_of_mem hf]
apply Sieve.pullback_monotone _ Hss
| [
" J₁ = J₂",
" { sieves := sieves✝, top_mem' := top_mem'✝, pullback_stable' := pullback_stable'✝, transitive' := transitive'✝ } = J₂",
" { sieves := sieves✝¹, top_mem' := top_mem'✝¹, pullback_stable' := pullback_stable'✝¹, transitive' := transitive'✝¹ } =\n { sieves := sieves✝, top_mem' := top_mem'✝, pullback... | [
" J₁ = J₂",
" { sieves := sieves✝, top_mem' := top_mem'✝, pullback_stable' := pullback_stable'✝, transitive' := transitive'✝ } = J₂",
" { sieves := sieves✝¹, top_mem' := top_mem'✝¹, pullback_stable' := pullback_stable'✝¹, transitive' := transitive'✝¹ } =\n { sieves := sieves✝, top_mem' := top_mem'✝, pullback... |
import Mathlib.Algebra.Quaternion
import Mathlib.Tactic.Ring
#align_import algebra.quaternion_basis from "leanprover-community/mathlib"@"3aa5b8a9ed7a7cabd36e6e1d022c9858ab8a8c2d"
open Quaternion
namespace QuaternionAlgebra
structure Basis {R : Type*} (A : Type*) [CommRing R] [Ring A] [Algebra R A] (c₁ c₂ : R) ... | Mathlib/Algebra/QuaternionBasis.lean | 125 | 135 | theorem lift_mul (x y : ℍ[R,c₁,c₂]) : q.lift (x * y) = q.lift x * q.lift y := by |
simp only [lift, Algebra.algebraMap_eq_smul_one]
simp_rw [add_mul, mul_add, smul_mul_assoc, mul_smul_comm, one_mul, mul_one, smul_smul]
simp only [i_mul_i, j_mul_j, i_mul_j, j_mul_i, i_mul_k, k_mul_i, k_mul_j, j_mul_k, k_mul_k]
simp only [smul_smul, smul_neg, sub_eq_add_neg, add_smul, ← add_assoc, mul_neg, neg... | [
" q₁ = q₂",
" { i := i✝, j := j✝, k := k✝, i_mul_i := i_mul_i✝, j_mul_j := j_mul_j✝, i_mul_j := i_mul_j✝, j_mul_i := j_mul_i✝ } = q₂",
" { i := i✝, j := j✝, k := k✝, i_mul_i := i_mul_i✝, j_mul_j := j_mul_j✝, i_mul_j := q₁_i_mul_j, j_mul_i := j_mul_i✝ } =\n q₂",
" { i := i✝¹, j := j✝¹, k := k✝¹, i_mul_i := ... | [
" q₁ = q₂",
" { i := i✝, j := j✝, k := k✝, i_mul_i := i_mul_i✝, j_mul_j := j_mul_j✝, i_mul_j := i_mul_j✝, j_mul_i := j_mul_i✝ } = q₂",
" { i := i✝, j := j✝, k := k✝, i_mul_i := i_mul_i✝, j_mul_j := j_mul_j✝, i_mul_j := q₁_i_mul_j, j_mul_i := j_mul_i✝ } =\n q₂",
" { i := i✝¹, j := j✝¹, k := k✝¹, i_mul_i := ... |
import Mathlib.Init.Data.Ordering.Basic
import Mathlib.Order.Synonym
#align_import order.compare from "leanprover-community/mathlib"@"c4658a649d216f57e99621708b09dcb3dcccbd23"
variable {α β : Type*}
def cmpLE {α} [LE α] [@DecidableRel α (· ≤ ·)] (x y : α) : Ordering :=
if x ≤ y then if y ≤ x then Ordering.eq ... | Mathlib/Order/Compare.lean | 67 | 71 | theorem compares_swap [LT α] {a b : α} {o : Ordering} : o.swap.Compares a b ↔ o.Compares b a := by |
cases o
· exact Iff.rfl
· exact eq_comm
· exact Iff.rfl
| [
" (cmpLE x y).swap = cmpLE y x",
" False",
" cmpLE x y = cmp x y",
" o.swap.Compares a b ↔ o.Compares b a",
" lt.swap.Compares a b ↔ lt.Compares b a",
" eq.swap.Compares a b ↔ eq.Compares b a",
" gt.swap.Compares a b ↔ gt.Compares b a"
] | [
" (cmpLE x y).swap = cmpLE y x",
" False",
" cmpLE x y = cmp x y"
] |
import Mathlib.Analysis.InnerProductSpace.Orientation
import Mathlib.MeasureTheory.Measure.Lebesgue.EqHaar
#align_import measure_theory.measure.haar.inner_product_space from "leanprover-community/mathlib"@"fd5edc43dc4f10b85abfe544b88f82cf13c5f844"
open FiniteDimensional MeasureTheory MeasureTheory.Measure Set
var... | Mathlib/MeasureTheory/Measure/Haar/InnerProductSpace.lean | 102 | 108 | theorem EuclideanSpace.volume_preserving_measurableEquiv :
MeasurePreserving (EuclideanSpace.measurableEquiv ι) := by |
suffices volume = map (EuclideanSpace.measurableEquiv ι).symm volume by
convert ((EuclideanSpace.measurableEquiv ι).symm.measurable.measurePreserving _).symm
rw [← addHaarMeasure_eq_volume_pi, ← Basis.parallelepiped_basisFun, ← Basis.addHaar_def,
coe_measurableEquiv_symm, ← PiLp.continuousLinearEquiv_symm_... | [
" o.volumeForm.measure (parallelepiped ⇑b) = 1",
" ι ≃ Fin n",
" Fintype.card ι = n",
" ⇑b = ⇑(b.reindex e) ∘ ⇑e",
" b x = (⇑(b.reindex e) ∘ ⇑e) x",
" o.volumeForm.measure = volume",
" addHaarMeasure (stdOrthonormalBasis ℝ F).toBasis.parallelepiped = volume",
" volume (parallelepiped ⇑b) = 1",
" b.t... | [
" o.volumeForm.measure (parallelepiped ⇑b) = 1",
" ι ≃ Fin n",
" Fintype.card ι = n",
" ⇑b = ⇑(b.reindex e) ∘ ⇑e",
" b x = (⇑(b.reindex e) ∘ ⇑e) x",
" o.volumeForm.measure = volume",
" addHaarMeasure (stdOrthonormalBasis ℝ F).toBasis.parallelepiped = volume",
" volume (parallelepiped ⇑b) = 1",
" b.t... |
import Mathlib.Data.Fintype.Basic
import Mathlib.ModelTheory.Substructures
#align_import model_theory.elementary_maps from "leanprover-community/mathlib"@"d11893b411025250c8e61ff2f12ccbd7ee35ab15"
open FirstOrder
namespace FirstOrder
namespace Language
open Structure
variable (L : Language) (M : Type*) (N : T... | Mathlib/ModelTheory/ElementaryMaps.lean | 132 | 136 | theorem map_fun (φ : M ↪ₑ[L] N) {n : ℕ} (f : L.Functions n) (x : Fin n → M) :
φ (funMap f x) = funMap f (φ ∘ x) := by |
have h := φ.map_formula (Formula.graph f) (Fin.cons (funMap f x) x)
rw [Formula.realize_graph, Fin.comp_cons, Formula.realize_graph] at h
rw [eq_comm, h]
| [
" f = g",
" { toFun := toFun✝, map_formula' := map_formula'✝ } = g",
" { toFun := toFun✝¹, map_formula' := map_formula'✝¹ } = { toFun := toFun✝, map_formula' := map_formula'✝ }",
" toFun✝¹ = toFun✝",
" toFun✝¹ x = toFun✝ x",
" φ.Realize (⇑f ∘ v) (⇑f ∘ xs) ↔ φ.Realize v xs",
" (φ.restrictFreeVar id).Real... | [
" f = g",
" { toFun := toFun✝, map_formula' := map_formula'✝ } = g",
" { toFun := toFun✝¹, map_formula' := map_formula'✝¹ } = { toFun := toFun✝, map_formula' := map_formula'✝ }",
" toFun✝¹ = toFun✝",
" toFun✝¹ x = toFun✝ x",
" φ.Realize (⇑f ∘ v) (⇑f ∘ xs) ↔ φ.Realize v xs",
" (φ.restrictFreeVar id).Real... |
import Mathlib.Data.Finite.Card
import Mathlib.GroupTheory.Commutator
import Mathlib.GroupTheory.Finiteness
#align_import group_theory.abelianization from "leanprover-community/mathlib"@"4be589053caf347b899a494da75410deb55fb3ef"
universe u v w
-- Let G be a group.
variable (G : Type u) [Group G]
open Subgroup (... | Mathlib/GroupTheory/Abelianization.lean | 53 | 54 | theorem commutator_eq_normalClosure : commutator G = Subgroup.normalClosure (commutatorSet G) := by |
simp [commutator, Subgroup.commutator_def', commutatorSet]
| [
" commutator G = Subgroup.closure (commutatorSet G)",
" commutator G = Subgroup.normalClosure (commutatorSet G)"
] | [
" commutator G = Subgroup.closure (commutatorSet G)"
] |
import Mathlib.Topology.Constructions
#align_import topology.continuous_on from "leanprover-community/mathlib"@"d4f691b9e5f94cfc64639973f3544c95f8d5d494"
open Set Filter Function Topology Filter
variable {α : Type*} {β : Type*} {γ : Type*} {δ : Type*}
variable [TopologicalSpace α]
@[simp]
theorem nhds_bind_nhdsW... | Mathlib/Topology/ContinuousOn.lean | 63 | 67 | theorem eventually_nhdsWithin_nhdsWithin {a : α} {s : Set α} {p : α → Prop} :
(∀ᶠ y in 𝓝[s] a, ∀ᶠ x in 𝓝[s] y, p x) ↔ ∀ᶠ x in 𝓝[s] a, p x := by |
refine ⟨fun h => ?_, fun h => (eventually_nhds_nhdsWithin.2 h).filter_mono inf_le_left⟩
simp only [eventually_nhdsWithin_iff] at h ⊢
exact h.mono fun x hx hxs => (hx hxs).self_of_nhds hxs
| [
" (∃ᶠ (x : α) in 𝓝 z, x ∈ s ∧ p x) ↔ ∃ᶠ (x : α) in 𝓝 z, p x ∧ x ∈ s",
" z ∈ closure (s \\ {z}) ↔ ∃ᶠ (x : α) in 𝓝[≠] z, x ∈ s",
" (∀ᶠ (y : α) in 𝓝[s] a, ∀ᶠ (x : α) in 𝓝[s] y, p x) ↔ ∀ᶠ (x : α) in 𝓝[s] a, p x",
" ∀ᶠ (x : α) in 𝓝[s] a, p x",
" ∀ᶠ (x : α) in 𝓝 a, x ∈ s → p x"
] | [
" (∃ᶠ (x : α) in 𝓝 z, x ∈ s ∧ p x) ↔ ∃ᶠ (x : α) in 𝓝 z, p x ∧ x ∈ s",
" z ∈ closure (s \\ {z}) ↔ ∃ᶠ (x : α) in 𝓝[≠] z, x ∈ s"
] |
import Mathlib.Data.Finsupp.Defs
#align_import data.finsupp.ne_locus from "leanprover-community/mathlib"@"f7fc89d5d5ff1db2d1242c7bb0e9062ce47ef47c"
variable {α M N P : Type*}
namespace Finsupp
variable [DecidableEq α]
section NHasZero
variable [DecidableEq N] [Zero N] (f g : α →₀ N)
def neLocus (f g : α →₀ ... | Mathlib/Data/Finsupp/NeLocus.lean | 52 | 54 | theorem coe_neLocus : ↑(f.neLocus g) = { x | f x ≠ g x } := by |
ext
exact mem_neLocus
| [
" a ∈ f.neLocus g ↔ f a ≠ g a",
" ↑(f.neLocus g) = {x | f x ≠ g x}",
" x✝ ∈ ↑(f.neLocus g) ↔ x✝ ∈ {x | f x ≠ g x}"
] | [
" a ∈ f.neLocus g ↔ f a ≠ g a"
] |
import Mathlib.Analysis.Quaternion
import Mathlib.Analysis.NormedSpace.Exponential
import Mathlib.Analysis.SpecialFunctions.Trigonometric.Series
#align_import analysis.normed_space.quaternion_exponential from "leanprover-community/mathlib"@"f0c8bf9245297a541f468be517f1bde6195105e9"
open scoped Quaternion Nat
open... | Mathlib/Analysis/NormedSpace/QuaternionExponential.lean | 82 | 94 | theorem hasSum_expSeries_of_imaginary {q : Quaternion ℝ} (hq : q.re = 0) {c s : ℝ}
(hc : HasSum (fun n => (-1 : ℝ) ^ n * ‖q‖ ^ (2 * n) / (2 * n)!) c)
(hs : HasSum (fun n => (-1 : ℝ) ^ n * ‖q‖ ^ (2 * n + 1) / (2 * n + 1)!) s) :
HasSum (fun n => expSeries ℝ (Quaternion ℝ) n fun _ => q) (↑c + (s / ‖q‖) • q) :=... |
replace hc := hasSum_coe.mpr hc
replace hs := (hs.div_const ‖q‖).smul_const q
refine HasSum.even_add_odd ?_ ?_
· convert hc using 1
ext n : 1
rw [expSeries_even_of_imaginary hq]
· convert hs using 1
ext n : 1
rw [expSeries_odd_of_imaginary hq]
| [
" ((expSeries ℝ ℍ (2 * n)) fun x => q) = ↑((-1) ^ n * ‖q‖ ^ (2 * n) / ↑(2 * n)!)",
" (↑(2 * n)!)⁻¹ • q ^ (2 * n) = ↑((-1) ^ n * ‖q‖ ^ (2 * n) / ↑(2 * n)!)",
" k⁻¹ • q ^ (2 * n) = k⁻¹ • (-↑(normSq q)) ^ n",
" k⁻¹ • (-↑(normSq q)) ^ n = k⁻¹ • ↑((-1) ^ n * ‖q‖ ^ (2 * n))",
" (-↑(normSq q)) ^ n = ↑((-1) ^ n * ‖... | [
" ((expSeries ℝ ℍ (2 * n)) fun x => q) = ↑((-1) ^ n * ‖q‖ ^ (2 * n) / ↑(2 * n)!)",
" (↑(2 * n)!)⁻¹ • q ^ (2 * n) = ↑((-1) ^ n * ‖q‖ ^ (2 * n) / ↑(2 * n)!)",
" k⁻¹ • q ^ (2 * n) = k⁻¹ • (-↑(normSq q)) ^ n",
" k⁻¹ • (-↑(normSq q)) ^ n = k⁻¹ • ↑((-1) ^ n * ‖q‖ ^ (2 * n))",
" (-↑(normSq q)) ^ n = ↑((-1) ^ n * ‖... |
import Mathlib.ModelTheory.Ultraproducts
import Mathlib.ModelTheory.Bundled
import Mathlib.ModelTheory.Skolem
#align_import model_theory.satisfiability from "leanprover-community/mathlib"@"d565b3df44619c1498326936be16f1a935df0728"
set_option linter.uppercaseLean3 false
universe u v w w'
open Cardinal CategoryTh... | Mathlib/ModelTheory/Satisfiability.lean | 138 | 154 | theorem isSatisfiable_union_distinctConstantsTheory_of_card_le (T : L.Theory) (s : Set α)
(M : Type w') [Nonempty M] [L.Structure M] [M ⊨ T]
(h : Cardinal.lift.{w'} #s ≤ Cardinal.lift.{w} #M) :
((L.lhomWithConstants α).onTheory T ∪ L.distinctConstantsTheory s).IsSatisfiable := by |
haveI : Inhabited M := Classical.inhabited_of_nonempty inferInstance
rw [Cardinal.lift_mk_le'] at h
letI : (constantsOn α).Structure M := constantsOn.structure (Function.extend (↑) h.some default)
have : M ⊨ (L.lhomWithConstants α).onTheory T ∪ L.distinctConstantsTheory s := by
refine ((LHom.onTheory_model... | [
" (φ.onTheory T).IsSatisfiable ↔ T.IsSatisfiable",
" (φ.onTheory T).IsSatisfiable",
" T.IsSatisfiable",
" M' ⊨ T",
" M' ⊨ φ",
" ∀ᶠ (a : Finset ↑T) in ↑(Ultrafilter.of Filter.atTop), M a ⊨ φ",
" φ ∈ ↑(Finset.map (Function.Embedding.subtype fun x => x ∈ T) s)",
" ∃ (x : φ ∈ T), ⟨φ, ⋯⟩ ∈ s",
" IsSatisf... | [
" (φ.onTheory T).IsSatisfiable ↔ T.IsSatisfiable",
" (φ.onTheory T).IsSatisfiable",
" T.IsSatisfiable",
" M' ⊨ T",
" M' ⊨ φ",
" ∀ᶠ (a : Finset ↑T) in ↑(Ultrafilter.of Filter.atTop), M a ⊨ φ",
" φ ∈ ↑(Finset.map (Function.Embedding.subtype fun x => x ∈ T) s)",
" ∃ (x : φ ∈ T), ⟨φ, ⋯⟩ ∈ s",
" IsSatisf... |
import Mathlib.CategoryTheory.Category.Grpd
import Mathlib.CategoryTheory.Groupoid
import Mathlib.Topology.Category.TopCat.Basic
import Mathlib.Topology.Homotopy.Path
import Mathlib.Data.Set.Subsingleton
#align_import algebraic_topology.fundamental_groupoid.basic from "leanprover-community/mathlib"@"3d7987cda72abc473... | Mathlib/AlgebraicTopology/FundamentalGroupoid/Basic.lean | 206 | 207 | theorem transAssocReparamAux_zero : transAssocReparamAux 0 = 0 := by |
set_option tactic.skipAssignedInstances false in norm_num [transAssocReparamAux]
| [
" Continuous reflTransSymmAux",
" Continuous fun x => ↑x.2",
" Continuous fun x => 1 / 2",
" Continuous fun x => ↑x.1 * 2 * ↑x.2",
" Continuous fun x => ↑x.1 * (2 - 2 * ↑x.2)",
" ∀ (x : ↑I × ↑I), ↑x.2 = 1 / 2 → ↑x.1 * 2 * ↑x.2 = ↑x.1 * (2 - 2 * ↑x.2)",
" ↑x.1 * 2 * ↑x.2 = ↑x.1 * (2 - 2 * ↑x.2)",
" ref... | [
" Continuous reflTransSymmAux",
" Continuous fun x => ↑x.2",
" Continuous fun x => 1 / 2",
" Continuous fun x => ↑x.1 * 2 * ↑x.2",
" Continuous fun x => ↑x.1 * (2 - 2 * ↑x.2)",
" ∀ (x : ↑I × ↑I), ↑x.2 = 1 / 2 → ↑x.1 * 2 * ↑x.2 = ↑x.1 * (2 - 2 * ↑x.2)",
" ↑x.1 * 2 * ↑x.2 = ↑x.1 * (2 - 2 * ↑x.2)",
" ref... |
import Mathlib.Analysis.Complex.Basic
import Mathlib.Analysis.SpecificLimits.Normed
open Filter Finset
open scoped Topology
namespace Complex
section StolzSet
open Real
def stolzSet (M : ℝ) : Set ℂ := {z | ‖z‖ < 1 ∧ ‖1 - z‖ < M * (1 - ‖z‖)}
def stolzCone (s : ℝ) : Set ℂ := {z | |z.im| < s * (1 - z.re)}
th... | Mathlib/Analysis/Complex/AbelLimit.lean | 56 | 66 | theorem nhdsWithin_lt_le_nhdsWithin_stolzSet {M : ℝ} (hM : 1 < M) :
(𝓝[<] 1).map ofReal' ≤ 𝓝[stolzSet M] 1 := by |
rw [← tendsto_id']
refine tendsto_map' <| tendsto_nhdsWithin_of_tendsto_nhds_of_eventually_within ofReal'
(tendsto_nhdsWithin_of_tendsto_nhds <| ofRealCLM.continuous.tendsto' 1 1 rfl) ?_
simp only [eventually_iff, norm_eq_abs, abs_ofReal, abs_lt, mem_nhdsWithin]
refine ⟨Set.Ioo 0 2, isOpen_Ioo, by norm_num... | [
" stolzSet M = ∅",
" z ∈ stolzSet M ↔ z ∈ ∅",
" 0 < 1 - ‖z‖ → M * (1 - ‖z‖) ≤ ‖1 - z‖",
" M * (1 - ‖z‖) ≤ ‖1 - z‖",
" 1 * (1 - ‖z‖) = ‖1‖ - ‖z‖",
" Filter.map ofReal' (𝓝[<] 1) ≤ 𝓝[stolzSet M] 1",
" Tendsto id (Filter.map ofReal' (𝓝[<] 1)) (𝓝[stolzSet M] 1)",
" ∀ᶠ (x : ℝ) in 𝓝[<] 1, ↑x ∈ stolzSet ... | [
" stolzSet M = ∅",
" z ∈ stolzSet M ↔ z ∈ ∅",
" 0 < 1 - ‖z‖ → M * (1 - ‖z‖) ≤ ‖1 - z‖",
" M * (1 - ‖z‖) ≤ ‖1 - z‖",
" 1 * (1 - ‖z‖) = ‖1‖ - ‖z‖"
] |
import Mathlib.Order.RelIso.Set
import Mathlib.Data.Multiset.Sort
import Mathlib.Data.List.NodupEquivFin
import Mathlib.Data.Finset.Lattice
import Mathlib.Data.Fintype.Card
#align_import data.finset.sort from "leanprover-community/mathlib"@"509de852e1de55e1efa8eacfa11df0823f26f226"
namespace Finset
open Multiset... | Mathlib/Data/Finset/Sort.lean | 79 | 81 | theorem sort_perm_toList (s : Finset α) : sort r s ~ s.toList := by |
rw [← Multiset.coe_eq_coe]
simp only [coe_toList, sort_eq]
| [
" (↑(sort r s)).Nodup",
" s.val.Nodup",
" sort r s ~ s.toList",
" ↑(sort r s) = ↑s.toList"
] | [
" (↑(sort r s)).Nodup",
" s.val.Nodup"
] |
import Mathlib.Algebra.Order.Group.Instances
import Mathlib.Analysis.Convex.Segment
import Mathlib.Tactic.GCongr
#align_import analysis.convex.star from "leanprover-community/mathlib"@"9003f28797c0664a49e4179487267c494477d853"
open Set
open Convex Pointwise
variable {𝕜 E F : Type*}
section OrderedSemiring
va... | Mathlib/Analysis/Convex/Star.lean | 75 | 80 | theorem starConvex_iff_segment_subset : StarConvex 𝕜 x s ↔ ∀ ⦃y⦄, y ∈ s → [x -[𝕜] y] ⊆ s := by |
constructor
· rintro h y hy z ⟨a, b, ha, hb, hab, rfl⟩
exact h hy ha hb hab
· rintro h y hy a b ha hb hab
exact h hy ⟨a, b, ha, hb, hab, rfl⟩
| [
" StarConvex 𝕜 x s ↔ ∀ ⦃y : E⦄, y ∈ s → [x-[𝕜]y] ⊆ s",
" StarConvex 𝕜 x s → ∀ ⦃y : E⦄, y ∈ s → [x-[𝕜]y] ⊆ s",
" a • x + b • y ∈ s",
" (∀ ⦃y : E⦄, y ∈ s → [x-[𝕜]y] ⊆ s) → StarConvex 𝕜 x s"
] | [] |
import Mathlib.Algebra.Order.Monoid.Defs
import Mathlib.Algebra.Order.Sub.Defs
import Mathlib.Util.AssertExists
#align_import algebra.order.group.defs from "leanprover-community/mathlib"@"b599f4e4e5cf1fbcb4194503671d3d9e569c1fce"
open Function
universe u
variable {α : Type u}
class OrderedAddCommGroup (α : Ty... | Mathlib/Algebra/Order/Group/Defs.lean | 82 | 84 | theorem OrderedCommGroup.to_contravariantClass_right_le (α : Type u) [OrderedCommGroup α] :
ContravariantClass α α (swap (· * ·)) (· ≤ ·) where
elim a b c bc := by | simpa using mul_le_mul_right' bc a⁻¹
| [
" b ≤ c"
] | [
" b ≤ c"
] |
import Mathlib.Data.Finset.Prod
import Mathlib.Data.Set.Finite
#align_import data.finset.n_ary from "leanprover-community/mathlib"@"eba7871095e834365616b5e43c8c7bb0b37058d0"
open Function Set
variable {α α' β β' γ γ' δ δ' ε ε' ζ ζ' ν : Type*}
namespace Finset
variable [DecidableEq α'] [DecidableEq β'] [Decidabl... | Mathlib/Data/Finset/NAry.lean | 112 | 113 | theorem image₂_subset_iff_right : image₂ f s t ⊆ u ↔ ∀ b ∈ t, (s.image fun a => f a b) ⊆ u := by |
simp_rw [image₂_subset_iff, image_subset_iff, @forall₂_swap α]
| [
" c ∈ image₂ f s t ↔ ∃ a ∈ s, ∃ b ∈ t, f a b = c",
" (image₂ f s t).card = s.card * t.card ↔ InjOn (fun x => f x.1 x.2) (↑s ×ˢ ↑t)",
" (image₂ f s t).card = (s ×ˢ t).card ↔ InjOn (fun x => f x.1 x.2) ↑(s ×ˢ t)",
" f a b ∈ image₂ f s t ↔ a ∈ s ∧ b ∈ t",
" image₂ f s t ⊆ image₂ f s' t'",
" image2 f ↑s ↑t ⊆ ... | [
" c ∈ image₂ f s t ↔ ∃ a ∈ s, ∃ b ∈ t, f a b = c",
" (image₂ f s t).card = s.card * t.card ↔ InjOn (fun x => f x.1 x.2) (↑s ×ˢ ↑t)",
" (image₂ f s t).card = (s ×ˢ t).card ↔ InjOn (fun x => f x.1 x.2) ↑(s ×ˢ t)",
" f a b ∈ image₂ f s t ↔ a ∈ s ∧ b ∈ t",
" image₂ f s t ⊆ image₂ f s' t'",
" image2 f ↑s ↑t ⊆ ... |
import Mathlib.Analysis.Calculus.ContDiff.Basic
import Mathlib.Analysis.Calculus.Deriv.Linear
import Mathlib.Analysis.Complex.Conformal
import Mathlib.Analysis.Calculus.Conformal.NormedSpace
#align_import analysis.complex.real_deriv from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe"
se... | Mathlib/Analysis/Complex/RealDeriv.lean | 162 | 166 | theorem DifferentiableAt.conformalAt (h : DifferentiableAt ℂ f z) (hf' : deriv f z ≠ 0) :
ConformalAt f z := by |
rw [conformalAt_iff_isConformalMap_fderiv, (h.hasFDerivAt.restrictScalars ℝ).fderiv]
apply isConformalMap_complex_linear
simpa only [Ne, ext_ring_iff]
| [
" ConformalAt f z",
" IsConformalMap (ContinuousLinearMap.restrictScalars ℝ (fderiv ℂ f z))",
" fderiv ℂ f z ≠ 0"
] | [] |
import Mathlib.Logic.Basic
import Mathlib.Tactic.Convert
import Mathlib.Tactic.SplitIfs
#align_import logic.lemmas from "leanprover-community/mathlib"@"2ed7e4aec72395b6a7c3ac4ac7873a7a43ead17c"
protected alias ⟨HEq.eq, Eq.heq⟩ := heq_iff_eq
#align heq.eq HEq.eq
#align eq.heq Eq.heq
variable {α : Sort*} {p q r : ... | Mathlib/Logic/Lemmas.lean | 28 | 31 | theorem dite_dite_distrib_left {a : p → α} {b : ¬p → q → α} {c : ¬p → ¬q → α} :
(dite p a fun hp ↦ dite q (b hp) (c hp)) =
dite q (fun hq ↦ (dite p a) fun hp ↦ b hp hq) fun hq ↦ (dite p a) fun hp ↦ c hp hq := by |
split_ifs <;> rfl
| [
" (dite p a fun hp => dite q (b hp) (c hp)) = if hq : q then dite p a fun hp => b hp hq else dite p a fun hp => c hp hq",
" a h✝¹ = a h✝¹",
" b h✝¹ h✝ = b h✝¹ ⋯",
" c h✝¹ h✝ = c h✝¹ ⋯"
] | [] |
import Mathlib.Analysis.Convolution
import Mathlib.Analysis.Calculus.BumpFunction.Normed
import Mathlib.MeasureTheory.Integral.Average
import Mathlib.MeasureTheory.Covering.Differentiation
import Mathlib.MeasureTheory.Covering.BesicovitchVectorSpace
import Mathlib.MeasureTheory.Measure.Haar.Unique
#align_import analy... | Mathlib/Analysis/Calculus/BumpFunction/Convolution.lean | 54 | 56 | theorem convolution_eq_right {x₀ : G} (hg : ∀ x ∈ ball x₀ φ.rOut, g x = g x₀) :
(φ ⋆[lsmul ℝ ℝ, μ] g : G → E') x₀ = integral μ φ • g x₀ := by |
simp_rw [convolution_eq_right' _ φ.support_eq.subset hg, lsmul_apply, integral_smul_const]
| [
" (↑φ ⋆[lsmul ℝ ℝ, μ] g) x₀ = integral μ ↑φ • g x₀"
] | [] |
import Mathlib.Data.Fintype.Card
import Mathlib.Data.Finset.Sum
import Mathlib.Logic.Embedding.Set
#align_import data.fintype.sum from "leanprover-community/mathlib"@"6623e6af705e97002a9054c1c05a980180276fc1"
universe u v
variable {α β : Type*}
open Finset
instance (α : Type u) (β : Type v) [Fintype α] [Fintyp... | Mathlib/Data/Fintype/Sum.lean | 118 | 123 | theorem Fintype.card_subtype_or (p q : α → Prop) [Fintype { x // p x }] [Fintype { x // q x }]
[Fintype { x // p x ∨ q x }] :
Fintype.card { x // p x ∨ q x } ≤ Fintype.card { x // p x } + Fintype.card { x // q x } := by |
classical
convert Fintype.card_le_of_embedding (subtypeOrLeftEmbedding p q)
rw [Fintype.card_sum]
| [
" ∀ (x : α ⊕ β), x ∈ univ.disjSum univ",
" Sum.inl val✝ ∈ univ.disjSum univ",
" Sum.inr val✝ ∈ univ.disjSum univ",
" Function.Bijective (Sum.elim Subtype.val Subtype.val)",
" image (fun i => b ↑i) univ = (image b univ).erase k",
" image (fun i => b ↑i) univ ⊆ (image b univ).erase k",
" ∀ x ∈ univ, b ↑x ... | [
" ∀ (x : α ⊕ β), x ∈ univ.disjSum univ",
" Sum.inl val✝ ∈ univ.disjSum univ",
" Sum.inr val✝ ∈ univ.disjSum univ",
" Function.Bijective (Sum.elim Subtype.val Subtype.val)",
" image (fun i => b ↑i) univ = (image b univ).erase k",
" image (fun i => b ↑i) univ ⊆ (image b univ).erase k",
" ∀ x ∈ univ, b ↑x ... |
import Mathlib.Topology.UniformSpace.UniformEmbedding
#align_import topology.uniform_space.pi from "leanprover-community/mathlib"@"2705404e701abc6b3127da906f40bae062a169c9"
noncomputable section
open scoped Uniformity Topology
open Filter UniformSpace Function Set
universe u
variable {ι ι' β : Type*} (α : ι → ... | Mathlib/Topology/UniformSpace/Pi.lean | 46 | 49 | theorem uniformContinuous_pi {β : Type*} [UniformSpace β] {f : β → ∀ i, α i} :
UniformContinuous f ↔ ∀ i, UniformContinuous fun x => f x i := by |
-- Porting note: required `Function.comp` to close
simp only [UniformContinuous, Pi.uniformity, tendsto_iInf, tendsto_comap_iff, Function.comp]
| [
" uniformSpace α = ⨅ i, UniformSpace.comap (eval i) (U i)",
" 𝓤 ((i : ι) → α i) = 𝓤 ((i : ι) → α i)",
" (𝓤 ((i : ι) → α i)).IsCountablyGenerated",
" (⨅ i, Filter.comap (fun a => (a.1 i, a.2 i)) (𝓤 (α i))).IsCountablyGenerated",
" UniformContinuous f ↔ ∀ (i : ι), UniformContinuous fun x => f x i"
] | [
" uniformSpace α = ⨅ i, UniformSpace.comap (eval i) (U i)",
" 𝓤 ((i : ι) → α i) = 𝓤 ((i : ι) → α i)",
" (𝓤 ((i : ι) → α i)).IsCountablyGenerated",
" (⨅ i, Filter.comap (fun a => (a.1 i, a.2 i)) (𝓤 (α i))).IsCountablyGenerated"
] |
import Mathlib.Algebra.Homology.Homotopy
import Mathlib.Algebra.Category.ModuleCat.Abelian
import Mathlib.Algebra.Category.ModuleCat.Subobject
import Mathlib.CategoryTheory.Limits.Shapes.ConcreteCategory
#align_import algebra.homology.Module from "leanprover-community/mathlib"@"70fd9563a21e7b963887c9360bd29b2393e6225... | Mathlib/Algebra/Homology/ModuleCat.lean | 91 | 93 | theorem homology'_ext' {M : ModuleCat R} (i : ι) {h k : C.homology' i ⟶ M}
(w : ∀ x : LinearMap.ker (C.dFrom i), h (toHomology' x) = k (toHomology' x)) : h = k := by |
apply homology'_ext _ w
| [
" h = k",
" h ((cokernel.π (imageToKernel f g w✝)) n) = k ((cokernel.π (imageToKernel f g w✝)) n)",
" h ((cokernel.π (imageToKernel f g w✝)) ((kernelSubobjectIso g ≪≫ kernelIsoKer g).toLinearEquiv.toEquiv.symm n)) =\n k ((cokernel.π (imageToKernel f g w✝)) ((kernelSubobjectIso g ≪≫ kernelIsoKer g).toLinearEq... | [
" h = k",
" h ((cokernel.π (imageToKernel f g w✝)) n) = k ((cokernel.π (imageToKernel f g w✝)) n)",
" h ((cokernel.π (imageToKernel f g w✝)) ((kernelSubobjectIso g ≪≫ kernelIsoKer g).toLinearEquiv.toEquiv.symm n)) =\n k ((cokernel.π (imageToKernel f g w✝)) ((kernelSubobjectIso g ≪≫ kernelIsoKer g).toLinearEq... |
import Mathlib.Geometry.RingedSpace.PresheafedSpace.Gluing
import Mathlib.AlgebraicGeometry.OpenImmersion
#align_import algebraic_geometry.gluing from "leanprover-community/mathlib"@"533f62f4dd62a5aad24a04326e6e787c8f7e98b1"
set_option linter.uppercaseLean3 false
noncomputable section
universe u
open Topologica... | Mathlib/AlgebraicGeometry/Gluing.lean | 331 | 335 | theorem glued_cover_cocycle (x y z : 𝒰.J) :
gluedCoverT' 𝒰 x y z ≫ gluedCoverT' 𝒰 y z x ≫ gluedCoverT' 𝒰 z x y = 𝟙 _ := by |
apply pullback.hom_ext <;> simp_rw [Category.id_comp, Category.assoc]
· apply glued_cover_cocycle_fst
· apply glued_cover_cocycle_snd
| [
" pullback pullback.fst pullback.fst ⟶ pullback pullback.fst pullback.fst",
" pullback (pullback.fst ≫ 𝒰.map x) (𝒰.map z) ⟶ pullback pullback.fst pullback.fst",
" pullback (pullback.fst ≫ 𝒰.map x) (𝒰.map z) ⟶ pullback (pullback.fst ≫ 𝒰.map y) (𝒰.map z)",
" (pullback.fst ≫ 𝒰.map x) ≫ 𝟙 X = (pullbackSym... | [
" pullback pullback.fst pullback.fst ⟶ pullback pullback.fst pullback.fst",
" pullback (pullback.fst ≫ 𝒰.map x) (𝒰.map z) ⟶ pullback pullback.fst pullback.fst",
" pullback (pullback.fst ≫ 𝒰.map x) (𝒰.map z) ⟶ pullback (pullback.fst ≫ 𝒰.map y) (𝒰.map z)",
" (pullback.fst ≫ 𝒰.map x) ≫ 𝟙 X = (pullbackSym... |
import Mathlib.Analysis.InnerProductSpace.Rayleigh
import Mathlib.Analysis.InnerProductSpace.PiL2
import Mathlib.Algebra.DirectSum.Decomposition
import Mathlib.LinearAlgebra.Eigenspace.Minpoly
#align_import analysis.inner_product_space.spectrum from "leanprover-community/mathlib"@"6b0169218d01f2837d79ea2784882009a0da... | Mathlib/Analysis/InnerProductSpace/Spectrum.lean | 68 | 72 | theorem invariant_orthogonalComplement_eigenspace (μ : 𝕜) (v : E) (hv : v ∈ (eigenspace T μ)ᗮ) :
T v ∈ (eigenspace T μ)ᗮ := by |
intro w hw
have : T w = (μ : 𝕜) • w := by rwa [mem_eigenspace_iff] at hw
simp [← hT w, this, inner_smul_left, hv w hw]
| [
" T v ∈ (eigenspace T μ)ᗮ",
" ⟪w, T v⟫_𝕜 = 0",
" T w = μ • w"
] | [] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.