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.MeasureTheory.MeasurableSpace.Defs
import Mathlib.SetTheory.Cardinal.Cofinality
import Mathlib.SetTheory.Cardinal.Continuum
#align_import measure_theory.card_measurable_space from "leanprover-community/mathlib"@"f2b108e8e97ba393f22bf794989984ddcc1da89b"
universe u
variable {α : Type u}
open Cardi... | Mathlib/MeasureTheory/MeasurableSpace/Card.lean | 55 | 59 | theorem self_subset_generateMeasurableRec (s : Set (Set α)) (i : ω₁) :
s ⊆ generateMeasurableRec s i := by |
unfold generateMeasurableRec
apply_rules [subset_union_of_subset_left]
exact subset_rfl
| [
" (invImage (fun x => x) (hasWellFoundedOut (aleph 1).ord)).1 (↑j) a✝",
" s ⊆ generateMeasurableRec s i",
" s ⊆\n let i := i;\n let S := ⋃ j, generateMeasurableRec s ↑j;\n s ∪ {∅} ∪ compl '' S ∪ range fun f => ⋃ n, ↑(f n)",
" s ⊆ s"
] | [
" (invImage (fun x => x) (hasWellFoundedOut (aleph 1).ord)).1 (↑j) a✝"
] |
import Mathlib.Analysis.Complex.CauchyIntegral
import Mathlib.Analysis.NormedSpace.Completion
import Mathlib.Analysis.NormedSpace.Extr
import Mathlib.Topology.Order.ExtrClosure
#align_import analysis.complex.abs_max from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982"
open TopologicalSpa... | Mathlib/Analysis/Complex/AbsMax.lean | 144 | 151 | theorem norm_max_aux₂ {f : ℂ → F} {z w : ℂ} (hd : DiffContOnCl ℂ f (ball z (dist w z)))
(hz : IsMaxOn (norm ∘ f) (closedBall z (dist w z)) z) : ‖f w‖ = ‖f z‖ := by |
set e : F →L[ℂ] F̂ := UniformSpace.Completion.toComplL
have he : ∀ x, ‖e x‖ = ‖x‖ := UniformSpace.Completion.norm_coe
replace hz : IsMaxOn (norm ∘ e ∘ f) (closedBall z (dist w z)) z := by
simpa only [IsMaxOn, (· ∘ ·), he] using hz
simpa only [he, (· ∘ ·)]
using norm_max_aux₁ (e.differentiable.comp_diff... | [
" ‖f w‖ = ‖f z‖",
" ¬(norm ∘ f) w < (norm ∘ f) z",
" False",
" ‖∮ (ζ : ℂ) in C(z, r), (ζ - z)⁻¹ • f ζ‖ = 2 * π * ‖f z‖",
" ‖∮ (ζ : ℂ) in C(z, r), (ζ - z)⁻¹ • f ζ‖ < 2 * π * ‖f z‖",
" ‖∮ (ζ : ℂ) in C(z, r), (ζ - z)⁻¹ • f ζ‖ < 2 * π * r * (‖f z‖ / r)",
" ContinuousOn (fun ζ => (ζ - z)⁻¹ • f ζ) (sphere z r... | [
" ‖f w‖ = ‖f z‖",
" ¬(norm ∘ f) w < (norm ∘ f) z",
" False",
" ‖∮ (ζ : ℂ) in C(z, r), (ζ - z)⁻¹ • f ζ‖ = 2 * π * ‖f z‖",
" ‖∮ (ζ : ℂ) in C(z, r), (ζ - z)⁻¹ • f ζ‖ < 2 * π * ‖f z‖",
" ‖∮ (ζ : ℂ) in C(z, r), (ζ - z)⁻¹ • f ζ‖ < 2 * π * r * (‖f z‖ / r)",
" ContinuousOn (fun ζ => (ζ - z)⁻¹ • f ζ) (sphere z r... |
import Mathlib.Computability.Halting
import Mathlib.Computability.TuringMachine
import Mathlib.Data.Num.Lemmas
import Mathlib.Tactic.DeriveFintype
#align_import computability.tm_to_partrec from "leanprover-community/mathlib"@"6155d4351090a6fad236e3d2e4e0e4e7342668e8"
open Function (update)
open Relation
namespa... | Mathlib/Computability/TMToPartrec.lean | 183 | 183 | theorem id_eval (v) : id.eval v = pure v := by | simp [id]
| [
" zero'.eval = fun v => pure (0 :: v)",
" succ.eval = fun v => pure [v.headI.succ]",
" tail.eval = fun v => pure v.tail",
" (f.cons fs).eval = fun v => do\n let n ← f.eval v\n let ns ← fs.eval v\n pure (n.headI :: ns)",
" (f.comp g).eval = fun v => g.eval v >>= f.eval",
" (f.case g).eval = fun v ... | [
" zero'.eval = fun v => pure (0 :: v)",
" succ.eval = fun v => pure [v.headI.succ]",
" tail.eval = fun v => pure v.tail",
" (f.cons fs).eval = fun v => do\n let n ← f.eval v\n let ns ← fs.eval v\n pure (n.headI :: ns)",
" (f.comp g).eval = fun v => g.eval v >>= f.eval",
" (f.case g).eval = fun v ... |
import Mathlib.Data.Multiset.Powerset
#align_import data.multiset.antidiagonal from "leanprover-community/mathlib"@"9003f28797c0664a49e4179487267c494477d853"
assert_not_exists Ring
universe u
namespace Multiset
open List
variable {α β : Type*}
def antidiagonal (s : Multiset α) : Multiset (Multiset α × Multis... | Mathlib/Data/Multiset/Antidiagonal.lean | 90 | 99 | theorem antidiagonal_eq_map_powerset [DecidableEq α] (s : Multiset α) :
s.antidiagonal = s.powerset.map fun t ↦ (s - t, t) := by |
induction' s using Multiset.induction_on with a s hs
· simp only [antidiagonal_zero, powerset_zero, zero_tsub, map_singleton]
· simp_rw [antidiagonal_cons, powerset_cons, map_add, hs, map_map, Function.comp, Prod.map_mk,
id, sub_cons, erase_cons_head]
rw [add_comm]
congr 1
refine Multiset.map_c... | [
" x ∈ antidiagonal ⟦l⟧ ↔ x.1 + x.2 = ⟦l⟧",
" x ∈ ↑(powersetAux l).revzip ↔ x.1 + x.2 = ↑l",
" x ∈ ↑(powersetAux l).revzip",
" ∃ a ≤ x.1 + x.2, (a, x.1 + x.2 - a) = x",
" ∃ a ≤ (x₁, x₂).1 + (x₁, x₂).2, (a, (x₁, x₂).1 + (x₁, x₂).2 - a) = (x₁, x₂)",
" (x₁, (x₁, x₂).1 + (x₁, x₂).2 - x₁) = (x₁, x₂)",
" map P... | [
" x ∈ antidiagonal ⟦l⟧ ↔ x.1 + x.2 = ⟦l⟧",
" x ∈ ↑(powersetAux l).revzip ↔ x.1 + x.2 = ↑l",
" x ∈ ↑(powersetAux l).revzip",
" ∃ a ≤ x.1 + x.2, (a, x.1 + x.2 - a) = x",
" ∃ a ≤ (x₁, x₂).1 + (x₁, x₂).2, (a, (x₁, x₂).1 + (x₁, x₂).2 - a) = (x₁, x₂)",
" (x₁, (x₁, x₂).1 + (x₁, x₂).2 - x₁) = (x₁, x₂)",
" map P... |
import Mathlib.Data.Finsupp.Multiset
import Mathlib.Order.Bounded
import Mathlib.SetTheory.Cardinal.PartENat
import Mathlib.SetTheory.Ordinal.Principal
import Mathlib.Tactic.Linarith
#align_import set_theory.cardinal.ordinal from "leanprover-community/mathlib"@"7c2ce0c2da15516b4e65d0c9e254bb6dc93abd1f"
noncomputa... | Mathlib/SetTheory/Cardinal/Ordinal.lean | 433 | 447 | theorem beth_strictMono : StrictMono beth := by |
intro a b
induction' b using Ordinal.induction with b IH generalizing a
intro h
rcases zero_or_succ_or_limit b with (rfl | ⟨c, rfl⟩ | hb)
· exact (Ordinal.not_lt_zero a h).elim
· rw [lt_succ_iff] at h
rw [beth_succ]
apply lt_of_le_of_lt _ (cantor _)
rcases eq_or_lt_of_le h with (rfl | h)
· ... | [
" c.ord.IsLimit",
" ℵ₀ = 0",
" c.ord ≤ a",
" c ≤ a.card",
" ℵ₀ ≤ a.card",
" ℵ₀ ≤ (succ a).card",
" ℵ₀.ord.IsLimit",
" ω.IsLimit",
" StrictMono beth",
" a < b → beth a < beth b",
" beth a < beth b",
" beth a < beth 0",
" beth a < beth (succ c)",
" beth a < 2 ^ beth c",
" beth a ≤ beth c",... | [
" c.ord.IsLimit",
" ℵ₀ = 0",
" c.ord ≤ a",
" c ≤ a.card",
" ℵ₀ ≤ a.card",
" ℵ₀ ≤ (succ a).card",
" ℵ₀.ord.IsLimit",
" ω.IsLimit"
] |
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 | 49 | 56 | theorem vandermonde_cons {n : ℕ} (v0 : R) (v : Fin n → R) :
vandermonde (Fin.cons v0 v : Fin n.succ → R) =
Fin.cons (fun (j : Fin n.succ) => v0 ^ (j : ℕ)) fun i => Fin.cons 1
fun j => v i * vandermonde v i j := by |
ext i j
refine Fin.cases (by simp) (fun i => ?_) i
refine Fin.cases (by simp) (fun j => ?_) j
simp [pow_succ']
| [
" 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.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 | 219 | 223 | theorem fderivWithin_zero_of_nmem_closure (h : x ∉ closure s) : fderivWithin 𝕜 f s x = 0 := by |
apply fderivWithin_zero_of_isolated
simp only [mem_closure_iff_nhdsWithin_neBot, neBot_iff, Ne, Classical.not_not] at h
rw [eq_bot_iff, ← h]
exact nhdsWithin_mono _ diff_subset
| [
" fderivWithin 𝕜 f s x = 0",
" 𝓝[s \\ {x}] x = ⊥",
" 𝓝[s \\ {x}] x ≤ 𝓝[s] x"
] | [
" fderivWithin 𝕜 f s x = 0"
] |
import Mathlib.NumberTheory.Cyclotomic.PrimitiveRoots
import Mathlib.FieldTheory.Finite.Trace
import Mathlib.Algebra.Group.AddChar
import Mathlib.Data.ZMod.Units
import Mathlib.Analysis.Complex.Polynomial
#align_import number_theory.legendre_symbol.add_character from "leanprover-community/mathlib"@"0723536a0522d24fc2... | Mathlib/NumberTheory/LegendreSymbol/AddCharacter.lean | 169 | 171 | theorem zmodChar_apply' {n : ℕ+} {ζ : C} (hζ : ζ ^ (n : ℕ) = 1) (a : ℕ) :
zmodChar n hζ a = ζ ^ a := by |
rw [pow_eq_pow_mod a hζ, zmodChar_apply, ZMod.val_natCast a]
| [
" ⋯.unit ∈ rootsOfUnity (ringChar R).toPNat' R'",
" (f.compAddChar φ).IsPrimitive",
" ((f.compAddChar φ).mulShift a).IsNontrivial",
" ∃ a_1, f (φ (a * a_1)) ≠ 1",
" Function.Injective ψ.mulShift",
" a = b",
" ψ.IsPrimitive",
" (ψ.mulShift a).IsNontrivial",
" (ψ.mulShift a) (a⁻¹ * x) ≠ 1",
" ¬(e.mu... | [
" ⋯.unit ∈ rootsOfUnity (ringChar R).toPNat' R'",
" (f.compAddChar φ).IsPrimitive",
" ((f.compAddChar φ).mulShift a).IsNontrivial",
" ∃ a_1, f (φ (a * a_1)) ≠ 1",
" Function.Injective ψ.mulShift",
" a = b",
" ψ.IsPrimitive",
" (ψ.mulShift a).IsNontrivial",
" (ψ.mulShift a) (a⁻¹ * x) ≠ 1",
" ¬(e.mu... |
import Mathlib.Topology.MetricSpace.ProperSpace
import Mathlib.Topology.MetricSpace.Cauchy
open Set Filter Bornology
open scoped ENNReal Uniformity Topology Pointwise
universe u v w
variable {α : Type u} {β : Type v} {X ι : Type*}
variable [PseudoMetricSpace α]
namespace Metric
#align metric.bounded Bornology.I... | Mathlib/Topology/MetricSpace/Bounded.lean | 142 | 144 | theorem tendsto_dist_left_atTop_iff (c : α) {f : β → α} {l : Filter β} :
Tendsto (fun x ↦ dist c (f x)) l atTop ↔ Tendsto f l (cobounded α) := by |
simp only [dist_comm c, tendsto_dist_right_atTop_iff]
| [
" (∃ r, x✝ ⊆ closedBall c r) ↔ ∃ i, True ∧ (closedBall c i)ᶜ ⊆ x✝ᶜ",
" (∃ r, x✝ ⊆ ball c r) ↔ ∃ i, True ∧ (ball c i)ᶜ ⊆ x✝ᶜ",
" (cobounded α).HasBasis (fun x => True) fun i => (fun x => dist x c) ⁻¹' Ici i",
" comap (dist c) atTop = cobounded α",
" Tendsto (fun x => dist (f x) c) l atTop ↔ Tendsto f l (cobo... | [
" (∃ r, x✝ ⊆ closedBall c r) ↔ ∃ i, True ∧ (closedBall c i)ᶜ ⊆ x✝ᶜ",
" (∃ r, x✝ ⊆ ball c r) ↔ ∃ i, True ∧ (ball c i)ᶜ ⊆ x✝ᶜ",
" (cobounded α).HasBasis (fun x => True) fun i => (fun x => dist x c) ⁻¹' Ici i",
" comap (dist c) atTop = cobounded α",
" Tendsto (fun x => dist (f x) c) l atTop ↔ Tendsto f l (cobo... |
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 | 141 | 143 | theorem comp_left_top (r : Rel α β) : (⊤ : Rel γ α) • r = fun _ y ↦ y ∈ r.codom := by |
ext x z
simp [comp, Top.top, codom]
| [
" 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.Data.Finset.Pointwise
#align_import combinatorics.additive.e_transform from "leanprover-community/mathlib"@"207c92594599a06e7c134f8d00a030a83e6c7259"
open MulOpposite
open Pointwise
variable {α : Type*} [DecidableEq α]
namespace Finset
section Group
variable [Group α] (e : α) (x : Finset... | Mathlib/Combinatorics/Additive/ETransform.lean | 137 | 137 | theorem mulETransformRight_one : mulETransformRight 1 x = x := by | simp [mulETransformRight]
| [
" mulETransformLeft 1 x = x",
" mulETransformRight 1 x = x"
] | [
" mulETransformLeft 1 x = x"
] |
import Mathlib.Topology.PartialHomeomorph
import Mathlib.Analysis.Normed.Group.AddTorsor
import Mathlib.Analysis.NormedSpace.Pointwise
import Mathlib.Data.Real.Sqrt
#align_import analysis.normed_space.basic from "leanprover-community/mathlib"@"bc91ed7093bf098d253401e69df601fc33dde156"
open Set Metric Pointwise
var... | Mathlib/Analysis/NormedSpace/HomeomorphBall.lean | 149 | 150 | theorem continuous_univBall (c : P) (r : ℝ) : Continuous (univBall c r) := by |
simpa [continuous_iff_continuousOn_univ] using (univBall c r).continuousOn
| [
" (fun x => (√(1 + ‖x‖ ^ 2))⁻¹ • x) x ∈ ball 0 1",
" 0 < 1 + ‖x‖ ^ 2",
" ‖x‖ ^ 2 < 1 + ‖x‖ ^ 2",
" (fun y => (√(1 - ‖y‖ ^ 2))⁻¹ • y) ((fun x => (√(1 + ‖x‖ ^ 2))⁻¹ • x) x) = x",
" (fun x => (√(1 + ‖x‖ ^ 2))⁻¹ • x) ((fun y => (√(1 - ‖y‖ ^ 2))⁻¹ • y) y) = y",
" 0 < 1 - ‖y‖ ^ 2",
" ContinuousOn\n ↑{ toFu... | [
" (fun x => (√(1 + ‖x‖ ^ 2))⁻¹ • x) x ∈ ball 0 1",
" 0 < 1 + ‖x‖ ^ 2",
" ‖x‖ ^ 2 < 1 + ‖x‖ ^ 2",
" (fun y => (√(1 - ‖y‖ ^ 2))⁻¹ • y) ((fun x => (√(1 + ‖x‖ ^ 2))⁻¹ • x) x) = x",
" (fun x => (√(1 + ‖x‖ ^ 2))⁻¹ • x) ((fun y => (√(1 - ‖y‖ ^ 2))⁻¹ • y) y) = y",
" 0 < 1 - ‖y‖ ^ 2",
" ContinuousOn\n ↑{ toFu... |
import Mathlib.Analysis.Calculus.Deriv.ZPow
import Mathlib.Analysis.SpecialFunctions.Sqrt
import Mathlib.Analysis.SpecialFunctions.Log.Deriv
import Mathlib.Analysis.SpecialFunctions.Trigonometric.Deriv
import Mathlib.Analysis.Convex.Deriv
#align_import analysis.convex.specific_functions.deriv from "leanprover-communi... | Mathlib/Analysis/Convex/SpecificFunctions/Deriv.lean | 88 | 94 | theorem int_prod_range_pos {m : ℤ} {n : ℕ} (hn : Even n) (hm : m ∉ Ico (0 : ℤ) n) :
0 < ∏ k ∈ Finset.range n, (m - k) := by |
refine (int_prod_range_nonneg m n hn).lt_of_ne fun h => hm ?_
rw [eq_comm, Finset.prod_eq_zero_iff] at h
obtain ⟨a, ha, h⟩ := h
rw [sub_eq_zero.1 h]
exact ⟨Int.ofNat_zero_le _, Int.ofNat_lt.2 <| Finset.mem_range.1 ha⟩
| [
" StrictConvexOn ℝ (Ici 0) fun x => x ^ n",
" StrictMonoOn (deriv fun x => x ^ n) (interior (Ici 0))",
" StrictMonoOn (fun x => ↑n * x ^ (n - 1)) (Ioi 0)",
" 0 < ↑n",
" StrictConvexOn ℝ univ fun x => x ^ n",
" StrictMono (deriv fun a => a ^ n)",
" StrictMono fun x => ↑n * x ^ (n - 1)",
" 0 ≤ (if f x ≤... | [
" StrictConvexOn ℝ (Ici 0) fun x => x ^ n",
" StrictMonoOn (deriv fun x => x ^ n) (interior (Ici 0))",
" StrictMonoOn (fun x => ↑n * x ^ (n - 1)) (Ioi 0)",
" 0 < ↑n",
" StrictConvexOn ℝ univ fun x => x ^ n",
" StrictMono (deriv fun a => a ^ n)",
" StrictMono fun x => ↑n * x ^ (n - 1)",
" 0 ≤ (if f x ≤... |
import Mathlib.Probability.Process.HittingTime
import Mathlib.Probability.Martingale.Basic
#align_import probability.martingale.optional_stopping from "leanprover-community/mathlib"@"70fd9563a21e7b963887c9360bd29b2393e6225a"
open scoped NNReal ENNReal MeasureTheory ProbabilityTheory
namespace MeasureTheory
vari... | Mathlib/Probability/Martingale/OptionalStopping.lean | 42 | 63 | theorem Submartingale.expected_stoppedValue_mono [SigmaFiniteFiltration μ 𝒢]
(hf : Submartingale f 𝒢 μ) (hτ : IsStoppingTime 𝒢 τ) (hπ : IsStoppingTime 𝒢 π) (hle : τ ≤ π)
{N : ℕ} (hbdd : ∀ ω, π ω ≤ N) : μ[stoppedValue f τ] ≤ μ[stoppedValue f π] := by |
rw [← sub_nonneg, ← integral_sub', stoppedValue_sub_eq_sum' hle hbdd]
· simp only [Finset.sum_apply]
have : ∀ i, MeasurableSet[𝒢 i] {ω : Ω | τ ω ≤ i ∧ i < π ω} := by
intro i
refine (hτ i).inter ?_
convert (hπ i).compl using 1
ext x
simp; rfl
rw [integral_finset_sum]
· ref... | [
" ∫ (x : Ω), stoppedValue f τ x ∂μ ≤ ∫ (x : Ω), stoppedValue f π x ∂μ",
" 0 ≤ ∫ (a : Ω), (fun ω => (∑ i ∈ Finset.range (N + 1), {ω | τ ω ≤ i ∧ i < π ω}.indicator (f (i + 1) - f i)) ω) a ∂μ",
" 0 ≤ ∫ (a : Ω), ∑ c ∈ Finset.range (N + 1), {ω | τ ω ≤ c ∧ c < π ω}.indicator (f (c + 1) - f c) a ∂μ",
" ∀ (i : ℕ), Me... | [] |
import Batteries.Data.Fin.Basic
namespace Fin
attribute [norm_cast] val_last
protected theorem le_antisymm_iff {x y : Fin n} : x = y ↔ x ≤ y ∧ y ≤ x :=
Fin.ext_iff.trans Nat.le_antisymm_iff
protected theorem le_antisymm {x y : Fin n} (h1 : x ≤ y) (h2 : y ≤ x) : x = y :=
Fin.le_antisymm_iff.2 ⟨h1, h2⟩
@[simp... | .lake/packages/batteries/Batteries/Data/Fin/Lemmas.lean | 122 | 125 | theorem foldr_eq_foldr_list (f : Fin n → α → α) (x) : foldr n f x = (list n).foldr f x := by |
induction n with
| zero => rw [foldr_zero, list_zero, List.foldr_nil]
| succ n ih => rw [foldr_succ, ih, list_succ, List.foldr_cons, List.foldr_map]
| [
" enum 0 = #[]",
" (list n).length = n",
" (list n).get i = cast ⋯ i",
" (list n).get ⟨val✝, isLt✝⟩ = cast ⋯ ⟨val✝, isLt✝⟩",
" (enum n).data.get ⟨val✝, isLt✝⟩ = cast ⋯ ⟨val✝, isLt✝⟩",
" list 0 = []",
" list (n + 1) = 0 :: List.map succ (list n)",
" ∀ (n_1 : Nat) (h₁ : n_1 < (list (n + 1)).length) (h₂ ... | [
" enum 0 = #[]",
" (list n).length = n",
" (list n).get i = cast ⋯ i",
" (list n).get ⟨val✝, isLt✝⟩ = cast ⋯ ⟨val✝, isLt✝⟩",
" (enum n).data.get ⟨val✝, isLt✝⟩ = cast ⋯ ⟨val✝, isLt✝⟩",
" list 0 = []",
" list (n + 1) = 0 :: List.map succ (list n)",
" ∀ (n_1 : Nat) (h₁ : n_1 < (list (n + 1)).length) (h₂ ... |
import Mathlib.Logic.Function.Basic
import Mathlib.Tactic.MkIffOfInductiveProp
#align_import data.sum.basic from "leanprover-community/mathlib"@"bd9851ca476957ea4549eb19b40e7b5ade9428cc"
universe u v w x
variable {α : Type u} {α' : Type w} {β : Type v} {β' : Type x} {γ δ : Type*}
namespace Sum
#align sum.foral... | Mathlib/Data/Sum/Basic.lean | 27 | 30 | theorem exists_sum {γ : α ⊕ β → Sort*} (p : (∀ ab, γ ab) → Prop) :
(∃ fab, p fab) ↔ (∃ fa fb, p (Sum.rec fa fb)) := by |
rw [← not_forall_not, forall_sum]
simp
| [
" (∃ fab, p fab) ↔ ∃ fa fb, p fun t => rec fa fb t",
" (¬∀ (fa : (val : α) → γ (inl val)) (fb : (val : β) → γ (inr val)), ¬p fun t => rec fa fb t) ↔\n ∃ fa fb, p fun t => rec fa fb t"
] | [] |
import Mathlib.Algebra.EuclideanDomain.Basic
import Mathlib.RingTheory.PrincipalIdealDomain
import Mathlib.Algebra.GCDMonoid.Nat
#align_import ring_theory.int.basic from "leanprover-community/mathlib"@"e655e4ea5c6d02854696f97494997ba4c31be802"
namespace Int
theorem gcd_eq_one_iff_coprime {a b : ℤ} : Int.gcd a b ... | Mathlib/RingTheory/Int/Basic.lean | 77 | 83 | theorem natAbs_euclideanDomain_gcd (a b : ℤ) :
Int.natAbs (EuclideanDomain.gcd a b) = Int.gcd a b := by |
apply Nat.dvd_antisymm <;> rw [← Int.natCast_dvd_natCast]
· rw [Int.natAbs_dvd]
exact Int.dvd_gcd (EuclideanDomain.gcd_dvd_left _ _) (EuclideanDomain.gcd_dvd_right _ _)
· rw [Int.dvd_natAbs]
exact EuclideanDomain.dvd_gcd Int.gcd_dvd_left Int.gcd_dvd_right
| [
" a.gcd b = 1 ↔ IsCoprime a b",
" a.gcd b = 1 → IsCoprime a b",
" IsCoprime a b",
" a.natAbs.gcdA b.natAbs * ua * a + a.natAbs.gcdB b.natAbs * ub * b = 1",
" IsCoprime a b → a.gcd b = 1",
" a.gcd b = 1",
" False",
" p ∣ 1",
" ↑p ∣ r * a + s * b",
" IsCoprime a b ↔ a.natAbs.Coprime b.natAbs",
" a... | [
" a.gcd b = 1 ↔ IsCoprime a b",
" a.gcd b = 1 → IsCoprime a b",
" IsCoprime a b",
" a.natAbs.gcdA b.natAbs * ua * a + a.natAbs.gcdB b.natAbs * ub * b = 1",
" IsCoprime a b → a.gcd b = 1",
" a.gcd b = 1",
" False",
" p ∣ 1",
" ↑p ∣ r * a + s * b",
" IsCoprime a b ↔ a.natAbs.Coprime b.natAbs",
" a... |
import Mathlib.Order.Interval.Set.OrdConnected
import Mathlib.Order.Antisymmetrization
#align_import order.cover from "leanprover-community/mathlib"@"207cfac9fcd06138865b5d04f7091e46d9320432"
open Set OrderDual
variable {α β : Type*}
section WeaklyCovers
section LT
variable [LT α] {a b : α}
def CovBy (a b :... | Mathlib/Order/Cover.lean | 233 | 234 | theorem not_covBy_iff (h : a < b) : ¬a ⋖ b ↔ ∃ c, a < c ∧ c < b := by |
simp_rw [CovBy, h, true_and_iff, not_forall, exists_prop, not_not]
| [
" ¬a ⋖ b ↔ ∃ c, a < c ∧ c < b"
] | [] |
import Mathlib.Data.SetLike.Basic
import Mathlib.Data.Finset.Preimage
import Mathlib.ModelTheory.Semantics
#align_import model_theory.definability from "leanprover-community/mathlib"@"70fd9563a21e7b963887c9360bd29b2393e6225a"
universe u v w u₁
namespace Set
variable {M : Type w} (A : Set M) (L : FirstOrder.Lang... | Mathlib/ModelTheory/Definability.lean | 133 | 138 | theorem definable_finset_sup {ι : Type*} {f : ι → Set (α → M)} (hf : ∀ i, A.Definable L (f i))
(s : Finset ι) : A.Definable L (s.sup f) := by |
classical
refine Finset.induction definable_empty (fun i s _ h => ?_) s
rw [Finset.sup_insert]
exact (hf i).union h
| [
" A.Definable L' s",
" A.Definable L' (setOf ψ.Realize)",
" setOf ψ.Realize = setOf ((LHom.addConstants (↑A) φ).onFormula ψ).Realize",
" x ∈ setOf ψ.Realize ↔ x ∈ setOf ((LHom.addConstants (↑A) φ).onFormula ψ).Realize",
" A.Definable L s ↔ ∃ φ, s = {v | φ.Realize (Sum.elim Subtype.val v)}",
" (∃ b, s = se... | [
" A.Definable L' s",
" A.Definable L' (setOf ψ.Realize)",
" setOf ψ.Realize = setOf ((LHom.addConstants (↑A) φ).onFormula ψ).Realize",
" x ∈ setOf ψ.Realize ↔ x ∈ setOf ((LHom.addConstants (↑A) φ).onFormula ψ).Realize",
" A.Definable L s ↔ ∃ φ, s = {v | φ.Realize (Sum.elim Subtype.val v)}",
" (∃ b, s = se... |
import Mathlib.Probability.IdentDistrib
import Mathlib.MeasureTheory.Integral.DominatedConvergence
import Mathlib.Analysis.SpecificLimits.FloorPow
import Mathlib.Analysis.PSeries
import Mathlib.Analysis.Asymptotics.SpecificAsymptotics
#align_import probability.strong_law from "leanprover-community/mathlib"@"f2ce60867... | Mathlib/Probability/StrongLaw.lean | 140 | 148 | theorem moment_truncation_eq_intervalIntegral (hf : AEStronglyMeasurable f μ) {A : ℝ} (hA : 0 ≤ A)
{n : ℕ} (hn : n ≠ 0) : ∫ x, truncation f A x ^ n ∂μ = ∫ y in -A..A, y ^ n ∂Measure.map f μ := by |
have M : MeasurableSet (Set.Ioc (-A) A) := measurableSet_Ioc
change ∫ x, (fun z => indicator (Set.Ioc (-A) A) id z ^ n) (f x) ∂μ = _
rw [← integral_map (f := fun z => _ ^ n) hf.aemeasurable, intervalIntegral.integral_of_le,
← integral_indicator M]
· simp only [indicator, zero_pow hn, id, ite_pow]
· linar... | [
" AEStronglyMeasurable (ProbabilityTheory.truncation f A) μ",
" AEStronglyMeasurable ((Set.Ioc (-A) A).indicator id) (Measure.map f μ)",
" |truncation f A x| ≤ |A|",
" |if f x ∈ Set.Ioc (-A) A then f x else 0| ≤ |A|",
" |f x| ≤ |A|",
" |0| ≤ |A|",
" truncation f 0 = 0",
" (fun x => 0) ∘ f = 0",
" |t... | [
" AEStronglyMeasurable (ProbabilityTheory.truncation f A) μ",
" AEStronglyMeasurable ((Set.Ioc (-A) A).indicator id) (Measure.map f μ)",
" |truncation f A x| ≤ |A|",
" |if f x ∈ Set.Ioc (-A) A then f x else 0| ≤ |A|",
" |f x| ≤ |A|",
" |0| ≤ |A|",
" truncation f 0 = 0",
" (fun x => 0) ∘ f = 0",
" |t... |
import Mathlib.FieldTheory.Finite.Basic
#align_import number_theory.wilson from "leanprover-community/mathlib"@"c471da714c044131b90c133701e51b877c246677"
open Finset Nat FiniteField ZMod
open scoped Nat
namespace ZMod
variable (p : ℕ) [Fact p.Prime]
@[simp]
theorem wilsons_lemma : ((p - 1)! : ZMod p) = -1 :=... | Mathlib/NumberTheory/Wilson.lean | 73 | 79 | theorem prod_Ico_one_prime : ∏ x ∈ Ico 1 p, (x : ZMod p) = -1 := by |
-- Porting note: was `conv in Ico 1 p =>`
conv =>
congr
congr
rw [← Nat.add_one_sub_one p, succ_sub (Fact.out (p := p.Prime)).pos]
rw [← prod_natCast, Finset.prod_Ico_id_eq_factorial, wilsons_lemma]
| [
" ↑(p - 1)! = -1",
" ↑(p - 1)! = ∏ x ∈ Ico 1 (p - 1).succ, ↑x",
" ∏ x : (ZMod p)ˣ, ↑x = -1",
" ∏ x : (ZMod p)ˣ, (Units.coeHom (ZMod p)) x = -1",
" (Units.coeHom (ZMod p)) (∏ x : (ZMod p)ˣ, x) = -1",
" ∏ x ∈ Ico 1 (p - 1).succ, ↑x = ∏ x : (ZMod p)ˣ, ↑x",
" ∏ x : (ZMod p)ˣ, ↑x = ∏ x ∈ Ico 1 (p - 1).succ, ... | [
" ↑(p - 1)! = -1",
" ↑(p - 1)! = ∏ x ∈ Ico 1 (p - 1).succ, ↑x",
" ∏ x : (ZMod p)ˣ, ↑x = -1",
" ∏ x : (ZMod p)ˣ, (Units.coeHom (ZMod p)) x = -1",
" (Units.coeHom (ZMod p)) (∏ x : (ZMod p)ˣ, x) = -1",
" ∏ x ∈ Ico 1 (p - 1).succ, ↑x = ∏ x : (ZMod p)ˣ, ↑x",
" ∏ x : (ZMod p)ˣ, ↑x = ∏ x ∈ Ico 1 (p - 1).succ, ... |
import Mathlib.RingTheory.Algebraic
import Mathlib.RingTheory.Localization.AtPrime
import Mathlib.RingTheory.Localization.Integral
#align_import ring_theory.ideal.over from "leanprover-community/mathlib"@"198cb64d5c961e1a8d0d3e219feb7058d5353861"
variable {R : Type*} [CommRing R]
namespace Ideal
open Polynomial... | Mathlib/RingTheory/Ideal/Over.lean | 116 | 126 | theorem exists_nonzero_mem_of_ne_bot {P : Ideal R[X]} (Pb : P ≠ ⊥) (hP : ∀ x : R, C x ∈ P → x = 0) :
∃ p : R[X], p ∈ P ∧ Polynomial.map (Quotient.mk (P.comap (C : R →+* R[X]))) p ≠ 0 := by |
obtain ⟨m, hm⟩ := Submodule.nonzero_mem_of_bot_lt (bot_lt_iff_ne_bot.mpr Pb)
refine ⟨m, Submodule.coe_mem m, fun pp0 => hm (Submodule.coe_eq_zero.mp ?_)⟩
refine
(injective_iff_map_eq_zero (Polynomial.mapRingHom (Ideal.Quotient.mk
(P.comap (C : R →+* R[X]))))).mp
?_ _ pp0
refine map_injective _ ... | [
" p.coeff 0 ∈ comap f I",
" eval₂ f r p.divX * r ∈ I",
" p ≠ 0 → eval₂ f r p = 0 → ∃ i, p.coeff i ≠ 0 ∧ p.coeff i ∈ comap f I",
" 0 ≠ 0 → eval₂ f r 0 = 0 → ∃ i, coeff 0 i ≠ 0 ∧ coeff 0 i ∈ comap f I",
" eval₂ f r 0 = 0 → ∃ i, coeff 0 i ≠ 0 ∧ coeff 0 i ∈ comap f I",
" ∀ (p : R[X]) (a : R),\n p.coeff 0 =... | [
" p.coeff 0 ∈ comap f I",
" eval₂ f r p.divX * r ∈ I",
" p ≠ 0 → eval₂ f r p = 0 → ∃ i, p.coeff i ≠ 0 ∧ p.coeff i ∈ comap f I",
" 0 ≠ 0 → eval₂ f r 0 = 0 → ∃ i, coeff 0 i ≠ 0 ∧ coeff 0 i ∈ comap f I",
" eval₂ f r 0 = 0 → ∃ i, coeff 0 i ≠ 0 ∧ coeff 0 i ∈ comap f I",
" ∀ (p : R[X]) (a : R),\n p.coeff 0 =... |
import Mathlib.GroupTheory.CoprodI
import Mathlib.GroupTheory.Coprod.Basic
import Mathlib.GroupTheory.QuotientGroup
import Mathlib.GroupTheory.Complement
namespace Monoid
open CoprodI Subgroup Coprod Function List
variable {ι : Type*} {G : ι → Type*} {H : Type*} {K : Type*} [Monoid K]
def PushoutI.con [∀ i, Mo... | Mathlib/GroupTheory/PushoutI.lean | 119 | 123 | theorem lift_base (f : ∀ i, G i →* K) (k : H →* K)
(hf : ∀ i, (f i).comp (φ i) = k)
(g : H) : (lift f k hf) (base φ g : PushoutI φ) = k g := by |
delta PushoutI lift base
simp only [MonoidHom.coe_comp, Con.coe_mk', comp_apply, Con.lift_coe, lift_apply_inr]
| [
" Mul (PushoutI φ)",
" Mul (con φ).Quotient",
" One (PushoutI φ)",
" One (con φ).Quotient",
" (of i).comp (φ i) = base φ",
" ((of i).comp (φ i)) x = (base φ) x",
" (con φ) ((inl.comp CoprodI.of) ((φ i) x)) (inr x)",
" ∃ i_1 x', (inl.comp CoprodI.of) ((φ i) x) = inl (CoprodI.of ((φ i_1) x')) ∧ inr x = ... | [
" Mul (PushoutI φ)",
" Mul (con φ).Quotient",
" One (PushoutI φ)",
" One (con φ).Quotient",
" (of i).comp (φ i) = base φ",
" ((of i).comp (φ i)) x = (base φ) x",
" (con φ) ((inl.comp CoprodI.of) ((φ i) x)) (inr x)",
" ∃ i_1 x', (inl.comp CoprodI.of) ((φ i) x) = inl (CoprodI.of ((φ i_1) x')) ∧ inr x = ... |
import Mathlib.RingTheory.PrincipalIdealDomain
import Mathlib.RingTheory.Ideal.LocalRing
import Mathlib.RingTheory.Valuation.PrimeMultiplicity
import Mathlib.RingTheory.AdicCompletion.Basic
#align_import ring_theory.discrete_valuation_ring.basic from "leanprover-community/mathlib"@"c163ec99dfc664628ca15d215fce0a5b9c2... | Mathlib/RingTheory/DiscreteValuationRing/Basic.lean | 118 | 145 | theorem iff_pid_with_one_nonzero_prime (R : Type u) [CommRing R] [IsDomain R] :
DiscreteValuationRing R ↔ IsPrincipalIdealRing R ∧ ∃! P : Ideal R, P ≠ ⊥ ∧ IsPrime P := by |
constructor
· intro RDVR
rcases id RDVR with ⟨Rlocal⟩
constructor
· assumption
use LocalRing.maximalIdeal R
constructor
· exact ⟨Rlocal, inferInstance⟩
· rintro Q ⟨hQ1, hQ2⟩
obtain ⟨q, rfl⟩ := (IsPrincipalIdealRing.principal Q).1
have hq : q ≠ 0 := by
rintro rfl
... | [
" Irreducible ϖ",
" ∀ (a b : R), ϖ = a * b → IsUnit a ∨ IsUnit b",
" IsUnit a ∨ IsUnit b",
" False",
" a * ϖ * (b * ϖ) = ϖ * (ϖ * (a * b))",
" ϖ = 0",
" ϖ * (a * b) ≠ 1",
" maximalIdeal R = ⊥",
" ∃ ϖ, Irreducible ϖ",
" ∃ ϖ, maximalIdeal R = span {ϖ}",
" DiscreteValuationRing R ↔ IsPrincipalIdeal... | [
" Irreducible ϖ",
" ∀ (a b : R), ϖ = a * b → IsUnit a ∨ IsUnit b",
" IsUnit a ∨ IsUnit b",
" False",
" a * ϖ * (b * ϖ) = ϖ * (ϖ * (a * b))",
" ϖ = 0",
" ϖ * (a * b) ≠ 1",
" maximalIdeal R = ⊥",
" ∃ ϖ, Irreducible ϖ",
" ∃ ϖ, maximalIdeal R = span {ϖ}"
] |
import Mathlib.CategoryTheory.Monoidal.Functor
#align_import category_theory.monoidal.End from "leanprover-community/mathlib"@"85075bccb68ab7fa49fb05db816233fb790e4fe9"
universe v u
namespace CategoryTheory
variable (C : Type u) [Category.{v} C]
def endofunctorMonoidalCategory : MonoidalCategory (C ⥤ C) where... | Mathlib/CategoryTheory/Monoidal/End.lean | 129 | 131 | theorem ε_inv_naturality {X Y : C} (f : X ⟶ Y) :
(MonoidalFunctor.εIso F).inv.app X ≫ (𝟙_ (C ⥤ C)).map f = F.εIso.inv.app X ≫ f := by |
aesop_cat
| [
" F.εIso.inv.app X ≫ (𝟙_ (C ⥤ C)).map f = F.εIso.inv.app X ≫ f"
] | [] |
import Mathlib.Order.Interval.Set.OrdConnected
import Mathlib.Order.Antisymmetrization
#align_import order.cover from "leanprover-community/mathlib"@"207cfac9fcd06138865b5d04f7091e46d9320432"
open Set OrderDual
variable {α β : Type*}
section WeaklyCovers
section Preorder
variable [Preorder α] [Preorder β] {a ... | Mathlib/Order/Cover.lean | 122 | 126 | theorem WCovBy.image (f : α ↪o β) (hab : a ⩿ b) (h : (range f).OrdConnected) : f a ⩿ f b := by |
refine ⟨f.monotone hab.le, fun c ha hb => ?_⟩
obtain ⟨c, rfl⟩ := h.out (mem_range_self _) (mem_range_self _) ⟨ha.le, hb.le⟩
rw [f.lt_iff_lt] at ha hb
exact hab.2 ha hb
| [
" ¬a ⩿ b ↔ ∃ c, a < c ∧ c < b",
" (∀ ⦃c : α⦄, a < c → ¬c < b) ↔ Ioo a b = ∅",
" f a ⩿ f b",
" False"
] | [
" ¬a ⩿ b ↔ ∃ c, a < c ∧ c < b",
" (∀ ⦃c : α⦄, a < c → ¬c < b) ↔ Ioo a b = ∅"
] |
import Mathlib.Algebra.Order.Ring.Nat
import Mathlib.Combinatorics.SetFamily.Compression.Down
import Mathlib.Order.UpperLower.Basic
import Mathlib.Data.Fintype.Powerset
#align_import combinatorics.set_family.harris_kleitman from "leanprover-community/mathlib"@"b363547b3113d350d053abdf2884e9850a56b205"
open Finset... | Mathlib/Combinatorics/SetFamily/HarrisKleitman.lean | 41 | 45 | theorem IsLowerSet.memberSubfamily (h : IsLowerSet (𝒜 : Set (Finset α))) :
IsLowerSet (𝒜.memberSubfamily a : Set (Finset α)) := by |
rintro s t hts
simp_rw [mem_coe, mem_memberSubfamily]
exact And.imp (h <| insert_subset_insert _ hts) (mt <| @hts _)
| [
" s ∈ ↑(Finset.nonMemberSubfamily a 𝒜) → t ∈ ↑(Finset.nonMemberSubfamily a 𝒜)",
" s ∈ 𝒜 ∧ a ∉ s → t ∈ 𝒜 ∧ a ∉ t",
" IsLowerSet ↑(Finset.memberSubfamily a 𝒜)",
" s ∈ ↑(Finset.memberSubfamily a 𝒜) → t ∈ ↑(Finset.memberSubfamily a 𝒜)",
" insert a s ∈ 𝒜 ∧ a ∉ s → insert a t ∈ 𝒜 ∧ a ∉ t"
] | [
" s ∈ ↑(Finset.nonMemberSubfamily a 𝒜) → t ∈ ↑(Finset.nonMemberSubfamily a 𝒜)",
" s ∈ 𝒜 ∧ a ∉ s → t ∈ 𝒜 ∧ a ∉ t"
] |
import Mathlib.MeasureTheory.Constructions.Prod.Basic
import Mathlib.MeasureTheory.Integral.DominatedConvergence
import Mathlib.MeasureTheory.Integral.SetIntegral
#align_import measure_theory.constructions.prod.integral from "leanprover-community/mathlib"@"fd5edc43dc4f10b85abfe544b88f82cf13c5f844"
noncomputable s... | Mathlib/MeasureTheory/Constructions/Prod/Integral.lean | 127 | 129 | theorem MeasureTheory.StronglyMeasurable.integral_prod_right' [SigmaFinite ν] ⦃f : α × β → E⦄
(hf : StronglyMeasurable f) : StronglyMeasurable fun x => ∫ y, f (x, y) ∂ν := by |
rw [← uncurry_curry f] at hf; exact hf.integral_prod_right
| [
" MeasurableSet {x | Integrable (f x) ν}",
" MeasurableSet {x | HasFiniteIntegral (f x) ν}",
" StronglyMeasurable fun x => ∫ (y : β), f x y ∂ν",
" 0 ∈ range (uncurry f) ∪ {0}",
" ∀ (n : ℕ), StronglyMeasurable (f' n)",
" StronglyMeasurable (f' n)",
" StronglyMeasurable fun x => SimpleFunc.integral ν (s' ... | [
" MeasurableSet {x | Integrable (f x) ν}",
" MeasurableSet {x | HasFiniteIntegral (f x) ν}",
" StronglyMeasurable fun x => ∫ (y : β), f x y ∂ν",
" 0 ∈ range (uncurry f) ∪ {0}",
" ∀ (n : ℕ), StronglyMeasurable (f' n)",
" StronglyMeasurable (f' n)",
" StronglyMeasurable fun x => SimpleFunc.integral ν (s' ... |
import Mathlib.Order.Interval.Finset.Nat
#align_import data.fin.interval from "leanprover-community/mathlib"@"1d29de43a5ba4662dd33b5cfeecfc2a27a5a8a29"
assert_not_exists MonoidWithZero
open Finset Fin Function
namespace Fin
variable (n : ℕ)
instance instLocallyFiniteOrder : LocallyFiniteOrder (Fin n) :=
Orde... | Mathlib/Order/Interval/Finset/Fin.lean | 119 | 120 | theorem card_Ioo : (Ioo a b).card = b - a - 1 := by |
rw [← Nat.card_Ioo, ← map_valEmbedding_Ioo, card_map]
| [
" map valEmbedding (Icc a b) = Icc ↑a ↑b",
" map valEmbedding (Ico a b) = Ico ↑a ↑b",
" map valEmbedding (Ioc a b) = Ioc ↑a ↑b",
" map valEmbedding (Ioo a b) = Ioo ↑a ↑b",
" (Icc a b).card = ↑b + 1 - ↑a",
" (Ico a b).card = ↑b - ↑a",
" (Ioc a b).card = ↑b - ↑a",
" (Ioo a b).card = ↑b - ↑a - 1"
] | [
" map valEmbedding (Icc a b) = Icc ↑a ↑b",
" map valEmbedding (Ico a b) = Ico ↑a ↑b",
" map valEmbedding (Ioc a b) = Ioc ↑a ↑b",
" map valEmbedding (Ioo a b) = Ioo ↑a ↑b",
" (Icc a b).card = ↑b + 1 - ↑a",
" (Ico a b).card = ↑b - ↑a",
" (Ioc a b).card = ↑b - ↑a"
] |
import Mathlib.Data.Nat.Multiplicity
import Mathlib.Data.ZMod.Algebra
import Mathlib.RingTheory.WittVector.Basic
import Mathlib.RingTheory.WittVector.IsPoly
import Mathlib.FieldTheory.Perfect
#align_import ring_theory.witt_vector.frobenius from "leanprover-community/mathlib"@"0723536a0522d24fc2f159a096fb3304bef77472"... | Mathlib/RingTheory/WittVector/Frobenius.lean | 71 | 74 | theorem bind₁_frobeniusPolyRat_wittPolynomial (n : ℕ) :
bind₁ (frobeniusPolyRat p) (wittPolynomial p ℚ n) = wittPolynomial p ℚ (n + 1) := by |
delta frobeniusPolyRat
rw [← bind₁_bind₁, bind₁_xInTermsOfW_wittPolynomial, bind₁_X_right, Function.comp_apply]
| [
" (bind₁ (frobeniusPolyRat p)) (wittPolynomial p ℚ n) = wittPolynomial p ℚ (n + 1)",
" (bind₁ fun n => (bind₁ (wittPolynomial p ℚ ∘ fun n => n + 1)) (xInTermsOfW p ℚ n)) (wittPolynomial p ℚ n) =\n wittPolynomial p ℚ (n + 1)"
] | [] |
import Mathlib.Algebra.Polynomial.AlgebraMap
import Mathlib.Data.Matrix.Basis
import Mathlib.Data.Matrix.DMatrix
import Mathlib.RingTheory.MatrixAlgebra
#align_import ring_theory.polynomial_algebra from "leanprover-community/mathlib"@"565eb991e264d0db702722b4bde52ee5173c9950"
universe u v w
open Polynomial Tensor... | Mathlib/RingTheory/PolynomialAlgebra.lean | 56 | 61 | theorem toFunBilinear_apply_eq_sum (a : A) (p : R[X]) :
toFunBilinear R A a p = p.sum fun n r => monomial n (a * algebraMap R A r) := by |
simp only [toFunBilinear_apply_apply, aeval_def, eval₂_eq_sum, Polynomial.sum, Finset.smul_sum]
congr with i : 1
rw [← Algebra.smul_def, ← C_mul', mul_smul_comm, C_mul_X_pow_eq_monomial, ← Algebra.commutes,
← Algebra.smul_def, smul_monomial]
| [
" ((toFunBilinear R A) a) p = p.sum fun n r => (monomial n) (a * (algebraMap R A) r)",
" ∑ x ∈ p.support, a • ((algebraMap R A[X]) (p.coeff x) * X ^ x) =\n ∑ x ∈ p.support, (monomial x) (a * (algebraMap R A) (p.coeff x))",
" a • ((algebraMap R A[X]) (p.coeff i) * X ^ i) = (monomial i) (a * (algebraMap R A) (... | [] |
import Mathlib.Algebra.Order.Group.Instances
import Mathlib.Algebra.Order.Group.OrderIso
import Mathlib.Data.Set.Pointwise.SMul
import Mathlib.Order.UpperLower.Basic
#align_import algebra.order.upper_lower from "leanprover-community/mathlib"@"c0c52abb75074ed8b73a948341f50521fbf43b4c"
open Function Set
open Pointw... | Mathlib/Algebra/Order/UpperLower.lean | 63 | 65 | theorem IsUpperSet.mul_left (ht : IsUpperSet t) : IsUpperSet (s * t) := by |
rw [← smul_eq_mul, ← Set.iUnion_smul_set]
exact isUpperSet_iUnion₂ fun x _ ↦ ht.smul
| [
" (a • s).OrdConnected",
" (a • ↑(upperClosure s) ∩ a • ↑(lowerClosure s)).OrdConnected",
" IsUpperSet (s * t)",
" IsUpperSet (⋃ a ∈ s, a • t)"
] | [
" (a • s).OrdConnected",
" (a • ↑(upperClosure s) ∩ a • ↑(lowerClosure s)).OrdConnected"
] |
import Batteries.Data.Sum.Basic
import Batteries.Logic
open Function
namespace Sum
@[simp] protected theorem «forall» {p : α ⊕ β → Prop} :
(∀ x, p x) ↔ (∀ a, p (inl a)) ∧ ∀ b, p (inr b) :=
⟨fun h => ⟨fun _ => h _, fun _ => h _⟩, fun ⟨h₁, h₂⟩ => Sum.rec h₁ h₂⟩
@[simp] protected theorem «exists» {p : α ⊕ β ... | .lake/packages/batteries/Batteries/Data/Sum/Lemmas.lean | 116 | 118 | theorem elim_eq_iff {u u' : α → γ} {v v' : β → γ} :
Sum.elim u v = Sum.elim u' v' ↔ u = u' ∧ v = v' := by |
simp [funext_iff]
| [
" (∀ (fab : (ab : α ⊕ β) → γ ab), p fab) ↔\n ∀ (fa : (val : α) → γ (inl val)) (fb : (val : β) → γ (inr val)), p fun t => rec fa fb t",
" p fab",
" fab = fun t => rec (fun a => fab (inl a)) (fun b => fab (inr b)) t",
" fab ab = rec (fun a => fab (inl a)) (fun b => fab (inr b)) ab",
" fab (inl val✝) = rec ... | [
" (∀ (fab : (ab : α ⊕ β) → γ ab), p fab) ↔\n ∀ (fa : (val : α) → γ (inl val)) (fb : (val : β) → γ (inr val)), p fun t => rec fa fb t",
" p fab",
" fab = fun t => rec (fun a => fab (inl a)) (fun b => fab (inr b)) t",
" fab ab = rec (fun a => fab (inl a)) (fun b => fab (inr b)) ab",
" fab (inl val✝) = rec ... |
import Batteries.Data.List.Basic
namespace Batteries
inductive AssocList (α : Type u) (β : Type v) where
| nil
| cons (key : α) (value : β) (tail : AssocList α β)
deriving Inhabited
namespace AssocList
@[simp] def toList : AssocList α β → List (α × β)
| nil => []
| cons a b es => (a, b) :: es.toL... | .lake/packages/batteries/Batteries/Data/AssocList.lean | 55 | 56 | theorem length_toList (l : AssocList α β) : l.toList.length = l.length := by |
induction l <;> simp_all
| [
" l.isEmpty = l.toList.isEmpty",
" nil.isEmpty = nil.toList.isEmpty",
" (cons key✝ value✝ tail✝).isEmpty = (cons key✝ value✝ tail✝).toList.isEmpty",
" l.toList.length = l.length",
" nil.toList.length = nil.length",
" (cons key✝ value✝ tail✝).toList.length = (cons key✝ value✝ tail✝).length"
] | [
" l.isEmpty = l.toList.isEmpty",
" nil.isEmpty = nil.toList.isEmpty",
" (cons key✝ value✝ tail✝).isEmpty = (cons key✝ value✝ tail✝).toList.isEmpty"
] |
import Mathlib.Analysis.Calculus.FDeriv.Equiv
import Mathlib.Analysis.Calculus.FormalMultilinearSeries
#align_import analysis.calculus.cont_diff_def from "leanprover-community/mathlib"@"3a69562db5a458db8322b190ec8d9a8bbd8a5b14"
noncomputable section
open scoped Classical
open NNReal Topology Filter
local notatio... | Mathlib/Analysis/Calculus/ContDiff/Defs.lean | 240 | 250 | theorem hasFTaylorSeriesUpToOn_top_iff :
HasFTaylorSeriesUpToOn ∞ f p s ↔ ∀ n : ℕ, HasFTaylorSeriesUpToOn n f p s := by |
constructor
· intro H n; exact H.of_le le_top
· intro H
constructor
· exact (H 0).zero_eq
· intro m _
apply (H m.succ).fderivWithin m (WithTop.coe_lt_coe.2 (lt_add_one m))
· intro m _
apply (H m).cont m le_rfl
| [
" p x 0 = (continuousMultilinearCurryFin0 𝕜 E F).symm (f x)",
" p x 0 = (continuousMultilinearCurryFin0 𝕜 E F).symm (p x 0).uncurry0",
" HasFTaylorSeriesUpToOn n f₁ p s",
" (p x 0).uncurry0 = f₁ x",
" (p x 0).uncurry0 = f x",
" ContinuousOn f s",
" HasFTaylorSeriesUpToOn 0 f p s ↔ ContinuousOn f s ∧ ∀... | [
" p x 0 = (continuousMultilinearCurryFin0 𝕜 E F).symm (f x)",
" p x 0 = (continuousMultilinearCurryFin0 𝕜 E F).symm (p x 0).uncurry0",
" HasFTaylorSeriesUpToOn n f₁ p s",
" (p x 0).uncurry0 = f₁ x",
" (p x 0).uncurry0 = f x",
" ContinuousOn f s",
" HasFTaylorSeriesUpToOn 0 f p s ↔ ContinuousOn f s ∧ ∀... |
import Mathlib.MeasureTheory.Integral.SetToL1
#align_import measure_theory.integral.bochner from "leanprover-community/mathlib"@"48fb5b5280e7c81672afc9524185ae994553ebf4"
assert_not_exists Differentiable
noncomputable section
open scoped Topology NNReal ENNReal MeasureTheory
open Set Filter TopologicalSpace EN... | Mathlib/MeasureTheory/Integral/Bochner.lean | 195 | 201 | theorem weightedSMul_smul_measure {m : MeasurableSpace α} (μ : Measure α) (c : ℝ≥0∞) {s : Set α} :
(weightedSMul (c • μ) s : F →L[ℝ] F) = c.toReal • weightedSMul μ s := by |
ext1 x
push_cast
simp_rw [Pi.smul_apply, weightedSMul_apply]
push_cast
simp_rw [Pi.smul_apply, smul_eq_mul, toReal_mul, smul_smul]
| [
" (weightedSMul μ s) x = (μ s).toReal • x",
" weightedSMul 0 = 0",
" weightedSMul 0 x✝ = 0 x✝",
" weightedSMul μ ∅ = 0",
" (weightedSMul μ ∅) x = 0 x",
" (μ ∅).toReal • x = 0 x",
" weightedSMul (μ + ν) s = weightedSMul μ s + weightedSMul ν s",
" (weightedSMul (μ + ν) s) x = (weightedSMul μ s + weighte... | [
" (weightedSMul μ s) x = (μ s).toReal • x",
" weightedSMul 0 = 0",
" weightedSMul 0 x✝ = 0 x✝",
" weightedSMul μ ∅ = 0",
" (weightedSMul μ ∅) x = 0 x",
" (μ ∅).toReal • x = 0 x",
" weightedSMul (μ + ν) s = weightedSMul μ s + weightedSMul ν s",
" (weightedSMul (μ + ν) s) x = (weightedSMul μ s + weighte... |
import Mathlib.Data.Set.Basic
open Function
universe u v
namespace Set
section Subsingleton
variable {α : Type u} {a : α} {s t : Set α}
protected def Subsingleton (s : Set α) : Prop :=
∀ ⦃x⦄ (_ : x ∈ s) ⦃y⦄ (_ : y ∈ s), x = y
#align set.subsingleton Set.Subsingleton
theorem Subsingleton.anti (ht : t.Subs... | Mathlib/Data/Set/Subsingleton.lean | 109 | 113 | theorem subsingleton_coe (s : Set α) : Subsingleton s ↔ s.Subsingleton := by |
constructor
· refine fun h => fun a ha b hb => ?_
exact SetCoe.ext_iff.2 (@Subsingleton.elim s h ⟨a, ha⟩ ⟨b, hb⟩)
· exact fun h => Subsingleton.intro fun a b => SetCoe.ext (h a.property b.property)
| [
" p s",
" p {x}",
" (∃ a, s = {a}) ↔ s.Nonempty ∧ s.Subsingleton",
" (∃ a, s = {a}) → s.Nonempty ∧ s.Subsingleton",
" {a}.Nonempty ∧ {a}.Subsingleton",
" ∃ a, s = {a}",
" Subsingleton ↑s ↔ s.Subsingleton",
" Subsingleton ↑s → s.Subsingleton",
" a = b",
" s.Subsingleton → Subsingleton ↑s"
] | [
" p s",
" p {x}",
" (∃ a, s = {a}) ↔ s.Nonempty ∧ s.Subsingleton",
" (∃ a, s = {a}) → s.Nonempty ∧ s.Subsingleton",
" {a}.Nonempty ∧ {a}.Subsingleton",
" ∃ a, s = {a}"
] |
import Mathlib.Algebra.Group.Defs
import Mathlib.Algebra.GroupWithZero.Defs
import Mathlib.Data.Int.Cast.Defs
import Mathlib.Tactic.Spread
import Mathlib.Util.AssertExists
#align_import algebra.ring.defs from "leanprover-community/mathlib"@"76de8ae01554c3b37d66544866659ff174e66e1f"
universe u v w x
variable {α : ... | Mathlib/Algebra/Ring/Defs.lean | 164 | 165 | theorem one_add_mul [RightDistribClass α] (a b : α) : (1 + a) * b = b + a * b := by |
rw [add_mul, one_mul]
| [
" (a + b + c) * d = a * d + b * d + c * d",
" (a + 1) * b = a * b + b",
" a * (b + 1) = a * b + a",
" (1 + a) * b = b + a * b"
] | [
" (a + b + c) * d = a * d + b * d + c * d",
" (a + 1) * b = a * b + b",
" a * (b + 1) = a * b + a"
] |
import Mathlib.CategoryTheory.SingleObj
import Mathlib.CategoryTheory.Limits.Shapes.Products
import Mathlib.CategoryTheory.Pi.Basic
import Mathlib.CategoryTheory.Limits.IsLimit
#align_import category_theory.category.Groupoid from "leanprover-community/mathlib"@"c9c9fa15fec7ca18e9ec97306fb8764bfe988a7e"
universe v... | Mathlib/CategoryTheory/Category/Grpd.lean | 152 | 155 | theorem piIsoPi_hom_π (J : Type u) (f : J → Grpd.{u, u}) (j : J) :
(piIsoPi J f).hom ≫ Limits.Pi.π f j = CategoryTheory.Pi.eval _ j := by |
simp [piIsoPi]
rfl
| [
" ∀ {W X Y Z : Grpd} (f : W ⟶ X) (g : X ⟶ Y) (h : Y ⟶ Z), (f ≫ g) ≫ h = f ≫ g ≫ h",
" (f✝ ≫ g✝) ≫ h✝ = f✝ ≫ g✝ ≫ h✝",
" ∀ (s : Limits.Fan F) (j : J), (fun s => Functor.pi' fun j => s.proj j) s ≫ (piLimitFan F).proj j = s.proj j",
" (fun s => Functor.pi' fun j => s.proj j) s✝ ≫ (piLimitFan F).proj j✝ = s✝.proj... | [
" ∀ {W X Y Z : Grpd} (f : W ⟶ X) (g : X ⟶ Y) (h : Y ⟶ Z), (f ≫ g) ≫ h = f ≫ g ≫ h",
" (f✝ ≫ g✝) ≫ h✝ = f✝ ≫ g✝ ≫ h✝",
" ∀ (s : Limits.Fan F) (j : J), (fun s => Functor.pi' fun j => s.proj j) s ≫ (piLimitFan F).proj j = s.proj j",
" (fun s => Functor.pi' fun j => s.proj j) s✝ ≫ (piLimitFan F).proj j✝ = s✝.proj... |
import Mathlib.Topology.Category.TopCat.Limits.Products
#align_import topology.category.Top.limits.pullbacks from "leanprover-community/mathlib"@"178a32653e369dce2da68dc6b2694e385d484ef1"
-- Porting note: every ML3 decl has an uppercase letter
set_option linter.uppercaseLean3 false
open TopologicalSpace
open Cat... | Mathlib/Topology/Category/TopCat/Limits/Pullbacks.lean | 126 | 128 | theorem pullbackIsoProdSubtype_hom_fst (f : X ⟶ Z) (g : Y ⟶ Z) :
(pullbackIsoProdSubtype f g).hom ≫ pullbackFst f g = pullback.fst := by |
rw [← Iso.eq_inv_comp, pullbackIsoProdSubtype_inv_fst]
| [
" Continuous (Prod.fst ∘ Subtype.val)",
" Continuous Prod.fst",
" Continuous Subtype.val",
" Continuous (Prod.snd ∘ Subtype.val)",
" Continuous Prod.snd",
" pullbackFst f g ≫ f = pullbackSnd f g ≫ g",
" { toFun := fun x => (↑x).1, continuous_toFun := ⋯ } ≫ f = { toFun := fun x => (↑x).2, continuous_toFu... | [
" Continuous (Prod.fst ∘ Subtype.val)",
" Continuous Prod.fst",
" Continuous Subtype.val",
" Continuous (Prod.snd ∘ Subtype.val)",
" Continuous Prod.snd",
" pullbackFst f g ≫ f = pullbackSnd f g ≫ g",
" { toFun := fun x => (↑x).1, continuous_toFun := ⋯ } ≫ f = { toFun := fun x => (↑x).2, continuous_toFu... |
import Mathlib.Order.Filter.Cofinite
import Mathlib.Order.Hom.CompleteLattice
#align_import order.liminf_limsup from "leanprover-community/mathlib"@"ffde2d8a6e689149e44fd95fa862c23a57f8c780"
set_option autoImplicit true
open Filter Set Function
variable {α β γ ι ι' : Type*}
namespace Filter
section Relation
... | Mathlib/Order/LiminfLimsup.lean | 103 | 106 | theorem IsBoundedUnder.mono_le [Preorder β] {l : Filter α} {u v : α → β}
(hu : IsBoundedUnder (· ≤ ·) l u) (hv : v ≤ᶠ[l] u) : IsBoundedUnder (· ≤ ·) l v := by |
apply hu.imp
exact fun b hb => (eventually_map.1 hb).mp <| hv.mono fun x => le_trans
| [
" IsBounded r ⊥ ↔ Nonempty α",
" IsBounded r ⊤ ↔ ∃ t, ∀ (x : α), r x t",
" IsBounded r (𝓟 s) ↔ ∃ t, ∀ x ∈ s, r x t",
" IsBoundedUnder (fun x x_1 => x ≤ x_1) l v",
" ∀ (a : β), (∀ᶠ (x : β) in map u l, (fun x x_1 => x ≤ x_1) x a) → ∀ᶠ (x : β) in map v l, (fun x x_1 => x ≤ x_1) x a"
] | [
" IsBounded r ⊥ ↔ Nonempty α",
" IsBounded r ⊤ ↔ ∃ t, ∀ (x : α), r x t",
" IsBounded r (𝓟 s) ↔ ∃ t, ∀ x ∈ s, r x t"
] |
import Mathlib.Order.ConditionallyCompleteLattice.Basic
import Mathlib.Order.LatticeIntervals
import Mathlib.Order.Interval.Set.OrdConnected
#align_import order.complete_lattice_intervals from "leanprover-community/mathlib"@"207cfac9fcd06138865b5d04f7091e46d9320432"
open scoped Classical
open Set
variable {ι : ... | Mathlib/Order/CompleteLatticeIntervals.lean | 102 | 104 | theorem subset_sInf_emptyset [Inhabited s] :
sInf (∅ : Set s) = default := by |
simp [sInf]
| [
" sInf (Subtype.val '' t) = ↑(sInf t)",
" sInf ∅ = default"
] | [
" sInf (Subtype.val '' t) = ↑(sInf t)"
] |
import Mathlib.LinearAlgebra.TensorProduct.Basic
import Mathlib.RingTheory.Finiteness
open scoped TensorProduct
open Submodule
variable {R M N : Type*}
variable [CommSemiring R] [AddCommMonoid M] [AddCommMonoid N] [Module R M] [Module R N]
variable {M₁ M₂ : Submodule R M} {N₁ N₂ : Submodule R N}
namespace Tens... | Mathlib/LinearAlgebra/TensorProduct/Finiteness.lean | 80 | 84 | theorem exists_finsupp_right (x : M ⊗[R] N) :
∃ S : N →₀ M, x = S.sum fun n m ↦ m ⊗ₜ[R] n := by |
obtain ⟨S, h⟩ := exists_finsupp_left (TensorProduct.comm R M N x)
refine ⟨S, (TensorProduct.comm R M N).injective ?_⟩
simp_rw [h, Finsupp.sum, map_sum, comm_tmul]
| [
" ∃ S, x = (Multiset.map (fun i => i.1 ⊗ₜ[R] i.2) S).sum",
" ∃ S, 0 = (Multiset.map (fun i => i.1 ⊗ₜ[R] i.2) S).sum",
" 0 = (Multiset.map (fun i => i.1 ⊗ₜ[R] i.2) 0).sum",
" ∃ S, x ⊗ₜ[R] y = (Multiset.map (fun i => i.1 ⊗ₜ[R] i.2) S).sum",
" x ⊗ₜ[R] y = (Multiset.map (fun i => i.1 ⊗ₜ[R] i.2) {(x, y)}).sum",
... | [
" ∃ S, x = (Multiset.map (fun i => i.1 ⊗ₜ[R] i.2) S).sum",
" ∃ S, 0 = (Multiset.map (fun i => i.1 ⊗ₜ[R] i.2) S).sum",
" 0 = (Multiset.map (fun i => i.1 ⊗ₜ[R] i.2) 0).sum",
" ∃ S, x ⊗ₜ[R] y = (Multiset.map (fun i => i.1 ⊗ₜ[R] i.2) S).sum",
" x ⊗ₜ[R] y = (Multiset.map (fun i => i.1 ⊗ₜ[R] i.2) {(x, y)}).sum",
... |
import Mathlib.Algebra.FreeNonUnitalNonAssocAlgebra
import Mathlib.Algebra.Lie.NonUnitalNonAssocAlgebra
import Mathlib.Algebra.Lie.UniversalEnveloping
import Mathlib.GroupTheory.GroupAction.Ring
#align_import algebra.lie.free from "leanprover-community/mathlib"@"841ac1a3d9162bf51c6327812ecb6e5e71883ac4"
universe ... | Mathlib/Algebra/Lie/Free.lean | 87 | 88 | theorem Rel.addLeft (a : lib R X) {b c : lib R X} (h : Rel R X b c) : Rel R X (a + b) (a + c) := by |
rw [add_comm _ b, add_comm _ c]; exact h.add_right _
| [
" Rel R X (a + b) (a + c)",
" Rel R X (b + a) (c + a)"
] | [] |
import Mathlib.Algebra.MvPolynomial.Degrees
#align_import data.mv_polynomial.variables from "leanprover-community/mathlib"@"2f5b500a507264de86d666a5f87ddb976e2d8de4"
noncomputable section
open Set Function Finsupp AddMonoidAlgebra
universe u v w
variable {R : Type u} {S : Type v}
namespace MvPolynomial
varia... | Mathlib/Algebra/MvPolynomial/Variables.lean | 231 | 234 | theorem vars_eq_support_biUnion_support [DecidableEq σ] :
p.vars = p.support.biUnion Finsupp.support := by |
ext i
rw [mem_vars, Finset.mem_biUnion]
| [
" p.vars = p.degrees.toFinset",
" p.degrees.toFinset = p.degrees.toFinset",
" vars 0 = ∅",
" ((monomial s) r).vars = s.support",
" (C r).vars = ∅",
" (X n).vars = {n}",
" i ∈ p.vars ↔ ∃ d ∈ p.support, i ∈ d.support",
" x v = 0",
" v ∈ f.vars",
" (p + q).vars ⊆ p.vars ∪ q.vars",
" x ∈ p.vars ∪ q.... | [
" p.vars = p.degrees.toFinset",
" p.degrees.toFinset = p.degrees.toFinset",
" vars 0 = ∅",
" ((monomial s) r).vars = s.support",
" (C r).vars = ∅",
" (X n).vars = {n}",
" i ∈ p.vars ↔ ∃ d ∈ p.support, i ∈ d.support",
" x v = 0",
" v ∈ f.vars",
" (p + q).vars ⊆ p.vars ∪ q.vars",
" x ∈ p.vars ∪ q.... |
import Mathlib.Analysis.Calculus.FDeriv.Add
import Mathlib.Analysis.Calculus.FDeriv.Equiv
import Mathlib.Analysis.Calculus.FDeriv.Prod
import Mathlib.Analysis.Calculus.Monotone
import Mathlib.Data.Set.Function
import Mathlib.Algebra.Group.Basic
import Mathlib.Tactic.WLOG
#align_import analysis.bounded_variation from ... | Mathlib/Analysis/BoundedVariation.lean | 107 | 124 | theorem sum_le_of_monotoneOn_Icc (f : α → E) {s : Set α} {m n : ℕ} {u : ℕ → α}
(hu : MonotoneOn u (Icc m n)) (us : ∀ i ∈ Icc m n, u i ∈ s) :
(∑ i ∈ Finset.Ico m n, edist (f (u (i + 1))) (f (u i))) ≤ eVariationOn f s := by |
rcases le_total n m with hnm | hmn
· simp [Finset.Ico_eq_empty_of_le hnm]
let π := projIcc m n hmn
let v i := u (π i)
calc
∑ i ∈ Finset.Ico m n, edist (f (u (i + 1))) (f (u i))
= ∑ i ∈ Finset.Ico m n, edist (f (v (i + 1))) (f (v i)) :=
Finset.sum_congr rfl fun i hi ↦ by
rw [Finset.m... | [
" Nonempty { u // Monotone u ∧ ∀ (i : ℕ), u i ∈ s }",
" eVariationOn f s = eVariationOn f' s",
" ⨆ p, ∑ i ∈ Finset.range p.1, edist (f (↑p.2 (i + 1))) (f (↑p.2 i)) =\n ⨆ p, ∑ i ∈ Finset.range p.1, edist (f' (↑p.2 (i + 1))) (f' (↑p.2 i))",
" ∑ i ∈ Finset.range p.1, edist (f (↑p.2 (i + 1))) (f (↑p.2 i)) =\n ... | [
" Nonempty { u // Monotone u ∧ ∀ (i : ℕ), u i ∈ s }",
" eVariationOn f s = eVariationOn f' s",
" ⨆ p, ∑ i ∈ Finset.range p.1, edist (f (↑p.2 (i + 1))) (f (↑p.2 i)) =\n ⨆ p, ∑ i ∈ Finset.range p.1, edist (f' (↑p.2 (i + 1))) (f' (↑p.2 i))",
" ∑ i ∈ Finset.range p.1, edist (f (↑p.2 (i + 1))) (f (↑p.2 i)) =\n ... |
import Mathlib.Analysis.Analytic.Basic
import Mathlib.Analysis.Analytic.CPolynomial
import Mathlib.Analysis.Calculus.Deriv.Basic
import Mathlib.Analysis.Calculus.ContDiff.Defs
import Mathlib.Analysis.Calculus.FDeriv.Add
#align_import analysis.calculus.fderiv_analytic from "leanprover-community/mathlib"@"3bce8d800a6f2... | Mathlib/Analysis/Calculus/FDeriv/Analytic.lean | 314 | 346 | theorem changeOrigin_toFormalMultilinearSeries [DecidableEq ι] :
continuousMultilinearCurryFin1 𝕜 (∀ i, E i) F (f.toFormalMultilinearSeries.changeOrigin x 1) =
f.linearDeriv x := by |
ext y
rw [continuousMultilinearCurryFin1_apply, linearDeriv_apply,
changeOrigin, FormalMultilinearSeries.sum]
cases isEmpty_or_nonempty ι
· have (l) : 1 + l ≠ Fintype.card ι := by
rw [add_comm, Fintype.card_eq_zero]; exact Nat.succ_ne_zero _
simp_rw [Fintype.sum_empty, changeOriginSeries_suppor... | [
" (∑ i ∈ Finset.range (Fintype.card ι + 1), (f.toFormalMultilinearSeries i) fun x => y) = f (0 + y)",
" ((f.toFormalMultilinearSeries (Fintype.card ι)) fun x => y) = f y",
" ((domDomCongr (Fintype.equivFinOfCardEq ⋯) (f.compContinuousLinearMap ContinuousLinearMap.proj)) fun x => y) = f y",
" ∀ b ∈ Finset.rang... | [
" (∑ i ∈ Finset.range (Fintype.card ι + 1), (f.toFormalMultilinearSeries i) fun x => y) = f (0 + y)",
" ((f.toFormalMultilinearSeries (Fintype.card ι)) fun x => y) = f y",
" ((domDomCongr (Fintype.equivFinOfCardEq ⋯) (f.compContinuousLinearMap ContinuousLinearMap.proj)) fun x => y) = f y",
" ∀ b ∈ Finset.rang... |
import Mathlib.Topology.Algebra.InfiniteSum.Group
import Mathlib.Logic.Encodable.Lattice
noncomputable section
open Filter Finset Function Encodable
open scoped Topology
variable {M : Type*} [CommMonoid M] [TopologicalSpace M] {m m' : M}
variable {G : Type*} [CommGroup G] {g g' : G}
-- don't declare [Topologic... | Mathlib/Topology/Algebra/InfiniteSum/NatInt.lean | 290 | 292 | theorem multipliable_iff_nat_tprod_vanishing {f : ℕ → G} : Multipliable f ↔
∀ e ∈ 𝓝 1, ∃ N : ℕ, ∀ t ⊆ {n | N ≤ n}, (∏' n : t, f n) ∈ e := by |
rw [multipliable_iff_cauchySeq_finset, cauchySeq_finset_iff_nat_tprod_vanishing]
| [
" (CauchySeq fun s => ∏ n ∈ s, f n) ↔ ∀ e ∈ 𝓝 1, ∃ N, ∀ t ⊆ {n | N ≤ n}, ∏' (n : ↑t), f ↑n ∈ e",
" ∃ N, ∀ t ⊆ {n | N ≤ n}, ∏' (n : ↑t), f ↑n ∈ e",
" ∀ ⦃a : ℕ⦄, a ∈ t → a ∉ ↑s",
" ∃ s, ∀ (t : Set ℕ), Disjoint t ↑s → ∏' (b : ↑t), f ↑b ∈ e",
" Multipliable f ↔ ∀ e ∈ 𝓝 1, ∃ N, ∀ t ⊆ {n | N ≤ n}, ∏' (n : ↑t), ... | [
" (CauchySeq fun s => ∏ n ∈ s, f n) ↔ ∀ e ∈ 𝓝 1, ∃ N, ∀ t ⊆ {n | N ≤ n}, ∏' (n : ↑t), f ↑n ∈ e",
" ∃ N, ∀ t ⊆ {n | N ≤ n}, ∏' (n : ↑t), f ↑n ∈ e",
" ∀ ⦃a : ℕ⦄, a ∈ t → a ∉ ↑s",
" ∃ s, ∀ (t : Set ℕ), Disjoint t ↑s → ∏' (b : ↑t), f ↑b ∈ e"
] |
import Mathlib.FieldTheory.SplittingField.IsSplittingField
import Mathlib.Algebra.CharP.Algebra
#align_import field_theory.splitting_field.construction from "leanprover-community/mathlib"@"e3f4be1fcb5376c4948d7f095bec45350bfb9d1a"
noncomputable section
open scoped Classical Polynomial
universe u v w
variable {... | Mathlib/FieldTheory/SplittingField/Construction.lean | 97 | 100 | theorem natDegree_removeFactor (f : K[X]) : f.removeFactor.natDegree = f.natDegree - 1 := by |
-- Porting note: `(map (AdjoinRoot.of f.factor) f)` was `_`
rw [removeFactor, natDegree_divByMonic (map (AdjoinRoot.of f.factor) f) (monic_X_sub_C _),
natDegree_map, natDegree_X_sub_C]
| [
" Irreducible f.factor",
" Irreducible (if H : ∃ g, Irreducible g ∧ g ∣ f then Classical.choose H else X)",
" Irreducible (Classical.choose H)",
" Irreducible X",
" f.factor ∣ f",
" factor 0 ∣ 0",
" Classical.choose ⋯ ∣ f",
" (X - C (AdjoinRoot.root f.factor)) * f.removeFactor = map (AdjoinRoot.of f.f... | [
" Irreducible f.factor",
" Irreducible (if H : ∃ g, Irreducible g ∧ g ∣ f then Classical.choose H else X)",
" Irreducible (Classical.choose H)",
" Irreducible X",
" f.factor ∣ f",
" factor 0 ∣ 0",
" Classical.choose ⋯ ∣ f",
" (X - C (AdjoinRoot.root f.factor)) * f.removeFactor = map (AdjoinRoot.of f.f... |
import Batteries.Data.Fin.Basic
namespace Fin
attribute [norm_cast] val_last
protected theorem le_antisymm_iff {x y : Fin n} : x = y ↔ x ≤ y ∧ y ≤ x :=
Fin.ext_iff.trans Nat.le_antisymm_iff
protected theorem le_antisymm {x y : Fin n} (h1 : x ≤ y) (h2 : y ≤ x) : x = y :=
Fin.le_antisymm_iff.2 ⟨h1, h2⟩
@[simp... | .lake/packages/batteries/Batteries/Data/Fin/Lemmas.lean | 116 | 120 | theorem foldr_succ_last (f : Fin (n+1) → α → α) (x) :
foldr (n+1) f x = foldr n (f ·.castSucc) (f (last n) x) := by |
induction n generalizing x with
| zero => simp [foldr_succ, Fin.last]
| succ n ih => rw [foldr_succ, ih (f ·.succ), foldr_succ]; simp [succ_castSucc]
| [
" enum 0 = #[]",
" (list n).length = n",
" (list n).get i = cast ⋯ i",
" (list n).get ⟨val✝, isLt✝⟩ = cast ⋯ ⟨val✝, isLt✝⟩",
" (enum n).data.get ⟨val✝, isLt✝⟩ = cast ⋯ ⟨val✝, isLt✝⟩",
" list 0 = []",
" list (n + 1) = 0 :: List.map succ (list n)",
" ∀ (n_1 : Nat) (h₁ : n_1 < (list (n + 1)).length) (h₂ ... | [
" enum 0 = #[]",
" (list n).length = n",
" (list n).get i = cast ⋯ i",
" (list n).get ⟨val✝, isLt✝⟩ = cast ⋯ ⟨val✝, isLt✝⟩",
" (enum n).data.get ⟨val✝, isLt✝⟩ = cast ⋯ ⟨val✝, isLt✝⟩",
" list 0 = []",
" list (n + 1) = 0 :: List.map succ (list n)",
" ∀ (n_1 : Nat) (h₁ : n_1 < (list (n + 1)).length) (h₂ ... |
import Mathlib.Analysis.NormedSpace.Basic
import Mathlib.Analysis.Normed.Group.Hom
import Mathlib.Data.Real.Sqrt
import Mathlib.RingTheory.Ideal.QuotientOperations
import Mathlib.Topology.MetricSpace.HausdorffDistance
#align_import analysis.normed.group.quotient from "leanprover-community/mathlib"@"2196ab363eb097c008... | Mathlib/Analysis/Normed/Group/Quotient.lean | 162 | 166 | theorem quotient_norm_mk_eq (S : AddSubgroup M) (m : M) :
‖mk' S m‖ = sInf ((‖m + ·‖) '' S) := by |
rw [mk'_apply, norm_mk, sInf_image', ← infDist_image isometry_neg, image_neg,
neg_coe_set (H := S), infDist_eq_iInf]
simp only [dist_eq_norm', sub_neg_eq_add, add_comm]
| [
" ‖x‖ = infDist 0 {m | ↑m = x}",
" ‖↑x‖ = infDist x ↑S",
" infDist x (⇑(IsometryEquiv.subLeft x).symm ⁻¹' {m | ↑m = ↑x}) = infDist x ↑S",
" y ∈ ⇑(IsometryEquiv.subLeft x).symm ⁻¹' {m | ↑m = ↑x} ↔ y ∈ ↑S",
" ‖-x‖ = ‖x‖",
" sInf (norm '' {m | ↑m = -x}) = sInf (norm '' {m | ↑m = x})",
" r ∈ norm '' {m | ↑m... | [
" ‖x‖ = infDist 0 {m | ↑m = x}",
" ‖↑x‖ = infDist x ↑S",
" infDist x (⇑(IsometryEquiv.subLeft x).symm ⁻¹' {m | ↑m = ↑x}) = infDist x ↑S",
" y ∈ ⇑(IsometryEquiv.subLeft x).symm ⁻¹' {m | ↑m = ↑x} ↔ y ∈ ↑S",
" ‖-x‖ = ‖x‖",
" sInf (norm '' {m | ↑m = -x}) = sInf (norm '' {m | ↑m = x})",
" r ∈ norm '' {m | ↑m... |
import Mathlib.Algebra.Order.Field.Basic
import Mathlib.Data.Nat.Cast.Order
import Mathlib.Tactic.Common
#align_import data.nat.cast.field from "leanprover-community/mathlib"@"acee671f47b8e7972a1eb6f4eed74b4b3abce829"
namespace Nat
variable {α : Type*}
@[simp]
theorem cast_div [DivisionSemiring α] {m n : ℕ} (n_... | Mathlib/Data/Nat/Cast/Field.lean | 70 | 73 | theorem one_div_le_one_div {n m : ℕ} (h : n ≤ m) : 1 / ((m : α) + 1) ≤ 1 / ((n : α) + 1) := by |
refine one_div_le_one_div_of_le ?_ ?_
· exact Nat.cast_add_one_pos _
· simpa
| [
" ↑(m / n) = ↑m / ↑n",
" ↑(n * k / n) = ↑(n * k) / ↑n",
" n ≠ 0",
" False",
" ↑(m / d) / ↑(n / d) = ↑m / ↑n",
" ↑(m / 0) / ↑(n / 0) = ↑m / ↑n",
" ↑d ≠ 0",
" (↑0)⁻¹ ≤ 1",
" 1 ≤ ↑(n + 1)",
" ↑(m / n) ≤ ↑m / ↑n",
" ↑(m / 0) ≤ ↑m / ↑0",
" ↑(m / (n✝ + 1)) ≤ ↑m / ↑(n✝ + 1)",
" m / (n✝ + 1) * (n✝ +... | [
" ↑(m / n) = ↑m / ↑n",
" ↑(n * k / n) = ↑(n * k) / ↑n",
" n ≠ 0",
" False",
" ↑(m / d) / ↑(n / d) = ↑m / ↑n",
" ↑(m / 0) / ↑(n / 0) = ↑m / ↑n",
" ↑d ≠ 0",
" (↑0)⁻¹ ≤ 1",
" 1 ≤ ↑(n + 1)",
" ↑(m / n) ≤ ↑m / ↑n",
" ↑(m / 0) ≤ ↑m / ↑0",
" ↑(m / (n✝ + 1)) ≤ ↑m / ↑(n✝ + 1)",
" m / (n✝ + 1) * (n✝ +... |
import Mathlib.Probability.Kernel.Disintegration.Basic
open MeasureTheory ProbabilityTheory MeasurableSpace
open scoped ENNReal
namespace ProbabilityTheory
variable {α β Ω : Type*} {mα : MeasurableSpace α} {mβ : MeasurableSpace β}
[MeasurableSpace Ω] [StandardBorelSpace Ω] [Nonempty Ω]
namespace MeasureTheory... | Mathlib/Probability/Kernel/Disintegration/Integral.lean | 261 | 267 | theorem AEStronglyMeasurable.ae_integrable_condKernel_iff {f : α × Ω → F}
(hf : AEStronglyMeasurable f ρ) :
(∀ᵐ a ∂ρ.fst, Integrable (fun ω ↦ f (a, ω)) (ρ.condKernel a)) ∧
Integrable (fun a ↦ ∫ ω, ‖f (a, ω)‖ ∂ρ.condKernel a) ρ.fst ↔ Integrable f ρ := by |
rw [← ρ.compProd_fst_condKernel] at hf
conv_rhs => rw [← ρ.compProd_fst_condKernel]
rw [Measure.integrable_compProd_iff hf]
| [
" (∀ᵐ (a : α) ∂ρ.fst, Integrable (fun ω => f (a, ω)) (ρ.condKernel a)) ∧\n Integrable (fun a => ∫ (ω : Ω), ‖f (a, ω)‖ ∂ρ.condKernel a) ρ.fst ↔\n Integrable f ρ",
"α✝ : Type u_1\nβ : Type u_2\nΩ✝ : Type u_3\nmα✝ : MeasurableSpace α✝\nmβ : MeasurableSpace β\ninst✝⁹ : MeasurableSpace Ω✝\ninst✝⁸ : StandardBor... | [] |
import Mathlib.Order.UpperLower.Basic
import Mathlib.Data.Finset.Preimage
#align_import combinatorics.young.young_diagram from "leanprover-community/mathlib"@"59694bd07f0a39c5beccba34bd9f413a160782bf"
open Function
@[ext]
structure YoungDiagram where
cells : Finset (ℕ × ℕ)
isLowerSet : IsLowerSet (cel... | Mathlib/Combinatorics/Young/YoungDiagram.lean | 321 | 322 | theorem rowLen_eq_card (μ : YoungDiagram) {i : ℕ} : μ.rowLen i = (μ.row i).card := by |
simp [row_eq_prod]
| [
" μ = ν",
" c ∈ μ.row i ↔ c ∈ μ ∧ c.1 = i",
" (i, j) ∈ μ.row i ↔ (i, j) ∈ μ",
" ∃ j, (i, j) ∉ μ",
" x✝³ = x✝¹",
" x✝² = x✝²",
" (i, j) ∈ μ ↔ j < μ.rowLen i",
" (i, j) ∈ μ ↔ ∀ m ≤ j, ¬(i, m) ∉ μ",
" (i, j) ∈ μ ↔ ∀ m ≤ j, (i, m) ∈ μ",
" i ≤ i",
" j ≤ j",
" μ.row i = {i} ×ˢ Finset.range (μ.rowLen... | [
" μ = ν",
" c ∈ μ.row i ↔ c ∈ μ ∧ c.1 = i",
" (i, j) ∈ μ.row i ↔ (i, j) ∈ μ",
" ∃ j, (i, j) ∉ μ",
" x✝³ = x✝¹",
" x✝² = x✝²",
" (i, j) ∈ μ ↔ j < μ.rowLen i",
" (i, j) ∈ μ ↔ ∀ m ≤ j, ¬(i, m) ∉ μ",
" (i, j) ∈ μ ↔ ∀ m ≤ j, (i, m) ∈ μ",
" i ≤ i",
" j ≤ j",
" μ.row i = {i} ×ˢ Finset.range (μ.rowLen... |
import Mathlib.Computability.PartrecCode
import Mathlib.Data.Set.Subsingleton
#align_import computability.halting from "leanprover-community/mathlib"@"a50170a88a47570ed186b809ca754110590f9476"
open Encodable Denumerable
namespace Nat.Partrec
open Computable Part
| Mathlib/Computability/Halting.lean | 28 | 60 | theorem merge' {f g} (hf : Nat.Partrec f) (hg : Nat.Partrec g) :
∃ h, Nat.Partrec h ∧
∀ a, (∀ x ∈ h a, x ∈ f a ∨ x ∈ g a) ∧ ((h a).Dom ↔ (f a).Dom ∨ (g a).Dom) := by |
obtain ⟨cf, rfl⟩ := Code.exists_code.1 hf
obtain ⟨cg, rfl⟩ := Code.exists_code.1 hg
have : Nat.Partrec fun n => Nat.rfindOpt fun k => cf.evaln k n <|> cg.evaln k n :=
Partrec.nat_iff.1
(Partrec.rfindOpt <|
Primrec.option_orElse.to_comp.comp
(Code.evaln_prim.to_comp.comp <| (snd.pair (... | [
" ∃ h, Partrec h ∧ ∀ (a : ℕ), (∀ x ∈ h a, x ∈ f a ∨ x ∈ g a) ∧ ((h a).Dom ↔ (f a).Dom ∨ (g a).Dom)",
" ∃ h, Partrec h ∧ ∀ (a : ℕ), (∀ x ∈ h a, x ∈ cf.eval a ∨ x ∈ g a) ∧ ((h a).Dom ↔ (cf.eval a).Dom ∨ (g a).Dom)",
" ∃ h,\n Partrec h ∧ ∀ (a : ℕ), (∀ x ∈ h a, x ∈ cf.eval a ∨ x ∈ cg.eval a) ∧ ((h a).Dom ↔ (cf.e... | [] |
import Mathlib.Analysis.SpecialFunctions.Exp
import Mathlib.Tactic.Positivity.Core
import Mathlib.Algebra.Ring.NegOnePow
#align_import analysis.special_functions.trigonometric.basic from "leanprover-community/mathlib"@"2c1d8ca2812b64f88992a5294ea3dba144755cd1"
noncomputable section
open scoped Classical
open Top... | Mathlib/Analysis/SpecialFunctions/Trigonometric/Basic.lean | 76 | 78 | theorem continuous_sinh : Continuous sinh := by |
change Continuous fun z => (exp z - exp (-z)) / 2
continuity
| [
" Continuous sin",
" Continuous fun z => (cexp (-z * I) - cexp (z * I)) * I / 2",
" Continuous cos",
" Continuous fun z => (cexp (z * I) + cexp (-z * I)) / 2",
" Continuous sinh",
" Continuous fun z => (cexp z - cexp (-z)) / 2"
] | [
" Continuous sin",
" Continuous fun z => (cexp (-z * I) - cexp (z * I)) * I / 2",
" Continuous cos",
" Continuous fun z => (cexp (z * I) + cexp (-z * I)) / 2"
] |
import Mathlib.Topology.MetricSpace.Basic
#align_import topology.metric_space.infsep from "leanprover-community/mathlib"@"5316314b553dcf8c6716541851517c1a9715e22b"
variable {α β : Type*}
namespace Set
section Einfsep
open ENNReal
open Function
noncomputable def einfsep [EDist α] (s : Set α) : ℝ≥0∞ :=
⨅ (x... | Mathlib/Topology/MetricSpace/Infsep.lean | 93 | 95 | theorem Subsingleton.einfsep (hs : s.Subsingleton) : s.einfsep = ∞ := by |
rw [einfsep_top]
exact fun _ hx _ hy hxy => (hxy <| hs hx hy).elim
| [
" d ≤ s.einfsep ↔ ∀ x ∈ s, ∀ y ∈ s, x ≠ y → d ≤ edist x y",
" s.einfsep = 0 ↔ ∀ C > 0, ∃ x ∈ s, ∃ y ∈ s, x ≠ y ∧ edist x y < C",
" 0 < s.einfsep ↔ ∃ C > 0, ∀ x ∈ s, ∀ y ∈ s, x ≠ y → C ≤ edist x y",
" (¬∀ C > 0, ∃ x ∈ s, ∃ y ∈ s, x ≠ y ∧ edist x y < C) ↔ ∃ C > 0, ∀ x ∈ s, ∀ y ∈ s, x ≠ y → C ≤ edist x y",
" s... | [
" d ≤ s.einfsep ↔ ∀ x ∈ s, ∀ y ∈ s, x ≠ y → d ≤ edist x y",
" s.einfsep = 0 ↔ ∀ C > 0, ∃ x ∈ s, ∃ y ∈ s, x ≠ y ∧ edist x y < C",
" 0 < s.einfsep ↔ ∃ C > 0, ∀ x ∈ s, ∀ y ∈ s, x ≠ y → C ≤ edist x y",
" (¬∀ C > 0, ∃ x ∈ s, ∃ y ∈ s, x ≠ y ∧ edist x y < C) ↔ ∃ C > 0, ∀ x ∈ s, ∀ y ∈ s, x ≠ y → C ≤ edist x y",
" s... |
import Mathlib.CategoryTheory.Sites.Coherent.ReflectsPreregular
import Mathlib.Topology.Category.CompHaus.EffectiveEpi
import Mathlib.Topology.Category.Profinite.Limits
import Mathlib.Topology.Category.Stonean.Basic
universe u
attribute [local instance] CategoryTheory.ConcreteCategory.instFunLike
open CategoryTh... | Mathlib/Topology/Category/Profinite/EffectiveEpi.lean | 69 | 82 | theorem effectiveEpi_tfae
{B X : Profinite.{u}} (π : X ⟶ B) :
TFAE
[ EffectiveEpi π
, Epi π
, Function.Surjective π
] := by |
tfae_have 1 → 2
· intro; infer_instance
tfae_have 2 ↔ 3
· exact epi_iff_surjective π
tfae_have 3 → 1
· exact fun hπ ↦ ⟨⟨struct π hπ⟩⟩
tfae_finish
| [
" { toFun := fun x => a, continuous_toFun := ⋯ } ≫ π = { toFun := fun x => b, continuous_toFun := ⋯ } ≫ π",
" ({ toFun := fun x => a, continuous_toFun := ⋯ } ≫ π) x✝ = ({ toFun := fun x => b, continuous_toFun := ⋯ } ≫ π) x✝",
" g = (fun {W} e h => ⋯.lift e ⋯) e ⋯",
" g = ⋯.liftEquiv ⟨e, ⋯⟩",
" ⋯.liftEquiv.s... | [
" { toFun := fun x => a, continuous_toFun := ⋯ } ≫ π = { toFun := fun x => b, continuous_toFun := ⋯ } ≫ π",
" ({ toFun := fun x => a, continuous_toFun := ⋯ } ≫ π) x✝ = ({ toFun := fun x => b, continuous_toFun := ⋯ } ≫ π) x✝",
" g = (fun {W} e h => ⋯.lift e ⋯) e ⋯",
" g = ⋯.liftEquiv ⟨e, ⋯⟩",
" ⋯.liftEquiv.s... |
import Mathlib.Data.Set.Image
import Mathlib.Order.Interval.Set.Basic
#align_import data.set.intervals.with_bot_top from "leanprover-community/mathlib"@"d012cd09a9b256d870751284dd6a29882b0be105"
open Set
variable {α : Type*}
namespace WithTop
@[simp]
theorem preimage_coe_top : (some : α → WithTop α) ⁻¹' {⊤} =... | Mathlib/Order/Interval/Set/WithBotTop.lean | 113 | 115 | theorem image_coe_Ico : (some : α → WithTop α) '' Ico a b = Ico (a : WithTop α) b := by |
rw [← preimage_coe_Ico, image_preimage_eq_inter_range, range_coe,
inter_eq_self_of_subset_left (Subset.trans Ico_subset_Iio_self <| Iio_subset_Iio le_top)]
| [
" range some = Iio ⊤",
" x ∈ range some ↔ x ∈ Iio ⊤",
" some ⁻¹' Icc ↑a ↑b = Icc a b",
" some ⁻¹' Ico ↑a ↑b = Ico a b",
" some ⁻¹' Ioc ↑a ↑b = Ioc a b",
" some ⁻¹' Ioo ↑a ↑b = Ioo a b",
" some ⁻¹' Iio ⊤ = univ",
" some ⁻¹' Ico ↑a ⊤ = Ici a",
" some ⁻¹' Ioo ↑a ⊤ = Ioi a",
" some '' Ioi a = Ioo ↑a ⊤... | [
" range some = Iio ⊤",
" x ∈ range some ↔ x ∈ Iio ⊤",
" some ⁻¹' Icc ↑a ↑b = Icc a b",
" some ⁻¹' Ico ↑a ↑b = Ico a b",
" some ⁻¹' Ioc ↑a ↑b = Ioc a b",
" some ⁻¹' Ioo ↑a ↑b = Ioo a b",
" some ⁻¹' Iio ⊤ = univ",
" some ⁻¹' Ico ↑a ⊤ = Ici a",
" some ⁻¹' Ioo ↑a ⊤ = Ioi a",
" some '' Ioi a = Ioo ↑a ⊤... |
import Mathlib.Analysis.Calculus.Deriv.Basic
import Mathlib.Analysis.Calculus.Deriv.Slope
import Mathlib.Analysis.NormedSpace.FiniteDimension
import Mathlib.MeasureTheory.Constructions.BorelSpace.ContinuousLinearMap
import Mathlib.MeasureTheory.Function.StronglyMeasurable.Basic
#align_import analysis.calculus.fderiv_... | Mathlib/Analysis/Calculus/FDeriv/Measurable.lean | 133 | 141 | theorem isOpen_A (L : E →L[𝕜] F) (r ε : ℝ) : IsOpen (A f L r ε) := by |
rw [Metric.isOpen_iff]
rintro x ⟨r', r'_mem, hr'⟩
obtain ⟨s, s_gt, s_lt⟩ : ∃ s : ℝ, r / 2 < s ∧ s < r' := exists_between r'_mem.1
have : s ∈ Ioc (r / 2) r := ⟨s_gt, le_of_lt (s_lt.trans_le r'_mem.2)⟩
refine ⟨r' - s, by linarith, fun x' hx' => ⟨s, this, ?_⟩⟩
have B : ball x' s ⊆ ball x r' := ball_subset (le... | [
" IsOpen (A f L r ε)",
" ∀ x ∈ A f L r ε, ∃ ε_1 > 0, ball x ε_1 ⊆ A f L r ε",
" ∃ ε_1 > 0, ball x ε_1 ⊆ A f L r ε",
" r' - s > 0",
" ∀ y ∈ ball x' s, ∀ z ∈ ball x' s, ‖f z - f y - L (z - y)‖ < ε * r",
" ‖f z - f y - L (z - y)‖ < ε * r"
] | [] |
import Mathlib.Data.ENNReal.Inv
#align_import data.real.ennreal from "leanprover-community/mathlib"@"c14c8fcde993801fca8946b0d80131a1a81d1520"
open Set NNReal ENNReal
namespace ENNReal
section iSup
@[simp]
theorem iSup_eq_zero {ι : Sort*} {f : ι → ℝ≥0∞} : ⨆ i, f i = 0 ↔ ∀ i, f i = 0 :=
iSup_eq_bot
#align ennr... | Mathlib/Data/ENNReal/Real.lean | 676 | 676 | theorem iSup_zero_eq_zero {ι : Sort*} : ⨆ _ : ι, (0 : ℝ≥0∞) = 0 := by | simp
| [
" ⨆ x, 0 = 0"
] | [] |
import Mathlib.LinearAlgebra.FiniteDimensional
import Mathlib.LinearAlgebra.FreeModule.Finite.Basic
import Mathlib.LinearAlgebra.FreeModule.StrongRankCondition
import Mathlib.LinearAlgebra.Projection
import Mathlib.LinearAlgebra.SesquilinearForm
import Mathlib.RingTheory.TensorProduct.Basic
import Mathlib.RingTheory.I... | Mathlib/LinearAlgebra/Dual.lean | 337 | 339 | theorem coe_toDual_self (i : ι) : b.toDual (b i) = b.coord i := by |
ext
apply toDual_apply_right
| [
" (b.toDual (b i)) (b j) = if i = j then 1 else 0",
" (if j = i then 1 else 0) = if i = j then 1 else 0",
" (b.toDual ((Finsupp.total ι M R ⇑b) f)) (b i) = f i",
" ∑ d ∈ f.support, (b.toDual (f d • b d)) (b i) = f i",
" (if i ∈ f.support then f i else 0) = f i",
" f i = f i",
" 0 = f i",
" (b.toDual (... | [
" (b.toDual (b i)) (b j) = if i = j then 1 else 0",
" (if j = i then 1 else 0) = if i = j then 1 else 0",
" (b.toDual ((Finsupp.total ι M R ⇑b) f)) (b i) = f i",
" ∑ d ∈ f.support, (b.toDual (f d • b d)) (b i) = f i",
" (if i ∈ f.support then f i else 0) = f i",
" f i = f i",
" 0 = f i",
" (b.toDual (... |
import Mathlib.Data.Finset.Lattice
import Mathlib.Data.Multiset.Powerset
#align_import data.finset.powerset from "leanprover-community/mathlib"@"9003f28797c0664a49e4179487267c494477d853"
namespace Finset
open Function Multiset
variable {α : Type*} {s t : Finset α}
section Powerset
def powerset (s : Finset... | Mathlib/Data/Finset/Powerset.lean | 83 | 84 | theorem powerset_eq_singleton_empty : s.powerset = {∅} ↔ s = ∅ := by |
rw [← powerset_empty, powerset_inj]
| [
" s ∈ t.powerset ↔ s ⊆ t",
" { val := val✝, nodup := nodup✝ } ∈ t.powerset ↔ { val := val✝, nodup := nodup✝ } ⊆ t",
" ↑s.powerset = toSet ⁻¹' 𝒫↑s",
" x✝ ∈ ↑s.powerset ↔ x✝ ∈ toSet ⁻¹' 𝒫↑s",
" s.powerset = {∅} ↔ s = ∅"
] | [
" s ∈ t.powerset ↔ s ⊆ t",
" { val := val✝, nodup := nodup✝ } ∈ t.powerset ↔ { val := val✝, nodup := nodup✝ } ⊆ t",
" ↑s.powerset = toSet ⁻¹' 𝒫↑s",
" x✝ ∈ ↑s.powerset ↔ x✝ ∈ toSet ⁻¹' 𝒫↑s"
] |
import Mathlib.Data.Int.AbsoluteValue
import Mathlib.LinearAlgebra.Matrix.Determinant.Basic
#align_import linear_algebra.matrix.absolute_value from "leanprover-community/mathlib"@"ab0a2959c83b06280ef576bc830d4aa5fe8c8e61"
open Matrix
namespace Matrix
open Equiv Finset
variable {R S : Type*} [CommRing R] [Nontr... | Mathlib/LinearAlgebra/Matrix/AbsoluteValue.lean | 37 | 49 | theorem det_le {A : Matrix n n R} {abv : AbsoluteValue R S} {x : S} (hx : ∀ i j, abv (A i j) ≤ x) :
abv A.det ≤ Nat.factorial (Fintype.card n) • x ^ Fintype.card n :=
calc
abv A.det = abv (∑ σ : Perm n, Perm.sign σ • ∏ i, A (σ i) i) := congr_arg abv (det_apply _)
_ ≤ ∑ σ : Perm n, abv (Perm.sign σ • ∏ i, ... |
rw [sum_const, Finset.card_univ, Fintype.card_perm]
| [
" abv (Perm.sign σ • ∏ i : n, A (σ i) i) = ∏ i : n, abv (A (σ i) i)",
" ∏ _i : n, x = x ^ Fintype.card n",
" ∑ _σ : Perm n, x ^ Fintype.card n = (Fintype.card n).factorial • x ^ Fintype.card n"
] | [] |
import Mathlib.Data.Set.Lattice
#align_import data.set.intervals.disjoint from "leanprover-community/mathlib"@"207cfac9fcd06138865b5d04f7091e46d9320432"
universe u v w
variable {ι : Sort u} {α : Type v} {β : Type w}
open Set
open OrderDual (toDual)
namespace Set
section LinearOrder
variable [LinearOrder α] ... | Mathlib/Order/Interval/Set/Disjoint.lean | 162 | 166 | theorem eq_of_Ico_disjoint {x₁ x₂ y₁ y₂ : α} (h : Disjoint (Ico x₁ x₂) (Ico y₁ y₂)) (hx : x₁ < x₂)
(h2 : x₂ ∈ Ico y₁ y₂) : y₁ = x₂ := by |
rw [Ico_disjoint_Ico, min_eq_left (le_of_lt h2.2), le_max_iff] at h
apply le_antisymm h2.1
exact h.elim (fun h => absurd hx (not_lt_of_le h)) id
| [
" Disjoint (Ico a₁ a₂) (Ico b₁ b₂) ↔ min a₂ b₂ ≤ max a₁ b₁",
" Disjoint (Ioc a₁ a₂) (Ioc b₁ b₂) ↔ min a₂ b₂ ≤ max a₁ b₁",
" Disjoint (Ioo a₁ a₂) (Ioo b₁ b₂) ↔ min a₂ b₂ ≤ max a₁ b₁",
" y₁ = x₂",
" x₂ ≤ y₁"
] | [
" Disjoint (Ico a₁ a₂) (Ico b₁ b₂) ↔ min a₂ b₂ ≤ max a₁ b₁",
" Disjoint (Ioc a₁ a₂) (Ioc b₁ b₂) ↔ min a₂ b₂ ≤ max a₁ b₁",
" Disjoint (Ioo a₁ a₂) (Ioo b₁ b₂) ↔ min a₂ b₂ ≤ max a₁ b₁"
] |
import Mathlib.Analysis.Calculus.BumpFunction.Basic
import Mathlib.MeasureTheory.Integral.SetIntegral
import Mathlib.MeasureTheory.Measure.Lebesgue.EqHaar
#align_import analysis.calculus.bump_function_inner from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe"
noncomputable section
open F... | Mathlib/Analysis/Calculus/BumpFunction/Normed.lean | 93 | 101 | theorem tendsto_support_normed_smallSets {ι} {φ : ι → ContDiffBump c} {l : Filter ι}
(hφ : Tendsto (fun i => (φ i).rOut) l (𝓝 0)) :
Tendsto (fun i => Function.support fun x => (φ i).normed μ x) l (𝓝 c).smallSets := by |
simp_rw [NormedAddCommGroup.tendsto_nhds_zero, Real.norm_eq_abs,
abs_eq_self.mpr (φ _).rOut_pos.le] at hφ
rw [nhds_basis_ball.smallSets.tendsto_right_iff]
refine fun ε hε ↦ (hφ ε hε).mono fun i hi ↦ ?_
rw [(φ i).support_normed_eq]
exact ball_subset_ball hi.le
| [
" f.normed μ (c - x) = f.normed μ (c + x)",
" f.normed μ (-x) = f.normed μ x",
" 0 < ∫ (x : E), ↑f x ∂μ",
" 0 < μ (support fun i => ↑f i)",
" 0 < μ (ball c f.rOut)",
" ∫ (x : E), f.normed μ x ∂μ = 1",
" (∫ (x : E), ↑f x ∂μ)⁻¹ • ∫ (x : E), ↑f x ∂μ = 1",
" support (f.normed μ) = ball c f.rOut",
" (sup... | [
" f.normed μ (c - x) = f.normed μ (c + x)",
" f.normed μ (-x) = f.normed μ x",
" 0 < ∫ (x : E), ↑f x ∂μ",
" 0 < μ (support fun i => ↑f i)",
" 0 < μ (ball c f.rOut)",
" ∫ (x : E), f.normed μ x ∂μ = 1",
" (∫ (x : E), ↑f x ∂μ)⁻¹ • ∫ (x : E), ↑f x ∂μ = 1",
" support (f.normed μ) = ball c f.rOut",
" (sup... |
import Mathlib.Topology.MetricSpace.PseudoMetric
#align_import topology.metric_space.basic from "leanprover-community/mathlib"@"c8f305514e0d47dfaa710f5a52f0d21b588e6328"
open Set Filter Bornology
open scoped NNReal Uniformity
universe u v w
variable {α : Type u} {β : Type v} {X ι : Type*}
variable [PseudoMetricS... | Mathlib/Topology/MetricSpace/Basic.lean | 96 | 97 | theorem eq_of_nndist_eq_zero {x y : γ} : nndist x y = 0 → x = y := by |
simp only [← NNReal.eq_iff, ← dist_nndist, imp_self, NNReal.coe_zero, dist_eq_zero]
| [
" m = m'",
" mk eq_of_dist_eq_zero✝ = m'",
" mk eq_of_dist_eq_zero✝¹ = mk eq_of_dist_eq_zero✝",
" toPseudoMetricSpace✝¹ = toPseudoMetricSpace✝",
" PseudoMetricSpace.toDist = PseudoMetricSpace.toDist",
" 0 = dist x y ↔ x = y",
" dist x y ≠ 0 ↔ x ≠ y",
" dist x y ≤ 0 ↔ x = y",
" 0 < dist x y ↔ x ≠ y",... | [
" m = m'",
" mk eq_of_dist_eq_zero✝ = m'",
" mk eq_of_dist_eq_zero✝¹ = mk eq_of_dist_eq_zero✝",
" toPseudoMetricSpace✝¹ = toPseudoMetricSpace✝",
" PseudoMetricSpace.toDist = PseudoMetricSpace.toDist",
" 0 = dist x y ↔ x = y",
" dist x y ≠ 0 ↔ x ≠ y",
" dist x y ≤ 0 ↔ x = y",
" 0 < dist x y ↔ x ≠ y"
... |
import Mathlib.LinearAlgebra.Matrix.Symmetric
import Mathlib.LinearAlgebra.Matrix.Orthogonal
import Mathlib.Data.Matrix.Kronecker
#align_import linear_algebra.matrix.is_diag from "leanprover-community/mathlib"@"55e2dfde0cff928ce5c70926a3f2c7dee3e2dd99"
namespace Matrix
variable {α β R n m : Type*}
open Function... | Mathlib/LinearAlgebra/Matrix/IsDiag.lean | 159 | 165 | theorem IsDiag.fromBlocks [Zero α] {A : Matrix m m α} {D : Matrix n n α} (ha : A.IsDiag)
(hd : D.IsDiag) : (A.fromBlocks 0 0 D).IsDiag := by |
rintro (i | i) (j | j) hij
· exact ha (ne_of_apply_ne _ hij)
· rfl
· rfl
· exact hd (ne_of_apply_ne _ hij)
| [
" diagonal A.diag i j = A i j",
" diagonal A.diag i i = A i i",
" (A.map f).IsDiag",
" A.map f i j = 0",
" (-A).IsDiag",
" (-A) i j = 0",
" (A + B).IsDiag",
" (A + B) i j = 0",
" (A - B).IsDiag",
" (A - B) i j = 0",
" (k • A).IsDiag",
" (k • A) i j = 0",
" A.IsDiag",
" A = Aᴴᴴ",
" (krone... | [
" diagonal A.diag i j = A i j",
" diagonal A.diag i i = A i i",
" (A.map f).IsDiag",
" A.map f i j = 0",
" (-A).IsDiag",
" (-A) i j = 0",
" (A + B).IsDiag",
" (A + B) i j = 0",
" (A - B).IsDiag",
" (A - B) i j = 0",
" (k • A).IsDiag",
" (k • A) i j = 0",
" A.IsDiag",
" A = Aᴴᴴ",
" (krone... |
import Mathlib.Tactic.CategoryTheory.Reassoc
#align_import category_theory.isomorphism from "leanprover-community/mathlib"@"8350c34a64b9bc3fc64335df8006bffcadc7baa6"
universe v u
-- morphism levels before object levels. See note [CategoryTheory universes].
namespace CategoryTheory
open Category
structure Iso {... | Mathlib/CategoryTheory/Iso.lean | 290 | 291 | theorem hom_inv_id_assoc (f : X ⟶ Y) [I : IsIso f] {Z} (g : X ⟶ Z) : f ≫ inv f ≫ g = g := by |
simp [← Category.assoc]
| [
" f ≫ inv f ≫ g = g"
] | [] |
import Mathlib.Order.Interval.Set.UnorderedInterval
import Mathlib.Algebra.Order.Interval.Set.Monoid
import Mathlib.Data.Set.Pointwise.Basic
import Mathlib.Algebra.Order.Field.Basic
import Mathlib.Algebra.Order.Group.MinMax
#align_import data.set.pointwise.interval from "leanprover-community/mathlib"@"2196ab363eb097c... | Mathlib/Data/Set/Pointwise/Interval.lean | 68 | 71 | theorem Icc_mul_Ico_subset' (a b c d : α) : Icc a b * Ico c d ⊆ Ico (a * c) (b * d) := by |
haveI := covariantClass_le_of_lt
rintro x ⟨y, ⟨hya, hyb⟩, z, ⟨hzc, hzd⟩, rfl⟩
exact ⟨mul_le_mul' hya hzc, mul_lt_mul_of_le_of_lt hyb hzd⟩
| [
" Icc a b * Ico c d ⊆ Ico (a * c) (b * d)",
" (fun x x_1 => x * x_1) y z ∈ Ico (a * c) (b * d)"
] | [] |
import Mathlib.Data.List.Nodup
import Mathlib.Data.List.Zip
import Mathlib.Data.Nat.Defs
import Mathlib.Data.List.Infix
#align_import data.list.rotate from "leanprover-community/mathlib"@"f694c7dead66f5d4c80f446c796a5aad14707f0e"
universe u
variable {α : Type u}
open Nat Function
namespace List
theorem rotate... | Mathlib/Data/List/Rotate.lean | 132 | 133 | theorem length_rotate (l : List α) (n : ℕ) : (l.rotate n).length = l.length := by |
rw [rotate_eq_rotate', length_rotate']
| [
" l.rotate (n % l.length) = l.rotate n",
" [].rotate n = []",
" l.rotate 0 = l",
" [].rotate' n = []",
" [].rotate' 0 = []",
" [].rotate' (n✝ + 1) = []",
" l.rotate' 0 = l",
" (head✝ :: tail✝).rotate' 0 = head✝ :: tail✝",
" (a :: l).rotate' n.succ = (l ++ [a]).rotate' n",
" ([].rotate' x✝).length ... | [
" l.rotate (n % l.length) = l.rotate n",
" [].rotate n = []",
" l.rotate 0 = l",
" [].rotate' n = []",
" [].rotate' 0 = []",
" [].rotate' (n✝ + 1) = []",
" l.rotate' 0 = l",
" (head✝ :: tail✝).rotate' 0 = head✝ :: tail✝",
" (a :: l).rotate' n.succ = (l ++ [a]).rotate' n",
" ([].rotate' x✝).length ... |
import Mathlib.Analysis.Asymptotics.Asymptotics
import Mathlib.Analysis.Asymptotics.Theta
import Mathlib.Analysis.Normed.Order.Basic
#align_import analysis.asymptotics.asymptotic_equivalent from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982"
namespace Asymptotics
open Filter Function
... | Mathlib/Analysis/Asymptotics/AsymptoticEquivalent.lean | 140 | 148 | theorem isEquivalent_const_iff_tendsto {c : β} (h : c ≠ 0) :
u ~[l] const _ c ↔ Tendsto u l (𝓝 c) := by |
simp (config := { unfoldPartialApp := true }) only [IsEquivalent, const, isLittleO_const_iff h]
constructor <;> intro h
· have := h.sub (tendsto_const_nhds (x := -c))
simp only [Pi.sub_apply, sub_neg_eq_add, sub_add_cancel, zero_add] at this
exact this
· have := h.sub (tendsto_const_nhds (x := c))
... | [
" v =O[l] u",
" u x✝ = (u - v) x✝ + v x✝",
" u ~[l] u",
" 0 =o[l] u",
" u ~[l] 0 ↔ u =ᶠ[l] 0",
" u =o[l] 0 ↔ u =ᶠ[l] 0",
" u ~[l] 0 ↔ u =O[l] 0",
" u ~[l] 0",
" ∃ s ∈ l, Set.EqOn u 0 s",
" u ~[l] const α c ↔ Tendsto u l (𝓝 c)",
" Tendsto (u - fun x => c) l (𝓝 0) ↔ Tendsto u l (𝓝 c)",
" Tend... | [
" v =O[l] u",
" u x✝ = (u - v) x✝ + v x✝",
" u ~[l] u",
" 0 =o[l] u",
" u ~[l] 0 ↔ u =ᶠ[l] 0",
" u =o[l] 0 ↔ u =ᶠ[l] 0",
" u ~[l] 0 ↔ u =O[l] 0",
" u ~[l] 0",
" ∃ s ∈ l, Set.EqOn u 0 s"
] |
import Mathlib.FieldTheory.Separable
import Mathlib.FieldTheory.SplittingField.Construction
import Mathlib.Algebra.CharP.Reduced
open Function Polynomial
class PerfectRing (R : Type*) (p : ℕ) [CommSemiring R] [ExpChar R p] : Prop where
bijective_frobenius : Bijective <| frobenius R p
section PerfectRing
va... | Mathlib/FieldTheory/Perfect.lean | 151 | 153 | theorem frobeniusEquiv_symm_comp_frobenius :
((frobeniusEquiv R p).symm : R →+* R).comp (frobenius R p) = RingHom.id R := by |
ext; simp
| [
" (iterateFrobeniusEquiv R p (m + n)) ((iterateFrobeniusEquiv R p (m + n)).symm x) =\n (iterateFrobeniusEquiv R p (m + n)) ((iterateFrobeniusEquiv R p m).symm ((iterateFrobeniusEquiv R p n).symm x))",
" (iterateFrobeniusEquiv R p 0) x = x",
" (iterateFrobeniusEquiv R p 1) x = x ^ p",
" ⇑(iterateFrobeniusEq... | [
" (iterateFrobeniusEquiv R p (m + n)) ((iterateFrobeniusEquiv R p (m + n)).symm x) =\n (iterateFrobeniusEquiv R p (m + n)) ((iterateFrobeniusEquiv R p m).symm ((iterateFrobeniusEquiv R p n).symm x))",
" (iterateFrobeniusEquiv R p 0) x = x",
" (iterateFrobeniusEquiv R p 1) x = x ^ p",
" ⇑(iterateFrobeniusEq... |
import Mathlib.Data.Matrix.Invertible
import Mathlib.LinearAlgebra.Matrix.NonsingularInverse
import Mathlib.LinearAlgebra.Matrix.PosDef
#align_import linear_algebra.matrix.schur_complement from "leanprover-community/mathlib"@"a176cb1219e300e85793d44583dede42377b51af"
variable {l m n α : Type*}
namespace Matrix
... | Mathlib/LinearAlgebra/Matrix/SchurComplement.lean | 390 | 394 | theorem det_fromBlocks₁₁ (A : Matrix m m α) (B : Matrix m n α) (C : Matrix n m α)
(D : Matrix n n α) [Invertible A] :
(Matrix.fromBlocks A B C D).det = det A * det (D - C * ⅟ A * B) := by |
rw [fromBlocks_eq_of_invertible₁₁ (A := A), det_mul, det_mul, det_fromBlocks_zero₂₁,
det_fromBlocks_zero₂₁, det_fromBlocks_zero₁₂, det_one, det_one, one_mul, one_mul, mul_one]
| [
" A.fromBlocks B C D = fromBlocks 1 0 (C * ⅟A) 1 * A.fromBlocks 0 0 (D - C * ⅟A * B) * fromBlocks 1 (⅟A * B) 0 1",
" (reindex (Equiv.sumComm l n) (Equiv.sumComm m n)) (A.fromBlocks B C D) =\n (reindex (Equiv.sumComm l n) (Equiv.sumComm m n))\n (fromBlocks 1 (B * ⅟D) 0 1 * (A - B * ⅟D * C).fromBlocks 0 0 D... | [
" A.fromBlocks B C D = fromBlocks 1 0 (C * ⅟A) 1 * A.fromBlocks 0 0 (D - C * ⅟A * B) * fromBlocks 1 (⅟A * B) 0 1",
" (reindex (Equiv.sumComm l n) (Equiv.sumComm m n)) (A.fromBlocks B C D) =\n (reindex (Equiv.sumComm l n) (Equiv.sumComm m n))\n (fromBlocks 1 (B * ⅟D) 0 1 * (A - B * ⅟D * C).fromBlocks 0 0 D... |
import Mathlib.Analysis.InnerProductSpace.PiL2
import Mathlib.Combinatorics.Additive.AP.Three.Defs
import Mathlib.Combinatorics.Pigeonhole
import Mathlib.Data.Complex.ExponentialBounds
#align_import combinatorics.additive.behrend from "leanprover-community/mathlib"@"4fa54b337f7d52805480306db1b1439c741848c8"
open N... | Mathlib/Combinatorics/Additive/AP/Three/Behrend.lean | 147 | 147 | theorem map_zero (d : ℕ) (a : Fin 0 → ℕ) : map d a = 0 := by | simp [map]
| [
" ThreeAPFree (frontier s)",
" a = b",
" (1 / 2) • a + (1 / 2) • c = b",
" 2 ≠ 0",
" a = (1 / 2) • a + (1 / 2) • c",
" c = (2⁻¹ + 2⁻¹) • c",
" c = 1 • c",
" ThreeAPFree (sphere x r)",
" ThreeAPFree (sphere x 0)",
" ThreeAPFree {x}",
" sphere x r = frontier (closedBall x r)",
" x ∈ box n d ↔ ∀ ... | [
" ThreeAPFree (frontier s)",
" a = b",
" (1 / 2) • a + (1 / 2) • c = b",
" 2 ≠ 0",
" a = (1 / 2) • a + (1 / 2) • c",
" c = (2⁻¹ + 2⁻¹) • c",
" c = 1 • c",
" ThreeAPFree (sphere x r)",
" ThreeAPFree (sphere x 0)",
" ThreeAPFree {x}",
" sphere x r = frontier (closedBall x r)",
" x ∈ box n d ↔ ∀ ... |
import Batteries.Tactic.Lint.Basic
import Mathlib.Algebra.Order.Monoid.Unbundled.Basic
import Mathlib.Algebra.Order.Ring.Defs
import Mathlib.Algebra.Order.ZeroLEOne
import Mathlib.Data.Nat.Cast.Order
import Mathlib.Init.Data.Int.Order
set_option autoImplicit true
namespace Linarith
theorem lt_irrefl {α : Type u} ... | Mathlib/Tactic/Linarith/Lemmas.lean | 52 | 53 | theorem mul_eq {α} [OrderedSemiring α] {a b : α} (ha : a = 0) (_ : 0 < b) : b * a = 0 := by |
simp [*]
| [
" a + b = 0",
" a + b ≤ 0",
" a + b < 0",
" 0 < -(b * a)",
" b * a ≤ 0",
" b * a = 0"
] | [
" a + b = 0",
" a + b ≤ 0",
" a + b < 0",
" 0 < -(b * a)",
" b * a ≤ 0"
] |
import Mathlib.Analysis.Analytic.Basic
import Mathlib.Combinatorics.Enumerative.Composition
#align_import analysis.analytic.composition from "leanprover-community/mathlib"@"ce11c3c2a285bbe6937e26d9792fda4e51f3fe1a"
noncomputable section
variable {𝕜 : Type*} {E F G H : Type*}
open Filter List
open scoped Topol... | Mathlib/Analysis/Analytic/Composition.lean | 140 | 162 | theorem applyComposition_update (p : FormalMultilinearSeries 𝕜 E F) {n : ℕ} (c : Composition n)
(j : Fin n) (v : Fin n → E) (z : E) :
p.applyComposition c (Function.update v j z) =
Function.update (p.applyComposition c v) (c.index j)
(p (c.blocksFun (c.index j))
(Function.update (v ∘ c.... |
ext k
by_cases h : k = c.index j
· rw [h]
let r : Fin (c.blocksFun (c.index j)) → Fin n := c.embedding (c.index j)
simp only [Function.update_same]
change p (c.blocksFun (c.index j)) (Function.update v j z ∘ r) = _
let j' := c.invEmbedding j
suffices B : Function.update v j z ∘ r = Function.u... | [
" p.applyComposition (Composition.ones n) = fun v i => (p 1) fun x => v (Fin.castLE ⋯ i)",
" p.applyComposition (Composition.ones n) v i = (p 1) fun x => v (Fin.castLE ⋯ i)",
" ∀ (i_1 : ℕ) (him : i_1 < (Composition.ones n).blocksFun i),\n i_1 < 1 → (v ∘ ⇑((Composition.ones n).embedding i)) ⟨i_1, him⟩ = v (Fi... | [
" p.applyComposition (Composition.ones n) = fun v i => (p 1) fun x => v (Fin.castLE ⋯ i)",
" p.applyComposition (Composition.ones n) v i = (p 1) fun x => v (Fin.castLE ⋯ i)",
" ∀ (i_1 : ℕ) (him : i_1 < (Composition.ones n).blocksFun i),\n i_1 < 1 → (v ∘ ⇑((Composition.ones n).embedding i)) ⟨i_1, him⟩ = v (Fi... |
import Mathlib.CategoryTheory.Sites.InducedTopology
import Mathlib.CategoryTheory.Sites.LocallyBijective
import Mathlib.CategoryTheory.Sites.PreservesLocallyBijective
import Mathlib.CategoryTheory.Sites.Whiskering
universe u
namespace CategoryTheory
open Functor Limits GrothendieckTopology
variable {C : Type*} [C... | Mathlib/CategoryTheory/Sites/Equivalence.lean | 67 | 82 | theorem coverPreserving : CoverPreserving J (e.locallyCoverDense J).inducedTopology e.functor where
cover_preserve {U S} h := by |
change _ ∈ J.sieves (e.inverse.obj (e.functor.obj U))
convert J.pullback_stable (e.unitInv.app U) h
ext Z f
rw [← Sieve.functorPushforward_comp]
simp only [Sieve.functorPushforward_apply, Presieve.functorPushforward, exists_and_left, id_obj,
comp_obj, Sieve.pullback_apply]
constructor
... | [
" LocallyCoverDense J e.inverse",
" Sieve.functorPushforward e.inverse (Sieve.functorPullback e.inverse ↑T) ∈ J.sieves (e.inverse.obj X)",
" Sieve.functorPushforward e.inverse (Sieve.functorPullback e.inverse ↑T) = ↑T",
" (Sieve.functorPushforward e.inverse (Sieve.functorPullback e.inverse ↑T)).arrows f ↔ (↑T... | [
" LocallyCoverDense J e.inverse",
" Sieve.functorPushforward e.inverse (Sieve.functorPullback e.inverse ↑T) ∈ J.sieves (e.inverse.obj X)",
" Sieve.functorPushforward e.inverse (Sieve.functorPullback e.inverse ↑T) = ↑T",
" (Sieve.functorPushforward e.inverse (Sieve.functorPullback e.inverse ↑T)).arrows f ↔ (↑T... |
import Mathlib.LinearAlgebra.Matrix.Transvection
import Mathlib.LinearAlgebra.Matrix.NonsingularInverse
import Mathlib.Tactic.FinCases
#align_import linear_algebra.matrix.block from "leanprover-community/mathlib"@"6ca1a09bc9aa75824bf97388c9e3b441fc4ccf3f"
open Finset Function OrderDual
open Matrix
universe v
v... | Mathlib/LinearAlgebra/Matrix/Block.lean | 63 | 69 | theorem blockTriangular_reindex_iff {b : n → α} {e : m ≃ n} :
(reindex e e M).BlockTriangular b ↔ M.BlockTriangular (b ∘ e) := by |
refine ⟨fun h => ?_, fun h => ?_⟩
· convert h.submatrix
simp only [reindex_apply, submatrix_submatrix, submatrix_id_id, Equiv.symm_comp_self]
· convert h.submatrix
simp only [comp.assoc b e e.symm, Equiv.self_comp_symm, comp_id]
| [
" ((reindex e e) M).BlockTriangular b ↔ M.BlockTriangular (b ∘ ⇑e)",
" M.BlockTriangular (b ∘ ⇑e)",
" M = ((reindex e e) M).submatrix ⇑e ⇑e",
" ((reindex e e) M).BlockTriangular b",
" b = (b ∘ ⇑e) ∘ fun i => e.symm i"
] | [] |
import Mathlib.Init.Function
#align_import data.option.n_ary from "leanprover-community/mathlib"@"995b47e555f1b6297c7cf16855f1023e355219fb"
universe u
open Function
namespace Option
variable {α β γ δ : Type*} {f : α → β → γ} {a : Option α} {b : Option β} {c : Option γ}
def map₂ (f : α → β → γ) (a : Option α) ... | Mathlib/Data/Option/NAry.lean | 95 | 96 | theorem map₂_map_left (f : γ → β → δ) (g : α → γ) :
map₂ f (a.map g) b = map₂ (fun a b => f (g a) b) a b := by | cases a <;> rfl
| [
" map₂ f a b = Seq.seq (f <$> a) fun x => b",
" map₂ f none b = Seq.seq (f <$> none) fun x => b",
" map₂ f (some val✝) b = Seq.seq (f <$> some val✝) fun x => b",
" map₂ f a none = none",
" map₂ f none none = none",
" map₂ f (some val✝) none = none",
" map₂ f a (some b) = Option.map (fun a => f a b) a",
... | [
" map₂ f a b = Seq.seq (f <$> a) fun x => b",
" map₂ f none b = Seq.seq (f <$> none) fun x => b",
" map₂ f (some val✝) b = Seq.seq (f <$> some val✝) fun x => b",
" map₂ f a none = none",
" map₂ f none none = none",
" map₂ f (some val✝) none = none",
" map₂ f a (some b) = Option.map (fun a => f a b) a",
... |
import Mathlib.Algebra.GroupPower.IterateHom
import Mathlib.Analysis.SpecificLimits.Basic
import Mathlib.Order.Iterate
import Mathlib.Order.SemiconjSup
import Mathlib.Tactic.Monotonicity
import Mathlib.Topology.Order.MonotoneContinuity
#align_import dynamics.circle.rotation_number.translation_number from "leanprover-... | Mathlib/Dynamics/Circle/RotationNumber/TranslationNumber.lean | 218 | 219 | theorem units_apply_inv_apply (f : CircleDeg1Liftˣ) (x : ℝ) :
f ((f⁻¹ : CircleDeg1Liftˣ) x) = x := by | simp only [← mul_apply, f.mul_inv, coe_one, id]
| [
" f (1 + x) = 1 + f x",
" (f.comp g.toOrderHom).toFun (x + 1) = (f.comp g.toOrderHom).toFun x + 1",
" ↑f⁻¹ (↑f x) = x",
" ↑f (↑f⁻¹ x) = x"
] | [
" f (1 + x) = 1 + f x",
" (f.comp g.toOrderHom).toFun (x + 1) = (f.comp g.toOrderHom).toFun x + 1",
" ↑f⁻¹ (↑f x) = x"
] |
import Mathlib.LinearAlgebra.Dimension.StrongRankCondition
import Mathlib.LinearAlgebra.FreeModule.Basic
import Mathlib.LinearAlgebra.FreeModule.Finite.Basic
#align_import linear_algebra.dimension from "leanprover-community/mathlib"@"47a5f8186becdbc826190ced4312f8199f9db6a5"
noncomputable section
universe u v v'... | Mathlib/LinearAlgebra/Dimension/Free.lean | 111 | 118 | theorem nonempty_linearEquiv_of_lift_rank_eq
(cnd : Cardinal.lift.{v'} (Module.rank R M) = Cardinal.lift.{v} (Module.rank R M')) :
Nonempty (M ≃ₗ[R] M') := by |
obtain ⟨⟨α, B⟩⟩ := Module.Free.exists_basis (R := R) (M := M)
obtain ⟨⟨β, B'⟩⟩ := Module.Free.exists_basis (R := R) (M := M')
have : Cardinal.lift.{v', v} #α = Cardinal.lift.{v, v'} #β := by
rw [B.mk_eq_rank'', cnd, B'.mk_eq_rank'']
exact (Cardinal.lift_mk_eq.{v, v', 0}.1 this).map (B.equiv B')
| [
" Nonempty (M ≃ₗ[R] M')",
" lift.{v', v} #α = lift.{v, v'} #β"
] | [] |
import Mathlib.LinearAlgebra.Pi
import Mathlib.LinearAlgebra.Quotient
#align_import linear_algebra.quotient_pi from "leanprover-community/mathlib"@"398f60f60b43ef42154bd2bdadf5133daf1577a4"
namespace Submodule
open LinearMap
variable {ι R : Type*} [CommRing R]
variable {Ms : ι → Type*} [∀ i, AddCommGroup (Ms i)... | Mathlib/LinearAlgebra/QuotientPi.lean | 42 | 46 | theorem piQuotientLift_mk [Fintype ι] [DecidableEq ι] (p : ∀ i, Submodule R (Ms i))
(q : Submodule R N) (f : ∀ i, Ms i →ₗ[R] N) (hf : ∀ i, p i ≤ q.comap (f i)) (x : ∀ i, Ms i) :
(piQuotientLift p q f hf fun i => Quotient.mk (x i)) = Quotient.mk (lsum _ _ R f x) := by |
rw [piQuotientLift, lsum_apply, sum_apply, ← mkQ_apply, lsum_apply, sum_apply, _root_.map_sum]
simp only [coe_proj, mapQ_apply, mkQ_apply, comp_apply]
| [
" ((piQuotientLift p q f hf) fun i => Quotient.mk (x i)) = Quotient.mk (((lsum R (fun i => Ms i) R) f) x)",
" (∑ d : ι, ((p d).mapQ q (f d) ⋯ ∘ₗ proj d) fun i => Quotient.mk (x i)) = ∑ x_1 : ι, q.mkQ ((f x_1 ∘ₗ proj x_1) x)"
] | [] |
import Mathlib.Algebra.BigOperators.Group.Finset
#align_import data.nat.gcd.big_operators from "leanprover-community/mathlib"@"008205aa645b3f194c1da47025c5f110c8406eab"
namespace Nat
variable {ι : Type*}
theorem coprime_list_prod_left_iff {l : List ℕ} {k : ℕ} :
Coprime l.prod k ↔ ∀ n ∈ l, Coprime n k := by
... | Mathlib/Data/Nat/GCD/BigOperators.lean | 52 | 54 | theorem coprime_fintype_prod_left_iff [Fintype ι] {s : ι → ℕ} {x : ℕ} :
Coprime (∏ i, s i) x ↔ ∀ i, Coprime (s i) x := by |
simp [coprime_prod_left_iff]
| [
" l.prod.Coprime k ↔ ∀ n ∈ l, n.Coprime k",
" [].prod.Coprime k ↔ ∀ n ∈ [], n.Coprime k",
" (head✝ :: tail✝).prod.Coprime k ↔ ∀ n ∈ head✝ :: tail✝, n.Coprime k",
" k.Coprime l.prod ↔ ∀ n ∈ l, k.Coprime n",
" m.prod.Coprime k ↔ ∀ n ∈ m, n.Coprime k",
" (Multiset.prod ⟦a✝⟧).Coprime k ↔ ∀ n ∈ ⟦a✝⟧, n.Coprime... | [
" l.prod.Coprime k ↔ ∀ n ∈ l, n.Coprime k",
" [].prod.Coprime k ↔ ∀ n ∈ [], n.Coprime k",
" (head✝ :: tail✝).prod.Coprime k ↔ ∀ n ∈ head✝ :: tail✝, n.Coprime k",
" k.Coprime l.prod ↔ ∀ n ∈ l, k.Coprime n",
" m.prod.Coprime k ↔ ∀ n ∈ m, n.Coprime k",
" (Multiset.prod ⟦a✝⟧).Coprime k ↔ ∀ n ∈ ⟦a✝⟧, n.Coprime... |
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 | 132 | 134 | theorem card_support_eraseLead' {c : ℕ} (fc : f.support.card = c + 1) :
f.eraseLead.support.card = c := by |
rw [card_support_eraseLead, fc, add_tsub_cancel_right]
| [
" f.eraseLead.support = f.support.erase f.natDegree",
" f.eraseLead.coeff i = if i = f.natDegree then 0 else f.coeff i",
" f.eraseLead.coeff f.natDegree = 0",
" f.eraseLead.coeff i = f.coeff i",
" eraseLead 0 = 0",
" f.eraseLead + C f.leadingCoeff * X ^ f.natDegree = f",
" f - C f.leadingCoeff * X ^ f.n... | [
" f.eraseLead.support = f.support.erase f.natDegree",
" f.eraseLead.coeff i = if i = f.natDegree then 0 else f.coeff i",
" f.eraseLead.coeff f.natDegree = 0",
" f.eraseLead.coeff i = f.coeff i",
" eraseLead 0 = 0",
" f.eraseLead + C f.leadingCoeff * X ^ f.natDegree = f",
" f - C f.leadingCoeff * X ^ f.n... |
import Mathlib.Analysis.Calculus.Deriv.Basic
import Mathlib.Analysis.Calculus.FDeriv.Mul
import Mathlib.Analysis.Calculus.FDeriv.Add
#align_import analysis.calculus.deriv.mul from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe"
universe u v w
noncomputable section
open scoped Classical... | Mathlib/Analysis/Calculus/Deriv/Mul.lean | 206 | 212 | theorem HasDerivWithinAt.mul (hc : HasDerivWithinAt c c' s x) (hd : HasDerivWithinAt d d' s x) :
HasDerivWithinAt (fun y => c y * d y) (c' * d x + c x * d') s x := by |
have := (HasFDerivWithinAt.mul' hc hd).hasDerivWithinAt
rwa [ContinuousLinearMap.add_apply, ContinuousLinearMap.smul_apply,
ContinuousLinearMap.smulRight_apply, ContinuousLinearMap.smulRight_apply,
ContinuousLinearMap.smulRight_apply, ContinuousLinearMap.one_apply, one_smul, one_smul,
add_comm] at this... | [
" HasDerivWithinAt (fun y => c y * d y) (c' * d x + c x * d') s x"
] | [] |
import Mathlib.Topology.MetricSpace.Algebra
import Mathlib.Analysis.Normed.Field.Basic
#align_import analysis.normed.mul_action from "leanprover-community/mathlib"@"bc91ed7093bf098d253401e69df601fc33dde156"
variable {α β : Type*}
section SeminormedAddGroup
variable [SeminormedAddGroup α] [SeminormedAddGroup β] ... | Mathlib/Analysis/Normed/MulAction.lean | 37 | 38 | theorem dist_smul_le (s : α) (x y : β) : dist (s • x) (s • y) ≤ ‖s‖ * dist x y := by |
simpa only [dist_eq_norm, sub_zero] using dist_smul_pair s x y
| [
" ‖r • x‖ ≤ ‖r‖ * ‖x‖",
" dist (s • x) (s • y) ≤ ‖s‖ * dist x y"
] | [
" ‖r • x‖ ≤ ‖r‖ * ‖x‖"
] |
import Mathlib.Algebra.BigOperators.Group.Finset
import Mathlib.Data.Finset.NatAntidiagonal
import Mathlib.Data.Nat.GCD.Basic
import Mathlib.Init.Data.Nat.Lemmas
import Mathlib.Logic.Function.Iterate
import Mathlib.Tactic.Ring
import Mathlib.Tactic.Zify
#align_import data.nat.fib from "leanprover-community/mathlib"@"... | Mathlib/Data/Nat/Fib/Basic.lean | 187 | 194 | theorem fib_two_mul_add_two (n : ℕ) :
fib (2 * n + 2) = fib (n + 1) * (2 * fib n + fib (n + 1)) := by |
rw [fib_add_two, fib_two_mul, fib_two_mul_add_one]
-- Porting note: A bunch of issues similar to [this zulip thread](https://github.com/leanprover-community/mathlib4/pull/1576) with `zify`
have : fib n ≤ 2 * fib (n + 1) :=
le_trans fib_le_fib_succ (mul_comm 2 _ ▸ Nat.le_mul_of_pos_right _ two_pos)
zify [th... | [
" (n + 2).fib = n.fib + (n + 1).fib",
" n.fib ≤ (n + 1).fib",
" fib 0 ≤ (0 + 1).fib",
" (n✝ + 1).fib ≤ (n✝ + 1 + 1).fib",
" (n + 2).fib = 0 ↔ n + 2 = 0",
" 0 < n.fib ↔ 0 < n",
" (n + 2).fib - (n + 1).fib = n.fib",
" n.fib < (n + 1).fib",
" (2 + n).fib < (2 + n + 1).fib",
" 0 < n + 1",
" StrictMo... | [
" (n + 2).fib = n.fib + (n + 1).fib",
" n.fib ≤ (n + 1).fib",
" fib 0 ≤ (0 + 1).fib",
" (n✝ + 1).fib ≤ (n✝ + 1 + 1).fib",
" (n + 2).fib = 0 ↔ n + 2 = 0",
" 0 < n.fib ↔ 0 < n",
" (n + 2).fib - (n + 1).fib = n.fib",
" n.fib < (n + 1).fib",
" (2 + n).fib < (2 + n + 1).fib",
" 0 < n + 1",
" StrictMo... |
import Mathlib.Algebra.ContinuedFractions.Computation.Approximations
import Mathlib.Algebra.ContinuedFractions.Computation.CorrectnessTerminating
import Mathlib.Data.Rat.Floor
#align_import algebra.continued_fractions.computation.terminates_iff_rat from "leanprover-community/mathlib"@"a7e36e48519ab281320c4d192da6a7b3... | Mathlib/Algebra/ContinuedFractions/Computation/TerminatesIffRat.lean | 106 | 109 | theorem exists_rat_eq_nth_numerator : ∃ q : ℚ, (of v).numerators n = (q : K) := by |
rcases exists_gcf_pair_rat_eq_nth_conts v n with ⟨⟨a, _⟩, nth_cont_eq⟩
use a
simp [num_eq_conts_a, nth_cont_eq]
| [
" ∀ (n : ℕ),\n (∀ m < n, ∃ conts, (of v).continuantsAux m = Pair.map Rat.cast conts) →\n ∃ conts, (of v).continuantsAux n = Pair.map Rat.cast conts",
" ∃ conts, (of v).continuantsAux n = Pair.map Rat.cast conts",
" ∃ conts, (of v).continuantsAux 0 = Pair.map Rat.cast conts",
" ∃ gp, { a := 1, b := 0 }... | [
" ∀ (n : ℕ),\n (∀ m < n, ∃ conts, (of v).continuantsAux m = Pair.map Rat.cast conts) →\n ∃ conts, (of v).continuantsAux n = Pair.map Rat.cast conts",
" ∃ conts, (of v).continuantsAux n = Pair.map Rat.cast conts",
" ∃ conts, (of v).continuantsAux 0 = Pair.map Rat.cast conts",
" ∃ gp, { a := 1, b := 0 }... |
import Batteries.Data.Array.Lemmas
import Batteries.Tactic.Lint.Misc
namespace Batteries
structure UFNode where
parent : Nat
rank : Nat
namespace UnionFind
def panicWith (v : α) (msg : String) : α := @panic α ⟨v⟩ msg
@[simp] theorem panicWith_eq (v : α) (msg) : panicWith v msg = v := rfl
def parentD... | .lake/packages/batteries/Batteries/Data/UnionFind/Basic.lean | 47 | 50 | theorem parentD_set {arr : Array UFNode} {x v i} :
parentD (arr.set x v) i = if x.1 = i then v.parent else parentD arr i := by |
rw [parentD]; simp [Array.get_eq_getElem, parentD]
split <;> [split <;> simp [Array.get_set, *]; split <;> [(subst i; cases ‹¬_› x.2); rfl]]
| [
" parentD (arr.set x v) i = if ↑x = i then v.parent else parentD arr i",
" (if h : i < (arr.set x v).size then ((arr.set x v).get ⟨i, h⟩).parent else i) =\n if ↑x = i then v.parent else parentD arr i",
" (if h : i < arr.size then (arr.set x v)[i].parent else i) =\n if ↑x = i then v.parent else if h : i < ... | [] |
import Mathlib.Data.Fintype.Card
import Mathlib.GroupTheory.Perm.Basic
import Mathlib.Tactic.Ring
#align_import data.fintype.perm from "leanprover-community/mathlib"@"509de852e1de55e1efa8eacfa11df0823f26f226"
open Function
open Nat
universe u v
variable {α β γ : Type*}
open Finset Function List Equiv Equiv.Per... | Mathlib/Data/Fintype/Perm.lean | 47 | 74 | theorem mem_permsOfList_of_mem {l : List α} {f : Perm α} (h : ∀ x, f x ≠ x → x ∈ l) :
f ∈ permsOfList l := by |
induction l generalizing f with
| nil =>
-- Porting note: applied `not_mem_nil` because it is no longer true definitionally.
simp only [not_mem_nil] at h
exact List.mem_singleton.2 (Equiv.ext fun x => Decidable.by_contradiction <| h x)
| cons a l IH =>
by_cases hfa : f a = a
· refine mem_append_l... | [
" (permsOfList (a :: l)).length = (a :: l).length !",
" (permsOfList (a :: l)).length = (l.length + 1) * l.length !",
" l.length ! + l.length * l.length ! = l.length * l.length ! + l.length !",
" f ∈ permsOfList l",
" f ∈ permsOfList []",
" f ∈ permsOfList (a :: l)",
" x ≠ a",
" False",
" ∀ (x : α),... | [
" (permsOfList (a :: l)).length = (a :: l).length !",
" (permsOfList (a :: l)).length = (l.length + 1) * l.length !",
" l.length ! + l.length * l.length ! = l.length * l.length ! + l.length !"
] |
import Mathlib.Data.Matrix.Notation
import Mathlib.LinearAlgebra.BilinearMap
import Mathlib.LinearAlgebra.Matrix.Determinant.Basic
import Mathlib.Algebra.Lie.Basic
#align_import linear_algebra.cross_product from "leanprover-community/mathlib"@"91288e351d51b3f0748f0a38faa7613fb0ae2ada"
open Matrix
open Matrix
va... | Mathlib/LinearAlgebra/CrossProduct.lean | 146 | 148 | theorem leibniz_cross (u v w : Fin 3 → R) : u ×₃ (v ×₃ w) = u ×₃ v ×₃ w + v ×₃ (u ×₃ w) := by |
simp_rw [cross_apply, vec3_add]
apply vec3_eq <;> norm_num <;> ring
| [
" (Fin 3 → R) →ₗ[R] (Fin 3 → R) →ₗ[R] Fin 3 → R",
" ∀ (m₁ m₂ n : Fin 3 → R),\n ![(m₁ + m₂) 1 * n 2 - (m₁ + m₂) 2 * n 1, (m₁ + m₂) 2 * n 0 - (m₁ + m₂) 0 * n 2,\n (m₁ + m₂) 0 * n 1 - (m₁ + m₂) 1 * n 0] =\n ![m₁ 1 * n 2 - m₁ 2 * n 1, m₁ 2 * n 0 - m₁ 0 * n 2, m₁ 0 * n 1 - m₁ 1 * n 0] +\n ![m₂ 1 ... | [
" (Fin 3 → R) →ₗ[R] (Fin 3 → R) →ₗ[R] Fin 3 → R",
" ∀ (m₁ m₂ n : Fin 3 → R),\n ![(m₁ + m₂) 1 * n 2 - (m₁ + m₂) 2 * n 1, (m₁ + m₂) 2 * n 0 - (m₁ + m₂) 0 * n 2,\n (m₁ + m₂) 0 * n 1 - (m₁ + m₂) 1 * n 0] =\n ![m₁ 1 * n 2 - m₁ 2 * n 1, m₁ 2 * n 0 - m₁ 0 * n 2, m₁ 0 * n 1 - m₁ 1 * n 0] +\n ![m₂ 1 ... |
import Mathlib.Analysis.LocallyConvex.Basic
#align_import analysis.locally_convex.balanced_core_hull from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982"
open Set Pointwise Topology Filter
variable {𝕜 E ι : Type*}
section balancedHull
section SeminormedRing
variable [SeminormedRing ... | Mathlib/Analysis/LocallyConvex/BalancedCoreHull.lean | 81 | 82 | theorem mem_balancedCore_iff : x ∈ balancedCore 𝕜 s ↔ ∃ t, Balanced 𝕜 t ∧ t ⊆ s ∧ x ∈ t := by |
simp_rw [balancedCore, mem_sUnion, mem_setOf_eq, and_assoc]
| [
" x ∈ balancedCore 𝕜 s ↔ ∃ t, Balanced 𝕜 t ∧ t ⊆ s ∧ x ∈ t"
] | [] |
import Mathlib.Data.List.Sym
namespace Multiset
variable {α : Type*}
section Sym2
protected def sym2 (m : Multiset α) : Multiset (Sym2 α) :=
m.liftOn (fun xs => xs.sym2) fun _ _ h => by rw [coe_eq_coe]; exact h.sym2
@[simp] theorem sym2_coe (xs : List α) : (xs : Multiset α).sym2 = xs.sym2 := rfl
@[simp]
the... | Mathlib/Data/Multiset/Sym.lean | 63 | 66 | theorem sym2_mono {m m' : Multiset α} (h : m ≤ m') : m.sym2 ≤ m'.sym2 := by |
refine Quotient.inductionOn₂ m m' (fun xs ys h => ?_) h
suffices xs <+~ ys from this.sym2
simpa only [quot_mk_to_coe, coe_le, sym2_coe] using h
| [
" (fun xs => ↑xs.sym2) x✝¹ = (fun xs => ↑xs.sym2) x✝",
" x✝¹.sym2.Perm x✝.sym2",
" Multiset.sym2 ⟦xs⟧ = 0 ↔ ⟦xs⟧ = 0",
" s(a, b) ∈ Multiset.sym2 ⟦xs⟧ ↔ a ∈ ⟦xs⟧ ∧ b ∈ ⟦xs⟧",
" z ∈ Multiset.sym2 ⟦xs⟧ ↔ ∀ y ∈ z, y ∈ ⟦xs⟧",
" m.sym2 ≤ m'.sym2",
" Multiset.sym2 ⟦xs⟧ ≤ Multiset.sym2 ⟦ys⟧",
" xs <+~ ys"
] | [
" (fun xs => ↑xs.sym2) x✝¹ = (fun xs => ↑xs.sym2) x✝",
" x✝¹.sym2.Perm x✝.sym2",
" Multiset.sym2 ⟦xs⟧ = 0 ↔ ⟦xs⟧ = 0",
" s(a, b) ∈ Multiset.sym2 ⟦xs⟧ ↔ a ∈ ⟦xs⟧ ∧ b ∈ ⟦xs⟧",
" z ∈ Multiset.sym2 ⟦xs⟧ ↔ ∀ y ∈ z, y ∈ ⟦xs⟧"
] |
import Mathlib.SetTheory.Ordinal.Arithmetic
import Mathlib.SetTheory.Ordinal.Exponential
#align_import set_theory.ordinal.fixed_point from "leanprover-community/mathlib"@"0dd4319a17376eda5763cd0a7e0d35bbaaa50e83"
noncomputable section
universe u v
open Function Order
namespace Ordinal
section
variable {ι ... | Mathlib/SetTheory/Ordinal/FixedPoint.lean | 102 | 106 | theorem nfpFamily_le_apply [Nonempty ι] (H : ∀ i, IsNormal (f i)) {a b} :
(∃ i, nfpFamily.{u, v} f a ≤ f i b) ↔ nfpFamily.{u, v} f a ≤ b := by |
rw [← not_iff_not]
push_neg
exact apply_lt_nfpFamily_iff H
| [
" (∃ i, nfpFamily f a ≤ f i b) ↔ nfpFamily f a ≤ b",
" (¬∃ i, nfpFamily f a ≤ f i b) ↔ ¬nfpFamily f a ≤ b",
" (∀ (i : ι), f i b < nfpFamily f a) ↔ b < nfpFamily f a"
] | [] |
import Mathlib.LinearAlgebra.Projectivization.Basic
#align_import linear_algebra.projective_space.independence from "leanprover-community/mathlib"@"1e82f5ec4645f6a92bb9e02fce51e44e3bc3e1fe"
open scoped LinearAlgebra.Projectivization
variable {ι K V : Type*} [DivisionRing K] [AddCommGroup V] [Module K V] {f : ι → ... | Mathlib/LinearAlgebra/Projectivization/Independence.lean | 103 | 104 | theorem independent_iff_not_dependent : Independent f ↔ ¬Dependent f := by |
rw [dependent_iff_not_independent, Classical.not_not]
| [
" Independent f ↔ LinearIndependent K (Projectivization.rep ∘ f)",
" Independent f → LinearIndependent K (Projectivization.rep ∘ f)",
" LinearIndependent K (Projectivization.rep ∘ fun i => mk K (ff i) ⋯)",
" (Projectivization.rep ∘ fun i => mk K (ff i) ⋯) = a • ff",
" (Projectivization.rep ∘ fun i => mk K (... | [
" Independent f ↔ LinearIndependent K (Projectivization.rep ∘ f)",
" Independent f → LinearIndependent K (Projectivization.rep ∘ f)",
" LinearIndependent K (Projectivization.rep ∘ fun i => mk K (ff i) ⋯)",
" (Projectivization.rep ∘ fun i => mk K (ff i) ⋯) = a • ff",
" (Projectivization.rep ∘ fun i => mk K (... |
import Mathlib.Analysis.RCLike.Lemmas
import Mathlib.MeasureTheory.Function.StronglyMeasurable.Inner
import Mathlib.MeasureTheory.Integral.SetIntegral
#align_import measure_theory.function.l2_space from "leanprover-community/mathlib"@"83a66c8775fa14ee5180c85cab98e970956401ad"
set_option linter.uppercaseLean3 false... | Mathlib/MeasureTheory/Function/L2Space.lean | 81 | 83 | theorem Integrable.const_inner (c : E) (hf : Integrable f μ) :
Integrable (fun x => ⟪c, f x⟫) μ := by |
rw [← memℒp_one_iff_integrable] at hf ⊢; exact hf.const_inner c
| [
" Integrable (fun x => f x ^ 2) μ",
" Memℒp f 2 μ ↔ Integrable (fun x => ‖f x‖ ^ 2) μ",
" Memℒp f 2 μ ↔ Memℒp (fun x => ‖f x‖ ^ 2) 1 μ",
" ‖f x✝‖ ^ 2 = ‖f x✝‖ ^ ENNReal.toReal 2",
" 1 = 2 / 2",
" Memℒp f 2 μ ↔ Integrable (fun x => f x ^ 2) μ",
" f x✝ ^ 2 = ‖f x✝‖ ^ 2",
" ‖⟪f x, c⟫_𝕜‖ ≤ ?m.10094 * ‖f ... | [
" Integrable (fun x => f x ^ 2) μ",
" Memℒp f 2 μ ↔ Integrable (fun x => ‖f x‖ ^ 2) μ",
" Memℒp f 2 μ ↔ Memℒp (fun x => ‖f x‖ ^ 2) 1 μ",
" ‖f x✝‖ ^ 2 = ‖f x✝‖ ^ ENNReal.toReal 2",
" 1 = 2 / 2",
" Memℒp f 2 μ ↔ Integrable (fun x => f x ^ 2) μ",
" f x✝ ^ 2 = ‖f x✝‖ ^ 2",
" ‖⟪f x, c⟫_𝕜‖ ≤ ?m.10094 * ‖f ... |
import Mathlib.Data.Int.Range
import Mathlib.Data.ZMod.Basic
import Mathlib.NumberTheory.MulChar.Basic
#align_import number_theory.legendre_symbol.zmod_char from "leanprover-community/mathlib"@"70fd9563a21e7b963887c9360bd29b2393e6225a"
namespace ZMod
section QuadCharModP
@[simps]
def χ₄ : MulChar (ZMod 4) ℤ... | Mathlib/NumberTheory/LegendreSymbol/ZModChar.lean | 80 | 91 | theorem χ₄_eq_neg_one_pow {n : ℕ} (hn : n % 2 = 1) : χ₄ n = (-1) ^ (n / 2) := by |
rw [χ₄_nat_eq_if_mod_four]
simp only [hn, Nat.one_ne_zero, if_false]
conv_rhs => -- Porting note: was `nth_rw`
arg 2; rw [← Nat.div_add_mod n 4]
enter [1, 1, 1]; rw [(by norm_num : 4 = 2 * 2)]
rw [mul_assoc, add_comm, Nat.add_mul_div_left _ _ (by norm_num : 0 < 2), pow_add, pow_mul,
neg_one_sq, one... | [
" ∀ (x y : ZMod 4),\n { toFun := ![0, 1, 0, -1], map_one' := ⋯ }.toFun (x * y) =\n { toFun := ![0, 1, 0, -1], map_one' := ⋯ }.toFun x * { toFun := ![0, 1, 0, -1], map_one' := ⋯ }.toFun y",
" ∀ (a : ZMod 4), ¬IsUnit a → (↑{ toFun := ![0, 1, 0, -1], map_one' := ⋯, map_mul' := ⋯ }).toFun a = 0",
" χ₄.IsQua... | [
" ∀ (x y : ZMod 4),\n { toFun := ![0, 1, 0, -1], map_one' := ⋯ }.toFun (x * y) =\n { toFun := ![0, 1, 0, -1], map_one' := ⋯ }.toFun x * { toFun := ![0, 1, 0, -1], map_one' := ⋯ }.toFun y",
" ∀ (a : ZMod 4), ¬IsUnit a → (↑{ toFun := ![0, 1, 0, -1], map_one' := ⋯, map_mul' := ⋯ }).toFun a = 0",
" χ₄.IsQua... |
import Mathlib.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 | 87 | 93 | theorem integral_fintype_prod_eq_prod (ι : Type*) [Fintype ι] {E : ι → Type*}
(f : (i : ι) → E i → 𝕜) [∀ i, MeasureSpace (E i)] [∀ i, SigmaFinite (volume : Measure (E i))] :
∫ x : (i : ι) → E i, ∏ i, f i (x i) = ∏ i, ∫ x, f i x := by |
let e := (equivFin ι).symm
rw [← (volume_measurePreserving_piCongrLeft _ e).integral_comp']
simp_rw [← e.prod_comp, MeasurableEquiv.coe_piCongrLeft, Equiv.piCongrLeft_apply_apply,
MeasureTheory.integral_fin_nat_prod_eq_prod]
| [
" 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.Analysis.BoxIntegral.Basic
import Mathlib.Analysis.BoxIntegral.Partition.Additive
import Mathlib.Analysis.Calculus.FDeriv.Prod
#align_import analysis.box_integral.divergence_theorem from "leanprover-community/mathlib"@"e3fb84046afd187b710170887195d50bada934ee"
open scoped Classical NNReal ENNReal T... | Mathlib/Analysis/BoxIntegral/DivergenceTheorem.lean | 65 | 136 | theorem norm_volume_sub_integral_face_upper_sub_lower_smul_le {f : (Fin (n + 1) → ℝ) → E}
{f' : (Fin (n + 1) → ℝ) →L[ℝ] E} (hfc : ContinuousOn f (Box.Icc I)) {x : Fin (n + 1) → ℝ}
(hxI : x ∈ (Box.Icc I)) {a : E} {ε : ℝ} (h0 : 0 < ε)
(hε : ∀ y ∈ (Box.Icc I), ‖f y - a - f' (y - x)‖ ≤ ε * ‖y - x‖) {c : ℝ≥0}
... |
-- Porting note: Lean fails to find `α` in the next line
set e : ℝ → (Fin n → ℝ) → (Fin (n + 1) → ℝ) := i.insertNth (α := fun _ ↦ ℝ)
/- **Plan of the proof**. The difference of the integrals of the affine function
`fun y ↦ a + f' (y - x)` over the faces `x i = I.upper i` and `x i = I.lower i` is equal to the... | [
" ‖(∏ j : Fin (n + 1), (I.upper j - I.lower j)) • f' (Pi.single i 1) -\n (integral (I.face i) ⊥ (f ∘ i.insertNth (I.upper i)) BoxAdditiveMap.volume -\n integral (I.face i) ⊥ (f ∘ i.insertNth (I.lower i)) BoxAdditiveMap.volume)‖ ≤\n 2 * ε * ↑c * ∏ j : Fin (n + 1), (I.upper j - I.lower j)",
" ‖(∏... | [] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.