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.Topology.Algebra.Module.Basic
import Mathlib.LinearAlgebra.BilinearMap
#align_import topology.algebra.module.weak_dual from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982"
noncomputable section
open Filter
open Topology
variable {α 𝕜 𝕝 R E F M : Type*}
section WeakTo... | Mathlib/Topology/Algebra/Module/WeakDual.lean | 133 | 137 | theorem tendsto_iff_forall_eval_tendsto {l : Filter α} {f : α → WeakBilin B} {x : WeakBilin B}
(hB : Function.Injective B) :
Tendsto f l (𝓝 x) ↔ ∀ y, Tendsto (fun i => B (f i) y) l (𝓝 (B x y)) := by |
rw [← tendsto_pi_nhds, Embedding.tendsto_nhds_iff (embedding hB)]
rfl
| [
" Tendsto f l (𝓝 x) ↔ ∀ (y : F), Tendsto (fun i => (B (f i)) y) l (𝓝 ((B x) y))",
" Tendsto ((fun x y => (B x) y) ∘ f) l (𝓝 fun y => (B x) y) ↔ Tendsto (fun i y => (B (f i)) y) l (𝓝 fun y => (B x) y)"
] | [] |
import Mathlib.Data.Finsupp.Lex
import Mathlib.Data.Finsupp.Multiset
import Mathlib.Order.GameAdd
#align_import logic.hydra from "leanprover-community/mathlib"@"48085f140e684306f9e7da907cd5932056d1aded"
namespace Relation
open Multiset Prod
variable {α : Type*}
def CutExpand (r : α → α → Prop) (s' s : Multise... | Mathlib/Logic/Hydra.lean | 89 | 98 | theorem cutExpand_iff [DecidableEq α] [IsIrrefl α r] {s' s : Multiset α} :
CutExpand r s' s ↔
∃ (t : Multiset α) (a : α), (∀ a' ∈ t, r a' a) ∧ a ∈ s ∧ s' = s.erase a + t := by |
simp_rw [CutExpand, add_singleton_eq_iff]
refine exists₂_congr fun t a ↦ ⟨?_, ?_⟩
· rintro ⟨ht, ha, rfl⟩
obtain h | h := mem_add.1 ha
exacts [⟨ht, h, erase_add_left_pos t h⟩, (@irrefl α r _ a (ht a h)).elim]
· rintro ⟨ht, h, rfl⟩
exact ⟨ht, mem_add.2 (Or.inl h), (erase_add_left_pos t h).symm⟩
| [
" CutExpand r ≤ InvImage (Finsupp.Lex (rᶜ ⊓ fun x x_1 => x ≠ x_1) fun x x_1 => x < x_1) ⇑toFinsupp",
" InvImage (Finsupp.Lex (rᶜ ⊓ fun x x_1 => x ≠ x_1) fun x x_1 => x < x_1) (⇑toFinsupp) s t",
" (toFinsupp s) b = (toFinsupp t) b",
" (fun {i} x x_1 => x < x_1) ((toFinsupp s) a) ((toFinsupp t) a)",
" count b... | [
" CutExpand r ≤ InvImage (Finsupp.Lex (rᶜ ⊓ fun x x_1 => x ≠ x_1) fun x x_1 => x < x_1) ⇑toFinsupp",
" InvImage (Finsupp.Lex (rᶜ ⊓ fun x x_1 => x ≠ x_1) fun x x_1 => x < x_1) (⇑toFinsupp) s t",
" (toFinsupp s) b = (toFinsupp t) b",
" (fun {i} x x_1 => x < x_1) ((toFinsupp s) a) ((toFinsupp t) a)",
" count b... |
import Mathlib.Algebra.CharP.Algebra
import Mathlib.Data.ZMod.Algebra
import Mathlib.FieldTheory.Finite.Basic
import Mathlib.FieldTheory.Galois
import Mathlib.FieldTheory.SplittingField.IsSplittingField
#align_import field_theory.finite.galois_field from "leanprover-community/mathlib"@"0723536a0522d24fc2f159a096fb330... | Mathlib/FieldTheory/Finite/GaloisField.lean | 96 | 143 | theorem finrank {n} (h : n ≠ 0) : FiniteDimensional.finrank (ZMod p) (GaloisField p n) = n := by |
set g_poly := (X ^ p ^ n - X : (ZMod p)[X])
have hp : 1 < p := h_prime.out.one_lt
have aux : g_poly ≠ 0 := FiniteField.X_pow_card_pow_sub_X_ne_zero _ h hp
-- Porting note: in the statment of `key`, replaced `g_poly` by its value otherwise the
-- proof fails
have key : Fintype.card (g_poly.rootSet (GaloisFi... | [
" Splits (algebraMap F K) (X ^ Fintype.card K - X)",
" Algebra.adjoin F ((X ^ Fintype.card K - X).rootSet K) = ⊤",
" Algebra.adjoin F ((X ^ Fintype.card K - X).rootSet K) = Algebra.adjoin F ↑(X ^ Fintype.card K - X).roots.toFinset",
" Algebra.adjoin F ↑(X ^ Fintype.card K - X).roots.toFinset = ⊤",
" (X ^ q ... | [
" Splits (algebraMap F K) (X ^ Fintype.card K - X)",
" Algebra.adjoin F ((X ^ Fintype.card K - X).rootSet K) = ⊤",
" Algebra.adjoin F ((X ^ Fintype.card K - X).rootSet K) = Algebra.adjoin F ↑(X ^ Fintype.card K - X).roots.toFinset",
" Algebra.adjoin F ↑(X ^ Fintype.card K - X).roots.toFinset = ⊤",
" (X ^ q ... |
import Mathlib.Algebra.Order.Monoid.Unbundled.MinMax
import Mathlib.Algebra.Order.Monoid.WithTop
import Mathlib.Data.Finset.Image
import Mathlib.Data.Multiset.Fold
#align_import data.finset.fold from "leanprover-community/mathlib"@"9003f28797c0664a49e4179487267c494477d853"
-- TODO:
-- assert_not_exists OrderedComm... | Mathlib/Data/Finset/Fold.lean | 99 | 103 | theorem fold_hom {op' : γ → γ → γ} [Std.Commutative op'] [Std.Associative op'] {m : β → γ}
(hm : ∀ x y, m (op x y) = op' (m x) (m y)) :
(s.fold op' (m b) fun x => m (f x)) = m (s.fold op b f) := by |
rw [fold, fold, ← Multiset.fold_hom op hm, Multiset.map_map]
simp only [Function.comp_apply]
| [
" fold op b f (cons a s h) = op (f a) (fold op b f s)",
" Multiset.fold op b (Multiset.map f (cons a s h).val) = op (f a) (Multiset.fold op b (Multiset.map f s.val))",
" fold op b f (insert a s) = op (f a) (fold op b f s)",
" Multiset.fold op b (Multiset.map f (insert a s).val) = op (f a) (Multiset.fold op b ... | [
" fold op b f (cons a s h) = op (f a) (fold op b f s)",
" Multiset.fold op b (Multiset.map f (cons a s h).val) = op (f a) (Multiset.fold op b (Multiset.map f s.val))",
" fold op b f (insert a s) = op (f a) (fold op b f s)",
" Multiset.fold op b (Multiset.map f (insert a s).val) = op (f a) (Multiset.fold op b ... |
import Mathlib.Combinatorics.SimpleGraph.Dart
import Mathlib.Data.FunLike.Fintype
open Function
namespace SimpleGraph
variable {V W X : Type*} (G : SimpleGraph V) (G' : SimpleGraph W) {u v : V}
protected def map (f : V ↪ W) (G : SimpleGraph V) : SimpleGraph W where
Adj := Relation.Map G.Adj f f
symm a b... | Mathlib/Combinatorics/SimpleGraph/Maps.lean | 129 | 131 | theorem comap_map_eq (f : V ↪ W) (G : SimpleGraph V) : (G.map f).comap f = G := by |
ext
simp
| [
" Relation.Map G.Adj (⇑f) (⇑f) a b → Relation.Map G.Adj (⇑f) (⇑f) b a",
" Relation.Map G.Adj (⇑f) (⇑f) (f w) (f v)",
" ¬Relation.Map G.Adj (⇑f) (⇑f) a a",
" False",
" (SimpleGraph.map f G).Adj (f a) (f b) ↔ G.Adj a b",
" Monotone (SimpleGraph.map f)",
" (SimpleGraph.map f G').Adj (f u) (f v)",
" Simpl... | [
" Relation.Map G.Adj (⇑f) (⇑f) a b → Relation.Map G.Adj (⇑f) (⇑f) b a",
" Relation.Map G.Adj (⇑f) (⇑f) (f w) (f v)",
" ¬Relation.Map G.Adj (⇑f) (⇑f) a a",
" False",
" (SimpleGraph.map f G).Adj (f a) (f b) ↔ G.Adj a b",
" Monotone (SimpleGraph.map f)",
" (SimpleGraph.map f G').Adj (f u) (f v)",
" Simpl... |
import Mathlib.MeasureTheory.Measure.Haar.Basic
import Mathlib.Analysis.NormedSpace.FiniteDimension
import Mathlib.MeasureTheory.Measure.Haar.Unique
open MeasureTheory Measure Set
open scoped ENNReal
variable {𝕜 E F : Type*}
[NontriviallyNormedField 𝕜] [CompleteSpace 𝕜]
[NormedAddCommGroup E] [MeasurableSp... | Mathlib/MeasureTheory/Measure/Haar/Disintegration.lean | 42 | 102 | theorem LinearMap.exists_map_addHaar_eq_smul_addHaar' (h : Function.Surjective L) :
∃ (c : ℝ≥0∞), 0 < c ∧ c < ∞ ∧ μ.map L = (c * addHaar (univ : Set (LinearMap.ker L))) • ν := by |
/- This is true for the second projection in product spaces, as the projection of the Haar
measure `μS.prod μT` is equal to the Haar measure `μT` multiplied by the total mass of `μS`. This
is also true for linear equivalences, as they map Haar measure to Haar measure. The general case
follows from these two an... | [
" ∃ c, 0 < c ∧ c < ⊤ ∧ map (⇑L) μ = (c * addHaar univ) • ν",
" ProperSpace F",
" L = ↑L' ∘ₗ P ∘ₗ ↑M.symm",
" L x = (↑L' ∘ₗ P ∘ₗ ↑M.symm) x",
" x = M (y, z)",
" x = M (M.symm x)",
" map (⇑L) μ = map (⇑L') (map (⇑P) (map (⇑M.symm) μ))",
" map (⇑(↑L' ∘ₗ P ∘ₗ ↑M.symm)) μ = map ((⇑L' ∘ ⇑P) ∘ ⇑M.symm) μ",
... | [] |
import Mathlib.Data.ENNReal.Inv
#align_import data.real.ennreal from "leanprover-community/mathlib"@"c14c8fcde993801fca8946b0d80131a1a81d1520"
open Set NNReal ENNReal
namespace ENNReal
section iInf
variable {ι : Sort*} {f g : ι → ℝ≥0∞}
variable {a b c d : ℝ≥0∞} {r p q : ℝ≥0}
| Mathlib/Data/ENNReal/Real.lean | 541 | 545 | theorem toNNReal_iInf (hf : ∀ i, f i ≠ ∞) : (iInf f).toNNReal = ⨅ i, (f i).toNNReal := by |
cases isEmpty_or_nonempty ι
· rw [iInf_of_empty, top_toNNReal, NNReal.iInf_empty]
· lift f to ι → ℝ≥0 using hf
simp_rw [← coe_iInf, toNNReal_coe]
| [
" (iInf f).toNNReal = ⨅ i, (f i).toNNReal",
" (⨅ i, ↑(f i)).toNNReal = ⨅ i, ((fun i => ↑(f i)) i).toNNReal"
] | [] |
import Mathlib.Init.Logic
import Mathlib.Init.Function
import Mathlib.Tactic.TypeStar
#align_import logic.nontrivial from "leanprover-community/mathlib"@"48fb5b5280e7c81672afc9524185ae994553ebf4"
variable {α : Type*} {β : Type*}
open scoped Classical
class Nontrivial (α : Type*) : Prop where
exists_pair_n... | Mathlib/Logic/Nontrivial/Defs.lean | 83 | 84 | theorem not_nontrivial_iff_subsingleton : ¬Nontrivial α ↔ Subsingleton α := by |
simp only [nontrivial_iff, subsingleton_iff, not_exists, Classical.not_not]
| [
" ∃ y, y ≠ x",
" Subsingleton α → ∀ (x y : α), x = y",
" ∀ (x y : α), x = y",
" ¬Nontrivial α ↔ Subsingleton α"
] | [
" ∃ y, y ≠ x",
" Subsingleton α → ∀ (x y : α), x = y",
" ∀ (x y : α), x = y"
] |
import Mathlib.FieldTheory.Extension
import Mathlib.FieldTheory.SplittingField.Construction
import Mathlib.GroupTheory.Solvable
#align_import field_theory.normal from "leanprover-community/mathlib"@"9fb8964792b4237dac6200193a0d533f1b3f7423"
noncomputable section
open scoped Classical Polynomial
open Polynomial ... | Mathlib/FieldTheory/Normal.lean | 120 | 142 | theorem Normal.of_isSplittingField (p : F[X]) [hFEp : IsSplittingField F E p] : Normal F E := by |
rcases eq_or_ne p 0 with (rfl | hp)
· have := hFEp.adjoin_rootSet
rw [rootSet_zero, Algebra.adjoin_empty] at this
exact Normal.of_algEquiv
(AlgEquiv.ofBijective (Algebra.ofId F E) (Algebra.bijective_algebraMap_iff.2 this.symm))
refine normal_iff.mpr fun x ↦ ?_
haveI : FiniteDimensional F E := IsS... | [
" ∃ p, IsSplittingField F K p",
" Subalgebra.toSubmodule (Algebra.adjoin F ((∏ x : ↑(Basis.ofVectorSpaceIndex F K), minpoly F (s x)).rootSet K)) =\n Subalgebra.toSubmodule ⊤",
" ∀ (y : ↑(Basis.ofVectorSpaceIndex F K)),\n s y ∈\n ↑(Subalgebra.toSubmodule (Algebra.adjoin F ((∏ x : ↑(Basis.ofVectorSpace... | [
" ∃ p, IsSplittingField F K p",
" Subalgebra.toSubmodule (Algebra.adjoin F ((∏ x : ↑(Basis.ofVectorSpaceIndex F K), minpoly F (s x)).rootSet K)) =\n Subalgebra.toSubmodule ⊤",
" ∀ (y : ↑(Basis.ofVectorSpaceIndex F K)),\n s y ∈\n ↑(Subalgebra.toSubmodule (Algebra.adjoin F ((∏ x : ↑(Basis.ofVectorSpace... |
import Mathlib.Data.Finset.Pointwise
#align_import combinatorics.additive.e_transform from "leanprover-community/mathlib"@"207c92594599a06e7c134f8d00a030a83e6c7259"
open MulOpposite
open Pointwise
variable {α : Type*} [DecidableEq α]
namespace Finset
section CommGroup
variable [CommGroup α] (e : α) (x : F... | Mathlib/Combinatorics/Additive/ETransform.lean | 58 | 61 | theorem mulDysonETransform.subset :
(mulDysonETransform e x).1 * (mulDysonETransform e x).2 ⊆ x.1 * x.2 := by |
refine union_mul_inter_subset_union.trans (union_subset Subset.rfl ?_)
rw [mul_smul_comm, smul_mul_assoc, inv_smul_smul, mul_comm]
| [
" (mulDysonETransform e x).1 * (mulDysonETransform e x).2 ⊆ x.1 * x.2",
" e • x.2 * e⁻¹ • x.1 ⊆ x.1 * x.2"
] | [] |
import Mathlib.Algebra.Polynomial.Smeval
import Mathlib.GroupTheory.GroupAction.Ring
import Mathlib.RingTheory.Polynomial.Pochhammer
section Multichoose
open Function Polynomial
class BinomialRing (R : Type*) [AddCommMonoid R] [Pow R ℕ] where
nsmul_right_injective (n : ℕ) (h : n ≠ 0) : Injective (n • · : R →... | Mathlib/RingTheory/Binomial.lean | 117 | 127 | theorem descPochhammer_smeval_eq_descFactorial (n k : ℕ) :
(descPochhammer ℤ k).smeval (n : R) = n.descFactorial k := by |
induction k with
| zero =>
rw [descPochhammer_zero, Nat.descFactorial_zero, Nat.cast_one, smeval_one, npow_zero, one_smul]
| succ k ih =>
rw [descPochhammer_succ_right, Nat.descFactorial_succ, smeval_mul, ih, mul_comm, Nat.cast_mul,
smeval_sub, smeval_X, smeval_natCast, npow_one, npow_zero, nsmul_o... | [
" (ascPochhammer R n).smeval x = (ascPochhammer ℕ n).smeval x",
" (ascPochhammer R 0).smeval x = (ascPochhammer ℕ 0).smeval x",
" (ascPochhammer R (n + 1)).smeval x = (ascPochhammer ℕ (n + 1)).smeval x",
" (ascPochhammer R n).smeval x * x + (↑n * ascPochhammer R n).smeval x =\n (ascPochhammer ℕ n).smeval x... | [
" (ascPochhammer R n).smeval x = (ascPochhammer ℕ n).smeval x",
" (ascPochhammer R 0).smeval x = (ascPochhammer ℕ 0).smeval x",
" (ascPochhammer R (n + 1)).smeval x = (ascPochhammer ℕ (n + 1)).smeval x",
" (ascPochhammer R n).smeval x * x + (↑n * ascPochhammer R n).smeval x =\n (ascPochhammer ℕ n).smeval x... |
import Mathlib.Data.Set.Pairwise.Basic
import Mathlib.Order.Bounds.Basic
import Mathlib.Order.Directed
import Mathlib.Order.Hom.Set
#align_import order.antichain from "leanprover-community/mathlib"@"c227d107bbada5d0d9d20287e3282c0a7f1651a0"
open Function Set
section General
variable {α β : Type*} {r r₁ r₂ : α →... | Mathlib/Order/Antichain.lean | 89 | 92 | theorem image (hs : IsAntichain r s) (f : α → β) (h : ∀ ⦃a b⦄, r' (f a) (f b) → r a b) :
IsAntichain r' (f '' s) := by |
rintro _ ⟨b, hb, rfl⟩ _ ⟨c, hc, rfl⟩ hbc hr
exact hs hb hc (ne_of_apply_ne _ hbc) (h hr)
| [
" s.Subsingleton",
" a = b",
" IsAntichain r' (f '' s)",
" False"
] | [
" s.Subsingleton",
" a = b"
] |
import Mathlib.Topology.MetricSpace.PseudoMetric
import Mathlib.Topology.UniformSpace.Equicontinuity
#align_import topology.metric_space.equicontinuity from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982"
open Filter Topology Uniformity
variable {α β ι : Type*} [PseudoMetricSpace α]
na... | Mathlib/Topology/MetricSpace/Equicontinuity.lean | 90 | 97 | theorem equicontinuousAt_of_continuity_modulus {ι : Type*} [TopologicalSpace β] {x₀ : β}
(b : β → ℝ) (b_lim : Tendsto b (𝓝 x₀) (𝓝 0)) (F : ι → β → α)
(H : ∀ᶠ x in 𝓝 x₀, ∀ i, dist (F i x₀) (F i x) ≤ b x) : EquicontinuousAt F x₀ := by |
rw [Metric.equicontinuousAt_iff_right]
intro ε ε0
-- Porting note: Lean 3 didn't need `Filter.mem_map.mp` here
filter_upwards [Filter.mem_map.mp <| b_lim (Iio_mem_nhds ε0), H] using
fun x hx₁ hx₂ i => (hx₂ i).trans_lt hx₁
| [
" EquicontinuousAt F x₀ ↔ ∀ ε > 0, ∃ U ∈ 𝓝 x₀, ∀ x ∈ U, ∀ x' ∈ U, ∀ (i : ι), dist (F i x) (F i x') < ε",
" (∀ U ∈ 𝓤 α, ∃ V ∈ 𝓝 x₀, ∀ x ∈ V, ∀ y ∈ V, ∀ (i : ι), (F i x, F i y) ∈ U) ↔\n ∀ ε > 0, ∃ U ∈ 𝓝 x₀, ∀ x ∈ U, ∀ x' ∈ U, ∀ (i : ι), dist (F i x) (F i x') < ε",
" (∀ U ∈ 𝓤 α, ∃ V ∈ 𝓝 x₀, ∀ x ∈ V, ∀ y ∈... | [
" EquicontinuousAt F x₀ ↔ ∀ ε > 0, ∃ U ∈ 𝓝 x₀, ∀ x ∈ U, ∀ x' ∈ U, ∀ (i : ι), dist (F i x) (F i x') < ε",
" (∀ U ∈ 𝓤 α, ∃ V ∈ 𝓝 x₀, ∀ x ∈ V, ∀ y ∈ V, ∀ (i : ι), (F i x, F i y) ∈ U) ↔\n ∀ ε > 0, ∃ U ∈ 𝓝 x₀, ∀ x ∈ U, ∀ x' ∈ U, ∀ (i : ι), dist (F i x) (F i x') < ε",
" (∀ U ∈ 𝓤 α, ∃ V ∈ 𝓝 x₀, ∀ x ∈ V, ∀ y ∈... |
import Mathlib.Data.Multiset.Nodup
import Mathlib.Data.List.NatAntidiagonal
#align_import data.multiset.nat_antidiagonal from "leanprover-community/mathlib"@"9003f28797c0664a49e4179487267c494477d853"
namespace Multiset
namespace Nat
def antidiagonal (n : ℕ) : Multiset (ℕ × ℕ) :=
List.Nat.antidiagonal n
#align... | Mathlib/Data/Multiset/NatAntidiagonal.lean | 77 | 78 | theorem map_swap_antidiagonal {n : ℕ} : (antidiagonal n).map Prod.swap = antidiagonal n := by |
rw [antidiagonal, map_coe, List.Nat.map_swap_antidiagonal, coe_reverse]
| [
" x ∈ antidiagonal n ↔ x.1 + x.2 = n",
" card (antidiagonal n) = n + 1",
" antidiagonal (n + 1) = (0, n + 1) ::ₘ map (Prod.map Nat.succ id) (antidiagonal n)",
" antidiagonal (n + 1) = (n + 1, 0) ::ₘ map (Prod.map id Nat.succ) (antidiagonal n)",
" antidiagonal (n + 2) = (0, n + 2) ::ₘ (n + 2, 0) ::ₘ map (Pro... | [
" x ∈ antidiagonal n ↔ x.1 + x.2 = n",
" card (antidiagonal n) = n + 1",
" antidiagonal (n + 1) = (0, n + 1) ::ₘ map (Prod.map Nat.succ id) (antidiagonal n)",
" antidiagonal (n + 1) = (n + 1, 0) ::ₘ map (Prod.map id Nat.succ) (antidiagonal n)",
" antidiagonal (n + 2) = (0, n + 2) ::ₘ (n + 2, 0) ::ₘ map (Pro... |
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 | 160 | 161 | theorem eq_one_iff_eq_one_of_mul_eq_one {a b : M} (h : a * b = 1) : a = 1 ↔ b = 1 := by |
constructor <;> (rintro rfl; simpa using h)
| [
" (if P then a * b else 1) = (if P then a else 1) * if P then b else 1",
" (if P then 1 else a * b) = (if P then 1 else a) * if P then 1 else b",
" a = 1 ↔ b = 1",
" a = 1 → b = 1",
" b = 1",
" b = 1 → a = 1",
" a = 1"
] | [
" (if P then a * b else 1) = (if P then a else 1) * if P then b else 1",
" (if P then 1 else a * b) = (if P then 1 else a) * if P then 1 else b"
] |
import Mathlib.RingTheory.Ideal.Operations
import Mathlib.Algebra.Module.Torsion
import Mathlib.Algebra.Ring.Idempotents
import Mathlib.LinearAlgebra.FiniteDimensional
import Mathlib.RingTheory.Ideal.LocalRing
import Mathlib.RingTheory.Filtration
import Mathlib.RingTheory.Nakayama
#align_import ring_theory.ideal.cota... | Mathlib/RingTheory/Ideal/Cotangent.lean | 74 | 76 | theorem toCotangent_eq {x y : I} : I.toCotangent x = I.toCotangent y ↔ (x - y : R) ∈ I ^ 2 := by |
rw [← sub_eq_zero]
exact I.mem_toCotangent_ker
| [
" AddCommGroup I.Cotangent",
" AddCommGroup (↥I ⧸ I • ⊤)",
" Module (R ⧸ I) I.Cotangent",
" Module (R ⧸ I) (↥I ⧸ I • ⊤)",
" Submodule.map (Submodule.subtype I) (LinearMap.ker I.toCotangent) = I ^ 2",
" x ∈ LinearMap.ker I.toCotangent ↔ ↑x ∈ I ^ 2",
" x ∈ LinearMap.ker I.toCotangent ↔ ↑x ∈ Submodule.map ... | [
" AddCommGroup I.Cotangent",
" AddCommGroup (↥I ⧸ I • ⊤)",
" Module (R ⧸ I) I.Cotangent",
" Module (R ⧸ I) (↥I ⧸ I • ⊤)",
" Submodule.map (Submodule.subtype I) (LinearMap.ker I.toCotangent) = I ^ 2",
" x ∈ LinearMap.ker I.toCotangent ↔ ↑x ∈ I ^ 2",
" x ∈ LinearMap.ker I.toCotangent ↔ ↑x ∈ Submodule.map ... |
import Mathlib.Algebra.Homology.HomologicalComplex
import Mathlib.CategoryTheory.DifferentialObject
#align_import algebra.homology.differential_object from "leanprover-community/mathlib"@"b535c2d5d996acd9b0554b76395d9c920e186f4f"
open CategoryTheory CategoryTheory.Limits
open scoped Classical
noncomputable secti... | Mathlib/Algebra/Homology/DifferentialObject.lean | 78 | 79 | theorem d_eqToHom (X : HomologicalComplex V (ComplexShape.up' b)) {x y z : β} (h : y = z) :
X.d x y ≫ eqToHom (congr_arg X.X h) = X.d x z := by | cases h; simp
| [
" X.d x y ≫ eqToHom ⋯ = X.d x z",
" X.d x y ≫ eqToHom ⋯ = X.d x y"
] | [] |
import Mathlib.Probability.Kernel.Disintegration.Unique
import Mathlib.Probability.Notation
#align_import probability.kernel.cond_distrib from "leanprover-community/mathlib"@"00abe0695d8767201e6d008afa22393978bb324d"
open MeasureTheory Set Filter TopologicalSpace
open scoped ENNReal MeasureTheory ProbabilityTheo... | Mathlib/Probability/Kernel/CondDistrib.lean | 98 | 101 | theorem _root_.MeasureTheory.AEStronglyMeasurable.integral_condDistrib_map
(hY : AEMeasurable Y μ) (hf : AEStronglyMeasurable f (μ.map fun a => (X a, Y a))) :
AEStronglyMeasurable (fun x => ∫ y, f (x, y) ∂condDistrib Y X μ x) (μ.map X) := by |
rw [← Measure.fst_map_prod_mk₀ hY, condDistrib]; exact hf.integral_condKernel
| [
" IsMarkovKernel (condDistrib Y X μ)",
" IsMarkovKernel (Measure.map (fun a => (X a, Y a)) μ).condKernel",
" ((condDistrib Y X μ) x) s = ((Measure.map X μ) {x})⁻¹ * (Measure.map (fun a => (X a, Y a)) μ) ({x} ×ˢ s)",
" ((Measure.map (fun a => (X a, Y a)) μ).fst {x})⁻¹ * (Measure.map (fun a => (X a, Y a)) μ) ({... | [
" IsMarkovKernel (condDistrib Y X μ)",
" IsMarkovKernel (Measure.map (fun a => (X a, Y a)) μ).condKernel",
" ((condDistrib Y X μ) x) s = ((Measure.map X μ) {x})⁻¹ * (Measure.map (fun a => (X a, Y a)) μ) ({x} ×ˢ s)",
" ((Measure.map (fun a => (X a, Y a)) μ).fst {x})⁻¹ * (Measure.map (fun a => (X a, Y a)) μ) ({... |
import Mathlib.Init.Control.Combinators
import Mathlib.Data.Option.Defs
import Mathlib.Logic.IsEmpty
import Mathlib.Logic.Relator
import Mathlib.Util.CompileInductive
import Aesop
#align_import data.option.basic from "leanprover-community/mathlib"@"f340f229b1f461aa1c8ee11e0a172d0a3b301a4a"
universe u
namespace Op... | Mathlib/Data/Option/Basic.lean | 151 | 153 | theorem map_comm {f₁ : α → β} {f₂ : α → γ} {g₁ : β → δ} {g₂ : γ → δ} (h : g₁ ∘ f₁ = g₂ ∘ f₂)
(a : α) :
(Option.map f₁ a).map g₁ = (Option.map f₂ a).map g₂ := by | rw [map_map, h, ← map_map]
| [
" y ∈ Option.map f o ↔ ∃ x, x ∈ o ∧ f x = y",
" f a ∈ Option.map f o ↔ a ∈ o",
" (∀ (y : β), y ∈ Option.map f o → p y) ↔ ∀ (x : α), x ∈ o → p (f x)",
" (∃ y, y ∈ Option.map f o ∧ p y) ↔ ∃ x, x ∈ o ∧ p (f x)",
" some a₁ = some a₂",
" x.bind f = some b ↔ ∃ a, x = some a ∧ f a = some b",
" none.bind f = so... | [
" y ∈ Option.map f o ↔ ∃ x, x ∈ o ∧ f x = y",
" f a ∈ Option.map f o ↔ a ∈ o",
" (∀ (y : β), y ∈ Option.map f o → p y) ↔ ∀ (x : α), x ∈ o → p (f x)",
" (∃ y, y ∈ Option.map f o ∧ p y) ↔ ∃ x, x ∈ o ∧ p (f x)",
" some a₁ = some a₂",
" x.bind f = some b ↔ ∃ a, x = some a ∧ f a = some b",
" none.bind f = so... |
import Mathlib.SetTheory.Cardinal.Finite
#align_import data.set.ncard from "leanprover-community/mathlib"@"74c2af38a828107941029b03839882c5c6f87a04"
namespace Set
variable {α β : Type*} {s t : Set α}
noncomputable def encard (s : Set α) : ℕ∞ := PartENat.withTopEquiv (PartENat.card s)
@[simp] theorem encard_uni... | Mathlib/Data/Set/Card.lean | 69 | 71 | theorem encard_univ (α : Type*) :
encard (univ : Set α) = PartENat.withTopEquiv (PartENat.card α) := by |
rw [encard, PartENat.card_congr (Equiv.Set.univ α)]
| [
" univ.encard = s.encard",
" univ.encard = PartENat.withTopEquiv (PartENat.card α)"
] | [
" univ.encard = s.encard"
] |
import Mathlib.Geometry.Manifold.MFDeriv.FDeriv
noncomputable section
open scoped Manifold
open Bundle Set Topology
section SpecificFunctions
variable {𝕜 : Type*} [NontriviallyNormedField 𝕜] {E : Type*} [NormedAddCommGroup E]
[NormedSpace 𝕜 E] {H : Type*} [TopologicalSpace H] (I : ModelWithCorners 𝕜 E H)... | Mathlib/Geometry/Manifold/MFDeriv/SpecificFunctions.lean | 300 | 316 | theorem hasMFDerivAt_snd (x : M × M') :
HasMFDerivAt (I.prod I') I' Prod.snd x
(ContinuousLinearMap.snd 𝕜 (TangentSpace I x.1) (TangentSpace I' x.2)) := by |
refine ⟨continuous_snd.continuousAt, ?_⟩
have :
∀ᶠ y in 𝓝[range (I.prod I')] extChartAt (I.prod I') x x,
(extChartAt I' x.2 ∘ Prod.snd ∘ (extChartAt (I.prod I') x).symm) y = y.2 := by
/- porting note: was
apply Filter.mem_of_superset (extChartAt_target_mem_nhdsWithin (I.prod I') x)
mfld_set_... | [
" HasMFDerivAt (I.prod I') I Prod.fst x (ContinuousLinearMap.fst 𝕜 (TangentSpace I x.1) (TangentSpace I' x.2))",
" HasFDerivWithinAt (writtenInExtChartAt (I.prod I') I x Prod.fst)\n (ContinuousLinearMap.fst 𝕜 (TangentSpace I x.1) (TangentSpace I' x.2)) (range ↑(I.prod I'))\n (↑(extChartAt (I.prod I') x) x... | [
" HasMFDerivAt (I.prod I') I Prod.fst x (ContinuousLinearMap.fst 𝕜 (TangentSpace I x.1) (TangentSpace I' x.2))",
" HasFDerivWithinAt (writtenInExtChartAt (I.prod I') I x Prod.fst)\n (ContinuousLinearMap.fst 𝕜 (TangentSpace I x.1) (TangentSpace I' x.2)) (range ↑(I.prod I'))\n (↑(extChartAt (I.prod I') x) x... |
import Mathlib.Analysis.Calculus.Deriv.Basic
import Mathlib.Analysis.Calculus.FDeriv.Comp
import Mathlib.Analysis.Calculus.FDeriv.RestrictScalars
#align_import analysis.calculus.deriv.comp from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe"
universe u v w
open scoped Classical
open Top... | Mathlib/Analysis/Calculus/Deriv/Comp.lean | 80 | 83 | theorem HasDerivAtFilter.scomp_of_eq (hg : HasDerivAtFilter g₁ g₁' y L')
(hh : HasDerivAtFilter h h' x L) (hy : y = h x) (hL : Tendsto h L L') :
HasDerivAtFilter (g₁ ∘ h) (h' • g₁') x L := by |
rw [hy] at hg; exact hg.scomp x hh hL
| [
" HasDerivAtFilter (g₁ ∘ h) (h' • g₁') x L"
] | [
" HasDerivAtFilter (g₁ ∘ h) (h' • g₁') x L"
] |
import Mathlib.RingTheory.TensorProduct.Basic
import Mathlib.Algebra.Module.ULift
#align_import ring_theory.is_tensor_product from "leanprover-community/mathlib"@"c4926d76bb9c5a4a62ed2f03d998081786132105"
universe u v₁ v₂ v₃ v₄
open TensorProduct
section IsTensorProduct
variable {R : Type*} [CommSemiring R]
va... | Mathlib/RingTheory/IsTensorProduct.lean | 83 | 87 | theorem IsTensorProduct.equiv_symm_apply (h : IsTensorProduct f) (x₁ : M₁) (x₂ : M₂) :
h.equiv.symm (f x₁ x₂) = x₁ ⊗ₜ x₂ := by |
apply h.equiv.injective
refine (h.equiv.apply_symm_apply _).trans ?_
simp
| [
" IsTensorProduct (mk R M N)",
" Function.Bijective ⇑(lift (mk R M N))",
" lift (mk R M N) = LinearMap.id",
" ∀ (x : M) (y : N), (lift (mk R M N)) (x ⊗ₜ[R] y) = LinearMap.id (x ⊗ₜ[R] y)",
" Function.Bijective ⇑LinearMap.id",
" h.equiv.symm ((f x₁) x₂) = x₁ ⊗ₜ[R] x₂",
" h.equiv (h.equiv.symm ((f x₁) x₂))... | [
" IsTensorProduct (mk R M N)",
" Function.Bijective ⇑(lift (mk R M N))",
" lift (mk R M N) = LinearMap.id",
" ∀ (x : M) (y : N), (lift (mk R M N)) (x ⊗ₜ[R] y) = LinearMap.id (x ⊗ₜ[R] y)",
" Function.Bijective ⇑LinearMap.id"
] |
import Mathlib.Analysis.InnerProductSpace.Dual
import Mathlib.Analysis.InnerProductSpace.PiL2
#align_import analysis.inner_product_space.adjoint from "leanprover-community/mathlib"@"46b633fd842bef9469441c0209906f6dddd2b4f5"
noncomputable section
open RCLike
open scoped ComplexConjugate
variable {𝕜 E F G : Type... | Mathlib/Analysis/InnerProductSpace/Adjoint.lean | 85 | 87 | theorem adjointAux_inner_right (A : E →L[𝕜] F) (x : E) (y : F) :
⟪x, adjointAux A y⟫ = ⟪A x, y⟫ := by |
rw [← inner_conj_symm, adjointAux_inner_left, inner_conj_symm]
| [
" ⟪(adjointAux A) y, x⟫_𝕜 = ⟪y, A x⟫_𝕜",
" ⟪x, (adjointAux A) y⟫_𝕜 = ⟪A x, y⟫_𝕜"
] | [
" ⟪(adjointAux A) y, x⟫_𝕜 = ⟪y, A x⟫_𝕜"
] |
import Mathlib.AlgebraicGeometry.Morphisms.QuasiCompact
import Mathlib.Topology.QuasiSeparated
#align_import algebraic_geometry.morphisms.quasi_separated from "leanprover-community/mathlib"@"1a51edf13debfcbe223fa06b1cb353b9ed9751cc"
noncomputable section
open CategoryTheory CategoryTheory.Limits Opposite Topolog... | Mathlib/AlgebraicGeometry/Morphisms/QuasiSeparated.lean | 117 | 118 | theorem quasiSeparated_eq_diagonal_is_quasiCompact :
@QuasiSeparated = MorphismProperty.diagonal @QuasiCompact := by | ext; exact quasiSeparated_iff _
| [
" QuasiSeparatedSpace ↑↑X.toPresheafedSpace ↔ ∀ (U V : ↑X.affineOpens), IsCompact (↑↑U ∩ ↑↑V)",
" (∀ (U V : Set ↑↑X.toPresheafedSpace), IsOpen U → IsCompact U → IsOpen V → IsCompact V → IsCompact (U ∩ V)) ↔\n ∀ (U V : ↑X.affineOpens), IsCompact (↑↑U ∩ ↑↑V)",
" (∀ (U V : Set ↑↑X.toPresheafedSpace), IsOpen U →... | [
" QuasiSeparatedSpace ↑↑X.toPresheafedSpace ↔ ∀ (U V : ↑X.affineOpens), IsCompact (↑↑U ∩ ↑↑V)",
" (∀ (U V : Set ↑↑X.toPresheafedSpace), IsOpen U → IsCompact U → IsOpen V → IsCompact V → IsCompact (U ∩ V)) ↔\n ∀ (U V : ↑X.affineOpens), IsCompact (↑↑U ∩ ↑↑V)",
" (∀ (U V : Set ↑↑X.toPresheafedSpace), IsOpen U →... |
import Mathlib.Algebra.Algebra.Operations
import Mathlib.Data.Fintype.Lattice
import Mathlib.RingTheory.Coprime.Lemmas
#align_import ring_theory.ideal.operations from "leanprover-community/mathlib"@"e7f0ddbf65bd7181a85edb74b64bdc35ba4bdc74"
assert_not_exists Basis -- See `RingTheory.Ideal.Basis`
assert_not_exists ... | Mathlib/RingTheory/Ideal/Operations.lean | 74 | 75 | theorem mem_annihilator {r} : r ∈ N.annihilator ↔ ∀ n ∈ N, r • n = (0 : M) := by |
simp_rw [annihilator, Module.mem_annihilator, Subtype.forall, Subtype.ext_iff]; rfl
| [
" x ∈ Module.annihilator R M",
" ∀ (m : M), x • m = 0",
" f (x • m) = f 0",
" x ∈ Module.annihilator R M'",
" ∀ (m : M'), x • m = 0",
" x • m = 0",
" x • f m = 0",
" r ∈ N.annihilator ↔ ∀ n ∈ N, r • n = 0",
" (∀ (a : M) (b : a ∈ N), ↑(r • ⟨a, b⟩) = ↑0) ↔ ∀ n ∈ N, r • n = 0"
] | [
" x ∈ Module.annihilator R M",
" ∀ (m : M), x • m = 0",
" f (x • m) = f 0",
" x ∈ Module.annihilator R M'",
" ∀ (m : M'), x • m = 0",
" x • m = 0",
" x • f m = 0"
] |
import Mathlib.NumberTheory.Padics.PadicIntegers
import Mathlib.RingTheory.ZMod
#align_import number_theory.padics.ring_homs from "leanprover-community/mathlib"@"565eb991e264d0db702722b4bde52ee5173c9950"
noncomputable section
open scoped Classical
open Nat LocalRing Padic
namespace PadicInt
variable {p : ℕ} [h... | Mathlib/NumberTheory/Padics/RingHoms.lean | 104 | 121 | theorem norm_sub_modPart_aux (r : ℚ) (h : ‖(r : ℚ_[p])‖ ≤ 1) :
↑p ∣ r.num - r.num * r.den.gcdA p % p * ↑r.den := by |
rw [← ZMod.intCast_zmod_eq_zero_iff_dvd]
simp only [Int.cast_natCast, ZMod.natCast_mod, Int.cast_mul, Int.cast_sub]
have := congr_arg (fun x => x % p : ℤ → ZMod p) (gcd_eq_gcd_ab r.den p)
simp only [Int.cast_natCast, CharP.cast_eq_zero, EuclideanDomain.mod_zero, Int.cast_add,
Int.cast_mul, zero_mul, add_ze... | [
" modPart p r < ↑p",
" ↑p = |↑p|",
" ↑p ≠ 0",
" IsUnit ↑r.den",
" ‖↑r.den‖ = 1",
" 1 ≤ ‖↑↑r.den‖",
" ¬‖↑r.den‖ < 1",
" False",
" ‖↑r * ↑r.den‖ = ‖↑r.num‖",
" ↑r * ↑r.den = ↑r.num",
" ‖↑r.num‖ < 1",
" ↑p ∣ r.num ∧ ↑p ∣ ↑r.den",
" ‖↑↑r.num‖ < 1 ∧ ‖↑↑↑r.den‖ < 1",
" p ∣ 1",
" ↑p ∣ r.num - r... | [
" modPart p r < ↑p",
" ↑p = |↑p|",
" ↑p ≠ 0",
" IsUnit ↑r.den",
" ‖↑r.den‖ = 1",
" 1 ≤ ‖↑↑r.den‖",
" ¬‖↑r.den‖ < 1",
" False",
" ‖↑r * ↑r.den‖ = ‖↑r.num‖",
" ↑r * ↑r.den = ↑r.num",
" ‖↑r.num‖ < 1",
" ↑p ∣ r.num ∧ ↑p ∣ ↑r.den",
" ‖↑↑r.num‖ < 1 ∧ ‖↑↑↑r.den‖ < 1",
" p ∣ 1"
] |
import Mathlib.Topology.Compactness.SigmaCompact
import Mathlib.Topology.Connected.TotallyDisconnected
import Mathlib.Topology.Inseparable
#align_import topology.separation from "leanprover-community/mathlib"@"d91e7f7a7f1c7e9f0e18fdb6bde4f652004c735d"
open Function Set Filter Topology TopologicalSpace
open scoped... | Mathlib/Topology/Separation.lean | 261 | 264 | theorem t0Space_iff_exists_isOpen_xor'_mem (X : Type u) [TopologicalSpace X] :
T0Space X ↔ Pairwise fun x y => ∃ U : Set X, IsOpen U ∧ Xor' (x ∈ U) (y ∈ U) := by |
simp only [t0Space_iff_not_inseparable, xor_iff_not_iff, not_forall, exists_prop,
inseparable_iff_forall_open, Pairwise]
| [
" SeparatedNhds s t ↔ Disjoint (𝓝ˢ s) (𝓝ˢ t)",
" T0Space X ↔ Pairwise fun x y => ¬Inseparable x y",
" (𝓝 y).HasBasis (fun t => t ∈ b ∧ x ∈ t) fun t => t",
" x✝ ∈ b ∧ x ∈ x✝ ↔ x✝ ∈ b ∧ y ∈ x✝",
" T0Space X ↔ Pairwise fun x y => ∃ U, IsOpen U ∧ Xor' (x ∈ U) (y ∈ U)"
] | [
" SeparatedNhds s t ↔ Disjoint (𝓝ˢ s) (𝓝ˢ t)",
" T0Space X ↔ Pairwise fun x y => ¬Inseparable x y",
" (𝓝 y).HasBasis (fun t => t ∈ b ∧ x ∈ t) fun t => t",
" x✝ ∈ b ∧ x ∈ x✝ ↔ x✝ ∈ b ∧ y ∈ x✝"
] |
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 | 45 | 83 | theorem midpoint_fixed {x y : PE} :
∀ e : PE ≃ᵢ PE, e x = x → e y = y → e (midpoint ℝ x y) = midpoint ℝ x y := by |
set z := midpoint ℝ x y
-- Consider the set of `e : E ≃ᵢ E` such that `e x = x` and `e y = y`
set s := { e : PE ≃ᵢ PE | e x = x ∧ e y = y }
haveI : Nonempty s := ⟨⟨IsometryEquiv.refl PE, rfl, rfl⟩⟩
-- On the one hand, `e` cannot send the midpoint `z` of `[x, y]` too far
have h_bdd : BddAbove (range fun e :... | [
" ∀ (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.LinearAlgebra.Dimension.Finrank
import Mathlib.LinearAlgebra.InvariantBasisNumber
#align_import linear_algebra.dimension from "leanprover-community/mathlib"@"47a5f8186becdbc826190ced4312f8199f9db6a5"
noncomputable section
universe u v w w'
variable {R : Type u} {M : Type v} [Ring R] [AddCommGroup... | Mathlib/LinearAlgebra/Dimension/StrongRankCondition.lean | 294 | 299 | theorem maximal_linearIndependent_eq_infinite_basis {ι : Type w} (b : Basis ι R M) [Infinite ι]
{κ : Type w} (v : κ → M) (i : LinearIndependent R v) (m : i.Maximal) : #κ = #ι := by |
apply le_antisymm
· exact linearIndependent_le_basis b v i
· haveI : Nontrivial R := nontrivial_of_invariantBasisNumber R
exact infinite_basis_le_maximal_linearIndependent b v i m
| [
" Fintype.card ι ≤ Fintype.card ↑w",
" (ι →₀ R) →ₗ[R] ↑w →₀ R",
" ι → ↑w →₀ R",
" Injective ⇑(Finsupp.total ι (↑w →₀ R) R fun i => Span.repr R w ⟨v i, ⋯⟩)",
" f = g",
" t.card ≤ Fintype.card ↑w",
" #ι ≤ ↑(Fintype.card ↑w)",
" ↑(Fintype.card ι) ≤ ↑(Fintype.card ↑w)",
" range v ≤ ↑(span R w)",
" ran... | [
" Fintype.card ι ≤ Fintype.card ↑w",
" (ι →₀ R) →ₗ[R] ↑w →₀ R",
" ι → ↑w →₀ R",
" Injective ⇑(Finsupp.total ι (↑w →₀ R) R fun i => Span.repr R w ⟨v i, ⋯⟩)",
" f = g",
" t.card ≤ Fintype.card ↑w",
" #ι ≤ ↑(Fintype.card ↑w)",
" ↑(Fintype.card ι) ≤ ↑(Fintype.card ↑w)",
" range v ≤ ↑(span R w)",
" ran... |
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 | 86 | 88 | theorem codom_inv : r.inv.codom = r.dom := by |
ext x
rfl
| [
" 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.inv = r",
" r.inv.inv x y ↔ r x y"
] |
import Mathlib.Algebra.Algebra.Subalgebra.Directed
import Mathlib.FieldTheory.IntermediateField
import Mathlib.FieldTheory.Separable
import Mathlib.FieldTheory.SplittingField.IsSplittingField
import Mathlib.RingTheory.TensorProduct.Basic
#align_import field_theory.adjoin from "leanprover-community/mathlib"@"df76f4335... | Mathlib/FieldTheory/Adjoin.lean | 54 | 60 | theorem mem_adjoin_iff (x : E) :
x ∈ adjoin F S ↔ ∃ r s : MvPolynomial S F,
x = MvPolynomial.aeval Subtype.val r / MvPolynomial.aeval Subtype.val s := by |
simp only [adjoin, mem_mk, Subring.mem_toSubsemiring, Subfield.mem_toSubring,
Subfield.mem_closure_iff, ← Algebra.adjoin_eq_ring_closure, Subalgebra.mem_toSubring,
Algebra.adjoin_eq_range, AlgHom.mem_range, exists_exists_eq_and]
tauto
| [
" x ∈ adjoin F S ↔ ∃ r s, x = (MvPolynomial.aeval Subtype.val) r / (MvPolynomial.aeval Subtype.val) s",
" (∃ a a_1, (MvPolynomial.aeval Subtype.val) a / (MvPolynomial.aeval Subtype.val) a_1 = x) ↔\n ∃ r s, x = (MvPolynomial.aeval Subtype.val) r / (MvPolynomial.aeval Subtype.val) s"
] | [] |
import Mathlib.Init.Data.Sigma.Lex
import Mathlib.Data.Prod.Lex
import Mathlib.Data.Sigma.Lex
import Mathlib.Order.Antichain
import Mathlib.Order.OrderIsoNat
import Mathlib.Order.WellFounded
import Mathlib.Tactic.TFAE
#align_import order.well_founded_set from "leanprover-community/mathlib"@"2c84c2c5496117349007d97104... | Mathlib/Order/WellFoundedSet.lean | 76 | 88 | theorem wellFoundedOn_iff :
s.WellFoundedOn r ↔ WellFounded fun a b : α => r a b ∧ a ∈ s ∧ b ∈ s := by |
have f : RelEmbedding (fun (a : s) (b : s) => r a b) fun a b : α => r a b ∧ a ∈ s ∧ b ∈ s :=
⟨⟨(↑), Subtype.coe_injective⟩, by simp⟩
refine ⟨fun h => ?_, f.wellFounded⟩
rw [WellFounded.wellFounded_iff_has_min]
intro t ht
by_cases hst : (s ∩ t).Nonempty
· rw [← Subtype.preimage_coe_nonempty] at hst
... | [
" s.WellFoundedOn r ↔ WellFounded fun a b => r a b ∧ a ∈ s ∧ b ∈ s",
" ∀ {a b : ↑s},\n r ({ toFun := Subtype.val, inj' := ⋯ } a) ({ toFun := Subtype.val, inj' := ⋯ } b) ∧\n { toFun := Subtype.val, inj' := ⋯ } a ∈ s ∧ { toFun := Subtype.val, inj' := ⋯ } b ∈ s ↔\n r ↑a ↑b",
" WellFounded fun a b =>... | [] |
import Mathlib.Data.Finset.Image
#align_import data.finset.card from "leanprover-community/mathlib"@"65a1391a0106c9204fe45bc73a039f056558cb83"
assert_not_exists MonoidWithZero
-- TODO: After a lot more work,
-- assert_not_exists OrderedCommMonoid
open Function Multiset Nat
variable {α β R : Type*}
namespace Fin... | Mathlib/Data/Finset/Card.lean | 69 | 69 | theorem card_mono : Monotone (@card α) := by | apply card_le_card
| [
" Monotone card"
] | [] |
import Mathlib.NumberTheory.Cyclotomic.PrimitiveRoots
import Mathlib.FieldTheory.Finite.Trace
import Mathlib.Algebra.Group.AddChar
import Mathlib.Data.ZMod.Units
import Mathlib.Analysis.Complex.Polynomial
#align_import number_theory.legendre_symbol.add_character from "leanprover-community/mathlib"@"0723536a0522d24fc2... | Mathlib/NumberTheory/LegendreSymbol/AddCharacter.lean | 177 | 185 | theorem zmod_char_isNontrivial_iff (n : ℕ+) (ψ : AddChar (ZMod n) C) :
IsNontrivial ψ ↔ ψ 1 ≠ 1 := by |
refine ⟨?_, fun h => ⟨1, h⟩⟩
contrapose!
rintro h₁ ⟨a, ha⟩
have ha₁ : a = a.val • (1 : ZMod ↑n) := by
rw [nsmul_eq_mul, mul_one]; exact (ZMod.natCast_zmod_val a).symm
rw [ha₁, map_nsmul_eq_pow, h₁, one_pow] at ha
exact ha rfl
| [
" ⋯.unit ∈ rootsOfUnity (ringChar R).toPNat' R'",
" (f.compAddChar φ).IsPrimitive",
" ((f.compAddChar φ).mulShift a).IsNontrivial",
" ∃ a_1, f (φ (a * a_1)) ≠ 1",
" Function.Injective ψ.mulShift",
" a = b",
" ψ.IsPrimitive",
" (ψ.mulShift a).IsNontrivial",
" (ψ.mulShift a) (a⁻¹ * x) ≠ 1",
" ¬(e.mu... | [
" ⋯.unit ∈ rootsOfUnity (ringChar R).toPNat' R'",
" (f.compAddChar φ).IsPrimitive",
" ((f.compAddChar φ).mulShift a).IsNontrivial",
" ∃ a_1, f (φ (a * a_1)) ≠ 1",
" Function.Injective ψ.mulShift",
" a = b",
" ψ.IsPrimitive",
" (ψ.mulShift a).IsNontrivial",
" (ψ.mulShift a) (a⁻¹ * x) ≠ 1",
" ¬(e.mu... |
import Mathlib.Algebra.Order.Field.Basic
import Mathlib.Combinatorics.SimpleGraph.Basic
import Mathlib.Data.Rat.Cast.Order
import Mathlib.Order.Partition.Finpartition
import Mathlib.Tactic.GCongr
import Mathlib.Tactic.NormNum
import Mathlib.Tactic.Positivity
import Mathlib.Tactic.Ring
#align_import combinatorics.simp... | Mathlib/Combinatorics/SimpleGraph/Density.lean | 140 | 143 | theorem edgeDensity_le_one (s : Finset α) (t : Finset β) : edgeDensity r s t ≤ 1 := by |
apply div_le_one_of_le
· exact mod_cast card_interedges_le_mul r s t
· exact mod_cast Nat.zero_le _
| [
" x ∈ interedges r s t ↔ x.1 ∈ s ∧ x.2 ∈ t ∧ r x.1 x.2",
" interedges r ∅ t = ∅",
" x ∈ interedges r s₂ t₂ → x ∈ interedges r s₁ t₁",
" x.1 ∈ s₂ ∧ x.2 ∈ t₂ ∧ r x.1 x.2 → x.1 ∈ s₁ ∧ x.2 ∈ t₁ ∧ r x.1 x.2",
" (interedges r s t).card + (interedges (fun x y => ¬r x y) s t).card = s.card * t.card",
" Disjoint (... | [
" x ∈ interedges r s t ↔ x.1 ∈ s ∧ x.2 ∈ t ∧ r x.1 x.2",
" interedges r ∅ t = ∅",
" x ∈ interedges r s₂ t₂ → x ∈ interedges r s₁ t₁",
" x.1 ∈ s₂ ∧ x.2 ∈ t₂ ∧ r x.1 x.2 → x.1 ∈ s₁ ∧ x.2 ∈ t₁ ∧ r x.1 x.2",
" (interedges r s t).card + (interedges (fun x y => ¬r x y) s t).card = s.card * t.card",
" Disjoint (... |
import Mathlib.Analysis.SpecificLimits.Basic
import Mathlib.Data.Rat.Denumerable
import Mathlib.Data.Set.Pointwise.Interval
import Mathlib.SetTheory.Cardinal.Continuum
#align_import data.real.cardinality from "leanprover-community/mathlib"@"7e7aaccf9b0182576cabdde36cf1b5ad3585b70d"
open Nat Set
open Cardinal
no... | Mathlib/Data/Real/Cardinality.lean | 64 | 65 | theorem cantorFunctionAux_true (h : f n = true) : cantorFunctionAux c f n = c ^ n := by |
simp [cantorFunctionAux, h]
| [
" cantorFunctionAux c f n = c ^ n"
] | [] |
import Mathlib.Analysis.Calculus.Deriv.Basic
import Mathlib.Analysis.Calculus.FDeriv.Comp
import Mathlib.Analysis.Calculus.FDeriv.RestrictScalars
#align_import analysis.calculus.deriv.comp from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe"
universe u v w
open scoped Classical
open Top... | Mathlib/Analysis/Calculus/Deriv/Comp.lean | 90 | 93 | theorem HasDerivWithinAt.scomp_hasDerivAt_of_eq (hg : HasDerivWithinAt g₁ g₁' s' y)
(hh : HasDerivAt h h' x) (hs : ∀ x, h x ∈ s') (hy : y = h x) :
HasDerivAt (g₁ ∘ h) (h' • g₁') x := by |
rw [hy] at hg; exact hg.scomp_hasDerivAt x hh hs
| [
" HasDerivAtFilter (g₁ ∘ h) (h' • g₁') x L",
" HasDerivAt (g₁ ∘ h) (h' • g₁') x"
] | [
" HasDerivAtFilter (g₁ ∘ h) (h' • g₁') x L"
] |
import Mathlib.Algebra.Polynomial.Derivative
import Mathlib.Algebra.Polynomial.Roots
import Mathlib.RingTheory.EuclideanDomain
#align_import data.polynomial.field_division from "leanprover-community/mathlib"@"bbeb185db4ccee8ed07dc48449414ebfa39cb821"
noncomputable section
open Polynomial
namespace Polynomial
u... | Mathlib/Algebra/Polynomial/FieldDivision.lean | 91 | 102 | theorem lt_rootMultiplicity_of_isRoot_iterate_derivative_of_mem_nonZeroDivisors'
{p : R[X]} {t : R} {n : ℕ} (h : p ≠ 0)
(hroot : ∀ m ≤ n, (derivative^[m] p).IsRoot t)
(hnzd : ∀ m ≤ n, m ≠ 0 → (m : R) ∈ nonZeroDivisors R) :
n < p.rootMultiplicity t := by |
apply lt_rootMultiplicity_of_isRoot_iterate_derivative_of_mem_nonZeroDivisors h hroot
clear hroot
induction' n with n ih
· simp only [Nat.zero_eq, Nat.factorial_zero, Nat.cast_one]
exact Submonoid.one_mem _
· rw [Nat.factorial_succ, Nat.cast_mul, mul_mem_nonZeroDivisors]
exact ⟨hnzd _ le_rfl n.succ_n... | [
" rootMultiplicity t (derivative p) = rootMultiplicity t p - 1",
" rootMultiplicity t (derivative p) = m - 1",
" ¬(X - C t) ^ m ∣ derivative p",
" ¬X - C t ∣ C ↑m * g",
" ¬eval t (C ↑m * g) = 0",
" (X - C t) ^ m ∣ derivative p",
" (X - C t) ^ m ∣ 0",
" rootMultiplicity t (derivative p) ≤ m - 1",
" e... | [
" rootMultiplicity t (derivative p) = rootMultiplicity t p - 1",
" rootMultiplicity t (derivative p) = m - 1",
" ¬(X - C t) ^ m ∣ derivative p",
" ¬X - C t ∣ C ↑m * g",
" ¬eval t (C ↑m * g) = 0",
" (X - C t) ^ m ∣ derivative p",
" (X - C t) ^ m ∣ 0",
" rootMultiplicity t (derivative p) ≤ m - 1",
" e... |
import Mathlib.LinearAlgebra.Matrix.Gershgorin
import Mathlib.NumberTheory.NumberField.CanonicalEmbedding.ConvexBody
import Mathlib.NumberTheory.NumberField.Units.Basic
import Mathlib.RingTheory.RootsOfUnity.Basic
#align_import number_theory.number_field.units from "leanprover-community/mathlib"@"00f91228655eecdcd3ac... | Mathlib/NumberTheory/NumberField/Units/DirichletTheorem.lean | 108 | 120 | theorem logEmbedding_eq_zero_iff {x : (𝓞 K)ˣ} :
logEmbedding K x = 0 ↔ x ∈ torsion K := by |
rw [mem_torsion]
refine ⟨fun h w => ?_, fun h => ?_⟩
· by_cases hw : w = w₀
· suffices -mult w₀ * Real.log (w₀ (x : K)) = 0 by
rw [neg_mul, neg_eq_zero, ← hw] at this
exact mult_log_place_eq_zero.mp this
rw [← sum_logEmbedding_component, sum_eq_zero]
exact fun w _ => congrFun h w
... | [
" (fun x w => ↑(↑w).mult * (↑w ((algebraMap (𝓞 K) K) ↑(Additive.toMul x))).log) 0 = 0",
" (fun w => 0) = 0",
" { toFun := fun x w => ↑(↑w).mult * (↑w ((algebraMap (𝓞 K) K) ↑(Additive.toMul x))).log, map_zero' := ⋯ }.toFun\n (x✝¹ + x✝) =\n { toFun := fun x w => ↑(↑w).mult * (↑w ((algebraMap (𝓞 K) K) ↑... | [
" (fun x w => ↑(↑w).mult * (↑w ((algebraMap (𝓞 K) K) ↑(Additive.toMul x))).log) 0 = 0",
" (fun w => 0) = 0",
" { toFun := fun x w => ↑(↑w).mult * (↑w ((algebraMap (𝓞 K) K) ↑(Additive.toMul x))).log, map_zero' := ⋯ }.toFun\n (x✝¹ + x✝) =\n { toFun := fun x w => ↑(↑w).mult * (↑w ((algebraMap (𝓞 K) K) ↑... |
import Mathlib.Data.Finset.Lattice
import Mathlib.Data.Fintype.Vector
import Mathlib.Data.Multiset.Sym
#align_import data.finset.sym from "leanprover-community/mathlib"@"02ba8949f486ebecf93fe7460f1ed0564b5e442c"
namespace Finset
variable {α : Type*}
@[simps]
protected def sym2 (s : Finset α) : Finset (Sym2 α) :... | Mathlib/Data/Finset/Sym.lean | 96 | 97 | theorem sym2_eq_empty : s.sym2 = ∅ ↔ s = ∅ := by |
rw [← val_eq_zero, sym2_val, Multiset.sym2_eq_zero_iff, val_eq_zero]
| [
" s(a, b) ∈ s.sym2 ↔ a ∈ s ∧ b ∈ s",
" m ∈ s.sym2 ↔ ∀ a ∈ m, a ∈ s",
" (∀ y ∈ m, y ∈ s.val) ↔ ∀ a ∈ m, a ∈ s",
" x ∈ univ.sym2",
" ∀ a ∈ x, a ∈ univ",
" univ.sym2 = univ",
" a✝ ∈ univ.sym2 ↔ a✝ ∈ univ",
" s.sym2 ⊆ t.sym2",
" s.val.sym2 ≤ t.val.sym2",
" s.val ≤ t.val",
" Function.Injective Finset... | [
" s(a, b) ∈ s.sym2 ↔ a ∈ s ∧ b ∈ s",
" m ∈ s.sym2 ↔ ∀ a ∈ m, a ∈ s",
" (∀ y ∈ m, y ∈ s.val) ↔ ∀ a ∈ m, a ∈ s",
" x ∈ univ.sym2",
" ∀ a ∈ x, a ∈ univ",
" univ.sym2 = univ",
" a✝ ∈ univ.sym2 ↔ a✝ ∈ univ",
" s.sym2 ⊆ t.sym2",
" s.val.sym2 ≤ t.val.sym2",
" s.val ≤ t.val",
" Function.Injective Finset... |
import Mathlib.Analysis.Normed.Group.Pointwise
import Mathlib.Analysis.NormedSpace.Real
#align_import analysis.normed_space.pointwise from "leanprover-community/mathlib"@"bc91ed7093bf098d253401e69df601fc33dde156"
open Metric Set
open Pointwise Topology
variable {𝕜 E : Type*}
variable [NormedField 𝕜]
sectio... | Mathlib/Analysis/NormedSpace/Pointwise.lean | 104 | 106 | theorem smul_closedBall' {c : 𝕜} (hc : c ≠ 0) (x : E) (r : ℝ) :
c • closedBall x r = closedBall (c • x) (‖c‖ * r) := by |
simp only [← ball_union_sphere, Set.smul_set_union, _root_.smul_ball hc, smul_sphere' hc]
| [
" c • ball x r = ball (c • x) (‖c‖ * r)",
" y ∈ c • ball x r ↔ y ∈ ball (c • x) (‖c‖ * r)",
" c⁻¹ • y ∈ ball x r ↔ y ∈ ball (c • x) (‖c‖ * r)",
"𝕜 : Type u_1\nE : Type u_2\ninst✝² : NormedField 𝕜\ninst✝¹ : SeminormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\nc : 𝕜\nhc : c ≠ 0\nx : E\nr : ℝ\ny : E\n| c⁻¹ • y... | [
" c • ball x r = ball (c • x) (‖c‖ * r)",
" y ∈ c • ball x r ↔ y ∈ ball (c • x) (‖c‖ * r)",
" c⁻¹ • y ∈ ball x r ↔ y ∈ ball (c • x) (‖c‖ * r)",
"𝕜 : Type u_1\nE : Type u_2\ninst✝² : NormedField 𝕜\ninst✝¹ : SeminormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\nc : 𝕜\nhc : c ≠ 0\nx : E\nr : ℝ\ny : E\n| c⁻¹ • y... |
import Mathlib.Order.Atoms
import Mathlib.Order.OrderIsoNat
import Mathlib.Order.RelIso.Set
import Mathlib.Order.SupClosed
import Mathlib.Order.SupIndep
import Mathlib.Order.Zorn
import Mathlib.Data.Finset.Order
import Mathlib.Order.Interval.Set.OrderIso
import Mathlib.Data.Finite.Set
import Mathlib.Tactic.TFAE
#alig... | Mathlib/Order/CompactlyGenerated/Basic.lean | 83 | 105 | theorem isCompactElement_iff.{u} {α : Type u} [CompleteLattice α] (k : α) :
CompleteLattice.IsCompactElement k ↔
∀ (ι : Type u) (s : ι → α), k ≤ iSup s → ∃ t : Finset ι, k ≤ t.sup s := by |
classical
constructor
· intro H ι s hs
obtain ⟨t, ht, ht'⟩ := H (Set.range s) hs
have : ∀ x : t, ∃ i, s i = x := fun x => ht x.prop
choose f hf using this
refine ⟨Finset.univ.image f, ht'.trans ?_⟩
rw [Finset.sup_le_iff]
intro b hb
rw [← show s (f ⟨b, hb⟩) = id b fro... | [
" IsCompactElement k ↔ ∀ (ι : Type u) (s : ι → α), k ≤ iSup s → ∃ t, k ≤ t.sup s",
" IsCompactElement k → ∀ (ι : Type u) (s : ι → α), k ≤ iSup s → ∃ t, k ≤ t.sup s",
" ∃ t, k ≤ t.sup s",
" t.sup id ≤ (Finset.image f Finset.univ).sup s",
" ∀ b ∈ t, id b ≤ (Finset.image f Finset.univ).sup s",
" id b ≤ (Fins... | [] |
import Mathlib.LinearAlgebra.Dimension.StrongRankCondition
import Mathlib.LinearAlgebra.FreeModule.Basic
import Mathlib.LinearAlgebra.FreeModule.Finite.Basic
#align_import linear_algebra.dimension from "leanprover-community/mathlib"@"47a5f8186becdbc826190ced4312f8199f9db6a5"
noncomputable section
universe u v v'... | Mathlib/LinearAlgebra/Dimension/Free.lean | 88 | 90 | theorem _root_.FiniteDimensional.finrank_eq_card_chooseBasisIndex [Module.Finite R M] :
finrank R M = Fintype.card (ChooseBasisIndex R M) := by |
simp [finrank, rank_eq_card_chooseBasisIndex]
| [
" finrank R M = Fintype.card (ChooseBasisIndex R M)"
] | [] |
import Mathlib.AlgebraicTopology.DoldKan.FunctorN
#align_import algebraic_topology.dold_kan.normalized from "leanprover-community/mathlib"@"32a7e535287f9c73f2e4d2aef306a39190f0b504"
open CategoryTheory CategoryTheory.Category CategoryTheory.Limits
CategoryTheory.Subobject CategoryTheory.Idempotents DoldKan
non... | Mathlib/AlgebraicTopology/DoldKan/Normalized.lean | 97 | 102 | theorem inclusionOfMooreComplexMap_comp_PInfty (X : SimplicialObject A) :
inclusionOfMooreComplexMap X ≫ PInfty = inclusionOfMooreComplexMap X := by |
ext (_|n)
· dsimp
simp only [comp_id]
· exact (HigherFacesVanish.inclusionOfMooreComplexMap n).comp_P_eq_self
| [
" (AlgebraicTopology.inclusionOfMooreComplexMap X).f (n + 1) ≫ X.δ j.succ = 0",
" (Finset.univ.inf fun k => kernelSubobject (X.δ k.succ)).arrow ≫ X.δ j.succ = 0",
" j ∈ Finset.univ",
" (NormalizedMooreComplex.objX X n).Factors (PInfty.f n)",
" (NormalizedMooreComplex.objX X 0).Factors (PInfty.f 0)",
" (No... | [
" (AlgebraicTopology.inclusionOfMooreComplexMap X).f (n + 1) ≫ X.δ j.succ = 0",
" (Finset.univ.inf fun k => kernelSubobject (X.δ k.succ)).arrow ≫ X.δ j.succ = 0",
" j ∈ Finset.univ",
" (NormalizedMooreComplex.objX X n).Factors (PInfty.f n)",
" (NormalizedMooreComplex.objX X 0).Factors (PInfty.f 0)",
" (No... |
import Mathlib.Data.List.Count
import Mathlib.Data.List.Dedup
import Mathlib.Data.List.InsertNth
import Mathlib.Data.List.Lattice
import Mathlib.Data.List.Permutation
import Mathlib.Data.Nat.Factorial.Basic
#align_import data.list.perm from "leanprover-community/mathlib"@"65a1391a0106c9204fe45bc73a039f056558cb83"
... | Mathlib/Data/List/Perm.lean | 149 | 164 | theorem perm_comp_forall₂ {l u v} (hlu : Perm l u) (huv : Forall₂ r u v) :
(Forall₂ r ∘r Perm) l v := by |
induction hlu generalizing v with
| nil => cases huv; exact ⟨[], Forall₂.nil, Perm.nil⟩
| cons u _hlu ih =>
cases' huv with _ b _ v hab huv'
rcases ih huv' with ⟨l₂, h₁₂, h₂₃⟩
exact ⟨b :: l₂, Forall₂.cons hab h₁₂, h₂₃.cons _⟩
| swap a₁ a₂ h₂₃ =>
cases' huv with _ b₁ _ l₂ h₁ hr₂₃
cases' hr₂₃... | [
" Perm ∘r Perm = Perm",
" (Perm ∘r Perm) a c = (a ~ c)",
" (Perm ∘r Perm) a c ↔ a ~ c",
" (Perm ∘r Perm) a c → a ~ c",
" a ~ c → (Perm ∘r Perm) a c",
" (Forall₂ r ∘r Perm) l v",
" (Forall₂ r ∘r Perm) [] v",
" (Forall₂ r ∘r Perm) [] []",
" (Forall₂ r ∘r Perm) (u :: l₁✝) v",
" (Forall₂ r ∘r Perm) (u... | [
" Perm ∘r Perm = Perm",
" (Perm ∘r Perm) a c = (a ~ c)",
" (Perm ∘r Perm) a c ↔ a ~ c",
" (Perm ∘r Perm) a c → a ~ c",
" a ~ c → (Perm ∘r Perm) a c"
] |
import Mathlib.Algebra.BigOperators.Group.Finset
import Mathlib.Dynamics.FixedPoints.Basic
open Finset Function
section AddCommMonoid
variable {α M : Type*} [AddCommMonoid M]
def birkhoffSum (f : α → α) (g : α → M) (n : ℕ) (x : α) : M := ∑ k ∈ range n, g (f^[k] x)
theorem birkhoffSum_zero (f : α → α) (g : α → ... | Mathlib/Dynamics/BirkhoffSum/Basic.lean | 51 | 53 | theorem birkhoffSum_add (f : α → α) (g : α → M) (m n : ℕ) (x : α) :
birkhoffSum f g (m + n) x = birkhoffSum f g m x + birkhoffSum f g n (f^[m] x) := by |
simp_rw [birkhoffSum, sum_range_add, add_comm m, iterate_add_apply]
| [
" birkhoffSum f g (m + n) x = birkhoffSum f g m x + birkhoffSum f g n (f^[m] x)"
] | [] |
import Mathlib.Topology.MetricSpace.Basic
#align_import topology.metric_space.infsep from "leanprover-community/mathlib"@"5316314b553dcf8c6716541851517c1a9715e22b"
variable {α β : Type*}
namespace Set
section Einfsep
open ENNReal
open Function
noncomputable def einfsep [EDist α] (s : Set α) : ℝ≥0∞ :=
⨅ (x... | Mathlib/Topology/MetricSpace/Infsep.lean | 74 | 76 | theorem einfsep_ne_top :
s.einfsep ≠ ∞ ↔ ∃ x ∈ s, ∃ y ∈ s, x ≠ y ∧ edist x y ≠ ∞ := by |
simp_rw [← lt_top_iff_ne_top, einfsep_lt_top]
| [
" d ≤ s.einfsep ↔ ∀ x ∈ s, ∀ y ∈ s, x ≠ y → d ≤ edist x y",
" s.einfsep = 0 ↔ ∀ C > 0, ∃ x ∈ s, ∃ y ∈ s, x ≠ y ∧ edist x y < C",
" 0 < s.einfsep ↔ ∃ C > 0, ∀ x ∈ s, ∀ y ∈ s, x ≠ y → C ≤ edist x y",
" (¬∀ C > 0, ∃ x ∈ s, ∃ y ∈ s, x ≠ y ∧ edist x y < C) ↔ ∃ C > 0, ∀ x ∈ s, ∀ y ∈ s, x ≠ y → C ≤ edist x y",
" s... | [
" d ≤ s.einfsep ↔ ∀ x ∈ s, ∀ y ∈ s, x ≠ y → d ≤ edist x y",
" s.einfsep = 0 ↔ ∀ C > 0, ∃ x ∈ s, ∃ y ∈ s, x ≠ y ∧ edist x y < C",
" 0 < s.einfsep ↔ ∃ C > 0, ∀ x ∈ s, ∀ y ∈ s, x ≠ y → C ≤ edist x y",
" (¬∀ C > 0, ∃ x ∈ s, ∃ y ∈ s, x ≠ y ∧ edist x y < C) ↔ ∃ C > 0, ∀ x ∈ s, ∀ y ∈ s, x ≠ y → C ≤ edist x y",
" s... |
import Mathlib.LinearAlgebra.LinearPMap
import Mathlib.Topology.Algebra.Module.Basic
#align_import topology.algebra.module.linear_pmap from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982"
open Topology
variable {R E F : Type*}
variable [CommRing R] [AddCommGroup E] [AddCommGroup F]
vari... | Mathlib/Topology/Algebra/Module/LinearPMap.lean | 127 | 132 | theorem IsClosable.closure_mono {f g : E →ₗ.[R] F} (hg : g.IsClosable) (h : f ≤ g) :
f.closure ≤ g.closure := by |
refine le_of_le_graph ?_
rw [← (hg.leIsClosable h).graph_closure_eq_closure_graph]
rw [← hg.graph_closure_eq_closure_graph]
exact Submodule.topologicalClosure_mono (le_graph_of_le h)
| [
" g.IsClosable",
" g.graph.topologicalClosure ≤ f'.graph",
" g.graph.topologicalClosure ≤ f.graph.topologicalClosure",
" g.graph.topologicalClosure = g.graph.topologicalClosure.toLinearPMap.graph",
" ∀ x ∈ g.graph.topologicalClosure, x.1 = 0 → x.2 = 0",
" ∃! f', f.graph.topologicalClosure = f'.graph",
"... | [
" g.IsClosable",
" g.graph.topologicalClosure ≤ f'.graph",
" g.graph.topologicalClosure ≤ f.graph.topologicalClosure",
" g.graph.topologicalClosure = g.graph.topologicalClosure.toLinearPMap.graph",
" ∀ x ∈ g.graph.topologicalClosure, x.1 = 0 → x.2 = 0",
" ∃! f', f.graph.topologicalClosure = f'.graph",
"... |
import Mathlib.Algebra.Order.Ring.Nat
#align_import data.nat.dist from "leanprover-community/mathlib"@"d50b12ae8e2bd910d08a94823976adae9825718b"
namespace Nat
def dist (n m : ℕ) :=
n - m + (m - n)
#align nat.dist Nat.dist
-- Should be aligned to `Nat.dist.eq_def`, but that is generated on demand and isn't pr... | Mathlib/Data/Nat/Dist.lean | 49 | 50 | theorem dist_eq_sub_of_le_right {n m : ℕ} (h : m ≤ n) : dist n m = n - m := by |
rw [dist_comm]; apply dist_eq_sub_of_le h
| [
" n.dist m = m.dist n",
" n.dist n = 0",
" n.dist m = 0",
" n.dist m = m - n",
" n.dist m = n - m",
" m.dist n = n - m"
] | [
" n.dist m = m.dist n",
" n.dist n = 0",
" n.dist m = 0",
" n.dist m = m - n"
] |
import Mathlib.Algebra.Group.Prod
import Mathlib.Data.Set.Lattice
#align_import data.nat.pairing from "leanprover-community/mathlib"@"207cfac9fcd06138865b5d04f7091e46d9320432"
assert_not_exists MonoidWithZero
open Prod Decidable Function
namespace Nat
-- Porting note: no pp_nodot
--@[pp_nodot]
def pair (a b : ... | Mathlib/Data/Nat/Pairing.lean | 104 | 106 | theorem unpair_zero : unpair 0 = 0 := by |
rw [unpair]
simp
| [
" n.unpair.1.pair n.unpair.2 = n",
" (if n - n.sqrt * n.sqrt < n.sqrt then (n - n.sqrt * n.sqrt, n.sqrt)\n else (n.sqrt, n - n.sqrt * n.sqrt - n.sqrt)).1.pair\n (if n - n.sqrt * n.sqrt < n.sqrt then (n - n.sqrt * n.sqrt, n.sqrt)\n else (n.sqrt, n - n.sqrt * n.sqrt - n.sqrt)).2 =\n n",
" ... | [
" n.unpair.1.pair n.unpair.2 = n",
" (if n - n.sqrt * n.sqrt < n.sqrt then (n - n.sqrt * n.sqrt, n.sqrt)\n else (n.sqrt, n - n.sqrt * n.sqrt - n.sqrt)).1.pair\n (if n - n.sqrt * n.sqrt < n.sqrt then (n - n.sqrt * n.sqrt, n.sqrt)\n else (n.sqrt, n - n.sqrt * n.sqrt - n.sqrt)).2 =\n n",
" ... |
import Mathlib.Algebra.GroupWithZero.Units.Basic
import Mathlib.Algebra.Group.Semiconj.Units
import Mathlib.Init.Classical
#align_import algebra.group_with_zero.semiconj from "leanprover-community/mathlib"@"70d50ecfd4900dd6d328da39ab7ebd516abe4025"
assert_not_exists DenselyOrdered
variable {α M₀ G₀ M₀' G₀' F F' :... | Mathlib/Algebra/GroupWithZero/Semiconj.lean | 62 | 65 | theorem div_right (h : SemiconjBy a x y) (h' : SemiconjBy a x' y') :
SemiconjBy a (x / x') (y / y') := by |
rw [div_eq_mul_inv, div_eq_mul_inv]
exact h.mul_right h'.inv_right₀
| [
" SemiconjBy a 0 0",
" SemiconjBy 0 x y",
" SemiconjBy a⁻¹ x y ↔ SemiconjBy a y x",
" SemiconjBy a x⁻¹ y⁻¹",
" SemiconjBy a 0⁻¹ y⁻¹",
" SemiconjBy a (x / x') (y / y')",
" SemiconjBy a (x * x'⁻¹) (y * y'⁻¹)"
] | [
" SemiconjBy a 0 0",
" SemiconjBy 0 x y",
" SemiconjBy a⁻¹ x y ↔ SemiconjBy a y x",
" SemiconjBy a x⁻¹ y⁻¹",
" SemiconjBy a 0⁻¹ y⁻¹"
] |
import Mathlib.Analysis.InnerProductSpace.PiL2
import Mathlib.Analysis.SpecialFunctions.Sqrt
import Mathlib.Analysis.NormedSpace.HomeomorphBall
#align_import analysis.inner_product_space.calculus from "leanprover-community/mathlib"@"f9dd3204df14a0749cd456fac1e6849dfe7d2b88"
noncomputable section
open RCLike Real ... | Mathlib/Analysis/InnerProductSpace/Calculus.lean | 109 | 112 | theorem HasDerivWithinAt.inner {f g : ℝ → E} {f' g' : E} {s : Set ℝ} {x : ℝ}
(hf : HasDerivWithinAt f f' s x) (hg : HasDerivWithinAt g g' s x) :
HasDerivWithinAt (fun t => ⟪f t, g t⟫) (⟪f x, g'⟫ + ⟪f', g x⟫) s x := by |
simpa using (hf.hasFDerivWithinAt.inner 𝕜 hg.hasFDerivWithinAt).hasDerivWithinAt
| [
" HasDerivWithinAt (fun t => ⟪f t, g t⟫_𝕜) (⟪f x, g'⟫_𝕜 + ⟪f', g x⟫_𝕜) s x"
] | [] |
import Mathlib.Control.Applicative
import Mathlib.Control.Traversable.Basic
import Mathlib.Data.List.Forall2
import Mathlib.Data.Set.Functor
#align_import control.traversable.instances from "leanprover-community/mathlib"@"18a5306c091183ac90884daa9373fa3b178e8607"
universe u v
section Option
open Functor
variab... | Mathlib/Control/Traversable/Instances.lean | 35 | 38 | theorem Option.comp_traverse {α β γ} (f : β → F γ) (g : α → G β) (x : Option α) :
Option.traverse (Comp.mk ∘ (f <$> ·) ∘ g) x =
Comp.mk (Option.traverse f <$> Option.traverse g x) := by |
cases x <;> simp! [functor_norm] <;> rfl
| [
" Option.traverse pure x = x",
" Option.traverse pure none = none",
" Option.traverse pure (some val✝) = some val✝",
" Option.traverse (Comp.mk ∘ (fun x => f <$> x) ∘ g) x = Comp.mk (Option.traverse f <$> Option.traverse g x)",
" Option.traverse (Comp.mk ∘ (fun x => f <$> x) ∘ g) none = Comp.mk (Option.trav... | [
" Option.traverse pure x = x",
" Option.traverse pure none = none",
" Option.traverse pure (some val✝) = some val✝"
] |
import Mathlib.Analysis.SpecialFunctions.Trigonometric.Inverse
import Mathlib.Analysis.SpecialFunctions.Trigonometric.Deriv
#align_import analysis.special_functions.trigonometric.inverse_deriv from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982"
noncomputable section
open scoped Classic... | Mathlib/Analysis/SpecialFunctions/Trigonometric/InverseDeriv.lean | 74 | 79 | theorem hasDerivWithinAt_arcsin_Iic {x : ℝ} (h : x ≠ 1) :
HasDerivWithinAt arcsin (1 / √(1 - x ^ 2)) (Iic x) x := by |
rcases em (x = -1) with (rfl | h')
· convert (hasDerivWithinAt_const (-1 : ℝ) _ (-(π / 2))).congr _ _ <;>
simp (config := { contextual := true }) [arcsin_of_le_neg_one]
· exact (hasDerivAt_arcsin h' h).hasDerivWithinAt
| [
" HasStrictDerivAt arcsin (1 / √(1 - x ^ 2)) x ∧ ContDiffAt ℝ ⊤ arcsin x",
" 1 - x ^ 2 < 0",
" HasStrictDerivAt arcsin 0 x ∧ ContDiffAt ℝ ⊤ arcsin x",
" 0 < 1 - x ^ 2",
" HasStrictDerivAt arcsin x.arcsin.cos⁻¹ x ∧ ContDiffAt ℝ ⊤ arcsin x",
" HasDerivWithinAt arcsin (1 / √(1 - x ^ 2)) (Ici x) x",
" HasDe... | [
" HasStrictDerivAt arcsin (1 / √(1 - x ^ 2)) x ∧ ContDiffAt ℝ ⊤ arcsin x",
" 1 - x ^ 2 < 0",
" HasStrictDerivAt arcsin 0 x ∧ ContDiffAt ℝ ⊤ arcsin x",
" 0 < 1 - x ^ 2",
" HasStrictDerivAt arcsin x.arcsin.cos⁻¹ x ∧ ContDiffAt ℝ ⊤ arcsin x",
" HasDerivWithinAt arcsin (1 / √(1 - x ^ 2)) (Ici x) x",
" HasDe... |
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 | 94 | 100 | theorem convexHull_empty_iff : convexHull 𝕜 s = ∅ ↔ s = ∅ := by |
constructor
· intro h
rw [← Set.subset_empty_iff, ← h]
exact subset_convexHull 𝕜 _
· rintro rfl
exact convexHull_empty
| [
" (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"
] |
import Mathlib.Tactic.Monotonicity
import Mathlib.Topology.Algebra.MulAction
import Mathlib.Topology.MetricSpace.Lipschitz
#align_import topology.metric_space.algebra from "leanprover-community/mathlib"@"14d34b71b6d896b6e5f1ba2ec9124b9cd1f90fca"
open NNReal
noncomputable section
variable (α β : Type*) [PseudoMe... | Mathlib/Topology/MetricSpace/Algebra.lean | 75 | 78 | theorem lipschitz_with_lipschitz_const_mul :
∀ p q : β × β, dist (p.1 * p.2) (q.1 * q.2) ≤ LipschitzMul.C β * dist p q := by |
rw [← lipschitzWith_iff_dist_le_mul]
exact lipschitzWith_lipschitz_const_mul_edist
| [
" ∀ (p q : β × β), dist (p.1 * p.2) (q.1 * q.2) ≤ ↑(LipschitzMul.C β) * dist p q",
" LipschitzWith (LipschitzMul.C β) fun p => p.1 * p.2"
] | [] |
import Mathlib.Order.Interval.Set.UnorderedInterval
import Mathlib.Algebra.Order.Interval.Set.Monoid
import Mathlib.Data.Set.Pointwise.Basic
import Mathlib.Algebra.Order.Field.Basic
import Mathlib.Algebra.Order.Group.MinMax
#align_import data.set.pointwise.interval from "leanprover-community/mathlib"@"2196ab363eb097c... | Mathlib/Data/Set/Pointwise/Interval.lean | 202 | 203 | theorem preimage_add_const_Ioc : (fun x => x + a) ⁻¹' Ioc b c = Ioc (b - a) (c - a) := by |
simp [← Ioi_inter_Iic]
| [
" (fun x => a + x) ⁻¹' Icc b c = Icc (b - a) (c - a)",
" (fun x => a + x) ⁻¹' Ico b c = Ico (b - a) (c - a)",
" (fun x => a + x) ⁻¹' Ioc b c = Ioc (b - a) (c - a)",
" (fun x => a + x) ⁻¹' Ioo b c = Ioo (b - a) (c - a)",
" (fun x => x + a) ⁻¹' Icc b c = Icc (b - a) (c - a)",
" (fun x => x + a) ⁻¹' Ico b c ... | [
" (fun x => a + x) ⁻¹' Icc b c = Icc (b - a) (c - a)",
" (fun x => a + x) ⁻¹' Ico b c = Ico (b - a) (c - a)",
" (fun x => a + x) ⁻¹' Ioc b c = Ioc (b - a) (c - a)",
" (fun x => a + x) ⁻¹' Ioo b c = Ioo (b - a) (c - a)",
" (fun x => x + a) ⁻¹' Icc b c = Icc (b - a) (c - a)",
" (fun x => x + a) ⁻¹' Ico b c ... |
import Mathlib.AlgebraicTopology.SimplicialObject
import Mathlib.CategoryTheory.Limits.Shapes.Products
#align_import algebraic_topology.split_simplicial_object from "leanprover-community/mathlib"@"dd1f8496baa505636a82748e6b652165ea888733"
noncomputable section
open CategoryTheory CategoryTheory.Category Category... | Mathlib/AlgebraicTopology/SplitSimplicialObject.lean | 154 | 159 | theorem eqId_iff_len_le : A.EqId ↔ Δ.unop.len ≤ A.1.unop.len := by |
rw [eqId_iff_len_eq]
constructor
· intro h
rw [h]
· exact le_antisymm (len_le_of_epi (inferInstance : Epi A.e))
| [
" A₁.fst.unop = A₂.fst.unop",
" A₁ = A₂",
" ⟨Δ₁, ⟨α₁, hα₁⟩⟩ = A₂",
" ⟨Δ₁, ⟨α₁, hα₁⟩⟩ = ⟨Δ₂, ⟨α₂, hα₂⟩⟩",
" ⟨Δ₁, ⟨α₁, hα₁⟩⟩ = ⟨Δ₁, ⟨α₂, hα₂⟩⟩",
" Function.Injective fun A => ⟨⟨A.fst.unop.len, ⋯⟩, ⇑(Hom.toOrderHom A.e)⟩",
" ⟨Δ₁, α₁⟩ = ⟨Δ₂, α₂⟩",
" ⟨{ unop := Δ₁ }, α₁⟩ = ⟨Δ₂, α₂⟩",
" ⟨{ unop := Δ₁ }, α... | [
" A₁.fst.unop = A₂.fst.unop",
" A₁ = A₂",
" ⟨Δ₁, ⟨α₁, hα₁⟩⟩ = A₂",
" ⟨Δ₁, ⟨α₁, hα₁⟩⟩ = ⟨Δ₂, ⟨α₂, hα₂⟩⟩",
" ⟨Δ₁, ⟨α₁, hα₁⟩⟩ = ⟨Δ₁, ⟨α₂, hα₂⟩⟩",
" Function.Injective fun A => ⟨⟨A.fst.unop.len, ⋯⟩, ⇑(Hom.toOrderHom A.e)⟩",
" ⟨Δ₁, α₁⟩ = ⟨Δ₂, α₂⟩",
" ⟨{ unop := Δ₁ }, α₁⟩ = ⟨Δ₂, α₂⟩",
" ⟨{ unop := Δ₁ }, α... |
import Mathlib.Algebra.Homology.ShortComplex.ModuleCat
import Mathlib.RepresentationTheory.GroupCohomology.Basic
import Mathlib.RepresentationTheory.Invariants
universe v u
noncomputable section
open CategoryTheory Limits Representation
variable {k G : Type u} [CommRing k] [Group G] (A : Rep k G)
namespace grou... | Mathlib/RepresentationTheory/GroupCohomology/LowDegree.lean | 528 | 530 | theorem map_one_fst_of_isMulTwoCocycle {f : G × G → M} (hf : IsMulTwoCocycle f) (g : G) :
f (1, g) = f (1, 1) := by |
simpa only [one_smul, one_mul, mul_one, mul_right_inj] using (hf 1 1 g).symm
| [
" f 1 = 1",
" f (1, g) = f (1, 1)"
] | [
" f 1 = 1"
] |
import Mathlib.Algebra.CharP.Invertible
import Mathlib.Algebra.MvPolynomial.Variables
import Mathlib.Algebra.MvPolynomial.CommRing
import Mathlib.Algebra.MvPolynomial.Expand
import Mathlib.Data.Fintype.BigOperators
import Mathlib.Data.ZMod.Basic
#align_import ring_theory.witt_vector.witt_polynomial from "leanprover-c... | Mathlib/RingTheory/WittVector/WittPolynomial.lean | 184 | 186 | theorem wittPolynomial_vars_subset (n : ℕ) : (wittPolynomial p R n).vars ⊆ range (n + 1) := by |
rw [← map_wittPolynomial p (Int.castRingHom R), ← wittPolynomial_vars p ℤ]
apply vars_map
| [
" wittPolynomial p R n = ∑ i ∈ range (n + 1), C (↑p ^ i) * X i ^ p ^ (n - i)",
" ∀ x ∈ range (n + 1), (monomial (single x (p ^ (n - x)))) (↑p ^ x) = C (↑p ^ x) * X x ^ p ^ (n - x)",
" (monomial (single i (p ^ (n - i)))) (↑p ^ i) = C (↑p ^ i) * X i ^ p ^ (n - i)",
" X i ^ 0 = 1",
" (map f) (W_ R n) = W_ S n"... | [
" wittPolynomial p R n = ∑ i ∈ range (n + 1), C (↑p ^ i) * X i ^ p ^ (n - i)",
" ∀ x ∈ range (n + 1), (monomial (single x (p ^ (n - x)))) (↑p ^ x) = C (↑p ^ x) * X x ^ p ^ (n - x)",
" (monomial (single i (p ^ (n - i)))) (↑p ^ i) = C (↑p ^ i) * X i ^ p ^ (n - i)",
" X i ^ 0 = 1",
" (map f) (W_ R n) = W_ S n"... |
import Mathlib.RingTheory.IntegralClosure
import Mathlib.RingTheory.Localization.Integral
#align_import ring_theory.integrally_closed from "leanprover-community/mathlib"@"d35b4ff446f1421bd551fafa4b8efd98ac3ac408"
open scoped nonZeroDivisors Polynomial
open Polynomial
abbrev IsIntegrallyClosedIn (R A : Type*) [... | Mathlib/RingTheory/IntegrallyClosed.lean | 153 | 163 | theorem integralClosure_eq_bot_iff (hRA : Function.Injective (algebraMap R A)) :
integralClosure R A = ⊥ ↔ IsIntegrallyClosedIn R A := by |
refine eq_bot_iff.trans ?_
constructor
· intro h
refine ⟨ hRA, fun hx => Set.mem_range.mp (Algebra.mem_bot.mp (h hx)), ?_⟩
rintro ⟨y, rfl⟩
apply isIntegral_algebraMap
· intro h x hx
rw [Algebra.mem_bot, Set.mem_range]
exact isIntegral_iff.mp hx
| [
" integralClosure R A = ⊥ ↔ IsIntegrallyClosedIn R A",
" integralClosure R A ≤ ⊥ ↔ IsIntegrallyClosedIn R A",
" integralClosure R A ≤ ⊥ → IsIntegrallyClosedIn R A",
" IsIntegrallyClosedIn R A",
" (∃ y, (algebraMap R A) y = x✝) → IsIntegral R x✝",
" IsIntegral R ((algebraMap R A) y)",
" IsIntegrallyClose... | [] |
import Mathlib.Geometry.Manifold.MFDeriv.SpecificFunctions
noncomputable section
open scoped Manifold
open Bundle Set Topology
variable {𝕜 : Type*} [NontriviallyNormedField 𝕜]
{E : Type*} [NormedAddCommGroup E] [NormedSpace 𝕜 E] {H : Type*} [TopologicalSpace H]
(I : ModelWithCorners 𝕜 E H) {M : Type*} [To... | Mathlib/Geometry/Manifold/MFDeriv/Atlas.lean | 263 | 273 | theorem trans (he' : e'.MDifferentiable I' I'') : (e.trans e').MDifferentiable I I'' := by |
constructor
· intro x hx
simp only [mfld_simps] at hx
exact
((he'.mdifferentiableAt hx.2).comp _ (he.mdifferentiableAt hx.1)).mdifferentiableWithinAt
· intro x hx
simp only [mfld_simps] at hx
exact
((he.symm.mdifferentiableAt hx.2).comp _
(he'.symm.mdifferentiableAt hx.1)).m... | [
" (mfderiv I' I (↑e.symm) (↑e x)).comp (mfderiv I I' (↑e) x) = ContinuousLinearMap.id 𝕜 (TangentSpace I x)",
" mfderiv I I (↑e.symm ∘ ↑e) x = ContinuousLinearMap.id 𝕜 (TangentSpace I x)",
" mfderiv I I (↑e.symm ∘ ↑e) x = mfderiv I I id x",
" ↑e.symm ∘ ↑e =ᶠ[𝓝 x] id",
" e.source ⊆ {x | (fun x => (↑e.symm ... | [
" (mfderiv I' I (↑e.symm) (↑e x)).comp (mfderiv I I' (↑e) x) = ContinuousLinearMap.id 𝕜 (TangentSpace I x)",
" mfderiv I I (↑e.symm ∘ ↑e) x = ContinuousLinearMap.id 𝕜 (TangentSpace I x)",
" mfderiv I I (↑e.symm ∘ ↑e) x = mfderiv I I id x",
" ↑e.symm ∘ ↑e =ᶠ[𝓝 x] id",
" e.source ⊆ {x | (fun x => (↑e.symm ... |
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 | 49 | 49 | theorem coeff_bit0 (p : R[X]) (n : ℕ) : coeff (bit0 p) n = bit0 (coeff p n) := by | simp [bit0]
| [
" (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.Analysis.Calculus.MeanValue
import Mathlib.Analysis.Calculus.Deriv.Inv
#align_import analysis.calculus.lhopital from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe"
open Filter Set
open scoped Filter Topology Pointwise
variable {a b : ℝ} (hab : a < b) {l : Filter ℝ} {f f... | Mathlib/Analysis/Calculus/LHopital.lean | 95 | 104 | theorem lhopital_zero_right_on_Ico (hff' : ∀ x ∈ Ioo a b, HasDerivAt f (f' x) x)
(hgg' : ∀ x ∈ Ioo a b, HasDerivAt g (g' x) x) (hcf : ContinuousOn f (Ico a b))
(hcg : ContinuousOn g (Ico a b)) (hg' : ∀ x ∈ Ioo a b, g' x ≠ 0) (hfa : f a = 0) (hga : g a = 0)
(hdiv : Tendsto (fun x => f' x / g' x) (𝓝[>] a) l)... |
refine lhopital_zero_right_on_Ioo hab hff' hgg' hg' ?_ ?_ hdiv
· rw [← hfa, ← nhdsWithin_Ioo_eq_nhdsWithin_Ioi hab]
exact ((hcf a <| left_mem_Ico.mpr hab).mono Ioo_subset_Ico_self).tendsto
· rw [← hga, ← nhdsWithin_Ioo_eq_nhdsWithin_Ioi hab]
exact ((hcg a <| left_mem_Ico.mpr hab).mono Ioo_subset_Ico_self... | [
" Tendsto (fun x => f x / g x) (𝓝[>] a) l",
" ∀ x ∈ Ioo a b, g x ≠ 0",
" False",
" Tendsto g (𝓝[<] x) (𝓝 0)",
" Tendsto g (𝓝[Ioo a x] x) (𝓝 (g x))",
" ∀ x ∈ Ioo a b, ∃ c ∈ Ioo a x, f x * g' c = g x * f' c",
" ∃ c ∈ Ioo a x, f x * g' c = g x * f' c",
" ∃ c ∈ Ioo a x, (f x - 0) * g' c = (g x - 0) *... | [
" Tendsto (fun x => f x / g x) (𝓝[>] a) l",
" ∀ x ∈ Ioo a b, g x ≠ 0",
" False",
" Tendsto g (𝓝[<] x) (𝓝 0)",
" Tendsto g (𝓝[Ioo a x] x) (𝓝 (g x))",
" ∀ x ∈ Ioo a b, ∃ c ∈ Ioo a x, f x * g' c = g x * f' c",
" ∃ c ∈ Ioo a x, f x * g' c = g x * f' c",
" ∃ c ∈ Ioo a x, (f x - 0) * g' c = (g x - 0) *... |
import Mathlib.Algebra.Order.Monoid.Unbundled.MinMax
import Mathlib.Algebra.Order.Monoid.WithTop
import Mathlib.Data.Finset.Image
import Mathlib.Data.Multiset.Fold
#align_import data.finset.fold from "leanprover-community/mathlib"@"9003f28797c0664a49e4179487267c494477d853"
-- TODO:
-- assert_not_exists OrderedComm... | Mathlib/Data/Finset/Fold.lean | 88 | 96 | theorem fold_const [hd : Decidable (s = ∅)] (c : β) (h : op c (op b c) = op b c) :
Finset.fold op b (fun _ => c) s = if s = ∅ then b else op b c := by |
classical
induction' s using Finset.induction_on with x s hx IH generalizing hd
· simp
· simp only [Finset.fold_insert hx, IH, if_false, Finset.insert_ne_empty]
split_ifs
· rw [hc.comm]
· exact h
| [
" fold op b f (cons a s h) = op (f a) (fold op b f s)",
" Multiset.fold op b (Multiset.map f (cons a s h).val) = op (f a) (Multiset.fold op b (Multiset.map f s.val))",
" fold op b f (insert a s) = op (f a) (fold op b f s)",
" Multiset.fold op b (Multiset.map f (insert a s).val) = op (f a) (Multiset.fold op b ... | [
" fold op b f (cons a s h) = op (f a) (fold op b f s)",
" Multiset.fold op b (Multiset.map f (cons a s h).val) = op (f a) (Multiset.fold op b (Multiset.map f s.val))",
" fold op b f (insert a s) = op (f a) (fold op b f s)",
" Multiset.fold op b (Multiset.map f (insert a s).val) = op (f a) (Multiset.fold op b ... |
import Mathlib.Algebra.Field.Basic
import Mathlib.Algebra.Order.Field.Defs
import Mathlib.Data.Tree.Basic
import Mathlib.Logic.Basic
import Mathlib.Tactic.NormNum.Core
import Mathlib.Util.SynthesizeUsing
import Mathlib.Util.Qq
open Lean Parser Tactic Mathlib Meta NormNum Qq
initialize registerTraceClass `CancelDen... | Mathlib/Tactic/CancelDenoms/Core.lean | 81 | 86 | theorem cancel_factors_le {α} [LinearOrderedField α] {a b ad bd a' b' gcd : α}
(ha : ad * a = a') (hb : bd * b = b') (had : 0 < ad) (hbd : 0 < bd) (hgcd : 0 < gcd) :
(a ≤ b) = (1 / gcd * (bd * a') ≤ 1 / gcd * (ad * b')) := by |
rw [mul_le_mul_left, ← ha, ← hb, ← mul_assoc, ← mul_assoc, mul_comm bd, mul_le_mul_left]
· exact mul_pos had hbd
· exact one_div_pos.2 hgcd
| [
" k * (e1 * e2) = t1 * t2",
" k * (e1 / e2) = t1",
" e * n = e'",
" n * (e1 + e2) = t1 + t2",
" n * (e1 - e2) = t1 - t2",
" n * -e = -t",
" k * e1 ^ e2 = l * t1 ^ e2",
" k * e⁻¹ = n",
" (a < b) = (1 / gcd * (bd * a') < 1 / gcd * (ad * b'))",
" 0 < ad * bd",
" 0 < 1 / gcd",
" (a ≤ b) = (1 / gcd... | [
" k * (e1 * e2) = t1 * t2",
" k * (e1 / e2) = t1",
" e * n = e'",
" n * (e1 + e2) = t1 + t2",
" n * (e1 - e2) = t1 - t2",
" n * -e = -t",
" k * e1 ^ e2 = l * t1 ^ e2",
" k * e⁻¹ = n",
" (a < b) = (1 / gcd * (bd * a') < 1 / gcd * (ad * b'))",
" 0 < ad * bd",
" 0 < 1 / gcd"
] |
import Batteries.Tactic.SeqFocus
namespace Batteries
class TotalBLE (le : α → α → Bool) : Prop where
total : le a b ∨ le b a
class OrientedCmp (cmp : α → α → Ordering) : Prop where
symm (x y) : (cmp x y).swap = cmp y x
class TransCmp (cmp : α → α → Ordering) extends OrientedCmp cmp : Prop where
... | .lake/packages/batteries/Batteries/Classes/Order.lean | 121 | 122 | theorem BEqCmp.cmp_iff_eq [BEq α] [LawfulBEq α] [BEqCmp (α := α) cmp] : cmp x y = .eq ↔ x = y := by |
simp [BEqCmp.cmp_iff_beq]
| [
" cmp x y = Ordering.eq ↔ x = y"
] | [] |
import Mathlib.Order.Bounds.Basic
import Mathlib.Order.WellFounded
import Mathlib.Data.Set.Image
import Mathlib.Order.Interval.Set.Basic
import Mathlib.Data.Set.Lattice
#align_import order.conditionally_complete_lattice.basic from "leanprover-community/mathlib"@"29cb56a7b35f72758b05a30490e1f10bd62c35c1"
open Func... | Mathlib/Order/ConditionallyCompleteLattice/Basic.lean | 127 | 129 | theorem WithTop.coe_iSup [SupSet α] (f : ι → α) (h : BddAbove (Set.range f)) :
↑(⨆ i, f i) = (⨆ i, f i : WithTop α) := by |
rw [iSup, iSup, WithTop.coe_sSup' h, ← range_comp]; rfl
| [
" ¬(s ⊆ {⊤} ∨ ¬BddBelow s)",
" ∅ ⊆ {⊤} ∨ ¬BddBelow ∅",
" ⨅ i, f i = ⊤",
" ↑(sInf s) = sInf ((fun a => ↑a) '' s)",
" ↑(sInf s) =\n if (fun a => ↑a) '' s ⊆ {⊤} ∨ ¬BddBelow ((fun a => ↑a) '' s) then ⊤\n else ↑(sInf ((fun a => ↑a) ⁻¹' ((fun a => ↑a) '' s)))",
" ↑(sInf s) = ⊤",
" ↑(sInf s) = ↑(sInf ((f... | [
" ¬(s ⊆ {⊤} ∨ ¬BddBelow s)",
" ∅ ⊆ {⊤} ∨ ¬BddBelow ∅",
" ⨅ i, f i = ⊤",
" ↑(sInf s) = sInf ((fun a => ↑a) '' s)",
" ↑(sInf s) =\n if (fun a => ↑a) '' s ⊆ {⊤} ∨ ¬BddBelow ((fun a => ↑a) '' s) then ⊤\n else ↑(sInf ((fun a => ↑a) ⁻¹' ((fun a => ↑a) '' s)))",
" ↑(sInf s) = ⊤",
" ↑(sInf s) = ↑(sInf ((f... |
import Mathlib.Data.List.Basic
#align_import data.list.infix from "leanprover-community/mathlib"@"26f081a2fb920140ed5bc5cc5344e84bcc7cb2b2"
open Nat
variable {α β : Type*}
namespace List
variable {l l₁ l₂ l₃ : List α} {a b : α} {m n : ℕ}
section Fix
#align list.prefix_append List.prefix_append
#align list.... | Mathlib/Data/List/Infix.lean | 73 | 76 | theorem prefix_concat_iff {l₁ l₂ : List α} {a : α} :
l₁ <+: l₂ ++ [a] ↔ l₁ = l₂ ++ [a] ∨ l₁ <+: l₂ := by |
simpa only [← reverse_concat', reverse_inj, reverse_suffix] using
suffix_cons_iff (l₁ := l₁.reverse) (l₂ := l₂.reverse)
| [
" l <+: l.concat a",
" l₁ <+: l₂ ++ [a] ↔ l₁ = l₂ ++ [a] ∨ l₁ <+: l₂"
] | [
" l <+: l.concat a"
] |
import Mathlib.Analysis.NormedSpace.OperatorNorm.Bilinear
import Mathlib.Analysis.NormedSpace.OperatorNorm.NNNorm
import Mathlib.Analysis.NormedSpace.Span
suppress_compilation
open Bornology
open Filter hiding map_smul
open scoped Classical NNReal Topology Uniformity
-- the `ₗ` subscript variables are for special... | Mathlib/Analysis/NormedSpace/OperatorNorm/NormedSpace.lean | 42 | 46 | theorem bound_of_shell [RingHomIsometric σ₁₂] (f : E →ₛₗ[σ₁₂] F) {ε C : ℝ} (ε_pos : 0 < ε) {c : 𝕜}
(hc : 1 < ‖c‖) (hf : ∀ x, ε / ‖c‖ ≤ ‖x‖ → ‖x‖ < ε → ‖f x‖ ≤ C * ‖x‖) (x : E) :
‖f x‖ ≤ C * ‖x‖ := by |
by_cases hx : x = 0; · simp [hx]
exact SemilinearMapClass.bound_of_shell_semi_normed f ε_pos hc hf (norm_ne_zero_iff.2 hx)
| [
" ‖f x‖ ≤ C * ‖x‖"
] | [] |
import Mathlib.Analysis.InnerProductSpace.Basic
import Mathlib.LinearAlgebra.SesquilinearForm
#align_import analysis.inner_product_space.orthogonal from "leanprover-community/mathlib"@"f0c8bf9245297a541f468be517f1bde6195105e9"
variable {𝕜 E F : Type*} [RCLike 𝕜]
variable [NormedAddCommGroup E] [InnerProductSpace... | Mathlib/Analysis/InnerProductSpace/Orthogonal.lean | 103 | 107 | theorem inf_orthogonal_eq_bot : K ⊓ Kᗮ = ⊥ := by |
rw [eq_bot_iff]
intro x
rw [mem_inf]
exact fun ⟨hx, ho⟩ => inner_self_eq_zero.1 (ho x hx)
| [
" ⟪u, a✝ + b✝⟫_𝕜 = 0",
" ⟪u, c • x⟫_𝕜 = 0",
" v ∈ Kᗮ ↔ ∀ u ∈ K, ⟪v, u⟫_𝕜 = 0",
" ⟪v, u⟫_𝕜 = 0",
" ⟪u, v⟫_𝕜 = 0",
" v ∈ (span 𝕜 {u})ᗮ ↔ ⟪u, v⟫_𝕜 = 0",
" ⟪u, v⟫_𝕜 = 0 → v ∈ (span 𝕜 {u})ᗮ",
" ⟪w, v⟫_𝕜 = 0",
" ⟪c • u, v⟫_𝕜 = 0",
" v ∈ (span 𝕜 {u})ᗮ ↔ ⟪v, u⟫_𝕜 = 0",
" x - y ∈ Kᗮ",
" ∀ ... | [
" ⟪u, a✝ + b✝⟫_𝕜 = 0",
" ⟪u, c • x⟫_𝕜 = 0",
" v ∈ Kᗮ ↔ ∀ u ∈ K, ⟪v, u⟫_𝕜 = 0",
" ⟪v, u⟫_𝕜 = 0",
" ⟪u, v⟫_𝕜 = 0",
" v ∈ (span 𝕜 {u})ᗮ ↔ ⟪u, v⟫_𝕜 = 0",
" ⟪u, v⟫_𝕜 = 0 → v ∈ (span 𝕜 {u})ᗮ",
" ⟪w, v⟫_𝕜 = 0",
" ⟪c • u, v⟫_𝕜 = 0",
" v ∈ (span 𝕜 {u})ᗮ ↔ ⟪v, u⟫_𝕜 = 0",
" x - y ∈ Kᗮ",
" ∀ ... |
import Mathlib.Logic.Function.Basic
import Mathlib.Logic.Relator
import Mathlib.Init.Data.Quot
import Mathlib.Tactic.Cases
import Mathlib.Tactic.Use
import Mathlib.Tactic.MkIffOfInductiveProp
import Mathlib.Tactic.SimpRw
#align_import logic.relation from "leanprover-community/mathlib"@"3365b20c2ffa7c35e47e5209b89ba9a... | Mathlib/Logic/Relation.lean | 296 | 299 | theorem trans (hab : ReflTransGen r a b) (hbc : ReflTransGen r b c) : ReflTransGen r a c := by |
induction hbc with
| refl => assumption
| tail _ hcd hac => exact hac.tail hcd
| [
" ReflTransGen r a c",
" ReflTransGen r a b",
" ReflTransGen r a c✝"
] | [] |
import Mathlib.Analysis.Complex.RemovableSingularity
import Mathlib.Analysis.Calculus.UniformLimitsDeriv
import Mathlib.Analysis.NormedSpace.FunctionSeries
#align_import analysis.complex.locally_uniform_limit from "leanprover-community/mathlib"@"fe44cd36149e675eb5dec87acc7e8f1d6568e081"
open Set Metric MeasureThe... | Mathlib/Analysis/Complex/LocallyUniformLimit.lean | 50 | 64 | theorem norm_cderiv_le (hr : 0 < r) (hf : ∀ w ∈ sphere z r, ‖f w‖ ≤ M) :
‖cderiv r f z‖ ≤ M / r := by |
have hM : 0 ≤ M := by
obtain ⟨w, hw⟩ : (sphere z r).Nonempty := NormedSpace.sphere_nonempty.mpr hr.le
exact (norm_nonneg _).trans (hf w hw)
have h1 : ∀ w ∈ sphere z r, ‖((w - z) ^ 2)⁻¹ • f w‖ ≤ M / r ^ 2 := by
intro w hw
simp only [mem_sphere_iff_norm, norm_eq_abs] at hw
simp only [norm_smul, i... | [
" ‖cderiv r f z‖ ≤ M / r",
" 0 ≤ M",
" ∀ w ∈ sphere z r, ‖((w - z) ^ 2)⁻¹ • f w‖ ≤ M / r ^ 2",
" ‖((w - z) ^ 2)⁻¹ • f w‖ ≤ M / r ^ 2",
" ‖f w‖ / r ^ 2 ≤ M / r ^ 2",
" ‖(2 * ↑π * I)⁻¹‖ * ‖∮ (w : ℂ) in C(z, r), ((w - z) ^ 2)⁻¹ • f w‖ ≤ M / r",
" ‖(2 * ↑π * I)⁻¹‖ * (2 * π * r * (M / r ^ 2)) = M / r",
" 2... | [] |
import Mathlib.CategoryTheory.Extensive
import Mathlib.CategoryTheory.Limits.Shapes.KernelPair
#align_import category_theory.adhesive from "leanprover-community/mathlib"@"afff1f24a6b68d0077c9d63782a1d093e337758c"
namespace CategoryTheory
open Limits
universe v' u' v u
variable {J : Type v'} [Category.{u'} J] {... | Mathlib/CategoryTheory/Adhesive.lean | 59 | 63 | theorem IsPushout.IsVanKampen.flip {H : IsPushout f g h i} (H' : H.IsVanKampen) :
H.flip.IsVanKampen := by |
introv W' hf hg hh hi w
simpa only [IsPushout.flip_iff, IsPullback.flip_iff, and_comm] using
H' g' f' i' h' αW αY αX αZ hg hf hi hh w.flip
| [
" ⋯.IsVanKampen",
" IsPushout f' g' h' i' ↔ IsPullback h' αX αZ i ∧ IsPullback i' αY αZ h"
] | [] |
import Mathlib.LinearAlgebra.AffineSpace.AffineMap
import Mathlib.Tactic.FieldSimp
#align_import linear_algebra.affine_space.slope from "leanprover-community/mathlib"@"70fd9563a21e7b963887c9360bd29b2393e6225a"
open AffineMap
variable {k E PE : Type*} [Field k] [AddCommGroup E] [Module k E] [AddTorsor E PE]
def ... | Mathlib/LinearAlgebra/AffineSpace/Slope.lean | 78 | 79 | theorem eq_of_slope_eq_zero {f : k → PE} {a b : k} (h : slope f a b = (0 : E)) : f a = f b := by |
rw [← sub_smul_slope_vadd f a b, h, smul_zero, zero_vadd]
| [
" slope f a a = 0",
" (b - a) • slope f a b = f b -ᵥ f a",
" (a - a) • slope f a a = f a -ᵥ f a",
" (b - a) • slope f a b +ᵥ f a = f b",
" (slope fun x => f x +ᵥ c) = slope f",
" slope (fun x => f x +ᵥ c) a b = slope f a b",
" slope (fun x => (x - a) • f x) a b = f b",
" f a = f b"
] | [
" slope f a a = 0",
" (b - a) • slope f a b = f b -ᵥ f a",
" (a - a) • slope f a a = f a -ᵥ f a",
" (b - a) • slope f a b +ᵥ f a = f b",
" (slope fun x => f x +ᵥ c) = slope f",
" slope (fun x => f x +ᵥ c) a b = slope f a b",
" slope (fun x => (x - a) • f x) a b = f b"
] |
import Mathlib.Algebra.Periodic
import Mathlib.Data.Nat.Count
import Mathlib.Data.Nat.GCD.Basic
import Mathlib.Order.Interval.Finset.Nat
#align_import data.nat.periodic from "leanprover-community/mathlib"@"dc6c365e751e34d100e80fe6e314c3c3e0fd2988"
namespace Nat
open Nat Function
theorem periodic_gcd (a : ℕ) : P... | Mathlib/Data/Nat/Periodic.lean | 48 | 54 | theorem filter_multiset_Ico_card_eq_of_periodic (n a : ℕ) (p : ℕ → Prop) [DecidablePred p]
(pp : Periodic p a) : card (filter p (Ico n (n + a))) = a.count p := by |
rw [count_eq_card_filter_range, Finset.card, Finset.filter_val, Finset.range_val, ←
multiset_Ico_map_mod n, ← map_count_True_eq_filter_card, ← map_count_True_eq_filter_card,
map_map]
congr; funext n
exact (Function.Periodic.map_mod_nat pp n).symm
| [
" Periodic a.gcd a",
" Periodic a.Coprime a",
" Periodic (fun n => n % a) a",
" f (n % a) = f n",
"α : Type u_1 f : ℕ → α a : ℕ hf : Periodic f a n : ℕ | f n",
" card (filter p (Ico n (n + a))) = count p a",
" Multiset.count True (map p (Ico n (n + a))) = Multiset.count True (map (p ∘ fun x => x % a) (I... | [
" Periodic a.gcd a",
" Periodic a.Coprime a",
" Periodic (fun n => n % a) a",
" f (n % a) = f n",
"α : Type u_1 f : ℕ → α a : ℕ hf : Periodic f a n : ℕ | f n"
] |
import Mathlib.Topology.Algebra.Module.WeakDual
import Mathlib.MeasureTheory.Integral.BoundedContinuousFunction
import Mathlib.MeasureTheory.Measure.HasOuterApproxClosed
#align_import measure_theory.measure.finite_measure from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982"
noncomputable... | Mathlib/MeasureTheory/Measure/FiniteMeasure.lean | 213 | 217 | theorem eq_of_forall_toMeasure_apply_eq (μ ν : FiniteMeasure Ω)
(h : ∀ s : Set Ω, MeasurableSet s → (μ : Measure Ω) s = (ν : Measure Ω) s) : μ = ν := by |
apply Subtype.ext
ext1 s s_mble
exact h s s_mble
| [
" ↑μ s = ↑ν s",
" μ s₁ ≤ μ s₂",
" (↑μ s₁).toNNReal ≤ (↑μ s₂).toNNReal",
" μ s ≤ μ.mass",
" μ.mass = 0 ↔ μ = 0",
" μ.mass = 0",
" μ = 0",
" ↑μ = ↑0",
" ↑μ univ = 0",
" μ.mass ≠ 0 ↔ μ ≠ 0",
" μ = ν",
" ↑μ = ↑ν"
] | [
" ↑μ s = ↑ν s",
" μ s₁ ≤ μ s₂",
" (↑μ s₁).toNNReal ≤ (↑μ s₂).toNNReal",
" μ s ≤ μ.mass",
" μ.mass = 0 ↔ μ = 0",
" μ.mass = 0",
" μ = 0",
" ↑μ = ↑0",
" ↑μ univ = 0",
" μ.mass ≠ 0 ↔ μ ≠ 0"
] |
import Mathlib.Data.Int.Interval
import Mathlib.Data.Int.SuccPred
import Mathlib.Data.Int.ConditionallyCompleteOrder
import Mathlib.Topology.Instances.Discrete
import Mathlib.Topology.MetricSpace.Bounded
import Mathlib.Order.Filter.Archimedean
#align_import topology.instances.int from "leanprover-community/mathlib"@"... | Mathlib/Topology/Instances/Int.lean | 41 | 43 | theorem pairwise_one_le_dist : Pairwise fun m n : ℤ => 1 ≤ dist m n := by |
intro m n hne
rw [dist_eq]; norm_cast; rwa [← zero_add (1 : ℤ), Int.add_one_le_iff, abs_pos, sub_ne_zero]
| [
" dist m n = ↑|m - n|",
" |↑m - ↑n| = ↑|m - n|",
" Pairwise fun m n => 1 ≤ dist m n",
" 1 ≤ dist m n",
" 1 ≤ |↑m - ↑n|",
" 1 ≤ |m - n|"
] | [
" dist m n = ↑|m - n|",
" |↑m - ↑n| = ↑|m - n|"
] |
import Mathlib.CategoryTheory.Category.Cat
import Mathlib.CategoryTheory.Elements
#align_import category_theory.grothendieck from "leanprover-community/mathlib"@"14b69e9f3c16630440a2cbd46f1ddad0d561dee7"
universe u
namespace CategoryTheory
variable {C D : Type*} [Category C] [Category D]
variable (F : C ⥤ Cat)
... | Mathlib/CategoryTheory/Grothendieck.lean | 132 | 136 | theorem congr {X Y : Grothendieck F} {f g : X ⟶ Y} (h : f = g) :
f.fiber = eqToHom (by subst h; rfl) ≫ g.fiber := by |
subst h
dsimp
simp
| [
" (F.map g.base).obj X.fiber = (F.map f.base).obj X.fiber",
" f = g",
" { base := base✝, fiber := fiber✝ } = g",
" { base := base✝¹, fiber := fiber✝¹ } = { base := base✝, fiber := fiber✝ }",
" HEq fiber✝¹ fiber✝",
" (F.map (𝟙 X.base)).obj X.fiber = X.fiber",
" (F.map (f.base ≫ g.base)).obj X.fiber = (F... | [
" (F.map g.base).obj X.fiber = (F.map f.base).obj X.fiber",
" f = g",
" { base := base✝, fiber := fiber✝ } = g",
" { base := base✝¹, fiber := fiber✝¹ } = { base := base✝, fiber := fiber✝ }",
" HEq fiber✝¹ fiber✝",
" (F.map (𝟙 X.base)).obj X.fiber = X.fiber",
" (F.map (f.base ≫ g.base)).obj X.fiber = (F... |
import Batteries.Tactic.Alias
import Batteries.Data.Nat.Basic
namespace Nat
@[simp] theorem recAux_zero {motive : Nat → Sort _} (zero : motive 0)
(succ : ∀ n, motive n → motive (n+1)) :
Nat.recAux zero succ 0 = zero := rfl
theorem recAux_succ {motive : Nat → Sort _} (zero : motive 0)
(succ : ∀ n, mo... | .lake/packages/batteries/Batteries/Data/Nat/Lemmas.lean | 74 | 79 | theorem recDiag_zero_succ {motive : Nat → Nat → Sort _} (zero_zero : motive 0 0)
(zero_succ : ∀ n, motive 0 n → motive 0 (n+1)) (succ_zero : ∀ m, motive m 0 → motive (m+1) 0)
(succ_succ : ∀ m n, motive m n → motive (m+1) (n+1)) (n) :
Nat.recDiag zero_zero zero_succ succ_zero succ_succ 0 (n+1)
= zero_s... |
simp [Nat.recDiag]; rfl
| [
" Nat.strongRec ind t = ind t fun m x => Nat.strongRec ind m",
"motive : Nat → Sort u_1\nind : (n : Nat) → ((m : Nat) → m < n → motive m) → motive n\nt : Nat\n| Nat.strongRec ind t = ind t fun m x => Nat.strongRec ind m",
"motive : Nat → Sort u_1 ind : (n : Nat) → ((m : Nat) → m < n → motive m) → motive n t : N... | [
" Nat.strongRec ind t = ind t fun m x => Nat.strongRec ind m",
"motive : Nat → Sort u_1\nind : (n : Nat) → ((m : Nat) → m < n → motive m) → motive n\nt : Nat\n| Nat.strongRec ind t = ind t fun m x => Nat.strongRec ind m",
"motive : Nat → Sort u_1 ind : (n : Nat) → ((m : Nat) → m < n → motive m) → motive n t : N... |
import Mathlib.MeasureTheory.Integral.Lebesgue
#align_import measure_theory.measure.giry_monad from "leanprover-community/mathlib"@"56f4cd1ef396e9fd389b5d8371ee9ad91d163625"
noncomputable section
open scoped Classical
open ENNReal
open scoped Classical
open Set Filter
variable {α β : Type*}
namespace MeasureT... | Mathlib/MeasureTheory/Measure/GiryMonad.lean | 128 | 149 | theorem lintegral_join {m : Measure (Measure α)} {f : α → ℝ≥0∞} (hf : Measurable f) :
∫⁻ x, f x ∂join m = ∫⁻ μ, ∫⁻ x, f x ∂μ ∂m := by |
simp_rw [lintegral_eq_iSup_eapprox_lintegral hf, SimpleFunc.lintegral,
join_apply (SimpleFunc.measurableSet_preimage _ _)]
suffices
∀ (s : ℕ → Finset ℝ≥0∞) (f : ℕ → ℝ≥0∞ → Measure α → ℝ≥0∞), (∀ n r, Measurable (f n r)) →
Monotone (fun n μ => ∑ r ∈ s n, r * f n r μ) →
⨆ n, ∑ r ∈ s n, r * ∫⁻ μ, f... | [
" borel ℝ≥0∞ ≤ MeasurableSpace.map (fun μ => μ s) (MeasurableSpace.map f inst✝)",
" borel ℝ≥0∞ ≤ MeasurableSpace.map ((fun μ => μ s) ∘ f) inst✝",
" MeasurableAdd₂ (Measure α)",
" Measurable fun b => (b.1 + b.2) s",
" Measurable fun b => b.1 s + b.2 s",
" Measurable fun b => b.1 s",
" Measurable fun b =>... | [
" borel ℝ≥0∞ ≤ MeasurableSpace.map (fun μ => μ s) (MeasurableSpace.map f inst✝)",
" borel ℝ≥0∞ ≤ MeasurableSpace.map ((fun μ => μ s) ∘ f) inst✝",
" MeasurableAdd₂ (Measure α)",
" Measurable fun b => (b.1 + b.2) s",
" Measurable fun b => b.1 s + b.2 s",
" Measurable fun b => b.1 s",
" Measurable fun b =>... |
import Mathlib.Analysis.Calculus.ContDiff.Basic
import Mathlib.Analysis.Calculus.Deriv.Linear
import Mathlib.Analysis.Complex.Conformal
import Mathlib.Analysis.Calculus.Conformal.NormedSpace
#align_import analysis.complex.real_deriv from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe"
se... | Mathlib/Analysis/Complex/RealDeriv.lean | 118 | 120 | theorem HasStrictDerivAt.complexToReal_fderiv {f : ℂ → ℂ} {f' x : ℂ} (h : HasStrictDerivAt f f' x) :
HasStrictFDerivAt f (f' • (1 : ℂ →L[ℝ] ℂ)) x := by |
simpa only [Complex.restrictScalars_one_smulRight] using h.hasStrictFDerivAt.restrictScalars ℝ
| [
" HasStrictDerivAt (fun x => (e ↑x).re) e'.re z",
" e'.re = (reCLM.comp ((ContinuousLinearMap.restrictScalars ℝ (ContinuousLinearMap.smulRight 1 e')).comp ofRealCLM)) 1",
" e'.re = reCLM ((ContinuousLinearMap.restrictScalars ℝ (ContinuousLinearMap.smulRight 1 e')) (ofRealCLM 1))",
" HasDerivAt (fun x => (e ↑x... | [
" HasStrictDerivAt (fun x => (e ↑x).re) e'.re z",
" e'.re = (reCLM.comp ((ContinuousLinearMap.restrictScalars ℝ (ContinuousLinearMap.smulRight 1 e')).comp ofRealCLM)) 1",
" e'.re = reCLM ((ContinuousLinearMap.restrictScalars ℝ (ContinuousLinearMap.smulRight 1 e')) (ofRealCLM 1))",
" HasDerivAt (fun x => (e ↑x... |
import Mathlib.LinearAlgebra.Quotient
import Mathlib.RingTheory.Ideal.Operations
namespace Submodule
open Pointwise
variable {R M M' F G : Type*} [CommRing R] [AddCommGroup M] [Module R M]
variable {N N₁ N₂ P P₁ P₂ : Submodule R M}
def colon (N P : Submodule R M) : Ideal R :=
annihilator (P.map N.mkQ)
#align ... | Mathlib/RingTheory/Ideal/Colon.lean | 76 | 78 | theorem _root_.Ideal.mem_colon_singleton {I : Ideal R} {x r : R} :
r ∈ I.colon (Ideal.span {x}) ↔ r * x ∈ I := by |
simp only [← Ideal.submodule_span_eq, Submodule.mem_colon_singleton, smul_eq_mul]
| [
" colon I ⊤ = I",
" ∀ (x : R), (∀ p ∈ ⊤, x * p ∈ I) ↔ x ∈ I",
" ⊥.colon N = N.annihilator",
" r ∈ N.colon (span R {x}) ↔ ∀ (a : R), r • a • x ∈ N",
" (∀ (a : R), r • a • x ∈ N) ↔ r • x ∈ N",
" (∀ (a : R), a • r • x ∈ N) ↔ r • x ∈ N",
" r ∈ colon I (Ideal.span {x}) ↔ r * x ∈ I"
] | [
" colon I ⊤ = I",
" ∀ (x : R), (∀ p ∈ ⊤, x * p ∈ I) ↔ x ∈ I",
" ⊥.colon N = N.annihilator",
" r ∈ N.colon (span R {x}) ↔ ∀ (a : R), r • a • x ∈ N",
" (∀ (a : R), r • a • x ∈ N) ↔ r • x ∈ N",
" (∀ (a : R), a • r • x ∈ N) ↔ r • x ∈ N"
] |
import Mathlib.Algebra.BigOperators.GroupWithZero.Finset
import Mathlib.Data.Finite.Card
import Mathlib.GroupTheory.Finiteness
import Mathlib.GroupTheory.GroupAction.Quotient
#align_import group_theory.index from "leanprover-community/mathlib"@"dc6c365e751e34d100e80fe6e314c3c3e0fd2988"
namespace Subgroup
open Ca... | Mathlib/GroupTheory/Index.lean | 140 | 141 | theorem inf_relindex_left : (H ⊓ K).relindex H = K.relindex H := by |
rw [inf_comm, inf_relindex_right]
| [
" (comap f H).index = H.index",
" ∀ (x y : G'), Setoid.r x y ↔ Setoid.r (f x) (f y)",
" ∀ (x y : G'), x⁻¹ * y ∈ comap f H ↔ (f x)⁻¹ * f y ∈ H",
" f (x⁻¹ * y) = (f x)⁻¹ * f y",
" Function.Injective (Quotient.map' ⇑f ⋯)",
" ∀ ⦃a₂ : G' ⧸ comap f H⦄, Quotient.map' ⇑f ⋯ (Quotient.mk'' x) = Quotient.map' ⇑f ⋯ a... | [
" (comap f H).index = H.index",
" ∀ (x y : G'), Setoid.r x y ↔ Setoid.r (f x) (f y)",
" ∀ (x y : G'), x⁻¹ * y ∈ comap f H ↔ (f x)⁻¹ * f y ∈ H",
" f (x⁻¹ * y) = (f x)⁻¹ * f y",
" Function.Injective (Quotient.map' ⇑f ⋯)",
" ∀ ⦃a₂ : G' ⧸ comap f H⦄, Quotient.map' ⇑f ⋯ (Quotient.mk'' x) = Quotient.map' ⇑f ⋯ a... |
import Mathlib.Analysis.Normed.Group.Basic
import Mathlib.Topology.ContinuousFunction.CocompactMap
open Filter Metric
variable {𝕜 E F 𝓕 : Type*}
variable [NormedAddCommGroup E] [NormedAddCommGroup F] [ProperSpace E] [ProperSpace F]
variable {f : 𝓕}
| Mathlib/Analysis/Normed/Group/CocompactMap.lean | 29 | 39 | theorem CocompactMapClass.norm_le [FunLike 𝓕 E F] [CocompactMapClass 𝓕 E F] (ε : ℝ) :
∃ r : ℝ, ∀ x : E, r < ‖x‖ → ε < ‖f x‖ := by |
have h := cocompact_tendsto f
rw [tendsto_def] at h
specialize h (Metric.closedBall 0 ε)ᶜ (mem_cocompact_of_closedBall_compl_subset 0 ⟨ε, rfl.subset⟩)
rcases closedBall_compl_subset_of_mem_cocompact h 0 with ⟨r, hr⟩
use r
intro x hx
suffices x ∈ f⁻¹' (Metric.closedBall 0 ε)ᶜ by aesop
apply hr
simp [h... | [
" ∃ r, ∀ (x : E), r < ‖x‖ → ε < ‖f x‖",
" ∀ (x : E), r < ‖x‖ → ε < ‖f x‖",
" ε < ‖f x‖",
" x ∈ ⇑f ⁻¹' (closedBall 0 ε)ᶜ",
" x ∈ (closedBall 0 r)ᶜ"
] | [] |
import Mathlib.Data.Fintype.Card
import Mathlib.Order.UpperLower.Basic
#align_import combinatorics.set_family.intersecting from "leanprover-community/mathlib"@"d90e4e186f1d18e375dcd4e5b5f6364b01cb3e46"
open Finset
variable {α : Type*}
namespace Set
section SemilatticeInf
variable [SemilatticeInf α] [OrderBot ... | Mathlib/Combinatorics/SetFamily/Intersecting.lean | 61 | 61 | theorem intersecting_singleton : ({a} : Set α).Intersecting ↔ a ≠ ⊥ := by | simp [Intersecting]
| [
" {a}.Intersecting ↔ a ≠ ⊥"
] | [] |
import Mathlib.Data.Finset.Lattice
import Mathlib.Data.Fintype.Vector
import Mathlib.Data.Multiset.Sym
#align_import data.finset.sym from "leanprover-community/mathlib"@"02ba8949f486ebecf93fe7460f1ed0564b5e442c"
namespace Finset
variable {α : Type*}
@[simps]
protected def sym2 (s : Finset α) : Finset (Sym2 α) :... | Mathlib/Data/Finset/Sym.lean | 152 | 154 | theorem diag_mem_sym2_mem_iff : (∀ b, b ∈ Sym2.diag a → b ∈ s) ↔ a ∈ s := by |
rw [← mem_sym2_iff]
exact mk_mem_sym2_iff.trans <| and_self_iff
| [
" s(a, b) ∈ s.sym2 ↔ a ∈ s ∧ b ∈ s",
" m ∈ s.sym2 ↔ ∀ a ∈ m, a ∈ s",
" (∀ y ∈ m, y ∈ s.val) ↔ ∀ a ∈ m, a ∈ s",
" x ∈ univ.sym2",
" ∀ a ∈ x, a ∈ univ",
" univ.sym2 = univ",
" a✝ ∈ univ.sym2 ↔ a✝ ∈ univ",
" s.sym2 ⊆ t.sym2",
" s.val.sym2 ≤ t.val.sym2",
" s.val ≤ t.val",
" Function.Injective Finset... | [
" s(a, b) ∈ s.sym2 ↔ a ∈ s ∧ b ∈ s",
" m ∈ s.sym2 ↔ ∀ a ∈ m, a ∈ s",
" (∀ y ∈ m, y ∈ s.val) ↔ ∀ a ∈ m, a ∈ s",
" x ∈ univ.sym2",
" ∀ a ∈ x, a ∈ univ",
" univ.sym2 = univ",
" a✝ ∈ univ.sym2 ↔ a✝ ∈ univ",
" s.sym2 ⊆ t.sym2",
" s.val.sym2 ≤ t.val.sym2",
" s.val ≤ t.val",
" Function.Injective Finset... |
import Mathlib.Data.PFunctor.Multivariate.Basic
#align_import data.qpf.multivariate.basic from "leanprover-community/mathlib"@"dc6c365e751e34d100e80fe6e314c3c3e0fd2988"
universe u
open MvFunctor
class MvQPF {n : ℕ} (F : TypeVec.{u} n → Type*) [MvFunctor F] where
P : MvPFunctor.{u} n
abs : ∀ {α}, P α → F α
... | Mathlib/Data/QPF/Multivariate/Basic.lean | 141 | 157 | theorem liftR_iff {α : TypeVec n} (r : ∀ /- ⦃i⦄ -/ {i}, α i → α i → Prop) (x y : F α) :
LiftR r x y ↔ ∃ a f₀ f₁, x = abs ⟨a, f₀⟩ ∧ y = abs ⟨a, f₁⟩ ∧ ∀ i j, r (f₀ i j) (f₁ i j) := by |
constructor
· rintro ⟨u, xeq, yeq⟩
cases' h : repr u with a f
use a, fun i j => (f i j).val.fst, fun i j => (f i j).val.snd
constructor
· rw [← xeq, ← abs_repr u, h, ← abs_map]; rfl
constructor
· rw [← yeq, ← abs_repr u, h, ← abs_map]; rfl
intro i j
exact (f i j).property
rintro ⟨... | [
" TypeVec.id <$$> x = x",
" TypeVec.id <$$> abs (repr x) = abs (repr x)",
" TypeVec.id <$$> abs ⟨a, f⟩ = abs ⟨a, f⟩",
" abs (TypeVec.id <$$> ⟨a, f⟩) = abs ⟨a, f⟩",
" (g ⊚ f) <$$> x = g <$$> f <$$> x",
" (g ⊚ f) <$$> abs (repr x) = g <$$> f <$$> abs (repr x)",
" (g ⊚ f✝) <$$> abs ⟨a, f⟩ = g <$$> f✝ <$$> ... | [
" TypeVec.id <$$> x = x",
" TypeVec.id <$$> abs (repr x) = abs (repr x)",
" TypeVec.id <$$> abs ⟨a, f⟩ = abs ⟨a, f⟩",
" abs (TypeVec.id <$$> ⟨a, f⟩) = abs ⟨a, f⟩",
" (g ⊚ f) <$$> x = g <$$> f <$$> x",
" (g ⊚ f) <$$> abs (repr x) = g <$$> f <$$> abs (repr x)",
" (g ⊚ f✝) <$$> abs ⟨a, f⟩ = g <$$> f✝ <$$> ... |
import Mathlib.Analysis.NormedSpace.Basic
#align_import analysis.normed_space.enorm from "leanprover-community/mathlib"@"57ac39bd365c2f80589a700f9fbb664d3a1a30c2"
noncomputable section
attribute [local instance] Classical.propDecidable
open ENNReal
structure ENorm (𝕜 : Type*) (V : Type*) [NormedField 𝕜] [Ad... | Mathlib/Analysis/NormedSpace/ENorm.lean | 82 | 92 | theorem map_smul (c : 𝕜) (x : V) : e (c • x) = ‖c‖₊ * e x := by |
apply le_antisymm (e.map_smul_le' c x)
by_cases hc : c = 0
· simp [hc]
calc
(‖c‖₊ : ℝ≥0∞) * e x = ‖c‖₊ * e (c⁻¹ • c • x) := by rw [inv_smul_smul₀ hc]
_ ≤ ‖c‖₊ * (‖c⁻¹‖₊ * e (c • x)) := mul_le_mul_left' (e.map_smul_le' _ _) _
_ = e (c • x) := by
rw [← mul_assoc, nnnorm_inv, ENNReal.coe_inv, EN... | [
" e₁ = e₂",
" { toFun := toFun✝, eq_zero' := eq_zero'✝, map_add_le' := map_add_le'✝, map_smul_le' := map_smul_le'✝ } = e₂",
" { toFun := toFun✝¹, eq_zero' := eq_zero'✝¹, map_add_le' := map_add_le'✝¹, map_smul_le' := map_smul_le'✝¹ } =\n { toFun := toFun✝, eq_zero' := eq_zero'✝, map_add_le' := map_add_le'✝, m... | [
" e₁ = e₂",
" { toFun := toFun✝, eq_zero' := eq_zero'✝, map_add_le' := map_add_le'✝, map_smul_le' := map_smul_le'✝ } = e₂",
" { toFun := toFun✝¹, eq_zero' := eq_zero'✝¹, map_add_le' := map_add_le'✝¹, map_smul_le' := map_smul_le'✝¹ } =\n { toFun := toFun✝, eq_zero' := eq_zero'✝, map_add_le' := map_add_le'✝, m... |
import Mathlib.Analysis.Calculus.ContDiff.Basic
import Mathlib.Analysis.Calculus.ParametricIntegral
import Mathlib.MeasureTheory.Constructions.Prod.Integral
import Mathlib.MeasureTheory.Function.LocallyIntegrable
import Mathlib.MeasureTheory.Group.Integral
import Mathlib.MeasureTheory.Group.Prod
import Mathlib.Measure... | Mathlib/Analysis/Convolution.lean | 150 | 155 | theorem _root_.HasCompactSupport.convolution_integrand_bound_left (hcf : HasCompactSupport f)
(hf : Continuous f) {x t : G} {s : Set G} (hx : x ∈ s) :
‖L (f (x - t)) (g t)‖ ≤
(-tsupport f + s).indicator (fun t => (‖L‖ * ⨆ i, ‖f i‖) * ‖g t‖) t := by |
convert hcf.convolution_integrand_bound_right L.flip hf hx using 1
simp_rw [L.opNorm_flip, mul_right_comm]
| [
" ‖(L (f t)) (g (x - t))‖ ≤ u.indicator (fun t => ‖L‖ * ‖f t‖ * C) t",
" (fun t => ‖(L (f t)) (g (x - t))‖) t ≤ ‖L‖ * ‖f t‖ * C",
" (fun t => ‖(L (f t)) (g (x - t))‖) t ≤ 0",
" x - t ∉ support g",
" t ∈ -tsupport g + s",
" (fun x x_1 => x + x_1) (-(x - t)) x = t",
" ‖(L (f t)) (g (x - t))‖ ≤ u.indicator... | [
" ‖(L (f t)) (g (x - t))‖ ≤ u.indicator (fun t => ‖L‖ * ‖f t‖ * C) t",
" (fun t => ‖(L (f t)) (g (x - t))‖) t ≤ ‖L‖ * ‖f t‖ * C",
" (fun t => ‖(L (f t)) (g (x - t))‖) t ≤ 0",
" x - t ∉ support g",
" t ∈ -tsupport g + s",
" (fun x x_1 => x + x_1) (-(x - t)) x = t",
" ‖(L (f t)) (g (x - t))‖ ≤ u.indicator... |
import Mathlib.Analysis.Convex.Jensen
import Mathlib.Analysis.Convex.Mul
import Mathlib.Analysis.Convex.SpecificFunctions.Basic
import Mathlib.Analysis.SpecialFunctions.Pow.NNReal
#align_import analysis.mean_inequalities_pow from "leanprover-community/mathlib"@"ccdbfb6e5614667af5aa3ab2d50885e0ef44a46f"
universe u... | Mathlib/Analysis/MeanInequalitiesPow.lean | 101 | 110 | theorem arith_mean_le_rpow_mean (w z : ι → ℝ) (hw : ∀ i ∈ s, 0 ≤ w i) (hw' : ∑ i ∈ s, w i = 1)
(hz : ∀ i ∈ s, 0 ≤ z i) {p : ℝ} (hp : 1 ≤ p) :
∑ i ∈ s, w i * z i ≤ (∑ i ∈ s, w i * z i ^ p) ^ (1 / p) := by |
have : 0 < p := by positivity
rw [← rpow_le_rpow_iff _ _ this, ← rpow_mul, one_div_mul_cancel (ne_of_gt this), rpow_one]
· exact rpow_arith_mean_le_arith_mean_rpow s w z hw hw' hz hp
all_goals
apply_rules [sum_nonneg, rpow_nonneg]
intro i hi
apply_rules [mul_nonneg, rpow_nonneg, hw i hi, hz i hi]
| [
" (∑ x ∈ s, f x) ^ (n + 1) / ↑s.card ^ n ≤ ∑ x ∈ s, f x ^ (n + 1)",
" (∑ x ∈ ∅, f x) ^ (n + 1) / ↑∅.card ^ n ≤ ∑ x ∈ ∅, f x ^ (n + 1)",
" 0 ≤ 0",
" (∑ x ∈ s, f x / ↑s.card) ^ (n + 1) ≤ ∑ x ∈ s, f x ^ (n + 1) / ↑s.card",
" ∀ i ∈ s, 0 ≤ (fun x => 1 / ↑s.card) i",
" ∑ i ∈ s, (fun x => 1 / ↑s.card) i = 1",
... | [
" (∑ x ∈ s, f x) ^ (n + 1) / ↑s.card ^ n ≤ ∑ x ∈ s, f x ^ (n + 1)",
" (∑ x ∈ ∅, f x) ^ (n + 1) / ↑∅.card ^ n ≤ ∑ x ∈ ∅, f x ^ (n + 1)",
" 0 ≤ 0",
" (∑ x ∈ s, f x / ↑s.card) ^ (n + 1) ≤ ∑ x ∈ s, f x ^ (n + 1) / ↑s.card",
" ∀ i ∈ s, 0 ≤ (fun x => 1 / ↑s.card) i",
" ∑ i ∈ s, (fun x => 1 / ↑s.card) i = 1"
] |
import Mathlib.Tactic.CategoryTheory.Coherence
import Mathlib.CategoryTheory.Monoidal.Free.Coherence
#align_import category_theory.monoidal.coherence_lemmas from "leanprover-community/mathlib"@"b8b8bf3ea0c625fa1f950034a184e07c67f7bcfe"
open CategoryTheory Category Iso
namespace CategoryTheory.MonoidalCategory
v... | Mathlib/CategoryTheory/Monoidal/CoherenceLemmas.lean | 57 | 60 | theorem pentagon_inv_inv_hom (W X Y Z : C) :
(α_ W (X ⊗ Y) Z).inv ≫ ((α_ W X Y).inv ⊗ 𝟙 Z) ≫ (α_ (W ⊗ X) Y Z).hom =
(𝟙 W ⊗ (α_ X Y Z).hom) ≫ (α_ W X (Y ⊗ Z)).inv := by |
coherence
| [
" (α_ (𝟙_ C) X Y).hom ≫ (λ_ (X ⊗ Y)).hom = (λ_ X).hom ⊗ 𝟙 Y",
" (λ_ (X ⊗ Y)).hom = (α_ (𝟙_ C) X Y).inv ≫ ((λ_ X).hom ⊗ 𝟙 Y)",
" (λ_ (X ⊗ Y)).inv = ((λ_ X).inv ⊗ 𝟙 Y) ≫ (α_ (𝟙_ C) X Y).hom",
" 𝟙 X ⊗ (ρ_ Y).inv = (ρ_ (X ⊗ Y)).inv ≫ (α_ X Y (𝟙_ C)).hom",
" (λ_ X).inv ⊗ 𝟙 Y = (λ_ (X ⊗ Y)).inv ≫ (α_ (𝟙... | [
" (α_ (𝟙_ C) X Y).hom ≫ (λ_ (X ⊗ Y)).hom = (λ_ X).hom ⊗ 𝟙 Y",
" (λ_ (X ⊗ Y)).hom = (α_ (𝟙_ C) X Y).inv ≫ ((λ_ X).hom ⊗ 𝟙 Y)",
" (λ_ (X ⊗ Y)).inv = ((λ_ X).inv ⊗ 𝟙 Y) ≫ (α_ (𝟙_ C) X Y).hom",
" 𝟙 X ⊗ (ρ_ Y).inv = (ρ_ (X ⊗ Y)).inv ≫ (α_ X Y (𝟙_ C)).hom",
" (λ_ X).inv ⊗ 𝟙 Y = (λ_ (X ⊗ Y)).inv ≫ (α_ (𝟙... |
import Mathlib.MeasureTheory.Measure.VectorMeasure
import Mathlib.MeasureTheory.Function.AEEqOfIntegral
#align_import measure_theory.measure.with_density_vector_measure from "leanprover-community/mathlib"@"d1bd9c5df2867c1cb463bc6364446d57bdd9f7f1"
noncomputable section
open scoped Classical MeasureTheory NNReal ... | Mathlib/MeasureTheory/Measure/WithDensityVectorMeasure.lean | 101 | 103 | theorem withDensityᵥ_sub (hf : Integrable f μ) (hg : Integrable g μ) :
μ.withDensityᵥ (f - g) = μ.withDensityᵥ f - μ.withDensityᵥ g := by |
rw [sub_eq_add_neg, sub_eq_add_neg, withDensityᵥ_add hf hg.neg, withDensityᵥ_neg]
| [
" (fun s => if MeasurableSet s then ∫ (x : α) in s, f x ∂μ else 0) ∅ = 0",
" HasSum (fun i => (fun s => if MeasurableSet s then ∫ (x : α) in s, f x ∂μ else 0) (s i))\n ((fun s => if MeasurableSet s then ∫ (x : α) in s, f x ∂μ else 0) (⋃ i, s i))",
" HasSum (fun i => if MeasurableSet (s i) then ∫ (x : α) in s... | [
" (fun s => if MeasurableSet s then ∫ (x : α) in s, f x ∂μ else 0) ∅ = 0",
" HasSum (fun i => (fun s => if MeasurableSet s then ∫ (x : α) in s, f x ∂μ else 0) (s i))\n ((fun s => if MeasurableSet s then ∫ (x : α) in s, f x ∂μ else 0) (⋃ i, s i))",
" HasSum (fun i => if MeasurableSet (s i) then ∫ (x : α) in s... |
import Mathlib.Data.List.Nodup
#align_import data.list.duplicate from "leanprover-community/mathlib"@"f694c7dead66f5d4c80f446c796a5aad14707f0e"
variable {α : Type*}
namespace List
inductive Duplicate (x : α) : List α → Prop
| cons_mem {l : List α} : x ∈ l → Duplicate x (x :: l)
| cons_duplicate {y : α} {l ... | Mathlib/Data/List/Duplicate.lean | 70 | 73 | theorem Duplicate.ne_singleton (h : x ∈+ l) (y : α) : l ≠ [y] := by |
induction' h with l' h z l' h _
· simp [ne_nil_of_mem h]
· simp [ne_nil_of_mem h.mem]
| [
" x ∈ l",
" x ∈ x :: l'",
" x ∈ y :: l'",
" l ≠ [y]",
" x :: l' ≠ [y]",
" z :: l' ≠ [y]"
] | [
" x ∈ l",
" x ∈ x :: l'",
" x ∈ y :: l'"
] |
import Mathlib.Analysis.SpecialFunctions.Integrals
import Mathlib.MeasureTheory.Integral.Layercake
#align_import measure_theory.integral.layercake from "leanprover-community/mathlib"@"08a4542bec7242a5c60f179e4e49de8c0d677b1b"
open Set
namespace MeasureTheory
variable {α : Type*} [MeasurableSpace α] {f : α → ℝ} (... | Mathlib/Analysis/SpecialFunctions/Pow/Integral.lean | 50 | 72 | theorem lintegral_rpow_eq_lintegral_meas_le_mul :
∫⁻ ω, ENNReal.ofReal (f ω ^ p) ∂μ =
ENNReal.ofReal p * ∫⁻ t in Ioi 0, μ {a : α | t ≤ f a} * ENNReal.ofReal (t ^ (p - 1)) := by |
have one_lt_p : -1 < p - 1 := by linarith
have obs : ∀ x : ℝ, ∫ t : ℝ in (0)..x, t ^ (p - 1) = x ^ p / p := by
intro x
rw [integral_rpow (Or.inl one_lt_p)]
simp [Real.zero_rpow p_pos.ne.symm]
set g := fun t : ℝ => t ^ (p - 1)
have g_nn : ∀ᵐ t ∂volume.restrict (Ioi (0 : ℝ)), 0 ≤ g t := by
filter... | [
" ∫⁻ (ω : α), ENNReal.ofReal (f ω ^ p) ∂μ =\n ENNReal.ofReal p * ∫⁻ (t : ℝ) in Ioi 0, μ {a | t ≤ f a} * ENNReal.ofReal (t ^ (p - 1))",
" -1 < p - 1",
" ∀ (x : ℝ), ∫ (t : ℝ) in 0 ..x, t ^ (p - 1) = x ^ p / p",
" ∫ (t : ℝ) in 0 ..x, t ^ (p - 1) = x ^ p / p",
" (x ^ (p - 1 + 1) - 0 ^ (p - 1 + 1)) / (p - 1 +... | [] |
import Mathlib.Algebra.Polynomial.Eval
import Mathlib.RingTheory.Ideal.Quotient
#align_import linear_algebra.smodeq from "leanprover-community/mathlib"@"146d3d1fa59c091fedaad8a4afa09d6802886d24"
open Submodule
open Polynomial
variable {R : Type*} [Ring R]
variable {A : Type*} [CommRing A]
variable {M : Type*} [... | Mathlib/LinearAlgebra/SModEq.lean | 44 | 44 | theorem sub_mem : x ≡ y [SMOD U] ↔ x - y ∈ U := by | rw [SModEq.def, Submodule.Quotient.eq]
| [
" x ≡ y [SMOD U] ↔ x - y ∈ U"
] | [] |
import Mathlib.Data.Nat.Defs
import Mathlib.Tactic.GCongr.Core
import Mathlib.Tactic.Common
import Mathlib.Tactic.Monotonicity.Attr
#align_import data.nat.factorial.basic from "leanprover-community/mathlib"@"d012cd09a9b256d870751284dd6a29882b0be105"
namespace Nat
def factorial : ℕ → ℕ
| 0 => 1
| succ n => s... | Mathlib/Data/Nat/Factorial/Basic.lean | 121 | 129 | theorem factorial_inj (hn : 1 < n) : n ! = m ! ↔ n = m := by |
refine ⟨fun h => ?_, congr_arg _⟩
obtain hnm | rfl | hnm := lt_trichotomy n m
· rw [← factorial_lt <| lt_of_succ_lt hn, h] at hnm
cases lt_irrefl _ hnm
· rfl
rw [← one_lt_factorial, h, one_lt_factorial] at hn
rw [← factorial_lt <| lt_of_succ_lt hn, h] at hnm
cases lt_irrefl _ hnm
| [
" m ! ∣ n !",
" m ! ∣ m !",
" m ! ∣ n.succ !",
" m ! * (m + 1) ^ 0 ≤ (m + 0)!",
" m ! * (m + 1) ^ (n + 1) ≤ (m + (n + 1))!",
" m ! * (m + 1) ^ n * (m + 1) ≤ (m + n)! * (m + n + 1)",
" n ! < m ! ↔ n < m",
" n ! < m !",
" ∀ {n : ℕ}, 0 < n → n ! < (n + 1)!",
" k ! < (k + 1)!",
" 0 < k * k !",
" n... | [
" m ! ∣ n !",
" m ! ∣ m !",
" m ! ∣ n.succ !",
" m ! * (m + 1) ^ 0 ≤ (m + 0)!",
" m ! * (m + 1) ^ (n + 1) ≤ (m + (n + 1))!",
" m ! * (m + 1) ^ n * (m + 1) ≤ (m + n)! * (m + n + 1)",
" n ! < m ! ↔ n < m",
" n ! < m !",
" ∀ {n : ℕ}, 0 < n → n ! < (n + 1)!",
" k ! < (k + 1)!",
" 0 < k * k !",
" n... |
import Mathlib.Algebra.GroupWithZero.NonZeroDivisors
import Mathlib.Algebra.Polynomial.AlgebraMap
import Mathlib.RingTheory.Coprime.Basic
import Mathlib.Tactic.AdaptationNote
#align_import ring_theory.polynomial.scale_roots from "leanprover-community/mathlib"@"40ac1b258344e0c2b4568dc37bfad937ec35a727"
variable {R... | Mathlib/RingTheory/Polynomial/ScaleRoots.lean | 62 | 64 | theorem support_scaleRoots_le (p : R[X]) (s : R) : (scaleRoots p s).support ≤ p.support := by |
intro
simpa using left_ne_zero_of_mul
| [
" (p.scaleRoots s).coeff i = p.coeff i * s ^ (p.natDegree - i)",
" (p.scaleRoots s).coeff p.natDegree = p.leadingCoeff",
" scaleRoots 0 s = 0",
" (scaleRoots 0 s).coeff n✝ = coeff 0 n✝",
" p.scaleRoots s ≠ 0",
" False",
" (p.scaleRoots s).support ≤ p.support",
" a✝ ∈ (p.scaleRoots s).support → a✝ ∈ p.... | [
" (p.scaleRoots s).coeff i = p.coeff i * s ^ (p.natDegree - i)",
" (p.scaleRoots s).coeff p.natDegree = p.leadingCoeff",
" scaleRoots 0 s = 0",
" (scaleRoots 0 s).coeff n✝ = coeff 0 n✝",
" p.scaleRoots s ≠ 0",
" False"
] |
import Mathlib.Algebra.Order.Group.Abs
import Mathlib.Algebra.Order.Group.Basic
import Mathlib.Algebra.Order.Group.OrderIso
import Mathlib.Algebra.Order.Ring.Defs
import Mathlib.Data.Int.Cast.Lemmas
import Mathlib.Order.Interval.Set.Basic
import Mathlib.Logic.Pairwise
#align_import data.set.intervals.group from "lean... | Mathlib/Algebra/Order/Interval/Set/Group.lean | 226 | 228 | theorem pairwise_disjoint_Ioo_zpow :
Pairwise (Disjoint on fun n : ℤ => Ioo (b ^ n) (b ^ (n + 1))) := by |
simpa only [one_mul] using pairwise_disjoint_Ioo_mul_zpow 1 b
| [
" Pairwise (Disjoint on fun n => Ioc (a * b ^ n) (a * b ^ (n + 1)))",
" Pairwise fun x y => Disjoint (Ioc (a * b ^ x) (a * b ^ (x + 1))) (Ioc (a * b ^ y) (a * b ^ (y + 1)))",
" Pairwise fun x y => Ioc (a * b ^ x) (a * b ^ (x + 1)) ∩ Ioc (a * b ^ y) (a * b ^ (y + 1)) ⊆ ∅",
" x ∈ ∅",
" m = n",
" 1 < b",
"... | [
" Pairwise (Disjoint on fun n => Ioc (a * b ^ n) (a * b ^ (n + 1)))",
" Pairwise fun x y => Disjoint (Ioc (a * b ^ x) (a * b ^ (x + 1))) (Ioc (a * b ^ y) (a * b ^ (y + 1)))",
" Pairwise fun x y => Ioc (a * b ^ x) (a * b ^ (x + 1)) ∩ Ioc (a * b ^ y) (a * b ^ (y + 1)) ⊆ ∅",
" x ∈ ∅",
" m = n",
" 1 < b",
"... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.