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.NumberTheory.Zsqrtd.Basic
import Mathlib.RingTheory.PrincipalIdealDomain
import Mathlib.Data.Complex.Basic
import Mathlib.Data.Real.Archimedean
#align_import number_theory.zsqrtd.gaussian_int from "leanprover-community/mathlib"@"5b2fe80501ff327b9109fb09b7cc8c325cd0d7d9"
open Zsqrtd Complex
open sc... | Mathlib/NumberTheory/Zsqrtd/GaussianInt.lean | 97 | 97 | theorem toComplex_re (x y : ℤ) : ((⟨x, y⟩ : ℤ[i]) : ℂ).re = x := by | simp [toComplex_def]
| [
" I * I = ↑(-1)",
" toComplex { re := x, im := y } = ↑x + ↑y * I",
" toComplex x = { re := ↑x.re, im := ↑x.im }",
" (toComplex x).re = { re := ↑x.re, im := ↑x.im }.re",
" (toComplex x).im = { re := ↑x.re, im := ↑x.im }.im",
" ↑x.re = (toComplex x).re",
" ↑x.im = (toComplex x).im",
" (toComplex { re :=... | [
" I * I = ↑(-1)",
" toComplex { re := x, im := y } = ↑x + ↑y * I",
" toComplex x = { re := ↑x.re, im := ↑x.im }",
" (toComplex x).re = { re := ↑x.re, im := ↑x.im }.re",
" (toComplex x).im = { re := ↑x.re, im := ↑x.im }.im",
" ↑x.re = (toComplex x).re",
" ↑x.im = (toComplex x).im"
] |
import Mathlib.RingTheory.AdjoinRoot
import Mathlib.FieldTheory.Minpoly.Field
import Mathlib.RingTheory.Polynomial.GaussLemma
#align_import field_theory.minpoly.is_integrally_closed from "leanprover-community/mathlib"@"f0c8bf9245297a541f468be517f1bde6195105e9"
open scoped Classical Polynomial
open Polynomial Set... | Mathlib/FieldTheory/Minpoly/IsIntegrallyClosed.lean | 125 | 135 | theorem _root_.IsIntegrallyClosed.minpoly.unique {s : S} {P : R[X]} (hmo : P.Monic)
(hP : Polynomial.aeval s P = 0)
(Pmin : ∀ Q : R[X], Q.Monic → Polynomial.aeval s Q = 0 → degree P ≤ degree Q) :
P = minpoly R s := by |
have hs : IsIntegral R s := ⟨P, hmo, hP⟩
symm; apply eq_of_sub_eq_zero
by_contra hnz
refine IsIntegrallyClosed.degree_le_of_ne_zero hs hnz (by simp [hP]) |>.not_lt ?_
refine degree_sub_lt ?_ (ne_zero hs) ?_
· exact le_antisymm (min R s hmo hP) (Pmin (minpoly R s) (monic hs) (aeval R s))
· rw [(monic hs).... | [
" minpoly K ((algebraMap S L) s) = map (algebraMap R K) (minpoly R s)",
" Irreducible (map (algebraMap R K) (minpoly R s))",
" (Polynomial.aeval ((algebraMap S L) s)) (map (algebraMap R K) (minpoly R s)) = 0",
" (map (algebraMap R K) (minpoly R s)).Monic",
" minpoly K s = map (algebraMap R K) (minpoly R s)"... | [
" minpoly K ((algebraMap S L) s) = map (algebraMap R K) (minpoly R s)",
" Irreducible (map (algebraMap R K) (minpoly R s))",
" (Polynomial.aeval ((algebraMap S L) s)) (map (algebraMap R K) (minpoly R s)) = 0",
" (map (algebraMap R K) (minpoly R s)).Monic",
" minpoly K s = map (algebraMap R K) (minpoly R s)"... |
import Mathlib.Algebra.GroupWithZero.Divisibility
import Mathlib.Algebra.Order.Group.Int
import Mathlib.Algebra.Order.Ring.Nat
import Mathlib.Algebra.Ring.Rat
import Mathlib.Data.PNat.Defs
#align_import data.rat.lemmas from "leanprover-community/mathlib"@"550b58538991c8977703fdeb7c9d51a5aa27df11"
namespace Rat
o... | Mathlib/Data/Rat/Lemmas.lean | 87 | 90 | theorem mul_den_dvd (q₁ q₂ : ℚ) : (q₁ * q₂).den ∣ q₁.den * q₂.den := by |
rw [mul_def, normalize_eq]
apply Nat.div_dvd_of_dvd
apply Nat.gcd_dvd_right
| [
" (a /. b).num ∣ a",
" { num := n, den := d, den_nz := h, reduced := c }.num ∣ a",
" n.natAbs ∣ a.natAbs * d",
" ↑(a /. b).den ∣ b",
" ↑{ num := n, den := d, den_nz := h, reduced := c }.den ∣ b",
" d ∣ n.natAbs * b.natAbs",
" ↑d ∣ a * ↑d",
" ∃ c, n = c * q.num ∧ d = c * ↑q.den",
" ∃ c, 0 = c * q.num... | [
" (a /. b).num ∣ a",
" { num := n, den := d, den_nz := h, reduced := c }.num ∣ a",
" n.natAbs ∣ a.natAbs * d",
" ↑(a /. b).den ∣ b",
" ↑{ num := n, den := d, den_nz := h, reduced := c }.den ∣ b",
" d ∣ n.natAbs * b.natAbs",
" ↑d ∣ a * ↑d",
" ∃ c, n = c * q.num ∧ d = c * ↑q.den",
" ∃ c, 0 = c * q.num... |
import Mathlib.Algebra.Order.Ring.Cast
import Mathlib.Data.Int.Cast.Lemmas
import Mathlib.Data.Nat.Bitwise
import Mathlib.Data.Nat.PSub
import Mathlib.Data.Nat.Size
import Mathlib.Data.Num.Bitwise
#align_import data.num.lemmas from "leanprover-community/mathlib"@"2196ab363eb097c008d4497125e0dde23fb36db2"
set_opti... | Mathlib/Data/Num/Lemmas.lean | 1,059 | 1,059 | theorem zneg_bitm1 (n : ZNum) : -n.bitm1 = (-n).bit1 := by | cases n <;> rfl
| [
" - -n = n",
" - -zero = zero",
" - -pos a✝ = pos a✝",
" - -neg a✝ = neg a✝",
" -n.bit1 = (-n).bitm1",
" -zero.bit1 = (-zero).bitm1",
" -(pos a✝).bit1 = (-pos a✝).bitm1",
" -(neg a✝).bit1 = (-neg a✝).bitm1",
" -n.bitm1 = (-n).bit1",
" -zero.bitm1 = (-zero).bit1",
" -(pos a✝).bitm1 = (-pos a✝).bi... | [
" - -n = n",
" - -zero = zero",
" - -pos a✝ = pos a✝",
" - -neg a✝ = neg a✝",
" -n.bit1 = (-n).bitm1",
" -zero.bit1 = (-zero).bitm1",
" -(pos a✝).bit1 = (-pos a✝).bitm1",
" -(neg a✝).bit1 = (-neg a✝).bitm1"
] |
import Mathlib.SetTheory.Ordinal.Arithmetic
#align_import set_theory.ordinal.exponential from "leanprover-community/mathlib"@"b67044ba53af18680e1dd246861d9584e968495d"
noncomputable section
open Function Cardinal Set Equiv Order
open scoped Classical
open Cardinal Ordinal
universe u v w
namespace Ordinal
in... | Mathlib/SetTheory/Ordinal/Exponential.lean | 63 | 65 | theorem opow_limit {a b : Ordinal} (a0 : a ≠ 0) (h : IsLimit b) :
a ^ b = bsup.{u, u} b fun c _ => a ^ c := by |
simp only [opow_def, if_neg a0]; rw [limitRecOn_limit _ _ _ _ h]
| [
" 0 ^ a = 1 - a",
" 0 ^ a = 0",
" a ^ 0 = 1",
" a ^ succ b = a ^ b * a",
" 0 ^ succ b = 0 ^ b * 0",
" a ^ b = b.bsup fun c x => a ^ c",
" (b.limitRecOn 1 (fun x IH => IH * a) fun b x => b.bsup) =\n b.bsup fun c x => c.limitRecOn 1 (fun x IH => IH * a) fun b x => b.bsup"
] | [
" 0 ^ a = 1 - a",
" 0 ^ a = 0",
" a ^ 0 = 1",
" a ^ succ b = a ^ b * a",
" 0 ^ succ b = 0 ^ b * 0"
] |
import Batteries.Data.HashMap.Basic
import Batteries.Data.Array.Lemmas
import Batteries.Data.Nat.Lemmas
namespace Batteries.HashMap
namespace Imp
attribute [-simp] Bool.not_eq_true
namespace Buckets
@[ext] protected theorem ext : ∀ {b₁ b₂ : Buckets α β}, b₁.1.data = b₂.1.data → b₁ = b₂
| ⟨⟨_⟩, _⟩, ⟨⟨_⟩, _⟩, rfl ... | .lake/packages/batteries/Batteries/Data/HashMap/WF.lean | 23 | 27 | theorem exists_of_update (self : Buckets α β) (i d h) :
∃ l₁ l₂, self.1.data = l₁ ++ self.1[i] :: l₂ ∧ List.length l₁ = i.toNat ∧
(self.update i d h).1.data = l₁ ++ d :: l₂ := by |
simp only [Array.data_length, Array.ugetElem_eq_getElem, Array.getElem_eq_data_get]
exact List.exists_of_set' h
| [
" ∃ l₁ l₂, self.val.data = l₁ ++ self.val[i] :: l₂ ∧ l₁.length = i.toNat ∧ (self.update i d h).val.data = l₁ ++ d :: l₂",
" ∃ l₁ l₂,\n self.val.data = l₁ ++ self.val.data.get ⟨i.toNat, h⟩ :: l₂ ∧\n l₁.length = i.toNat ∧ (self.update i d h).val.data = l₁ ++ d :: l₂"
] | [] |
import Mathlib.Analysis.Analytic.Basic
import Mathlib.Analysis.Analytic.Composition
import Mathlib.Analysis.Analytic.Linear
import Mathlib.Analysis.Calculus.FDeriv.Analytic
import Mathlib.Geometry.Manifold.ChartedSpace
import Mathlib.Analysis.NormedSpace.FiniteDimension
import Mathlib.Analysis.Calculus.ContDiff.Basic
... | Mathlib/Geometry/Manifold/SmoothManifoldWithCorners.lean | 256 | 258 | theorem target_eq : I.target = range (I : H → E) := by |
rw [← image_univ, ← I.source_eq]
exact I.image_source_eq_target.symm
| [
" I.target = range ↑I",
" I.target = ↑I '' I.source"
] | [] |
import Mathlib.MeasureTheory.Group.GeometryOfNumbers
import Mathlib.MeasureTheory.Measure.Lebesgue.VolumeOfBalls
import Mathlib.NumberTheory.NumberField.CanonicalEmbedding.Basic
#align_import number_theory.number_field.canonical_embedding from "leanprover-community/mathlib"@"60da01b41bbe4206f05d34fd70c8dd7498717a30"
... | Mathlib/NumberTheory/NumberField/CanonicalEmbedding/ConvexBody.lean | 221 | 266 | theorem convexBodyLT'_volume :
volume (convexBodyLT' K f w₀) = convexBodyLT'Factor K * ∏ w, (f w) ^ (mult w) := by |
have vol_box : ∀ B : ℝ≥0, volume {x : ℂ | |x.re| < 1 ∧ |x.im| < B^2} = 4*B^2 := by
intro B
rw [← (Complex.volume_preserving_equiv_real_prod.symm).measure_preimage]
· simp_rw [Set.preimage_setOf_eq, Complex.measurableEquivRealProd_symm_apply]
rw [show {a : ℝ × ℝ | |a.1| < 1 ∧ |a.2| < B ^ 2} =
... | [
" (mixedEmbedding K) x ∈ convexBodyLT' K f w₀ ↔\n (∀ (w : InfinitePlace K), w ≠ ↑w₀ → w x < ↑(f w)) ∧\n |((↑w₀).embedding x).re| < 1 ∧ |((↑w₀).embedding x).im| < ↑(f ↑w₀) ^ 2",
" ((∀ (a : InfinitePlace K), a.IsReal → a x < ↑(f a)) ∧\n ∀ (a : InfinitePlace K) (b : a.IsComplex),\n if ⟨a, b⟩ = w₀... | [
" (mixedEmbedding K) x ∈ convexBodyLT' K f w₀ ↔\n (∀ (w : InfinitePlace K), w ≠ ↑w₀ → w x < ↑(f w)) ∧\n |((↑w₀).embedding x).re| < 1 ∧ |((↑w₀).embedding x).im| < ↑(f ↑w₀) ^ 2",
" ((∀ (a : InfinitePlace K), a.IsReal → a x < ↑(f a)) ∧\n ∀ (a : InfinitePlace K) (b : a.IsComplex),\n if ⟨a, b⟩ = w₀... |
import Mathlib.Order.Filter.Lift
import Mathlib.Order.Filter.AtTopBot
#align_import order.filter.small_sets from "leanprover-community/mathlib"@"8631e2d5ea77f6c13054d9151d82b83069680cb1"
open Filter
open Filter Set
variable {α β : Type*} {ι : Sort*}
namespace Filter
variable {l l' la : Filter α} {lb : Filter ... | Mathlib/Order/Filter/SmallSets.lean | 110 | 112 | theorem smallSets_bot : (⊥ : Filter α).smallSets = pure ∅ := by |
rw [smallSets, lift'_bot, powerset_empty, principal_singleton]
exact monotone_powerset
| [
" f.smallSets = generate (powerset '' f.sets)",
" f.lift' powerset = ⨅ b ∈ f.sets, 𝓟 (𝒫 b)",
" GaloisConnection (fun L => L.bind 𝓟) smallSets",
" (fun L => L.bind 𝓟) L ≤ l ↔ L ≤ l.smallSets",
" L.bind 𝓟 ≤ l ↔ l.sets ⊆ powerset ⁻¹' L.sets",
" Tendsto (fun x => f '' x) la.smallSets lb.smallSets ↔ Tends... | [
" f.smallSets = generate (powerset '' f.sets)",
" f.lift' powerset = ⨅ b ∈ f.sets, 𝓟 (𝒫 b)",
" GaloisConnection (fun L => L.bind 𝓟) smallSets",
" (fun L => L.bind 𝓟) L ≤ l ↔ L ≤ l.smallSets",
" L.bind 𝓟 ≤ l ↔ l.sets ⊆ powerset ⁻¹' L.sets",
" Tendsto (fun x => f '' x) la.smallSets lb.smallSets ↔ Tends... |
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 | 45 | 47 | theorem MetricSpace.ext {α : Type*} {m m' : MetricSpace α} (h : m.toDist = m'.toDist) :
m = m' := by |
cases m; cases m'; congr; ext1; assumption
| [
" 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"
] | [] |
import Mathlib.Order.SuccPred.Basic
import Mathlib.Topology.Order.Basic
import Mathlib.Topology.Metrizable.Uniformity
#align_import topology.instances.discrete from "leanprover-community/mathlib"@"bcfa726826abd57587355b4b5b7e78ad6527b7e4"
open Order Set TopologicalSpace Filter
variable {α : Type*} [TopologicalSp... | Mathlib/Topology/Instances/Discrete.lean | 66 | 72 | theorem discreteTopology_iff_orderTopology_of_pred_succ' [PartialOrder α] [PredOrder α]
[SuccOrder α] [NoMinOrder α] [NoMaxOrder α] : DiscreteTopology α ↔ OrderTopology α := by |
refine ⟨fun h => ⟨?_⟩, fun h => ⟨?_⟩⟩
· rw [h.eq_bot]
exact bot_topologicalSpace_eq_generateFrom_of_pred_succOrder
· rw [h.topology_eq_generate_intervals]
exact bot_topologicalSpace_eq_generateFrom_of_pred_succOrder.symm
| [
" ∀ (a : α), (nhds a).IsCountablyGenerated",
" ∀ (a : α), (pure a).IsCountablyGenerated",
" instTopologicalSpaceSubtype = generateFrom {univ}",
" ⊥ = generateFrom {s | ∃ a, s = Ioi a ∨ s = Iio a}",
" IsOpen {a}",
" {a} = Iio (succ a) ∩ Ioi (pred a)",
" {a} = Iic a ∩ Ici a",
" IsOpen (Iio (succ a) ∩ Io... | [
" ∀ (a : α), (nhds a).IsCountablyGenerated",
" ∀ (a : α), (pure a).IsCountablyGenerated",
" instTopologicalSpaceSubtype = generateFrom {univ}",
" ⊥ = generateFrom {s | ∃ a, s = Ioi a ∨ s = Iio a}",
" IsOpen {a}",
" {a} = Iio (succ a) ∩ Ioi (pred a)",
" {a} = Iic a ∩ Ici a",
" IsOpen (Iio (succ a) ∩ Io... |
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 | 119 | 121 | theorem neg_one_pow_div_two_of_one_mod_four {n : ℕ} (hn : n % 4 = 1) : (-1 : ℤ) ^ (n / 2) = 1 := by |
rw [← χ₄_eq_neg_one_pow (Nat.odd_of_mod_four_eq_one hn), ← natCast_mod, hn]
rfl
| [
" ∀ (x y : ZMod 4),\n { toFun := ![0, 1, 0, -1], map_one' := ⋯ }.toFun (x * y) =\n { toFun := ![0, 1, 0, -1], map_one' := ⋯ }.toFun x * { toFun := ![0, 1, 0, -1], map_one' := ⋯ }.toFun y",
" ∀ (a : ZMod 4), ¬IsUnit a → (↑{ toFun := ![0, 1, 0, -1], map_one' := ⋯, map_mul' := ⋯ }).toFun a = 0",
" χ₄.IsQua... | [
" ∀ (x y : ZMod 4),\n { toFun := ![0, 1, 0, -1], map_one' := ⋯ }.toFun (x * y) =\n { toFun := ![0, 1, 0, -1], map_one' := ⋯ }.toFun x * { toFun := ![0, 1, 0, -1], map_one' := ⋯ }.toFun y",
" ∀ (a : ZMod 4), ¬IsUnit a → (↑{ toFun := ![0, 1, 0, -1], map_one' := ⋯, map_mul' := ⋯ }).toFun a = 0",
" χ₄.IsQua... |
import Mathlib.Data.Multiset.FinsetOps
import Mathlib.Data.Multiset.Fold
#align_import data.multiset.lattice from "leanprover-community/mathlib"@"65a1391a0106c9204fe45bc73a039f056558cb83"
namespace Multiset
variable {α : Type*}
section Inf
-- can be defined with just `[Top α]` where some lemmas hold with... | Mathlib/Data/Multiset/Lattice.lean | 163 | 164 | theorem inf_ndunion (s₁ s₂ : Multiset α) : (ndunion s₁ s₂).inf = s₁.inf ⊓ s₂.inf := by |
rw [← inf_dedup, dedup_ext.2, inf_dedup, inf_add]; simp
| [
" (s₁ + s₂).inf = fold (fun x x_1 => x ⊓ x_1) (⊤ ⊓ ⊤) (s₁ + s₂)",
" a ≤ inf 0 ↔ ∀ b ∈ 0, a ≤ b",
" ∀ (a_1 : α) (s : Multiset α), (a ≤ s.inf ↔ ∀ b ∈ s, a ≤ b) → (a ≤ (a_1 ::ₘ s).inf ↔ ∀ b ∈ a_1 ::ₘ s, a ≤ b)",
" (s₁.ndunion s₂).inf = s₁.inf ⊓ s₂.inf",
" ∀ (a : α), a ∈ s₁.ndunion s₂ ↔ a ∈ s₁ + s₂"
] | [
" (s₁ + s₂).inf = fold (fun x x_1 => x ⊓ x_1) (⊤ ⊓ ⊤) (s₁ + s₂)",
" a ≤ inf 0 ↔ ∀ b ∈ 0, a ≤ b",
" ∀ (a_1 : α) (s : Multiset α), (a ≤ s.inf ↔ ∀ b ∈ s, a ≤ b) → (a ≤ (a_1 ::ₘ s).inf ↔ ∀ b ∈ a_1 ::ₘ s, a ≤ b)"
] |
import Mathlib.Algebra.Lie.Abelian
import Mathlib.Algebra.Lie.IdealOperations
import Mathlib.Order.Hom.Basic
#align_import algebra.lie.solvable from "leanprover-community/mathlib"@"a50170a88a47570ed186b809ca754110590f9476"
universe u v w w₁ w₂
variable (R : Type u) (L : Type v) (M : Type w) {L' : Type w₁}
variab... | Mathlib/Algebra/Lie/Solvable.lean | 131 | 133 | theorem abelian_iff_derived_one_eq_bot : IsLieAbelian I ↔ derivedSeriesOfIdeal R L 1 I = ⊥ := by |
rw [derivedSeriesOfIdeal_succ, derivedSeriesOfIdeal_zero,
LieSubmodule.lie_abelian_iff_lie_self_eq_bot]
| [
" D (k + l) I = D k (D l I)",
" D (0 + l) I = D 0 (D l I)",
" D (k + 1 + l) I = D (k + 1) (D l I)",
" D k I ≤ D l J",
" ∀ {l : ℕ}, l ≤ k → D k I ≤ D l J",
" ∀ {l : ℕ}, l ≤ 0 → D 0 I ≤ D l J",
" ∀ {l : ℕ}, l ≤ k + 1 → D (k + 1) I ≤ D l J",
" D 0 I ≤ D l J",
" I ≤ D 0 J",
" D (k + 1) I ≤ D l J",
"... | [
" D (k + l) I = D k (D l I)",
" D (0 + l) I = D 0 (D l I)",
" D (k + 1 + l) I = D (k + 1) (D l I)",
" D k I ≤ D l J",
" ∀ {l : ℕ}, l ≤ k → D k I ≤ D l J",
" ∀ {l : ℕ}, l ≤ 0 → D 0 I ≤ D l J",
" ∀ {l : ℕ}, l ≤ k + 1 → D (k + 1) I ≤ D l J",
" D 0 I ≤ D l J",
" I ≤ D 0 J",
" D (k + 1) I ≤ D l J",
"... |
import Mathlib.Algebra.Order.Monoid.Defs
import Mathlib.Algebra.Order.Sub.Defs
import Mathlib.Util.AssertExists
#align_import algebra.order.group.defs from "leanprover-community/mathlib"@"b599f4e4e5cf1fbcb4194503671d3d9e569c1fce"
open Function
universe u
variable {α : Type u}
class OrderedAddCommGroup (α : Ty... | Mathlib/Algebra/Order/Group/Defs.lean | 411 | 413 | theorem mul_inv_lt_inv_mul_iff : a * b⁻¹ < d⁻¹ * c ↔ d * a < c * b := by |
rw [← mul_lt_mul_iff_left d, ← mul_lt_mul_iff_right b, mul_inv_cancel_left, mul_assoc,
inv_mul_cancel_right]
| [
" b ≤ c",
" a⁻¹ < b⁻¹ ↔ b < a",
" a * a⁻¹ * b < a * b⁻¹ * b ↔ b < a",
" a⁻¹ < b ↔ b⁻¹ < a",
" a < b⁻¹ ↔ b < a⁻¹",
" a * b⁻¹ < d⁻¹ * c ↔ d * a < c * b"
] | [
" b ≤ c",
" a⁻¹ < b⁻¹ ↔ b < a",
" a * a⁻¹ * b < a * b⁻¹ * b ↔ b < a",
" a⁻¹ < b ↔ b⁻¹ < a",
" a < b⁻¹ ↔ b < a⁻¹"
] |
import Mathlib.Topology.ExtendFrom
import Mathlib.Topology.Order.DenselyOrdered
#align_import topology.algebra.order.extend_from from "leanprover-community/mathlib"@"0a0ec35061ed9960bf0e7ffb0335f44447b58977"
set_option autoImplicit true
open Filter Set TopologicalSpace
open scoped Classical
open Topology
theor... | Mathlib/Topology/Order/ExtendFrom.lean | 45 | 51 | theorem eq_lim_at_right_extendFrom_Ioo [TopologicalSpace α] [LinearOrder α] [DenselyOrdered α]
[OrderTopology α] [TopologicalSpace β] [T2Space β] {f : α → β} {a b : α} {lb : β} (hab : a < b)
(hb : Tendsto f (𝓝[<] b) (𝓝 lb)) : extendFrom (Ioo a b) f b = lb := by |
apply extendFrom_eq
· rw [closure_Ioo hab.ne]
simp only [le_of_lt hab, left_mem_Icc, right_mem_Icc]
· simpa [hab]
| [
" ContinuousOn (extendFrom (Ioo a b) f) (Icc a b)",
" Icc a b ⊆ closure (Ioo a b)",
" ∀ x ∈ Icc a b, ∃ y, Tendsto f (𝓝[Ioo a b] x) (𝓝 y)",
" ∃ y, Tendsto f (𝓝[Ioo a b] x) (𝓝 y)",
" ∃ y, Tendsto f (𝓝[Ioo x b] x) (𝓝 y)",
" ∃ y, Tendsto f (𝓝[Ioo a x] x) (𝓝 y)",
" extendFrom (Ioo a b) f a = la",
"... | [
" ContinuousOn (extendFrom (Ioo a b) f) (Icc a b)",
" Icc a b ⊆ closure (Ioo a b)",
" ∀ x ∈ Icc a b, ∃ y, Tendsto f (𝓝[Ioo a b] x) (𝓝 y)",
" ∃ y, Tendsto f (𝓝[Ioo a b] x) (𝓝 y)",
" ∃ y, Tendsto f (𝓝[Ioo x b] x) (𝓝 y)",
" ∃ y, Tendsto f (𝓝[Ioo a x] x) (𝓝 y)",
" extendFrom (Ioo a b) f a = la",
"... |
import Mathlib.Analysis.Convex.Jensen
import Mathlib.Analysis.Convex.Mul
import Mathlib.Analysis.Convex.SpecificFunctions.Basic
import Mathlib.Analysis.SpecialFunctions.Pow.NNReal
#align_import analysis.mean_inequalities_pow from "leanprover-community/mathlib"@"ccdbfb6e5614667af5aa3ab2d50885e0ef44a46f"
universe u... | Mathlib/Analysis/MeanInequalitiesPow.lean | 72 | 86 | theorem pow_sum_div_card_le_sum_pow {f : ι → ℝ} (n : ℕ) (hf : ∀ a ∈ s, 0 ≤ f a) :
(∑ x ∈ s, f x) ^ (n + 1) / (s.card : ℝ) ^ n ≤ ∑ x ∈ s, f x ^ (n + 1) := by |
rcases s.eq_empty_or_nonempty with (rfl | hs)
· simp_rw [Finset.sum_empty, zero_pow n.succ_ne_zero, zero_div]; rfl
· have hs0 : 0 < (s.card : ℝ) := Nat.cast_pos.2 hs.card_pos
suffices (∑ x ∈ s, f x / s.card) ^ (n + 1) ≤ ∑ x ∈ s, f x ^ (n + 1) / s.card by
rwa [← Finset.sum_div, ← Finset.sum_div, div_pow... | [
" (∑ x ∈ s, f x) ^ (n + 1) / ↑s.card ^ n ≤ ∑ x ∈ s, f x ^ (n + 1)",
" (∑ x ∈ ∅, f x) ^ (n + 1) / ↑∅.card ^ n ≤ ∑ x ∈ ∅, f x ^ (n + 1)",
" 0 ≤ 0",
" (∑ x ∈ s, f x / ↑s.card) ^ (n + 1) ≤ ∑ x ∈ s, f x ^ (n + 1) / ↑s.card",
" ∀ i ∈ s, 0 ≤ (fun x => 1 / ↑s.card) i",
" ∑ i ∈ s, (fun x => 1 / ↑s.card) i = 1"
] | [] |
import Mathlib.Algebra.GCDMonoid.Basic
import Mathlib.Data.Multiset.FinsetOps
import Mathlib.Data.Multiset.Fold
#align_import algebra.gcd_monoid.multiset from "leanprover-community/mathlib"@"f694c7dead66f5d4c80f446c796a5aad14707f0e"
namespace Multiset
variable {α : Type*} [CancelCommMonoidWithZero α] [NormalizedG... | Mathlib/Algebra/GCDMonoid/Multiset.lean | 240 | 254 | theorem extract_gcd (s : Multiset α) (hs : s ≠ 0) :
∃ t : Multiset α, s = t.map (s.gcd * ·) ∧ t.gcd = 1 := by |
classical
by_cases h : ∀ x ∈ s, x = (0 : α)
· use replicate (card s) 1
rw [map_replicate, eq_replicate, mul_one, s.gcd_eq_zero_iff.2 h, ← nsmul_singleton,
← gcd_dedup, dedup_nsmul (card_pos.2 hs).ne', dedup_singleton, gcd_singleton]
exact ⟨⟨rfl, h⟩, normalize_one⟩
· choose f hf using @gcd... | [
" (s₁ + s₂).gcd = fold GCDMonoid.gcd (GCDMonoid.gcd 0 0) (s₁ + s₂)",
" a ∣ gcd 0 ↔ ∀ b ∈ 0, a ∣ b",
" ∀ (a_1 : α) (s : Multiset α), (a ∣ s.gcd ↔ ∀ b ∈ s, a ∣ b) → (a ∣ (a_1 ::ₘ s).gcd ↔ ∀ b ∈ a_1 ::ₘ s, a ∣ b)",
" normalize (gcd 0) = gcd 0",
" normalize (a ::ₘ s).gcd = (a ::ₘ s).gcd",
" s.gcd = 0 ↔ ∀ x ∈ ... | [
" (s₁ + s₂).gcd = fold GCDMonoid.gcd (GCDMonoid.gcd 0 0) (s₁ + s₂)",
" a ∣ gcd 0 ↔ ∀ b ∈ 0, a ∣ b",
" ∀ (a_1 : α) (s : Multiset α), (a ∣ s.gcd ↔ ∀ b ∈ s, a ∣ b) → (a ∣ (a_1 ::ₘ s).gcd ↔ ∀ b ∈ a_1 ::ₘ s, a ∣ b)",
" normalize (gcd 0) = gcd 0",
" normalize (a ::ₘ s).gcd = (a ::ₘ s).gcd",
" s.gcd = 0 ↔ ∀ x ∈ ... |
import Mathlib.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 | 619 | 620 | theorem preimage_mul_const_Ioo (a b : α) {c : α} (h : 0 < c) :
(fun x => x * c) ⁻¹' Ioo a b = Ioo (a / c) (b / c) := by | simp [← Ioi_inter_Iio, h]
| [
" (fun x => x * c) ⁻¹' Ioo a b = Ioo (a / c) (b / c)"
] | [] |
import Mathlib.Algebra.Algebra.Subalgebra.Basic
import Mathlib.Data.Set.UnionLift
#align_import algebra.algebra.subalgebra.basic from "leanprover-community/mathlib"@"b915e9392ecb2a861e1e766f0e1df6ac481188ca"
namespace Subalgebra
open Algebra
variable {R A B : Type*} [CommSemiring R] [Semiring A] [Algebra R A] [... | Mathlib/Algebra/Algebra/Subalgebra/Directed.lean | 85 | 86 | theorem iSupLift_comp_inclusion {i : ι} (h : K i ≤ T) :
(iSupLift K dir f hf T hT).comp (inclusion h) = f i := by | ext; simp
| [
" (fun i x => (f i) x) i ⟨x, hxi⟩ = (fun i x => (f i) x) j ⟨x, hxj⟩",
" (f i) ⟨x, hxi⟩ = (f j) ⟨x, hxj⟩",
" ((f k).comp (inclusion hik)) ⟨x, hxi⟩ = ((f k).comp (inclusion hjk)) ⟨x, hxj⟩",
" ↑T ⊆ ⋃ i, ↑(K i)",
" Set.iUnionLift (fun i => ↑(K i)) (fun i x => (f i) x) ⋯ ↑T ⋯ 1 = 1",
" ∀ (i : ι), ↑1 = ↑1",
"... | [
" (fun i x => (f i) x) i ⟨x, hxi⟩ = (fun i x => (f i) x) j ⟨x, hxj⟩",
" (f i) ⟨x, hxi⟩ = (f j) ⟨x, hxj⟩",
" ((f k).comp (inclusion hik)) ⟨x, hxi⟩ = ((f k).comp (inclusion hjk)) ⟨x, hxj⟩",
" ↑T ⊆ ⋃ i, ↑(K i)",
" Set.iUnionLift (fun i => ↑(K i)) (fun i x => (f i) x) ⋯ ↑T ⋯ 1 = 1",
" ∀ (i : ι), ↑1 = ↑1",
"... |
import Mathlib.Analysis.SpecialFunctions.Integrals
import Mathlib.MeasureTheory.Measure.Lebesgue.EqHaar
import Mathlib.MeasureTheory.Integral.Layercake
#align_import analysis.special_functions.japanese_bracket from "leanprover-community/mathlib"@"fd5edc43dc4f10b85abfe544b88f82cf13c5f844"
noncomputable section
op... | Mathlib/Analysis/SpecialFunctions/JapaneseBracket.lean | 79 | 95 | theorem finite_integral_rpow_sub_one_pow_aux {r : ℝ} (n : ℕ) (hnr : (n : ℝ) < r) :
(∫⁻ x : ℝ in Ioc 0 1, ENNReal.ofReal ((x ^ (-r⁻¹) - 1) ^ n)) < ∞ := by |
have hr : 0 < r := lt_of_le_of_lt n.cast_nonneg hnr
have h_int : ∀ x : ℝ, x ∈ Ioc (0 : ℝ) 1 →
ENNReal.ofReal ((x ^ (-r⁻¹) - 1) ^ n) ≤ ENNReal.ofReal (x ^ (-(r⁻¹ * n))) := fun x hx ↦ by
apply ENNReal.ofReal_le_ofReal
rw [← neg_mul, rpow_mul hx.1.le, rpow_natCast]
refine pow_le_pow_left ?_ (by simp... | [
" √(1 + ‖x‖ ^ 2) ≤ 1 + ‖x‖",
" 0 ≤ 1 + ‖x‖",
" 1 + ‖x‖ ^ 2 ≤ (1 + ‖x‖) ^ 2",
" 1 + ‖x‖ ≤ √2 * √(1 + ‖x‖ ^ 2)",
" 1 + ‖x‖ ≤ √(2 * (1 + ‖x‖ ^ 2))",
" (1 + ‖x‖) ^ 2 ≤ 2 * (1 + ‖x‖ ^ 2)",
" (1 + ‖x‖ ^ 2) ^ (-r / 2) = 2 ^ (r / 2) * ((√2 * √(1 + ‖x‖ ^ 2)) ^ r)⁻¹",
" √2 ^ r ≠ 0",
" 0 ≤ √(1 + ‖x‖ ^ 2)",
"... | [
" √(1 + ‖x‖ ^ 2) ≤ 1 + ‖x‖",
" 0 ≤ 1 + ‖x‖",
" 1 + ‖x‖ ^ 2 ≤ (1 + ‖x‖) ^ 2",
" 1 + ‖x‖ ≤ √2 * √(1 + ‖x‖ ^ 2)",
" 1 + ‖x‖ ≤ √(2 * (1 + ‖x‖ ^ 2))",
" (1 + ‖x‖) ^ 2 ≤ 2 * (1 + ‖x‖ ^ 2)",
" (1 + ‖x‖ ^ 2) ^ (-r / 2) = 2 ^ (r / 2) * ((√2 * √(1 + ‖x‖ ^ 2)) ^ r)⁻¹",
" √2 ^ r ≠ 0",
" 0 ≤ √(1 + ‖x‖ ^ 2)",
"... |
import Mathlib.Data.Finset.Image
import Mathlib.Data.Multiset.Pi
#align_import data.finset.pi from "leanprover-community/mathlib"@"b2c89893177f66a48daf993b7ba5ef7cddeff8c9"
namespace Finset
open Multiset
section Pi
variable {α : Type*}
def Pi.empty (β : α → Sort*) (a : α) (h : a ∈ (∅ : Finset α)) : β a :=... | Mathlib/Data/Finset/Pi.lean | 96 | 112 | theorem pi_insert [∀ a, DecidableEq (β a)] {s : Finset α} {t : ∀ a : α, Finset (β a)} {a : α}
(ha : a ∉ s) : pi (insert a s) t = (t a).biUnion fun b => (pi s t).image (Pi.cons s a b) := by |
apply eq_of_veq
rw [← (pi (insert a s) t).2.dedup]
refine
(fun s' (h : s' = a ::ₘ s.1) =>
(?_ :
dedup (Multiset.pi s' fun a => (t a).1) =
dedup
((t a).1.bind fun b =>
dedup <|
(Multiset.pi s.1 fun a : α => (t a).val).map fun f a' h... | [
" e ∈ insert a s",
" cons s a b e₁ e ⋯ = cons s a b e₂ e ⋯",
" (s.pi t).Nonempty ↔ ∀ a ∈ s, (t a).Nonempty",
" (insert a s).pi t = (t a).biUnion fun b => image (Pi.cons s a b) (s.pi t)",
" ((insert a s).pi t).val = ((t a).biUnion fun b => image (Pi.cons s a b) (s.pi t)).val",
" ((insert a s).pi t).val.ded... | [
" e ∈ insert a s",
" cons s a b e₁ e ⋯ = cons s a b e₂ e ⋯",
" (s.pi t).Nonempty ↔ ∀ a ∈ s, (t a).Nonempty"
] |
import Mathlib.Algebra.Polynomial.AlgebraMap
import Mathlib.Algebra.Polynomial.Derivative
import Mathlib.Data.Nat.Choose.Cast
import Mathlib.NumberTheory.Bernoulli
#align_import number_theory.bernoulli_polynomials from "leanprover-community/mathlib"@"ca3d21f7f4fd613c2a3c54ac7871163e1e5ecb3a"
noncomputable section... | Mathlib/NumberTheory/BernoulliPolynomials.lean | 86 | 92 | theorem bernoulli_eval_one (n : ℕ) : (bernoulli n).eval 1 = bernoulli' n := by |
simp only [bernoulli, eval_finset_sum]
simp only [← succ_eq_add_one, sum_range_succ, mul_one, cast_one, choose_self,
(_root_.bernoulli _).mul_comm, sum_bernoulli, one_pow, mul_one, eval_C, eval_monomial, one_mul]
by_cases h : n = 1
· norm_num [h]
· simp [h, bernoulli_eq_bernoulli'_of_ne_one h]
| [
" bernoulli n = ∑ i ∈ range (n + 1), (monomial i) (_root_.bernoulli (n - i) * ↑(n.choose i))",
" ∑ i ∈ range (n + 1), (monomial (n - i)) (_root_.bernoulli i * ↑(n.choose i)) =\n ∑ j ∈ range (n + 1), (monomial (n - j)) (_root_.bernoulli (n - (n - j)) * ↑(n.choose (n - j)))",
" ∀ x ∈ range (n + 1),\n (monom... | [
" bernoulli n = ∑ i ∈ range (n + 1), (monomial i) (_root_.bernoulli (n - i) * ↑(n.choose i))",
" ∑ i ∈ range (n + 1), (monomial (n - i)) (_root_.bernoulli i * ↑(n.choose i)) =\n ∑ j ∈ range (n + 1), (monomial (n - j)) (_root_.bernoulli (n - (n - j)) * ↑(n.choose (n - j)))",
" ∀ x ∈ range (n + 1),\n (monom... |
import Mathlib.Probability.Kernel.Composition
#align_import probability.kernel.invariance from "leanprover-community/mathlib"@"3b92d54a05ee592aa2c6181a4e76b1bb7cc45d0b"
open MeasureTheory
open scoped MeasureTheory ENNReal ProbabilityTheory
namespace ProbabilityTheory
variable {α β γ : Type*} {mα : MeasurableSp... | Mathlib/Probability/Kernel/Invariance.lean | 63 | 65 | theorem comp_const_apply_eq_bind (κ : kernel α β) (μ : Measure α) (a : α) :
(κ ∘ₖ const α μ) a = μ.bind κ := by |
rw [← const_apply (μ.bind κ) a, const_bind_eq_comp_const κ μ]
| [
" (μ + ν).bind ⇑κ = μ.bind ⇑κ + ν.bind ⇑κ",
" ((μ + ν).bind ⇑κ) s = (μ.bind ⇑κ + ν.bind ⇑κ) s",
" (r • μ).bind ⇑κ = r • μ.bind ⇑κ",
" ((r • μ).bind ⇑κ) s = (r • μ.bind ⇑κ) s",
" const α (μ.bind ⇑κ) = κ ∘ₖ const α μ",
" ((const α (μ.bind ⇑κ)) a) s = ((κ ∘ₖ const α μ) a) s",
" (κ ∘ₖ const α μ) a = μ.bind ... | [
" (μ + ν).bind ⇑κ = μ.bind ⇑κ + ν.bind ⇑κ",
" ((μ + ν).bind ⇑κ) s = (μ.bind ⇑κ + ν.bind ⇑κ) s",
" (r • μ).bind ⇑κ = r • μ.bind ⇑κ",
" ((r • μ).bind ⇑κ) s = (r • μ.bind ⇑κ) s",
" const α (μ.bind ⇑κ) = κ ∘ₖ const α μ",
" ((const α (μ.bind ⇑κ)) a) s = ((κ ∘ₖ const α μ) a) s"
] |
import Mathlib.Order.Filter.Basic
import Mathlib.Order.Filter.CountableInter
import Mathlib.SetTheory.Cardinal.Ordinal
import Mathlib.SetTheory.Cardinal.Cofinality
open Set Filter Cardinal
universe u
variable {ι : Type u} {α β : Type u} {c : Cardinal.{u}}
class CardinalInterFilter (l : Filter α) (c : Cardinal.{... | Mathlib/Order/Filter/CardinalInter.lean | 96 | 100 | theorem cardinal_bInter_mem {S : Set ι} (hS : #S < c)
{s : ∀ i ∈ S, Set α} :
(⋂ i, ⋂ hi : i ∈ S, s i ‹_›) ∈ l ↔ ∀ i, ∀ hi : i ∈ S, s i ‹_› ∈ l := by |
rw [biInter_eq_iInter]
exact (cardinal_iInter_mem hS).trans Subtype.forall
| [
" ∀ (S : Set (Set α)), #↑S < ℵ₀ → (∀ s ∈ S, s ∈ l) → ⋂₀ S ∈ l",
" ⋂ i, s i ∈ l ↔ ∀ (i : ι), s i ∈ l",
" (⋂₀ range fun i => s i) ∈ l ↔ ∀ (i : ι), s i ∈ l",
" (∀ s_1 ∈ range fun i => s i, s_1 ∈ l) ↔ ∀ (i : ι), s i ∈ l",
" ⋂ i, ⋂ (hi : i ∈ S), s i hi ∈ l ↔ ∀ (i : ι) (hi : i ∈ S), s i hi ∈ l",
" ⋂ x, s ↑x ⋯ ∈... | [
" ∀ (S : Set (Set α)), #↑S < ℵ₀ → (∀ s ∈ S, s ∈ l) → ⋂₀ S ∈ l",
" ⋂ i, s i ∈ l ↔ ∀ (i : ι), s i ∈ l",
" (⋂₀ range fun i => s i) ∈ l ↔ ∀ (i : ι), s i ∈ l",
" (∀ s_1 ∈ range fun i => s i, s_1 ∈ l) ↔ ∀ (i : ι), s i ∈ l"
] |
import Mathlib.Analysis.Calculus.Deriv.Slope
import Mathlib.Analysis.Calculus.Deriv.Inv
#align_import analysis.calculus.dslope from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe"
open scoped Classical Topology Filter
open Function Set Filter
variable {𝕜 E : Type*} [NontriviallyNormed... | Mathlib/Analysis/Calculus/Dslope.lean | 87 | 88 | theorem continuousAt_dslope_same : ContinuousAt (dslope f a) a ↔ DifferentiableAt 𝕜 f a := by |
simp only [dslope, continuousAt_update_same, ← hasDerivAt_deriv_iff, hasDerivAt_iff_tendsto_slope]
| [
" dslope (⇑f ∘ g) a b = f (dslope g a b)",
" dslope (⇑f ∘ g) b b = f (dslope g b b)",
" deriv (⇑f ∘ g) b = f (deriv g b)",
" (b - a) • dslope f a b = f b - f a",
" (b - b) • dslope f b b = f b - f b",
" dslope (fun x => (x - a) • f x) a b = f b",
" ContinuousAt (dslope f a) a ↔ DifferentiableAt 𝕜 f a"
... | [
" dslope (⇑f ∘ g) a b = f (dslope g a b)",
" dslope (⇑f ∘ g) b b = f (dslope g b b)",
" deriv (⇑f ∘ g) b = f (deriv g b)",
" (b - a) • dslope f a b = f b - f a",
" (b - b) • dslope f b b = f b - f b",
" dslope (fun x => (x - a) • f x) a b = f b"
] |
import Mathlib.Geometry.Euclidean.Angle.Oriented.Affine
import Mathlib.Geometry.Euclidean.Angle.Unoriented.RightAngle
#align_import geometry.euclidean.angle.oriented.right_angle from "leanprover-community/mathlib"@"46b633fd842bef9469441c0209906f6dddd2b4f5"
noncomputable section
open scoped EuclideanGeometry
ope... | Mathlib/Geometry/Euclidean/Angle/Oriented/RightAngle.lean | 610 | 616 | theorem oangle_left_eq_arcsin_of_oangle_eq_pi_div_two {p₁ p₂ p₃ : P} (h : ∡ p₁ p₂ p₃ = ↑(π / 2)) :
∡ p₃ p₁ p₂ = Real.arcsin (dist p₃ p₂ / dist p₁ p₃) := by |
have hs : (∡ p₃ p₁ p₂).sign = 1 := by rw [← oangle_rotate_sign, h, Real.Angle.sign_coe_pi_div_two]
rw [oangle_eq_angle_of_sign_eq_one hs, angle_comm,
angle_eq_arcsin_of_angle_eq_pi_div_two (angle_rev_eq_pi_div_two_of_oangle_eq_pi_div_two h)
(Or.inr (left_ne_of_oangle_eq_pi_div_two h)),
dist_comm p₁ p... | [
" ∡ p₂ p₃ p₁ = ↑(dist p₃ p₂ / dist p₁ p₃).arccos",
" (∡ p₂ p₃ p₁).sign = 1",
" ∡ p₃ p₁ p₂ = ↑(dist p₁ p₂ / dist p₁ p₃).arccos",
" (∡ p₃ p₁ p₂).sign = 1",
" ∡ p₂ p₃ p₁ = ↑(dist p₁ p₂ / dist p₁ p₃).arcsin",
" ∡ p₃ p₁ p₂ = ↑(dist p₃ p₂ / dist p₁ p₃).arcsin"
] | [
" ∡ p₂ p₃ p₁ = ↑(dist p₃ p₂ / dist p₁ p₃).arccos",
" (∡ p₂ p₃ p₁).sign = 1",
" ∡ p₃ p₁ p₂ = ↑(dist p₁ p₂ / dist p₁ p₃).arccos",
" (∡ p₃ p₁ p₂).sign = 1",
" ∡ p₂ p₃ p₁ = ↑(dist p₁ p₂ / dist p₁ p₃).arcsin"
] |
import Mathlib.CategoryTheory.CommSq
#align_import category_theory.lifting_properties.basic from "leanprover-community/mathlib"@"32253a1a1071173b33dc7d6a218cf722c6feb514"
universe v
namespace CategoryTheory
open Category
variable {C : Type*} [Category C] {A B B' X Y Y' : C} (i : A ⟶ B) (i' : B ⟶ B') (p : X ⟶ Y... | Mathlib/CategoryTheory/LiftingProperties/Basic.lean | 128 | 131 | theorem of_arrow_iso_right {A B X Y X' Y' : C} (i : A ⟶ B) {p : X ⟶ Y} {p' : X' ⟶ Y'}
(e : Arrow.mk p ≅ Arrow.mk p') [hip : HasLiftingProperty i p] : HasLiftingProperty i p' := by |
rw [Arrow.iso_w' e]
infer_instance
| [
" sq.HasLift",
" ⋯.HasLift",
" i ≫ inv i ≫ f = f",
" (inv i ≫ f) ≫ p = g",
" i ≫ g ≫ inv p = f",
" (g ≫ inv p) ≫ p = g",
" (i ≫ i') ≫ ⋯.lift = f",
" ⋯.lift ≫ p = g",
" i ≫ ⋯.lift = f",
" ⋯.lift ≫ p ≫ p' = g",
" HasLiftingProperty i' p",
" HasLiftingProperty (e.inv.left ≫ i ≫ e.hom.right) p",
... | [
" sq.HasLift",
" ⋯.HasLift",
" i ≫ inv i ≫ f = f",
" (inv i ≫ f) ≫ p = g",
" i ≫ g ≫ inv p = f",
" (g ≫ inv p) ≫ p = g",
" (i ≫ i') ≫ ⋯.lift = f",
" ⋯.lift ≫ p = g",
" i ≫ ⋯.lift = f",
" ⋯.lift ≫ p ≫ p' = g",
" HasLiftingProperty i' p",
" HasLiftingProperty (e.inv.left ≫ i ≫ e.hom.right) p"
] |
import Mathlib.Algebra.BigOperators.Ring
import Mathlib.Data.Fintype.BigOperators
import Mathlib.Data.Fintype.Fin
import Mathlib.GroupTheory.GroupAction.Pi
import Mathlib.Logic.Equiv.Fin
#align_import algebra.big_operators.fin from "leanprover-community/mathlib"@"cc5dd6244981976cc9da7afc4eee5682b037a013"
open Fins... | Mathlib/Algebra/BigOperators/Fin.lean | 52 | 54 | theorem prod_univ_def [CommMonoid β] {n : ℕ} (f : Fin n → β) :
∏ i, f i = ((List.finRange n).map f).prod := by |
rw [← List.ofFn_eq_map, prod_ofFn]
| [
" (List.ofFn f).prod = ∏ i : Fin n, f i",
" ∏ i : Fin n, f i = (List.map f (List.finRange n)).prod"
] | [
" (List.ofFn f).prod = ∏ i : Fin n, f i"
] |
import Mathlib.Topology.Separation
import Mathlib.Topology.UniformSpace.Basic
import Mathlib.Topology.UniformSpace.Cauchy
#align_import topology.uniform_space.uniform_convergence from "leanprover-community/mathlib"@"2705404e701abc6b3127da906f40bae062a169c9"
noncomputable section
open Topology Uniformity Filter S... | Mathlib/Topology/UniformSpace/UniformConvergence.lean | 147 | 148 | theorem TendstoUniformly.tendstoUniformlyOnFilter (h : TendstoUniformly F f p) :
TendstoUniformlyOnFilter F f p ⊤ := by | rwa [← tendstoUniformly_iff_tendstoUniformlyOnFilter]
| [
" TendstoUniformlyOn F f p s ↔ TendstoUniformlyOnFilter F f p (𝓟 s)",
" (∀ u ∈ 𝓤 β, ∀ᶠ (n : ι) in p, ∀ x ∈ s, (f x, F n x) ∈ u) ↔\n ∀ u ∈ 𝓤 β, ∀ᶠ (n : ι × α) in p ×ˢ 𝓟 s, (f n.2, F n.1 n.2) ∈ u",
" ∀ a ∈ 𝓤 β, (∀ᶠ (n : ι) in p, ∀ x ∈ s, (f x, F n x) ∈ a) ↔ ∀ᶠ (n : ι × α) in p ×ˢ 𝓟 s, (f n.2, F n.1 n.2) ... | [
" TendstoUniformlyOn F f p s ↔ TendstoUniformlyOnFilter F f p (𝓟 s)",
" (∀ u ∈ 𝓤 β, ∀ᶠ (n : ι) in p, ∀ x ∈ s, (f x, F n x) ∈ u) ↔\n ∀ u ∈ 𝓤 β, ∀ᶠ (n : ι × α) in p ×ˢ 𝓟 s, (f n.2, F n.1 n.2) ∈ u",
" ∀ a ∈ 𝓤 β, (∀ᶠ (n : ι) in p, ∀ x ∈ s, (f x, F n x) ∈ a) ↔ ∀ᶠ (n : ι × α) in p ×ˢ 𝓟 s, (f n.2, F n.1 n.2) ... |
import Mathlib.Order.Interval.Set.Basic
import Mathlib.Order.Hom.Set
#align_import data.set.intervals.order_iso from "leanprover-community/mathlib"@"d012cd09a9b256d870751284dd6a29882b0be105"
open Set
namespace OrderIso
section Preorder
variable {α β : Type*} [Preorder α] [Preorder β]
@[simp]
theorem preimage_I... | Mathlib/Order/Interval/Set/OrderIso.lean | 53 | 54 | theorem preimage_Ico (e : α ≃o β) (a b : β) : e ⁻¹' Ico a b = Ico (e.symm a) (e.symm b) := by |
simp [← Ici_inter_Iio]
| [
" ⇑e ⁻¹' Iic b = Iic (e.symm b)",
" x ∈ ⇑e ⁻¹' Iic b ↔ x ∈ Iic (e.symm b)",
" ⇑e ⁻¹' Ici b = Ici (e.symm b)",
" x ∈ ⇑e ⁻¹' Ici b ↔ x ∈ Ici (e.symm b)",
" ⇑e ⁻¹' Iio b = Iio (e.symm b)",
" x ∈ ⇑e ⁻¹' Iio b ↔ x ∈ Iio (e.symm b)",
" ⇑e ⁻¹' Ioi b = Ioi (e.symm b)",
" x ∈ ⇑e ⁻¹' Ioi b ↔ x ∈ Ioi (e.symm b)"... | [
" ⇑e ⁻¹' Iic b = Iic (e.symm b)",
" x ∈ ⇑e ⁻¹' Iic b ↔ x ∈ Iic (e.symm b)",
" ⇑e ⁻¹' Ici b = Ici (e.symm b)",
" x ∈ ⇑e ⁻¹' Ici b ↔ x ∈ Ici (e.symm b)",
" ⇑e ⁻¹' Iio b = Iio (e.symm b)",
" x ∈ ⇑e ⁻¹' Iio b ↔ x ∈ Iio (e.symm b)",
" ⇑e ⁻¹' Ioi b = Ioi (e.symm b)",
" x ∈ ⇑e ⁻¹' Ioi b ↔ x ∈ Ioi (e.symm b)"... |
import Mathlib.Algebra.Group.Even
import Mathlib.Algebra.Order.Monoid.Canonical.Defs
import Mathlib.Algebra.Order.Sub.Defs
#align_import algebra.order.sub.canonical from "leanprover-community/mathlib"@"62a5626868683c104774de8d85b9855234ac807c"
variable {α : Type*}
section ExistsAddOfLE
variable [AddCommSemigrou... | Mathlib/Algebra/Order/Sub/Canonical.lean | 25 | 28 | theorem add_tsub_cancel_of_le (h : a ≤ b) : a + (b - a) = b := by |
refine le_antisymm ?_ le_add_tsub
obtain ⟨c, rfl⟩ := exists_add_of_le h
exact add_le_add_left add_tsub_le_left a
| [
" a + (b - a) = b",
" a + (b - a) ≤ b",
" a + (a + c - a) ≤ a + c"
] | [] |
import Mathlib.FieldTheory.SeparableDegree
import Mathlib.FieldTheory.IsSepClosed
open scoped Classical Polynomial
open FiniteDimensional Polynomial IntermediateField Field
noncomputable section
universe u v w
variable (F : Type u) (E : Type v) [Field F] [Field E] [Algebra F E]
variable (K : Type w) [Field K] [... | Mathlib/FieldTheory/SeparableClosure.lean | 94 | 96 | theorem map_mem_separableClosure_iff (i : E →ₐ[F] K) {x : E} :
i x ∈ separableClosure F K ↔ x ∈ separableClosure F E := by |
simp_rw [mem_separableClosure_iff, minpoly.algHom_eq i i.injective]
| [
" i x ∈ separableClosure F K ↔ x ∈ separableClosure F E"
] | [] |
import Mathlib.Algebra.BigOperators.NatAntidiagonal
import Mathlib.Topology.Algebra.InfiniteSum.Constructions
import Mathlib.Topology.Algebra.Ring.Basic
#align_import topology.algebra.infinite_sum.ring from "leanprover-community/mathlib"@"9a59dcb7a2d06bf55da57b9030169219980660cd"
open Filter Finset Function
open... | Mathlib/Topology/Algebra/InfiniteSum/Ring.lean | 34 | 35 | theorem HasSum.mul_left (a₂) (h : HasSum f a₁) : HasSum (fun i ↦ a₂ * f i) (a₂ * a₁) := by |
simpa only using h.map (AddMonoidHom.mulLeft a₂) (continuous_const.mul continuous_id)
| [
" HasSum (fun i => a₂ * f i) (a₂ * a₁)"
] | [] |
import Mathlib.Algebra.GroupWithZero.Defs
import Mathlib.Algebra.NeZero
#align_import algebra.group_with_zero.defs from "leanprover-community/mathlib"@"2f3994e1b117b1e1da49bcfb67334f33460c3ce4"
assert_not_exists DenselyOrdered
universe u
variable {M₀ M₀' : Type*} [MulZeroOneClass M₀] [Nontrivial M₀]
instance N... | Mathlib/Algebra/GroupWithZero/NeZero.lean | 55 | 59 | theorem inv_mul_cancel (h : a ≠ 0) : a⁻¹ * a = 1 :=
calc
a⁻¹ * a = a⁻¹ * a * a⁻¹ * a⁻¹⁻¹ := by | simp [inv_ne_zero h]
_ = a⁻¹ * a⁻¹⁻¹ := by simp [h]
_ = 1 := by simp [inv_ne_zero h]
| [
" 1 ≠ 0",
" False",
" x = y",
" x = 1 * x",
" 1 * x = 0",
" 0 = 1 * y",
" 1 * y = y",
" ¬f 0 = f 1",
" ¬0 = 1",
" a⁻¹ * a = a⁻¹ * a * a⁻¹ * a⁻¹⁻¹",
" a⁻¹ * a * a⁻¹ * a⁻¹⁻¹ = a⁻¹ * a⁻¹⁻¹",
" a⁻¹ * a⁻¹⁻¹ = 1"
] | [
" 1 ≠ 0",
" False",
" x = y",
" x = 1 * x",
" 1 * x = 0",
" 0 = 1 * y",
" 1 * y = y",
" ¬f 0 = f 1",
" ¬0 = 1"
] |
import Mathlib.Algebra.Group.Subgroup.Basic
import Mathlib.Data.Fintype.Basic
import Mathlib.Data.List.Sublists
import Mathlib.Data.List.InsertNth
#align_import group_theory.free_group from "leanprover-community/mathlib"@"f93c11933efbc3c2f0299e47b8ff83e9b539cbf6"
open Relation
universe u v w
variable {α : Type u... | Mathlib/GroupTheory/FreeGroup/Basic.lean | 151 | 155 | theorem not_step_nil : ¬Step [] L := by |
generalize h' : [] = L'
intro h
cases' h with L₁ L₂
simp [List.nil_eq_append] at h'
| [
" (L1 ++ L2).length + 2 = (L1 ++ (x, b) :: (x, !b) :: L2).length",
" L1.length + L2.length + 2 = L1.length + ((x, b) :: (x, !b) :: L2).length",
" Step (L₁ ++ (x, !b) :: (x, b) :: L₂) (L₁ ++ L₂)",
" Step (L₁ ++ (x, !false) :: (x, false) :: L₂) (L₁ ++ L₂)",
" Step (L₁ ++ (x, !true) :: (x, true) :: L₂) (L₁ ++ ... | [
" (L1 ++ L2).length + 2 = (L1 ++ (x, b) :: (x, !b) :: L2).length",
" L1.length + L2.length + 2 = L1.length + ((x, b) :: (x, !b) :: L2).length",
" Step (L₁ ++ (x, !b) :: (x, b) :: L₂) (L₁ ++ L₂)",
" Step (L₁ ++ (x, !false) :: (x, false) :: L₂) (L₁ ++ L₂)",
" Step (L₁ ++ (x, !true) :: (x, true) :: L₂) (L₁ ++ ... |
import Mathlib.FieldTheory.IsAlgClosed.AlgebraicClosure
import Mathlib.RingTheory.IntegralDomain
#align_import field_theory.primitive_element from "leanprover-community/mathlib"@"df76f43357840485b9d04ed5dee5ab115d420e87"
noncomputable section
open scoped Classical Polynomial
open FiniteDimensional Polynomial In... | Mathlib/FieldTheory/PrimitiveElement.lean | 246 | 275 | theorem isAlgebraic_of_adjoin_eq_adjoin {α : E} {m n : ℕ} (hneq : m ≠ n)
(heq : F⟮α ^ m⟯ = F⟮α ^ n⟯) : IsAlgebraic F α := by |
wlog hmn : m < n
· exact this F E hneq.symm heq.symm (hneq.lt_or_lt.resolve_left hmn)
by_cases hm : m = 0
· rw [hm] at heq hmn
simp only [pow_zero, adjoin_one] at heq
obtain ⟨y, h⟩ := mem_bot.1 (heq.symm ▸ mem_adjoin_simple_self F (α ^ n))
refine ⟨X ^ n - C y, X_pow_sub_C_ne_zero hmn y, ?_⟩
sim... | [
" IsAlgebraic F α",
" (aeval α) (X ^ n - C y) = 0",
" s ≠ 0",
" False",
" f ≠ 0",
" f.coeff (n * s.natDegree + m) ≠ 0",
" 0 < n",
" ¬n ∣ n * s.natDegree + m",
" ¬n ∣ m",
" s.leadingCoeff ≠ 0",
" (aeval α) f = 0"
] | [] |
import Mathlib.SetTheory.Game.Basic
import Mathlib.SetTheory.Ordinal.NaturalOps
#align_import set_theory.game.ordinal from "leanprover-community/mathlib"@"b90e72c7eebbe8de7c8293a80208ea2ba135c834"
universe u
open SetTheory PGame
open scoped NaturalOps PGame
namespace Ordinal
noncomputable def toPGame : Ordin... | Mathlib/SetTheory/Game/Ordinal.lean | 46 | 49 | theorem toPGame_def (o : Ordinal) :
have : IsWellOrder o.out.α (· < ·) := isWellOrder_out_lt o
o.toPGame = ⟨o.out.α, PEmpty, fun x => (typein (· < ·) x).toPGame, PEmpty.elim⟩ := by |
rw [toPGame]
| [
" let_fun this := ⋯;\n o.toPGame = mk (Quotient.out o).α PEmpty.{u_1 + 1} (fun x => (typein (fun x x_1 => x < x_1) x).toPGame) PEmpty.elim"
] | [] |
import Mathlib.Data.Set.Image
import Mathlib.Data.SProd
#align_import data.set.prod from "leanprover-community/mathlib"@"48fb5b5280e7c81672afc9524185ae994553ebf4"
open Function
namespace Set
section Prod
variable {α β γ δ : Type*} {s s₁ s₂ : Set α} {t t₁ t₂ : Set β} {a : α} {b : β}
theorem Subsingleton.pro... | Mathlib/Data/Set/Prod.lean | 126 | 128 | theorem union_prod : (s₁ ∪ s₂) ×ˢ t = s₁ ×ˢ t ∪ s₂ ×ˢ t := by |
ext ⟨x, y⟩
simp [or_and_right]
| [
" (∃ x ∈ s ×ˢ t, p x) ↔ ∃ x ∈ s, ∃ y ∈ t, p (x, y)",
" s ×ˢ ∅ = ∅",
" x✝ ∈ s ×ˢ ∅ ↔ x✝ ∈ ∅",
" ∅ ×ˢ t = ∅",
" x✝ ∈ ∅ ×ˢ t ↔ x✝ ∈ ∅",
" univ ×ˢ univ = univ",
" x✝ ∈ univ ×ˢ univ ↔ x✝ ∈ univ",
" univ ×ˢ t = Prod.snd ⁻¹' t",
" s ×ˢ univ = Prod.fst ⁻¹' s",
" s ×ˢ t = univ ↔ s = univ ∧ t = univ",
" {... | [
" (∃ x ∈ s ×ˢ t, p x) ↔ ∃ x ∈ s, ∃ y ∈ t, p (x, y)",
" s ×ˢ ∅ = ∅",
" x✝ ∈ s ×ˢ ∅ ↔ x✝ ∈ ∅",
" ∅ ×ˢ t = ∅",
" x✝ ∈ ∅ ×ˢ t ↔ x✝ ∈ ∅",
" univ ×ˢ univ = univ",
" x✝ ∈ univ ×ˢ univ ↔ x✝ ∈ univ",
" univ ×ˢ t = Prod.snd ⁻¹' t",
" s ×ˢ univ = Prod.fst ⁻¹' s",
" s ×ˢ t = univ ↔ s = univ ∧ t = univ",
" {... |
import Mathlib.SetTheory.Cardinal.Finite
#align_import data.set.ncard from "leanprover-community/mathlib"@"74c2af38a828107941029b03839882c5c6f87a04"
namespace Set
variable {α β : Type*} {s t : Set α}
noncomputable def encard (s : Set α) : ℕ∞ := PartENat.withTopEquiv (PartENat.card s)
@[simp] theorem encard_uni... | Mathlib/Data/Set/Card.lean | 82 | 83 | theorem encard_coe_eq_coe_finsetCard (s : Finset α) : encard (s : Set α) = s.card := by |
rw [Finite.encard_eq_coe_toFinset_card (Finset.finite_toSet s)]; simp
| [
" univ.encard = s.encard",
" univ.encard = PartENat.withTopEquiv (PartENat.card α)",
" s.encard = ↑h.toFinset.card",
" s.encard = ↑s.toFinset.card",
" (↑s).encard = ↑s.card",
" ↑⋯.toFinset.card = ↑s.card"
] | [
" univ.encard = s.encard",
" univ.encard = PartENat.withTopEquiv (PartENat.card α)",
" s.encard = ↑h.toFinset.card",
" s.encard = ↑s.toFinset.card"
] |
import Mathlib.Topology.MetricSpace.HausdorffDistance
#align_import topology.metric_space.hausdorff_distance from "leanprover-community/mathlib"@"bc91ed7093bf098d253401e69df601fc33dde156"
noncomputable section
open NNReal ENNReal Topology Set Filter Bornology
universe u v w
variable {ι : Sort*} {α : Type u} {β :... | Mathlib/Topology/MetricSpace/Thickening.lean | 81 | 82 | theorem thickening_empty (δ : ℝ) : thickening δ (∅ : Set α) = ∅ := by |
simp only [thickening, setOf_false, infEdist_empty, not_top_lt]
| [
" ∀ᶠ (δ : ℝ) in 𝓝 0, x ∉ thickening δ E",
" x ∉ thickening δ E",
" ENNReal.ofReal δ ≤ infEdist x E",
" thickening δ ∅ = ∅"
] | [
" ∀ᶠ (δ : ℝ) in 𝓝 0, x ∉ thickening δ E",
" x ∉ thickening δ E",
" ENNReal.ofReal δ ≤ infEdist x E"
] |
import Mathlib.Analysis.InnerProductSpace.Rayleigh
import Mathlib.Analysis.InnerProductSpace.PiL2
import Mathlib.Algebra.DirectSum.Decomposition
import Mathlib.LinearAlgebra.Eigenspace.Minpoly
#align_import analysis.inner_product_space.spectrum from "leanprover-community/mathlib"@"6b0169218d01f2837d79ea2784882009a0da... | Mathlib/Analysis/InnerProductSpace/Spectrum.lean | 83 | 91 | theorem orthogonalFamily_eigenspaces :
OrthogonalFamily 𝕜 (fun μ => eigenspace T μ) fun μ => (eigenspace T μ).subtypeₗᵢ := by |
rintro μ ν hμν ⟨v, hv⟩ ⟨w, hw⟩
by_cases hv' : v = 0
· simp [hv']
have H := hT.conj_eigenvalue_eq_self (hasEigenvalue_of_hasEigenvector ⟨hv, hv'⟩)
rw [mem_eigenspace_iff] at hv hw
refine Or.resolve_left ?_ hμν.symm
simpa [inner_smul_left, inner_smul_right, hv, hw, H] using (hT v w).symm
| [
" T v ∈ (eigenspace T μ)ᗮ",
" ⟪w, T v⟫_𝕜 = 0",
" T w = μ • w",
" (starRingEnd 𝕜) μ = μ",
" OrthogonalFamily 𝕜 (fun μ => ↥(eigenspace T μ)) fun μ => (eigenspace T μ).subtypeₗᵢ",
" ⟪((fun μ => (eigenspace T μ).subtypeₗᵢ) μ) ⟨v, hv⟩, ((fun μ => (eigenspace T μ).subtypeₗᵢ) ν) ⟨w, hw⟩⟫_𝕜 = 0",
" ⟪((fun μ... | [
" T v ∈ (eigenspace T μ)ᗮ",
" ⟪w, T v⟫_𝕜 = 0",
" T w = μ • w",
" (starRingEnd 𝕜) μ = μ"
] |
import Mathlib.LinearAlgebra.AffineSpace.Independent
import Mathlib.LinearAlgebra.Basis
#align_import linear_algebra.affine_space.basis from "leanprover-community/mathlib"@"2de9c37fa71dde2f1c6feff19876dd6a7b1519f0"
open Affine
open Set
universe u₁ u₂ u₃ u₄
structure AffineBasis (ι : Type u₁) (k : Type u₂) {V ... | Mathlib/LinearAlgebra/AffineSpace/Basis.lean | 174 | 179 | theorem coord_apply_ne (h : i ≠ j) : b.coord i (b j) = 0 := by |
-- Porting note:
-- in mathlib3 we didn't need to given the `fun j => j ≠ i` argument to `Subtype.coe_mk`,
-- but I don't think we can complain: this proof was over-golfed.
rw [coord, AffineMap.coe_mk, ← @Subtype.coe_mk _ (fun j => j ≠ i) j h.symm, ← b.basisOf_apply,
Basis.sumCoords_self_apply, sub_self]
| [
" affineSpan k (range id) = ⊤",
" f = g",
" { toFun := toFun✝, ind' := ind'✝, tot' := tot'✝ } = g",
" { toFun := toFun✝¹, ind' := ind'✝¹, tot' := tot'✝¹ } = { toFun := toFun✝, ind' := ind'✝, tot' := tot'✝ }",
" False",
" affineSpan k (range (⇑b ∘ ⇑e.symm)) = ⊤",
" affineSpan k (range ⇑b) = ⊤",
" ⊤ ≤ S... | [
" affineSpan k (range id) = ⊤",
" f = g",
" { toFun := toFun✝, ind' := ind'✝, tot' := tot'✝ } = g",
" { toFun := toFun✝¹, ind' := ind'✝¹, tot' := tot'✝¹ } = { toFun := toFun✝, ind' := ind'✝, tot' := tot'✝ }",
" False",
" affineSpan k (range (⇑b ∘ ⇑e.symm)) = ⊤",
" affineSpan k (range ⇑b) = ⊤",
" ⊤ ≤ S... |
import Mathlib.Algebra.PUnitInstances
import Mathlib.Tactic.Abel
import Mathlib.Tactic.Ring
import Mathlib.Order.Hom.Lattice
#align_import algebra.ring.boolean_ring from "leanprover-community/mathlib"@"e8638a0fcaf73e4500469f368ef9494e495099b3"
open scoped symmDiff
variable {α β γ : Type*}
class BooleanRing (α) ... | Mathlib/Algebra/Ring/BooleanRing.lean | 66 | 72 | theorem add_self : a + a = 0 := by |
have : a + a = a + a + (a + a) :=
calc
a + a = (a + a) * (a + a) := by rw [mul_self]
_ = a * a + a * a + (a * a + a * a) := by rw [add_mul, mul_add]
_ = a + a + (a + a) := by rw [mul_self]
rwa [self_eq_add_left] at this
| [
" a + a = 0",
" a + a = (a + a) * (a + a)",
" (a + a) * (a + a) = a * a + a * a + (a * a + a * a)",
" a * a + a * a + (a * a + a * a) = a + a + (a + a)"
] | [] |
import Mathlib.Data.Finset.Image
import Mathlib.Data.List.FinRange
#align_import data.fintype.basic from "leanprover-community/mathlib"@"d78597269638367c3863d40d45108f52207e03cf"
assert_not_exists MonoidWithZero
assert_not_exists MulAction
open Function
open Nat
universe u v
variable {α β γ : Type*}
class Fi... | Mathlib/Data/Fintype/Basic.lean | 104 | 105 | theorem univ_nonempty_iff : (univ : Finset α).Nonempty ↔ Nonempty α := by |
rw [← coe_nonempty, coe_univ, Set.nonempty_iff_univ_nonempty]
| [
" s = univ ↔ ∀ (x : α), x ∈ s",
" ↑univ = Set.univ",
" x✝ ∈ ↑univ ↔ x✝ ∈ Set.univ",
" ↑s = Set.univ ↔ s = univ",
" s.Nonempty → s = univ",
" s = univ",
" y ∈ s",
" univ.Nonempty ↔ Nonempty α"
] | [
" s = univ ↔ ∀ (x : α), x ∈ s",
" ↑univ = Set.univ",
" x✝ ∈ ↑univ ↔ x✝ ∈ Set.univ",
" ↑s = Set.univ ↔ s = univ",
" s.Nonempty → s = univ",
" s = univ",
" y ∈ s"
] |
import Mathlib.Algebra.MvPolynomial.Derivation
import Mathlib.Algebra.MvPolynomial.Variables
#align_import data.mv_polynomial.pderiv from "leanprover-community/mathlib"@"2f5b500a507264de86d666a5f87ddb976e2d8de4"
noncomputable section
universe u v
namespace MvPolynomial
open Set Function Finsupp
variable {R : ... | Mathlib/Algebra/MvPolynomial/PDeriv.lean | 120 | 122 | theorem pderiv_pow {i : σ} {f : MvPolynomial σ R} {n : ℕ} :
pderiv i (f ^ n) = n * f ^ (n - 1) * pderiv i f := by |
rw [(pderiv i).leibniz_pow f n, nsmul_eq_mul, smul_eq_mul, mul_assoc]
| [
" pderiv i = mkDerivation R (Pi.single i 1)",
" mkDerivation R (Pi.single i 1) = mkDerivation R (Pi.single i 1)",
" (pderiv i) ((monomial s) a) = (monomial (s - single i 1)) (a * ↑(s i))",
" (s.sum fun a_1 b => (monomial (s - single a_1 1)) (a * ↑b) * Pi.single i 1 a_1) =\n (monomial (s - single i 1)) (a *... | [
" pderiv i = mkDerivation R (Pi.single i 1)",
" mkDerivation R (Pi.single i 1) = mkDerivation R (Pi.single i 1)",
" (pderiv i) ((monomial s) a) = (monomial (s - single i 1)) (a * ↑(s i))",
" (s.sum fun a_1 b => (monomial (s - single a_1 1)) (a * ↑b) * Pi.single i 1 a_1) =\n (monomial (s - single i 1)) (a *... |
import Mathlib.Data.Set.Pointwise.SMul
import Mathlib.Topology.MetricSpace.Isometry
import Mathlib.Topology.MetricSpace.Lipschitz
#align_import topology.metric_space.isometric_smul from "leanprover-community/mathlib"@"bc91ed7093bf098d253401e69df601fc33dde156"
open Set
open ENNReal Pointwise
universe u v w
vari... | Mathlib/Topology/MetricSpace/IsometricSMul.lean | 143 | 144 | theorem edist_inv [PseudoEMetricSpace G] [IsometricSMul G G] [IsometricSMul Gᵐᵒᵖ G]
(x y : G) : edist x⁻¹ y = edist x y⁻¹ := by | rw [← edist_inv_inv, inv_inv]
| [
" edist ((fun x => c • x) x) ((fun x => c • x) y) = edist x y",
" edist (a / c) (b / c) = edist a b",
" edist a⁻¹ b⁻¹ = edist a b",
" edist x⁻¹ y = edist x y⁻¹"
] | [
" edist ((fun x => c • x) x) ((fun x => c • x) y) = edist x y",
" edist (a / c) (b / c) = edist a b",
" edist a⁻¹ b⁻¹ = edist a b"
] |
import Mathlib.Data.List.Range
import Mathlib.Algebra.Order.Ring.Nat
variable {α : Type*}
namespace List
@[simp]
theorem length_iterate (f : α → α) (a : α) (n : ℕ) : length (iterate f a n) = n := by
induction n generalizing a <;> simp [*]
@[simp]
theorem iterate_eq_nil {f : α → α} {a : α} {n : ℕ} : iterate f ... | Mathlib/Data/List/Iterate.lean | 39 | 41 | theorem mem_iterate {f : α → α} {a : α} {n : ℕ} {b : α} :
b ∈ iterate f a n ↔ ∃ m < n, b = f^[m] a := by |
simp [List.mem_iff_get, Fin.exists_iff, eq_comm (b := b)]
| [
" (iterate f a n).length = n",
" (iterate f a 0).length = 0",
" (iterate f a (n✝ + 1)).length = n✝ + 1",
" iterate f a n = [] ↔ n = 0",
" (iterate f a (n + 1)).get? (i + 1) = some (f^[i + 1] a)",
" i < n",
" ↑i < n",
" b ∈ iterate f a n ↔ ∃ m < n, b = f^[m] a"
] | [
" (iterate f a n).length = n",
" (iterate f a 0).length = 0",
" (iterate f a (n✝ + 1)).length = n✝ + 1",
" iterate f a n = [] ↔ n = 0",
" (iterate f a (n + 1)).get? (i + 1) = some (f^[i + 1] a)",
" i < n",
" ↑i < n"
] |
import Mathlib.Analysis.Convex.Between
import Mathlib.Analysis.Convex.Jensen
import Mathlib.Analysis.Convex.Topology
import Mathlib.Analysis.Normed.Group.Pointwise
import Mathlib.Analysis.NormedSpace.AddTorsor
#align_import analysis.convex.normed from "leanprover-community/mathlib"@"a63928c34ec358b5edcda2bf7513c50052... | Mathlib/Analysis/Convex/Normed.lean | 70 | 72 | theorem Convex.thickening (hs : Convex ℝ s) (δ : ℝ) : Convex ℝ (thickening δ s) := by |
rw [← add_ball_zero]
exact hs.add (convex_ball 0 _)
| [
" ‖a • x‖ + ‖b • y‖ = a * ‖x‖ + b * ‖y‖",
" ConvexOn ℝ s fun z' => dist z' z",
" Convex ℝ (ball a r)",
" Convex ℝ (closedBall a r)",
" Convex ℝ (Metric.thickening δ s)",
" Convex ℝ (s + ball 0 δ)"
] | [
" ‖a • x‖ + ‖b • y‖ = a * ‖x‖ + b * ‖y‖",
" ConvexOn ℝ s fun z' => dist z' z",
" Convex ℝ (ball a r)",
" Convex ℝ (closedBall a r)"
] |
import Mathlib.AlgebraicGeometry.Morphisms.Basic
import Mathlib.Topology.Spectral.Hom
import Mathlib.AlgebraicGeometry.Limits
#align_import algebraic_geometry.morphisms.quasi_compact from "leanprover-community/mathlib"@"5dc6092d09e5e489106865241986f7f2ad28d4c8"
noncomputable section
open CategoryTheory CategoryT... | Mathlib/AlgebraicGeometry/Morphisms/QuasiCompact.lean | 114 | 120 | theorem quasiCompact_iff_affineProperty :
QuasiCompact f ↔ targetAffineLocally QuasiCompact.affineProperty f := by |
rw [quasiCompact_iff_forall_affine]
trans ∀ U : Y.affineOpens, IsCompact (f.1.base ⁻¹' (U : Set Y.carrier))
· exact ⟨fun h U => h U U.prop, fun h U hU => h ⟨U, hU⟩⟩
apply forall_congr'
exact fun _ => isCompact_iff_compactSpace
| [
" Continuous ⇑f.val.base",
" QuasiCompact f",
" ∀ (U : Set ↑↑Y.toPresheafedSpace), IsOpen U → IsCompact U → IsCompact (⇑f.val.base ⁻¹' U)",
" IsCompact (⇑f.val.base ⁻¹' U)",
" ⇑f.val.base ⁻¹' U = (inv f.val.base).toFun '' U",
" Function.LeftInverse (⇑f.val.base) (inv f.val.base).toFun",
" ∀ (x : ↑↑Y.toP... | [
" Continuous ⇑f.val.base",
" QuasiCompact f",
" ∀ (U : Set ↑↑Y.toPresheafedSpace), IsOpen U → IsCompact U → IsCompact (⇑f.val.base ⁻¹' U)",
" IsCompact (⇑f.val.base ⁻¹' U)",
" ⇑f.val.base ⁻¹' U = (inv f.val.base).toFun '' U",
" Function.LeftInverse (⇑f.val.base) (inv f.val.base).toFun",
" ∀ (x : ↑↑Y.toP... |
import Mathlib.Algebra.Polynomial.AlgebraMap
import Mathlib.Algebra.Polynomial.BigOperators
import Mathlib.Algebra.Polynomial.Degree.Lemmas
import Mathlib.Algebra.Polynomial.Div
#align_import data.polynomial.ring_division from "leanprover-community/mathlib"@"8efcf8022aac8e01df8d302dcebdbc25d6a886c8"
noncomputable ... | Mathlib/Algebra/Polynomial/RingDivision.lean | 161 | 163 | theorem degree_le_of_dvd {p q : R[X]} (h1 : p ∣ q) (h2 : q ≠ 0) : degree p ≤ degree q := by |
rcases h1 with ⟨q, rfl⟩; rw [mul_ne_zero_iff] at h2
exact degree_le_mul_left p h2.2
| [
" a✝ = 0 ∨ b✝ = 0",
" a✝.leadingCoeff = 0 ∨ b✝.leadingCoeff = 0",
" a✝.leadingCoeff * b✝.leadingCoeff = 0",
" (p * q).natDegree = p.natDegree + q.natDegree",
" (p * q).trailingDegree = p.trailingDegree + q.trailingDegree",
" ↑(p.natTrailingDegree + q.natTrailingDegree) = ↑p.natTrailingDegree + ↑q.natTrail... | [
" a✝ = 0 ∨ b✝ = 0",
" a✝.leadingCoeff = 0 ∨ b✝.leadingCoeff = 0",
" a✝.leadingCoeff * b✝.leadingCoeff = 0",
" (p * q).natDegree = p.natDegree + q.natDegree",
" (p * q).trailingDegree = p.trailingDegree + q.trailingDegree",
" ↑(p.natTrailingDegree + q.natTrailingDegree) = ↑p.natTrailingDegree + ↑q.natTrail... |
import Mathlib.Data.List.Basic
#align_import data.list.lattice from "leanprover-community/mathlib"@"dd71334db81d0bd444af1ee339a29298bef40734"
open Nat
namespace List
variable {α : Type*} {l l₁ l₂ : List α} {p : α → Prop} {a : α}
variable [DecidableEq α]
section Inter
@[simp]
theorem inter_nil (l : L... | Mathlib/Data/List/Lattice.lean | 139 | 140 | theorem inter_cons_of_not_mem (l₁ : List α) (h : a ∉ l₂) : (a :: l₁) ∩ l₂ = l₁ ∩ l₂ := by |
simp [Inter.inter, List.inter, h]
| [
" (a :: l₁) ∩ l₂ = a :: l₁ ∩ l₂",
" (a :: l₁) ∩ l₂ = l₁ ∩ l₂"
] | [
" (a :: l₁) ∩ l₂ = a :: l₁ ∩ l₂"
] |
import Mathlib.Analysis.SpecialFunctions.Pow.Asymptotics
#align_import analysis.special_functions.pow.continuity from "leanprover-community/mathlib"@"0b9eaaa7686280fad8cce467f5c3c57ee6ce77f8"
noncomputable section
open scoped Classical
open Real Topology NNReal ENNReal Filter ComplexConjugate
open Filter Finset... | Mathlib/Analysis/SpecialFunctions/Pow/Continuity.lean | 36 | 41 | theorem zero_cpow_eq_nhds {b : ℂ} (hb : b ≠ 0) : (fun x : ℂ => (0 : ℂ) ^ x) =ᶠ[𝓝 b] 0 := by |
suffices ∀ᶠ x : ℂ in 𝓝 b, x ≠ 0 from
this.mono fun x hx ↦ by
dsimp only
rw [zero_cpow hx, Pi.zero_apply]
exact IsOpen.eventually_mem isOpen_ne hb
| [
" (fun x => 0 ^ x) =ᶠ[𝓝 b] 0",
" (fun x => 0 ^ x) x = 0 x",
" 0 ^ x = OfNat.ofNat 0 x",
" ∀ᶠ (x : ℂ) in 𝓝 b, x ≠ 0"
] | [] |
import Mathlib.FieldTheory.RatFunc.AsPolynomial
import Mathlib.RingTheory.EuclideanDomain
import Mathlib.RingTheory.Localization.FractionRing
import Mathlib.RingTheory.Polynomial.Content
noncomputable section
universe u
variable {K : Type u}
namespace RatFunc
section IntDegree
open Polynomial
variable [Field... | Mathlib/FieldTheory/RatFunc/Degree.lean | 49 | 50 | theorem intDegree_one : intDegree (1 : RatFunc K) = 0 := by |
rw [intDegree, num_one, denom_one, sub_self]
| [
" intDegree 0 = 0",
" intDegree 1 = 0"
] | [
" intDegree 0 = 0"
] |
import Mathlib.Topology.MetricSpace.HausdorffDistance
import Mathlib.MeasureTheory.Constructions.BorelSpace.Order
#align_import measure_theory.measure.regular from "leanprover-community/mathlib"@"bf6a01357ff5684b1ebcd0f1a13be314fc82c0bf"
open Set Filter ENNReal Topology NNReal TopologicalSpace
namespace MeasureTh... | Mathlib/MeasureTheory/Measure/Regular.lean | 349 | 353 | theorem _root_.Set.measure_eq_iInf_isOpen (A : Set α) (μ : Measure α) [OuterRegular μ] :
μ A = ⨅ (U : Set α) (_ : A ⊆ U) (_ : IsOpen U), μ U := by |
refine le_antisymm (le_iInf₂ fun s hs => le_iInf fun _ => μ.mono hs) ?_
refine le_of_forall_lt' fun r hr => ?_
simpa only [iInf_lt_iff, exists_prop] using A.exists_isOpen_lt_of_lt r hr
| [
" ∃ U ⊇ A, IsOpen U ∧ μ U < r",
" r > ?m.3205 (toMeasurable μ A)",
" μ A = ⨅ U, ⨅ (_ : A ⊆ U), ⨅ (_ : IsOpen U), μ U",
" ⨅ U, ⨅ (_ : A ⊆ U), ⨅ (_ : IsOpen U), μ U ≤ μ A",
" ⨅ U, ⨅ (_ : A ⊆ U), ⨅ (_ : IsOpen U), μ U < r"
] | [
" ∃ U ⊇ A, IsOpen U ∧ μ U < r",
" r > ?m.3205 (toMeasurable μ A)"
] |
import Mathlib.CategoryTheory.Limits.Shapes.Equalizers
import Mathlib.CategoryTheory.Limits.Shapes.Products
import Mathlib.Topology.Sheaves.SheafCondition.PairwiseIntersections
#align_import topology.sheaves.sheaf_condition.equalizer_products from "leanprover-community/mathlib"@"85d6221d32c37e68f05b2e42cde6cee658dae5... | Mathlib/Topology/Sheaves/SheafCondition/EqualizerProducts.lean | 80 | 81 | theorem res_π (i : ι) : res F U ≫ limit.π _ ⟨i⟩ = F.map (Opens.leSupr U i).op := by |
rw [res, limit.lift_π, Fan.mk_π_app]
| [
" res F U ≫ limit.π (Discrete.functor fun i => F.obj { unop := U i }) { as := i } = F.map (leSupr U i).op"
] | [] |
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 | 117 | 151 | theorem generateMeasurable_eq_rec (s : Set (Set α)) :
{ t | GenerateMeasurable s t } =
⋃ (i : (Quotient.out (aleph 1).ord).α), generateMeasurableRec s i := by |
ext t; refine ⟨fun ht => ?_, fun ht => ?_⟩
· inhabit ω₁
induction' ht with u hu u _ IH f _ IH
· exact mem_iUnion.2 ⟨default, self_subset_generateMeasurableRec s _ hu⟩
· exact mem_iUnion.2 ⟨default, empty_mem_generateMeasurableRec s _⟩
· rcases mem_iUnion.1 IH with ⟨i, hi⟩
obtain ⟨j, hj⟩ := ex... | [
" (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",
" ∅ ∈ generateMeasurableRec s i",
" ∅ ∈\n let i := i;\n l... | [
" (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",
" ∅ ∈ generateMeasurableRec s i",
" ∅ ∈\n let i := i;\n l... |
import Mathlib.RingTheory.IntegrallyClosed
import Mathlib.RingTheory.Localization.NumDen
import Mathlib.RingTheory.Polynomial.ScaleRoots
#align_import ring_theory.polynomial.rational_root from "leanprover-community/mathlib"@"62c0a4ef1441edb463095ea02a06e87f3dfe135c"
open scoped Polynomial
section ScaleRoots
var... | Mathlib/RingTheory/Polynomial/RationalRoot.lean | 39 | 44 | theorem scaleRoots_aeval_eq_zero_of_aeval_mk'_eq_zero {p : A[X]} {r : A} {s : M}
(hr : aeval (mk' S r s) p = 0) : aeval (algebraMap A S r) (scaleRoots p s) = 0 := by |
convert scaleRoots_eval₂_eq_zero (algebraMap A S) hr
-- Porting note: added
funext
rw [aeval_def, mk'_spec' _ r s]
| [
" (aeval ((algebraMap A S) r)) (p.scaleRoots ↑s) = 0",
" ⇑(aeval ((algebraMap A S) r)) = eval₂ (algebraMap A S) ((algebraMap A S) ↑s * mk' S r s)",
" (aeval ((algebraMap A S) r)) x✝ = eval₂ (algebraMap A S) ((algebraMap A S) ↑s * mk' S r s) x✝"
] | [] |
import Mathlib.NumberTheory.Zsqrtd.Basic
import Mathlib.RingTheory.PrincipalIdealDomain
import Mathlib.Data.Complex.Basic
import Mathlib.Data.Real.Archimedean
#align_import number_theory.zsqrtd.gaussian_int from "leanprover-community/mathlib"@"5b2fe80501ff327b9109fb09b7cc8c325cd0d7d9"
open Zsqrtd Complex
open sc... | Mathlib/NumberTheory/Zsqrtd/GaussianInt.lean | 89 | 89 | theorem to_real_re (x : ℤ[i]) : ((x.re : ℤ) : ℝ) = (x : ℂ).re := by | simp [toComplex_def]
| [
" I * I = ↑(-1)",
" toComplex { re := x, im := y } = ↑x + ↑y * I",
" toComplex x = { re := ↑x.re, im := ↑x.im }",
" (toComplex x).re = { re := ↑x.re, im := ↑x.im }.re",
" (toComplex x).im = { re := ↑x.re, im := ↑x.im }.im",
" ↑x.re = (toComplex x).re"
] | [
" I * I = ↑(-1)",
" toComplex { re := x, im := y } = ↑x + ↑y * I",
" toComplex x = { re := ↑x.re, im := ↑x.im }",
" (toComplex x).re = { re := ↑x.re, im := ↑x.im }.re",
" (toComplex x).im = { re := ↑x.re, im := ↑x.im }.im"
] |
import Mathlib.Data.Matrix.Invertible
import Mathlib.LinearAlgebra.Matrix.Adjugate
import Mathlib.LinearAlgebra.FiniteDimensional
#align_import linear_algebra.matrix.nonsingular_inverse from "leanprover-community/mathlib"@"722b3b152ddd5e0cf21c0a29787c76596cb6b422"
namespace Matrix
universe u u' v
variable {l : ... | Mathlib/LinearAlgebra/Matrix/NonsingularInverse.lean | 103 | 105 | theorem det_invOf [Invertible A] [Invertible A.det] : (⅟ A).det = ⅟ A.det := by |
letI := detInvertibleOfInvertible A
convert (rfl : _ = ⅟ A.det)
| [
" ⅟A.det • A.adjugate * A = 1",
" A * ⅟A.det • A.adjugate = 1",
" ⅟A = ⅟A.det • A.adjugate",
" B.det * A.det = 1",
" A.det * B.det = 1",
" (⅟A).det = ⅟A.det"
] | [
" ⅟A.det • A.adjugate * A = 1",
" A * ⅟A.det • A.adjugate = 1",
" ⅟A = ⅟A.det • A.adjugate",
" B.det * A.det = 1",
" A.det * B.det = 1"
] |
import Mathlib.LinearAlgebra.FiniteDimensional
import Mathlib.MeasureTheory.Group.Pointwise
import Mathlib.MeasureTheory.Measure.Lebesgue.Basic
import Mathlib.MeasureTheory.Measure.Haar.Basic
import Mathlib.MeasureTheory.Measure.Doubling
import Mathlib.MeasureTheory.Constructions.BorelSpace.Metric
#align_import measu... | Mathlib/MeasureTheory/Measure/Lebesgue/EqHaar.lean | 115 | 116 | theorem addHaarMeasure_eq_volume : addHaarMeasure Icc01 = volume := by |
convert (addHaarMeasure_unique volume Icc01).symm; simp [Icc01]
| [
" (interior { carrier := Icc 0 1, isCompact' := ⋯ }.carrier).Nonempty",
" (interior { carrier := univ.pi fun x => Icc 0 1, isCompact' := ⋯ }.carrier).Nonempty",
" ↑(Pi.basisFun ℝ ι).parallelepiped = ↑(PositiveCompacts.piIcc01 ι)",
" ↑(Pi.basisFun ℝ ι).parallelepiped = uIcc (fun i => 0) fun i => 1",
" (fun i... | [
" (interior { carrier := Icc 0 1, isCompact' := ⋯ }.carrier).Nonempty",
" (interior { carrier := univ.pi fun x => Icc 0 1, isCompact' := ⋯ }.carrier).Nonempty",
" ↑(Pi.basisFun ℝ ι).parallelepiped = ↑(PositiveCompacts.piIcc01 ι)",
" ↑(Pi.basisFun ℝ ι).parallelepiped = uIcc (fun i => 0) fun i => 1",
" (fun i... |
import Mathlib.GroupTheory.QuotientGroup
import Mathlib.RingTheory.DedekindDomain.Ideal
#align_import ring_theory.class_group from "leanprover-community/mathlib"@"565eb991e264d0db702722b4bde52ee5173c9950"
variable {R K L : Type*} [CommRing R]
variable [Field K] [Field L] [DecidableEq L]
variable [Algebra R K] [Is... | Mathlib/RingTheory/ClassGroup.lean | 126 | 144 | theorem ClassGroup.mk_eq_mk_of_coe_ideal {I J : (FractionalIdeal R⁰ <| FractionRing R)ˣ}
{I' J' : Ideal R} (hI : (I : FractionalIdeal R⁰ <| FractionRing R) = I')
(hJ : (J : FractionalIdeal R⁰ <| FractionRing R) = J') :
ClassGroup.mk I = ClassGroup.mk J ↔
∃ x y : R, x ≠ 0 ∧ y ≠ 0 ∧ Ideal.span {x} * I' ... |
rw [ClassGroup.mk_eq_mk]
constructor
· rintro ⟨x, rfl⟩
rw [Units.val_mul, hI, coe_toPrincipalIdeal, mul_comm,
spanSingleton_mul_coeIdeal_eq_coeIdeal] at hJ
exact ⟨_, _, sec_fst_ne_zero (R := R) le_rfl x.ne_zero,
sec_snd_ne_zero (R := R) le_rfl (x : FractionRing R), hJ⟩
· rintro ⟨x, y, hx, h... | [
" spanSingleton R⁰ ↑x * spanSingleton R⁰ (↑x)⁻¹ = 1",
" spanSingleton R⁰ (↑x)⁻¹ * spanSingleton R⁰ ↑x = 1",
" ↑((fun x => { val := spanSingleton R⁰ ↑x, inv := spanSingleton R⁰ (↑x)⁻¹, val_inv := ⋯, inv_val := ⋯ }) 1) = ↑1",
" ↑({ toFun := fun x => { val := spanSingleton R⁰ ↑x, inv := spanSingleton R⁰ (↑x)⁻¹, ... | [
" spanSingleton R⁰ ↑x * spanSingleton R⁰ (↑x)⁻¹ = 1",
" spanSingleton R⁰ (↑x)⁻¹ * spanSingleton R⁰ ↑x = 1",
" ↑((fun x => { val := spanSingleton R⁰ ↑x, inv := spanSingleton R⁰ (↑x)⁻¹, val_inv := ⋯, inv_val := ⋯ }) 1) = ↑1",
" ↑({ toFun := fun x => { val := spanSingleton R⁰ ↑x, inv := spanSingleton R⁰ (↑x)⁻¹, ... |
import Mathlib.Algebra.Order.BigOperators.Ring.Finset
import Mathlib.Data.Nat.Totient
import Mathlib.GroupTheory.OrderOfElement
import Mathlib.GroupTheory.Subgroup.Simple
import Mathlib.Tactic.Group
import Mathlib.GroupTheory.Exponent
#align_import group_theory.specific_groups.cyclic from "leanprover-community/mathli... | Mathlib/GroupTheory/SpecificGroups/Cyclic.lean | 136 | 141 | theorem Subgroup.eq_bot_or_eq_top_of_prime_card {G : Type*} [Group G] {_ : Fintype G}
(H : Subgroup G) [hp : Fact (Fintype.card G).Prime] : H = ⊥ ∨ H = ⊤ := by |
classical
have := card_subgroup_dvd_card H
rwa [Nat.card_eq_fintype_card (α := G), Nat.dvd_prime hp.1, ← Nat.card_eq_fintype_card,
← eq_bot_iff_card, card_eq_iff_eq_top] at this
| [
" x ∈ zpowers 1",
" 1 ∈ zpowers 1",
" Nontrivial α",
" IsCyclic α",
" ∃ m, ∀ (g : G), σ g = g ^ m",
" σ g = g ^ m",
" σ ((fun x => h ^ x) n) = (fun x => h ^ x) n ^ m",
" ∀ (x_1 : α), x_1 ∈ zpowers x",
" ↑(zpowers x) = Set.univ",
" H = ⊥ ∨ H = ⊤"
] | [
" x ∈ zpowers 1",
" 1 ∈ zpowers 1",
" Nontrivial α",
" IsCyclic α",
" ∃ m, ∀ (g : G), σ g = g ^ m",
" σ g = g ^ m",
" σ ((fun x => h ^ x) n) = (fun x => h ^ x) n ^ m",
" ∀ (x_1 : α), x_1 ∈ zpowers x",
" ↑(zpowers x) = Set.univ"
] |
import Mathlib.Algebra.Order.Ring.Abs
#align_import data.int.order.units from "leanprover-community/mathlib"@"d012cd09a9b256d870751284dd6a29882b0be105"
namespace Int
theorem isUnit_iff_abs_eq {x : ℤ} : IsUnit x ↔ abs x = 1 := by
rw [isUnit_iff_natAbs_eq, abs_eq_natAbs, ← Int.ofNat_one, natCast_inj]
#align int.... | Mathlib/Data/Int/Order/Units.lean | 45 | 46 | theorem units_coe_mul_self (u : ℤˣ) : (u * u : ℤ) = 1 := by |
rw [← Units.val_mul, units_mul_self, Units.val_one]
| [
" IsUnit x ↔ |x| = 1",
" a ^ 2 = 1",
" u ^ 2 = 1",
" u * u = 1",
" u⁻¹ = u",
" u₁ / u₂ = u₁ * u₂",
" ↑u * ↑u = 1"
] | [
" IsUnit x ↔ |x| = 1",
" a ^ 2 = 1",
" u ^ 2 = 1",
" u * u = 1",
" u⁻¹ = u",
" u₁ / u₂ = u₁ * u₂"
] |
import Mathlib.Combinatorics.SimpleGraph.DegreeSum
import Mathlib.Combinatorics.SimpleGraph.Subgraph
#align_import combinatorics.simple_graph.matching from "leanprover-community/mathlib"@"138448ae98f529ef34eeb61114191975ee2ca508"
universe u
namespace SimpleGraph
variable {V : Type u} {G : SimpleGraph V} (M : Su... | Mathlib/Combinatorics/SimpleGraph/Matching.lean | 114 | 119 | theorem isPerfectMatching_iff : M.IsPerfectMatching ↔ ∀ v, ∃! w, M.Adj v w := by |
refine ⟨?_, fun hm => ⟨fun v _ => hm v, fun v => ?_⟩⟩
· rintro ⟨hm, hs⟩ v
exact hm (hs v)
· obtain ⟨w, hw, -⟩ := hm v
exact M.edge_vert hw
| [
" h.toEdge ⟨v, hv⟩ = ⟨s(v, w), hvw⟩",
" s(v, Exists.choose ⋯) = s(v, w)",
" Exists.choose ⋯ = w",
" Function.Surjective h.toEdge",
" ∃ a, h.toEdge a = ⟨e, he⟩",
" ∃ a, h.toEdge a = ⟨s(x, y), he⟩",
" h.toEdge ⟨v, hv⟩ = h.toEdge ⟨w, hw⟩",
" M.support = M.verts",
" v ∈ M.support",
" M.IsMatching ↔ ∀ ... | [
" h.toEdge ⟨v, hv⟩ = ⟨s(v, w), hvw⟩",
" s(v, Exists.choose ⋯) = s(v, w)",
" Exists.choose ⋯ = w",
" Function.Surjective h.toEdge",
" ∃ a, h.toEdge a = ⟨e, he⟩",
" ∃ a, h.toEdge a = ⟨s(x, y), he⟩",
" h.toEdge ⟨v, hv⟩ = h.toEdge ⟨w, hw⟩",
" M.support = M.verts",
" v ∈ M.support",
" M.IsMatching ↔ ∀ ... |
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 | 147 | 148 | theorem preimage_const_add_Icc : (fun x => a + x) ⁻¹' Icc b c = Icc (b - a) (c - a) := by |
simp [← Ici_inter_Iic]
| [
" (fun x => a + x) ⁻¹' Icc b c = Icc (b - a) (c - a)"
] | [] |
import Mathlib.Tactic.NormNum
import Mathlib.Tactic.TryThis
import Mathlib.Util.AtomM
set_option autoImplicit true
namespace Mathlib.Tactic.Abel
open Lean Elab Meta Tactic Qq
initialize registerTraceClass `abel
initialize registerTraceClass `abel.detail
structure Context where
α : Expr
univ :... | Mathlib/Tactic/Abel.lean | 128 | 130 | theorem const_add_term {α} [AddCommMonoid α] (k n x a a') (h : k + a = a') :
k + @term α _ n x a = term n x a' := by |
simp [h.symm, term, add_comm, add_assoc]
| [
" k + term n x a = term n x a'"
] | [] |
import Mathlib.Data.Finsupp.Basic
import Mathlib.Data.Finsupp.Order
#align_import data.finsupp.multiset from "leanprover-community/mathlib"@"59694bd07f0a39c5beccba34bd9f413a160782bf"
open Finset
variable {α β ι : Type*}
namespace Finsupp
def toMultiset : (α →₀ ℕ) →+ Multiset α where
toFun f := Finsupp.sum f... | Mathlib/Data/Finsupp/Multiset.lean | 105 | 114 | theorem count_toMultiset [DecidableEq α] (f : α →₀ ℕ) (a : α) : (toMultiset f).count a = f a :=
calc
(toMultiset f).count a = Finsupp.sum f (fun x n => (n • {x} : Multiset α).count a) := by |
rw [toMultiset_apply]; exact map_sum (Multiset.countAddMonoidHom a) _ f.support
_ = f.sum fun x n => n * ({x} : Multiset α).count a := by simp only [Multiset.count_nsmul]
_ = f a * ({a} : Multiset α).count a :=
sum_eq_single _
(fun a' _ H => by simp only [Multiset.count_singleton, if_false,... | [
" toMultiset (single a n) = n • {a}",
" 0 • {a} = 0",
" toMultiset (∑ i ∈ s, single i n) = n • s.val",
" Multiset.card (toMultiset f) = f.sum fun x => id",
" Multiset.map g (toMultiset f) = toMultiset (mapDomain g f)",
" Multiset.map g (toMultiset 0) = toMultiset (mapDomain g 0)",
" ∀ (a : α) (b : ℕ) (f... | [
" toMultiset (single a n) = n • {a}",
" 0 • {a} = 0",
" toMultiset (∑ i ∈ s, single i n) = n • s.val",
" Multiset.card (toMultiset f) = f.sum fun x => id",
" Multiset.map g (toMultiset f) = toMultiset (mapDomain g f)",
" Multiset.map g (toMultiset 0) = toMultiset (mapDomain g 0)",
" ∀ (a : α) (b : ℕ) (f... |
import Mathlib.Topology.MetricSpace.HausdorffDistance
import Mathlib.MeasureTheory.Constructions.BorelSpace.Order
#align_import measure_theory.measure.regular from "leanprover-community/mathlib"@"bf6a01357ff5684b1ebcd0f1a13be314fc82c0bf"
open Set Filter ENNReal Topology NNReal TopologicalSpace
namespace MeasureTh... | Mathlib/MeasureTheory/Measure/Regular.lean | 215 | 219 | theorem measure_eq_iSup (H : InnerRegularWRT μ p q) (hU : q U) :
μ U = ⨆ (K) (_ : K ⊆ U) (_ : p K), μ K := by |
refine
le_antisymm (le_of_forall_lt fun r hr => ?_) (iSup₂_le fun K hK => iSup_le fun _ => μ.mono hK)
simpa only [lt_iSup_iff, exists_prop] using H hU r hr
| [
" μ U = ⨆ K, ⨆ (_ : K ⊆ U), ⨆ (_ : p K), μ K",
" r < ⨆ K, ⨆ (_ : K ⊆ U), ⨆ (_ : p K), μ K"
] | [] |
import Mathlib.Topology.Connected.Basic
open Set Topology
universe u v
variable {α : Type u} {β : Type v} {ι : Type*} {π : ι → Type*} [TopologicalSpace α]
{s t u v : Set α}
section LocallyConnectedSpace
class LocallyConnectedSpace (α : Type*) [TopologicalSpace α] : Prop where
open_connected_basis : ∀ x,... | Mathlib/Topology/Connected/LocallyConnected.lean | 63 | 67 | theorem connectedComponentIn_mem_nhds [LocallyConnectedSpace α] {F : Set α} {x : α} (h : F ∈ 𝓝 x) :
connectedComponentIn F x ∈ 𝓝 x := by |
rw [(LocallyConnectedSpace.open_connected_basis x).mem_iff] at h
rcases h with ⟨s, ⟨h1s, hxs, h2s⟩, hsF⟩
exact mem_nhds_iff.mpr ⟨s, h2s.isPreconnected.subset_connectedComponentIn hxs hsF, h1s, hxs⟩
| [
" LocallyConnectedSpace α ↔ ∀ (x : α), ∀ U ∈ 𝓝 x, ∃ V ⊆ U, IsOpen V ∧ x ∈ V ∧ IsConnected V",
" (∀ (x : α), (𝓝 x).HasBasis (fun s => IsOpen s ∧ x ∈ s ∧ IsConnected s) id) ↔\n ∀ (x : α), ∀ U ∈ 𝓝 x, ∃ V ⊆ U, IsOpen V ∧ x ∈ V ∧ IsConnected V",
" (𝓝 x✝).HasBasis (fun s => IsOpen s ∧ x✝ ∈ s ∧ IsConnected s) i... | [
" LocallyConnectedSpace α ↔ ∀ (x : α), ∀ U ∈ 𝓝 x, ∃ V ⊆ U, IsOpen V ∧ x ∈ V ∧ IsConnected V",
" (∀ (x : α), (𝓝 x).HasBasis (fun s => IsOpen s ∧ x ∈ s ∧ IsConnected s) id) ↔\n ∀ (x : α), ∀ U ∈ 𝓝 x, ∃ V ⊆ U, IsOpen V ∧ x ∈ V ∧ IsConnected V",
" (𝓝 x✝).HasBasis (fun s => IsOpen s ∧ x✝ ∈ s ∧ IsConnected s) i... |
import Mathlib.Algebra.GroupWithZero.Divisibility
import Mathlib.Algebra.Order.Group.Int
import Mathlib.Algebra.Order.Ring.Nat
import Mathlib.Algebra.Ring.Rat
import Mathlib.Data.PNat.Defs
#align_import data.rat.lemmas from "leanprover-community/mathlib"@"550b58538991c8977703fdeb7c9d51a5aa27df11"
namespace Rat
o... | Mathlib/Data/Rat/Lemmas.lean | 71 | 76 | theorem den_mk (n d : ℤ) : (n /. d).den = if d = 0 then 1 else d.natAbs / n.gcd d := by |
have (m : ℕ) : Int.natAbs (m + 1) = m + 1 := by
rw [← Nat.cast_one, ← Nat.cast_add, Int.natAbs_cast]
rcases d with ((_ | _) | _) <;>
simp [divInt, mkRat, Rat.normalize, Nat.succPNat, Int.sign, Int.gcd,
if_neg (Nat.cast_add_one_ne_zero _), this]
| [
" (a /. b).num ∣ a",
" { num := n, den := d, den_nz := h, reduced := c }.num ∣ a",
" n.natAbs ∣ a.natAbs * d",
" ↑(a /. b).den ∣ b",
" ↑{ num := n, den := d, den_nz := h, reduced := c }.den ∣ b",
" d ∣ n.natAbs * b.natAbs",
" ↑d ∣ a * ↑d",
" ∃ c, n = c * q.num ∧ d = c * ↑q.den",
" ∃ c, 0 = c * q.num... | [
" (a /. b).num ∣ a",
" { num := n, den := d, den_nz := h, reduced := c }.num ∣ a",
" n.natAbs ∣ a.natAbs * d",
" ↑(a /. b).den ∣ b",
" ↑{ num := n, den := d, den_nz := h, reduced := c }.den ∣ b",
" d ∣ n.natAbs * b.natAbs",
" ↑d ∣ a * ↑d",
" ∃ c, n = c * q.num ∧ d = c * ↑q.den",
" ∃ c, 0 = c * q.num... |
import Mathlib.MeasureTheory.Function.LpSeminorm.Basic
import Mathlib.MeasureTheory.Integral.MeanInequalities
#align_import measure_theory.function.lp_seminorm from "leanprover-community/mathlib"@"c4015acc0a223449d44061e27ddac1835a3852b9"
open Filter
open scoped ENNReal Topology
namespace MeasureTheory
variable ... | Mathlib/MeasureTheory/Function/LpSeminorm/TriangleInequality.lean | 80 | 83 | theorem LpAddConst_zero : LpAddConst 0 = 1 := by |
rw [LpAddConst, if_neg]
intro h
exact lt_irrefl _ h.1
| [
" (∫⁻ (a : α), ↑‖(f + g) a‖₊ ^ q ∂μ) ^ (1 / q) ≤\n (∫⁻ (a : α), ((fun a => ↑‖f a‖₊) + fun a => ↑‖g a‖₊) a ^ q ∂μ) ^ (1 / q)",
" ↑‖(f + g) a‖₊ ≤ ((fun a => ↑‖f a‖₊) + fun a => ↑‖g a‖₊) a",
" snormEssSup (f + g) μ ≤ snormEssSup f μ + snormEssSup g μ",
" (fun x => ↑‖(f + g) x‖₊) x ≤ ((fun x => ↑‖f x‖₊) + fun ... | [
" (∫⁻ (a : α), ↑‖(f + g) a‖₊ ^ q ∂μ) ^ (1 / q) ≤\n (∫⁻ (a : α), ((fun a => ↑‖f a‖₊) + fun a => ↑‖g a‖₊) a ^ q ∂μ) ^ (1 / q)",
" ↑‖(f + g) a‖₊ ≤ ((fun a => ↑‖f a‖₊) + fun a => ↑‖g a‖₊) a",
" snormEssSup (f + g) μ ≤ snormEssSup f μ + snormEssSup g μ",
" (fun x => ↑‖(f + g) x‖₊) x ≤ ((fun x => ↑‖f x‖₊) + fun ... |
import Mathlib.Data.Finset.Lattice
import Mathlib.Data.Set.Sigma
#align_import data.finset.sigma from "leanprover-community/mathlib"@"9003f28797c0664a49e4179487267c494477d853"
open Function Multiset
variable {ι : Type*}
namespace Finset
section Sigma
variable {α : ι → Type*} {β : Type*} (s s₁ s₂ : Finset ι) (... | Mathlib/Data/Finset/Sigma.lean | 64 | 65 | theorem sigma_eq_empty : s.sigma t = ∅ ↔ ∀ i ∈ s, t i = ∅ := by |
simp only [← not_nonempty_iff_eq_empty, sigma_nonempty, not_exists, not_and]
| [
" (s.sigma t).Nonempty ↔ ∃ i ∈ s, (t i).Nonempty",
" s.sigma t = ∅ ↔ ∀ i ∈ s, t i = ∅"
] | [
" (s.sigma t).Nonempty ↔ ∃ i ∈ s, (t i).Nonempty"
] |
import Mathlib.Algebra.Order.Pointwise
import Mathlib.Analysis.NormedSpace.SphereNormEquiv
import Mathlib.Analysis.SpecialFunctions.Integrals
import Mathlib.MeasureTheory.Constructions.Prod.Integral
import Mathlib.MeasureTheory.Measure.Lebesgue.EqHaar
open Set Function Metric MeasurableSpace intervalIntegral
open s... | Mathlib/MeasureTheory/Constructions/HaarToSphere.lean | 68 | 70 | theorem toSphere_apply_univ : μ.toSphere univ = dim E * μ (ball 0 1) := by |
nontriviality E
rw [toSphere_apply_univ', measure_diff_null (measure_singleton _)]
| [
" μ (Subtype.val '' (⇑(homeomorphUnitSphereProd E) ⁻¹' s ×ˢ Iio r)) = μ (Ioo 0 ↑r • Subtype.val '' s)",
" μ ((fun x => ↑((homeomorphUnitSphereProd E).symm x)) '' s ×ˢ Iio r) = μ ((fun x => SMul.smul ↑x.2 ↑x.1) '' s ×ˢ Iio r)",
" μ.toSphere s = ↑(dim E) * μ (Ioo 0 1 • Subtype.val '' s)",
" μ.toSphere univ = ↑(... | [
" μ (Subtype.val '' (⇑(homeomorphUnitSphereProd E) ⁻¹' s ×ˢ Iio r)) = μ (Ioo 0 ↑r • Subtype.val '' s)",
" μ ((fun x => ↑((homeomorphUnitSphereProd E).symm x)) '' s ×ˢ Iio r) = μ ((fun x => SMul.smul ↑x.2 ↑x.1) '' s ×ˢ Iio r)",
" μ.toSphere s = ↑(dim E) * μ (Ioo 0 1 • Subtype.val '' s)",
" μ.toSphere univ = ↑(... |
import Mathlib.Data.Complex.Module
import Mathlib.RingTheory.Norm
import Mathlib.RingTheory.Trace
#align_import ring_theory.complex from "leanprover-community/mathlib"@"9015c511549dc77a0f8d6eba021d8ac4bba20c82"
open Complex
theorem Algebra.leftMulMatrix_complex (z : ℂ) :
Algebra.leftMulMatrix Complex.basisOn... | Mathlib/RingTheory/Complex.lean | 31 | 34 | theorem Algebra.trace_complex_apply (z : ℂ) : Algebra.trace ℝ ℂ z = 2 * z.re := by |
rw [Algebra.trace_eq_matrix_trace Complex.basisOneI, Algebra.leftMulMatrix_complex,
Matrix.trace_fin_two]
exact (two_mul _).symm
| [
" (leftMulMatrix basisOneI) z = Matrix.of ![![z.re, -z.im], ![z.im, z.re]]",
" (leftMulMatrix basisOneI) z i j = Matrix.of ![![z.re, -z.im], ![z.im, z.re]] i j",
" ![z.re * (![1, I] j).re - z.im * (![1, I] j).im, z.re * (![1, I] j).im + z.im * (![1, I] j).re] i =\n ![![z.re, -z.im], ![z.im, z.re]] i j",
" ... | [
" (leftMulMatrix basisOneI) z = Matrix.of ![![z.re, -z.im], ![z.im, z.re]]",
" (leftMulMatrix basisOneI) z i j = Matrix.of ![![z.re, -z.im], ![z.im, z.re]] i j",
" ![z.re * (![1, I] j).re - z.im * (![1, I] j).im, z.re * (![1, I] j).im + z.im * (![1, I] j).re] i =\n ![![z.re, -z.im], ![z.im, z.re]] i j",
" ... |
import Mathlib.Algebra.BigOperators.Ring
import Mathlib.Combinatorics.SimpleGraph.Dart
import Mathlib.Combinatorics.SimpleGraph.Finite
import Mathlib.Data.ZMod.Parity
#align_import combinatorics.simple_graph.degree_sum from "leanprover-community/mathlib"@"90659cbe25e59ec302e2fb92b00e9732160cc620"
open Finset
nam... | Mathlib/Combinatorics/SimpleGraph/DegreeSum.lean | 98 | 106 | theorem dart_card_eq_twice_card_edges : Fintype.card G.Dart = 2 * G.edgeFinset.card := by |
classical
rw [← card_univ]
rw [@card_eq_sum_card_fiberwise _ _ _ Dart.edge _ G.edgeFinset fun d _h =>
by rw [mem_edgeFinset]; apply Dart.edge_mem]
rw [← mul_comm, sum_const_nat]
intro e h
apply G.dart_edge_fiber_card e
rwa [← mem_edgeFinset]
| [
" filter (fun d => d.toProd.1 = v) univ = image (G.dartOfNeighborSet v) univ",
" d ∈ filter (fun d => d.toProd.1 = v) univ ↔ d ∈ image (G.dartOfNeighborSet v) univ",
" d.toProd.1 = v ↔ ∃ x, ∃ (h : x ∈ G.neighborSet v), G.dartOfNeighborSet v ⟨x, h⟩ = d",
" d.toProd.1 = v → ∃ x, ∃ (h : x ∈ G.neighborSet v), G.d... | [
" filter (fun d => d.toProd.1 = v) univ = image (G.dartOfNeighborSet v) univ",
" d ∈ filter (fun d => d.toProd.1 = v) univ ↔ d ∈ image (G.dartOfNeighborSet v) univ",
" d.toProd.1 = v ↔ ∃ x, ∃ (h : x ∈ G.neighborSet v), G.dartOfNeighborSet v ⟨x, h⟩ = d",
" d.toProd.1 = v → ∃ x, ∃ (h : x ∈ G.neighborSet v), G.d... |
import Mathlib.Algebra.CharP.Basic
import Mathlib.RingTheory.Ideal.LocalRing
import Mathlib.Algebra.IsPrimePow
import Mathlib.Data.Nat.Factorization.Basic
#align_import algebra.char_p.local_ring from "leanprover-community/mathlib"@"70fd9563a21e7b963887c9360bd29b2393e6225a"
| Mathlib/Algebra/CharP/LocalRing.lean | 25 | 67 | theorem charP_zero_or_prime_power (R : Type*) [CommRing R] [LocalRing R] (q : ℕ)
[char_R_q : CharP R q] : q = 0 ∨ IsPrimePow q := by |
-- Assume `q := char(R)` is not zero.
apply or_iff_not_imp_left.2
intro q_pos
let K := LocalRing.ResidueField R
haveI RM_char := ringChar.charP K
let r := ringChar K
let n := q.factorization r
-- `r := char(R/m)` is either prime or zero:
cases' CharP.char_is_prime_or_zero K r with r_prime r_zero
· ... | [
" q = 0 ∨ IsPrimePow q",
" ¬q = 0 → IsPrimePow q",
" IsPrimePow q",
" q = r ^ n * a",
" IsUnit ↑a",
" False",
" ↑(r ^ n) = 0",
" Classical.choose ⋯ * 0 = 0",
" q = 1"
] | [] |
import Mathlib.Topology.VectorBundle.Basic
#align_import topology.vector_bundle.hom from "leanprover-community/mathlib"@"8905e5ed90859939681a725b00f6063e65096d95"
noncomputable section
open scoped Bundle
open Bundle Set ContinuousLinearMap
variable {𝕜₁ : Type*} [NontriviallyNormedField 𝕜₁] {𝕜₂ : Type*} [Non... | Mathlib/Topology/VectorBundle/Hom.lean | 92 | 112 | theorem continuousOn_continuousLinearMapCoordChange [VectorBundle 𝕜₁ F₁ E₁] [VectorBundle 𝕜₂ F₂ E₂]
[MemTrivializationAtlas e₁] [MemTrivializationAtlas e₁'] [MemTrivializationAtlas e₂]
[MemTrivializationAtlas e₂'] :
ContinuousOn (continuousLinearMapCoordChange σ e₁ e₁' e₂ e₂')
(e₁.baseSet ∩ e₂.baseS... |
have h₁ := (compSL F₁ F₂ F₂ σ (RingHom.id 𝕜₂)).continuous
have h₂ := (ContinuousLinearMap.flip (compSL F₁ F₁ F₂ (RingHom.id 𝕜₁) σ)).continuous
have h₃ := continuousOn_coordChange 𝕜₁ e₁' e₁
have h₄ := continuousOn_coordChange 𝕜₂ e₂ e₂'
refine ((h₁.comp_continuousOn (h₄.mono ?_)).clm_comp (h₂.comp_continuo... | [
" ContinuousOn (continuousLinearMapCoordChange σ e₁ e₁' e₂ e₂') (e₁.baseSet ∩ e₂.baseSet ∩ (e₁'.baseSet ∩ e₂'.baseSet))",
" e₁.baseSet ∩ e₂.baseSet ∩ (e₁'.baseSet ∩ e₂'.baseSet) ⊆ e₂.baseSet ∩ e₂'.baseSet",
" e₁.baseSet ∩ e₂.baseSet ∩ (e₁'.baseSet ∩ e₂'.baseSet) ⊆ e₁'.baseSet ∩ e₁.baseSet",
" EqOn (continuous... | [] |
import Mathlib.Algebra.Group.Defs
#align_import algebra.invertible from "leanprover-community/mathlib"@"722b3b152ddd5e0cf21c0a29787c76596cb6b422"
assert_not_exists MonoidWithZero
assert_not_exists DenselyOrdered
universe u
variable {α : Type u}
class Invertible [Mul α] [One α] (a : α) : Type u where
invOf... | Mathlib/Algebra/Group/Invertible/Defs.lean | 120 | 121 | theorem invOf_mul_self_assoc [Monoid α] (a b : α) [Invertible a] : ⅟ a * (a * b) = b := by |
rw [← mul_assoc, invOf_mul_self, one_mul]
| [
" ⅟a * (a * b) = b"
] | [
" ⅟a * (a * b) = b"
] |
import Mathlib.Data.Finset.Fold
import Mathlib.Algebra.GCDMonoid.Multiset
#align_import algebra.gcd_monoid.finset from "leanprover-community/mathlib"@"9003f28797c0664a49e4179487267c494477d853"
#align_import algebra.gcd_monoid.div from "leanprover-community/mathlib"@"b537794f8409bc9598febb79cd510b1df5f4539d"
variab... | Mathlib/Algebra/GCDMonoid/Finset.lean | 62 | 65 | theorem lcm_dvd_iff {a : α} : s.lcm f ∣ a ↔ ∀ b ∈ s, f b ∣ a := by |
apply Iff.trans Multiset.lcm_dvd
simp only [Multiset.mem_map, and_imp, exists_imp]
exact ⟨fun k b hb ↦ k _ _ hb rfl, fun k a' b hb h ↦ h ▸ k _ hb⟩
| [
" s.lcm f ∣ a ↔ ∀ b ∈ s, f b ∣ a",
" (∀ b ∈ Multiset.map f s.val, b ∣ a) ↔ ∀ b ∈ s, f b ∣ a",
" (∀ (b : α), ∀ x ∈ s.val, f x = b → b ∣ a) ↔ ∀ b ∈ s, f b ∣ a"
] | [] |
import Mathlib.FieldTheory.SeparableClosure
import Mathlib.Algebra.CharP.IntermediateField
open FiniteDimensional Polynomial IntermediateField Field
noncomputable section
universe u v w
variable (F : Type u) (E : Type v) [Field F] [Field E] [Algebra F E]
variable (K : Type w) [Field K] [Algebra F K]
section per... | Mathlib/FieldTheory/PurelyInseparable.lean | 281 | 283 | theorem mem_perfectClosure_iff_pow_mem (q : ℕ) [ExpChar F q] {x : E} :
x ∈ perfectClosure F E ↔ ∃ n : ℕ, x ^ q ^ n ∈ (algebraMap F E).range := by |
rw [mem_perfectClosure_iff, ringExpChar.eq F q]
| [
" ∀ {a b : E},\n a ∈ {x | ∃ n, x ^ ringExpChar F ^ n ∈ (algebraMap F E).range} →\n b ∈ {x | ∃ n, x ^ ringExpChar F ^ n ∈ (algebraMap F E).range} →\n a * b ∈ {x | ∃ n, x ^ ringExpChar F ^ n ∈ (algebraMap F E).range}",
" x * y ∈ {x | ∃ n, x ^ ringExpChar F ^ n ∈ (algebraMap F E).range}",
" (x * y) ... | [
" ∀ {a b : E},\n a ∈ {x | ∃ n, x ^ ringExpChar F ^ n ∈ (algebraMap F E).range} →\n b ∈ {x | ∃ n, x ^ ringExpChar F ^ n ∈ (algebraMap F E).range} →\n a * b ∈ {x | ∃ n, x ^ ringExpChar F ^ n ∈ (algebraMap F E).range}",
" x * y ∈ {x | ∃ n, x ^ ringExpChar F ^ n ∈ (algebraMap F E).range}",
" (x * y) ... |
import Mathlib.Algebra.GroupWithZero.Semiconj
import Mathlib.Algebra.Group.Commute.Units
import Mathlib.Tactic.Nontriviality
#align_import algebra.group_with_zero.commute from "leanprover-community/mathlib"@"70d50ecfd4900dd6d328da39ab7ebd516abe4025"
#align_import algebra.group_with_zero.power from "leanprover-communi... | Mathlib/Algebra/GroupWithZero/Commute.lean | 27 | 34 | theorem mul_inverse_rev' {a b : M₀} (h : Commute a b) :
inverse (a * b) = inverse b * inverse a := by |
by_cases hab : IsUnit (a * b)
· obtain ⟨⟨a, rfl⟩, b, rfl⟩ := h.isUnit_mul_iff.mp hab
rw [← Units.val_mul, inverse_unit, inverse_unit, inverse_unit, ← Units.val_mul, mul_inv_rev]
obtain ha | hb := not_and_or.mp (mt h.isUnit_mul_iff.mpr hab)
· rw [inverse_non_unit _ hab, inverse_non_unit _ ha, mul_zero]
· ... | [
" inverse (a * b) = inverse b * inverse a",
" inverse (↑a * ↑b) = inverse ↑b * inverse ↑a"
] | [] |
import Mathlib.Algebra.Polynomial.Module.Basic
import Mathlib.Algebra.Ring.Idempotents
import Mathlib.RingTheory.Ideal.LocalRing
import Mathlib.RingTheory.Noetherian
import Mathlib.RingTheory.ReesAlgebra
import Mathlib.RingTheory.Finiteness
import Mathlib.Order.Basic
import Mathlib.Order.Hom.Lattice
#align_import rin... | Mathlib/RingTheory/Filtration.lean | 67 | 71 | theorem pow_smul_le (i j : ℕ) : I ^ i • F.N j ≤ F.N (i + j) := by |
induction' i with _ ih
· simp
· rw [pow_succ', mul_smul, add_assoc, add_comm 1, ← add_assoc]
exact (smul_mono_right _ ih).trans (F.smul_le _)
| [
" I ^ i • F.N j ≤ F.N (i + j)",
" I ^ 0 • F.N j ≤ F.N (0 + j)",
" I ^ (n✝ + 1) • F.N j ≤ F.N (n✝ + 1 + j)",
" I • I ^ n✝ • F.N j ≤ F.N (n✝ + j + 1)"
] | [] |
import Mathlib.Algebra.Field.Opposite
import Mathlib.Algebra.Group.Subgroup.ZPowers
import Mathlib.Algebra.Group.Submonoid.Membership
import Mathlib.Algebra.Ring.NegOnePow
import Mathlib.Algebra.Order.Archimedean
import Mathlib.GroupTheory.Coset
#align_import algebra.periodic from "leanprover-community/mathlib"@"3041... | Mathlib/Algebra/Periodic.lean | 143 | 144 | theorem Periodic.mul_const' [DivisionSemiring α] (h : Periodic f c) (a : α) :
Periodic (fun x => f (x * a)) (c / a) := by | simpa only [div_eq_mul_inv] using h.mul_const a
| [
" Periodic (g ∘ f) c",
" (f ∘ ⇑g) (x + g_inv c) = (f ∘ ⇑g) x",
" Periodic (f * g) c",
" Periodic (f / g) c",
" Periodic l.prod c",
" Periodic [].prod c",
" Periodic (g :: l).prod c",
" ∀ f_1 ∈ List.map f s.toList, Periodic f_1 c",
" Periodic (a • f) c",
" (fun x => f (a • x)) (x + a⁻¹ • c) = (fun ... | [
" Periodic (g ∘ f) c",
" (f ∘ ⇑g) (x + g_inv c) = (f ∘ ⇑g) x",
" Periodic (f * g) c",
" Periodic (f / g) c",
" Periodic l.prod c",
" Periodic [].prod c",
" Periodic (g :: l).prod c",
" ∀ f_1 ∈ List.map f s.toList, Periodic f_1 c",
" Periodic (a • f) c",
" (fun x => f (a • x)) (x + a⁻¹ • c) = (fun ... |
import Mathlib.RingTheory.Localization.FractionRing
import Mathlib.RingTheory.Localization.Integer
import Mathlib.RingTheory.UniqueFactorizationDomain
#align_import ring_theory.localization.num_denom from "leanprover-community/mathlib"@"831c494092374cfe9f50591ed0ac81a25efc5b86"
variable {R : Type*} [CommRing R] (... | Mathlib/RingTheory/Localization/NumDen.lean | 70 | 72 | theorem mk'_num_den' (x : K) : algebraMap A K (num A x) / algebraMap A K (den A x) = x := by |
rw [← mk'_eq_div]
apply mk'_num_den
| [
" ∃ a b, IsRelPrime a ↑b ∧ mk' K a b = x",
" mk' K a' ⟨b', b'_nonzero⟩ = x",
" (algebraMap A K) (c' * b') * mk' K a' ⟨b', b'_nonzero⟩ = (algebraMap A K) (c' * b') * x",
" (algebraMap A K) c' * (algebraMap A K) b' * mk' K a' ⟨b', b'_nonzero⟩ = (algebraMap A K) c' * (algebraMap A K) b' * x",
" (algebraMap A K... | [
" ∃ a b, IsRelPrime a ↑b ∧ mk' K a b = x",
" mk' K a' ⟨b', b'_nonzero⟩ = x",
" (algebraMap A K) (c' * b') * mk' K a' ⟨b', b'_nonzero⟩ = (algebraMap A K) (c' * b') * x",
" (algebraMap A K) c' * (algebraMap A K) b' * mk' K a' ⟨b', b'_nonzero⟩ = (algebraMap A K) c' * (algebraMap A K) b' * x"
] |
import Mathlib.Data.Nat.Choose.Basic
import Mathlib.Data.Sym.Sym2
namespace List
variable {α : Type*}
section Sym2
protected def sym2 : List α → List (Sym2 α)
| [] => []
| x :: xs => (x :: xs).map (fun y => s(x, y)) ++ xs.sym2
theorem mem_sym2_cons_iff {x : α} {xs : List α} {z : Sym2 α} :
z ∈ (x :: xs)... | Mathlib/Data/List/Sym.lean | 89 | 92 | theorem mem_sym2_iff {xs : List α} {z : Sym2 α} :
z ∈ xs.sym2 ↔ ∀ y ∈ z, y ∈ xs := by |
refine z.ind (fun a b => ?_)
simp [mk_mem_sym2_iff]
| [
" z ∈ (x :: xs).sym2 ↔ z = s(x, x) ∨ (∃ y ∈ xs, z = s(x, y)) ∨ z ∈ xs.sym2",
" z = s(x, x) ∨ (∃ a ∈ xs, s(x, a) = z) ∨ z ∈ xs.sym2 ↔ z = s(x, x) ∨ (∃ y ∈ xs, z = s(x, y)) ∨ z ∈ xs.sym2",
" xs.sym2 = [] ↔ xs = []",
" [].sym2 = [] ↔ [] = []",
" (head✝ :: tail✝).sym2 = [] ↔ head✝ :: tail✝ = []",
" a ∈ xs",
... | [
" z ∈ (x :: xs).sym2 ↔ z = s(x, x) ∨ (∃ y ∈ xs, z = s(x, y)) ∨ z ∈ xs.sym2",
" z = s(x, x) ∨ (∃ a ∈ xs, s(x, a) = z) ∨ z ∈ xs.sym2 ↔ z = s(x, x) ∨ (∃ y ∈ xs, z = s(x, y)) ∨ z ∈ xs.sym2",
" xs.sym2 = [] ↔ xs = []",
" [].sym2 = [] ↔ [] = []",
" (head✝ :: tail✝).sym2 = [] ↔ head✝ :: tail✝ = []",
" a ∈ xs",
... |
import Mathlib.Algebra.Module.LinearMap.Basic
import Mathlib.LinearAlgebra.Basic
import Mathlib.LinearAlgebra.Basis
import Mathlib.LinearAlgebra.BilinearMap
#align_import linear_algebra.sesquilinear_form from "leanprover-community/mathlib"@"87c54600fe3cdc7d32ff5b50873ac724d86aef8d"
variable {R R₁ R₂ R₃ M M₁ M₂ M₃... | Mathlib/LinearAlgebra/SesquilinearForm.lean | 246 | 252 | theorem isSymm_iff_eq_flip {B : LinearMap.BilinForm R M} : B.IsSymm ↔ B = B.flip := by |
constructor <;> intro h
· ext
rw [← h, flip_apply, RingHom.id_apply]
intro x y
conv_lhs => rw [h]
rfl
| [
" IsSymm B ↔ B = flip B",
" IsSymm B → B = flip B",
" B = flip B → IsSymm B",
" B = flip B",
" (B x✝¹) x✝ = ((flip B) x✝¹) x✝",
" IsSymm B",
" (RingHom.id R) ((B x) y) = (B y) x",
"R : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nM : Type u_5\nM₁ : Type u_6\nM₂ : Type u_7\nM₃ : Type u_8\nMₗ₁... | [] |
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 | 88 | 89 | theorem rotate'_length (l : List α) : rotate' l l.length = l := by |
rw [rotate'_eq_drop_append_take le_rfl]; simp
| [
" 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.Data.Nat.Count
import Mathlib.Data.Nat.SuccPred
import Mathlib.Order.Interval.Set.Monotone
import Mathlib.Order.OrderIsoNat
#align_import data.nat.nth from "leanprover-community/mathlib"@"7fdd4f3746cb059edfdb5d52cba98f66fce418c0"
open Finset
namespace Nat
variable (p : ℕ → Prop)
noncomputable d... | Mathlib/Data/Nat/Nth.lean | 62 | 63 | theorem nth_of_card_le (hf : (setOf p).Finite) {n : ℕ} (hn : hf.toFinset.card ≤ n) :
nth p n = 0 := by | rw [nth, dif_pos hf, List.getD_eq_default]; rwa [Finset.length_sort]
| [
" ℕ",
" nth p n = 0",
" (sort (fun x x_1 => x ≤ x_1) hf.toFinset).length ≤ n"
] | [
" ℕ"
] |
import Mathlib.Algebra.Order.Group.Abs
import Mathlib.Algebra.Order.Monoid.Unbundled.MinMax
#align_import algebra.order.group.min_max from "leanprover-community/mathlib"@"10b4e499f43088dd3bb7b5796184ad5216648ab1"
section
variable {α : Type*} [Group α] [LinearOrder α] [CovariantClass α α (· * ·) (· ≤ ·)]
-- TODO... | Mathlib/Algebra/Order/Group/MinMax.lean | 63 | 64 | theorem max_div_div_right' (a b c : α) : max (a / c) (b / c) = max a b / c := by |
simpa only [div_eq_mul_inv] using max_mul_mul_right a b c⁻¹
| [
" max a 1 / max a⁻¹ 1 = a",
" max a⁻¹ 1 = a⁻¹ * max a 1",
" min (a / c) (b / c) = min a b / c",
" max (a / c) (b / c) = max a b / c"
] | [
" max a 1 / max a⁻¹ 1 = a",
" max a⁻¹ 1 = a⁻¹ * max a 1",
" min (a / c) (b / c) = min a b / c"
] |
import Mathlib.Algebra.Module.Submodule.Map
#align_import linear_algebra.basic from "leanprover-community/mathlib"@"9d684a893c52e1d6692a504a118bfccbae04feeb"
open Function
open Pointwise
variable {R : Type*} {R₁ : Type*} {R₂ : Type*} {R₃ : Type*}
variable {K : Type*}
variable {M : Type*} {M₁ : Type*} {M₂ : Type*... | Mathlib/Algebra/Module/Submodule/Ker.lean | 96 | 100 | theorem ker_sup_ker_le_ker_comp_of_commute {f g : M →ₗ[R] M} (h : Commute f g) :
ker f ⊔ ker g ≤ ker (f ∘ₗ g) := by |
refine sup_le_iff.mpr ⟨?_, ker_le_ker_comp g f⟩
rw [← mul_eq_comp, h.eq, mul_eq_comp]
exact ker_le_ker_comp f g
| [
" ker f ≤ ker (g.comp f)",
" ker f ≤ comap f (ker g)",
" ker f ⊔ ker g ≤ ker (f ∘ₗ g)",
" ker f ≤ ker (f ∘ₗ g)",
" ker f ≤ ker (g ∘ₗ f)"
] | [
" ker f ≤ ker (g.comp f)",
" ker f ≤ comap f (ker g)"
] |
import Mathlib.Analysis.NormedSpace.AddTorsorBases
#align_import analysis.convex.intrinsic from "leanprover-community/mathlib"@"f0c8bf9245297a541f468be517f1bde6195105e9"
open AffineSubspace Set
open scoped Pointwise
variable {𝕜 V W Q P : Type*}
section AddTorsor
variable (𝕜) [Ring 𝕜] [AddCommGroup V] [Modu... | Mathlib/Analysis/Convex/Intrinsic.lean | 136 | 138 | theorem intrinsicInterior_singleton (x : P) : intrinsicInterior 𝕜 ({x} : Set P) = {x} := by |
simpa only [intrinsicInterior, preimage_coe_affineSpan_singleton, interior_univ, image_univ,
Subtype.range_coe] using coe_affineSpan_singleton _ _ _
| [
" intrinsicInterior 𝕜 ∅ = ∅",
" intrinsicFrontier 𝕜 ∅ = ∅",
" intrinsicClosure 𝕜 ∅ = ∅",
" (intrinsicClosure 𝕜 s).Nonempty → s.Nonempty",
" intrinsicClosure 𝕜 s ≠ ∅ → s ≠ ∅",
" False",
" intrinsicInterior 𝕜 {x} = {x}"
] | [
" intrinsicInterior 𝕜 ∅ = ∅",
" intrinsicFrontier 𝕜 ∅ = ∅",
" intrinsicClosure 𝕜 ∅ = ∅",
" (intrinsicClosure 𝕜 s).Nonempty → s.Nonempty",
" intrinsicClosure 𝕜 s ≠ ∅ → s ≠ ∅",
" False"
] |
import Mathlib.Algebra.Algebra.Equiv
import Mathlib.LinearAlgebra.Span
#align_import algebra.algebra.tower from "leanprover-community/mathlib"@"71150516f28d9826c7341f8815b31f7d8770c212"
open Pointwise
universe u v w u₁ v₁
variable (R : Type u) (S : Type v) (A : Type w) (B : Type u₁) (M : Type v₁)
namespace IsS... | Mathlib/Algebra/Algebra/Tower.lean | 130 | 131 | theorem algebraMap_apply (x : R) : algebraMap R A x = algebraMap S A (algebraMap R S x) := by |
rw [algebraMap_eq R S A, RingHom.comp_apply]
| [
" (x • y) • z = x • y • z",
" (algebraMap R A) x = ((algebraMap S A).comp (algebraMap R S)) x",
" (algebraMap R A) x = (algebraMap S A) ((algebraMap R S) x)"
] | [
" (x • y) • z = x • y • z",
" (algebraMap R A) x = ((algebraMap S A).comp (algebraMap R S)) x"
] |
import Mathlib.Algebra.ContinuedFractions.Translations
#align_import algebra.continued_fractions.terminated_stable from "leanprover-community/mathlib"@"a7e36e48519ab281320c4d192da6a7b348ce40ad"
namespace GeneralizedContinuedFraction
variable {K : Type*} {g : GeneralizedContinuedFraction K} {n m : ℕ}
theorem te... | Mathlib/Algebra/ContinuedFractions/TerminatedStable.lean | 45 | 58 | theorem convergents'Aux_stable_step_of_terminated {s : Stream'.Seq <| Pair K}
(terminated_at_n : s.TerminatedAt n) : convergents'Aux s (n + 1) = convergents'Aux s n := by |
change s.get? n = none at terminated_at_n
induction n generalizing s with
| zero => simp only [convergents'Aux, terminated_at_n, Stream'.Seq.head]
| succ n IH =>
cases s_head_eq : s.head with
| none => simp only [convergents'Aux, s_head_eq]
| some gp_head =>
have : s.tail.TerminatedAt n := by... | [
" g.continuantsAux (n + 2) = g.continuantsAux (n + 1)",
" g.continuantsAux m = g.continuantsAux (n + 1)",
" g.continuantsAux (k + 1) = g.continuantsAux (n + 1)",
" g.continuantsAux (n + k + 1 + 1) = g.continuantsAux (n + 1)",
" g.TerminatedAt (n + k)",
" convergents'Aux s (n + 1) = convergents'Aux s n",
... | [
" g.continuantsAux (n + 2) = g.continuantsAux (n + 1)",
" g.continuantsAux m = g.continuantsAux (n + 1)",
" g.continuantsAux (k + 1) = g.continuantsAux (n + 1)",
" g.continuantsAux (n + k + 1 + 1) = g.continuantsAux (n + 1)",
" g.TerminatedAt (n + k)"
] |
import Mathlib.Algebra.ModEq
import Mathlib.Algebra.Module.Defs
import Mathlib.Algebra.Order.Archimedean
import Mathlib.Algebra.Periodic
import Mathlib.Data.Int.SuccPred
import Mathlib.GroupTheory.QuotientGroup
import Mathlib.Order.Circular
import Mathlib.Data.List.TFAE
import Mathlib.Data.Set.Lattice
#align_import a... | Mathlib/Algebra/Order/ToIntervalMod.lean | 128 | 129 | theorem toIocDiv_zsmul_sub_self (a b : α) : toIocDiv hp a b • p - b = -toIocMod hp a b := by |
rw [toIocMod, neg_sub]
| [
" toIcoMod hp 0 b ∈ Set.Ico 0 p",
" p = 0 + p",
" toIcoDiv hp a b • p - b = -toIcoMod hp a b",
" toIocDiv hp a b • p - b = -toIocMod hp a b"
] | [
" toIcoMod hp 0 b ∈ Set.Ico 0 p",
" p = 0 + p",
" toIcoDiv hp a b • p - b = -toIcoMod hp a b"
] |
import Mathlib.Algebra.Homology.Homotopy
import Mathlib.AlgebraicTopology.DoldKan.Notations
#align_import algebraic_topology.dold_kan.homotopies from "leanprover-community/mathlib"@"b12099d3b7febf4209824444dd836ef5ad96db55"
open CategoryTheory CategoryTheory.Category CategoryTheory.Limits CategoryTheory.Preadditi... | Mathlib/AlgebraicTopology/DoldKan/Homotopies.lean | 111 | 119 | theorem hσ'_eq {q n a m : ℕ} (ha : n = a + q) (hnm : c.Rel m n) :
(hσ' q n m hnm : X _[n] ⟶ X _[m]) =
((-1 : ℤ) ^ a • X.σ ⟨a, Nat.lt_succ_iff.mpr (Nat.le.intro (Eq.symm ha))⟩) ≫
eqToHom (by congr) := by |
simp only [hσ', hσ]
split_ifs
· omega
· have h' := tsub_eq_of_eq_add ha
congr
| [
" ¬c.Rel 0 j",
" False",
" j.succ ≤ 0",
" X _[n + 1] = K[X].X m",
" hσ' q n m hnm = 0",
" (if n < q then 0 else (-1) ^ (n - q) • X.σ ⟨n - q, ⋯⟩) ≫ eqToHom ⋯ = 0",
" 0 ≫ eqToHom ⋯ = 0",
" hσ' q n m hnm = ((-1) ^ a • X.σ ⟨a, ⋯⟩) ≫ eqToHom ⋯",
" (if n < q then 0 else (-1) ^ (n - q) • X.σ ⟨n - q, ⋯⟩) ≫ ... | [
" ¬c.Rel 0 j",
" False",
" j.succ ≤ 0",
" X _[n + 1] = K[X].X m",
" hσ' q n m hnm = 0",
" (if n < q then 0 else (-1) ^ (n - q) • X.σ ⟨n - q, ⋯⟩) ≫ eqToHom ⋯ = 0",
" 0 ≫ eqToHom ⋯ = 0"
] |
import Mathlib.Algebra.Group.Equiv.Basic
import Mathlib.Data.ENat.Lattice
import Mathlib.Data.Part
import Mathlib.Tactic.NormNum
#align_import data.nat.part_enat from "leanprover-community/mathlib"@"3ff3f2d6a3118b8711063de7111a0d77a53219a8"
open Part hiding some
def PartENat : Type :=
Part ℕ
#align part_enat ... | Mathlib/Data/Nat/PartENat.lean | 184 | 185 | theorem get_natCast' (x : ℕ) (h : (x : PartENat).Dom) : get (x : PartENat) h = x := by |
rw [← natCast_inj, natCast_get]
| [
" ∀ (a : PartENat), P ⊤ → (∀ (n : ℕ), P ↑n) → P a",
" x + ⊤ = ⊤",
" ↑(x.get h) = x",
" (↑x).get h = x"
] | [
" ∀ (a : PartENat), P ⊤ → (∀ (n : ℕ), P ↑n) → P a",
" x + ⊤ = ⊤",
" ↑(x.get h) = x"
] |
import Mathlib.Analysis.InnerProductSpace.Orientation
import Mathlib.MeasureTheory.Measure.Lebesgue.EqHaar
#align_import measure_theory.measure.haar.inner_product_space from "leanprover-community/mathlib"@"fd5edc43dc4f10b85abfe544b88f82cf13c5f844"
open FiniteDimensional MeasureTheory MeasureTheory.Measure Set
var... | Mathlib/MeasureTheory/Measure/Haar/InnerProductSpace.lean | 84 | 89 | theorem OrthonormalBasis.measurePreserving_measurableEquiv (b : OrthonormalBasis ι ℝ F) :
MeasurePreserving b.measurableEquiv volume volume := by |
convert (b.measurableEquiv.symm.measurable.measurePreserving _).symm
rw [← (EuclideanSpace.basisFun ι ℝ).addHaar_eq_volume]
erw [MeasurableEquiv.coe_toEquiv_symm, Basis.map_addHaar _ b.repr.symm.toContinuousLinearEquiv]
exact b.addHaar_eq_volume.symm
| [
" o.volumeForm.measure (parallelepiped ⇑b) = 1",
" ι ≃ Fin n",
" Fintype.card ι = n",
" ⇑b = ⇑(b.reindex e) ∘ ⇑e",
" b x = (⇑(b.reindex e) ∘ ⇑e) x",
" o.volumeForm.measure = volume",
" addHaarMeasure (stdOrthonormalBasis ℝ F).toBasis.parallelepiped = volume",
" volume (parallelepiped ⇑b) = 1",
" b.t... | [
" o.volumeForm.measure (parallelepiped ⇑b) = 1",
" ι ≃ Fin n",
" Fintype.card ι = n",
" ⇑b = ⇑(b.reindex e) ∘ ⇑e",
" b x = (⇑(b.reindex e) ∘ ⇑e) x",
" o.volumeForm.measure = volume",
" addHaarMeasure (stdOrthonormalBasis ℝ F).toBasis.parallelepiped = volume",
" volume (parallelepiped ⇑b) = 1",
" b.t... |
import Mathlib.LinearAlgebra.Matrix.NonsingularInverse
#align_import linear_algebra.symplectic_group from "leanprover-community/mathlib"@"70fd9563a21e7b963887c9360bd29b2393e6225a"
open Matrix
variable {l R : Type*}
namespace Matrix
variable (l) [DecidableEq l] (R) [CommRing R]
section JMatrixLemmas
def J : ... | Mathlib/LinearAlgebra/SymplecticGroup.lean | 43 | 46 | theorem J_transpose : (J l R)ᵀ = -J l R := by |
rw [J, fromBlocks_transpose, ← neg_one_smul R (fromBlocks _ _ _ _ : Matrix (l ⊕ l) (l ⊕ l) R),
fromBlocks_smul, Matrix.transpose_zero, Matrix.transpose_one, transpose_neg]
simp [fromBlocks]
| [
" (J l R)ᵀ = -J l R",
" fromBlocks 0 1 (-1ᵀ) 0 = (-1 • 0).fromBlocks (-1 • -1) (-1 • 1) (-1 • 0)"
] | [] |
import Mathlib.Algebra.Group.Support
import Mathlib.Data.Set.Pointwise.SMul
#align_import data.set.pointwise.support from "leanprover-community/mathlib"@"f7fc89d5d5ff1db2d1242c7bb0e9062ce47ef47c"
open Pointwise
open Function Set
section GroupWithZero
variable {α β γ : Type*} [GroupWithZero α] [MulAction α β]
... | Mathlib/Data/Set/Pointwise/Support.lean | 56 | 59 | theorem support_comp_inv_smul₀ [Zero γ] {c : α} (hc : c ≠ 0) (f : β → γ) :
(support fun x ↦ f (c⁻¹ • x)) = c • support f := by |
ext x
simp only [mem_smul_set_iff_inv_smul_mem₀ hc, mem_support]
| [
" (mulSupport fun x => f (c⁻¹ • x)) = c • mulSupport f",
" (x ∈ mulSupport fun x => f (c⁻¹ • x)) ↔ x ∈ c • mulSupport f",
" (support fun x => f (c⁻¹ • x)) = c • support f",
" (x ∈ support fun x => f (c⁻¹ • x)) ↔ x ∈ c • support f"
] | [
" (mulSupport fun x => f (c⁻¹ • x)) = c • mulSupport f",
" (x ∈ mulSupport fun x => f (c⁻¹ • x)) ↔ x ∈ c • mulSupport f"
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.