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.Finset.Fin
import Mathlib.Data.Int.Order.Units
import Mathlib.GroupTheory.OrderOfElement
import Mathlib.GroupTheory.Perm.Support
import Mathlib.Logic.Equiv.Fintype
#align_import group_theory.perm.sign from "leanprover-community/mathlib"@"f694c7dead66f5d4c80f446c796a5aad14707f0e"
universe u v
o... | Mathlib/GroupTheory/Perm/Finite.lean | 132 | 163 | theorem mem_sumCongrHom_range_of_perm_mapsTo_inl {m n : Type*} [Finite m] [Finite n]
{σ : Perm (Sum m n)} (h : Set.MapsTo σ (Set.range Sum.inl) (Set.range Sum.inl)) :
σ ∈ (sumCongrHom m n).range := by |
classical
have h1 : ∀ x : Sum m n, (∃ a : m, Sum.inl a = x) → ∃ a : m, Sum.inl a = σ x := by
rintro x ⟨a, ha⟩
apply h
rw [← ha]
exact ⟨a, rfl⟩
have h3 : ∀ x : Sum m n, (∃ b : n, Sum.inr b = x) → ∃ b : n, Sum.inr b = σ x := by
rintro x ⟨b, hb⟩
apply (perm_mapsTo_inl_iff_map... | [
" -1 ≠ 1",
" f⁻¹ y ∈ s",
" f⁻¹ y = y2",
" f⁻¹ ((fun i x => f i) y2 hy2) = y2",
" Set.MapsTo (⇑f⁻¹) s s",
" Set.MapsTo (⇑σ) (Set.range Sum.inl) (Set.range Sum.inl) ↔ Set.MapsTo (⇑σ) (Set.range Sum.inr) (Set.range Sum.inr)",
" Set.MapsTo (⇑σ) (Set.range Sum.inl) (Set.range Sum.inl) → Set.MapsTo (⇑σ) (Set.... | [
" -1 ≠ 1",
" f⁻¹ y ∈ s",
" f⁻¹ y = y2",
" f⁻¹ ((fun i x => f i) y2 hy2) = y2",
" Set.MapsTo (⇑f⁻¹) s s",
" Set.MapsTo (⇑σ) (Set.range Sum.inl) (Set.range Sum.inl) ↔ Set.MapsTo (⇑σ) (Set.range Sum.inr) (Set.range Sum.inr)",
" Set.MapsTo (⇑σ) (Set.range Sum.inl) (Set.range Sum.inl) → Set.MapsTo (⇑σ) (Set.... |
import Mathlib.Algebra.Polynomial.Module.Basic
import Mathlib.Analysis.Calculus.Deriv.Pow
import Mathlib.Analysis.Calculus.IteratedDeriv.Defs
import Mathlib.Analysis.Calculus.MeanValue
#align_import analysis.calculus.taylor from "leanprover-community/mathlib"@"3a69562db5a458db8322b190ec8d9a8bbd8a5b14"
open scoped... | Mathlib/Analysis/Calculus/Taylor.lean | 83 | 92 | theorem taylorWithinEval_succ (f : ℝ → E) (n : ℕ) (s : Set ℝ) (x₀ x : ℝ) :
taylorWithinEval f (n + 1) s x₀ x = taylorWithinEval f n s x₀ x +
(((n + 1 : ℝ) * n !)⁻¹ * (x - x₀) ^ (n + 1)) • iteratedDerivWithin (n + 1) f s x₀ := by |
simp_rw [taylorWithinEval, taylorWithin_succ, LinearMap.map_add, PolynomialModule.comp_eval]
congr
simp only [Polynomial.eval_sub, Polynomial.eval_X, Polynomial.eval_C,
PolynomialModule.eval_single, mul_inv_rev]
dsimp only [taylorCoeffWithin]
rw [← mul_smul, mul_comm, Nat.factorial_succ, Nat.cast_mul, Na... | [
" taylorWithin f (n + 1) s x₀ =\n taylorWithin f n s x₀ +\n (PolynomialModule.comp (Polynomial.X - Polynomial.C x₀))\n ((PolynomialModule.single ℝ (n + 1)) (taylorCoeffWithin f (n + 1) s x₀))",
" ∑ k ∈ Finset.range (n + 1 + 1),\n (PolynomialModule.comp (Polynomial.X - Polynomial.C x₀))\n ... | [
" taylorWithin f (n + 1) s x₀ =\n taylorWithin f n s x₀ +\n (PolynomialModule.comp (Polynomial.X - Polynomial.C x₀))\n ((PolynomialModule.single ℝ (n + 1)) (taylorCoeffWithin f (n + 1) s x₀))",
" ∑ k ∈ Finset.range (n + 1 + 1),\n (PolynomialModule.comp (Polynomial.X - Polynomial.C x₀))\n ... |
import Mathlib.RingTheory.EisensteinCriterion
import Mathlib.RingTheory.Polynomial.ScaleRoots
#align_import ring_theory.polynomial.eisenstein.basic from "leanprover-community/mathlib"@"2032a878972d5672e7c27c957e7a6e297b044973"
universe u v w z
variable {R : Type u}
open Ideal Algebra Finset
open Polynomial
na... | Mathlib/RingTheory/Polynomial/Eisenstein/Basic.lean | 111 | 121 | theorem exists_mem_adjoin_mul_eq_pow_natDegree_le {x : S} (hx : aeval x f = 0) (hmo : f.Monic)
(hf : f.IsWeaklyEisensteinAt (Submodule.span R {p})) :
∀ i, (f.map (algebraMap R S)).natDegree ≤ i →
∃ y ∈ adjoin R ({x} : Set S), (algebraMap R S) p * y = x ^ i := by |
intro i hi
obtain ⟨k, hk⟩ := exists_add_of_le hi
rw [hk, pow_add]
obtain ⟨y, hy, H⟩ := exists_mem_adjoin_mul_eq_pow_natDegree hx hmo hf
refine ⟨y * x ^ k, ?_, ?_⟩
· exact Subalgebra.mul_mem _ hy (Subalgebra.pow_mem _ (subset_adjoin (Set.mem_singleton x)) _)
· rw [← mul_assoc _ y, H]
| [
" ∃ y ∈ adjoin R {x}, (algebraMap R S) p * y = x ^ (map (algebraMap R S) f).natDegree",
" ∀ n < f.natDegree, p ∣ f.coeff n",
" p ∣ f.coeff n",
" f.coeff n ∈ span {p}",
"R : Type u\ninst✝² : CommRing R\n𝓟 : Ideal R\nf : R[X]\nhf✝ : f.IsWeaklyEisensteinAt 𝓟\nS : Type v\ninst✝¹ : CommRing S\ninst✝ : Algebra ... | [
" ∃ y ∈ adjoin R {x}, (algebraMap R S) p * y = x ^ (map (algebraMap R S) f).natDegree",
" ∀ n < f.natDegree, p ∣ f.coeff n",
" p ∣ f.coeff n",
" f.coeff n ∈ span {p}",
"R : Type u\ninst✝² : CommRing R\n𝓟 : Ideal R\nf : R[X]\nhf✝ : f.IsWeaklyEisensteinAt 𝓟\nS : Type v\ninst✝¹ : CommRing S\ninst✝ : Algebra ... |
import Mathlib.Topology.Separation
import Mathlib.Algebra.BigOperators.Finprod
#align_import topology.algebra.infinite_sum.basic from "leanprover-community/mathlib"@"3b52265189f3fb43aa631edffce5d060fafaf82f"
noncomputable section
open Filter Function
open scoped Topology
variable {α β γ : Type*}
section HasP... | Mathlib/Topology/Algebra/InfiniteSum/Defs.lean | 124 | 125 | theorem tprod_eq_one_of_not_multipliable (h : ¬Multipliable f) : ∏' b, f b = 1 := by |
simp [tprod_def, h]
| [
" ∏' (b : β), f b = 1"
] | [] |
import Mathlib.Data.Finset.Prod
import Mathlib.Data.Sym.Basic
import Mathlib.Data.Sym.Sym2.Init
import Mathlib.Data.SetLike.Basic
#align_import data.sym.sym2 from "leanprover-community/mathlib"@"8631e2d5ea77f6c13054d9151d82b83069680cb1"
assert_not_exists MonoidWithZero
open Finset Function Sym
universe u
variab... | Mathlib/Data/Sym/Sym2.lean | 88 | 89 | theorem rel_iff' {p q : α × α} : Rel α p q ↔ p = q ∨ p = q.swap := by |
aesop (rule_sets := [Sym2])
| [
" Rel α x y → Rel α y x",
" Rel α x z",
" Rel α p q ↔ p = q ∨ p = q.swap"
] | [
" Rel α x y → Rel α y x",
" Rel α x z"
] |
import Mathlib.Analysis.Normed.Group.InfiniteSum
import Mathlib.Analysis.Normed.MulAction
import Mathlib.Topology.Algebra.Order.LiminfLimsup
import Mathlib.Topology.PartialHomeomorph
#align_import analysis.asymptotics.asymptotics from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982"
open ... | Mathlib/Analysis/Asymptotics/Asymptotics.lean | 89 | 89 | theorem isBigOWith_iff : IsBigOWith c l f g ↔ ∀ᶠ x in l, ‖f x‖ ≤ c * ‖g x‖ := by | rw [IsBigOWith_def]
| [
" IsBigOWith c l f g ↔ ∀ᶠ (x : α) in l, ‖f x‖ ≤ c * ‖g x‖"
] | [] |
import Mathlib.Topology.GDelta
#align_import topology.metric_space.baire from "leanprover-community/mathlib"@"b9e46fe101fc897fb2e7edaf0bf1f09ea49eb81a"
noncomputable section
open scoped Topology
open Filter Set TopologicalSpace
variable {X α : Type*} {ι : Sort*}
section BaireTheorem
variable [TopologicalSpace... | Mathlib/Topology/Baire/Lemmas.lean | 50 | 55 | theorem dense_sInter_of_isOpen {S : Set (Set X)} (ho : ∀ s ∈ S, IsOpen s) (hS : S.Countable)
(hd : ∀ s ∈ S, Dense s) : Dense (⋂₀ S) := by |
rcases S.eq_empty_or_nonempty with h | h
· simp [h]
· rcases hS.exists_eq_range h with ⟨f, rfl⟩
exact dense_iInter_of_isOpen_nat (forall_mem_range.1 ho) (forall_mem_range.1 hd)
| [
" Dense (⋂₀ S)",
" Dense (⋂₀ range f)"
] | [] |
import Mathlib.MeasureTheory.Measure.Restrict
#align_import measure_theory.measure.mutually_singular from "leanprover-community/mathlib"@"70a4f2197832bceab57d7f41379b2592d1110570"
open Set
open MeasureTheory NNReal ENNReal
namespace MeasureTheory
namespace Measure
variable {α : Type*} {m0 : MeasurableSpace α}... | Mathlib/MeasureTheory/Measure/MutuallySingular.lean | 114 | 120 | theorem sum_left {ι : Type*} [Countable ι] {μ : ι → Measure α} : sum μ ⟂ₘ ν ↔ ∀ i, μ i ⟂ₘ ν := by |
refine ⟨fun h i => h.mono (le_sum _ _) le_rfl, fun H => ?_⟩
choose s hsm hsμ hsν using H
refine ⟨⋂ i, s i, MeasurableSet.iInter hsm, ?_, ?_⟩
· rw [sum_apply _ (MeasurableSet.iInter hsm), ENNReal.tsum_eq_zero]
exact fun i => measure_mono_null (iInter_subset _ _) (hsμ i)
· rwa [compl_iInter, measure_iUnion... | [
" μ ⟂ₘ ν",
" ν (toMeasurable μ s)ᶜ = 0",
" x ∈ toMeasurable μ s",
" μ.restrict h.nullSet = 0",
" ν.restrict h.nullSetᶜ = 0",
" μ ⟂ₘ μ ↔ μ = 0",
" μ ⟂ₘ μ",
" 0 ⟂ₘ 0",
" μ ⟂ₘ μ → μ = 0",
" μ = 0",
" μ univ = 0",
" sum μ ⟂ₘ ν ↔ ∀ (i : ι), μ i ⟂ₘ ν",
" sum μ ⟂ₘ ν",
" (sum μ) (⋂ i, s i) = 0",
... | [
" μ ⟂ₘ ν",
" ν (toMeasurable μ s)ᶜ = 0",
" x ∈ toMeasurable μ s",
" μ.restrict h.nullSet = 0",
" ν.restrict h.nullSetᶜ = 0",
" μ ⟂ₘ μ ↔ μ = 0",
" μ ⟂ₘ μ",
" 0 ⟂ₘ 0",
" μ ⟂ₘ μ → μ = 0",
" μ = 0",
" μ univ = 0"
] |
import Mathlib.LinearAlgebra.Basis.VectorSpace
import Mathlib.LinearAlgebra.Dimension.Finite
import Mathlib.SetTheory.Cardinal.Subfield
import Mathlib.LinearAlgebra.Dimension.RankNullity
#align_import linear_algebra.dimension from "leanprover-community/mathlib"@"47a5f8186becdbc826190ced4312f8199f9db6a5"
noncomput... | Mathlib/LinearAlgebra/Dimension/DivisionRing.lean | 81 | 108 | theorem rank_add_rank_split (db : V₂ →ₗ[K] V) (eb : V₃ →ₗ[K] V) (cd : V₁ →ₗ[K] V₂)
(ce : V₁ →ₗ[K] V₃) (hde : ⊤ ≤ LinearMap.range db ⊔ LinearMap.range eb) (hgd : ker cd = ⊥)
(eq : db.comp cd = eb.comp ce) (eq₂ : ∀ d e, db d = eb e → ∃ c, cd c = d ∧ ce c = e) :
Module.rank K V + Module.rank K V₁ = Module.rank... |
have hf : Surjective (coprod db eb) := by rwa [← range_eq_top, range_coprod, eq_top_iff]
conv =>
rhs
rw [← rank_prod', rank_eq_of_surjective hf]
congr 1
apply LinearEquiv.rank_eq
let L : V₁ →ₗ[K] ker (coprod db eb) := by -- Porting note: this is needed to avoid a timeout
refine LinearMap.codRestr... | [
" Module.rank K (V ⧸ p) + Module.rank K ↥p = Module.rank K V",
" ∃ s, #↑s = Module.rank K V ∧ LinearIndependent (ι := ↑s) K Subtype.val",
" #↑(range ⇑b) = Module.rank K V",
" Module.rank K V + Module.rank K V₁ = Module.rank K V₂ + Module.rank K V₃",
" Surjective ⇑(db.coprod eb)",
"K R : Type u\nV V₁ V₂ V₃... | [
" Module.rank K (V ⧸ p) + Module.rank K ↥p = Module.rank K V",
" ∃ s, #↑s = Module.rank K V ∧ LinearIndependent (ι := ↑s) K Subtype.val",
" #↑(range ⇑b) = Module.rank K V"
] |
import Mathlib.Algebra.BigOperators.Finprod
import Mathlib.SetTheory.Ordinal.Basic
import Mathlib.Topology.ContinuousFunction.Algebra
import Mathlib.Topology.Compactness.Paracompact
import Mathlib.Topology.ShrinkingLemma
import Mathlib.Topology.UrysohnsLemma
#align_import topology.partition_of_unity from "leanprover-... | Mathlib/Topology/PartitionOfUnity.lean | 297 | 301 | theorem exists_finset_nhd (ρ : PartitionOfUnity ι X univ) (x₀ : X) :
∃ I : Finset ι, ∀ᶠ x in 𝓝 x₀, ∑ i ∈ I, ρ i x = 1 ∧ support (ρ · x) ⊆ I := by |
rcases ρ.exists_finset_nhd' x₀ with ⟨I, H⟩
use I
rwa [nhdsWithin_univ, ← eventually_and] at H
| [
" f = g",
" { toFun := toFun✝, locallyFinite' := locallyFinite'✝, nonneg' := nonneg'✝, sum_eq_one' := sum_eq_one'✝,\n sum_le_one' := sum_le_one'✝ } =\n g",
" { toFun := toFun✝¹, locallyFinite' := locallyFinite'✝¹, nonneg' := nonneg'✝¹, sum_eq_one' := sum_eq_one'✝¹,\n sum_le_one' := sum_le_one'✝¹ } ... | [
" f = g",
" { toFun := toFun✝, locallyFinite' := locallyFinite'✝, nonneg' := nonneg'✝, sum_eq_one' := sum_eq_one'✝,\n sum_le_one' := sum_le_one'✝ } =\n g",
" { toFun := toFun✝¹, locallyFinite' := locallyFinite'✝¹, nonneg' := nonneg'✝¹, sum_eq_one' := sum_eq_one'✝¹,\n sum_le_one' := sum_le_one'✝¹ } ... |
import Mathlib.Analysis.Convex.Combination
import Mathlib.Analysis.Convex.Extreme
#align_import analysis.convex.independent from "leanprover-community/mathlib"@"fefd8a38be7811574cd2ec2f77d3a393a407f112"
open scoped Classical
open Affine
open Finset Function
variable {𝕜 E ι : Type*}
section OrderedSemiring
va... | Mathlib/Analysis/Convex/Independent.lean | 65 | 69 | theorem Subsingleton.convexIndependent [Subsingleton ι] (p : ι → E) : ConvexIndependent 𝕜 p := by |
intro s x hx
have : (convexHull 𝕜 (p '' s)).Nonempty := ⟨p x, hx⟩
rw [convexHull_nonempty_iff, Set.image_nonempty] at this
rwa [Subsingleton.mem_iff_nonempty]
| [
" ConvexIndependent 𝕜 p",
" x ∈ s"
] | [] |
import Aesop
import Mathlib.Algebra.Group.Defs
import Mathlib.Data.Nat.Defs
import Mathlib.Data.Int.Defs
import Mathlib.Logic.Function.Basic
import Mathlib.Tactic.Cases
import Mathlib.Tactic.SimpRw
import Mathlib.Tactic.SplitIfs
#align_import algebra.group.basic from "leanprover-community/mathlib"@"a07d750983b94c530a... | Mathlib/Algebra/Group/Basic.lean | 128 | 130 | theorem comp_mul_right (x y : α) : (· * x) ∘ (· * y) = (· * (y * x)) := by |
ext z
simp [mul_assoc]
| [
" ((fun x_1 => x * x_1) ∘ fun x => y * x) = fun x_1 => x * y * x_1",
" ((fun x_1 => x * x_1) ∘ fun x => y * x) z = x * y * z",
" ((fun x_1 => x_1 * x) ∘ fun x => x * y) = fun x_1 => x_1 * (y * x)",
" ((fun x_1 => x_1 * x) ∘ fun x => x * y) z = z * (y * x)"
] | [
" ((fun x_1 => x * x_1) ∘ fun x => y * x) = fun x_1 => x * y * x_1",
" ((fun x_1 => x * x_1) ∘ fun x => y * x) z = x * y * z"
] |
import Mathlib.Init.Function
import Mathlib.Logic.Function.Basic
#align_import data.sigma.basic from "leanprover-community/mathlib"@"a148d797a1094ab554ad4183a4ad6f130358ef64"
open Function
namespace PSigma
variable {α : Sort*} {β : α → Sort*}
def elim {γ} (f : ∀ a, β a → γ) (a : PSigma β) : γ :=
PSigma.cases... | Mathlib/Data/Sigma/Basic.lean | 273 | 274 | theorem ext_iff {x₀ x₁ : PSigma β} : x₀ = x₁ ↔ x₀.1 = x₁.1 ∧ HEq x₀.2 x₁.2 := by |
cases x₀; cases x₁; exact PSigma.mk.inj_iff
| [
" x₀ = x₁ ↔ x₀.fst = x₁.fst ∧ HEq x₀.snd x₁.snd",
" ⟨fst✝, snd✝⟩ = x₁ ↔ ⟨fst✝, snd✝⟩.fst = x₁.fst ∧ HEq ⟨fst✝, snd✝⟩.snd x₁.snd",
" ⟨fst✝¹, snd✝¹⟩ = ⟨fst✝, snd✝⟩ ↔ ⟨fst✝¹, snd✝¹⟩.fst = ⟨fst✝, snd✝⟩.fst ∧ HEq ⟨fst✝¹, snd✝¹⟩.snd ⟨fst✝, snd✝⟩.snd"
] | [] |
import Mathlib.Order.ConditionallyCompleteLattice.Basic
import Mathlib.Order.LatticeIntervals
import Mathlib.Order.Interval.Set.OrdConnected
#align_import order.complete_lattice_intervals from "leanprover-community/mathlib"@"207cfac9fcd06138865b5d04f7091e46d9320432"
open scoped Classical
open Set
variable {ι : ... | Mathlib/Order/CompleteLatticeIntervals.lean | 272 | 275 | theorem coe_biInf : (↑(⨅ i, ⨅ (_ : p i), f i) : α) = a ⊓ ⨅ i, ⨅ (_ : p i), (f i : α) := by |
cases isEmpty_or_nonempty ι
· simp
· simp_rw [coe_iInf, ← inf_iInf, ← inf_assoc, inf_idem]
| [
" sSup (Subtype.val '' S) ∈ Iic a",
" a ⊓ sInf (Subtype.val '' S) ∈ Iic a",
" ∀ (x : ↑(Iic a)), x ≤ ⊤",
" ∀ (x : ↑(Iic a)), ⊥ ≤ x",
" ↑(⨆ i, f i) = ⨆ i, ↑(f i)",
" sSup (Subtype.val '' range fun i => f i) = ⨆ i, ↑(f i)",
" (Subtype.val '' range fun i => f i) = range fun i => ↑(f i)",
" (x✝ ∈ Subtype.v... | [
" sSup (Subtype.val '' S) ∈ Iic a",
" a ⊓ sInf (Subtype.val '' S) ∈ Iic a",
" ∀ (x : ↑(Iic a)), x ≤ ⊤",
" ∀ (x : ↑(Iic a)), ⊥ ≤ x",
" ↑(⨆ i, f i) = ⨆ i, ↑(f i)",
" sSup (Subtype.val '' range fun i => f i) = ⨆ i, ↑(f i)",
" (Subtype.val '' range fun i => f i) = range fun i => ↑(f i)",
" (x✝ ∈ Subtype.v... |
import Mathlib.LinearAlgebra.FiniteDimensional
import Mathlib.LinearAlgebra.Matrix.GeneralLinearGroup
import Mathlib.LinearAlgebra.Matrix.Nondegenerate
import Mathlib.LinearAlgebra.Matrix.NonsingularInverse
import Mathlib.LinearAlgebra.Matrix.ToLin
import Mathlib.RingTheory.Localization.FractionRing
import Mathlib.Rin... | Mathlib/LinearAlgebra/Matrix/ToLinearEquiv.lean | 175 | 177 | theorem exists_vecMul_eq_zero_iff {A : Type*} [DecidableEq n] [CommRing A] [IsDomain A]
{M : Matrix n n A} : (∃ v ≠ 0, v ᵥ* M = 0) ↔ M.det = 0 := by |
simpa only [← M.det_transpose, ← mulVec_transpose] using exists_mulVec_eq_zero_iff
| [
" (∃ v, v ≠ 0 ∧ M *ᵥ v = 0) ↔ M.det = 0",
" (∃ v, v ≠ 0 ∧ M *ᵥ v = 0) → M.det = 0",
" M.det = 0",
" v = 0",
" M.det = 0 → ∃ v, v ≠ 0 ∧ M *ᵥ v = 0",
" (∀ (v : n → K), v ≠ 0 → M *ᵥ v ≠ 0) → M.det ≠ 0",
" M.det ≠ 0",
" Function.Injective ⇑(toLin' M)",
" M * toMatrix' ↑(LinearEquiv.ofInjectiveEndo (toLi... | [
" (∃ v, v ≠ 0 ∧ M *ᵥ v = 0) ↔ M.det = 0",
" (∃ v, v ≠ 0 ∧ M *ᵥ v = 0) → M.det = 0",
" M.det = 0",
" v = 0",
" M.det = 0 → ∃ v, v ≠ 0 ∧ M *ᵥ v = 0",
" (∀ (v : n → K), v ≠ 0 → M *ᵥ v ≠ 0) → M.det ≠ 0",
" M.det ≠ 0",
" Function.Injective ⇑(toLin' M)",
" M * toMatrix' ↑(LinearEquiv.ofInjectiveEndo (toLi... |
import Mathlib.Order.Cover
import Mathlib.Order.LatticeIntervals
import Mathlib.Order.GaloisConnection
#align_import order.modular_lattice from "leanprover-community/mathlib"@"207cfac9fcd06138865b5d04f7091e46d9320432"
open Set
variable {α : Type*}
class IsWeakUpperModularLattice (α : Type*) [Lattice α] : Prop ... | Mathlib/Order/ModularLattice.lean | 181 | 183 | theorem inf_covBy_of_covBy_sup_right : b ⋖ a ⊔ b → a ⊓ b ⋖ a := by |
rw [inf_comm, sup_comm]
exact inf_covBy_of_covBy_sup_left
| [
" b ⋖ a ⊔ b → a ⊓ b ⋖ a",
" b ⋖ b ⊔ a → b ⊓ a ⋖ a"
] | [] |
import Mathlib.Analysis.Complex.Basic
import Mathlib.Topology.FiberBundle.IsHomeomorphicTrivialBundle
#align_import analysis.complex.re_im_topology from "leanprover-community/mathlib"@"468b141b14016d54b479eb7a0fff1e360b7e3cf6"
open Set
noncomputable section
namespace Complex
theorem isHomeomorphicTrivialFiber... | Mathlib/Analysis/Complex/ReImTopology.lean | 134 | 135 | theorem frontier_setOf_re_le (a : ℝ) : frontier { z : ℂ | z.re ≤ a } = { z | z.re = a } := by |
simpa only [frontier_Iic] using frontier_preimage_re (Iic a)
| [
" interior {z | z.re ≤ a} = {z | z.re < a}",
" interior {z | z.im ≤ a} = {z | z.im < a}",
" interior {z | a ≤ z.re} = {z | a < z.re}",
" interior {z | a ≤ z.im} = {z | a < z.im}",
" closure {z | z.re < a} = {z | z.re ≤ a}",
" closure {z | z.im < a} = {z | z.im ≤ a}",
" closure {z | a < z.re} = {z | a ≤ ... | [
" interior {z | z.re ≤ a} = {z | z.re < a}",
" interior {z | z.im ≤ a} = {z | z.im < a}",
" interior {z | a ≤ z.re} = {z | a < z.re}",
" interior {z | a ≤ z.im} = {z | a < z.im}",
" closure {z | z.re < a} = {z | z.re ≤ a}",
" closure {z | z.im < a} = {z | z.im ≤ a}",
" closure {z | a < z.re} = {z | a ≤ ... |
import Mathlib.Analysis.Calculus.Deriv.Basic
import Mathlib.Analysis.Calculus.ContDiff.Defs
#align_import analysis.calculus.iterated_deriv from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe"
noncomputable section
open scoped Classical Topology
open Filter Asymptotics Set
variable {𝕜... | Mathlib/Analysis/Calculus/IteratedDeriv/Defs.lean | 69 | 71 | theorem iteratedDerivWithin_univ : iteratedDerivWithin n f univ = iteratedDeriv n f := by |
ext x
rw [iteratedDerivWithin, iteratedDeriv, iteratedFDerivWithin_univ]
| [
" iteratedDerivWithin n f univ = iteratedDeriv n f",
" iteratedDerivWithin n f univ x = iteratedDeriv n f x"
] | [] |
import Mathlib.Init.Classical
import Mathlib.Order.FixedPoints
import Mathlib.Order.Zorn
#align_import set_theory.cardinal.schroeder_bernstein from "leanprover-community/mathlib"@"1e05171a5e8cf18d98d9cf7b207540acb044acae"
open Set Function
open scoped Classical
universe u v
namespace Function
namespace Embedd... | Mathlib/SetTheory/Cardinal/SchroederBernstein.lean | 47 | 76 | theorem schroeder_bernstein {f : α → β} {g : β → α} (hf : Function.Injective f)
(hg : Function.Injective g) : ∃ h : α → β, Bijective h := by |
cases' isEmpty_or_nonempty β with hβ hβ
· have : IsEmpty α := Function.isEmpty f
exact ⟨_, ((Equiv.equivEmpty α).trans (Equiv.equivEmpty β).symm).bijective⟩
set F : Set α →o Set α :=
{ toFun := fun s => (g '' (f '' s)ᶜ)ᶜ
monotone' := fun s t hst =>
compl_subset_compl.mpr <| image_subset _ <... | [
" ∃ h, Bijective h",
" (g '' (f '' s)ᶜ)ᶜ = sᶜᶜ",
" g' '' sᶜ = (f '' s)ᶜ",
" Surjective h",
" Injective h",
" InjOn g' sᶜ",
" x = y",
" x ∈ g '' (f '' s)ᶜ",
" g x' = y",
" y ∈ g '' (f '' s)ᶜ",
" g x' = g y'",
" ∀ x ∈ s, ∀ y ∉ s, f x ≠ g' y",
" False"
] | [] |
import Mathlib.Dynamics.Ergodic.MeasurePreserving
#align_import dynamics.ergodic.ergodic from "leanprover-community/mathlib"@"809e920edfa343283cea507aedff916ea0f1bd88"
open Set Function Filter MeasureTheory MeasureTheory.Measure
open ENNReal
variable {α : Type*} {m : MeasurableSpace α} (f : α → α) {s : Set α}
... | Mathlib/Dynamics/Ergodic/Ergodic.lean | 89 | 96 | theorem preErgodic_of_preErgodic_conjugate (hg : MeasurePreserving g μ μ') (hf : PreErgodic f μ)
{f' : β → β} (h_comm : g ∘ f = f' ∘ g) : PreErgodic f' μ' :=
⟨by
intro s hs₀ hs₁
replace hs₁ : f ⁻¹' (g ⁻¹' s) = g ⁻¹' s := by | rw [← preimage_comp, h_comm, preimage_comp, hs₁]
cases' hf.ae_empty_or_univ (hg.measurable hs₀) hs₁ with hs₂ hs₂ <;> [left; right]
· simpa only [ae_eq_empty, hg.measure_preimage hs₀] using hs₂
· simpa only [ae_eq_univ, ← preimage_compl, hg.measure_preimage hs₀.compl] using hs₂⟩
| [
" ∀ ⦃s : Set β⦄, MeasurableSet s → f' ⁻¹' s = s → s =ᶠ[ae μ'] ∅ ∨ s =ᶠ[ae μ'] univ",
" s =ᶠ[ae μ'] ∅ ∨ s =ᶠ[ae μ'] univ",
" f ⁻¹' (g ⁻¹' s) = g ⁻¹' s",
" s =ᶠ[ae μ'] ∅",
" s =ᶠ[ae μ'] univ"
] | [] |
import Mathlib.MeasureTheory.Measure.Content
import Mathlib.MeasureTheory.Group.Prod
import Mathlib.Topology.Algebra.Group.Compact
#align_import measure_theory.measure.haar.basic from "leanprover-community/mathlib"@"fd5edc43dc4f10b85abfe544b88f82cf13c5f844"
noncomputable section
open Set Inv Function Topological... | Mathlib/MeasureTheory/Measure/Haar/Basic.lean | 128 | 129 | theorem prehaar_nonneg (K₀ : PositiveCompacts G) {U : Set G} (K : Compacts G) :
0 ≤ prehaar (K₀ : Set G) U K := by | apply div_nonneg <;> norm_cast <;> apply zero_le
| [
" index ∅ V = 0",
" 0 ∈ Finset.card '' {t | ∅ ⊆ ⋃ g ∈ t, (fun h => g * h) ⁻¹' V} ∨\n Finset.card '' {t | ∅ ⊆ ⋃ g ∈ t, (fun h => g * h) ⁻¹' V} = ∅",
" 0 ∈ Finset.card '' {t | ∅ ⊆ ⋃ g ∈ t, (fun h => g * h) ⁻¹' V}",
" ∅ ∈ {t | ∅ ⊆ ⋃ g ∈ t, (fun h => g * h) ⁻¹' V} ∧ ∅.card = 0",
" prehaar (↑K₀) U ⊥ = 0",
"... | [
" index ∅ V = 0",
" 0 ∈ Finset.card '' {t | ∅ ⊆ ⋃ g ∈ t, (fun h => g * h) ⁻¹' V} ∨\n Finset.card '' {t | ∅ ⊆ ⋃ g ∈ t, (fun h => g * h) ⁻¹' V} = ∅",
" 0 ∈ Finset.card '' {t | ∅ ⊆ ⋃ g ∈ t, (fun h => g * h) ⁻¹' V}",
" ∅ ∈ {t | ∅ ⊆ ⋃ g ∈ t, (fun h => g * h) ⁻¹' V} ∧ ∅.card = 0",
" prehaar (↑K₀) U ⊥ = 0"
] |
import Mathlib.Data.Finsupp.Encodable
import Mathlib.LinearAlgebra.Pi
import Mathlib.LinearAlgebra.Span
import Mathlib.Data.Set.Countable
#align_import linear_algebra.finsupp from "leanprover-community/mathlib"@"9d684a893c52e1d6692a504a118bfccbae04feeb"
noncomputable section
open Set LinearMap Submodule
namespa... | Mathlib/LinearAlgebra/Finsupp.lean | 245 | 252 | theorem lsingle_range_le_ker_lapply (s t : Set α) (h : Disjoint s t) :
⨆ a ∈ s, LinearMap.range (lsingle a : M →ₗ[R] α →₀ M) ≤
⨅ a ∈ t, ker (lapply a : (α →₀ M) →ₗ[R] M) := by |
refine iSup_le fun a₁ => iSup_le fun h₁ => range_le_iff_comap.2 ?_
simp only [(ker_comp _ _).symm, eq_top_iff, SetLike.le_def, mem_ker, comap_iInf, mem_iInf]
intro b _ a₂ h₂
have : a₁ ≠ a₂ := fun eq => h.le_bot ⟨h₁, eq.symm ▸ h₂⟩
exact single_eq_of_ne this
| [
" ⇑(x + y) = ⇑x + ⇑y",
" (x + y) x✝ = (⇑x + ⇑y) x✝",
" { toFun := DFunLike.coe, map_add' := ⋯ }.toFun (x • y) =\n (RingHom.id R) x • { toFun := DFunLike.coe, map_add' := ⋯ }.toFun y",
" { toFun := DFunLike.coe, map_add' := ⋯ }.toFun (x • y) x✝ =\n ((RingHom.id R) x • { toFun := DFunLike.coe, map_add' :=... | [
" ⇑(x + y) = ⇑x + ⇑y",
" (x + y) x✝ = (⇑x + ⇑y) x✝",
" { toFun := DFunLike.coe, map_add' := ⋯ }.toFun (x • y) =\n (RingHom.id R) x • { toFun := DFunLike.coe, map_add' := ⋯ }.toFun y",
" { toFun := DFunLike.coe, map_add' := ⋯ }.toFun (x • y) x✝ =\n ((RingHom.id R) x • { toFun := DFunLike.coe, map_add' :=... |
import Mathlib.Algebra.CharP.LocalRing
import Mathlib.RingTheory.Ideal.Quotient
import Mathlib.Tactic.FieldSimp
#align_import algebra.char_p.mixed_char_zero from "leanprover-community/mathlib"@"70fd9563a21e7b963887c9360bd29b2393e6225a"
variable (R : Type*) [CommRing R]
class MixedCharZero (p : ℕ) : Prop where
... | Mathlib/Algebra/CharP/MixedCharZero.lean | 250 | 260 | theorem of_not_mixedCharZero [CharZero R] (h : ∀ p > 0, ¬MixedCharZero R p) :
∀ I : Ideal R, I ≠ ⊤ → CharZero (R ⧸ I) := by |
intro I hI_ne_top
suffices CharP (R ⧸ I) 0 from CharP.charP_to_charZero _
cases CharP.exists (R ⧸ I) with
| intro p hp =>
cases p with
| zero => exact hp
| succ p =>
have h_mixed : MixedCharZero R p.succ := ⟨⟨I, ⟨hI_ne_top, hp⟩⟩⟩
exact absurd h_mixed (h p.succ p.succ_pos)
| [
" ∀ (I : Ideal R), I ≠ ⊤ → CharZero (R ⧸ I)",
" CharZero (R ⧸ I)",
" Function.Injective Nat.cast",
" a = b",
" I = ⊤",
" (algebraMap ℚ R) (↑a - ↑b) ∈ I",
" ↑a - ↑b ≠ 0",
" CharP (R ⧸ I) 0"
] | [
" ∀ (I : Ideal R), I ≠ ⊤ → CharZero (R ⧸ I)",
" CharZero (R ⧸ I)",
" Function.Injective Nat.cast",
" a = b",
" I = ⊤",
" (algebraMap ℚ R) (↑a - ↑b) ∈ I",
" ↑a - ↑b ≠ 0"
] |
import Mathlib.CategoryTheory.Limits.Shapes.ZeroMorphisms
import Mathlib.CategoryTheory.Limits.Shapes.Kernels
import Mathlib.CategoryTheory.Abelian.Basic
import Mathlib.CategoryTheory.Subobject.Lattice
import Mathlib.Order.Atoms
#align_import category_theory.simple from "leanprover-community/mathlib"@"4ed0bcaef698011... | Mathlib/CategoryTheory/Simple.lean | 119 | 120 | theorem Simple.not_isZero (X : C) [Simple X] : ¬IsZero X := by |
simpa [Limits.IsZero.iff_id_eq_zero] using id_nonzero X
| [
" IsIso f ↔ f ≠ 0",
" IsIso f → f ≠ 0",
" False",
" IsIso (f ≫ i.hom)",
" f ≠ 0 → IsIso f",
" IsIso f",
" f ≫ i.hom ≠ 0",
" f = 0",
" IsIso ((f ≫ i.hom) ≫ i.inv)",
" kernel.ι f = 0",
" Epi f",
" Epi (factorThruImage f ≫ image.ι f)",
" IsIso (𝟙 X)",
" ¬IsZero X"
] | [
" IsIso f ↔ f ≠ 0",
" IsIso f → f ≠ 0",
" False",
" IsIso (f ≫ i.hom)",
" f ≠ 0 → IsIso f",
" IsIso f",
" f ≫ i.hom ≠ 0",
" f = 0",
" IsIso ((f ≫ i.hom) ≫ i.inv)",
" kernel.ι f = 0",
" Epi f",
" Epi (factorThruImage f ≫ image.ι f)",
" IsIso (𝟙 X)"
] |
import Mathlib.Data.Matrix.Basis
import Mathlib.LinearAlgebra.Basis
import Mathlib.LinearAlgebra.Pi
#align_import linear_algebra.std_basis from "leanprover-community/mathlib"@"13bce9a6b6c44f6b4c91ac1c1d2a816e2533d395"
open Function Set Submodule
namespace LinearMap
variable (R : Type*) {ι : Type*} [Semiring R] ... | Mathlib/LinearAlgebra/StdBasis.lean | 84 | 85 | theorem proj_comp_stdBasis (i j : ι) : (proj i).comp (stdBasis R φ j) = diag j i := by |
rw [stdBasis_eq_pi_diag, proj_pi]
| [
" (stdBasis R (fun _x => R) i) 1 i' = if i = i' then 1 else 0",
" (if i' = i then 1 else 0) = if i = i' then 1 else 0",
" (i' = i) = (i = i')",
" stdBasis R φ i = pi (diag i)",
" (stdBasis R φ i) x j = (pi (diag i)) x j",
" x = id x",
" proj i ∘ₗ stdBasis R φ j = diag j i"
] | [
" (stdBasis R (fun _x => R) i) 1 i' = if i = i' then 1 else 0",
" (if i' = i then 1 else 0) = if i = i' then 1 else 0",
" (i' = i) = (i = i')",
" stdBasis R φ i = pi (diag i)",
" (stdBasis R φ i) x j = (pi (diag i)) x j",
" x = id x"
] |
import Mathlib.Geometry.Euclidean.Angle.Oriented.RightAngle
import Mathlib.Geometry.Euclidean.Circumcenter
#align_import geometry.euclidean.angle.sphere from "leanprover-community/mathlib"@"46b633fd842bef9469441c0209906f6dddd2b4f5"
noncomputable section
open FiniteDimensional Complex
open scoped EuclideanGeomet... | Mathlib/Geometry/Euclidean/Angle/Sphere.lean | 32 | 48 | theorem oangle_eq_two_zsmul_oangle_sub_of_norm_eq {x y z : V} (hxyne : x ≠ y) (hxzne : x ≠ z)
(hxy : ‖x‖ = ‖y‖) (hxz : ‖x‖ = ‖z‖) : o.oangle y z = (2 : ℤ) • o.oangle (y - x) (z - x) := by |
have hy : y ≠ 0 := by
rintro rfl
rw [norm_zero, norm_eq_zero] at hxy
exact hxyne hxy
have hx : x ≠ 0 := norm_ne_zero_iff.1 (hxy.symm ▸ norm_ne_zero_iff.2 hy)
have hz : z ≠ 0 := norm_ne_zero_iff.1 (hxz ▸ norm_ne_zero_iff.2 hx)
calc
o.oangle y z = o.oangle x z - o.oangle x y := (o.oangle_sub_left... | [
" o.oangle y z = 2 • o.oangle (y - x) (z - x)",
" y ≠ 0",
" False",
" o.oangle x z - o.oangle x y = ↑π - 2 • o.oangle (x - z) x - (↑π - 2 • o.oangle (x - y) x)",
" ↑π - 2 • o.oangle (x - z) x - (↑π - 2 • o.oangle (x - y) x) = 2 • (o.oangle (x - y) x - o.oangle (x - z) x)",
" 2 • (o.oangle (x - y) x - o.oa... | [] |
import Mathlib.RingTheory.WittVector.IsPoly
#align_import ring_theory.witt_vector.mul_p from "leanprover-community/mathlib"@"7abfbc92eec87190fba3ed3d5ec58e7c167e7144"
namespace WittVector
variable {p : ℕ} {R : Type*} [hp : Fact p.Prime] [CommRing R]
local notation "𝕎" => WittVector p -- type as `\bbW`
open Mv... | Mathlib/RingTheory/WittVector/MulP.lean | 50 | 60 | theorem mulN_coeff (n : ℕ) (x : 𝕎 R) (k : ℕ) :
(x * n).coeff k = aeval x.coeff (wittMulN p n k) := by |
induction' n with n ih generalizing k
· simp only [Nat.zero_eq, Nat.cast_zero, mul_zero, zero_coeff, wittMulN,
AlgHom.map_zero, Pi.zero_apply]
· rw [wittMulN, Nat.cast_add, Nat.cast_one, mul_add, mul_one, aeval_bind₁, add_coeff]
apply eval₂Hom_congr (RingHom.ext_int _ _) _ rfl
ext1 ⟨b, i⟩
fin_c... | [
" (x * ↑n).coeff k = (aeval x.coeff) (wittMulN p n k)",
" (x * ↑0).coeff k = (aeval x.coeff) (wittMulN p 0 k)",
" (x * ↑(n + 1)).coeff k = (aeval x.coeff) (wittMulN p (n + 1) k)",
" peval (wittAdd p k) ![(x * ↑n).coeff, x.coeff] =\n (aeval fun i => (aeval x.coeff) (Function.uncurry ![wittMulN p n, X] i)) (... | [] |
import Mathlib.Data.Fintype.Option
import Mathlib.Data.Fintype.Prod
import Mathlib.Data.Fintype.Pi
import Mathlib.Data.Vector.Basic
import Mathlib.Data.PFun
import Mathlib.Logic.Function.Iterate
import Mathlib.Order.Basic
import Mathlib.Tactic.ApplyFun
#align_import computability.turing_machine from "leanprover-commu... | Mathlib/Computability/TuringMachine.lean | 91 | 95 | theorem BlankExtends.below_of_le {Γ} [Inhabited Γ] {l l₁ l₂ : List Γ} :
BlankExtends l l₁ → BlankExtends l l₂ → l₁.length ≤ l₂.length → BlankExtends l₁ l₂ := by |
rintro ⟨i, rfl⟩ ⟨j, rfl⟩ h; use j - i
simp only [List.length_append, Nat.add_le_add_iff_left, List.length_replicate] at h
simp only [← List.replicate_add, Nat.add_sub_cancel' h, List.append_assoc]
| [
" l = l ++ List.replicate 0 default",
" BlankExtends l₁ l₂ → BlankExtends l₂ l₃ → BlankExtends l₁ l₃",
" BlankExtends l₁ (l₁ ++ List.replicate i default ++ List.replicate j default)",
" l₁ ++ List.replicate i default ++ List.replicate j default = l₁ ++ List.replicate (i + j) default",
" BlankExtends l l₁ → ... | [
" l = l ++ List.replicate 0 default",
" BlankExtends l₁ l₂ → BlankExtends l₂ l₃ → BlankExtends l₁ l₃",
" BlankExtends l₁ (l₁ ++ List.replicate i default ++ List.replicate j default)",
" l₁ ++ List.replicate i default ++ List.replicate j default = l₁ ++ List.replicate (i + j) default"
] |
import Mathlib.Algebra.Polynomial.Module.Basic
import Mathlib.Analysis.Calculus.Deriv.Pow
import Mathlib.Analysis.Calculus.IteratedDeriv.Defs
import Mathlib.Analysis.Calculus.MeanValue
#align_import analysis.calculus.taylor from "leanprover-community/mathlib"@"3a69562db5a458db8322b190ec8d9a8bbd8a5b14"
open scoped... | Mathlib/Analysis/Calculus/Taylor.lean | 114 | 120 | theorem taylor_within_apply (f : ℝ → E) (n : ℕ) (s : Set ℝ) (x₀ x : ℝ) :
taylorWithinEval f n s x₀ x =
∑ k ∈ Finset.range (n + 1), ((k ! : ℝ)⁻¹ * (x - x₀) ^ k) • iteratedDerivWithin k f s x₀ := by |
induction' n with k hk
· simp
rw [taylorWithinEval_succ, Finset.sum_range_succ, hk]
simp [Nat.factorial]
| [
" taylorWithin f (n + 1) s x₀ =\n taylorWithin f n s x₀ +\n (PolynomialModule.comp (Polynomial.X - Polynomial.C x₀))\n ((PolynomialModule.single ℝ (n + 1)) (taylorCoeffWithin f (n + 1) s x₀))",
" ∑ k ∈ Finset.range (n + 1 + 1),\n (PolynomialModule.comp (Polynomial.X - Polynomial.C x₀))\n ... | [
" taylorWithin f (n + 1) s x₀ =\n taylorWithin f n s x₀ +\n (PolynomialModule.comp (Polynomial.X - Polynomial.C x₀))\n ((PolynomialModule.single ℝ (n + 1)) (taylorCoeffWithin f (n + 1) s x₀))",
" ∑ k ∈ Finset.range (n + 1 + 1),\n (PolynomialModule.comp (Polynomial.X - Polynomial.C x₀))\n ... |
import Mathlib.Algebra.Group.Prod
import Mathlib.Order.Cover
#align_import algebra.support from "leanprover-community/mathlib"@"29cb56a7b35f72758b05a30490e1f10bd62c35c1"
assert_not_exists MonoidWithZero
open Set
namespace Function
variable {α β A B M N P G : Type*}
section One
variable [One M] [One N] [One P]
... | Mathlib/Algebra/Group/Support.lean | 73 | 76 | theorem mulSupport_eq_iff {f : α → M} {s : Set α} :
mulSupport f = s ↔ (∀ x, x ∈ s → f x ≠ 1) ∧ ∀ x, x ∉ s → f x = 1 := by |
simp (config := { contextual := true }) only [ext_iff, mem_mulSupport, ne_eq, iff_def,
not_imp_comm, and_comm, forall_and]
| [
" mulSupport f = s ↔ (∀ x ∈ s, f x ≠ 1) ∧ ∀ x ∉ s, f x = 1"
] | [] |
import Mathlib.Topology.Algebra.UniformGroup
import Mathlib.Topology.UniformSpace.Pi
import Mathlib.Data.Matrix.Basic
#align_import topology.uniform_space.matrix from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982"
open Uniformity Topology
variable (m n 𝕜 : Type*) [UniformSpace 𝕜]
na... | Mathlib/Topology/UniformSpace/Matrix.lean | 30 | 34 | theorem uniformity :
𝓤 (Matrix m n 𝕜) = ⨅ (i : m) (j : n), (𝓤 𝕜).comap fun a => (a.1 i j, a.2 i j) := by |
erw [Pi.uniformity]
simp_rw [Pi.uniformity, Filter.comap_iInf, Filter.comap_comap]
rfl
| [
" UniformSpace (m → n → 𝕜)",
" 𝓤 (Matrix m n 𝕜) = ⨅ i, ⨅ j, Filter.comap (fun a => (a.1 i j, a.2 i j)) (𝓤 𝕜)",
" ⨅ i, Filter.comap (fun a => (a.1 i, a.2 i)) (𝓤 (n → 𝕜)) = ⨅ i, ⨅ j, Filter.comap (fun a => (a.1 i j, a.2 i j)) (𝓤 𝕜)",
" ⨅ i, ⨅ i_1, Filter.comap ((fun a => (a.1 i_1, a.2 i_1)) ∘ fun a => ... | [
" UniformSpace (m → n → 𝕜)"
] |
import Mathlib.Data.ENat.Lattice
import Mathlib.Order.OrderIsoNat
import Mathlib.Tactic.TFAE
#align_import order.height from "leanprover-community/mathlib"@"bf27744463e9620ca4e4ebe951fe83530ae6949b"
open List hiding le_antisymm
open OrderDual
universe u v
variable {α β : Type*}
namespace Set
section LT
varia... | Mathlib/Order/Height.lean | 70 | 73 | theorem cons_mem_subchain_iff :
(a::l) ∈ s.subchain ↔ a ∈ s ∧ l ∈ s.subchain ∧ ∀ b ∈ l.head?, a < b := by |
simp only [subchain, mem_setOf_eq, forall_mem_cons, chain'_cons', and_left_comm, and_comm,
and_assoc]
| [
" a :: l ∈ s.subchain ↔ a ∈ s ∧ l ∈ s.subchain ∧ ∀ b ∈ l.head?, a < b"
] | [] |
import Mathlib.Algebra.Polynomial.Eval
#align_import data.polynomial.degree.lemmas from "leanprover-community/mathlib"@"728baa2f54e6062c5879a3e397ac6bac323e506f"
noncomputable section
open Polynomial
open Finsupp Finset
namespace Polynomial
universe u v w
variable {R : Type u} {S : Type v} {ι : Type w} {a b ... | Mathlib/Algebra/Polynomial/Degree/Lemmas.lean | 37 | 61 | theorem natDegree_comp_le : natDegree (p.comp q) ≤ natDegree p * natDegree q :=
letI := Classical.decEq R
if h0 : p.comp q = 0 then by rw [h0, natDegree_zero]; exact Nat.zero_le _
else
WithBot.coe_le_coe.1 <|
calc
↑(natDegree (p.comp q)) = degree (p.comp q) := (degree_eq_natDegree h0).symm
... |
rw [natDegree_C, Nat.cast_zero, zero_add, nsmul_eq_mul];
simp
_ ≤ (natDegree p * natDegree q : ℕ) :=
WithBot.coe_le_coe.2 <|
mul_le_mul_of_nonneg_right (le_natDegree_of_ne_zero (mem_support_iff.1 hn))
(Nat.zero_le _)
| [
" (p.comp q).natDegree ≤ p.natDegree * q.natDegree",
" 0 ≤ p.natDegree * q.natDegree",
" ↑(C (p.coeff n)).natDegree + n • ↑q.natDegree = ↑(n * q.natDegree)",
" ↑n * ↑q.natDegree = ↑(n * q.natDegree)"
] | [] |
import Mathlib.Probability.Martingale.Upcrossing
import Mathlib.MeasureTheory.Function.UniformIntegrable
import Mathlib.MeasureTheory.Constructions.Polish
#align_import probability.martingale.convergence from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982"
open TopologicalSpace Filter Me... | Mathlib/Probability/Martingale/Convergence.lean | 141 | 152 | theorem tendsto_of_uncrossing_lt_top (hf₁ : liminf (fun n => (‖f n ω‖₊ : ℝ≥0∞)) atTop < ∞)
(hf₂ : ∀ a b : ℚ, a < b → upcrossings a b f ω < ∞) :
∃ c, Tendsto (fun n => f n ω) atTop (𝓝 c) := by |
by_cases h : IsBoundedUnder (· ≤ ·) atTop fun n => |f n ω|
· rw [isBoundedUnder_le_abs] at h
refine tendsto_of_no_upcrossings Rat.denseRange_cast ?_ h.1 h.2
intro a ha b hb hab
obtain ⟨⟨a, rfl⟩, ⟨b, rfl⟩⟩ := ha, hb
exact not_frequently_of_upcrossings_lt_top hab (hf₂ a b (Rat.cast_lt.1 hab)).ne
· ... | [
" ¬((∃ᶠ (n : ℕ) in atTop, f n ω < a) ∧ ∃ᶠ (n : ℕ) in atTop, b < f n ω)",
" ∃ k, ∀ (N : ℕ), upcrossingsBefore a b f N ω < k",
" False",
" ¬∃ k, ∀ (N : ℕ), upcrossingsBefore a b f N ω < k",
" ∀ (k : ℕ), ∃ N, k ≤ upcrossingsBefore a b f N ω",
" ∃ N, k ≤ upcrossingsBefore a b f N ω",
" ∃ N, 0 ≤ upcrossingsB... | [
" ¬((∃ᶠ (n : ℕ) in atTop, f n ω < a) ∧ ∃ᶠ (n : ℕ) in atTop, b < f n ω)",
" ∃ k, ∀ (N : ℕ), upcrossingsBefore a b f N ω < k",
" False",
" ¬∃ k, ∀ (N : ℕ), upcrossingsBefore a b f N ω < k",
" ∀ (k : ℕ), ∃ N, k ≤ upcrossingsBefore a b f N ω",
" ∃ N, k ≤ upcrossingsBefore a b f N ω",
" ∃ N, 0 ≤ upcrossingsB... |
import Mathlib.Algebra.Polynomial.BigOperators
import Mathlib.Algebra.Polynomial.Derivative
import Mathlib.Data.Nat.Choose.Cast
import Mathlib.Data.Nat.Choose.Vandermonde
import Mathlib.Tactic.FieldSimp
#align_import data.polynomial.hasse_deriv from "leanprover-community/mathlib"@"a148d797a1094ab554ad4183a4ad6f130358... | Mathlib/Algebra/Polynomial/HasseDeriv.lean | 137 | 139 | theorem hasseDeriv_X (hk : 1 < k) : hasseDeriv k (X : R[X]) = 0 := by |
rw [← monomial_one_one_eq_X, hasseDeriv_monomial, Nat.choose_eq_zero_of_lt hk, Nat.cast_zero,
zero_mul, monomial_zero_right]
| [
" (hasseDeriv k) f = f.sum fun i r => (monomial (i - k)) (↑(i.choose k) * r)",
" (f.sum fun x x_1 => (monomial (x - k)) (x.choose k • x_1)) = f.sum fun i r => (monomial (i - k)) (↑(i.choose k) * r)",
" (fun x x_1 => (monomial (x - k)) (x.choose k • x_1)) = fun i r => (monomial (i - k)) (↑(i.choose k) * r)",
"... | [
" (hasseDeriv k) f = f.sum fun i r => (monomial (i - k)) (↑(i.choose k) * r)",
" (f.sum fun x x_1 => (monomial (x - k)) (x.choose k • x_1)) = f.sum fun i r => (monomial (i - k)) (↑(i.choose k) * r)",
" (fun x x_1 => (monomial (x - k)) (x.choose k • x_1)) = fun i r => (monomial (i - k)) (↑(i.choose k) * r)",
"... |
import Mathlib.Tactic.NormNum.Basic
import Mathlib.Data.Rat.Cast.CharZero
import Mathlib.Algebra.Field.Basic
set_option autoImplicit true
namespace Mathlib.Meta.NormNum
open Lean.Meta Qq
def inferCharZeroOfRing {α : Q(Type u)} (_i : Q(Ring $α) := by with_reducible assumption) :
MetaM Q(CharZero $α) :=
ret... | Mathlib/Tactic/NormNum/Inv.lean | 106 | 110 | theorem isRat_inv_pos {α} [DivisionRing α] [CharZero α] {a : α} {n d : ℕ} :
IsRat a (.ofNat (Nat.succ n)) d → IsRat a⁻¹ (.ofNat d) (Nat.succ n) := by |
rintro ⟨_, rfl⟩
have := invertibleOfNonzero (α := α) (Nat.cast_ne_zero.2 (Nat.succ_ne_zero n))
exact ⟨this, by simp⟩
| [
" IsRat (mkRat ↑n✝¹ ↑n✝) num✝ denom✝",
" IsRat (↑↑n✝¹ / ↑↑n✝) num✝ denom✝",
" ↑↑n✝ = ↑n✝",
" ↑qi * ↑denom✝ = 1",
" ↑denom✝ * ↑qi = 1",
" ↑(↑num✝ * ⅟↑denom✝) = ↑num✝ * ⅟↑denom✝",
" ↑(↑num✝ * qi) = ↑num✝ * ↑qi",
" IsRat a (Int.ofNat n.succ) d → IsRat a⁻¹ (Int.ofNat d) n.succ",
" IsRat (↑(Int.ofNat n.s... | [
" IsRat (mkRat ↑n✝¹ ↑n✝) num✝ denom✝",
" IsRat (↑↑n✝¹ / ↑↑n✝) num✝ denom✝",
" ↑↑n✝ = ↑n✝",
" ↑qi * ↑denom✝ = 1",
" ↑denom✝ * ↑qi = 1",
" ↑(↑num✝ * ⅟↑denom✝) = ↑num✝ * ⅟↑denom✝",
" ↑(↑num✝ * qi) = ↑num✝ * ↑qi"
] |
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 | 142 | 146 | theorem formPerm_cons_concat_apply_last (x y : α) (xs : List α) :
formPerm (x :: (xs ++ [y])) y = x := by |
induction' xs with z xs IH generalizing x y
· simp
· simp [IH]
| [
" (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.CategoryTheory.Balanced
import Mathlib.CategoryTheory.LiftingProperties.Basic
#align_import category_theory.limits.shapes.strong_epi from "leanprover-community/mathlib"@"32253a1a1071173b33dc7d6a218cf722c6feb514"
universe v u
namespace CategoryTheory
variable {C : Type u} [Category.{v} C]
variable... | Mathlib/CategoryTheory/Limits/Shapes/StrongEpi.lean | 127 | 135 | theorem strongMono_of_strongMono [StrongMono (f ≫ g)] : StrongMono f :=
{ mono := mono_of_mono f g
rlp := fun {X Y} z => by
intros
constructor
intro u v sq
have h₀ : u ≫ f ≫ g = z ≫ v ≫ g := by |
rw [← Category.assoc, eq_whisker sq.w, Category.assoc]
exact CommSq.HasLift.mk' ⟨(CommSq.mk h₀).lift, by simp, by simp [← cancel_epi z, sq.w]⟩ }
| [
" ∀ ⦃X Y : C⦄ (z : X ⟶ Y) [inst : Mono z], HasLiftingProperty (f ≫ g) z",
" HasLiftingProperty (f ≫ g) z✝",
" ∀ ⦃X Y : C⦄ (z : X ⟶ Y) [inst : Epi z], HasLiftingProperty z (f ≫ g)",
" HasLiftingProperty z✝ (f ≫ g)",
" HasLiftingProperty g z",
" ∀ {f : Q ⟶ X} {g_1 : R ⟶ Y} (sq : CommSq f g z g_1), sq.HasLif... | [
" ∀ ⦃X Y : C⦄ (z : X ⟶ Y) [inst : Mono z], HasLiftingProperty (f ≫ g) z",
" HasLiftingProperty (f ≫ g) z✝",
" ∀ ⦃X Y : C⦄ (z : X ⟶ Y) [inst : Epi z], HasLiftingProperty z (f ≫ g)",
" HasLiftingProperty z✝ (f ≫ g)",
" HasLiftingProperty g z",
" ∀ {f : Q ⟶ X} {g_1 : R ⟶ Y} (sq : CommSq f g z g_1), sq.HasLif... |
import Mathlib.RingTheory.IntegrallyClosed
import Mathlib.RingTheory.Trace
import Mathlib.RingTheory.Norm
#align_import ring_theory.discriminant from "leanprover-community/mathlib"@"3e068ece210655b7b9a9477c3aff38a492400aa1"
universe u v w z
open scoped Matrix
open Matrix FiniteDimensional Fintype Polynomial Fin... | Mathlib/RingTheory/Discriminant.lean | 182 | 210 | theorem discr_powerBasis_eq_prod'' [IsSeparable K L] (e : Fin pb.dim ≃ (L →ₐ[K] E)) :
algebraMap K E (discr K pb.basis) =
(-1) ^ (n * (n - 1) / 2) *
∏ i : Fin pb.dim, ∏ j ∈ Ioi i, (e j pb.gen - e i pb.gen) * (e i pb.gen - e j pb.gen) := by |
rw [discr_powerBasis_eq_prod' _ _ _ e]
simp_rw [fun i j => neg_eq_neg_one_mul ((e j pb.gen - e i pb.gen) * (e i pb.gen - e j pb.gen)),
prod_mul_distrib]
congr
simp only [prod_pow_eq_pow_sum, prod_const]
congr
rw [← @Nat.cast_inj ℚ, Nat.cast_sum]
have : ∀ x : Fin pb.dim, ↑x + 1 ≤ pb.dim := by simp [Na... | [
" discr A b = discr A (⇑f ∘ b)",
" (traceMatrix A b).det = discr A (⇑f ∘ b)",
" traceMatrix A b = traceMatrix A (⇑f ∘ b)",
" traceMatrix A b i✝ j✝ = traceMatrix A (⇑f ∘ b) i✝ j✝",
" discr K ⇑b ≠ 0",
" (traceForm K L).Nondegenerate",
" (algebraMap K E) (discr K b) = (embeddingsMatrixReindex K E b e).det ... | [
" discr A b = discr A (⇑f ∘ b)",
" (traceMatrix A b).det = discr A (⇑f ∘ b)",
" traceMatrix A b = traceMatrix A (⇑f ∘ b)",
" traceMatrix A b i✝ j✝ = traceMatrix A (⇑f ∘ b) i✝ j✝",
" discr K ⇑b ≠ 0",
" (traceForm K L).Nondegenerate",
" (algebraMap K E) (discr K b) = (embeddingsMatrixReindex K E b e).det ... |
import Mathlib.CategoryTheory.Sites.IsSheafFor
import Mathlib.CategoryTheory.Limits.Shapes.Types
import Mathlib.Tactic.ApplyFun
#align_import category_theory.sites.sheaf_of_types from "leanprover-community/mathlib"@"70fd9563a21e7b963887c9360bd29b2393e6225a"
universe w v u
namespace CategoryTheory
open Opposite ... | Mathlib/CategoryTheory/Sites/EqualizerSheafCondition.lean | 230 | 240 | theorem compatible_iff (x : FirstObj P R) :
((firstObjEqFamily P R).hom x).Compatible ↔ firstMap P R x = secondMap P R x := by |
rw [Presieve.pullbackCompatible_iff]
constructor
· intro t
apply Limits.Types.limit_ext
rintro ⟨⟨Y, f, hf⟩, Z, g, hg⟩
simpa [firstMap, secondMap] using t hf hg
· intro t Y Z f g hf hg
rw [Types.limit_ext_iff'] at t
simpa [firstMap, secondMap] using t ⟨⟨⟨Y, f, hf⟩, Z, g, hg⟩⟩
| [
" z₁ = z₂",
" ∀ (j : Discrete ((Y : C) × { f // R f })),\n limit.π (Discrete.functor fun f => P.obj { unop := f.fst }) j z₁ =\n limit.π (Discrete.functor fun f => P.obj { unop := f.fst }) j z₂",
" limit.π (Discrete.functor fun f => P.obj { unop := f.fst }) { as := ⟨Y, ⟨f, hf⟩⟩ } z₁ =\n limit.π (Discr... | [
" z₁ = z₂",
" ∀ (j : Discrete ((Y : C) × { f // R f })),\n limit.π (Discrete.functor fun f => P.obj { unop := f.fst }) j z₁ =\n limit.π (Discrete.functor fun f => P.obj { unop := f.fst }) j z₂",
" limit.π (Discrete.functor fun f => P.obj { unop := f.fst }) { as := ⟨Y, ⟨f, hf⟩⟩ } z₁ =\n limit.π (Discr... |
import Mathlib.Data.Stream.Init
import Mathlib.Tactic.ApplyFun
import Mathlib.Control.Fix
import Mathlib.Order.OmegaCompletePartialOrder
#align_import control.lawful_fix from "leanprover-community/mathlib"@"92ca63f0fb391a9ca5f22d2409a6080e786d99f7"
universe u v
open scoped Classical
variable {α : Type*} {β : α →... | Mathlib/Control/LawfulFix.lean | 99 | 112 | theorem exists_fix_le_approx (x : α) : ∃ i, Part.fix f x ≤ approx f i x := by |
by_cases hh : ∃ i b, b ∈ approx f i x
· rcases hh with ⟨i, b, hb⟩
exists i
intro b' h'
have hb' := approx_le_fix f i _ _ hb
obtain rfl := Part.mem_unique h' hb'
exact hb
· simp only [not_exists] at hh
exists 0
intro b' h'
simp only [mem_iff f] at h'
cases' h' with i h'
cas... | [
" approx (⇑f) i ≤ approx (⇑f) i.succ",
" approx (⇑f) 0 ≤ approx (⇑f) (Nat.succ 0)",
" ⊥ ≤ f ⊥",
" approx (⇑f) (n✝ + 1) ≤ approx (⇑f) (n✝ + 1).succ",
" approx (⇑f) (n✝ + 1) i✝ ≤ approx (⇑f) (n✝ + 1).succ i✝",
" approx (⇑f) n✝ ≤ approx (⇑f) (n✝ + 1)",
" approx (⇑f) i ≤ approx (⇑f) j",
" approx (⇑f) i ≤ ... | [
" approx (⇑f) i ≤ approx (⇑f) i.succ",
" approx (⇑f) 0 ≤ approx (⇑f) (Nat.succ 0)",
" ⊥ ≤ f ⊥",
" approx (⇑f) (n✝ + 1) ≤ approx (⇑f) (n✝ + 1).succ",
" approx (⇑f) (n✝ + 1) i✝ ≤ approx (⇑f) (n✝ + 1).succ i✝",
" approx (⇑f) n✝ ≤ approx (⇑f) (n✝ + 1)",
" approx (⇑f) i ≤ approx (⇑f) j",
" approx (⇑f) i ≤ ... |
import Mathlib.RingTheory.Localization.FractionRing
import Mathlib.RingTheory.Localization.Ideal
import Mathlib.RingTheory.Noetherian
#align_import ring_theory.localization.submodule from "leanprover-community/mathlib"@"1ebb20602a8caef435ce47f6373e1aa40851a177"
variable {R : Type*} [CommRing R] (M : Submonoid R) ... | Mathlib/RingTheory/Localization/Submodule.lean | 53 | 54 | theorem coeSubmodule_top : coeSubmodule S (⊤ : Ideal R) = 1 := by |
rw [coeSubmodule, Submodule.map_top, Submodule.one_eq_range]
| [
" coeSubmodule S ⊥ = ⊥",
" coeSubmodule S ⊤ = 1"
] | [
" coeSubmodule S ⊥ = ⊥"
] |
import Mathlib.Analysis.Calculus.LineDeriv.Basic
import Mathlib.Analysis.Calculus.FDeriv.Measurable
open MeasureTheory
variable {𝕜 : Type*} [NontriviallyNormedField 𝕜] [LocallyCompactSpace 𝕜]
{E : Type*} [NormedAddCommGroup E] [NormedSpace 𝕜 E] [MeasurableSpace E] [OpensMeasurableSpace E]
{F : Type*} [Norm... | Mathlib/Analysis/Calculus/LineDeriv/Measurable.lean | 33 | 38 | theorem measurableSet_lineDifferentiableAt (hf : Continuous f) :
MeasurableSet {x : E | LineDifferentiableAt 𝕜 f x v} := by |
borelize 𝕜
let g : E → 𝕜 → F := fun x t ↦ f (x + t • v)
have hg : Continuous g.uncurry := by apply hf.comp; continuity
exact measurable_prod_mk_right (measurableSet_of_differentiableAt_with_param 𝕜 hg)
| [
" MeasurableSet {x | LineDifferentiableAt 𝕜 f x v}",
" Continuous (Function.uncurry g)",
" Continuous fun x => x.1 + x.2 • v"
] | [] |
import Mathlib.Topology.Instances.RealVectorSpace
import Mathlib.Analysis.NormedSpace.AffineIsometry
#align_import analysis.normed_space.mazur_ulam from "leanprover-community/mathlib"@"78261225eb5cedc61c5c74ecb44e5b385d13b733"
variable {E PE F PF : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] [MetricSpace PE]
... | Mathlib/Analysis/NormedSpace/MazurUlam.lean | 87 | 96 | theorem map_midpoint (f : PE ≃ᵢ PF) (x y : PE) : f (midpoint ℝ x y) = midpoint ℝ (f x) (f y) := by |
set e : PE ≃ᵢ PE :=
((f.trans <| (pointReflection ℝ <| midpoint ℝ (f x) (f y)).toIsometryEquiv).trans f.symm).trans
(pointReflection ℝ <| midpoint ℝ x y).toIsometryEquiv
have hx : e x = x := by simp [e]
have hy : e y = y := by simp [e]
have hm := e.midpoint_fixed hx hy
simp only [e, trans_apply] at... | [
" ∀ (e : PE ≃ᵢ PE), e x = x → e y = y → e (midpoint ℝ x y) = midpoint ℝ x y",
" ∀ (e : PE ≃ᵢ PE), e x = x → e y = y → e z = z",
" BddAbove (range fun e => dist (↑e z) z)",
" ∀ (a : PE ≃ᵢ PE) (b : a ∈ s), dist (↑⟨a, b⟩ z) z ≤ dist x z + dist x z",
" dist (↑⟨e, ⋯⟩ z) z ≤ dist x z + dist x z",
" dist (e z) x... | [
" ∀ (e : PE ≃ᵢ PE), e x = x → e y = y → e (midpoint ℝ x y) = midpoint ℝ x y",
" ∀ (e : PE ≃ᵢ PE), e x = x → e y = y → e z = z",
" BddAbove (range fun e => dist (↑e z) z)",
" ∀ (a : PE ≃ᵢ PE) (b : a ∈ s), dist (↑⟨a, b⟩ z) z ≤ dist x z + dist x z",
" dist (↑⟨e, ⋯⟩ z) z ≤ dist x z + dist x z",
" dist (e z) x... |
import Mathlib.GroupTheory.Coprod.Basic
import Mathlib.GroupTheory.Complement
open Monoid Coprod Multiplicative Subgroup Function
def HNNExtension.con (G : Type*) [Group G] (A B : Subgroup G) (φ : A ≃* B) :
Con (G ∗ Multiplicative ℤ) :=
conGen (fun x y => ∃ (a : A),
x = inr (ofAdd 1) * inl (a : G) ∧
... | Mathlib/GroupTheory/HNNExtension.lean | 97 | 99 | theorem lift_t (f : G →* H) (x : H) (hx : ∀ a : A, x * f ↑a = f (φ a : G) * x) :
lift f x hx t = x := by |
delta HNNExtension; simp [lift, t]
| [
" Group (HNNExtension G A B φ)",
" Group (HNNExtension.con G A B φ).Quotient",
" (fun x x_1 => x * x_1) (inr (ofAdd 1)) (inl ↑a) = inr (ofAdd 1) * inl ↑a ∧\n (fun x x_1 => x * x_1) (inl ↑(φ a)) (inr (ofAdd 1)) = inl ↑(φ a) * inr (ofAdd 1)",
" of ↑b * t = t * of ↑(φ.symm b)",
" of ↑b * t = of ↑(φ (φ.symm ... | [
" Group (HNNExtension G A B φ)",
" Group (HNNExtension.con G A B φ).Quotient",
" (fun x x_1 => x * x_1) (inr (ofAdd 1)) (inl ↑a) = inr (ofAdd 1) * inl ↑a ∧\n (fun x x_1 => x * x_1) (inl ↑(φ a)) (inr (ofAdd 1)) = inl ↑(φ a) * inr (ofAdd 1)",
" of ↑b * t = t * of ↑(φ.symm b)",
" of ↑b * t = of ↑(φ (φ.symm ... |
import Mathlib.CategoryTheory.Sites.Coherent.Comparison
import Mathlib.CategoryTheory.Sites.Coherent.ExtensiveSheaves
import Mathlib.CategoryTheory.Sites.Coherent.ReflectsPrecoherent
import Mathlib.CategoryTheory.Sites.Coherent.ReflectsPreregular
import Mathlib.CategoryTheory.Sites.InducedTopology
import Mathlib.Categ... | Mathlib/CategoryTheory/Sites/Coherent/SheafComparison.lean | 55 | 76 | theorem exists_effectiveEpiFamily_iff_mem_induced (X : C) (S : Sieve X) :
(∃ (α : Type) (_ : Finite α) (Y : α → C) (π : (a : α) → (Y a ⟶ X)),
EffectiveEpiFamily Y π ∧ (∀ a : α, (S.arrows) (π a)) ) ↔
(S ∈ F.inducedTopologyOfIsCoverDense (coherentTopology _) X) := by |
refine ⟨fun ⟨α, _, Y, π, ⟨H₁, H₂⟩⟩ ↦ ?_, fun hS ↦ ?_⟩
· apply (mem_sieves_iff_hasEffectiveEpiFamily (Sieve.functorPushforward _ S)).mpr
refine ⟨α, inferInstance, fun i => F.obj (Y i),
fun i => F.map (π i), ⟨?_,
fun a => Sieve.image_mem_functorPushforward F S (H₂ a)⟩⟩
exact F.map_finite_effectiv... | [
" F.IsCoverDense (coherentTopology D)",
" Sieve.generate (Presieve.singleton (F.effectiveEpiOver B)) ∈ (coherentTopology D).sieves B",
" Presieve.singleton (F.effectiveEpiOver B) ∈ (coherentCoverage D).covering B",
" Presieve.singleton (F.effectiveEpiOver B) =\n Presieve.ofArrows (fun x => F.effectiveEpiOv... | [
" F.IsCoverDense (coherentTopology D)",
" Sieve.generate (Presieve.singleton (F.effectiveEpiOver B)) ∈ (coherentTopology D).sieves B",
" Presieve.singleton (F.effectiveEpiOver B) ∈ (coherentCoverage D).covering B",
" Presieve.singleton (F.effectiveEpiOver B) =\n Presieve.ofArrows (fun x => F.effectiveEpiOv... |
import Mathlib.Algebra.Order.Invertible
import Mathlib.Algebra.Order.Module.OrderedSMul
import Mathlib.LinearAlgebra.AffineSpace.Midpoint
import Mathlib.LinearAlgebra.Ray
import Mathlib.Tactic.GCongr
#align_import analysis.convex.segment from "leanprover-community/mathlib"@"c5773405394e073885e2a144c9ca14637e8eb963"
... | Mathlib/Analysis/Convex/Segment.lean | 62 | 65 | theorem segment_eq_image₂ (x y : E) :
[x -[𝕜] y] =
(fun p : 𝕜 × 𝕜 => p.1 • x + p.2 • y) '' { p | 0 ≤ p.1 ∧ 0 ≤ p.2 ∧ p.1 + p.2 = 1 } := by |
simp only [segment, image, Prod.exists, mem_setOf_eq, exists_prop, and_assoc]
| [
" [x-[𝕜]y] = (fun p => p.1 • x + p.2 • y) '' {p | 0 ≤ p.1 ∧ 0 ≤ p.2 ∧ p.1 + p.2 = 1}"
] | [] |
import Mathlib.Algebra.Group.Submonoid.Operations
import Mathlib.Algebra.Star.SelfAdjoint
#align_import algebra.star.unitary from "leanprover-community/mathlib"@"247a102b14f3cebfee126293341af5f6bed00237"
def unitary (R : Type*) [Monoid R] [StarMul R] : Submonoid R where
carrier := { U | star U * U = 1 ∧ U * st... | Mathlib/Algebra/Star/Unitary.lean | 141 | 145 | theorem _root_.IsUnit.mem_unitary_of_star_mul_self {u : R} (hu : IsUnit u)
(h_mul : star u * u = 1) : u ∈ unitary R := by |
refine unitary.mem_iff.mpr ⟨h_mul, ?_⟩
lift u to Rˣ using hu
exact left_inv_eq_right_inv h_mul u.mul_inv ▸ u.mul_inv
| [
" U * B ∈ {U | star U * U = 1 ∧ U * star U = 1}",
" star (U * B) * (U * B) = 1",
" star (U * B) * (U * B) = star B * star U * U * B",
" star B * star U * U * B = star B * (star U * U) * B",
" star B * (star U * U) * B = 1",
" U * B * star (U * B) = 1",
" U * B * star (U * B) = U * B * (star B * star U)"... | [
" U * B ∈ {U | star U * U = 1 ∧ U * star U = 1}",
" star (U * B) * (U * B) = 1",
" star (U * B) * (U * B) = star B * star U * U * B",
" star B * star U * U * B = star B * (star U * U) * B",
" star B * (star U * U) * B = 1",
" U * B * star (U * B) = 1",
" U * B * star (U * B) = U * B * (star B * star U)"... |
import Mathlib.Data.Finset.Lattice
import Mathlib.Data.Set.Sigma
#align_import data.finset.sigma from "leanprover-community/mathlib"@"9003f28797c0664a49e4179487267c494477d853"
open Function Multiset
variable {ι : Type*}
namespace Finset
section Sigma
variable {α : ι → Type*} {β : Type*} (s s₁ s₂ : Finset ι) (... | Mathlib/Data/Finset/Sigma.lean | 112 | 114 | theorem _root_.biSup_finsetSigma [CompleteLattice β] (s : Finset ι) (t : ∀ i, Finset (α i))
(f : Sigma α → β) : ⨆ ij ∈ s.sigma t, f ij = ⨆ (i ∈ s) (j ∈ t i), f ⟨i, j⟩ := by |
simp_rw [← Finset.iSup_coe, Finset.coe_sigma, biSup_sigma]
| [
" (s.sigma t).Nonempty ↔ ∃ i ∈ s, (t i).Nonempty",
" s.sigma t = ∅ ↔ ∀ i ∈ s, t i = ∅",
" (↑s).PairwiseDisjoint fun i => map (Embedding.sigmaMk i) (t i)",
" (_root_.Disjoint on fun i => map (Embedding.sigmaMk i) (t i)) i j",
" ∀ ⦃a : (x : ι) × α x⦄, a ∈ map (Embedding.sigmaMk i) (t i) → a ∉ map (Embedding.s... | [
" (s.sigma t).Nonempty ↔ ∃ i ∈ s, (t i).Nonempty",
" s.sigma t = ∅ ↔ ∀ i ∈ s, t i = ∅",
" (↑s).PairwiseDisjoint fun i => map (Embedding.sigmaMk i) (t i)",
" (_root_.Disjoint on fun i => map (Embedding.sigmaMk i) (t i)) i j",
" ∀ ⦃a : (x : ι) × α x⦄, a ∈ map (Embedding.sigmaMk i) (t i) → a ∉ map (Embedding.s... |
import Mathlib.CategoryTheory.Sites.Coherent.Comparison
import Mathlib.CategoryTheory.Sites.Coherent.ExtensiveSheaves
import Mathlib.CategoryTheory.Sites.Coherent.ReflectsPrecoherent
import Mathlib.CategoryTheory.Sites.Coherent.ReflectsPreregular
import Mathlib.CategoryTheory.Sites.InducedTopology
import Mathlib.Categ... | Mathlib/CategoryTheory/Sites/Coherent/SheafComparison.lean | 161 | 178 | theorem exists_effectiveEpi_iff_mem_induced (X : C) (S : Sieve X) :
(∃ (Y : C) (π : Y ⟶ X),
EffectiveEpi π ∧ S.arrows π) ↔
(S ∈ F.inducedTopologyOfIsCoverDense (regularTopology _) X) := by |
refine ⟨fun ⟨Y, π, ⟨H₁, H₂⟩⟩ ↦ ?_, fun hS ↦ ?_⟩
· apply (mem_sieves_iff_hasEffectiveEpi (Sieve.functorPushforward _ S)).mpr
refine ⟨F.obj Y, F.map π, ⟨?_, Sieve.image_mem_functorPushforward F S H₂⟩⟩
exact F.map_effectiveEpi _
· obtain ⟨Y, π, ⟨H₁, H₂⟩⟩ := (mem_sieves_iff_hasEffectiveEpi _).mp hS
let g... | [
" F.IsCoverDense (coherentTopology D)",
" Sieve.generate (Presieve.singleton (F.effectiveEpiOver B)) ∈ (coherentTopology D).sieves B",
" Presieve.singleton (F.effectiveEpiOver B) ∈ (coherentCoverage D).covering B",
" Presieve.singleton (F.effectiveEpiOver B) =\n Presieve.ofArrows (fun x => F.effectiveEpiOv... | [
" F.IsCoverDense (coherentTopology D)",
" Sieve.generate (Presieve.singleton (F.effectiveEpiOver B)) ∈ (coherentTopology D).sieves B",
" Presieve.singleton (F.effectiveEpiOver B) ∈ (coherentCoverage D).covering B",
" Presieve.singleton (F.effectiveEpiOver B) =\n Presieve.ofArrows (fun x => F.effectiveEpiOv... |
import Mathlib.MeasureTheory.Integral.Lebesgue
import Mathlib.Analysis.MeanInequalities
import Mathlib.Analysis.MeanInequalitiesPow
import Mathlib.MeasureTheory.Function.SpecialFunctions.Basic
#align_import measure_theory.integral.mean_inequalities from "leanprover-community/mathlib"@"13bf7613c96a9fd66a81b9020a82cad9... | Mathlib/MeasureTheory/Integral/MeanInequalities.lean | 87 | 90 | theorem fun_eq_funMulInvSnorm_mul_snorm {p : ℝ} (f : α → ℝ≥0∞) (hf_nonzero : (∫⁻ a, f a ^ p ∂μ) ≠ 0)
(hf_top : (∫⁻ a, f a ^ p ∂μ) ≠ ⊤) {a : α} :
f a = funMulInvSnorm f p μ a * (∫⁻ c, f c ^ p ∂μ) ^ (1 / p) := by |
simp [funMulInvSnorm, mul_assoc, ENNReal.inv_mul_cancel, hf_nonzero, hf_top]
| [
" ∫⁻ (a : α), (f * g) a ∂μ ≤ 1",
" ∫⁻ (a : α), f a ^ p / ENNReal.ofReal p + g a ^ q / ENNReal.ofReal q ∂μ = 1",
" ∫⁻ (a : α), f a ^ p * (ENNReal.ofReal p)⁻¹ + g a ^ q * (ENNReal.ofReal q)⁻¹ ∂μ = 1",
" ∫⁻ (a : α), f a ^ p * (ENNReal.ofReal p)⁻¹ ∂μ + ∫⁻ (a : α), g a ^ q * (ENNReal.ofReal q)⁻¹ ∂μ = 1",
" (ENNR... | [
" ∫⁻ (a : α), (f * g) a ∂μ ≤ 1",
" ∫⁻ (a : α), f a ^ p / ENNReal.ofReal p + g a ^ q / ENNReal.ofReal q ∂μ = 1",
" ∫⁻ (a : α), f a ^ p * (ENNReal.ofReal p)⁻¹ + g a ^ q * (ENNReal.ofReal q)⁻¹ ∂μ = 1",
" ∫⁻ (a : α), f a ^ p * (ENNReal.ofReal p)⁻¹ ∂μ + ∫⁻ (a : α), g a ^ q * (ENNReal.ofReal q)⁻¹ ∂μ = 1",
" (ENNR... |
import Mathlib.Analysis.Calculus.FDeriv.Add
import Mathlib.Analysis.Calculus.FDeriv.Equiv
import Mathlib.Analysis.Calculus.FDeriv.Prod
import Mathlib.Analysis.Calculus.Monotone
import Mathlib.Data.Set.Function
import Mathlib.Algebra.Group.Basic
import Mathlib.Tactic.WLOG
#align_import analysis.bounded_variation from ... | Mathlib/Analysis/BoundedVariation.lean | 89 | 94 | theorem eq_of_edist_zero_on {f f' : α → E} {s : Set α} (h : ∀ ⦃x⦄, x ∈ s → edist (f x) (f' x) = 0) :
eVariationOn f s = eVariationOn f' s := by |
dsimp only [eVariationOn]
congr 1 with p : 1
congr 1 with i : 1
rw [edist_congr_right (h <| p.snd.prop.2 (i + 1)), edist_congr_left (h <| p.snd.prop.2 i)]
| [
" Nonempty { u // Monotone u ∧ ∀ (i : ℕ), u i ∈ s }",
" eVariationOn f s = eVariationOn f' s",
" ⨆ p, ∑ i ∈ Finset.range p.1, edist (f (↑p.2 (i + 1))) (f (↑p.2 i)) =\n ⨆ p, ∑ i ∈ Finset.range p.1, edist (f' (↑p.2 (i + 1))) (f' (↑p.2 i))",
" ∑ i ∈ Finset.range p.1, edist (f (↑p.2 (i + 1))) (f (↑p.2 i)) =\n ... | [
" Nonempty { u // Monotone u ∧ ∀ (i : ℕ), u i ∈ s }"
] |
import Mathlib.Algebra.Group.Subgroup.Basic
import Mathlib.Topology.Algebra.OpenSubgroup
import Mathlib.Topology.Algebra.Ring.Basic
#align_import topology.algebra.nonarchimedean.basic from "leanprover-community/mathlib"@"83f81aea33931a1edb94ce0f32b9a5d484de6978"
open scoped Pointwise Topology
class Nonarchimede... | Mathlib/Topology/Algebra/Nonarchimedean/Basic.lean | 69 | 75 | theorem nonarchimedean_of_emb (f : G →* H) (emb : OpenEmbedding f) : NonarchimedeanGroup H :=
{ is_nonarchimedean := fun U hU =>
have h₁ : f ⁻¹' U ∈ 𝓝 (1 : G) := by |
apply emb.continuous.tendsto
rwa [f.map_one]
let ⟨V, hV⟩ := is_nonarchimedean (f ⁻¹' U) h₁
⟨{ Subgroup.map f V with isOpen' := emb.isOpenMap _ V.isOpen }, Set.image_subset_iff.2 hV⟩ }
| [
" ⇑f ⁻¹' U ∈ 𝓝 1",
" U ∈ 𝓝 (f 1)"
] | [] |
import Mathlib.Algebra.Order.Ring.Int
import Mathlib.Data.Nat.SuccPred
#align_import data.int.succ_pred from "leanprover-community/mathlib"@"9003f28797c0664a49e4179487267c494477d853"
open Function Order
namespace Int
-- so that Lean reads `Int.succ` through `SuccOrder.succ`
@[instance] abbrev instSuccOrder : Su... | Mathlib/Data/Int/SuccPred.lean | 88 | 90 | theorem natCast_covBy {a b : ℕ} : (a : ℤ) ⋖ b ↔ a ⋖ b := by |
rw [Nat.covBy_iff_succ_eq, Int.covBy_iff_succ_eq]
exact Int.natCast_inj
| [
" succ^[n + 1] a = a + ↑(n + 1)",
" (succ ∘ succ^[n]) a = a + ↑n + 1",
" pred^[n + 1] a = a - ↑(n + 1)",
" (pred ∘ pred^[n]) a = a - ↑n - 1",
" Order.succ^[(b - a).toNat] a = b",
" Order.pred^[(b - a).toNat] b = a",
" z - 1 ⋖ z",
" ↑a ⋖ ↑b ↔ a ⋖ b",
" ↑a + 1 = ↑b ↔ a + 1 = b"
] | [
" succ^[n + 1] a = a + ↑(n + 1)",
" (succ ∘ succ^[n]) a = a + ↑n + 1",
" pred^[n + 1] a = a - ↑(n + 1)",
" (pred ∘ pred^[n]) a = a - ↑n - 1",
" Order.succ^[(b - a).toNat] a = b",
" Order.pred^[(b - a).toNat] b = a",
" z - 1 ⋖ z"
] |
import Mathlib.FieldTheory.Normal
import Mathlib.FieldTheory.Perfect
import Mathlib.RingTheory.Localization.Integral
#align_import field_theory.is_alg_closed.basic from "leanprover-community/mathlib"@"00f91228655eecdcd3ac97a7fd8dbcb139fe990a"
universe u v w
open scoped Classical Polynomial
open Polynomial
vari... | Mathlib/FieldTheory/IsAlgClosed/Basic.lean | 149 | 162 | theorem of_ringEquiv (k' : Type u) [Field k'] (e : k ≃+* k')
[IsAlgClosed k] : IsAlgClosed k' := by |
apply IsAlgClosed.of_exists_root
intro p hmp hp
have hpe : degree (p.map e.symm.toRingHom) ≠ 0 := by
rw [degree_map]
exact ne_of_gt (degree_pos_of_irreducible hp)
rcases IsAlgClosed.exists_root (k := k) (p.map e.symm) hpe with ⟨x, hx⟩
use e x
rw [IsRoot] at hx
apply e.symm.injective
rw [map_zer... | [
" Splits f p",
" Splits f p ↔ Splits (RingHom.id k) (map f p)",
" ∃ z, z ^ n = x",
" (X ^ n - C x).degree ≠ 0",
" ↑n ≠ 0",
" z ^ n = x",
" ∃ z, x = z * z",
" ∃ z_1, z ^ 2 = z_1 * z_1",
" p.roots = 0 ↔ p = C (p.coeff 0)",
" p.roots = 0",
" p = C (p.coeff 0)",
" (map f p).degree ≠ 0",
" eval₂ ... | [
" Splits f p",
" Splits f p ↔ Splits (RingHom.id k) (map f p)",
" ∃ z, z ^ n = x",
" (X ^ n - C x).degree ≠ 0",
" ↑n ≠ 0",
" z ^ n = x",
" ∃ z, x = z * z",
" ∃ z_1, z ^ 2 = z_1 * z_1",
" p.roots = 0 ↔ p = C (p.coeff 0)",
" p.roots = 0",
" p = C (p.coeff 0)",
" (map f p).degree ≠ 0",
" eval₂ ... |
import Mathlib.Algebra.DirectSum.Finsupp
import Mathlib.LinearAlgebra.Finsupp
import Mathlib.LinearAlgebra.DirectSum.TensorProduct
#align_import linear_algebra.direct_sum.finsupp from "leanprover-community/mathlib"@"9b9d125b7be0930f564a68f1d73ace10cf46064d"
noncomputable section
open DirectSum TensorProduct
ope... | Mathlib/LinearAlgebra/DirectSum/Finsupp.lean | 102 | 107 | theorem finsuppLeft_apply (t : (ι →₀ M) ⊗[R] N) (i : ι) :
finsuppLeft R M N ι t i = rTensor N (Finsupp.lapply i) t := by |
induction t using TensorProduct.induction_on with
| zero => simp
| tmul f n => simp only [finsuppLeft_apply_tmul_apply, rTensor_tmul, Finsupp.lapply_apply]
| add x y hx hy => simp [map_add, hx, hy]
| [
" (finsuppLeft R M N ι) (p ⊗ₜ[R] n) = p.sum fun i m => Finsupp.single i (m ⊗ₜ[R] n)",
" (finsuppLeft R M N ι) (0 ⊗ₜ[R] n) = Finsupp.sum 0 fun i m => Finsupp.single i (m ⊗ₜ[R] n)",
" ∀ (f g : ι →₀ M),\n ((finsuppLeft R M N ι) (f ⊗ₜ[R] n) = f.sum fun i m => Finsupp.single i (m ⊗ₜ[R] n)) →\n ((finsuppLeft ... | [
" (finsuppLeft R M N ι) (p ⊗ₜ[R] n) = p.sum fun i m => Finsupp.single i (m ⊗ₜ[R] n)",
" (finsuppLeft R M N ι) (0 ⊗ₜ[R] n) = Finsupp.sum 0 fun i m => Finsupp.single i (m ⊗ₜ[R] n)",
" ∀ (f g : ι →₀ M),\n ((finsuppLeft R M N ι) (f ⊗ₜ[R] n) = f.sum fun i m => Finsupp.single i (m ⊗ₜ[R] n)) →\n ((finsuppLeft ... |
import Mathlib.Algebra.BigOperators.Group.Finset
import Mathlib.Data.Finsupp.Defs
import Mathlib.Data.Finset.Pairwise
#align_import data.finsupp.big_operators from "leanprover-community/mathlib"@"59694bd07f0a39c5beccba34bd9f413a160782bf"
variable {ι M : Type*} [DecidableEq ι]
theorem List.support_sum_subset [Add... | Mathlib/Data/Finsupp/BigOperators.lean | 60 | 66 | theorem List.mem_foldr_sup_support_iff [Zero M] {l : List (ι →₀ M)} {x : ι} :
x ∈ l.foldr (Finsupp.support · ⊔ ·) ∅ ↔ ∃ f ∈ l, x ∈ f.support := by |
simp only [Finset.sup_eq_union, List.foldr_map, Finsupp.mem_support_iff, exists_prop]
induction' l with hd tl IH
· simp
· simp only [foldr, Function.comp_apply, Finset.mem_union, Finsupp.mem_support_iff, ne_eq, IH,
find?, mem_cons, exists_eq_or_imp]
| [
" l.sum.support ⊆ foldr (fun x x_1 => x.support ⊔ x_1) ∅ l",
" [].sum.support ⊆ foldr (fun x x_1 => x.support ⊔ x_1) ∅ []",
" (hd :: tl).sum.support ⊆ foldr (fun x x_1 => x.support ⊔ x_1) ∅ (hd :: tl)",
" (hd + tl.sum).support ⊆ foldr (fun x x_1 => x.support ⊔ x_1) ∅ (hd :: tl)",
" hd.support ⊆ hd.support",... | [
" l.sum.support ⊆ foldr (fun x x_1 => x.support ⊔ x_1) ∅ l",
" [].sum.support ⊆ foldr (fun x x_1 => x.support ⊔ x_1) ∅ []",
" (hd :: tl).sum.support ⊆ foldr (fun x x_1 => x.support ⊔ x_1) ∅ (hd :: tl)",
" (hd + tl.sum).support ⊆ foldr (fun x x_1 => x.support ⊔ x_1) ∅ (hd :: tl)",
" hd.support ⊆ hd.support",... |
import Mathlib.CategoryTheory.Limits.Shapes.Pullbacks
import Mathlib.CategoryTheory.Limits.Preserves.Basic
#align_import category_theory.limits.preserves.shapes.pullbacks from "leanprover-community/mathlib"@"f11e306adb9f2a393539d2bb4293bf1b42caa7ac"
noncomputable section
universe v₁ v₂ u₁ u₂
-- Porting note: ne... | Mathlib/CategoryTheory/Limits/Preserves/Shapes/Pullbacks.lean | 126 | 128 | theorem PreservesPullback.iso_hom_snd :
(PreservesPullback.iso G f g).hom ≫ pullback.snd = G.map pullback.snd := by |
simp [PreservesPullback.iso]
| [
" G.map h ≫ G.map f = G.map k ≫ G.map g",
" ∀ (j : WalkingCospan),\n ((Cones.postcompose (diagramIsoCospan (cospan f g ⋙ G)).hom).obj (G.mapCone (PullbackCone.mk h k comm))).π.app j =\n (Iso.refl\n ((Cones.postcompose (diagramIsoCospan (cospan f g ⋙ G)).hom).obj\n (G.mapCone (Pul... | [
" G.map h ≫ G.map f = G.map k ≫ G.map g",
" ∀ (j : WalkingCospan),\n ((Cones.postcompose (diagramIsoCospan (cospan f g ⋙ G)).hom).obj (G.mapCone (PullbackCone.mk h k comm))).π.app j =\n (Iso.refl\n ((Cones.postcompose (diagramIsoCospan (cospan f g ⋙ G)).hom).obj\n (G.mapCone (Pul... |
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 | 101 | 103 | theorem χ₄_nat_three_mod_four {n : ℕ} (hn : n % 4 = 3) : χ₄ n = -1 := by |
rw [χ₄_nat_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.LinearAlgebra.Basis
import Mathlib.LinearAlgebra.Dual
import Mathlib.Data.Fin.FlagRange
open Set Submodule
namespace Basis
section Semiring
variable {R M : Type*} [Semiring R] [AddCommMonoid M] [Module R M] {n : ℕ}
def flag (b : Basis (Fin n) R M) (k : Fin (n + 1)) : Submodule R M :=
.span R <... | Mathlib/LinearAlgebra/Basis/Flag.lean | 42 | 45 | theorem flag_succ (b : Basis (Fin n) R M) (k : Fin n) :
b.flag k.succ = (R ∙ b k) ⊔ b.flag k.castSucc := by |
simp only [flag, Fin.castSucc_lt_castSucc_iff]
simp [Fin.castSucc_lt_iff_succ_le, le_iff_eq_or_lt, setOf_or, image_insert_eq, span_insert]
| [
" b.flag 0 = ⊥",
" b.flag (Fin.last n) = ⊤",
" b.flag k.succ = span R {b k} ⊔ b.flag k.castSucc",
" span R (⇑b '' {i | i.castSucc < k.succ}) = span R {b k} ⊔ span R (⇑b '' {i | i < k})"
] | [
" b.flag 0 = ⊥",
" b.flag (Fin.last n) = ⊤"
] |
import Mathlib.Analysis.InnerProductSpace.Calculus
import Mathlib.Analysis.InnerProductSpace.Dual
import Mathlib.Analysis.InnerProductSpace.Adjoint
import Mathlib.Analysis.Calculus.LagrangeMultipliers
import Mathlib.LinearAlgebra.Eigenspace.Basic
#align_import analysis.inner_product_space.rayleigh from "leanprover-co... | Mathlib/Analysis/InnerProductSpace/Rayleigh.lean | 57 | 64 | theorem rayleigh_smul (x : E) {c : 𝕜} (hc : c ≠ 0) :
rayleighQuotient T (c • x) = rayleighQuotient T x := by |
by_cases hx : x = 0
· simp [hx]
have : ‖c‖ ≠ 0 := by simp [hc]
have : ‖x‖ ≠ 0 := by simp [hx]
field_simp [norm_smul, T.reApplyInnerSelf_smul]
ring
| [
" T.rayleighQuotient (c • x) = T.rayleighQuotient x",
" ‖c‖ ≠ 0",
" ‖x‖ ≠ 0",
" ‖c‖ ^ 2 * T.reApplyInnerSelf x * ‖x‖ ^ 2 = T.reApplyInnerSelf x * (‖c‖ * ‖x‖) ^ 2"
] | [] |
import Mathlib.Algebra.MonoidAlgebra.Support
import Mathlib.Algebra.Polynomial.Basic
import Mathlib.Algebra.Regular.Basic
import Mathlib.Data.Nat.Choose.Sum
#align_import data.polynomial.coeff from "leanprover-community/mathlib"@"2651125b48fc5c170ab1111afd0817c903b1fc6c"
set_option linter.uppercaseLean3 false
no... | Mathlib/Algebra/Polynomial/Coeff.lean | 60 | 65 | theorem support_smul [SMulZeroClass S R] (r : S) (p : R[X]) :
support (r • p) ⊆ support p := by |
intro i hi
simp? [mem_support_iff] at hi ⊢ says simp only [mem_support_iff, coeff_smul, ne_eq] at hi ⊢
contrapose! hi
simp [hi]
| [
" (p + q).coeff n = p.coeff n + q.coeff n",
" ({ toFinsupp := toFinsupp✝ } + q).coeff n = { toFinsupp := toFinsupp✝ }.coeff n + q.coeff n",
" ({ toFinsupp := toFinsupp✝¹ } + { toFinsupp := toFinsupp✝ }).coeff n =\n { toFinsupp := toFinsupp✝¹ }.coeff n + { toFinsupp := toFinsupp✝ }.coeff n",
" (toFinsupp✝¹ ... | [
" (p + q).coeff n = p.coeff n + q.coeff n",
" ({ toFinsupp := toFinsupp✝ } + q).coeff n = { toFinsupp := toFinsupp✝ }.coeff n + q.coeff n",
" ({ toFinsupp := toFinsupp✝¹ } + { toFinsupp := toFinsupp✝ }).coeff n =\n { toFinsupp := toFinsupp✝¹ }.coeff n + { toFinsupp := toFinsupp✝ }.coeff n",
" (toFinsupp✝¹ ... |
import Mathlib.Algebra.Lie.Nilpotent
import Mathlib.Algebra.Lie.Normalizer
#align_import algebra.lie.engel from "leanprover-community/mathlib"@"210657c4ea4a4a7b234392f70a3a2a83346dfa90"
universe u₁ u₂ u₃ u₄
variable {R : Type u₁} {L : Type u₂} {L₂ : Type u₃} {M : Type u₄}
variable [CommRing R] [LieRing L] [LieAl... | Mathlib/Algebra/Lie/Engel.lean | 105 | 125 | theorem lcs_le_lcs_of_is_nilpotent_span_sup_eq_top {n i j : ℕ}
(hxn : toEnd R L M x ^ n = 0) (hIM : lowerCentralSeries R L M i ≤ I.lcs M j) :
lowerCentralSeries R L M (i + n) ≤ I.lcs M (j + 1) := by |
suffices
∀ l,
((⊤ : LieIdeal R L).lcs M (i + l) : Submodule R M) ≤
(I.lcs M j : Submodule R M).map (toEnd R L M x ^ l) ⊔
(I.lcs M (j + 1) : Submodule R M)
by simpa only [bot_sup_eq, LieIdeal.incl_coe, Submodule.map_zero, hxn] using this n
intro l
induction' l with l ih
· simp on... | [
" ∃ t, ∃ z ∈ I, y = t • x + z",
" ∃ t_1, ∃ z_1 ∈ I, t • x + z = t_1 • x + z_1",
" ↑⁅⊤, N⁆ = Submodule.map ((toEnd R L M) x) ↑N ⊔ ↑⁅I, N⁆",
" Submodule.span R {m | ∃ x, ∃ n ∈ N, ⁅x, n⁆ = m} =\n Submodule.span R ((fun a => ⁅x, a⁆) '' ↑↑N ∪ {m | ∃ x ∈ I, ∃ n ∈ N, ⁅x, n⁆ = m})",
" {m | ∃ x, ∃ n ∈ N, ⁅x, n⁆ =... | [
" ∃ t, ∃ z ∈ I, y = t • x + z",
" ∃ t_1, ∃ z_1 ∈ I, t • x + z = t_1 • x + z_1",
" ↑⁅⊤, N⁆ = Submodule.map ((toEnd R L M) x) ↑N ⊔ ↑⁅I, N⁆",
" Submodule.span R {m | ∃ x, ∃ n ∈ N, ⁅x, n⁆ = m} =\n Submodule.span R ((fun a => ⁅x, a⁆) '' ↑↑N ∪ {m | ∃ x ∈ I, ∃ n ∈ N, ⁅x, n⁆ = m})",
" {m | ∃ x, ∃ n ∈ N, ⁅x, n⁆ =... |
import Mathlib.LinearAlgebra.ExteriorAlgebra.Basic
import Mathlib.LinearAlgebra.CliffordAlgebra.Fold
import Mathlib.LinearAlgebra.CliffordAlgebra.Conjugation
import Mathlib.LinearAlgebra.Dual
#align_import linear_algebra.clifford_algebra.contraction from "leanprover-community/mathlib"@"70fd9563a21e7b963887c9360bd29b2... | Mathlib/LinearAlgebra/CliffordAlgebra/Contraction.lean | 167 | 172 | theorem contractLeft_ι (x : M) : d⌋ι Q x = algebraMap R _ (d x) := by |
-- Porting note: Lean cannot figure out anymore the third argument
refine (foldr'_ι _ _ ?_ _ _).trans <| by
simp_rw [contractLeftAux_apply_apply, mul_zero, sub_zero,
Algebra.algebraMap_eq_smul_one]
exact fun m x fx ↦ contractLeftAux_contractLeftAux Q d m x fx
| [
" ((contractLeftAux Q d) v) ((ι Q) v * x, ((contractLeftAux Q d) v) (x, fx)) = Q v • fx",
" d v • ((ι Q) v * x) - (ι Q) v * (d v • x - (ι Q) v * fx) = Q v • fx",
" ((fun d => foldr' Q (contractLeftAux Q d) ⋯ 0) (d₁ + d₂)) x =\n ((fun d => foldr' Q (contractLeftAux Q d) ⋯ 0) d₁ + (fun d => foldr' Q (contractL... | [
" ((contractLeftAux Q d) v) ((ι Q) v * x, ((contractLeftAux Q d) v) (x, fx)) = Q v • fx",
" d v • ((ι Q) v * x) - (ι Q) v * (d v • x - (ι Q) v * fx) = Q v • fx",
" ((fun d => foldr' Q (contractLeftAux Q d) ⋯ 0) (d₁ + d₂)) x =\n ((fun d => foldr' Q (contractLeftAux Q d) ⋯ 0) d₁ + (fun d => foldr' Q (contractL... |
import Mathlib.Algebra.BigOperators.Group.Multiset
import Mathlib.Data.Multiset.Dedup
#align_import data.multiset.bind from "leanprover-community/mathlib"@"f694c7dead66f5d4c80f446c796a5aad14707f0e"
assert_not_exists MonoidWithZero
assert_not_exists MulAction
universe v
variable {α : Type*} {β : Type v} {γ δ : Ty... | Mathlib/Data/Multiset/Bind.lean | 89 | 93 | theorem prod_join [CommMonoid α] {S : Multiset (Multiset α)} :
prod (join S) = prod (map prod S) := by |
induction S using Multiset.induction with
| empty => simp
| cons _ _ ih => simp [ih]
| [
" (↑(List.map ofList (l :: L))).join = ↑(l :: L).join",
" a ∈ join 0 ↔ ∃ s ∈ 0, a ∈ s",
" ∀ (a_1 : Multiset α) (s : Multiset (Multiset α)),\n (a ∈ s.join ↔ ∃ s_1 ∈ s, a ∈ s_1) → (a ∈ (a_1 ::ₘ s).join ↔ ∃ s_1 ∈ a_1 ::ₘ s, a ∈ s_1)",
" card (join 0) = (map (⇑card) 0).sum",
" ∀ (a : Multiset α) (s : Multise... | [
" (↑(List.map ofList (l :: L))).join = ↑(l :: L).join",
" a ∈ join 0 ↔ ∃ s ∈ 0, a ∈ s",
" ∀ (a_1 : Multiset α) (s : Multiset (Multiset α)),\n (a ∈ s.join ↔ ∃ s_1 ∈ s, a ∈ s_1) → (a ∈ (a_1 ::ₘ s).join ↔ ∃ s_1 ∈ a_1 ::ₘ s, a ∈ s_1)",
" card (join 0) = (map (⇑card) 0).sum",
" ∀ (a : Multiset α) (s : Multise... |
import Mathlib.CategoryTheory.Preadditive.Yoneda.Basic
import Mathlib.CategoryTheory.Preadditive.Projective
import Mathlib.Algebra.Category.GroupCat.EpiMono
#align_import category_theory.preadditive.yoneda.projective from "leanprover-community/mathlib"@"f8d8465c3c392a93b9ed226956e26dee00975946"
universe v u
open... | Mathlib/CategoryTheory/Preadditive/Yoneda/Projective.lean | 42 | 50 | theorem projective_iff_preservesEpimorphisms_preadditiveCoyoneda_obj' (P : C) :
Projective P ↔ (preadditiveCoyoneda.obj (op P)).PreservesEpimorphisms := by |
rw [projective_iff_preservesEpimorphisms_coyoneda_obj]
refine ⟨fun h : (preadditiveCoyoneda.obj (op P) ⋙
forget AddCommGroupCat).PreservesEpimorphisms => ?_, ?_⟩
· exact Functor.preservesEpimorphisms_of_preserves_of_reflects (preadditiveCoyoneda.obj (op P))
(forget _)
· intro
exact (inferInst... | [
" Projective P ↔ (preadditiveCoyoneda.obj { unop := P }).PreservesEpimorphisms",
" (coyoneda.obj { unop := P }).PreservesEpimorphisms ↔ (preadditiveCoyoneda.obj { unop := P }).PreservesEpimorphisms",
" (preadditiveCoyoneda.obj { unop := P }).PreservesEpimorphisms",
" (preadditiveCoyoneda.obj { unop := P }).Pr... | [
" Projective P ↔ (preadditiveCoyoneda.obj { unop := P }).PreservesEpimorphisms",
" (coyoneda.obj { unop := P }).PreservesEpimorphisms ↔ (preadditiveCoyoneda.obj { unop := P }).PreservesEpimorphisms",
" (preadditiveCoyoneda.obj { unop := P }).PreservesEpimorphisms",
" (preadditiveCoyoneda.obj { unop := P }).Pr... |
import Mathlib.GroupTheory.GroupAction.ConjAct
import Mathlib.GroupTheory.GroupAction.Quotient
import Mathlib.GroupTheory.QuotientGroup
import Mathlib.Topology.Algebra.Monoid
import Mathlib.Topology.Algebra.Constructions
#align_import topology.algebra.group.basic from "leanprover-community/mathlib"@"3b1890e71632be9e3... | Mathlib/Topology/Algebra/Group/Basic.lean | 146 | 154 | theorem discreteTopology_of_isOpen_singleton_one (h : IsOpen ({1} : Set G)) :
DiscreteTopology G := by |
rw [← singletons_open_iff_discrete]
intro g
suffices {g} = (g⁻¹ * ·) ⁻¹' {1} by
rw [this]
exact (continuous_mul_left g⁻¹).isOpen_preimage _ h
simp only [mul_one, Set.preimage_mul_left_singleton, eq_self_iff_true, inv_inv,
Set.singleton_eq_singleton_iff]
| [
" (Homeomorph.mulLeft a).symm = Homeomorph.mulLeft a⁻¹",
" (Homeomorph.mulLeft a).symm x✝ = (Homeomorph.mulLeft a⁻¹) x✝",
" (Homeomorph.mulRight a).symm = Homeomorph.mulRight a⁻¹",
" (Homeomorph.mulRight a).symm x✝ = (Homeomorph.mulRight a⁻¹) x✝",
" DiscreteTopology G",
" ∀ (a : G), IsOpen {a}",
" IsOpe... | [
" (Homeomorph.mulLeft a).symm = Homeomorph.mulLeft a⁻¹",
" (Homeomorph.mulLeft a).symm x✝ = (Homeomorph.mulLeft a⁻¹) x✝",
" (Homeomorph.mulRight a).symm = Homeomorph.mulRight a⁻¹",
" (Homeomorph.mulRight a).symm x✝ = (Homeomorph.mulRight a⁻¹) x✝"
] |
import Mathlib.Analysis.InnerProductSpace.PiL2
import Mathlib.Combinatorics.Additive.AP.Three.Defs
import Mathlib.Combinatorics.Pigeonhole
import Mathlib.Data.Complex.ExponentialBounds
#align_import combinatorics.additive.behrend from "leanprover-community/mathlib"@"4fa54b337f7d52805480306db1b1439c741848c8"
open N... | Mathlib/Combinatorics/Additive/AP/Three/Behrend.lean | 163 | 164 | theorem map_mod (a : Fin n.succ → ℕ) : map d a % d = a 0 % d := by |
rw [map_succ, Nat.add_mul_mod_self_right]
| [
" ThreeAPFree (frontier s)",
" a = b",
" (1 / 2) • a + (1 / 2) • c = b",
" 2 ≠ 0",
" a = (1 / 2) • a + (1 / 2) • c",
" c = (2⁻¹ + 2⁻¹) • c",
" c = 1 • c",
" ThreeAPFree (sphere x r)",
" ThreeAPFree (sphere x 0)",
" ThreeAPFree {x}",
" sphere x r = frontier (closedBall x r)",
" x ∈ box n d ↔ ∀ ... | [
" ThreeAPFree (frontier s)",
" a = b",
" (1 / 2) • a + (1 / 2) • c = b",
" 2 ≠ 0",
" a = (1 / 2) • a + (1 / 2) • c",
" c = (2⁻¹ + 2⁻¹) • c",
" c = 1 • c",
" ThreeAPFree (sphere x r)",
" ThreeAPFree (sphere x 0)",
" ThreeAPFree {x}",
" sphere x r = frontier (closedBall x r)",
" x ∈ box n d ↔ ∀ ... |
import Mathlib.Combinatorics.Quiver.Path
import Mathlib.Combinatorics.Quiver.Push
#align_import combinatorics.quiver.symmetric from "leanprover-community/mathlib"@"706d88f2b8fdfeb0b22796433d7a6c1a010af9f2"
universe v u w v'
namespace Quiver
-- Porting note: no hasNonemptyInstance linter yet
def Symmetrify (V : ... | Mathlib/Combinatorics/Quiver/Symmetric.lean | 66 | 72 | theorem reverse_inj [h : HasInvolutiveReverse V] {a b : V}
(f g : a ⟶ b) : reverse f = reverse g ↔ f = g := by |
constructor
· rintro h
simpa using congr_arg Quiver.reverse h
· rintro h
congr
| [
" reverse (reverse f) = f",
" reverse f = reverse g ↔ f = g",
" reverse f = reverse g → f = g",
" f = g",
" f = g → reverse f = reverse g",
" reverse f = reverse g"
] | [
" reverse (reverse f) = f"
] |
import Mathlib.MeasureTheory.Covering.Differentiation
import Mathlib.MeasureTheory.Covering.VitaliFamily
import Mathlib.MeasureTheory.Integral.Lebesgue
import Mathlib.MeasureTheory.Measure.Regular
import Mathlib.SetTheory.Ordinal.Arithmetic
import Mathlib.Topology.MetricSpace.Basic
import Mathlib.Data.Set.Pairwise.Lat... | Mathlib/MeasureTheory/Covering/Besicovitch.lean | 187 | 192 | theorem inter' (i : Fin N.succ) : dist (a.c i) (a.c (last N)) ≤ a.r i + a.r (last N) := by |
rcases lt_or_le i (last N) with (H | H)
· exact a.inter i H
· have I : i = last N := top_le_iff.1 H
have := (a.rpos (last N)).le
simp only [I, add_nonneg this this, dist_self]
| [
" (fun x => 1) i ≤ dist (default i) (default (last 0)) ∧ (fun x => 1) (last 0) ≤ τ * (fun x => 1) i",
" dist (default i) (default (last 0)) ≤ (fun x => 1) i + (fun x => 1) (last 0)",
" dist (a.c i) (a.c (last N)) ≤ a.r i + a.r (last N)"
] | [
" (fun x => 1) i ≤ dist (default i) (default (last 0)) ∧ (fun x => 1) (last 0) ≤ τ * (fun x => 1) i",
" dist (default i) (default (last 0)) ≤ (fun x => 1) i + (fun x => 1) (last 0)"
] |
import Mathlib.Algebra.BigOperators.Group.Finset
import Mathlib.Data.List.MinMax
import Mathlib.Algebra.Tropical.Basic
import Mathlib.Order.ConditionallyCompleteLattice.Finset
#align_import algebra.tropical.big_operators from "leanprover-community/mathlib"@"d6fad0e5bf2d6f48da9175d25c3dc5706b3834ce"
variable {R S :... | Mathlib/Algebra/Tropical/BigOperators.lean | 92 | 96 | theorem Finset.trop_inf [LinearOrder R] [OrderTop R] (s : Finset S) (f : S → R) :
trop (s.inf f) = ∑ i ∈ s, trop (f i) := by |
convert Multiset.trop_inf (s.val.map f)
simp only [Multiset.map_map, Function.comp_apply]
rfl
| [
" trop l.sum = (map trop l).prod",
" trop [].sum = (map trop []).prod",
" trop (hd :: tl).sum = (map trop (hd :: tl)).prod",
" ∀ (a : List R), trop (sum ⟦a⟧) = (map trop ⟦a⟧).prod",
" trop (∑ i ∈ s, f i) = ∏ i ∈ s, trop (f i)",
" ∏ i ∈ s, trop (f i) = (Multiset.map trop (Multiset.map f s.val)).prod",
" ... | [
" trop l.sum = (map trop l).prod",
" trop [].sum = (map trop []).prod",
" trop (hd :: tl).sum = (map trop (hd :: tl)).prod",
" ∀ (a : List R), trop (sum ⟦a⟧) = (map trop ⟦a⟧).prod",
" trop (∑ i ∈ s, f i) = ∏ i ∈ s, trop (f i)",
" ∏ i ∈ s, trop (f i) = (Multiset.map trop (Multiset.map f s.val)).prod",
" ... |
import Mathlib.Analysis.Normed.Order.Basic
import Mathlib.Analysis.Asymptotics.Asymptotics
import Mathlib.Analysis.NormedSpace.Basic
#align_import analysis.asymptotics.specific_asymptotics from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982"
open Filter Asymptotics
open Topology
sectio... | Mathlib/Analysis/Asymptotics/SpecificAsymptotics.lean | 140 | 152 | theorem Filter.Tendsto.cesaro_smul {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] {u : ℕ → E}
{l : E} (h : Tendsto u atTop (𝓝 l)) :
Tendsto (fun n : ℕ => (n⁻¹ : ℝ) • ∑ i ∈ range n, u i) atTop (𝓝 l) := by |
rw [← tendsto_sub_nhds_zero_iff, ← isLittleO_one_iff ℝ]
have := Asymptotics.isLittleO_sum_range_of_tendsto_zero (tendsto_sub_nhds_zero_iff.2 h)
apply ((isBigO_refl (fun n : ℕ => (n : ℝ)⁻¹) atTop).smul_isLittleO this).congr' _ _
· filter_upwards [Ici_mem_atTop 1] with n npos
have nposℝ : (0 : ℝ) < n := Nat.... | [
" (fun n => ∑ i ∈ range n, f i) =o[atTop] fun n => ∑ i ∈ range n, g i",
" ‖∑ i ∈ range n, g i‖ = ∑ i ∈ range n, g i",
" ∀ (ε : ℝ), 0 < ε → ∀ᶠ (x : ℕ) in atTop, ‖∑ i ∈ range x, f i‖ ≤ ε * ‖∑ i ∈ range x, g i‖",
" ∀ᶠ (x : ℕ) in atTop, ‖∑ i ∈ range x, f i‖ ≤ ε * ‖∑ i ∈ range x, g i‖",
" ∃ N, ∀ (b : ℕ), N ≤ b →... | [
" (fun n => ∑ i ∈ range n, f i) =o[atTop] fun n => ∑ i ∈ range n, g i",
" ‖∑ i ∈ range n, g i‖ = ∑ i ∈ range n, g i",
" ∀ (ε : ℝ), 0 < ε → ∀ᶠ (x : ℕ) in atTop, ‖∑ i ∈ range x, f i‖ ≤ ε * ‖∑ i ∈ range x, g i‖",
" ∀ᶠ (x : ℕ) in atTop, ‖∑ i ∈ range x, f i‖ ≤ ε * ‖∑ i ∈ range x, g i‖",
" ∃ N, ∀ (b : ℕ), N ≤ b →... |
import Mathlib.Data.Nat.Bitwise
import Mathlib.SetTheory.Game.Birthday
import Mathlib.SetTheory.Game.Impartial
#align_import set_theory.game.nim from "leanprover-community/mathlib"@"92ca63f0fb391a9ca5f22d2409a6080e786d99f7"
noncomputable section
universe u
namespace SetTheory
open scoped PGame
namespace PGame... | Mathlib/SetTheory/Game/Nim.lean | 67 | 67 | theorem leftMoves_nim (o : Ordinal) : (nim o).LeftMoves = o.out.α := by | rw [nim_def]; rfl
| [
" let_fun this := ⋯;\n nim o =\n mk (Quotient.out o).α (Quotient.out o).α (fun o₂ => nim (typein (fun x x_1 => x < x_1) o₂)) fun o₂ =>\n nim (typein (fun x x_1 => x < x_1) o₂)",
" let_fun this := ⋯;\n (mk (Quotient.out o).α (Quotient.out o).α\n (fun o₂ =>\n let_fun x := ⋯;\n nim (type... | [
" let_fun this := ⋯;\n nim o =\n mk (Quotient.out o).α (Quotient.out o).α (fun o₂ => nim (typein (fun x x_1 => x < x_1) o₂)) fun o₂ =>\n nim (typein (fun x x_1 => x < x_1) o₂)",
" let_fun this := ⋯;\n (mk (Quotient.out o).α (Quotient.out o).α\n (fun o₂ =>\n let_fun x := ⋯;\n nim (type... |
import Mathlib.Algebra.Polynomial.AlgebraMap
import Mathlib.Algebra.Polynomial.Degree.Lemmas
import Mathlib.Algebra.Polynomial.HasseDeriv
#align_import data.polynomial.taylor from "leanprover-community/mathlib"@"70fd9563a21e7b963887c9360bd29b2393e6225a"
noncomputable section
namespace Polynomial
open Polynomial... | Mathlib/Algebra/Polynomial/Taylor.lean | 66 | 66 | theorem taylor_one : taylor r (1 : R[X]) = C 1 := by | rw [← C_1, taylor_C]
| [
" { toFun := fun f => f.comp (X + C r), map_add' := ⋯ }.toFun (c • f) =\n (RingHom.id R) c • { toFun := fun f => f.comp (X + C r), map_add' := ⋯ }.toFun f",
" (taylor r) X = X + C r",
" (taylor r) (C x) = C x",
" taylor 0 = LinearMap.id",
" ((taylor 0 ∘ₗ monomial n✝¹) 1).coeff n✝ = ((LinearMap.id ∘ₗ mono... | [
" { toFun := fun f => f.comp (X + C r), map_add' := ⋯ }.toFun (c • f) =\n (RingHom.id R) c • { toFun := fun f => f.comp (X + C r), map_add' := ⋯ }.toFun f",
" (taylor r) X = X + C r",
" (taylor r) (C x) = C x",
" taylor 0 = LinearMap.id",
" ((taylor 0 ∘ₗ monomial n✝¹) 1).coeff n✝ = ((LinearMap.id ∘ₗ mono... |
import Mathlib.MeasureTheory.Function.Jacobian
import Mathlib.MeasureTheory.Measure.Lebesgue.Complex
import Mathlib.Analysis.SpecialFunctions.Trigonometric.Deriv
#align_import analysis.special_functions.polar_coord from "leanprover-community/mathlib"@"8f9fea08977f7e450770933ee6abb20733b47c92"
noncomputable section... | Mathlib/Analysis/SpecialFunctions/PolarCoord.lean | 110 | 123 | theorem polarCoord_source_ae_eq_univ : polarCoord.source =ᵐ[volume] univ := by |
have A : polarCoord.sourceᶜ ⊆ LinearMap.ker (LinearMap.snd ℝ ℝ ℝ) := by
intro x hx
simp only [polarCoord_source, compl_union, mem_inter_iff, mem_compl_iff, mem_setOf_eq, not_lt,
Classical.not_not] at hx
exact hx.2
have B : volume (LinearMap.ker (LinearMap.snd ℝ ℝ ℝ) : Set (ℝ × ℝ)) = 0 := by
a... | [
" ∀ ⦃x : ℝ × ℝ⦄,\n x ∈ {q | 0 < q.1} ∪ {q | q.2 ≠ 0} →\n (fun q => (√(q.1 ^ 2 + q.2 ^ 2), (Complex.equivRealProd.symm q).arg)) x ∈ Ioi 0 ×ˢ Ioo (-π) π",
" (fun q => (√(q.1 ^ 2 + q.2 ^ 2), (Complex.equivRealProd.symm q).arg)) (x, y) ∈ Ioi 0 ×ˢ Ioo (-π) π",
" 0 < x ^ 2 + y ^ 2 ∧ (0 ≤ (Complex.equivRealPro... | [
" ∀ ⦃x : ℝ × ℝ⦄,\n x ∈ {q | 0 < q.1} ∪ {q | q.2 ≠ 0} →\n (fun q => (√(q.1 ^ 2 + q.2 ^ 2), (Complex.equivRealProd.symm q).arg)) x ∈ Ioi 0 ×ˢ Ioo (-π) π",
" (fun q => (√(q.1 ^ 2 + q.2 ^ 2), (Complex.equivRealProd.symm q).arg)) (x, y) ∈ Ioi 0 ×ˢ Ioo (-π) π",
" 0 < x ^ 2 + y ^ 2 ∧ (0 ≤ (Complex.equivRealPro... |
import Mathlib.Algebra.CharP.Basic
import Mathlib.Algebra.CharP.Algebra
import Mathlib.Data.Nat.Prime
#align_import algebra.char_p.exp_char from "leanprover-community/mathlib"@"70fd9563a21e7b963887c9360bd29b2393e6225a"
universe u
variable (R : Type u)
section Semiring
variable [Semiring R]
class inductive Ex... | Mathlib/Algebra/CharP/ExpChar.lean | 93 | 97 | theorem char_eq_expChar_iff (p q : ℕ) [hp : CharP R p] [hq : ExpChar R q] : p = q ↔ p.Prime := by |
cases' hq with q hq_one hq_prime hq_hchar
· rw [(CharP.eq R hp inferInstance : p = 0)]
decide
· exact ⟨fun hpq => hpq.symm ▸ hq_prime, fun _ => CharP.eq R hp hq_hchar⟩
| [
" ExpChar (R × S) p",
" ExpChar (R × S) 1",
" p = q",
" 1 = q",
" ringExpChar R = q",
" ringExpChar R = 1",
" max 0 1 = 1",
" max q 1 = q",
" q = 1",
" 1 = 1",
" p = q ↔ p.Prime",
" p = 1 ↔ p.Prime",
" 0 = 1 ↔ Nat.Prime 0"
] | [
" ExpChar (R × S) p",
" ExpChar (R × S) 1",
" p = q",
" 1 = q",
" ringExpChar R = q",
" ringExpChar R = 1",
" max 0 1 = 1",
" max q 1 = q",
" q = 1",
" 1 = 1"
] |
import Mathlib.Analysis.Convex.Basic
import Mathlib.Order.Closure
#align_import analysis.convex.hull from "leanprover-community/mathlib"@"92bd7b1ffeb306a89f450bee126ddd8a284c259d"
open Set
open Pointwise
variable {𝕜 E F : Type*}
section convexHull
section OrderedSemiring
variable [OrderedSemiring 𝕜]
secti... | Mathlib/Analysis/Convex/Hull.lean | 127 | 131 | theorem convexHull_pair (x y : E) : convexHull 𝕜 {x, y} = segment 𝕜 x y := by |
refine (convexHull_min ?_ <| convex_segment _ _).antisymm
(segment_subset_convexHull (mem_insert _ _) <| subset_insert _ _ <| mem_singleton _)
rw [insert_subset_iff, singleton_subset_iff]
exact ⟨left_mem_segment _ _ _, right_mem_segment _ _ _⟩
| [
" (convexHull 𝕜) s = ⋂ t, ⋂ (_ : s ⊆ t), ⋂ (_ : Convex 𝕜 t), t",
" x ∈ (convexHull 𝕜) s ↔ ∀ (t : Set E), s ⊆ t → Convex 𝕜 t → x ∈ t",
" (convexHull 𝕜) s = ∅ ↔ s = ∅",
" (convexHull 𝕜) s = ∅ → s = ∅",
" s = ∅",
" s ⊆ (convexHull 𝕜) s",
" s = ∅ → (convexHull 𝕜) s = ∅",
" (convexHull 𝕜) ∅ = ∅",
... | [
" (convexHull 𝕜) s = ⋂ t, ⋂ (_ : s ⊆ t), ⋂ (_ : Convex 𝕜 t), t",
" x ∈ (convexHull 𝕜) s ↔ ∀ (t : Set E), s ⊆ t → Convex 𝕜 t → x ∈ t",
" (convexHull 𝕜) s = ∅ ↔ s = ∅",
" (convexHull 𝕜) s = ∅ → s = ∅",
" s = ∅",
" s ⊆ (convexHull 𝕜) s",
" s = ∅ → (convexHull 𝕜) s = ∅",
" (convexHull 𝕜) ∅ = ∅",
... |
import Mathlib.NumberTheory.Cyclotomic.PrimitiveRoots
import Mathlib.NumberTheory.NumberField.Embeddings
universe u
namespace IsCyclotomicExtension.Rat
open NumberField InfinitePlace FiniteDimensional Complex Nat Polynomial
variable {n : ℕ+} (K : Type u) [Field K] [CharZero K]
theorem nrRealPlaces_eq_zero [Is... | Mathlib/NumberTheory/Cyclotomic/Embeddings.lean | 41 | 60 | theorem nrComplexPlaces_eq_totient_div_two [h : IsCyclotomicExtension {n} ℚ K] :
haveI := IsCyclotomicExtension.numberField {n} ℚ K
NrComplexPlaces K = φ n / 2 := by |
have := IsCyclotomicExtension.numberField {n} ℚ K
by_cases hn : 2 < n
· obtain ⟨k, hk : φ n = k + k⟩ := totient_even hn
have key := card_add_two_mul_card_eq_rank K
rw [nrRealPlaces_eq_zero K hn, zero_add, IsCyclotomicExtension.finrank (n := n) K
(cyclotomic.irreducible_rat n.pos), hk, ← two_mul, Na... | [
" NrRealPlaces K = 0",
" NrComplexPlaces K = φ ↑n / 2",
" 2 ≠ 0",
" φ ↑n = 1",
" ↑n = 2",
" ↑n = 1",
" n = 1",
" NrComplexPlaces K = 1 / 2",
" FiniteDimensional.finrank ℚ K = 1"
] | [
" NrRealPlaces K = 0"
] |
import Mathlib.CategoryTheory.Functor.Hom
import Mathlib.CategoryTheory.Products.Basic
import Mathlib.Data.ULift
#align_import category_theory.yoneda from "leanprover-community/mathlib"@"369525b73f229ccd76a6ec0e0e0bf2be57599768"
namespace CategoryTheory
open Opposite
universe v₁ u₁ u₂
-- morphism levels before ... | Mathlib/CategoryTheory/Yoneda.lean | 255 | 258 | theorem coreprW_app_hom (X : C) (f : F.coreprX ⟶ X) :
(F.coreprW.app X).hom f = F.map f F.coreprx := by |
simp only [coyoneda_obj_obj, unop_op, Iso.app_hom, coreprx, ← FunctorToTypes.naturality,
coyoneda_obj_map, Category.id_comp]
| [
" (F.coreprW.app X).hom f = F.map f F.coreprx"
] | [] |
import Mathlib.AlgebraicGeometry.Gluing
import Mathlib.CategoryTheory.Limits.Opposites
import Mathlib.AlgebraicGeometry.AffineScheme
import Mathlib.CategoryTheory.Limits.Shapes.Diagonal
#align_import algebraic_geometry.pullbacks from "leanprover-community/mathlib"@"7316286ff2942aa14e540add9058c6b0aa1c8070"
set_opt... | Mathlib/AlgebraicGeometry/Pullbacks.lean | 64 | 67 | theorem t_fst_fst (i j : 𝒰.J) : t 𝒰 f g i j ≫ pullback.fst ≫ pullback.fst = pullback.snd := by |
simp only [t, Category.assoc, pullbackSymmetry_hom_comp_fst_assoc, pullbackAssoc_hom_snd_fst,
pullback.lift_fst_assoc, pullbackSymmetry_hom_comp_snd, pullbackAssoc_inv_fst_fst,
pullbackSymmetry_hom_comp_fst]
| [
" v 𝒰 f g i j ⟶ v 𝒰 f g j i",
" pullback (pullback.snd ≫ 𝒰.map i ≫ f) g ⟶ v 𝒰 f g j i",
" pullback (pullback.snd ≫ 𝒰.map i ≫ f) g ⟶ pullback (pullback.snd ≫ 𝒰.map j ≫ f) g",
" (pullback.snd ≫ 𝒰.map i ≫ f) ≫ 𝟙 Z = (pullbackSymmetry (𝒰.map j) (𝒰.map i)).hom ≫ pullback.snd ≫ 𝒰.map j ≫ f",
" g ≫ 𝟙 Z... | [
" v 𝒰 f g i j ⟶ v 𝒰 f g j i",
" pullback (pullback.snd ≫ 𝒰.map i ≫ f) g ⟶ v 𝒰 f g j i",
" pullback (pullback.snd ≫ 𝒰.map i ≫ f) g ⟶ pullback (pullback.snd ≫ 𝒰.map j ≫ f) g",
" (pullback.snd ≫ 𝒰.map i ≫ f) ≫ 𝟙 Z = (pullbackSymmetry (𝒰.map j) (𝒰.map i)).hom ≫ pullback.snd ≫ 𝒰.map j ≫ f",
" g ≫ 𝟙 Z... |
import Mathlib.Dynamics.Ergodic.MeasurePreserving
import Mathlib.LinearAlgebra.Determinant
import Mathlib.LinearAlgebra.Matrix.Diagonal
import Mathlib.LinearAlgebra.Matrix.Transvection
import Mathlib.MeasureTheory.Group.LIntegral
import Mathlib.MeasureTheory.Integral.Marginal
import Mathlib.MeasureTheory.Measure.Stiel... | Mathlib/MeasureTheory/Measure/Lebesgue/Basic.lean | 449 | 450 | theorem regionBetween_subset (f g : α → ℝ) (s : Set α) : regionBetween f g s ⊆ s ×ˢ univ := by |
simpa only [prod_univ, regionBetween, Set.preimage, setOf_subset_setOf] using fun a => And.left
| [
" regionBetween f g s ⊆ s ×ˢ univ"
] | [] |
import Mathlib.Order.CompleteLattice
import Mathlib.Order.GaloisConnection
import Mathlib.Data.Set.Lattice
import Mathlib.Tactic.AdaptationNote
#align_import data.rel from "leanprover-community/mathlib"@"706d88f2b8fdfeb0b22796433d7a6c1a010af9f2"
variable {α β γ : Type*}
def Rel (α β : Type*) :=
α → β → Prop --... | Mathlib/Data/Rel.lean | 112 | 115 | theorem comp_right_id (r : Rel α β) : r • @Eq β = r := by |
unfold comp
ext y
simp
| [
" r.inv.inv = r",
" r.inv.inv x y ↔ r x y",
" r.inv.codom = r.dom",
" x ∈ r.inv.codom ↔ x ∈ r.dom",
" r.inv.dom = r.codom",
" x ∈ r.inv.dom ↔ x ∈ r.codom",
" (r • s) • t = r • s • t",
" (fun x z => ∃ y, (∃ y_1, r x y_1 ∧ s y_1 y) ∧ t y z) = fun x z => ∃ y, r x y ∧ ∃ y_1, s y y_1 ∧ t y_1 z",
" (∃ y, ... | [
" r.inv.inv = r",
" r.inv.inv x y ↔ r x y",
" r.inv.codom = r.dom",
" x ∈ r.inv.codom ↔ x ∈ r.dom",
" r.inv.dom = r.codom",
" x ∈ r.inv.dom ↔ x ∈ r.codom",
" (r • s) • t = r • s • t",
" (fun x z => ∃ y, (∃ y_1, r x y_1 ∧ s y_1 y) ∧ t y z) = fun x z => ∃ y, r x y ∧ ∃ y_1, s y y_1 ∧ t y_1 z",
" (∃ y, ... |
import Mathlib.Topology.MetricSpace.HausdorffDistance
#align_import topology.metric_space.hausdorff_distance from "leanprover-community/mathlib"@"bc91ed7093bf098d253401e69df601fc33dde156"
noncomputable section
open NNReal ENNReal Topology Set Filter Bornology
universe u v w
variable {ι : Sort*} {α : Type u} {β :... | Mathlib/Topology/MetricSpace/Thickening.lean | 114 | 122 | theorem frontier_thickening_disjoint (A : Set α) :
Pairwise (Disjoint on fun r : ℝ => frontier (thickening r A)) := by |
refine (pairwise_disjoint_on _).2 fun r₁ r₂ hr => ?_
rcases le_total r₁ 0 with h₁ | h₁
· simp [thickening_of_nonpos h₁]
refine ((disjoint_singleton.2 fun h => hr.ne ?_).preimage _).mono (frontier_thickening_subset _)
(frontier_thickening_subset _)
apply_fun ENNReal.toReal at h
rwa [ENNReal.toReal_ofRea... | [
" ∀ᶠ (δ : ℝ) in 𝓝 0, x ∉ thickening δ E",
" x ∉ thickening δ E",
" ENNReal.ofReal δ ≤ infEdist x E",
" thickening δ ∅ = ∅",
" Pairwise (Disjoint on fun r => frontier (thickening r A))",
" Disjoint (frontier (thickening r₁ A)) (frontier (thickening r₂ A))",
" r₁ = r₂"
] | [
" ∀ᶠ (δ : ℝ) in 𝓝 0, x ∉ thickening δ E",
" x ∉ thickening δ E",
" ENNReal.ofReal δ ≤ infEdist x E",
" thickening δ ∅ = ∅"
] |
import Mathlib.Algebra.GCDMonoid.Basic
import Mathlib.Data.Multiset.FinsetOps
import Mathlib.Data.Multiset.Fold
#align_import algebra.gcd_monoid.multiset from "leanprover-community/mathlib"@"f694c7dead66f5d4c80f446c796a5aad14707f0e"
namespace Multiset
variable {α : Type*} [CancelCommMonoidWithZero α] [NormalizedG... | Mathlib/Algebra/GCDMonoid/Multiset.lean | 207 | 209 | theorem gcd_ndunion (s₁ s₂ : Multiset α) : (ndunion s₁ s₂).gcd = GCDMonoid.gcd s₁.gcd s₂.gcd := by |
rw [← gcd_dedup, dedup_ext.2, gcd_dedup, gcd_add]
simp
| [
" (s₁ + s₂).gcd = fold GCDMonoid.gcd (GCDMonoid.gcd 0 0) (s₁ + s₂)",
" a ∣ gcd 0 ↔ ∀ b ∈ 0, a ∣ b",
" ∀ (a_1 : α) (s : Multiset α), (a ∣ s.gcd ↔ ∀ b ∈ s, a ∣ b) → (a ∣ (a_1 ::ₘ s).gcd ↔ ∀ b ∈ a_1 ::ₘ s, a ∣ b)",
" normalize (gcd 0) = gcd 0",
" normalize (a ::ₘ s).gcd = (a ::ₘ s).gcd",
" s.gcd = 0 ↔ ∀ x ∈ ... | [
" (s₁ + s₂).gcd = fold GCDMonoid.gcd (GCDMonoid.gcd 0 0) (s₁ + s₂)",
" a ∣ gcd 0 ↔ ∀ b ∈ 0, a ∣ b",
" ∀ (a_1 : α) (s : Multiset α), (a ∣ s.gcd ↔ ∀ b ∈ s, a ∣ b) → (a ∣ (a_1 ::ₘ s).gcd ↔ ∀ b ∈ a_1 ::ₘ s, a ∣ b)",
" normalize (gcd 0) = gcd 0",
" normalize (a ::ₘ s).gcd = (a ::ₘ s).gcd",
" s.gcd = 0 ↔ ∀ x ∈ ... |
import Mathlib.Algebra.Polynomial.Derivative
import Mathlib.Tactic.LinearCombination
#align_import ring_theory.polynomial.chebyshev from "leanprover-community/mathlib"@"d774451114d6045faeb6751c396bea1eb9058946"
namespace Polynomial.Chebyshev
set_option linter.uppercaseLean3 false -- `T` `U` `X`
open Polynomial
v... | Mathlib/RingTheory/Polynomial/Chebyshev.lean | 162 | 163 | theorem U_eq (n : ℤ) : U R n = 2 * X * U R (n - 1) - U R (n - 2) := by |
linear_combination (norm := ring_nf) U_add_two R (n - 2)
| [
" motive (Int.negSucc n)",
" T R (-↑(k + 1) + 2) = 2 * X * T R (-↑(k + 1) + 1) - T R (-↑(k + 1))",
" T R (-↑(k + 1) + 2) - (2 * X * T R (-↑(k + 1) + 1) - T R (-↑(k + 1))) -\n (T R (Int.negSucc k) - (2 * X * T R (-↑k) - T R (-↑k + 1))) =\n 0",
" T R (-1 + -↑k + 2) - (2 * X * T R (-↑k) - T R (-1 + -↑k))... | [
" motive (Int.negSucc n)",
" T R (-↑(k + 1) + 2) = 2 * X * T R (-↑(k + 1) + 1) - T R (-↑(k + 1))",
" T R (-↑(k + 1) + 2) - (2 * X * T R (-↑(k + 1) + 1) - T R (-↑(k + 1))) -\n (T R (Int.negSucc k) - (2 * X * T R (-↑k) - T R (-↑k + 1))) =\n 0",
" T R (-1 + -↑k + 2) - (2 * X * T R (-↑k) - T R (-1 + -↑k))... |
import Mathlib.LinearAlgebra.BilinearForm.TensorProduct
import Mathlib.LinearAlgebra.QuadraticForm.Basic
universe uR uA uM₁ uM₂
variable {R : Type uR} {A : Type uA} {M₁ : Type uM₁} {M₂ : Type uM₂}
open TensorProduct
open LinearMap (BilinForm)
namespace QuadraticForm
section CommRing
variable [CommRing R] [CommR... | Mathlib/LinearAlgebra/QuadraticForm/TensorProduct.lean | 77 | 82 | theorem polarBilin_tmul [Invertible (2 : A)] (Q₁ : QuadraticForm A M₁) (Q₂ : QuadraticForm R M₂) :
polarBilin (Q₁.tmul Q₂) = ⅟(2 : A) • (polarBilin Q₁).tmul (polarBilin Q₂) := by |
simp_rw [← two_nsmul_associated A, ← two_nsmul_associated R, BilinForm.tmul, tmul_smul,
← smul_tmul', map_nsmul, associated_tmul]
rw [smul_comm (_ : A) (_ : ℕ), ← smul_assoc, two_smul _ (_ : A), invOf_two_add_invOf_two,
one_smul]
| [
" associated (Q₁.tmul Q₂) = (associated Q₁).tmul (associated Q₂)",
" associated\n ((let toQ := BilinForm.toQuadraticFormLinearMap A A (M₁ ⊗[R] M₂);\n let tmulB := BilinForm.tensorDistrib R A;\n let toB := AlgebraTensorModule.map associated associated;\n toQ ∘ₗ tmulB ∘ₗ toB)\n (Q₁ ... | [
" associated (Q₁.tmul Q₂) = (associated Q₁).tmul (associated Q₂)",
" associated\n ((let toQ := BilinForm.toQuadraticFormLinearMap A A (M₁ ⊗[R] M₂);\n let tmulB := BilinForm.tensorDistrib R A;\n let toB := AlgebraTensorModule.map associated associated;\n toQ ∘ₗ tmulB ∘ₗ toB)\n (Q₁ ... |
import Mathlib.Data.SetLike.Basic
import Mathlib.Data.Finset.Preimage
import Mathlib.ModelTheory.Semantics
#align_import model_theory.definability from "leanprover-community/mathlib"@"70fd9563a21e7b963887c9360bd29b2393e6225a"
universe u v w u₁
namespace Set
variable {M : Type w} (A : Set M) (L : FirstOrder.Lang... | Mathlib/ModelTheory/Definability.lean | 141 | 144 | theorem definable_finset_biInter {ι : Type*} {f : ι → Set (α → M)}
(hf : ∀ i, A.Definable L (f i)) (s : Finset ι) : A.Definable L (⋂ i ∈ s, f i) := by |
rw [← Finset.inf_set_eq_iInter]
exact definable_finset_inf hf s
| [
" A.Definable L' s",
" A.Definable L' (setOf ψ.Realize)",
" setOf ψ.Realize = setOf ((LHom.addConstants (↑A) φ).onFormula ψ).Realize",
" x ∈ setOf ψ.Realize ↔ x ∈ setOf ((LHom.addConstants (↑A) φ).onFormula ψ).Realize",
" A.Definable L s ↔ ∃ φ, s = {v | φ.Realize (Sum.elim Subtype.val v)}",
" (∃ b, s = se... | [
" A.Definable L' s",
" A.Definable L' (setOf ψ.Realize)",
" setOf ψ.Realize = setOf ((LHom.addConstants (↑A) φ).onFormula ψ).Realize",
" x ∈ setOf ψ.Realize ↔ x ∈ setOf ((LHom.addConstants (↑A) φ).onFormula ψ).Realize",
" A.Definable L s ↔ ∃ φ, s = {v | φ.Realize (Sum.elim Subtype.val v)}",
" (∃ b, s = se... |
import Mathlib.Algebra.Group.Commute.Defs
import Mathlib.Algebra.Group.Hom.Instances
import Mathlib.Data.Set.Function
import Mathlib.Logic.Pairwise
#align_import algebra.group.pi from "leanprover-community/mathlib"@"e4bc74cbaf429d706cb9140902f7ca6c431e75a4"
assert_not_exists AddMonoidWithOne
assert_not_exists Mono... | Mathlib/Algebra/Group/Pi/Lemmas.lean | 552 | 555 | theorem uncurry_mulSingle_mulSingle [DecidableEq α] [∀ a, DecidableEq (β a)] [∀ a b, One (γ a b)]
(a : α) (b : β a) (x : γ a b) :
Sigma.uncurry (Pi.mulSingle a (Pi.mulSingle b x)) = Pi.mulSingle (Sigma.mk a b) x := by |
rw [← curry_mulSingle ⟨a, b⟩, uncurry_curry]
| [
" curry (Pi.mulSingle i x) = Pi.mulSingle i.fst (Pi.mulSingle i.snd x)",
" uncurry (Pi.mulSingle a (Pi.mulSingle b x)) = Pi.mulSingle ⟨a, b⟩ x"
] | [
" curry (Pi.mulSingle i x) = Pi.mulSingle i.fst (Pi.mulSingle i.snd x)"
] |
import Mathlib.Data.SetLike.Fintype
import Mathlib.Algebra.Divisibility.Prod
import Mathlib.RingTheory.Nakayama
import Mathlib.RingTheory.SimpleModule
import Mathlib.Tactic.RSuffices
#align_import ring_theory.artinian from "leanprover-community/mathlib"@"210657c4ea4a4a7b234392f70a3a2a83346dfa90"
open Set Filter Po... | Mathlib/RingTheory/Artinian.lean | 175 | 195 | theorem IsArtinian.finite_of_linearIndependent [Nontrivial R] [IsArtinian R M] {s : Set M}
(hs : LinearIndependent R ((↑) : s → M)) : s.Finite := by |
refine by_contradiction fun hf => (RelEmbedding.wellFounded_iff_no_descending_seq.1
(wellFounded_submodule_lt (R := R) (M := M))).elim' ?_
have f : ℕ ↪ s := Set.Infinite.natEmbedding s hf
have : ∀ n, (↑) ∘ f '' { m | n ≤ m } ⊆ s := by
rintro n x ⟨y, _, rfl⟩
exact (f y).2
have : ∀ a b : ℕ, a ≤ b ↔
... | [
" ∀ (a : Submodule R N), Submodule.map f (Submodule.comap f a) = a ⊓ LinearMap.range f",
" ∀ (a : Submodule R N), Submodule.comap g (Submodule.map g a) = a ⊔ LinearMap.range f",
" ∀ {M : ι → Type u_7} [inst : Ring R] [inst_1 : (i : ι) → AddCommGroup (M i)] [inst_2 : (i : ι) → Module R (M i)]\n [inst_3 : ∀ (i... | [
" ∀ (a : Submodule R N), Submodule.map f (Submodule.comap f a) = a ⊓ LinearMap.range f",
" ∀ (a : Submodule R N), Submodule.comap g (Submodule.map g a) = a ⊔ LinearMap.range f",
" ∀ {M : ι → Type u_7} [inst : Ring R] [inst_1 : (i : ι) → AddCommGroup (M i)] [inst_2 : (i : ι) → Module R (M i)]\n [inst_3 : ∀ (i... |
import Mathlib.Algebra.Module.Submodule.Map
#align_import linear_algebra.basic from "leanprover-community/mathlib"@"9d684a893c52e1d6692a504a118bfccbae04feeb"
open Function
open Pointwise
variable {R : Type*} {R₁ : Type*} {R₂ : Type*} {R₃ : Type*}
variable {K : Type*}
variable {M : Type*} {M₁ : Type*} {M₂ : Type*... | Mathlib/Algebra/Module/Submodule/Ker.lean | 129 | 132 | theorem ker_restrict [AddCommMonoid M₁] [Module R M₁] {p : Submodule R M} {q : Submodule R M₁}
{f : M →ₗ[R] M₁} (hf : ∀ x : M, x ∈ p → f x ∈ q) :
ker (f.restrict hf) = LinearMap.ker (f.domRestrict p) := by |
rw [restrict_eq_codRestrict_domRestrict, ker_codRestrict]
| [
" ker f ≤ ker (g.comp f)",
" ker f ≤ comap f (ker g)",
" ker f ⊔ ker g ≤ ker (f ∘ₗ g)",
" ker f ≤ ker (f ∘ₗ g)",
" ker f ≤ ker (g ∘ₗ f)",
" x ∈ comap f p",
" Disjoint p (ker f) ↔ ∀ x ∈ p, f x = 0 → x = 0",
" ker f = ⊥ ↔ ∀ (m : M), f m = 0 → m = 0",
" m = 0",
" p ≤ ker f ↔ map f p = ⊥",
" ker (co... | [
" ker f ≤ ker (g.comp f)",
" ker f ≤ comap f (ker g)",
" ker f ⊔ ker g ≤ ker (f ∘ₗ g)",
" ker f ≤ ker (f ∘ₗ g)",
" ker f ≤ ker (g ∘ₗ f)",
" x ∈ comap f p",
" Disjoint p (ker f) ↔ ∀ x ∈ p, f x = 0 → x = 0",
" ker f = ⊥ ↔ ∀ (m : M), f m = 0 → m = 0",
" m = 0",
" p ≤ ker f ↔ map f p = ⊥",
" ker (co... |
import Mathlib.Analysis.Seminorm
import Mathlib.Topology.Algebra.Equicontinuity
import Mathlib.Topology.MetricSpace.Equicontinuity
import Mathlib.Topology.Algebra.FilterBasis
import Mathlib.Topology.Algebra.Module.LocallyConvex
#align_import analysis.locally_convex.with_seminorms from "leanprover-community/mathlib"@"... | Mathlib/Analysis/LocallyConvex/WithSeminorms.lean | 232 | 238 | theorem const_isBounded (ι : Type*) [Nonempty ι] {p : Seminorm 𝕜 E} {q : ι' → Seminorm 𝕜₂ F}
(f : E →ₛₗ[σ₁₂] F) : IsBounded (fun _ : ι => p) q f ↔ ∀ i, ∃ C : ℝ≥0, (q i).comp f ≤ C • p := by |
constructor <;> intro h i
· rcases h i with ⟨s, C, h⟩
exact ⟨C, le_trans h (smul_le_smul (Finset.sup_le fun _ _ => le_rfl) le_rfl)⟩
use {Classical.arbitrary ι}
simp only [h, Finset.sup_singleton]
| [
" IsBounded p (fun x => q) f ↔ ∃ s C, q.comp f ≤ C • s.sup p",
" IsBounded (fun x => p) q f ↔ ∀ (i : ι'), ∃ C, (q i).comp f ≤ C • p",
" IsBounded (fun x => p) q f → ∀ (i : ι'), ∃ C, (q i).comp f ≤ C • p",
" (∀ (i : ι'), ∃ C, (q i).comp f ≤ C • p) → IsBounded (fun x => p) q f",
" ∃ C, (q i).comp f ≤ C • p",
... | [
" IsBounded p (fun x => q) f ↔ ∃ s C, q.comp f ≤ C • s.sup p"
] |
import Mathlib.Order.Filter.Basic
#align_import order.filter.prod from "leanprover-community/mathlib"@"d6fad0e5bf2d6f48da9175d25c3dc5706b3834ce"
open Set
open Filter
namespace Filter
variable {α β γ δ : Type*} {ι : Sort*}
section Prod
variable {s : Set α} {t : Set β} {f : Filter α} {g : Filter β}
protected ... | Mathlib/Order/Filter/Prod.lean | 117 | 119 | theorem top_prod : (⊤ : Filter α) ×ˢ g = g.comap Prod.snd := by |
dsimp only [SProd.sprod]
rw [Filter.prod, comap_top, top_inf_eq]
| [
" s ∈ f ×ˢ g ↔ ∃ t₁ ∈ f, ∃ t₂ ∈ g, t₁ ×ˢ t₂ ⊆ s",
" s ∈ comap Prod.fst f ⊓ comap Prod.snd g ↔ ∃ t₁ ∈ f, ∃ t₂ ∈ g, t₁.prod t₂ ⊆ s",
" s ∈ comap Prod.fst f ⊓ comap Prod.snd g → ∃ t₁ ∈ f, ∃ t₂ ∈ g, t₁.prod t₂ ⊆ s",
" ∃ t₁_1 ∈ f, ∃ t₂_1 ∈ g, t₁_1.prod t₂_1 ⊆ t₁ ∩ t₂",
" (∃ t₁ ∈ f, ∃ t₂ ∈ g, t₁.prod t₂ ⊆ s) → s ... | [
" s ∈ f ×ˢ g ↔ ∃ t₁ ∈ f, ∃ t₂ ∈ g, t₁ ×ˢ t₂ ⊆ s",
" s ∈ comap Prod.fst f ⊓ comap Prod.snd g ↔ ∃ t₁ ∈ f, ∃ t₂ ∈ g, t₁.prod t₂ ⊆ s",
" s ∈ comap Prod.fst f ⊓ comap Prod.snd g → ∃ t₁ ∈ f, ∃ t₂ ∈ g, t₁.prod t₂ ⊆ s",
" ∃ t₁_1 ∈ f, ∃ t₂_1 ∈ g, t₁_1.prod t₂_1 ⊆ t₁ ∩ t₂",
" (∃ t₁ ∈ f, ∃ t₂ ∈ g, t₁.prod t₂ ⊆ s) → s ... |
import Mathlib.Algebra.Group.Units.Equiv
import Mathlib.CategoryTheory.Endomorphism
#align_import category_theory.conj from "leanprover-community/mathlib"@"32253a1a1071173b33dc7d6a218cf722c6feb514"
universe v u
namespace CategoryTheory
namespace Iso
variable {C : Type u} [Category.{v} C]
def homCongr {X Y X₁... | Mathlib/CategoryTheory/Conj.lean | 114 | 115 | theorem refl_conj (f : End X) : (Iso.refl X).conj f = f := by |
rw [conj_apply, Iso.refl_inv, Iso.refl_hom, Category.id_comp, Category.comp_id]
| [
" α.hom ≫ (α.inv ≫ f ≫ β.hom) ≫ β.inv = f",
" α.inv ≫ (α.hom ≫ f ≫ β.inv) ≫ β.hom = f",
" (α.homCongr β) f = α.inv ≫ f ≫ β.hom",
" (α.homCongr γ) (f ≫ g) = (α.homCongr β) f ≫ (β.homCongr γ) g",
" ((refl X).homCongr (refl Y)) f = f",
" ((α₁ ≪≫ α₂).homCongr (β₁ ≪≫ β₂)) f = ((α₁.homCongr β₁).trans (α₂.homCon... | [
" α.hom ≫ (α.inv ≫ f ≫ β.hom) ≫ β.inv = f",
" α.inv ≫ (α.hom ≫ f ≫ β.inv) ≫ β.hom = f",
" (α.homCongr β) f = α.inv ≫ f ≫ β.hom",
" (α.homCongr γ) (f ≫ g) = (α.homCongr β) f ≫ (β.homCongr γ) g",
" ((refl X).homCongr (refl Y)) f = f",
" ((α₁ ≪≫ α₂).homCongr (β₁ ≪≫ β₂)) f = ((α₁.homCongr β₁).trans (α₂.homCon... |
import Mathlib.Analysis.Normed.Group.Quotient
import Mathlib.Topology.Instances.AddCircle
#align_import analysis.normed.group.add_circle from "leanprover-community/mathlib"@"084f76e20c88eae536222583331abd9468b08e1c"
noncomputable section
open Set
open Int hiding mem_zmultiples_iff
open AddSubgroup
namespace A... | Mathlib/Analysis/Normed/Group/AddCircle.lean | 86 | 117 | theorem norm_eq {x : ℝ} : ‖(x : AddCircle p)‖ = |x - round (p⁻¹ * x) * p| := by |
suffices ∀ x : ℝ, ‖(x : AddCircle (1 : ℝ))‖ = |x - round x| by
rcases eq_or_ne p 0 with (rfl | hp)
· simp
have hx := norm_coe_mul p x p⁻¹
rw [abs_inv, eq_inv_mul_iff_mul_eq₀ ((not_congr abs_eq_zero).mpr hp)] at hx
rw [← hx, inv_mul_cancel hp, this, ← abs_mul, mul_sub, mul_inv_cancel_left₀ hp, mul... | [
" ‖↑(t * x)‖ = |t| * ‖↑x‖",
" c * a ∈ zmultiples (c * b)",
" ∃ k, k • (c * b) = c * a",
" ∃ k, k • (c * b) = c * n • b",
" ‖↑(0 * x)‖ = |0| * ‖↑x‖",
" sInf ((fun a => |a|) '' {m | ↑m = ↑(t * x)}) = |t| * sInf ((fun a => |a|) '' {m | ↑m = ↑x})",
"p x t : ℝ\naux : ∀ {a b c : ℝ}, a ∈ zmultiples b → c * a ∈... | [
" ‖↑(t * x)‖ = |t| * ‖↑x‖",
" c * a ∈ zmultiples (c * b)",
" ∃ k, k • (c * b) = c * a",
" ∃ k, k • (c * b) = c * n • b",
" ‖↑(0 * x)‖ = |0| * ‖↑x‖",
" sInf ((fun a => |a|) '' {m | ↑m = ↑(t * x)}) = |t| * sInf ((fun a => |a|) '' {m | ↑m = ↑x})",
"p x t : ℝ\naux : ∀ {a b c : ℝ}, a ∈ zmultiples b → c * a ∈... |
import Mathlib.Algebra.Quaternion
import Mathlib.Analysis.InnerProductSpace.Basic
import Mathlib.Analysis.InnerProductSpace.PiL2
import Mathlib.Topology.Algebra.Algebra
#align_import analysis.quaternion from "leanprover-community/mathlib"@"07992a1d1f7a4176c6d3f160209608be4e198566"
@[inherit_doc] scoped[Quaternion... | Mathlib/Analysis/Quaternion.lean | 132 | 132 | theorem coeComplex_add (z w : ℂ) : ↑(z + w) = (z + w : ℍ) := by | ext <;> simp
| [
" (starRingEnd ℝ) ⟪y, x⟫_ℝ = ⟪x, y⟫_ℝ",
" ⟪x + y, z⟫_ℝ = ⟪x, z⟫_ℝ + ⟪y, z⟫_ℝ",
" ⟪r • x, y⟫_ℝ = (starRingEnd ℝ) r * ⟪x, y⟫_ℝ",
" normSq a = ‖a‖ * ‖a‖",
" ‖1‖ = 1",
" ‖↑a‖ = ‖a‖",
" ‖star a‖ = ‖a‖",
" ‖a * b‖ = ‖a‖ * ‖b‖",
" √(normSq a * normSq b) = √(normSq a) * √(normSq b)",
" ↑(z + w) = ↑z + ↑w"... | [
" (starRingEnd ℝ) ⟪y, x⟫_ℝ = ⟪x, y⟫_ℝ",
" ⟪x + y, z⟫_ℝ = ⟪x, z⟫_ℝ + ⟪y, z⟫_ℝ",
" ⟪r • x, y⟫_ℝ = (starRingEnd ℝ) r * ⟪x, y⟫_ℝ",
" normSq a = ‖a‖ * ‖a‖",
" ‖1‖ = 1",
" ‖↑a‖ = ‖a‖",
" ‖star a‖ = ‖a‖",
" ‖a * b‖ = ‖a‖ * ‖b‖",
" √(normSq a * normSq b) = √(normSq a) * √(normSq b)"
] |
import Mathlib.Algebra.Polynomial.AlgebraMap
import Mathlib.Data.Matrix.Basis
import Mathlib.Data.Matrix.DMatrix
import Mathlib.RingTheory.MatrixAlgebra
#align_import ring_theory.polynomial_algebra from "leanprover-community/mathlib"@"565eb991e264d0db702722b4bde52ee5173c9950"
universe u v w
open Polynomial Tensor... | Mathlib/RingTheory/PolynomialAlgebra.lean | 109 | 111 | theorem toFunLinear_one_tmul_one :
toFunLinear R A (1 ⊗ₜ[R] 1) = 1 := by |
rw [toFunLinear_tmul_apply, toFunBilinear_apply_apply, Polynomial.aeval_one, one_smul]
| [
" ((toFunBilinear R A) a) p = p.sum fun n r => (monomial n) (a * (algebraMap R A) r)",
" ∑ x ∈ p.support, a • ((algebraMap R A[X]) (p.coeff x) * X ^ x) =\n ∑ x ∈ p.support, (monomial x) (a * (algebraMap R A) (p.coeff x))",
" a • ((algebraMap R A[X]) (p.coeff i) * X ^ i) = (monomial i) (a * (algebraMap R A) (... | [
" ((toFunBilinear R A) a) p = p.sum fun n r => (monomial n) (a * (algebraMap R A) r)",
" ∑ x ∈ p.support, a • ((algebraMap R A[X]) (p.coeff x) * X ^ x) =\n ∑ x ∈ p.support, (monomial x) (a * (algebraMap R A) (p.coeff x))",
" a • ((algebraMap R A[X]) (p.coeff i) * X ^ i) = (monomial i) (a * (algebraMap R A) (... |
import Mathlib.Algebra.GroupWithZero.Divisibility
import Mathlib.Algebra.Ring.Divisibility.Basic
import Mathlib.Algebra.Ring.Hom.Defs
import Mathlib.GroupTheory.GroupAction.Units
import Mathlib.Logic.Basic
import Mathlib.Tactic.Ring
#align_import ring_theory.coprime.basic from "leanprover-community/mathlib"@"a95b16cb... | Mathlib/RingTheory/Coprime/Basic.lean | 102 | 105 | theorem IsCoprime.dvd_of_dvd_mul_right (H1 : IsCoprime x z) (H2 : x ∣ y * z) : x ∣ y := by |
let ⟨a, b, H⟩ := H1
rw [← mul_one y, ← H, mul_add, ← mul_assoc, mul_left_comm]
exact dvd_add (dvd_mul_left _ _) (H2.mul_left _)
| [
" b * y + a * x = 1",
" x * (a + b) = 1",
" b * x + 0 * x = 1",
" x * b = 1",
" 1 * 0 + b * x = 1",
" IsCoprime ↑a ↑b",
" ↑u * ↑a + ↑v * ↑b = 1",
" ↑1 = 1",
" p ≠ 0",
" False",
" x ≠ 0 ∨ y ≠ 0",
" x = 0 → y ≠ 0",
" 1 * 1 + 0 * x = 1",
" 0 * x + 1 * 1 = 1",
" x ∣ y",
" x ∣ y * a * x + b... | [
" b * y + a * x = 1",
" x * (a + b) = 1",
" b * x + 0 * x = 1",
" x * b = 1",
" 1 * 0 + b * x = 1",
" IsCoprime ↑a ↑b",
" ↑u * ↑a + ↑v * ↑b = 1",
" ↑1 = 1",
" p ≠ 0",
" False",
" x ≠ 0 ∨ y ≠ 0",
" x = 0 → y ≠ 0",
" 1 * 1 + 0 * x = 1",
" 0 * x + 1 * 1 = 1"
] |
import Mathlib.MeasureTheory.Integral.SetIntegral
#align_import measure_theory.integral.average from "leanprover-community/mathlib"@"c14c8fcde993801fca8946b0d80131a1a81d1520"
open ENNReal MeasureTheory MeasureTheory.Measure Metric Set Filter TopologicalSpace Function
open scoped Topology ENNReal Convex
variable... | Mathlib/MeasureTheory/Integral/Average.lean | 341 | 347 | theorem measure_smul_average [IsFiniteMeasure μ] (f : α → E) :
(μ univ).toReal • ⨍ x, f x ∂μ = ∫ x, f x ∂μ := by |
rcases eq_or_ne μ 0 with hμ | hμ
· rw [hμ, integral_zero_measure, average_zero_measure, smul_zero]
· rw [average_eq, smul_inv_smul₀]
refine (ENNReal.toReal_pos ?_ <| measure_ne_top _ _).ne'
rwa [Ne, measure_univ_eq_zero]
| [
" ⨍ (x : α), 0 ∂μ = 0",
" ⨍ (x : α), f x ∂0 = 0",
" ⨍ (x : α), f x ∂μ = (μ univ).toReal⁻¹ • ∫ (x : α), f x ∂μ",
" ⨍ (x : α), f x ∂μ = ∫ (x : α), f x ∂μ",
" (μ univ).toReal • ⨍ (x : α), f x ∂μ = ∫ (x : α), f x ∂μ",
" (μ univ).toReal ≠ 0",
" μ univ ≠ 0"
] | [
" ⨍ (x : α), 0 ∂μ = 0",
" ⨍ (x : α), f x ∂0 = 0",
" ⨍ (x : α), f x ∂μ = (μ univ).toReal⁻¹ • ∫ (x : α), f x ∂μ",
" ⨍ (x : α), f x ∂μ = ∫ (x : α), f x ∂μ"
] |
import Mathlib.MeasureTheory.Decomposition.Lebesgue
import Mathlib.MeasureTheory.Measure.Complex
import Mathlib.MeasureTheory.Decomposition.Jordan
import Mathlib.MeasureTheory.Measure.WithDensityVectorMeasure
noncomputable section
open scoped Classical MeasureTheory NNReal ENNReal
open Set
variable {α β : Type*... | Mathlib/MeasureTheory/Decomposition/SignedLebesgue.lean | 148 | 158 | theorem singularPart_totalVariation (s : SignedMeasure α) (μ : Measure α) :
(s.singularPart μ).totalVariation =
s.toJordanDecomposition.posPart.singularPart μ +
s.toJordanDecomposition.negPart.singularPart μ := by |
have :
(s.singularPart μ).toJordanDecomposition =
⟨s.toJordanDecomposition.posPart.singularPart μ,
s.toJordanDecomposition.negPart.singularPart μ, singularPart_mutuallySingular s μ⟩ := by
refine JordanDecomposition.toSignedMeasure_injective ?_
rw [toSignedMeasure_toJordanDecomposition, sing... | [
" (-s).toJordanDecomposition.posPart.HaveLebesgueDecomposition μ",
" s.toJordanDecomposition.negPart.HaveLebesgueDecomposition μ",
" (-s).toJordanDecomposition.negPart.HaveLebesgueDecomposition μ",
" s.toJordanDecomposition.posPart.HaveLebesgueDecomposition μ",
" (r • s).toJordanDecomposition.posPart.HaveLe... | [
" (-s).toJordanDecomposition.posPart.HaveLebesgueDecomposition μ",
" s.toJordanDecomposition.negPart.HaveLebesgueDecomposition μ",
" (-s).toJordanDecomposition.negPart.HaveLebesgueDecomposition μ",
" s.toJordanDecomposition.posPart.HaveLebesgueDecomposition μ",
" (r • s).toJordanDecomposition.posPart.HaveLe... |
import Mathlib.Algebra.Homology.QuasiIso
#align_import category_theory.preadditive.projective_resolution from "leanprover-community/mathlib"@"324a7502510e835cdbd3de1519b6c66b51fb2467"
universe v u
namespace CategoryTheory
open Category Limits ChainComplex HomologicalComplex
variable {C : Type u} [Category.{v} ... | Mathlib/CategoryTheory/Preadditive/ProjectiveResolution.lean | 95 | 97 | theorem complex_d_comp_π_f_zero :
P.complex.d 1 0 ≫ P.π.f 0 = 0 := by |
rw [← P.π.comm 1 0, single_obj_d, comp_zero]
| [
" ExactAt P.complex (n + 1)",
" QuasiIsoAt P.π (n + 1)",
" (ComplexShape.down ℕ).prev (n + 1) = n + 2",
" n + 1 + 1 = n + 2",
" (ComplexShape.down ℕ).next (n + 1) = n",
" n + 1 ≠ 0",
" P.complex.d 1 0 ≫ P.π.f 0 = 0"
] | [
" ExactAt P.complex (n + 1)",
" QuasiIsoAt P.π (n + 1)",
" (ComplexShape.down ℕ).prev (n + 1) = n + 2",
" n + 1 + 1 = n + 2",
" (ComplexShape.down ℕ).next (n + 1) = n",
" n + 1 ≠ 0"
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.