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 |
|---|---|---|---|---|---|---|
import Mathlib.Analysis.Complex.UpperHalfPlane.Basic
import Mathlib.LinearAlgebra.GeneralLinearGroup
import Mathlib.LinearAlgebra.Matrix.GeneralLinearGroup
import Mathlib.Topology.Instances.Matrix
import Mathlib.Topology.Algebra.Module.FiniteDimension
#align_import number_theory.modular from "leanprover-community/mat... | Mathlib/NumberTheory/Modular.lean | 94 | 104 | theorem bottom_row_surj {R : Type*} [CommRing R] :
Set.SurjOn (fun g : SL(2, R) => (↑g : Matrix (Fin 2) (Fin 2) R) 1) Set.univ
{cd | IsCoprime (cd 0) (cd 1)} := by |
rintro cd ⟨b₀, a, gcd_eqn⟩
let A := of ![![a, -b₀], cd]
have det_A_1 : det A = 1 := by
convert gcd_eqn
rw [det_fin_two]
simp [A, (by ring : a * cd 1 + b₀ * cd 0 = b₀ * cd 0 + a * cd 1)]
refine ⟨⟨A, det_A_1⟩, Set.mem_univ _, ?_⟩
ext; simp [A]
| [
" IsCoprime (↑g 1 0) (↑g 1 1)",
" -↑g 0 1 * ↑g 1 0 + ↑g 0 0 * ↑g 1 1 = 1",
" (↑g).det = 1",
" Set.SurjOn (fun g => ↑g 1) Set.univ {cd | IsCoprime (cd 0) (cd 1)}",
" cd ∈ (fun g => ↑g 1) '' Set.univ",
" A.det = 1",
" A.det = b₀ * cd 0 + a * cd 1",
" A 0 0 * A 1 1 - A 0 1 * A 1 0 = b₀ * cd 0 + a * cd 1"... |
import Mathlib.LinearAlgebra.Dimension.Free
import Mathlib.Algebra.Module.Torsion
#align_import linear_algebra.dimension from "leanprover-community/mathlib"@"47a5f8186becdbc826190ced4312f8199f9db6a5"
noncomputable section
universe u v v' u₁' w w'
variable {R S : Type u} {M : Type v} {M' : Type v'} {M₁ : Type v}... | Mathlib/LinearAlgebra/Dimension/Constructions.lean | 219 | 220 | theorem rank_matrix'' (m n : Type u) [Finite m] [Finite n] :
Module.rank R (Matrix m n R) = #m * #n := by | simp
| [
" Module.rank R (ι →₀ M) = lift.{v, w} #ι * lift.{w, v} (Module.rank R M)",
" Module.rank R (ι →₀ M) = #ι * Module.rank R M",
" Module.rank R (ι →₀ R) = lift.{u, w} #ι",
" Module.rank R (ι →₀ R) = #ι",
" Module.rank R (⨁ (i : ι), M i) = sum fun i => Module.rank R (M i)",
" Module.rank R (Matrix m n R) = l... |
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 | 353 | 355 | theorem mul_inv_le_inv_mul_iff : a * b⁻¹ ≤ d⁻¹ * c ↔ d * a ≤ c * b := by |
rw [← mul_le_mul_iff_left d, ← mul_le_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⁻¹ ≤ d⁻¹ * c ↔ d * a ≤ c * b"
] |
import Mathlib.Algebra.MonoidAlgebra.Degree
import Mathlib.Algebra.MvPolynomial.Rename
import Mathlib.Algebra.Order.BigOperators.Ring.Finset
#align_import data.mv_polynomial.variables from "leanprover-community/mathlib"@"2f5b500a507264de86d666a5f87ddb976e2d8de4"
noncomputable section
open Set Function Finsupp Ad... | Mathlib/Algebra/MvPolynomial/Degrees.lean | 149 | 150 | theorem degrees_pow (p : MvPolynomial σ R) (n : ℕ) : (p ^ n).degrees ≤ n • p.degrees := by |
simpa using degrees_prod (Finset.range n) fun _ ↦ p
| [
" p.degrees = p.support.sup fun s => toMultiset s",
" (p.support.sup fun s => toMultiset s) = p.support.sup fun s => toMultiset s",
" ((monomial s) a).degrees ≤ toMultiset s",
" (if a = 0 then ⊥ else toMultiset s) ≤ toMultiset s",
" toMultiset s ≤ toMultiset s",
" ((monomial s) a).degrees = toMultiset s",... |
import Mathlib.Algebra.Order.Group.Abs
import Mathlib.Algebra.Order.Group.Basic
import Mathlib.Algebra.Order.Group.OrderIso
import Mathlib.Algebra.Order.Ring.Defs
import Mathlib.Data.Int.Cast.Lemmas
import Mathlib.Order.Interval.Set.Basic
import Mathlib.Logic.Pairwise
#align_import data.set.intervals.group from "lean... | Mathlib/Algebra/Order/Interval/Set/Group.lean | 188 | 200 | theorem pairwise_disjoint_Ico_mul_zpow :
Pairwise (Disjoint on fun n : ℤ => Ico (a * b ^ n) (a * b ^ (n + 1))) := by |
simp (config := { unfoldPartialApp := true }) only [Function.onFun]
simp_rw [Set.disjoint_iff]
intro m n hmn x hx
apply hmn
have hb : 1 < b := by
have : a * b ^ m < a * b ^ (m + 1) := hx.1.1.trans_lt hx.1.2
rwa [mul_lt_mul_iff_left, ← mul_one (b ^ m), zpow_add_one, mul_lt_mul_iff_left] at this
have... | [
" Pairwise (Disjoint on fun n => Ioc (a * b ^ n) (a * b ^ (n + 1)))",
" Pairwise fun x y => Disjoint (Ioc (a * b ^ x) (a * b ^ (x + 1))) (Ioc (a * b ^ y) (a * b ^ (y + 1)))",
" Pairwise fun x y => Ioc (a * b ^ x) (a * b ^ (x + 1)) ∩ Ioc (a * b ^ y) (a * b ^ (y + 1)) ⊆ ∅",
" x ∈ ∅",
" m = n",
" 1 < b",
"... |
import Mathlib.Algebra.MvPolynomial.Rename
#align_import data.mv_polynomial.comap from "leanprover-community/mathlib"@"aba31c938d3243cc671be7091b28a1e0814647ee"
namespace MvPolynomial
variable {σ : Type*} {τ : Type*} {υ : Type*} {R : Type*} [CommSemiring R]
noncomputable def comap (f : MvPolynomial σ R →ₐ[R] M... | Mathlib/Algebra/MvPolynomial/Comap.lean | 55 | 57 | theorem comap_id : comap (AlgHom.id R (MvPolynomial σ R)) = id := by |
funext x
exact comap_id_apply x
| [
" comap (AlgHom.id R (MvPolynomial σ R)) x = x",
" comap (AlgHom.id R (MvPolynomial σ R)) x i = x i",
" comap (AlgHom.id R (MvPolynomial σ R)) = id",
" comap (AlgHom.id R (MvPolynomial σ R)) x = id x"
] |
import Mathlib.Algebra.Order.Hom.Ring
import Mathlib.Algebra.Order.Pointwise
import Mathlib.Analysis.SpecialFunctions.Pow.Real
#align_import algebra.order.complete_field from "leanprover-community/mathlib"@"0b9eaaa7686280fad8cce467f5c3c57ee6ce77f8"
variable {F α β γ : Type*}
noncomputable section
open Function ... | Mathlib/Algebra/Order/CompleteField.lean | 121 | 127 | theorem cutMap_self (a : α) : cutMap α a = Iio a ∩ range (Rat.cast : ℚ → α) := by |
ext
constructor
· rintro ⟨q, h, rfl⟩
exact ⟨h, q, rfl⟩
· rintro ⟨h, q, rfl⟩
exact ⟨q, h, rfl⟩
| [
" ∀ (x : α), ∃ n, x < ↑n",
" False",
" cutMap α a = Iio a ∩ range Rat.cast",
" x✝ ∈ cutMap α a ↔ x✝ ∈ Iio a ∩ range Rat.cast",
" x✝ ∈ cutMap α a → x✝ ∈ Iio a ∩ range Rat.cast",
" ↑q ∈ Iio a ∩ range Rat.cast",
" x✝ ∈ Iio a ∩ range Rat.cast → x✝ ∈ cutMap α a",
" ↑q ∈ cutMap α a"
] |
import Mathlib.Analysis.InnerProductSpace.Basic
import Mathlib.LinearAlgebra.SesquilinearForm
#align_import analysis.inner_product_space.orthogonal from "leanprover-community/mathlib"@"f0c8bf9245297a541f468be517f1bde6195105e9"
variable {𝕜 E F : Type*} [RCLike 𝕜]
variable [NormedAddCommGroup E] [InnerProductSpace... | Mathlib/Analysis/InnerProductSpace/Orthogonal.lean | 68 | 69 | theorem inner_left_of_mem_orthogonal {u v : E} (hu : u ∈ K) (hv : v ∈ Kᗮ) : ⟪v, u⟫ = 0 := by |
rw [inner_eq_zero_symm]; exact inner_right_of_mem_orthogonal hu hv
| [
" ⟪u, a✝ + b✝⟫_𝕜 = 0",
" ⟪u, c • x⟫_𝕜 = 0",
" v ∈ Kᗮ ↔ ∀ u ∈ K, ⟪v, u⟫_𝕜 = 0",
" ⟪v, u⟫_𝕜 = 0",
" ⟪u, v⟫_𝕜 = 0"
] |
import Mathlib.Analysis.Calculus.ContDiff.Basic
import Mathlib.Analysis.Calculus.UniformLimitsDeriv
import Mathlib.Topology.Algebra.InfiniteSum.Module
import Mathlib.Analysis.NormedSpace.FunctionSeries
#align_import analysis.calculus.series from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982... | Mathlib/Analysis/Calculus/SmoothSeries.lean | 43 | 54 | theorem summable_of_summable_hasFDerivAt_of_isPreconnected (hu : Summable u) (hs : IsOpen s)
(h's : IsPreconnected s) (hf : ∀ n x, x ∈ s → HasFDerivAt (f n) (f' n x) x)
(hf' : ∀ n x, x ∈ s → ‖f' n x‖ ≤ u n) (hx₀ : x₀ ∈ s) (hf0 : Summable (f · x₀))
(hx : x ∈ s) : Summable fun n => f n x := by |
haveI := Classical.decEq α
rw [summable_iff_cauchySeq_finset] at hf0 ⊢
have A : UniformCauchySeqOn (fun t : Finset α => fun x => ∑ i ∈ t, f' i x) atTop s :=
(tendstoUniformlyOn_tsum hu hf').uniformCauchySeqOn
-- Porting note: Lean 4 failed to find `f` by unification
refine cauchy_map_of_uniformCauchySeqO... | [
" Summable fun n => f n x",
" CauchySeq fun s => ∑ b ∈ s, f b x",
" HasFDerivAt ((fun t x => ∑ i ∈ t, f i x) t) (∑ i ∈ t, f' i y) y"
] |
import Mathlib.Data.Set.Lattice
#align_import order.concept from "leanprover-community/mathlib"@"1e05171a5e8cf18d98d9cf7b207540acb044acae"
open Function OrderDual Set
variable {ι : Sort*} {α β γ : Type*} {κ : ι → Sort*} (r : α → β → Prop) {s s₁ s₂ : Set α}
{t t₁ t₂ : Set β}
def intentClosure (s : Set α) :... | Mathlib/Order/Concept.lean | 188 | 193 | theorem ext' (h : c.snd = d.snd) : c = d := by |
obtain ⟨⟨s₁, t₁⟩, _, h₁⟩ := c
obtain ⟨⟨s₂, t₂⟩, _, h₂⟩ := d
dsimp at h₁ h₂ h
substs h h₁ h₂
rfl
| [
" c = d",
" { toProd := (s₁, t₁), closure_fst := h₁, closure_snd := closure_snd✝ } = d",
" { toProd := (s₁, t₁), closure_fst := h₁, closure_snd := closure_snd✝¹ } =\n { toProd := (s₂, t₂), closure_fst := h₂, closure_snd := closure_snd✝ }",
" { toProd := (s₁, intentClosure r s₁), closure_fst := ⋯, closure_s... |
import Mathlib.Init.Data.Ordering.Basic
import Mathlib.Order.Synonym
#align_import order.compare from "leanprover-community/mathlib"@"c4658a649d216f57e99621708b09dcb3dcccbd23"
variable {α β : Type*}
def cmpLE {α} [LE α] [@DecidableRel α (· ≤ ·)] (x y : α) : Ordering :=
if x ≤ y then if y ≤ x then Ordering.eq ... | Mathlib/Order/Compare.lean | 34 | 37 | theorem cmpLE_swap {α} [LE α] [IsTotal α (· ≤ ·)] [@DecidableRel α (· ≤ ·)] (x y : α) :
(cmpLE x y).swap = cmpLE y x := by |
by_cases xy:x ≤ y <;> by_cases yx:y ≤ x <;> simp [cmpLE, *, Ordering.swap]
cases not_or_of_not xy yx (total_of _ _ _)
| [
" (cmpLE x y).swap = cmpLE y x",
" False"
] |
import Mathlib.Data.Matrix.Basic
import Mathlib.LinearAlgebra.Matrix.Trace
#align_import data.matrix.basis from "leanprover-community/mathlib"@"320df450e9abeb5fc6417971e75acb6ae8bc3794"
variable {l m n : Type*}
variable {R α : Type*}
namespace Matrix
open Matrix
variable [DecidableEq l] [DecidableEq m] [Decida... | Mathlib/Data/Matrix/Basis.lean | 85 | 94 | theorem std_basis_eq_basis_mul_basis (i : m) (j : n) :
stdBasisMatrix i j (1 : α) =
vecMulVec (fun i' => ite (i = i') 1 0) fun j' => ite (j = j') 1 0 := by |
ext i' j'
-- Porting note: was `norm_num [std_basis_matrix, vec_mul_vec]` though there are no numerals
-- involved.
simp only [stdBasisMatrix, vecMulVec, mul_ite, mul_one, mul_zero, of_apply]
-- Porting note: added next line
simp_rw [@and_comm (i = i')]
exact ite_and _ _ _ _
| [
" r • stdBasisMatrix i j a = stdBasisMatrix i j (r • a)",
" (r • fun i' j' => if i = i' ∧ j = j' then a else 0) = fun i' j' => if i = i' ∧ j = j' then r • a else 0",
" (r • fun i' j' => if i = i' ∧ j = j' then a else 0) i✝ j✝ = if i = i✝ ∧ j = j✝ then r • a else 0",
" stdBasisMatrix i j 0 = 0",
" (fun i' j'... |
import Mathlib.Data.ZMod.Quotient
import Mathlib.GroupTheory.NoncommPiCoprod
import Mathlib.GroupTheory.OrderOfElement
import Mathlib.Algebra.GCDMonoid.Finset
import Mathlib.Algebra.GCDMonoid.Nat
import Mathlib.Data.Nat.Factorization.Basic
import Mathlib.Tactic.ByContra
import Mathlib.Tactic.Peel
#align_import group_... | Mathlib/GroupTheory/Exponent.lean | 94 | 97 | theorem _root_.MulOpposite.exponent : exponent (MulOpposite G) = exponent G := by |
simp only [Monoid.exponent, ExponentExists]
congr!
all_goals exact ⟨(op_injective <| · <| op ·), (unop_injective <| · <| unop ·)⟩
| [
" Monoid.exponent Gᵐᵒᵖ = Monoid.exponent G",
" (if h : ∃ n, 0 < n ∧ ∀ (g : Gᵐᵒᵖ), g ^ n = 1 then Nat.find h else 0) =\n if h : ∃ n, 0 < n ∧ ∀ (g : G), g ^ n = 1 then Nat.find h else 0",
" (∀ (g : Gᵐᵒᵖ), g ^ x✝ = 1) ↔ ∀ (g : G), g ^ x✝ = 1"
] |
import Mathlib.Algebra.BigOperators.Group.Finset
import Mathlib.Data.List.MinMax
import Mathlib.Algebra.Tropical.Basic
import Mathlib.Order.ConditionallyCompleteLattice.Finset
#align_import algebra.tropical.big_operators from "leanprover-community/mathlib"@"d6fad0e5bf2d6f48da9175d25c3dc5706b3834ce"
variable {R S :... | Mathlib/Algebra/Tropical/BigOperators.lean | 126 | 130 | theorem untrop_sum_eq_sInf_image [ConditionallyCompleteLinearOrder R] (s : Finset S)
(f : S → Tropical (WithTop R)) : untrop (∑ i ∈ s, f i) = sInf (untrop ∘ f '' s) := by |
rcases s.eq_empty_or_nonempty with (rfl | h)
· simp only [Set.image_empty, coe_empty, sum_empty, WithTop.sInf_empty, untrop_zero]
· rw [← inf'_eq_csInf_image _ h, inf'_eq_inf, Finset.untrop_sum']
| [
" trop l.sum = (map trop l).prod",
" trop [].sum = (map trop []).prod",
" trop (hd :: tl).sum = (map trop (hd :: tl)).prod",
" ∀ (a : List R), trop (sum ⟦a⟧) = (map trop ⟦a⟧).prod",
" trop (∑ i ∈ s, f i) = ∏ i ∈ s, trop (f i)",
" ∏ i ∈ s, trop (f i) = (Multiset.map trop (Multiset.map f s.val)).prod",
" ... |
import Mathlib.Algebra.BigOperators.Intervals
import Mathlib.Algebra.BigOperators.Ring.List
import Mathlib.Data.Int.ModEq
import Mathlib.Data.Nat.Bits
import Mathlib.Data.Nat.Log
import Mathlib.Data.List.Indexes
import Mathlib.Data.List.Palindrome
import Mathlib.Tactic.IntervalCases
import Mathlib.Tactic.Linarith
impo... | Mathlib/Data/Nat/Digits.lean | 143 | 153 | theorem digits_add (b : ℕ) (h : 1 < b) (x y : ℕ) (hxb : x < b) (hxy : x ≠ 0 ∨ y ≠ 0) :
digits b (x + b * y) = x :: digits b y := by |
rcases Nat.exists_eq_add_of_le' h with ⟨b, rfl : _ = _ + 2⟩
cases y
· simp [hxb, hxy.resolve_right (absurd rfl)]
dsimp [digits]
rw [digitsAux_def]
· congr
· simp [Nat.add_mod, mod_eq_of_lt hxb]
· simp [add_mul_div_left, div_eq_of_lt hxb]
· apply Nat.succ_pos
| [
" (invImage (fun x => x) instWellFoundedRelationOfSizeOf).1 ((n + 1) / b) n.succ",
" b.digitsAux h 0 = []",
" b.digitsAux h n = n % b :: b.digitsAux h (n / b)",
" b.digitsAux h 0 = 0 % b :: b.digitsAux h (0 / b)",
" b.digitsAux h (n✝ + 1) = (n✝ + 1) % b :: b.digitsAux h ((n✝ + 1) / b)",
" 2 ≤ b + 2",
" ... |
import Mathlib.RingTheory.HahnSeries.Multiplication
import Mathlib.RingTheory.PowerSeries.Basic
import Mathlib.Data.Finsupp.PWO
#align_import ring_theory.hahn_series from "leanprover-community/mathlib"@"a484a7d0eade4e1268f4fb402859b6686037f965"
set_option linter.uppercaseLean3 false
open Finset Function
open sco... | Mathlib/RingTheory/HahnSeries/PowerSeries.lean | 145 | 147 | theorem ofPowerSeries_X_pow {R} [Semiring R] (n : ℕ) :
ofPowerSeries Γ R (PowerSeries.X ^ n) = single (n : Γ) 1 := by |
simp
| [
" (fun f => { coeff := fun n => (PowerSeries.coeff R n) f, isPWO_support' := ⋯ })\n ((fun f => PowerSeries.mk f.coeff) f) =\n f",
" ((fun f => { coeff := fun n => (PowerSeries.coeff R n) f, isPWO_support' := ⋯ })\n ((fun f => PowerSeries.mk f.coeff) f)).coeff\n x✝ =\n f.coeff x✝",
" (fu... |
import Mathlib.Algebra.DirectSum.Internal
import Mathlib.Algebra.GradedMonoid
import Mathlib.Algebra.MvPolynomial.CommRing
import Mathlib.Algebra.MvPolynomial.Equiv
import Mathlib.Algebra.MvPolynomial.Variables
import Mathlib.RingTheory.MvPolynomial.WeightedHomogeneous
import Mathlib.Algebra.Polynomial.Roots
#align_i... | Mathlib/RingTheory/MvPolynomial/Homogeneous.lean | 45 | 47 | theorem weightedDegree_one (d : σ →₀ ℕ) :
weightedDegree 1 d = degree d := by |
simp [weightedDegree, degree, Finsupp.total, Finsupp.sum]
| [
" (weightedDegree 1) d = degree d"
] |
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 | 113 | 115 | theorem le_inv_mul_iff_mul_le : b ≤ a⁻¹ * c ↔ a * b ≤ c := by |
rw [← mul_le_mul_iff_left a]
simp
| [
" b ≤ c",
" a⁻¹ ≤ 1 ↔ 1 ≤ a",
" a * a⁻¹ ≤ a * 1 ↔ 1 ≤ a",
" 1 ≤ a⁻¹ ↔ a ≤ 1",
" a * 1 ≤ a * a⁻¹ ↔ a ≤ 1",
" b ≤ a⁻¹ * c ↔ a * b ≤ c",
" a * b ≤ a * (a⁻¹ * c) ↔ a * b ≤ c"
] |
import Mathlib.NumberTheory.LegendreSymbol.Basic
import Mathlib.NumberTheory.LegendreSymbol.QuadraticChar.GaussSum
#align_import number_theory.legendre_symbol.quadratic_reciprocity from "leanprover-community/mathlib"@"5b2fe80501ff327b9109fb09b7cc8c325cd0d7d9"
open Nat
section Values
variable {p : ℕ} [Fact p.Pri... | Mathlib/NumberTheory/LegendreSymbol/QuadraticReciprocity.lean | 78 | 85 | theorem exists_sq_eq_two_iff : IsSquare (2 : ZMod p) ↔ p % 8 = 1 ∨ p % 8 = 7 := by |
rw [FiniteField.isSquare_two_iff, card p]
have h₁ := Prime.mod_two_eq_one_iff_ne_two.mpr hp
rw [← mod_mod_of_dvd p (by decide : 2 ∣ 8)] at h₁
have h₂ := mod_lt p (by norm_num : 0 < 8)
revert h₂ h₁
generalize p % 8 = m; clear! p
intros; interval_cases m <;> simp_all -- Porting note (#11043): was `decide!`... | [
" IsSquare 2 ↔ p % 8 = 1 ∨ p % 8 = 7",
" p % 8 ≠ 3 ∧ p % 8 ≠ 5 ↔ p % 8 = 1 ∨ p % 8 = 7",
" 2 ∣ 8",
" 0 < 8",
" p % 8 % 2 = 1 → p % 8 < 8 → (p % 8 ≠ 3 ∧ p % 8 ≠ 5 ↔ p % 8 = 1 ∨ p % 8 = 7)",
" m % 2 = 1 → m < 8 → (m ≠ 3 ∧ m ≠ 5 ↔ m = 1 ∨ m = 7)",
" m ≠ 3 ∧ m ≠ 5 ↔ m = 1 ∨ m = 7",
" 0 ≠ 3 ∧ 0 ≠ 5 ↔ 0 = 1... |
import Mathlib.Geometry.Euclidean.Inversion.Basic
import Mathlib.Geometry.Euclidean.PerpBisector
open Metric Function AffineMap Set AffineSubspace
open scoped Topology
variable {V P : Type*} [NormedAddCommGroup V] [InnerProductSpace ℝ V] [MetricSpace P]
[NormedAddTorsor V P] {c x y : P} {R : ℝ}
namespace Euclid... | Mathlib/Geometry/Euclidean/Inversion/ImageHyperplane.lean | 37 | 42 | theorem inversion_mem_perpBisector_inversion_iff (hR : R ≠ 0) (hx : x ≠ c) (hy : y ≠ c) :
inversion c R x ∈ perpBisector c (inversion c R y) ↔ dist x y = dist y c := by |
rw [mem_perpBisector_iff_dist_eq, dist_inversion_inversion hx hy, dist_inversion_center]
have hx' := dist_ne_zero.2 hx
have hy' := dist_ne_zero.2 hy
field_simp [mul_assoc, mul_comm, hx, hx.symm, eq_comm]
| [
" inversion c R x ∈ perpBisector c (inversion c R y) ↔ dist x y = dist y c",
" R ^ 2 / dist x c = R ^ 2 / (dist x c * dist y c) * dist x y ↔ dist x y = dist y c"
] |
import Mathlib.Data.Sigma.Basic
import Mathlib.Algebra.Order.Ring.Nat
#align_import set_theory.lists from "leanprover-community/mathlib"@"497d1e06409995dd8ec95301fa8d8f3480187f4c"
variable {α : Type*}
inductive Lists'.{u} (α : Type u) : Bool → Type u
| atom : α → Lists' α false
| nil : Lists' α true
| con... | Mathlib/SetTheory/Lists.lean | 88 | 88 | theorem toList_cons (a : Lists α) (l) : toList (cons a l) = a :: l.toList := by | simp
| [
" (cons a l).toList = a :: l.toList"
] |
import Mathlib.Analysis.Convex.Basic
import Mathlib.Order.Closure
#align_import analysis.convex.hull from "leanprover-community/mathlib"@"92bd7b1ffeb306a89f450bee126ddd8a284c259d"
open Set
open Pointwise
variable {𝕜 E F : Type*}
section convexHull
section OrderedSemiring
variable [OrderedSemiring 𝕜]
secti... | Mathlib/Analysis/Convex/Hull.lean | 56 | 57 | theorem convexHull_eq_iInter : convexHull 𝕜 s = ⋂ (t : Set E) (_ : s ⊆ t) (_ : Convex 𝕜 t), t := by |
simp [convexHull, iInter_subtype, iInter_and]
| [
" (convexHull 𝕜) s = ⋂ t, ⋂ (_ : s ⊆ t), ⋂ (_ : Convex 𝕜 t), t"
] |
import Batteries.Tactic.SeqFocus
namespace Ordering
@[simp] theorem swap_swap {o : Ordering} : o.swap.swap = o := by cases o <;> rfl
@[simp] theorem swap_inj {o₁ o₂ : Ordering} : o₁.swap = o₂.swap ↔ o₁ = o₂ :=
⟨fun h => by simpa using congrArg swap h, congrArg _⟩
theorem swap_then (o₁ o₂ : Ordering) : (o₁.then... | .lake/packages/batteries/Batteries/Classes/Order.lean | 20 | 21 | theorem then_eq_lt {o₁ o₂ : Ordering} : o₁.then o₂ = lt ↔ o₁ = lt ∨ o₁ = eq ∧ o₂ = lt := by |
cases o₁ <;> cases o₂ <;> decide
| [
" o.swap.swap = o",
" lt.swap.swap = lt",
" eq.swap.swap = eq",
" gt.swap.swap = gt",
" o₁ = o₂",
" (o₁.then o₂).swap = o₁.swap.then o₂.swap",
" (lt.then o₂).swap = lt.swap.then o₂.swap",
" (eq.then o₂).swap = eq.swap.then o₂.swap",
" (gt.then o₂).swap = gt.swap.then o₂.swap",
" o₁.then o₂ = lt ↔ ... |
import Mathlib.Algebra.Group.ConjFinite
import Mathlib.GroupTheory.Perm.Fin
import Mathlib.GroupTheory.Subgroup.Simple
import Mathlib.Tactic.IntervalCases
#align_import group_theory.specific_groups.alternating from "leanprover-community/mathlib"@"0f6670b8af2dff699de1c0b4b49039b31bc13c46"
-- An example on how to de... | Mathlib/GroupTheory/SpecificGroups/Alternating.lean | 96 | 101 | theorem two_mul_card_alternatingGroup [Nontrivial α] :
2 * card (alternatingGroup α) = card (Perm α) := by |
let this := (QuotientGroup.quotientKerEquivOfSurjective _ (sign_surjective α)).toEquiv
rw [← Fintype.card_units_int, ← Fintype.card_congr this]
simp only [← Nat.card_eq_fintype_card]
apply (Subgroup.card_eq_card_quotient_mul_card_subgroup _).symm
| [
" -1 ≠ 1",
" 2 * card ↥(alternatingGroup α) = card (Perm α)",
" card (Perm α ⧸ sign.ker) * card ↥(alternatingGroup α) = card (Perm α)",
" Nat.card (Perm α ⧸ sign.ker) * Nat.card ↥(alternatingGroup α) = Nat.card (Perm α)"
] |
import Mathlib.Topology.MetricSpace.Basic
#align_import topology.metric_space.infsep from "leanprover-community/mathlib"@"5316314b553dcf8c6716541851517c1a9715e22b"
variable {α β : Type*}
namespace Set
section Einfsep
open ENNReal
open Function
noncomputable def einfsep [EDist α] (s : Set α) : ℝ≥0∞ :=
⨅ (x... | Mathlib/Topology/MetricSpace/Infsep.lean | 55 | 56 | theorem einfsep_zero : s.einfsep = 0 ↔ ∀ C > 0, ∃ x ∈ s, ∃ y ∈ s, x ≠ y ∧ edist x y < C := by |
simp_rw [einfsep, ← _root_.bot_eq_zero, iInf_eq_bot, iInf_lt_iff, exists_prop]
| [
" d ≤ s.einfsep ↔ ∀ x ∈ s, ∀ y ∈ s, x ≠ y → d ≤ edist x y",
" s.einfsep = 0 ↔ ∀ C > 0, ∃ x ∈ s, ∃ y ∈ s, x ≠ y ∧ edist x y < C"
] |
import Mathlib.Data.Complex.Module
import Mathlib.Data.Complex.Order
import Mathlib.Data.Complex.Exponential
import Mathlib.Analysis.RCLike.Basic
import Mathlib.Topology.Algebra.InfiniteSum.Module
import Mathlib.Topology.Instances.RealVectorSpace
#align_import analysis.complex.basic from "leanprover-community/mathlib... | Mathlib/Analysis/Complex/Basic.lean | 102 | 104 | theorem dist_eq_re_im (z w : ℂ) : dist z w = √((z.re - w.re) ^ 2 + (z.im - w.im) ^ 2) := by |
rw [sq, sq]
rfl
| [
" ‖cexp (↑t * I)‖ = 1",
" r₁ < ‖↑x‖ ∧ ‖↑x‖ < r₂",
" ‖r • x‖ ≤ ‖r‖ * ‖x‖",
" dist z w = √((z.re - w.re) ^ 2 + (z.im - w.im) ^ 2)",
" dist z w = √((z.re - w.re) * (z.re - w.re) + (z.im - w.im) * (z.im - w.im))"
] |
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 | 253 | 254 | theorem cthickening_max_zero (δ : ℝ) (E : Set α) : cthickening (max 0 δ) E = cthickening δ E := by |
cases le_total δ 0 <;> simp [cthickening_of_nonpos, *]
| [
" ∀ᶠ (δ : ℝ) in 𝓝 0, x ∉ cthickening δ E",
" x ∉ cthickening δ E",
" ENNReal.ofReal δ < infEdist x E",
" x ∈ cthickening δ E",
" edist x y ≤ ENNReal.ofReal δ",
" ENNReal.ofReal (dist x y) ≤ ENNReal.ofReal δ",
" cthickening δ ∅ = ∅",
" cthickening δ E = closure E",
" x ∈ cthickening δ E ↔ x ∈ closur... |
import Mathlib.Algebra.Algebra.Operations
import Mathlib.Data.Fintype.Lattice
import Mathlib.RingTheory.Coprime.Lemmas
#align_import ring_theory.ideal.operations from "leanprover-community/mathlib"@"e7f0ddbf65bd7181a85edb74b64bdc35ba4bdc74"
assert_not_exists Basis -- See `RingTheory.Ideal.Basis`
assert_not_exists ... | Mathlib/RingTheory/Ideal/Operations.lean | 426 | 426 | theorem one_eq_top : (1 : Ideal R) = ⊤ := by | erw [Submodule.one_eq_range, LinearMap.range_id]
| [
" 1 = ⊤"
] |
import Mathlib.Data.DFinsupp.Interval
import Mathlib.Data.DFinsupp.Multiset
import Mathlib.Order.Interval.Finset.Nat
#align_import data.multiset.interval from "leanprover-community/mathlib"@"1d29de43a5ba4662dd33b5cfeecfc2a27a5a8a29"
open Finset DFinsupp Function
open Pointwise
variable {α : Type*}
namespace Mu... | Mathlib/Data/Multiset/Interval.lean | 77 | 80 | theorem card_uIcc :
(uIcc s t).card = ∏ i ∈ s.toFinset ∪ t.toFinset, ((t.count i - s.count i : ℤ).natAbs + 1) := by |
simp_rw [uIcc_eq, Finset.card_map, DFinsupp.card_uIcc, Nat.card_uIcc, Multiset.toDFinsupp_apply,
toDFinsupp_support]
| [
" x ∈ (fun s t => Finset.map equivDFinsupp.symm.toEmbedding (Finset.Icc (toDFinsupp s) (toDFinsupp t))) s t ↔\n s ≤ x ∧ x ≤ t",
" Finset.map equivDFinsupp.symm.toEmbedding (Finset.Icc (toDFinsupp (s ⊓ t)) (toDFinsupp (s ⊔ t))) =\n Finset.map equivDFinsupp.symm.toEmbedding (uIcc (toDFinsupp s) (toDFinsupp t)... |
import Mathlib.Algebra.Homology.ShortComplex.Basic
import Mathlib.CategoryTheory.Limits.Constructions.FiniteProductsOfBinaryProducts
import Mathlib.CategoryTheory.Triangulated.TriangleShift
#align_import category_theory.triangulated.pretriangulated from "leanprover-community/mathlib"@"6876fa15e3158ff3e4a4e2af1fb6e194... | Mathlib/CategoryTheory/Triangulated/Pretriangulated.lean | 156 | 159 | theorem comp_distTriang_mor_zero₃₁ (T : Triangle C) (H : T ∈ distTriang C) :
T.mor₃ ≫ T.mor₁⟦1⟧' = 0 := by |
have H₂ := rot_of_distTriang T.rotate (rot_of_distTriang T H)
simpa using comp_distTriang_mor_zero₁₂ T.rotate.rotate H₂
| [
" T.mor₁ ≫ T.mor₂ = 0",
" T.mor₃ ≫ (shiftFunctor C 1).map T.mor₁ = 0"
] |
import Mathlib.CategoryTheory.Preadditive.ProjectiveResolution
import Mathlib.Algebra.Homology.HomotopyCategory
import Mathlib.Tactic.SuppressCompilation
suppress_compilation
noncomputable section
universe v u
namespace CategoryTheory
variable {C : Type u} [Category.{v} C]
open Category Limits Projective
set_... | Mathlib/CategoryTheory/Abelian/ProjectiveResolution.lean | 73 | 76 | theorem liftFOne_zero_comm {Y Z : C} (f : Y ⟶ Z) (P : ProjectiveResolution Y)
(Q : ProjectiveResolution Z) :
liftFOne f P Q ≫ Q.complex.d 1 0 = P.complex.d 1 0 ≫ liftFZero f P Q := by |
apply Q.exact₀.liftFromProjective_comp
| [
" (P.complex.d 1 0 ≫ liftFZero f P Q) ≫ (ShortComplex.mk (Q.complex.d 1 0) (Q.π.f 0) ⋯).g = 0",
" liftFOne f P Q ≫ Q.complex.d 1 0 = P.complex.d 1 0 ≫ liftFZero f P Q"
] |
import Mathlib.Order.ConditionallyCompleteLattice.Basic
import Mathlib.Data.Set.Finite
#align_import order.conditionally_complete_lattice.finset from "leanprover-community/mathlib"@"2445c98ae4b87eabebdde552593519b9b6dc350c"
open Set
variable {ι α β γ : Type*}
section ConditionallyCompleteLinearOrder
variable [... | Mathlib/Order/ConditionallyCompleteLattice/Finset.lean | 42 | 44 | theorem Set.Nonempty.csSup_mem (h : s.Nonempty) (hs : s.Finite) : sSup s ∈ s := by |
lift s to Finset α using hs
exact Finset.Nonempty.csSup_mem h
| [
" sSup ↑s ∈ s",
" s.max' h ∈ s",
" sSup s ∈ s",
" sSup ↑s ∈ ↑s"
] |
import Mathlib.Data.Int.Interval
import Mathlib.Data.Int.ModEq
import Mathlib.Data.Nat.Count
import Mathlib.Data.Rat.Floor
import Mathlib.Order.Interval.Finset.Nat
open Finset Int
namespace Int
variable (a b : ℤ) {r : ℤ} (hr : 0 < r)
lemma Ico_filter_dvd_eq : (Ico a b).filter (r ∣ ·) =
(Ico ⌈a / (r : ℚ)⌉ ⌈b... | Mathlib/Data/Int/CardIntervalMod.lean | 71 | 73 | theorem Ioc_filter_modEq_card (v : ℤ) : ((Ioc a b).filter (· ≡ v [ZMOD r])).card =
max (⌊(b - v) / (r : ℚ)⌋ - ⌊(a - v) / (r : ℚ)⌋) 0 := by |
simp [Ioc_filter_modEq_eq, Ioc_filter_dvd_eq, toNat_eq_max, hr]
| [
" filter (fun x => r ∣ x) (Ico a b) = map { toFun := fun x => x * r, inj' := ⋯ } (Ico ⌈↑a / ↑r⌉ ⌈↑b / ↑r⌉)",
" x ∈ filter (fun x => r ∣ x) (Ico a b) ↔ x ∈ map { toFun := fun x => x * r, inj' := ⋯ } (Ico ⌈↑a / ↑r⌉ ⌈↑b / ↑r⌉)",
" ((a ≤ x ∧ x < b) ∧ ∃ c, x = c * r) ↔\n ∃ a_1, (a ≤ a_1 * r ∧ a_1 * r < b) ∧ { toF... |
import Mathlib.LinearAlgebra.Matrix.Charpoly.Coeff
import Mathlib.LinearAlgebra.Matrix.ToLin
#align_import linear_algebra.matrix.charpoly.linear_map from "leanprover-community/mathlib"@"62c0a4ef1441edb463095ea02a06e87f3dfe135c"
variable {ι : Type*} [Fintype ι]
variable {M : Type*} [AddCommGroup M] (R : Type*) [Co... | Mathlib/LinearAlgebra/Matrix/Charpoly/LinearMap.lean | 124 | 128 | theorem Matrix.Represents.one : (1 : Matrix ι ι R).Represents b 1 := by |
delta Matrix.Represents PiToModule.fromMatrix
rw [LinearMap.comp_apply, AlgEquiv.toLinearMap_apply, _root_.map_one]
ext
rfl
| [
" ((fromMatrix R b) A) (Pi.single j 1) = ∑ i : ι, A i j • b i",
" ∑ i : ι, (fun i => A i j * 1) i • b i = ∑ i : ι, A i j • b i",
" ((fromEnd R b) f) (Pi.single i 1) = f (b i)",
" f (((Fintype.total R R) b) (Pi.single i 1)) = f (b i)",
" ((Fintype.total R R) b) (Pi.single i 1) = b i",
" b i = 1 • b i",
"... |
import Mathlib.Data.Int.Order.Units
import Mathlib.Data.ZMod.IntUnitsPower
import Mathlib.RingTheory.TensorProduct.Basic
import Mathlib.LinearAlgebra.DirectSum.TensorProduct
import Mathlib.Algebra.DirectSum.Algebra
suppress_compilation
open scoped TensorProduct DirectSum
variable {R ι A B : Type*}
namespace Tens... | Mathlib/LinearAlgebra/TensorProduct/Graded/External.lean | 116 | 124 | theorem gradedComm_of_tmul_of (i j : ι) (a : 𝒜 i) (b : ℬ j) :
gradedComm R 𝒜 ℬ (lof R _ 𝒜 i a ⊗ₜ lof R _ ℬ j b) =
(-1 : ℤˣ)^(j * i) • (lof R _ ℬ _ b ⊗ₜ lof R _ 𝒜 _ a) := by |
rw [gradedComm]
dsimp only [LinearEquiv.trans_apply, LinearEquiv.ofLinear_apply]
rw [TensorProduct.directSum_lof_tmul_lof, gradedCommAux_lof_tmul, Units.smul_def,
-- Note: #8386 specialized `map_smul` to `LinearEquiv.map_smul` to avoid timeouts.
zsmul_eq_smul_cast R, LinearEquiv.map_smul, TensorProduct.d... | [
" (⨁ (i : ι × ι), 𝒜 i.1 ⊗[R] ℬ i.2) →ₗ[R] ⨁ (i : ι × ι), ℬ i.1 ⊗[R] 𝒜 i.2",
" 𝒜 i.1 ⊗[R] ℬ i.2 →ₗ[R] ⨁ (i : ι × ι), ℬ i.1 ⊗[R] 𝒜 i.2",
" (gradedCommAux R 𝒜 ℬ) ((lof R (ι × ι) (fun i => 𝒜 i.1 ⊗[R] ℬ i.2) (i, j)) (a ⊗ₜ[R] b)) =\n (-1) ^ (j * i) • (lof R (ι × ι) (fun i => ℬ i.1 ⊗[R] 𝒜 i.2) (j, i)) (b ⊗ₜ[... |
import Mathlib.Analysis.Normed.Order.Basic
import Mathlib.Analysis.Asymptotics.Asymptotics
import Mathlib.Analysis.NormedSpace.Basic
#align_import analysis.asymptotics.specific_asymptotics from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982"
open Filter Asymptotics
open Topology
sectio... | Mathlib/Analysis/Asymptotics/SpecificAsymptotics.lean | 131 | 136 | theorem Asymptotics.isLittleO_sum_range_of_tendsto_zero {α : Type*} [NormedAddCommGroup α]
{f : ℕ → α} (h : Tendsto f atTop (𝓝 0)) :
(fun n => ∑ i ∈ range n, f i) =o[atTop] fun n => (n : ℝ) := by |
have := ((isLittleO_one_iff ℝ).2 h).sum_range fun i => zero_le_one
simp only [sum_const, card_range, Nat.smul_one_eq_cast] at this
exact this tendsto_natCast_atTop_atTop
| [
" (fun n => ∑ i ∈ range n, f i) =o[atTop] fun n => ∑ i ∈ range n, g i",
" ‖∑ i ∈ range n, g i‖ = ∑ i ∈ range n, g i",
" ∀ (ε : ℝ), 0 < ε → ∀ᶠ (x : ℕ) in atTop, ‖∑ i ∈ range x, f i‖ ≤ ε * ‖∑ i ∈ range x, g i‖",
" ∀ᶠ (x : ℕ) in atTop, ‖∑ i ∈ range x, f i‖ ≤ ε * ‖∑ i ∈ range x, g i‖",
" ∃ N, ∀ (b : ℕ), N ≤ b →... |
import Mathlib.Algebra.Group.Equiv.Basic
import Mathlib.Algebra.Ring.Basic
import Mathlib.Algebra.Order.Sub.Defs
import Mathlib.Order.Hom.Basic
#align_import algebra.order.sub.basic from "leanprover-community/mathlib"@"10b4e499f43088dd3bb7b5796184ad5216648ab1"
variable {α β : Type*}
section Add
variable [Preord... | Mathlib/Algebra/Order/Sub/Basic.lean | 25 | 28 | theorem AddHom.le_map_tsub [Preorder β] [Add β] [Sub β] [OrderedSub β] (f : AddHom α β)
(hf : Monotone f) (a b : α) : f a - f b ≤ f (a - b) := by |
rw [tsub_le_iff_right, ← f.map_add]
exact hf le_tsub_add
| [
" f a - f b ≤ f (a - b)",
" f a ≤ f (a - b + b)"
] |
import Mathlib.Algebra.Group.Support
import Mathlib.Algebra.Order.Monoid.WithTop
import Mathlib.Data.Nat.Cast.Field
#align_import algebra.char_zero.lemmas from "leanprover-community/mathlib"@"acee671f47b8e7972a1eb6f4eed74b4b3abce829"
open Function Set
section AddMonoidWithOne
variable {α M : Type*} [AddMonoidWith... | Mathlib/Algebra/CharZero/Lemmas.lean | 185 | 185 | theorem sub_half (a : R) : a - a / 2 = a / 2 := by | rw [sub_eq_iff_eq_add, add_halves']
| [
" 2 ≠ 0",
" a + a = 0 ↔ a = 0",
" 0 = bit0 a ↔ a = 0",
" bit0 a = 0 ↔ a = 0",
" n = 0 ∨ a = b",
" a = b",
" ↑2 * a = ↑2 * b",
" bit1 a = 1 ↔ a = 0",
" 1 = bit1 0",
" 1 = bit1 a ↔ a = 0",
" (a + a) / 2 = a",
" a / 2 + a / 2 = a",
" a - a / 2 = a / 2"
] |
import Mathlib.Analysis.SpecialFunctions.JapaneseBracket
import Mathlib.Analysis.SpecialFunctions.Integrals
import Mathlib.MeasureTheory.Group.Integral
import Mathlib.MeasureTheory.Integral.IntegralEqImproper
import Mathlib.MeasureTheory.Measure.Lebesgue.Integral
#align_import analysis.special_functions.improper_inte... | Mathlib/Analysis/SpecialFunctions/ImproperIntegrals.lean | 53 | 54 | theorem integral_exp_neg_Ioi (c : ℝ) : (∫ x : ℝ in Ioi c, exp (-x)) = exp (-c) := by |
simpa only [integral_comp_neg_Ioi] using integral_exp_Iic (-c)
| [
" IntegrableOn rexp (Iic c) volume",
" ∫ (x : ℝ) in id y..c, ‖rexp x‖ ≤ rexp c",
" 0 ≤ rexp (id y)",
" ∫ (x : ℝ) in Iic c, rexp x = rexp c",
" Tendsto (fun i => ∫ (x : ℝ) in id i..c, rexp x) atBot (𝓝 (rexp c))",
" 𝓝 (rexp c) = 𝓝 (rexp c - 0)",
" Tendsto (fun i => rexp c - rexp (id i)) atBot (𝓝 (rexp... |
import Mathlib.Algebra.BigOperators.Ring
import Mathlib.Data.Fintype.Basic
import Mathlib.Data.Int.GCD
import Mathlib.RingTheory.Coprime.Basic
#align_import ring_theory.coprime.lemmas from "leanprover-community/mathlib"@"509de852e1de55e1efa8eacfa11df0823f26f226"
universe u v
section RelPrime
variable {α I} [Comm... | Mathlib/RingTheory/Coprime/Lemmas.lean | 242 | 243 | theorem IsRelPrime.prod_right : (∀ i ∈ t, IsRelPrime x (s i)) → IsRelPrime x (∏ i ∈ t, s i) := by |
simpa only [isRelPrime_comm] using IsRelPrime.prod_left (α := α)
| [
" (∀ i ∈ t, IsRelPrime (s i) x) → IsRelPrime (∏ i ∈ t, s i) x",
" IsRelPrime (∏ i ∈ insert b t, s i) x",
" IsRelPrime (s b * ∏ x ∈ t, s x) x",
" (∀ i ∈ t, IsRelPrime x (s i)) → IsRelPrime x (∏ i ∈ t, s i)"
] |
import Mathlib.Algebra.Ring.Semiconj
import Mathlib.Algebra.Ring.Units
import Mathlib.Algebra.Group.Commute.Defs
import Mathlib.Data.Bracket
#align_import algebra.ring.commute from "leanprover-community/mathlib"@"70d50ecfd4900dd6d328da39ab7ebd516abe4025"
universe u v w x
variable {α : Type u} {β : Type v} {γ : T... | Mathlib/Algebra/Ring/Commute.lean | 77 | 79 | theorem mul_self_sub_mul_self_eq' [NonUnitalNonAssocRing R] {a b : R} (h : Commute a b) :
a * a - b * b = (a - b) * (a + b) := by |
rw [mul_add, sub_mul, sub_mul, h.eq, sub_add_sub_cancel]
| [
" a * a - b * b = (a + b) * (a - b)",
" a * a - b * b = (a - b) * (a + b)"
] |
import Mathlib.Algebra.Order.Sub.Defs
import Mathlib.Data.Finset.Basic
import Mathlib.Order.Interval.Finset.Defs
open Function
namespace Finset
class HasAntidiagonal (A : Type*) [AddMonoid A] where
antidiagonal : A → Finset (A × A)
mem_antidiagonal {n} {a} : a ∈ antidiagonal n ↔ a.fst + a.snd = n
exp... | Mathlib/Data/Finset/Antidiagonal.lean | 135 | 138 | theorem antidiagonal.fst_le {n : A} {kl : A × A} (hlk : kl ∈ antidiagonal n) : kl.1 ≤ n := by |
rw [le_iff_exists_add]
use kl.2
rwa [mem_antidiagonal, eq_comm] at hlk
| [
" ∀ (a b : HasAntidiagonal A), a = b",
" { antidiagonal := a, mem_antidiagonal := ha } = { antidiagonal := b, mem_antidiagonal := hb }",
" xy ∈ a n ↔ xy ∈ b n",
" antidiagonal = antidiagonal",
" H1 = H2",
" xy.swap ∈ antidiagonal n ↔ xy ∈ antidiagonal n",
" (a, b) ∈ map (Equiv.prodComm A A).toEmbedding ... |
import Mathlib.LinearAlgebra.Dimension.Finite
import Mathlib.LinearAlgebra.Dimension.Constructions
open Cardinal Submodule Set FiniteDimensional
universe u v
section Module
variable {K : Type u} {V : Type v} [Ring K] [StrongRankCondition K] [AddCommGroup V] [Module K V]
noncomputable def Basis.ofRankEqZero [Mo... | Mathlib/LinearAlgebra/Dimension/FreeAndStrongRankCondition.lean | 105 | 119 | theorem rank_eq_one_iff [Module.Free K V] :
Module.rank K V = 1 ↔ ∃ v₀ : V, v₀ ≠ 0 ∧ ∀ v, ∃ r : K, r • v₀ = v := by |
haveI := nontrivial_of_invariantBasisNumber K
refine ⟨fun h ↦ ?_, fun ⟨v₀, h, hv⟩ ↦ (rank_le_one_iff.2 ⟨v₀, hv⟩).antisymm ?_⟩
· obtain ⟨v₀, hv⟩ := rank_le_one_iff.1 h.le
refine ⟨v₀, fun hzero ↦ ?_, hv⟩
simp_rw [hzero, smul_zero, exists_const] at hv
haveI : Subsingleton V := .intro fun _ _ ↦ by simp_r... | [
" Subsingleton V",
" c ≤ Module.rank K V ↔ ∃ s, #↑s = c ∧ LinearIndependent (ι := { x // x ∈ s }) K Subtype.val",
" c ≤ Module.rank K V → ∃ s, #↑s = c ∧ LinearIndependent (ι := { x // x ∈ s }) K Subtype.val",
" ∃ s, #↑s = c ∧ LinearIndependent (ι := { x // x ∈ s }) K Subtype.val",
" LinearIndependent (ι := ... |
import Mathlib.Combinatorics.SimpleGraph.Connectivity
import Mathlib.Tactic.Linarith
#align_import combinatorics.simple_graph.acyclic from "leanprover-community/mathlib"@"b07688016d62f81d14508ff339ea3415558d6353"
universe u v
namespace SimpleGraph
open Walk
variable {V : Type u} (G : SimpleGraph V)
def IsAcy... | Mathlib/Combinatorics/SimpleGraph/Acyclic.lean | 88 | 115 | theorem IsAcyclic.path_unique {G : SimpleGraph V} (h : G.IsAcyclic) {v w : V} (p q : G.Path v w) :
p = q := by |
obtain ⟨p, hp⟩ := p
obtain ⟨q, hq⟩ := q
rw [Subtype.mk.injEq]
induction p with
| nil =>
cases (Walk.isPath_iff_eq_nil _).mp hq
rfl
| cons ph p ih =>
rw [isAcyclic_iff_forall_adj_isBridge] at h
specialize h ph
rw [isBridge_iff_adj_and_forall_walk_mem_edges] at h
replace h := h.2 (q.a... | [
" G.IsAcyclic ↔ ∀ ⦃v w : V⦄, G.Adj v w → G.IsBridge s(v, w)",
" G.IsAcyclic ↔ ∀ ⦃v w : V⦄, G.Adj v w → G.Adj v w ∧ ∀ ⦃u : V⦄ (p : G.Walk u u), p.IsCycle → s(v, w) ∉ p.edges",
" G.IsAcyclic → ∀ ⦃v w : V⦄, G.Adj v w → G.Adj v w ∧ ∀ ⦃u : V⦄ (p : G.Walk u u), p.IsCycle → s(v, w) ∉ p.edges",
" G.Adj v w ∧ ∀ ⦃u : V... |
import Mathlib.FieldTheory.PrimitiveElement
import Mathlib.LinearAlgebra.Determinant
import Mathlib.LinearAlgebra.FiniteDimensional
import Mathlib.LinearAlgebra.Matrix.Charpoly.Minpoly
import Mathlib.LinearAlgebra.Matrix.ToLinearEquiv
import Mathlib.FieldTheory.IsAlgClosed.AlgebraicClosure
import Mathlib.FieldTheory.G... | Mathlib/RingTheory/Norm.lean | 151 | 166 | theorem norm_eq_zero_iff [IsDomain R] [IsDomain S] [Module.Free R S] [Module.Finite R S] {x : S} :
norm R x = 0 ↔ x = 0 := by |
constructor
on_goal 1 => let b := Module.Free.chooseBasis R S
swap
· rintro rfl; exact norm_zero
· letI := Classical.decEq (Module.Free.ChooseBasisIndex R S)
rw [norm_eq_matrix_det b, ← Matrix.exists_mulVec_eq_zero_iff]
rintro ⟨v, v_ne, hv⟩
rw [← b.equivFun.apply_symm_apply v, b.equivFun_symm_app... | [
" (norm R) x = 1",
" (if H : ∃ s, Nonempty (Basis { x // x ∈ s } R S) then detAux (Trunc.mk ⋯.some) else 1) ((lmul R S) x) = 1",
" (detAux (Trunc.mk ⋯.some)) ((lmul R S) x) = 1",
" 1 ((lmul R S) x) = 1",
" (∃ s, Nonempty (Basis { x // x ∈ s } R S)) → Module.Finite R S",
" Module.Finite R S",
" (norm R) ... |
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 Sup
-- can be defined with just `[Bot α]` where some lemmas hold without... | Mathlib/Data/Multiset/Lattice.lean | 79 | 80 | theorem sup_ndunion (s₁ s₂ : Multiset α) : (ndunion s₁ s₂).sup = s₁.sup ⊔ s₂.sup := by |
rw [← sup_dedup, dedup_ext.2, sup_dedup, sup_add]; simp
| [
" (s₁ + s₂).sup = fold (fun x x_1 => x ⊔ x_1) (⊥ ⊔ ⊥) (s₁ + s₂)",
" sup 0 ≤ a ↔ ∀ b ∈ 0, b ≤ a",
" ∀ (a_1 : α) (s : Multiset α), (s.sup ≤ a ↔ ∀ b ∈ s, b ≤ a) → ((a_1 ::ₘ s).sup ≤ a ↔ ∀ b ∈ a_1 ::ₘ s, b ≤ a)",
" (s₁.ndunion s₂).sup = s₁.sup ⊔ s₂.sup",
" ∀ (a : α), a ∈ s₁.ndunion s₂ ↔ a ∈ s₁ + s₂"
] |
import Batteries.Classes.Order
namespace Batteries.PairingHeapImp
inductive Heap (α : Type u) where
| nil : Heap α
| node (a : α) (child sibling : Heap α) : Heap α
deriving Repr
def Heap.size : Heap α → Nat
| .nil => 0
| .node _ c s => c.size + 1 + s.size
def Heap.singleton (a : α) : Heap α := .... | .lake/packages/batteries/Batteries/Data/PairingHeap.lean | 142 | 146 | theorem Heap.size_tail? {s : Heap α} (h : s.NoSibling) : s.tail? le = some s' →
s.size = s'.size + 1 := by |
simp only [Heap.tail?]; intro eq
match eq₂ : s.deleteMin le, eq with
| some (a, tl), rfl => exact size_deleteMin h eq₂
| [
" (merge le s₁ s₂).NoSibling",
" (match s₁, s₂ with\n | nil, nil => nil\n | nil, node a₂ c₂ sibling => node a₂ c₂ nil\n | node a₁ c₁ sibling, nil => node a₁ c₁ nil\n | node a₁ c₁ sibling, node a₂ c₂ sibling_1 =>\n if le a₁ a₂ = true then node a₁ (node a₂ c₂ c₁) nil else node a₂ (node a₁ c₁ c₂) ni... |
import Mathlib.Data.Finset.Image
#align_import data.finset.card from "leanprover-community/mathlib"@"65a1391a0106c9204fe45bc73a039f056558cb83"
assert_not_exists MonoidWithZero
-- TODO: After a lot more work,
-- assert_not_exists OrderedCommMonoid
open Function Multiset Nat
variable {α β R : Type*}
namespace Fin... | Mathlib/Data/Finset/Card.lean | 155 | 156 | theorem card_pair (h : a ≠ b) : ({a, b} : Finset α).card = 2 := by |
rw [card_insert_of_not_mem (not_mem_singleton.2 h), card_singleton]
| [
" Monotone card",
" ({a} ∩ s).card ≤ 1",
" (insert a s).card = s.card + 1",
" (insert a s).card = s.card",
" (insert a s).card ≤ s.card + 1",
" s.card ≤ s.card + 1",
" (insert a s).card = if a ∈ s then s.card else s.card + 1",
" {a, b}.card = 1 ∨ {a, b}.card = 2",
" a = b ∨ ¬a = b",
" {a, b}.card ... |
import Mathlib.Analysis.Calculus.BumpFunction.Basic
import Mathlib.MeasureTheory.Integral.SetIntegral
import Mathlib.MeasureTheory.Measure.Lebesgue.EqHaar
#align_import analysis.calculus.bump_function_inner from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe"
noncomputable section
open F... | Mathlib/Analysis/Calculus/BumpFunction/Normed.lean | 85 | 86 | theorem tsupport_normed_eq : tsupport (f.normed μ) = Metric.closedBall c f.rOut := by |
rw [tsupport, f.support_normed_eq, closure_ball _ f.rOut_pos.ne']
| [
" f.normed μ (c - x) = f.normed μ (c + x)",
" f.normed μ (-x) = f.normed μ x",
" 0 < ∫ (x : E), ↑f x ∂μ",
" 0 < μ (support fun i => ↑f i)",
" 0 < μ (ball c f.rOut)",
" ∫ (x : E), f.normed μ x ∂μ = 1",
" (∫ (x : E), ↑f x ∂μ)⁻¹ • ∫ (x : E), ↑f x ∂μ = 1",
" support (f.normed μ) = ball c f.rOut",
" (sup... |
import Mathlib.MeasureTheory.Measure.Typeclasses
import Mathlib.MeasureTheory.Measure.MutuallySingular
import Mathlib.MeasureTheory.MeasurableSpace.CountablyGenerated
open Function Set
open scoped ENNReal Classical
noncomputable section
variable {α β δ : Type*} [MeasurableSpace α] [MeasurableSpace β] {s : Set α} ... | Mathlib/MeasureTheory/Measure/Dirac.lean | 103 | 110 | theorem tsum_indicator_apply_singleton [Countable α] [MeasurableSingletonClass α] (μ : Measure α)
(s : Set α) (hs : MeasurableSet s) : (∑' x : α, s.indicator (fun x => μ {x}) x) = μ s :=
calc
(∑' x : α, s.indicator (fun x => μ {x}) x) =
Measure.sum (fun a => μ {a} • Measure.dirac a) s := by |
simp only [Measure.sum_apply _ hs, Measure.smul_apply, smul_eq_mul, Measure.dirac_apply,
Set.indicator_apply, mul_ite, Pi.one_apply, mul_one, mul_zero]
_ = μ s := by rw [μ.sum_smul_dirac]
| [
" inst✝¹ ≤ (OuterMeasure.dirac a).caratheodory",
" (dirac a) s = 1",
" (dirac a) s ≤ univ.indicator 1 a",
" (dirac a) s ≤ (dirac a) univ",
" (dirac a) s = s.indicator 1 a",
" (dirac a) s ≤ 0",
" (dirac a) {a}ᶜ = 0",
" (map f (dirac a)) s = (dirac (f a)) s",
" map (fun x => c) μ = μ univ • dirac c",
... |
import Mathlib.Topology.Constructions
import Mathlib.Topology.ContinuousOn
#align_import topology.bases from "leanprover-community/mathlib"@"bcfa726826abd57587355b4b5b7e78ad6527b7e4"
open Set Filter Function Topology
noncomputable section
namespace TopologicalSpace
universe u
variable {α : Type u} {β : Type*} ... | Mathlib/Topology/Bases.lean | 93 | 103 | theorem IsTopologicalBasis.diff_empty {s : Set (Set α)} (h : IsTopologicalBasis s) :
IsTopologicalBasis (s \ {∅}) := by |
refine ⟨?_, by rw [sUnion_diff_singleton_empty, h.sUnion_eq], ?_⟩
· rintro t₁ ⟨h₁, -⟩ t₂ ⟨h₂, -⟩ x hx
obtain ⟨t₃, h₃, hs⟩ := h.exists_subset_inter _ h₁ _ h₂ x hx
exact ⟨t₃, ⟨h₃, Nonempty.ne_empty ⟨x, hs.1⟩⟩, hs⟩
· rw [h.eq_generateFrom]
refine le_antisymm (generateFrom_anti diff_subset) (le_generateF... | [
" IsTopologicalBasis (insert ∅ s)",
" ⋃₀ insert ∅ s = univ",
" ∀ t₁ ∈ insert ∅ s, ∀ t₂ ∈ insert ∅ s, ∀ x ∈ t₁ ∩ t₂, ∃ t₃ ∈ insert ∅ s, x ∈ t₃ ∧ t₃ ⊆ t₁ ∩ t₂",
" ∃ t₃ ∈ insert ∅ s, x ∈ t₃ ∧ t₃ ⊆ ∅ ∩ ∅",
" ∃ t₃ ∈ insert ∅ s, x ∈ t₃ ∧ t₃ ⊆ ∅ ∩ t₂",
" ∃ t₃ ∈ insert ∅ s, x ∈ t₃ ∧ t₃ ⊆ t₁ ∩ ∅",
" ∃ t₃ ∈ inser... |
import Mathlib.RingTheory.RootsOfUnity.Basic
import Mathlib.FieldTheory.Minpoly.IsIntegrallyClosed
import Mathlib.Algebra.GCDMonoid.IntegrallyClosed
import Mathlib.FieldTheory.Finite.Basic
#align_import ring_theory.roots_of_unity.minpoly from "leanprover-community/mathlib"@"7fdeecc0d03cd40f7a165e6cf00a4d2286db599f"
... | Mathlib/RingTheory/RootsOfUnity/Minpoly.lean | 40 | 45 | theorem isIntegral (hpos : 0 < n) : IsIntegral ℤ μ := by |
use X ^ n - 1
constructor
· exact monic_X_pow_sub_C 1 (ne_of_lt hpos).symm
· simp only [((IsPrimitiveRoot.iff_def μ n).mp h).left, eval₂_one, eval₂_X_pow, eval₂_sub,
sub_self]
| [
" IsIntegral ℤ μ",
" (X ^ n - 1).Monic ∧ eval₂ (algebraMap ℤ K) μ (X ^ n - 1) = 0",
" (X ^ n - 1).Monic",
" eval₂ (algebraMap ℤ K) μ (X ^ n - 1) = 0"
] |
import Mathlib.Data.DFinsupp.Interval
import Mathlib.Data.DFinsupp.Multiset
import Mathlib.Order.Interval.Finset.Nat
#align_import data.multiset.interval from "leanprover-community/mathlib"@"1d29de43a5ba4662dd33b5cfeecfc2a27a5a8a29"
open Finset DFinsupp Function
open Pointwise
variable {α : Type*}
namespace Mu... | Mathlib/Data/Multiset/Interval.lean | 56 | 59 | theorem card_Icc :
(Finset.Icc s t).card = ∏ i ∈ s.toFinset ∪ t.toFinset, (t.count i + 1 - s.count i) := by |
simp_rw [Icc_eq, Finset.card_map, DFinsupp.card_Icc, Nat.card_Icc, Multiset.toDFinsupp_apply,
toDFinsupp_support]
| [
" x ∈ (fun s t => Finset.map equivDFinsupp.symm.toEmbedding (Finset.Icc (toDFinsupp s) (toDFinsupp t))) s t ↔\n s ≤ x ∧ x ≤ t",
" Finset.map equivDFinsupp.symm.toEmbedding (Finset.Icc (toDFinsupp (s ⊓ t)) (toDFinsupp (s ⊔ t))) =\n Finset.map equivDFinsupp.symm.toEmbedding (uIcc (toDFinsupp s) (toDFinsupp t)... |
import Mathlib.Analysis.Calculus.FDeriv.Bilinear
#align_import analysis.calculus.fderiv.mul from "leanprover-community/mathlib"@"d608fc5d4e69d4cc21885913fb573a88b0deb521"
open scoped Classical
open Filter Asymptotics ContinuousLinearMap Set Metric Topology NNReal ENNReal
noncomputable section
section
variable ... | Mathlib/Analysis/Calculus/FDeriv/Mul.lean | 224 | 227 | theorem fderivWithin_continuousMultilinear_apply_const_apply (hxs : UniqueDiffWithinAt 𝕜 s x)
(hc : DifferentiableWithinAt 𝕜 c s x) (u : ∀ i, M i) (m : E) :
(fderivWithin 𝕜 (fun y ↦ (c y) u) s x) m = (fderivWithin 𝕜 c s x) m u := by |
simp [fderivWithin_continuousMultilinear_apply_const hxs hc]
| [
" (fderivWithin 𝕜 (fun y => (c y) u) s x) m = ((fderivWithin 𝕜 c s x) m) u"
] |
import Mathlib.Analysis.SpecialFunctions.Trigonometric.Complex
#align_import analysis.special_functions.trigonometric.complex_deriv from "leanprover-community/mathlib"@"2c1d8ca2812b64f88992a5294ea3dba144755cd1"
noncomputable section
namespace Complex
open Set Filter
open scoped Real
| Mathlib/Analysis/SpecialFunctions/Trigonometric/ComplexDeriv.lean | 25 | 28 | theorem hasStrictDerivAt_tan {x : ℂ} (h : cos x ≠ 0) : HasStrictDerivAt tan (1 / cos x ^ 2) x := by |
convert (hasStrictDerivAt_sin x).div (hasStrictDerivAt_cos x) h using 1
rw_mod_cast [← sin_sq_add_cos_sq x]
ring
| [
" HasStrictDerivAt tan (1 / x.cos ^ 2) x",
" 1 / x.cos ^ 2 = (x.cos * x.cos - x.sin * -x.sin) / x.cos ^ 2",
" (x.sin ^ 2 + x.cos ^ 2) / x.cos ^ 2 = (x.cos * x.cos - x.sin * -x.sin) / x.cos ^ 2"
] |
import Mathlib.Algebra.Order.Group.TypeTags
import Mathlib.FieldTheory.RatFunc.Degree
import Mathlib.RingTheory.DedekindDomain.IntegralClosure
import Mathlib.RingTheory.IntegrallyClosed
import Mathlib.Topology.Algebra.ValuedField
#align_import number_theory.function_field from "leanprover-community/mathlib"@"70fd9563... | Mathlib/NumberTheory/FunctionField.lean | 199 | 201 | theorem inftyValuation_of_nonzero {x : RatFunc Fq} (hx : x ≠ 0) :
inftyValuationDef Fq x = Multiplicative.ofAdd x.intDegree := by |
rw [inftyValuationDef, if_neg hx]
| [
" FunctionField Fq F ↔ FiniteDimensional Fqt F",
" ∀ (c : RatFunc Fq) (x : F), e c • x = c • x",
" e c • x = c • x",
" (algebraMap Fqt F) (e c) * x = (algebraMap (RatFunc Fq) F) c * x",
" (algebraMap Fqt F) (e c) = (algebraMap (RatFunc Fq) F) c",
" (fun c => (algebraMap Fqt F) (e c)) = ⇑(algebraMap (RatFu... |
import Mathlib.Tactic.CategoryTheory.Reassoc
#align_import category_theory.natural_transformation from "leanprover-community/mathlib"@"8350c34a64b9bc3fc64335df8006bffcadc7baa6"
namespace CategoryTheory
-- declare the `v`'s first; see note [CategoryTheory universes].
universe v₁ v₂ v₃ v₄ u₁ u₂ u₃ u₄
variable {C :... | Mathlib/CategoryTheory/NatTrans.lean | 63 | 64 | theorem congr_app {F G : C ⥤ D} {α β : NatTrans F G} (h : α = β) (X : C) : α.app X = β.app X := by |
aesop_cat
| [
" α.app X = β.app X"
] |
import Mathlib.MeasureTheory.Constructions.Prod.Integral
import Mathlib.MeasureTheory.Integral.CircleIntegral
#align_import measure_theory.integral.torus_integral from "leanprover-community/mathlib"@"fd5edc43dc4f10b85abfe544b88f82cf13c5f844"
variable {n : ℕ}
variable {E : Type*} [NormedAddCommGroup E]
noncomputa... | Mathlib/MeasureTheory/Integral/TorusIntegral.lean | 133 | 135 | theorem torusIntegrable_zero_radius {f : ℂⁿ → E} {c : ℂⁿ} : TorusIntegrable f c 0 := by |
rw [TorusIntegrable, torusMap_zero_radius]
apply torusIntegrable_const (f c) c 0
| [
" torusMap c R θ - c = torusMap 0 R θ",
" (torusMap c R θ - c) i = torusMap 0 R θ i",
" torusMap c R θ = c ↔ R = 0",
" TorusIntegrable (fun x => a) c R",
" TorusIntegrable f c 0",
" IntegrableOn (fun θ => f (const (Fin n → ℝ) c θ)) (Icc 0 fun x => 2 * π) volume"
] |
import Mathlib.Computability.NFA
#align_import computability.epsilon_NFA from "leanprover-community/mathlib"@"28aa996fc6fb4317f0083c4e6daf79878d81be33"
open Set
open Computability
-- "ε_NFA"
set_option linter.uppercaseLean3 false
universe u v
structure εNFA (α : Type u) (σ : Type v) where
step : σ → Opt... | Mathlib/Computability/EpsilonNFA.lean | 116 | 119 | theorem evalFrom_empty (x : List α) : M.evalFrom ∅ x = ∅ := by |
induction' x using List.reverseRecOn with x a ih
· rw [evalFrom_nil, εClosure_empty]
· rw [evalFrom_append_singleton, ih, stepSet_empty]
| [
" False",
" s ∈ M.stepSet S a ↔ ∃ t ∈ S, s ∈ M.εClosure (M.step t (some a))",
" M.stepSet ∅ a = ∅",
" M.evalFrom S (x ++ [a]) = M.stepSet (M.evalFrom S x) a",
" M.evalFrom ∅ x = ∅",
" M.evalFrom ∅ [] = ∅",
" M.evalFrom ∅ (x ++ [a]) = ∅"
] |
import Mathlib.Algebra.Group.Prod
#align_import data.nat.cast.prod from "leanprover-community/mathlib"@"ee0c179cd3c8a45aa5bffbf1b41d8dbede452865"
assert_not_exists MonoidWithZero
variable {α β : Type*}
namespace Prod
variable [AddMonoidWithOne α] [AddMonoidWithOne β]
instance instAddMonoidWithOne : AddMonoidWi... | Mathlib/Data/Nat/Cast/Prod.lean | 39 | 39 | theorem snd_natCast (n : ℕ) : (n : α × β).snd = n := by | induction n <;> simp [*]
| [
" (↑n).1 = ↑n",
" (↑0).1 = ↑0",
" (↑(n✝ + 1)).1 = ↑(n✝ + 1)",
" (↑n).2 = ↑n",
" (↑0).2 = ↑0",
" (↑(n✝ + 1)).2 = ↑(n✝ + 1)"
] |
import Mathlib.CategoryTheory.Subobject.Lattice
#align_import category_theory.subobject.limits from "leanprover-community/mathlib"@"956af7c76589f444f2e1313911bad16366ea476d"
universe v u
noncomputable section
open CategoryTheory CategoryTheory.Category CategoryTheory.Limits CategoryTheory.Subobject Opposite
var... | Mathlib/CategoryTheory/Subobject/Limits.lean | 181 | 184 | theorem kernelSubobjectIso_comp_kernel_map (sq : Arrow.mk f ⟶ Arrow.mk f') :
(kernelSubobjectIso _).hom ≫ kernel.map f f' sq.1 sq.2 sq.3.symm =
kernelSubobjectMap sq ≫ (kernelSubobjectIso _).hom := by |
simp [← Iso.comp_inv_eq, kernel_map_comp_kernelSubobjectIso_inv]
| [
" (kernelSubobjectIso f).hom ≫ kernel.ι f = (kernelSubobject f).arrow",
" (kernelSubobjectIso f).inv ≫ (kernelSubobject f).arrow = kernel.ι f",
" (kernelSubobject f).arrow ≫ f = 0",
" ((kernelSubobjectIso f).hom ≫ kernel.ι f) ≫ f = 0",
" kernel.lift f h w ≫ (MonoOver.mk' (kernel.ι f)).arrow = h",
" h ≫ f ... |
import Mathlib.Data.Stream.Defs
import Mathlib.Logic.Function.Basic
import Mathlib.Init.Data.List.Basic
import Mathlib.Data.List.Basic
#align_import data.stream.init from "leanprover-community/mathlib"@"207cfac9fcd06138865b5d04f7091e46d9320432"
set_option autoImplicit true
open Nat Function Option
namespace Stre... | Mathlib/Data/Stream/Init.lean | 65 | 66 | theorem drop_drop (n m : Nat) (s : Stream' α) : drop n (drop m s) = drop (n + m) s := by |
ext; simp [Nat.add_assoc]
| [
" (s.head :: s.tail) i = s i",
" (s.head :: s.tail) 0 = s 0",
" (s.head :: s.tail) (n✝ + 1) = s (n✝ + 1)",
" drop n (drop m s) = drop (n + m) s",
" (drop n (drop m s)).get n✝ = (drop (n + m) s).get n✝"
] |
import Mathlib.Algebra.MvPolynomial.Monad
#align_import data.mv_polynomial.expand from "leanprover-community/mathlib"@"5da451b4c96b4c2e122c0325a7fce17d62ee46c6"
namespace MvPolynomial
variable {σ τ R S : Type*} [CommSemiring R] [CommSemiring S]
noncomputable def expand (p : ℕ) : MvPolynomial σ R →ₐ[R] MvPolyno... | Mathlib/Algebra/MvPolynomial/Expand.lean | 64 | 68 | theorem expand_comp_bind₁ (p : ℕ) (f : σ → MvPolynomial τ R) :
(expand p).comp (bind₁ f) = bind₁ fun i ↦ expand p (f i) := by |
apply algHom_ext
intro i
simp only [AlgHom.comp_apply, bind₁_X_right]
| [
" (expand 1) f = f",
" expand 1 = AlgHom.id R (MvPolynomial σ R)",
" (expand 1) (X f) = (AlgHom.id R (MvPolynomial σ R)) (X f)",
" (expand p).comp (bind₁ f) = bind₁ fun i => (expand p) (f i)",
" ∀ (i : σ), ((expand p).comp (bind₁ f)) (X i) = (bind₁ fun i => (expand p) (f i)) (X i)",
" ((expand p).comp (bi... |
import Mathlib.Algebra.FreeMonoid.Basic
import Mathlib.Algebra.Group.Submonoid.MulOpposite
import Mathlib.Algebra.Group.Submonoid.Operations
import Mathlib.Algebra.GroupWithZero.Divisibility
import Mathlib.Data.Finset.NoncommProd
import Mathlib.Data.Int.Order.Lemmas
#align_import group_theory.submonoid.membership fro... | Mathlib/Algebra/Group/Submonoid/Membership.lean | 254 | 257 | theorem mem_iSup_of_mem {ι : Sort*} {S : ι → Submonoid M} (i : ι) :
∀ {x : M}, x ∈ S i → x ∈ iSup S := by |
rw [← SetLike.le_def]
exact le_iSup _ _
| [
" x ∈ ⨆ i, S i ↔ ∃ i, x ∈ S i",
" x ∈ ⨆ i, S i → ∃ i, x ∈ S i",
" x ∈ closure (⋃ i, ↑(S i)) → ∃ i, x ∈ S i",
" ∃ i, 1 ∈ S i",
" ∀ (x y : M), (∃ i, x ∈ S i) → (∃ i, y ∈ S i) → ∃ i, x * y ∈ S i",
" ∃ i, x * y ∈ S i",
" x ∈ ↑(⨆ i, S i) ↔ x ∈ ⋃ i, ↑(S i)",
" x ∈ sSup S ↔ ∃ s ∈ S, x ∈ s",
" x ∈ ↑(sSup S)... |
import Mathlib.MeasureTheory.Measure.MeasureSpace
open scoped ENNReal NNReal Topology
open Set MeasureTheory Measure Filter MeasurableSpace ENNReal Function
variable {R α β δ γ ι : Type*}
namespace MeasureTheory
variable {m0 : MeasurableSpace α} [MeasurableSpace β] [MeasurableSpace γ]
variable {μ μ₁ μ₂ μ₃ ν ν' ν... | Mathlib/MeasureTheory/Measure/Restrict.lean | 62 | 64 | theorem restrict_apply₀ (ht : NullMeasurableSet t (μ.restrict s)) : μ.restrict s t = μ (t ∩ s) := by |
rw [← restrictₗ_apply, restrictₗ, liftLinear_apply₀ _ ht, OuterMeasure.restrict_apply,
coe_toOuterMeasure]
| [
" ((OuterMeasure.restrict s) μ.toOuterMeasure) t =\n ((OuterMeasure.restrict s) μ.toOuterMeasure) (t ∩ s') + ((OuterMeasure.restrict s) μ.toOuterMeasure) (t \\ s')",
" μ (s ∩ t) = μ (s ∩ t ∩ s') + μ ((s ∩ t) \\ s')",
" (μ.restrict s).toOuterMeasure = (OuterMeasure.restrict s) μ.toOuterMeasure",
" (μ.restri... |
import Mathlib.Analysis.Calculus.Deriv.Comp
import Mathlib.Analysis.Calculus.Deriv.Add
import Mathlib.Analysis.Calculus.Deriv.Mul
import Mathlib.Analysis.Calculus.Deriv.Slope
noncomputable section
open scoped Topology Filter ENNReal NNReal
open Filter Asymptotics Set
variable {𝕜 : Type*} [NontriviallyNormedFiel... | Mathlib/Analysis/Calculus/LineDeriv/Basic.lean | 160 | 163 | theorem lineDifferentiableWithinAt_univ :
LineDifferentiableWithinAt 𝕜 f univ x v ↔ LineDifferentiableAt 𝕜 f x v := by |
simp only [LineDifferentiableWithinAt, LineDifferentiableAt, preimage_univ,
differentiableWithinAt_univ]
| [
" HasLineDerivWithinAt 𝕜 f f' univ x v ↔ HasLineDerivAt 𝕜 f f' x v",
" HasLineDerivAt 𝕜 f f' x v ↔ (fun t => f (x + t • v) - f x - t • f') =o[𝓝 0] fun t => t",
" lineDeriv 𝕜 f x v = f'",
" LineDifferentiableWithinAt 𝕜 f univ x v ↔ LineDifferentiableAt 𝕜 f x v"
] |
import Mathlib.Tactic.Ring
import Mathlib.Data.PNat.Prime
#align_import data.pnat.xgcd from "leanprover-community/mathlib"@"6afc9b06856ad973f6a2619e3e8a0a8d537a58f2"
open Nat
namespace PNat
structure XgcdType where
wp : ℕ
x : ℕ
y : ℕ
zp : ℕ
ap : ℕ
bp : ℕ
deriving Inhabited
#alig... | Mathlib/Data/PNat/Xgcd.lean | 136 | 137 | theorem v_eq_succ_vp : u.v = succ₂ u.vp := by |
ext <;> dsimp [v, vp, w, z, a, b, succ₂] <;> ring_nf
| [
" u.v = succ₂ u.vp",
" u.v.1 = (succ₂ u.vp).1",
" u.v.2 = (succ₂ u.vp).2",
" (u.wp + 1) * (u.ap + 1) + u.x * (u.bp + 1) = u.wp + u.x + u.ap + u.wp * u.ap + u.x * u.bp + 1",
" u.y * (u.ap + 1) + (u.zp + 1) * (u.bp + 1) = u.y + u.zp + u.bp + u.y * u.ap + u.zp * u.bp + 1"
] |
import Mathlib.Algebra.Lie.Nilpotent
import Mathlib.Algebra.Lie.Normalizer
#align_import algebra.lie.engel from "leanprover-community/mathlib"@"210657c4ea4a4a7b234392f70a3a2a83346dfa90"
universe u₁ u₂ u₃ u₄
variable {R : Type u₁} {L : Type u₂} {L₂ : Type u₃} {M : Type u₄}
variable [CommRing R] [LieRing L] [LieAl... | Mathlib/Algebra/Lie/Engel.lean | 89 | 102 | theorem lie_top_eq_of_span_sup_eq_top (N : LieSubmodule R L M) :
(↑⁅(⊤ : LieIdeal R L), N⁆ : Submodule R M) =
(N : Submodule R M).map (toEnd R L M x) ⊔ (↑⁅I, N⁆ : Submodule R M) := by |
simp only [lieIdeal_oper_eq_linear_span', Submodule.sup_span, mem_top, exists_prop,
true_and, Submodule.map_coe, toEnd_apply_apply]
refine le_antisymm (Submodule.span_le.mpr ?_) (Submodule.span_mono fun z hz => ?_)
· rintro z ⟨y, n, hn : n ∈ N, rfl⟩
obtain ⟨t, z, hz, rfl⟩ := exists_smul_add_of_span_sup_e... | [
" ∃ t, ∃ z ∈ I, y = t • x + z",
" ∃ t_1, ∃ z_1 ∈ I, t • x + z = t_1 • x + z_1",
" ↑⁅⊤, N⁆ = Submodule.map ((toEnd R L M) x) ↑N ⊔ ↑⁅I, N⁆",
" Submodule.span R {m | ∃ x, ∃ n ∈ N, ⁅x, n⁆ = m} =\n Submodule.span R ((fun a => ⁅x, a⁆) '' ↑↑N ∪ {m | ∃ x ∈ I, ∃ n ∈ N, ⁅x, n⁆ = m})",
" {m | ∃ x, ∃ n ∈ N, ⁅x, n⁆ =... |
import Mathlib.Algebra.Order.BigOperators.Ring.Finset
import Mathlib.Analysis.Convex.Hull
import Mathlib.LinearAlgebra.AffineSpace.Basis
#align_import analysis.convex.combination from "leanprover-community/mathlib"@"92bd7b1ffeb306a89f450bee126ddd8a284c259d"
open Set Function
open scoped Classical
open Pointwise
... | Mathlib/Analysis/Convex/Combination.lean | 115 | 123 | theorem Finset.centerMass_ite_eq (hi : i ∈ t) :
t.centerMass (fun j => if i = j then (1 : R) else 0) z = z i := by |
rw [Finset.centerMass_eq_of_sum_1]
· trans ∑ j ∈ t, if i = j then z i else 0
· congr with i
split_ifs with h
exacts [h ▸ one_smul _ _, zero_smul _ _]
· rw [sum_ite_eq, if_pos hi]
· rw [sum_ite_eq, if_pos hi]
| [
" ∅.centerMass w z = 0",
" {i, j}.centerMass w z = (w i / (w i + w j)) • z i + (w j / (w i + w j)) • z j",
" (insert i t).centerMass w z =\n (w i / (w i + ∑ j ∈ t, w j)) • z i + ((∑ j ∈ t, w j) / (w i + ∑ j ∈ t, w j)) • t.centerMass w z",
" (w i / (w i + ∑ i ∈ t, w i)) • z i + (w i + ∑ i ∈ t, w i)⁻¹ • ∑ i ... |
import Mathlib.Topology.Order.MonotoneContinuity
import Mathlib.Topology.Algebra.Order.LiminfLimsup
import Mathlib.Topology.Instances.NNReal
import Mathlib.Topology.EMetricSpace.Lipschitz
import Mathlib.Topology.Metrizable.Basic
import Mathlib.Topology.Order.T5
#align_import topology.instances.ennreal from "leanprove... | Mathlib/Topology/Instances/ENNReal.lean | 730 | 736 | theorem exists_frequently_lt_of_liminf_ne_top {ι : Type*} {l : Filter ι} {x : ι → ℝ}
(hx : liminf (fun n => (Real.nnabs (x n) : ℝ≥0∞)) l ≠ ∞) : ∃ R, ∃ᶠ n in l, x n < R := by |
by_contra h
simp_rw [not_exists, not_frequently, not_lt] at h
refine hx (ENNReal.eq_top_of_forall_nnreal_le fun r => le_limsInf_of_le (by isBoundedDefault) ?_)
simp only [eventually_map, ENNReal.coe_le_coe]
filter_upwards [h r] with i hi using hi.trans (le_abs_self (x i))
| [
" ∃ R, ∃ᶠ (n : ι) in l, x n < R",
" False",
" IsCobounded (fun x x_1 => x ≥ x_1) (map (fun n => ↑(Real.nnabs (x n))) l)",
" ∀ᶠ (n : ℝ≥0∞) in map (fun n => ↑(Real.nnabs (x n))) l, ↑r ≤ n",
" ∀ᶠ (a : ι) in l, r ≤ Real.nnabs (x a)"
] |
import Mathlib.Dynamics.Ergodic.MeasurePreserving
import Mathlib.LinearAlgebra.Determinant
import Mathlib.LinearAlgebra.Matrix.Diagonal
import Mathlib.LinearAlgebra.Matrix.Transvection
import Mathlib.MeasureTheory.Group.LIntegral
import Mathlib.MeasureTheory.Integral.Marginal
import Mathlib.MeasureTheory.Measure.Stiel... | Mathlib/MeasureTheory/Measure/Lebesgue/Basic.lean | 468 | 476 | theorem measurableSet_region_between_oc (hf : Measurable f) (hg : Measurable g)
(hs : MeasurableSet s) :
MeasurableSet { p : α × ℝ | p.fst ∈ s ∧ p.snd ∈ Ioc (f p.fst) (g p.fst) } := by |
dsimp only [regionBetween, Ioc, mem_setOf_eq, setOf_and]
refine
MeasurableSet.inter ?_
((measurableSet_lt (hf.comp measurable_fst) measurable_snd).inter
(measurableSet_le measurable_snd (hg.comp measurable_fst)))
exact measurable_fst hs
| [
" regionBetween f g s ⊆ s ×ˢ univ",
" MeasurableSet (regionBetween f g s)",
" MeasurableSet ({a | a.1 ∈ s} ∩ {a | a.2 ∈ {a_1 | f a.1 < a_1} ∩ {a_1 | a_1 < g a.1}})",
" MeasurableSet {a | a.1 ∈ s}",
" MeasurableSet {p | p.1 ∈ s ∧ p.2 ∈ Ioc (f p.1) (g p.1)}",
" MeasurableSet ({a | a.1 ∈ s} ∩ {a | a.2 ∈ {a_1... |
import Mathlib.Tactic.CategoryTheory.Coherence
import Mathlib.CategoryTheory.Monoidal.Free.Coherence
#align_import category_theory.monoidal.coherence_lemmas from "leanprover-community/mathlib"@"b8b8bf3ea0c625fa1f950034a184e07c67f7bcfe"
open CategoryTheory Category Iso
namespace CategoryTheory.MonoidalCategory
v... | Mathlib/CategoryTheory/Monoidal/CoherenceLemmas.lean | 72 | 75 | theorem pentagon_hom_inv {W X Y Z : C} :
(α_ W X (Y ⊗ Z)).hom ≫ (𝟙 W ⊗ (α_ X Y Z).inv) =
(α_ (W ⊗ X) Y Z).inv ≫ ((α_ W X Y).hom ⊗ 𝟙 Z) ≫ (α_ W (X ⊗ Y) Z).hom := by |
coherence
| [
" (α_ (𝟙_ C) X Y).hom ≫ (λ_ (X ⊗ Y)).hom = (λ_ X).hom ⊗ 𝟙 Y",
" (λ_ (X ⊗ Y)).hom = (α_ (𝟙_ C) X Y).inv ≫ ((λ_ X).hom ⊗ 𝟙 Y)",
" (λ_ (X ⊗ Y)).inv = ((λ_ X).inv ⊗ 𝟙 Y) ≫ (α_ (𝟙_ C) X Y).hom",
" 𝟙 X ⊗ (ρ_ Y).inv = (ρ_ (X ⊗ Y)).inv ≫ (α_ X Y (𝟙_ C)).hom",
" (λ_ X).inv ⊗ 𝟙 Y = (λ_ (X ⊗ Y)).inv ≫ (α_ (𝟙... |
import Mathlib.Computability.Halting
import Mathlib.Computability.TuringMachine
import Mathlib.Data.Num.Lemmas
import Mathlib.Tactic.DeriveFintype
#align_import computability.tm_to_partrec from "leanprover-community/mathlib"@"6155d4351090a6fad236e3d2e4e0e4e7342668e8"
open Function (update)
open Relation
namespa... | Mathlib/Computability/TMToPartrec.lean | 155 | 155 | theorem comp_eval (f g) : (comp f g).eval = fun v => g.eval v >>= f.eval := by | simp [eval]
| [
" zero'.eval = fun v => pure (0 :: v)",
" succ.eval = fun v => pure [v.headI.succ]",
" tail.eval = fun v => pure v.tail",
" (f.cons fs).eval = fun v => do\n let n ← f.eval v\n let ns ← fs.eval v\n pure (n.headI :: ns)",
" (f.comp g).eval = fun v => g.eval v >>= f.eval"
] |
import Mathlib.Analysis.LocallyConvex.Bounded
import Mathlib.Topology.Algebra.Module.StrongTopology
#align_import analysis.normed_space.compact_operator from "leanprover-community/mathlib"@"f0c8bf9245297a541f468be517f1bde6195105e9"
open Function Set Filter Bornology Metric Pointwise Topology
def IsCompactOperat... | Mathlib/Analysis/NormedSpace/CompactOperator.lean | 260 | 265 | theorem IsCompactOperator.continuous_comp {f : M₁ → M₂} (hf : IsCompactOperator f) {g : M₂ → M₃}
(hg : Continuous g) : IsCompactOperator (g ∘ f) := by |
rcases hf with ⟨K, hK, hKf⟩
refine ⟨g '' K, hK.image hg, mem_of_superset hKf ?_⟩
rw [preimage_comp]
exact preimage_mono (subset_preimage_image _ _)
| [
" IsCompactOperator f ↔ ∃ V ∈ 𝓝 0, IsCompact (closure (f '' V))",
" (∃ V ∈ 𝓝 0, ∃ K, IsCompact K ∧ f '' V ⊆ K) ↔ ∃ V ∈ 𝓝 0, IsCompact (closure (f '' V))",
" IsCompactOperator (f ∘ ⇑g)",
" IsCompactOperator (g ∘ f)",
" f ⁻¹' K ⊆ g ∘ f ⁻¹' (g '' K)",
" f ⁻¹' K ⊆ f ⁻¹' (g ⁻¹' (g '' K))"
] |
import Mathlib.Geometry.Euclidean.Sphere.Basic
#align_import geometry.euclidean.sphere.second_inter from "leanprover-community/mathlib"@"46b633fd842bef9469441c0209906f6dddd2b4f5"
noncomputable section
open RealInnerProductSpace
namespace EuclideanGeometry
variable {V : Type*} {P : Type*} [NormedAddCommGroup V]... | Mathlib/Geometry/Euclidean/Sphere/SecondInter.lean | 103 | 108 | theorem Sphere.secondInter_smul (s : Sphere P) (p : P) (v : V) {r : ℝ} (hr : r ≠ 0) :
s.secondInter p (r • v) = s.secondInter p v := by |
simp_rw [Sphere.secondInter, real_inner_smul_left, inner_smul_right, smul_smul,
div_mul_eq_div_div]
rw [mul_comm, ← mul_div_assoc, ← mul_div_assoc, mul_div_cancel_left₀ _ hr, mul_comm, mul_assoc,
mul_div_cancel_left₀ _ hr, mul_comm]
| [
" dist (s.secondInter p v) s.center = dist p s.center",
" dist ((-2 * ⟪v, p -ᵥ s.center⟫_ℝ / ⟪v, v⟫_ℝ) • v +ᵥ p) s.center = dist p s.center",
" -2 * ⟪v, p -ᵥ s.center⟫_ℝ / ⟪v, v⟫_ℝ = 0 ∨ -2 * ⟪v, p -ᵥ s.center⟫_ℝ / ⟪v, v⟫_ℝ = -2 * ⟪v, p -ᵥ s.center⟫_ℝ / ⟪v, v⟫_ℝ",
" s.secondInter p v ∈ s ↔ p ∈ s",
" s.secon... |
import Mathlib.Algebra.Module.DedekindDomain
import Mathlib.LinearAlgebra.FreeModule.PID
import Mathlib.Algebra.Module.Projective
import Mathlib.Algebra.Category.ModuleCat.Biproducts
import Mathlib.RingTheory.SimpleModule
#align_import algebra.module.pid from "leanprover-community/mathlib"@"cdc34484a07418af43daf8198b... | Mathlib/Algebra/Module/PID.lean | 110 | 121 | theorem _root_.Ideal.torsionOf_eq_span_pow_pOrder (x : M) :
torsionOf R M x = span {p ^ pOrder hM x} := by |
dsimp only [pOrder]
rw [← (torsionOf R M x).span_singleton_generator, Ideal.span_singleton_eq_span_singleton, ←
Associates.mk_eq_mk_iff_associated, Associates.mk_pow]
have prop :
(fun n : ℕ => p ^ n • x = 0) = fun n : ℕ =>
(Associates.mk <| generator <| torsionOf R M x) ∣ Associates.mk p ^ n := by
... | [
" DirectSum.IsInternal fun p => torsionBy R M (IsPrincipal.generator ↑p ^ Multiset.count (↑p) (factors ⊤.annihilator))",
" torsionBy R M (IsPrincipal.generator ↑x✝ ^ Multiset.count (↑x✝) (factors ⊤.annihilator)) =\n torsionBySet R M ↑(↑x✝ ^ Multiset.count (↑x✝) (factors ⊤.annihilator))",
" p ∈ torsionBy R M ... |
import Mathlib.Analysis.NormedSpace.ConformalLinearMap
import Mathlib.Analysis.InnerProductSpace.Basic
#align_import analysis.inner_product_space.conformal_linear_map from "leanprover-community/mathlib"@"46b633fd842bef9469441c0209906f6dddd2b4f5"
variable {E F : Type*}
variable [NormedAddCommGroup E] [NormedAddCom... | Mathlib/Analysis/InnerProductSpace/ConformalLinearMap.lean | 29 | 43 | theorem isConformalMap_iff (f : E →L[ℝ] F) :
IsConformalMap f ↔ ∃ c : ℝ, 0 < c ∧ ∀ u v : E, ⟪f u, f v⟫ = c * ⟪u, v⟫ := by |
constructor
· rintro ⟨c₁, hc₁, li, rfl⟩
refine ⟨c₁ * c₁, mul_self_pos.2 hc₁, fun u v => ?_⟩
simp only [real_inner_smul_left, real_inner_smul_right, mul_assoc, coe_smul',
coe_toContinuousLinearMap, Pi.smul_apply, inner_map_map]
· rintro ⟨c₁, hc₁, huv⟩
obtain ⟨c, hc, rfl⟩ : ∃ c : ℝ, 0 < c ∧ c₁ = ... | [
" IsConformalMap f ↔ ∃ c, 0 < c ∧ ∀ (u v : E), ⟪f u, f v⟫_ℝ = c * ⟪u, v⟫_ℝ",
" IsConformalMap f → ∃ c, 0 < c ∧ ∀ (u v : E), ⟪f u, f v⟫_ℝ = c * ⟪u, v⟫_ℝ",
" ∃ c, 0 < c ∧ ∀ (u v : E), ⟪(c₁ • li.toContinuousLinearMap) u, (c₁ • li.toContinuousLinearMap) v⟫_ℝ = c * ⟪u, v⟫_ℝ",
" ⟪(c₁ • li.toContinuousLinearMap) u, ... |
import Mathlib.Algebra.Order.BigOperators.Group.Finset
import Mathlib.Data.Nat.Factors
import Mathlib.Order.Interval.Finset.Nat
#align_import number_theory.divisors from "leanprover-community/mathlib"@"e8638a0fcaf73e4500469f368ef9494e495099b3"
open scoped Classical
open Finset
namespace Nat
variable (n : ℕ)
d... | Mathlib/NumberTheory/Divisors.lean | 61 | 64 | theorem filter_dvd_eq_divisors (h : n ≠ 0) : (Finset.range n.succ).filter (· ∣ n) = n.divisors := by |
ext
simp only [divisors, mem_filter, mem_range, mem_Ico, and_congr_left_iff, iff_and_self]
exact fun ha _ => succ_le_iff.mpr (pos_of_dvd_of_pos ha h.bot_lt)
| [
" filter (fun x => x ∣ n) (range n.succ) = n.divisors",
" a✝ ∈ filter (fun x => x ∣ n) (range n.succ) ↔ a✝ ∈ n.divisors",
" a✝ ∣ n → a✝ < n.succ → 1 ≤ a✝"
] |
import Mathlib.Analysis.Calculus.ContDiff.Defs
import Mathlib.Analysis.Calculus.FDeriv.Add
import Mathlib.Analysis.Calculus.FDeriv.Mul
import Mathlib.Analysis.Calculus.Deriv.Inverse
#align_import analysis.calculus.cont_diff from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe"
noncomputab... | Mathlib/Analysis/Calculus/ContDiff/Basic.lean | 122 | 123 | theorem contDiffOn_of_subsingleton [Subsingleton F] : ContDiffOn 𝕜 n f s := by |
rw [Subsingleton.elim f fun _ => 0]; exact contDiffOn_const
| [
" iteratedFDerivWithin 𝕜 i (fun x => 0) s x = 0",
" iteratedFDerivWithin 𝕜 0 (fun x => 0) s x = 0",
" (iteratedFDerivWithin 𝕜 0 (fun x => 0) s x) x✝ = 0 x✝",
" iteratedFDerivWithin 𝕜 (i + 1) (fun x => 0) s x = 0",
" (iteratedFDerivWithin 𝕜 (i + 1) (fun x => 0) s x) m = 0 m",
" ((fderivWithin 𝕜 (fun ... |
import Mathlib.Data.Finsupp.Encodable
import Mathlib.LinearAlgebra.Pi
import Mathlib.LinearAlgebra.Span
import Mathlib.Data.Set.Countable
#align_import linear_algebra.finsupp from "leanprover-community/mathlib"@"9d684a893c52e1d6692a504a118bfccbae04feeb"
noncomputable section
open Set LinearMap Submodule
namespa... | Mathlib/LinearAlgebra/Finsupp.lean | 133 | 136 | theorem LinearEquiv.finsuppUnique_symm_apply [Unique α] (m : M) :
(LinearEquiv.finsuppUnique R M α).symm m = Finsupp.single default m := by |
ext; simp [LinearEquiv.finsuppUnique, Equiv.funUnique, single, Pi.single,
equivFunOnFinite, Function.update]
| [
" (finsuppUnique R M α).symm m = single default m",
" ((finsuppUnique R M α).symm m) default = (single default m) default"
] |
import Mathlib.Analysis.NormedSpace.Basic
import Mathlib.Topology.Algebra.Module.Basic
#align_import analysis.normed_space.basic from "leanprover-community/mathlib"@"bc91ed7093bf098d253401e69df601fc33dde156"
open Metric Set Function Filter
open scoped NNReal Topology
instance Real.punctured_nhds_module_neBot {E ... | Mathlib/Analysis/NormedSpace/Real.lean | 50 | 59 | theorem dist_smul_add_one_sub_smul_le {r : ℝ} {x y : E} (h : r ∈ Icc 0 1) :
dist (r • x + (1 - r) • y) x ≤ dist y x :=
calc
dist (r • x + (1 - r) • y) x = ‖1 - r‖ * ‖x - y‖ := by |
simp_rw [dist_eq_norm', ← norm_smul, sub_smul, one_smul, smul_sub, ← sub_sub, ← sub_add,
sub_right_comm]
_ = (1 - r) * dist y x := by
rw [Real.norm_eq_abs, abs_eq_self.mpr (sub_nonneg.mpr h.2), dist_eq_norm']
_ ≤ (1 - 0) * dist y x := by gcongr; exact h.1
_ = dist y x := by rw [sub_zero... | [
" ‖x‖⁻¹ • x ∈ closedBall 0 1",
" ‖t • x‖ = t * ‖x‖",
" dist (r • x + (1 - r) • y) x = ‖1 - r‖ * ‖x - y‖",
" ‖1 - r‖ * ‖x - y‖ = (1 - r) * dist y x",
" (1 - r) * dist y x ≤ (1 - 0) * dist y x",
" 0 ≤ r",
" (1 - 0) * dist y x = dist y x"
] |
import Mathlib.Order.WellFounded
import Mathlib.Tactic.Common
#align_import data.pi.lex from "leanprover-community/mathlib"@"6623e6af705e97002a9054c1c05a980180276fc1"
assert_not_exists Monoid
variable {ι : Type*} {β : ι → Type*} (r : ι → ι → Prop) (s : ∀ {i}, β i → β i → Prop)
namespace Pi
protected def Lex (x... | Mathlib/Order/PiLex.lean | 65 | 68 | theorem lex_lt_of_lt [∀ i, PartialOrder (β i)] {r} (hwf : WellFounded r) {x y : ∀ i, β i}
(hlt : x < y) : Pi.Lex r (@fun i => (· < ·)) x y := by |
simp_rw [Pi.Lex, le_antisymm_iff]
exact lex_lt_of_lt_of_preorder hwf hlt
| [
" Pi.Lex r (fun i x x_1 => x < x_1) x y",
" ∃ i, (∀ (j : ι), r j i → x j ≤ y j ∧ y j ≤ x j) ∧ x i < y i"
] |
import Mathlib.NumberTheory.BernoulliPolynomials
import Mathlib.MeasureTheory.Integral.IntervalIntegral
import Mathlib.Analysis.Calculus.Deriv.Polynomial
import Mathlib.Analysis.Fourier.AddCircle
import Mathlib.Analysis.PSeries
#align_import number_theory.zeta_values from "leanprover-community/mathlib"@"f0c8bf9245297... | Mathlib/NumberTheory/ZetaValues.lean | 59 | 64 | theorem bernoulliFun_eval_one (k : ℕ) : bernoulliFun k 1 = bernoulliFun k 0 + ite (k = 1) 1 0 := by |
rw [bernoulliFun, bernoulliFun_eval_zero, Polynomial.eval_one_map, Polynomial.bernoulli_eval_one]
split_ifs with h
· rw [h, bernoulli_one, bernoulli'_one, eq_ratCast]
push_cast; ring
· rw [bernoulli_eq_bernoulli'_of_ne_one h, add_zero, eq_ratCast]
| [
" bernoulliFun k 0 = ↑(bernoulli k)",
" bernoulliFun k 1 = bernoulliFun k 0",
" bernoulliFun k 1 = bernoulliFun k 0 + if k = 1 then 1 else 0",
" (algebraMap ℚ ℝ) (bernoulli' k) = ↑(bernoulli k) + if k = 1 then 1 else 0",
" (algebraMap ℚ ℝ) (bernoulli' k) = ↑(bernoulli k) + 1",
" ↑(1 / 2) = ↑(-1 / 2) + 1",... |
import Mathlib.Data.Complex.Basic
import Mathlib.MeasureTheory.Integral.CircleIntegral
#align_import measure_theory.integral.circle_transform from "leanprover-community/mathlib"@"d11893b411025250c8e61ff2f12ccbd7ee35ab15"
open Set MeasureTheory Metric Filter Function
open scoped Interval Real
noncomputable secti... | Mathlib/MeasureTheory/Integral/CircleTransform.lean | 58 | 65 | theorem circleTransformDeriv_eq (f : ℂ → E) : circleTransformDeriv R z w f =
fun θ => (circleMap z R θ - w)⁻¹ • circleTransform R z w f θ := by |
ext
simp_rw [circleTransformDeriv, circleTransform, ← mul_smul, ← mul_assoc]
ring_nf
rw [inv_pow]
congr
ring
| [
" Periodic (circleTransformDeriv R z w f) (2 * π)",
" ∀ (x : ℝ), circleTransformDeriv R z w f (x + 2 * π) = circleTransformDeriv R z w f x",
" circleTransformDeriv R z w f (x + 2 * π) = circleTransformDeriv R z w f x",
" (2 * ↑π * I)⁻¹ • deriv (circleMap z R) (x + 2 * π) • ((circleMap z R x - w) ^ 2)⁻¹ • f (c... |
import Mathlib.Algebra.BigOperators.Group.Finset
import Mathlib.Data.Fintype.Option
import Mathlib.Data.Fintype.Pi
import Mathlib.Data.Fintype.Sum
#align_import combinatorics.hales_jewett from "leanprover-community/mathlib"@"1126441d6bccf98c81214a0780c73d499f6721fe"
open scoped Classical
universe u v
namespace ... | Mathlib/Combinatorics/HalesJewett.lean | 190 | 193 | theorem vertical_apply {α ι ι'} (v : ι → α) (l : Line α ι') (x : α) :
l.vertical v x = Sum.elim v (l x) := by |
funext i
cases i <;> rfl
| [
" Inhabited (ColorFocused C)",
" h ∈ 0 → (fun x i => (h.line.idxFun i).getD x) none = fun x => none",
" (fun i => Option.map f (l.idxFun i)) ⋯.choose = none",
" (fun x i => (l.idxFun i).getD x) x i = x",
" some ((fun x i => (l.idxFun i).getD x) x i) = l.idxFun i",
" (fun x i => ((map f l).idxFun i).getD x... |
import Mathlib.Analysis.Calculus.ContDiff.Bounds
import Mathlib.Analysis.Calculus.IteratedDeriv.Defs
import Mathlib.Analysis.Calculus.LineDeriv.Basic
import Mathlib.Analysis.LocallyConvex.WithSeminorms
import Mathlib.Analysis.Normed.Group.ZeroAtInfty
import Mathlib.Analysis.SpecialFunctions.Pow.Real
import Mathlib.Ana... | Mathlib/Analysis/Distribution/SchwartzSpace.lean | 194 | 200 | theorem decay_add_le_aux (k n : ℕ) (f g : 𝓢(E, F)) (x : E) :
‖x‖ ^ k * ‖iteratedFDeriv ℝ n ((f : E → F) + (g : E → F)) x‖ ≤
‖x‖ ^ k * ‖iteratedFDeriv ℝ n f x‖ + ‖x‖ ^ k * ‖iteratedFDeriv ℝ n g x‖ := by |
rw [← mul_add]
refine mul_le_mul_of_nonneg_left ?_ (by positivity)
rw [iteratedFDeriv_add_apply (f.smooth _) (g.smooth _)]
exact norm_add_le _ _
| [
" f = g",
" { toFun := toFun✝, smooth' := smooth'✝, decay' := decay'✝ } = g",
" { toFun := toFun✝¹, smooth' := smooth'✝¹, decay' := decay'✝¹ } =\n { toFun := toFun✝, smooth' := smooth'✝, decay' := decay'✝ }",
" ∃ C, 0 < C ∧ ∀ (x : E), ‖x‖ ^ k * ‖iteratedFDeriv ℝ n (⇑f) x‖ ≤ C",
" 0 < max C 1",
" ‖x‖ ^ ... |
import Mathlib.Algebra.CharP.Pi
import Mathlib.Algebra.CharP.Quotient
import Mathlib.Algebra.CharP.Subring
import Mathlib.Algebra.Ring.Pi
import Mathlib.Analysis.SpecialFunctions.Pow.NNReal
import Mathlib.FieldTheory.Perfect
import Mathlib.RingTheory.Localization.FractionRing
import Mathlib.Algebra.Ring.Subring.Basic
... | Mathlib/RingTheory/Perfection.lean | 406 | 413 | theorem preVal_mk {x : O} (hx : (Ideal.Quotient.mk _ x : ModP K v O hv p) ≠ 0) :
preVal K v O hv p (Ideal.Quotient.mk _ x) = v (algebraMap O K x) := by |
obtain ⟨r, hr⟩ : ∃ (a : O), a * (p : O) = (Quotient.mk'' x).out' - x :=
Ideal.mem_span_singleton'.1 <| Ideal.Quotient.eq.1 <| Quotient.sound' <| Quotient.mk_out' _
refine (if_neg hx).trans (v.map_eq_of_sub_lt <| lt_of_not_le ?_)
erw [← RingHom.map_sub, ← hr, hv.le_iff_dvd]
exact fun hprx =>
hx (Ideal.Q... | [
" (-1) (n + 1) ^ p = (-1) n",
" preVal K v O hv p ((Ideal.Quotient.mk (Ideal.span {↑p})) x) = v ((algebraMap O K) x)",
" ¬v ((algebraMap O K) x) ≤\n v ((algebraMap O K) (Quotient.out' ((Ideal.Quotient.mk (Ideal.span {↑p})) x)) - (algebraMap O K) x)",
" ¬r * ↑p ∣ x"
] |
import Mathlib.Data.Nat.Choose.Basic
import Mathlib.Data.List.Perm
import Mathlib.Data.List.Range
#align_import data.list.sublists from "leanprover-community/mathlib"@"ccad6d5093bd2f5c6ca621fc74674cce51355af6"
universe u v w
variable {α : Type u} {β : Type v} {γ : Type w}
open Nat
namespace List
@[simp]
theo... | Mathlib/Data/List/Sublists.lean | 82 | 93 | theorem mem_sublists' {s t : List α} : s ∈ sublists' t ↔ s <+ t := by |
induction' t with a t IH generalizing s
· simp only [sublists'_nil, mem_singleton]
exact ⟨fun h => by rw [h], eq_nil_of_sublist_nil⟩
simp only [sublists'_cons, mem_append, IH, mem_map]
constructor <;> intro h
· rcases h with (h | ⟨s, h, rfl⟩)
· exact sublist_cons_of_sublist _ h
· exact h.cons_con... | [
" ∀ (r₁ r₂ : List (List α)),\n sublists'Aux a r₁ r₂ = (Array.foldl (fun r l => r.push (a :: l)) (toArray r₂) (toArray r₁) 0).toList",
" sublists'Aux a r₁ r₂ = (Array.foldl (fun r l => r.push (a :: l)) (toArray r₂) (toArray r₁) 0).toList",
" foldl (fun r l => r ++ [a :: l]) r₂ r₁ = (foldl (fun r l => r.push (... |
import Mathlib.Algebra.Associated
import Mathlib.Algebra.BigOperators.Group.Finset
import Mathlib.Algebra.SMulWithZero
import Mathlib.Data.Nat.PartENat
import Mathlib.Tactic.Linarith
#align_import ring_theory.multiplicity from "leanprover-community/mathlib"@"e8638a0fcaf73e4500469f368ef9494e495099b3"
variable {α β... | Mathlib/RingTheory/Multiplicity.lean | 137 | 139 | theorem unique' {a b : α} {k : ℕ} (hk : a ^ k ∣ b) (hsucc : ¬a ^ (k + 1) ∣ b) :
k = get (multiplicity a b) ⟨k, hsucc⟩ := by |
rw [← PartENat.natCast_inj, PartENat.natCast_get, unique hk hsucc]
| [
" multiplicity ↑a ↑b = multiplicity a b",
" (multiplicity ↑a ↑b).Dom ↔ (multiplicity a b).Dom",
" (∃ n, ¬↑a ^ (n + 1) ∣ ↑b) ↔ ∃ n, ¬a ^ (n + 1) ∣ b",
" ∀ (h₁ : (multiplicity ↑a ↑b).Dom) (h₂ : (multiplicity a b).Dom),\n (multiplicity ↑a ↑b).get h₁ = (multiplicity a b).get h₂",
" (multiplicity ↑a ↑b).get h... |
import Mathlib.Order.BoundedOrder
#align_import data.prod.lex from "leanprover-community/mathlib"@"70d50ecfd4900dd6d328da39ab7ebd516abe4025"
variable {α β γ : Type*}
namespace Prod.Lex
@[inherit_doc] notation:35 α " ×ₗ " β:34 => Lex (Prod α β)
instance decidableEq (α β : Type*) [DecidableEq α] [DecidableEq β] ... | Mathlib/Data/Prod/Lex.lean | 115 | 119 | theorem toLex_mono : Monotone (toLex : α × β → α ×ₗ β) := by |
rintro ⟨a₁, b₁⟩ ⟨a₂, b₂⟩ ⟨ha, hb⟩
obtain rfl | ha : a₁ = a₂ ∨ _ := ha.eq_or_lt
· exact right _ hb
· exact left _ _ ha
| [
" (a₁, b₁) < (a₂, b₂) ↔ (a₁, b₁) ≤ (a₂, b₂) ∧ ¬(a₂, b₂) ≤ (a₁, b₁)",
" (a₁, b₁) < (a₂, b₂) → (a₁, b₁) ≤ (a₂, b₂) ∧ ¬(a₂, b₂) ≤ (a₁, b₁)",
" (a₁, b₁) ≤ (a₂, b₂) ∧ ¬(a₂, b₂) ≤ (a₁, b₁)",
" (a₁, b₁) ≤ (a₂, b₂)",
" ¬(a₂, b₂) ≤ (a₁, b₁)",
" False",
" a₂ < a₁",
" (a₁, b₁) ≤ (a₁, b₂) ∧ ¬(a₁, b₂) ≤ (a₁, b₁)",... |
import Mathlib.Algebra.Group.Commute.Basic
import Mathlib.Data.Fintype.Card
import Mathlib.GroupTheory.Perm.Basic
#align_import group_theory.perm.support from "leanprover-community/mathlib"@"9003f28797c0664a49e4179487267c494477d853"
open Equiv Finset
namespace Equiv.Perm
variable {α : Type*}
section support
v... | Mathlib/GroupTheory/Perm/Support.lean | 310 | 312 | theorem support_eq_empty_iff {σ : Perm α} : σ.support = ∅ ↔ σ = 1 := by |
simp_rw [Finset.ext_iff, mem_support, Finset.not_mem_empty, iff_false_iff, not_not,
Equiv.Perm.ext_iff, one_apply]
| [
" x ∈ f.support ↔ f x ≠ x",
" x ∉ f.support ↔ f x = x",
" ↑f.support = {x | f x ≠ x}",
" x✝ ∈ ↑f.support ↔ x✝ ∈ {x | f x ≠ x}",
" σ.support = ∅ ↔ σ = 1"
] |
import Mathlib.Algebra.Polynomial.Degree.Definitions
import Mathlib.Algebra.Polynomial.Induction
#align_import data.polynomial.eval from "leanprover-community/mathlib"@"728baa2f54e6062c5879a3e397ac6bac323e506f"
set_option linter.uppercaseLean3 false
noncomputable section
open Finset AddMonoidAlgebra
open Polyn... | Mathlib/Algebra/Polynomial/Eval.lean | 105 | 106 | theorem eval₂_bit1 : (bit1 p).eval₂ f x = bit1 (p.eval₂ f x) := by |
rw [bit1, eval₂_add, eval₂_bit0, eval₂_one, bit1]
| [
" eval₂ f x p = p.sum fun e a => f a * x ^ e",
" f = g → s = t → φ = ψ → eval₂ f s φ = eval₂ g t ψ",
" eval₂ f s φ = eval₂ f s φ",
" eval₂ f 0 p = f (p.coeff 0)",
" eval₂ f x 0 = 0",
" eval₂ f x (C a) = f a",
" eval₂ f x X = x",
" eval₂ f x ((monomial n) r) = f r * x ^ n",
" eval₂ f x (X ^ n) = x ^ ... |
import Mathlib.Topology.Algebra.Ring.Basic
import Mathlib.RingTheory.Ideal.Quotient
#align_import topology.algebra.ring.ideal from "leanprover-community/mathlib"@"9a59dcb7a2d06bf55da57b9030169219980660cd"
section CommRing
variable {R : Type*} [TopologicalSpace R] [CommRing R] (N : Ideal R)
open Ideal.Quotient
... | Mathlib/Topology/Algebra/Ring/Ideal.lean | 61 | 65 | theorem QuotientRing.isOpenMap_coe : IsOpenMap (mk N) := by |
intro s s_op
change IsOpen (mk N ⁻¹' (mk N '' s))
rw [quotient_ring_saturate]
exact isOpen_iUnion fun ⟨n, _⟩ => isOpenMap_add_left n s s_op
| [
" IsOpenMap ⇑(mk N)",
" IsOpen (⇑(mk N) '' s)",
" IsOpen (⇑(mk N) ⁻¹' (⇑(mk N) '' s))",
" IsOpen (⋃ x, (fun y => ↑x + y) '' s)"
] |
import Mathlib.Data.Sigma.Basic
import Mathlib.Algebra.Order.Ring.Nat
#align_import set_theory.lists from "leanprover-community/mathlib"@"497d1e06409995dd8ec95301fa8d8f3480187f4c"
variable {α : Type*}
inductive Lists'.{u} (α : Type u) : Bool → Type u
| atom : α → Lists' α false
| nil : Lists' α true
| con... | Mathlib/SetTheory/Lists.lean | 99 | 99 | theorem to_ofList (l : List (Lists α)) : toList (ofList l) = l := by | induction l <;> simp [*]
| [
" (cons a l).toList = a :: l.toList",
" (ofList l).toList = l",
" (ofList []).toList = []",
" (ofList (head✝ :: tail✝)).toList = head✝ :: tail✝"
] |
import Mathlib.CategoryTheory.Abelian.Basic
#align_import category_theory.idempotents.basic from "leanprover-community/mathlib"@"3a061790136d13594ec10c7c90d202335ac5d854"
open CategoryTheory
open CategoryTheory.Category
open CategoryTheory.Limits
open CategoryTheory.Preadditive
open Opposite
namespace Catego... | Mathlib/CategoryTheory/Idempotents/Basic.lean | 99 | 101 | theorem idem_of_id_sub_idem [Preadditive C] {X : C} (p : X ⟶ X) (hp : p ≫ p = p) :
(𝟙 _ - p) ≫ (𝟙 _ - p) = 𝟙 _ - p := by |
simp only [comp_sub, sub_comp, id_comp, comp_id, hp, sub_self, sub_zero]
| [
" IsIdempotentComplete C ↔ ∀ (X : C) (p : X ⟶ X), p ≫ p = p → HasEqualizer (𝟙 X) p",
" IsIdempotentComplete C → ∀ (X : C) (p : X ⟶ X), p ≫ p = p → HasEqualizer (𝟙 X) p",
" ∀ (X : C) (p : X ⟶ X), p ≫ p = p → HasEqualizer (𝟙 X) p",
" HasEqualizer (𝟙 X) p",
" i ≫ 𝟙 X = i ≫ p",
" IsLimit (Fork.ofι i ⋯)",... |
import Mathlib.Algebra.Order.BigOperators.Group.Finset
import Mathlib.Data.Nat.Factors
import Mathlib.Order.Interval.Finset.Nat
#align_import number_theory.divisors from "leanprover-community/mathlib"@"e8638a0fcaf73e4500469f368ef9494e495099b3"
open scoped Classical
open Finset
namespace Nat
variable (n : ℕ)
d... | Mathlib/NumberTheory/Divisors.lean | 116 | 131 | theorem mem_divisorsAntidiagonal {x : ℕ × ℕ} :
x ∈ divisorsAntidiagonal n ↔ x.fst * x.snd = n ∧ n ≠ 0 := by |
simp only [divisorsAntidiagonal, Finset.mem_Ico, Ne, Finset.mem_filter, Finset.mem_product]
rw [and_comm]
apply and_congr_right
rintro rfl
constructor <;> intro h
· contrapose! h
simp [h]
· rw [Nat.lt_add_one_iff, Nat.lt_add_one_iff]
rw [mul_eq_zero, not_or] at h
simp only [succ_le_of_lt (Nat... | [
" filter (fun x => x ∣ n) (range n.succ) = n.divisors",
" a✝ ∈ filter (fun x => x ∣ n) (range n.succ) ↔ a✝ ∈ n.divisors",
" a✝ ∣ n → a✝ < n.succ → 1 ≤ a✝",
" filter (fun x => x ∣ n) (range n) = n.properDivisors",
" a✝ ∈ filter (fun x => x ∣ n) (range n) ↔ a✝ ∈ n.properDivisors",
" a✝ ∣ n → a✝ < n → 1 ≤ a✝... |
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 | 49 | 49 | theorem rotate'_nil (n : ℕ) : ([] : List α).rotate' n = [] := by | cases n <;> rfl
| [
" l.rotate (n % l.length) = l.rotate n",
" [].rotate n = []",
" l.rotate 0 = l",
" [].rotate' n = []",
" [].rotate' 0 = []",
" [].rotate' (n✝ + 1) = []"
] |
import Mathlib.Algebra.Group.Commute.Units
import Mathlib.Algebra.Group.Int
import Mathlib.Algebra.GroupWithZero.Semiconj
import Mathlib.Data.Nat.GCD.Basic
import Mathlib.Order.Bounds.Basic
#align_import data.int.gcd from "leanprover-community/mathlib"@"47a1a73351de8dd6c8d3d32b569c8e434b03ca47"
namespace Nat
... | Mathlib/Data/Int/GCD.lean | 80 | 82 | theorem gcdB_zero_left {s : ℕ} : gcdB 0 s = 1 := by |
unfold gcdB
rw [xgcd, xgcd_zero_left]
| [
" (invImage\n (fun x =>\n PSigma.casesOn x fun a a_1 =>\n PSigma.casesOn a_1 fun a_2 a_3 =>\n PSigma.casesOn a_3 fun a_4 a_5 => PSigma.casesOn a_5 fun a_6 a_7 => PSigma.casesOn a_7 fun a_8 a_9 => a)\n instWellFoundedRelationOfSizeOf).1\n ⟨r' % k.succ, ⟨s' - ↑q * s, ... |
import Mathlib.Geometry.Euclidean.Inversion.Basic
import Mathlib.Geometry.Euclidean.PerpBisector
open Metric Function AffineMap Set AffineSubspace
open scoped Topology
variable {V P : Type*} [NormedAddCommGroup V] [InnerProductSpace ℝ V] [MetricSpace P]
[NormedAddTorsor V P] {c x y : P} {R : ℝ}
namespace Euclid... | Mathlib/Geometry/Euclidean/Inversion/ImageHyperplane.lean | 73 | 76 | theorem image_inversion_sphere_dist_center (hR : R ≠ 0) (hy : y ≠ c) :
inversion c R '' sphere y (dist y c) = insert c (perpBisector c (inversion c R y) : Set P) := by |
rw [image_eq_preimage_of_inverse (inversion_involutive _ hR) (inversion_involutive _ hR),
preimage_inversion_sphere_dist_center hR hy]
| [
" inversion c R x ∈ perpBisector c (inversion c R y) ↔ dist x y = dist y c",
" R ^ 2 / dist x c = R ^ 2 / (dist x c * dist y c) * dist x y ↔ dist x y = dist y c",
" inversion c R x ∈ perpBisector c (inversion c R y) ↔ dist x y = dist y c ∧ x ≠ c",
" inversion x R x ∈ perpBisector x (inversion x R y) ↔ dist x ... |
import Mathlib.Order.Filter.Lift
import Mathlib.Topology.Defs.Filter
#align_import topology.basic from "leanprover-community/mathlib"@"e354e865255654389cc46e6032160238df2e0f40"
noncomputable section
open Set Filter
universe u v w x
def TopologicalSpace.ofClosed {X : Type u} (T : Set (Set X)) (empty_mem : ∅ ∈... | Mathlib/Topology/Basic.lean | 164 | 167 | theorem TopologicalSpace.ext_iff_isClosed {t₁ t₂ : TopologicalSpace X} :
t₁ = t₂ ↔ ∀ s, IsClosed[t₁] s ↔ IsClosed[t₂] s := by |
rw [TopologicalSpace.ext_iff, compl_surjective.forall]
simp only [@isOpen_compl_iff _ _ t₁, @isOpen_compl_iff _ _ t₂]
| [
" (fun X_1 => X_1ᶜ ∈ T) univ",
" (fun X_1 => X_1ᶜ ∈ T) (s ∩ t)",
" (fun X_1 => X_1ᶜ ∈ T) (⋃₀ s)",
" ⋂₀ (compl '' s) ∈ T",
" t = t'",
" IsOpen x✝ ↔ IsOpen x✝",
" IsOpen (s₁ ∪ s₂)",
" IsOpen (⋃ b, bif b then s₁ else s₂)",
" IsOpen s ↔ ∀ (i : α), IsOpen (f i ∩ s)",
" IsOpen s",
" IsOpen (⋃ i, f i ∩... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.