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.Combinatorics.SimpleGraph.Basic
import Mathlib.Combinatorics.SimpleGraph.Connectivity
import Mathlib.LinearAlgebra.Matrix.Trace
import Mathlib.LinearAlgebra.Matrix.Symmetric
#align_import combinatorics.simple_graph.adj_matrix from "leanprover-community/mathlib"@"3e068ece210655b7b9a9477c3aff38a492400aa1... | Mathlib/Combinatorics/SimpleGraph/AdjMatrix.lean | 121 | 122 | theorem isAdjMatrix_compl [Zero α] [One α] (h : A.IsSymm) : IsAdjMatrix A.compl :=
{ symm := by | simp [h] }
| [
" A.compl i i = 0",
" A.compl i j = 0 ∨ A.compl i j = 1",
" (if i = j then 0 else if A i j = 0 then 1 else 0) = 0 ∨ (if i = j then 0 else if A i j = 0 then 1 else 0) = 1",
" 0 = 0 ∨ 0 = 1",
" 1 = 0 ∨ 1 = 1",
" A.compl.IsSymm",
" A.complᵀ i✝ j✝ = A.compl i✝ j✝"
] | [
" A.compl i i = 0",
" A.compl i j = 0 ∨ A.compl i j = 1",
" (if i = j then 0 else if A i j = 0 then 1 else 0) = 0 ∨ (if i = j then 0 else if A i j = 0 then 1 else 0) = 1",
" 0 = 0 ∨ 0 = 1",
" 1 = 0 ∨ 1 = 1",
" A.compl.IsSymm",
" A.complᵀ i✝ j✝ = A.compl i✝ j✝"
] |
import Mathlib.Algebra.Group.Hom.Defs
#align_import algebra.group.ext from "leanprover-community/mathlib"@"e574b1a4e891376b0ef974b926da39e05da12a06"
assert_not_exists MonoidWithZero
assert_not_exists DenselyOrdered
open Function
universe u
@[to_additive (attr := ext)]
theorem Monoid.ext {M : Type u} ⦃m₁ m₂ : Mo... | Mathlib/Algebra/Group/Ext.lean | 87 | 90 | theorem RightCancelMonoid.toMonoid_injective {M : Type u} :
Function.Injective (@RightCancelMonoid.toMonoid M) := by |
rintro @⟨@⟨⟩⟩ @⟨@⟨⟩⟩ h
congr <;> injection h
| [
" m₁ = m₂",
" Monoid.npow = Monoid.npow",
" Monoid.npow n x = Monoid.npow n x",
" mk one_mul✝ mul_one✝ npow✝ npow_zero✝ npow_succ✝ = m₂",
" mk one_mul✝¹ mul_one✝¹ npow✝¹ npow_zero✝¹ npow_succ✝¹ = mk one_mul✝ mul_one✝ npow✝ npow_zero✝ npow_succ✝",
" Injective (@toMonoid M)",
" mk mul_comm✝¹ = mk mul_comm... | [
" m₁ = m₂",
" Monoid.npow = Monoid.npow",
" Monoid.npow n x = Monoid.npow n x",
" mk one_mul✝ mul_one✝ npow✝ npow_zero✝ npow_succ✝ = m₂",
" mk one_mul✝¹ mul_one✝¹ npow✝¹ npow_zero✝¹ npow_succ✝¹ = mk one_mul✝ mul_one✝ npow✝ npow_zero✝ npow_succ✝",
" Injective (@toMonoid M)",
" mk mul_comm✝¹ = mk mul_comm... |
import Mathlib.Algebra.GCDMonoid.Multiset
import Mathlib.Combinatorics.Enumerative.Partition
import Mathlib.Data.List.Rotate
import Mathlib.GroupTheory.Perm.Cycle.Factors
import Mathlib.GroupTheory.Perm.Closure
import Mathlib.Algebra.GCDMonoid.Nat
import Mathlib.Tactic.NormNum.GCD
#align_import group_theory.perm.cycl... | Mathlib/GroupTheory/Perm/Cycle/Type.lean | 87 | 88 | theorem card_cycleType_eq_zero {σ : Perm α} : Multiset.card σ.cycleType = 0 ↔ σ = 1 := by |
rw [card_eq_zero, cycleType_eq_zero]
| [
" σ.cycleType = Multiset.map (Finset.card ∘ support) s.val",
" Multiset.map (Finset.card ∘ support) σ.cycleFactorsFinset.val = Multiset.map (Finset.card ∘ support) s.val",
" σ.cycleFactorsFinset = s",
" (∀ f ∈ s, f.IsCycle) ∧ ∃ (h : (↑s).Pairwise Disjoint), s.noncommProd id ⋯ = σ",
" σ.cycleType = ↑(List.ma... | [
" σ.cycleType = Multiset.map (Finset.card ∘ support) s.val",
" Multiset.map (Finset.card ∘ support) σ.cycleFactorsFinset.val = Multiset.map (Finset.card ∘ support) s.val",
" σ.cycleFactorsFinset = s",
" (∀ f ∈ s, f.IsCycle) ∧ ∃ (h : (↑s).Pairwise Disjoint), s.noncommProd id ⋯ = σ",
" σ.cycleType = ↑(List.ma... |
import Mathlib.MeasureTheory.MeasurableSpace.Basic
import Mathlib.MeasureTheory.Measure.MeasureSpaceDef
#align_import measure_theory.function.ae_measurable_sequence from "leanprover-community/mathlib"@"d003c55042c3cd08aefd1ae9a42ef89441cdaaf3"
open MeasureTheory
open scoped Classical
variable {ι : Sort*} {α β γ... | Mathlib/MeasureTheory/Function/AEMeasurableSequence.lean | 64 | 66 | theorem aeSeq_eq_fun_of_mem_aeSeqSet (hf : ∀ i, AEMeasurable (f i) μ) {x : α}
(hx : x ∈ aeSeqSet hf p) (i : ι) : aeSeq hf p i x = f i x := by |
simp only [aeSeq_eq_mk_of_mem_aeSeqSet hf hx i, mk_eq_fun_of_mem_aeSeqSet hf hx i]
| [
" aeSeqSet hf p ⊆ {x | ∀ (i : ι), f i x = AEMeasurable.mk (f i) ⋯ x}",
" {x | ∀ (i : ι), f i x = AEMeasurable.mk (f i) ⋯ x}ᶜ ⊆\n toMeasurable μ {x | (∀ (i : ι), f i x = AEMeasurable.mk (f i) ⋯ x) ∧ p x fun n => f n x}ᶜ",
" x ∈ {x | ∀ (i : ι), f i x = AEMeasurable.mk (f i) ⋯ x}",
" aeSeq hf p i x = AEMeasur... | [
" aeSeqSet hf p ⊆ {x | ∀ (i : ι), f i x = AEMeasurable.mk (f i) ⋯ x}",
" {x | ∀ (i : ι), f i x = AEMeasurable.mk (f i) ⋯ x}ᶜ ⊆\n toMeasurable μ {x | (∀ (i : ι), f i x = AEMeasurable.mk (f i) ⋯ x) ∧ p x fun n => f n x}ᶜ",
" x ∈ {x | ∀ (i : ι), f i x = AEMeasurable.mk (f i) ⋯ x}",
" aeSeq hf p i x = AEMeasur... |
import Mathlib.Topology.Order.Basic
open Set Filter OrderDual
open scoped Topology
section OrderClosedTopology
variable {α : Type*} [LinearOrder α] [TopologicalSpace α] [OrderClosedTopology α] {a b c d : α}
@[simp] theorem nhdsSet_Ioi : 𝓝ˢ (Ioi a) = 𝓟 (Ioi a) := isOpen_Ioi.nhdsSet_eq
@[simp] theorem nhdsSet... | Mathlib/Topology/Order/NhdsSet.lean | 57 | 58 | theorem Ioi_mem_nhdsSet_Ici_iff : Ioi a ∈ 𝓝ˢ (Ici b) ↔ a < b := by |
rw [isOpen_Ioi.mem_nhdsSet, Ici_subset_Ioi]
| [
" 𝓝ˢ (Ici a) = 𝓝 a ⊔ 𝓟 (Ioi a)",
" 𝓝ˢ (Ico a b) = 𝓝 a ⊔ 𝓟 (Ioo a b)",
" 𝓝ˢ (Ioc a b) = 𝓝 b ⊔ 𝓟 (Ioo a b)",
" 𝓝ˢ (Icc a b) = 𝓝 a ⊔ 𝓝 b ⊔ 𝓟 (Ioo a b)",
" 𝓝ˢ (Icc a a) = 𝓝 a ⊔ 𝓝 a ⊔ 𝓟 (Ioo a a)",
" Ioi a ∈ 𝓝ˢ (Ici b) ↔ a < b"
] | [
" 𝓝ˢ (Ici a) = 𝓝 a ⊔ 𝓟 (Ioi a)",
" 𝓝ˢ (Ico a b) = 𝓝 a ⊔ 𝓟 (Ioo a b)",
" 𝓝ˢ (Ioc a b) = 𝓝 b ⊔ 𝓟 (Ioo a b)",
" 𝓝ˢ (Icc a b) = 𝓝 a ⊔ 𝓝 b ⊔ 𝓟 (Ioo a b)",
" 𝓝ˢ (Icc a a) = 𝓝 a ⊔ 𝓝 a ⊔ 𝓟 (Ioo a a)"
] |
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 | 66 | 68 | theorem pow_subst {α} [CommRing α] {n e1 t1 k l : α} {e2 : ℕ}
(h1 : n * e1 = t1) (h2 : l * n ^ e2 = k) : k * (e1 ^ e2) = l * t1 ^ e2 := by |
rw [← h2, ← h1, mul_pow, mul_assoc]
| [
" 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 * (e1 * e2) = t1 * t2",
" k * (e1 / e2) = t1",
" e * n = e'",
" n * (e1 + e2) = t1 + t2",
" n * (e1 - e2) = t1 - t2",
" n * -e = -t"
] |
import Mathlib.Analysis.Complex.Circle
import Mathlib.MeasureTheory.Group.Integral
import Mathlib.MeasureTheory.Integral.SetIntegral
import Mathlib.MeasureTheory.Measure.Haar.OfBasis
import Mathlib.MeasureTheory.Constructions.Prod.Integral
import Mathlib.MeasureTheory.Measure.Haar.InnerProductSpace
import Mathlib.Alge... | Mathlib/Analysis/Fourier/FourierTransform.lean | 132 | 147 | theorem fourierIntegral_convergent_iff (he : Continuous e)
(hL : Continuous fun p : V × W ↦ L p.1 p.2) {f : V → E} (w : W) :
Integrable (fun v : V ↦ e (-L v w) • f v) μ ↔ Integrable f μ := by |
-- first prove one-way implication
have aux {g : V → E} (hg : Integrable g μ) (x : W) :
Integrable (fun v : V ↦ e (-L v x) • g v) μ := by
have c : Continuous fun v ↦ e (-L v x) :=
he.comp (hL.comp (continuous_prod_mk.mpr ⟨continuous_id, continuous_const⟩)).neg
simp_rw [← integrable_norm_iff (c.... | [
" Integrable (fun v => e (-(L v) w) • f v) μ ↔ Integrable f μ",
" Integrable (fun v => e (-(L v) x) • g v) μ",
" Integrable (fun a => ‖g a‖) μ",
" Integrable f μ"
] | [] |
import Mathlib.Topology.MetricSpace.Isometry
#align_import topology.metric_space.gluing from "leanprover-community/mathlib"@"e1a7bdeb4fd826b7e71d130d34988f0a2d26a177"
noncomputable section
universe u v w
open Function Set Uniformity Topology
namespace Metric
section ApproxGluing
variable {X : Type u} {Y : Typ... | Mathlib/Topology/MetricSpace/Gluing.lean | 76 | 85 | theorem glueDist_glued_points [Nonempty Z] (Φ : Z → X) (Ψ : Z → Y) (ε : ℝ) (p : Z) :
glueDist Φ Ψ ε (.inl (Φ p)) (.inr (Ψ p)) = ε := by |
have : ⨅ q, dist (Φ p) (Φ q) + dist (Ψ p) (Ψ q) = 0 := by
have A : ∀ q, 0 ≤ dist (Φ p) (Φ q) + dist (Ψ p) (Ψ q) := fun _ =>
add_nonneg dist_nonneg dist_nonneg
refine le_antisymm ?_ (le_ciInf A)
have : 0 = dist (Φ p) (Φ p) + dist (Ψ p) (Ψ p) := by simp
rw [this]
exact ciInf_le ⟨0, forall_mem... | [
" glueDist Φ Ψ ε (Sum.inl (Φ p)) (Sum.inr (Ψ p)) = ε",
" ⨅ q, dist (Φ p) (Φ q) + dist (Ψ p) (Ψ q) = 0",
" ⨅ q, dist (Φ p) (Φ q) + dist (Ψ p) (Ψ q) ≤ 0",
" 0 = dist (Φ p) (Φ p) + dist (Ψ p) (Ψ p)",
" ⨅ q, dist (Φ p) (Φ q) + dist (Ψ p) (Ψ q) ≤ dist (Φ p) (Φ p) + dist (Ψ p) (Ψ p)"
] | [] |
import Mathlib.LinearAlgebra.Dimension.Free
import Mathlib.Algebra.Homology.ShortComplex.ModuleCat
open CategoryTheory
namespace ModuleCat
variable {ι ι' R : Type*} [Ring R] {S : ShortComplex (ModuleCat R)}
(hS : S.Exact) (hS' : S.ShortExact) {v : ι → S.X₁}
open CategoryTheory Submodule Set
section Span
| Mathlib/Algebra/Category/ModuleCat/Free.lean | 94 | 125 | theorem span_exact {β : Type*} {u : ι ⊕ β → S.X₂} (huv : u ∘ Sum.inl = S.f ∘ v)
(hv : ⊤ ≤ span R (range v))
(hw : ⊤ ≤ span R (range (S.g ∘ u ∘ Sum.inr))) :
⊤ ≤ span R (range u) := by |
intro m _
have hgm : S.g m ∈ span R (range (S.g ∘ u ∘ Sum.inr)) := hw mem_top
rw [Finsupp.mem_span_range_iff_exists_finsupp] at hgm
obtain ⟨cm, hm⟩ := hgm
let m' : S.X₂ := Finsupp.sum cm fun j a ↦ a • (u (Sum.inr j))
have hsub : m - m' ∈ LinearMap.range S.f := by
rw [hS.moduleCat_range_eq_ker]
simp... | [
" ⊤ ≤ span R (range u)",
" m ∈ span R (range u)",
" m - m' ∈ LinearMap.range S.f",
" m - m' ∈ LinearMap.ker S.g",
" S.g m = S.g m'",
" (cm.sum fun i a => a • (⇑S.g ∘ u ∘ Sum.inr) i) = cm.sum fun a b => S.g (b • u (Sum.inr a))",
" (cn.sum fun a b => S.f (b • v a)) + m' ∈ span R (range u)",
" (cn.sum fu... | [] |
import Mathlib.Topology.Connected.Basic
open Set Function
universe u v
variable {α : Type u} {β : Type v} {ι : Type*} {π : ι → Type*} [TopologicalSpace α]
{s t u v : Set α}
section TotallyDisconnected
def IsTotallyDisconnected (s : Set α) : Prop :=
∀ t, t ⊆ s → IsPreconnected t → t.Subsingleton
#align is_t... | Mathlib/Topology/Connected/TotallyDisconnected.lean | 108 | 119 | theorem totallyDisconnectedSpace_iff_connectedComponent_subsingleton :
TotallyDisconnectedSpace α ↔ ∀ x : α, (connectedComponent x).Subsingleton := by |
constructor
· intro h x
apply h.1
· exact subset_univ _
exact isPreconnected_connectedComponent
intro h; constructor
intro s s_sub hs
rcases eq_empty_or_nonempty s with (rfl | ⟨x, x_in⟩)
· exact subsingleton_empty
· exact (h x).anti (hs.subset_connectedComponent x_in)
| [
" TotallyDisconnectedSpace (α ⊕ β)",
" s.Subsingleton",
" (Sum.inl '' t).Subsingleton",
" (Sum.inr '' t).Subsingleton",
" TotallyDisconnectedSpace ((i : ι) × π i)",
" ∅.Subsingleton",
" (Sigma.mk a '' t).Subsingleton",
" IsTotallyDisconnected univ",
" S.Subsingleton",
" ∀ ⦃x : X⦄, x ∈ S → ∀ ⦃y : X... | [
" TotallyDisconnectedSpace (α ⊕ β)",
" s.Subsingleton",
" (Sum.inl '' t).Subsingleton",
" (Sum.inr '' t).Subsingleton",
" TotallyDisconnectedSpace ((i : ι) × π i)",
" ∅.Subsingleton",
" (Sigma.mk a '' t).Subsingleton",
" IsTotallyDisconnected univ",
" S.Subsingleton",
" ∀ ⦃x : X⦄, x ∈ S → ∀ ⦃y : X... |
import Mathlib.Probability.Kernel.Composition
import Mathlib.MeasureTheory.Integral.SetIntegral
#align_import probability.kernel.integral_comp_prod from "leanprover-community/mathlib"@"c0d694db494dd4f9aa57f2714b6e4c82b4ebc113"
noncomputable section
open scoped Topology ENNReal MeasureTheory ProbabilityTheory
op... | Mathlib/Probability/Kernel/IntegralCompProd.lean | 48 | 61 | theorem hasFiniteIntegral_prod_mk_left (a : α) {s : Set (β × γ)} (h2s : (κ ⊗ₖ η) a s ≠ ∞) :
HasFiniteIntegral (fun b => (η (a, b) (Prod.mk b ⁻¹' s)).toReal) (κ a) := by |
let t := toMeasurable ((κ ⊗ₖ η) a) s
simp_rw [HasFiniteIntegral, ennnorm_eq_ofReal toReal_nonneg]
calc
∫⁻ b, ENNReal.ofReal (η (a, b) (Prod.mk b ⁻¹' s)).toReal ∂κ a
_ ≤ ∫⁻ b, η (a, b) (Prod.mk b ⁻¹' t) ∂κ a := by
refine lintegral_mono_ae ?_
filter_upwards [ae_kernel_lt_top a h2s] with b hb
... | [
" HasFiniteIntegral (fun b => ((η (a, b)) (Prod.mk b ⁻¹' s)).toReal) (κ a)",
" ∫⁻ (a_1 : β), ENNReal.ofReal ((η (a, a_1)) (Prod.mk a_1 ⁻¹' s)).toReal ∂κ a < ⊤",
" ∫⁻ (b : β), ENNReal.ofReal ((η (a, b)) (Prod.mk b ⁻¹' s)).toReal ∂κ a ≤ ∫⁻ (b : β), (η (a, b)) (Prod.mk b ⁻¹' t) ∂κ a",
" ∀ᵐ (a_1 : β) ∂κ a, ENNRea... | [] |
import Mathlib.Analysis.SpecialFunctions.Complex.Arg
import Mathlib.Analysis.SpecialFunctions.Log.Basic
#align_import analysis.special_functions.complex.log from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982"
noncomputable section
namespace Complex
open Set Filter Bornology
open scop... | Mathlib/Analysis/SpecialFunctions/Complex/Log.lean | 83 | 83 | theorem log_ofReal_re (x : ℝ) : (log (x : ℂ)).re = Real.log x := by | simp [log_re]
| [
" x.log.re = (abs x).log",
" x.log.im = x.arg",
" -π < x.log.im",
" x.log.im ≤ π",
" cexp x.log = x",
" x ∈ Set.range cexp → x ∈ {0}ᶜ",
" cexp x ∈ {0}ᶜ",
" (cexp x).log = x",
" x = y",
" (↑x.log).re = (↑x).log.re",
" (↑x.log).im = (↑x).log.im",
" (↑x).log.re = x.log"
] | [
" x.log.re = (abs x).log",
" x.log.im = x.arg",
" -π < x.log.im",
" x.log.im ≤ π",
" cexp x.log = x",
" x ∈ Set.range cexp → x ∈ {0}ᶜ",
" cexp x ∈ {0}ᶜ",
" (cexp x).log = x",
" x = y",
" (↑x.log).re = (↑x).log.re",
" (↑x.log).im = (↑x).log.im"
] |
import Mathlib.Analysis.Normed.Group.SemiNormedGroupCat
import Mathlib.Analysis.Normed.Group.Quotient
import Mathlib.CategoryTheory.Limits.Shapes.Kernels
#align_import analysis.normed.group.SemiNormedGroup.kernels from "leanprover-community/mathlib"@"17ef379e997badd73e5eabb4d38f11919ab3c4b3"
open CategoryTheory C... | Mathlib/Analysis/Normed/Group/SemiNormedGroupCat/Kernels.lean | 242 | 245 | theorem comp_explicitCokernelπ {X Y : SemiNormedGroupCat.{u}} (f : X ⟶ Y) :
f ≫ explicitCokernelπ f = 0 := by |
convert (cokernelCocone f).w WalkingParallelPairHom.left
simp
| [
" f ≫ (NormedAddGroupHom.range f).normedMk = 0 ≫ (NormedAddGroupHom.range f).normedMk",
" (f ≫ (NormedAddGroupHom.range f).normedMk) a = (0 ≫ (NormedAddGroupHom.range f).normedMk) a",
" (f ≫ (NormedAddGroupHom.range f).normedMk) a = 0 a",
" (NormedAddGroupHom.range f).normedMk (f a) = 0",
" ∃ w, f w = f a",... | [
" f ≫ (NormedAddGroupHom.range f).normedMk = 0 ≫ (NormedAddGroupHom.range f).normedMk",
" (f ≫ (NormedAddGroupHom.range f).normedMk) a = (0 ≫ (NormedAddGroupHom.range f).normedMk) a",
" (f ≫ (NormedAddGroupHom.range f).normedMk) a = 0 a",
" (NormedAddGroupHom.range f).normedMk (f a) = 0",
" ∃ w, f w = f a",... |
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 | 131 | 133 | theorem comp_left_bot (r : Rel α β) : (⊥ : Rel γ α) • r = ⊥ := by |
ext x y
simp [comp, Bot.bot]
| [
" r.inv.inv = r",
" r.inv.inv x y ↔ r x y",
" r.inv.codom = r.dom",
" x ∈ r.inv.codom ↔ x ∈ r.dom",
" r.inv.dom = r.codom",
" x ∈ r.inv.dom ↔ x ∈ r.codom",
" (r • s) • t = r • s • t",
" (fun x z => ∃ y, (∃ y_1, r x y_1 ∧ s y_1 y) ∧ t y z) = fun x z => ∃ y, r x y ∧ ∃ y_1, s y y_1 ∧ t y_1 z",
" (∃ y, ... | [
" r.inv.inv = r",
" r.inv.inv x y ↔ r x y",
" r.inv.codom = r.dom",
" x ∈ r.inv.codom ↔ x ∈ r.dom",
" r.inv.dom = r.codom",
" x ∈ r.inv.dom ↔ x ∈ r.codom",
" (r • s) • t = r • s • t",
" (fun x z => ∃ y, (∃ y_1, r x y_1 ∧ s y_1 y) ∧ t y z) = fun x z => ∃ y, r x y ∧ ∃ y_1, s y y_1 ∧ t y_1 z",
" (∃ y, ... |
import Mathlib.Algebra.BigOperators.Fin
import Mathlib.Algebra.GeomSum
import Mathlib.LinearAlgebra.Matrix.Block
import Mathlib.LinearAlgebra.Matrix.Determinant.Basic
import Mathlib.LinearAlgebra.Matrix.Nondegenerate
#align_import linear_algebra.vandermonde from "leanprover-community/mathlib"@"70fd9563a21e7b963887c93... | Mathlib/LinearAlgebra/Vandermonde.lean | 67 | 69 | theorem vandermonde_mul_vandermonde_transpose {n : ℕ} (v w : Fin n → R) (i j) :
(vandermonde v * (vandermonde w)ᵀ) i j = ∑ k : Fin n, (v i * w j) ^ (k : ℕ) := by |
simp only [vandermonde_apply, Matrix.mul_apply, Matrix.transpose_apply, mul_pow]
| [
" vandermonde (Fin.cons v0 v) = Fin.cons (fun j => v0 ^ ↑j) fun i => Fin.cons 1 fun j => v i * vandermonde v i j",
" vandermonde (Fin.cons v0 v) i j =\n Fin.cons (fun j => v0 ^ ↑j) (fun i => Fin.cons 1 fun j => v i * vandermonde v i j) i j",
" vandermonde (Fin.cons v0 v) 0 j =\n Fin.cons (fun j => v0 ^ ↑j... | [
" vandermonde (Fin.cons v0 v) = Fin.cons (fun j => v0 ^ ↑j) fun i => Fin.cons 1 fun j => v i * vandermonde v i j",
" vandermonde (Fin.cons v0 v) i j =\n Fin.cons (fun j => v0 ^ ↑j) (fun i => Fin.cons 1 fun j => v i * vandermonde v i j) i j",
" vandermonde (Fin.cons v0 v) 0 j =\n Fin.cons (fun j => v0 ^ ↑j... |
import Mathlib.Algebra.GroupWithZero.Divisibility
import Mathlib.Algebra.Order.Group.Int
import Mathlib.Algebra.Order.Ring.Nat
import Mathlib.Algebra.Ring.Rat
import Mathlib.Data.PNat.Defs
#align_import data.rat.lemmas from "leanprover-community/mathlib"@"550b58538991c8977703fdeb7c9d51a5aa27df11"
namespace Rat
o... | Mathlib/Data/Rat/Lemmas.lean | 62 | 68 | theorem num_mk (n d : ℤ) : (n /. d).num = d.sign * n / n.gcd d := by |
have (m : ℕ) : Int.natAbs (m + 1) = m + 1 := by
rw [← Nat.cast_one, ← Nat.cast_add, Int.natAbs_cast]
rcases d with ((_ | _) | _) <;>
rw [← Int.div_eq_ediv_of_dvd] <;>
simp [divInt, mkRat, Rat.normalize, Nat.succPNat, Int.sign, Int.gcd,
Int.zero_ediv, Int.ofNat_dvd_left, Nat.gcd_dvd_left, this]
| [
" (a /. b).num ∣ a",
" { num := n, den := d, den_nz := h, reduced := c }.num ∣ a",
" n.natAbs ∣ a.natAbs * d",
" ↑(a /. b).den ∣ b",
" ↑{ num := n, den := d, den_nz := h, reduced := c }.den ∣ b",
" d ∣ n.natAbs * b.natAbs",
" ↑d ∣ a * ↑d",
" ∃ c, n = c * q.num ∧ d = c * ↑q.den",
" ∃ c, 0 = c * q.num... | [
" (a /. b).num ∣ a",
" { num := n, den := d, den_nz := h, reduced := c }.num ∣ a",
" n.natAbs ∣ a.natAbs * d",
" ↑(a /. b).den ∣ b",
" ↑{ num := n, den := d, den_nz := h, reduced := c }.den ∣ b",
" d ∣ n.natAbs * b.natAbs",
" ↑d ∣ a * ↑d",
" ∃ c, n = c * q.num ∧ d = c * ↑q.den",
" ∃ c, 0 = c * q.num... |
import Mathlib.LinearAlgebra.Contraction
import Mathlib.LinearAlgebra.Matrix.Charpoly.Coeff
#align_import linear_algebra.trace from "leanprover-community/mathlib"@"4cf7ca0e69e048b006674cf4499e5c7d296a89e0"
noncomputable section
universe u v w
namespace LinearMap
open Matrix
open FiniteDimensional
open Tensor... | Mathlib/LinearAlgebra/Trace.lean | 84 | 89 | theorem trace_eq_matrix_trace_of_finset {s : Finset M} (b : Basis s R M) (f : M →ₗ[R] M) :
trace R M f = Matrix.trace (LinearMap.toMatrix b b f) := by |
have : ∃ s : Finset M, Nonempty (Basis s R M) := ⟨s, ⟨b⟩⟩
rw [trace, dif_pos this, ← traceAux_def]
congr 1
apply traceAux_eq
| [
" ((toMatrix b b) f).trace = ((toMatrix b b) ((id ∘ₗ f) ∘ₗ id)).trace",
" ((toMatrix b b) ((id ∘ₗ f) ∘ₗ id)).trace = ((toMatrix c b) id * (toMatrix c c) f * (toMatrix b c) id).trace",
" ((toMatrix c b) id * (toMatrix c c) f * (toMatrix b c) id).trace =\n ((toMatrix c c) f * (toMatrix b c) id * (toMatrix c b)... | [
" ((toMatrix b b) f).trace = ((toMatrix b b) ((id ∘ₗ f) ∘ₗ id)).trace",
" ((toMatrix b b) ((id ∘ₗ f) ∘ₗ id)).trace = ((toMatrix c b) id * (toMatrix c c) f * (toMatrix b c) id).trace",
" ((toMatrix c b) id * (toMatrix c c) f * (toMatrix b c) id).trace =\n ((toMatrix c c) f * (toMatrix b c) id * (toMatrix c b)... |
import Mathlib.Algebra.Group.Center
import Mathlib.Data.Int.Cast.Lemmas
#align_import group_theory.subsemigroup.center from "leanprover-community/mathlib"@"1ac8d4304efba9d03fa720d06516fac845aa5353"
variable {M : Type*}
namespace Set
variable (M)
@[simp]
theorem natCast_mem_center [NonAssocSemiring M] (n : ℕ) :... | Mathlib/Algebra/Ring/Center.lean | 72 | 77 | theorem add_mem_center [Distrib M] {a b : M} (ha : a ∈ Set.center M) (hb : b ∈ Set.center M) :
a + b ∈ Set.center M where
comm _ := by | rw [add_mul, mul_add, ha.comm, hb.comm]
left_assoc _ _ := by rw [add_mul, ha.left_assoc, hb.left_assoc, ← add_mul, ← add_mul]
mid_assoc _ _ := by rw [mul_add, add_mul, ha.mid_assoc, hb.mid_assoc, ← mul_add, ← add_mul]
right_assoc _ _ := by rw [mul_add, ha.right_assoc, hb.right_assoc, ← mul_add, ← mul_add]
| [
" ↑n * x✝ = x✝ * ↑n",
" ↑n * (x✝¹ * x✝) = ↑n * x✝¹ * x✝",
" ↑0 * (x✝¹ * x✝) = ↑0 * x✝¹ * x✝",
" ↑(n + 1) * (x✝¹ * x✝) = ↑(n + 1) * x✝¹ * x✝",
" x✝¹ * ↑n * x✝ = x✝¹ * (↑n * x✝)",
" x✝¹ * ↑0 * x✝ = x✝¹ * (↑0 * x✝)",
" x✝¹ * ↑(n + 1) * x✝ = x✝¹ * (↑(n + 1) * x✝)",
" x✝¹ * x✝ * ↑n = x✝¹ * (x✝ * ↑n)",
" ... | [
" ↑n * x✝ = x✝ * ↑n",
" ↑n * (x✝¹ * x✝) = ↑n * x✝¹ * x✝",
" ↑0 * (x✝¹ * x✝) = ↑0 * x✝¹ * x✝",
" ↑(n + 1) * (x✝¹ * x✝) = ↑(n + 1) * x✝¹ * x✝",
" x✝¹ * ↑n * x✝ = x✝¹ * (↑n * x✝)",
" x✝¹ * ↑0 * x✝ = x✝¹ * (↑0 * x✝)",
" x✝¹ * ↑(n + 1) * x✝ = x✝¹ * (↑(n + 1) * x✝)",
" x✝¹ * x✝ * ↑n = x✝¹ * (x✝ * ↑n)",
" ... |
import Mathlib.Data.Nat.Factorial.Basic
import Mathlib.Order.Monotone.Basic
#align_import data.nat.choose.basic from "leanprover-community/mathlib"@"2f3994e1b117b1e1da49bcfb67334f33460c3ce4"
open Nat
namespace Nat
def choose : ℕ → ℕ → ℕ
| _, 0 => 1
| 0, _ + 1 => 0
| n + 1, k + 1 => choose n k + choose n ... | Mathlib/Data/Nat/Choose/Basic.lean | 54 | 54 | theorem choose_zero_right (n : ℕ) : choose n 0 = 1 := by | cases n <;> rfl
| [
" n.choose 0 = 1",
" choose 0 0 = 1",
" (n✝ + 1).choose 0 = 1"
] | [] |
import Mathlib.Topology.Algebra.GroupWithZero
import Mathlib.Topology.Order.OrderClosed
#align_import topology.algebra.with_zero_topology from "leanprover-community/mathlib"@"3e0c4d76b6ebe9dfafb67d16f7286d2731ed6064"
open Topology Filter TopologicalSpace Filter Set Function
namespace WithZeroTopology
variable {α... | Mathlib/Topology/Algebra/WithZeroTopology.lean | 56 | 57 | theorem nhds_zero : 𝓝 (0 : Γ₀) = ⨅ γ ≠ 0, 𝓟 (Iio γ) := by |
rw [nhds_eq_update, update_same]
| [
" 𝓝 = update pure 0 (⨅ γ, ⨅ (_ : γ ≠ 0), 𝓟 (Iio γ))",
" pure 0 ≤ ⨅ γ, ⨅ (_ : γ ≠ 0), 𝓟 (Iio γ)",
" 𝓝 0 = ⨅ γ, ⨅ (_ : γ ≠ 0), 𝓟 (Iio γ)"
] | [
" 𝓝 = update pure 0 (⨅ γ, ⨅ (_ : γ ≠ 0), 𝓟 (Iio γ))",
" pure 0 ≤ ⨅ γ, ⨅ (_ : γ ≠ 0), 𝓟 (Iio γ)"
] |
import Mathlib.Algebra.BigOperators.Fin
import Mathlib.Algebra.Order.BigOperators.Group.Finset
import Mathlib.Data.Finset.Sort
import Mathlib.Data.Set.Subsingleton
#align_import combinatorics.composition from "leanprover-community/mathlib"@"92ca63f0fb391a9ca5f22d2409a6080e786d99f7"
open List
variable {n : ℕ}
... | Mathlib/Combinatorics/Enumerative/Composition.lean | 187 | 189 | theorem length_le : c.length ≤ n := by |
conv_rhs => rw [← c.blocks_sum]
exact length_le_sum_of_one_le _ fun i hi => c.one_le_blocks hi
| [
" ∑ i : Fin c.length, c.blocksFun i = n",
"n : ℕ c : Composition n | n",
" c.length ≤ n",
" c.length ≤ c.blocks.sum"
] | [
" ∑ i : Fin c.length, c.blocksFun i = n",
"n : ℕ c : Composition n | n"
] |
import Mathlib.Analysis.SpecialFunctions.Bernstein
import Mathlib.Topology.Algebra.Algebra
#align_import topology.continuous_function.weierstrass from "leanprover-community/mathlib"@"17ef379e997badd73e5eabb4d38f11919ab3c4b3"
open ContinuousMap Filter
open scoped unitInterval
theorem polynomialFunctions_closure... | Mathlib/Topology/ContinuousFunction/Weierstrass.lean | 114 | 122 | theorem exists_polynomial_near_of_continuousOn (a b : ℝ) (f : ℝ → ℝ)
(c : ContinuousOn f (Set.Icc a b)) (ε : ℝ) (pos : 0 < ε) :
∃ p : ℝ[X], ∀ x ∈ Set.Icc a b, |p.eval x - f x| < ε := by |
let f' : C(Set.Icc a b, ℝ) := ⟨fun x => f x, continuousOn_iff_continuous_restrict.mp c⟩
obtain ⟨p, b⟩ := exists_polynomial_near_continuousMap a b f' ε pos
use p
rw [norm_lt_iff _ pos] at b
intro x m
exact b ⟨x, m⟩
| [
" (polynomialFunctions I).topologicalClosure = ⊤",
" ⊤ ≤ (polynomialFunctions I).topologicalClosure",
" f ∈ (polynomialFunctions I).topologicalClosure",
" ∃ᶠ (x : C(↑I, ℝ)) in nhds f, x ∈ ↑(polynomialFunctions I)",
" ∃ᶠ (x : ℕ) in atTop, bernsteinApproximation x f ∈ ↑(polynomialFunctions I)",
" ∀ (x : ℕ),... | [
" (polynomialFunctions I).topologicalClosure = ⊤",
" ⊤ ≤ (polynomialFunctions I).topologicalClosure",
" f ∈ (polynomialFunctions I).topologicalClosure",
" ∃ᶠ (x : C(↑I, ℝ)) in nhds f, x ∈ ↑(polynomialFunctions I)",
" ∃ᶠ (x : ℕ) in atTop, bernsteinApproximation x f ∈ ↑(polynomialFunctions I)",
" ∀ (x : ℕ),... |
import Mathlib.Geometry.Manifold.ContMDiff.Atlas
import Mathlib.Geometry.Manifold.VectorBundle.FiberwiseLinear
import Mathlib.Topology.VectorBundle.Constructions
#align_import geometry.manifold.vector_bundle.basic from "leanprover-community/mathlib"@"e473c3198bb41f68560cab68a0529c854b618833"
assert_not_exists mfde... | Mathlib/Geometry/Manifold/VectorBundle/Basic.lean | 178 | 196 | theorem contMDiffWithinAt_totalSpace (f : M → TotalSpace F E) {s : Set M} {x₀ : M} :
ContMDiffWithinAt IM (IB.prod 𝓘(𝕜, F)) n f s x₀ ↔
ContMDiffWithinAt IM IB n (fun x => (f x).proj) s x₀ ∧
ContMDiffWithinAt IM 𝓘(𝕜, F) n (fun x ↦ (trivializationAt F E (f x₀).proj (f x)).2) s x₀ := by |
simp (config := { singlePass := true }) only [contMDiffWithinAt_iff_target]
rw [and_and_and_comm, ← FiberBundle.continuousWithinAt_totalSpace, and_congr_right_iff]
intro hf
simp_rw [modelWithCornersSelf_prod, FiberBundle.extChartAt, Function.comp,
PartialEquiv.trans_apply, PartialEquiv.prod_coe, PartialEqu... | [
" chartAt (ModelProd HB F) x =\n (trivializationAt F E x.proj).toPartialHomeomorph ≫ₕ (chartAt HB x.proj).prod (PartialHomeomorph.refl F)",
" (trivializationAt F E x.proj).toPartialHomeomorph ≫ₕ\n (chartAt HB (↑(trivializationAt F E x.proj).toPartialHomeomorph x).1).prod (PartialHomeomorph.refl F) =\n ... | [
" chartAt (ModelProd HB F) x =\n (trivializationAt F E x.proj).toPartialHomeomorph ≫ₕ (chartAt HB x.proj).prod (PartialHomeomorph.refl F)",
" (trivializationAt F E x.proj).toPartialHomeomorph ≫ₕ\n (chartAt HB (↑(trivializationAt F E x.proj).toPartialHomeomorph x).1).prod (PartialHomeomorph.refl F) =\n ... |
import Mathlib.MeasureTheory.Group.Action
import Mathlib.MeasureTheory.Integral.SetIntegral
import Mathlib.MeasureTheory.Group.Pointwise
#align_import measure_theory.group.fundamental_domain from "leanprover-community/mathlib"@"3b52265189f3fb43aa631edffce5d060fafaf82f"
open scoped ENNReal Pointwise Topology NNRea... | Mathlib/MeasureTheory/Group/FundamentalDomain.lean | 595 | 597 | theorem mem_fundamentalInterior :
x ∈ fundamentalInterior G s ↔ x ∈ s ∧ ∀ g : G, g ≠ 1 → x ∉ g • s := by |
simp [fundamentalInterior]
| [
" x ∈ fundamentalFrontier G s ↔ x ∈ s ∧ ∃ g, g ≠ 1 ∧ x ∈ g • s",
" x ∈ fundamentalInterior G s ↔ x ∈ s ∧ ∀ (g : G), g ≠ 1 → x ∉ g • s"
] | [
" x ∈ fundamentalFrontier G s ↔ x ∈ s ∧ ∃ g, g ≠ 1 ∧ x ∈ g • s"
] |
import Mathlib.Algebra.CharP.Invertible
import Mathlib.Algebra.Order.Interval.Set.Group
import Mathlib.Analysis.Convex.Segment
import Mathlib.LinearAlgebra.AffineSpace.FiniteDimensional
import Mathlib.Tactic.FieldSimp
#align_import analysis.convex.between from "leanprover-community/mathlib"@"571e13cacbed7bf042fd3058c... | Mathlib/Analysis/Convex/Between.lean | 49 | 55 | theorem affineSegment_comm (x y : P) : affineSegment R x y = affineSegment R y x := by |
refine Set.ext fun z => ?_
constructor <;>
· rintro ⟨t, ht, hxy⟩
refine ⟨1 - t, ?_, ?_⟩
· rwa [Set.sub_mem_Icc_iff_right, sub_self, sub_zero]
· rwa [lineMap_apply_one_sub]
| [
" affineSegment R x y = segment R x y",
" affineSegment R x y = affineSegment R y x",
" z ∈ affineSegment R x y ↔ z ∈ affineSegment R y x",
" z ∈ affineSegment R x y → z ∈ affineSegment R y x",
" z ∈ affineSegment R y x",
" 1 - t ∈ Set.Icc 0 1",
" (lineMap y x) (1 - t) = z",
" z ∈ affineSegment R y x ... | [
" affineSegment R x y = segment R x y"
] |
import Mathlib.MeasureTheory.Constructions.Pi
import Mathlib.MeasureTheory.Constructions.Prod.Integral
open Fintype MeasureTheory MeasureTheory.Measure
variable {𝕜 : Type*} [RCLike 𝕜]
namespace MeasureTheory
theorem Integrable.fin_nat_prod {n : ℕ} {E : Fin n → Type*}
[∀ i, MeasureSpace (E i)] [∀ i, SigmaF... | Mathlib/MeasureTheory/Integral/Pi.lean | 65 | 84 | theorem integral_fin_nat_prod_eq_prod {n : ℕ} {E : Fin n → Type*}
[∀ i, MeasureSpace (E i)] [∀ i, SigmaFinite (volume : Measure (E i))]
(f : (i : Fin n) → E i → 𝕜) :
∫ x : (i : Fin n) → E i, ∏ i, f i (x i) = ∏ i, ∫ x, f i x := by |
induction n with
| zero =>
simp only [Nat.zero_eq, volume_pi, Finset.univ_eq_empty, Finset.prod_empty, integral_const,
pi_empty_univ, ENNReal.one_toReal, smul_eq_mul, mul_one, pow_zero, one_smul]
| succ n n_ih =>
calc
_ = ∫ x : E 0 × ((i : Fin n) → E (Fin.succ i)),
f 0 x.1... | [
" Integrable (fun x => ∏ i : Fin n, f i (x i)) volume",
" Integrable (fun x => ∏ i : Fin 0, f i (x i)) volume",
" Integrable (fun x => ∏ i : Fin (n + 1), f i (x i)) volume",
" Integrable ((fun x => ∏ i : Fin (n + 1), f i (x i)) ∘ ⇑(MeasurableEquiv.piFinSuccAbove (fun i => E i) 0).symm)\n (volume.prod (Meas... | [
" Integrable (fun x => ∏ i : Fin n, f i (x i)) volume",
" Integrable (fun x => ∏ i : Fin 0, f i (x i)) volume",
" Integrable (fun x => ∏ i : Fin (n + 1), f i (x i)) volume",
" Integrable ((fun x => ∏ i : Fin (n + 1), f i (x i)) ∘ ⇑(MeasurableEquiv.piFinSuccAbove (fun i => E i) 0).symm)\n (volume.prod (Meas... |
import Mathlib.MeasureTheory.Function.LpOrder
#align_import measure_theory.function.l1_space from "leanprover-community/mathlib"@"ccdbfb6e5614667af5aa3ab2d50885e0ef44a46f"
noncomputable section
open scoped Classical
open Topology ENNReal MeasureTheory NNReal
open Set Filter TopologicalSpace ENNReal EMetric Meas... | Mathlib/MeasureTheory/Function/L1Space.lean | 75 | 80 | theorem lintegral_edist_triangle {f g h : α → β} (hf : AEStronglyMeasurable f μ)
(hh : AEStronglyMeasurable h μ) :
(∫⁻ a, edist (f a) (g a) ∂μ) ≤ (∫⁻ a, edist (f a) (h a) ∂μ) + ∫⁻ a, edist (g a) (h a) ∂μ := by |
rw [← lintegral_add_left' (hf.edist hh)]
refine lintegral_mono fun a => ?_
apply edist_triangle_right
| [
" ∫⁻ (a : α), ↑‖f a‖₊ ∂μ = ∫⁻ (a : α), edist (f a) 0 ∂μ",
" ∫⁻ (a : α), ENNReal.ofReal ‖f a‖ ∂μ = ∫⁻ (a : α), edist (f a) 0 ∂μ",
" ∫⁻ (a : α), edist (f a) (g a) ∂μ ≤ ∫⁻ (a : α), edist (f a) (h a) ∂μ + ∫⁻ (a : α), edist (g a) (h a) ∂μ",
" ∫⁻ (a : α), edist (f a) (g a) ∂μ ≤ ∫⁻ (a : α), edist (f a) (h a) + edist... | [
" ∫⁻ (a : α), ↑‖f a‖₊ ∂μ = ∫⁻ (a : α), edist (f a) 0 ∂μ",
" ∫⁻ (a : α), ENNReal.ofReal ‖f a‖ ∂μ = ∫⁻ (a : α), edist (f a) 0 ∂μ"
] |
import Mathlib.Algebra.Order.Ring.Abs
import Mathlib.Algebra.Polynomial.Derivative
import Mathlib.Data.Nat.Factorial.DoubleFactorial
#align_import ring_theory.polynomial.hermite.basic from "leanprover-community/mathlib"@"938d3db9c278f8a52c0f964a405806f0f2b09b74"
noncomputable section
open Polynomial
namespace P... | Mathlib/RingTheory/Polynomial/Hermite/Basic.lean | 86 | 89 | theorem coeff_hermite_succ_succ (n k : ℕ) : coeff (hermite (n + 1)) (k + 1) =
coeff (hermite n) k - (k + 2) * coeff (hermite n) (k + 2) := by |
rw [hermite_succ, coeff_sub, coeff_X_mul, coeff_derivative, mul_comm]
norm_cast
| [
" hermite (n + 1) = X * hermite n - derivative (hermite n)",
" hermite n = (fun p => X * p - derivative p)^[n] 1",
" hermite 0 = (fun p => X * p - derivative p)^[0] 1",
" hermite (n + 1) = (fun p => X * p - derivative p)^[n + 1] 1",
" hermite 1 = X",
" X * C 1 - derivative (C 1) = X",
" (hermite (n + 1)... | [
" hermite (n + 1) = X * hermite n - derivative (hermite n)",
" hermite n = (fun p => X * p - derivative p)^[n] 1",
" hermite 0 = (fun p => X * p - derivative p)^[0] 1",
" hermite (n + 1) = (fun p => X * p - derivative p)^[n + 1] 1",
" hermite 1 = X",
" X * C 1 - derivative (C 1) = X",
" (hermite (n + 1)... |
import Mathlib.Algebra.Polynomial.Derivative
import Mathlib.Tactic.LinearCombination
#align_import ring_theory.polynomial.chebyshev from "leanprover-community/mathlib"@"d774451114d6045faeb6751c396bea1eb9058946"
namespace Polynomial.Chebyshev
set_option linter.uppercaseLean3 false -- `T` `U` `X`
open Polynomial
v... | Mathlib/RingTheory/Polynomial/Chebyshev.lean | 93 | 94 | theorem T_sub_two (n : ℤ) : T R (n - 2) = 2 * X * T R (n - 1) - T R n := by |
linear_combination (norm := ring_nf) T_add_two R (n - 2)
| [
" motive (Int.negSucc n)",
" T R (-↑(k + 1) + 2) = 2 * X * T R (-↑(k + 1) + 1) - T R (-↑(k + 1))",
" T R (-↑(k + 1) + 2) - (2 * X * T R (-↑(k + 1) + 1) - T R (-↑(k + 1))) -\n (T R (Int.negSucc k) - (2 * X * T R (-↑k) - T R (-↑k + 1))) =\n 0",
" T R (-1 + -↑k + 2) - (2 * X * T R (-↑k) - T R (-1 + -↑k))... | [
" motive (Int.negSucc n)",
" T R (-↑(k + 1) + 2) = 2 * X * T R (-↑(k + 1) + 1) - T R (-↑(k + 1))",
" T R (-↑(k + 1) + 2) - (2 * X * T R (-↑(k + 1) + 1) - T R (-↑(k + 1))) -\n (T R (Int.negSucc k) - (2 * X * T R (-↑k) - T R (-↑k + 1))) =\n 0",
" T R (-1 + -↑k + 2) - (2 * X * T R (-↑k) - T R (-1 + -↑k))... |
import Mathlib.Analysis.Calculus.FDeriv.Measurable
import Mathlib.Analysis.Calculus.Deriv.Comp
import Mathlib.Analysis.Calculus.Deriv.Add
import Mathlib.Analysis.Calculus.Deriv.Slope
import Mathlib.Analysis.Calculus.Deriv.Mul
import Mathlib.Analysis.NormedSpace.Dual
import Mathlib.MeasureTheory.Integral.DominatedConve... | Mathlib/MeasureTheory/Integral/FundThmCalculus.lean | 1,024 | 1,114 | theorem sub_le_integral_of_hasDeriv_right_of_le_Ico (hab : a ≤ b)
(hcont : ContinuousOn g (Icc a b)) (hderiv : ∀ x ∈ Ico a b, HasDerivWithinAt g (g' x) (Ioi x) x)
(φint : IntegrableOn φ (Icc a b)) (hφg : ∀ x ∈ Ico a b, g' x ≤ φ x) :
g b - g a ≤ ∫ y in a..b, φ y := by |
refine le_of_forall_pos_le_add fun ε εpos => ?_
-- Bound from above `g'` by a lower-semicontinuous function `G'`.
rcases exists_lt_lowerSemicontinuous_integral_lt φ φint εpos with
⟨G', f_lt_G', G'cont, G'int, G'lt_top, hG'⟩
-- we will show by "induction" that `g t - g a ≤ ∫ u in a..t, G' u` for all `t ∈ [a... | [
" g b - g a ≤ ∫ (y : ℝ) in a..b, φ y",
" g b - g a ≤ (∫ (y : ℝ) in a..b, φ y) + ε",
" IsClosed s",
" ContinuousOn (fun t => (g t - g a, ∫ (u : ℝ) in a..t, (G' u).toReal)) (Icc a b)",
" ContinuousOn (fun t => (g t - g a, ∫ (u : ℝ) in a..t, (G' u).toReal)) [[a, b]]",
" IsClosed (Icc a b ∩ {t | g t - g a ≤ ∫... | [] |
import Mathlib.Analysis.MeanInequalities
import Mathlib.Analysis.MeanInequalitiesPow
import Mathlib.Analysis.SpecialFunctions.Pow.Continuity
import Mathlib.Data.Set.Image
import Mathlib.Topology.Algebra.Order.LiminfLimsup
#align_import analysis.normed_space.lp_space from "leanprover-community/mathlib"@"de83b43717abe3... | Mathlib/Analysis/NormedSpace/lpSpace.lean | 130 | 138 | theorem zero_memℓp : Memℓp (0 : ∀ i, E i) p := by |
rcases p.trichotomy with (rfl | rfl | hp)
· apply memℓp_zero
simp
· apply memℓp_infty
simp only [norm_zero, Pi.zero_apply]
exact bddAbove_singleton.mono Set.range_const_subset
· apply memℓp_gen
simp [Real.zero_rpow hp.ne', summable_zero]
| [
" Memℓp f 0 ↔ {i | f i ≠ 0}.Finite",
" (if 0 = 0 then {i | ¬f i = 0}.Finite\n else if 0 = ⊤ then BddAbove (Set.range fun i => ‖f i‖) else Summable fun i => ‖f i‖ ^ 0) ↔\n {i | ¬f i = 0}.Finite",
" Memℓp f ⊤ ↔ BddAbove (Set.range fun i => ‖f i‖)",
" (if ⊤ = 0 then {i | ¬f i = 0}.Finite\n else if ⊤ = ⊤... | [
" Memℓp f 0 ↔ {i | f i ≠ 0}.Finite",
" (if 0 = 0 then {i | ¬f i = 0}.Finite\n else if 0 = ⊤ then BddAbove (Set.range fun i => ‖f i‖) else Summable fun i => ‖f i‖ ^ 0) ↔\n {i | ¬f i = 0}.Finite",
" Memℓp f ⊤ ↔ BddAbove (Set.range fun i => ‖f i‖)",
" (if ⊤ = 0 then {i | ¬f i = 0}.Finite\n else if ⊤ = ⊤... |
import Mathlib.Algebra.Group.Equiv.TypeTags
import Mathlib.Algebra.Module.Defs
import Mathlib.Algebra.Module.LinearMap.Basic
import Mathlib.Algebra.MonoidAlgebra.Basic
import Mathlib.LinearAlgebra.Dual
import Mathlib.LinearAlgebra.Contraction
import Mathlib.RingTheory.TensorProduct.Basic
#align_import representation_... | Mathlib/RepresentationTheory/Basic.lean | 106 | 107 | theorem asAlgebraHom_single (g : G) (r : k) : asAlgebraHom ρ (Finsupp.single g r) = r • ρ g := by |
simp only [asAlgebraHom_def, MonoidAlgebra.lift_single]
| [
" ρ.asAlgebraHom (Finsupp.single g r) = r • ρ g"
] | [] |
import Mathlib.NumberTheory.NumberField.Basic
import Mathlib.RingTheory.Localization.NormTrace
#align_import number_theory.number_field.norm from "leanprover-community/mathlib"@"00f91228655eecdcd3ac97a7fd8dbcb139fe990a"
open scoped NumberField
open Finset NumberField Algebra FiniteDimensional
namespace RingOfIn... | Mathlib/NumberTheory/NumberField/Norm.lean | 65 | 69 | theorem norm_algebraMap [IsSeparable K L] (x : 𝓞 K) :
norm K (algebraMap (𝓞 K) (𝓞 L) x) = x ^ finrank K L := by |
rw [RingOfIntegers.ext_iff, RingOfIntegers.coe_eq_algebraMap,
RingOfIntegers.algebraMap_norm_algebraMap, Algebra.norm_algebraMap,
RingOfIntegers.coe_eq_algebraMap, map_pow]
| [
" (norm K) ((algebraMap (𝓞 K) (𝓞 L)) x) = x ^ finrank K L"
] | [] |
import Mathlib.Topology.Bases
import Mathlib.Order.Filter.CountableInter
import Mathlib.Topology.Compactness.SigmaCompact
open Set Filter Topology TopologicalSpace
universe u v
variable {X : Type u} {Y : Type v} {ι : Type*}
variable [TopologicalSpace X] [TopologicalSpace Y] {s t : Set X}
section Lindelof
def I... | Mathlib/Topology/Compactness/Lindelof.lean | 78 | 83 | theorem IsLindelof.inter_right (hs : IsLindelof s) (ht : IsClosed t) : IsLindelof (s ∩ t) := by |
intro f hnf _ hstf
rw [← inf_principal, le_inf_iff] at hstf
obtain ⟨x, hsx, hx⟩ : ∃ x ∈ s, ClusterPt x f := hs hstf.1
have hxt : x ∈ t := ht.mem_of_nhdsWithin_neBot <| hx.mono hstf.2
exact ⟨x, ⟨hsx, hxt⟩, hx⟩
| [
" sᶜ ∈ f",
" ∃ x ∈ s, sᶜ ∉ 𝓝 x ⊓ f",
" ∃ x ∈ s, (𝓝 x ⊓ (f ⊓ 𝓟 s)).NeBot",
" sᶜ ∈ 𝓝 x ⊓ f",
" ∃ i ∈ 𝓝 x ⊓ 𝓟 s, (id i)ᶜ ∈ f",
" p s",
" ∀ x ∈ s, ∃ t ∈ 𝓝[s] x, tᶜ ∈ f",
" IsLindelof (s ∩ t)",
" ∃ x ∈ s ∩ t, ClusterPt x f"
] | [
" sᶜ ∈ f",
" ∃ x ∈ s, sᶜ ∉ 𝓝 x ⊓ f",
" ∃ x ∈ s, (𝓝 x ⊓ (f ⊓ 𝓟 s)).NeBot",
" sᶜ ∈ 𝓝 x ⊓ f",
" ∃ i ∈ 𝓝 x ⊓ 𝓟 s, (id i)ᶜ ∈ f",
" p s",
" ∀ x ∈ s, ∃ t ∈ 𝓝[s] x, tᶜ ∈ f"
] |
import Mathlib.Analysis.InnerProductSpace.Dual
import Mathlib.Analysis.Calculus.FDeriv.Basic
import Mathlib.Analysis.Calculus.Deriv.Basic
open Topology InnerProductSpace Set
noncomputable section
variable {𝕜 F : Type*} [RCLike 𝕜]
variable [NormedAddCommGroup F] [InnerProductSpace 𝕜 F] [CompleteSpace F]
variabl... | Mathlib/Analysis/Calculus/Gradient/Basic.lean | 118 | 121 | theorem DifferentiableAt.hasGradientAt (h : DifferentiableAt 𝕜 f x) :
HasGradientAt f (∇ f x) x := by |
rw [hasGradientAt_iff_hasFDerivAt, gradient, (toDual 𝕜 F).apply_symm_apply (fderiv 𝕜 f x)]
exact h.hasFDerivAt
| [
" HasFDerivWithinAt f frechet s x ↔ HasGradientWithinAt f ((toDual 𝕜 F).symm frechet) s x",
" HasFDerivAt f frechet x ↔ HasGradientAt f ((toDual 𝕜 F).symm frechet) x",
" ∇ f x = 0",
" HasGradientAt f (∇ f x) x",
" HasFDerivAt f (fderiv 𝕜 f x) x"
] | [
" HasFDerivWithinAt f frechet s x ↔ HasGradientWithinAt f ((toDual 𝕜 F).symm frechet) s x",
" HasFDerivAt f frechet x ↔ HasGradientAt f ((toDual 𝕜 F).symm frechet) x",
" ∇ f x = 0"
] |
import Mathlib.Algebra.BigOperators.Ring
import Mathlib.Data.Fintype.Basic
import Mathlib.Data.Int.GCD
import Mathlib.RingTheory.Coprime.Basic
#align_import ring_theory.coprime.lemmas from "leanprover-community/mathlib"@"509de852e1de55e1efa8eacfa11df0823f26f226"
universe u v
section RelPrime
variable {α I} [Comm... | Mathlib/RingTheory/Coprime/Lemmas.lean | 281 | 289 | theorem pairwise_isRelPrime_iff_isRelPrime_prod [DecidableEq I] :
Pairwise (IsRelPrime on fun i : t ↦ s i) ↔ ∀ i ∈ t, IsRelPrime (s i) (∏ j ∈ t \ {i}, s j) := by |
refine ⟨fun hp i hi ↦ IsRelPrime.prod_right_iff.mpr fun j hj ↦ ?_, fun hp ↦ ?_⟩
· rw [Finset.mem_sdiff, Finset.mem_singleton] at hj
obtain ⟨hj, ji⟩ := hj
exact @hp ⟨i, hi⟩ ⟨j, hj⟩ fun h ↦ ji (congrArg Subtype.val h).symm
· rintro ⟨i, hi⟩ ⟨j, hj⟩ h
apply IsRelPrime.prod_right_iff.mp (hp i hi)
exac... | [
" (∀ i ∈ t, IsRelPrime (s i) x) → IsRelPrime (∏ i ∈ t, s i) x",
" IsRelPrime (∏ i ∈ insert b t, s i) x",
" IsRelPrime (s b * ∏ x ∈ t, s x) x",
" (∀ i ∈ t, IsRelPrime x (s i)) → IsRelPrime x (∏ i ∈ t, s i)",
" IsRelPrime (∏ i ∈ t, s i) x ↔ ∀ i ∈ t, IsRelPrime (s i) x",
" x✝ ∈ ∅ → IsRelPrime (s x✝) x",
" ... | [
" (∀ i ∈ t, IsRelPrime (s i) x) → IsRelPrime (∏ i ∈ t, s i) x",
" IsRelPrime (∏ i ∈ insert b t, s i) x",
" IsRelPrime (s b * ∏ x ∈ t, s x) x",
" (∀ i ∈ t, IsRelPrime x (s i)) → IsRelPrime x (∏ i ∈ t, s i)",
" IsRelPrime (∏ i ∈ t, s i) x ↔ ∀ i ∈ t, IsRelPrime (s i) x",
" x✝ ∈ ∅ → IsRelPrime (s x✝) x",
" ... |
import Mathlib.Algebra.BigOperators.NatAntidiagonal
import Mathlib.Algebra.Polynomial.RingDivision
#align_import data.polynomial.mirror from "leanprover-community/mathlib"@"2196ab363eb097c008d4497125e0dde23fb36db2"
namespace Polynomial
open Polynomial
section Semiring
variable {R : Type*} [Semiring R] (p q : R... | Mathlib/Algebra/Polynomial/Mirror.lean | 66 | 72 | theorem mirror_natDegree : p.mirror.natDegree = p.natDegree := by |
by_cases hp : p = 0
· rw [hp, mirror_zero]
nontriviality R
rw [mirror, natDegree_mul', reverse_natDegree, natDegree_X_pow,
tsub_add_cancel_of_le p.natTrailingDegree_le_natDegree]
rwa [leadingCoeff_X_pow, mul_one, reverse_leadingCoeff, Ne, trailingCoeff_eq_zero]
| [
" mirror 0 = 0",
" ((monomial n) a).mirror = (monomial n) a",
" p.mirror.natDegree = p.natDegree",
" p.reverse.leadingCoeff * (X ^ p.natTrailingDegree).leadingCoeff ≠ 0"
] | [
" mirror 0 = 0",
" ((monomial n) a).mirror = (monomial n) a"
] |
import Mathlib.Data.Stream.Init
import Mathlib.Tactic.ApplyFun
import Mathlib.Control.Fix
import Mathlib.Order.OmegaCompletePartialOrder
#align_import control.lawful_fix from "leanprover-community/mathlib"@"92ca63f0fb391a9ca5f22d2409a6080e786d99f7"
universe u v
open scoped Classical
variable {α : Type*} {β : α →... | Mathlib/Control/LawfulFix.lean | 71 | 91 | theorem mem_iff (a : α) (b : β a) : b ∈ Part.fix f a ↔ ∃ i, b ∈ approx f i a := by |
by_cases h₀ : ∃ i : ℕ, (approx f i a).Dom
· simp only [Part.fix_def f h₀]
constructor <;> intro hh
· exact ⟨_, hh⟩
have h₁ := Nat.find_spec h₀
rw [dom_iff_mem] at h₁
cases' h₁ with y h₁
replace h₁ := approx_mono' f _ _ h₁
suffices y = b by
subst this
exact h₁
cases' hh w... | [
" approx (⇑f) i ≤ approx (⇑f) i.succ",
" approx (⇑f) 0 ≤ approx (⇑f) (Nat.succ 0)",
" ⊥ ≤ f ⊥",
" approx (⇑f) (n✝ + 1) ≤ approx (⇑f) (n✝ + 1).succ",
" approx (⇑f) (n✝ + 1) i✝ ≤ approx (⇑f) (n✝ + 1).succ i✝",
" approx (⇑f) n✝ ≤ approx (⇑f) (n✝ + 1)",
" approx (⇑f) i ≤ approx (⇑f) j",
" approx (⇑f) i ≤ ... | [
" approx (⇑f) i ≤ approx (⇑f) i.succ",
" approx (⇑f) 0 ≤ approx (⇑f) (Nat.succ 0)",
" ⊥ ≤ f ⊥",
" approx (⇑f) (n✝ + 1) ≤ approx (⇑f) (n✝ + 1).succ",
" approx (⇑f) (n✝ + 1) i✝ ≤ approx (⇑f) (n✝ + 1).succ i✝",
" approx (⇑f) n✝ ≤ approx (⇑f) (n✝ + 1)",
" approx (⇑f) i ≤ approx (⇑f) j",
" approx (⇑f) i ≤ ... |
import Mathlib.Algebra.GeomSum
import Mathlib.Algebra.Polynomial.Roots
import Mathlib.GroupTheory.SpecificGroups.Cyclic
#align_import ring_theory.integral_domain from "leanprover-community/mathlib"@"6e70e0d419bf686784937d64ed4bfde866ff229e"
section
open Finset Polynomial Function Nat
section CancelMonoidWithZero... | Mathlib/RingTheory/IntegralDomain.lean | 73 | 84 | theorem Finset.exists_eq_pow_of_mul_eq_pow_of_coprime {ι R : Type*} [CommSemiring R] [IsDomain R]
[GCDMonoid R] [Unique Rˣ] {n : ℕ} {c : R} {s : Finset ι} {f : ι → R}
(h : ∀ i ∈ s, ∀ j ∈ s, i ≠ j → IsCoprime (f i) (f j))
(hprod : ∏ i ∈ s, f i = c ^ n) : ∀ i ∈ s, ∃ d : R, f i = d ^ n := by |
classical
intro i hi
rw [← insert_erase hi, prod_insert (not_mem_erase i s)] at hprod
refine
exists_eq_pow_of_mul_eq_pow_of_coprime
(IsCoprime.prod_right fun j hj => h i hi j (erase_subset i s hj) fun hij => ?_) hprod
rw [hij] at hj
exact (s.not_mem_erase _) hj
| [
" 0⁻¹ = 0",
" a * a⁻¹ = 1",
" a * bijInv ⋯ 1 = 1",
" ∃ d, a = d ^ n",
" GCDMonoid.gcd a b ∣ 1",
" GCDMonoid.gcd a b ∣ x * a + y * b",
" ∀ i ∈ s, ∃ d, f i = d ^ n",
" ∃ d, f i = d ^ n",
" False"
] | [
" 0⁻¹ = 0",
" a * a⁻¹ = 1",
" a * bijInv ⋯ 1 = 1",
" ∃ d, a = d ^ n",
" GCDMonoid.gcd a b ∣ 1",
" GCDMonoid.gcd a b ∣ x * a + y * b"
] |
import Mathlib.MeasureTheory.Integral.Lebesgue
open Set hiding restrict restrict_apply
open Filter ENNReal NNReal MeasureTheory.Measure
namespace MeasureTheory
variable {α : Type*} {m0 : MeasurableSpace α} {μ : Measure α}
noncomputable
def Measure.withDensity {m : MeasurableSpace α} (μ : Measure α) (f : α → ℝ≥... | Mathlib/MeasureTheory/Measure/WithDensity.lean | 83 | 87 | theorem withDensity_congr_ae {f g : α → ℝ≥0∞} (h : f =ᵐ[μ] g) :
μ.withDensity f = μ.withDensity g := by |
refine Measure.ext fun s hs => ?_
rw [withDensity_apply _ hs, withDensity_apply _ hs]
exact lintegral_congr_ae (ae_restrict_of_ae h)
| [
" (fun s x => ∫⁻ (a : α) in s, f a ∂μ) ∅ ⋯ = 0",
" ∫⁻ (a : α) in s, f a ∂μ ≤ (μ.withDensity f) s",
" (μ.withDensity f) s = ∫⁻ (a : α) in s, f a ∂μ",
" (μ.withDensity f) s ≤ ∫⁻ (a : α) in s, f a ∂μ",
" ∫⁻ (a : α) in t, f a ∂μ = ∫⁻ (a : α) in s, f a ∂μ",
" μ.restrict t = μ.restrict s",
" withDensity 0 f =... | [
" (fun s x => ∫⁻ (a : α) in s, f a ∂μ) ∅ ⋯ = 0",
" ∫⁻ (a : α) in s, f a ∂μ ≤ (μ.withDensity f) s",
" (μ.withDensity f) s = ∫⁻ (a : α) in s, f a ∂μ",
" (μ.withDensity f) s ≤ ∫⁻ (a : α) in s, f a ∂μ",
" ∫⁻ (a : α) in t, f a ∂μ = ∫⁻ (a : α) in s, f a ∂μ",
" μ.restrict t = μ.restrict s",
" withDensity 0 f =... |
import Mathlib.Algebra.Polynomial.Derivative
import Mathlib.Tactic.LinearCombination
#align_import ring_theory.polynomial.chebyshev from "leanprover-community/mathlib"@"d774451114d6045faeb6751c396bea1eb9058946"
namespace Polynomial.Chebyshev
set_option linter.uppercaseLean3 false -- `T` `U` `X`
open Polynomial
v... | Mathlib/RingTheory/Polynomial/Chebyshev.lean | 134 | 134 | theorem T_neg_two : T R (-2) = 2 * X ^ 2 - 1 := by | simp [T_two]
| [
" motive (Int.negSucc n)",
" T R (-↑(k + 1) + 2) = 2 * X * T R (-↑(k + 1) + 1) - T R (-↑(k + 1))",
" T R (-↑(k + 1) + 2) - (2 * X * T R (-↑(k + 1) + 1) - T R (-↑(k + 1))) -\n (T R (Int.negSucc k) - (2 * X * T R (-↑k) - T R (-↑k + 1))) =\n 0",
" T R (-1 + -↑k + 2) - (2 * X * T R (-↑k) - T R (-1 + -↑k))... | [
" motive (Int.negSucc n)",
" T R (-↑(k + 1) + 2) = 2 * X * T R (-↑(k + 1) + 1) - T R (-↑(k + 1))",
" T R (-↑(k + 1) + 2) - (2 * X * T R (-↑(k + 1) + 1) - T R (-↑(k + 1))) -\n (T R (Int.negSucc k) - (2 * X * T R (-↑k) - T R (-↑k + 1))) =\n 0",
" T R (-1 + -↑k + 2) - (2 * X * T R (-↑k) - T R (-1 + -↑k))... |
import Mathlib.LinearAlgebra.CliffordAlgebra.Grading
import Mathlib.Algebra.Module.Opposites
#align_import linear_algebra.clifford_algebra.conjugation from "leanprover-community/mathlib"@"34020e531ebc4e8aac6d449d9eecbcd1508ea8d0"
variable {R : Type*} [CommRing R]
variable {M : Type*} [AddCommGroup M] [Module R M]... | Mathlib/LinearAlgebra/CliffordAlgebra/Conjugation.lean | 111 | 111 | theorem reverse_ι (m : M) : reverse (ι Q m) = ι Q m := by | simp [reverse]
| [
" ((↑(opLinearEquiv R) ∘ₗ ι Q) m * (↑(opLinearEquiv R) ∘ₗ ι Q) m).unop =\n ((algebraMap R (CliffordAlgebra Q)ᵐᵒᵖ) (Q m)).unop",
" ((AlgHom.unop (reverseOp.comp (AlgHom.opComm reverseOp))).toLinearMap ∘ₗ ι Q) x✝ =\n ((AlgHom.unop (AlgHom.id R (CliffordAlgebra Q)ᵐᵒᵖ)).toLinearMap ∘ₗ ι Q) x✝",
" (((AlgHom.op... | [
" ((↑(opLinearEquiv R) ∘ₗ ι Q) m * (↑(opLinearEquiv R) ∘ₗ ι Q) m).unop =\n ((algebraMap R (CliffordAlgebra Q)ᵐᵒᵖ) (Q m)).unop",
" ((AlgHom.unop (reverseOp.comp (AlgHom.opComm reverseOp))).toLinearMap ∘ₗ ι Q) x✝ =\n ((AlgHom.unop (AlgHom.id R (CliffordAlgebra Q)ᵐᵒᵖ)).toLinearMap ∘ₗ ι Q) x✝",
" (((AlgHom.op... |
import Mathlib.RingTheory.Ideal.IsPrimary
import Mathlib.RingTheory.Localization.AtPrime
import Mathlib.Order.Minimal
#align_import ring_theory.ideal.minimal_prime from "leanprover-community/mathlib"@"70fd9563a21e7b963887c9360bd29b2393e6225a"
section
variable {R S : Type*} [CommSemiring R] [CommSemiring S] (I J ... | Mathlib/RingTheory/Ideal/MinimalPrime.lean | 56 | 74 | theorem Ideal.exists_minimalPrimes_le [J.IsPrime] (e : I ≤ J) : ∃ p ∈ I.minimalPrimes, p ≤ J := by |
suffices
∃ m ∈ { p : (Ideal R)ᵒᵈ | Ideal.IsPrime p ∧ I ≤ OrderDual.ofDual p },
OrderDual.toDual J ≤ m ∧ ∀ z ∈ { p : (Ideal R)ᵒᵈ | Ideal.IsPrime p ∧ I ≤ p }, m ≤ z → z = m by
obtain ⟨p, h₁, h₂, h₃⟩ := this
simp_rw [← @eq_comm _ p] at h₃
exact ⟨p, ⟨h₁, fun a b c => le_of_eq (h₃ a b c)⟩, h₂⟩
app... | [
" {p | p.IsPrime ∧ ⊥ ≤ p} = setOf Ideal.IsPrime",
" ∃ p ∈ I.minimalPrimes, p ≤ J",
" ∃ m ∈ {p | IsPrime p ∧ I ≤ OrderDual.ofDual p}, OrderDual.toDual J ≤ m ∧ ∀ z ∈ {p | IsPrime p ∧ I ≤ p}, m ≤ z → z = m",
" OrderDual.toDual J ∈ {p | IsPrime p ∧ I ≤ OrderDual.ofDual p}",
" J.IsPrime",
" ∀ c ⊆ {p | IsPrime ... | [
" {p | p.IsPrime ∧ ⊥ ≤ p} = setOf Ideal.IsPrime"
] |
import Mathlib.Algebra.BigOperators.Group.Multiset
import Mathlib.Data.Multiset.Dedup
#align_import data.multiset.bind from "leanprover-community/mathlib"@"f694c7dead66f5d4c80f446c796a5aad14707f0e"
assert_not_exists MonoidWithZero
assert_not_exists MulAction
universe v
variable {α : Type*} {β : Type v} {γ δ : Ty... | Mathlib/Data/Multiset/Bind.lean | 163 | 163 | theorem card_bind : card (s.bind f) = (s.map (card ∘ f)).sum := by | simp [bind]
| [
" (↑(List.map ofList (l :: L))).join = ↑(l :: L).join",
" a ∈ join 0 ↔ ∃ s ∈ 0, a ∈ s",
" ∀ (a_1 : Multiset α) (s : Multiset (Multiset α)),\n (a ∈ s.join ↔ ∃ s_1 ∈ s, a ∈ s_1) → (a ∈ (a_1 ::ₘ s).join ↔ ∃ s_1 ∈ a_1 ::ₘ s, a ∈ s_1)",
" card (join 0) = (map (⇑card) 0).sum",
" ∀ (a : Multiset α) (s : Multise... | [
" (↑(List.map ofList (l :: L))).join = ↑(l :: L).join",
" a ∈ join 0 ↔ ∃ s ∈ 0, a ∈ s",
" ∀ (a_1 : Multiset α) (s : Multiset (Multiset α)),\n (a ∈ s.join ↔ ∃ s_1 ∈ s, a ∈ s_1) → (a ∈ (a_1 ::ₘ s).join ↔ ∃ s_1 ∈ a_1 ::ₘ s, a ∈ s_1)",
" card (join 0) = (map (⇑card) 0).sum",
" ∀ (a : Multiset α) (s : Multise... |
import Mathlib.Analysis.Complex.RealDeriv
import Mathlib.Analysis.Calculus.ContDiff.RCLike
import Mathlib.Analysis.Calculus.IteratedDeriv.Lemmas
#align_import analysis.special_functions.exp_deriv from "leanprover-community/mathlib"@"6a5c85000ab93fe5dcfdf620676f614ba8e18c26"
noncomputable section
open Filter Asym... | Mathlib/Analysis/SpecialFunctions/ExpDeriv.lean | 36 | 42 | theorem hasDerivAt_exp (x : ℂ) : HasDerivAt exp (exp x) x := by |
rw [hasDerivAt_iff_isLittleO_nhds_zero]
have : (1 : ℕ) < 2 := by norm_num
refine (IsBigO.of_bound ‖exp x‖ ?_).trans_isLittleO (isLittleO_pow_id this)
filter_upwards [Metric.ball_mem_nhds (0 : ℂ) zero_lt_one]
simp only [Metric.mem_ball, dist_zero_right, norm_pow]
exact fun z hz => exp_bound_sq x z hz.le
| [
" HasDerivAt cexp (cexp x) x",
" (fun h => cexp (x + h) - cexp x - h • cexp x) =o[𝓝 0] fun h => h",
" 1 < 2",
" ∀ᶠ (x_1 : ℂ) in 𝓝 0, ‖cexp (x + x_1) - cexp x - x_1 • cexp x‖ ≤ ‖cexp x‖ * ‖x_1 ^ 2‖",
" ∀ a ∈ Metric.ball 0 1, ‖cexp (x + a) - cexp x - a • cexp x‖ ≤ ‖cexp x‖ * ‖a ^ 2‖",
" ∀ (a : ℂ), ‖a‖ < 1... | [] |
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 | 146 | 148 | theorem relindex_inf_mul_relindex : H.relindex (K ⊓ L) * K.relindex L = (H ⊓ K).relindex L := by |
rw [← inf_relindex_right H (K ⊓ L), ← inf_relindex_right K L, ← inf_relindex_right (H ⊓ K) L,
inf_assoc, relindex_mul_relindex (H ⊓ (K ⊓ L)) (K ⊓ L) L inf_le_right inf_le_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.Algebra.Group.Commute.Units
import Mathlib.Algebra.Group.Int
import Mathlib.Algebra.GroupWithZero.Semiconj
import Mathlib.Data.Nat.GCD.Basic
import Mathlib.Order.Bounds.Basic
#align_import data.int.gcd from "leanprover-community/mathlib"@"47a1a73351de8dd6c8d3d32b569c8e434b03ca47"
namespace Nat
... | Mathlib/Data/Int/GCD.lean | 74 | 76 | theorem gcdA_zero_left {s : ℕ} : gcdA 0 s = 0 := by |
unfold gcdA
rw [xgcd, xgcd_zero_left]
| [
" (invImage\n (fun x =>\n PSigma.casesOn x fun a a_1 =>\n PSigma.casesOn a_1 fun a_2 a_3 =>\n PSigma.casesOn a_3 fun a_4 a_5 => PSigma.casesOn a_5 fun a_6 a_7 => PSigma.casesOn a_7 fun a_8 a_9 => a)\n instWellFoundedRelationOfSizeOf).1\n ⟨r' % k.succ, ⟨s' - ↑q * s, ... | [
" (invImage\n (fun x =>\n PSigma.casesOn x fun a a_1 =>\n PSigma.casesOn a_1 fun a_2 a_3 =>\n PSigma.casesOn a_3 fun a_4 a_5 => PSigma.casesOn a_5 fun a_6 a_7 => PSigma.casesOn a_7 fun a_8 a_9 => a)\n instWellFoundedRelationOfSizeOf).1\n ⟨r' % k.succ, ⟨s' - ↑q * s, ... |
import Mathlib.RingTheory.JacobsonIdeal
#align_import ring_theory.nakayama from "leanprover-community/mathlib"@"f0c8bf9245297a541f468be517f1bde6195105e9"
variable {R M : Type*} [CommRing R] [AddCommGroup M] [Module R M]
open Ideal
namespace Submodule
theorem eq_smul_of_le_smul_of_le_jacobson {I J : Ideal R} {... | Mathlib/RingTheory/Nakayama.lean | 109 | 111 | theorem eq_bot_of_le_smul_of_le_jacobson_bot (I : Ideal R) (N : Submodule R M) (hN : N.FG)
(hIN : N ≤ I • N) (hIjac : I ≤ jacobson ⊥) : N = ⊥ := by |
rw [eq_smul_of_le_smul_of_le_jacobson hN hIN hIjac, Submodule.bot_smul]
| [
" N = J • N",
" N ≤ J • N",
" n ∈ J • N",
" n = -(s * r - 1) • n",
" -(s * r - 1) • n ∈ J • N",
" N = ⊥"
] | [
" N = J • N",
" N ≤ J • N",
" n ∈ J • N",
" n = -(s * r - 1) • n",
" -(s * r - 1) • n ∈ J • N"
] |
import Mathlib.MeasureTheory.Function.LpSeminorm.Basic
import Mathlib.MeasureTheory.Integral.MeanInequalities
#align_import measure_theory.function.lp_seminorm from "leanprover-community/mathlib"@"c4015acc0a223449d44061e27ddac1835a3852b9"
open Filter
open scoped ENNReal Topology
namespace MeasureTheory
section S... | Mathlib/MeasureTheory/Function/LpSeminorm/CompareExp.lean | 48 | 58 | theorem snorm'_le_snormEssSup_mul_rpow_measure_univ {q : ℝ} (hq_pos : 0 < q) :
snorm' f q μ ≤ snormEssSup f μ * μ Set.univ ^ (1 / q) := by |
have h_le : (∫⁻ a : α, (‖f a‖₊ : ℝ≥0∞) ^ q ∂μ) ≤ ∫⁻ _ : α, snormEssSup f μ ^ q ∂μ := by
refine lintegral_mono_ae ?_
have h_nnnorm_le_snorm_ess_sup := coe_nnnorm_ae_le_snormEssSup f μ
exact h_nnnorm_le_snorm_ess_sup.mono fun x hx => by gcongr
rw [snorm', ← ENNReal.rpow_one (snormEssSup f μ)]
nth_rw 2 ... | [
" snorm' f p μ ≤ snorm' f q μ * μ Set.univ ^ (1 / p - 1 / q)",
" ↑‖f a‖₊ ^ p = (↑‖f a‖₊ * g a) ^ p",
" (∫⁻ (a : α), ↑‖f a‖₊ ^ p ∂μ) ^ (1 / p) ≤ snorm' f q μ * μ Set.univ ^ (1 / p - 1 / q)",
" (∫⁻ (a : α), ↑‖f a‖₊ ^ p ∂μ) ^ (1 / p) ≤ (∫⁻ (a : α), ↑‖f a‖₊ ^ q ∂μ) ^ (1 / q) * μ Set.univ ^ (1 / p - 1 / q)",
" (... | [
" snorm' f p μ ≤ snorm' f q μ * μ Set.univ ^ (1 / p - 1 / q)",
" ↑‖f a‖₊ ^ p = (↑‖f a‖₊ * g a) ^ p",
" (∫⁻ (a : α), ↑‖f a‖₊ ^ p ∂μ) ^ (1 / p) ≤ snorm' f q μ * μ Set.univ ^ (1 / p - 1 / q)",
" (∫⁻ (a : α), ↑‖f a‖₊ ^ p ∂μ) ^ (1 / p) ≤ (∫⁻ (a : α), ↑‖f a‖₊ ^ q ∂μ) ^ (1 / q) * μ Set.univ ^ (1 / p - 1 / q)",
" (... |
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 | 107 | 129 | theorem lhopital_zero_left_on_Ioo (hff' : ∀ x ∈ Ioo a b, HasDerivAt f (f' x) x)
(hgg' : ∀ x ∈ Ioo a b, HasDerivAt g (g' x) x) (hg' : ∀ x ∈ Ioo a b, g' x ≠ 0)
(hfb : Tendsto f (𝓝[<] b) (𝓝 0)) (hgb : Tendsto g (𝓝[<] b) (𝓝 0))
(hdiv : Tendsto (fun x => f' x / g' x) (𝓝[<] b) l) :
Tendsto (fun x => f x / ... |
-- Here, we essentially compose by `Neg.neg`. The following is mostly technical details.
have hdnf : ∀ x ∈ -Ioo a b, HasDerivAt (f ∘ Neg.neg) (f' (-x) * -1) x := fun x hx =>
comp x (hff' (-x) hx) (hasDerivAt_neg x)
have hdng : ∀ x ∈ -Ioo a b, HasDerivAt (g ∘ Neg.neg) (g' (-x) * -1) x := fun x hx =>
comp ... | [
" 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.CategoryTheory.PathCategory
import Mathlib.CategoryTheory.Functor.FullyFaithful
import Mathlib.CategoryTheory.Bicategory.Free
import Mathlib.CategoryTheory.Bicategory.LocallyDiscrete
#align_import category_theory.bicategory.coherence from "leanprover-community/mathlib"@"f187f1074fa1857c94589cc653c786ca... | Mathlib/CategoryTheory/Bicategory/Coherence.lean | 188 | 193 | theorem normalizeAux_nil_comp {a b c : B} (f : Hom a b) (g : Hom b c) :
normalizeAux nil (f.comp g) = (normalizeAux nil f).comp (normalizeAux nil g) := by |
induction g generalizing a with
| id => rfl
| of => rfl
| comp g _ ihf ihg => erw [ihg (f.comp g), ihf f, ihg g, comp_assoc]
| [
" (preinclusion B).map₂ η = eqToHom ⋯",
" (preinclusion B).map₂ { down := { down := down✝ } } = eqToHom ⋯",
" ?m.3791.as = ?m.3792.as",
" normalizeAux p f = normalizeAux p g",
" (fun p => normalizeAux p f) = fun p => normalizeAux p g",
" (fun p => normalizeAux p f✝) = fun p => normalizeAux p h✝",
" (fun... | [
" (preinclusion B).map₂ η = eqToHom ⋯",
" (preinclusion B).map₂ { down := { down := down✝ } } = eqToHom ⋯",
" ?m.3791.as = ?m.3792.as",
" normalizeAux p f = normalizeAux p g",
" (fun p => normalizeAux p f) = fun p => normalizeAux p g",
" (fun p => normalizeAux p f✝) = fun p => normalizeAux p h✝",
" (fun... |
import Mathlib.Algebra.MvPolynomial.Supported
import Mathlib.RingTheory.WittVector.Truncated
#align_import ring_theory.witt_vector.mul_coeff from "leanprover-community/mathlib"@"2f5b500a507264de86d666a5f87ddb976e2d8de4"
noncomputable section
namespace WittVector
variable (p : ℕ) [hp : Fact p.Prime]
variable {k ... | Mathlib/RingTheory/WittVector/MulCoeff.lean | 99 | 110 | theorem remainder_vars (n : ℕ) : (remainder p n).vars ⊆ univ ×ˢ range (n + 1) := by |
rw [remainder]
apply Subset.trans (vars_mul _ _)
refine union_subset ?_ ?_ <;>
· refine Subset.trans (vars_sum_subset _ _) ?_
rw [biUnion_subset]
intro x hx
rw [rename_monomial, vars_monomial, Finsupp.mapDomain_single]
· apply Subset.trans Finsupp.support_single_subset
simpa using mem_ran... | [
" (wittPolyProd p n).vars ⊆ univ ×ˢ range (n + 1)",
" ((rename (Prod.mk 0)) (wittPolynomial p ℤ n) * (rename (Prod.mk 1)) (wittPolynomial p ℤ n)).vars ⊆\n univ ×ˢ range (n + 1)",
" ((rename (Prod.mk 0)) (wittPolynomial p ℤ n)).vars ∪ ((rename (Prod.mk 1)) (wittPolynomial p ℤ n)).vars ⊆\n univ ×ˢ range (n ... | [
" (wittPolyProd p n).vars ⊆ univ ×ˢ range (n + 1)",
" ((rename (Prod.mk 0)) (wittPolynomial p ℤ n) * (rename (Prod.mk 1)) (wittPolynomial p ℤ n)).vars ⊆\n univ ×ˢ range (n + 1)",
" ((rename (Prod.mk 0)) (wittPolynomial p ℤ n)).vars ∪ ((rename (Prod.mk 1)) (wittPolynomial p ℤ n)).vars ⊆\n univ ×ˢ range (n ... |
import Mathlib.Analysis.Complex.AbsMax
import Mathlib.Analysis.Complex.RemovableSingularity
#align_import analysis.complex.schwarz from "leanprover-community/mathlib"@"3f655f5297b030a87d641ad4e825af8d9679eb0b"
open Metric Set Function Filter TopologicalSpace
open scoped Topology
namespace Complex
section Space... | Mathlib/Analysis/Complex/Schwarz.lean | 113 | 130 | theorem affine_of_mapsTo_ball_of_exists_norm_dslope_eq_div [CompleteSpace E] [StrictConvexSpace ℝ E]
(hd : DifferentiableOn ℂ f (ball c R₁)) (h_maps : Set.MapsTo f (ball c R₁) (ball (f c) R₂))
(h_z₀ : z₀ ∈ ball c R₁) (h_eq : ‖dslope f c z₀‖ = R₂ / R₁) :
Set.EqOn f (fun z => f c + (z - c) • dslope f c z₀) (b... |
set g := dslope f c
rintro z hz
by_cases h : z = c; · simp [h]
have h_R₁ : 0 < R₁ := nonempty_ball.mp ⟨_, h_z₀⟩
have g_le_div : ∀ z ∈ ball c R₁, ‖g z‖ ≤ R₂ / R₁ := fun z hz =>
norm_dslope_le_div_of_mapsTo_ball hd h_maps hz
have g_max : IsMaxOn (norm ∘ g) (ball c R₁) z₀ :=
isMaxOn_iff.mpr fun z hz =... | [
" ‖dslope f c z‖ ≤ R₂ / R₁",
" Tendsto (fun c => R₂ / c) (𝓝[<] R₁) (𝓝 (R₂ / R₁))",
" ∀ᶠ (r : ℝ) in 𝓝[<] R₁, ‖dslope f c z‖ ≤ R₂ / r",
" ‖dslope f c z‖ ≤ R₂ / r",
" DiffContOnCl ℂ (dslope f c) (ball c r)",
" DifferentiableOn ℂ (dslope f c) (closure (ball c r))",
" DifferentiableOn ℂ (dslope f c) (clos... | [
" ‖dslope f c z‖ ≤ R₂ / R₁",
" Tendsto (fun c => R₂ / c) (𝓝[<] R₁) (𝓝 (R₂ / R₁))",
" ∀ᶠ (r : ℝ) in 𝓝[<] R₁, ‖dslope f c z‖ ≤ R₂ / r",
" ‖dslope f c z‖ ≤ R₂ / r",
" DiffContOnCl ℂ (dslope f c) (ball c r)",
" DifferentiableOn ℂ (dslope f c) (closure (ball c r))",
" DifferentiableOn ℂ (dslope f c) (clos... |
import Mathlib.Algebra.BigOperators.Group.Finset
import Mathlib.Order.SupIndep
import Mathlib.Order.Atoms
#align_import order.partition.finpartition from "leanprover-community/mathlib"@"d6fad0e5bf2d6f48da9175d25c3dc5706b3834ce"
open Finset Function
variable {α : Type*}
@[ext]
structure Finpartition [Lattice α]... | Mathlib/Order/Partition/Finpartition.lean | 191 | 196 | theorem parts_eq_empty_iff : P.parts = ∅ ↔ a = ⊥ := by |
simp_rw [← P.sup_parts]
refine ⟨fun h ↦ ?_, fun h ↦ eq_empty_iff_forall_not_mem.2 fun b hb ↦ P.not_bot_mem ?_⟩
· rw [h]
exact Finset.sup_empty
· rwa [← le_bot_iff.1 ((le_sup hb).trans h.le)]
| [
" x✝ ≤ ⊥",
" (↑e).symm x✝¹ ∉ Finset.map (↑e).symm.toEmbedding u",
" e.symm x✝ ≤ (Finset.map (↑e).symm.toEmbedding u).sup id",
" (Finset.map (↑e).symm.toEmbedding u).sup id = e.symm (u.sup id)",
" u.sup (id ∘ ⇑(↑e).symm.toEmbedding) = u.sup (⇑e.symm ∘ id)",
" (Finset.map (↑e).toEmbedding P.parts).sup id = ... | [
" x✝ ≤ ⊥",
" (↑e).symm x✝¹ ∉ Finset.map (↑e).symm.toEmbedding u",
" e.symm x✝ ≤ (Finset.map (↑e).symm.toEmbedding u).sup id",
" (Finset.map (↑e).symm.toEmbedding u).sup id = e.symm (u.sup id)",
" u.sup (id ∘ ⇑(↑e).symm.toEmbedding) = u.sup (⇑e.symm ∘ id)",
" (Finset.map (↑e).toEmbedding P.parts).sup id = ... |
import Mathlib.Algebra.BigOperators.Fin
import Mathlib.Data.Nat.Choose.Sum
import Mathlib.Data.Nat.Factorial.BigOperators
import Mathlib.Data.Fin.VecNotation
import Mathlib.Data.Finset.Sym
import Mathlib.Data.Finsupp.Multiset
#align_import data.nat.choose.multinomial from "leanprover-community/mathlib"@"2738d2ca56cbc... | Mathlib/Data/Nat/Choose/Multinomial.lean | 123 | 131 | theorem binomial_succ_succ [DecidableEq α] (h : a ≠ b) :
multinomial {a, b} (Function.update (Function.update f a (f a).succ) b (f b).succ) =
multinomial {a, b} (Function.update f a (f a).succ) +
multinomial {a, b} (Function.update f b (f b).succ) := by |
simp only [binomial_eq_choose, Function.update_apply,
h, Ne, ite_true, ite_false, not_false_eq_true]
rw [if_neg h.symm]
rw [add_succ, choose_succ_succ, succ_add_eq_add_succ]
ring
| [
" multinomial ∅ f = 1",
" multinomial (cons a s ha) f = (f a + ∑ i ∈ s, f i).choose (f a) * multinomial s f",
" 0 < ∏ i ∈ cons a s ha, (f i)!",
" multinomial (insert a s) f = (f a + ∑ i ∈ s, f i).choose (f a) * multinomial s f",
" multinomial {a} f = 1",
" (f a + ∑ i ∈ ∅, f i).choose (f a) * multinomial ∅... | [
" multinomial ∅ f = 1",
" multinomial (cons a s ha) f = (f a + ∑ i ∈ s, f i).choose (f a) * multinomial s f",
" 0 < ∏ i ∈ cons a s ha, (f i)!",
" multinomial (insert a s) f = (f a + ∑ i ∈ s, f i).choose (f a) * multinomial s f",
" multinomial {a} f = 1",
" (f a + ∑ i ∈ ∅, f i).choose (f a) * multinomial ∅... |
import Mathlib.Algebra.BigOperators.WithTop
import Mathlib.Algebra.GroupWithZero.Divisibility
import Mathlib.Data.ENNReal.Basic
#align_import data.real.ennreal from "leanprover-community/mathlib"@"c14c8fcde993801fca8946b0d80131a1a81d1520"
open Set NNReal ENNReal
namespace ENNReal
variable {a b c d : ℝ≥0∞} {r p q... | Mathlib/Data/ENNReal/Operations.lean | 206 | 206 | theorem mul_top' : a * ∞ = if a = 0 then 0 else ∞ := by | convert WithTop.mul_top' a
| [
" (r₁ + r₂).toNNReal = r₁.toNNReal + r₂.toNNReal",
" (↑r₁ + r₂).toNNReal = (↑r₁).toNNReal + r₂.toNNReal",
" (↑r₁ + ↑r₂).toNNReal = (↑r₁).toNNReal + (↑r₂).toNNReal",
" ¬x < ⊤ ↔ x = ⊤",
" a + b ≠ ⊤ ↔ a ≠ ⊤ ∧ b ≠ ⊤",
" a * ⊤ = if a = 0 then 0 else ⊤"
] | [
" (r₁ + r₂).toNNReal = r₁.toNNReal + r₂.toNNReal",
" (↑r₁ + r₂).toNNReal = (↑r₁).toNNReal + r₂.toNNReal",
" (↑r₁ + ↑r₂).toNNReal = (↑r₁).toNNReal + (↑r₂).toNNReal",
" ¬x < ⊤ ↔ x = ⊤",
" a + b ≠ ⊤ ↔ a ≠ ⊤ ∧ b ≠ ⊤"
] |
import Mathlib.Algebra.BigOperators.Ring
import Mathlib.Combinatorics.SimpleGraph.Density
import Mathlib.Data.Nat.Cast.Field
import Mathlib.Order.Partition.Equipartition
import Mathlib.SetTheory.Ordinal.Basic
#align_import combinatorics.simple_graph.regularity.uniform from "leanprover-community/mathlib"@"bf7ef0e83e5b... | Mathlib/Combinatorics/SimpleGraph/Regularity/Uniform.lean | 142 | 145 | theorem left_nonuniformWitnesses_card (h : ¬G.IsUniform ε s t) :
(s.card : 𝕜) * ε ≤ (G.nonuniformWitnesses ε s t).1.card := by |
rw [nonuniformWitnesses, dif_pos h]
exact (not_isUniform_iff.1 h).choose_spec.2.choose_spec.2.1
| [
" DecidableRel (G.IsUniform ε)",
" DecidableRel fun s t =>\n ∀ ⦃s' : Finset α⦄,\n s' ⊆ s →\n ∀ ⦃t' : Finset α⦄,\n t' ⊆ t → ↑s.card * ε ≤ ↑s'.card → ↑t.card * ε ≤ ↑t'.card → |↑(G.edgeDensity s' t') - ↑(G.edgeDensity s t)| < ε",
" |↑(G.edgeDensity s' t') - ↑(G.edgeDensity s t)| < ε'",
" ... | [
" DecidableRel (G.IsUniform ε)",
" DecidableRel fun s t =>\n ∀ ⦃s' : Finset α⦄,\n s' ⊆ s →\n ∀ ⦃t' : Finset α⦄,\n t' ⊆ t → ↑s.card * ε ≤ ↑s'.card → ↑t.card * ε ≤ ↑t'.card → |↑(G.edgeDensity s' t') - ↑(G.edgeDensity s t)| < ε",
" |↑(G.edgeDensity s' t') - ↑(G.edgeDensity s t)| < ε'",
" ... |
import Mathlib.Topology.FiberBundle.Trivialization
import Mathlib.Topology.Order.LeftRightNhds
#align_import topology.fiber_bundle.basic from "leanprover-community/mathlib"@"e473c3198bb41f68560cab68a0529c854b618833"
variable {ι B F X : Type*} [TopologicalSpace X]
open TopologicalSpace Filter Set Bundle Topology
... | Mathlib/Topology/FiberBundle/Basic.lean | 474 | 477 | theorem mem_trivChange_source (i j : ι) (p : B × F) :
p ∈ (Z.trivChange i j).source ↔ p.1 ∈ Z.baseSet i ∩ Z.baseSet j := by |
erw [mem_prod]
simp
| [
" (fun p => (p.1, Z.coordChange i j p.1 p.2)) p ∈ (Z.baseSet i ∩ Z.baseSet j) ×ˢ univ",
" (fun p => (p.1, Z.coordChange j i p.1 p.2)) p ∈ (Z.baseSet i ∩ Z.baseSet j) ×ˢ univ",
" ∀ ⦃x : B × F⦄,\n x ∈ (Z.baseSet i ∩ Z.baseSet j) ×ˢ univ →\n (fun p => (p.1, Z.coordChange j i p.1 p.2)) ((fun p => (p.1, Z.co... | [
" (fun p => (p.1, Z.coordChange i j p.1 p.2)) p ∈ (Z.baseSet i ∩ Z.baseSet j) ×ˢ univ",
" (fun p => (p.1, Z.coordChange j i p.1 p.2)) p ∈ (Z.baseSet i ∩ Z.baseSet j) ×ˢ univ",
" ∀ ⦃x : B × F⦄,\n x ∈ (Z.baseSet i ∩ Z.baseSet j) ×ˢ univ →\n (fun p => (p.1, Z.coordChange j i p.1 p.2)) ((fun p => (p.1, Z.co... |
import Mathlib.Geometry.Euclidean.Angle.Oriented.Affine
import Mathlib.Geometry.Euclidean.Angle.Unoriented.RightAngle
#align_import geometry.euclidean.angle.oriented.right_angle from "leanprover-community/mathlib"@"46b633fd842bef9469441c0209906f6dddd2b4f5"
noncomputable section
open scoped EuclideanGeometry
ope... | Mathlib/Geometry/Euclidean/Angle/Oriented/RightAngle.lean | 601 | 606 | theorem oangle_right_eq_arcsin_of_oangle_eq_pi_div_two {p₁ p₂ p₃ : P} (h : ∡ p₁ p₂ p₃ = ↑(π / 2)) :
∡ p₂ p₃ p₁ = Real.arcsin (dist p₁ p₂ / dist p₁ p₃) := by |
have hs : (∡ p₂ p₃ p₁).sign = 1 := by rw [oangle_rotate_sign, h, Real.Angle.sign_coe_pi_div_two]
rw [oangle_eq_angle_of_sign_eq_one hs,
angle_eq_arcsin_of_angle_eq_pi_div_two (angle_eq_pi_div_two_of_oangle_eq_pi_div_two h)
(Or.inl (left_ne_of_oangle_eq_pi_div_two h))]
| [
" ∡ p₂ p₃ p₁ = ↑(dist p₃ p₂ / dist p₁ p₃).arccos",
" (∡ p₂ p₃ p₁).sign = 1",
" ∡ p₃ p₁ p₂ = ↑(dist p₁ p₂ / dist p₁ p₃).arccos",
" (∡ p₃ p₁ p₂).sign = 1",
" ∡ p₂ p₃ p₁ = ↑(dist p₁ p₂ / dist p₁ p₃).arcsin"
] | [
" ∡ p₂ p₃ p₁ = ↑(dist p₃ p₂ / dist p₁ p₃).arccos",
" (∡ p₂ p₃ p₁).sign = 1",
" ∡ p₃ p₁ p₂ = ↑(dist p₁ p₂ / dist p₁ p₃).arccos",
" (∡ p₃ p₁ p₂).sign = 1"
] |
import Mathlib.Algebra.Polynomial.BigOperators
import Mathlib.Algebra.Polynomial.Derivative
import Mathlib.Data.Nat.Choose.Cast
import Mathlib.Data.Nat.Choose.Vandermonde
import Mathlib.Tactic.FieldSimp
#align_import data.polynomial.hasse_deriv from "leanprover-community/mathlib"@"a148d797a1094ab554ad4183a4ad6f130358... | Mathlib/Algebra/Polynomial/HasseDeriv.lean | 111 | 124 | theorem hasseDeriv_monomial (n : ℕ) (r : R) :
hasseDeriv k (monomial n r) = monomial (n - k) (↑(n.choose k) * r) := by |
ext i
simp only [hasseDeriv_coeff, coeff_monomial]
by_cases hnik : n = i + k
· rw [if_pos hnik, if_pos, ← hnik]
apply tsub_eq_of_eq_add_rev
rwa [add_comm]
· rw [if_neg hnik, mul_zero]
by_cases hkn : k ≤ n
· rw [← tsub_eq_iff_eq_add_of_le hkn] at hnik
rw [if_neg hnik]
· push_neg at h... | [
" (hasseDeriv k) f = f.sum fun i r => (monomial (i - k)) (↑(i.choose k) * r)",
" (f.sum fun x x_1 => (monomial (x - k)) (x.choose k • x_1)) = f.sum fun i r => (monomial (i - k)) (↑(i.choose k) * r)",
" (fun x x_1 => (monomial (x - k)) (x.choose k • x_1)) = fun i r => (monomial (i - k)) (↑(i.choose k) * r)",
"... | [
" (hasseDeriv k) f = f.sum fun i r => (monomial (i - k)) (↑(i.choose k) * r)",
" (f.sum fun x x_1 => (monomial (x - k)) (x.choose k • x_1)) = f.sum fun i r => (monomial (i - k)) (↑(i.choose k) * r)",
" (fun x x_1 => (monomial (x - k)) (x.choose k • x_1)) = fun i r => (monomial (i - k)) (↑(i.choose k) * r)",
"... |
import Mathlib.Data.List.Defs
import Mathlib.Data.Option.Basic
import Mathlib.Data.Nat.Defs
import Mathlib.Init.Data.List.Basic
import Mathlib.Util.AssertExists
-- Make sure we haven't imported `Data.Nat.Order.Basic`
assert_not_exists OrderedSub
namespace List
universe u v
variable {α : Type u} {β : Type v} (l :... | Mathlib/Data/List/GetD.lean | 73 | 73 | theorem getD_singleton_default_eq (n : ℕ) : [d].getD n d = d := by | cases n <;> simp
| [
" l.getD n d = l.get ⟨n, hn⟩",
" [].getD n d = [].get ⟨n, hn⟩",
" (head :: tail).getD n d = (head :: tail).get ⟨n, hn⟩",
" (head :: tail).getD 0 d = (head :: tail).get ⟨0, hn⟩",
" (head :: tail).getD (n✝ + 1) d = (head :: tail).get ⟨n✝ + 1, hn⟩",
" (map f l).getD n (f d) = f (l.getD n d)",
" (map f []).... | [
" l.getD n d = l.get ⟨n, hn⟩",
" [].getD n d = [].get ⟨n, hn⟩",
" (head :: tail).getD n d = (head :: tail).get ⟨n, hn⟩",
" (head :: tail).getD 0 d = (head :: tail).get ⟨0, hn⟩",
" (head :: tail).getD (n✝ + 1) d = (head :: tail).get ⟨n✝ + 1, hn⟩",
" (map f l).getD n (f d) = f (l.getD n d)",
" (map f []).... |
import Mathlib.Analysis.NormedSpace.Multilinear.Basic
import Mathlib.Analysis.NormedSpace.Units
import Mathlib.Analysis.NormedSpace.OperatorNorm.Completeness
import Mathlib.Analysis.NormedSpace.OperatorNorm.Mul
#align_import analysis.normed_space.bounded_linear_maps from "leanprover-community/mathlib"@"ce11c3c2a285b... | Mathlib/Analysis/NormedSpace/BoundedLinearMaps.lean | 303 | 304 | theorem map_sub₂ (f : M →SL[ρ₁₂] F →SL[σ₁₂] G') (x x' : M) (y : F) :
f (x - x') y = f x y - f x' y := by | rw [f.map_sub, sub_apply]
| [
" (p₁ + p₂).1.prod (p₁ + p₂).2 = p₁.1.prod p₁.2 + p₂.1.prod p₂.2",
" ((p₁ + p₂).1.prod (p₁ + p₂).2) x✝ = (p₁.1.prod p₁.2 + p₂.1.prod p₂.2) x✝",
" (c • p).1.prod (c • p).2 = c • p.1.prod p.2",
" ((c • p).1.prod (c • p).2) x✝ = (c • p.1.prod p.2) x✝",
" ∃ M, 0 < M ∧ ∀ (x : ContinuousMultilinearMap 𝕜 E F × Co... | [
" (p₁ + p₂).1.prod (p₁ + p₂).2 = p₁.1.prod p₁.2 + p₂.1.prod p₂.2",
" ((p₁ + p₂).1.prod (p₁ + p₂).2) x✝ = (p₁.1.prod p₁.2 + p₂.1.prod p₂.2) x✝",
" (c • p).1.prod (c • p).2 = c • p.1.prod p.2",
" ((c • p).1.prod (c • p).2) x✝ = (c • p.1.prod p.2) x✝",
" ∃ M, 0 < M ∧ ∀ (x : ContinuousMultilinearMap 𝕜 E F × Co... |
import Mathlib.Algebra.Associated
import Mathlib.Algebra.Order.Monoid.Unbundled.Pow
import Mathlib.Algebra.Ring.Int
import Mathlib.Data.Nat.Factorial.Basic
import Mathlib.Data.Nat.GCD.Basic
import Mathlib.Order.Bounds.Basic
#align_import data.nat.prime from "leanprover-community/mathlib"@"8631e2d5ea77f6c13054d9151d82... | Mathlib/Data/Nat/Prime.lean | 89 | 96 | theorem Prime.eq_one_or_self_of_dvd {p : ℕ} (pp : p.Prime) (m : ℕ) (hm : m ∣ p) :
m = 1 ∨ m = p := by |
obtain ⟨n, hn⟩ := hm
have := pp.isUnit_or_isUnit hn
rw [Nat.isUnit_iff, Nat.isUnit_iff] at this
apply Or.imp_right _ this
rintro rfl
rw [hn, mul_one]
| [
" m = 1 ∨ m = p",
" n = 1 → m = p",
" m = p"
] | [] |
import Mathlib.Topology.Order.IsLUB
open Set Filter TopologicalSpace Topology Function
open OrderDual (toDual ofDual)
variable {α β γ : Type*}
section ConditionallyCompleteLinearOrder
variable [ConditionallyCompleteLinearOrder α] [TopologicalSpace α] [OrderTopology α]
[ConditionallyCompleteLinearOrder β] [Top... | Mathlib/Topology/Order/Monotone.lean | 221 | 225 | theorem Monotone.map_csSup_of_continuousAt {f : α → β} {s : Set α} (Cf : ContinuousAt f (sSup s))
(Mf : Monotone f) (ne : s.Nonempty) (H : BddAbove s) : f (sSup s) = sSup (f '' s) := by |
refine ((isLUB_csSup (ne.image f) (Mf.map_bddAbove H)).unique ?_).symm
refine (isLUB_csSup ne H).isLUB_of_tendsto (fun x _ y _ xy => Mf xy) ne ?_
exact Cf.mono_left inf_le_left
| [
" f (sSup s) = sSup (f '' s)",
" IsLUB (f '' s) (f (sSup s))",
" Tendsto f (𝓝[s] sSup s) (𝓝 (f (sSup s)))"
] | [] |
import Mathlib.Algebra.GeomSum
import Mathlib.Order.Filter.Archimedean
import Mathlib.Order.Iterate
import Mathlib.Topology.Algebra.Algebra
import Mathlib.Topology.Algebra.InfiniteSum.Real
#align_import analysis.specific_limits.basic from "leanprover-community/mathlib"@"57ac39bd365c2f80589a700f9fbb664d3a1a30c2"
n... | Mathlib/Analysis/SpecificLimits/Basic.lean | 51 | 54 | theorem NNReal.tendsto_inverse_atTop_nhds_zero_nat :
Tendsto (fun n : ℕ ↦ (n : ℝ≥0)⁻¹) atTop (𝓝 0) := by |
rw [← NNReal.tendsto_coe]
exact _root_.tendsto_inverse_atTop_nhds_zero_nat
| [
" Tendsto (fun n => C / ↑n) atTop (𝓝 0)",
" Tendsto (fun n => (↑n)⁻¹) atTop (𝓝 0)",
" Tendsto (fun a => ↑(↑a)⁻¹) atTop (𝓝 ↑0)"
] | [
" Tendsto (fun n => C / ↑n) atTop (𝓝 0)"
] |
import Mathlib.RingTheory.DedekindDomain.Dvr
import Mathlib.RingTheory.DedekindDomain.Ideal
#align_import ring_theory.dedekind_domain.pid from "leanprover-community/mathlib"@"6010cf523816335f7bae7f8584cb2edaace73940"
variable {R : Type*} [CommRing R]
open Ideal
open UniqueFactorizationMonoid
open scoped nonZer... | Mathlib/RingTheory/DedekindDomain/PID.lean | 78 | 102 | theorem FractionalIdeal.isPrincipal_of_unit_of_comap_mul_span_singleton_eq_top {R A : Type*}
[CommRing R] [CommRing A] [Algebra R A] {S : Submonoid R} [IsLocalization S A]
(I : (FractionalIdeal S A)ˣ) {v : A} (hv : v ∈ (↑I⁻¹ : FractionalIdeal S A))
(h : Submodule.comap (Algebra.linearMap R A) ((I : Submodul... |
have hinv := I.mul_inv
set J := Submodule.comap (Algebra.linearMap R A) ((I : Submodule R A) * Submodule.span R {v})
have hJ : IsLocalization.coeSubmodule A J = ↑I * Submodule.span R {v} := by
-- Porting note: had to insert `val_eq_coe` into this rewrite.
-- Arguably this is because `Subtype.ext_iff` is ... | [
" P = span {x}",
" x ≠ 0",
" False",
" ⊥ = span {x}",
" P ∣ span {x}",
" normalizedFactors (span {x}) ≤ normalizedFactors P",
" ∀ (a : Ideal R), Multiset.count a (normalizedFactors (span {x})) ≤ if a = P then 1 else 0",
" Multiset.count Q (normalizedFactors (span {x})) ≤ if Q = P then 1 else 0",
" M... | [
" P = span {x}",
" x ≠ 0",
" False",
" ⊥ = span {x}",
" P ∣ span {x}",
" normalizedFactors (span {x}) ≤ normalizedFactors P",
" ∀ (a : Ideal R), Multiset.count a (normalizedFactors (span {x})) ≤ if a = P then 1 else 0",
" Multiset.count Q (normalizedFactors (span {x})) ≤ if Q = P then 1 else 0",
" M... |
import Mathlib.MeasureTheory.Measure.Typeclasses
open scoped ENNReal
namespace MeasureTheory
variable {α : Type*}
noncomputable
def Measure.trim {m m0 : MeasurableSpace α} (μ : @Measure α m0) (hm : m ≤ m0) : @Measure α m :=
@OuterMeasure.toMeasure α m μ.toOuterMeasure (hm.trans (le_toOuterMeasure_caratheodory... | Mathlib/MeasureTheory/Measure/Trim.lean | 37 | 38 | theorem trim_eq_self [MeasurableSpace α] {μ : Measure α} : μ.trim le_rfl = μ := by |
simp [Measure.trim]
| [
" μ.trim ⋯ = μ"
] | [] |
import Mathlib.Analysis.SpecialFunctions.Trigonometric.Deriv
import Mathlib.Analysis.SpecialFunctions.Log.Basic
#align_import analysis.special_functions.arsinh from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982"
noncomputable section
open Function Filter Set
open scoped Topology
name... | Mathlib/Analysis/SpecialFunctions/Arsinh.lean | 83 | 84 | theorem cosh_arsinh (x : ℝ) : cosh (arsinh x) = √(1 + x ^ 2) := by |
rw [← sqrt_sq (cosh_pos _).le, cosh_sq', sinh_arsinh]
| [
" rexp x.arsinh = x + √(1 + x ^ 2)",
" 0 < x + √(1 + x ^ 2)",
" -x < √(1 + x ^ 2)",
" (-x) ^ 2 < 1 + x ^ 2",
" arsinh 0 = 0",
" (-x).arsinh = -x.arsinh",
" -x + √(1 + (-x) ^ 2) = (x + √(1 + x ^ 2))⁻¹",
" (-x + √(1 + (-x) ^ 2)) * (x + √(1 + x ^ 2)) = 1",
" 0 ≤ 1 + x ^ 2",
" x.arsinh.sinh = x",
" ... | [
" rexp x.arsinh = x + √(1 + x ^ 2)",
" 0 < x + √(1 + x ^ 2)",
" -x < √(1 + x ^ 2)",
" (-x) ^ 2 < 1 + x ^ 2",
" arsinh 0 = 0",
" (-x).arsinh = -x.arsinh",
" -x + √(1 + (-x) ^ 2) = (x + √(1 + x ^ 2))⁻¹",
" (-x + √(1 + (-x) ^ 2)) * (x + √(1 + x ^ 2)) = 1",
" 0 ≤ 1 + x ^ 2",
" x.arsinh.sinh = x",
" ... |
import Mathlib.Analysis.InnerProductSpace.Projection
import Mathlib.Analysis.NormedSpace.PiLp
import Mathlib.LinearAlgebra.FiniteDimensional
import Mathlib.LinearAlgebra.UnitaryGroup
#align_import analysis.inner_product_space.pi_L2 from "leanprover-community/mathlib"@"13bce9a6b6c44f6b4c91ac1c1d2a816e2533d395"
set_... | Mathlib/Analysis/InnerProductSpace/PiL2.lean | 134 | 138 | theorem EuclideanSpace.ball_zero_eq {n : Type*} [Fintype n] (r : ℝ) (hr : 0 ≤ r) :
Metric.ball (0 : EuclideanSpace ℝ n) r = {x | ∑ i, x i ^ 2 < r ^ 2} := by |
ext x
have : (0 : ℝ) ≤ ∑ i, x i ^ 2 := Finset.sum_nonneg fun _ _ => sq_nonneg _
simp_rw [mem_setOf, mem_ball_zero_iff, norm_eq, norm_eq_abs, sq_abs, sqrt_lt this hr]
| [
" ‖x‖ ^ 2 = re ⟪x, x⟫_𝕜",
" ∀ (x y : PiLp 2 f), (starRingEnd 𝕜) ⟪y, x⟫_𝕜 = ⟪x, y⟫_𝕜",
" (starRingEnd 𝕜) ⟪y, x⟫_𝕜 = ⟪x, y⟫_𝕜",
" (starRingEnd 𝕜) ({ inner := fun x y => ∑ i : ι, InnerProductSpace.toInner.1 (x i) (y i) }.1 y x) =\n { inner := fun x y => ∑ i : ι, InnerProductSpace.toInner.1 (x i) (y i)... | [
" ‖x‖ ^ 2 = re ⟪x, x⟫_𝕜",
" ∀ (x y : PiLp 2 f), (starRingEnd 𝕜) ⟪y, x⟫_𝕜 = ⟪x, y⟫_𝕜",
" (starRingEnd 𝕜) ⟪y, x⟫_𝕜 = ⟪x, y⟫_𝕜",
" (starRingEnd 𝕜) ({ inner := fun x y => ∑ i : ι, InnerProductSpace.toInner.1 (x i) (y i) }.1 y x) =\n { inner := fun x y => ∑ i : ι, InnerProductSpace.toInner.1 (x i) (y i)... |
import Mathlib.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 | 192 | 196 | theorem _root_.Acc.of_fibration (fib : Fibration rα rβ f) {a} (ha : Acc rα a) : Acc rβ (f a) := by |
induction' ha with a _ ih
refine Acc.intro (f a) fun b hr ↦ ?_
obtain ⟨a', hr', rfl⟩ := fib hr
exact ih a' hr'
| [
" Acc rβ (f a)",
" Acc rβ b",
" Acc rβ (f a')"
] | [] |
import Mathlib.Topology.Order.LeftRightNhds
open Set Filter TopologicalSpace Topology Function
open OrderDual (toDual ofDual)
variable {α β γ : Type*}
section OrderTopology
variable [TopologicalSpace α] [TopologicalSpace β] [LinearOrder α] [LinearOrder β] [OrderTopology α]
[OrderTopology β]
| Mathlib/Topology/Order/IsLUB.lean | 24 | 32 | theorem IsLUB.frequently_mem {a : α} {s : Set α} (ha : IsLUB s a) (hs : s.Nonempty) :
∃ᶠ x in 𝓝[≤] a, x ∈ s := by |
rcases hs with ⟨a', ha'⟩
intro h
rcases (ha.1 ha').eq_or_lt with (rfl | ha'a)
· exact h.self_of_nhdsWithin le_rfl ha'
· rcases (mem_nhdsWithin_Iic_iff_exists_Ioc_subset' ha'a).1 h with ⟨b, hba, hb⟩
rcases ha.exists_between hba with ⟨b', hb's, hb'⟩
exact hb hb' hb's
| [
" ∃ᶠ (x : α) in 𝓝[≤] a, x ∈ s",
" False"
] | [] |
import Mathlib.CategoryTheory.Limits.Shapes.Pullbacks
import Mathlib.CategoryTheory.Limits.Preserves.Basic
#align_import category_theory.limits.preserves.shapes.pullbacks from "leanprover-community/mathlib"@"f11e306adb9f2a393539d2bb4293bf1b42caa7ac"
noncomputable section
universe v₁ v₂ u₁ u₂
-- Porting note: ne... | Mathlib/CategoryTheory/Limits/Preserves/Shapes/Pullbacks.lean | 245 | 247 | theorem PreservesPushout.inr_iso_inv :
G.map pushout.inr ≫ (PreservesPushout.iso G f g).inv = pushout.inr := by |
simp [PreservesPushout.iso, Iso.comp_inv_eq]
| [
" G.map f ≫ G.map h = G.map g ≫ G.map k",
" ∀ (j : WalkingSpan),\n ((Cocones.precompose (diagramIsoSpan (span f g ⋙ G)).symm.hom).obj (G.mapCocone (PushoutCocone.mk h k comm))).ι.app\n j ≫\n (Iso.refl\n ((Cocones.precompose (diagramIsoSpan (span f g ⋙ G)).symm.hom).obj\n ... | [
" G.map f ≫ G.map h = G.map g ≫ G.map k",
" ∀ (j : WalkingSpan),\n ((Cocones.precompose (diagramIsoSpan (span f g ⋙ G)).symm.hom).obj (G.mapCocone (PushoutCocone.mk h k comm))).ι.app\n j ≫\n (Iso.refl\n ((Cocones.precompose (diagramIsoSpan (span f g ⋙ G)).symm.hom).obj\n ... |
import Mathlib.Data.Fintype.Card
import Mathlib.Data.Finset.Option
#align_import data.fintype.option from "leanprover-community/mathlib"@"509de852e1de55e1efa8eacfa11df0823f26f226"
assert_not_exists MonoidWithZero
assert_not_exists MulAction
open Function
open Nat
universe u v
variable {α β γ : Type*}
open Fin... | Mathlib/Data/Fintype/Option.lean | 94 | 106 | theorem induction_empty_option {P : ∀ (α : Type u) [Fintype α], Prop}
(of_equiv : ∀ (α β) [Fintype β] (e : α ≃ β), @P α (@Fintype.ofEquiv α β ‹_› e.symm) → @P β ‹_›)
(h_empty : P PEmpty) (h_option : ∀ (α) [Fintype α], P α → P (Option α)) (α : Type u)
[h_fintype : Fintype α] : P α := by |
obtain ⟨p⟩ :=
let f_empty := fun i => by convert h_empty
let h_option : ∀ {α : Type u} [Fintype α] [DecidableEq α],
(∀ (h : Fintype α), P α) → ∀ (h : Fintype (Option α)), P (Option α) := by
rintro α hα - Pα hα'
convert h_option α (Pα _)
@truncRecEmptyOption (fun α => ∀ h, @P α h) (... | [
" a ∈ insertNone univ",
" none ∉ map Embedding.some univ",
" Trunc (P (ULift.{u, 0} (Fin zero)))",
" card PEmpty.{?u.2644 + 1} = card (ULift.{?u.2654, 0} (Fin 0))",
" PEmpty.{?u.2644 + 1} ≃ ULift.{?u.2654, 0} (Fin 0) → Trunc (P (ULift.{u, 0} (Fin zero)))",
" P (ULift.{u, 0} (Fin zero))",
" Trunc (P (ULi... | [
" a ∈ insertNone univ",
" none ∉ map Embedding.some univ",
" Trunc (P (ULift.{u, 0} (Fin zero)))",
" card PEmpty.{?u.2644 + 1} = card (ULift.{?u.2654, 0} (Fin 0))",
" PEmpty.{?u.2644 + 1} ≃ ULift.{?u.2654, 0} (Fin 0) → Trunc (P (ULift.{u, 0} (Fin zero)))",
" P (ULift.{u, 0} (Fin zero))",
" Trunc (P (ULi... |
import Mathlib.Algebra.Group.Subgroup.Finite
import Mathlib.Algebra.Group.Subgroup.Pointwise
import Mathlib.GroupTheory.Congruence.Basic
import Mathlib.GroupTheory.Coset
#align_import group_theory.quotient_group from "leanprover-community/mathlib"@"59694bd07f0a39c5beccba34bd9f413a160782bf"
open Function
open scope... | Mathlib/GroupTheory/QuotientGroup.lean | 108 | 113 | theorem sound (U : Set (G ⧸ N)) (g : N.op) :
g • (mk' N) ⁻¹' U = (mk' N) ⁻¹' U := by |
ext x
simp only [Set.mem_preimage, Set.mem_smul_set_iff_inv_smul_mem]
congr! 1
exact Quotient.sound ⟨g⁻¹, rfl⟩
| [
" Setoid.r (a * c) (b * d)",
" (fun x y => x⁻¹ * y ∈ N) (a * c) (b * d)",
" (a * c)⁻¹ * (b * d) ∈ N",
" (a * c)⁻¹ * (b * d) = c⁻¹ * (a⁻¹ * b) * c⁻¹⁻¹ * (c⁻¹ * d)",
" x⁻¹ * y ∈ N ↔ ∃ z ∈ N, x * z = y",
" g • ⇑(mk' N) ⁻¹' U = ⇑(mk' N) ⁻¹' U",
" x ∈ g • ⇑(mk' N) ⁻¹' U ↔ x ∈ ⇑(mk' N) ⁻¹' U",
" (mk' N) (g⁻... | [
" Setoid.r (a * c) (b * d)",
" (fun x y => x⁻¹ * y ∈ N) (a * c) (b * d)",
" (a * c)⁻¹ * (b * d) ∈ N",
" (a * c)⁻¹ * (b * d) = c⁻¹ * (a⁻¹ * b) * c⁻¹⁻¹ * (c⁻¹ * d)",
" x⁻¹ * y ∈ N ↔ ∃ z ∈ N, x * z = y"
] |
import Mathlib.GroupTheory.Coprod.Basic
import Mathlib.GroupTheory.Complement
open Monoid Coprod Multiplicative Subgroup Function
def HNNExtension.con (G : Type*) [Group G] (A B : Subgroup G) (φ : A ≃* B) :
Con (G ∗ Multiplicative ℤ) :=
conGen (fun x y => ∃ (a : A),
x = inr (ofAdd 1) * inl (a : G) ∧
... | Mathlib/GroupTheory/HNNExtension.lean | 164 | 170 | theorem toSubgroupEquiv_neg_apply (u : ℤˣ) (a : toSubgroup A B u) :
(toSubgroupEquiv φ (-u) (toSubgroupEquiv φ u a) : G) = a := by |
rcases Int.units_eq_one_or u with rfl | rfl
· -- This used to be `simp` before leanprover/lean4#2644
simp; erw [MulEquiv.symm_apply_apply]
· simp only [toSubgroup_neg_one, toSubgroupEquiv_neg_one, SetLike.coe_eq_coe]
exact φ.apply_symm_apply a
| [
" Group (HNNExtension G A B φ)",
" Group (HNNExtension.con G A B φ).Quotient",
" (fun x x_1 => x * x_1) (inr (ofAdd 1)) (inl ↑a) = inr (ofAdd 1) * inl ↑a ∧\n (fun x x_1 => x * x_1) (inl ↑(φ a)) (inr (ofAdd 1)) = inl ↑(φ a) * inr (ofAdd 1)",
" of ↑b * t = t * of ↑(φ.symm b)",
" of ↑b * t = of ↑(φ (φ.symm ... | [
" Group (HNNExtension G A B φ)",
" Group (HNNExtension.con G A B φ).Quotient",
" (fun x x_1 => x * x_1) (inr (ofAdd 1)) (inl ↑a) = inr (ofAdd 1) * inl ↑a ∧\n (fun x x_1 => x * x_1) (inl ↑(φ a)) (inr (ofAdd 1)) = inl ↑(φ a) * inr (ofAdd 1)",
" of ↑b * t = t * of ↑(φ.symm b)",
" of ↑b * t = of ↑(φ (φ.symm ... |
import Mathlib.Data.Set.Function
import Mathlib.Order.Interval.Set.OrdConnected
#align_import data.set.intervals.proj_Icc from "leanprover-community/mathlib"@"4e24c4bfcff371c71f7ba22050308aa17815626c"
variable {α β : Type*} [LinearOrder α]
open Function
namespace Set
def projIci (a x : α) : Ici a := ⟨max a x,... | Mathlib/Order/Interval/Set/ProjIcc.lean | 116 | 116 | theorem projIic_of_mem (hx : x ∈ Iic b) : projIic b x = ⟨x, hx⟩ := by | simpa [projIic]
| [
" projIcc a b h x = ⟨a, ⋯⟩",
" projIcc a b h x = ⟨b, ⋯⟩",
" projIci a x = ⟨a, ⋯⟩ ↔ x ≤ a",
" projIic b x = ⟨b, ⋯⟩ ↔ b ≤ x",
" projIcc a b ⋯ x = ⟨a, ⋯⟩ ↔ x ≤ a",
" projIcc a b ⋯ x = ⟨b, ⋯⟩ ↔ b ≤ x",
" projIci a x = ⟨x, hx⟩",
" projIic b x = ⟨x, hx⟩"
] | [
" projIcc a b h x = ⟨a, ⋯⟩",
" projIcc a b h x = ⟨b, ⋯⟩",
" projIci a x = ⟨a, ⋯⟩ ↔ x ≤ a",
" projIic b x = ⟨b, ⋯⟩ ↔ b ≤ x",
" projIcc a b ⋯ x = ⟨a, ⋯⟩ ↔ x ≤ a",
" projIcc a b ⋯ x = ⟨b, ⋯⟩ ↔ b ≤ x",
" projIci a x = ⟨x, hx⟩"
] |
import Mathlib.MeasureTheory.Function.SimpleFunc
import Mathlib.MeasureTheory.Constructions.BorelSpace.Metrizable
#align_import measure_theory.function.simple_func_dense from "leanprover-community/mathlib"@"7317149f12f55affbc900fc873d0d422485122b9"
open Set Function Filter TopologicalSpace ENNReal EMetric Finset
... | Mathlib/MeasureTheory/Function/SimpleFuncDense.lean | 102 | 113 | theorem edist_nearestPt_le (e : ℕ → α) (x : α) {k N : ℕ} (hk : k ≤ N) :
edist (nearestPt e N x) x ≤ edist (e k) x := by |
induction' N with N ihN generalizing k
· simp [nonpos_iff_eq_zero.1 hk, le_refl]
· simp only [nearestPt, nearestPtInd_succ, map_apply]
split_ifs with h
· rcases hk.eq_or_lt with (rfl | hk)
exacts [le_rfl, (h k (Nat.lt_succ_iff.1 hk)).le]
· push_neg at h
rcases h with ⟨l, hlN, hxl⟩
r... | [
" ↑(nearestPtInd e (N + 1)) x = if ∀ k ≤ N, edist (e (N + 1)) x < edist (e k) x then N + 1 else ↑(nearestPtInd e N) x",
" (if x ∈ ⋂ k, ⋂ (_ : k ≤ N), {x | edist (e (N + 1)) x < edist (e k) x} then ↑(const α (N + 1)) x\n else ↑(nearestPtInd e N) x) =\n if ∀ k ≤ N, edist (e (N + 1)) x < edist (e k) x then N +... | [
" ↑(nearestPtInd e (N + 1)) x = if ∀ k ≤ N, edist (e (N + 1)) x < edist (e k) x then N + 1 else ↑(nearestPtInd e N) x",
" (if x ∈ ⋂ k, ⋂ (_ : k ≤ N), {x | edist (e (N + 1)) x < edist (e k) x} then ↑(const α (N + 1)) x\n else ↑(nearestPtInd e N) x) =\n if ∀ k ≤ N, edist (e (N + 1)) x < edist (e k) x then N +... |
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 | 124 | 134 | theorem norm_sub_modPart (h : ‖(r : ℚ_[p])‖ ≤ 1) : ‖(⟨r, h⟩ - modPart p r : ℤ_[p])‖ < 1 := by |
let n := modPart p r
rw [norm_lt_one_iff_dvd, ← (isUnit_den r h).dvd_mul_right]
suffices ↑p ∣ r.num - n * r.den by
convert (Int.castRingHom ℤ_[p]).map_dvd this
simp only [sub_mul, Int.cast_natCast, eq_intCast, Int.cast_mul, sub_left_inj, Int.cast_sub]
apply Subtype.coe_injective
simp only [coe_mu... | [
" 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",
" ↑p ∣ r.num - r... |
import Mathlib.Analysis.Calculus.TangentCone
import Mathlib.Analysis.NormedSpace.OperatorNorm.Asymptotics
#align_import analysis.calculus.fderiv.basic from "leanprover-community/mathlib"@"41bef4ae1254365bc190aee63b947674d2977f01"
open Filter Asymptotics ContinuousLinearMap Set Metric
open scoped Classical
open To... | Mathlib/Analysis/Calculus/FDeriv/Basic.lean | 225 | 228 | theorem fderivWithin_zero_of_not_differentiableWithinAt (h : ¬DifferentiableWithinAt 𝕜 f s x) :
fderivWithin 𝕜 f s x = 0 := by |
have : ¬∃ f', HasFDerivWithinAt f f' s x := h
simp [fderivWithin, this]
| [
" fderivWithin 𝕜 f s x = 0",
" 𝓝[s \\ {x}] x = ⊥",
" 𝓝[s \\ {x}] x ≤ 𝓝[s] x"
] | [
" fderivWithin 𝕜 f s x = 0",
" 𝓝[s \\ {x}] x = ⊥",
" 𝓝[s \\ {x}] x ≤ 𝓝[s] x"
] |
import Mathlib.Algebra.Module.Submodule.Lattice
import Mathlib.Data.ZMod.Basic
import Mathlib.Order.OmegaCompletePartialOrder
variable {n : ℕ} {M M₁ : Type*}
abbrev AddCommMonoid.zmodModule [NeZero n] [AddCommMonoid M] (h : ∀ (x : M), n • x = 0) :
Module (ZMod n) M := by
have h_mod (c : ℕ) (x : M) : (c % n)... | Mathlib/Data/ZMod/Module.lean | 54 | 56 | theorem smul_mem (hx : x ∈ K) (c : ZMod n) : c • x ∈ K := by |
rw [← ZMod.intCast_zmod_cast c, ← zsmul_eq_smul_cast]
exact zsmul_mem hx (cast c)
| [
" Module (ZMod n) M",
" (c % n) • x = c • x",
" (c % n + c / n * n) • x = c • x",
" Module (ZMod (n + 1)) M",
" f (c • x) = c • f x",
" f (↑c.cast • x) = ↑c.cast • f x",
" c • x ∈ K",
" c.cast • x ∈ K"
] | [
" Module (ZMod n) M",
" (c % n) • x = c • x",
" (c % n + c / n * n) • x = c • x",
" Module (ZMod (n + 1)) M",
" f (c • x) = c • f x",
" f (↑c.cast • x) = ↑c.cast • f x"
] |
import Mathlib.MeasureTheory.Measure.MeasureSpace
import Mathlib.MeasureTheory.Constructions.BorelSpace.Basic
#align_import measure_theory.measure.open_pos from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982"
open Topology ENNReal MeasureTheory
open Set Function Filter
namespace Measur... | Mathlib/MeasureTheory/Measure/OpenPos.lean | 57 | 59 | theorem _root_.IsOpen.measure_eq_zero_iff (hU : IsOpen U) : μ U = 0 ↔ U = ∅ := by |
simpa only [not_lt, nonpos_iff_eq_zero, not_nonempty_iff_eq_empty] using
not_congr (hU.measure_pos_iff μ)
| [
" μ U = 0 ↔ U = ∅"
] | [] |
import Mathlib.Analysis.Calculus.Deriv.Pow
import Mathlib.Analysis.Calculus.Deriv.Inv
#align_import analysis.calculus.deriv.zpow from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe"
universe u v w
open scoped Classical
open Topology Filter
open Filter Asymptotics Set
variable {𝕜 : Typ... | Mathlib/Analysis/Calculus/Deriv/ZPow.lean | 86 | 92 | theorem deriv_zpow (m : ℤ) (x : 𝕜) : deriv (fun x => x ^ m) x = m * x ^ (m - 1) := by |
by_cases H : x ≠ 0 ∨ 0 ≤ m
· exact (hasDerivAt_zpow m x H).deriv
· rw [deriv_zero_of_not_differentiableAt (mt differentiableAt_zpow.1 H)]
push_neg at H
rcases H with ⟨rfl, hm⟩
rw [zero_zpow _ ((sub_one_lt _).trans hm).ne, mul_zero]
| [
" HasStrictDerivAt (fun x => x ^ m) (↑m * x ^ (m - 1)) x",
" HasStrictDerivAt (fun x => x ^ ↑m) (↑↑m * x ^ (↑m - 1)) x",
" HasStrictDerivAt (fun x => x ^ m) (↑m * x ^ (↑m - 1)) x",
" x ^ (↑m - 1) = x ^ (m - 1)",
" 1 ≤ m",
" x ^ (-m) ≠ 0",
" ↑m * x ^ (m - 1) = ↑(-m) * x ^ (-m - 1) * -((x ^ m)⁻¹ ^ 2)⁻¹",
... | [
" HasStrictDerivAt (fun x => x ^ m) (↑m * x ^ (m - 1)) x",
" HasStrictDerivAt (fun x => x ^ ↑m) (↑↑m * x ^ (↑m - 1)) x",
" HasStrictDerivAt (fun x => x ^ m) (↑m * x ^ (↑m - 1)) x",
" x ^ (↑m - 1) = x ^ (m - 1)",
" 1 ≤ m",
" x ^ (-m) ≠ 0",
" ↑m * x ^ (m - 1) = ↑(-m) * x ^ (-m - 1) * -((x ^ m)⁻¹ ^ 2)⁻¹",
... |
import Batteries.Classes.Order
namespace Batteries.PairingHeapImp
inductive Heap (α : Type u) where
| nil : Heap α
| node (a : α) (child sibling : Heap α) : Heap α
deriving Repr
def Heap.size : Heap α → Nat
| .nil => 0
| .node _ c s => c.size + 1 + s.size
def Heap.singleton (a : α) : Heap α := .... | .lake/packages/batteries/Batteries/Data/PairingHeap.lean | 90 | 93 | theorem Heap.noSibling_merge (le) (s₁ s₂ : Heap α) :
(s₁.merge le s₂).NoSibling := by |
unfold merge
(split <;> try split) <;> constructor
| [
" (merge le s₁ s₂).NoSibling",
" (match s₁, s₂ with\n | nil, nil => nil\n | nil, node a₂ c₂ sibling => node a₂ c₂ nil\n | node a₁ c₁ sibling, nil => node a₁ c₁ nil\n | node a₁ c₁ sibling, node a₂ c₂ sibling_1 =>\n if le a₁ a₂ = true then node a₁ (node a₂ c₂ c₁) nil else node a₂ (node a₁ c₁ c₂) ni... | [] |
import Mathlib.Algebra.Group.Even
import Mathlib.Algebra.Order.Monoid.Canonical.Defs
import Mathlib.Algebra.Order.Sub.Defs
#align_import algebra.order.sub.canonical from "leanprover-community/mathlib"@"62a5626868683c104774de8d85b9855234ac807c"
variable {α : Type*}
section ExistsAddOfLE
variable [AddCommSemigrou... | Mathlib/Algebra/Order/Sub/Canonical.lean | 57 | 60 | theorem lt_of_tsub_lt_tsub_right_of_le (h : c ≤ b) (h2 : a - c < b - c) : a < b := by |
refine ((tsub_le_tsub_iff_right h).mp h2.le).lt_of_ne ?_
rintro rfl
exact h2.false
| [
" a + (b - a) = b",
" a + (b - a) ≤ b",
" a + (a + c - a) ≤ a + c",
" b - a + a = b",
" a - c ≤ b - c ↔ a ≤ b",
" a - c = b - c ↔ a = b",
" a < b",
" a ≠ b",
" False"
] | [
" a + (b - a) = b",
" a + (b - a) ≤ b",
" a + (a + c - a) ≤ a + c",
" b - a + a = b",
" a - c ≤ b - c ↔ a ≤ b",
" a - c = b - c ↔ a = b"
] |
import Mathlib.Algebra.Polynomial.AlgebraMap
import Mathlib.Algebra.Polynomial.Derivative
import Mathlib.Data.Nat.Choose.Cast
import Mathlib.NumberTheory.Bernoulli
#align_import number_theory.bernoulli_polynomials from "leanprover-community/mathlib"@"ca3d21f7f4fd613c2a3c54ac7871163e1e5ecb3a"
noncomputable section... | Mathlib/NumberTheory/BernoulliPolynomials.lean | 76 | 82 | theorem bernoulli_eval_zero (n : ℕ) : (bernoulli n).eval 0 = _root_.bernoulli n := by |
rw [bernoulli, eval_finset_sum, sum_range_succ]
have : ∑ x ∈ range n, _root_.bernoulli x * n.choose x * 0 ^ (n - x) = 0 := by
apply sum_eq_zero fun x hx => _
intros x hx
simp [tsub_eq_zero_iff_le, mem_range.1 hx]
simp [this]
| [
" bernoulli n = ∑ i ∈ range (n + 1), (monomial i) (_root_.bernoulli (n - i) * ↑(n.choose i))",
" ∑ i ∈ range (n + 1), (monomial (n - i)) (_root_.bernoulli i * ↑(n.choose i)) =\n ∑ j ∈ range (n + 1), (monomial (n - j)) (_root_.bernoulli (n - (n - j)) * ↑(n.choose (n - j)))",
" ∀ x ∈ range (n + 1),\n (monom... | [
" bernoulli n = ∑ i ∈ range (n + 1), (monomial i) (_root_.bernoulli (n - i) * ↑(n.choose i))",
" ∑ i ∈ range (n + 1), (monomial (n - i)) (_root_.bernoulli i * ↑(n.choose i)) =\n ∑ j ∈ range (n + 1), (monomial (n - j)) (_root_.bernoulli (n - (n - j)) * ↑(n.choose (n - j)))",
" ∀ x ∈ range (n + 1),\n (monom... |
import Mathlib.Data.Fintype.Basic
import Mathlib.GroupTheory.Perm.Sign
import Mathlib.Logic.Equiv.Defs
#align_import logic.equiv.fintype from "leanprover-community/mathlib"@"9407b03373c8cd201df99d6bc5514fc2db44054f"
namespace Equiv
variable {α β : Type*} [Finite α]
noncomputable def toCompl {p q : α → Prop} (e ... | Mathlib/Logic/Equiv/Fintype.lean | 132 | 135 | theorem extendSubtype_mem (e : { x // p x } ≃ { x // q x }) (x) (hx : p x) :
q (e.extendSubtype x) := by |
convert (e ⟨x, hx⟩).2
rw [e.extendSubtype_apply_of_mem _ hx]
| [
" { x // ¬p x } ≃ { x // ¬q x }",
" Nonempty ({ x // ¬p x } ≃ { x // ¬q x })",
" e.extendSubtype x = ↑(e ⟨x, hx⟩)",
" (e.subtypeCongr e.toCompl) x = ↑(e ⟨x, hx⟩)",
" (sumCompl fun x => q x) (Sum.map (⇑e) (⇑e.toCompl) ((sumCompl fun x => p x).symm x)) = ↑(e ⟨x, hx⟩)",
" q (e.extendSubtype x)"
] | [
" { x // ¬p x } ≃ { x // ¬q x }",
" Nonempty ({ x // ¬p x } ≃ { x // ¬q x })",
" e.extendSubtype x = ↑(e ⟨x, hx⟩)",
" (e.subtypeCongr e.toCompl) x = ↑(e ⟨x, hx⟩)",
" (sumCompl fun x => q x) (Sum.map (⇑e) (⇑e.toCompl) ((sumCompl fun x => p x).symm x)) = ↑(e ⟨x, hx⟩)"
] |
import Mathlib.Algebra.Order.Ring.Nat
import Mathlib.Data.List.Chain
#align_import data.bool.count from "leanprover-community/mathlib"@"8631e2d5ea77f6c13054d9151d82b83069680cb1"
namespace List
@[simp]
theorem count_not_add_count (l : List Bool) (b : Bool) : count (!b) l + count b l = length l := by
-- Porting ... | Mathlib/Data/Bool/Count.lean | 79 | 87 | theorem count_not_le_count_add_one (hl : Chain' (· ≠ ·) l) (b : Bool) :
count (!b) l ≤ count b l + 1 := by |
cases' l with x l
· exact zero_le _
obtain rfl | rfl : b = x ∨ b = !x := by simp only [Bool.eq_not_iff, em]
· rw [count_cons_of_ne b.not_ne_self, count_cons_self, hl.count_not, add_assoc]
exact add_le_add_left (Nat.mod_lt _ two_pos).le _
· rw [Bool.not_not, count_cons_self, count_cons_of_ne x.not_ne_self... | [
" count (!b) l + count b l = l.length",
" countP (fun x => x == b) l = countP (fun a => decide ¬(a == !b) = true) l",
" (fun x => x == b) = fun a => decide ¬(a == !b) = true",
" (x == b) = decide ¬(x == !b) = true",
" (false == b) = decide ¬(false == !b) = true",
" (true == b) = decide ¬(true == !b) = tru... | [
" count (!b) l + count b l = l.length",
" countP (fun x => x == b) l = countP (fun a => decide ¬(a == !b) = true) l",
" (fun x => x == b) = fun a => decide ¬(a == !b) = true",
" (x == b) = decide ¬(x == !b) = true",
" (false == b) = decide ¬(false == !b) = true",
" (true == b) = decide ¬(true == !b) = tru... |
import Mathlib.Algebra.Group.Commute.Basic
import Mathlib.Data.Fintype.Card
import Mathlib.GroupTheory.Perm.Basic
#align_import group_theory.perm.support from "leanprover-community/mathlib"@"9003f28797c0664a49e4179487267c494477d853"
open Equiv Finset
namespace Equiv.Perm
variable {α : Type*}
section support
v... | Mathlib/GroupTheory/Perm/Support.lean | 304 | 306 | theorem coe_support_eq_set_support (f : Perm α) : (f.support : Set α) = { x | f x ≠ x } := by |
ext
simp
| [
" x ∈ f.support ↔ f x ≠ x",
" x ∉ f.support ↔ f x = x",
" ↑f.support = {x | f x ≠ x}",
" x✝ ∈ ↑f.support ↔ x✝ ∈ {x | f x ≠ x}"
] | [
" x ∈ f.support ↔ f x ≠ x",
" x ∉ f.support ↔ f x = x"
] |
import Mathlib.Analysis.Convex.Hull
import Mathlib.LinearAlgebra.AffineSpace.Independent
#align_import analysis.convex.simplicial_complex.basic from "leanprover-community/mathlib"@"70fd9563a21e7b963887c9360bd29b2393e6225a"
open Finset Set
variable (𝕜 E : Type*) {ι : Type*} [OrderedRing 𝕜] [AddCommGroup E] [Mod... | Mathlib/Analysis/Convex/SimplicialComplex/Basic.lean | 158 | 162 | theorem vertices_eq : K.vertices = ⋃ k ∈ K.faces, (k : Set E) := by |
ext x
refine ⟨fun h => mem_biUnion h <| mem_coe.2 <| mem_singleton_self x, fun h => ?_⟩
obtain ⟨s, hs, hx⟩ := mem_iUnion₂.1 h
exact K.down_closed hs (Finset.singleton_subset_iff.2 <| mem_coe.1 hx) (singleton_ne_empty _)
| [
" x ∈ K.space ↔ ∃ s ∈ K.faces, x ∈ (convexHull 𝕜) ↑s",
" (convexHull 𝕜) ↑s ⊆ K.space",
" (convexHull 𝕜) ↑s = (convexHull 𝕜) ↑s",
" Disjoint ((convexHull 𝕜) ↑s) ((convexHull 𝕜) ↑t) ∨\n ∃ u ∈ K.faces, (convexHull 𝕜) ↑s ∩ (convexHull 𝕜) ↑t = (convexHull 𝕜) ↑u",
" False",
" (convexHull 𝕜) (↑s ∩ ↑... | [
" x ∈ K.space ↔ ∃ s ∈ K.faces, x ∈ (convexHull 𝕜) ↑s",
" (convexHull 𝕜) ↑s ⊆ K.space",
" (convexHull 𝕜) ↑s = (convexHull 𝕜) ↑s",
" Disjoint ((convexHull 𝕜) ↑s) ((convexHull 𝕜) ↑t) ∨\n ∃ u ∈ K.faces, (convexHull 𝕜) ↑s ∩ (convexHull 𝕜) ↑t = (convexHull 𝕜) ↑u",
" False",
" (convexHull 𝕜) (↑s ∩ ↑... |
import Mathlib.Algebra.BigOperators.Finprod
import Mathlib.Algebra.Group.ConjFinite
import Mathlib.Algebra.Group.Subgroup.Finite
import Mathlib.Data.Set.Card
import Mathlib.GroupTheory.Subgroup.Center
open MulAction ConjClasses
variable (G : Type*) [Group G]
theorem sum_conjClasses_card_eq_card [Fintype <| Conj... | Mathlib/GroupTheory/ClassEquation.lean | 72 | 81 | theorem Group.card_center_add_sum_card_noncenter_eq_card (G) [Group G]
[∀ x : ConjClasses G, Fintype x.carrier] [Fintype G] [Fintype <| Subgroup.center G]
[Fintype <| noncenter G] : Fintype.card (Subgroup.center G) +
∑ x ∈ (noncenter G).toFinset, x.carrier.toFinset.card = Fintype.card G := by |
convert Group.nat_card_center_add_sum_card_noncenter_eq_card G using 2
· simp
· rw [← finsum_set_coe_eq_finsum_mem (noncenter G), finsum_eq_sum_of_fintype,
← Finset.sum_set_coe]
simp
· simp
| [
" ∑ x : ConjClasses G, x.carrier.toFinset.card = Fintype.card G",
" (x : ConjClasses G) × ↑x.carrier ≃ G",
" ∑ᶠ (x : ConjClasses G), x.carrier.ncard = Nat.card G",
" ∑ i : ConjClasses G, i.carrier.ncard = ∑ x : ConjClasses G, x.carrier.toFinset.card",
" Nat.card ↥(Subgroup.center G) + ∑ᶠ (x : ConjClasses G)... | [
" ∑ x : ConjClasses G, x.carrier.toFinset.card = Fintype.card G",
" (x : ConjClasses G) × ↑x.carrier ≃ G",
" ∑ᶠ (x : ConjClasses G), x.carrier.ncard = Nat.card G",
" ∑ i : ConjClasses G, i.carrier.ncard = ∑ x : ConjClasses G, x.carrier.toFinset.card",
" Nat.card ↥(Subgroup.center G) + ∑ᶠ (x : ConjClasses G)... |
import Mathlib.Analysis.NormedSpace.PiLp
import Mathlib.Analysis.InnerProductSpace.PiL2
#align_import analysis.matrix from "leanprover-community/mathlib"@"46b633fd842bef9469441c0209906f6dddd2b4f5"
noncomputable section
open scoped NNReal Matrix
namespace Matrix
variable {R l m n α β : Type*} [Fintype l] [Fintyp... | Mathlib/Analysis/Matrix.lean | 290 | 292 | theorem linfty_opNNNorm_col (v : m → α) : ‖col v‖₊ = ‖v‖₊ := by |
rw [linfty_opNNNorm_def, Pi.nnnorm_def]
simp
| [
" SeminormedAddCommGroup (m → PiLp 1 fun j => α)",
" NormedAddCommGroup (m → PiLp 1 fun j => α)",
" BoundedSMul R (m → PiLp 1 fun j => α)",
" NormedSpace R (m → PiLp 1 fun j => α)",
" ‖A‖ = ↑(Finset.univ.sup fun i => ∑ j : n, ‖A i j‖₊)",
" ‖fun i => (WithLp.equiv 1 (n → α)).symm (A i)‖ = ↑(Finset.univ.sup... | [
" SeminormedAddCommGroup (m → PiLp 1 fun j => α)",
" NormedAddCommGroup (m → PiLp 1 fun j => α)",
" BoundedSMul R (m → PiLp 1 fun j => α)",
" NormedSpace R (m → PiLp 1 fun j => α)",
" ‖A‖ = ↑(Finset.univ.sup fun i => ∑ j : n, ‖A i j‖₊)",
" ‖fun i => (WithLp.equiv 1 (n → α)).symm (A i)‖ = ↑(Finset.univ.sup... |
import Mathlib.Analysis.NormedSpace.Multilinear.Curry
#align_import analysis.calculus.formal_multilinear_series from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982"
noncomputable section
open Set Fin Topology
-- Porting note: added explicit universes to fix compile
universe u u' v w x
... | Mathlib/Analysis/Calculus/FormalMultilinearSeries.lean | 111 | 114 | theorem removeZero_of_pos (p : FormalMultilinearSeries 𝕜 E F) {n : ℕ} (h : 0 < n) :
p.removeZero n = p n := by |
rw [← Nat.succ_pred_eq_of_pos h]
rfl
| [
" p.removeZero n = p n",
" p.removeZero n.pred.succ = p n.pred.succ"
] | [] |
import Batteries.Data.UInt
@[ext] theorem Char.ext : {a b : Char} → a.val = b.val → a = b
| ⟨_,_⟩, ⟨_,_⟩, rfl => rfl
theorem Char.ext_iff {x y : Char} : x = y ↔ x.val = y.val := ⟨congrArg _, Char.ext⟩
theorem Char.le_antisymm_iff {x y : Char} : x = y ↔ x ≤ y ∧ y ≤ x :=
Char.ext_iff.trans UInt32.le_antisymm_iff
... | .lake/packages/batteries/Batteries/Data/Char.lean | 33 | 34 | theorem csize_le_4 (c) : csize c ≤ 4 := by |
rcases csize_eq c with _|_|_|_ <;> simp_all (config := {decide := true})
| [] | [] |
import Mathlib.MeasureTheory.Measure.Restrict
open scoped ENNReal NNReal Topology
open Set MeasureTheory Measure Filter Function MeasurableSpace ENNReal
variable {α β δ ι : Type*}
namespace MeasureTheory
variable {m0 : MeasurableSpace α} [MeasurableSpace β] {μ ν ν₁ ν₂: Measure α}
{s t : Set α}
theorem ite_ae_... | Mathlib/MeasureTheory/Measure/Typeclasses.lean | 501 | 508 | theorem ite_ae_eq_of_measure_compl_zero {γ} (f : α → γ) (g : α → γ)
(s : Set α) [DecidablePred (· ∈ s)] (hs_zero : μ sᶜ = 0) :
(fun x => ite (x ∈ s) (f x) (g x)) =ᵐ[μ] f := by |
rw [← mem_ae_iff] at hs_zero
filter_upwards [hs_zero]
intros
split_ifs
rfl
| [
" (fun x => if x ∈ s then f x else g x) =ᶠ[ae μ] g",
" x ∈ {a | (if a ∈ s then f a else g a) = g a}",
" {x | (fun x => (fun x => if x ∈ s then f x else g x) x = g x) x}ᶜ ⊆ s",
"α : Type u_1\nβ : Type u_2\nδ : Type u_3\nι : Type u_4\nm0 : MeasurableSpace α\ninst✝¹ : MeasurableSpace β\nμ ν ν₁ ν₂ : Measure α\ns✝... | [
" (fun x => if x ∈ s then f x else g x) =ᶠ[ae μ] g",
" x ∈ {a | (if a ∈ s then f a else g a) = g a}",
" {x | (fun x => (fun x => if x ∈ s then f x else g x) x = g x) x}ᶜ ⊆ s",
"α : Type u_1\nβ : Type u_2\nδ : Type u_3\nι : Type u_4\nm0 : MeasurableSpace α\ninst✝¹ : MeasurableSpace β\nμ ν ν₁ ν₂ : Measure α\ns✝... |
import Mathlib.Order.BoundedOrder
#align_import data.prod.lex from "leanprover-community/mathlib"@"70d50ecfd4900dd6d328da39ab7ebd516abe4025"
variable {α β γ : Type*}
namespace Prod.Lex
@[inherit_doc] notation:35 α " ×ₗ " β:34 => Lex (Prod α β)
instance decidableEq (α β : Type*) [DecidableEq α] [DecidableEq β] ... | Mathlib/Data/Prod/Lex.lean | 122 | 126 | theorem toLex_strictMono : StrictMono (toLex : α × β → α ×ₗ β) := by |
rintro ⟨a₁, b₁⟩ ⟨a₂, b₂⟩ h
obtain rfl | ha : a₁ = a₂ ∨ _ := h.le.1.eq_or_lt
· exact right _ (Prod.mk_lt_mk_iff_right.1 h)
· exact left _ _ ha
| [
" (a₁, b₁) < (a₂, b₂) ↔ (a₁, b₁) ≤ (a₂, b₂) ∧ ¬(a₂, b₂) ≤ (a₁, b₁)",
" (a₁, b₁) < (a₂, b₂) → (a₁, b₁) ≤ (a₂, b₂) ∧ ¬(a₂, b₂) ≤ (a₁, b₁)",
" (a₁, b₁) ≤ (a₂, b₂) ∧ ¬(a₂, b₂) ≤ (a₁, b₁)",
" (a₁, b₁) ≤ (a₂, b₂)",
" ¬(a₂, b₂) ≤ (a₁, b₁)",
" False",
" a₂ < a₁",
" (a₁, b₁) ≤ (a₁, b₂) ∧ ¬(a₁, b₂) ≤ (a₁, b₁)",... | [
" (a₁, b₁) < (a₂, b₂) ↔ (a₁, b₁) ≤ (a₂, b₂) ∧ ¬(a₂, b₂) ≤ (a₁, b₁)",
" (a₁, b₁) < (a₂, b₂) → (a₁, b₁) ≤ (a₂, b₂) ∧ ¬(a₂, b₂) ≤ (a₁, b₁)",
" (a₁, b₁) ≤ (a₂, b₂) ∧ ¬(a₂, b₂) ≤ (a₁, b₁)",
" (a₁, b₁) ≤ (a₂, b₂)",
" ¬(a₂, b₂) ≤ (a₁, b₁)",
" False",
" a₂ < a₁",
" (a₁, b₁) ≤ (a₁, b₂) ∧ ¬(a₁, b₂) ≤ (a₁, b₁)",... |
import Mathlib.Algebra.Order.ToIntervalMod
import Mathlib.Algebra.Ring.AddAut
import Mathlib.Data.Nat.Totient
import Mathlib.GroupTheory.Divisible
import Mathlib.Topology.Connected.PathConnected
import Mathlib.Topology.IsLocalHomeomorph
#align_import topology.instances.add_circle from "leanprover-community/mathlib"@"... | Mathlib/Topology/Instances/AddCircle.lean | 231 | 237 | theorem liftIoc_coe_apply {f : 𝕜 → B} {x : 𝕜} (hx : x ∈ Ioc a (a + p)) :
liftIoc p a f ↑x = f x := by |
have : (equivIoc p a) x = ⟨x, hx⟩ := by
rw [Equiv.apply_eq_iff_eq_symm_apply]
rfl
rw [liftIoc, comp_apply, this]
rfl
| [
" ↑x = 0 ↔ ∃ n, n • p = x",
" (∃ n, n • p = x) ↔ ∃ n, n • p = x",
" (∃ n, n • p = x) → ∃ n, n • p = x",
" ∃ n_1, n_1 • p = n • p",
" 0 < n",
" n • p ≤ 0",
" n.toNat • p = n • p",
" ↑n • p = n • p",
" ↑(x + p) = ↑x",
" ↑x = ↑y ↔ x = y",
" x = y → ↑x = ↑y",
" x = y",
" ⟨x, hx⟩ = ⟨y, hy⟩",
" ... | [
" ↑x = 0 ↔ ∃ n, n • p = x",
" (∃ n, n • p = x) ↔ ∃ n, n • p = x",
" (∃ n, n • p = x) → ∃ n, n • p = x",
" ∃ n_1, n_1 • p = n • p",
" 0 < n",
" n • p ≤ 0",
" n.toNat • p = n • p",
" ↑n • p = n • p",
" ↑(x + p) = ↑x",
" ↑x = ↑y ↔ x = y",
" x = y → ↑x = ↑y",
" x = y",
" ⟨x, hx⟩ = ⟨y, hy⟩",
" ... |
import Mathlib.RingTheory.Ideal.QuotientOperations
import Mathlib.RingTheory.Localization.Basic
#align_import ring_theory.localization.ideal from "leanprover-community/mathlib"@"e7f0ddbf65bd7181a85edb74b64bdc35ba4bdc74"
namespace IsLocalization
section CommSemiring
variable {R : Type*} [CommSemiring R] (M : Sub... | Mathlib/RingTheory/Localization/Ideal.lean | 108 | 132 | theorem isPrime_iff_isPrime_disjoint (J : Ideal S) :
J.IsPrime ↔
(Ideal.comap (algebraMap R S) J).IsPrime ∧
Disjoint (M : Set R) ↑(Ideal.comap (algebraMap R S) J) := by |
constructor
· refine fun h =>
⟨⟨?_, ?_⟩,
Set.disjoint_left.mpr fun m hm1 hm2 =>
h.ne_top (Ideal.eq_top_of_isUnit_mem _ hm2 (map_units S ⟨m, hm1⟩))⟩
· refine fun hJ => h.ne_top ?_
rw [eq_top_iff, ← (orderEmbedding M S).le_iff_le]
exact le_of_eq hJ.symm
· intro x y hxy
... | [
" ∀ {a b : S},\n a ∈ {z | ∃ x, z * (algebraMap R S) ↑x.2 = (algebraMap R S) ↑x.1} →\n b ∈ {z | ∃ x, z * (algebraMap R S) ↑x.2 = (algebraMap R S) ↑x.1} →\n a + b ∈ {z | ∃ x, z * (algebraMap R S) ↑x.2 = (algebraMap R S) ↑x.1}",
" a + b ∈ {z | ∃ x, z * (algebraMap R S) ↑x.2 = (algebraMap R S) ↑x.1}",
... | [
" ∀ {a b : S},\n a ∈ {z | ∃ x, z * (algebraMap R S) ↑x.2 = (algebraMap R S) ↑x.1} →\n b ∈ {z | ∃ x, z * (algebraMap R S) ↑x.2 = (algebraMap R S) ↑x.1} →\n a + b ∈ {z | ∃ x, z * (algebraMap R S) ↑x.2 = (algebraMap R S) ↑x.1}",
" a + b ∈ {z | ∃ x, z * (algebraMap R S) ↑x.2 = (algebraMap R S) ↑x.1}",
... |
import Mathlib.Order.Interval.Set.ProjIcc
import Mathlib.Topology.Algebra.Order.Field
import Mathlib.Topology.Bornology.Hom
import Mathlib.Topology.EMetricSpace.Lipschitz
import Mathlib.Topology.MetricSpace.Basic
import Mathlib.Topology.MetricSpace.Bounded
#align_import topology.metric_space.lipschitz from "leanprove... | Mathlib/Topology/MetricSpace/Lipschitz.lean | 51 | 55 | theorem lipschitzOnWith_iff_dist_le_mul [PseudoMetricSpace α] [PseudoMetricSpace β] {K : ℝ≥0}
{s : Set α} {f : α → β} :
LipschitzOnWith K f s ↔ ∀ x ∈ s, ∀ y ∈ s, dist (f x) (f y) ≤ K * dist x y := by |
simp only [LipschitzOnWith, edist_nndist, dist_nndist]
norm_cast
| [
" LipschitzWith K f ↔ ∀ (x y : α), dist (f x) (f y) ≤ ↑K * dist x y",
" (∀ (x y : α), ↑(nndist (f x) (f y)) ≤ ↑K * ↑(nndist x y)) ↔ ∀ (x y : α), ↑(nndist (f x) (f y)) ≤ ↑K * ↑(nndist x y)",
" LipschitzOnWith K f s ↔ ∀ x ∈ s, ∀ y ∈ s, dist (f x) (f y) ≤ ↑K * dist x y",
" (∀ ⦃x : α⦄, x ∈ s → ∀ ⦃y : α⦄, y ∈ s → ... | [
" LipschitzWith K f ↔ ∀ (x y : α), dist (f x) (f y) ≤ ↑K * dist x y",
" (∀ (x y : α), ↑(nndist (f x) (f y)) ≤ ↑K * ↑(nndist x y)) ↔ ∀ (x y : α), ↑(nndist (f x) (f y)) ≤ ↑K * ↑(nndist x y)"
] |
import Mathlib.RingTheory.DedekindDomain.Ideal
#align_import ring_theory.dedekind_domain.factorization from "leanprover-community/mathlib"@"2f588be38bb5bec02f218ba14f82fc82eb663f87"
noncomputable section
open scoped Classical nonZeroDivisors
open Set Function UniqueFactorizationMonoid IsDedekindDomain IsDedekind... | Mathlib/RingTheory/DedekindDomain/Factorization.lean | 122 | 127 | theorem finite_mulSupport_inv {I : Ideal R} (hI : I ≠ 0) :
(mulSupport fun v : HeightOneSpectrum R => (v.asIdeal : FractionalIdeal R⁰ K) ^
(-((Associates.mk v.asIdeal).count (Associates.mk I).factors : ℤ))).Finite := by |
rw [mulSupport]
simp_rw [zpow_neg, Ne, inv_eq_one]
exact finite_mulSupport_coe hI
| [
" {v | v.asIdeal ∣ I}.Finite",
" Finite { x // x.asIdeal ∣ I }",
" Injective fun v => ⟨(↑v).asIdeal, ⋯⟩",
" v = w",
" ∀ᶠ (v : HeightOneSpectrum R) in Filter.cofinite, ↑((Associates.mk v.asIdeal).count (Associates.mk I).factors) = 0",
" {v | ¬↑((Associates.mk v.asIdeal).count (Associates.mk I).factors) = 0... | [
" {v | v.asIdeal ∣ I}.Finite",
" Finite { x // x.asIdeal ∣ I }",
" Injective fun v => ⟨(↑v).asIdeal, ⋯⟩",
" v = w",
" ∀ᶠ (v : HeightOneSpectrum R) in Filter.cofinite, ↑((Associates.mk v.asIdeal).count (Associates.mk I).factors) = 0",
" {v | ¬↑((Associates.mk v.asIdeal).count (Associates.mk I).factors) = 0... |
import Mathlib.Algebra.BigOperators.Fin
import Mathlib.Algebra.Polynomial.Degree.Lemmas
#align_import data.polynomial.erase_lead from "leanprover-community/mathlib"@"fa256f00ce018e7b40e1dc756e403c86680bf448"
noncomputable section
open Polynomial
open Polynomial Finset
namespace Polynomial
variable {R : Type*}... | Mathlib/Algebra/Polynomial/EraseLead.lean | 52 | 52 | theorem eraseLead_coeff_natDegree : f.eraseLead.coeff f.natDegree = 0 := by | simp [eraseLead_coeff]
| [
" f.eraseLead.support = f.support.erase f.natDegree",
" f.eraseLead.coeff i = if i = f.natDegree then 0 else f.coeff i",
" f.eraseLead.coeff f.natDegree = 0"
] | [
" f.eraseLead.support = f.support.erase f.natDegree",
" f.eraseLead.coeff i = if i = f.natDegree then 0 else f.coeff i"
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.